@pggis/pg-sdk 5.0.0 → 5.0.11

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.
Files changed (112) hide show
  1. package/README.md +8 -8
  2. package/dist/index.js +90 -91
  3. package/dist/pggis.min.css +1 -1
  4. package/dist/pggis.min.js +4465 -4476
  5. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
  6. package/dist/resources/Workers/{chunk-WQBKKXJC.js → chunk-35SHYARM.js} +2 -2
  7. package/dist/resources/Workers/{chunk-Y53SIX6D.js → chunk-37F5JSTI.js} +2 -2
  8. package/dist/resources/Workers/{chunk-PO64KPKA.js → chunk-3SSKC3VN.js} +2 -2
  9. package/dist/resources/Workers/{chunk-I3XHKING.js → chunk-3W4GT7KQ.js} +2 -2
  10. package/dist/resources/Workers/{chunk-VMOPYKP4.js → chunk-4IW2T6GF.js} +2 -2
  11. package/dist/resources/Workers/{chunk-BTPJ3H6N.js → chunk-5YEWO3HT.js} +2 -2
  12. package/dist/resources/Workers/{chunk-FCVV6A2F.js → chunk-64RSHJUE.js} +2 -2
  13. package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
  14. package/dist/resources/Workers/{chunk-5GVU4LLW.js → chunk-7HTKERZY.js} +2 -2
  15. package/dist/resources/Workers/{chunk-7IBY6LYM.js → chunk-A56XVLQR.js} +2 -2
  16. package/dist/resources/Workers/{chunk-335F4KMR.js → chunk-AJYK4IVJ.js} +2 -2
  17. package/dist/resources/Workers/{chunk-YC4EEWUJ.js → chunk-ARG42DC4.js} +2 -2
  18. package/dist/resources/Workers/{chunk-5EZKANRV.js → chunk-AU7IKHOH.js} +2 -2
  19. package/dist/resources/Workers/{chunk-PQSWZ6QE.js → chunk-B4AA3ARO.js} +2 -2
  20. package/dist/resources/Workers/{chunk-HMV6ETSJ.js → chunk-CNCV5UL7.js} +2 -2
  21. package/dist/resources/Workers/{chunk-JU23HGY3.js → chunk-CYCB63OH.js} +2 -2
  22. package/dist/resources/Workers/{chunk-AHKBUIAX.js → chunk-D6AA5QVT.js} +2 -2
  23. package/dist/resources/Workers/{chunk-LIEFEM73.js → chunk-D6C66QON.js} +2 -2
  24. package/dist/resources/Workers/{chunk-BCYX7GBY.js → chunk-DEPHB2WM.js} +2 -2
  25. package/dist/resources/Workers/{chunk-HLFNWOQ4.js → chunk-DMEY62ID.js} +2 -2
  26. package/dist/resources/Workers/{chunk-QJG5NRTN.js → chunk-DQQ63PYM.js} +2 -2
  27. package/dist/resources/Workers/{chunk-7RJW35V3.js → chunk-ED5JPB3S.js} +2 -2
  28. package/dist/resources/Workers/{chunk-I7WJS3WM.js → chunk-EZUYS2JF.js} +2 -2
  29. package/dist/resources/Workers/{chunk-DSXZVGY7.js → chunk-FEVXJ54I.js} +2 -2
  30. package/dist/resources/Workers/{chunk-N6G72L23.js → chunk-G5AGHVVC.js} +2 -2
  31. package/dist/resources/Workers/{chunk-AOSK7NDA.js → chunk-GBYLG25F.js} +1 -1
  32. package/dist/resources/Workers/{chunk-YL47XCQ4.js → chunk-GILIDQNQ.js} +2 -2
  33. package/dist/resources/Workers/{chunk-SNN6UCXM.js → chunk-HMIYSTF6.js} +2 -2
  34. package/dist/resources/Workers/{chunk-YDUNCXSU.js → chunk-HTFSEEMT.js} +2 -2
  35. package/dist/resources/Workers/{chunk-WNAZRVVU.js → chunk-HWXX4CWK.js} +2 -2
  36. package/dist/resources/Workers/{chunk-4QCIHDA2.js → chunk-IYTZ52EY.js} +2 -2
  37. package/dist/resources/Workers/{chunk-ATTMFTQ4.js → chunk-J6UP6FLE.js} +1 -1
  38. package/dist/resources/Workers/{chunk-R3KD5ZAI.js → chunk-LEYMRMBK.js} +2 -2
  39. package/dist/resources/Workers/{chunk-QGPFMASY.js → chunk-M3MGYQSL.js} +1 -1
  40. package/dist/resources/Workers/{chunk-SPVHGWGM.js → chunk-N4VJKXZS.js} +2 -2
  41. package/dist/resources/Workers/{chunk-ABHTLV4B.js → chunk-NB3ML6JO.js} +2 -2
  42. package/dist/resources/Workers/{chunk-LNFOIPBT.js → chunk-OFUUQVMR.js} +2 -2
  43. package/dist/resources/Workers/{chunk-JOXXXMPE.js → chunk-OSW76XDF.js} +1 -1
  44. package/dist/resources/Workers/{chunk-DGGIK7AD.js → chunk-PSPPBZWI.js} +3 -3
  45. package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
  46. package/dist/resources/Workers/{chunk-46IDNOB6.js → chunk-QOUAJ6TL.js} +2 -2
  47. package/dist/resources/Workers/{chunk-BDLVVHOG.js → chunk-RCV6KWXS.js} +2 -2
  48. package/dist/resources/Workers/{chunk-BGQDOF2W.js → chunk-TCGIRNHN.js} +2 -2
  49. package/dist/resources/Workers/{chunk-KORWG3CG.js → chunk-U4IEOH5K.js} +2 -2
  50. package/dist/resources/Workers/{chunk-F7XR2IV5.js → chunk-UP6I5URU.js} +2 -2
  51. package/dist/resources/Workers/{chunk-GBI3IATP.js → chunk-VTAIKJXX.js} +1 -1
  52. package/dist/resources/Workers/{chunk-72ENFGTU.js → chunk-VTBDSFTG.js} +2 -2
  53. package/dist/resources/Workers/{chunk-NU4XOT2V.js → chunk-VW6VD53G.js} +2 -2
  54. package/dist/resources/Workers/{chunk-KTDI3TD2.js → chunk-WGGIH7QW.js} +2 -2
  55. package/dist/resources/Workers/{chunk-SRJEQ4WA.js → chunk-WWA5PL4H.js} +2 -2
  56. package/dist/resources/Workers/{chunk-GRCPCORO.js → chunk-WZDE3RYP.js} +2 -2
  57. package/dist/resources/Workers/{chunk-RQ3X5FSK.js → chunk-XRL4AVS5.js} +2 -2
  58. package/dist/resources/Workers/combineGeometry.js +2 -2
  59. package/dist/resources/Workers/createBoxGeometry.js +2 -2
  60. package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -2
  61. package/dist/resources/Workers/createCircleGeometry.js +2 -2
  62. package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -2
  63. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -2
  64. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
  65. package/dist/resources/Workers/createCorridorGeometry.js +2 -2
  66. package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -2
  67. package/dist/resources/Workers/createCylinderGeometry.js +2 -2
  68. package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -2
  69. package/dist/resources/Workers/createEllipseGeometry.js +2 -2
  70. package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -2
  71. package/dist/resources/Workers/createEllipsoidGeometry.js +2 -2
  72. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -2
  73. package/dist/resources/Workers/createFrustumGeometry.js +2 -2
  74. package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -2
  75. package/dist/resources/Workers/createGeometry.js +2 -2
  76. package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -2
  77. package/dist/resources/Workers/createPlaneGeometry.js +2 -2
  78. package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -2
  79. package/dist/resources/Workers/createPolygonGeometry.js +2 -2
  80. package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -2
  81. package/dist/resources/Workers/createPolylineGeometry.js +2 -2
  82. package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -2
  83. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
  84. package/dist/resources/Workers/createRectangleGeometry.js +2 -2
  85. package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -2
  86. package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -2
  87. package/dist/resources/Workers/createSphereGeometry.js +2 -2
  88. package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -2
  89. package/dist/resources/Workers/createTaskProcessorWorker.js +2 -2
  90. package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -2
  91. package/dist/resources/Workers/createVectorTileGeometries.js +2 -2
  92. package/dist/resources/Workers/createVectorTilePoints.js +2 -2
  93. package/dist/resources/Workers/createVectorTilePolygons.js +2 -2
  94. package/dist/resources/Workers/createVectorTilePolylines.js +2 -2
  95. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
  96. package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2
  97. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
  98. package/dist/resources/Workers/createWallGeometry.js +2 -2
  99. package/dist/resources/Workers/createWallOutlineGeometry.js +2 -2
  100. package/dist/resources/Workers/decodeDraco.js +2 -2
  101. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
  102. package/dist/resources/Workers/decodeI3S.js +2 -2
  103. package/dist/resources/Workers/gaussianSplatSorter.js +2 -2
  104. package/dist/resources/Workers/gaussianSplatTextureGenerator.js +2 -2
  105. package/dist/resources/Workers/transcodeKTX2.js +2 -2
  106. package/dist/resources/Workers/transferTypedArrayTest.js +1 -1
  107. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -2
  108. package/package.json +3 -1
  109. package/CHANGELOG.md +0 -611
  110. package/dist/dist/index.js +0 -1964
  111. package/dist/resources/Workers/chunk-3FFM6NRK.js +0 -26
  112. package/dist/resources/Workers/chunk-6EFYFFBI.js +0 -26
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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 z}from"./chunk-VMOPYKP4.js";import{h as I,i as b}from"./chunk-DGGIK7AD.js";import{a as W,b as O,d as L}from"./chunk-FCVV6A2F.js";import{a as m}from"./chunk-PO64KPKA.js";import{a as v}from"./chunk-R3KD5ZAI.js";import{e as k}from"./chunk-GBI3IATP.js";var Z=Math.cos,B=Math.sin,p=Math.sqrt,N={};N.computePosition=function(t,M,g,u,G,h,a){let e=M.radiiSquared,i=t.nwCorner,r=t.boundingRectangle,n=i.latitude-t.granYCos*u+G*t.granXSin,d=Z(n),X=B(n),Y=e.z*X,s=i.longitude+u*t.granYSin+G*t.granXCos,S=d*Z(s),f=d*B(s),w=e.x*S,R=e.y*f,_=p(w*S+R*f+Y*X);if(h.x=w/_,h.y=R/_,h.z=Y/_,g){let o=t.stNwCorner;k(o)?(n=o.latitude-t.stGranYCos*u+G*t.stGranXSin,s=o.longitude+u*t.stGranYSin+G*t.stGranXCos,a.x=(s-t.stWest)*t.lonScalar,a.y=(n-t.stSouth)*t.latScalar):(a.x=(s-r.west)*t.lonScalar,a.y=(n-r.south)*t.latScalar)}};var A=new b,l=new W,F=new O,j=new W,y=new z;function D(t,M,g,u,G,h,a){let e=Math.cos(M),i=u*e,r=g*e,n=Math.sin(M),d=u*n,X=g*n;y._ellipsoid=L.default,l=y.project(t,l),l=W.subtract(l,j,l);let Y=b.fromRotation(M,A);l=b.multiplyByVector(Y,l,l),l=W.add(l,j,l),t=y.unproject(l,t),h-=1,a-=1;let s=t.latitude,S=s+h*X,f=s-i*a,w=s-i*a+h*X,R=Math.max(s,S,f,w),_=Math.min(s,S,f,w),o=t.longitude,E=o+h*r,T=o+a*d,V=o+a*d+h*r,q=Math.max(o,E,T,V),x=Math.min(o,E,T,V);return{north:R,south:_,east:q,west:x,granYCos:i,granYSin:d,granXCos:r,granXSin:X,nwCorner:t}}N.computeOptions=function(t,M,g,u,G,h,a){let e=t.east,i=t.west,r=t.north,n=t.south,d=!1,X=!1;r===m.PI_OVER_TWO&&(d=!0),n===-m.PI_OVER_TWO&&(X=!0);let Y,s=r-n;i>e?Y=m.TWO_PI-i+e:Y=e-i;let S=Math.ceil(Y/M)+1,f=Math.ceil(s/M)+1,w=Y/(S-1),R=s/(f-1),_=I.northwest(t,h),o=I.center(t,F);(g!==0||u!==0)&&(o.longitude<_.longitude&&(o.longitude+=m.TWO_PI),y._ellipsoid=L.default,j=y.project(o,j));let E=R,T=w,V=0,q=0,x=I.clone(t,G),c={granYCos:E,granYSin:V,granXCos:T,granXSin:q,nwCorner:_,boundingRectangle:x,width:S,height:f,northCap:d,southCap:X};if(g!==0){let C=D(_,g,w,R,o,S,f);if(r=C.north,n=C.south,e=C.east,i=C.west,r<-m.PI_OVER_TWO||r>m.PI_OVER_TWO||n<-m.PI_OVER_TWO||n>m.PI_OVER_TWO)throw new v("Rotated rectangle is invalid. It crosses over either the north or south pole.");c.granYCos=C.granYCos,c.granYSin=C.granYSin,c.granXCos=C.granXCos,c.granXSin=C.granXSin,x.north=r,x.south=n,x.east=e,x.west=i}if(u!==0){g=g-u;let C=I.northwest(x,a),P=D(C,g,w,R,o,S,f);c.stGranYCos=P.granYCos,c.stGranXCos=P.granXCos,c.stGranYSin=P.granYSin,c.stGranXSin=P.granXSin,c.stNwCorner=C,c.stWest=P.west,c.stSouth=P.south}return c};var st=N;export{st as a};
26
+ import{a as z}from"./chunk-4IW2T6GF.js";import{h as I,i as b}from"./chunk-PSPPBZWI.js";import{a as W,b as O,d as L}from"./chunk-64RSHJUE.js";import{a as m}from"./chunk-3SSKC3VN.js";import{a as v}from"./chunk-LEYMRMBK.js";import{e as k}from"./chunk-VTAIKJXX.js";var Z=Math.cos,B=Math.sin,p=Math.sqrt,N={};N.computePosition=function(t,M,g,u,G,h,a){let e=M.radiiSquared,i=t.nwCorner,r=t.boundingRectangle,n=i.latitude-t.granYCos*u+G*t.granXSin,d=Z(n),X=B(n),Y=e.z*X,s=i.longitude+u*t.granYSin+G*t.granXCos,S=d*Z(s),f=d*B(s),w=e.x*S,R=e.y*f,_=p(w*S+R*f+Y*X);if(h.x=w/_,h.y=R/_,h.z=Y/_,g){let o=t.stNwCorner;k(o)?(n=o.latitude-t.stGranYCos*u+G*t.stGranXSin,s=o.longitude+u*t.stGranYSin+G*t.stGranXCos,a.x=(s-t.stWest)*t.lonScalar,a.y=(n-t.stSouth)*t.latScalar):(a.x=(s-r.west)*t.lonScalar,a.y=(n-r.south)*t.latScalar)}};var A=new b,l=new W,F=new O,j=new W,y=new z;function D(t,M,g,u,G,h,a){let e=Math.cos(M),i=u*e,r=g*e,n=Math.sin(M),d=u*n,X=g*n;y._ellipsoid=L.default,l=y.project(t,l),l=W.subtract(l,j,l);let Y=b.fromRotation(M,A);l=b.multiplyByVector(Y,l,l),l=W.add(l,j,l),t=y.unproject(l,t),h-=1,a-=1;let s=t.latitude,S=s+h*X,f=s-i*a,w=s-i*a+h*X,R=Math.max(s,S,f,w),_=Math.min(s,S,f,w),o=t.longitude,E=o+h*r,T=o+a*d,V=o+a*d+h*r,q=Math.max(o,E,T,V),x=Math.min(o,E,T,V);return{north:R,south:_,east:q,west:x,granYCos:i,granYSin:d,granXCos:r,granXSin:X,nwCorner:t}}N.computeOptions=function(t,M,g,u,G,h,a){let e=t.east,i=t.west,r=t.north,n=t.south,d=!1,X=!1;r===m.PI_OVER_TWO&&(d=!0),n===-m.PI_OVER_TWO&&(X=!0);let Y,s=r-n;i>e?Y=m.TWO_PI-i+e:Y=e-i;let S=Math.ceil(Y/M)+1,f=Math.ceil(s/M)+1,w=Y/(S-1),R=s/(f-1),_=I.northwest(t,h),o=I.center(t,F);(g!==0||u!==0)&&(o.longitude<_.longitude&&(o.longitude+=m.TWO_PI),y._ellipsoid=L.default,j=y.project(o,j));let E=R,T=w,V=0,q=0,x=I.clone(t,G),c={granYCos:E,granYSin:V,granXCos:T,granXSin:q,nwCorner:_,boundingRectangle:x,width:S,height:f,northCap:d,southCap:X};if(g!==0){let C=D(_,g,w,R,o,S,f);if(r=C.north,n=C.south,e=C.east,i=C.west,r<-m.PI_OVER_TWO||r>m.PI_OVER_TWO||n<-m.PI_OVER_TWO||n>m.PI_OVER_TWO)throw new v("Rotated rectangle is invalid. It crosses over either the north or south pole.");c.granYCos=C.granYCos,c.granYSin=C.granYSin,c.granXCos=C.granXCos,c.granXSin=C.granXSin,x.north=r,x.south=n,x.east=e,x.west=i}if(u!==0){g=g-u;let C=I.northwest(x,a),P=D(C,g,w,R,o,S,f);c.stGranYCos=P.granYCos,c.stGranXCos=P.granXCos,c.stGranYSin=P.granYSin,c.stGranXSin=P.granXSin,c.stNwCorner=C,c.stWest=P.west,c.stSouth=P.south}return c};var st=N;export{st as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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-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]})
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]})
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};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.132
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import{a as st}from"./chunk-G5AGHVVC.js";import{b as xt,c as ht,d as et}from"./chunk-RCV6KWXS.js";import{a as tt}from"./chunk-AU7IKHOH.js";import{a as h,b as Y,c as g,d as gt}from"./chunk-64RSHJUE.js";import{a as X}from"./chunk-3SSKC3VN.js";import{a as ft}from"./chunk-OSW76XDF.js";import{b as A}from"./chunk-LEYMRMBK.js";import{e as F}from"./chunk-VTAIKJXX.js";var ct={CLOCKWISE:ft.CW,COUNTER_CLOCKWISE:ft.CCW};ct.validate=function(t){return t===ct.CLOCKWISE||t===ct.COUNTER_CLOCKWISE};var at=Object.freeze(ct);function mt(t,n,e=2){let o=n&&n.length,r=o?n[0]*e:t.length,s=wt(t,0,r,e,!0),i=[];if(!s||s.next===s.prev)return i;let c,x,u;if(o&&(s=It(t,n,s,e)),t.length>80*e){c=t[0],x=t[1];let p=c,y=x;for(let b=e;b<r;b+=e){let S=t[b],a=t[b+1];S<c&&(c=S),a<x&&(x=a),S>p&&(p=S),a>y&&(y=a)}u=Math.max(p-c,y-x),u=u!==0?32767/u:0}return rt(s,i,e,c,x,u,0),i}function wt(t,n,e,o,r){let s;if(r===Vt(t,n,e,o)>0)for(let i=n;i<e;i+=o)s=vt(i/o|0,t[i],t[i+1],s);else for(let i=e-o;i>=n;i-=o)s=vt(i/o|0,t[i],t[i+1],s);return s&&K(s,s.next)&&(ot(s),s=s.next),s}function N(t,n){if(!t)return t;n||(n=t);let e=t,o;do if(o=!1,!e.steiner&&(K(e,e.next)||w(e.prev,e,e.next)===0)){if(ot(e),e=n=e.prev,e===e.next)break;o=!0}else e=e.next;while(o||e!==n);return n}function rt(t,n,e,o,r,s,i){if(!t)return;!i&&s&&Nt(t,o,r,s);let c=t;for(;t.prev!==t.next;){let x=t.prev,u=t.next;if(s?Rt(t,o,r,s):Pt(t)){n.push(x.i,t.i,u.i),ot(t),t=u.next,c=u.next;continue}if(t=u,t===c){i?i===1?(t=zt(N(t),n),rt(t,n,e,o,r,s,2)):i===2&&Bt(t,n,e,o,r,s):rt(N(t),n,e,o,r,s,1);break}}}function Pt(t){let n=t.prev,e=t,o=t.next;if(w(n,e,o)>=0)return!1;let r=n.x,s=e.x,i=o.x,c=n.y,x=e.y,u=o.y,p=Math.min(r,s,i),y=Math.min(c,x,u),b=Math.max(r,s,i),S=Math.max(c,x,u),a=o.next;for(;a!==n;){if(a.x>=p&&a.x<=b&&a.y>=y&&a.y<=S&&nt(r,c,s,x,i,u,a.x,a.y)&&w(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function Rt(t,n,e,o){let r=t.prev,s=t,i=t.next;if(w(r,s,i)>=0)return!1;let c=r.x,x=s.x,u=i.x,p=r.y,y=s.y,b=i.y,S=Math.min(c,x,u),a=Math.min(p,y,b),T=Math.max(c,x,u),L=Math.max(p,y,b),z=pt(S,a,n,e,o),D=pt(T,L,n,e,o),l=t.prevZ,f=t.nextZ;for(;l&&l.z>=z&&f&&f.z<=D;){if(l.x>=S&&l.x<=T&&l.y>=a&&l.y<=L&&l!==r&&l!==i&&nt(c,p,x,y,u,b,l.x,l.y)&&w(l.prev,l,l.next)>=0||(l=l.prevZ,f.x>=S&&f.x<=T&&f.y>=a&&f.y<=L&&f!==r&&f!==i&&nt(c,p,x,y,u,b,f.x,f.y)&&w(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;l&&l.z>=z;){if(l.x>=S&&l.x<=T&&l.y>=a&&l.y<=L&&l!==r&&l!==i&&nt(c,p,x,y,u,b,l.x,l.y)&&w(l.prev,l,l.next)>=0)return!1;l=l.prevZ}for(;f&&f.z<=D;){if(f.x>=S&&f.x<=T&&f.y>=a&&f.y<=L&&f!==r&&f!==i&&nt(c,p,x,y,u,b,f.x,f.y)&&w(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function zt(t,n){let e=t;do{let o=e.prev,r=e.next.next;!K(o,r)&&bt(o,e,e.next,r)&&it(o,r)&&it(r,o)&&(n.push(o.i,e.i,r.i),ot(e),ot(e.next),e=t=r),e=e.next}while(e!==t);return N(e)}function Bt(t,n,e,o,r,s){let i=t;do{let c=i.next.next;for(;c!==i.prev;){if(i.i!==c.i&&_t(i,c)){let x=Mt(i,c);i=N(i,i.next),x=N(x,x.next),rt(i,n,e,o,r,s,0),rt(x,n,e,o,r,s,0);return}c=c.next}i=i.next}while(i!==t)}function It(t,n,e,o){let r=[];for(let s=0,i=n.length;s<i;s++){let c=n[s]*o,x=s<i-1?n[s+1]*o:t.length,u=wt(t,c,x,o,!1);u===u.next&&(u.steiner=!0),r.push(Ut(u))}r.sort(Wt);for(let s=0;s<r.length;s++)e=$t(r[s],e);return e}function Wt(t,n){let e=t.x-n.x;if(e===0&&(e=t.y-n.y,e===0)){let o=(t.next.y-t.y)/(t.next.x-t.x),r=(n.next.y-n.y)/(n.next.x-n.x);e=o-r}return e}function $t(t,n){let e=Gt(t,n);if(!e)return n;let o=Mt(e,t);return N(o,o.next),N(e,e.next)}function Gt(t,n){let e=n,o=t.x,r=t.y,s=-1/0,i;if(K(t,e))return e;do{if(K(t,e.next))return e.next;if(r<=e.y&&r>=e.next.y&&e.next.y!==e.y){let y=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(y<=o&&y>s&&(s=y,i=e.x<e.next.x?e:e.next,y===o))return i}e=e.next}while(e!==n);if(!i)return null;let c=i,x=i.x,u=i.y,p=1/0;e=i;do{if(o>=e.x&&e.x>=x&&o!==e.x&&St(r<u?o:s,r,x,u,r<u?s:o,r,e.x,e.y)){let y=Math.abs(r-e.y)/(o-e.x);it(e,t)&&(y<p||y===p&&(e.x>i.x||e.x===i.x&&Ht(i,e)))&&(i=e,p=y)}e=e.next}while(e!==c);return i}function Ht(t,n){return w(t.prev,t,n.prev)<0&&w(n.next,t,t.next)<0}function Nt(t,n,e,o){let r=t;do r.z===0&&(r.z=pt(r.x,r.y,n,e,o)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,kt(r)}function kt(t){let n,e=1;do{let o=t,r;t=null;let s=null;for(n=0;o;){n++;let i=o,c=0;for(let u=0;u<e&&(c++,i=i.nextZ,!!i);u++);let x=e;for(;c>0||x>0&&i;)c!==0&&(x===0||!i||o.z<=i.z)?(r=o,o=o.nextZ,c--):(r=i,i=i.nextZ,x--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;o=i}s.nextZ=null,e*=2}while(n>1);return t}function pt(t,n,e,o,r){return t=(t-e)*r|0,n=(n-o)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,t|n<<1}function Ut(t){let n=t,e=t;do(n.x<e.x||n.x===e.x&&n.y<e.y)&&(e=n),n=n.next;while(n!==t);return e}function St(t,n,e,o,r,s,i,c){return(r-i)*(n-c)>=(t-i)*(s-c)&&(t-i)*(o-c)>=(e-i)*(n-c)&&(e-i)*(s-c)>=(r-i)*(o-c)}function nt(t,n,e,o,r,s,i,c){return!(t===i&&n===c)&&St(t,n,e,o,r,s,i,c)}function _t(t,n){return t.next.i!==n.i&&t.prev.i!==n.i&&!Kt(t,n)&&(it(t,n)&&it(n,t)&&jt(t,n)&&(w(t.prev,t,n.prev)||w(t,n.prev,n))||K(t,n)&&w(t.prev,t,t.next)>0&&w(n.prev,n,n.next)>0)}function w(t,n,e){return(n.y-t.y)*(e.x-n.x)-(n.x-t.x)*(e.y-n.y)}function K(t,n){return t.x===n.x&&t.y===n.y}function bt(t,n,e,o){let r=lt(w(t,n,e)),s=lt(w(t,n,o)),i=lt(w(e,o,t)),c=lt(w(e,o,n));return!!(r!==s&&i!==c||r===0&&ut(t,e,n)||s===0&&ut(t,o,n)||i===0&&ut(e,t,o)||c===0&&ut(e,n,o))}function ut(t,n,e){return n.x<=Math.max(t.x,e.x)&&n.x>=Math.min(t.x,e.x)&&n.y<=Math.max(t.y,e.y)&&n.y>=Math.min(t.y,e.y)}function lt(t){return t>0?1:t<0?-1:0}function Kt(t,n){let e=t;do{if(e.i!==t.i&&e.next.i!==t.i&&e.i!==n.i&&e.next.i!==n.i&&bt(e,e.next,t,n))return!0;e=e.next}while(e!==t);return!1}function it(t,n){return w(t.prev,t,t.next)<0?w(t,n,t.next)>=0&&w(t,t.prev,n)>=0:w(t,n,t.prev)<0||w(t,t.next,n)<0}function jt(t,n){let e=t,o=!1,r=(t.x+n.x)/2,s=(t.y+n.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&r<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(o=!o),e=e.next;while(e!==t);return o}function Mt(t,n){let e=yt(t.i,t.x,t.y),o=yt(n.i,n.x,n.y),r=t.next,s=n.prev;return t.next=n,n.prev=t,e.next=r,r.prev=e,o.next=e,e.prev=o,s.next=o,o.prev=s,o}function vt(t,n,e,o){let r=yt(t,n,e);return o?(r.next=o.next,r.prev=o,o.next.prev=r,o.next=r):(r.prev=r,r.next=r),r}function ot(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function yt(t,n,e){return{i:t,x:n,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Vt(t,n,e,o){let r=0;for(let s=n,i=e-o;s<e;s+=o)r+=(t[i]-t[s])*(t[s+1]+t[i+1]),i=s;return r}var qt=new h,Jt=new h,B={};B.computeArea2D=function(t){A.defined("positions",t),A.typeOf.number.greaterThanOrEquals("positions.length",t.length,3);let n=t.length,e=0;for(let o=n-1,r=0;r<n;o=r++){let s=t[o],i=t[r];e+=s.x*i.y-i.x*s.y}return e*.5};B.computeWindingOrder2D=function(t){return B.computeArea2D(t)>0?at.COUNTER_CLOCKWISE:at.CLOCKWISE};B.triangulate=function(t,n){A.defined("positions",t);let e=g.packArray(t);return mt(e,n,2)};var Tt=new h,Ot=new h,Zt=new h,At=new h,Ct=new h,Et=new h,R=new h,Lt=new g,Ft=new g,Dt=new g,j=new g;B.computeSubdivision=function(t,n,e,o,r){r=r??X.RADIANS_PER_DEGREE;let s=F(o);A.typeOf.object("ellipsoid",t),A.defined("positions",n),A.defined("indices",e),A.typeOf.number.greaterThanOrEquals("indices.length",e.length,3),A.typeOf.number.equals("indices.length % 3","0",e.length%3,0),A.typeOf.number.greaterThan("granularity",r,0);let i=e.slice(0),c,x=n.length,u=new Array(x*3),p=new Array(x*2),y=0,b=0;for(c=0;c<x;c++){let l=n[c];if(u[y++]=l.x,u[y++]=l.y,u[y++]=l.z,s){let f=o[c];p[b++]=f.x,p[b++]=f.y}}let S=[],a={},T=t.maximumRadius,L=X.chordLength(r,T),z=L*L;for(;i.length>0;){let l=i.pop(),f=i.pop(),m=i.pop(),M=h.fromArray(u,m*3,Tt),C=h.fromArray(u,f*3,Ot),V=h.fromArray(u,l*3,Zt),q,J,I;s&&(q=g.fromArray(p,m*2,Lt),J=g.fromArray(p,f*2,Ft),I=g.fromArray(p,l*2,Dt));let k=h.multiplyByScalar(h.normalize(M,At),T,At),U=h.multiplyByScalar(h.normalize(C,Ct),T,Ct),W=h.multiplyByScalar(h.normalize(V,Et),T,Et),$=h.magnitudeSquared(h.subtract(k,U,R)),G=h.magnitudeSquared(h.subtract(U,W,R)),Q=h.magnitudeSquared(h.subtract(W,k,R)),H=Math.max($,G,Q),O,v,d;H>z?$===H?(O=`${Math.min(m,f)} ${Math.max(m,f)}`,c=a[O],F(c)||(v=h.add(M,C,R),h.multiplyByScalar(v,.5,v),u.push(v.x,v.y,v.z),c=u.length/3-1,a[O]=c,s&&(d=g.add(q,J,j),g.multiplyByScalar(d,.5,d),p.push(d.x,d.y))),i.push(m,c,l),i.push(c,f,l)):G===H?(O=`${Math.min(f,l)} ${Math.max(f,l)}`,c=a[O],F(c)||(v=h.add(C,V,R),h.multiplyByScalar(v,.5,v),u.push(v.x,v.y,v.z),c=u.length/3-1,a[O]=c,s&&(d=g.add(J,I,j),g.multiplyByScalar(d,.5,d),p.push(d.x,d.y))),i.push(f,c,m),i.push(c,l,m)):Q===H&&(O=`${Math.min(l,m)} ${Math.max(l,m)}`,c=a[O],F(c)||(v=h.add(V,M,R),h.multiplyByScalar(v,.5,v),u.push(v.x,v.y,v.z),c=u.length/3-1,a[O]=c,s&&(d=g.add(I,q,j),g.multiplyByScalar(d,.5,d),p.push(d.x,d.y))),i.push(l,c,f),i.push(c,m,f)):(S.push(m),S.push(f),S.push(l))}let D={attributes:{position:new et({componentDatatype:tt.DOUBLE,componentsPerAttribute:3,values:u})},indices:S,primitiveType:xt.TRIANGLES};return s&&(D.attributes.st=new et({componentDatatype:tt.FLOAT,componentsPerAttribute:2,values:p})),new ht(D)};var Qt=new Y,Xt=new Y,Yt=new Y,dt=new Y;B.computeRhumbLineSubdivision=function(t,n,e,o,r){r=r??X.RADIANS_PER_DEGREE;let s=F(o);A.typeOf.object("ellipsoid",t),A.defined("positions",n),A.defined("indices",e),A.typeOf.number.greaterThanOrEquals("indices.length",e.length,3),A.typeOf.number.equals("indices.length % 3","0",e.length%3,0),A.typeOf.number.greaterThan("granularity",r,0);let i=e.slice(0),c,x=n.length,u=new Array(x*3),p=new Array(x*2),y=0,b=0;for(c=0;c<x;c++){let m=n[c];if(u[y++]=m.x,u[y++]=m.y,u[y++]=m.z,s){let M=o[c];p[b++]=M.x,p[b++]=M.y}}let S=[],a={},T=t.maximumRadius,L=X.chordLength(r,T),z=new st(void 0,void 0,t),D=new st(void 0,void 0,t),l=new st(void 0,void 0,t);for(;i.length>0;){let m=i.pop(),M=i.pop(),C=i.pop(),V=h.fromArray(u,C*3,Tt),q=h.fromArray(u,M*3,Ot),J=h.fromArray(u,m*3,Zt),I,k,U;s&&(I=g.fromArray(p,C*2,Lt),k=g.fromArray(p,M*2,Ft),U=g.fromArray(p,m*2,Dt));let W=t.cartesianToCartographic(V,Qt),$=t.cartesianToCartographic(q,Xt),G=t.cartesianToCartographic(J,Yt);z.setEndPoints(W,$);let Q=z.surfaceDistance;D.setEndPoints($,G);let H=D.surfaceDistance;l.setEndPoints(G,W);let O=l.surfaceDistance,v=Math.max(Q,H,O),d,P,_,Z,E;v>L?Q===v?(d=`${Math.min(C,M)} ${Math.max(C,M)}`,c=a[d],F(c)||(P=z.interpolateUsingFraction(.5,dt),_=(W.height+$.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),c=u.length/3-1,a[d]=c,s&&(E=g.add(I,k,j),g.multiplyByScalar(E,.5,E),p.push(E.x,E.y))),i.push(C,c,m),i.push(c,M,m)):H===v?(d=`${Math.min(M,m)} ${Math.max(M,m)}`,c=a[d],F(c)||(P=D.interpolateUsingFraction(.5,dt),_=($.height+G.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),c=u.length/3-1,a[d]=c,s&&(E=g.add(k,U,j),g.multiplyByScalar(E,.5,E),p.push(E.x,E.y))),i.push(M,c,C),i.push(c,m,C)):O===v&&(d=`${Math.min(m,C)} ${Math.max(m,C)}`,c=a[d],F(c)||(P=l.interpolateUsingFraction(.5,dt),_=(G.height+W.height)*.5,Z=h.fromRadians(P.longitude,P.latitude,_,t,R),u.push(Z.x,Z.y,Z.z),c=u.length/3-1,a[d]=c,s&&(E=g.add(U,I,j),g.multiplyByScalar(E,.5,E),p.push(E.x,E.y))),i.push(m,c,M),i.push(c,C,M)):(S.push(C),S.push(M),S.push(m))}let f={attributes:{position:new et({componentDatatype:tt.DOUBLE,componentsPerAttribute:3,values:u})},indices:S,primitiveType:xt.TRIANGLES};return s&&(f.attributes.st=new et({componentDatatype:tt.FLOAT,componentsPerAttribute:2,values:p})),new ht(f)};B.scaleToGeodeticHeight=function(t,n,e,o){e=e??gt.default;let r=qt,s=Jt;if(n=n??0,o=o??!0,F(t)){let i=t.length;for(let c=0;c<i;c+=3)h.fromArray(t,c,s),o&&(s=e.scaleToGeodeticSurface(s,s)),n!==0&&(r=e.geodeticSurfaceNormal(s,r),h.multiplyByScalar(r,n,r),h.add(s,r,s)),t[c]=s.x,t[c+1]=s.y,t[c+2]=s.z}return t};var de=B;export{at as a,de as b};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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}from"./chunk-BCYX7GBY.js";import{d as L}from"./chunk-VMOPYKP4.js";import{b as d,h as W}from"./chunk-DGGIK7AD.js";import{a as A}from"./chunk-5EZKANRV.js";import{a as s,b as k,c as T,d as b}from"./chunk-FCVV6A2F.js";import{a as E}from"./chunk-PO64KPKA.js";import{a as I,b as z}from"./chunk-R3KD5ZAI.js";import{e as h}from"./chunk-GBI3IATP.js";function x(o,t){z.typeOf.object("ellipsoid",o),this._ellipsoid=o,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,h(t)&&(this.cameraPosition=t)}Object.defineProperties(x.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,this._cameraPositionInScaledSpace),n=s.magnitudeSquared(e)-1;s.clone(o,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=n}}});var j=new s;x.prototype.isPointVisible=function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,j);return D(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};x.prototype.isScaledSpacePointVisible=function(o){return D(o,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var it=new s;x.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(o,t){let e=this._ellipsoid,n,i;return h(t)&&t<0&&e.minimumRadius>-t?(i=it,i.x=this._cameraPosition.x/(e.radii.x+t),i.y=this._cameraPosition.y/(e.radii.y+t),i.z=this._cameraPosition.z/(e.radii.z+t),n=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,n=this._distanceToLimbInScaledSpaceSquared),D(o,i,n)};x.prototype.computeHorizonCullingPoint=function(o,t,e){return Z(this._ellipsoid,o,t,e)};var U=b.clone(b.UNIT_SPHERE);x.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(o,t,e,n){let i=v(this._ellipsoid,e,U);return Z(i,o,t,n)};x.prototype.computeHorizonCullingPointFromVertices=function(o,t,e,n,i){return Q(this._ellipsoid,o,t,e,n,i)};x.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(o,t,e,n,i,c){let a=v(this._ellipsoid,i,U);return Q(a,o,t,e,n,c)};var nt=[];x.prototype.computeHorizonCullingPointFromRectangle=function(o,t,e){z.typeOf.object("rectangle",o);let n=W.subsample(o,t,0,nt),i=L.fromPoints(n);if(!(s.magnitude(i.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(i.center,n,e)};var at=new s;function v(o,t,e){if(h(t)&&t<0&&o.minimumRadius>-t){let n=s.fromElements(o.radii.x+t,o.radii.y+t,o.radii.z+t,at);o=b.fromCartesian3(n,e)}return o}function Z(o,t,e,n){z.typeOf.object("directionToPoint",t),z.defined("positions",e),h(n)||(n=new s);let i=X(o,t),c=0;for(let a=0,r=e.length;a<r;++a){let m=e[a],l=J(o,m,i);if(l<0)return;c=Math.max(c,l)}return K(i,c,n)}var q=new s;function Q(o,t,e,n,i,c){z.typeOf.object("directionToPoint",t),z.defined("vertices",e),z.typeOf.number("stride",n),h(c)||(c=new s),n=n??3,i=i??s.ZERO;let a=X(o,t),r=0;for(let m=0,l=e.length;m<l;m+=n){q.x=e[m]+i.x,q.y=e[m+1]+i.y,q.z=e[m+2]+i.z;let u=J(o,q,a);if(u<0)return;r=Math.max(r,u)}return K(a,r,c)}function D(o,t,e){let n=t,i=e,c=s.subtract(o,n,j),a=-s.dot(c,n);return!(i<0?a>0:a>i&&a*a/s.magnitudeSquared(c)>i)}var st=new s,ct=new s;function J(o,t,e){let n=o.transformPositionToScaledSpace(t,st),i=s.magnitudeSquared(n),c=Math.sqrt(i),a=s.divideByScalar(n,c,ct);i=Math.max(1,i),c=Math.max(1,c);let r=s.dot(a,e),m=s.magnitude(s.cross(a,e,a)),l=1/c,u=Math.sqrt(i-1)*l;return 1/(r*l-m*u)}function K(o,t,e){if(!(t<=0||t===1/0||t!==t))return s.multiplyByScalar(o,t,e)}var R=new s;function X(o,t){return s.equals(t,s.ZERO)?t:(o.transformPositionToScaledSpace(t,R),s.normalize(R,R))}var Tt=x;var M={};M.getHeight=function(o,t,e){if(!Number.isFinite(t))throw new I("scale must be a finite number.");if(!Number.isFinite(e))throw new I("relativeHeight must be a finite number.");return(o-e)*t+e};var rt=new k;M.getPosition=function(o,t,e,n,i){let c=t.cartesianToCartographic(o,rt);if(!h(c))return s.clone(o,i);let a=M.getHeight(c.height,e,n);return s.fromRadians(c.longitude,c.latitude,a,t,i)};var Y=M;var mt={NONE:0,BITS12:1},S=Object.freeze(mt);var _=new s,dt=new s,f=new T,O=new d,ht=new d,lt=Math.pow(2,12);function p(o,t,e,n,i,c,a,r,m,l){let u=S.NONE,g,N;if(h(t)&&h(e)&&h(n)&&h(i)){let C=t.minimum,V=t.maximum,P=s.subtract(V,C,dt),B=n-e;Math.max(s.maximumComponent(P),B)<lt-1?u=S.BITS12:u=S.NONE,g=d.inverseTransformation(i,new d);let tt=s.negate(C,_);d.multiply(d.fromTranslation(tt,O),g,g);let w=_;w.x=1/P.x,w.y=1/P.y,w.z=1/P.z,d.multiply(d.fromScale(w,O),g,g),N=d.clone(i),d.setTranslation(N,s.ZERO,N),i=d.clone(i,new d);let ot=d.fromTranslation(C,O),et=d.fromScale(P,ht),F=d.multiply(ot,et,O);d.multiply(i,F,i),d.multiply(N,F,N)}this.quantization=u,this.minimumHeight=e,this.maximumHeight=n,this.center=s.clone(o),this.toScaledENU=g,this.fromScaledENU=i,this.matrix=N,this.hasVertexNormals=c,this.hasWebMercatorT=a??!1,this.hasGeodeticSurfaceNormals=r??!1,this.exaggeration=m??1,this.exaggerationRelativeHeight=l??0,this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}p.prototype.encode=function(o,t,e,n,i,c,a,r){let m=n.x,l=n.y;if(this.quantization===S.BITS12){e=d.multiplyByPoint(this.toScaledENU,e,_),e.x=E.clamp(e.x,0,1),e.y=E.clamp(e.y,0,1),e.z=E.clamp(e.z,0,1);let u=this.maximumHeight-this.minimumHeight,g=E.clamp((i-this.minimumHeight)/u,0,1);T.fromElements(e.x,e.y,f);let N=y.compressTextureCoordinates(f);T.fromElements(e.z,g,f);let C=y.compressTextureCoordinates(f);T.fromElements(m,l,f);let V=y.compressTextureCoordinates(f);if(o[t++]=N,o[t++]=C,o[t++]=V,this.hasWebMercatorT){T.fromElements(a,0,f);let P=y.compressTextureCoordinates(f);o[t++]=P}}else s.subtract(e,this.center,_),o[t++]=_.x,o[t++]=_.y,o[t++]=_.z,o[t++]=i,o[t++]=m,o[t++]=l,this.hasWebMercatorT&&(o[t++]=a);return this.hasVertexNormals&&(o[t++]=y.octPackFloat(c)),this.hasGeodeticSurfaceNormals&&(o[t++]=r.x,o[t++]=r.y,o[t++]=r.z),t};var pt=new s,$=new s;p.prototype.addGeodeticSurfaceNormals=function(o,t,e){if(this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=o.length/n;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let c=this.stride;for(let a=0;a<i;a++){for(let u=0;u<n;u++){let g=a*n+u,N=a*c+u;t[N]=o[g]}let r=this.decodePosition(t,a,pt),m=e.geodeticSurfaceNormal(r,$),l=a*c+this._offsetGeodeticSurfaceNormal;t[l]=m.x,t[l+1]=m.y,t[l+2]=m.z}};p.prototype.removeGeodeticSurfaceNormals=function(o,t){if(!this.hasGeodeticSurfaceNormals)return;let e=this.stride,n=o.length/e;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let i=this.stride;for(let c=0;c<n;c++)for(let a=0;a<i;a++){let r=c*e+a,m=c*i+a;t[m]=o[r]}};p.prototype.decodePosition=function(o,t,e){if(h(e)||(e=new s),t*=this.stride,this.quantization===S.BITS12){let n=y.decompressTextureCoordinates(o[t],f);e.x=n.x,e.y=n.y;let i=y.decompressTextureCoordinates(o[t+1],f);return e.z=i.x,d.multiplyByPoint(this.fromScaledENU,e,e)}return e.x=o[t],e.y=o[t+1],e.z=o[t+2],s.add(e,this.center,e)};p.prototype.getExaggeratedPosition=function(o,t,e){e=this.decodePosition(o,t,e);let n=this.exaggeration,i=this.exaggerationRelativeHeight;if(n!==1&&this.hasGeodeticSurfaceNormals){let a=this.decodeGeodeticSurfaceNormal(o,t,$),r=this.decodeHeight(o,t),m=Y.getHeight(r,n,i)-r;e.x+=a.x*m,e.y+=a.y*m,e.z+=a.z*m}return e};p.prototype.decodeTextureCoordinates=function(o,t,e){return h(e)||(e=new T),t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+2],e):T.fromElements(o[t+4],o[t+5],e)};p.prototype.decodeHeight=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+1],f).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:o[t+3]};p.prototype.decodeWebMercatorT=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+3],f).x:o[t+6]};p.prototype.getOctEncodedNormal=function(o,t,e){t=t*this.stride+this._offsetVertexNormal;let n=o[t]/256,i=Math.floor(n),c=(n-i)*256;return T.fromElements(i,c,e)};p.prototype.decodeGeodeticSurfaceNormal=function(o,t,e){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,e.x=o[t],e.y=o[t+1],e.z=o[t+2],e};p.prototype._calculateStrideAndOffsets=function(){let o=0;switch(this.quantization){case S.BITS12:o+=3;break;default:o+=6}this.hasWebMercatorT&&(o+=1),this.hasVertexNormals&&(this._offsetVertexNormal=o,o+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=o,o+=3),this.stride=o};var G={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},H={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};p.prototype.getAttributes=function(o){let t=A.FLOAT,e=A.getSizeInBytes(t),n=this.stride*e,i=0,c=[];function a(r,m){c.push({index:r,vertexBuffer:o,componentDatatype:t,componentsPerAttribute:m,offsetInBytes:i,strideInBytes:n}),i+=m*e}if(this.quantization===S.NONE){a(G.position3DAndHeight,4);let r=2;r+=this.hasWebMercatorT?1:0,r+=this.hasVertexNormals?1:0,a(G.textureCoordAndEncodedNormals,r),this.hasGeodeticSurfaceNormals&&a(G.geodeticSurfaceNormal,3)}else{let r=this.hasWebMercatorT||this.hasVertexNormals,m=this.hasWebMercatorT&&this.hasVertexNormals;a(H.compressed0,r?4:3),m&&a(H.compressed1,1),this.hasGeodeticSurfaceNormals&&a(H.geodeticSurfaceNormal,3)}return c};p.prototype.getAttributeLocations=function(){return this.quantization===S.NONE?G:H};p.clone=function(o,t){if(h(o))return h(t)||(t=new p),t.quantization=o.quantization,t.minimumHeight=o.minimumHeight,t.maximumHeight=o.maximumHeight,t.center=s.clone(o.center),t.toScaledENU=d.clone(o.toScaledENU),t.fromScaledENU=d.clone(o.fromScaledENU),t.matrix=d.clone(o.matrix),t.hasVertexNormals=o.hasVertexNormals,t.hasWebMercatorT=o.hasWebMercatorT,t.hasGeodeticSurfaceNormals=o.hasGeodeticSurfaceNormals,t.exaggeration=o.exaggeration,t.exaggerationRelativeHeight=o.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Dt=p;export{Tt as a,Dt as b};
26
+ import{a as y}from"./chunk-DEPHB2WM.js";import{d as L}from"./chunk-4IW2T6GF.js";import{b as d,h as W}from"./chunk-PSPPBZWI.js";import{a as A}from"./chunk-AU7IKHOH.js";import{a as s,b as k,c as T,d as b}from"./chunk-64RSHJUE.js";import{a as E}from"./chunk-3SSKC3VN.js";import{a as I,b as z}from"./chunk-LEYMRMBK.js";import{e as h}from"./chunk-VTAIKJXX.js";function x(o,t){z.typeOf.object("ellipsoid",o),this._ellipsoid=o,this._cameraPosition=new s,this._cameraPositionInScaledSpace=new s,this._distanceToLimbInScaledSpaceSquared=0,h(t)&&(this.cameraPosition=t)}Object.defineProperties(x.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},cameraPosition:{get:function(){return this._cameraPosition},set:function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,this._cameraPositionInScaledSpace),n=s.magnitudeSquared(e)-1;s.clone(o,this._cameraPosition),this._cameraPositionInScaledSpace=e,this._distanceToLimbInScaledSpaceSquared=n}}});var j=new s;x.prototype.isPointVisible=function(o){let e=this._ellipsoid.transformPositionToScaledSpace(o,j);return D(e,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};x.prototype.isScaledSpacePointVisible=function(o){return D(o,this._cameraPositionInScaledSpace,this._distanceToLimbInScaledSpaceSquared)};var it=new s;x.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid=function(o,t){let e=this._ellipsoid,n,i;return h(t)&&t<0&&e.minimumRadius>-t?(i=it,i.x=this._cameraPosition.x/(e.radii.x+t),i.y=this._cameraPosition.y/(e.radii.y+t),i.z=this._cameraPosition.z/(e.radii.z+t),n=i.x*i.x+i.y*i.y+i.z*i.z-1):(i=this._cameraPositionInScaledSpace,n=this._distanceToLimbInScaledSpaceSquared),D(o,i,n)};x.prototype.computeHorizonCullingPoint=function(o,t,e){return Z(this._ellipsoid,o,t,e)};var U=b.clone(b.UNIT_SPHERE);x.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(o,t,e,n){let i=v(this._ellipsoid,e,U);return Z(i,o,t,n)};x.prototype.computeHorizonCullingPointFromVertices=function(o,t,e,n,i){return Q(this._ellipsoid,o,t,e,n,i)};x.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(o,t,e,n,i,c){let a=v(this._ellipsoid,i,U);return Q(a,o,t,e,n,c)};var nt=[];x.prototype.computeHorizonCullingPointFromRectangle=function(o,t,e){z.typeOf.object("rectangle",o);let n=W.subsample(o,t,0,nt),i=L.fromPoints(n);if(!(s.magnitude(i.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(i.center,n,e)};var at=new s;function v(o,t,e){if(h(t)&&t<0&&o.minimumRadius>-t){let n=s.fromElements(o.radii.x+t,o.radii.y+t,o.radii.z+t,at);o=b.fromCartesian3(n,e)}return o}function Z(o,t,e,n){z.typeOf.object("directionToPoint",t),z.defined("positions",e),h(n)||(n=new s);let i=X(o,t),c=0;for(let a=0,r=e.length;a<r;++a){let m=e[a],l=J(o,m,i);if(l<0)return;c=Math.max(c,l)}return K(i,c,n)}var q=new s;function Q(o,t,e,n,i,c){z.typeOf.object("directionToPoint",t),z.defined("vertices",e),z.typeOf.number("stride",n),h(c)||(c=new s),n=n??3,i=i??s.ZERO;let a=X(o,t),r=0;for(let m=0,l=e.length;m<l;m+=n){q.x=e[m]+i.x,q.y=e[m+1]+i.y,q.z=e[m+2]+i.z;let u=J(o,q,a);if(u<0)return;r=Math.max(r,u)}return K(a,r,c)}function D(o,t,e){let n=t,i=e,c=s.subtract(o,n,j),a=-s.dot(c,n);return!(i<0?a>0:a>i&&a*a/s.magnitudeSquared(c)>i)}var st=new s,ct=new s;function J(o,t,e){let n=o.transformPositionToScaledSpace(t,st),i=s.magnitudeSquared(n),c=Math.sqrt(i),a=s.divideByScalar(n,c,ct);i=Math.max(1,i),c=Math.max(1,c);let r=s.dot(a,e),m=s.magnitude(s.cross(a,e,a)),l=1/c,u=Math.sqrt(i-1)*l;return 1/(r*l-m*u)}function K(o,t,e){if(!(t<=0||t===1/0||t!==t))return s.multiplyByScalar(o,t,e)}var R=new s;function X(o,t){return s.equals(t,s.ZERO)?t:(o.transformPositionToScaledSpace(t,R),s.normalize(R,R))}var Tt=x;var M={};M.getHeight=function(o,t,e){if(!Number.isFinite(t))throw new I("scale must be a finite number.");if(!Number.isFinite(e))throw new I("relativeHeight must be a finite number.");return(o-e)*t+e};var rt=new k;M.getPosition=function(o,t,e,n,i){let c=t.cartesianToCartographic(o,rt);if(!h(c))return s.clone(o,i);let a=M.getHeight(c.height,e,n);return s.fromRadians(c.longitude,c.latitude,a,t,i)};var Y=M;var mt={NONE:0,BITS12:1},S=Object.freeze(mt);var _=new s,dt=new s,f=new T,O=new d,ht=new d,lt=Math.pow(2,12);function p(o,t,e,n,i,c,a,r,m,l){let u=S.NONE,g,N;if(h(t)&&h(e)&&h(n)&&h(i)){let C=t.minimum,V=t.maximum,P=s.subtract(V,C,dt),B=n-e;Math.max(s.maximumComponent(P),B)<lt-1?u=S.BITS12:u=S.NONE,g=d.inverseTransformation(i,new d);let tt=s.negate(C,_);d.multiply(d.fromTranslation(tt,O),g,g);let w=_;w.x=1/P.x,w.y=1/P.y,w.z=1/P.z,d.multiply(d.fromScale(w,O),g,g),N=d.clone(i),d.setTranslation(N,s.ZERO,N),i=d.clone(i,new d);let ot=d.fromTranslation(C,O),et=d.fromScale(P,ht),F=d.multiply(ot,et,O);d.multiply(i,F,i),d.multiply(N,F,N)}this.quantization=u,this.minimumHeight=e,this.maximumHeight=n,this.center=s.clone(o),this.toScaledENU=g,this.fromScaledENU=i,this.matrix=N,this.hasVertexNormals=c,this.hasWebMercatorT=a??!1,this.hasGeodeticSurfaceNormals=r??!1,this.exaggeration=m??1,this.exaggerationRelativeHeight=l??0,this.stride=0,this._offsetGeodeticSurfaceNormal=0,this._offsetVertexNormal=0,this._calculateStrideAndOffsets()}p.prototype.encode=function(o,t,e,n,i,c,a,r){let m=n.x,l=n.y;if(this.quantization===S.BITS12){e=d.multiplyByPoint(this.toScaledENU,e,_),e.x=E.clamp(e.x,0,1),e.y=E.clamp(e.y,0,1),e.z=E.clamp(e.z,0,1);let u=this.maximumHeight-this.minimumHeight,g=E.clamp((i-this.minimumHeight)/u,0,1);T.fromElements(e.x,e.y,f);let N=y.compressTextureCoordinates(f);T.fromElements(e.z,g,f);let C=y.compressTextureCoordinates(f);T.fromElements(m,l,f);let V=y.compressTextureCoordinates(f);if(o[t++]=N,o[t++]=C,o[t++]=V,this.hasWebMercatorT){T.fromElements(a,0,f);let P=y.compressTextureCoordinates(f);o[t++]=P}}else s.subtract(e,this.center,_),o[t++]=_.x,o[t++]=_.y,o[t++]=_.z,o[t++]=i,o[t++]=m,o[t++]=l,this.hasWebMercatorT&&(o[t++]=a);return this.hasVertexNormals&&(o[t++]=y.octPackFloat(c)),this.hasGeodeticSurfaceNormals&&(o[t++]=r.x,o[t++]=r.y,o[t++]=r.z),t};var pt=new s,$=new s;p.prototype.addGeodeticSurfaceNormals=function(o,t,e){if(this.hasGeodeticSurfaceNormals)return;let n=this.stride,i=o.length/n;this.hasGeodeticSurfaceNormals=!0,this._calculateStrideAndOffsets();let c=this.stride;for(let a=0;a<i;a++){for(let u=0;u<n;u++){let g=a*n+u,N=a*c+u;t[N]=o[g]}let r=this.decodePosition(t,a,pt),m=e.geodeticSurfaceNormal(r,$),l=a*c+this._offsetGeodeticSurfaceNormal;t[l]=m.x,t[l+1]=m.y,t[l+2]=m.z}};p.prototype.removeGeodeticSurfaceNormals=function(o,t){if(!this.hasGeodeticSurfaceNormals)return;let e=this.stride,n=o.length/e;this.hasGeodeticSurfaceNormals=!1,this._calculateStrideAndOffsets();let i=this.stride;for(let c=0;c<n;c++)for(let a=0;a<i;a++){let r=c*e+a,m=c*i+a;t[m]=o[r]}};p.prototype.decodePosition=function(o,t,e){if(h(e)||(e=new s),t*=this.stride,this.quantization===S.BITS12){let n=y.decompressTextureCoordinates(o[t],f);e.x=n.x,e.y=n.y;let i=y.decompressTextureCoordinates(o[t+1],f);return e.z=i.x,d.multiplyByPoint(this.fromScaledENU,e,e)}return e.x=o[t],e.y=o[t+1],e.z=o[t+2],s.add(e,this.center,e)};p.prototype.getExaggeratedPosition=function(o,t,e){e=this.decodePosition(o,t,e);let n=this.exaggeration,i=this.exaggerationRelativeHeight;if(n!==1&&this.hasGeodeticSurfaceNormals){let a=this.decodeGeodeticSurfaceNormal(o,t,$),r=this.decodeHeight(o,t),m=Y.getHeight(r,n,i)-r;e.x+=a.x*m,e.y+=a.y*m,e.z+=a.z*m}return e};p.prototype.decodeTextureCoordinates=function(o,t,e){return h(e)||(e=new T),t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+2],e):T.fromElements(o[t+4],o[t+5],e)};p.prototype.decodeHeight=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+1],f).y*(this.maximumHeight-this.minimumHeight)+this.minimumHeight:o[t+3]};p.prototype.decodeWebMercatorT=function(o,t){return t*=this.stride,this.quantization===S.BITS12?y.decompressTextureCoordinates(o[t+3],f).x:o[t+6]};p.prototype.getOctEncodedNormal=function(o,t,e){t=t*this.stride+this._offsetVertexNormal;let n=o[t]/256,i=Math.floor(n),c=(n-i)*256;return T.fromElements(i,c,e)};p.prototype.decodeGeodeticSurfaceNormal=function(o,t,e){return t=t*this.stride+this._offsetGeodeticSurfaceNormal,e.x=o[t],e.y=o[t+1],e.z=o[t+2],e};p.prototype._calculateStrideAndOffsets=function(){let o=0;switch(this.quantization){case S.BITS12:o+=3;break;default:o+=6}this.hasWebMercatorT&&(o+=1),this.hasVertexNormals&&(this._offsetVertexNormal=o,o+=1),this.hasGeodeticSurfaceNormals&&(this._offsetGeodeticSurfaceNormal=o,o+=3),this.stride=o};var G={position3DAndHeight:0,textureCoordAndEncodedNormals:1,geodeticSurfaceNormal:2},H={compressed0:0,compressed1:1,geodeticSurfaceNormal:2};p.prototype.getAttributes=function(o){let t=A.FLOAT,e=A.getSizeInBytes(t),n=this.stride*e,i=0,c=[];function a(r,m){c.push({index:r,vertexBuffer:o,componentDatatype:t,componentsPerAttribute:m,offsetInBytes:i,strideInBytes:n}),i+=m*e}if(this.quantization===S.NONE){a(G.position3DAndHeight,4);let r=2;r+=this.hasWebMercatorT?1:0,r+=this.hasVertexNormals?1:0,a(G.textureCoordAndEncodedNormals,r),this.hasGeodeticSurfaceNormals&&a(G.geodeticSurfaceNormal,3)}else{let r=this.hasWebMercatorT||this.hasVertexNormals,m=this.hasWebMercatorT&&this.hasVertexNormals;a(H.compressed0,r?4:3),m&&a(H.compressed1,1),this.hasGeodeticSurfaceNormals&&a(H.geodeticSurfaceNormal,3)}return c};p.prototype.getAttributeLocations=function(){return this.quantization===S.NONE?G:H};p.clone=function(o,t){if(h(o))return h(t)||(t=new p),t.quantization=o.quantization,t.minimumHeight=o.minimumHeight,t.maximumHeight=o.maximumHeight,t.center=s.clone(o.center),t.toScaledENU=d.clone(o.toScaledENU),t.fromScaledENU=d.clone(o.fromScaledENU),t.matrix=d.clone(o.matrix),t.hasVertexNormals=o.hasVertexNormals,t.hasWebMercatorT=o.hasWebMercatorT,t.hasGeodeticSurfaceNormals=o.hasGeodeticSurfaceNormals,t.exaggeration=o.exaggeration,t.exaggerationRelativeHeight=o.exaggerationRelativeHeight,t._calculateStrideAndOffsets(),t};var Dt=p;export{Tt as a,Dt as b};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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 e}from"./chunk-FCVV6A2F.js";function r(t){t=t??e.EMPTY_OBJECT,this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}var n=r;export{n as a};
26
+ import{f as e}from"./chunk-64RSHJUE.js";function r(t){t=t??e.EMPTY_OBJECT,this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}var n=r;export{n as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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 R}from"./chunk-ATTMFTQ4.js";import{a as ct}from"./chunk-NU4XOT2V.js";import{a as Z,b as H}from"./chunk-6EFYFFBI.js";import{a as V}from"./chunk-I3XHKING.js";import{a as U}from"./chunk-N6G72L23.js";import{b as ot}from"./chunk-HLFNWOQ4.js";import{a as it}from"./chunk-YDUNCXSU.js";import{a as nt}from"./chunk-LNFOIPBT.js";import{a as et}from"./chunk-7IBY6LYM.js";import{b as J,c as X,d as z}from"./chunk-BDLVVHOG.js";import{f as K}from"./chunk-DGGIK7AD.js";import{a as k}from"./chunk-5EZKANRV.js";import{a as w,b as q,c as M,d as tt,e as F}from"./chunk-FCVV6A2F.js";import{a as I}from"./chunk-PO64KPKA.js";import{e as x}from"./chunk-GBI3IATP.js";function ft(n,i){this.positions=x(n)?n:[],this.holes=x(i)?i:[]}var st=ft;function S(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(S.prototype,{length:{get:function(){return this._length}}});S.prototype.enqueue=function(n){this._array.push(n),this._length++};S.prototype.dequeue=function(){if(this._length===0)return;let n=this._array,i=this._offset,u=n[i];return n[i]=void 0,i++,i>10&&i*2>n.length&&(this._array=n.slice(i),i=0),this._offset=i,this._length--,u};S.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};S.prototype.contains=function(n){return this._array.indexOf(n)!==-1};S.prototype.clear=function(){this._array.length=this._offset=this._length=0};S.prototype.sort=function(n){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(n)};var $=S;var b={};b.computeHierarchyPackedLength=function(n,i){let u=0,s=[n];for(;s.length>0;){let c=s.pop();if(!x(c))continue;u+=2;let a=c.positions,t=c.holes;if(x(a)&&a.length>0&&(u+=a.length*i.packedLength),x(t)){let o=t.length;for(let e=0;e<o;++e)s.push(t[e])}}return u};b.packPolygonHierarchy=function(n,i,u,s){let c=[n];for(;c.length>0;){let a=c.pop();if(!x(a))continue;let t=a.positions,o=a.holes;if(i[u++]=x(t)?t.length:0,i[u++]=x(o)?o.length:0,x(t)){let e=t.length;for(let r=0;r<e;++r,u+=s.packedLength)s.pack(t[r],i,u)}if(x(o)){let e=o.length;for(let r=0;r<e;++r)c.push(o[r])}}return u};b.unpackPolygonHierarchy=function(n,i,u){let s=n[i++],c=n[i++],a=new Array(s),t=c>0?new Array(c):void 0;for(let o=0;o<s;++o,i+=u.packedLength)a[o]=u.unpack(n,i);for(let o=0;o<c;++o)t[o]=b.unpackPolygonHierarchy(n,i,u),i=t[o].startingIndex,delete t[o].startingIndex;return{positions:a,holes:t,startingIndex:i}};var O=new M;function at(n,i,u,s){return M.subtract(i,n,O),M.multiplyByScalar(O,u/s,O),M.add(n,O,O),[O.x,O.y]}var G=new w;function gt(n,i,u,s){return w.subtract(i,n,G),w.multiplyByScalar(G,u/s,G),w.add(n,G,G),[G.x,G.y,G.z]}b.subdivideLineCount=function(n,i,u){let c=w.distance(n,i)/u,a=Math.max(0,Math.ceil(I.log2(c)));return Math.pow(2,a)};var j=new q,Q=new q,dt=new q,pt=new w,Y=new U;b.subdivideRhumbLineCount=function(n,i,u,s){let c=n.cartesianToCartographic(i,j),a=n.cartesianToCartographic(u,Q),o=new U(c,a,n).surfaceDistance/s,e=Math.max(0,Math.ceil(I.log2(o)));return Math.pow(2,e)};b.subdivideTexcoordLine=function(n,i,u,s,c,a){let t=b.subdivideLineCount(u,s,c),o=M.distance(n,i),e=o/t,r=a;r.length=t*2;let l=0;for(let h=0;h<t;h++){let f=at(n,i,h*e,o);r[l++]=f[0],r[l++]=f[1]}return r};b.subdivideLine=function(n,i,u,s){let c=b.subdivideLineCount(n,i,u),a=w.distance(n,i),t=a/c;x(s)||(s=[]);let o=s;o.length=c*3;let e=0;for(let r=0;r<c;r++){let l=gt(n,i,r*t,a);o[e++]=l[0],o[e++]=l[1],o[e++]=l[2]}return o};b.subdivideTexcoordRhumbLine=function(n,i,u,s,c,a,t){let o=u.cartesianToCartographic(s,j),e=u.cartesianToCartographic(c,Q);Y.setEndPoints(o,e);let r=Y.surfaceDistance/a,l=Math.max(0,Math.ceil(I.log2(r))),h=Math.pow(2,l),f=M.distance(n,i),d=f/h,m=t;m.length=h*2;let p=0;for(let g=0;g<h;g++){let y=at(n,i,g*d,f);m[p++]=y[0],m[p++]=y[1]}return m};b.subdivideRhumbLine=function(n,i,u,s,c){let a=n.cartesianToCartographic(i,j),t=n.cartesianToCartographic(u,Q),o=new U(a,t,n);if(x(c)||(c=[]),o.surfaceDistance<=s)return c.length=3,c[0]=i.x,c[1]=i.y,c[2]=i.z,c;let e=o.surfaceDistance/s,r=Math.max(0,Math.ceil(I.log2(e))),l=Math.pow(2,r),h=o.surfaceDistance/l,f=c;f.length=l*3;let d=0;for(let m=0;m<l;m++){let p=o.interpolateUsingSurfaceDistance(m*h,dt),g=n.cartographicToCartesian(p,pt);f[d++]=g.x,f[d++]=g.y,f[d++]=g.z}return f};var mt=new w,yt=new w,xt=new w,wt=new w;b.scaleToGeodeticHeightExtruded=function(n,i,u,s,c){s=s??tt.default;let a=mt,t=yt,o=xt,e=wt;if(x(n)&&x(n.attributes)&&x(n.attributes.position)){let r=n.attributes.position.values,l=r.length/2;for(let h=0;h<l;h+=3)w.fromArray(r,h,o),s.geodeticSurfaceNormal(o,a),e=s.scaleToGeodeticSurface(o,e),t=w.multiplyByScalar(a,u,t),t=w.add(e,t,t),r[h+l]=t.x,r[h+1+l]=t.y,r[h+2+l]=t.z,c&&(e=w.clone(o,e)),t=w.multiplyByScalar(a,i,t),t=w.add(e,t,t),r[h]=t.x,r[h+1]=t.y,r[h+2]=t.z}return n};b.polygonOutlinesFromHierarchy=function(n,i,u){let s=[],c=new $;c.enqueue(n);let a,t,o;for(;c.length!==0;){let e=c.dequeue(),r=e.positions;if(i)for(o=r.length,a=0;a<o;a++)u.scaleToGeodeticSurface(r[a],r[a]);if(r=V(r,w.equalsEpsilon,!0),r.length<3)continue;let l=e.holes?e.holes.length:0;for(a=0;a<l;a++){let h=e.holes[a],f=h.positions;if(i)for(o=f.length,t=0;t<o;++t)u.scaleToGeodeticSurface(f[t],f[t]);if(f=V(f,w.equalsEpsilon,!0),f.length<3)continue;s.push(f);let d=0;for(x(h.holes)&&(d=h.holes.length),t=0;t<d;t++)c.enqueue(h.holes[t])}s.push(r)}return s};var bt=new q;function Lt(n,i,u){let s=u.cartesianToCartographic(n,j),c=u.cartesianToCartographic(i,Q);if(Math.sign(s.latitude)===Math.sign(c.latitude))return;Y.setEndPoints(s,c);let a=Y.findIntersectionWithLatitude(0,bt);if(!x(a))return;let t=Math.min(s.longitude,c.longitude),o=Math.max(s.longitude,c.longitude);if(Math.abs(o-t)>I.PI){let e=t;t=o,o=e}if(!(a.longitude<t||a.longitude>o))return u.cartographicToCartesian(a)}function Tt(n,i,u,s){if(s===R.RHUMB)return Lt(n,i,u);let c=ot.lineSegmentPlane(n,i,it.ORIGIN_XY_PLANE);if(x(c))return u.scaleToGeodeticSurface(c,c)}var Et=new q;function vt(n,i,u){let s=[],c,a,t,o,e,r=0;for(;r<n.length;){c=n[r],a=n[(r+1)%n.length],t=I.sign(c.z),o=I.sign(a.z);let l=h=>i.cartesianToCartographic(h,Et).longitude;if(t===0)s.push({position:r,type:t,visited:!1,next:o,theta:l(c)});else if(o!==0){if(e=Tt(c,a,i,u),++r,!x(e))continue;n.splice(r,0,e),s.push({position:r,type:t,visited:!1,next:o,theta:l(e)})}++r}return s}function ht(n,i,u,s,c,a,t){let o=[],e=a,r=h=>f=>f.position===h,l=[];do{let h=u[e];o.push(h);let f=s.findIndex(r(e)),d=s[f];if(!x(d)){++e;continue}let{visited:m,type:p,next:g}=d;if(d.visited=!0,p===0){if(g===0){let C=s[f-(t?1:-1)];if(C?.position===e+1)C.visited=!0;else{++e;continue}}if(!m&&t&&g>0||a===e&&!t&&g<0){++e;continue}}if(!(t?p>=0:p<=0)){++e;continue}m||l.push(e);let L=f+(t?1:-1),_=s[L];if(!x(_)){++e;continue}e=_.position}while(e<u.length&&e>=0&&e!==a&&o.length<u.length);n.splice(i,c,o);for(let h of l)i=ht(n,++i,u,s,0,h,!t);return i}b.splitPolygonsOnEquator=function(n,i,u,s){x(s)||(s=[]),s.splice(0,0,...n),s.length=n.length;let c=0;for(;c<s.length;){let a=s[c],t=a.slice();if(a.length<3){s[c]=t,++c;continue}let o=vt(t,i,u);if(t.length===a.length||o.length<=1){s[c]=t,++c;continue}o.sort((r,l)=>r.theta-l.theta);let e=t[0].z>=0;c=ht(s,c,t,o,1,0,e)}return s};b.polygonsFromHierarchy=function(n,i,u,s,c,a){let t=[],o=[],e=new $;e.enqueue(n);let r=x(a);for(;e.length!==0;){let l=e.dequeue(),h=l.positions,f=l.holes,d,m;if(s)for(m=h.length,d=0;d<m;d++)c.scaleToGeodeticSurface(h[d],h[d]);if(i||(h=V(h,w.equalsEpsilon,!0)),h.length<3)continue;let p=u(h);if(!x(p))continue;let g=[],y=H.computeWindingOrder2D(p);if(y===Z.CLOCKWISE&&(p.reverse(),h=h.slice().reverse()),r){r=!1;let P=[h];if(P=a(P,P),P.length>1){for(let v of P)e.enqueue(new st(v,f));continue}}let L=h.slice(),_=x(f)?f.length:0,C=[],T;for(d=0;d<_;d++){let P=f[d],v=P.positions;if(s)for(m=v.length,T=0;T<m;++T)c.scaleToGeodeticSurface(v[T],v[T]);if(i||(v=V(v,w.equalsEpsilon,!0)),v.length<3)continue;let E=u(v);if(!x(E))continue;y=H.computeWindingOrder2D(E),y===Z.CLOCKWISE&&(E.reverse(),v=v.slice().reverse()),C.push(v),g.push(L.length),L=L.concat(v),p=p.concat(E);let D=0;for(x(P.holes)&&(D=P.holes.length),T=0;T<D;T++)e.enqueue(P.holes[T])}t.push({outerRing:h,holes:C}),o.push({positions:L,positions2D:p,holes:g})}return{hierarchy:t,polygons:o}};var Ct=new M,Pt=new w,Dt=new K,It=new F;b.computeBoundingRectangle=function(n,i,u,s,c){let a=K.fromAxisAngle(n,s,Dt),t=F.fromQuaternion(a,It),o=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,h=u.length;for(let f=0;f<h;++f){let d=w.clone(u[f],Pt);F.multiplyByVector(t,d,d);let m=i(d,Ct);x(m)&&(o=Math.min(o,m.x),e=Math.max(e,m.x),r=Math.min(r,m.y),l=Math.max(l,m.y))}return c.x=o,c.y=r,c.width=e-o,c.height=l-r,c};b.createGeometryFromPositions=function(n,i,u,s,c,a,t){let o=H.triangulate(i.positions2D,i.holes);o.length<3&&(o=[0,1,2]);let e=i.positions,r=x(u),l=r?u.positions:void 0;if(c){let h=e.length,f=new Array(h*3),d=0;for(let g=0;g<h;g++){let y=e[g];f[d++]=y.x,f[d++]=y.y,f[d++]=y.z}let m={attributes:{position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:f})},indices:o,primitiveType:J.TRIANGLES};r&&(m.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:M.packArray(l)}));let p=new X(m);return a.normal?ct.computeNormal(p):p}if(t===R.GEODESIC)return H.computeSubdivision(n,e,o,l,s);if(t===R.RHUMB)return H.computeRhumbLineSubdivision(n,e,o,l,s)};var rt=[],ut=[],_t=new w,At=new w;b.computeWallGeometry=function(n,i,u,s,c,a){let t,o,e,r,l,h,f,d,m,p=n.length,g=0,y=0,L=x(i),_=L?i.positions:void 0;if(c)for(o=p*3*2,t=new Array(o*2),L&&(m=p*2*2,d=new Array(m*2)),e=0;e<p;e++)r=n[e],l=n[(e+1)%p],t[g]=t[g+o]=r.x,++g,t[g]=t[g+o]=r.y,++g,t[g]=t[g+o]=r.z,++g,t[g]=t[g+o]=l.x,++g,t[g]=t[g+o]=l.y,++g,t[g]=t[g+o]=l.z,++g,L&&(h=_[e],f=_[(e+1)%p],d[y]=d[y+m]=h.x,++y,d[y]=d[y+m]=h.y,++y,d[y]=d[y+m]=f.x,++y,d[y]=d[y+m]=f.y,++y);else{let E=I.chordLength(s,u.maximumRadius),D=0;if(a===R.GEODESIC)for(e=0;e<p;e++)D+=b.subdivideLineCount(n[e],n[(e+1)%p],E);else if(a===R.RHUMB)for(e=0;e<p;e++)D+=b.subdivideRhumbLineCount(u,n[e],n[(e+1)%p],E);for(o=(D+p)*3,t=new Array(o*2),L&&(m=(D+p)*2,d=new Array(m*2)),e=0;e<p;e++){r=n[e],l=n[(e+1)%p];let A,N;L&&(h=_[e],f=_[(e+1)%p]),a===R.GEODESIC?(A=b.subdivideLine(r,l,E,ut),L&&(N=b.subdivideTexcoordLine(h,f,r,l,E,rt))):a===R.RHUMB&&(A=b.subdivideRhumbLine(u,r,l,E,ut),L&&(N=b.subdivideTexcoordRhumbLine(h,f,u,r,l,E,rt)));let lt=A.length;for(let B=0;B<lt;++B,++g)t[g]=A[B],t[g+o]=A[B];if(t[g]=l.x,t[g+o]=l.x,++g,t[g]=l.y,t[g+o]=l.y,++g,t[g]=l.z,t[g+o]=l.z,++g,L){let B=N.length;for(let W=0;W<B;++W,++y)d[y]=N[W],d[y+m]=N[W];d[y]=f.x,d[y+m]=f.x,++y,d[y]=f.y,d[y+m]=f.y,++y}}}p=t.length;let C=nt.createTypedArray(p/3,p-n.length*6),T=0;for(p/=6,e=0;e<p;e++){let E=e,D=E+1,A=E+p,N=A+1;r=w.fromArray(t,E*3,_t),l=w.fromArray(t,D*3,At),!w.equalsEpsilon(r,l,I.EPSILON10,I.EPSILON10)&&(C[T++]=E,C[T++]=A,C[T++]=D,C[T++]=D,C[T++]=A,C[T++]=N)}let P={attributes:new et({position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:t})}),indices:C,primitiveType:J.TRIANGLES};return L&&(P.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:d})),new X(P)};var ie=b;export{ie as a};
26
+ import{a as R}from"./chunk-J6UP6FLE.js";import{a as ct}from"./chunk-VW6VD53G.js";import{a as Z,b as H}from"./chunk-77IHZJJ3.js";import{a as V}from"./chunk-3W4GT7KQ.js";import{a as U}from"./chunk-G5AGHVVC.js";import{b as ot}from"./chunk-DMEY62ID.js";import{a as it}from"./chunk-HTFSEEMT.js";import{a as nt}from"./chunk-OFUUQVMR.js";import{a as et}from"./chunk-A56XVLQR.js";import{b as J,c as X,d as z}from"./chunk-RCV6KWXS.js";import{f as K}from"./chunk-PSPPBZWI.js";import{a as k}from"./chunk-AU7IKHOH.js";import{a as w,b as q,c as M,d as tt,e as F}from"./chunk-64RSHJUE.js";import{a as I}from"./chunk-3SSKC3VN.js";import{e as x}from"./chunk-VTAIKJXX.js";function ft(n,i){this.positions=x(n)?n:[],this.holes=x(i)?i:[]}var st=ft;function S(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(S.prototype,{length:{get:function(){return this._length}}});S.prototype.enqueue=function(n){this._array.push(n),this._length++};S.prototype.dequeue=function(){if(this._length===0)return;let n=this._array,i=this._offset,u=n[i];return n[i]=void 0,i++,i>10&&i*2>n.length&&(this._array=n.slice(i),i=0),this._offset=i,this._length--,u};S.prototype.peek=function(){if(this._length!==0)return this._array[this._offset]};S.prototype.contains=function(n){return this._array.indexOf(n)!==-1};S.prototype.clear=function(){this._array.length=this._offset=this._length=0};S.prototype.sort=function(n){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(n)};var $=S;var b={};b.computeHierarchyPackedLength=function(n,i){let u=0,s=[n];for(;s.length>0;){let c=s.pop();if(!x(c))continue;u+=2;let a=c.positions,t=c.holes;if(x(a)&&a.length>0&&(u+=a.length*i.packedLength),x(t)){let o=t.length;for(let e=0;e<o;++e)s.push(t[e])}}return u};b.packPolygonHierarchy=function(n,i,u,s){let c=[n];for(;c.length>0;){let a=c.pop();if(!x(a))continue;let t=a.positions,o=a.holes;if(i[u++]=x(t)?t.length:0,i[u++]=x(o)?o.length:0,x(t)){let e=t.length;for(let r=0;r<e;++r,u+=s.packedLength)s.pack(t[r],i,u)}if(x(o)){let e=o.length;for(let r=0;r<e;++r)c.push(o[r])}}return u};b.unpackPolygonHierarchy=function(n,i,u){let s=n[i++],c=n[i++],a=new Array(s),t=c>0?new Array(c):void 0;for(let o=0;o<s;++o,i+=u.packedLength)a[o]=u.unpack(n,i);for(let o=0;o<c;++o)t[o]=b.unpackPolygonHierarchy(n,i,u),i=t[o].startingIndex,delete t[o].startingIndex;return{positions:a,holes:t,startingIndex:i}};var O=new M;function at(n,i,u,s){return M.subtract(i,n,O),M.multiplyByScalar(O,u/s,O),M.add(n,O,O),[O.x,O.y]}var G=new w;function gt(n,i,u,s){return w.subtract(i,n,G),w.multiplyByScalar(G,u/s,G),w.add(n,G,G),[G.x,G.y,G.z]}b.subdivideLineCount=function(n,i,u){let c=w.distance(n,i)/u,a=Math.max(0,Math.ceil(I.log2(c)));return Math.pow(2,a)};var j=new q,Q=new q,dt=new q,pt=new w,Y=new U;b.subdivideRhumbLineCount=function(n,i,u,s){let c=n.cartesianToCartographic(i,j),a=n.cartesianToCartographic(u,Q),o=new U(c,a,n).surfaceDistance/s,e=Math.max(0,Math.ceil(I.log2(o)));return Math.pow(2,e)};b.subdivideTexcoordLine=function(n,i,u,s,c,a){let t=b.subdivideLineCount(u,s,c),o=M.distance(n,i),e=o/t,r=a;r.length=t*2;let l=0;for(let h=0;h<t;h++){let f=at(n,i,h*e,o);r[l++]=f[0],r[l++]=f[1]}return r};b.subdivideLine=function(n,i,u,s){let c=b.subdivideLineCount(n,i,u),a=w.distance(n,i),t=a/c;x(s)||(s=[]);let o=s;o.length=c*3;let e=0;for(let r=0;r<c;r++){let l=gt(n,i,r*t,a);o[e++]=l[0],o[e++]=l[1],o[e++]=l[2]}return o};b.subdivideTexcoordRhumbLine=function(n,i,u,s,c,a,t){let o=u.cartesianToCartographic(s,j),e=u.cartesianToCartographic(c,Q);Y.setEndPoints(o,e);let r=Y.surfaceDistance/a,l=Math.max(0,Math.ceil(I.log2(r))),h=Math.pow(2,l),f=M.distance(n,i),d=f/h,m=t;m.length=h*2;let p=0;for(let g=0;g<h;g++){let y=at(n,i,g*d,f);m[p++]=y[0],m[p++]=y[1]}return m};b.subdivideRhumbLine=function(n,i,u,s,c){let a=n.cartesianToCartographic(i,j),t=n.cartesianToCartographic(u,Q),o=new U(a,t,n);if(x(c)||(c=[]),o.surfaceDistance<=s)return c.length=3,c[0]=i.x,c[1]=i.y,c[2]=i.z,c;let e=o.surfaceDistance/s,r=Math.max(0,Math.ceil(I.log2(e))),l=Math.pow(2,r),h=o.surfaceDistance/l,f=c;f.length=l*3;let d=0;for(let m=0;m<l;m++){let p=o.interpolateUsingSurfaceDistance(m*h,dt),g=n.cartographicToCartesian(p,pt);f[d++]=g.x,f[d++]=g.y,f[d++]=g.z}return f};var mt=new w,yt=new w,xt=new w,wt=new w;b.scaleToGeodeticHeightExtruded=function(n,i,u,s,c){s=s??tt.default;let a=mt,t=yt,o=xt,e=wt;if(x(n)&&x(n.attributes)&&x(n.attributes.position)){let r=n.attributes.position.values,l=r.length/2;for(let h=0;h<l;h+=3)w.fromArray(r,h,o),s.geodeticSurfaceNormal(o,a),e=s.scaleToGeodeticSurface(o,e),t=w.multiplyByScalar(a,u,t),t=w.add(e,t,t),r[h+l]=t.x,r[h+1+l]=t.y,r[h+2+l]=t.z,c&&(e=w.clone(o,e)),t=w.multiplyByScalar(a,i,t),t=w.add(e,t,t),r[h]=t.x,r[h+1]=t.y,r[h+2]=t.z}return n};b.polygonOutlinesFromHierarchy=function(n,i,u){let s=[],c=new $;c.enqueue(n);let a,t,o;for(;c.length!==0;){let e=c.dequeue(),r=e.positions;if(i)for(o=r.length,a=0;a<o;a++)u.scaleToGeodeticSurface(r[a],r[a]);if(r=V(r,w.equalsEpsilon,!0),r.length<3)continue;let l=e.holes?e.holes.length:0;for(a=0;a<l;a++){let h=e.holes[a],f=h.positions;if(i)for(o=f.length,t=0;t<o;++t)u.scaleToGeodeticSurface(f[t],f[t]);if(f=V(f,w.equalsEpsilon,!0),f.length<3)continue;s.push(f);let d=0;for(x(h.holes)&&(d=h.holes.length),t=0;t<d;t++)c.enqueue(h.holes[t])}s.push(r)}return s};var bt=new q;function Lt(n,i,u){let s=u.cartesianToCartographic(n,j),c=u.cartesianToCartographic(i,Q);if(Math.sign(s.latitude)===Math.sign(c.latitude))return;Y.setEndPoints(s,c);let a=Y.findIntersectionWithLatitude(0,bt);if(!x(a))return;let t=Math.min(s.longitude,c.longitude),o=Math.max(s.longitude,c.longitude);if(Math.abs(o-t)>I.PI){let e=t;t=o,o=e}if(!(a.longitude<t||a.longitude>o))return u.cartographicToCartesian(a)}function Tt(n,i,u,s){if(s===R.RHUMB)return Lt(n,i,u);let c=ot.lineSegmentPlane(n,i,it.ORIGIN_XY_PLANE);if(x(c))return u.scaleToGeodeticSurface(c,c)}var Et=new q;function vt(n,i,u){let s=[],c,a,t,o,e,r=0;for(;r<n.length;){c=n[r],a=n[(r+1)%n.length],t=I.sign(c.z),o=I.sign(a.z);let l=h=>i.cartesianToCartographic(h,Et).longitude;if(t===0)s.push({position:r,type:t,visited:!1,next:o,theta:l(c)});else if(o!==0){if(e=Tt(c,a,i,u),++r,!x(e))continue;n.splice(r,0,e),s.push({position:r,type:t,visited:!1,next:o,theta:l(e)})}++r}return s}function ht(n,i,u,s,c,a,t){let o=[],e=a,r=h=>f=>f.position===h,l=[];do{let h=u[e];o.push(h);let f=s.findIndex(r(e)),d=s[f];if(!x(d)){++e;continue}let{visited:m,type:p,next:g}=d;if(d.visited=!0,p===0){if(g===0){let C=s[f-(t?1:-1)];if(C?.position===e+1)C.visited=!0;else{++e;continue}}if(!m&&t&&g>0||a===e&&!t&&g<0){++e;continue}}if(!(t?p>=0:p<=0)){++e;continue}m||l.push(e);let L=f+(t?1:-1),_=s[L];if(!x(_)){++e;continue}e=_.position}while(e<u.length&&e>=0&&e!==a&&o.length<u.length);n.splice(i,c,o);for(let h of l)i=ht(n,++i,u,s,0,h,!t);return i}b.splitPolygonsOnEquator=function(n,i,u,s){x(s)||(s=[]),s.splice(0,0,...n),s.length=n.length;let c=0;for(;c<s.length;){let a=s[c],t=a.slice();if(a.length<3){s[c]=t,++c;continue}let o=vt(t,i,u);if(t.length===a.length||o.length<=1){s[c]=t,++c;continue}o.sort((r,l)=>r.theta-l.theta);let e=t[0].z>=0;c=ht(s,c,t,o,1,0,e)}return s};b.polygonsFromHierarchy=function(n,i,u,s,c,a){let t=[],o=[],e=new $;e.enqueue(n);let r=x(a);for(;e.length!==0;){let l=e.dequeue(),h=l.positions,f=l.holes,d,m;if(s)for(m=h.length,d=0;d<m;d++)c.scaleToGeodeticSurface(h[d],h[d]);if(i||(h=V(h,w.equalsEpsilon,!0)),h.length<3)continue;let p=u(h);if(!x(p))continue;let g=[],y=H.computeWindingOrder2D(p);if(y===Z.CLOCKWISE&&(p.reverse(),h=h.slice().reverse()),r){r=!1;let P=[h];if(P=a(P,P),P.length>1){for(let v of P)e.enqueue(new st(v,f));continue}}let L=h.slice(),_=x(f)?f.length:0,C=[],T;for(d=0;d<_;d++){let P=f[d],v=P.positions;if(s)for(m=v.length,T=0;T<m;++T)c.scaleToGeodeticSurface(v[T],v[T]);if(i||(v=V(v,w.equalsEpsilon,!0)),v.length<3)continue;let E=u(v);if(!x(E))continue;y=H.computeWindingOrder2D(E),y===Z.CLOCKWISE&&(E.reverse(),v=v.slice().reverse()),C.push(v),g.push(L.length),L=L.concat(v),p=p.concat(E);let D=0;for(x(P.holes)&&(D=P.holes.length),T=0;T<D;T++)e.enqueue(P.holes[T])}t.push({outerRing:h,holes:C}),o.push({positions:L,positions2D:p,holes:g})}return{hierarchy:t,polygons:o}};var Ct=new M,Pt=new w,Dt=new K,It=new F;b.computeBoundingRectangle=function(n,i,u,s,c){let a=K.fromAxisAngle(n,s,Dt),t=F.fromQuaternion(a,It),o=Number.POSITIVE_INFINITY,e=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,h=u.length;for(let f=0;f<h;++f){let d=w.clone(u[f],Pt);F.multiplyByVector(t,d,d);let m=i(d,Ct);x(m)&&(o=Math.min(o,m.x),e=Math.max(e,m.x),r=Math.min(r,m.y),l=Math.max(l,m.y))}return c.x=o,c.y=r,c.width=e-o,c.height=l-r,c};b.createGeometryFromPositions=function(n,i,u,s,c,a,t){let o=H.triangulate(i.positions2D,i.holes);o.length<3&&(o=[0,1,2]);let e=i.positions,r=x(u),l=r?u.positions:void 0;if(c){let h=e.length,f=new Array(h*3),d=0;for(let g=0;g<h;g++){let y=e[g];f[d++]=y.x,f[d++]=y.y,f[d++]=y.z}let m={attributes:{position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:f})},indices:o,primitiveType:J.TRIANGLES};r&&(m.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:M.packArray(l)}));let p=new X(m);return a.normal?ct.computeNormal(p):p}if(t===R.GEODESIC)return H.computeSubdivision(n,e,o,l,s);if(t===R.RHUMB)return H.computeRhumbLineSubdivision(n,e,o,l,s)};var rt=[],ut=[],_t=new w,At=new w;b.computeWallGeometry=function(n,i,u,s,c,a){let t,o,e,r,l,h,f,d,m,p=n.length,g=0,y=0,L=x(i),_=L?i.positions:void 0;if(c)for(o=p*3*2,t=new Array(o*2),L&&(m=p*2*2,d=new Array(m*2)),e=0;e<p;e++)r=n[e],l=n[(e+1)%p],t[g]=t[g+o]=r.x,++g,t[g]=t[g+o]=r.y,++g,t[g]=t[g+o]=r.z,++g,t[g]=t[g+o]=l.x,++g,t[g]=t[g+o]=l.y,++g,t[g]=t[g+o]=l.z,++g,L&&(h=_[e],f=_[(e+1)%p],d[y]=d[y+m]=h.x,++y,d[y]=d[y+m]=h.y,++y,d[y]=d[y+m]=f.x,++y,d[y]=d[y+m]=f.y,++y);else{let E=I.chordLength(s,u.maximumRadius),D=0;if(a===R.GEODESIC)for(e=0;e<p;e++)D+=b.subdivideLineCount(n[e],n[(e+1)%p],E);else if(a===R.RHUMB)for(e=0;e<p;e++)D+=b.subdivideRhumbLineCount(u,n[e],n[(e+1)%p],E);for(o=(D+p)*3,t=new Array(o*2),L&&(m=(D+p)*2,d=new Array(m*2)),e=0;e<p;e++){r=n[e],l=n[(e+1)%p];let A,N;L&&(h=_[e],f=_[(e+1)%p]),a===R.GEODESIC?(A=b.subdivideLine(r,l,E,ut),L&&(N=b.subdivideTexcoordLine(h,f,r,l,E,rt))):a===R.RHUMB&&(A=b.subdivideRhumbLine(u,r,l,E,ut),L&&(N=b.subdivideTexcoordRhumbLine(h,f,u,r,l,E,rt)));let lt=A.length;for(let B=0;B<lt;++B,++g)t[g]=A[B],t[g+o]=A[B];if(t[g]=l.x,t[g+o]=l.x,++g,t[g]=l.y,t[g+o]=l.y,++g,t[g]=l.z,t[g+o]=l.z,++g,L){let B=N.length;for(let W=0;W<B;++W,++y)d[y]=N[W],d[y+m]=N[W];d[y]=f.x,d[y+m]=f.x,++y,d[y]=f.y,d[y+m]=f.y,++y}}}p=t.length;let C=nt.createTypedArray(p/3,p-n.length*6),T=0;for(p/=6,e=0;e<p;e++){let E=e,D=E+1,A=E+p,N=A+1;r=w.fromArray(t,E*3,_t),l=w.fromArray(t,D*3,At),!w.equalsEpsilon(r,l,I.EPSILON10,I.EPSILON10)&&(C[T++]=E,C[T++]=A,C[T++]=D,C[T++]=D,C[T++]=A,C[T++]=N)}let P={attributes:new et({position:new z({componentDatatype:k.DOUBLE,componentsPerAttribute:3,values:t})}),indices:C,primitiveType:J.TRIANGLES};return L&&(P.attributes.st=new z({componentDatatype:k.FLOAT,componentsPerAttribute:2,values:d})),new X(P)};var ie=b;export{ie as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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 w}from"./chunk-PO64KPKA.js";var C={};C.computePositions=function(I,f,b,n,e){let m=I*.5,i=-m,s=n+n,P=e?2*s:s,t=new Float64Array(P*3),r,c=0,o=0,p=e?s*3:0,a=e?(s+n)*3:n*3;for(r=0;r<n;r++){let y=r/n*w.TWO_PI,x=Math.cos(y),h=Math.sin(y),u=x*b,M=h*b,O=x*f,d=h*f;t[o+p]=u,t[o+p+1]=M,t[o+p+2]=i,t[o+a]=O,t[o+a+1]=d,t[o+a+2]=m,o+=3,e&&(t[c++]=u,t[c++]=M,t[c++]=i,t[c++]=O,t[c++]=d,t[c++]=m)}return t};var Y=C;export{Y as a};
26
+ import{a as w}from"./chunk-3SSKC3VN.js";var C={};C.computePositions=function(I,f,b,n,e){let m=I*.5,i=-m,s=n+n,P=e?2*s:s,t=new Float64Array(P*3),r,c=0,o=0,p=e?s*3:0,a=e?(s+n)*3:n*3;for(r=0;r<n;r++){let y=r/n*w.TWO_PI,x=Math.cos(y),h=Math.sin(y),u=x*b,M=h*b,O=x*f,d=h*f;t[o+p]=u,t[o+p+1]=M,t[o+p+2]=i,t[o+a]=O,t[o+a+1]=d,t[o+a+2]=m,o+=3,e&&(t[c++]=u,t[c++]=M,t[c++]=i,t[c++]=O,t[c++]=d,t[c++]=m)}return t};var Y=C;export{Y as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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 N}from"./chunk-JOXXXMPE.js";import{a}from"./chunk-R3KD5ZAI.js";import{e as T}from"./chunk-GBI3IATP.js";var r={BYTE:N.BYTE,UNSIGNED_BYTE:N.UNSIGNED_BYTE,SHORT:N.SHORT,UNSIGNED_SHORT:N.UNSIGNED_SHORT,INT:N.INT,UNSIGNED_INT:N.UNSIGNED_INT,FLOAT:N.FLOAT,DOUBLE:N.DOUBLE};r.getSizeInBytes=function(n){if(!T(n))throw new a("value is required.");switch(n){case r.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.INT:return Int32Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new a("componentDatatype is not a valid value.")}};r.fromTypedArray=function(n){if(n instanceof Int8Array)return r.BYTE;if(n instanceof Uint8Array)return r.UNSIGNED_BYTE;if(n instanceof Int16Array)return r.SHORT;if(n instanceof Uint16Array)return r.UNSIGNED_SHORT;if(n instanceof Int32Array)return r.INT;if(n instanceof Uint32Array)return r.UNSIGNED_INT;if(n instanceof Float32Array)return r.FLOAT;if(n instanceof Float64Array)return r.DOUBLE;throw new a("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")};r.validate=function(n){return T(n)&&(n===r.BYTE||n===r.UNSIGNED_BYTE||n===r.SHORT||n===r.UNSIGNED_SHORT||n===r.INT||n===r.UNSIGNED_INT||n===r.FLOAT||n===r.DOUBLE)};r.createTypedArray=function(n,e){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("valuesOrLength is required.");switch(n){case r.BYTE:return new Int8Array(e);case r.UNSIGNED_BYTE:return new Uint8Array(e);case r.SHORT:return new Int16Array(e);case r.UNSIGNED_SHORT:return new Uint16Array(e);case r.INT:return new Int32Array(e);case r.UNSIGNED_INT:return new Uint32Array(e);case r.FLOAT:return new Float32Array(e);case r.DOUBLE:return new Float64Array(e);default:throw new a("componentDatatype is not a valid value.")}};r.createArrayBufferView=function(n,e,E,t){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("buffer is required.");switch(E=E??0,t=t??(e.byteLength-E)/r.getSizeInBytes(n),n){case r.BYTE:return new Int8Array(e,E,t);case r.UNSIGNED_BYTE:return new Uint8Array(e,E,t);case r.SHORT:return new Int16Array(e,E,t);case r.UNSIGNED_SHORT:return new Uint16Array(e,E,t);case r.INT:return new Int32Array(e,E,t);case r.UNSIGNED_INT:return new Uint32Array(e,E,t);case r.FLOAT:return new Float32Array(e,E,t);case r.DOUBLE:return new Float64Array(e,E,t);default:throw new a("componentDatatype is not a valid value.")}};r.fromName=function(n){switch(n){case"BYTE":return r.BYTE;case"UNSIGNED_BYTE":return r.UNSIGNED_BYTE;case"SHORT":return r.SHORT;case"UNSIGNED_SHORT":return r.UNSIGNED_SHORT;case"INT":return r.INT;case"UNSIGNED_INT":return r.UNSIGNED_INT;case"FLOAT":return r.FLOAT;case"DOUBLE":return r.DOUBLE;default:throw new a("name is not a valid value.")}};var A=Object.freeze(r);export{A as a};
26
+ import{a as N}from"./chunk-OSW76XDF.js";import{a}from"./chunk-LEYMRMBK.js";import{e as T}from"./chunk-VTAIKJXX.js";var r={BYTE:N.BYTE,UNSIGNED_BYTE:N.UNSIGNED_BYTE,SHORT:N.SHORT,UNSIGNED_SHORT:N.UNSIGNED_SHORT,INT:N.INT,UNSIGNED_INT:N.UNSIGNED_INT,FLOAT:N.FLOAT,DOUBLE:N.DOUBLE};r.getSizeInBytes=function(n){if(!T(n))throw new a("value is required.");switch(n){case r.BYTE:return Int8Array.BYTES_PER_ELEMENT;case r.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case r.SHORT:return Int16Array.BYTES_PER_ELEMENT;case r.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case r.INT:return Int32Array.BYTES_PER_ELEMENT;case r.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case r.FLOAT:return Float32Array.BYTES_PER_ELEMENT;case r.DOUBLE:return Float64Array.BYTES_PER_ELEMENT;default:throw new a("componentDatatype is not a valid value.")}};r.fromTypedArray=function(n){if(n instanceof Int8Array)return r.BYTE;if(n instanceof Uint8Array)return r.UNSIGNED_BYTE;if(n instanceof Int16Array)return r.SHORT;if(n instanceof Uint16Array)return r.UNSIGNED_SHORT;if(n instanceof Int32Array)return r.INT;if(n instanceof Uint32Array)return r.UNSIGNED_INT;if(n instanceof Float32Array)return r.FLOAT;if(n instanceof Float64Array)return r.DOUBLE;throw new a("array must be an Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, or Float64Array.")};r.validate=function(n){return T(n)&&(n===r.BYTE||n===r.UNSIGNED_BYTE||n===r.SHORT||n===r.UNSIGNED_SHORT||n===r.INT||n===r.UNSIGNED_INT||n===r.FLOAT||n===r.DOUBLE)};r.createTypedArray=function(n,e){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("valuesOrLength is required.");switch(n){case r.BYTE:return new Int8Array(e);case r.UNSIGNED_BYTE:return new Uint8Array(e);case r.SHORT:return new Int16Array(e);case r.UNSIGNED_SHORT:return new Uint16Array(e);case r.INT:return new Int32Array(e);case r.UNSIGNED_INT:return new Uint32Array(e);case r.FLOAT:return new Float32Array(e);case r.DOUBLE:return new Float64Array(e);default:throw new a("componentDatatype is not a valid value.")}};r.createArrayBufferView=function(n,e,E,t){if(!T(n))throw new a("componentDatatype is required.");if(!T(e))throw new a("buffer is required.");switch(E=E??0,t=t??(e.byteLength-E)/r.getSizeInBytes(n),n){case r.BYTE:return new Int8Array(e,E,t);case r.UNSIGNED_BYTE:return new Uint8Array(e,E,t);case r.SHORT:return new Int16Array(e,E,t);case r.UNSIGNED_SHORT:return new Uint16Array(e,E,t);case r.INT:return new Int32Array(e,E,t);case r.UNSIGNED_INT:return new Uint32Array(e,E,t);case r.FLOAT:return new Float32Array(e,E,t);case r.DOUBLE:return new Float64Array(e,E,t);default:throw new a("componentDatatype is not a valid value.")}};r.fromName=function(n){switch(n){case"BYTE":return r.BYTE;case"UNSIGNED_BYTE":return r.UNSIGNED_BYTE;case"SHORT":return r.SHORT;case"UNSIGNED_SHORT":return r.UNSIGNED_SHORT;case"INT":return r.INT;case"UNSIGNED_INT":return r.UNSIGNED_INT;case"FLOAT":return r.FLOAT;case"DOUBLE":return r.DOUBLE;default:throw new a("name is not a valid value.")}};var A=Object.freeze(r);export{A as a};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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 _}from"./chunk-RQ3X5FSK.js";import{a as te}from"./chunk-BGQDOF2W.js";import{a as ie,b as j,f as Z,g as fe}from"./chunk-DGGIK7AD.js";import{a as e,b as se,c as ee,e as O}from"./chunk-FCVV6A2F.js";import{a as Q}from"./chunk-PO64KPKA.js";import{a as le}from"./chunk-R3KD5ZAI.js";import{e as $}from"./chunk-GBI3IATP.js";var Ee={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Ee);var me={};function P(r,n){if(!$(r))throw new le("identifier is required.");$(me[r])||(me[r]=!0,console.warn(n??r))}P.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";P.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";P.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";P.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var ue=P;var w=[new e,new e],Se=new e,Te=new e,Be=new e,Ce=new e,ze=new e,Ae=new e,be=new e,Oe=new e,ve=new e,I=new e,W=new e,R={},re=new se;function De(r,n){let a=new Array(r.length);for(let o=0;o<r.length;o++){let t=r[o];re=n.cartesianToCartographic(t,re),a[o]=re.height,r[o]=n.scaleToGeodeticSurface(t,t)}return a}function ne(r,n,a,o){let t=r[0],c=r[1],f=e.angleBetween(t,c),l=Math.ceil(f/o),m=new Array(l),s;if(n===a){for(s=0;s<l;s++)m[s]=n;return m.push(a),m}let d=(a-n)/l;for(s=1;s<l;s++){let x=n+s*d;m[s]=x}return m[0]=n,m.push(a),m}var X=new e,Y=new e;function je(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y),l=ee.angleBetween(c,f);return f.x*c.y-f.y*c.x>=0?-l:l}var He=new e(-1,0,0),H=new j,Me=new j,oe=new O,Ne=O.IDENTITY.clone(),Ve=new e,Fe=new ie,he=new e;function v(r,n,a,o,t,c,f,l){let m=Ve,s=Fe;H=fe.eastNorthUpToFixedFrame(r,t,H),m=j.multiplyByPointAsVector(H,He,m),m=e.normalize(m,m);let S=je(m,n,r,t);oe=O.fromRotationZ(S,oe),he.z=c,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,he,Me),H);let d=Ne;d[0]=f;for(let x=0;x<l;x++)for(let i=0;i<a.length;i+=3)s=e.fromArray(a,i,s),s=O.multiplyByVector(d,s,s),s=j.multiplyByPoint(H,s,s),o.push(s.x,s.y,s.z);return o}var Ge=new e;function ce(r,n,a,o,t,c,f){for(let l=0;l<r.length;l+=3){let m=e.fromArray(r,l,Ge);o=v(m,n,a,o,t,c[l/3],f,1)}return o}function Ie(r,n){let a=r.length,o=new Array(a*6),t=0,c=n.x+n.width/2,f=n.y+n.height/2,l=r[0];o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f;for(let m=1;m<a;m++){l=r[m];let s=l.x-c,S=l.y-f;o[t++]=s,o[t++]=0,o[t++]=S,o[t++]=s,o[t++]=0,o[t++]=S}return l=r[0],o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f,o}function de(r,n){let a=r.length,o=new Array(a*3),t=0,c=n.x+n.width/2,f=n.y+n.height/2;for(let l=0;l<a;l++)o[t++]=r[l].x-c,o[t++]=0,o[t++]=r[l].y-f;return o}var ge=new Z,ye=new e,we=new O;function pe(r,n,a,o,t,c,f,l,m,s){let S=e.angleBetween(e.subtract(n,r,I),e.subtract(a,r,W)),d=o===G.BEVELED?0:Math.ceil(S/Q.toRadians(5)),x;t?x=O.fromQuaternion(Z.fromAxisAngle(e.negate(r,I),S/(d+1),ge),we):x=O.fromQuaternion(Z.fromAxisAngle(r,S/(d+1),ge),we);let i,g;if(n=e.clone(n,ye),d>0){let D=s?2:1;for(let y=0;y<d;y++)n=O.multiplyByVector(x,n,n),i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,D)}else i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,1),a=e.clone(a,ye),i=e.subtract(a,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(a,W),f=v(g,i,l,f,c,m,1,1);return f}R.removeDuplicatesFromShape=function(r){let n=r.length,a=[];for(let o=n-1,t=0;t<n;o=t++){let c=r[o],f=r[t];ee.equals(c,f)||a.push(f)}return a};R.angleIsGreaterThanPi=function(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y);return f.x*c.y-f.y*c.x>=0};var Le=new e,qe=new e;R.computePositions=function(r,n,a,o,t){let c=o._ellipsoid,f=De(r,c),l=o._granularity,m=o._cornerType,s=t?Ie(n,a):de(n,a),S=t?de(n,a):void 0,d=a.height/2,x=a.width/2,i=r.length,g=[],D=t?[]:void 0,y=Se,b=Te,h=Be,E=Ce,B=ze,C=Ae,z=be,u=Oe,T=ve,p=r[0],M=r[1];E=c.geodeticSurfaceNormal(p,E),y=e.subtract(M,p,y),y=e.normalize(y,y),u=e.cross(E,y,u),u=e.normalize(u,u);let N=f[0],A=f[1];t&&(D=v(p,u,S,D,c,N+d,1,1)),T=e.clone(p,T),p=M,b=e.negate(y,b);let V,F;for(let U=1;U<i-1;U++){let ae=t?2:1;if(M=r[U+1],p.equals(M)){ue("Positions are too close and are considered equivalent with rounding error.");continue}y=e.subtract(M,p,y),y=e.normalize(y,y),E=c.geodeticSurfaceNormal(p,E);let L=e.multiplyByScalar(E,e.dot(y,E),Le);e.subtract(y,L,L),e.normalize(L,L);let q=e.multiplyByScalar(E,e.dot(b,E),qe);if(e.subtract(b,q,q),e.normalize(q,q),!Q.equalsEpsilon(Math.abs(e.dot(L,q)),1,Q.EPSILON7)){h=e.add(y,b,h),h=e.normalize(h,h),h=e.cross(h,E,h),h=e.cross(E,h,h),h=e.normalize(h,h);let k=1/Math.max(.25,e.magnitude(e.cross(h,b,I))),K=R.angleIsGreaterThanPi(y,b,p,c);K?(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):(h=e.negate(h,h),g=v(p,h,s,g,c,A+d,k,ae)),T=e.clone(z,T)):(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,-x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,-x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):g=v(p,h,s,g,c,A+d,k,ae),T=e.clone(z,T)),b=e.negate(y,b)}else g=v(T,u,s,g,c,N+d,1,1),T=p;N=A,A=f[U+1],p=M}w[0]=e.clone(T,w[0]),w[1]=e.clone(p,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),t&&(D=v(p,u,S,D,c,A+d,1,1)),i=g.length;let xe=t?i+D.length:i,J=new Float64Array(xe);return J.set(g),t&&J.set(D,i),J};var ct=R;export{G as a,ue as b,ct as c};
26
+ import{a as _}from"./chunk-XRL4AVS5.js";import{a as te}from"./chunk-TCGIRNHN.js";import{a as ie,b as j,f as Z,g as fe}from"./chunk-PSPPBZWI.js";import{a as e,b as se,c as ee,e as O}from"./chunk-64RSHJUE.js";import{a as Q}from"./chunk-3SSKC3VN.js";import{a as le}from"./chunk-LEYMRMBK.js";import{e as $}from"./chunk-VTAIKJXX.js";var Ee={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Ee);var me={};function P(r,n){if(!$(r))throw new le("identifier is required.");$(me[r])||(me[r]=!0,console.warn(n??r))}P.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.";P.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored";P.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored";P.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";var ue=P;var w=[new e,new e],Se=new e,Te=new e,Be=new e,Ce=new e,ze=new e,Ae=new e,be=new e,Oe=new e,ve=new e,I=new e,W=new e,R={},re=new se;function De(r,n){let a=new Array(r.length);for(let o=0;o<r.length;o++){let t=r[o];re=n.cartesianToCartographic(t,re),a[o]=re.height,r[o]=n.scaleToGeodeticSurface(t,t)}return a}function ne(r,n,a,o){let t=r[0],c=r[1],f=e.angleBetween(t,c),l=Math.ceil(f/o),m=new Array(l),s;if(n===a){for(s=0;s<l;s++)m[s]=n;return m.push(a),m}let d=(a-n)/l;for(s=1;s<l;s++){let x=n+s*d;m[s]=x}return m[0]=n,m.push(a),m}var X=new e,Y=new e;function je(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y),l=ee.angleBetween(c,f);return f.x*c.y-f.y*c.x>=0?-l:l}var He=new e(-1,0,0),H=new j,Me=new j,oe=new O,Ne=O.IDENTITY.clone(),Ve=new e,Fe=new ie,he=new e;function v(r,n,a,o,t,c,f,l){let m=Ve,s=Fe;H=fe.eastNorthUpToFixedFrame(r,t,H),m=j.multiplyByPointAsVector(H,He,m),m=e.normalize(m,m);let S=je(m,n,r,t);oe=O.fromRotationZ(S,oe),he.z=c,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,he,Me),H);let d=Ne;d[0]=f;for(let x=0;x<l;x++)for(let i=0;i<a.length;i+=3)s=e.fromArray(a,i,s),s=O.multiplyByVector(d,s,s),s=j.multiplyByPoint(H,s,s),o.push(s.x,s.y,s.z);return o}var Ge=new e;function ce(r,n,a,o,t,c,f){for(let l=0;l<r.length;l+=3){let m=e.fromArray(r,l,Ge);o=v(m,n,a,o,t,c[l/3],f,1)}return o}function Ie(r,n){let a=r.length,o=new Array(a*6),t=0,c=n.x+n.width/2,f=n.y+n.height/2,l=r[0];o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f;for(let m=1;m<a;m++){l=r[m];let s=l.x-c,S=l.y-f;o[t++]=s,o[t++]=0,o[t++]=S,o[t++]=s,o[t++]=0,o[t++]=S}return l=r[0],o[t++]=l.x-c,o[t++]=0,o[t++]=l.y-f,o}function de(r,n){let a=r.length,o=new Array(a*3),t=0,c=n.x+n.width/2,f=n.y+n.height/2;for(let l=0;l<a;l++)o[t++]=r[l].x-c,o[t++]=0,o[t++]=r[l].y-f;return o}var ge=new Z,ye=new e,we=new O;function pe(r,n,a,o,t,c,f,l,m,s){let S=e.angleBetween(e.subtract(n,r,I),e.subtract(a,r,W)),d=o===G.BEVELED?0:Math.ceil(S/Q.toRadians(5)),x;t?x=O.fromQuaternion(Z.fromAxisAngle(e.negate(r,I),S/(d+1),ge),we):x=O.fromQuaternion(Z.fromAxisAngle(r,S/(d+1),ge),we);let i,g;if(n=e.clone(n,ye),d>0){let D=s?2:1;for(let y=0;y<d;y++)n=O.multiplyByVector(x,n,n),i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,D)}else i=e.subtract(n,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(n,W),f=v(g,i,l,f,c,m,1,1),a=e.clone(a,ye),i=e.subtract(a,r,I),i=e.normalize(i,i),t||(i=e.negate(i,i)),g=c.scaleToGeodeticSurface(a,W),f=v(g,i,l,f,c,m,1,1);return f}R.removeDuplicatesFromShape=function(r){let n=r.length,a=[];for(let o=n-1,t=0;t<n;o=t++){let c=r[o],f=r[t];ee.equals(c,f)||a.push(f)}return a};R.angleIsGreaterThanPi=function(r,n,a,o){let t=new te(a,o),c=t.projectPointOntoPlane(e.add(a,r,X),X),f=t.projectPointOntoPlane(e.add(a,n,Y),Y);return f.x*c.y-f.y*c.x>=0};var Le=new e,qe=new e;R.computePositions=function(r,n,a,o,t){let c=o._ellipsoid,f=De(r,c),l=o._granularity,m=o._cornerType,s=t?Ie(n,a):de(n,a),S=t?de(n,a):void 0,d=a.height/2,x=a.width/2,i=r.length,g=[],D=t?[]:void 0,y=Se,b=Te,h=Be,E=Ce,B=ze,C=Ae,z=be,u=Oe,T=ve,p=r[0],M=r[1];E=c.geodeticSurfaceNormal(p,E),y=e.subtract(M,p,y),y=e.normalize(y,y),u=e.cross(E,y,u),u=e.normalize(u,u);let N=f[0],A=f[1];t&&(D=v(p,u,S,D,c,N+d,1,1)),T=e.clone(p,T),p=M,b=e.negate(y,b);let V,F;for(let U=1;U<i-1;U++){let ae=t?2:1;if(M=r[U+1],p.equals(M)){ue("Positions are too close and are considered equivalent with rounding error.");continue}y=e.subtract(M,p,y),y=e.normalize(y,y),E=c.geodeticSurfaceNormal(p,E);let L=e.multiplyByScalar(E,e.dot(y,E),Le);e.subtract(y,L,L),e.normalize(L,L);let q=e.multiplyByScalar(E,e.dot(b,E),qe);if(e.subtract(b,q,q),e.normalize(q,q),!Q.equalsEpsilon(Math.abs(e.dot(L,q)),1,Q.EPSILON7)){h=e.add(y,b,h),h=e.normalize(h,h),h=e.cross(h,E,h),h=e.cross(E,h,h),h=e.normalize(h,h);let k=1/Math.max(.25,e.magnitude(e.cross(h,b,I))),K=R.angleIsGreaterThanPi(y,b,p,c);K?(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):(h=e.negate(h,h),g=v(p,h,s,g,c,A+d,k,ae)),T=e.clone(z,T)):(B=e.add(p,e.multiplyByScalar(h,k*x,h),B),C=e.add(B,e.multiplyByScalar(u,-x,C),C),w[0]=e.clone(T,w[0]),w[1]=e.clone(C,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),u=e.cross(E,y,u),u=e.normalize(u,u),z=e.add(B,e.multiplyByScalar(u,-x,z),z),m===G.ROUNDED||m===G.BEVELED?pe(B,C,z,m,K,c,g,s,A+d,t):g=v(p,h,s,g,c,A+d,k,ae),T=e.clone(z,T)),b=e.negate(y,b)}else g=v(T,u,s,g,c,N+d,1,1),T=p;N=A,A=f[U+1],p=M}w[0]=e.clone(T,w[0]),w[1]=e.clone(p,w[1]),V=ne(w,N+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,V,1),t&&(D=v(p,u,S,D,c,A+d,1,1)),i=g.length;let xe=t?i+D.length:i,J=new Float64Array(xe);return J.set(g),t&&J.set(D,i),J};var ct=R;export{G as a,ue as b,ct as c};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.131
4
+ * Version 1.132
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-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};
26
+ import{a as J}from"./chunk-TCGIRNHN.js";import{a as I}from"./chunk-HTFSEEMT.js";import{b as B,c as G,d as k}from"./chunk-4IW2T6GF.js";import{b as j,h as X}from"./chunk-PSPPBZWI.js";import{a as t,b as S,c as z,d as F,e as d}from"./chunk-64RSHJUE.js";import{a as g}from"./chunk-3SSKC3VN.js";import{a as b,b as W}from"./chunk-LEYMRMBK.js";import{e as p}from"./chunk-VTAIKJXX.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};