231 lines
203 KiB
JavaScript
231 lines
203 KiB
JavaScript
|
/**
|
||
|
* Cesium - https://github.com/AnalyticalGraphicsInc/cesium
|
||
|
*
|
||
|
* Copyright 2011-2017 Cesium Contributors
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*
|
||
|
* Columbus View (Pat. Pend.)
|
||
|
*
|
||
|
* Portions licensed separately.
|
||
|
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
|
||
|
*/
|
||
|
/**
|
||
|
@license
|
||
|
mersenne-twister.js - https://gist.github.com/banksean/300494
|
||
|
|
||
|
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||
|
All rights reserved.
|
||
|
|
||
|
Redistribution and use in source and binary forms, with or without
|
||
|
modification, are permitted provided that the following conditions
|
||
|
are met:
|
||
|
|
||
|
1. Redistributions of source code must retain the above copyright
|
||
|
notice, this list of conditions and the following disclaimer.
|
||
|
|
||
|
2. Redistributions in binary form must reproduce the above copyright
|
||
|
notice, this list of conditions and the following disclaimer in the
|
||
|
documentation and/or other materials provided with the distribution.
|
||
|
|
||
|
3. The names of its contributors may not be used to endorse or promote
|
||
|
products derived from this software without specific prior written
|
||
|
permission.
|
||
|
|
||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
@license
|
||
|
when.js - https://github.com/cujojs/when
|
||
|
|
||
|
MIT License (c) copyright B Cavalier & J Hann
|
||
|
|
||
|
* A lightweight CommonJS Promises/A and when() implementation
|
||
|
* when is part of the cujo.js family of libraries (http://cujojs.com/)
|
||
|
*
|
||
|
* Licensed under the MIT License at:
|
||
|
* http://www.opensource.org/licenses/mit-license.php
|
||
|
*
|
||
|
* @version 1.7.1
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
@license
|
||
|
sprintf.js from the php.js project - https://github.com/kvz/phpjs
|
||
|
Directly from https://github.com/kvz/phpjs/blob/master/functions/strings/sprintf.js
|
||
|
|
||
|
php.js is copyright 2012 Kevin van Zonneveld.
|
||
|
|
||
|
Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
|
||
|
(http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
|
||
|
(http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas
|
||
|
Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev
|
||
|
Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa,
|
||
|
Rafa? Kukawski (http://blog.kukawski.pl), lmeyrick
|
||
|
(https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann,
|
||
|
Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R.
|
||
|
L. Rodrigues (http://www.jsfromhell.com), Ash Searle
|
||
|
(http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek,
|
||
|
Erkekjetter, Michael Grier, Rafa? Kukawski (http://kukawski.pl), Johnny
|
||
|
Mast (http://www.phpvrouwen.nl), T.Wild, d3x,
|
||
|
http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
|
||
|
Rafa? Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo
|
||
|
(http://webdevhobo.blogspot.com/), marrtins, GeekFG
|
||
|
(http://geekfg.blogspot.com), Andrea Giammarchi
|
||
|
(http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net),
|
||
|
gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg
|
||
|
Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser
|
||
|
(http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
|
||
|
Marc Palau, Martin
|
||
|
(http://www.erlenwiese.de/), Breaking Par Consulting Inc
|
||
|
(http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
|
||
|
Chris, Mirek Slugen, saulius, Alfonso Jimenez
|
||
|
(http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix,
|
||
|
Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio
|
||
|
Ariede (http://caioariede.com), Robin, Kankrelune
|
||
|
(http://www.webfaktory.info/), Karol Kowalski, Imgen Tata
|
||
|
(http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer,
|
||
|
Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ,
|
||
|
David, Aman Gupta, Michael White, Public Domain
|
||
|
(http://www.json.org/json2.js), Steven Levithan
|
||
|
(http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada,
|
||
|
Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018),
|
||
|
Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon
|
||
|
(http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/),
|
||
|
Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank
|
||
|
Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov
|
||
|
(http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford
|
||
|
(http://javascript.crockford.com), madipta, Slawomir Kaniecki,
|
||
|
ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner
|
||
|
(http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix,
|
||
|
Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick
|
||
|
(https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan,
|
||
|
Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson H?gfeldt
|
||
|
(http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb,
|
||
|
josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren
|
||
|
Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon
|
||
|
(http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX
|
||
|
(http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH,
|
||
|
Stoyan Kyosev (http://www.svest.org/), nord_ua, omid
|
||
|
(http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc
|
||
|
(http://yass.meetcweb.com), Peter-Paul Koch
|
||
|
(http://www.quirksmode.org/js/beat.html), Olivier Louvignes
|
||
|
(http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami,
|
||
|
Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith,
|
||
|
vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair
|
||
|
Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger
|
||
|
(http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner
|
||
|
B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
|
||
|
(http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna,
|
||
|
Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni,
|
||
|
Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke
|
||
|
(http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski,
|
||
|
Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke
|
||
|
Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
|
||
|
sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen,
|
||
|
Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya
|
||
|
(http://www.premasolutions.com/), Philippe Jausions
|
||
|
(http://pear.php.net/user/jausions), Aidan Lister
|
||
|
(http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
|
||
|
strcmp, Taras Bogach, jpfle, Alexander Ermolaev
|
||
|
(http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
|
||
|
dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
|
||
|
(http://www.pedrotainha.com), James, Arnout Kazemier
|
||
|
(http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo,
|
||
|
FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan
|
||
|
Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook,
|
||
|
daniel airton wermann (http://wermann.com.br), Atli T¨®r, Maximusya, Ryan
|
||
|
W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage
|
||
|
(http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo,
|
||
|
Billy, stensi, Cord, Manish, T.J. Leahy, Riddler
|
||
|
(http://www.frontierwebdev.com/), Rafa? Kukawski, FremyCompany, Matt
|
||
|
Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo
|
||
|
Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi
|
||
|
(http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem,
|
||
|
Russell Walker (http://www.nbill.co.uk/), Jamie Beck
|
||
|
(http://www.terabit.ca/), setcookie, Michael, YUI Library:
|
||
|
http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at
|
||
|
http://hacks.bluesmoon.info/strftime/strftime.js, Ben
|
||
|
(http://benblume.co.uk/), DtTvB
|
||
|
(http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William,
|
||
|
meo, incidence, Cagri Ekin, Amirouche, Amir Habibi
|
||
|
(http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name),
|
||
|
Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani,
|
||
|
Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben
|
||
|
Bryan
|
||
|
|
||
|
Licensed under the MIT (MIT-LICENSE.txt) license.
|
||
|
|
||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||
|
copy of this software and associated documentation files (the
|
||
|
"Software"), to deal in the Software without restriction, including
|
||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||
|
permit persons to whom the Software is furnished to do so, subject to
|
||
|
the following conditions:
|
||
|
|
||
|
The above copyright notice and this permission notice shall be included
|
||
|
in all copies or substantial portions of the Software.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||
|
IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
|
||
|
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @license
|
||
|
*
|
||
|
* Grauw URI utilities
|
||
|
*
|
||
|
* See: http://hg.grauw.nl/grauw-lib/file/tip/src/uri.js
|
||
|
*
|
||
|
* @author Laurens Holst (http://www.grauw.nl/)
|
||
|
*
|
||
|
* Copyright 2012 Laurens Holst
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
!function(){define("Core/defined",[],function(){"use strict";function e(e){return void 0!==e&&null!==e}return e}),define("Core/DeveloperError",["./defined"],function(e){"use strict";function t(e){this.name="DeveloperError",this.message=e;var t;try{throw new Error}catch(r){t=r.stack}this.stack=t}return e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t),t.prototype.toString=function(){var t=this.name+": "+this.message;return e(this.stack)&&(t+="\n"+this.stack.toString()),t},t.throwInstantiationError=function(){throw new t("This function defines an interface and should not be called directly.")},t}),define("Core/Check",["./defined","./DeveloperError"],function(e,t){"use strict";function r(e){return e+" is required, actual value was undefined"}function n(e,t,r){return"Expected "+r+" to be typeof "+t+", actual typeof was "+e}var i={};return i.typeOf={},i.defined=function(n,i){if(!e(i))throw new t(r(n))},i.typeOf.func=function(e,r){if("function"!=typeof r)throw new t(n(typeof r,"function",e))},i.typeOf.string=function(e,r){if("string"!=typeof r)throw new t(n(typeof r,"string",e))},i.typeOf.number=function(e,r){if("number"!=typeof r)throw new t(n(typeof r,"number",e))},i.typeOf.number.lessThan=function(e,r,n){if(i.typeOf.number(e,r),r>=n)throw new t("Expected "+e+" to be less than "+n+", actual value was "+r)},i.typeOf.number.lessThanOrEquals=function(e,r,n){if(i.typeOf.number(e,r),r>n)throw new t("Expected "+e+" to be less than or equal to "+n+", actual value was "+r)},i.typeOf.number.greaterThan=function(e,r,n){if(i.typeOf.number(e,r),n>=r)throw new t("Expected "+e+" to be greater than "+n+", actual value was "+r)},i.typeOf.number.greaterThanOrEquals=function(e,r,n){if(i.typeOf.number(e,r),n>r)throw new t("Expected "+e+" to be greater than or equal to"+n+", actual value was "+r)},i.typeOf.object=function(e,r){if("object"!=typeof r)throw new t(n(typeof r,"object",e))},i.typeOf.bool=function(e,r){if("boolean"!=typeof r)throw new t(n(typeof r,"boolean",e))},i.typeOf.number.equals=function(e,r,n,o){if(i.typeOf.number(e,n),i.typeOf.number(r,o),n!==o)throw new t(e+" must be equal to "+r+", the actual values are "+n+" and "+o)},i}),define("Core/freezeObject",["./defined"],function(e){"use strict";var t=Object.freeze;return e(t)||(t=function(e){return e}),t}),define("Core/defaultValue",["./freezeObject"],function(e){"use strict";function t(e,t){return void 0!==e&&null!==e?e:t}return t.EMPTY_OBJECT=e({}),t}),define("Core/arrayFill",["./Check","./defaultValue","./defined"],function(e,t,r){"use strict";function n(n,i,o,a){if(e.defined("array",n),e.defined("value",i),r(o)&&e.typeOf.number("start",o),r(a)&&e.typeOf.number("end",a),"function"==typeof n.fill)return n.fill(i,o,a);for(var u=n.length>>>0,s=t(o,0),c=0>s?Math.max(u+s,0):Math.min(s,u),f=t(a,u),l=0>f?Math.max(u+f,0):Math.min(f,u);l>c;)n[c]=i,c++;return n}return n}),define("ThirdParty/mersenne-twister",[],function(){var e=function(e){void 0==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};return e.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){var e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},e.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_genrand(5489),r=0;r<this.N-this.M;r++)e=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+this.M]^e>>>1^t[1&e];for(;r<this.N-1;r++)e=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0},e.prototype.random=function(){return this.g
|
||
|
t.typeOf.object("cartesian",n),t.typeOf.object("result",i),i=s.clone(e,i);var o=3*r;return i[o]=n.x,i[o+1]=n.y,i[o+2]=n.z,i},s.getRow=function(e,r,n){t.typeOf.object("matrix",e),t.typeOf.number.greaterThanOrEquals("index",r,0),t.typeOf.number.lessThanOrEquals("index",r,2),t.typeOf.object("result",n);var i=e[r],o=e[r+3],a=e[r+6];return n.x=i,n.y=o,n.z=a,n},s.setRow=function(e,r,n,i){return t.typeOf.object("matrix",e),t.typeOf.number.greaterThanOrEquals("index",r,0),t.typeOf.number.lessThanOrEquals("index",r,2),t.typeOf.object("cartesian",n),t.typeOf.object("result",i),i=s.clone(e,i),i[r]=n.x,i[r+3]=n.y,i[r+6]=n.z,i};var p=new e;s.getScale=function(r,n){return t.typeOf.object("matrix",r),t.typeOf.object("result",n),n.x=e.magnitude(e.fromElements(r[0],r[1],r[2],p)),n.y=e.magnitude(e.fromElements(r[3],r[4],r[5],p)),n.z=e.magnitude(e.fromElements(r[6],r[7],r[8],p)),n};var h=new e;s.getMaximumScale=function(t){return s.getScale(t,h),e.maximumComponent(h)},s.multiply=function(e,r,n){t.typeOf.object("left",e),t.typeOf.object("right",r),t.typeOf.object("result",n);var i=e[0]*r[0]+e[3]*r[1]+e[6]*r[2],o=e[1]*r[0]+e[4]*r[1]+e[7]*r[2],a=e[2]*r[0]+e[5]*r[1]+e[8]*r[2],u=e[0]*r[3]+e[3]*r[4]+e[6]*r[5],s=e[1]*r[3]+e[4]*r[4]+e[7]*r[5],c=e[2]*r[3]+e[5]*r[4]+e[8]*r[5],f=e[0]*r[6]+e[3]*r[7]+e[6]*r[8],l=e[1]*r[6]+e[4]*r[7]+e[7]*r[8],p=e[2]*r[6]+e[5]*r[7]+e[8]*r[8];return n[0]=i,n[1]=o,n[2]=a,n[3]=u,n[4]=s,n[5]=c,n[6]=f,n[7]=l,n[8]=p,n},s.add=function(e,r,n){return t.typeOf.object("left",e),t.typeOf.object("right",r),t.typeOf.object("result",n),n[0]=e[0]+r[0],n[1]=e[1]+r[1],n[2]=e[2]+r[2],n[3]=e[3]+r[3],n[4]=e[4]+r[4],n[5]=e[5]+r[5],n[6]=e[6]+r[6],n[7]=e[7]+r[7],n[8]=e[8]+r[8],n},s.subtract=function(e,r,n){return t.typeOf.object("left",e),t.typeOf.object("right",r),t.typeOf.object("result",n),n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],n[3]=e[3]-r[3],n[4]=e[4]-r[4],n[5]=e[5]-r[5],n[6]=e[6]-r[6],n[7]=e[7]-r[7],n[8]=e[8]-r[8],n},s.multiplyByVector=function(e,r,n){t.typeOf.object("matrix",e),t.typeOf.object("cartesian",r),t.typeOf.object("result",n);var i=r.x,o=r.y,a=r.z,u=e[0]*i+e[3]*o+e[6]*a,s=e[1]*i+e[4]*o+e[7]*a,c=e[2]*i+e[5]*o+e[8]*a;return n.x=u,n.y=s,n.z=c,n},s.multiplyByScalar=function(e,r,n){return t.typeOf.object("matrix",e),t.typeOf.number("scalar",r),t.typeOf.object("result",n),n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*r,n[4]=e[4]*r,n[5]=e[5]*r,n[6]=e[6]*r,n[7]=e[7]*r,n[8]=e[8]*r,n},s.multiplyByScale=function(e,r,n){return t.typeOf.object("matrix",e),t.typeOf.object("scale",r),t.typeOf.object("result",n),n[0]=e[0]*r.x,n[1]=e[1]*r.x,n[2]=e[2]*r.x,n[3]=e[3]*r.y,n[4]=e[4]*r.y,n[5]=e[5]*r.y,n[6]=e[6]*r.z,n[7]=e[7]*r.z,n[8]=e[8]*r.z,n},s.negate=function(e,r){return t.typeOf.object("matrix",e),t.typeOf.object("result",r),r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r[3]=-e[3],r[4]=-e[4],r[5]=-e[5],r[6]=-e[6],r[7]=-e[7],r[8]=-e[8],r},s.transpose=function(e,r){t.typeOf.object("matrix",e),t.typeOf.object("result",r);var n=e[0],i=e[3],o=e[6],a=e[1],u=e[4],s=e[7],c=e[2],f=e[5],l=e[8];return r[0]=n,r[1]=i,r[2]=o,r[3]=a,r[4]=u,r[5]=s,r[6]=c,r[7]=f,r[8]=l,r};var d=[1,0,0],y=[2,2,1],m=new s,E=new s;return s.computeEigenDecomposition=function(e,r){t.typeOf.object("matrix",e);var i=u.EPSILON20,o=10,a=0,p=0;n(r)||(r={});for(var h=r.unitary=s.clone(s.IDENTITY,r.unitary),d=r.diagonal=s.clone(e,r.diagonal),y=i*c(d);o>p&&f(d)>y;)l(d,m),s.transpose(m,E),s.multiply(d,m,d),s.multiply(E,d,d),s.multiply(h,m,h),++a>2&&(++p,a=0);return r},s.abs=function(e,r){return t.typeOf.object("matrix",e),t.typeOf.object("result",r),r[0]=Math.abs(e[0]),r[1]=Math.abs(e[1]),r[2]=Math.abs(e[2]),r[3]=Math.abs(e[3]),r[4]=Math.abs(e[4]),r[5]=Math.abs(e[5]),r[6]=Math.abs(e[6]),r[7]=Math.abs(e[7]),r[8]=Math.abs(e[8]),r},s.determinant=function(e){t.typeOf.object("matrix",e);var r=e[0],n=e[3],i=e[6],o=e[1],a=e[4],u=e[7],s=e[2],c=e[5],f=e[8];return r*(a*f-c*u)+o*(c*i-n*f)+s*(n*u-a*i)},s.inverse=function(e,r){t.typeOf.object("matrix",e),t.typeOf.object("result",r);var n=e[0],i=e[1],a=e[2],c=e[3],f=e[4],l=e[5],p=e[6],h=e[7],d=e[8],y=s.determinant(e);if(Math.abs(y)<=u.EPSILON15)throw new o("matri
|
||
|
n(a)?(a.west=e,a.south=t,a.east=i,a.north=o,a):new s(e,t,i,o)},s.fromRadians=function(e,t,i,o,a){return n(a)?(a.west=r(e,0),a.south=r(t,0),a.east=r(i,0),a.north=r(o,0),a):new s(e,t,i,o)},s.fromCartographicArray=function(e,r){t.defined("cartographics",e);for(var i=Number.MAX_VALUE,o=-Number.MAX_VALUE,a=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=Number.MAX_VALUE,l=-Number.MAX_VALUE,p=0,h=e.length;h>p;p++){var d=e[p];i=Math.min(i,d.longitude),o=Math.max(o,d.longitude),f=Math.min(f,d.latitude),l=Math.max(l,d.latitude);var y=d.longitude>=0?d.longitude:d.longitude+u.TWO_PI;a=Math.min(a,y),c=Math.max(c,y)}return o-i>c-a&&(i=a,o=c,o>u.PI&&(o-=u.TWO_PI),i>u.PI&&(i-=u.TWO_PI)),n(r)?(r.west=i,r.south=f,r.east=o,r.north=l,r):new s(i,f,o,l)},s.fromCartesianArray=function(e,i,a){t.defined("cartesians",e),i=r(i,o.WGS84);for(var c=Number.MAX_VALUE,f=-Number.MAX_VALUE,l=Number.MAX_VALUE,p=-Number.MAX_VALUE,h=Number.MAX_VALUE,d=-Number.MAX_VALUE,y=0,m=e.length;m>y;y++){var E=i.cartesianToCartographic(e[y]);c=Math.min(c,E.longitude),f=Math.max(f,E.longitude),h=Math.min(h,E.latitude),d=Math.max(d,E.latitude);var O=E.longitude>=0?E.longitude:E.longitude+u.TWO_PI;l=Math.min(l,O),p=Math.max(p,O)}return f-c>p-l&&(c=l,f=p,f>u.PI&&(f-=u.TWO_PI),c>u.PI&&(c-=u.TWO_PI)),n(a)?(a.west=c,a.south=h,a.east=f,a.north=d,a):new s(c,h,f,d)},s.clone=function(e,t){return n(e)?n(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new s(e.west,e.south,e.east,e.north):void 0},s.equalsEpsilon=function(e,r,i){return t.typeOf.number("absoluteEpsilon",i),e===r||n(e)&&n(r)&&Math.abs(e.west-r.west)<=i&&Math.abs(e.south-r.south)<=i&&Math.abs(e.east-r.east)<=i&&Math.abs(e.north-r.north)<=i},s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.equals=function(e,t){return e===t||n(e)&&n(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},s.prototype.equalsEpsilon=function(e,r){return t.typeOf.number("epsilon",r),s.equalsEpsilon(this,e,r)},s.validate=function(e){t.typeOf.object("rectangle",e);var r=e.north;t.typeOf.number.greaterThanOrEquals("north",r,-u.PI_OVER_TWO),t.typeOf.number.lessThanOrEquals("north",r,u.PI_OVER_TWO);var n=e.south;t.typeOf.number.greaterThanOrEquals("south",n,-u.PI_OVER_TWO),t.typeOf.number.lessThanOrEquals("south",n,u.PI_OVER_TWO);var i=e.west;t.typeOf.number.greaterThanOrEquals("west",i,-Math.PI),t.typeOf.number.lessThanOrEquals("west",i,Math.PI);var o=e.east;t.typeOf.number.greaterThanOrEquals("east",o,-Math.PI),t.typeOf.number.lessThanOrEquals("east",o,Math.PI)},s.southwest=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.west,i.latitude=r.south,i.height=0,i):new e(r.west,r.south)},s.northwest=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.west,i.latitude=r.north,i.height=0,i):new e(r.west,r.north)},s.northeast=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.east,i.latitude=r.north,i.height=0,i):new e(r.east,r.north)},s.southeast=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.east,i.latitude=r.south,i.height=0,i):new e(r.east,r.south)},s.center=function(r,i){t.typeOf.object("rectangle",r);var o=r.east,a=r.west;a>o&&(o+=u.TWO_PI);var s=u.negativePiToPi(.5*(a+o)),c=.5*(r.south+r.north);return n(i)?(i.longitude=s,i.latitude=c,i.height=0,i):new e(s,c)},s.intersection=function(e,r,i){t.typeOf.object("rectangle",e),t.typeOf.object("otherRectangle",r);var o=e.east,a=e.west,c=r.east,f=r.west;a>o&&c>0?o+=u.TWO_PI:f>c&&o>0&&(c+=u.TWO_PI),a>o&&0>f?f+=u.TWO_PI:f>c&&0>a&&(a+=u.TWO_PI);var l=u.negativePiToPi(Math.max(a,f)),p=u.negativePiToPi(Math.min(o,c));if(!((e.west<e.east||r.west<r.east)&&l>=p)){var h=Math.max(e.south,r.south),d=Math.min(e.north,r.north);if(!(h>=d))return n(i)?(i.west=l,i.south=h,i.east=p,i.north=d,i):new s(l,h,p,d)}},s.simpleIntersection=function(e,r,i){t.typeOf.object("rectangle",e),t.typeOf.object("otherRectangle",r);var o=Math.max(e.west,r.west),a=Math.max(e.south,r.south),u=Math.min(e.east,r.east),c=Math.min(e.north,r.north);return a>=c||o>=u?voi
|
||
|
DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,VERTEX_ATTRIB_ARRAY_INTEGER:35069,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,UNSIGNED_INT_10F_11F_11F_REV:35899,RGB9_E5:35901,UNSIGNED_INT_5_9_9_9_REV:35902,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,RASTERIZER_DISCARD:35977,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,UNSIGNED_INT_24_8:34042,DEPTH24_STENCIL8:35056,UNSIGNED_NORMALIZED:35863,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,MAX_SAMPLES:36183,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,VERTEX_ARRAY_BINDING:34229,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,SIGNED_NORMALIZED:36764,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_C
|
||
|
t+=(e-i)*s.SECONDS_PER_DAY,h(i,t,this),n===c.UTC&&l(this)}var m=new o,E=[31,28,31,30,31,30,31,31,30,31,30,31],O=29,_=new u,T=/^(\d{4})$/,R=/^(\d{4})-(\d{2})$/,A=/^(\d{4})-?(\d{3})$/,w=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,b=/^(\d{4})-?(\d{2})-?(\d{2})$/,v=/([Z+\-])?(\d{2})?:?(\d{2})?$/,S=/^(\d{2})(\.\d+)?/.source+v.source,g=/^(\d{2}):?(\d{2})(\.\d+)?/.source+v.source,N=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+v.source,I="Invalid ISO 8601 date.";y.fromGregorianDate=function(e,t){if(!(e instanceof o))throw new i("date must be a valid GregorianDate.");var r=d(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return n(t)?(h(r[0],r[1],t),l(t),t):new y(r[0],r[1],c.UTC)},y.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new i("date must be a valid JavaScript Date.");var r=d(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return n(t)?(h(r[0],r[1],t),l(t),t):new y(r[0],r[1],c.UTC)},y.fromIso8601=function(e,t){if("string"!=typeof e)throw new i(I);e=e.replace(",",".");var r,o,u,s=e.split("T"),f=1,p=1,m=0,_=0,v=0,M=0,x=s[0],C=s[1];if(!n(x))throw new i(I);var P;if(s=x.match(b),null!==s){if(P=x.split("-").length-1,P>0&&2!==P)throw new i(I);r=+s[1],f=+s[2],p=+s[3]}else if(s=x.match(R),null!==s)r=+s[1],f=+s[2];else if(s=x.match(T),null!==s)r=+s[1];else{var U;if(s=x.match(A),null!==s){if(r=+s[1],U=+s[2],u=a(r),1>U||u&&U>366||!u&&U>365)throw new i(I)}else{if(s=x.match(w),null===s)throw new i(I);r=+s[1];var D=+s[2],F=+s[3]||0;if(P=x.split("-").length-1,P>0&&(!n(s[3])&&1!==P||n(s[3])&&2!==P))throw new i(I);var L=new Date(Date.UTC(r,0,4));U=7*D+F-L.getUTCDay()-3}o=new Date(Date.UTC(r,0,1)),o.setUTCDate(U),f=o.getUTCMonth()+1,p=o.getUTCDate()}if(u=a(r),1>f||f>12||1>p||(2!==f||!u)&&p>E[f-1]||u&&2===f&&p>O)throw new i(I);var q;if(n(C)){if(s=C.match(N),null!==s){if(P=C.split(":").length-1,P>0&&2!==P&&3!==P)throw new i(I);m=+s[1],_=+s[2],v=+s[3],M=1e3*+(s[4]||0),q=5}else if(s=C.match(g),null!==s){if(P=C.split(":").length-1,P>2)throw new i(I);m=+s[1],_=+s[2],v=60*+(s[3]||0),q=4}else{if(s=C.match(S),null===s)throw new i(I);m=+s[1],_=60*+(s[2]||0),q=3}if(_>=60||v>=61||m>24||24===m&&(_>0||v>0||M>0))throw new i(I);var j=s[q],B=+s[q+1],z=+(s[q+2]||0);switch(j){case"+":m-=B,_-=z;break;case"-":m+=B,_+=z;break;case"Z":break;default:_+=new Date(Date.UTC(r,f-1,p,m,_)).getTimezoneOffset()}}var G=60===v;for(G&&v--;_>=60;)_-=60,m++;for(;m>=24;)m-=24,p++;for(o=u&&2===f?O:E[f-1];p>o;)p-=o,f++,f>12&&(f-=12,r++),o=u&&2===f?O:E[f-1];for(;0>_;)_+=60,m--;for(;0>m;)m+=24,p--;for(;1>p;)f--,1>f&&(f+=12,r--),o=u&&2===f?O:E[f-1],p+=o;var V=d(r,f,p,m,_,v,M);return n(t)?(h(V[0],V[1],t),l(t)):t=new y(V[0],V[1],c.UTC),G&&y.addSeconds(t,1,t),t},y.now=function(e){return y.fromDate(new Date,e)};var M=new y(0,0,c.TAI);return y.toGregorianDate=function(e,t){if(!n(e))throw new i("julianDate is required.");var r=!1,a=p(e,M);n(a)||(y.addSeconds(e,-1,M),a=p(M,M),r=!0);var u=a.dayNumber,c=a.secondsOfDay;c>=43200&&(u+=1);var f=u+68569|0,l=4*f/146097|0;f=f-((146097*l+3)/4|0)|0;var h=4e3*(f+1)/1461001|0;f=f-(1461*h/4|0)+31|0;var d=80*f/2447|0,m=f-(2447*d/80|0)|0;f=d/11|0;var E=d+2-12*f|0,O=100*(l-49)+h+f|0,_=c/s.SECONDS_PER_HOUR|0,T=c-_*s.SECONDS_PER_HOUR,R=T/s.SECONDS_PER_MINUTE|0;T-=R*s.SECONDS_PER_MINUTE;var A=0|T,w=(T-A)/s.SECONDS_PER_MILLISECOND;return _+=12,_>23&&(_-=24),r&&(A+=1),n(t)?(t.year=O,t.month=E,t.day=m,t.hour=_,t.minute=R,t.second=A,t.millisecond=w,t.isLeapSecond=r,t):new o(O,E,m,_,R,A,w,r)},y.toDate=function(e){if(!n(e))throw new i("julianDate is required.");var t=y.toGregorianDate(e,m),r=t.second;return t.isLeapSecond&&(r-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,r,t.millisecond))},y.toIso8601=function(t,r){if(!n(t))throw new i("julianDate is required.");var o=y.toGregorianDate(t,m),a=o.year,u=o.month,s=o.day,c=o.hour,f=o.minute,l=o.second,p=o.millisecond;1e4===a&&1===u&&1===s&&0===c&&0===f&&0===l&&0===p&&(a=9999,u=12,s=31,c=24);var h;return n(r)||0===p?n(r)&&0!==r?(h=(.01*p).toFixed(r).replace(".","").slice(0,r),e("%04d-%02d-%02dT%02d:%02
|
||
|
e=a(e,a.EMPTY_OBJECT);var r=a(e.preferImageBitmap,!1),n=a(e.preferBlob,!1),i=a(e.flipY,!1);if(I(this.request),!B||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!n)return C({resource:this,flipY:i,preferImageBitmap:r});var o=this.fetchBlob();if(u(o)){var s,c,f,l;return x.supportsImageBitmapOptions().then(function(e){return s=e,c=s&&r,o}).then(function(e){if(u(e)){if(l=e,c)return x.createImageBitmapFromBlob(e,{flipY:i,premultiplyAlpha:!1});var t=window.URL.createObjectURL(e);return f=new x({url:t}),C({resource:f,flipY:i,preferImageBitmap:!1})}}).then(function(e){return u(e)?(e.blob=l,c?e:(window.URL.revokeObjectURL(f.url),e)):void 0}).otherwise(function(e){return u(f)&&window.URL.revokeObjectURL(f.url),e.blob=l,t.reject(e)})}},x.fetchImage=function(e){var t=new x(e);return t.fetchImage({flipY:e.flipY,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},x.prototype.fetchText=function(){return this.fetch({responseType:"text"})},x.fetchText=function(e){var t=new x(e);return t.fetchText()},x.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(u(e))return e.then(function(e){return u(e)?JSON.parse(e):void 0})},x.fetchJson=function(e){var t=new x(e);return t.fetchJson()},x.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},x.fetchXML=function(e){var t=new x(e);return t.fetchXML()},x.prototype.fetchJsonp=function(e){e=a(e,"callback"),I(this.request);var t;do t="loadJsonp"+Math.random().toString().substring(2,8);while(u(window[t]));return P(this,e,t)},x.fetchJsonp=function(e){var t=new x(e);return t.fetchJsonp(e.callbackParameterName)},x.prototype._makeRequest=function(e){var r=this;I(r.request);var n=r.request;n.url=r.url,n.requestFunction=function(){var i=e.responseType,a=o(e.headers,r.headers),s=e.overrideMimeType,c=e.method,f=e.data,l=t.defer(),p=x._Implementations.loadWithXhr(r.url,i,c,f,a,l,s);return u(p)&&u(p.abort)&&(n.cancelFunction=function(){p.abort()}),l.promise};var i=A.request(n);return u(i)?i.then(function(e){return e}).otherwise(function(i){return n.state!==w.FAILED?t.reject(i):r.retryOnError(i).then(function(o){return o?(n.state=w.UNISSUED,n.deferred=void 0,r.fetch(e)):t.reject(i)})}):void 0};var G=/^data:(.*?)(;base64)?,(.*)$/;x.prototype.fetch=function(e){return e=N(e,{}),e.method="GET",this._makeRequest(e)},x.fetch=function(e){var t=new x(e);return t.fetch({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},x.prototype["delete"]=function(e){return e=N(e,{}),e.method="DELETE",this._makeRequest(e)},x["delete"]=function(e){var t=new x(e);return t["delete"]({responseType:e.responseType,overrideMimeType:e.overrideMimeType,data:e.data})},x.prototype.head=function(e){return e=N(e,{}),e.method="HEAD",this._makeRequest(e)},x.head=function(e){var t=new x(e);return t.head({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},x.prototype.options=function(e){return e=N(e,{}),e.method="OPTIONS",this._makeRequest(e)},x.options=function(e){var t=new x(e);return t.options({responseType:e.responseType,overrideMimeType:e.overrideMimeType})},x.prototype.post=function(e,t){return n.defined("data",e),t=N(t,{}),t.method="POST",t.data=e,this._makeRequest(t)},x.post=function(e){var t=new x(e);return t.post(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},x.prototype.put=function(e,t){return n.defined("data",e),t=N(t,{}),t.method="PUT",t.data=e,this._makeRequest(t)},x.put=function(e){var t=new x(e);return t.put(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},x.prototype.patch=function(e,t){return n.defined("data",e),t=N(t,{}),t.method="PATCH",t.data=e,this._makeRequest(t)},x.patch=function(e){var t=new x(e);return t.patch(e.data,{responseType:e.responseType,overrideMimeType:e.overrideMimeType})},x._Implementations={},x._Implementations.createImage=function(e,t,r,n,i){x.supportsImageBitmapOptions().then(function(n){return n&&i?x.fetchBlob({url:e}):void L(e,t,r)}).then(function(e){return u(e)?x.createImageBitmapFromBlob(e,
|
||
|
O[7]=0,O[8]=1,O[9]=0,O[10]=0,O[11]=1,O[12]=0,O[13]=0,O[14]=-1,O[15]=0,O[16]=0,O[17]=-1,O[18]=0,O[19]=0,O[20]=-1,O[21]=0,O[22]=0,O[23]=-1,O[24]=1,O[25]=0,O[26]=0,O[27]=1,O[28]=0,O[29]=0,O[30]=1,O[31]=0,O[32]=0,O[33]=1,O[34]=0,O[35]=0,O[36]=-1,O[37]=0,O[38]=0,O[39]=-1,O[40]=0,O[41]=0,O[42]=-1,O[43]=0,O[44]=0,O[45]=-1,O[46]=0,O[47]=0,O[48]=0,O[49]=1,O[50]=0,O[51]=0,O[52]=1,O[53]=0,O[54]=0,O[55]=1,O[56]=0,O[57]=0,O[58]=1,O[59]=0,O[60]=0,O[61]=-1,O[62]=0,O[63]=0,O[64]=-1,O[65]=0,O[66]=0,O[67]=-1,O[68]=0,O[69]=0,O[70]=-1,O[71]=0,E.normal=new c({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:O})}if(h.st){var _=new Float32Array(48);_[0]=0,_[1]=0,_[2]=1,_[3]=0,_[4]=1,_[5]=1,_[6]=0,_[7]=1,_[8]=1,_[9]=0,_[10]=0,_[11]=0,_[12]=0,_[13]=1,_[14]=1,_[15]=1,_[16]=0,_[17]=0,_[18]=1,_[19]=0,_[20]=1,_[21]=1,_[22]=0,_[23]=1,_[24]=1,_[25]=0,_[26]=0,_[27]=0,_[28]=0,_[29]=1,_[30]=1,_[31]=1,_[32]=1,_[33]=0,_[34]=0,_[35]=0,_[36]=0,_[37]=1,_[38]=1,_[39]=1,_[40]=0,_[41]=0,_[42]=1,_[43]=0,_[44]=1,_[45]=1,_[46]=0,_[47]=1,E.st=new c({componentDatatype:i.FLOAT,componentsPerAttribute:2,values:_})}if(h.tangent){var T=new Float32Array(72);T[0]=1,T[1]=0,T[2]=0,T[3]=1,T[4]=0,T[5]=0,T[6]=1,T[7]=0,T[8]=0,T[9]=1,T[10]=0,T[11]=0,T[12]=-1,T[13]=0,T[14]=0,T[15]=-1,T[16]=0,T[17]=0,T[18]=-1,T[19]=0,T[20]=0,T[21]=-1,T[22]=0,T[23]=0,T[24]=0,T[25]=1,T[26]=0,T[27]=0,T[28]=1,T[29]=0,T[30]=0,T[31]=1,T[32]=0,T[33]=0,T[34]=1,T[35]=0,T[36]=0,T[37]=-1,T[38]=0,T[39]=0,T[40]=-1,T[41]=0,T[42]=0,T[43]=-1,T[44]=0,T[45]=0,T[46]=-1,T[47]=0,T[48]=-1,T[49]=0,T[50]=0,T[51]=-1,T[52]=0,T[53]=0,T[54]=-1,T[55]=0,T[56]=0,T[57]=-1,T[58]=0,T[59]=0,T[60]=1,T[61]=0,T[62]=0,T[63]=1,T[64]=0,T[65]=0,T[66]=1,T[67]=0,T[68]=0,T[69]=1,T[70]=0,T[71]=0,E.tangent=new c({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:T})}if(h.bitangent){var R=new Float32Array(72);R[0]=0,R[1]=1,R[2]=0,R[3]=0,R[4]=1,R[5]=0,R[6]=0,R[7]=1,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=1,R[14]=0,R[15]=0,R[16]=1,R[17]=0,R[18]=0,R[19]=1,R[20]=0,R[21]=0,R[22]=1,R[23]=0,R[24]=0,R[25]=0,R[26]=1,R[27]=0,R[28]=0,R[29]=1,R[30]=0,R[31]=0,R[32]=1,R[33]=0,R[34]=0,R[35]=1,R[36]=0,R[37]=0,R[38]=1,R[39]=0,R[40]=0,R[41]=1,R[42]=0,R[43]=0,R[44]=1,R[45]=0,R[46]=0,R[47]=1,R[48]=0,R[49]=0,R[50]=1,R[51]=0,R[52]=0,R[53]=1,R[54]=0,R[55]=0,R[56]=1,R[57]=0,R[58]=0,R[59]=1,R[60]=0,R[61]=0,R[62]=1,R[63]=0,R[64]=0,R[65]=1,R[66]=0,R[67]=0,R[68]=1,R[69]=0,R[70]=0,R[71]=1,E.bitangent=new c({componentDatatype:i.FLOAT,componentsPerAttribute:3,values:R})}d=new Uint16Array(36),d[0]=0,d[1]=1,d[2]=2,d[3]=0,d[4]=2,d[5]=3,d[6]=6,d[7]=5,d[8]=4,d[9]=7,d[10]=6,d[11]=4,d[12]=8,d[13]=9,d[14]=10,d[15]=8,d[16]=10,d[17]=11,d[18]=14,d[19]=13,d[20]=12,d[21]=15,d[22]=14,d[23]=12,d[24]=18,d[25]=17,d[26]=16,d[27]=19,d[28]=18,d[29]=16,d[30]=20,d[31]=21,d[32]=22,d[33]=20,d[34]=22,d[35]=23}else m=new Float64Array(24),m[0]=o.x,m[1]=o.y,m[2]=o.z,m[3]=u.x,m[4]=o.y,m[5]=o.z,m[6]=u.x,m[7]=u.y,m[8]=o.z,m[9]=o.x,m[10]=u.y,m[11]=o.z,m[12]=o.x,m[13]=o.y,m[14]=u.z,m[15]=u.x,m[16]=o.y,m[17]=u.z,m[18]=u.x,m[19]=u.y,m[20]=u.z,m[21]=o.x,m[22]=u.y,m[23]=u.z,E.position=new c({componentDatatype:i.DOUBLE,componentsPerAttribute:3,values:m}),d=new Uint16Array(36),d[0]=4,d[1]=5,d[2]=6,d[3]=4,d[4]=6,d[5]=7,d[6]=1,d[7]=0,d[8]=3,d[9]=1,d[10]=3,d[11]=2,d[12]=1,d[13]=6,d[14]=5,d[15]=1,d[16]=2,d[17]=6,d[18]=2,d[19]=3,d[20]=7,d[21]=2,d[22]=7,d[23]=6,d[24]=3,d[25]=0,d[26]=4,d[27]=3,d[28]=4,d[29]=7,d[30]=0,d[31]=1,d[32]=5,d[33]=0,d[34]=5,d[35]=4;var A=r.subtract(u,o,y),w=.5*r.magnitude(A);if(a(n._offsetAttribute)){var b=m.length,v=new Uint8Array(b/3),S=n._offsetAttribute===l.NONE?0:1;e(v,S),E.applyOffset=new c({componentDatatype:i.UNSIGNED_BYTE,componentsPerAttribute:1,values:v})}return new s({attributes:E,indices:d,primitiveType:p.TRIANGLES,boundingSphere:new t(r.ZERO,w),offsetAttribute:n._offsetAttribute})}};var T;return d.getUnitBox=function(){return a(T)||(T=d.createGeometry(d.fromDimensions({dimensions:new r(1,1,1),vertexFormat:h.POSITION_ONLY}))),T},d}),define("Workers/createBoxGeometry",["../Core/BoxGeometry","../Core/defined"],function(e,t){"use strict";return function(r,n){return
|