1
Surpriseplus
2022-09-16 8d1a91c23df335b090e38b2edd15203aa3b03da9
1
define(["exports","./when-cbf8cd21","./Check-35e1a91d","./Math-e66fad2a","./WebGLConstants-95ceb4e9","./PixelFormat-d198afce"],function(e,I,a,L,t,M){"use strict";function u(e,t){if(null===e||"object"!=typeof e)return e;t=I.defaultValue(t,!1);var i,n,r=new e.constructor;for(i in e){e.hasOwnProperty(i)&&(n=e[i],t&&(n=u(n,t)),r[i]=n)}return r}function E(e,t){this.x=I.defaultValue(e,0),this.y=I.defaultValue(t,0)}E.fromElements=function(e,t,i){return I.defined(i)?(i.x=e,i.y=t,i):new E(e,t)},E.fromCartesian3=E.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.x=e.x,t.y=e.y,t):new E(e.x,e.y)},E.fromCartesian4=E.clone,E.packedLength=2,E.pack=function(e,t,i){return i=I.defaultValue(i,0),t[i++]=e.x,t[i]=e.y,t},E.unpack=function(e,t,i){return t=I.defaultValue(t,0),I.defined(i)||(i=new E),i.x=e[t++],i.y=e[t],i},E.packArray=function(e,t){var i=e.length,n=2*i;if(I.defined(t)){if(!Array.isArray(t)&&t.length!==n)throw new a.DeveloperError("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)E.pack(e[r],t,2*r);return t},E.unpackArray=function(e,t){var i=e.length;I.defined(t)?t.length=i/2:t=new Array(i/2);for(var n=0;n<i;n+=2){var r=n/2;t[r]=E.unpack(e,n,t[r])}return t},E.fromArray=E.unpack,E.maximumComponent=function(e){return Math.max(e.x,e.y)},E.minimumComponent=function(e){return Math.min(e.x,e.y)},E.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i},E.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i},E.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y},E.magnitude=function(e){return Math.sqrt(E.magnitudeSquared(e))};var i=new E;E.distance=function(e,t){return E.subtract(e,t,i),E.magnitude(i)},E.distanceSquared=function(e,t){return E.subtract(e,t,i),E.magnitudeSquared(i)},E.normalize=function(e,t){var i=E.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t},E.dot=function(e,t){return e.x*t.x+e.y*t.y},E.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i},E.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i},E.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i},E.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i},E.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i},E.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i},E.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t},E.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t};var r=new E;E.lerp=function(e,t,i,n){return E.multiplyByScalar(t,i,r),n=E.multiplyByScalar(e,1-i,n),E.add(r,n,n)};var n=new E,o=new E;E.angleBetween=function(e,t){return E.normalize(e,n),E.normalize(t,o),L.CesiumMath.acosClamped(E.dot(n,o))};var s=new E;function d(){return!0}E.mostOrthogonalAxis=function(e,t){var i=E.normalize(e,s);return E.abs(i,i),t=i.x<=i.y?E.clone(E.UNIT_X,t):E.clone(E.UNIT_Y,t)},E.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.x===t.x&&e.y===t.y},E.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]},E.equalsEpsilon=function(e,t,i,n){return e===t||I.defined(e)&&I.defined(t)&&L.CesiumMath.equalsEpsilon(e.x,t.x,i,n)&&L.CesiumMath.equalsEpsilon(e.y,t.y,i,n)},E.ZERO=Object.freeze(new E(0,0)),E.UNIT_X=Object.freeze(new E(1,0)),E.UNIT_Y=Object.freeze(new E(0,1)),E.prototype.clone=function(e){return E.clone(this,e)},E.prototype.equals=function(e){return E.equals(this,e)},E.prototype.equalsEpsilon=function(e,t,i){return E.equalsEpsilon(this,e,t,i)};var m={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!(E.prototype.toString=function(){return"("+this.x+", "+this.y+")"}),_highpIntSupported:!1};Object.defineProperties(m,{maximumCombinedTextureImageUnits:{get:function(){return m._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return m._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return m._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return m._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return m._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return m._maximumTextureSize}},maximumVaryingVectors:{get:function(){return m._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return m._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return m._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return m._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return m._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return m._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return m._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return m._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return m._maximumViewportWidth}},maximumViewportHeight:{get:function(){return m._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return m._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return m._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return m._maximumColorAttachments}},highpFloatSupported:{get:function(){return m._highpFloatSupported}},highpIntSupported:{get:function(){return m._highpIntSupported}}});var l={DONT_CARE:t.WebGLConstants.DONT_CARE,FASTEST:t.WebGLConstants.FASTEST,NICEST:t.WebGLConstants.NICEST,validate:function(e){return e===l.DONT_CARE||e===l.FASTEST||e===l.NICEST}},f=Object.freeze(l),h={NEAREST:t.WebGLConstants.NEAREST,LINEAR:t.WebGLConstants.LINEAR,validate:function(e){return e===h.NEAREST||e===h.LINEAR}},c=Object.freeze(h),x={NEAREST:t.WebGLConstants.NEAREST,LINEAR:t.WebGLConstants.LINEAR,NEAREST_MIPMAP_NEAREST:t.WebGLConstants.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:t.WebGLConstants.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:t.WebGLConstants.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:t.WebGLConstants.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===x.NEAREST||e===x.LINEAR||e===x.NEAREST_MIPMAP_NEAREST||e===x.LINEAR_MIPMAP_NEAREST||e===x.NEAREST_MIPMAP_LINEAR||e===x.LINEAR_MIPMAP_LINEAR}},_=Object.freeze(x),p={CLAMP_TO_EDGE:t.WebGLConstants.CLAMP_TO_EDGE,REPEAT:t.WebGLConstants.REPEAT,MIRRORED_REPEAT:t.WebGLConstants.MIRRORED_REPEAT,validate:function(e){return e===p.CLAMP_TO_EDGE||e===p.REPEAT||e===p.MIRRORED_REPEAT}},y=Object.freeze(p);function T(e){e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT);var t=I.defaultValue(e.wrapS,y.CLAMP_TO_EDGE),i=I.defaultValue(e.wrapT,y.CLAMP_TO_EDGE),n=I.defaultValue(e.minificationFilter,_.LINEAR),r=I.defaultValue(e.magnificationFilter,c.LINEAR),a=I.defined(e.maximumAnisotropy)?e.maximumAnisotropy:1;this._wrapS=t,this._wrapT=i,this._minificationFilter=n,this._magnificationFilter=r,this._maximumAnisotropy=a}function g(e){var t=(e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT)).context,i=e.width,n=e.height,r=e.source;I.defined(r)&&(I.defined(i)||(i=I.defaultValue(r.videoWidth,r.width)),I.defined(n)||(n=I.defaultValue(r.videoHeight,r.height)));var a=I.defaultValue(e.pixelFormat,M.PixelFormat.RGBA),u=I.defaultValue(e.pixelDatatype,M.PixelDatatype.UNSIGNED_BYTE),o=M.PixelFormat.toInternalFormat(a,u,t),s=M.PixelFormat.isCompressedFormat(o),d=e.preMultiplyAlpha||a===M.PixelFormat.RGB||a===M.PixelFormat.LUMINANCE,m=I.defaultValue(e.flipY,!0),l=!0,f=t._gl,h=f.TEXTURE_2D,c=f.createTexture();f.activeTexture(f.TEXTURE0),f.bindTexture(h,c);var x,_=4;if(I.defined(r)&&I.defined(r.arrayBufferView)&&!s&&(_=M.PixelFormat.alignmentInBytes(a,u,i)),f.pixelStorei(f.UNPACK_ALIGNMENT,_),I.defined(r))if(I.defined(r.arrayBufferView)){f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1);var p=r.arrayBufferView;if(s)f.compressedTexImage2D(h,0,o,i,n,0,p);else if(m&&(p=M.PixelFormat.flipY(p,a,u,i,n)),f.texImage2D(h,0,o,i,n,0,a,M.PixelDatatype.toWebGLConstant(u,t),p),I.defined(r.mipLevels))for(var y=i,g=n,A=0;A<r.mipLevels.length;++A)(y=0|Math.floor(y/2))<1&&(y=1),(g=0|Math.floor(g/2))<1&&(g=1),f.texImage2D(h,A+1,o,y,g,0,a,M.PixelDatatype.toWebGLConstant(u,t),r.mipLevels[A])}else I.defined(r.framebuffer)?(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!1),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._bind(),f.copyTexImage2D(h,0,o,r.xOffset,r.yOffset,i,n,0),r.framebuffer!==t.defaultFramebuffer&&r.framebuffer._unBind()):(f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,m),f.texImage2D(h,0,o,a,M.PixelDatatype.toWebGLConstant(u,t),r));else f.texImage2D(h,0,o,i,n,0,a,M.PixelDatatype.toWebGLConstant(u,t),null),l=!1;f.bindTexture(h,null),x=s?M.PixelFormat.compressedTextureSizeInBytes(a,i,n):M.PixelFormat.textureSizeInBytes(a,u,i,n),this._id="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),this._context=t,this._textureFilterAnisotropic=t._textureFilterAnisotropic,this._textureTarget=h,this._texture=c,this._internalFormat=o,this._pixelFormat=a,this._pixelDatatype=u,this._width=i,this._height=n,this._dimensions=new E(i,n),this._hasMipmap=!1,this._sizeInBytes=x,this._preMultiplyAlpha=d,this._flipY=m,this._initialized=l,this._sampler=void 0,this.sampler=I.defined(e.sampler)?e.sampler:new T}Object.defineProperties(T.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),T.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},T.NEAREST=Object.freeze(new T({wrapS:y.CLAMP_TO_EDGE,wrapT:y.CLAMP_TO_EDGE,minificationFilter:_.NEAREST,magnificationFilter:c.NEAREST})),g.create=function(e){return new g(e)},g.fromFramebuffer=function(e){var t=(e=I.defaultValue(e,I.defaultValue.EMPTY_OBJECT)).context,i=t._gl,n=I.defaultValue(e.pixelFormat,M.PixelFormat.RGB),r=I.defaultValue(e.framebufferXOffset,0),a=I.defaultValue(e.framebufferYOffset,0),u=I.defaultValue(e.width,i.drawingBufferWidth),o=I.defaultValue(e.height,i.drawingBufferHeight),s=e.framebuffer;return new g({context:t,width:u,height:o,pixelFormat:n,source:{framebuffer:I.defined(s)?s:t.defaultFramebuffer,xOffset:r,yOffset:a,width:u,height:o}})},Object.defineProperties(g.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=this._context,r=this._pixelFormat,a=this._pixelDatatype,u=t===_.NEAREST_MIPMAP_NEAREST||t===_.NEAREST_MIPMAP_LINEAR||t===_.LINEAR_MIPMAP_NEAREST||t===_.LINEAR_MIPMAP_LINEAR;(a===M.PixelDatatype.FLOAT&&!n.textureFloatLinear||a===M.PixelDatatype.HALF_FLOAT&&!n.textureHalfFloatLinear)&&(t=u?_.NEAREST_MIPMAP_NEAREST:_.NEAREST,i=c.NEAREST),n.webgl2&&M.PixelFormat.isDepthFormat(r)&&(t=_.NEAREST,i=c.NEAREST);var o=n._gl,s=this._textureTarget;o.activeTexture(o.TEXTURE0),o.bindTexture(s,this._texture),o.texParameteri(s,o.TEXTURE_MIN_FILTER,t),o.texParameteri(s,o.TEXTURE_MAG_FILTER,i),o.texParameteri(s,o.TEXTURE_WRAP_S,e.wrapS),o.texParameteri(s,o.TEXTURE_WRAP_T,e.wrapT),I.defined(this._textureFilterAnisotropic)&&o.texParameteri(s,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),o.bindTexture(s,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),g.prototype.copyFrom=function(e,t,i){t=I.defaultValue(t,0),i=I.defaultValue(i,0);var n=this._context,r=n._gl,a=this._textureTarget;r.activeTexture(r.TEXTURE0),r.bindTexture(a,this._texture);var u=e.width,o=e.height,s=e.arrayBufferView,d=this._width,m=this._height,l=this._internalFormat,f=this._pixelFormat,h=this._pixelDatatype,c=this._preMultiplyAlpha,x=this._flipY,_=4;I.defined(s)&&(_=M.PixelFormat.alignmentInBytes(f,h,u)),r.pixelStorei(r.UNPACK_ALIGNMENT,_);var p,y=!1;this._initialized||(0===t&&0===i&&u===d&&o===m?(I.defined(s)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),x&&(s=M.PixelFormat.flipY(s,f,h,d,m)),r.texImage2D(a,0,l,d,m,0,f,M.PixelDatatype.toWebGLConstant(h,n),s)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,x),r.texImage2D(a,0,l,f,M.PixelDatatype.toWebGLConstant(h,n),e)),y=!0):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),p=M.PixelFormat.createTypedArray(f,h,d,m),r.texImage2D(a,0,l,d,m,0,f,M.PixelDatatype.toWebGLConstant(h,n),p)),this._initialized=!0),y||(I.defined(s)?(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,!1),x&&(s=M.PixelFormat.flipY(s,f,h,u,o)),r.texSubImage2D(a,0,t,i,u,o,f,M.PixelDatatype.toWebGLConstant(h,n),s)):(r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,c),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,x),r.texSubImage2D(a,0,t,i,f,M.PixelDatatype.toWebGLConstant(h,n),e))),r.bindTexture(a,null)},g.prototype.copyFromFramebuffer=function(e,t,i,n,r,a){e=I.defaultValue(e,0),t=I.defaultValue(t,0),i=I.defaultValue(i,0),n=I.defaultValue(n,0),r=I.defaultValue(r,this._width),a=I.defaultValue(a,this._height);var u=this._context._gl,o=this._textureTarget;u.activeTexture(u.TEXTURE0),u.bindTexture(o,this._texture),u.copyTexSubImage2D(o,0,e,t,i,n,r,a),u.bindTexture(o,null),this._initialized=!0},g.prototype.generateMipmap=function(e){e=I.defaultValue(e,f.DONT_CARE),this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},g.prototype.isDestroyed=function(){return!1};g.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),function(e){function t(){}for(var i in e)"function"==typeof e[i]&&(e[i]=t);e.isDestroyed=d}(this)},(new Date).getTime(),(new Date).getTime();var A={x:6378137,y:6378137,z:6356752.314140356};function z(e,t,i){this.x=I.defaultValue(e,0),this.y=I.defaultValue(t,0),this.z=I.defaultValue(i,0)}z.fromSpherical=function(e,t){I.defined(t)||(t=new z);var i=e.clock,n=e.cone,r=I.defaultValue(e.magnitude,1),a=r*Math.sin(n);return t.x=a*Math.cos(i),t.y=a*Math.sin(i),t.z=r*Math.cos(n),t},z.fromElements=function(e,t,i,n){return I.defined(n)?(n.x=e,n.y=t,n.z=i,n):new z(e,t,i)},z.fromCartesian4=z.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new z(e.x,e.y,e.z)},z.packedLength=3,z.pack=function(e,t,i){return i=I.defaultValue(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},z.unpack=function(e,t,i){return t=I.defaultValue(t,0),I.defined(i)||(i=new z),i.x=e[t++],i.y=e[t++],i.z=e[t],i},z.packArray=function(e,t){var i=e.length,n=3*i;if(I.defined(t)){if(!Array.isArray(t)&&t.length!==n)throw new a.DeveloperError("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==n&&(t.length=n)}else t=new Array(n);for(var r=0;r<i;++r)z.pack(e[r],t,3*r);return t},z.unpackArray=function(e,t){var i=e.length;I.defined(t)?t.length=i/3:t=new Array(i/3);for(var n=0;n<i;n+=3){var r=n/3;t[r]=z.unpack(e,n,t[r])}return t},z.fromArray=z.unpack,z.maximumComponent=function(e){return Math.max(e.x,e.y,e.z)},z.minimumComponent=function(e){return Math.min(e.x,e.y,e.z)},z.minimumByComponent=function(e,t,i){return i.x=Math.min(e.x,t.x),i.y=Math.min(e.y,t.y),i.z=Math.min(e.z,t.z),i},z.maximumByComponent=function(e,t,i){return i.x=Math.max(e.x,t.x),i.y=Math.max(e.y,t.y),i.z=Math.max(e.z,t.z),i},z.magnitudeSquared=function(e){return e.x*e.x+e.y*e.y+e.z*e.z},z.magnitude=function(e){return Math.sqrt(z.magnitudeSquared(e))};var P=new z;z.distance=function(e,t){return z.subtract(e,t,P),z.magnitude(P)},z.distanceSquared=function(e,t){return z.subtract(e,t,P),z.magnitudeSquared(P)},z.normalize=function(e,t){var i=z.magnitude(e);return t.x=e.x/i,t.y=e.y/i,t.z=e.z/i,t},z.dot=function(e,t){return e.x*t.x+e.y*t.y+e.z*t.z},z.multiplyComponents=function(e,t,i){return i.x=e.x*t.x,i.y=e.y*t.y,i.z=e.z*t.z,i},z.divideComponents=function(e,t,i){return i.x=e.x/t.x,i.y=e.y/t.y,i.z=e.z/t.z,i},z.add=function(e,t,i){return i.x=e.x+t.x,i.y=e.y+t.y,i.z=e.z+t.z,i},z.subtract=function(e,t,i){return i.x=e.x-t.x,i.y=e.y-t.y,i.z=e.z-t.z,i},z.multiplyByScalar=function(e,t,i){return i.x=e.x*t,i.y=e.y*t,i.z=e.z*t,i},z.divideByScalar=function(e,t,i){return i.x=e.x/t,i.y=e.y/t,i.z=e.z/t,i},z.negate=function(e,t){return t.x=-e.x,t.y=-e.y,t.z=-e.z,t},z.abs=function(e,t){return t.x=Math.abs(e.x),t.y=Math.abs(e.y),t.z=Math.abs(e.z),t};var w=new z;z.lerp=function(e,t,i,n){return z.multiplyByScalar(t,i,w),n=z.multiplyByScalar(e,1-i,n),z.add(w,n,n)};var S=new z,C=new z;z.angleBetween=function(e,t){z.normalize(e,S),z.normalize(t,C);var i=z.dot(S,C),n=z.magnitude(z.cross(S,C,S));return Math.atan2(n,i)};var R=new z;z.mostOrthogonalAxis=function(e,t){var i=z.normalize(e,R);return z.abs(i,i),t=i.x<=i.y?i.x<=i.z?z.clone(z.UNIT_X,t):z.clone(z.UNIT_Z,t):i.y<=i.z?z.clone(z.UNIT_Y,t):z.clone(z.UNIT_Z,t)},z.projectVector=function(e,t,i){var n=z.dot(e,t)/z.dot(t,t);return z.multiplyByScalar(t,n,i)},z.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z},z.equalsArray=function(e,t,i){return e.x===t[i]&&e.y===t[i+1]&&e.z===t[i+2]},z.equalsEpsilon=function(e,t,i,n){return e===t||I.defined(e)&&I.defined(t)&&L.CesiumMath.equalsEpsilon(e.x,t.x,i,n)&&L.CesiumMath.equalsEpsilon(e.y,t.y,i,n)&&L.CesiumMath.equalsEpsilon(e.z,t.z,i,n)},z.cross=function(e,t,i){var n=e.x,r=e.y,a=e.z,u=t.x,o=t.y,s=t.z,d=r*s-a*o,m=a*u-n*s,l=n*o-r*u;return i.x=d,i.y=m,i.z=l,i},z.midpoint=function(e,t,i){return i.x=.5*(e.x+t.x),i.y=.5*(e.y+t.y),i.z=.5*(e.z+t.z),i},z.fromDegrees=function(e,t,i,n,r){return e=L.CesiumMath.toRadians(e),t=L.CesiumMath.toRadians(t),z.fromRadians(e,t,i,n,r)};var v=new z,N=new z,b=new z(A.x*A.x,A.y*A.y,A.z*A.z);z.fromRadians=function(e,t,i,n,r){i=I.defaultValue(i,0);var a=I.defined(n)?n.radiiSquared:b,u=Math.cos(t);v.x=u*Math.cos(e),v.y=u*Math.sin(e),v.z=Math.sin(t),v=z.normalize(v,v),z.multiplyComponents(a,v,N);var o=Math.sqrt(z.dot(v,N));return N=z.divideByScalar(N,o,N),v=z.multiplyByScalar(v,i,v),I.defined(r)||(r=new z),z.add(N,v,r)},z.fromDegreesArray=function(e,t,i){var n=e.length;I.defined(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var a=e[r],u=e[r+1],o=r/2;i[o]=z.fromDegrees(a,u,0,t,i[o])}return i},z.fromRadiansArray=function(e,t,i){var n=e.length;I.defined(i)?i.length=n/2:i=new Array(n/2);for(var r=0;r<n;r+=2){var a=e[r],u=e[r+1],o=r/2;i[o]=z.fromRadians(a,u,0,t,i[o])}return i},z.fromDegreesArrayHeights=function(e,t,i){var n=e.length;I.defined(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var a=e[r],u=e[r+1],o=e[r+2],s=r/3;i[s]=z.fromDegrees(a,u,o,t,i[s])}return i},z.fromRadiansArrayHeights=function(e,t,i){var n=e.length;I.defined(i)?i.length=n/3:i=new Array(n/3);for(var r=0;r<n;r+=3){var a=e[r],u=e[r+1],o=e[r+2],s=r/3;i[s]=z.fromRadians(a,u,o,t,i[s])}return i},z.ZERO=Object.freeze(new z(0,0,0)),z.UNIT_X=Object.freeze(new z(1,0,0)),z.UNIT_Y=Object.freeze(new z(0,1,0)),z.UNIT_Z=Object.freeze(new z(0,0,1)),z.prototype.clone=function(e){return z.clone(this,e)},z.prototype.equals=function(e){return z.equals(this,e)},z.prototype.equalsEpsilon=function(e,t,i){return z.equalsEpsilon(this,e,t,i)},z.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};var V=new z,O=new z;function F(e,t,i,n,r){var a=e.x,u=e.y,o=e.z,s=t.x,d=t.y,m=t.z,l=a*a*s*s,f=u*u*d*d,h=o*o*m*m,c=l+f+h,x=Math.sqrt(1/c),_=z.multiplyByScalar(e,x,V);if(c<n)return isFinite(x)?z.clone(_,r):void 0;var p=i.x,y=i.y,g=i.z,A=O;A.x=_.x*p*2,A.y=_.y*y*2,A.z=_.z*g*2;var M,E,T,P,w,S,C,R=(1-x)*z.magnitude(e)/(.5*z.magnitude(A)),v=0;do{v=(M=l*(w=(E=1/(1+(R-=v)*p))*E)+f*(S=(T=1/(1+R*y))*T)+h*(C=(P=1/(1+R*g))*P)-1)/(-2*(l*(w*E)*p+f*(S*T)*y+h*(C*P)*g))}while(Math.abs(M)>L.CesiumMath.EPSILON12);return I.defined(r)?(r.x=a*E,r.y=u*T,r.z=o*P,r):new z(a*E,u*T,o*P)}function q(e,t,i){this.longitude=I.defaultValue(e,0),this.latitude=I.defaultValue(t,0),this.height=I.defaultValue(i,0)}q.fromRadians=function(e,t,i,n){return i=I.defaultValue(i,0),I.defined(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new q(e,t,i)},q.fromDegrees=function(e,t,i,n){return e=L.CesiumMath.toRadians(e),t=L.CesiumMath.toRadians(t),q.fromRadians(e,t,i,n)};var U=new z,W=new z,D=new z,B=new z(1/A.x,1/A.y,1/A.z),G=new z(1/(A.x*A.x),1/(A.y*A.y),1/(A.z*A.z)),X=L.CesiumMath.EPSILON1;function Y(e,t,i,n){t=I.defaultValue(t,0),i=I.defaultValue(i,0),n=I.defaultValue(n,0),e._radii=new z(t,i,n),e._radiiSquared=new z(t*t,i*i,n*n),e._radiiToTheFourth=new z(t*t*t*t,i*i*i*i,n*n*n*n),e._oneOverRadii=new z(0===t?0:1/t,0===i?0:1/i,0===n?0:1/n),e._oneOverRadiiSquared=new z(0===t?0:1/(t*t),0===i?0:1/(i*i),0===n?0:1/(n*n)),e._minimumRadius=Math.min(t,i,n),e._maximumRadius=Math.max(t,i,n),e._centerToleranceSquared=L.CesiumMath.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function k(e,t,i){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._squaredXOverSquaredZ=void 0,Y(this,e,t,i)}q.fromCartesian=function(e,t,i){var n=I.defined(t)?t.oneOverRadii:B,r=I.defined(t)?t.oneOverRadiiSquared:G,a=F(e,n,r,I.defined(t)?t._centerToleranceSquared:X,W);if(I.defined(a)){var u=z.multiplyComponents(a,r,U),u=z.normalize(u,u),o=z.subtract(e,a,D),s=Math.atan2(u.y,u.x),d=Math.asin(u.z),m=L.CesiumMath.sign(z.dot(o,e))*z.magnitude(o);return I.defined(i)?(i.longitude=s,i.latitude=d,i.height=m,i):new q(s,d,m)}},q.toCartesian=function(e,t,i){return z.fromRadians(e.longitude,e.latitude,e.height,t,i)},q.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new q(e.longitude,e.latitude,e.height)},q.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},q.equalsEpsilon=function(e,t,i){return i=I.defaultValue(i,0),e===t||I.defined(e)&&I.defined(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},q.ZERO=Object.freeze(new q(0,0,0)),q.prototype.clone=function(e){return q.clone(this,e)},q.prototype.equals=function(e){return q.equals(this,e)},q.prototype.equalsEpsilon=function(e,t){return q.equalsEpsilon(this,e,t)},q.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},Object.defineProperties(k.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}}}),k.clone=function(e,t){if(I.defined(e)){var i=e._radii;return I.defined(t)?(z.clone(i,t._radii),z.clone(e._radiiSquared,t._radiiSquared),z.clone(e._radiiToTheFourth,t._radiiToTheFourth),z.clone(e._oneOverRadii,t._oneOverRadii),z.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new k(i.x,i.y,i.z)}},k.fromCartesian3=function(e,t){return I.defined(t)||(t=new k),I.defined(e)&&Y(t,e.x,e.y,e.z),t},k.WGS84=Object.freeze(new k(A.x,A.y,A.z)),k.UNIT_SPHERE=Object.freeze(new k(1,1,1)),k.MOON=Object.freeze(new k(L.CesiumMath.LUNAR_RADIUS,L.CesiumMath.LUNAR_RADIUS,L.CesiumMath.LUNAR_RADIUS)),k.prototype.clone=function(e){return k.clone(this,e)},k.packedLength=z.packedLength,k.pack=function(e,t,i){return i=I.defaultValue(i,0),z.pack(e._radii,t,i),t},k.unpack=function(e,t,i){t=I.defaultValue(t,0);var n=z.unpack(e,t);return k.fromCartesian3(n,i)},k.prototype.geocentricSurfaceNormal=z.normalize,k.prototype.geodeticSurfaceNormalCartographic=function(e,t){var i=e.longitude,n=e.latitude,r=Math.cos(n),a=r*Math.cos(i),u=r*Math.sin(i),o=Math.sin(n);return I.defined(t)||(t=new z),t.x=a,t.y=u,t.z=o,z.normalize(t,t)},k.prototype.geodeticSurfaceNormal=function(e,t){if(!z.equalsEpsilon(e,z.ZERO,L.CesiumMath.EPSILON14))return I.defined(t)||(t=new z),t=z.multiplyComponents(e,this._oneOverRadiiSquared,t),z.normalize(t,t)};var j=new z,H=new z;k.prototype.cartographicToCartesian=function(e,t){var i=j,n=H;this.geodeticSurfaceNormalCartographic(e,i),z.multiplyComponents(this._radiiSquared,i,n);var r=Math.sqrt(z.dot(i,n));return z.divideByScalar(n,r,n),z.multiplyByScalar(i,e.height,i),I.defined(t)||(t=new z),z.add(n,i,t)},k.prototype.cartographicArrayToCartesianArray=function(e,t){var i=e.length;I.defined(t)?t.length=i:t=new Array(i);for(var n=0;n<i;n++)t[n]=this.cartographicToCartesian(e[n],t[n]);return t};var K=new z,Z=new z,J=new z;k.prototype.cartesianToCartographic=function(e,t){var i=this.scaleToGeodeticSurface(e,Z);if(I.defined(i)){var n=this.geodeticSurfaceNormal(i,K),r=z.subtract(e,i,J),a=Math.atan2(n.y,n.x),u=Math.asin(n.z),o=L.CesiumMath.sign(z.dot(r,e))*z.magnitude(r);return I.defined(t)?(t.longitude=a,t.latitude=u,t.height=o,t):new q(a,u,o)}},k.prototype.cartesianArrayToCartographicArray=function(e,t){var i=e.length;I.defined(t)?t.length=i:t=new Array(i);for(var n=0;n<i;++n)t[n]=this.cartesianToCartographic(e[n],t[n]);return t},k.prototype.scaleToGeodeticSurface=function(e,t){return F(e,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,t)},k.prototype.scaleToGeocentricSurface=function(e,t){I.defined(t)||(t=new z);var i=e.x,n=e.y,r=e.z,a=this._oneOverRadiiSquared,u=1/Math.sqrt(i*i*a.x+n*n*a.y+r*r*a.z);return z.multiplyByScalar(e,u,t)},k.prototype.transformPositionToScaledSpace=function(e,t){return I.defined(t)||(t=new z),z.multiplyComponents(e,this._oneOverRadii,t)},k.prototype.transformPositionFromScaledSpace=function(e,t){return I.defined(t)||(t=new z),z.multiplyComponents(e,this._radii,t)},k.prototype.equals=function(e){return this===e||I.defined(e)&&z.equals(this._radii,e._radii)},k.prototype.toString=function(){return this._radii.toString()},k.prototype.getSurfaceNormalIntersectionWithZAxis=function(e,t,i){t=I.defaultValue(t,0);var n=this._squaredXOverSquaredZ;if(I.defined(i)||(i=new z),i.x=0,i.y=0,i.z=e.z*(1-n),!(Math.abs(i.z)>=this._radii.z-t))return i};var Q=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],$=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function ee(e,t,i){for(var n=.5*(t+e),r=.5*(t-e),a=0,u=0;u<5;u++){var o=r*Q[u];a+=$[u]*(i(n+o)+i(n-o))}return a*=r}function te(e,t,i,n){this.west=I.defaultValue(e,0),this.south=I.defaultValue(t,0),this.east=I.defaultValue(i,0),this.north=I.defaultValue(n,0)}k.prototype.surfaceArea=function(e){for(var t=e.west,i=e.east,n=e.south,r=e.north;i<t;)i+=L.CesiumMath.TWO_PI;var a=this._radiiSquared,u=a.x,o=a.y,s=a.z,d=u*o;return ee(n,r,function(e){var n=Math.cos(e),r=Math.sin(e);return Math.cos(e)*ee(t,i,function(e){var t=Math.cos(e),i=Math.sin(e);return Math.sqrt(d*r*r+s*(o*t*t+u*i*i)*n*n)})})},Object.defineProperties(te.prototype,{width:{get:function(){return te.computeWidth(this)}},height:{get:function(){return te.computeHeight(this)}}}),te.packedLength=4,te.pack=function(e,t,i){return i=I.defaultValue(i,0),t[i++]=e.west,t[i++]=e.south,t[i++]=e.east,t[i]=e.north,t},te.unpack=function(e,t,i){return t=I.defaultValue(t,0),I.defined(i)||(i=new te),i.west=e[t++],i.south=e[t++],i.east=e[t++],i.north=e[t],i},te.computeWidth=function(e){var t=e.east,i=e.west;return t<i&&(t+=L.CesiumMath.TWO_PI),t-i},te.computeHeight=function(e){return e.north-e.south},te.fromDegrees=function(e,t,i,n,r){return e=L.CesiumMath.toRadians(I.defaultValue(e,0)),t=L.CesiumMath.toRadians(I.defaultValue(t,0)),i=L.CesiumMath.toRadians(I.defaultValue(i,0)),n=L.CesiumMath.toRadians(I.defaultValue(n,0)),I.defined(r)?(r.west=e,r.south=t,r.east=i,r.north=n,r):new te(e,t,i,n)},te.fromRadians=function(e,t,i,n,r){return I.defined(r)?(r.west=I.defaultValue(e,0),r.south=I.defaultValue(t,0),r.east=I.defaultValue(i,0),r.north=I.defaultValue(n,0),r):new te(e,t,i,n)},te.fromCartographicArray=function(e,t){for(var i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,u=Number.MAX_VALUE,o=-Number.MAX_VALUE,s=0,d=e.length;s<d;s++)var m=e[s],i=Math.min(i,m.longitude),n=Math.max(n,m.longitude),u=Math.min(u,m.latitude),o=Math.max(o,m.latitude),l=0<=m.longitude?m.longitude:m.longitude+L.CesiumMath.TWO_PI,r=Math.min(r,l),a=Math.max(a,l);return a-r<n-i&&(i=r,(n=a)>L.CesiumMath.PI&&(n-=L.CesiumMath.TWO_PI),i>L.CesiumMath.PI&&(i-=L.CesiumMath.TWO_PI)),I.defined(t)?(t.west=i,t.south=u,t.east=n,t.north=o,t):new te(i,u,n,o)},te.fromCartesianArray=function(e,t,i){t=I.defaultValue(t,k.WGS84);for(var n=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,u=-Number.MAX_VALUE,o=Number.MAX_VALUE,s=-Number.MAX_VALUE,d=0,m=e.length;d<m;d++)var l=t.cartesianToCartographic(e[d]),n=Math.min(n,l.longitude),r=Math.max(r,l.longitude),o=Math.min(o,l.latitude),s=Math.max(s,l.latitude),f=0<=l.longitude?l.longitude:l.longitude+L.CesiumMath.TWO_PI,a=Math.min(a,f),u=Math.max(u,f);return u-a<r-n&&(n=a,(r=u)>L.CesiumMath.PI&&(r-=L.CesiumMath.TWO_PI),n>L.CesiumMath.PI&&(n-=L.CesiumMath.TWO_PI)),I.defined(i)?(i.west=n,i.south=o,i.east=r,i.north=s,i):new te(n,o,r,s)},te.clone=function(e,t){if(I.defined(e))return I.defined(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new te(e.west,e.south,e.east,e.north)},te.equalsEpsilon=function(e,t,i){return i=I.defaultValue(i,0),e===t||I.defined(e)&&I.defined(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},te.prototype.clone=function(e){return te.clone(this,e)},te.prototype.equals=function(e){return te.equals(this,e)},te.equals=function(e,t){return e===t||I.defined(e)&&I.defined(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},te.prototype.equalsEpsilon=function(e,t){return te.equalsEpsilon(this,e,t)},te.validate=function(e){},te.southwest=function(e,t){return I.defined(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new q(e.west,e.south)},te.northwest=function(e,t){return I.defined(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new q(e.west,e.north)},te.northeast=function(e,t){return I.defined(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new q(e.east,e.north)},te.southeast=function(e,t){return I.defined(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new q(e.east,e.south)},te.center=function(e,t){var i=e.east,n=e.west;i<n&&(i+=L.CesiumMath.TWO_PI);var r=L.CesiumMath.negativePiToPi(.5*(n+i)),a=.5*(e.south+e.north);return I.defined(t)?(t.longitude=r,t.latitude=a,t.height=0,t):new q(r,a)},te.intersection=function(e,t,i){var n=e.east,r=e.west,a=t.east,u=t.west;n<r&&0<a?n+=L.CesiumMath.TWO_PI:a<u&&0<n&&(a+=L.CesiumMath.TWO_PI),n<r&&u<0?u+=L.CesiumMath.TWO_PI:a<u&&r<0&&(r+=L.CesiumMath.TWO_PI);var o=L.CesiumMath.negativePiToPi(Math.max(r,u)),s=L.CesiumMath.negativePiToPi(Math.min(n,a));if(!((e.west<e.east||t.west<t.east)&&s<=o)){var d=Math.max(e.south,t.south),m=Math.min(e.north,t.north);if(!(m<=d))return I.defined(i)?(i.west=o,i.south=d,i.east=s,i.north=m,i):new te(o,d,s,m)}},te.simpleIntersection=function(e,t,i){var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),a=Math.min(e.east,t.east),u=Math.min(e.north,t.north);if(!(u<=r||a<=n))return I.defined(i)?(i.west=n,i.south=r,i.east=a,i.north=u,i):new te(n,r,a,u)},te.union=function(e,t,i){I.defined(i)||(i=new te);var n=e.east,r=e.west,a=t.east,u=t.west;n<r&&0<a?n+=L.CesiumMath.TWO_PI:a<u&&0<n&&(a+=L.CesiumMath.TWO_PI),n<r&&u<0?u+=L.CesiumMath.TWO_PI:a<u&&r<0&&(r+=L.CesiumMath.TWO_PI);var o=L.CesiumMath.convertLongitudeRange(Math.min(r,u)),s=L.CesiumMath.convertLongitudeRange(Math.max(n,a));return i.west=o,i.south=Math.min(e.south,t.south),i.east=s,i.north=Math.max(e.north,t.north),i},te.expand=function(e,t,i){return I.defined(i)||(i=new te),i.west=Math.min(e.west,t.longitude),i.south=Math.min(e.south,t.latitude),i.east=Math.max(e.east,t.longitude),i.north=Math.max(e.north,t.latitude),i},te.contains=function(e,t){var i=t.longitude,n=t.latitude,r=e.west,a=e.east;return a<r&&(a+=L.CesiumMath.TWO_PI,i<0&&(i+=L.CesiumMath.TWO_PI)),(r<i||L.CesiumMath.equalsEpsilon(i,r,L.CesiumMath.EPSILON14))&&(i<a||L.CesiumMath.equalsEpsilon(i,a,L.CesiumMath.EPSILON14))&&n>=e.south&&n<=e.north};var ie=new q;te.subsample=function(e,t,i,n){t=I.defaultValue(t,k.WGS84),i=I.defaultValue(i,0),I.defined(n)||(n=[]);var r=0,a=e.north,u=e.south,o=e.east,s=e.west,d=ie;d.height=i,d.longitude=s,d.latitude=a,n[r]=t.cartographicToCartesian(d,n[r]),r++,d.longitude=o,n[r]=t.cartographicToCartesian(d,n[r]),r++,d.latitude=u,n[r]=t.cartographicToCartesian(d,n[r]),r++,d.longitude=s,n[r]=t.cartographicToCartesian(d,n[r]),r++,d.latitude=a<0?a:0<u?u:0;for(var m=1;m<8;++m)d.longitude=-Math.PI+m*L.CesiumMath.PI_OVER_TWO,te.contains(e,d)&&(n[r]=t.cartographicToCartesian(d,n[r]),r++);return 0===d.latitude&&(d.longitude=s,n[r]=t.cartographicToCartesian(d,n[r]),r++,d.longitude=o,n[r]=t.cartographicToCartesian(d,n[r]),r++),n.length=r,n},te.MAX_VALUE=Object.freeze(new te(-Math.PI,-L.CesiumMath.PI_OVER_TWO,Math.PI,L.CesiumMath.PI_OVER_TWO)),e.Cartesian2=E,e.Cartesian3=z,e.Cartographic=q,e.Ellipsoid=k,e.Rectangle=te,e.clone=u});