@pggis/pg-sdk 5.1.15 → 5.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +717 -96
- package/dist/pggis.min.js +5082 -4451
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/resources/Workers/{chunk-AJYK4IVJ.js → chunk-335F4KMR.js} +2 -2
- package/dist/resources/Workers/chunk-3FFM6NRK.js +26 -0
- package/dist/resources/Workers/{chunk-QOUAJ6TL.js → chunk-46IDNOB6.js} +2 -2
- package/dist/resources/Workers/{chunk-IYTZ52EY.js → chunk-4QCIHDA2.js} +2 -2
- package/dist/resources/Workers/{chunk-AU7IKHOH.js → chunk-5EZKANRV.js} +2 -2
- package/dist/resources/Workers/{chunk-7HTKERZY.js → chunk-5GVU4LLW.js} +2 -2
- package/dist/resources/Workers/chunk-6EFYFFBI.js +26 -0
- package/dist/resources/Workers/{chunk-VTBDSFTG.js → chunk-72ENFGTU.js} +2 -2
- package/dist/resources/Workers/{chunk-A56XVLQR.js → chunk-7IBY6LYM.js} +2 -2
- package/dist/resources/Workers/{chunk-ED5JPB3S.js → chunk-7RJW35V3.js} +2 -2
- package/dist/resources/Workers/{chunk-NB3ML6JO.js → chunk-ABHTLV4B.js} +2 -2
- package/dist/resources/Workers/{chunk-D6AA5QVT.js → chunk-AHKBUIAX.js} +2 -2
- package/dist/resources/Workers/{chunk-GBYLG25F.js → chunk-AOSK7NDA.js} +1 -1
- package/dist/resources/Workers/{chunk-J6UP6FLE.js → chunk-ATTMFTQ4.js} +1 -1
- package/dist/resources/Workers/{chunk-DEPHB2WM.js → chunk-BCYX7GBY.js} +2 -2
- package/dist/resources/Workers/{chunk-RCV6KWXS.js → chunk-BDLVVHOG.js} +2 -2
- package/dist/resources/Workers/{chunk-TCGIRNHN.js → chunk-BGQDOF2W.js} +2 -2
- package/dist/resources/Workers/{chunk-5YEWO3HT.js → chunk-BTPJ3H6N.js} +2 -2
- package/dist/resources/Workers/{chunk-PSPPBZWI.js → chunk-DGGIK7AD.js} +3 -3
- package/dist/resources/Workers/{chunk-FEVXJ54I.js → chunk-DSXZVGY7.js} +2 -2
- package/dist/resources/Workers/{chunk-UP6I5URU.js → chunk-F7XR2IV5.js} +2 -2
- package/dist/resources/Workers/{chunk-64RSHJUE.js → chunk-FCVV6A2F.js} +2 -2
- package/dist/resources/Workers/{chunk-VTAIKJXX.js → chunk-GBI3IATP.js} +1 -1
- package/dist/resources/Workers/{chunk-WZDE3RYP.js → chunk-GRCPCORO.js} +2 -2
- package/dist/resources/Workers/{chunk-DMEY62ID.js → chunk-HLFNWOQ4.js} +2 -2
- package/dist/resources/Workers/{chunk-CNCV5UL7.js → chunk-HMV6ETSJ.js} +2 -2
- package/dist/resources/Workers/{chunk-3W4GT7KQ.js → chunk-I3XHKING.js} +2 -2
- package/dist/resources/Workers/{chunk-EZUYS2JF.js → chunk-I7WJS3WM.js} +2 -2
- package/dist/resources/Workers/{chunk-OSW76XDF.js → chunk-JOXXXMPE.js} +1 -1
- package/dist/resources/Workers/{chunk-CYCB63OH.js → chunk-JU23HGY3.js} +2 -2
- package/dist/resources/Workers/{chunk-U4IEOH5K.js → chunk-KORWG3CG.js} +2 -2
- package/dist/resources/Workers/{chunk-WGGIH7QW.js → chunk-KTDI3TD2.js} +2 -2
- package/dist/resources/Workers/{chunk-D6C66QON.js → chunk-LIEFEM73.js} +2 -2
- package/dist/resources/Workers/{chunk-OFUUQVMR.js → chunk-LNFOIPBT.js} +2 -2
- package/dist/resources/Workers/{chunk-G5AGHVVC.js → chunk-N6G72L23.js} +2 -2
- package/dist/resources/Workers/{chunk-VW6VD53G.js → chunk-NU4XOT2V.js} +2 -2
- package/dist/resources/Workers/{chunk-3SSKC3VN.js → chunk-PO64KPKA.js} +2 -2
- package/dist/resources/Workers/{chunk-B4AA3ARO.js → chunk-PQSWZ6QE.js} +2 -2
- package/dist/resources/Workers/{chunk-M3MGYQSL.js → chunk-QGPFMASY.js} +1 -1
- package/dist/resources/Workers/{chunk-DQQ63PYM.js → chunk-QJG5NRTN.js} +2 -2
- package/dist/resources/Workers/{chunk-LEYMRMBK.js → chunk-R3KD5ZAI.js} +2 -2
- package/dist/resources/Workers/{chunk-XRL4AVS5.js → chunk-RQ3X5FSK.js} +2 -2
- package/dist/resources/Workers/{chunk-HMIYSTF6.js → chunk-SNN6UCXM.js} +2 -2
- package/dist/resources/Workers/{chunk-N4VJKXZS.js → chunk-SPVHGWGM.js} +2 -2
- package/dist/resources/Workers/{chunk-WWA5PL4H.js → chunk-SRJEQ4WA.js} +2 -2
- package/dist/resources/Workers/{chunk-4IW2T6GF.js → chunk-VMOPYKP4.js} +2 -2
- package/dist/resources/Workers/{chunk-HWXX4CWK.js → chunk-WNAZRVVU.js} +2 -2
- package/dist/resources/Workers/{chunk-35SHYARM.js → chunk-WQBKKXJC.js} +2 -2
- package/dist/resources/Workers/{chunk-37F5JSTI.js → chunk-Y53SIX6D.js} +2 -2
- package/dist/resources/Workers/{chunk-ARG42DC4.js → chunk-YC4EEWUJ.js} +2 -2
- package/dist/resources/Workers/{chunk-HTFSEEMT.js → chunk-YDUNCXSU.js} +2 -2
- package/dist/resources/Workers/{chunk-GILIDQNQ.js → chunk-YL47XCQ4.js} +2 -2
- package/dist/resources/Workers/combineGeometry.js +2 -2
- package/dist/resources/Workers/createBoxGeometry.js +2 -2
- package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCircleGeometry.js +2 -2
- package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createGeometry.js +2 -2
- package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -2
- package/dist/resources/Workers/createSphereGeometry.js +2 -2
- package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createTaskProcessorWorker.js +2 -2
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -2
- package/dist/resources/Workers/createVectorTileGeometries.js +2 -2
- package/dist/resources/Workers/createVectorTilePoints.js +2 -2
- package/dist/resources/Workers/createVectorTilePolygons.js +2 -2
- package/dist/resources/Workers/createVectorTilePolylines.js +2 -2
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/dist/resources/Workers/createWallGeometry.js +2 -2
- package/dist/resources/Workers/createWallOutlineGeometry.js +2 -2
- package/dist/resources/Workers/decodeDraco.js +2 -2
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/dist/resources/Workers/decodeI3S.js +2 -2
- package/dist/resources/Workers/gaussianSplatSorter.js +2 -2
- package/dist/resources/Workers/gaussianSplatTextureGenerator.js +2 -2
- package/dist/resources/Workers/transcodeKTX2.js +2 -2
- package/dist/resources/Workers/transferTypedArrayTest.js +1 -1
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/package.json +3 -3
- package/dist/resources/Workers/chunk-77IHZJJ3.js +0 -26
- package/dist/resources/Workers/chunk-QN3VOORQ.js +0 -26
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as G}from"./chunk-UP6I5URU.js";import{a as At}from"./chunk-D6AA5QVT.js";import{a as yt}from"./chunk-VW6VD53G.js";import{a as $}from"./chunk-GBYLG25F.js";import{a as v}from"./chunk-CYCB63OH.js";import{a as st}from"./chunk-OFUUQVMR.js";import{a as ht}from"./chunk-A56XVLQR.js";import{b as ct,c as rt,d as F}from"./chunk-RCV6KWXS.js";import{a as lt,d as it}from"./chunk-4IW2T6GF.js";import{f as nt,h as bt}from"./chunk-PSPPBZWI.js";import{a as P}from"./chunk-AU7IKHOH.js";import{a,b as _t,c as Q,d as D,e as C,f as dt}from"./chunk-64RSHJUE.js";import{a as R}from"./chunk-3SSKC3VN.js";import{a as ot,b as k}from"./chunk-LEYMRMBK.js";import{e as Z}from"./chunk-VTAIKJXX.js";var tt=new a,pt=new a,xt=new a,wt=new a,w=new Q,Mt=new C,Vt=new C,gt=new nt,Tt=new a,Nt=new a,Et=new a,ft=new _t,Pt=new a,Ft=new Q,St=new Q;function Ot(o,e,t){let n=e.vertexFormat,s=e.center,i=e.semiMajorAxis,r=e.semiMinorAxis,f=e.ellipsoid,h=e.stRotation,N=t?o.length/3*2:o.length/3,g=e.shadowVolume,c=n.st?new Float32Array(N*2):void 0,l=n.normal?new Float32Array(N*3):void 0,A=n.tangent?new Float32Array(N*3):void 0,x=n.bitangent?new Float32Array(N*3):void 0,S=g?new Float32Array(N*3):void 0,z=0,b=Tt,M=Nt,d=Et,_=new lt(f),I=_.project(f.cartesianToCartographic(s,ft),Pt),W=f.scaleToGeodeticSurface(s,tt);f.geodeticSurfaceNormal(W,W);let J=Mt,U=Vt;if(h!==0){let m=nt.fromAxisAngle(W,h,gt);J=C.fromQuaternion(m,J),m=nt.fromAxisAngle(W,-h,gt),U=C.fromQuaternion(m,U)}else J=C.clone(C.IDENTITY,J),U=C.clone(C.IDENTITY,U);let B=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),q=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),O=o.length,y=t?O:0,p=y/3*2;for(let m=0;m<O;m+=3){let u=m+1,T=m+2,V=a.fromArray(o,m,tt);if(n.st){let E=C.multiplyByVector(J,V,pt),j=_.project(f.cartesianToCartographic(E,ft),xt);a.subtract(j,I,j),w.x=(j.x+i)/(2*i),w.y=(j.y+r)/(2*r),B.x=Math.min(w.x,B.x),B.y=Math.min(w.y,B.y),q.x=Math.max(w.x,q.x),q.y=Math.max(w.y,q.y),t&&(c[z+p]=w.x,c[z+1+p]=w.y),c[z++]=w.x,c[z++]=w.y}(n.normal||n.tangent||n.bitangent||g)&&(b=f.geodeticSurfaceNormal(V,b),g&&(S[m+y]=-b.x,S[u+y]=-b.y,S[T+y]=-b.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(M=a.normalize(a.cross(a.UNIT_Z,b,M),M),C.multiplyByVector(U,M,M)),n.normal&&(l[m]=b.x,l[u]=b.y,l[T]=b.z,t&&(l[m+y]=-b.x,l[u+y]=-b.y,l[T+y]=-b.z)),n.tangent&&(A[m]=M.x,A[u]=M.y,A[T]=M.z,t&&(A[m+y]=-M.x,A[u+y]=-M.y,A[T+y]=-M.z)),n.bitangent&&(d=a.normalize(a.cross(b,M,d),d),x[m]=d.x,x[u]=d.y,x[T]=d.z,t&&(x[m+y]=d.x,x[u+y]=d.y,x[T+y]=d.z))))}if(n.st){O=c.length;for(let m=0;m<O;m+=2)c[m]=(c[m]-B.x)/(q.x-B.x),c[m+1]=(c[m+1]-B.y)/(q.y-B.y)}let L=new ht;if(n.position){let m=G.raisePositionsToHeight(o,e,t);L.position=new F({componentDatatype:P.DOUBLE,componentsPerAttribute:3,values:m})}if(n.st&&(L.st=new F({componentDatatype:P.FLOAT,componentsPerAttribute:2,values:c})),n.normal&&(L.normal=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:l})),n.tangent&&(L.tangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:A})),n.bitangent&&(L.bitangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:x})),g&&(L.extrudeDirection=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:S})),t&&Z(e.offsetAttribute)){let m=new Uint8Array(N);if(e.offsetAttribute===$.TOP)m=m.fill(1,0,N/2);else{let u=e.offsetAttribute===$.NONE?0:1;m=m.fill(u)}L.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return L}function jt(o){let e=new Array(12*(o*(o+1))-6),t=0,n,s,i,r,f;for(n=0,i=1,r=0;r<3;r++)e[t++]=i++,e[t++]=n,e[t++]=i;for(r=2;r<o+1;++r){for(i=r*(r+1)-1,n=(r-1)*r-1,e[t++]=i++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=i++,e[t++]=n,e[t++]=i}for(s=o*2,++i,++n,r=0;r<s-1;++r)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;for(e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n++,e[t++]=n,++n,r=o-1;r>1;--r){for(e[t++]=n++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=n++,e[t++]=n++,e[t++]=i++}for(r=0;r<3;r++)e[t++]=n++,e[t++]=n,e[t++]=i;return e}var K=new a;function Dt(o){let e=o.center;K=a.multiplyByScalar(o.ellipsoid.geodeticSurfaceNormal(e,K),o.height,K),K=a.add(e,K,K);let t=new it(K,o.semiMajorAxis),n=G.computeEllipsePositions(o,!0,!1),s=n.positions,i=n.numPts,r=Ot(s,o,!1),f=jt(i);return f=st.createTypedArray(s.length/3,f),{boundingSphere:t,attributes:r,indices:f}}function vt(o,e){let t=e.vertexFormat,n=e.center,s=e.semiMajorAxis,i=e.semiMinorAxis,r=e.ellipsoid,f=e.height,h=e.extrudedHeight,N=e.stRotation,g=o.length/3*2,c=new Float64Array(g*3),l=t.st?new Float32Array(g*2):void 0,A=t.normal?new Float32Array(g*3):void 0,x=t.tangent?new Float32Array(g*3):void 0,S=t.bitangent?new Float32Array(g*3):void 0,z=e.shadowVolume,b=z?new Float32Array(g*3):void 0,M=0,d=Tt,_=Nt,I=Et,W=new lt(r),J=W.project(r.cartesianToCartographic(n,ft),Pt),U=r.scaleToGeodeticSurface(n,tt);r.geodeticSurfaceNormal(U,U);let B=nt.fromAxisAngle(U,N,gt),q=C.fromQuaternion(B,Mt),O=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),y=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),p=o.length,L=p/3*2;for(let u=0;u<p;u+=3){let T=u+1,V=u+2,E=a.fromArray(o,u,tt),j;if(t.st){let et=C.multiplyByVector(q,E,pt),X=W.project(r.cartesianToCartographic(et,ft),xt);a.subtract(X,J,X),w.x=(X.x+s)/(2*s),w.y=(X.y+i)/(2*i),O.x=Math.min(w.x,O.x),O.y=Math.min(w.y,O.y),y.x=Math.max(w.x,y.x),y.y=Math.max(w.y,y.y),l[M+L]=w.x,l[M+1+L]=w.y,l[M++]=w.x,l[M++]=w.y}E=r.scaleToGeodeticSurface(E,E),j=a.clone(E,pt),d=r.geodeticSurfaceNormal(E,d),z&&(b[u+p]=-d.x,b[T+p]=-d.y,b[V+p]=-d.z);let at=a.multiplyByScalar(d,f,wt);if(E=a.add(E,at,E),at=a.multiplyByScalar(d,h,at),j=a.add(j,at,j),t.position&&(c[u+p]=j.x,c[T+p]=j.y,c[V+p]=j.z,c[u]=E.x,c[T]=E.y,c[V]=E.z),t.normal||t.tangent||t.bitangent){I=a.clone(d,I);let et=a.fromArray(o,(u+3)%p,wt);a.subtract(et,E,et);let X=a.subtract(j,E,xt);d=a.normalize(a.cross(X,et,d),d),t.normal&&(A[u]=d.x,A[T]=d.y,A[V]=d.z,A[u+p]=d.x,A[T+p]=d.y,A[V+p]=d.z),t.tangent&&(_=a.normalize(a.cross(I,d,_),_),x[u]=_.x,x[T]=_.y,x[V]=_.z,x[u+p]=_.x,x[u+1+p]=_.y,x[u+2+p]=_.z),t.bitangent&&(S[u]=I.x,S[T]=I.y,S[V]=I.z,S[u+p]=I.x,S[T+p]=I.y,S[V+p]=I.z)}}if(t.st){p=l.length;for(let u=0;u<p;u+=2)l[u]=(l[u]-O.x)/(y.x-O.x),l[u+1]=(l[u+1]-O.y)/(y.y-O.y)}let m=new ht;if(t.position&&(m.position=new F({componentDatatype:P.DOUBLE,componentsPerAttribute:3,values:c})),t.st&&(m.st=new F({componentDatatype:P.FLOAT,componentsPerAttribute:2,values:l})),t.normal&&(m.normal=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(m.tangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(m.bitangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:S})),z&&(m.extrudeDirection=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:b})),Z(e.offsetAttribute)){let u=new Uint8Array(g);if(e.offsetAttribute===$.TOP)u=u.fill(1,0,g/2);else{let T=e.offsetAttribute===$.NONE?0:1;u=u.fill(T)}m.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return m}function zt(o){let e=o.length/3,t=st.createTypedArray(e,e*6),n=0;for(let s=0;s<e;s++){let i=s,r=s+e,f=(i+1)%e,h=f+e;t[n++]=i,t[n++]=r,t[n++]=f,t[n++]=f,t[n++]=r,t[n++]=h}return t}var mt=new it,ut=new it;function Bt(o){let e=o.center,t=o.ellipsoid,n=o.semiMajorAxis,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,tt),o.height,tt);mt.center=a.add(e,s,mt.center),mt.radius=n,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,s),o.extrudedHeight,s),ut.center=a.add(e,s,ut.center),ut.radius=n;let i=G.computeEllipsePositions(o,!0,!0),r=i.positions,f=i.numPts,h=i.outerPositions,N=it.union(mt,ut),g=Ot(r,o,!0),c=jt(f),l=c.length;c.length=l*2;let A=r.length/3;for(let _=0;_<l;_+=3)c[_+l]=c[_+2]+A,c[_+1+l]=c[_+1]+A,c[_+2+l]=c[_]+A;let x=st.createTypedArray(A*2/3,c),S=new rt({attributes:g,indices:x,primitiveType:ct.TRIANGLES}),z=vt(h,o);c=zt(h);let b=st.createTypedArray(h.length*2/3,c),M=new rt({attributes:z,indices:b,primitiveType:ct.TRIANGLES}),d=yt.combineInstances([new At({geometry:S}),new At({geometry:M})]);return{boundingSphere:N,attributes:d[0].attributes,indices:d[0].indices}}function Ct(o,e,t,n,s,i,r){let h=G.computeEllipsePositions({center:o,semiMajorAxis:e,semiMinorAxis:t,rotation:n,granularity:s},!1,!0).outerPositions,N=h.length/3,g=new Array(N);for(let l=0;l<N;++l)g[l]=a.fromArray(h,l*3);let c=bt.fromCartesianArray(g,i,r);return c.width>R.PI&&(c.north=c.north>0?R.PI_OVER_TWO-R.EPSILON7:c.north,c.south=c.south<0?R.EPSILON7-R.PI_OVER_TWO:c.south,c.east=R.PI,c.west=-R.PI),c}function Y(o){o=o??dt.EMPTY_OBJECT;let e=o.center,t=o.ellipsoid??D.default,n=o.semiMajorAxis,s=o.semiMinorAxis,i=o.granularity??R.RADIANS_PER_DEGREE,r=o.vertexFormat??v.DEFAULT;if(k.defined("options.center",e),k.typeOf.number("options.semiMajorAxis",n),k.typeOf.number("options.semiMinorAxis",s),n<s)throw new ot("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(i<=0)throw new ot("granularity must be greater than zero.");let f=o.height??0,h=o.extrudedHeight??f;this._center=a.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=s,this._ellipsoid=D.clone(t),this._rotation=o.rotation??0,this._stRotation=o.stRotation??0,this._height=Math.max(h,f),this._granularity=i,this._vertexFormat=v.clone(r),this._extrudedHeight=Math.min(h,f),this._shadowVolume=o.shadowVolume??!1,this._workerName="createEllipseGeometry",this._offsetAttribute=o.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Y.packedLength=a.packedLength+D.packedLength+v.packedLength+9;Y.pack=function(o,e,t){return k.defined("value",o),k.defined("array",e),t=t??0,a.pack(o._center,e,t),t+=a.packedLength,D.pack(o._ellipsoid,e,t),t+=D.packedLength,v.pack(o._vertexFormat,e,t),t+=v.packedLength,e[t++]=o._semiMajorAxis,e[t++]=o._semiMinorAxis,e[t++]=o._rotation,e[t++]=o._stRotation,e[t++]=o._height,e[t++]=o._granularity,e[t++]=o._extrudedHeight,e[t++]=o._shadowVolume?1:0,e[t]=o._offsetAttribute??-1,e};var Rt=new a,It=new D,Lt=new v,H={center:Rt,ellipsoid:It,vertexFormat:Lt,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Y.unpack=function(o,e,t){k.defined("array",o),e=e??0;let n=a.unpack(o,e,Rt);e+=a.packedLength;let s=D.unpack(o,e,It);e+=D.packedLength;let i=v.unpack(o,e,Lt);e+=v.packedLength;let r=o[e++],f=o[e++],h=o[e++],N=o[e++],g=o[e++],c=o[e++],l=o[e++],A=o[e++]===1,x=o[e];return Z(t)?(t._center=a.clone(n,t._center),t._ellipsoid=D.clone(s,t._ellipsoid),t._vertexFormat=v.clone(i,t._vertexFormat),t._semiMajorAxis=r,t._semiMinorAxis=f,t._rotation=h,t._stRotation=N,t._height=g,t._granularity=c,t._extrudedHeight=l,t._shadowVolume=A,t._offsetAttribute=x===-1?void 0:x,t):(H.height=g,H.extrudedHeight=l,H.granularity=c,H.stRotation=N,H.rotation=h,H.semiMajorAxis=r,H.semiMinorAxis=f,H.shadowVolume=A,H.offsetAttribute=x===-1?void 0:x,new Y(H))};Y.computeRectangle=function(o,e){o=o??dt.EMPTY_OBJECT;let t=o.center,n=o.ellipsoid??D.default,s=o.semiMajorAxis,i=o.semiMinorAxis,r=o.granularity??R.RADIANS_PER_DEGREE,f=o.rotation??0;if(k.defined("options.center",t),k.typeOf.number("options.semiMajorAxis",s),k.typeOf.number("options.semiMinorAxis",i),s<i)throw new ot("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new ot("granularity must be greater than zero.");return Ct(t,s,i,f,r,n,e)};Y.createGeometry=function(o){if(o._semiMajorAxis<=0||o._semiMinorAxis<=0)return;let e=o._height,t=o._extrudedHeight,n=!R.equalsEpsilon(e,t,0,R.EPSILON2);o._center=o._ellipsoid.scaleToGeodeticSurface(o._center,o._center);let s={center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:o._ellipsoid,rotation:o._rotation,height:e,granularity:o._granularity,vertexFormat:o._vertexFormat,stRotation:o._stRotation},i;if(n)s.extrudedHeight=t,s.shadowVolume=o._shadowVolume,s.offsetAttribute=o._offsetAttribute,i=Bt(s);else if(i=Dt(s),Z(o._offsetAttribute)){let r=i.attributes.position.values.length,f=o._offsetAttribute===$.NONE?0:1,h=new Uint8Array(r/3).fill(f);i.attributes.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new rt({attributes:i.attributes,indices:i.indices,primitiveType:ct.TRIANGLES,boundingSphere:i.boundingSphere,offsetAttribute:o._offsetAttribute})};Y.createShadowVolume=function(o,e,t){let n=o._granularity,s=o._ellipsoid,i=e(n,s),r=t(n,s);return new Y({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:s,rotation:o._rotation,stRotation:o._stRotation,granularity:n,extrudedHeight:i,height:r,vertexFormat:v.POSITION_ONLY,shadowVolume:!0})};function kt(o){let e=-o._stRotation;if(e===0)return[0,0,0,1,1,0];let n=G.computeEllipsePositions({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,rotation:o._rotation,granularity:o._granularity},!1,!0).outerPositions,s=n.length/3,i=new Array(s);for(let h=0;h<s;++h)i[h]=a.fromArray(n,h*3);let r=o._ellipsoid,f=o.rectangle;return rt._textureCoordinateRotationPoints(i,e,r,f)}Object.defineProperties(Y.prototype,{rectangle:{get:function(){return Z(this._rectangle)||(this._rectangle=Ct(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return Z(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=kt(this)),this._textureCoordinateRotationPoints}}});var de=Y;export{de as a};
|
|
26
|
+
import{a as G}from"./chunk-F7XR2IV5.js";import{a as At}from"./chunk-AHKBUIAX.js";import{a as yt}from"./chunk-NU4XOT2V.js";import{a as $}from"./chunk-AOSK7NDA.js";import{a as v}from"./chunk-JU23HGY3.js";import{a as st}from"./chunk-LNFOIPBT.js";import{a as ht}from"./chunk-7IBY6LYM.js";import{b as ct,c as rt,d as F}from"./chunk-BDLVVHOG.js";import{a as lt,d as it}from"./chunk-VMOPYKP4.js";import{f as nt,h as bt}from"./chunk-DGGIK7AD.js";import{a as P}from"./chunk-5EZKANRV.js";import{a,b as _t,c as Q,d as D,e as C,f as dt}from"./chunk-FCVV6A2F.js";import{a as R}from"./chunk-PO64KPKA.js";import{a as ot,b as k}from"./chunk-R3KD5ZAI.js";import{e as Z}from"./chunk-GBI3IATP.js";var tt=new a,pt=new a,xt=new a,wt=new a,w=new Q,Mt=new C,Vt=new C,gt=new nt,Tt=new a,Nt=new a,Et=new a,ft=new _t,Pt=new a,Ft=new Q,St=new Q;function Ot(o,e,t){let n=e.vertexFormat,s=e.center,i=e.semiMajorAxis,r=e.semiMinorAxis,f=e.ellipsoid,h=e.stRotation,N=t?o.length/3*2:o.length/3,g=e.shadowVolume,c=n.st?new Float32Array(N*2):void 0,l=n.normal?new Float32Array(N*3):void 0,A=n.tangent?new Float32Array(N*3):void 0,x=n.bitangent?new Float32Array(N*3):void 0,S=g?new Float32Array(N*3):void 0,z=0,b=Tt,M=Nt,d=Et,_=new lt(f),I=_.project(f.cartesianToCartographic(s,ft),Pt),W=f.scaleToGeodeticSurface(s,tt);f.geodeticSurfaceNormal(W,W);let J=Mt,U=Vt;if(h!==0){let m=nt.fromAxisAngle(W,h,gt);J=C.fromQuaternion(m,J),m=nt.fromAxisAngle(W,-h,gt),U=C.fromQuaternion(m,U)}else J=C.clone(C.IDENTITY,J),U=C.clone(C.IDENTITY,U);let B=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),q=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),O=o.length,y=t?O:0,p=y/3*2;for(let m=0;m<O;m+=3){let u=m+1,T=m+2,V=a.fromArray(o,m,tt);if(n.st){let E=C.multiplyByVector(J,V,pt),j=_.project(f.cartesianToCartographic(E,ft),xt);a.subtract(j,I,j),w.x=(j.x+i)/(2*i),w.y=(j.y+r)/(2*r),B.x=Math.min(w.x,B.x),B.y=Math.min(w.y,B.y),q.x=Math.max(w.x,q.x),q.y=Math.max(w.y,q.y),t&&(c[z+p]=w.x,c[z+1+p]=w.y),c[z++]=w.x,c[z++]=w.y}(n.normal||n.tangent||n.bitangent||g)&&(b=f.geodeticSurfaceNormal(V,b),g&&(S[m+y]=-b.x,S[u+y]=-b.y,S[T+y]=-b.z),(n.normal||n.tangent||n.bitangent)&&((n.tangent||n.bitangent)&&(M=a.normalize(a.cross(a.UNIT_Z,b,M),M),C.multiplyByVector(U,M,M)),n.normal&&(l[m]=b.x,l[u]=b.y,l[T]=b.z,t&&(l[m+y]=-b.x,l[u+y]=-b.y,l[T+y]=-b.z)),n.tangent&&(A[m]=M.x,A[u]=M.y,A[T]=M.z,t&&(A[m+y]=-M.x,A[u+y]=-M.y,A[T+y]=-M.z)),n.bitangent&&(d=a.normalize(a.cross(b,M,d),d),x[m]=d.x,x[u]=d.y,x[T]=d.z,t&&(x[m+y]=d.x,x[u+y]=d.y,x[T+y]=d.z))))}if(n.st){O=c.length;for(let m=0;m<O;m+=2)c[m]=(c[m]-B.x)/(q.x-B.x),c[m+1]=(c[m+1]-B.y)/(q.y-B.y)}let L=new ht;if(n.position){let m=G.raisePositionsToHeight(o,e,t);L.position=new F({componentDatatype:P.DOUBLE,componentsPerAttribute:3,values:m})}if(n.st&&(L.st=new F({componentDatatype:P.FLOAT,componentsPerAttribute:2,values:c})),n.normal&&(L.normal=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:l})),n.tangent&&(L.tangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:A})),n.bitangent&&(L.bitangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:x})),g&&(L.extrudeDirection=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:S})),t&&Z(e.offsetAttribute)){let m=new Uint8Array(N);if(e.offsetAttribute===$.TOP)m=m.fill(1,0,N/2);else{let u=e.offsetAttribute===$.NONE?0:1;m=m.fill(u)}L.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:m})}return L}function jt(o){let e=new Array(12*(o*(o+1))-6),t=0,n,s,i,r,f;for(n=0,i=1,r=0;r<3;r++)e[t++]=i++,e[t++]=n,e[t++]=i;for(r=2;r<o+1;++r){for(i=r*(r+1)-1,n=(r-1)*r-1,e[t++]=i++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=i++,e[t++]=n,e[t++]=i}for(s=o*2,++i,++n,r=0;r<s-1;++r)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;for(e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n++,e[t++]=n,++n,r=o-1;r>1;--r){for(e[t++]=n++,e[t++]=n,e[t++]=i,s=2*r,f=0;f<s-1;++f)e[t++]=i,e[t++]=n++,e[t++]=n,e[t++]=i++,e[t++]=n,e[t++]=i;e[t++]=n++,e[t++]=n++,e[t++]=i++}for(r=0;r<3;r++)e[t++]=n++,e[t++]=n,e[t++]=i;return e}var K=new a;function Dt(o){let e=o.center;K=a.multiplyByScalar(o.ellipsoid.geodeticSurfaceNormal(e,K),o.height,K),K=a.add(e,K,K);let t=new it(K,o.semiMajorAxis),n=G.computeEllipsePositions(o,!0,!1),s=n.positions,i=n.numPts,r=Ot(s,o,!1),f=jt(i);return f=st.createTypedArray(s.length/3,f),{boundingSphere:t,attributes:r,indices:f}}function vt(o,e){let t=e.vertexFormat,n=e.center,s=e.semiMajorAxis,i=e.semiMinorAxis,r=e.ellipsoid,f=e.height,h=e.extrudedHeight,N=e.stRotation,g=o.length/3*2,c=new Float64Array(g*3),l=t.st?new Float32Array(g*2):void 0,A=t.normal?new Float32Array(g*3):void 0,x=t.tangent?new Float32Array(g*3):void 0,S=t.bitangent?new Float32Array(g*3):void 0,z=e.shadowVolume,b=z?new Float32Array(g*3):void 0,M=0,d=Tt,_=Nt,I=Et,W=new lt(r),J=W.project(r.cartesianToCartographic(n,ft),Pt),U=r.scaleToGeodeticSurface(n,tt);r.geodeticSurfaceNormal(U,U);let B=nt.fromAxisAngle(U,N,gt),q=C.fromQuaternion(B,Mt),O=Q.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Ft),y=Q.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,St),p=o.length,L=p/3*2;for(let u=0;u<p;u+=3){let T=u+1,V=u+2,E=a.fromArray(o,u,tt),j;if(t.st){let et=C.multiplyByVector(q,E,pt),X=W.project(r.cartesianToCartographic(et,ft),xt);a.subtract(X,J,X),w.x=(X.x+s)/(2*s),w.y=(X.y+i)/(2*i),O.x=Math.min(w.x,O.x),O.y=Math.min(w.y,O.y),y.x=Math.max(w.x,y.x),y.y=Math.max(w.y,y.y),l[M+L]=w.x,l[M+1+L]=w.y,l[M++]=w.x,l[M++]=w.y}E=r.scaleToGeodeticSurface(E,E),j=a.clone(E,pt),d=r.geodeticSurfaceNormal(E,d),z&&(b[u+p]=-d.x,b[T+p]=-d.y,b[V+p]=-d.z);let at=a.multiplyByScalar(d,f,wt);if(E=a.add(E,at,E),at=a.multiplyByScalar(d,h,at),j=a.add(j,at,j),t.position&&(c[u+p]=j.x,c[T+p]=j.y,c[V+p]=j.z,c[u]=E.x,c[T]=E.y,c[V]=E.z),t.normal||t.tangent||t.bitangent){I=a.clone(d,I);let et=a.fromArray(o,(u+3)%p,wt);a.subtract(et,E,et);let X=a.subtract(j,E,xt);d=a.normalize(a.cross(X,et,d),d),t.normal&&(A[u]=d.x,A[T]=d.y,A[V]=d.z,A[u+p]=d.x,A[T+p]=d.y,A[V+p]=d.z),t.tangent&&(_=a.normalize(a.cross(I,d,_),_),x[u]=_.x,x[T]=_.y,x[V]=_.z,x[u+p]=_.x,x[u+1+p]=_.y,x[u+2+p]=_.z),t.bitangent&&(S[u]=I.x,S[T]=I.y,S[V]=I.z,S[u+p]=I.x,S[T+p]=I.y,S[V+p]=I.z)}}if(t.st){p=l.length;for(let u=0;u<p;u+=2)l[u]=(l[u]-O.x)/(y.x-O.x),l[u+1]=(l[u+1]-O.y)/(y.y-O.y)}let m=new ht;if(t.position&&(m.position=new F({componentDatatype:P.DOUBLE,componentsPerAttribute:3,values:c})),t.st&&(m.st=new F({componentDatatype:P.FLOAT,componentsPerAttribute:2,values:l})),t.normal&&(m.normal=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:A})),t.tangent&&(m.tangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:x})),t.bitangent&&(m.bitangent=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:S})),z&&(m.extrudeDirection=new F({componentDatatype:P.FLOAT,componentsPerAttribute:3,values:b})),Z(e.offsetAttribute)){let u=new Uint8Array(g);if(e.offsetAttribute===$.TOP)u=u.fill(1,0,g/2);else{let T=e.offsetAttribute===$.NONE?0:1;u=u.fill(T)}m.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:u})}return m}function zt(o){let e=o.length/3,t=st.createTypedArray(e,e*6),n=0;for(let s=0;s<e;s++){let i=s,r=s+e,f=(i+1)%e,h=f+e;t[n++]=i,t[n++]=r,t[n++]=f,t[n++]=f,t[n++]=r,t[n++]=h}return t}var mt=new it,ut=new it;function Bt(o){let e=o.center,t=o.ellipsoid,n=o.semiMajorAxis,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,tt),o.height,tt);mt.center=a.add(e,s,mt.center),mt.radius=n,s=a.multiplyByScalar(t.geodeticSurfaceNormal(e,s),o.extrudedHeight,s),ut.center=a.add(e,s,ut.center),ut.radius=n;let i=G.computeEllipsePositions(o,!0,!0),r=i.positions,f=i.numPts,h=i.outerPositions,N=it.union(mt,ut),g=Ot(r,o,!0),c=jt(f),l=c.length;c.length=l*2;let A=r.length/3;for(let _=0;_<l;_+=3)c[_+l]=c[_+2]+A,c[_+1+l]=c[_+1]+A,c[_+2+l]=c[_]+A;let x=st.createTypedArray(A*2/3,c),S=new rt({attributes:g,indices:x,primitiveType:ct.TRIANGLES}),z=vt(h,o);c=zt(h);let b=st.createTypedArray(h.length*2/3,c),M=new rt({attributes:z,indices:b,primitiveType:ct.TRIANGLES}),d=yt.combineInstances([new At({geometry:S}),new At({geometry:M})]);return{boundingSphere:N,attributes:d[0].attributes,indices:d[0].indices}}function Ct(o,e,t,n,s,i,r){let h=G.computeEllipsePositions({center:o,semiMajorAxis:e,semiMinorAxis:t,rotation:n,granularity:s},!1,!0).outerPositions,N=h.length/3,g=new Array(N);for(let l=0;l<N;++l)g[l]=a.fromArray(h,l*3);let c=bt.fromCartesianArray(g,i,r);return c.width>R.PI&&(c.north=c.north>0?R.PI_OVER_TWO-R.EPSILON7:c.north,c.south=c.south<0?R.EPSILON7-R.PI_OVER_TWO:c.south,c.east=R.PI,c.west=-R.PI),c}function Y(o){o=o??dt.EMPTY_OBJECT;let e=o.center,t=o.ellipsoid??D.default,n=o.semiMajorAxis,s=o.semiMinorAxis,i=o.granularity??R.RADIANS_PER_DEGREE,r=o.vertexFormat??v.DEFAULT;if(k.defined("options.center",e),k.typeOf.number("options.semiMajorAxis",n),k.typeOf.number("options.semiMinorAxis",s),n<s)throw new ot("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(i<=0)throw new ot("granularity must be greater than zero.");let f=o.height??0,h=o.extrudedHeight??f;this._center=a.clone(e),this._semiMajorAxis=n,this._semiMinorAxis=s,this._ellipsoid=D.clone(t),this._rotation=o.rotation??0,this._stRotation=o.stRotation??0,this._height=Math.max(h,f),this._granularity=i,this._vertexFormat=v.clone(r),this._extrudedHeight=Math.min(h,f),this._shadowVolume=o.shadowVolume??!1,this._workerName="createEllipseGeometry",this._offsetAttribute=o.offsetAttribute,this._rectangle=void 0,this._textureCoordinateRotationPoints=void 0}Y.packedLength=a.packedLength+D.packedLength+v.packedLength+9;Y.pack=function(o,e,t){return k.defined("value",o),k.defined("array",e),t=t??0,a.pack(o._center,e,t),t+=a.packedLength,D.pack(o._ellipsoid,e,t),t+=D.packedLength,v.pack(o._vertexFormat,e,t),t+=v.packedLength,e[t++]=o._semiMajorAxis,e[t++]=o._semiMinorAxis,e[t++]=o._rotation,e[t++]=o._stRotation,e[t++]=o._height,e[t++]=o._granularity,e[t++]=o._extrudedHeight,e[t++]=o._shadowVolume?1:0,e[t]=o._offsetAttribute??-1,e};var Rt=new a,It=new D,Lt=new v,H={center:Rt,ellipsoid:It,vertexFormat:Lt,semiMajorAxis:void 0,semiMinorAxis:void 0,rotation:void 0,stRotation:void 0,height:void 0,granularity:void 0,extrudedHeight:void 0,shadowVolume:void 0,offsetAttribute:void 0};Y.unpack=function(o,e,t){k.defined("array",o),e=e??0;let n=a.unpack(o,e,Rt);e+=a.packedLength;let s=D.unpack(o,e,It);e+=D.packedLength;let i=v.unpack(o,e,Lt);e+=v.packedLength;let r=o[e++],f=o[e++],h=o[e++],N=o[e++],g=o[e++],c=o[e++],l=o[e++],A=o[e++]===1,x=o[e];return Z(t)?(t._center=a.clone(n,t._center),t._ellipsoid=D.clone(s,t._ellipsoid),t._vertexFormat=v.clone(i,t._vertexFormat),t._semiMajorAxis=r,t._semiMinorAxis=f,t._rotation=h,t._stRotation=N,t._height=g,t._granularity=c,t._extrudedHeight=l,t._shadowVolume=A,t._offsetAttribute=x===-1?void 0:x,t):(H.height=g,H.extrudedHeight=l,H.granularity=c,H.stRotation=N,H.rotation=h,H.semiMajorAxis=r,H.semiMinorAxis=f,H.shadowVolume=A,H.offsetAttribute=x===-1?void 0:x,new Y(H))};Y.computeRectangle=function(o,e){o=o??dt.EMPTY_OBJECT;let t=o.center,n=o.ellipsoid??D.default,s=o.semiMajorAxis,i=o.semiMinorAxis,r=o.granularity??R.RADIANS_PER_DEGREE,f=o.rotation??0;if(k.defined("options.center",t),k.typeOf.number("options.semiMajorAxis",s),k.typeOf.number("options.semiMinorAxis",i),s<i)throw new ot("semiMajorAxis must be greater than or equal to the semiMinorAxis.");if(r<=0)throw new ot("granularity must be greater than zero.");return Ct(t,s,i,f,r,n,e)};Y.createGeometry=function(o){if(o._semiMajorAxis<=0||o._semiMinorAxis<=0)return;let e=o._height,t=o._extrudedHeight,n=!R.equalsEpsilon(e,t,0,R.EPSILON2);o._center=o._ellipsoid.scaleToGeodeticSurface(o._center,o._center);let s={center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:o._ellipsoid,rotation:o._rotation,height:e,granularity:o._granularity,vertexFormat:o._vertexFormat,stRotation:o._stRotation},i;if(n)s.extrudedHeight=t,s.shadowVolume=o._shadowVolume,s.offsetAttribute=o._offsetAttribute,i=Bt(s);else if(i=Dt(s),Z(o._offsetAttribute)){let r=i.attributes.position.values.length,f=o._offsetAttribute===$.NONE?0:1,h=new Uint8Array(r/3).fill(f);i.attributes.applyOffset=new F({componentDatatype:P.UNSIGNED_BYTE,componentsPerAttribute:1,values:h})}return new rt({attributes:i.attributes,indices:i.indices,primitiveType:ct.TRIANGLES,boundingSphere:i.boundingSphere,offsetAttribute:o._offsetAttribute})};Y.createShadowVolume=function(o,e,t){let n=o._granularity,s=o._ellipsoid,i=e(n,s),r=t(n,s);return new Y({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,ellipsoid:s,rotation:o._rotation,stRotation:o._stRotation,granularity:n,extrudedHeight:i,height:r,vertexFormat:v.POSITION_ONLY,shadowVolume:!0})};function kt(o){let e=-o._stRotation;if(e===0)return[0,0,0,1,1,0];let n=G.computeEllipsePositions({center:o._center,semiMajorAxis:o._semiMajorAxis,semiMinorAxis:o._semiMinorAxis,rotation:o._rotation,granularity:o._granularity},!1,!0).outerPositions,s=n.length/3,i=new Array(s);for(let h=0;h<s;++h)i[h]=a.fromArray(n,h*3);let r=o._ellipsoid,f=o.rectangle;return rt._textureCoordinateRotationPoints(i,e,r,f)}Object.defineProperties(Y.prototype,{rectangle:{get:function(){return Z(this._rectangle)||(this._rectangle=Ct(this._center,this._semiMajorAxis,this._semiMinorAxis,this._rotation,this._granularity,this._ellipsoid)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return Z(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=kt(this)),this._textureCoordinateRotationPoints}}});var de=Y;export{de as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{f as C}from"./chunk-
|
|
26
|
+
import{f as C}from"./chunk-DGGIK7AD.js";import{a as n,e as b}from"./chunk-FCVV6A2F.js";import{a as w}from"./chunk-PO64KPKA.js";var j={},q=new n,L=new n,Q=new C,G=new b;function W(m,O,p,S,g,_,d,f,M,s){let a=m+O;n.multiplyByScalar(S,Math.cos(a),q),n.multiplyByScalar(p,Math.sin(a),L),n.add(q,L,q);let u=Math.cos(m);u=u*u;let l=Math.sin(m);l=l*l;let h=_/Math.sqrt(d*u+g*l)/f;return C.fromAxisAngle(q,h,Q),b.fromQuaternion(Q,G),b.multiplyByVector(G,M,s),n.normalize(s,s),n.multiplyByScalar(s,f,s),s}var U=new n,Z=new n,N=new n,v=new n;j.raisePositionsToHeight=function(m,O,p){let S=O.ellipsoid,g=O.height,_=O.extrudedHeight,d=p?m.length/3*2:m.length/3,f=new Float64Array(d*3),M=m.length,s=p?M:0;for(let a=0;a<M;a+=3){let u=a+1,l=a+2,r=n.fromArray(m,a,U);S.scaleToGeodeticSurface(r,r);let h=n.clone(r,Z),x=S.geodeticSurfaceNormal(r,v),P=n.multiplyByScalar(x,g,N);n.add(r,P,r),p&&(n.multiplyByScalar(x,_,P),n.add(h,P,h),f[a+s]=h.x,f[u+s]=h.y,f[l+s]=h.z),f[a]=r.x,f[u]=r.y,f[l]=r.z}return f};var D=new n,J=new n,K=new n;j.computeEllipsePositions=function(m,O,p){let S=m.semiMinorAxis,g=m.semiMajorAxis,_=m.rotation,d=m.center,f=m.granularity*8,M=S*S,s=g*g,a=g*S,u=n.magnitude(d),l=n.normalize(d,D),r=n.cross(n.UNIT_Z,d,J);r=n.normalize(r,r);let h=n.cross(l,r,K),x=1+Math.ceil(w.PI_OVER_TWO/f),P=w.PI_OVER_TWO/(x-1),y=w.PI_OVER_TWO-x*P;y<0&&(x-=Math.ceil(Math.abs(y)/P));let k=2*(x*(x+2)),e=O?new Array(k*3):void 0,o=0,t=U,i=Z,H=x*4*3,z=H-1,A=0,c=p?new Array(H):void 0,I,T,R,E,V;for(y=w.PI_OVER_TWO,t=W(y,_,h,r,M,a,s,u,l,t),O&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z),p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x),y=w.PI_OVER_TWO-P,I=1;I<x+1;++I){if(t=W(y,_,h,r,M,a,s,u,l,t),i=W(Math.PI-y,_,h,r,M,a,s,u,l,i),O){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,R=2*I+2,T=1;T<R-1;++T)E=T/(R-1),V=n.lerp(t,i,E,N),e[o++]=V.x,e[o++]=V.y,e[o++]=V.z;e[o++]=i.x,e[o++]=i.y,e[o++]=i.z}p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,c[A++]=i.x,c[A++]=i.y,c[A++]=i.z),y=w.PI_OVER_TWO-(I+1)*P}for(I=x;I>1;--I){if(y=w.PI_OVER_TWO-(I-1)*P,t=W(-y,_,h,r,M,a,s,u,l,t),i=W(y+Math.PI,_,h,r,M,a,s,u,l,i),O){for(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,R=2*(I-1)+2,T=1;T<R-1;++T)E=T/(R-1),V=n.lerp(t,i,E,N),e[o++]=V.x,e[o++]=V.y,e[o++]=V.z;e[o++]=i.x,e[o++]=i.y,e[o++]=i.z}p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,c[A++]=i.x,c[A++]=i.y,c[A++]=i.z)}y=w.PI_OVER_TWO,t=W(-y,_,h,r,M,a,s,u,l,t);let B={};return O&&(e[o++]=t.x,e[o++]=t.y,e[o++]=t.z,B.positions=e,B.numPts=x),p&&(c[z--]=t.z,c[z--]=t.y,c[z--]=t.x,B.outerPositions=c),B};var tt=j;export{tt as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as h}from"./chunk-3SSKC3VN.js";import{a as g,b as c}from"./chunk-LEYMRMBK.js";import{e as u}from"./chunk-VTAIKJXX.js";function f(n,e,o){this.x=n??0,this.y=e??0,this.z=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=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??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=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 g("If result is a typed array, it must have exactly array.length * 3 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)f.pack(n[i],e,i*3);return e};f.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new g("array length must be a multiple of 3.");let o=n.length;u(e)?e.length=o/3:e=new Array(o/3);for(let t=0;t<o;t+=3){let i=t/3;e[i]=f.unpack(n,t,e[i])}return e};f.fromArray=f.unpack;f.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)};f.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)};f.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o.z=Math.min(n.z,e.z),o};f.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o.z=Math.max(n.z,e.z),o};f.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=h.clamp(n.x,e.x,o.x),p=h.clamp(n.y,e.y,o.y),d=h.clamp(n.z,e.z,o.z);return t.x=i,t.y=p,t.z=d,t};f.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z};f.magnitude=function(n){return Math.sqrt(f.magnitudeSquared(n))};var X=new f;f.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,X),f.magnitude(X)};f.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,X),f.magnitudeSquared(X)};f.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,e.z=n.z/o,isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new g("normalized result is not a number");return e};f.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y+n.z*e.z};f.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o.z=n.z*e.z,o};f.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o.z=n.z/e.z,o};f.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o.z=n.z+e.z,o};f.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o.z=n.z-e.z,o};f.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o.z=n.z*e,o};f.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o.z=n.z/e,o};f.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e.z=-n.z,e};f.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e.z=Math.abs(n.z),e};var Tn=new f;f.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),f.multiplyByScalar(e,o,Tn),t=f.multiplyByScalar(n,1-o,t),f.add(Tn,t,t)};var Y=new f,dn=new f;f.angleBetween=function(n,e){c.typeOf.object("left",n),c.typeOf.object("right",e),f.normalize(n,Y),f.normalize(e,dn);let o=f.dot(Y,dn),t=f.magnitude(f.cross(Y,dn,Y));return Math.atan2(t,o)};var Yn=new f;f.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.normalize(n,Yn);return f.abs(o,o),o.x<=o.y?o.x<=o.z?e=f.clone(f.UNIT_X,e):e=f.clone(f.UNIT_Z,e):o.y<=o.z?e=f.clone(f.UNIT_Y,e):e=f.clone(f.UNIT_Z,e),e};f.projectVector=function(n,e,o){c.defined("a",n),c.defined("b",e),c.defined("result",o);let t=f.dot(n,e)/f.dot(e,e);return f.multiplyByScalar(e,t,o)};f.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y&&n.z===e.z};f.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]&&n.z===e[o+2]};f.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&h.equalsEpsilon(n.x,e.x,o,t)&&h.equalsEpsilon(n.y,e.y,o,t)&&h.equalsEpsilon(n.z,e.z,o,t)};f.cross=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n.x,i=n.y,p=n.z,d=e.x,m=e.y,s=e.z,b=i*s-p*m,w=p*d-t*s,S=t*m-i*d;return o.x=b,o.y=w,o.z=S,o};f.midpoint=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=(n.x+e.x)*.5,o.y=(n.y+e.y)*.5,o.z=(n.z+e.z)*.5,o};f.fromDegrees=function(n,e,o,t,i){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=h.toRadians(n),e=h.toRadians(e),f.fromRadians(n,e,o,t,i)};var T=new f,V=new f;f._ellipsoidRadiiSquared=new f(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);f.fromRadians=function(n,e,o,t,i){c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=o??0;let p=u(t)?t.radiiSquared:f._ellipsoidRadiiSquared,d=Math.cos(e);T.x=d*Math.cos(n),T.y=d*Math.sin(n),T.z=Math.sin(e),T=f.normalize(T,T),f.multiplyComponents(p,T,V);let m=Math.sqrt(f.dot(T,V));return V=f.divideByScalar(V,m,V),T=f.multiplyByScalar(T,o,T),u(i)||(i=new f),f.add(V,T,i)};f.fromDegreesArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],d=n[i+1],m=i/2;o[m]=f.fromDegrees(p,d,0,e,o[m])}return o};f.fromRadiansArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],d=n[i+1],m=i/2;o[m]=f.fromRadians(p,d,0,e,o[m])}return o};f.fromDegreesArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],d=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromDegrees(p,d,m,e,o[s])}return o};f.fromRadiansArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],d=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromRadians(p,d,m,e,o[s])}return o};f.ZERO=Object.freeze(new f(0,0,0));f.ONE=Object.freeze(new f(1,1,1));f.UNIT_X=Object.freeze(new f(1,0,0));f.UNIT_Y=Object.freeze(new f(0,1,0));f.UNIT_Z=Object.freeze(new f(0,0,1));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e,o){return f.equalsEpsilon(this,n,e,o)};f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var y=f;var Xn=new y,Gn=new y;function Hn(n,e,o,t,i){if(!u(n))throw new g("cartesian is required.");if(!u(e))throw new g("oneOverRadii is required.");if(!u(o))throw new g("oneOverRadiiSquared is required.");if(!u(t))throw new g("centerToleranceSquared is required.");let p=n.x,d=n.y,m=n.z,s=e.x,b=e.y,w=e.z,S=p*p*s*s,R=d*d*b*b,M=m*m*w*w,C=S+R+M,_=Math.sqrt(1/C),N=y.multiplyByScalar(n,_,Xn);if(C<t)return isFinite(_)?y.clone(N,i):void 0;let B=o.x,U=o.y,P=o.z,F=Gn;F.x=N.x*B*2,F.y=N.y*U*2,F.z=N.z*P*2;let Z=(1-_)*y.magnitude(n)/(.5*y.magnitude(F)),Mn=0,rn,qn,I,L,W,pn,un,an,En,An,_n;do{Z-=Mn,I=1/(1+Z*B),L=1/(1+Z*U),W=1/(1+Z*P),pn=I*I,un=L*L,an=W*W,En=pn*I,An=un*L,_n=an*W,rn=S*pn+R*un+M*an-1,qn=S*En*B+R*An*U+M*_n*P;let Zn=-2*qn;Mn=rn/Zn}while(Math.abs(rn)>h.EPSILON12);return u(i)?(i.x=p*I,i.y=d*L,i.z=m*W,i):new y(p*I,d*L,m*W)}var G=Hn;function j(n,e,o){this.longitude=n??0,this.latitude=e??0,this.height=o??0}j.fromRadians=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=o??0,u(t)?(t.longitude=n,t.latitude=e,t.height=o,t):new j(n,e,o)};j.fromDegrees=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=h.toRadians(n),e=h.toRadians(e),j.fromRadians(n,e,o,t)};var Qn=new y,Jn=new y,Kn=new y;j._ellipsoidOneOverRadii=new y(1/6378137,1/6378137,1/6356752314245179e-9);j._ellipsoidOneOverRadiiSquared=new y(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));j._ellipsoidCenterToleranceSquared=h.EPSILON1;j.fromCartesian=function(n,e,o){let t=u(e)?e.oneOverRadii:j._ellipsoidOneOverRadii,i=u(e)?e.oneOverRadiiSquared:j._ellipsoidOneOverRadiiSquared,p=u(e)?e._centerToleranceSquared:j._ellipsoidCenterToleranceSquared,d=G(n,t,i,p,Jn);if(!u(d))return;let m=y.multiplyComponents(d,i,Qn);m=y.normalize(m,m);let s=y.subtract(n,d,Kn),b=Math.atan2(m.y,m.x),w=Math.asin(m.z),S=h.sign(y.dot(s,n))*y.magnitude(s);return u(o)?(o.longitude=b,o.latitude=w,o.height=S,o):new j(b,w,S)};j.toCartesian=function(n,e,o){return c.defined("cartographic",n),y.fromRadians(n.longitude,n.latitude,n.height,e,o)};j.clone=function(n,e){if(u(n))return u(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new j(n.longitude,n.latitude,n.height)};j.equals=function(n,e){return n===e||u(n)&&u(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};j.equalsEpsilon=function(n,e,o){return 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};j.ZERO=Object.freeze(new j(0,0,0));j.prototype.clone=function(n){return j.clone(this,n)};j.prototype.equals=function(n){return j.equals(this,n)};j.prototype.equalsEpsilon=function(n,e){return j.equalsEpsilon(this,n,e)};j.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var $=j;function a(n,e){this.x=n??0,this.y=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??0,e[o++]=n.x,e[o]=n.y,e};a.unpack=function(n,e,o){return c.defined("array",n),e=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 g("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<o;++i)a.pack(n[i],e,i*2);return e};a.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,2),n.length%2!==0)throw new g("array length must be a multiple of 2.");let o=n.length;u(e)?e.length=o/2:e=new Array(o/2);for(let t=0;t<o;t+=2){let i=t/2;e[i]=a.unpack(n,t,e[i])}return e};a.fromArray=a.unpack;a.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y)};a.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y)};a.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o};a.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o};a.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=h.clamp(n.x,e.x,o.x),p=h.clamp(n.y,e.y,o.y);return t.x=i,t.y=p,t};a.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y};a.magnitude=function(n){return Math.sqrt(a.magnitudeSquared(n))};var H=new a;a.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitude(H)};a.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitudeSquared(H)};a.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,isNaN(e.x)||isNaN(e.y))throw new g("normalized result is not a number");return e};a.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y};a.cross=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.y-n.y*e.x};a.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o};a.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o};a.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o};a.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o};a.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o};a.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o};a.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e};a.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e};var ln=new a;a.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),a.multiplyByScalar(e,o,ln),t=a.multiplyByScalar(n,1-o,t),a.add(ln,t,t)};var Cn=new a,Nn=new a;a.angleBetween=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.normalize(n,Cn),a.normalize(e,Nn),h.acosClamped(a.dot(Cn,Nn))};var ne=new a;a.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.normalize(n,ne);return a.abs(o,o),o.x<=o.y?e=a.clone(a.UNIT_X,e):e=a.clone(a.UNIT_Y,e),e};a.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y};a.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]};a.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&h.equalsEpsilon(n.x,e.x,o,t)&&h.equalsEpsilon(n.y,e.y,o,t)};a.ZERO=Object.freeze(new a(0,0));a.ONE=Object.freeze(new a(1,1));a.UNIT_X=Object.freeze(new a(1,0));a.UNIT_Y=Object.freeze(new a(0,1));a.prototype.clone=function(n){return a.clone(this,n)};a.prototype.equals=function(n){return a.equals(this,n)};a.prototype.equalsEpsilon=function(n,e,o){return a.equalsEpsilon(this,n,e,o)};a.prototype.toString=function(){return`(${this.x}, ${this.y})`};var yn=a;function Fn(n,e,o,t){e=e??0,o=o??0,t=t??0,c.typeOf.number.greaterThanOrEquals("x",e,0),c.typeOf.number.greaterThanOrEquals("y",o,0),c.typeOf.number.greaterThanOrEquals("z",t,0),n._radii=new y(e,o,t),n._radiiSquared=new y(e*e,o*o,t*t),n._radiiToTheFourth=new y(e*e*e*e,o*o*o*o,t*t*t*t),n._oneOverRadii=new y(e===0?0:1/e,o===0?0:1/o,t===0?0:1/t),n._oneOverRadiiSquared=new y(e===0?0:1/(e*e),o===0?0:1/(o*o),t===0?0:1/(t*t)),n._minimumRadius=Math.min(e,o,t),n._maximumRadius=Math.max(e,o,t),n._centerToleranceSquared=h.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function O(n,e,o){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,Fn(this,n,e,o)}Object.defineProperties(O.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}}});O.clone=function(n,e){if(!u(n))return;let o=n._radii;return u(e)?(y.clone(o,e._radii),y.clone(n._radiiSquared,e._radiiSquared),y.clone(n._radiiToTheFourth,e._radiiToTheFourth),y.clone(n._oneOverRadii,e._oneOverRadii),y.clone(n._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=n._minimumRadius,e._maximumRadius=n._maximumRadius,e._centerToleranceSquared=n._centerToleranceSquared,e):new O(o.x,o.y,o.z)};O.fromCartesian3=function(n,e){return u(e)||(e=new O),u(n)&&Fn(e,n.x,n.y,n.z),e};O.WGS84=Object.freeze(new O(6378137,6378137,6356752314245179e-9));O.UNIT_SPHERE=Object.freeze(new O(1,1,1));O.MOON=Object.freeze(new O(h.LUNAR_RADIUS,h.LUNAR_RADIUS,h.LUNAR_RADIUS));O._default=O.WGS84;Object.defineProperties(O,{default:{get:function(){return O._default},set:function(n){c.typeOf.object("value",n),O._default=n,y._ellipsoidRadiiSquared=n.radiiSquared,$._ellipsoidOneOverRadii=n.oneOverRadii,$._ellipsoidOneOverRadiiSquared=n.oneOverRadiiSquared,$._ellipsoidCenterToleranceSquared=n._centerToleranceSquared}}});O.prototype.clone=function(n){return O.clone(this,n)};O.packedLength=y.packedLength;O.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=o??0,y.pack(n._radii,e,o),e};O.unpack=function(n,e,o){c.defined("array",n),e=e??0;let t=y.unpack(n,e);return O.fromCartesian3(t,o)};O.prototype.geocentricSurfaceNormal=y.normalize;O.prototype.geodeticSurfaceNormalCartographic=function(n,e){c.typeOf.object("cartographic",n);let o=n.longitude,t=n.latitude,i=Math.cos(t),p=i*Math.cos(o),d=i*Math.sin(o),m=Math.sin(t);return u(e)||(e=new y),e.x=p,e.y=d,e.z=m,y.normalize(e,e)};O.prototype.geodeticSurfaceNormal=function(n,e){if(c.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new g("cartesian has a NaN component");if(!y.equalsEpsilon(n,y.ZERO,h.EPSILON14))return u(e)||(e=new y),e=y.multiplyComponents(n,this._oneOverRadiiSquared,e),y.normalize(e,e)};var ee=new y,oe=new y;O.prototype.cartographicToCartesian=function(n,e){let o=ee,t=oe;this.geodeticSurfaceNormalCartographic(n,o),y.multiplyComponents(this._radiiSquared,o,t);let i=Math.sqrt(y.dot(o,t));return y.divideByScalar(t,i,t),y.multiplyByScalar(o,n.height,o),u(e)||(e=new y),y.add(t,o,e)};O.prototype.cartographicArrayToCartesianArray=function(n,e){c.defined("cartographics",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;t++)e[t]=this.cartographicToCartesian(n[t],e[t]);return e};var te=new y,ce=new y,ie=new y;O.prototype.cartesianToCartographic=function(n,e){let o=this.scaleToGeodeticSurface(n,ce);if(!u(o))return;let t=this.geodeticSurfaceNormal(o,te),i=y.subtract(n,o,ie),p=Math.atan2(t.y,t.x),d=Math.asin(t.z),m=h.sign(y.dot(i,n))*y.magnitude(i);return u(e)?(e.longitude=p,e.latitude=d,e.height=m,e):new $(p,d,m)};O.prototype.cartesianArrayToCartographicArray=function(n,e){c.defined("cartesians",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;++t)e[t]=this.cartesianToCartographic(n[t],e[t]);return e};O.prototype.scaleToGeodeticSurface=function(n,e){return G(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)};O.prototype.scaleToGeocentricSurface=function(n,e){c.typeOf.object("cartesian",n),u(e)||(e=new y);let o=n.x,t=n.y,i=n.z,p=this._oneOverRadiiSquared,d=1/Math.sqrt(o*o*p.x+t*t*p.y+i*i*p.z);return y.multiplyByScalar(n,d,e)};O.prototype.transformPositionToScaledSpace=function(n,e){return u(e)||(e=new y),y.multiplyComponents(n,this._oneOverRadii,e)};O.prototype.transformPositionFromScaledSpace=function(n,e){return u(e)||(e=new y),y.multiplyComponents(n,this._radii,e)};O.prototype.equals=function(n){return this===n||u(n)&&y.equals(this._radii,n._radii)};O.prototype.toString=function(){return this._radii.toString()};O.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,e,o){if(c.typeOf.object("position",n),!h.equalsEpsilon(this._radii.x,this._radii.y,h.EPSILON15))throw new g("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");c.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),e=e??0;let t=this._squaredXOverSquaredZ;if(u(o)||(o=new y),o.x=0,o.y=0,o.z=n.z*(1-t),!(Math.abs(o.z)>=this._radii.z-e))return o};var fe=new y;O.prototype.getLocalCurvature=function(n,e){c.typeOf.object("surfacePosition",n),u(e)||(e=new yn);let o=this.getSurfaceNormalIntersectionWithZAxis(n,0,fe),t=y.distance(n,o),i=this.minimumRadius*t/this.maximumRadius**2,p=t*i**2;return yn.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}O.prototype.surfaceArea=function(n){c.typeOf.object("rectangle",n);let e=n.west,o=n.east,t=n.south,i=n.north;for(;o<e;)o+=h.TWO_PI;let p=this._radiiSquared,d=p.x,m=p.y,s=p.z,b=d*m;return xn(t,i,function(w){let S=Math.cos(w),R=Math.sin(w);return Math.cos(w)*xn(e,o,function(M){let C=Math.cos(M),_=Math.sin(M);return Math.sqrt(b*R*R+s*(m*C*C+d*_*_)*S*S)})})};var oo=O;function r(n,e,o,t,i,p,d,m,s){this[0]=n??0,this[1]=t??0,this[2]=d??0,this[3]=e??0,this[4]=i??0,this[5]=m??0,this[6]=o??0,this[7]=p??0,this[8]=s??0}r.packedLength=9;r.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=o??0,e[o++]=n[0],e[o++]=n[1],e[o++]=n[2],e[o++]=n[3],e[o++]=n[4],e[o++]=n[5],e[o++]=n[6],e[o++]=n[7],e[o++]=n[8],e};r.unpack=function(n,e,o){return c.defined("array",n),e=e??0,u(o)||(o=new r),o[0]=n[e++],o[1]=n[e++],o[2]=n[e++],o[3]=n[e++],o[4]=n[e++],o[5]=n[e++],o[6]=n[e++],o[7]=n[e++],o[8]=n[e++],o};r.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*9;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 9 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)r.pack(n[i],e,i*9);return e};r.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,9),n.length%9!==0)throw new g("array length must be a multiple of 9.");let o=n.length;u(e)?e.length=o/9:e=new Array(o/9);for(let t=0;t<o;t+=9){let i=t/9;e[i]=r.unpack(n,t,e[i])}return e};r.clone=function(n,e){if(u(n))return u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):new r(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])};r.fromArray=r.unpack;r.fromColumnMajorArray=function(n,e){return c.defined("values",n),r.clone(n,e)};r.fromRowMajorArray=function(n,e){return c.defined("values",n),u(e)?(e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],e):new r(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])};r.fromQuaternion=function(n,e){c.typeOf.object("quaternion",n);let o=n.x*n.x,t=n.x*n.y,i=n.x*n.z,p=n.x*n.w,d=n.y*n.y,m=n.y*n.z,s=n.y*n.w,b=n.z*n.z,w=n.z*n.w,S=n.w*n.w,R=o-d-b+S,M=2*(t-w),C=2*(i+s),_=2*(t+w),N=-o+d-b+S,B=2*(m-p),U=2*(i-s),P=2*(m+p),F=-o-d+b+S;return u(e)?(e[0]=R,e[1]=_,e[2]=U,e[3]=M,e[4]=N,e[5]=P,e[6]=C,e[7]=B,e[8]=F,e):new r(R,M,C,_,N,B,U,P,F)};r.fromHeadingPitchRoll=function(n,e){c.typeOf.object("headingPitchRoll",n);let o=Math.cos(-n.pitch),t=Math.cos(-n.heading),i=Math.cos(n.roll),p=Math.sin(-n.pitch),d=Math.sin(-n.heading),m=Math.sin(n.roll),s=o*t,b=-i*d+m*p*t,w=m*d+i*p*t,S=o*d,R=i*t+m*p*d,M=-m*t+i*p*d,C=-p,_=m*o,N=i*o;return u(e)?(e[0]=s,e[1]=S,e[2]=C,e[3]=b,e[4]=R,e[5]=_,e[6]=w,e[7]=M,e[8]=N,e):new r(s,b,w,S,R,M,C,_,N)};r.fromScale=function(n,e){return c.typeOf.object("scale",n),u(e)?(e[0]=n.x,e[1]=0,e[2]=0,e[3]=0,e[4]=n.y,e[5]=0,e[6]=0,e[7]=0,e[8]=n.z,e):new r(n.x,0,0,0,n.y,0,0,0,n.z)};r.fromUniformScale=function(n,e){return c.typeOf.number("scale",n),u(e)?(e[0]=n,e[1]=0,e[2]=0,e[3]=0,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=n,e):new r(n,0,0,0,n,0,0,0,n)};r.fromCrossProduct=function(n,e){return c.typeOf.object("vector",n),u(e)?(e[0]=0,e[1]=n.z,e[2]=-n.y,e[3]=-n.z,e[4]=0,e[5]=n.x,e[6]=n.y,e[7]=-n.x,e[8]=0,e):new r(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)};r.fromRotationX=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=o,e[5]=t,e[6]=0,e[7]=-t,e[8]=o,e):new r(1,0,0,0,o,-t,0,t,o)};r.fromRotationY=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=0,e[2]=-t,e[3]=0,e[4]=1,e[5]=0,e[6]=t,e[7]=0,e[8]=o,e):new r(o,0,t,0,1,0,-t,0,o)};r.fromRotationZ=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=t,e[2]=0,e[3]=-t,e[4]=o,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new r(o,-t,0,t,o,0,0,0,1)};r.toArray=function(n,e){return c.typeOf.object("matrix",n),u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]};r.getElementIndex=function(n,e){return c.typeOf.number.greaterThanOrEquals("row",e,0),c.typeOf.number.lessThanOrEquals("row",e,2),c.typeOf.number.greaterThanOrEquals("column",n,0),c.typeOf.number.lessThanOrEquals("column",n,2),n*3+e};r.getColumn=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=e*3,i=n[t],p=n[t+1],d=n[t+2];return o.x=i,o.y=p,o.z=d,o};r.setColumn=function(n,e,o,t){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t);let i=e*3;return t[i]=o.x,t[i+1]=o.y,t[i+2]=o.z,t};r.getRow=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=n[e],i=n[e+3],p=n[e+6];return o.x=t,o.y=i,o.z=p,o};r.setRow=function(n,e,o,t){return c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t),t[e]=o.x,t[e+3]=o.y,t[e+6]=o.z,t};var ue=new y;r.setScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,ue),i=e.x/t.x,p=e.y/t.y,d=e.z/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var ae=new y;r.setUniformScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,ae),i=e/t.x,p=e/t.y,d=e/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var mn=new y;r.getScale=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e.x=y.magnitude(y.fromElements(n[0],n[1],n[2],mn)),e.y=y.magnitude(y.fromElements(n[3],n[4],n[5],mn)),e.z=y.magnitude(y.fromElements(n[6],n[7],n[8],mn)),e};var kn=new y;r.getMaximumScale=function(n){return r.getScale(n,kn),y.maximumComponent(kn)};var de=new y;r.setRotation=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let t=r.getScale(n,de);return o[0]=e[0]*t.x,o[1]=e[1]*t.x,o[2]=e[2]*t.x,o[3]=e[3]*t.y,o[4]=e[4]*t.y,o[5]=e[5]*t.y,o[6]=e[6]*t.z,o[7]=e[7]*t.z,o[8]=e[8]*t.z,o};var ye=new y;r.getRotation=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=r.getScale(n,ye);return e[0]=n[0]/o.x,e[1]=n[1]/o.x,e[2]=n[2]/o.x,e[3]=n[3]/o.y,e[4]=n[4]/o.y,e[5]=n[5]/o.y,e[6]=n[6]/o.z,e[7]=n[7]/o.z,e[8]=n[8]/o.z,e};r.multiply=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n[0]*e[0]+n[3]*e[1]+n[6]*e[2],i=n[1]*e[0]+n[4]*e[1]+n[7]*e[2],p=n[2]*e[0]+n[5]*e[1]+n[8]*e[2],d=n[0]*e[3]+n[3]*e[4]+n[6]*e[5],m=n[1]*e[3]+n[4]*e[4]+n[7]*e[5],s=n[2]*e[3]+n[5]*e[4]+n[8]*e[5],b=n[0]*e[6]+n[3]*e[7]+n[6]*e[8],w=n[1]*e[6]+n[4]*e[7]+n[7]*e[8],S=n[2]*e[6]+n[5]*e[7]+n[8]*e[8];return o[0]=t,o[1]=i,o[2]=p,o[3]=d,o[4]=m,o[5]=s,o[6]=b,o[7]=w,o[8]=S,o};r.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]+e[0],o[1]=n[1]+e[1],o[2]=n[2]+e[2],o[3]=n[3]+e[3],o[4]=n[4]+e[4],o[5]=n[5]+e[5],o[6]=n[6]+e[6],o[7]=n[7]+e[7],o[8]=n[8]+e[8],o};r.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],o[3]=n[3]-e[3],o[4]=n[4]-e[4],o[5]=n[5]-e[5],o[6]=n[6]-e[6],o[7]=n[7]-e[7],o[8]=n[8]-e[8],o};r.multiplyByVector=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("cartesian",e),c.typeOf.object("result",o);let t=e.x,i=e.y,p=e.z,d=n[0]*t+n[3]*i+n[6]*p,m=n[1]*t+n[4]*i+n[7]*p,s=n[2]*t+n[5]*i+n[8]*p;return o.x=d,o.y=m,o.z=s,o};r.multiplyByScalar=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.multiplyByScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e.x,o[1]=n[1]*e.x,o[2]=n[2]*e.x,o[3]=n[3]*e.y,o[4]=n[4]*e.y,o[5]=n[5]*e.y,o[6]=n[6]*e.z,o[7]=n[7]*e.z,o[8]=n[8]*e.z,o};r.multiplyByUniformScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.negate=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e[4]=-n[4],e[5]=-n[5],e[6]=-n[6],e[7]=-n[7],e[8]=-n[8],e};r.transpose=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[3],i=n[6],p=n[1],d=n[4],m=n[7],s=n[2],b=n[5],w=n[8];return e[0]=o,e[1]=t,e[2]=i,e[3]=p,e[4]=d,e[5]=m,e[6]=s,e[7]=b,e[8]=w,e};function me(n){let e=0;for(let o=0;o<9;++o){let t=n[o];e+=t*t}return Math.sqrt(e)}var sn=[1,0,0],On=[2,2,1];function se(n){let e=0;for(let o=0;o<3;++o){let t=n[r.getElementIndex(On[o],sn[o])];e+=2*t*t}return Math.sqrt(e)}function Oe(n,e){let o=h.EPSILON15,t=0,i=1;for(let b=0;b<3;++b){let w=Math.abs(n[r.getElementIndex(On[b],sn[b])]);w>t&&(i=b,t=w)}let p=1,d=0,m=sn[i],s=On[i];if(Math.abs(n[r.getElementIndex(s,m)])>o){let b=n[r.getElementIndex(s,s)],w=n[r.getElementIndex(m,m)],S=n[r.getElementIndex(s,m)],R=(b-w)/2/S,M;R<0?M=-1/(-R+Math.sqrt(1+R*R)):M=1/(R+Math.sqrt(1+R*R)),p=1/Math.sqrt(1+M*M),d=M*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 Q=new r,Bn=new r;r.computeEigenDecomposition=function(n,e){c.typeOf.object("matrix",n);let o=h.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(;p<t&&se(m)>s;)Oe(m,Q),r.transpose(Q,Bn),r.multiply(m,Q,m),r.multiply(Bn,m,m),r.multiply(d,Q,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],b=n[8];return e*(p*b-s*d)+i*(s*t-o*b)+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],b=n[7],w=n[8],S=r.determinant(n);if(Math.abs(S)<=h.EPSILON15)throw new g("matrix is not invertible");e[0]=d*w-b*m,e[1]=b*i-t*w,e[2]=t*m-d*i,e[3]=s*m-p*w,e[4]=o*w-s*i,e[5]=p*i-o*m,e[6]=p*b-s*d,e[7]=s*t-o*b,e[8]=o*d-p*t;let R=1/S;return r.multiplyByScalar(e,R,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??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]})
|
|
26
|
+
import{a as h}from"./chunk-PO64KPKA.js";import{a as g,b as c}from"./chunk-R3KD5ZAI.js";import{e as u}from"./chunk-GBI3IATP.js";function f(n,e,o){this.x=n??0,this.y=e??0,this.z=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=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??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=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 g("If result is a typed array, it must have exactly array.length * 3 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)f.pack(n[i],e,i*3);return e};f.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new g("array length must be a multiple of 3.");let o=n.length;u(e)?e.length=o/3:e=new Array(o/3);for(let t=0;t<o;t+=3){let i=t/3;e[i]=f.unpack(n,t,e[i])}return e};f.fromArray=f.unpack;f.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z)};f.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z)};f.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o.z=Math.min(n.z,e.z),o};f.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o.z=Math.max(n.z,e.z),o};f.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=h.clamp(n.x,e.x,o.x),p=h.clamp(n.y,e.y,o.y),d=h.clamp(n.z,e.z,o.z);return t.x=i,t.y=p,t.z=d,t};f.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z};f.magnitude=function(n){return Math.sqrt(f.magnitudeSquared(n))};var X=new f;f.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,X),f.magnitude(X)};f.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),f.subtract(n,e,X),f.magnitudeSquared(X)};f.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,e.z=n.z/o,isNaN(e.x)||isNaN(e.y)||isNaN(e.z))throw new g("normalized result is not a number");return e};f.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y+n.z*e.z};f.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o.z=n.z*e.z,o};f.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o.z=n.z/e.z,o};f.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o.z=n.z+e.z,o};f.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o.z=n.z-e.z,o};f.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o.z=n.z*e,o};f.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o.z=n.z/e,o};f.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e.z=-n.z,e};f.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e.z=Math.abs(n.z),e};var Tn=new f;f.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),f.multiplyByScalar(e,o,Tn),t=f.multiplyByScalar(n,1-o,t),f.add(Tn,t,t)};var Y=new f,dn=new f;f.angleBetween=function(n,e){c.typeOf.object("left",n),c.typeOf.object("right",e),f.normalize(n,Y),f.normalize(e,dn);let o=f.dot(Y,dn),t=f.magnitude(f.cross(Y,dn,Y));return Math.atan2(t,o)};var Yn=new f;f.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=f.normalize(n,Yn);return f.abs(o,o),o.x<=o.y?o.x<=o.z?e=f.clone(f.UNIT_X,e):e=f.clone(f.UNIT_Z,e):o.y<=o.z?e=f.clone(f.UNIT_Y,e):e=f.clone(f.UNIT_Z,e),e};f.projectVector=function(n,e,o){c.defined("a",n),c.defined("b",e),c.defined("result",o);let t=f.dot(n,e)/f.dot(e,e);return f.multiplyByScalar(e,t,o)};f.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y&&n.z===e.z};f.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]&&n.z===e[o+2]};f.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&h.equalsEpsilon(n.x,e.x,o,t)&&h.equalsEpsilon(n.y,e.y,o,t)&&h.equalsEpsilon(n.z,e.z,o,t)};f.cross=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n.x,i=n.y,p=n.z,d=e.x,m=e.y,s=e.z,b=i*s-p*m,w=p*d-t*s,S=t*m-i*d;return o.x=b,o.y=w,o.z=S,o};f.midpoint=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=(n.x+e.x)*.5,o.y=(n.y+e.y)*.5,o.z=(n.z+e.z)*.5,o};f.fromDegrees=function(n,e,o,t,i){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=h.toRadians(n),e=h.toRadians(e),f.fromRadians(n,e,o,t,i)};var T=new f,V=new f;f._ellipsoidRadiiSquared=new f(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);f.fromRadians=function(n,e,o,t,i){c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=o??0;let p=u(t)?t.radiiSquared:f._ellipsoidRadiiSquared,d=Math.cos(e);T.x=d*Math.cos(n),T.y=d*Math.sin(n),T.z=Math.sin(e),T=f.normalize(T,T),f.multiplyComponents(p,T,V);let m=Math.sqrt(f.dot(T,V));return V=f.divideByScalar(V,m,V),T=f.multiplyByScalar(T,o,T),u(i)||(i=new f),f.add(V,T,i)};f.fromDegreesArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],d=n[i+1],m=i/2;o[m]=f.fromDegrees(p,d,0,e,o[m])}return o};f.fromRadiansArray=function(n,e,o){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new g("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;u(o)?o.length=t/2:o=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],d=n[i+1],m=i/2;o[m]=f.fromRadians(p,d,0,e,o[m])}return o};f.fromDegreesArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],d=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromDegrees(p,d,m,e,o[s])}return o};f.fromRadiansArrayHeights=function(n,e,o){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new g("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;u(o)?o.length=t/3:o=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],d=n[i+1],m=n[i+2],s=i/3;o[s]=f.fromRadians(p,d,m,e,o[s])}return o};f.ZERO=Object.freeze(new f(0,0,0));f.ONE=Object.freeze(new f(1,1,1));f.UNIT_X=Object.freeze(new f(1,0,0));f.UNIT_Y=Object.freeze(new f(0,1,0));f.UNIT_Z=Object.freeze(new f(0,0,1));f.prototype.clone=function(n){return f.clone(this,n)};f.prototype.equals=function(n){return f.equals(this,n)};f.prototype.equalsEpsilon=function(n,e,o){return f.equalsEpsilon(this,n,e,o)};f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var y=f;var Xn=new y,Gn=new y;function Hn(n,e,o,t,i){if(!u(n))throw new g("cartesian is required.");if(!u(e))throw new g("oneOverRadii is required.");if(!u(o))throw new g("oneOverRadiiSquared is required.");if(!u(t))throw new g("centerToleranceSquared is required.");let p=n.x,d=n.y,m=n.z,s=e.x,b=e.y,w=e.z,S=p*p*s*s,R=d*d*b*b,M=m*m*w*w,C=S+R+M,_=Math.sqrt(1/C),N=y.multiplyByScalar(n,_,Xn);if(C<t)return isFinite(_)?y.clone(N,i):void 0;let B=o.x,U=o.y,P=o.z,F=Gn;F.x=N.x*B*2,F.y=N.y*U*2,F.z=N.z*P*2;let Z=(1-_)*y.magnitude(n)/(.5*y.magnitude(F)),Mn=0,rn,qn,I,L,W,pn,un,an,En,An,_n;do{Z-=Mn,I=1/(1+Z*B),L=1/(1+Z*U),W=1/(1+Z*P),pn=I*I,un=L*L,an=W*W,En=pn*I,An=un*L,_n=an*W,rn=S*pn+R*un+M*an-1,qn=S*En*B+R*An*U+M*_n*P;let Zn=-2*qn;Mn=rn/Zn}while(Math.abs(rn)>h.EPSILON12);return u(i)?(i.x=p*I,i.y=d*L,i.z=m*W,i):new y(p*I,d*L,m*W)}var G=Hn;function j(n,e,o){this.longitude=n??0,this.latitude=e??0,this.height=o??0}j.fromRadians=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),o=o??0,u(t)?(t.longitude=n,t.latitude=e,t.height=o,t):new j(n,e,o)};j.fromDegrees=function(n,e,o,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",e),n=h.toRadians(n),e=h.toRadians(e),j.fromRadians(n,e,o,t)};var Qn=new y,Jn=new y,Kn=new y;j._ellipsoidOneOverRadii=new y(1/6378137,1/6378137,1/6356752314245179e-9);j._ellipsoidOneOverRadiiSquared=new y(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9));j._ellipsoidCenterToleranceSquared=h.EPSILON1;j.fromCartesian=function(n,e,o){let t=u(e)?e.oneOverRadii:j._ellipsoidOneOverRadii,i=u(e)?e.oneOverRadiiSquared:j._ellipsoidOneOverRadiiSquared,p=u(e)?e._centerToleranceSquared:j._ellipsoidCenterToleranceSquared,d=G(n,t,i,p,Jn);if(!u(d))return;let m=y.multiplyComponents(d,i,Qn);m=y.normalize(m,m);let s=y.subtract(n,d,Kn),b=Math.atan2(m.y,m.x),w=Math.asin(m.z),S=h.sign(y.dot(s,n))*y.magnitude(s);return u(o)?(o.longitude=b,o.latitude=w,o.height=S,o):new j(b,w,S)};j.toCartesian=function(n,e,o){return c.defined("cartographic",n),y.fromRadians(n.longitude,n.latitude,n.height,e,o)};j.clone=function(n,e){if(u(n))return u(e)?(e.longitude=n.longitude,e.latitude=n.latitude,e.height=n.height,e):new j(n.longitude,n.latitude,n.height)};j.equals=function(n,e){return n===e||u(n)&&u(e)&&n.longitude===e.longitude&&n.latitude===e.latitude&&n.height===e.height};j.equalsEpsilon=function(n,e,o){return 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};j.ZERO=Object.freeze(new j(0,0,0));j.prototype.clone=function(n){return j.clone(this,n)};j.prototype.equals=function(n){return j.equals(this,n)};j.prototype.equalsEpsilon=function(n,e){return j.equalsEpsilon(this,n,e)};j.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var $=j;function a(n,e){this.x=n??0,this.y=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??0,e[o++]=n.x,e[o]=n.y,e};a.unpack=function(n,e,o){return c.defined("array",n),e=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 g("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<o;++i)a.pack(n[i],e,i*2);return e};a.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,2),n.length%2!==0)throw new g("array length must be a multiple of 2.");let o=n.length;u(e)?e.length=o/2:e=new Array(o/2);for(let t=0;t<o;t+=2){let i=t/2;e[i]=a.unpack(n,t,e[i])}return e};a.fromArray=a.unpack;a.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y)};a.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y)};a.minimumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.min(n.x,e.x),o.y=Math.min(n.y,e.y),o};a.maximumByComponent=function(n,e,o){return c.typeOf.object("first",n),c.typeOf.object("second",e),c.typeOf.object("result",o),o.x=Math.max(n.x,e.x),o.y=Math.max(n.y,e.y),o};a.clamp=function(n,e,o,t){c.typeOf.object("value",n),c.typeOf.object("min",e),c.typeOf.object("max",o),c.typeOf.object("result",t);let i=h.clamp(n.x,e.x,o.x),p=h.clamp(n.y,e.y,o.y);return t.x=i,t.y=p,t};a.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y};a.magnitude=function(n){return Math.sqrt(a.magnitudeSquared(n))};var H=new a;a.distance=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitude(H)};a.distanceSquared=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.subtract(n,e,H),a.magnitudeSquared(H)};a.normalize=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.magnitude(n);if(e.x=n.x/o,e.y=n.y/o,isNaN(e.x)||isNaN(e.y))throw new g("normalized result is not a number");return e};a.dot=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.x+n.y*e.y};a.cross=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),n.x*e.y-n.y*e.x};a.multiplyComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x*e.x,o.y=n.y*e.y,o};a.divideComponents=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x/e.x,o.y=n.y/e.y,o};a.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x+e.x,o.y=n.y+e.y,o};a.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o.x=n.x-e.x,o.y=n.y-e.y,o};a.multiplyByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x*e,o.y=n.y*e,o};a.divideByScalar=function(n,e,o){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o.x=n.x/e,o.y=n.y/e,o};a.negate=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=-n.x,e.y=-n.y,e};a.abs=function(n,e){return c.typeOf.object("cartesian",n),c.typeOf.object("result",e),e.x=Math.abs(n.x),e.y=Math.abs(n.y),e};var ln=new a;a.lerp=function(n,e,o,t){return c.typeOf.object("start",n),c.typeOf.object("end",e),c.typeOf.number("t",o),c.typeOf.object("result",t),a.multiplyByScalar(e,o,ln),t=a.multiplyByScalar(n,1-o,t),a.add(ln,t,t)};var Cn=new a,Nn=new a;a.angleBetween=function(n,e){return c.typeOf.object("left",n),c.typeOf.object("right",e),a.normalize(n,Cn),a.normalize(e,Nn),h.acosClamped(a.dot(Cn,Nn))};var ne=new a;a.mostOrthogonalAxis=function(n,e){c.typeOf.object("cartesian",n),c.typeOf.object("result",e);let o=a.normalize(n,ne);return a.abs(o,o),o.x<=o.y?e=a.clone(a.UNIT_X,e):e=a.clone(a.UNIT_Y,e),e};a.equals=function(n,e){return n===e||u(n)&&u(e)&&n.x===e.x&&n.y===e.y};a.equalsArray=function(n,e,o){return n.x===e[o]&&n.y===e[o+1]};a.equalsEpsilon=function(n,e,o,t){return n===e||u(n)&&u(e)&&h.equalsEpsilon(n.x,e.x,o,t)&&h.equalsEpsilon(n.y,e.y,o,t)};a.ZERO=Object.freeze(new a(0,0));a.ONE=Object.freeze(new a(1,1));a.UNIT_X=Object.freeze(new a(1,0));a.UNIT_Y=Object.freeze(new a(0,1));a.prototype.clone=function(n){return a.clone(this,n)};a.prototype.equals=function(n){return a.equals(this,n)};a.prototype.equalsEpsilon=function(n,e,o){return a.equalsEpsilon(this,n,e,o)};a.prototype.toString=function(){return`(${this.x}, ${this.y})`};var yn=a;function Fn(n,e,o,t){e=e??0,o=o??0,t=t??0,c.typeOf.number.greaterThanOrEquals("x",e,0),c.typeOf.number.greaterThanOrEquals("y",o,0),c.typeOf.number.greaterThanOrEquals("z",t,0),n._radii=new y(e,o,t),n._radiiSquared=new y(e*e,o*o,t*t),n._radiiToTheFourth=new y(e*e*e*e,o*o*o*o,t*t*t*t),n._oneOverRadii=new y(e===0?0:1/e,o===0?0:1/o,t===0?0:1/t),n._oneOverRadiiSquared=new y(e===0?0:1/(e*e),o===0?0:1/(o*o),t===0?0:1/(t*t)),n._minimumRadius=Math.min(e,o,t),n._maximumRadius=Math.max(e,o,t),n._centerToleranceSquared=h.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function O(n,e,o){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,Fn(this,n,e,o)}Object.defineProperties(O.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}}});O.clone=function(n,e){if(!u(n))return;let o=n._radii;return u(e)?(y.clone(o,e._radii),y.clone(n._radiiSquared,e._radiiSquared),y.clone(n._radiiToTheFourth,e._radiiToTheFourth),y.clone(n._oneOverRadii,e._oneOverRadii),y.clone(n._oneOverRadiiSquared,e._oneOverRadiiSquared),e._minimumRadius=n._minimumRadius,e._maximumRadius=n._maximumRadius,e._centerToleranceSquared=n._centerToleranceSquared,e):new O(o.x,o.y,o.z)};O.fromCartesian3=function(n,e){return u(e)||(e=new O),u(n)&&Fn(e,n.x,n.y,n.z),e};O.WGS84=Object.freeze(new O(6378137,6378137,6356752314245179e-9));O.UNIT_SPHERE=Object.freeze(new O(1,1,1));O.MOON=Object.freeze(new O(h.LUNAR_RADIUS,h.LUNAR_RADIUS,h.LUNAR_RADIUS));O._default=O.WGS84;Object.defineProperties(O,{default:{get:function(){return O._default},set:function(n){c.typeOf.object("value",n),O._default=n,y._ellipsoidRadiiSquared=n.radiiSquared,$._ellipsoidOneOverRadii=n.oneOverRadii,$._ellipsoidOneOverRadiiSquared=n.oneOverRadiiSquared,$._ellipsoidCenterToleranceSquared=n._centerToleranceSquared}}});O.prototype.clone=function(n){return O.clone(this,n)};O.packedLength=y.packedLength;O.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=o??0,y.pack(n._radii,e,o),e};O.unpack=function(n,e,o){c.defined("array",n),e=e??0;let t=y.unpack(n,e);return O.fromCartesian3(t,o)};O.prototype.geocentricSurfaceNormal=y.normalize;O.prototype.geodeticSurfaceNormalCartographic=function(n,e){c.typeOf.object("cartographic",n);let o=n.longitude,t=n.latitude,i=Math.cos(t),p=i*Math.cos(o),d=i*Math.sin(o),m=Math.sin(t);return u(e)||(e=new y),e.x=p,e.y=d,e.z=m,y.normalize(e,e)};O.prototype.geodeticSurfaceNormal=function(n,e){if(c.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new g("cartesian has a NaN component");if(!y.equalsEpsilon(n,y.ZERO,h.EPSILON14))return u(e)||(e=new y),e=y.multiplyComponents(n,this._oneOverRadiiSquared,e),y.normalize(e,e)};var ee=new y,oe=new y;O.prototype.cartographicToCartesian=function(n,e){let o=ee,t=oe;this.geodeticSurfaceNormalCartographic(n,o),y.multiplyComponents(this._radiiSquared,o,t);let i=Math.sqrt(y.dot(o,t));return y.divideByScalar(t,i,t),y.multiplyByScalar(o,n.height,o),u(e)||(e=new y),y.add(t,o,e)};O.prototype.cartographicArrayToCartesianArray=function(n,e){c.defined("cartographics",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;t++)e[t]=this.cartographicToCartesian(n[t],e[t]);return e};var te=new y,ce=new y,ie=new y;O.prototype.cartesianToCartographic=function(n,e){let o=this.scaleToGeodeticSurface(n,ce);if(!u(o))return;let t=this.geodeticSurfaceNormal(o,te),i=y.subtract(n,o,ie),p=Math.atan2(t.y,t.x),d=Math.asin(t.z),m=h.sign(y.dot(i,n))*y.magnitude(i);return u(e)?(e.longitude=p,e.latitude=d,e.height=m,e):new $(p,d,m)};O.prototype.cartesianArrayToCartographicArray=function(n,e){c.defined("cartesians",n);let o=n.length;u(e)?e.length=o:e=new Array(o);for(let t=0;t<o;++t)e[t]=this.cartesianToCartographic(n[t],e[t]);return e};O.prototype.scaleToGeodeticSurface=function(n,e){return G(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,e)};O.prototype.scaleToGeocentricSurface=function(n,e){c.typeOf.object("cartesian",n),u(e)||(e=new y);let o=n.x,t=n.y,i=n.z,p=this._oneOverRadiiSquared,d=1/Math.sqrt(o*o*p.x+t*t*p.y+i*i*p.z);return y.multiplyByScalar(n,d,e)};O.prototype.transformPositionToScaledSpace=function(n,e){return u(e)||(e=new y),y.multiplyComponents(n,this._oneOverRadii,e)};O.prototype.transformPositionFromScaledSpace=function(n,e){return u(e)||(e=new y),y.multiplyComponents(n,this._radii,e)};O.prototype.equals=function(n){return this===n||u(n)&&y.equals(this._radii,n._radii)};O.prototype.toString=function(){return this._radii.toString()};O.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,e,o){if(c.typeOf.object("position",n),!h.equalsEpsilon(this._radii.x,this._radii.y,h.EPSILON15))throw new g("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");c.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),e=e??0;let t=this._squaredXOverSquaredZ;if(u(o)||(o=new y),o.x=0,o.y=0,o.z=n.z*(1-t),!(Math.abs(o.z)>=this._radii.z-e))return o};var fe=new y;O.prototype.getLocalCurvature=function(n,e){c.typeOf.object("surfacePosition",n),u(e)||(e=new yn);let o=this.getSurfaceNormalIntersectionWithZAxis(n,0,fe),t=y.distance(n,o),i=this.minimumRadius*t/this.maximumRadius**2,p=t*i**2;return yn.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}O.prototype.surfaceArea=function(n){c.typeOf.object("rectangle",n);let e=n.west,o=n.east,t=n.south,i=n.north;for(;o<e;)o+=h.TWO_PI;let p=this._radiiSquared,d=p.x,m=p.y,s=p.z,b=d*m;return xn(t,i,function(w){let S=Math.cos(w),R=Math.sin(w);return Math.cos(w)*xn(e,o,function(M){let C=Math.cos(M),_=Math.sin(M);return Math.sqrt(b*R*R+s*(m*C*C+d*_*_)*S*S)})})};var oo=O;function r(n,e,o,t,i,p,d,m,s){this[0]=n??0,this[1]=t??0,this[2]=d??0,this[3]=e??0,this[4]=i??0,this[5]=m??0,this[6]=o??0,this[7]=p??0,this[8]=s??0}r.packedLength=9;r.pack=function(n,e,o){return c.typeOf.object("value",n),c.defined("array",e),o=o??0,e[o++]=n[0],e[o++]=n[1],e[o++]=n[2],e[o++]=n[3],e[o++]=n[4],e[o++]=n[5],e[o++]=n[6],e[o++]=n[7],e[o++]=n[8],e};r.unpack=function(n,e,o){return c.defined("array",n),e=e??0,u(o)||(o=new r),o[0]=n[e++],o[1]=n[e++],o[2]=n[e++],o[3]=n[e++],o[4]=n[e++],o[5]=n[e++],o[6]=n[e++],o[7]=n[e++],o[8]=n[e++],o};r.packArray=function(n,e){c.defined("array",n);let o=n.length,t=o*9;if(!u(e))e=new Array(t);else{if(!Array.isArray(e)&&e.length!==t)throw new g("If result is a typed array, it must have exactly array.length * 9 elements");e.length!==t&&(e.length=t)}for(let i=0;i<o;++i)r.pack(n[i],e,i*9);return e};r.unpackArray=function(n,e){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,9),n.length%9!==0)throw new g("array length must be a multiple of 9.");let o=n.length;u(e)?e.length=o/9:e=new Array(o/9);for(let t=0;t<o;t+=9){let i=t/9;e[i]=r.unpack(n,t,e[i])}return e};r.clone=function(n,e){if(u(n))return u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):new r(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])};r.fromArray=r.unpack;r.fromColumnMajorArray=function(n,e){return c.defined("values",n),r.clone(n,e)};r.fromRowMajorArray=function(n,e){return c.defined("values",n),u(e)?(e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],e):new r(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])};r.fromQuaternion=function(n,e){c.typeOf.object("quaternion",n);let o=n.x*n.x,t=n.x*n.y,i=n.x*n.z,p=n.x*n.w,d=n.y*n.y,m=n.y*n.z,s=n.y*n.w,b=n.z*n.z,w=n.z*n.w,S=n.w*n.w,R=o-d-b+S,M=2*(t-w),C=2*(i+s),_=2*(t+w),N=-o+d-b+S,B=2*(m-p),U=2*(i-s),P=2*(m+p),F=-o-d+b+S;return u(e)?(e[0]=R,e[1]=_,e[2]=U,e[3]=M,e[4]=N,e[5]=P,e[6]=C,e[7]=B,e[8]=F,e):new r(R,M,C,_,N,B,U,P,F)};r.fromHeadingPitchRoll=function(n,e){c.typeOf.object("headingPitchRoll",n);let o=Math.cos(-n.pitch),t=Math.cos(-n.heading),i=Math.cos(n.roll),p=Math.sin(-n.pitch),d=Math.sin(-n.heading),m=Math.sin(n.roll),s=o*t,b=-i*d+m*p*t,w=m*d+i*p*t,S=o*d,R=i*t+m*p*d,M=-m*t+i*p*d,C=-p,_=m*o,N=i*o;return u(e)?(e[0]=s,e[1]=S,e[2]=C,e[3]=b,e[4]=R,e[5]=_,e[6]=w,e[7]=M,e[8]=N,e):new r(s,b,w,S,R,M,C,_,N)};r.fromScale=function(n,e){return c.typeOf.object("scale",n),u(e)?(e[0]=n.x,e[1]=0,e[2]=0,e[3]=0,e[4]=n.y,e[5]=0,e[6]=0,e[7]=0,e[8]=n.z,e):new r(n.x,0,0,0,n.y,0,0,0,n.z)};r.fromUniformScale=function(n,e){return c.typeOf.number("scale",n),u(e)?(e[0]=n,e[1]=0,e[2]=0,e[3]=0,e[4]=n,e[5]=0,e[6]=0,e[7]=0,e[8]=n,e):new r(n,0,0,0,n,0,0,0,n)};r.fromCrossProduct=function(n,e){return c.typeOf.object("vector",n),u(e)?(e[0]=0,e[1]=n.z,e[2]=-n.y,e[3]=-n.z,e[4]=0,e[5]=n.x,e[6]=n.y,e[7]=-n.x,e[8]=0,e):new r(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)};r.fromRotationX=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=o,e[5]=t,e[6]=0,e[7]=-t,e[8]=o,e):new r(1,0,0,0,o,-t,0,t,o)};r.fromRotationY=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=0,e[2]=-t,e[3]=0,e[4]=1,e[5]=0,e[6]=t,e[7]=0,e[8]=o,e):new r(o,0,t,0,1,0,-t,0,o)};r.fromRotationZ=function(n,e){c.typeOf.number("angle",n);let o=Math.cos(n),t=Math.sin(n);return u(e)?(e[0]=o,e[1]=t,e[2]=0,e[3]=-t,e[4]=o,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e):new r(o,-t,0,t,o,0,0,0,1)};r.toArray=function(n,e){return c.typeOf.object("matrix",n),u(e)?(e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]};r.getElementIndex=function(n,e){return c.typeOf.number.greaterThanOrEquals("row",e,0),c.typeOf.number.lessThanOrEquals("row",e,2),c.typeOf.number.greaterThanOrEquals("column",n,0),c.typeOf.number.lessThanOrEquals("column",n,2),n*3+e};r.getColumn=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=e*3,i=n[t],p=n[t+1],d=n[t+2];return o.x=i,o.y=p,o.z=d,o};r.setColumn=function(n,e,o,t){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t);let i=e*3;return t[i]=o.x,t[i+1]=o.y,t[i+2]=o.z,t};r.getRow=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("result",o);let t=n[e],i=n[e+3],p=n[e+6];return o.x=t,o.y=i,o.z=p,o};r.setRow=function(n,e,o,t){return c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",e,0),c.typeOf.number.lessThanOrEquals("index",e,2),c.typeOf.object("cartesian",o),c.typeOf.object("result",t),t=r.clone(n,t),t[e]=o.x,t[e+3]=o.y,t[e+6]=o.z,t};var ue=new y;r.setScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,ue),i=e.x/t.x,p=e.y/t.y,d=e.z/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var ae=new y;r.setUniformScale=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o);let t=r.getScale(n,ae),i=e/t.x,p=e/t.y,d=e/t.z;return o[0]=n[0]*i,o[1]=n[1]*i,o[2]=n[2]*i,o[3]=n[3]*p,o[4]=n[4]*p,o[5]=n[5]*p,o[6]=n[6]*d,o[7]=n[7]*d,o[8]=n[8]*d,o};var mn=new y;r.getScale=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e.x=y.magnitude(y.fromElements(n[0],n[1],n[2],mn)),e.y=y.magnitude(y.fromElements(n[3],n[4],n[5],mn)),e.z=y.magnitude(y.fromElements(n[6],n[7],n[8],mn)),e};var kn=new y;r.getMaximumScale=function(n){return r.getScale(n,kn),y.maximumComponent(kn)};var de=new y;r.setRotation=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let t=r.getScale(n,de);return o[0]=e[0]*t.x,o[1]=e[1]*t.x,o[2]=e[2]*t.x,o[3]=e[3]*t.y,o[4]=e[4]*t.y,o[5]=e[5]*t.y,o[6]=e[6]*t.z,o[7]=e[7]*t.z,o[8]=e[8]*t.z,o};var ye=new y;r.getRotation=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=r.getScale(n,ye);return e[0]=n[0]/o.x,e[1]=n[1]/o.x,e[2]=n[2]/o.x,e[3]=n[3]/o.y,e[4]=n[4]/o.y,e[5]=n[5]/o.y,e[6]=n[6]/o.z,e[7]=n[7]/o.z,e[8]=n[8]/o.z,e};r.multiply=function(n,e,o){c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o);let t=n[0]*e[0]+n[3]*e[1]+n[6]*e[2],i=n[1]*e[0]+n[4]*e[1]+n[7]*e[2],p=n[2]*e[0]+n[5]*e[1]+n[8]*e[2],d=n[0]*e[3]+n[3]*e[4]+n[6]*e[5],m=n[1]*e[3]+n[4]*e[4]+n[7]*e[5],s=n[2]*e[3]+n[5]*e[4]+n[8]*e[5],b=n[0]*e[6]+n[3]*e[7]+n[6]*e[8],w=n[1]*e[6]+n[4]*e[7]+n[7]*e[8],S=n[2]*e[6]+n[5]*e[7]+n[8]*e[8];return o[0]=t,o[1]=i,o[2]=p,o[3]=d,o[4]=m,o[5]=s,o[6]=b,o[7]=w,o[8]=S,o};r.add=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]+e[0],o[1]=n[1]+e[1],o[2]=n[2]+e[2],o[3]=n[3]+e[3],o[4]=n[4]+e[4],o[5]=n[5]+e[5],o[6]=n[6]+e[6],o[7]=n[7]+e[7],o[8]=n[8]+e[8],o};r.subtract=function(n,e,o){return c.typeOf.object("left",n),c.typeOf.object("right",e),c.typeOf.object("result",o),o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],o[3]=n[3]-e[3],o[4]=n[4]-e[4],o[5]=n[5]-e[5],o[6]=n[6]-e[6],o[7]=n[7]-e[7],o[8]=n[8]-e[8],o};r.multiplyByVector=function(n,e,o){c.typeOf.object("matrix",n),c.typeOf.object("cartesian",e),c.typeOf.object("result",o);let t=e.x,i=e.y,p=e.z,d=n[0]*t+n[3]*i+n[6]*p,m=n[1]*t+n[4]*i+n[7]*p,s=n[2]*t+n[5]*i+n[8]*p;return o.x=d,o.y=m,o.z=s,o};r.multiplyByScalar=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scalar",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.multiplyByScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.object("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e.x,o[1]=n[1]*e.x,o[2]=n[2]*e.x,o[3]=n[3]*e.y,o[4]=n[4]*e.y,o[5]=n[5]*e.y,o[6]=n[6]*e.z,o[7]=n[7]*e.z,o[8]=n[8]*e.z,o};r.multiplyByUniformScale=function(n,e,o){return c.typeOf.object("matrix",n),c.typeOf.number("scale",e),c.typeOf.object("result",o),o[0]=n[0]*e,o[1]=n[1]*e,o[2]=n[2]*e,o[3]=n[3]*e,o[4]=n[4]*e,o[5]=n[5]*e,o[6]=n[6]*e,o[7]=n[7]*e,o[8]=n[8]*e,o};r.negate=function(n,e){return c.typeOf.object("matrix",n),c.typeOf.object("result",e),e[0]=-n[0],e[1]=-n[1],e[2]=-n[2],e[3]=-n[3],e[4]=-n[4],e[5]=-n[5],e[6]=-n[6],e[7]=-n[7],e[8]=-n[8],e};r.transpose=function(n,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let o=n[0],t=n[3],i=n[6],p=n[1],d=n[4],m=n[7],s=n[2],b=n[5],w=n[8];return e[0]=o,e[1]=t,e[2]=i,e[3]=p,e[4]=d,e[5]=m,e[6]=s,e[7]=b,e[8]=w,e};function me(n){let e=0;for(let o=0;o<9;++o){let t=n[o];e+=t*t}return Math.sqrt(e)}var sn=[1,0,0],On=[2,2,1];function se(n){let e=0;for(let o=0;o<3;++o){let t=n[r.getElementIndex(On[o],sn[o])];e+=2*t*t}return Math.sqrt(e)}function Oe(n,e){let o=h.EPSILON15,t=0,i=1;for(let b=0;b<3;++b){let w=Math.abs(n[r.getElementIndex(On[b],sn[b])]);w>t&&(i=b,t=w)}let p=1,d=0,m=sn[i],s=On[i];if(Math.abs(n[r.getElementIndex(s,m)])>o){let b=n[r.getElementIndex(s,s)],w=n[r.getElementIndex(m,m)],S=n[r.getElementIndex(s,m)],R=(b-w)/2/S,M;R<0?M=-1/(-R+Math.sqrt(1+R*R)):M=1/(R+Math.sqrt(1+R*R)),p=1/Math.sqrt(1+M*M),d=M*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 Q=new r,Bn=new r;r.computeEigenDecomposition=function(n,e){c.typeOf.object("matrix",n);let o=h.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(;p<t&&se(m)>s;)Oe(m,Q),r.transpose(Q,Bn),r.multiply(m,Q,m),r.multiply(Bn,m,m),r.multiply(d,Q,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],b=n[8];return e*(p*b-s*d)+i*(s*t-o*b)+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],b=n[7],w=n[8],S=r.determinant(n);if(Math.abs(S)<=h.EPSILON15)throw new g("matrix is not invertible");e[0]=d*w-b*m,e[1]=b*i-t*w,e[2]=t*m-d*i,e[3]=s*m-p*w,e[4]=o*w-s*i,e[5]=p*i-o*m,e[6]=p*b-s*d,e[7]=s*t-o*b,e[8]=o*d-p*t;let R=1/S;return r.multiplyByScalar(e,R,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??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]})
|
|
27
27
|
(${this[1]}, ${this[4]}, ${this[7]})
|
|
28
28
|
(${this[2]}, ${this[5]}, ${this[8]})`};var uo=r;var bn={};bn.EMPTY_OBJECT=Object.freeze({});bn.EMPTY_ARRAY=Object.freeze([]);var yo=bn;var x,z={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},A={};Object.defineProperties(A,{element:{get:function(){if(A.supportsFullscreen())return document[z.fullscreenElement]}},changeEventName:{get:function(){if(A.supportsFullscreen())return z.fullscreenchange}},errorEventName:{get:function(){if(A.supportsFullscreen())return z.fullscreenerror}},enabled:{get:function(){if(A.supportsFullscreen())return document[z.fullscreenEnabled]}},fullscreen:{get:function(){if(A.supportsFullscreen())return A.element!==null}}});A.supportsFullscreen=function(){if(u(x))return x;x=!1;let n=document.body;if(typeof n.requestFullscreen=="function")return z.requestFullscreen="requestFullscreen",z.exitFullscreen="exitFullscreen",z.fullscreenEnabled="fullscreenEnabled",z.fullscreenElement="fullscreenElement",z.fullscreenchange="fullscreenchange",z.fullscreenerror="fullscreenerror",x=!0,x;let e=["webkit","moz","o","ms","khtml"],o;for(let t=0,i=e.length;t<i;++t){let p=e[t];o=`${p}RequestFullscreen`,typeof n[o]=="function"?(z.requestFullscreen=o,x=!0):(o=`${p}RequestFullScreen`,typeof n[o]=="function"&&(z.requestFullscreen=o,x=!0)),o=`${p}ExitFullscreen`,typeof document[o]=="function"?z.exitFullscreen=o:(o=`${p}CancelFullScreen`,typeof document[o]=="function"&&(z.exitFullscreen=o)),o=`${p}FullscreenEnabled`,document[o]!==void 0?z.fullscreenEnabled=o:(o=`${p}FullScreenEnabled`,document[o]!==void 0&&(z.fullscreenEnabled=o)),o=`${p}FullscreenElement`,document[o]!==void 0?z.fullscreenElement=o:(o=`${p}FullScreenElement`,document[o]!==void 0&&(z.fullscreenElement=o)),o=`${p}fullscreenchange`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenChange"),z.fullscreenchange=o),o=`${p}fullscreenerror`,document[`on${o}`]!==void 0&&(p==="ms"&&(o="MSFullscreenError"),z.fullscreenerror=o)}return x};A.requestFullscreen=function(n,e){A.supportsFullscreen()&&n[z.requestFullscreen]({vrDisplay:e})};A.exitFullscreen=function(){A.supportsFullscreen()&&document[z.exitFullscreen]()};A._names=z;var Un=A;var E;typeof navigator<"u"?E=navigator:E={};function k(n){let e=n.split(".");for(let o=0,t=e.length;o<t;++o)e[o]=parseInt(e[o],10);return e}var J,Pn;function zn(){if(!u(J)&&(J=!1,!cn())){let n=/ Chrome\/([\.0-9]+)/.exec(E.userAgent);n!==null&&(J=!0,Pn=k(n[1]))}return J}function he(){return zn()&&Pn}var K,In;function Ln(){if(!u(K)&&(K=!1,!zn()&&!cn()&&/ Safari\/[\.0-9]+/.test(E.userAgent))){let n=/ Version\/([\.0-9]+)/.exec(E.userAgent);n!==null&&(K=!0,In=k(n[1]))}return K}function we(){return Ln()&&In}var nn,gn;function Wn(){if(!u(nn)){nn=!1;let n=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(E.userAgent);n!==null&&(nn=!0,gn=k(n[1]),gn.isNightly=!!n[2])}return nn}function je(){return Wn()&&gn}var D,Sn;function Vn(){if(!u(D)){D=!1;let n;E.appName==="Microsoft Internet Explorer"?(n=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(E.userAgent),n!==null&&(D=!0,Sn=k(n[1]))):E.appName==="Netscape"&&(n=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(E.userAgent),n!==null&&(D=!0,Sn=k(n[1])))}return D}function ge(){return Vn()&&Sn}var en,vn;function cn(){if(!u(en)){en=!1;let n=/ Edg\/([\.0-9]+)/.exec(E.userAgent);n!==null&&(en=!0,vn=k(n[1]))}return en}function Se(){return cn()&&vn}var on,Rn;function fn(){if(!u(on)){on=!1;let n=/Firefox\/([\.0-9]+)/.exec(E.userAgent);n!==null&&(on=!0,Rn=k(n[1]))}return on}var hn;function ze(){return u(hn)||(hn=/Windows/i.test(E.appVersion)),hn}var wn;function Re(){return u(wn)||(wn=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),wn}function Me(){return fn()&&Rn}var jn;function qe(){return u(jn)||(jn=!fn()&&typeof PointerEvent<"u"&&(!u(E.pointerEnabled)||E.pointerEnabled)),jn}var $n,tn;function Dn(){if(!u(tn)){let n=document.createElement("canvas");n.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");let e=n.style.imageRendering;tn=u(e)&&e!=="",tn&&($n=e)}return tn}function Ee(){return Dn()?$n:void 0}function q(){if(!q.initialized)throw new g("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return q._result}q._promise=void 0;q._result=void 0;q.initialize=function(){return u(q._promise)||(q._promise=new Promise(n=>{let e=new Image;e.onload=function(){q._result=e.width>0&&e.height>0,n(q._result)},e.onerror=function(){q._result=!1,n(q._result)},e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),q._promise};Object.defineProperties(q,{initialized:{get:function(){return u(q._result)}}});var v=[];typeof ArrayBuffer<"u"&&(v.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&v.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&v.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&v.push(BigInt64Array),typeof BigUint64Array<"u"&&v.push(BigUint64Array));var l={isChrome:zn,chromeVersion:he,isSafari:Ln,safariVersion:we,isWebkit:Wn,webkitVersion:je,isInternetExplorer:Vn,internetExplorerVersion:ge,isEdge:cn,edgeVersion:Se,isFirefox:fn,firefoxVersion:Me,isWindows:ze,isIPadOrIOS:Re,hardwareConcurrency:E.hardwareConcurrency??3,supportsPointerEvents:qe,supportsImageRenderingPixelated:Dn,supportsWebP:q,imageRenderingValue:Ee,typedArrayTypes:v};l.supportsBasis=function(n){return l.supportsWebAssembly()&&n.context.supportsBasis};l.supportsFullscreen=function(){return Un.supportsFullscreen()};l.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"};l.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"};l.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"};l.supportsBigInt=function(){return typeof BigInt<"u"};l.supportsWebWorkers=function(){return typeof Worker<"u"};l.supportsWebAssembly=function(){return typeof WebAssembly<"u"};l.supportsWebgl2=function(n){return c.defined("scene",n),n.context.webgl2};l.supportsEsmWebWorkers=function(){return!fn()||parseInt(Rn)>=114};var go=l;export{y as a,$ as b,yn as c,oo as d,uo as e,yo as f,go as g};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{e as f}from"./chunk-
|
|
26
|
+
import{e as f}from"./chunk-GBI3IATP.js";function c(t){let n,a=t.name,e=t.message;f(a)&&f(e)?n=`${a}: ${e}`:n=t.toString();let o=t.stack;return f(o)&&(n+=`
|
|
27
27
|
${o}`),n}var i=c;function l(t){async function n({data:e}){let o=[],s={id:e.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=e.baseUrl;try{let r=await t(e.parameters,o);s.result=r}catch(r){r instanceof Error?s.error={name:r.name,message:r.message,stack:r.stack}:s.error=r}e.canTransferArrayBuffer||(o.length=0);try{postMessage(s,o)}catch(r){s.result=void 0,s.error=`postMessage failed with error: ${i(r)}
|
|
28
28
|
with responseMessage: ${JSON.stringify(s)}`,postMessage(s)}}function a(e){postMessage({id:e.data?.id,error:`postMessage failed with error: ${JSON.stringify(e)}`})}return self.onmessage=n,self.onmessageerror=a,self}var d=l;export{d as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{c as Z}from"./chunk-4IW2T6GF.js";import{a as o,b as at,e as b}from"./chunk-64RSHJUE.js";import{a as R}from"./chunk-3SSKC3VN.js";import{a as w,b as tt}from"./chunk-LEYMRMBK.js";import{e as g}from"./chunk-VTAIKJXX.js";var et={};et.computeDiscriminant=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");return e*e-4*t*r};function ft(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}et.computeRealRoots=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");let n;if(t===0)return e===0?[]:[-r/e];if(e===0){if(r===0)return[0,0];let a=Math.abs(r),f=Math.abs(t);if(a<f&&a/f<R.EPSILON14)return[0,0];if(a>f&&f/a<R.EPSILON14)return[];if(n=-r/t,n<0)return[];let l=Math.sqrt(n);return[-l,l]}else if(r===0)return n=-e/t,n<0?[n,0]:[0,n];let i=e*e,c=4*t*r,s=ft(i,-c,R.EPSILON14);if(s<0)return[];let u=-.5*ft(e,R.sign(e)*Math.sqrt(s),R.EPSILON14);return e>0?[u/t,r/u]:[r/u,u/t]};var T=et;var rt={};rt.computeDiscriminant=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i=t*t,c=e*e,s=r*r,u=n*n;return 18*t*e*r*n+c*s-27*i*u-4*(t*s*r+c*e*n)};function nt(t,e,r,n){let i=t,c=e/3,s=r/3,u=n,a=i*s,f=c*u,l=c*c,m=s*s,p=i*s-l,q=i*u-c*s,d=c*u-m,h=4*p*d-q*q,E,D;if(h<0){let K,k,G;l*f>=a*m?(K=i,k=p,G=-2*c*p+i*q):(K=u,k=d,G=-u*q+2*s*d);let ut=-(G<0?-1:1)*Math.abs(K)*Math.sqrt(-h);D=-G+ut;let X=D/2,j=X<0?-Math.pow(-X,1/3):Math.pow(X,1/3),$=D===ut?-j:-k/j;return E=k<=0?j+$:-G/(j*j+$*$+k),l*f>=a*m?[(E-c)/i]:[-u/(E+s)]}let W=p,v=-2*c*p+i*q,L=d,B=-u*q+2*s*d,I=Math.sqrt(h),C=Math.sqrt(3)/2,P=Math.abs(Math.atan2(i*I,-v)/3);E=2*Math.sqrt(-W);let y=Math.cos(P);D=E*y;let S=E*(-y/2-C*Math.sin(P)),M=D+S>2*c?D-c:S-c,N=i,x=M/N;P=Math.abs(Math.atan2(u*I,-B)/3),E=2*Math.sqrt(-L),y=Math.cos(P),D=E*y,S=E*(-y/2-C*Math.sin(P));let _=-u,A=D+S<2*s?D+s:S+s,U=_/A,Rt=N*A,ct=-M*A-N*_,yt=M*_,V=(s*ct-c*yt)/(-c*ct+s*Rt);return x<=V?x<=U?V<=U?[x,V,U]:[x,U,V]:[U,x,V]:x<=U?[V,x,U]:V<=U?[V,U,x]:[U,V,x]}rt.computeRealRoots=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i,c;if(t===0)return T.computeRealRoots(e,r,n);if(e===0){if(r===0){if(n===0)return[0,0,0];c=-n/t;let s=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3);return[s,s,s]}else if(n===0)return i=T.computeRealRoots(t,0,r),i.Length===0?[0]:[i[0],0,i[1]];return nt(t,0,r,n)}else{if(r===0)return n===0?(c=-e/t,c<0?[c,0,0]:[0,0,c]):nt(t,e,0,n);if(n===0)return i=T.computeRealRoots(t,e,r),i.length===0?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]}return nt(t,e,r,n)};var Y=rt;var ot={};ot.computeDiscriminant=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");let c=t*t,s=c*t,u=e*e,a=u*e,f=r*r,l=f*r,m=n*n,p=m*n,q=i*i,d=q*i;return u*f*m-4*a*p-4*t*l*m+18*t*e*r*p-27*c*m*m+256*s*d+i*(18*a*r*n-4*u*l+16*t*f*f-80*t*e*f*n-6*t*u*m+144*c*r*m)+q*(144*t*u*r-27*u*u-128*c*f-192*c*e*n)};function z(t,e,r,n){let i=t*t,c=e-3*i/8,s=r-e*t/2+i*t/8,u=n-r*t/4+e*i/16-3*i*i/256,a=Y.computeRealRoots(1,2*c,c*c-4*u,-s*s);if(a.length>0){let f=-t/4,l=a[a.length-1];if(Math.abs(l)<R.EPSILON14){let m=T.computeRealRoots(1,c,u);if(m.length===2){let p=m[0],q=m[1],d;if(p>=0&&q>=0){let h=Math.sqrt(p),E=Math.sqrt(q);return[f-E,f-h,f+h,f+E]}else{if(p>=0&&q<0)return d=Math.sqrt(p),[f-d,f+d];if(p<0&&q>=0)return d=Math.sqrt(q),[f-d,f+d]}}return[]}else if(l>0){let m=Math.sqrt(l),p=(c+l-s/m)/2,q=(c+l+s/m)/2,d=T.computeRealRoots(1,m,p),h=T.computeRealRoots(1,-m,q);return d.length!==0?(d[0]+=f,d[1]+=f,h.length!==0?(h[0]+=f,h[1]+=f,d[1]<=h[0]?[d[0],d[1],h[0],h[1]]:h[1]<=d[0]?[h[0],h[1],d[0],d[1]]:d[0]>=h[0]&&d[1]<=h[1]?[h[0],d[0],d[1],h[1]]:h[0]>=d[0]&&h[1]<=d[1]?[d[0],h[0],h[1],d[1]]:d[0]>h[0]&&d[0]<h[1]?[h[0],d[0],h[1],d[1]]:[d[0],h[0],d[1],h[1]]):d):h.length!==0?(h[0]+=f,h[1]+=f,h):[]}}return[]}function H(t,e,r,n){let i=r*r,c=e*e,s=t*t,u=-2*e,a=r*t+c-4*n,f=s*n-r*e*t+i,l=Y.computeRealRoots(1,u,a,f);if(l.length>0){let m=l[0],p=e-m,q=p*p,d=t/2,h=p/2,E=q-4*n,D=q+4*Math.abs(n),W=s-4*m,v=s+4*Math.abs(m),L,B;if(m<0||E*v<W*D){let N=Math.sqrt(W);L=N/2,B=N===0?0:(t*h-r)/N}else{let N=Math.sqrt(E);L=N===0?0:(t*h-r)/N,B=N/2}let I,C;d===0&&L===0?(I=0,C=0):R.sign(d)===R.sign(L)?(I=d+L,C=m/I):(C=d-L,I=m/C);let P,y;h===0&&B===0?(P=0,y=0):R.sign(h)===R.sign(B)?(P=h+B,y=n/P):(y=h-B,P=n/y);let S=T.computeRealRoots(1,I,P),M=T.computeRealRoots(1,C,y);if(S.length!==0)return M.length!==0?S[1]<=M[0]?[S[0],S[1],M[0],M[1]]:M[1]<=S[0]?[M[0],M[1],S[0],S[1]]:S[0]>=M[0]&&S[1]<=M[1]?[M[0],S[0],S[1],M[1]]:M[0]>=S[0]&&M[1]<=S[1]?[S[0],M[0],M[1],S[1]]:S[0]>M[0]&&S[0]<M[1]?[M[0],S[0],M[1],S[1]]:[S[0],M[0],S[1],M[1]]:S;if(M.length!==0)return M}return[]}ot.computeRealRoots=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");if(Math.abs(t)<R.EPSILON15)return Y.computeRealRoots(e,r,n,i);let c=e/t,s=r/t,u=n/t,a=i/t,f=c<0?1:0;switch(f+=s<0?f+1:f,f+=u<0?f+1:f,f+=a<0?f+1:f,f){case 0:return z(c,s,u,a);case 1:return H(c,s,u,a);case 2:return H(c,s,u,a);case 3:return z(c,s,u,a);case 4:return z(c,s,u,a);case 5:return H(c,s,u,a);case 6:return z(c,s,u,a);case 7:return z(c,s,u,a);case 8:return H(c,s,u,a);case 9:return z(c,s,u,a);case 10:return z(c,s,u,a);case 11:return H(c,s,u,a);case 12:return z(c,s,u,a);case 13:return z(c,s,u,a);case 14:return z(c,s,u,a);case 15:return z(c,s,u,a);default:return}};var dt=ot;function F(t,e){e=o.clone(e??o.ZERO),o.equals(e,o.ZERO)||o.normalize(e,e),this.origin=o.clone(t??o.ZERO),this.direction=e}F.clone=function(t,e){if(g(t))return g(e)?(e.origin=o.clone(t.origin),e.direction=o.clone(t.direction),e):new F(t.origin,t.direction)};F.getPoint=function(t,e,r){return tt.typeOf.object("ray",t),tt.typeOf.number("t",e),g(r)||(r=new o),r=o.multiplyByScalar(t.direction,e,r),o.add(t.origin,r,r)};var it=F;var O={};O.rayPlane=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("plane is required.");g(r)||(r=new o);let n=t.origin,i=t.direction,c=e.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON15)return;let u=(-e.distance-o.dot(c,n))/s;if(!(u<0))return r=o.multiplyByScalar(i,u,r),o.add(n,r,r)};var bt=new o,Ot=new o,St=new o,mt=new o,lt=new o;O.rayTriangleParametric=function(t,e,r,n,i){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("p0 is required.");if(!g(r))throw new w("p1 is required.");if(!g(n))throw new w("p2 is required.");i=i??!1;let c=t.origin,s=t.direction,u=o.subtract(r,e,bt),a=o.subtract(n,e,Ot),f=o.cross(s,a,St),l=o.dot(u,f),m,p,q,d,h;if(i){if(l<R.EPSILON6||(m=o.subtract(c,e,mt),q=o.dot(m,f),q<0||q>l)||(p=o.cross(m,u,lt),d=o.dot(s,p),d<0||q+d>l))return;h=o.dot(a,p)/l}else{if(Math.abs(l)<R.EPSILON6)return;let E=1/l;if(m=o.subtract(c,e,mt),q=o.dot(m,f)*E,q<0||q>1||(p=o.cross(m,u,lt),d=o.dot(s,p)*E,d<0||q+d>1))return;h=o.dot(a,p)*E}return h};O.rayTriangle=function(t,e,r,n,i,c){let s=O.rayTriangleParametric(t,e,r,n,i);if(!(!g(s)||s<0))return g(c)||(c=new o),o.multiplyByScalar(t.direction,s,c),o.add(t.origin,c,c)};var Pt=new it;O.lineSegmentTriangle=function(t,e,r,n,i,c,s){if(!g(t))throw new w("v0 is required.");if(!g(e))throw new w("v1 is required.");if(!g(r))throw new w("p0 is required.");if(!g(n))throw new w("p1 is required.");if(!g(i))throw new w("p2 is required.");let u=Pt;o.clone(t,u.origin),o.subtract(e,t,u.direction),o.normalize(u.direction,u.direction);let a=O.rayTriangleParametric(u,r,n,i,c);if(!(!g(a)||a<0||a>o.distance(t,e)))return g(s)||(s=new o),o.multiplyByScalar(u.direction,a,s),o.add(u.origin,s,s)};function Et(t,e,r,n){let i=e*e-4*t*r;if(i<0)return;if(i>0){let s=1/(2*t),u=Math.sqrt(i),a=(-e+u)*s,f=(-e-u)*s;return a<f?(n.root0=a,n.root1=f):(n.root0=f,n.root1=a),n}let c=-e/(2*t);if(c!==0)return n.root0=n.root1=c,n}var Ct={root0:0,root1:0};function Mt(t,e,r){g(r)||(r=new Z);let n=t.origin,i=t.direction,c=e.center,s=e.radius*e.radius,u=o.subtract(n,c,St),a=o.dot(i,i),f=2*o.dot(i,u),l=o.magnitudeSquared(u)-s,m=Et(a,f,l,Ct);if(g(m))return r.start=m.root0,r.stop=m.root1,r}O.raySphere=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("sphere is required.");if(r=Mt(t,e,r),!(!g(r)||r.stop<0))return r.start=Math.max(r.start,0),r};var Nt=new it;O.lineSegmentSphere=function(t,e,r,n){if(!g(t))throw new w("p0 is required.");if(!g(e))throw new w("p1 is required.");if(!g(r))throw new w("sphere is required.");let i=Nt;o.clone(t,i.origin);let c=o.subtract(e,t,i.direction),s=o.magnitude(c);if(o.normalize(c,c),n=Mt(i,r,n),!(!g(n)||n.stop<0||n.start>s))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,s),n};var Lt=new o,It=new o;O.rayEllipsoid=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=e.oneOverRadii,n=o.multiplyComponents(r,t.origin,Lt),i=o.multiplyComponents(r,t.direction,It),c=o.magnitudeSquared(n),s=o.dot(n,i),u,a,f,l,m;if(c>1){if(s>=0)return;let p=s*s;if(u=c-1,a=o.magnitudeSquared(i),f=a*u,p<f)return;if(p>f){l=s*s-f,m=-s+Math.sqrt(l);let d=m/a,h=u/m;return d<h?new Z(d,h):{start:h,stop:d}}let q=Math.sqrt(u/a);return new Z(q,q)}else if(c<1)return u=c-1,a=o.magnitudeSquared(i),f=a*u,l=s*s-f,m=-s+Math.sqrt(l),new Z(0,m/a);if(s<0)return a=o.magnitudeSquared(i),new Z(0,-s/a)};function Q(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}O.quadraticVectorExpression=function(t,e,r,n,i){let c=n*n,s=i*i,u=(t[b.COLUMN1ROW1]-t[b.COLUMN2ROW2])*s,a=i*(n*Q(t[b.COLUMN1ROW0],t[b.COLUMN0ROW1],R.EPSILON15)+e.y),f=t[b.COLUMN0ROW0]*c+t[b.COLUMN2ROW2]*s+n*e.x+r,l=s*Q(t[b.COLUMN2ROW1],t[b.COLUMN1ROW2],R.EPSILON15),m=i*(n*Q(t[b.COLUMN2ROW0],t[b.COLUMN0ROW2])+e.z),p,q=[];if(m===0&&l===0){if(p=T.computeRealRoots(u,a,f),p.length===0)return q;let P=p[0],y=Math.sqrt(Math.max(1-P*P,0));if(q.push(new o(n,i*P,i*-y)),q.push(new o(n,i*P,i*y)),p.length===2){let S=p[1],M=Math.sqrt(Math.max(1-S*S,0));q.push(new o(n,i*S,i*-M)),q.push(new o(n,i*S,i*M))}return q}let d=m*m,h=l*l,E=u*u,D=m*l,W=E+h,v=2*(a*u+D),L=2*f*u+a*a-h+d,B=2*(f*a-D),I=f*f-d;if(W===0&&v===0&&L===0&&B===0)return q;p=dt.computeRealRoots(W,v,L,B,I);let C=p.length;if(C===0)return q;for(let P=0;P<C;++P){let y=p[P],S=y*y,M=Math.max(1-S,0),N=Math.sqrt(M),x;R.sign(u)===R.sign(f)?x=Q(u*S+f,a*y,R.EPSILON12):R.sign(f)===R.sign(a*y)?x=Q(u*S,a*y+f,R.EPSILON12):x=Q(u*S+a*y,f,R.EPSILON12);let _=Q(l*y,m,R.EPSILON15),A=x*_;A<0?q.push(new o(n,i*y,i*N)):A>0?q.push(new o(n,i*y,i*-N)):N!==0?(q.push(new o(n,i*y,i*-N)),q.push(new o(n,i*y,i*N)),++P):q.push(new o(n,i*y,i*N))}return q};var st=new o,ht=new o,wt=new o,J=new o,Dt=new o,Bt=new b,xt=new b,Tt=new b,zt=new b,Wt=new b,qt=new b,gt=new b,pt=new o,vt=new o,Ut=new at;O.grazingAltitudeLocation=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=t.origin,n=t.direction;if(!o.equals(r,o.ZERO)){let I=e.geodeticSurfaceNormal(r,st);if(o.dot(n,I)>=0)return r}let i=g(this.rayEllipsoid(t,e)),c=e.transformPositionToScaledSpace(n,st),s=o.normalize(c,c),u=o.mostOrthogonalAxis(c,J),a=o.normalize(o.cross(u,s,ht),ht),f=o.normalize(o.cross(s,a,wt),wt),l=Bt;l[0]=s.x,l[1]=s.y,l[2]=s.z,l[3]=a.x,l[4]=a.y,l[5]=a.z,l[6]=f.x,l[7]=f.y,l[8]=f.z;let m=b.transpose(l,xt),p=b.fromScale(e.radii,Tt),q=b.fromScale(e.oneOverRadii,zt),d=Wt;d[0]=0,d[1]=-n.z,d[2]=n.y,d[3]=n.z,d[4]=0,d[5]=-n.x,d[6]=-n.y,d[7]=n.x,d[8]=0;let h=b.multiply(b.multiply(m,q,qt),d,qt),E=b.multiply(b.multiply(h,p,gt),l,gt),D=b.multiplyByVector(h,r,Dt),W=O.quadraticVectorExpression(E,o.negate(D,st),0,0,1),v,L,B=W.length;if(B>0){let I=o.clone(o.ZERO,vt),C=Number.NEGATIVE_INFINITY;for(let y=0;y<B;++y){v=b.multiplyByVector(p,b.multiplyByVector(l,W[y],pt),pt);let S=o.normalize(o.subtract(v,r,J),J),M=o.dot(S,n);M>C&&(C=M,I=o.clone(v,I))}let P=e.cartesianToCartographic(I,Ut);return C=R.clamp(C,0,1),L=o.magnitude(o.subtract(I,r,J))*Math.sqrt(1-C*C),L=i?-L:L,P.height=L,e.cartographicToCartesian(P,new o)}};var Vt=new o;O.lineSegmentPlane=function(t,e,r,n){if(!g(t))throw new w("endPoint0 is required.");if(!g(e))throw new w("endPoint1 is required.");if(!g(r))throw new w("plane is required.");g(n)||(n=new o);let i=o.subtract(e,t,Vt),c=r.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON6)return;let u=o.dot(c,t),a=-(r.distance+u)/s;if(!(a<0||a>1))return o.multiplyByScalar(i,a,n),o.add(t,n,n),n};O.trianglePlaneIntersection=function(t,e,r,n){if(!g(t)||!g(e)||!g(r)||!g(n))throw new w("p0, p1, p2, and plane are required.");let i=n.normal,c=n.distance,s=o.dot(i,t)+c<0,u=o.dot(i,e)+c<0,a=o.dot(i,r)+c<0,f=0;f+=s?1:0,f+=u?1:0,f+=a?1:0;let l,m;if((f===1||f===2)&&(l=new o,m=new o),f===1){if(s)return O.lineSegmentPlane(t,e,n,l),O.lineSegmentPlane(t,r,n,m),{positions:[t,e,r,l,m],indices:[0,3,4,1,2,4,1,4,3]};if(u)return O.lineSegmentPlane(e,r,n,l),O.lineSegmentPlane(e,t,n,m),{positions:[t,e,r,l,m],indices:[1,3,4,2,0,4,2,4,3]};if(a)return O.lineSegmentPlane(r,t,n,l),O.lineSegmentPlane(r,e,n,m),{positions:[t,e,r,l,m],indices:[2,3,4,0,1,4,0,4,3]}}else if(f===2)if(s)if(u){if(!a)return O.lineSegmentPlane(t,r,n,l),O.lineSegmentPlane(e,r,n,m),{positions:[t,e,r,l,m],indices:[0,1,4,0,4,3,2,3,4]}}else return O.lineSegmentPlane(r,e,n,l),O.lineSegmentPlane(t,e,n,m),{positions:[t,e,r,l,m],indices:[2,0,4,2,4,3,1,3,4]};else return O.lineSegmentPlane(e,t,n,l),O.lineSegmentPlane(r,t,n,m),{positions:[t,e,r,l,m],indices:[1,2,4,1,4,3,0,3,4]}};var me=O;export{it as a,me as b};
|
|
26
|
+
import{c as Z}from"./chunk-VMOPYKP4.js";import{a as o,b as at,e as b}from"./chunk-FCVV6A2F.js";import{a as R}from"./chunk-PO64KPKA.js";import{a as w,b as tt}from"./chunk-R3KD5ZAI.js";import{e as g}from"./chunk-GBI3IATP.js";var et={};et.computeDiscriminant=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");return e*e-4*t*r};function ft(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}et.computeRealRoots=function(t,e,r){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");let n;if(t===0)return e===0?[]:[-r/e];if(e===0){if(r===0)return[0,0];let a=Math.abs(r),f=Math.abs(t);if(a<f&&a/f<R.EPSILON14)return[0,0];if(a>f&&f/a<R.EPSILON14)return[];if(n=-r/t,n<0)return[];let l=Math.sqrt(n);return[-l,l]}else if(r===0)return n=-e/t,n<0?[n,0]:[0,n];let i=e*e,c=4*t*r,s=ft(i,-c,R.EPSILON14);if(s<0)return[];let u=-.5*ft(e,R.sign(e)*Math.sqrt(s),R.EPSILON14);return e>0?[u/t,r/u]:[r/u,u/t]};var T=et;var rt={};rt.computeDiscriminant=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i=t*t,c=e*e,s=r*r,u=n*n;return 18*t*e*r*n+c*s-27*i*u-4*(t*s*r+c*e*n)};function nt(t,e,r,n){let i=t,c=e/3,s=r/3,u=n,a=i*s,f=c*u,l=c*c,m=s*s,p=i*s-l,q=i*u-c*s,d=c*u-m,h=4*p*d-q*q,E,D;if(h<0){let K,k,G;l*f>=a*m?(K=i,k=p,G=-2*c*p+i*q):(K=u,k=d,G=-u*q+2*s*d);let ut=-(G<0?-1:1)*Math.abs(K)*Math.sqrt(-h);D=-G+ut;let X=D/2,j=X<0?-Math.pow(-X,1/3):Math.pow(X,1/3),$=D===ut?-j:-k/j;return E=k<=0?j+$:-G/(j*j+$*$+k),l*f>=a*m?[(E-c)/i]:[-u/(E+s)]}let W=p,v=-2*c*p+i*q,L=d,B=-u*q+2*s*d,I=Math.sqrt(h),C=Math.sqrt(3)/2,P=Math.abs(Math.atan2(i*I,-v)/3);E=2*Math.sqrt(-W);let y=Math.cos(P);D=E*y;let S=E*(-y/2-C*Math.sin(P)),M=D+S>2*c?D-c:S-c,N=i,x=M/N;P=Math.abs(Math.atan2(u*I,-B)/3),E=2*Math.sqrt(-L),y=Math.cos(P),D=E*y,S=E*(-y/2-C*Math.sin(P));let _=-u,A=D+S<2*s?D+s:S+s,U=_/A,Rt=N*A,ct=-M*A-N*_,yt=M*_,V=(s*ct-c*yt)/(-c*ct+s*Rt);return x<=V?x<=U?V<=U?[x,V,U]:[x,U,V]:[U,x,V]:x<=U?[V,x,U]:V<=U?[V,U,x]:[U,V,x]}rt.computeRealRoots=function(t,e,r,n){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");let i,c;if(t===0)return T.computeRealRoots(e,r,n);if(e===0){if(r===0){if(n===0)return[0,0,0];c=-n/t;let s=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3);return[s,s,s]}else if(n===0)return i=T.computeRealRoots(t,0,r),i.Length===0?[0]:[i[0],0,i[1]];return nt(t,0,r,n)}else{if(r===0)return n===0?(c=-e/t,c<0?[c,0,0]:[0,0,c]):nt(t,e,0,n);if(n===0)return i=T.computeRealRoots(t,e,r),i.length===0?[0]:i[1]<=0?[i[0],i[1],0]:i[0]>=0?[0,i[0],i[1]]:[i[0],0,i[1]]}return nt(t,e,r,n)};var Y=rt;var ot={};ot.computeDiscriminant=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");let c=t*t,s=c*t,u=e*e,a=u*e,f=r*r,l=f*r,m=n*n,p=m*n,q=i*i,d=q*i;return u*f*m-4*a*p-4*t*l*m+18*t*e*r*p-27*c*m*m+256*s*d+i*(18*a*r*n-4*u*l+16*t*f*f-80*t*e*f*n-6*t*u*m+144*c*r*m)+q*(144*t*u*r-27*u*u-128*c*f-192*c*e*n)};function z(t,e,r,n){let i=t*t,c=e-3*i/8,s=r-e*t/2+i*t/8,u=n-r*t/4+e*i/16-3*i*i/256,a=Y.computeRealRoots(1,2*c,c*c-4*u,-s*s);if(a.length>0){let f=-t/4,l=a[a.length-1];if(Math.abs(l)<R.EPSILON14){let m=T.computeRealRoots(1,c,u);if(m.length===2){let p=m[0],q=m[1],d;if(p>=0&&q>=0){let h=Math.sqrt(p),E=Math.sqrt(q);return[f-E,f-h,f+h,f+E]}else{if(p>=0&&q<0)return d=Math.sqrt(p),[f-d,f+d];if(p<0&&q>=0)return d=Math.sqrt(q),[f-d,f+d]}}return[]}else if(l>0){let m=Math.sqrt(l),p=(c+l-s/m)/2,q=(c+l+s/m)/2,d=T.computeRealRoots(1,m,p),h=T.computeRealRoots(1,-m,q);return d.length!==0?(d[0]+=f,d[1]+=f,h.length!==0?(h[0]+=f,h[1]+=f,d[1]<=h[0]?[d[0],d[1],h[0],h[1]]:h[1]<=d[0]?[h[0],h[1],d[0],d[1]]:d[0]>=h[0]&&d[1]<=h[1]?[h[0],d[0],d[1],h[1]]:h[0]>=d[0]&&h[1]<=d[1]?[d[0],h[0],h[1],d[1]]:d[0]>h[0]&&d[0]<h[1]?[h[0],d[0],h[1],d[1]]:[d[0],h[0],d[1],h[1]]):d):h.length!==0?(h[0]+=f,h[1]+=f,h):[]}}return[]}function H(t,e,r,n){let i=r*r,c=e*e,s=t*t,u=-2*e,a=r*t+c-4*n,f=s*n-r*e*t+i,l=Y.computeRealRoots(1,u,a,f);if(l.length>0){let m=l[0],p=e-m,q=p*p,d=t/2,h=p/2,E=q-4*n,D=q+4*Math.abs(n),W=s-4*m,v=s+4*Math.abs(m),L,B;if(m<0||E*v<W*D){let N=Math.sqrt(W);L=N/2,B=N===0?0:(t*h-r)/N}else{let N=Math.sqrt(E);L=N===0?0:(t*h-r)/N,B=N/2}let I,C;d===0&&L===0?(I=0,C=0):R.sign(d)===R.sign(L)?(I=d+L,C=m/I):(C=d-L,I=m/C);let P,y;h===0&&B===0?(P=0,y=0):R.sign(h)===R.sign(B)?(P=h+B,y=n/P):(y=h-B,P=n/y);let S=T.computeRealRoots(1,I,P),M=T.computeRealRoots(1,C,y);if(S.length!==0)return M.length!==0?S[1]<=M[0]?[S[0],S[1],M[0],M[1]]:M[1]<=S[0]?[M[0],M[1],S[0],S[1]]:S[0]>=M[0]&&S[1]<=M[1]?[M[0],S[0],S[1],M[1]]:M[0]>=S[0]&&M[1]<=S[1]?[S[0],M[0],M[1],S[1]]:S[0]>M[0]&&S[0]<M[1]?[M[0],S[0],M[1],S[1]]:[S[0],M[0],S[1],M[1]]:S;if(M.length!==0)return M}return[]}ot.computeRealRoots=function(t,e,r,n,i){if(typeof t!="number")throw new w("a is a required number.");if(typeof e!="number")throw new w("b is a required number.");if(typeof r!="number")throw new w("c is a required number.");if(typeof n!="number")throw new w("d is a required number.");if(typeof i!="number")throw new w("e is a required number.");if(Math.abs(t)<R.EPSILON15)return Y.computeRealRoots(e,r,n,i);let c=e/t,s=r/t,u=n/t,a=i/t,f=c<0?1:0;switch(f+=s<0?f+1:f,f+=u<0?f+1:f,f+=a<0?f+1:f,f){case 0:return z(c,s,u,a);case 1:return H(c,s,u,a);case 2:return H(c,s,u,a);case 3:return z(c,s,u,a);case 4:return z(c,s,u,a);case 5:return H(c,s,u,a);case 6:return z(c,s,u,a);case 7:return z(c,s,u,a);case 8:return H(c,s,u,a);case 9:return z(c,s,u,a);case 10:return z(c,s,u,a);case 11:return H(c,s,u,a);case 12:return z(c,s,u,a);case 13:return z(c,s,u,a);case 14:return z(c,s,u,a);case 15:return z(c,s,u,a);default:return}};var dt=ot;function F(t,e){e=o.clone(e??o.ZERO),o.equals(e,o.ZERO)||o.normalize(e,e),this.origin=o.clone(t??o.ZERO),this.direction=e}F.clone=function(t,e){if(g(t))return g(e)?(e.origin=o.clone(t.origin),e.direction=o.clone(t.direction),e):new F(t.origin,t.direction)};F.getPoint=function(t,e,r){return tt.typeOf.object("ray",t),tt.typeOf.number("t",e),g(r)||(r=new o),r=o.multiplyByScalar(t.direction,e,r),o.add(t.origin,r,r)};var it=F;var O={};O.rayPlane=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("plane is required.");g(r)||(r=new o);let n=t.origin,i=t.direction,c=e.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON15)return;let u=(-e.distance-o.dot(c,n))/s;if(!(u<0))return r=o.multiplyByScalar(i,u,r),o.add(n,r,r)};var bt=new o,Ot=new o,St=new o,mt=new o,lt=new o;O.rayTriangleParametric=function(t,e,r,n,i){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("p0 is required.");if(!g(r))throw new w("p1 is required.");if(!g(n))throw new w("p2 is required.");i=i??!1;let c=t.origin,s=t.direction,u=o.subtract(r,e,bt),a=o.subtract(n,e,Ot),f=o.cross(s,a,St),l=o.dot(u,f),m,p,q,d,h;if(i){if(l<R.EPSILON6||(m=o.subtract(c,e,mt),q=o.dot(m,f),q<0||q>l)||(p=o.cross(m,u,lt),d=o.dot(s,p),d<0||q+d>l))return;h=o.dot(a,p)/l}else{if(Math.abs(l)<R.EPSILON6)return;let E=1/l;if(m=o.subtract(c,e,mt),q=o.dot(m,f)*E,q<0||q>1||(p=o.cross(m,u,lt),d=o.dot(s,p)*E,d<0||q+d>1))return;h=o.dot(a,p)*E}return h};O.rayTriangle=function(t,e,r,n,i,c){let s=O.rayTriangleParametric(t,e,r,n,i);if(!(!g(s)||s<0))return g(c)||(c=new o),o.multiplyByScalar(t.direction,s,c),o.add(t.origin,c,c)};var Pt=new it;O.lineSegmentTriangle=function(t,e,r,n,i,c,s){if(!g(t))throw new w("v0 is required.");if(!g(e))throw new w("v1 is required.");if(!g(r))throw new w("p0 is required.");if(!g(n))throw new w("p1 is required.");if(!g(i))throw new w("p2 is required.");let u=Pt;o.clone(t,u.origin),o.subtract(e,t,u.direction),o.normalize(u.direction,u.direction);let a=O.rayTriangleParametric(u,r,n,i,c);if(!(!g(a)||a<0||a>o.distance(t,e)))return g(s)||(s=new o),o.multiplyByScalar(u.direction,a,s),o.add(u.origin,s,s)};function Et(t,e,r,n){let i=e*e-4*t*r;if(i<0)return;if(i>0){let s=1/(2*t),u=Math.sqrt(i),a=(-e+u)*s,f=(-e-u)*s;return a<f?(n.root0=a,n.root1=f):(n.root0=f,n.root1=a),n}let c=-e/(2*t);if(c!==0)return n.root0=n.root1=c,n}var Ct={root0:0,root1:0};function Mt(t,e,r){g(r)||(r=new Z);let n=t.origin,i=t.direction,c=e.center,s=e.radius*e.radius,u=o.subtract(n,c,St),a=o.dot(i,i),f=2*o.dot(i,u),l=o.magnitudeSquared(u)-s,m=Et(a,f,l,Ct);if(g(m))return r.start=m.root0,r.stop=m.root1,r}O.raySphere=function(t,e,r){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("sphere is required.");if(r=Mt(t,e,r),!(!g(r)||r.stop<0))return r.start=Math.max(r.start,0),r};var Nt=new it;O.lineSegmentSphere=function(t,e,r,n){if(!g(t))throw new w("p0 is required.");if(!g(e))throw new w("p1 is required.");if(!g(r))throw new w("sphere is required.");let i=Nt;o.clone(t,i.origin);let c=o.subtract(e,t,i.direction),s=o.magnitude(c);if(o.normalize(c,c),n=Mt(i,r,n),!(!g(n)||n.stop<0||n.start>s))return n.start=Math.max(n.start,0),n.stop=Math.min(n.stop,s),n};var Lt=new o,It=new o;O.rayEllipsoid=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=e.oneOverRadii,n=o.multiplyComponents(r,t.origin,Lt),i=o.multiplyComponents(r,t.direction,It),c=o.magnitudeSquared(n),s=o.dot(n,i),u,a,f,l,m;if(c>1){if(s>=0)return;let p=s*s;if(u=c-1,a=o.magnitudeSquared(i),f=a*u,p<f)return;if(p>f){l=s*s-f,m=-s+Math.sqrt(l);let d=m/a,h=u/m;return d<h?new Z(d,h):{start:h,stop:d}}let q=Math.sqrt(u/a);return new Z(q,q)}else if(c<1)return u=c-1,a=o.magnitudeSquared(i),f=a*u,l=s*s-f,m=-s+Math.sqrt(l),new Z(0,m/a);if(s<0)return a=o.magnitudeSquared(i),new Z(0,-s/a)};function Q(t,e,r){let n=t+e;return R.sign(t)!==R.sign(e)&&Math.abs(n/Math.max(Math.abs(t),Math.abs(e)))<r?0:n}O.quadraticVectorExpression=function(t,e,r,n,i){let c=n*n,s=i*i,u=(t[b.COLUMN1ROW1]-t[b.COLUMN2ROW2])*s,a=i*(n*Q(t[b.COLUMN1ROW0],t[b.COLUMN0ROW1],R.EPSILON15)+e.y),f=t[b.COLUMN0ROW0]*c+t[b.COLUMN2ROW2]*s+n*e.x+r,l=s*Q(t[b.COLUMN2ROW1],t[b.COLUMN1ROW2],R.EPSILON15),m=i*(n*Q(t[b.COLUMN2ROW0],t[b.COLUMN0ROW2])+e.z),p,q=[];if(m===0&&l===0){if(p=T.computeRealRoots(u,a,f),p.length===0)return q;let P=p[0],y=Math.sqrt(Math.max(1-P*P,0));if(q.push(new o(n,i*P,i*-y)),q.push(new o(n,i*P,i*y)),p.length===2){let S=p[1],M=Math.sqrt(Math.max(1-S*S,0));q.push(new o(n,i*S,i*-M)),q.push(new o(n,i*S,i*M))}return q}let d=m*m,h=l*l,E=u*u,D=m*l,W=E+h,v=2*(a*u+D),L=2*f*u+a*a-h+d,B=2*(f*a-D),I=f*f-d;if(W===0&&v===0&&L===0&&B===0)return q;p=dt.computeRealRoots(W,v,L,B,I);let C=p.length;if(C===0)return q;for(let P=0;P<C;++P){let y=p[P],S=y*y,M=Math.max(1-S,0),N=Math.sqrt(M),x;R.sign(u)===R.sign(f)?x=Q(u*S+f,a*y,R.EPSILON12):R.sign(f)===R.sign(a*y)?x=Q(u*S,a*y+f,R.EPSILON12):x=Q(u*S+a*y,f,R.EPSILON12);let _=Q(l*y,m,R.EPSILON15),A=x*_;A<0?q.push(new o(n,i*y,i*N)):A>0?q.push(new o(n,i*y,i*-N)):N!==0?(q.push(new o(n,i*y,i*-N)),q.push(new o(n,i*y,i*N)),++P):q.push(new o(n,i*y,i*N))}return q};var st=new o,ht=new o,wt=new o,J=new o,Dt=new o,Bt=new b,xt=new b,Tt=new b,zt=new b,Wt=new b,qt=new b,gt=new b,pt=new o,vt=new o,Ut=new at;O.grazingAltitudeLocation=function(t,e){if(!g(t))throw new w("ray is required.");if(!g(e))throw new w("ellipsoid is required.");let r=t.origin,n=t.direction;if(!o.equals(r,o.ZERO)){let I=e.geodeticSurfaceNormal(r,st);if(o.dot(n,I)>=0)return r}let i=g(this.rayEllipsoid(t,e)),c=e.transformPositionToScaledSpace(n,st),s=o.normalize(c,c),u=o.mostOrthogonalAxis(c,J),a=o.normalize(o.cross(u,s,ht),ht),f=o.normalize(o.cross(s,a,wt),wt),l=Bt;l[0]=s.x,l[1]=s.y,l[2]=s.z,l[3]=a.x,l[4]=a.y,l[5]=a.z,l[6]=f.x,l[7]=f.y,l[8]=f.z;let m=b.transpose(l,xt),p=b.fromScale(e.radii,Tt),q=b.fromScale(e.oneOverRadii,zt),d=Wt;d[0]=0,d[1]=-n.z,d[2]=n.y,d[3]=n.z,d[4]=0,d[5]=-n.x,d[6]=-n.y,d[7]=n.x,d[8]=0;let h=b.multiply(b.multiply(m,q,qt),d,qt),E=b.multiply(b.multiply(h,p,gt),l,gt),D=b.multiplyByVector(h,r,Dt),W=O.quadraticVectorExpression(E,o.negate(D,st),0,0,1),v,L,B=W.length;if(B>0){let I=o.clone(o.ZERO,vt),C=Number.NEGATIVE_INFINITY;for(let y=0;y<B;++y){v=b.multiplyByVector(p,b.multiplyByVector(l,W[y],pt),pt);let S=o.normalize(o.subtract(v,r,J),J),M=o.dot(S,n);M>C&&(C=M,I=o.clone(v,I))}let P=e.cartesianToCartographic(I,Ut);return C=R.clamp(C,0,1),L=o.magnitude(o.subtract(I,r,J))*Math.sqrt(1-C*C),L=i?-L:L,P.height=L,e.cartographicToCartesian(P,new o)}};var Vt=new o;O.lineSegmentPlane=function(t,e,r,n){if(!g(t))throw new w("endPoint0 is required.");if(!g(e))throw new w("endPoint1 is required.");if(!g(r))throw new w("plane is required.");g(n)||(n=new o);let i=o.subtract(e,t,Vt),c=r.normal,s=o.dot(c,i);if(Math.abs(s)<R.EPSILON6)return;let u=o.dot(c,t),a=-(r.distance+u)/s;if(!(a<0||a>1))return o.multiplyByScalar(i,a,n),o.add(t,n,n),n};O.trianglePlaneIntersection=function(t,e,r,n){if(!g(t)||!g(e)||!g(r)||!g(n))throw new w("p0, p1, p2, and plane are required.");let i=n.normal,c=n.distance,s=o.dot(i,t)+c<0,u=o.dot(i,e)+c<0,a=o.dot(i,r)+c<0,f=0;f+=s?1:0,f+=u?1:0,f+=a?1:0;let l,m;if((f===1||f===2)&&(l=new o,m=new o),f===1){if(s)return O.lineSegmentPlane(t,e,n,l),O.lineSegmentPlane(t,r,n,m),{positions:[t,e,r,l,m],indices:[0,3,4,1,2,4,1,4,3]};if(u)return O.lineSegmentPlane(e,r,n,l),O.lineSegmentPlane(e,t,n,m),{positions:[t,e,r,l,m],indices:[1,3,4,2,0,4,2,4,3]};if(a)return O.lineSegmentPlane(r,t,n,l),O.lineSegmentPlane(r,e,n,m),{positions:[t,e,r,l,m],indices:[2,3,4,0,1,4,0,4,3]}}else if(f===2)if(s)if(u){if(!a)return O.lineSegmentPlane(t,r,n,l),O.lineSegmentPlane(e,r,n,m),{positions:[t,e,r,l,m],indices:[0,1,4,0,4,3,2,3,4]}}else return O.lineSegmentPlane(r,e,n,l),O.lineSegmentPlane(t,e,n,m),{positions:[t,e,r,l,m],indices:[2,0,4,2,4,3,1,3,4]};else return O.lineSegmentPlane(e,t,n,l),O.lineSegmentPlane(r,t,n,m),{positions:[t,e,r,l,m],indices:[1,2,4,1,4,3,0,3,4]}};var me=O;export{it as a,me as b};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as J}from"./chunk-
|
|
26
|
+
import{a as J}from"./chunk-BGQDOF2W.js";import{a as I}from"./chunk-YDUNCXSU.js";import{b as B,c as G,d as k}from"./chunk-VMOPYKP4.js";import{b as j,h as X}from"./chunk-DGGIK7AD.js";import{a as t,b as S,c as z,d as F,e as d}from"./chunk-FCVV6A2F.js";import{a as g}from"./chunk-PO64KPKA.js";import{a as b,b as W}from"./chunk-R3KD5ZAI.js";import{e as p}from"./chunk-GBI3IATP.js";function w(n,e){this.center=t.clone(n??t.ZERO),this.halfAxes=d.clone(e??d.ZERO)}w.packedLength=t.packedLength+d.packedLength;w.pack=function(n,e,c){return W.typeOf.object("value",n),W.defined("array",e),c=c??0,t.pack(n.center,e,c),d.pack(n.halfAxes,e,c+t.packedLength),e};w.unpack=function(n,e,c){return W.defined("array",n),e=e??0,p(c)||(c=new w),t.unpack(n,e,c.center),d.unpack(n,e+t.packedLength,c.halfAxes),c};var pt=new t,Ct=new t,ut=new t,Pt=new t,xt=new t,yt=new t,At=new d,Nt={unitary:new d,diagonal:new d};w.fromPoints=function(n,e){if(p(e)||(e=new w),!p(n)||n.length===0)return e.halfAxes=d.ZERO,e.center=t.ZERO,e;let c,h=n.length,r=t.clone(n[0],pt);for(c=1;c<h;c++)t.add(r,n[c],r);let o=1/h;t.multiplyByScalar(r,o,r);let i=0,C=0,m=0,l=0,u=0,a=0,s;for(c=0;c<h;c++)s=t.subtract(n[c],r,Ct),i+=s.x*s.x,C+=s.x*s.y,m+=s.x*s.z,l+=s.y*s.y,u+=s.y*s.z,a+=s.z*s.z;i*=o,C*=o,m*=o,l*=o,u*=o,a*=o;let f=At;f[0]=i,f[1]=C,f[2]=m,f[3]=C,f[4]=l,f[5]=u,f[6]=m,f[7]=u,f[8]=a;let A=d.computeEigenDecomposition(f,Nt),M=d.clone(A.unitary,e.halfAxes),x=d.getColumn(M,0,Pt),y=d.getColumn(M,1,xt),N=d.getColumn(M,2,yt),P=-Number.MAX_VALUE,O=-Number.MAX_VALUE,L=-Number.MAX_VALUE,U=Number.MAX_VALUE,R=Number.MAX_VALUE,q=Number.MAX_VALUE;for(c=0;c<h;c++)s=n[c],P=Math.max(t.dot(x,s),P),O=Math.max(t.dot(y,s),O),L=Math.max(t.dot(N,s),L),U=Math.min(t.dot(x,s),U),R=Math.min(t.dot(y,s),R),q=Math.min(t.dot(N,s),q);x=t.multiplyByScalar(x,.5*(U+P),x),y=t.multiplyByScalar(y,.5*(R+O),y),N=t.multiplyByScalar(N,.5*(q+L),N);let T=t.add(x,y,e.center);t.add(T,N,T);let E=ut;return E.x=P-U,E.y=O-R,E.z=L-q,t.multiplyByScalar(E,.5,E),d.multiplyByScale(e.halfAxes,E,e.halfAxes),e};var et=new t,Mt=new t;function K(n,e,c,h,r,o,i,C,m,l,u){if(!p(r)||!p(o)||!p(i)||!p(C)||!p(m)||!p(l))throw new b("all extents (minimum/maximum X/Y/Z) are required.");p(u)||(u=new w);let a=u.halfAxes;d.setColumn(a,0,e,a),d.setColumn(a,1,c,a),d.setColumn(a,2,h,a);let s=et;s.x=(r+o)/2,s.y=(i+C)/2,s.z=(m+l)/2;let f=Mt;f.x=(o-r)/2,f.y=(C-i)/2,f.z=(l-m)/2;let A=u.center;return s=d.multiplyByVector(a,s,s),t.add(n,s,A),d.multiplyByScale(a,f,a),u}var Q=new S,Ot=new t,bt=new S,Tt=new S,St=new S,gt=new S,Et=new S,Rt=new t,$=new t,Wt=new t,H=new t,zt=new t,It=new z,Lt=new z,Ut=new z,qt=new z,jt=new z,Bt=new t,vt=new t,_t=new t,Vt=new t,Dt=new z,Xt=new t,kt=new t,Zt=new t,Yt=new I(t.UNIT_X,0);w.fromRectangle=function(n,e,c,h,r){if(!p(n))throw new b("rectangle is required");if(n.width<0||n.width>g.TWO_PI)throw new b("Rectangle width must be between 0 and 2 * pi");if(n.height<0||n.height>g.PI)throw new b("Rectangle height must be between 0 and pi");if(p(h)&&!g.equalsEpsilon(h.radii.x,h.radii.y,g.EPSILON15))throw new b("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");e=e??0,c=c??0,h=h??F.default;let o,i,C,m,l,u,a;if(n.width<=g.PI){let R=X.center(n,Q),q=h.cartographicToCartesian(R,Ot),T=new J(q,h);a=T.plane;let E=R.longitude,rt=n.south<0&&n.north>0?0:R.latitude,ot=S.fromRadians(E,n.north,c,bt),v=S.fromRadians(n.west,n.north,c,Tt),st=S.fromRadians(n.west,rt,c,St),_=S.fromRadians(n.west,n.south,c,gt),it=S.fromRadians(E,n.south,c,Et),ht=h.cartographicToCartesian(ot,Rt),V=h.cartographicToCartesian(v,$),ft=h.cartographicToCartesian(st,Wt),D=h.cartographicToCartesian(_,H),dt=h.cartographicToCartesian(it,zt),wt=T.projectPointToNearestOnPlane(ht,It),Z=T.projectPointToNearestOnPlane(V,Lt),mt=T.projectPointToNearestOnPlane(ft,Ut),Y=T.projectPointToNearestOnPlane(D,qt),lt=T.projectPointToNearestOnPlane(dt,jt);return o=Math.min(Z.x,mt.x,Y.x),i=-o,m=Math.max(Z.y,wt.y),C=Math.min(Y.y,lt.y),v.height=_.height=e,V=h.cartographicToCartesian(v,$),D=h.cartographicToCartesian(_,H),l=Math.min(I.getPointDistance(a,V),I.getPointDistance(a,D)),u=c,K(T.origin,T.xAxis,T.yAxis,T.zAxis,o,i,C,m,l,u,r)}let s=n.south>0,f=n.north<0,A=s?n.south:f?n.north:0,M=X.center(n,Q).longitude,x=t.fromRadians(M,A,c,h,Bt);x.z=0;let N=Math.abs(x.x)<g.EPSILON10&&Math.abs(x.y)<g.EPSILON10?t.UNIT_X:t.normalize(x,vt),P=t.UNIT_Z,O=t.cross(N,P,_t);a=I.fromPointNormal(x,N,Yt);let L=t.fromRadians(M+g.PI_OVER_TWO,A,c,h,Vt);i=t.dot(I.projectPointOntoPlane(a,L,Dt),O),o=-i,m=t.fromRadians(0,n.north,f?e:c,h,Xt).z,C=t.fromRadians(0,n.south,s?e:c,h,kt).z;let U=t.fromRadians(n.east,A,c,h,Zt);return l=I.getPointDistance(a,U),u=0,K(x,O,P,N,o,i,C,m,l,u,r)};w.fromTransformation=function(n,e){return W.typeOf.object("transformation",n),p(e)||(e=new w),e.center=j.getTranslation(n,e.center),e.halfAxes=j.getMatrix3(n,e.halfAxes),e.halfAxes=d.multiplyByScalar(e.halfAxes,.5,e.halfAxes),e};w.clone=function(n,e){if(p(n))return p(e)?(t.clone(n.center,e.center),d.clone(n.halfAxes,e.halfAxes),e):new w(n.center,n.halfAxes)};w.intersectPlane=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("plane is required.");let c=n.center,h=e.normal,r=n.halfAxes,o=h.x,i=h.y,C=h.z,m=Math.abs(o*r[d.COLUMN0ROW0]+i*r[d.COLUMN0ROW1]+C*r[d.COLUMN0ROW2])+Math.abs(o*r[d.COLUMN1ROW0]+i*r[d.COLUMN1ROW1]+C*r[d.COLUMN1ROW2])+Math.abs(o*r[d.COLUMN2ROW0]+i*r[d.COLUMN2ROW1]+C*r[d.COLUMN2ROW2]),l=t.dot(h,c)+e.distance;return l<=-m?B.OUTSIDE:l>=m?B.INSIDE:B.INTERSECTING};var nt=new t,at=new t,ct=new t,Ft=new t,tt=new t,Gt=new t;w.distanceSquaredTo=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("cartesian is required.");let c=t.subtract(e,n.center,et),h=n.halfAxes,r=d.getColumn(h,0,nt),o=d.getColumn(h,1,at),i=d.getColumn(h,2,ct),C=t.magnitude(r),m=t.magnitude(o),l=t.magnitude(i),u=!0,a=!0,s=!0;C>0?t.divideByScalar(r,C,r):u=!1,m>0?t.divideByScalar(o,m,o):a=!1,l>0?t.divideByScalar(i,l,i):s=!1;let f=!u+!a+!s,A,M,x;if(f===1){let O=r;A=o,M=i,a?s||(O=i,M=r):(O=o,A=r),x=t.cross(A,M,tt),O===r?r=x:O===o?o=x:O===i&&(i=x)}else if(f===2){A=r,a?A=o:s&&(A=i);let O=t.UNIT_Y;O.equalsEpsilon(A,g.EPSILON3)&&(O=t.UNIT_X),M=t.cross(A,O,Ft),t.normalize(M,M),x=t.cross(A,M,tt),t.normalize(x,x),A===r?(o=M,i=x):A===o?(i=M,r=x):A===i&&(r=M,o=x)}else f===3&&(r=t.UNIT_X,o=t.UNIT_Y,i=t.UNIT_Z);let y=Gt;y.x=t.dot(c,r),y.y=t.dot(c,o),y.z=t.dot(c,i);let N=0,P;return y.x<-C?(P=y.x+C,N+=P*P):y.x>C&&(P=y.x-C,N+=P*P),y.y<-m?(P=y.y+m,N+=P*P):y.y>m&&(P=y.y-m,N+=P*P),y.z<-l?(P=y.z+l,N+=P*P):y.z>l&&(P=y.z-l,N+=P*P),N};var Jt=new t,Kt=new t;w.computePlaneDistances=function(n,e,c,h){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("position is required.");if(!p(c))throw new b("direction is required.");p(h)||(h=new G);let r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,i=n.center,C=n.halfAxes,m=d.getColumn(C,0,nt),l=d.getColumn(C,1,at),u=d.getColumn(C,2,ct),a=t.add(m,l,Jt);t.add(a,u,a),t.add(a,i,a);let s=t.subtract(a,e,Kt),f=t.dot(c,s);return r=Math.min(f,r),o=Math.max(f,o),t.add(i,m,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,m,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.add(i,m,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,m,a),t.add(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,m,a),t.add(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,m,a),t.subtract(a,l,a),t.add(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),t.subtract(i,m,a),t.subtract(a,l,a),t.subtract(a,u,a),t.subtract(a,e,s),f=t.dot(c,s),r=Math.min(f,r),o=Math.max(f,o),h.start=r,h.stop=o,h};var Qt=new t,$t=new t,Ht=new t;w.computeCorners=function(n,e){W.typeOf.object("box",n),p(e)||(e=[new t,new t,new t,new t,new t,new t,new t,new t]);let c=n.center,h=n.halfAxes,r=d.getColumn(h,0,Qt),o=d.getColumn(h,1,$t),i=d.getColumn(h,2,Ht);return t.clone(c,e[0]),t.subtract(e[0],r,e[0]),t.subtract(e[0],o,e[0]),t.subtract(e[0],i,e[0]),t.clone(c,e[1]),t.subtract(e[1],r,e[1]),t.subtract(e[1],o,e[1]),t.add(e[1],i,e[1]),t.clone(c,e[2]),t.subtract(e[2],r,e[2]),t.add(e[2],o,e[2]),t.subtract(e[2],i,e[2]),t.clone(c,e[3]),t.subtract(e[3],r,e[3]),t.add(e[3],o,e[3]),t.add(e[3],i,e[3]),t.clone(c,e[4]),t.add(e[4],r,e[4]),t.subtract(e[4],o,e[4]),t.subtract(e[4],i,e[4]),t.clone(c,e[5]),t.add(e[5],r,e[5]),t.subtract(e[5],o,e[5]),t.add(e[5],i,e[5]),t.clone(c,e[6]),t.add(e[6],r,e[6]),t.add(e[6],o,e[6]),t.subtract(e[6],i,e[6]),t.clone(c,e[7]),t.add(e[7],r,e[7]),t.add(e[7],o,e[7]),t.add(e[7],i,e[7]),e};var te=new d;w.computeTransformation=function(n,e){W.typeOf.object("box",n),p(e)||(e=new j);let c=n.center,h=d.multiplyByUniformScale(n.halfAxes,2,te);return j.fromRotationTranslation(h,c,e)};var ee=new k;w.isOccluded=function(n,e){if(!p(n))throw new b("box is required.");if(!p(e))throw new b("occluder is required.");let c=k.fromOrientedBoundingBox(n,ee);return!e.isBoundingSphereVisible(c)};w.prototype.intersectPlane=function(n){return w.intersectPlane(this,n)};w.prototype.distanceSquaredTo=function(n){return w.distanceSquaredTo(this,n)};w.prototype.computePlaneDistances=function(n,e,c){return w.computePlaneDistances(this,n,e,c)};w.prototype.computeCorners=function(n){return w.computeCorners(this,n)};w.prototype.computeTransformation=function(n){return w.computeTransformation(this,n)};w.prototype.isOccluded=function(n){return w.isOccluded(this,n)};w.equals=function(n,e){return n===e||p(n)&&p(e)&&t.equals(n.center,e.center)&&d.equals(n.halfAxes,e.halfAxes)};w.prototype.clone=function(n){return w.clone(this,n)};w.prototype.equals=function(n){return w.equals(this,n)};var Pe=w;export{Pe as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as C}from"./chunk-
|
|
26
|
+
import{a as C}from"./chunk-PO64KPKA.js";import{b as g}from"./chunk-R3KD5ZAI.js";import{e as f}from"./chunk-GBI3IATP.js";var d=C.EPSILON10;function x(e,r,h,n){if(g.defined("equalsEpsilon",r),!f(e))return;h=h??!1;let c=f(n),l=e.length;if(l<2)return e;let i,s=e[0],o,t,p=0,m=-1;for(i=1;i<l;++i)o=e[i],r(s,o,d)?(f(t)||(t=e.slice(0,i),p=i-1,m=0),c&&n.push(i)):(f(t)&&(t.push(o),p=i,c&&(m=n.length)),s=o);return h&&r(e[0],e[l-1],d)&&(c&&(f(t)?n.splice(m,0,p):n.push(l-1)),f(t)?t.length-=1:t=e.slice(0,-1)),f(t)?t:e}var k=x;export{k as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as h}from"./chunk-
|
|
26
|
+
import{a as h}from"./chunk-HMV6ETSJ.js";import{a as n,c as y,e as a}from"./chunk-FCVV6A2F.js";import{b as f}from"./chunk-R3KD5ZAI.js";var x={},b=new n,P=new n,B=new n,M=new n,w=new h;x.validOutline=function(i){f.defined("positions",i);let o=h.fromPoints(i,w).halfAxes,e=a.getColumn(o,0,P),r=a.getColumn(o,1,B),t=a.getColumn(o,2,M),u=n.magnitude(e),s=n.magnitude(r),l=n.magnitude(t);return!(u===0&&(s===0||l===0)||s===0&&l===0)};x.computeProjectTo2DArguments=function(i,c,o,e){f.defined("positions",i),f.defined("centerResult",c),f.defined("planeAxis1Result",o),f.defined("planeAxis2Result",e);let r=h.fromPoints(i,w),t=r.halfAxes,u=a.getColumn(t,0,P),s=a.getColumn(t,1,B),l=a.getColumn(t,2,M),A=n.magnitude(u),d=n.magnitude(s),g=n.magnitude(l),m=Math.min(A,d,g);if(A===0&&(d===0||g===0)||d===0&&g===0)return!1;let p,C;return(m===d||m===g)&&(p=u),m===A?p=s:m===g&&(C=s),(m===A||m===d)&&(C=l),n.normalize(p,o),n.normalize(C,e),n.clone(r.center,c),!0};function z(i,c,o,e,r){let t=n.subtract(i,c,b),u=n.dot(o,t),s=n.dot(e,t);return y.fromElements(u,s,r)}x.createProjectPointsTo2DFunction=function(i,c,o){return function(e){let r=new Array(e.length);for(let t=0;t<e.length;t++)r[t]=z(e[t],i,c,o);return r}};x.createProjectPointTo2DFunction=function(i,c,o){return function(e,r){return z(e,i,c,o,r)}};var O=x;export{O as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{f as O}from"./chunk-
|
|
26
|
+
import{f as O}from"./chunk-FCVV6A2F.js";import{a as f}from"./chunk-R3KD5ZAI.js";import{e as t}from"./chunk-GBI3IATP.js";function n(e){e=e??O.EMPTY_OBJECT,this.position=e.position??!1,this.normal=e.normal??!1,this.st=e.st??!1,this.bitangent=e.bitangent??!1,this.tangent=e.tangent??!1,this.color=e.color??!1}n.POSITION_ONLY=Object.freeze(new n({position:!0}));n.POSITION_AND_NORMAL=Object.freeze(new n({position:!0,normal:!0}));n.POSITION_NORMAL_AND_ST=Object.freeze(new n({position:!0,normal:!0,st:!0}));n.POSITION_AND_ST=Object.freeze(new n({position:!0,st:!0}));n.POSITION_AND_COLOR=Object.freeze(new n({position:!0,color:!0}));n.ALL=Object.freeze(new n({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0}));n.DEFAULT=n.POSITION_NORMAL_AND_ST;n.packedLength=6;n.pack=function(e,o,i){if(!t(e))throw new f("value is required");if(!t(o))throw new f("array is required");return i=i??0,o[i++]=e.position?1:0,o[i++]=e.normal?1:0,o[i++]=e.st?1:0,o[i++]=e.tangent?1:0,o[i++]=e.bitangent?1:0,o[i]=e.color?1:0,o};n.unpack=function(e,o,i){if(!t(e))throw new f("array is required");return o=o??0,t(i)||(i=new n),i.position=e[o++]===1,i.normal=e[o++]===1,i.st=e[o++]===1,i.tangent=e[o++]===1,i.bitangent=e[o++]===1,i.color=e[o]===1,i};n.clone=function(e,o){if(t(e))return t(o)||(o=new n),o.position=e.position,o.normal=e.normal,o.st=e.st,o.tangent=e.tangent,o.bitangent=e.bitangent,o.color=e.color,o};var _=n;export{_ as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
import{a as y,b as P,d as B}from"./chunk-
|
|
26
|
+
import{a as y,b as P,d as B}from"./chunk-FCVV6A2F.js";import{a as L}from"./chunk-PO64KPKA.js";import{b as q}from"./chunk-R3KD5ZAI.js";import{e as T}from"./chunk-GBI3IATP.js";function X(n){let a=n._uSquared,t=n._ellipsoid.maximumRadius,e=n._ellipsoid.minimumRadius,f=(t-e)/t,m=Math.cos(n._startHeading),_=Math.sin(n._startHeading),r=(1-f)*Math.tan(n._start.latitude),p=1/Math.sqrt(1+r*r),R=p*r,M=Math.atan2(r,m),l=p*_,U=l*l,i=1-U,A=Math.sqrt(i),c=a/4,o=c*c,h=o*c,S=o*o,u=1+c-3*o/4+5*h/4-175*S/64,C=1-c+15*o/8-35*h/8,d=1-3*c+35*o/4,g=1-5*c,w=u*M-C*Math.sin(2*M)*c/2-d*Math.sin(4*M)*o/16-g*Math.sin(6*M)*h/48-Math.sin(8*M)*5*S/512,s=n._constants;s.a=t,s.b=e,s.f=f,s.cosineHeading=m,s.sineHeading=_,s.tanU=r,s.cosineU=p,s.sineU=R,s.sigma=M,s.sineAlpha=l,s.sineSquaredAlpha=U,s.cosineSquaredAlpha=i,s.cosineAlpha=A,s.u2Over4=c,s.u4Over16=o,s.u6Over64=h,s.u8Over256=S,s.a0=u,s.a1=C,s.a2=d,s.a3=g,s.distanceRatio=w}function Y(n,a){return n*a*(4+n*(4-3*a))/16}function k(n,a,t,e,f,m,_){let r=Y(n,t);return(1-r)*n*a*(e+r*f*(_+r*m*(2*_*_-1)))}function Z(n,a,t,e,f,m,_){let r=(a-t)/a,p=m-e,R=Math.atan((1-r)*Math.tan(f)),M=Math.atan((1-r)*Math.tan(_)),l=Math.cos(R),U=Math.sin(R),i=Math.cos(M),A=Math.sin(M),c=l*i,o=l*A,h=U*A,S=U*i,u=p,C=L.TWO_PI,d=Math.cos(u),g=Math.sin(u),w,s,O,H,b;do{d=Math.cos(u),g=Math.sin(u);let z=o-S*d;O=Math.sqrt(i*i*g*g+z*z),s=h+c*d,w=Math.atan2(O,s);let D;O===0?(D=0,H=1):(D=c*g/O,H=1-D*D),C=u,b=s-2*h/H,isFinite(b)||(b=0),u=p+k(r,D,H,w,O,s,b)}while(Math.abs(u-C)>L.EPSILON12);let v=H*(a*a-t*t)/(t*t),W=1+v*(4096+v*(v*(320-175*v)-768))/16384,I=v*(256+v*(v*(74-47*v)-128))/1024,F=b*b,J=I*O*(b+I*(s*(2*F-1)-I*b*(4*O*O-3)*(4*F-3)/6)/4),K=t*W*(w-J),Q=Math.atan2(i*g,o-S*d),V=Math.atan2(l*g,o*d-S);n._distance=K,n._startHeading=Q,n._endHeading=V,n._uSquared=v}var $=new y,x=new y;function N(n,a,t,e){let f=y.normalize(e.cartographicToCartesian(a,x),$),m=y.normalize(e.cartographicToCartesian(t,x),x);q.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(y.angleBetween(f,m))-Math.PI),.0125),Z(n,e.maximumRadius,e.minimumRadius,a.longitude,a.latitude,t.longitude,t.latitude),n._start=P.clone(a,n._start),n._end=P.clone(t,n._end),n._start.height=0,n._end.height=0,X(n)}function E(n,a,t){let e=t??B.default;this._ellipsoid=e,this._start=new P,this._end=new P,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,T(n)&&T(a)&&N(this,n,a,e)}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return q.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return q.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return q.defined("distance",this._distance),this._endHeading}}});E.prototype.setEndPoints=function(n,a){q.defined("start",n),q.defined("end",a),N(this,n,a,this._ellipsoid)};E.prototype.interpolateUsingFraction=function(n,a){return this.interpolateUsingSurfaceDistance(this._distance*n,a)};E.prototype.interpolateUsingSurfaceDistance=function(n,a){q.defined("distance",this._distance);let t=this._constants,e=t.distanceRatio+n/t.b,f=Math.cos(2*e),m=Math.cos(4*e),_=Math.cos(6*e),r=Math.sin(2*e),p=Math.sin(4*e),R=Math.sin(6*e),M=Math.sin(8*e),l=e*e,U=e*l,i=t.u8Over256,A=t.u2Over4,c=t.u6Over64,o=t.u4Over16,h=2*U*i*f/3+e*(1-A+7*o/4-15*c/4+579*i/64-(o-15*c/4+187*i/16)*f-(5*c/4-115*i/16)*m-29*i*_/16)+(A/2-o+71*c/32-85*i/16)*r+(5*o/16-5*c/4+383*i/96)*p-l*((c-11*i/2)*r+5*i*p/2)+(29*c/96-29*i/16)*R+539*i*M/1536,S=Math.asin(Math.sin(h)*t.cosineAlpha),u=Math.atan(t.a/t.b*Math.tan(S));h=h-t.sigma;let C=Math.cos(2*t.sigma+h),d=Math.sin(h),g=Math.cos(h),w=t.cosineU*g,s=t.sineU*d,H=Math.atan2(d*t.sineHeading,w-s*t.cosineHeading)-k(t.f,t.sineAlpha,t.cosineSquaredAlpha,h,d,g,C);return T(a)?(a.longitude=this._start.longitude+H,a.latitude=u,a.height=0,a):new P(this._start.longitude+H,u,0)};var et=E;export{et as a};
|