/** * Cesium - https://github.com/AnalyticalGraphicsInc/cesium * * Copyright 2011-2016 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. */ !function(){define("Core/defined",[],function(){"use strict";function t(t){return void 0!==t&&null!==t}return t}),define("Core/freezeObject",["./defined"],function(t){"use strict";var e=Object.freeze;return t(e)||(e=function(t){return t}),e}),define("Core/defaultValue",["./freezeObject"],function(t){"use strict";function e(t,e){return void 0!==t?t:e}return e.EMPTY_OBJECT=t({}),e}),define("Core/DeveloperError",["./defined"],function(t){"use strict";function e(t){this.name="DeveloperError",this.message=t;var e;try{throw new Error}catch(t){e=t.stack}this.stack=e}return t(Object.create)&&(e.prototype=Object.create(Error.prototype),e.prototype.constructor=e),e.prototype.toString=function(){var e=this.name+": "+this.message;return t(this.stack)&&(e+="\n"+this.stack.toString()),e},e.throwInstantiationError=function(){throw new e("This function defines an interface and should not be called directly.")},e}),define("Core/isArray",["./defined"],function(t){"use strict";var e=Array.isArray;return t(e)||(e=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),e}),define("Core/Check",["./defaultValue","./defined","./DeveloperError","./isArray"],function(t,e,r,n){"use strict";function o(t){return t+" was required but undefined."}function a(t,e,r){return"Expected "+r+" to be typeof "+e+", got "+t}var i={};return i.typeOf={},i.numeric={},i.defined=function(t,n){if(!e(t))throw new r(o(n))},i.numeric.maximum=function(t,e){if(i.typeOf.number(t),i.typeOf.number(e),t>e)throw new r("Expected "+t+" to be at most "+e)},i.numeric.minimum=function(t,e){if(i.typeOf.number(t),i.typeOf.number(e),t>>0,this.mti=1;this.mti>>30;this.mt[this.mti]=(1812433253*((4294901760&t)>>>16)<<16)+1812433253*(65535&t)+this.mti,this.mt[this.mti]>>>=0}},t.prototype.genrand_int32=function(){var t,e=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>>1^e[1&t];for(;r>>1^e[1&t];t=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^t>>>1^e[1&t],this.mti=0}return t=this.mt[this.mti++],t^=t>>>11,t^=t<<7&2636928640,t^=t<<15&4022730752,t^=t>>>18,t>>>0},t.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},t}),define("Core/Math",["../ThirdParty/mersenne-twister","./defaultValue","./defined","./DeveloperError"],function(t,e,r,n){"use strict";var o={};o.EPSILON1=.1,o.EPSILON2=.01,o.EPSILON3=.001,o.EPSILON4=1e-4,o.EPSILON5=1e-5,o.EPSILON6=1e-6,o.EPSILON7=1e-7,o.EPSILON8=1e-8,o.EPSILON9=1e-9,o.EPSILON10=1e-10,o.EPSILON11=1e-11,o.EPSILON12=1e-12,o.EPSILON13=1e-13,o.EPSILON14=1e-14,o.EPSILON15=1e-15,o.EPSILON16=1e-16,o.EPSILON17=1e-17,o.EPSILON18=1e-18,o.EPSILON19=1e-19,o.EPSILON20=1e-20,o.GRAVITATIONALPARAMETER=3986004418e5,o.SOLAR_RADIUS=6955e5,o.LUNAR_RADIUS=1737400,o.SIXTY_FOUR_KILOBYTES=65536,o.sign=function(t){return t>0?1:t<0?-1:0},o.signNotZero=function(t){return t<0?-1:1},o.toSNorm=function(t,r){return r=e(r,255),Math.round((.5*o.clamp(t,-1,1)+.5)*r)},o.fromSNorm=function(t,r){return r=e(r,255),o.clamp(t,0,r)/r*2-1},o.sinh=function(t){var e=Math.pow(Math.E,t),r=Math.pow(Math.E,-1*t);return.5*(e-r)},o.cosh=function(t){var e=Math.pow(Math.E,t),r=Math.pow(Math.E,-1*t);return.5*(e+r)},o.lerp=function(t,e,r){return(1-r)*t+r*e},o.PI=Math.PI,o.ONE_OVER_PI=1/Math.PI,o.PI_OVER_TWO=.5*Math.PI,o.PI_OVER_THREE=Math.PI/3,o.PI_OVER_FOUR=Math.PI/4,o.PI_OVER_SIX=Math.PI/6,o.THREE_PI_OVER_TWO=3*Math.PI*.5,o.TWO_PI=2*Math.PI,o.ONE_OVER_TWO_PI=1/(2*Math.PI),o.RADIANS_PER_DEGREE=Math.PI/180,o.DEGREES_PER_RADIAN=180/Math.PI,o.RADIANS_PER_ARCSECOND=o.RADIANS_PER_DEGREE/3600,o.toRadians=function(t){return t*o.RADIANS_PER_DEGREE},o.toDegrees=function(t){return t*o.DEGREES_PER_RADIAN},o.convertLongitudeRange=function(t){var e=o.TWO_PI,r=t-Math.floor(t/e)*e;return r<-Math.PI?r+e:r>=Math.PI?r-e:r},o.clampToLatitudeRange=function(t){return o.clamp(t,-1*o.PI_OVER_TWO,o.PI_OVER_TWO)},o.negativePiToPi=function(t){return o.zeroToTwoPi(t+o.PI)-o.PI},o.zeroToTwoPi=function(t){var e=o.mod(t,o.TWO_PI);return Math.abs(e)o.EPSILON14?o.TWO_PI:e},o.mod=function(t,e){return(t%e+e)%e},o.equalsEpsilon=function(t,r,n,o){o=e(o,n);var a=Math.abs(t-r);return a<=o||a<=n*Math.max(Math.abs(t),Math.abs(r))};var a=[1];o.factorial=function(t){var e=a.length;if(t>=e)for(var r=a[e-1],n=e;n<=t;n++)a.push(r*n);return a[t]},o.incrementWrap=function(t,r,n){return n=e(n,0),++t,t>r&&(t=n),t},o.isPowerOfTwo=function(t){return 0!==t&&0===(t&t-1)},o.nextPowerOfTwo=function(t){return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t},o.clamp=function(t,e,r){return tr?r:t};var i=new t;return o.setRandomNumberSeed=function(e){i=new t(e)},o.nextRandomNumber=function(){return i.random()},o.acosClamped=function(t){return Math.acos(o.clamp(t,-1,1))},o.asinClamped=function(t){return Math.asin(o.clamp(t,-1,1))},o.chordLength=function(t,e){return 2*e*Math.sin(.5*t)},o.logBase=function(t,e){return Math.log(t)/Math.log(e)},o.fog=function(t,e){var r=t*e;return 1-Math.exp(-(r*r))},o}),define("Core/Cartesian3",["./Check","./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(t,e,r,n,o,a){"use strict";function i(t,r,n){this.x=e(t,0),this.y=e(r,0),this.z=e(n,0)}i.fromSpherical=function(t,n){r(n)||(n=new i);var o=t.clock,a=t.cone,u=e(t.magnitude,1),s=u*Math.sin(a);return n.x=s*Math.cos(o),n.y=s*Math.sin(o),n.z=u*Math.cos(a),n},i.fromElements=function(t,e,n,o){return r(o)?(o.x=t,o.y=e,o.z=n,o):new i(t,e,n)},i.clone=function(t,e){if(r(t))return r(e)?(e.x=t.x,e.y=t.y,e.z=t.z,e):new i(t.x,t.y,t.z)},i.fromCartesian4=i.clone,i.packedLength=3,i.pack=function(t,r,n){return n=e(n,0),r[n++]=t.x,r[n++]=t.y,r[n]=t.z,r},i.unpack=function(t,n,o){return n=e(n,0),r(o)||(o=new i),o.x=t[n++],o.y=t[n++],o.z=t[n],o},i.packArray=function(t,e){var n=t.length;r(e)?e.length=3*n:e=new Array(3*n);for(var o=0;on.EPSILON12);return e(E)?(E.x=c*y,E.y=l*F,E.z=f*L,E):new t(c*y,l*F,f*L)}var a=new t,i=new t;return o}),define("Core/Cartographic",["./Cartesian3","./defaultValue","./defined","./DeveloperError","./freezeObject","./Math","./scaleToGeodeticSurface"],function(t,e,r,n,o,a,i){"use strict";function u(t,r,n){this.longitude=e(t,0),this.latitude=e(r,0),this.height=e(n,0)}u.fromRadians=function(t,n,o,a){return o=e(o,0),r(a)?(a.longitude=t,a.latitude=n,a.height=o,a):new u(t,n,o)},u.fromDegrees=function(t,e,r,n){return t=a.toRadians(t),e=a.toRadians(e),u.fromRadians(t,e,r,n)};var s=new t,E=new t,c=new t,l=new t(1/6378137,1/6378137,1/6356752.314245179),f=new t(1/40680631590769,1/40680631590769,1/40408299984661.445),_=a.EPSILON1;return u.fromCartesian=function(e,n,o){var R=r(n)?n.oneOverRadii:l,h=r(n)?n.oneOverRadiiSquared:f,T=r(n)?n._centerToleranceSquared:_,A=i(e,R,h,T,E);if(r(A)){var d=t.multiplyComponents(A,h,s);d=t.normalize(d,d);var S=t.subtract(e,A,c),m=Math.atan2(d.y,d.x),N=Math.asin(d.z),C=a.sign(t.dot(S,e))*t.magnitude(S);return r(o)?(o.longitude=m,o.latitude=N,o.height=C,o):new u(m,N,C)}},u.clone=function(t,e){if(r(t))return r(e)?(e.longitude=t.longitude,e.latitude=t.latitude,e.height=t.height,e):new u(t.longitude,t.latitude,t.height)},u.equals=function(t,e){return t===e||r(t)&&r(e)&&t.longitude===e.longitude&&t.latitude===e.latitude&&t.height===e.height},u.equalsEpsilon=function(t,e,n){return t===e||r(t)&&r(e)&&Math.abs(t.longitude-e.longitude)<=n&&Math.abs(t.latitude-e.latitude)<=n&&Math.abs(t.height-e.height)<=n},u.ZERO=o(new u(0,0,0)),u.prototype.clone=function(t){return u.clone(this,t)},u.prototype.equals=function(t){return u.equals(this,t)},u.prototype.equalsEpsilon=function(t,e){return u.equalsEpsilon(this,t,e)},u.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},u}),define("Core/defineProperties",["./defined"],function(t){"use strict";var e=function(){try{return"x"in Object.defineProperty({},"x",{})}catch(t){return!1}}(),r=Object.defineProperties;return e&&t(r)||(r=function(t){return t}),r}),define("Core/Ellipsoid",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject","./Math","./scaleToGeodeticSurface"],function(t,e,r,n,o,a,i,u,s){"use strict";function E(e,n,o,a){n=r(n,0),o=r(o,0),a=r(a,0),e._radii=new t(n,o,a),e._radiiSquared=new t(n*n,o*o,a*a),e._radiiToTheFourth=new t(n*n*n*n,o*o*o*o,a*a*a*a),e._oneOverRadii=new t(0===n?0:1/n,0===o?0:1/o,0===a?0:1/a),e._oneOverRadiiSquared=new t(0===n?0:1/(n*n),0===o?0:1/(o*o),0===a?0:1/(a*a)),e._minimumRadius=Math.min(n,o,a),e._maximumRadius=Math.max(n,o,a),e._centerToleranceSquared=u.EPSILON1,0!==e._radiiSquared.z&&(e._sqauredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function c(t,e,r){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._sqauredXOverSquaredZ=void 0,E(this,t,e,r)}o(c.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),c.clone=function(e,r){if(n(e)){var o=e._radii;return n(r)?(t.clone(o,r._radii),t.clone(e._radiiSquared,r._radiiSquared),t.clone(e._radiiToTheFourth,r._radiiToTheFourth),t.clone(e._oneOverRadii,r._oneOverRadii),t.clone(e._oneOverRadiiSquared,r._oneOverRadiiSquared),r._minimumRadius=e._minimumRadius,r._maximumRadius=e._maximumRadius,r._centerToleranceSquared=e._centerToleranceSquared,r):new c(o.x,o.y,o.z)}},c.fromCartesian3=function(t,e){return n(e)||(e=new c),n(t)?(E(e,t.x,t.y,t.z),e):e},c.WGS84=i(new c(6378137,6378137,6356752.314245179)),c.UNIT_SPHERE=i(new c(1,1,1)),c.MOON=i(new c(u.LUNAR_RADIUS,u.LUNAR_RADIUS,u.LUNAR_RADIUS)),c.prototype.clone=function(t){return c.clone(this,t)},c.packedLength=t.packedLength,c.pack=function(e,n,o){return o=r(o,0),t.pack(e._radii,n,o),n},c.unpack=function(e,n,o){n=r(n,0);var a=t.unpack(e,n);return c.fromCartesian3(a,o)},c.prototype.geocentricSurfaceNormal=t.normalize,c.prototype.geodeticSurfaceNormalCartographic=function(e,r){var o=e.longitude,a=e.latitude,i=Math.cos(a),u=i*Math.cos(o),s=i*Math.sin(o),E=Math.sin(a);return n(r)||(r=new t),r.x=u,r.y=s,r.z=E,t.normalize(r,r)},c.prototype.geodeticSurfaceNormal=function(e,r){return n(r)||(r=new t),r=t.multiplyComponents(e,this._oneOverRadiiSquared,r),t.normalize(r,r)};var l=new t,f=new t;c.prototype.cartographicToCartesian=function(e,r){var o=l,a=f;this.geodeticSurfaceNormalCartographic(e,o),t.multiplyComponents(this._radiiSquared,o,a);var i=Math.sqrt(t.dot(o,a));return t.divideByScalar(a,i,a),t.multiplyByScalar(o,e.height,o),n(r)||(r=new t),t.add(a,o,r)},c.prototype.cartographicArrayToCartesianArray=function(t,e){var r=t.length;n(e)?e.length=r:e=new Array(r);for(var o=0;o=this._radii.z-o))return a},c}),define("Core/arrayRemoveDuplicates",["./defaultValue","./defined","./DeveloperError","./Math"],function(t,e,r,n){"use strict";function o(r,n,o){if(e(r)){o=t(o,!1);var i=r.length;if(i<2)return r;var u,s,E;for(u=1;u1&&n(c[0],c[c.length-1],a)&&c.shift(),c}}var a=n.EPSILON10;return o}),define("Core/GeographicProjection",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid"],function(t,e,r,n,o,a,i){"use strict";function u(t){this._ellipsoid=r(t,i.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}return o(u.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),u.prototype.project=function(e,r){var o=this._semimajorAxis,a=e.longitude*o,i=e.latitude*o,u=e.height;return n(r)?(r.x=a,r.y=i,r.z=u,r):new t(a,i,u)},u.prototype.unproject=function(t,r){var o=this._oneOverSemimajorAxis,a=t.x*o,i=t.y*o,u=t.z;return n(r)?(r.longitude=a,r.latitude=i,r.height=u,r):new e(a,i,u)},u}),define("Core/Intersect",["./freezeObject"],function(t){"use strict";var e={OUTSIDE:-1,INTERSECTING:0,INSIDE:1};return t(e)}),define("Core/Interval",["./defaultValue"],function(t){"use strict";function e(e,r){this.start=t(e,0),this.stop=t(r,0)}return e}),define("Core/Matrix3",["./Cartesian3","./defaultValue","./defined","./defineProperties","./DeveloperError","./freezeObject","./Math"],function(t,e,r,n,o,a,i){"use strict";function u(t,r,n,o,a,i,u,s,E){this[0]=e(t,0),this[1]=e(o,0),this[2]=e(u,0),this[3]=e(r,0),this[4]=e(a,0),this[5]=e(s,0),this[6]=e(n,0),this[7]=e(i,0),this[8]=e(E,0)}function s(t){for(var e=0,r=0;r<9;++r){var n=t[r];e+=n*n}return Math.sqrt(e)}function E(t){for(var e=0,r=0;r<3;++r){var n=t[u.getElementIndex(R[r],_[r])];e+=2*n*n}return Math.sqrt(e)}function c(t,e){for(var r=i.EPSILON15,n=0,o=1,a=0;a<3;++a){var s=Math.abs(t[u.getElementIndex(R[a],_[a])]);s>n&&(o=a,n=s)}var E=1,c=0,l=_[o],f=R[o];if(Math.abs(t[u.getElementIndex(f,l)])>r){var h,T=t[u.getElementIndex(f,f)],A=t[u.getElementIndex(l,l)],d=t[u.getElementIndex(f,l)],S=(T-A)/2/d;h=S<0?-1/(-S+Math.sqrt(1+S*S)):1/(S+Math.sqrt(1+S*S)),E=1/Math.sqrt(1+h*h),c=h*E}return e=u.clone(u.IDENTITY,e),e[u.getElementIndex(l,l)]=e[u.getElementIndex(f,f)]=E,e[u.getElementIndex(f,l)]=c,e[u.getElementIndex(l,f)]=-c,e}u.packedLength=9,u.pack=function(t,r,n){return n=e(n,0),r[n++]=t[0],r[n++]=t[1],r[n++]=t[2],r[n++]=t[3],r[n++]=t[4],r[n++]=t[5],r[n++]=t[6],r[n++]=t[7],r[n++]=t[8],r},u.unpack=function(t,n,o){return n=e(n,0),r(o)||(o=new u),o[0]=t[n++],o[1]=t[n++],o[2]=t[n++],o[3]=t[n++],o[4]=t[n++],o[5]=t[n++],o[6]=t[n++],o[7]=t[n++],o[8]=t[n++],o},u.clone=function(t,e){if(r(t))return r(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e):new u(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])},u.fromArray=function(t,n,o){return n=e(n,0),r(o)||(o=new u),o[0]=t[n],o[1]=t[n+1],o[2]=t[n+2],o[3]=t[n+3],o[4]=t[n+4],o[5]=t[n+5],o[6]=t[n+6],o[7]=t[n+7],o[8]=t[n+8],o},u.fromColumnMajorArray=function(t,e){return u.clone(t,e)},u.fromRowMajorArray=function(t,e){return r(e)?(e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],e):new u(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},u.fromQuaternion=function(t,e){var n=t.x*t.x,o=t.x*t.y,a=t.x*t.z,i=t.x*t.w,s=t.y*t.y,E=t.y*t.z,c=t.y*t.w,l=t.z*t.z,f=t.z*t.w,_=t.w*t.w,R=n-s-l+_,h=2*(o-f),T=2*(a+c),A=2*(o+f),d=-n+s-l+_,S=2*(E-i),m=2*(a-c),N=2*(E+i),C=-n-s+l+_;return r(e)?(e[0]=R,e[1]=A,e[2]=m,e[3]=h,e[4]=d,e[5]=N,e[6]=T,e[7]=S,e[8]=C,e):new u(R,h,T,A,d,S,m,N,C)},u.fromHeadingPitchRoll=function(t,e){var n=Math.cos(-t.pitch),o=Math.cos(-t.heading),a=Math.cos(t.roll),i=Math.sin(-t.pitch),s=Math.sin(-t.heading),E=Math.sin(t.roll),c=n*o,l=-a*s+E*i*o,f=E*s+a*i*o,_=n*s,R=a*o+E*i*s,h=-i*a+a*i*s,T=-i,A=E*n,d=a*n;return r(e)?(e[0]=c,e[1]=_,e[2]=T,e[3]=l,e[4]=R,e[5]=A,e[6]=f,e[7]=h,e[8]=d,e):new u(c,l,f,_,R,h,T,A,d)},u.fromScale=function(t,e){return r(e)?(e[0]=t.x,e[1]=0,e[2]=0,e[3]=0,e[4]=t.y,e[5]=0,e[6]=0,e[7]=0,e[8]=t.z,e):new u(t.x,0,0,0,t.y,0,0,0,t.z)},u.fromUniformScale=function(t,e){return r(e)?(e[0]=t,e[1]=0,e[2]=0,e[3]=0,e[4]=t,e[5]=0,e[6]=0,e[7]=0,e[8]=t,e):new u(t,0,0,0,t,0,0,0,t)},u.fromCrossProduct=function(t,e){return r(e)?(e[0]=0,e[1]=t.z,e[2]=-t.y,e[3]=-t.z,e[4]=0,e[5]=t.x,e[6]=t.y,e[7]=-t.x,e[8]=0,e):new u(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)},u.fromRotationX=function(t,e){var n=Math.cos(t),o=Math.sin(t);return r(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=n,e[5]=o,e[6]=0,e[7]=-o,e[8]=n,e):new u(1,0,0,0,n,-o,0,o,n)},u.fromRotationY=function(t,e){var n=Math.cos(t),o=Math.sin(t);return r(e)?(e[0]=n,e[1]=0,e[2]=-o,e[3]=0,e[4]=1,e[5]=0,e[6]=o,e[7]=0,e[8]=n,e):new u(n,0,o,0,1,0,-o,0,n)},u.fromRotationZ=function(t,e){var n=Math.cos(t),o=Math.sin(t);return r(e)?(e[0]=n,e[1]=o,e[2]=0,e[3]=-o,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new u(n,-o,0,o,n,0,0,0,1)},u.toArray=function(t,e){return r(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},u.getElementIndex=function(t,e){return 3*t+e},u.getColumn=function(t,e,r){var n=3*e,o=t[n],a=t[n+1],i=t[n+2];return r.x=o,r.y=a,r.z=i,r},u.setColumn=function(t,e,r,n){n=u.clone(t,n);var o=3*e;return n[o]=r.x,n[o+1]=r.y,n[o+2]=r.z,n},u.getRow=function(t,e,r){var n=t[e],o=t[e+3],a=t[e+6];return r.x=n,r.y=o,r.z=a,r},u.setRow=function(t,e,r,n){return n=u.clone(t,n),n[e]=r.x,n[e+3]=r.y,n[e+6]=r.z,n};var l=new t;u.getScale=function(e,r){return r.x=t.magnitude(t.fromElements(e[0],e[1],e[2],l)),r.y=t.magnitude(t.fromElements(e[3],e[4],e[5],l)),r.z=t.magnitude(t.fromElements(e[6],e[7],e[8],l)),r};var f=new t;u.getMaximumScale=function(e){return u.getScale(e,f),t.maximumComponent(f)},u.multiply=function(t,e,r){var n=t[0]*e[0]+t[3]*e[1]+t[6]*e[2],o=t[1]*e[0]+t[4]*e[1]+t[7]*e[2],a=t[2]*e[0]+t[5]*e[1]+t[8]*e[2],i=t[0]*e[3]+t[3]*e[4]+t[6]*e[5],u=t[1]*e[3]+t[4]*e[4]+t[7]*e[5],s=t[2]*e[3]+t[5]*e[4]+t[8]*e[5],E=t[0]*e[6]+t[3]*e[7]+t[6]*e[8],c=t[1]*e[6]+t[4]*e[7]+t[7]*e[8],l=t[2]*e[6]+t[5]*e[7]+t[8]*e[8];return r[0]=n,r[1]=o,r[2]=a,r[3]=i,r[4]=u,r[5]=s,r[6]=E,r[7]=c,r[8]=l,r},u.add=function(t,e,r){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r[3]=t[3]+e[3],r[4]=t[4]+e[4],r[5]=t[5]+e[5],r[6]=t[6]+e[6],r[7]=t[7]+e[7],r[8]=t[8]+e[8],r},u.subtract=function(t,e,r){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r[3]=t[3]-e[3],r[4]=t[4]-e[4],r[5]=t[5]-e[5],r[6]=t[6]-e[6],r[7]=t[7]-e[7],r[8]=t[8]-e[8],r},u.multiplyByVector=function(t,e,r){var n=e.x,o=e.y,a=e.z,i=t[0]*n+t[3]*o+t[6]*a,u=t[1]*n+t[4]*o+t[7]*a,s=t[2]*n+t[5]*o+t[8]*a;return r.x=i,r.y=u,r.z=s,r},u.multiplyByScalar=function(t,e,r){return r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r[4]=t[4]*e,r[5]=t[5]*e,r[6]=t[6]*e,r[7]=t[7]*e,r[8]=t[8]*e,r},u.multiplyByScale=function(t,e,r){return r[0]=t[0]*e.x,r[1]=t[1]*e.x,r[2]=t[2]*e.x,r[3]=t[3]*e.y,r[4]=t[4]*e.y,r[5]=t[5]*e.y,r[6]=t[6]*e.z,r[7]=t[7]*e.z,r[8]=t[8]*e.z,r},u.negate=function(t,e){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e[4]=-t[4],e[5]=-t[5],e[6]=-t[6],e[7]=-t[7],e[8]=-t[8],e},u.transpose=function(t,e){var r=t[0],n=t[3],o=t[6],a=t[1],i=t[4],u=t[7],s=t[2],E=t[5],c=t[8];return e[0]=r,e[1]=n,e[2]=o,e[3]=a,e[4]=i,e[5]=u,e[6]=s,e[7]=E,e[8]=c,e};var _=[1,0,0],R=[2,2,1],h=new u,T=new u;return u.computeEigenDecomposition=function(t,e){var n=i.EPSILON20,o=10,a=0,l=0;r(e)||(e={});for(var f=e.unitary=u.clone(u.IDENTITY,e.unitary),_=e.diagonal=u.clone(t,e.diagonal),R=n*s(_);lR;)c(_,h),u.transpose(h,T),u.multiply(_,h,_),u.multiply(T,_,_),u.multiply(f,h,f),++a>2&&(++l,a=0);return e},u.abs=function(t,e){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e[3]=Math.abs(t[3]),e[4]=Math.abs(t[4]),e[5]=Math.abs(t[5]),e[6]=Math.abs(t[6]),e[7]=Math.abs(t[7]),e[8]=Math.abs(t[8]),e},u.determinant=function(t){var e=t[0],r=t[3],n=t[6],o=t[1],a=t[4],i=t[7],u=t[2],s=t[5],E=t[8];return e*(a*E-s*i)+o*(s*n-r*E)+u*(r*i-a*n)},u.inverse=function(t,e){var r=t[0],n=t[1],o=t[2],a=t[3],i=t[4],s=t[5],E=t[6],c=t[7],l=t[8],f=u.determinant(t);e[0]=i*l-c*s,e[1]=c*o-n*l,e[2]=n*s-i*o,e[3]=E*s-a*l,e[4]=r*l-E*o,e[5]=a*o-r*s,e[6]=a*c-E*i,e[7]=E*n-r*c,e[8]=r*i-a*n;var _=1/f;return u.multiplyByScalar(e,_,e)},u.equals=function(t,e){return t===e||r(t)&&r(e)&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},u.equalsEpsilon=function(t,e,n){return t===e||r(t)&&r(e)&&Math.abs(t[0]-e[0])<=n&&Math.abs(t[1]-e[1])<=n&&Math.abs(t[2]-e[2])<=n&&Math.abs(t[3]-e[3])<=n&&Math.abs(t[4]-e[4])<=n&&Math.abs(t[5]-e[5])<=n&&Math.abs(t[6]-e[6])<=n&&Math.abs(t[7]-e[7])<=n&&Math.abs(t[8]-e[8])<=n},u.IDENTITY=a(new u(1,0,0,0,1,0,0,0,1)),u.ZERO=a(new u(0,0,0,0,0,0,0,0,0)),u.COLUMN0ROW0=0,u.COLUMN0ROW1=1,u.COLUMN0ROW2=2,u.COLUMN1ROW0=3,u.COLUMN1ROW1=4,u.COLUMN1ROW2=5,u.COLUMN2ROW0=6,u.COLUMN2ROW1=7,u.COLUMN2ROW2=8,n(u.prototype,{length:{get:function(){return u.packedLength}}}),u.prototype.clone=function(t){return u.clone(this,t)},u.prototype.equals=function(t){return u.equals(this,t)},u.equalsArray=function(t,e,r){return t[0]===e[r]&&t[1]===e[r+1]&&t[2]===e[r+2]&&t[3]===e[r+3]&&t[4]===e[r+4]&&t[5]===e[r+5]&&t[6]===e[r+6]&&t[7]===e[r+7]&&t[8]===e[r+8]},u.prototype.equalsEpsilon=function(t,e){return u.equalsEpsilon(this,t,e)},u.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},u}),define("Core/Cartesian4",["./defaultValue","./defined","./DeveloperError","./freezeObject","./Math"],function(t,e,r,n,o){"use strict";function a(e,r,n,o){this.x=t(e,0),this.y=t(r,0),this.z=t(n,0),this.w=t(o,0)}a.fromElements=function(t,r,n,o,i){return e(i)?(i.x=t,i.y=r,i.z=n,i.w=o,i):new a(t,r,n,o)},a.fromColor=function(t,r){return e(r)?(r.x=t.red,r.y=t.green,r.z=t.blue,r.w=t.alpha,r):new a(t.red,t.green,t.blue,t.alpha)},a.clone=function(t,r){if(e(t))return e(r)?(r.x=t.x,r.y=t.y,r.z=t.z,r.w=t.w,r):new a(t.x,t.y,t.z,t.w)},a.packedLength=4,a.pack=function(e,r,n){return n=t(n,0),r[n++]=e.x,r[n++]=e.y,r[n++]=e.z,r[n]=e.w,r},a.unpack=function(r,n,o){return n=t(n,0),e(o)||(o=new a),o.x=r[n++],o.y=r[n++],o.z=r[n++],o.w=r[n],o},a.packArray=function(t,r){var n=t.length;e(r)?r.length=4*n:r=new Array(4*n);for(var o=0;o=0?_.longitude:_.longitude+u.TWO_PI;a=Math.min(a,R),i=Math.max(i,R)}return o-n>i-a&&(n=a,o=i,o>u.PI&&(o-=u.TWO_PI),n>u.PI&&(n-=u.TWO_PI)),r(e)?(e.west=n,e.south=E,e.east=o,e.north=c,e):new s(n,E,o,c)},s.fromCartesianArray=function(t,e,n){for(var o=Number.MAX_VALUE,a=-Number.MAX_VALUE,i=Number.MAX_VALUE,E=-Number.MAX_VALUE,c=Number.MAX_VALUE,l=-Number.MAX_VALUE,f=0,_=t.length;f<_;f++){var R=e.cartesianToCartographic(t[f]);o=Math.min(o,R.longitude),a=Math.max(a,R.longitude),c=Math.min(c,R.latitude),l=Math.max(l,R.latitude);var h=R.longitude>=0?R.longitude:R.longitude+u.TWO_PI;i=Math.min(i,h),E=Math.max(E,h)}return a-o>E-i&&(o=i,a=E,a>u.PI&&(a-=u.TWO_PI),o>u.PI&&(o-=u.TWO_PI)),r(n)?(n.west=o,n.south=c,n.east=a,n.north=l,n):new s(o,c,a,l)},s.clone=function(t,e){if(r(t))return r(e)?(e.west=t.west,e.south=t.south,e.east=t.east,e.north=t.north,e):new s(t.west,t.south,t.east,t.north)},s.prototype.clone=function(t){return s.clone(this,t)},s.prototype.equals=function(t){return s.equals(this,t)},s.equals=function(t,e){return t===e||r(t)&&r(e)&&t.west===e.west&&t.south===e.south&&t.east===e.east&&t.north===e.north},s.prototype.equalsEpsilon=function(t,e){return r(t)&&Math.abs(this.west-t.west)<=e&&Math.abs(this.south-t.south)<=e&&Math.abs(this.east-t.east)<=e&&Math.abs(this.north-t.north)<=e},s.validate=function(t){},s.southwest=function(e,n){return r(n)?(n.longitude=e.west,n.latitude=e.south,n.height=0,n):new t(e.west,e.south)},s.northwest=function(e,n){return r(n)?(n.longitude=e.west,n.latitude=e.north,n.height=0,n):new t(e.west,e.north)},s.northeast=function(e,n){return r(n)?(n.longitude=e.east,n.latitude=e.north,n.height=0,n):new t(e.east,e.north)},s.southeast=function(e,n){return r(n)?(n.longitude=e.east,n.latitude=e.south,n.height=0,n):new t(e.east,e.south)},s.center=function(e,n){var o=e.east,a=e.west;o0?o+=u.TWO_PI:i0&&(i+=u.TWO_PI),o=_))return r(n)?(n.west=c,n.south=f,n.east=l,n.north=_,n):new s(c,f,l,_)}},s.simpleIntersection=function(t,e,n){var o=Math.max(t.west,e.west),a=Math.max(t.south,e.south),i=Math.min(t.east,e.east),u=Math.min(t.north,e.north);if(!(a>=u||o>=i))return r(n)?(n.west=o,n.south=a,n.east=i,n.north=u,n):new s(o,a,i,u)},s.union=function(t,e,n){r(n)||(n=new s);var o=t.east,a=t.west,i=e.east,E=e.west;o0?o+=u.TWO_PI:i0&&(i+=u.TWO_PI),oo||u.equalsEpsilon(r,o,u.EPSILON14))&&(r=t.south&&n<=t.north};var E=new t;return s.subsample=function(t,n,o,i){n=e(n,a.WGS84),o=e(o,0),r(i)||(i=[]);var c=0,l=t.north,f=t.south,_=t.east,R=t.west,h=E;h.height=o,h.longitude=R,h.latitude=l,i[c]=n.cartographicToCartesian(h,i[c]),c++,h.longitude=_,i[c]=n.cartographicToCartesian(h,i[c]),c++,h.latitude=f,i[c]=n.cartographicToCartesian(h,i[c]),c++,h.longitude=R,i[c]=n.cartographicToCartesian(h,i[c]),c++,l<0?h.latitude=l:f>0?h.latitude=f:h.latitude=0;for(var T=1;T<8;++T)h.longitude=-Math.PI+T*u.PI_OVER_TWO,s.contains(t,h)&&(i[c]=n.cartographicToCartesian(h,i[c]),c++);return 0===h.latitude&&(h.longitude=R,i[c]=n.cartographicToCartesian(h,i[c]),c++,h.longitude=_,i[c]=n.cartographicToCartesian(h,i[c]),c++),i.length=c,i},s.MAX_VALUE=i(new s(-Math.PI,-u.PI_OVER_TWO,Math.PI,u.PI_OVER_TWO)),s}),define("Core/BoundingSphere",["./Cartesian3","./Cartographic","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./GeographicProjection","./Intersect","./Interval","./Matrix3","./Matrix4","./Rectangle"],function(t,e,r,n,o,a,i,u,s,E,c,l){"use strict";function f(e,n){this.center=t.clone(r(e,t.ZERO)),this.radius=r(n,0)}var _=new t,R=new t,h=new t,T=new t,A=new t,d=new t,S=new t,m=new t,N=new t,C=new t,I=new t,p=new t;f.fromPoints=function(e,r){if(n(r)||(r=new f),!n(e)||0===e.length)return r.center=t.clone(t.ZERO,r.center),r.radius=0,r;for(var o=t.clone(e[0],S),a=t.clone(o,_),i=t.clone(o,R),u=t.clone(o,h),s=t.clone(o,T),E=t.clone(o,A),c=t.clone(o,d),l=e.length,M=1;Ms.x&&t.clone(o,s),gE.y&&t.clone(o,E),yc.z&&t.clone(o,c)}var F=t.magnitudeSquared(t.subtract(s,a,m)),L=t.magnitudeSquared(t.subtract(E,i,m)),v=t.magnitudeSquared(t.subtract(c,u,m)),U=a,D=s,P=F;L>P&&(P=L,U=i,D=E),v>P&&(P=v,U=u,D=c);var w=N;w.x=.5*(U.x+D.x),w.y=.5*(U.y+D.y),w.z=.5*(U.z+D.z);var B=t.magnitudeSquared(t.subtract(D,w,m)),x=Math.sqrt(B),b=C;b.x=a.x,b.y=i.y,b.z=u.z;var G=I;G.x=s.x,G.y=E.y,G.z=c.z;var z=t.multiplyByScalar(t.add(b,G,m),.5,p),H=0;for(M=0;MH&&(H=V);var q=t.magnitudeSquared(t.subtract(o,w,m));if(q>B){var W=Math.sqrt(q);x=.5*(x+W),B=x*x;var X=W-x;w.x=(x*w.x+X*o.x)/W,w.y=(x*w.y+X*o.y)/W,w.z=(x*w.z+X*o.z)/W}}return xl.x&&t.clone(u,l),LM.y&&t.clone(u,M),vO.z&&t.clone(u,O)}var U=t.magnitudeSquared(t.subtract(l,s,m)),D=t.magnitudeSquared(t.subtract(M,E,m)),P=t.magnitudeSquared(t.subtract(O,c,m)),w=s,B=l,x=U;D>x&&(x=D,w=E,B=M),P>x&&(x=P,w=c,B=O);var b=N;b.x=.5*(w.x+B.x),b.y=.5*(w.y+B.y),b.z=.5*(w.z+B.z);var G=t.magnitudeSquared(t.subtract(B,b,m)),z=Math.sqrt(G),H=C;H.x=s.x,H.y=E.y,H.z=c.z;var V=I;V.x=l.x,V.y=M.y,V.z=O.z;var q=t.multiplyByScalar(t.add(H,V,m),.5,p),W=0;for(y=0;yW&&(W=X);var Y=t.magnitudeSquared(t.subtract(u,b,m));if(Y>G){var K=Math.sqrt(Y);z=.5*(z+K),G=z*z;var k=K-z;b.x=(z*b.x+k*u.x)/K,b.y=(z*b.y+k*u.y)/K,b.z=(z*b.z+k*u.z)/K}}return zE.x&&t.clone(a,E),yc.y&&t.clone(a,c),Fl.z&&t.clone(a,l)}var L=t.magnitudeSquared(t.subtract(E,i,m)),v=t.magnitudeSquared(t.subtract(c,u,m)),U=t.magnitudeSquared(t.subtract(l,s,m)),D=i,P=E,w=L;v>w&&(w=v,D=u,P=c),U>w&&(w=U,D=s,P=l);var B=N;B.x=.5*(D.x+P.x),B.y=.5*(D.y+P.y),B.z=.5*(D.z+P.z);var x=t.magnitudeSquared(t.subtract(P,B,m)),b=Math.sqrt(x),G=C;G.x=i.x,G.y=u.y,G.z=s.z;var z=I;z.x=E.x,z.y=c.y,z.z=l.z;var H=t.multiplyByScalar(t.add(G,z,m),.5,p),V=0;for(O=0;OV&&(V=q);var W=t.magnitudeSquared(t.subtract(a,B,m));if(W>x){var X=Math.sqrt(W);b=.5*(b+X),x=b*b;var Y=X-b;B.x=(b*B.x+Y*a.x)/X,B.y=(b*B.y+Y*a.y)/X,B.z=(b*B.z+Y*a.z)/X}}return b=c+s)return e.clone(o),o;if(s>=c+i)return r.clone(o),o;var l=.5*(i+c+s),_=t.multiplyByScalar(E,(-i+l)/c,B);return t.add(_,a,_),t.clone(_,o.center),o.radius=l,o};var x=new t;f.expand=function(e,r,n){n=f.clone(e,n);var o=t.magnitude(t.subtract(r,n.center,x));return o>n.radius&&(n.radius=o),n},f.intersectPlane=function(e,r){var n=e.center,o=e.radius,a=r.normal,i=t.dot(a,n)+r.distance;return i<-o?u.OUTSIDE:i1&&(r-=1),6*r<1?t+6*(e-t)*r:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function u(e,r,n,o){this.red=t(e,1),this.green=t(r,1),this.blue=t(n,1),this.alpha=t(o,1)}u.fromCartesian4=function(t,r){return e(r)?(r.red=t.x,r.green=t.y,r.blue=t.z,r.alpha=t.w,r):new u(t.x,t.y,t.z,t.w)},u.fromBytes=function(r,n,o,a,i){return r=u.byteToFloat(t(r,255)),n=u.byteToFloat(t(n,255)),o=u.byteToFloat(t(o,255)),a=u.byteToFloat(t(a,255)),e(i)?(i.red=r,i.green=n,i.blue=o,i.alpha=a,i):new u(r,n,o,a)},u.fromAlpha=function(t,r,n){return e(n)?(n.red=t.red,n.green=t.green,n.blue=t.blue,n.alpha=r,n):new u(t.red,t.green,t.blue,r)};var s,E,c;n.supportsTypedArrays()&&(s=new ArrayBuffer(4),E=new Uint32Array(s),c=new Uint8Array(s)),u.fromRgba=function(t,e){return E[0]=t,u.fromBytes(c[0],c[1],c[2],c[3],e)},u.fromHsl=function(r,n,o,a,s){r=t(r,0)%1,n=t(n,0),o=t(o,0),a=t(a,1);var E=o,c=o,l=o;if(0!==n){var f;f=o<.5?o*(1+n):o+n-o*n;var _=2*o-f;E=i(_,f,r+1/3),c=i(_,f,r),l=i(_,f,r-1/3)}return e(s)?(s.red=E,s.green=c,s.blue=l,s.alpha=a,s):new u(E,c,l,a)},u.fromRandom=function(r,n){r=t(r,t.EMPTY_OBJECT);var o=r.red;if(!e(o)){var i=t(r.minimumRed,0),s=t(r.maximumRed,1);o=i+a.nextRandomNumber()*(s-i)}var E=r.green;if(!e(E)){var c=t(r.minimumGreen,0),l=t(r.maximumGreen,1);E=c+a.nextRandomNumber()*(l-c)}var f=r.blue;if(!e(f)){var _=t(r.minimumBlue,0),R=t(r.maximumBlue,1);f=_+a.nextRandomNumber()*(R-_)}var h=r.alpha;if(!e(h)){var T=t(r.minimumAlpha,0),A=t(r.maximumAlpha,1);h=T+a.nextRandomNumber()*(A-T)}return e(n)?(n.red=o,n.green=E,n.blue=f,n.alpha=h,n):new u(o,E,f,h)};var l=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,f=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,_=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,R=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;return u.fromCssColorString=function(r,n){e(n)||(n=new u);var o=u[r.toUpperCase()];if(e(o))return u.clone(o,n),n;var a=l.exec(r);return null!==a?(n.red=parseInt(a[1],16)/15,n.green=parseInt(a[2],16)/15,n.blue=parseInt(a[3],16)/15,n.alpha=1,n):(a=f.exec(r),null!==a?(n.red=parseInt(a[1],16)/255,n.green=parseInt(a[2],16)/255,n.blue=parseInt(a[3],16)/255,n.alpha=1,n):(a=_.exec(r),null!==a?(n.red=parseFloat(a[1])/("%"===a[1].substr(-1)?100:255),n.green=parseFloat(a[2])/("%"===a[2].substr(-1)?100:255),n.blue=parseFloat(a[3])/("%"===a[3].substr(-1)?100:255),n.alpha=parseFloat(t(a[4],"1.0")),n):(a=R.exec(r),null!==a?u.fromHsl(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,parseFloat(t(a[4],"1.0")),n):n=void 0)))},u.packedLength=4,u.pack=function(e,r,n){return n=t(n,0),r[n++]=e.red,r[n++]=e.green,r[n++]=e.blue,r[n]=e.alpha,r},u.unpack=function(r,n,o){return n=t(n,0),e(o)||(o=new u),o.red=r[n++],o.green=r[n++],o.blue=r[n++],o.alpha=r[n],o},u.byteToFloat=function(t){return t/255},u.floatToByte=function(t){return 1===t?255:256*t|0},u.clone=function(t,r){if(e(t))return e(r)?(r.red=t.red,r.green=t.green,r.blue=t.blue,r.alpha=t.alpha,r):new u(t.red,t.green,t.blue,t.alpha)},u.equals=function(t,r){return t===r||e(t)&&e(r)&&t.red===r.red&&t.green===r.green&&t.blue===r.blue&&t.alpha===r.alpha},u.equalsArray=function(t,e,r){return t.red===e[r]&&t.green===e[r+1]&&t.blue===e[r+2]&&t.alpha===e[r+3]},u.prototype.clone=function(t){return u.clone(this,t)},u.prototype.equals=function(t){return u.equals(this,t)},u.prototype.equalsEpsilon=function(t,r){return this===t||e(t)&&Math.abs(this.red-t.red)<=r&&Math.abs(this.green-t.green)<=r&&Math.abs(this.blue-t.blue)<=r&&Math.abs(this.alpha-t.alpha)<=r},u.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},u.prototype.toCssColorString=function(){var t=u.floatToByte(this.red),e=u.floatToByte(this.green),r=u.floatToByte(this.blue);return 1===this.alpha?"rgb("+t+","+e+","+r+")":"rgba("+t+","+e+","+r+","+this.alpha+")"},u.prototype.toBytes=function(t){var r=u.floatToByte(this.red),n=u.floatToByte(this.green),o=u.floatToByte(this.blue),a=u.floatToByte(this.alpha);return e(t)?(t[0]=r,t[1]=n,t[2]=o,t[3]=a,t):[r,n,o,a]},u.prototype.toRgba=function(){return c[0]=u.floatToByte(this.red),c[1]=u.floatToByte(this.green),c[2]=u.floatToByte(this.blue),c[3]=u.floatToByte(this.alpha),E[0]},u.prototype.brighten=function(t,e){return t=1-t,e.red=1-(1-this.red)*t,e.green=1-(1-this.green)*t,e.blue=1-(1-this.blue)*t,e.alpha=this.alpha,e},u.prototype.darken=function(t,e){return t=1-t,e.red=this.red*t,e.green=this.green*t,e.blue=this.blue*t,e.alpha=this.alpha,e},u.prototype.withAlpha=function(t,e){return u.fromAlpha(this,t,e)},u.add=function(t,e,r){return r.red=t.red+e.red,r.green=t.green+e.green,r.blue=t.blue+e.blue,r.alpha=t.alpha+e.alpha,r},u.subtract=function(t,e,r){return r.red=t.red-e.red,r.green=t.green-e.green,r.blue=t.blue-e.blue,r.alpha=t.alpha-e.alpha,r},u.multiply=function(t,e,r){return r.red=t.red*e.red,r.green=t.green*e.green,r.blue=t.blue*e.blue,r.alpha=t.alpha*e.alpha,r},u.divide=function(t,e,r){return r.red=t.red/e.red,r.green=t.green/e.green,r.blue=t.blue/e.blue,r.alpha=t.alpha/e.alpha,r},u.mod=function(t,e,r){return r.red=t.red%e.red,r.green=t.green%e.green,r.blue=t.blue%e.blue,r.alpha=t.alpha%e.alpha,r},u.multiplyByScalar=function(t,e,r){return r.red=t.red*e,r.green=t.green*e,r.blue=t.blue*e,r.alpha=t.alpha*e,r},u.divideByScalar=function(t,e,r){return r.red=t.red/e,r.green=t.green/e,r.blue=t.blue/e,r.alpha=t.alpha/e,r},u.ALICEBLUE=o(u.fromCssColorString("#F0F8FF")),u.ANTIQUEWHITE=o(u.fromCssColorString("#FAEBD7")),u.AQUA=o(u.fromCssColorString("#00FFFF")),u.AQUAMARINE=o(u.fromCssColorString("#7FFFD4")),u.AZURE=o(u.fromCssColorString("#F0FFFF")),u.BEIGE=o(u.fromCssColorString("#F5F5DC")),u.BISQUE=o(u.fromCssColorString("#FFE4C4")),u.BLACK=o(u.fromCssColorString("#000000")),u.BLANCHEDALMOND=o(u.fromCssColorString("#FFEBCD")),u.BLUE=o(u.fromCssColorString("#0000FF")),u.BLUEVIOLET=o(u.fromCssColorString("#8A2BE2")),u.BROWN=o(u.fromCssColorString("#A52A2A")),u.BURLYWOOD=o(u.fromCssColorString("#DEB887")),u.CADETBLUE=o(u.fromCssColorString("#5F9EA0")),u.CHARTREUSE=o(u.fromCssColorString("#7FFF00")),u.CHOCOLATE=o(u.fromCssColorString("#D2691E")),u.CORAL=o(u.fromCssColorString("#FF7F50")),u.CORNFLOWERBLUE=o(u.fromCssColorString("#6495ED")),u.CORNSILK=o(u.fromCssColorString("#FFF8DC")),u.CRIMSON=o(u.fromCssColorString("#DC143C")),u.CYAN=o(u.fromCssColorString("#00FFFF")),u.DARKBLUE=o(u.fromCssColorString("#00008B")),u.DARKCYAN=o(u.fromCssColorString("#008B8B")),u.DARKGOLDENROD=o(u.fromCssColorString("#B8860B")),u.DARKGRAY=o(u.fromCssColorString("#A9A9A9")),u.DARKGREEN=o(u.fromCssColorString("#006400")),u.DARKGREY=u.DARKGRAY,u.DARKKHAKI=o(u.fromCssColorString("#BDB76B")),u.DARKMAGENTA=o(u.fromCssColorString("#8B008B")),u.DARKOLIVEGREEN=o(u.fromCssColorString("#556B2F")),u.DARKORANGE=o(u.fromCssColorString("#FF8C00")),u.DARKORCHID=o(u.fromCssColorString("#9932CC")),u.DARKRED=o(u.fromCssColorString("#8B0000")),u.DARKSALMON=o(u.fromCssColorString("#E9967A")),u.DARKSEAGREEN=o(u.fromCssColorString("#8FBC8F")),u.DARKSLATEBLUE=o(u.fromCssColorString("#483D8B")),u.DARKSLATEGRAY=o(u.fromCssColorString("#2F4F4F")),u.DARKSLATEGREY=u.DARKSLATEGRAY,u.DARKTURQUOISE=o(u.fromCssColorString("#00CED1")),u.DARKVIOLET=o(u.fromCssColorString("#9400D3")),u.DEEPPINK=o(u.fromCssColorString("#FF1493")),u.DEEPSKYBLUE=o(u.fromCssColorString("#00BFFF")),u.DIMGRAY=o(u.fromCssColorString("#696969")),u.DIMGREY=u.DIMGRAY,u.DODGERBLUE=o(u.fromCssColorString("#1E90FF")),u.FIREBRICK=o(u.fromCssColorString("#B22222")),u.FLORALWHITE=o(u.fromCssColorString("#FFFAF0")),u.FORESTGREEN=o(u.fromCssColorString("#228B22")),u.FUSCHIA=o(u.fromCssColorString("#FF00FF")),u.GAINSBORO=o(u.fromCssColorString("#DCDCDC")),u.GHOSTWHITE=o(u.fromCssColorString("#F8F8FF")),u.GOLD=o(u.fromCssColorString("#FFD700")),u.GOLDENROD=o(u.fromCssColorString("#DAA520")),u.GRAY=o(u.fromCssColorString("#808080")),u.GREEN=o(u.fromCssColorString("#008000")),u.GREENYELLOW=o(u.fromCssColorString("#ADFF2F")),u.GREY=u.GRAY,u.HONEYDEW=o(u.fromCssColorString("#F0FFF0")),u.HOTPINK=o(u.fromCssColorString("#FF69B4")),u.INDIANRED=o(u.fromCssColorString("#CD5C5C")),u.INDIGO=o(u.fromCssColorString("#4B0082")),u.IVORY=o(u.fromCssColorString("#FFFFF0")),u.KHAKI=o(u.fromCssColorString("#F0E68C")),u.LAVENDER=o(u.fromCssColorString("#E6E6FA")),u.LAVENDAR_BLUSH=o(u.fromCssColorString("#FFF0F5")),u.LAWNGREEN=o(u.fromCssColorString("#7CFC00")),u.LEMONCHIFFON=o(u.fromCssColorString("#FFFACD")),u.LIGHTBLUE=o(u.fromCssColorString("#ADD8E6")),u.LIGHTCORAL=o(u.fromCssColorString("#F08080")),u.LIGHTCYAN=o(u.fromCssColorString("#E0FFFF")),u.LIGHTGOLDENRODYELLOW=o(u.fromCssColorString("#FAFAD2")),u.LIGHTGRAY=o(u.fromCssColorString("#D3D3D3")),u.LIGHTGREEN=o(u.fromCssColorString("#90EE90")),u.LIGHTGREY=u.LIGHTGRAY,u.LIGHTPINK=o(u.fromCssColorString("#FFB6C1")),u.LIGHTSEAGREEN=o(u.fromCssColorString("#20B2AA")),u.LIGHTSKYBLUE=o(u.fromCssColorString("#87CEFA")),u.LIGHTSLATEGRAY=o(u.fromCssColorString("#778899")),u.LIGHTSLATEGREY=u.LIGHTSLATEGRAY,u.LIGHTSTEELBLUE=o(u.fromCssColorString("#B0C4DE")),u.LIGHTYELLOW=o(u.fromCssColorString("#FFFFE0")),u.LIME=o(u.fromCssColorString("#00FF00")),u.LIMEGREEN=o(u.fromCssColorString("#32CD32")),u.LINEN=o(u.fromCssColorString("#FAF0E6")),u.MAGENTA=o(u.fromCssColorString("#FF00FF")),u.MAROON=o(u.fromCssColorString("#800000")),u.MEDIUMAQUAMARINE=o(u.fromCssColorString("#66CDAA")),u.MEDIUMBLUE=o(u.fromCssColorString("#0000CD")),u.MEDIUMORCHID=o(u.fromCssColorString("#BA55D3")),u.MEDIUMPURPLE=o(u.fromCssColorString("#9370DB")),u.MEDIUMSEAGREEN=o(u.fromCssColorString("#3CB371")),u.MEDIUMSLATEBLUE=o(u.fromCssColorString("#7B68EE")),u.MEDIUMSPRINGGREEN=o(u.fromCssColorString("#00FA9A")),u.MEDIUMTURQUOISE=o(u.fromCssColorString("#48D1CC")),u.MEDIUMVIOLETRED=o(u.fromCssColorString("#C71585")),u.MIDNIGHTBLUE=o(u.fromCssColorString("#191970")),u.MINTCREAM=o(u.fromCssColorString("#F5FFFA")),u.MISTYROSE=o(u.fromCssColorString("#FFE4E1")),u.MOCCASIN=o(u.fromCssColorString("#FFE4B5")),u.NAVAJOWHITE=o(u.fromCssColorString("#FFDEAD")),u.NAVY=o(u.fromCssColorString("#000080")),u.OLDLACE=o(u.fromCssColorString("#FDF5E6")),u.OLIVE=o(u.fromCssColorString("#808000")),u.OLIVEDRAB=o(u.fromCssColorString("#6B8E23")),u.ORANGE=o(u.fromCssColorString("#FFA500")),u.ORANGERED=o(u.fromCssColorString("#FF4500")),u.ORCHID=o(u.fromCssColorString("#DA70D6")),u.PALEGOLDENROD=o(u.fromCssColorString("#EEE8AA")),u.PALEGREEN=o(u.fromCssColorString("#98FB98")),u.PALETURQUOISE=o(u.fromCssColorString("#AFEEEE")),u.PALEVIOLETRED=o(u.fromCssColorString("#DB7093")),u.PAPAYAWHIP=o(u.fromCssColorString("#FFEFD5")),u.PEACHPUFF=o(u.fromCssColorString("#FFDAB9")),u.PERU=o(u.fromCssColorString("#CD853F")),u.PINK=o(u.fromCssColorString("#FFC0CB")),u.PLUM=o(u.fromCssColorString("#DDA0DD")),u.POWDERBLUE=o(u.fromCssColorString("#B0E0E6")),u.PURPLE=o(u.fromCssColorString("#800080")),u.RED=o(u.fromCssColorString("#FF0000")),u.ROSYBROWN=o(u.fromCssColorString("#BC8F8F")),u.ROYALBLUE=o(u.fromCssColorString("#4169E1")),u.SADDLEBROWN=o(u.fromCssColorString("#8B4513")),u.SALMON=o(u.fromCssColorString("#FA8072")),u.SANDYBROWN=o(u.fromCssColorString("#F4A460")),u.SEAGREEN=o(u.fromCssColorString("#2E8B57")),u.SEASHELL=o(u.fromCssColorString("#FFF5EE")),u.SIENNA=o(u.fromCssColorString("#A0522D")),u.SILVER=o(u.fromCssColorString("#C0C0C0")),u.SKYBLUE=o(u.fromCssColorString("#87CEEB")),u.SLATEBLUE=o(u.fromCssColorString("#6A5ACD")),u.SLATEGRAY=o(u.fromCssColorString("#708090")),u.SLATEGREY=u.SLATEGRAY,u.SNOW=o(u.fromCssColorString("#FFFAFA")),u.SPRINGGREEN=o(u.fromCssColorString("#00FF7F")),u.STEELBLUE=o(u.fromCssColorString("#4682B4")),u.TAN=o(u.fromCssColorString("#D2B48C")),u.TEAL=o(u.fromCssColorString("#008080")),u.THISTLE=o(u.fromCssColorString("#D8BFD8")),u.TOMATO=o(u.fromCssColorString("#FF6347")),u.TURQUOISE=o(u.fromCssColorString("#40E0D0")),u.VIOLET=o(u.fromCssColorString("#EE82EE")),u.WHEAT=o(u.fromCssColorString("#F5DEB3")),u.WHITE=o(u.fromCssColorString("#FFFFFF")),u.WHITESMOKE=o(u.fromCssColorString("#F5F5F5")),u.YELLOW=o(u.fromCssColorString("#FFFF00")),u.YELLOWGREEN=o(u.fromCssColorString("#9ACD32")),u.TRANSPARENT=o(new u(0,0,0,0)),u}),define("Core/WebGLConstants",["./freezeObject"],function(t){"use strict";var e={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444,DOUBLE:5130,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,COLOR:6144,DEPTH:6145,STENCIL:6146,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,MAX_3D_TEXTURE_SIZE:32883,UNSIGNED_INT_2_10_10_10_REV:33640,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,MAX_TEXTURE_LOD_BIAS:34045,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,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_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,INVALID_INDEX:4294967295,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,SAMPLER_BINDING:35097,RGB10_A2UI:36975,INT_2_10_10_10_REV:36255,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497,TEXTURE_IMMUTABLE_FORMAT:37167,MAX_ELEMENT_INDEX:36203,TEXTURE_IMMUTABLE_LEVELS:33503};return t(e)}),define("Core/ComponentDatatype",["./defaultValue","./defined","./DeveloperError","./FeatureDetection","./freezeObject","./WebGLConstants"],function(t,e,r,n,o,a){"use strict";if(!n.supportsTypedArrays())return{};var i={BYTE:a.BYTE,UNSIGNED_BYTE:a.UNSIGNED_BYTE,SHORT:a.SHORT,UNSIGNED_SHORT:a.UNSIGNED_SHORT,INT:a.INT,UNSIGNED_INT:a.UNSIGNED_INT,FLOAT:a.FLOAT,DOUBLE:a.DOUBLE};return i.getSizeInBytes=function(t){switch(t){case i.BYTE:return Int8Array.BYTES_PER_ELEMENT;case i.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case i.SHORT:return Int16Array.BYTES_PER_ELEMENT;case i.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case i.INT:return Int32Array.BYTES_PER_ELEMENT;case i.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case i.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case i.DOUBLE:return Float64Array.BYTES_PER_ELEMENT}},i.fromTypedArray=function(t){return t instanceof Int8Array?i.BYTE:t instanceof Uint8Array?i.UNSIGNED_BYTE:t instanceof Int16Array?i.SHORT:t instanceof Uint16Array?i.UNSIGNED_SHORT:t instanceof Int32Array?i.INT:t instanceof Uint32Array?i.UNSIGNED_INT:t instanceof Float32Array?i.FLOAT:t instanceof Float64Array?i.DOUBLE:void 0},i.validate=function(t){return e(t)&&(t===i.BYTE||t===i.UNSIGNED_BYTE||t===i.SHORT||t===i.UNSIGNED_SHORT||t===i.INT||t===i.UNSIGNED_INT||t===i.FLOAT||t===i.DOUBLE)},i.createTypedArray=function(t,e){switch(t){case i.BYTE:return new Int8Array(e);case i.UNSIGNED_BYTE:return new Uint8Array(e);case i.SHORT:return new Int16Array(e);case i.UNSIGNED_SHORT:return new Uint16Array(e);case i.INT:return new Int32Array(e);case i.UNSIGNED_INT:return new Uint32Array(e);case i.FLOAT:return new Float32Array(e);case i.DOUBLE:return new Float64Array(e)}},i.createArrayBufferView=function(e,r,n,o){switch(n=t(n,0),o=t(o,(r.byteLength-n)/i.getSizeInBytes(e)),e){case i.BYTE:return new Int8Array(r,n,o);case i.UNSIGNED_BYTE:return new Uint8Array(r,n,o);case i.SHORT:return new Int16Array(r,n,o);case i.UNSIGNED_SHORT:return new Uint16Array(r,n,o);case i.INT:return new Int32Array(r,n,o);case i.UNSIGNED_INT:return new Uint32Array(r,n,o);case i.FLOAT:return new Float32Array(r,n,o);case i.DOUBLE:return new Float64Array(r,n,o)}},i.fromName=function(t){switch(t){case"BYTE":return i.BYTE;case"UNSIGNED_BYTE":return i.UNSIGNED_BYTE;case"SHORT":return i.SHORT;case"UNSIGNED_SHORT":return i.UNSIGNED_SHORT;case"INT":return i.INT;case"UNSIGNED_INT":return i.UNSIGNED_INT;case"FLOAT":return i.FLOAT;case"DOUBLE":return i.DOUBLE}},o(i)}),define("Core/GeometryType",["./freezeObject"],function(t){"use strict";var e={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3};return t(e)}),define("Core/PrimitiveType",["./freezeObject","./WebGLConstants"],function(t,e){"use strict";var r={POINTS:e.POINTS,LINES:e.LINES,LINE_LOOP:e.LINE_LOOP,LINE_STRIP:e.LINE_STRIP,TRIANGLES:e.TRIANGLES,TRIANGLE_STRIP:e.TRIANGLE_STRIP,TRIANGLE_FAN:e.TRIANGLE_FAN,validate:function(t){return t===r.POINTS||t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP||t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN}};return t(r)}),define("Core/Geometry",["./defaultValue","./defined","./DeveloperError","./GeometryType","./PrimitiveType"],function(t,e,r,n,o){"use strict";function a(e){e=t(e,t.EMPTY_OBJECT),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=t(e.primitiveType,o.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=t(e.geometryType,n.NONE),this.boundingSphereCV=e.boundingSphereCV}return a.computeNumberOfVertices=function(t){var r=-1;for(var n in t.attributes)if(t.attributes.hasOwnProperty(n)&&e(t.attributes[n])&&e(t.attributes[n].values)){var o=t.attributes[n],a=o.values.length/o.componentsPerAttribute;r=a}return r},a}),define("Core/GeometryAttribute",["./defaultValue","./defined","./DeveloperError"],function(t,e,r){"use strict";function n(e){e=t(e,t.EMPTY_OBJECT),this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=t(e.normalize,!1),this.values=e.values}return n}),define("Core/GeometryAttributes",["./defaultValue"],function(t){"use strict";function e(e){e=t(e,t.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.binormal=e.binormal,this.tangent=e.tangent,this.color=e.color}return e}),define("Core/IndexDatatype",["./defined","./DeveloperError","./freezeObject","./Math","./WebGLConstants"],function(t,e,r,n,o){"use strict";var a={UNSIGNED_BYTE:o.UNSIGNED_BYTE,UNSIGNED_SHORT:o.UNSIGNED_SHORT,UNSIGNED_INT:o.UNSIGNED_INT};return a.getSizeInBytes=function(t){switch(t){case a.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case a.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case a.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}},a.validate=function(e){return t(e)&&(e===a.UNSIGNED_BYTE||e===a.UNSIGNED_SHORT||e===a.UNSIGNED_INT)},a.createTypedArray=function(t,e){return t>=n.SIXTY_FOUR_KILOBYTES?new Uint32Array(e):new Uint16Array(e)},a.createTypedArrayFromArrayBuffer=function(t,e,r,o){return t>=n.SIXTY_FOUR_KILOBYTES?new Uint32Array(e,r,o):new Uint16Array(e,r,o)},r(a)}),define("Core/EllipsoidGeodesic",["./Cartesian3","./Cartographic","./defaultValue","./defined","./defineProperties","./DeveloperError","./Ellipsoid","./Math"],function(t,e,r,n,o,a,i,u){"use strict";function s(t){var e=t._uSquared,r=t._ellipsoid.maximumRadius,n=t._ellipsoid.minimumRadius,o=(r-n)/r,a=Math.cos(t._startHeading),i=Math.sin(t._startHeading),u=(1-o)*Math.tan(t._start.latitude),s=1/Math.sqrt(1+u*u),E=s*u,c=Math.atan2(u,a),l=s*i,f=l*l,_=1-f,R=Math.sqrt(_),h=e/4,T=h*h,A=T*h,d=T*T,S=1+h-3*T/4+5*A/4-175*d/64,m=1-h+15*T/8-35*A/8,N=1-3*h+35*T/4,C=1-5*h,I=S*c-m*Math.sin(2*c)*h/2-N*Math.sin(4*c)*T/16-C*Math.sin(6*c)*A/48-5*Math.sin(8*c)*d/512,p=t._constants; p.a=r,p.b=n,p.f=o,p.cosineHeading=a,p.sineHeading=i,p.tanU=u,p.cosineU=s,p.sineU=E,p.sigma=c,p.sineAlpha=l,p.sineSquaredAlpha=f,p.cosineSquaredAlpha=_,p.cosineAlpha=R,p.u2Over4=h,p.u4Over16=T,p.u6Over64=A,p.u8Over256=d,p.a0=S,p.a1=m,p.a2=N,p.a3=C,p.distanceRatio=I}function E(t,e){return t*e*(4+t*(4-3*e))/16}function c(t,e,r,n,o,a,i){var u=E(t,r);return(1-u)*t*e*(n+u*o*(i+u*a*(2*i*i-1)))}function l(t,e,r,n,o,a,i){var s,E,l,f,_,R=(e-r)/e,h=a-n,T=Math.atan((1-R)*Math.tan(o)),A=Math.atan((1-R)*Math.tan(i)),d=Math.cos(T),S=Math.sin(T),m=Math.cos(A),N=Math.sin(A),C=d*m,I=d*N,p=S*N,M=S*m,O=h,g=u.TWO_PI,y=Math.cos(O),F=Math.sin(O);do{y=Math.cos(O),F=Math.sin(O);var L=I-M*y;l=Math.sqrt(m*m*F*F+L*L),E=p+C*y,s=Math.atan2(l,E);var v;0===l?(v=0,f=1):(v=C*F/l,f=1-v*v),g=O,_=E-2*p/f,isNaN(_)&&(_=0),O=h+c(R,v,f,s,l,E,_)}while(Math.abs(O-g)>u.EPSILON12);var U=f*(e*e-r*r)/(r*r),D=1+U*(4096+U*(U*(320-175*U)-768))/16384,P=U*(256+U*(U*(74-47*U)-128))/1024,w=_*_,B=P*l*(_+P*(E*(2*w-1)-P*_*(4*l*l-3)*(4*w-3)/6)/4),x=r*D*(s-B),b=Math.atan2(m*F,I-M*y),G=Math.atan2(d*F,I*y-M);t._distance=x,t._startHeading=b,t._endHeading=G,t._uSquared=U}function f(r,n,o,a){t.normalize(a.cartographicToCartesian(n,h),R),t.normalize(a.cartographicToCartesian(o,h),h);l(r,a.maximumRadius,a.minimumRadius,n.longitude,n.latitude,o.longitude,o.latitude),r._start=e.clone(n,r._start),r._end=e.clone(o,r._end),r._start.height=0,r._end.height=0,s(r)}function _(t,o,a){var u=r(a,i.WGS84);this._ellipsoid=u,this._start=new e,this._end=new e,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,n(t)&&n(o)&&f(this,t,o,u)}var R=new t,h=new t;return o(_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return this._startHeading}},endHeading:{get:function(){return this._endHeading}}}),_.prototype.setEndPoints=function(t,e){f(this,t,e,this._ellipsoid)},_.prototype.interpolateUsingFraction=function(t,e){return this.interpolateUsingSurfaceDistance(this._distance*t,e)},_.prototype.interpolateUsingSurfaceDistance=function(t,r){var o=this._constants,a=o.distanceRatio+t/o.b,i=Math.cos(2*a),u=Math.cos(4*a),s=Math.cos(6*a),E=Math.sin(2*a),l=Math.sin(4*a),f=Math.sin(6*a),_=Math.sin(8*a),R=a*a,h=a*R,T=o.u8Over256,A=o.u2Over4,d=o.u6Over64,S=o.u4Over16,m=2*h*T*i/3+a*(1-A+7*S/4-15*d/4+579*T/64-(S-15*d/4+187*T/16)*i-(5*d/4-115*T/16)*u-29*T*s/16)+(A/2-S+71*d/32-85*T/16)*E+(5*S/16-5*d/4+383*T/96)*l-R*((d-11*T/2)*E+5*T*l/2)+(29*d/96-29*T/16)*f+539*T*_/1536,N=Math.asin(Math.sin(m)*o.cosineAlpha),C=Math.atan(o.a/o.b*Math.tan(N));m-=o.sigma;var I=Math.cos(2*o.sigma+m),p=Math.sin(m),M=Math.cos(m),O=o.cosineU*M,g=o.sineU*p,y=Math.atan2(p*o.sineHeading,O-g*o.cosineHeading),F=y-c(o.f,o.sineAlpha,o.cosineSquaredAlpha,m,p,M,I);return n(r)?(r.longitude=this._start.longitude+F,r.latitude=C,r.height=0,r):new e(this._start.longitude+F,C,0)},_}),define("Core/QuadraticRealPolynomial",["./DeveloperError","./Math"],function(t,e){"use strict";function r(t,r,n){var o=t+r;return e.sign(t)!==e.sign(r)&&Math.abs(o/Math.max(Math.abs(t),Math.abs(r)))u&&u/i0?[f/t,o/f]:[o/f,f/t]},n}),define("Core/CubicRealPolynomial",["./DeveloperError","./QuadraticRealPolynomial"],function(t,e){"use strict";function r(t,e,r,n){var o,a,i=t,u=e/3,s=r/3,E=n,c=i*s,l=u*E,f=u*u,_=s*s,R=i*s-f,h=i*E-u*s,T=u*E-_,A=4*R*T-h*h;if(A<0){var d,S,m;f*l>=c*_?(d=i,S=R,m=-2*u*R+i*h):(d=E,S=T,m=-E*h+2*s*T);var N=m<0?-1:1,C=-N*Math.abs(d)*Math.sqrt(-A);a=-m+C;var I=a/2,p=I<0?-Math.pow(-I,1/3):Math.pow(I,1/3),M=a===C?-p:-S/p;return o=S<=0?p+M:-m/(p*p+M*M+S),f*l>=c*_?[(o-u)/i]:[-E/(o+s)]}var O=R,g=-2*u*R+i*h,y=T,F=-E*h+2*s*T,L=Math.sqrt(A),v=Math.sqrt(3)/2,U=Math.abs(Math.atan2(i*L,-g)/3);o=2*Math.sqrt(-O);var D=Math.cos(U);a=o*D;var P=o*(-D/2-v*Math.sin(U)),w=a+P>2*u?a-u:P-u,B=i,x=w/B;U=Math.abs(Math.atan2(E*L,-F)/3),o=2*Math.sqrt(-y),D=Math.cos(U),a=o*D,P=o*(-D/2-v*Math.sin(U));var b=-E,G=a+P<2*s?a+s:P+s,z=b/G,H=B*G,V=-w*G-B*b,q=w*b,W=(s*V-u*q)/(-u*V+s*H);return x<=W?x<=z?W<=z?[x,W,z]:[x,z,W]:[z,x,W]:x<=z?[W,x,z]:W<=z?[W,z,x]:[z,W,x]}var n={};return n.computeDiscriminant=function(t,e,r,n){var o=t*t,a=e*e,i=r*r,u=n*n,s=18*t*e*r*n+a*i-27*o*u-4*(t*i*r+a*e*n);return s},n.computeRealRoots=function(t,n,o,a){var i,u;if(0===t)return e.computeRealRoots(n,o,a);if(0===n){if(0===o){if(0===a)return[0,0,0];u=-a/t;var s=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3);return[s,s,s]}return 0===a?(i=e.computeRealRoots(t,0,o),0===i.Length?[0]:[i[0],0,i[1]]):r(t,0,o,a)}return 0===o?0===a?(u=-n/t,u<0?[u,0,0]:[0,0,u]):r(t,n,0,a):0===a?(i=e.computeRealRoots(t,n,o),0===i.length?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]):r(t,n,o,a)},n}),define("Core/QuarticRealPolynomial",["./CubicRealPolynomial","./DeveloperError","./Math","./QuadraticRealPolynomial"],function(t,e,r,n){"use strict";function o(e,o,a,i){var u=e*e,s=o-3*u/8,E=a-o*e/2+u*e/8,c=i-a*e/4+o*u/16-3*u*u/256,l=t.computeRealRoots(1,2*s,s*s-4*c,-E*E);if(l.length>0){var f=-e/4,_=l[l.length-1];if(Math.abs(_)=0&&A>=0){var d=Math.sqrt(T),S=Math.sqrt(A);return[f-S,f-d,f+d,f+S]}if(T>=0&&A<0)return h=Math.sqrt(T),[f-h,f+h];if(T<0&&A>=0)return h=Math.sqrt(A),[f-h,f+h]}return[]}if(_>0){var m=Math.sqrt(_),N=(s+_-E/m)/2,C=(s+_+E/m)/2,I=n.computeRealRoots(1,m,N),p=n.computeRealRoots(1,-m,C);return 0!==I.length?(I[0]+=f,I[1]+=f,0!==p.length?(p[0]+=f,p[1]+=f,I[1]<=p[0]?[I[0],I[1],p[0],p[1]]:p[1]<=I[0]?[p[0],p[1],I[0],I[1]]:I[0]>=p[0]&&I[1]<=p[1]?[p[0],I[0],I[1],p[1]]:p[0]>=I[0]&&p[1]<=I[1]?[I[0],p[0],p[1],I[1]]:I[0]>p[0]&&I[0]0){var R,h,T=_[0],A=o-T,d=A*A,S=e/2,m=A/2,N=d-4*i,C=d+4*Math.abs(i),I=E-4*T,p=E+4*Math.abs(T);if(T<0||N*p=U[0]&&v[1]<=U[1]?[U[0],v[0],v[1],U[1]]:U[0]>=v[0]&&U[1]<=v[1]?[v[0],U[0],U[1],v[1]]:v[0]>U[0]&&v[0]0){var a=1/(2*t),i=Math.sqrt(o),u=(-e+i)*a,s=(-e-i)*a;return u0?S.push(new t(o,E*B,E*-G)):0!==G?(S.push(new t(o,E*B,E*-G)),S.push(new t(o,E*B,E*G)),++P):S.push(new t(o,E*B,E*G))}return S}var R={};R.rayPlane=function(e,r,o){n(o)||(o=new t);var i=e.origin,u=e.direction,s=r.normal,E=t.dot(s,u);if(!(Math.abs(E)I)return;if(E=t.cross(s,m,S),l=t.dot(R,E),l<0||c+l>I)return;f=t.dot(N,E)/I}else{if(Math.abs(I)1)return;if(E=t.cross(s,m,S),l=t.dot(R,E)*p,l<0||c+l>1)return;f=t.dot(N,E)*p}return f},R.rayTriangle=function(e,r,o,a,i,u){var s=R.rayTriangleParametric(e,r,o,a,i);if(n(s)&&!(s<0))return n(u)||(u=new t),t.multiplyByScalar(e.direction,s,u),t.add(e.origin,u,u)};var m=new E;R.lineSegmentTriangle=function(e,r,o,a,i,u,s){var E=m;t.clone(e,E.origin),t.subtract(r,e,E.direction),t.normalize(E.direction,E.direction);var c=R.rayTriangleParametric(E,o,a,i,u);if(!(!n(c)||c<0||c>t.distance(e,r)))return n(s)||(s=new t),t.multiplyByScalar(E.direction,c,s),t.add(E.origin,s,s)};var N={root0:0,root1:0};R.raySphere=function(t,e,r){if(r=l(t,e,r),n(r)&&!(r.stop<0))return r.start=Math.max(r.start,0),r};var C=new E;R.lineSegmentSphere=function(e,r,o,a){var i=C;t.clone(e,i.origin);var u=t.subtract(r,e,i.direction),s=t.magnitude(u);if(t.normalize(u,u),a=l(i,o,a),!(!n(a)||a.stop<0||a.start>s))return a.start=Math.max(a.start,0),a.stop=Math.min(a.stop,s),a};var I=new t,p=new t;R.rayEllipsoid=function(e,r){var n,o,a,i,u,s=r.oneOverRadii,E=t.multiplyComponents(s,e.origin,I),c=t.multiplyComponents(s,e.direction,p),l=t.magnitudeSquared(E),f=t.dot(E,c);if(l>1){if(f>=0)return;var _=f*f;if(n=l-1,o=t.magnitudeSquared(c),a=o*n,_a){i=f*f-a,u=-f+Math.sqrt(i);var R=u/o,h=n/u;return R=0)return o}var E=n(this.rayEllipsoid(e,r)),c=r.transformPositionToScaledSpace(u,M),l=t.normalize(c,c),f=t.mostOrthogonalAxis(c,y),R=t.normalize(t.cross(f,l,O),O),h=t.normalize(t.cross(l,R,g),g),T=L;T[0]=l.x,T[1]=l.y,T[2]=l.z,T[3]=R.x,T[4]=R.y,T[5]=R.z,T[6]=h.x,T[7]=h.y,T[8]=h.z;var A=i.transpose(T,v),d=i.fromScale(r.radii,U),S=i.fromScale(r.oneOverRadii,D),m=P;m[0]=0,m[1]=-u.z,m[2]=u.y,m[3]=u.z,m[4]=0,m[5]=-u.x,m[6]=-u.y,m[7]=u.x,m[8]=0;var N,C,I=i.multiply(i.multiply(A,S,w),m,w),p=i.multiply(i.multiply(I,d,B),T,B),z=i.multiplyByVector(I,o,F),H=_(p,t.negate(z,M),0,0,1),V=H.length;if(V>0){for(var q=t.clone(t.ZERO,b),W=Number.NEGATIVE_INFINITY,X=0;XW&&(W=K,q=t.clone(N,q))}var k=r.cartesianToCartographic(q,G);return W=a.clamp(W,0,1),C=t.magnitude(t.subtract(q,o,y))*Math.sqrt(1-W*W),C=E?-C:C,k.height=C,r.cartographicToCartesian(k,new t)}};var z=new t;return R.lineSegmentPlane=function(e,r,o,i){n(i)||(i=new t);var u=t.subtract(r,e,z),s=o.normal,E=t.dot(s,u);if(!(Math.abs(E)1))return t.multiplyByScalar(u,l,i),t.add(e,i,i),i}},R.trianglePlaneIntersection=function(e,r,n,o){var a=o.normal,i=o.distance,u=t.dot(a,e)+i<0,s=t.dot(a,r)+i<0,E=t.dot(a,n)+i<0,c=0;c+=u?1:0,c+=s?1:0,c+=E?1:0;var l,f;if(1!==c&&2!==c||(l=new t,f=new t),1===c){if(u)return R.lineSegmentPlane(e,r,o,l),R.lineSegmentPlane(e,n,o,f),{positions:[e,r,n,l,f],indices:[0,3,4,1,2,4,1,4,3]};if(s)return R.lineSegmentPlane(r,n,o,l),R.lineSegmentPlane(r,e,o,f),{positions:[e,r,n,l,f],indices:[1,3,4,2,0,4,2,4,3]};if(E)return R.lineSegmentPlane(n,e,o,l),R.lineSegmentPlane(n,r,o,f),{positions:[e,r,n,l,f],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===c){if(!u)return R.lineSegmentPlane(r,e,o,l),R.lineSegmentPlane(n,e,o,f),{positions:[e,r,n,l,f],indices:[1,2,4,1,4,3,0,3,4]};if(!s)return R.lineSegmentPlane(n,r,o,l),R.lineSegmentPlane(e,r,o,f),{positions:[e,r,n,l,f],indices:[2,0,4,2,4,3,1,3,4]};if(!E)return R.lineSegmentPlane(e,n,o,l),R.lineSegmentPlane(r,n,o,f),{positions:[e,r,n,l,f],indices:[0,1,4,0,4,3,2,3,4]}}},R}),define("Core/Plane",["./Cartesian3","./defined","./DeveloperError","./freezeObject"],function(t,e,r,n){"use strict";function o(e,r){this.normal=t.clone(e),this.distance=r}o.fromPointNormal=function(r,n,a){var i=-t.dot(n,r);return e(a)?(t.clone(n,a.normal),a.distance=i,a):new o(n,i)};var a=new t;return o.fromCartesian4=function(r,n){var i=t.fromCartesian4(r,a),u=r.w;return e(n)?(t.clone(i,n.normal),n.distance=u,n):new o(i,u)},o.getPointDistance=function(e,r){return t.dot(e.normal,r)+e.distance},o.ORIGIN_XY_PLANE=n(new o(t.UNIT_Z,0)),o.ORIGIN_YZ_PLANE=n(new o(t.UNIT_X,0)),o.ORIGIN_ZX_PLANE=n(new o(t.UNIT_Y,0)),o}),define("Core/PolylinePipeline",["./Cartesian3","./Cartographic","./defaultValue","./defined","./DeveloperError","./Ellipsoid","./EllipsoidGeodesic","./IntersectionTests","./isArray","./Math","./Matrix4","./Plane"],function(t,e,r,n,o,a,i,u,s,E,c,l){"use strict";function f(t,e,r){var n=p;n.length=t;var o;if(e===r){for(o=0;o0){o=r(o,c.IDENTITY);var s=c.inverseTransformation(o,T),E=c.multiplyByPoint(s,t.ZERO,A),f=c.multiplyByPointAsVector(s,t.UNIT_Y,d),_=l.fromPointNormal(E,f,S),R=c.multiplyByPointAsVector(s,t.UNIT_X,m),h=l.fromPointNormal(E,R,N),p=1;a.push(t.clone(e[0]));for(var M=a[0],O=e.length,g=1;g0?new Array(E):void 0;for(u=0;u