/** * @license * Cesium - https://github.com/CesiumGS/cesium * Version 1.121.1 * * Copyright 2011-2022 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/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details. */ import{a as w}from"./chunk-HJACR6CT.js";import{a as O}from"./chunk-XK5OJOFF.js";import{a as S,b as c}from"./chunk-YLNT2FRE.js";import{e as u}from"./chunk-PIOASIZ6.js";function f(n,e,o){this.x=O(n,0),this.y=O(e,0),this.z=O(o,0)}f.fromSpherical=function(n,e){c.typeOf.object("spherical",n),u(e)||(e=new f);let o=n.clock,t=n.cone,i=O(n.magnitude,1),p=i*Math.sin(t);return e.x=p*Math.cos(o),e.y=p*Math.sin(o),e.z=i*Math.cos(t),e};f.fromElements=function(n,e,o,t){return u(t)?(t.x=n,t.y=e,t.z=o,t):new f(n,e,o)};f.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e.z=n.z,e):new f(n.x,n.y,n.z)};f.fromCartesian4=f.clone;f.packedLength=3;f.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=O(o,0),e[o++]=n.x,e[o++]=n.y,e[o]=n.z,e};f.unpack=function(n,e,o){return c.defined("array",n),e=O(e,0),u(o)||(o=new f),o.x=n[e++],o.y=n[e++],o.z=n[e],o};f.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*3;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new S("If result is a typed array, it must have exactly array.length * 3 elements");e.length!==t&&(e.length=t)}for(let i=0;iw.EPSILON12);return u(i)?(i.x=p*L,i.y=d*V,i.z=m*W,i):new y(p*L,d*V,m*W)}var H=Hn;function g(n,e,o){this.longitude=O(n,0),this.latitude=O(e,0),this.height=O(o,0)}g.fromRadians=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=O(o,0),u(t)?(t.longitude=n,t.latitude=e,t.height=o,t):new g(n,e,o)};g.fromDegrees=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=w.toRadians(n),e=w.toRadians(e),g.fromRadians(n,e,o,t)};var Qn=new y,Kn=new y,Jn=new y;g._ellipsoidOneOverRadii=new y(1/6378137,1/6378137,1/6356752314245179e-9);g._ellipsoidOneOverRadiiSquared=new y(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));g._ellipsoidCenterToleranceSquared=w.EPSILON1;g.fromCartesian=function(n,e,o){let t=u(e)?e.oneOverRadii:g._ellipsoidOneOverRadii,i=u(e)?e.oneOverRadiiSquared:g._ellipsoidOneOverRadiiSquared,p=u(e)?e._centerToleranceSquared:g._ellipsoidCenterToleranceSquared,d=H(n,t,i,p,Kn);if(!u(d))return;let m=y.multiplyComponents(d,i,Qn);m=y.normalize(m,m);let s=y.subtract(n,d,Jn),h=Math.atan2(m.y,m.x),j=Math.asin(m.z),z=w.sign(y.dot(s,n))*y.magnitude(s);return u(o)?(o.longitude=h,o.latitude=j,o.height=z,o):new g(h,j,z)};g.toCartesian=function(n,e,o){return c.defined("cartographic",n),y.fromRadians(n.longitude,n.latitude,n.height,e,o)};g.clone=function(n,e){if(u(n))return u(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new g(n.longitude,n.latitude,n.height)};g.equals=function(n,e){return n===e||u(n)&&u(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};g.equalsEpsilon=function(n,e,o){return o=O(o,0),n===e||u(n)&&u(e)&&Math.abs(n.longitude-e.longitude)<=o&&Math.abs(n.latitude-e.latitude)<=o&&Math.abs(n.height-e.height)<=o};g.ZERO=Object.freeze(new g(0,0,0));g.prototype.clone=function(n){return g.clone(this,n)};g.prototype.equals=function(n){return g.equals(this,n)};g.prototype.equalsEpsilon=function(n,e){return g.equalsEpsilon(this,n,e)};g.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var D=g;function a(n,e){this.x=O(n,0),this.y=O(e,0)}a.fromElements=function(n,e,o){return u(o)?(o.x=n,o.y=e,o):new a(n,e)};a.clone=function(n,e){if(u(n))return u(e)?(e.x=n.x,e.y=n.y,e):new a(n.x,n.y)};a.fromCartesian3=a.clone;a.fromCartesian4=a.clone;a.packedLength=2;a.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=O(o,0),e[o++]=n.x,e[o]=n.y,e};a.unpack=function(n,e,o){return c.defined("array",n),e=O(e,0),u(o)||(o=new a),o.x=n[e++],o.y=n[e],o};a.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*2;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new S("If result is a typed array, it must have exactly array.length * 2 elements");e.length!==t&&(e.length=t)}for(let i=0;i=this._radii.z-e))return o};var fe=new y;b.prototype.getLocalCurvature=function(n,e){c.typeOf.object("surfacePosition",n),u(e)||(e=new mn);let o=this.getSurfaceNormalIntersectionWithZAxis(n,0,fe),t=y.distance(n,o),i=this.minimumRadius*t/this.maximumRadius**2,p=t*i**2;return mn.fromElements(1/t,1/p,e)};var re=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],pe=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function xn(n,e,o){c.typeOf.number("a",n),c.typeOf.number("b",e),c.typeOf.func("func",o);let t=.5*(e+n),i=.5*(e-n),p=0;for(let d=0;d<5;d++){let m=i*re[d];p+=pe[d]*(o(t+m)+o(t-m))}return p*=i,p}b.prototype.surfaceArea=function(n){c.typeOf.object("rectangle",n);let e=n.west,o=n.east,t=n.south,i=n.north;for(;ot&&(i=h,t=j)}let p=1,d=0,m=On[i],s=bn[i];if(Math.abs(n[r.getElementIndex(s,m)])>o){let h=n[r.getElementIndex(s,s)],j=n[r.getElementIndex(m,m)],z=n[r.getElementIndex(s,m)],M=(h-j)/2/z,q;M<0?q=-1/(-M+Math.sqrt(1+M*M)):q=1/(M+Math.sqrt(1+M*M)),p=1/Math.sqrt(1+q*q),d=q*p}return e=r.clone(r.IDENTITY,e),e[r.getElementIndex(m,m)]=e[r.getElementIndex(s,s)]=p,e[r.getElementIndex(s,m)]=d,e[r.getElementIndex(m,s)]=-d,e}var K=new r,Bn=new r;r.computeEigenDecomposition=function(n,e){c.typeOf.object("matrix",n);let o=w.EPSILON20,t=10,i=0,p=0;u(e)||(e={});let d=e.unitary=r.clone(r.IDENTITY,e.unitary),m=e.diagonal=r.clone(n,e.diagonal),s=o*me(m);for(;ps;)Oe(m,K),r.transpose(K,Bn),r.multiply(m,K,m),r.multiply(Bn,m,m),r.multiply(d,K,d),++i>2&&(++p,i=0);return e};r.abs=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=Math.abs(n[0]),e[1]=Math.abs(n[1]),e[2]=Math.abs(n[2]),e[3]=Math.abs(n[3]),e[4]=Math.abs(n[4]),e[5]=Math.abs(n[5]),e[6]=Math.abs(n[6]),e[7]=Math.abs(n[7]),e[8]=Math.abs(n[8]),e};r.determinant=function(n){c.typeOf.object("matrix",n);let e=n[0],o=n[3],t=n[6],i=n[1],p=n[4],d=n[7],m=n[2],s=n[5],h=n[8];return e*(p*h-s*d)+i*(s*t-o*h)+m*(o*d-p*t)};r.inverse=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[1],i=n[2],p=n[3],d=n[4],m=n[5],s=n[6],h=n[7],j=n[8],z=r.determinant(n);if(Math.abs(z)<=w.EPSILON15)throw new S("matrix is not invertible");e[0]=d*j-h*m,e[1]=h*i-t*j,e[2]=t*m-d*i,e[3]=s*m-p*j,e[4]=o*j-s*i,e[5]=p*i-o*m,e[6]=p*h-s*d,e[7]=s*t-o*h,e[8]=o*d-p*t;let M=1/z;return r.multiplyByScalar(e,M,e)};var be=new r;r.inverseTranspose=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),r.inverse(r.transpose(n,be),e)};r.equals=function(n,e){return n===e||u(n)&&u(e)&&n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]&&n[4]===e[4]&&n[5]===e[5]&&n[6]===e[6]&&n[7]===e[7]&&n[8]===e[8]};r.equalsEpsilon=function(n,e,o){return o=O(o,0),n===e||u(n)&&u(e)&&Math.abs(n[0]-e[0])<=o&&Math.abs(n[1]-e[1])<=o&&Math.abs(n[2]-e[2])<=o&&Math.abs(n[3]-e[3])<=o&&Math.abs(n[4]-e[4])<=o&&Math.abs(n[5]-e[5])<=o&&Math.abs(n[6]-e[6])<=o&&Math.abs(n[7]-e[7])<=o&&Math.abs(n[8]-e[8])<=o};r.IDENTITY=Object.freeze(new r(1,0,0,0,1,0,0,0,1));r.ZERO=Object.freeze(new r(0,0,0,0,0,0,0,0,0));r.COLUMN0ROW0=0;r.COLUMN0ROW1=1;r.COLUMN0ROW2=2;r.COLUMN1ROW0=3;r.COLUMN1ROW1=4;r.COLUMN1ROW2=5;r.COLUMN2ROW0=6;r.COLUMN2ROW1=7;r.COLUMN2ROW2=8;Object.defineProperties(r.prototype,{length:{get:function(){return r.packedLength}}});r.prototype.clone=function(n){return r.clone(this,n)};r.prototype.equals=function(n){return r.equals(this,n)};r.equalsArray=function(n,e,o){return n[0]===e[o]&&n[1]===e[o+1]&&n[2]===e[o+2]&&n[3]===e[o+3]&&n[4]===e[o+4]&&n[5]===e[o+5]&&n[6]===e[o+6]&&n[7]===e[o+7]&&n[8]===e[o+8]};r.prototype.equalsEpsilon=function(n,e){return r.equalsEpsilon(this,n,e)};r.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]}) (${this[1]}, ${this[4]}, ${this[7]}) (${this[2]}, ${this[5]}, ${this[8]})`};var Oo=r;var F,R={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},_={};Object.defineProperties(_,{element:{get:function(){if(_.supportsFullscreen())return document[R.fullscreenElement]}},changeEventName:{get:function(){if(_.supportsFullscreen())return R.fullscreenchange}},errorEventName:{get:function(){if(_.supportsFullscreen())return R.fullscreenerror}},enabled:{get:function(){if(_.supportsFullscreen())return document[R.fullscreenEnabled]}},fullscreen:{get:function(){if(_.supportsFullscreen())return _.element!==null}}});_.supportsFullscreen=function(){if(u(F))return F;F=!1;let n=document.body;if(typeof n.requestFullscreen=="function")return R.requestFullscreen="requestFullscreen",R.exitFullscreen="exitFullscreen",R.fullscreenEnabled="fullscreenEnabled",R.fullscreenElement="fullscreenElement",R.fullscreenchange="fullscreenchange",R.fullscreenerror="fullscreenerror",F=!0,F;let e=["webkit","moz","o","ms","khtml"],o;for(let t=0,i=e.length;t{let e=new Image;e.onload=function(){E._result=e.width>0&&e.height>0,n(E._result)},e.onerror=function(){E._result=!1,n(E._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),E._promise};Object.defineProperties(E,{initialized:{get:function(){return u(E._result)}}});var $=[];typeof ArrayBuffer<"u"&&($.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&$.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&$.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&$.push(BigInt64Array),typeof BigUint64Array<"u"&&$.push(BigUint64Array));var T={isChrome:zn,chromeVersion:he,isSafari:Ln,safariVersion:we,isWebkit:Vn,webkitVersion:je,isInternetExplorer:Wn,internetExplorerVersion:ge,isEdge:fn,edgeVersion:Se,isFirefox:rn,firefoxVersion:Me,isWindows:ze,isIPadOrIOS:Re,hardwareConcurrency:O(A.hardwareConcurrency,3),supportsPointerEvents:qe,supportsImageRenderingPixelated:Dn,supportsWebP:E,imageRenderingValue:Ee,typedArrayTypes:$};T.supportsBasis=function(n){return T.supportsWebAssembly()&&n.context.supportsBasis};T.supportsFullscreen=function(){return Un.supportsFullscreen()};T.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};T.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};T.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};T.supportsBigInt=function(){return typeof BigInt<"u"};T.supportsWebWorkers=function(){return typeof Worker<"u"};T.supportsWebAssembly=function(){return typeof WebAssembly<"u"};T.supportsWebgl2=function(n){return c.defined("scene",n),n.context.webgl2};T.supportsEsmWebWorkers=function(){return!rn()||parseInt(Rn)>=114};var Mo=T;export{y as a,D as b,mn as c,fo as d,Oo as e,Mo as f};