@reearth/core 0.0.7-alpha.5 → 0.0.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +8 -8
- package/dist/cesium/Widgets/widgets.css +8 -8
- package/dist/cesium/Workers/{chunk-SUQM3OSW.js → chunk-2YD5QWGR.js} +2 -2
- package/dist/cesium/Workers/{chunk-74N6MC2V.js → chunk-3T4KR75X.js} +2 -2
- package/dist/cesium/Workers/chunk-46KFVW24.js +26 -0
- package/dist/cesium/Workers/chunk-4EI6PP43.js +28 -0
- package/dist/cesium/Workers/{chunk-YEJWCH6C.js → chunk-4RS52VIY.js} +2 -2
- package/dist/cesium/Workers/{chunk-NPBZI5YA.js → chunk-4YLYA3DC.js} +1 -1
- package/dist/cesium/Workers/{chunk-JEWHFDAA.js → chunk-5ENAGXBI.js} +2 -2
- package/dist/cesium/Workers/{chunk-MRR3RGFO.js → chunk-5VIB3TI5.js} +2 -2
- package/dist/cesium/Workers/{chunk-JCJ24DHF.js → chunk-6NGZLDFZ.js} +2 -2
- package/dist/cesium/Workers/{chunk-7X2YQ6I4.js → chunk-6RGNWVZ2.js} +2 -2
- package/dist/cesium/Workers/{chunk-BK3HCS7I.js → chunk-7AZZVJ52.js} +2 -2
- package/dist/cesium/Workers/{chunk-UBIRX2SP.js → chunk-AMXAQQEL.js} +2 -2
- package/dist/cesium/Workers/{chunk-LDCAXLGS.js → chunk-AQW44ZPC.js} +2 -2
- package/dist/cesium/Workers/{chunk-B6TRTFAA.js → chunk-CPCMDW6Z.js} +2 -2
- package/dist/cesium/Workers/{chunk-3C74MLG3.js → chunk-DNL2WDRL.js} +1 -1
- package/dist/cesium/Workers/{chunk-FK5KFB6H.js → chunk-ERW7V247.js} +1 -1
- package/dist/cesium/Workers/{chunk-5AG2MVRM.js → chunk-EYRIA4TP.js} +2 -2
- package/dist/cesium/Workers/{chunk-6AUUBDOF.js → chunk-F7RQIJML.js} +2 -2
- package/dist/cesium/Workers/{chunk-JZLZJJQD.js → chunk-FPZMU6QP.js} +2 -2
- package/dist/cesium/Workers/{chunk-YBI55DLZ.js → chunk-FZDVQW7A.js} +2 -2
- package/dist/cesium/Workers/{chunk-2MBPFWCP.js → chunk-GAZ2U4FO.js} +2 -2
- package/dist/cesium/Workers/{chunk-CSISXEG7.js → chunk-I44IOOT4.js} +1 -1
- package/dist/cesium/Workers/{chunk-R2AN7EKC.js → chunk-IALXUAD4.js} +1 -1
- package/dist/cesium/Workers/{chunk-MDLPQIMP.js → chunk-IXBUEUZL.js} +2 -2
- package/dist/cesium/Workers/{chunk-HPBHKP5S.js → chunk-J3GCYV5K.js} +2 -2
- package/dist/cesium/Workers/{chunk-KRZBI2MU.js → chunk-KGSZTFHZ.js} +2 -2
- package/dist/cesium/Workers/{chunk-B2SKQ7LU.js → chunk-KKKPU2CI.js} +2 -2
- package/dist/cesium/Workers/{chunk-QPOPEH3M.js → chunk-KTEJE5KE.js} +2 -2
- package/dist/cesium/Workers/chunk-KYZ3DYY6.js +26 -0
- package/dist/cesium/Workers/{chunk-LOPN5R3I.js → chunk-L2QG4MRI.js} +2 -2
- package/dist/cesium/Workers/{chunk-EXBFEYPQ.js → chunk-MCE3KFYN.js} +2 -2
- package/dist/cesium/Workers/{chunk-C6DMEJQ7.js → chunk-MMLDGXML.js} +2 -2
- package/dist/cesium/Workers/{chunk-KTTUANTJ.js → chunk-MTBRPBDQ.js} +2 -2
- package/dist/cesium/Workers/{chunk-7VZHIB6P.js → chunk-OKT6VBRK.js} +2 -2
- package/dist/cesium/Workers/chunk-PHYDKLSY.js +26 -0
- package/dist/cesium/Workers/chunk-PWPX3224.js +26 -0
- package/dist/cesium/Workers/{chunk-VQZSIOZW.js → chunk-QHOVE6WG.js} +2 -2
- package/dist/cesium/Workers/{chunk-CN7UN2OZ.js → chunk-QJ6MBL22.js} +2 -2
- package/dist/cesium/Workers/{chunk-NUSW5B6A.js → chunk-QKO6VIG2.js} +2 -2
- package/dist/cesium/Workers/{chunk-4N7SRDH5.js → chunk-QVEE4QL2.js} +2 -2
- package/dist/cesium/Workers/{chunk-4T6AS6BZ.js → chunk-RXQOQZ7S.js} +2 -2
- package/dist/cesium/Workers/{chunk-RURL6ZX2.js → chunk-S3ZKQKMM.js} +2 -2
- package/dist/cesium/Workers/{chunk-ZYWD6OQH.js → chunk-SFEUMZSK.js} +2 -2
- package/dist/cesium/Workers/{chunk-BOPB43LN.js → chunk-T75MW4X3.js} +2 -2
- package/dist/cesium/Workers/chunk-TVO2A75R.js +66 -0
- package/dist/cesium/Workers/{chunk-VHNZBQTR.js → chunk-UHR36K45.js} +2 -2
- package/dist/cesium/Workers/{chunk-WZUWQMI7.js → chunk-UKJCDZOR.js} +2 -2
- package/dist/cesium/Workers/{chunk-B4TQDFIE.js → chunk-VKVIYER6.js} +2 -2
- package/dist/cesium/Workers/{chunk-OUXRUXNB.js → chunk-VPIQWTRZ.js} +2 -2
- package/dist/cesium/Workers/{chunk-2ED5WI77.js → chunk-XSX5HRFC.js} +2 -2
- package/dist/cesium/Workers/{chunk-5Z6L2FHX.js → chunk-Z5WQQHSL.js} +2 -2
- package/dist/cesium/Workers/{chunk-YPDO7SPO.js → chunk-Z7B2VEL5.js} +2 -2
- package/dist/cesium/Workers/combineGeometry.js +2 -2
- package/dist/cesium/Workers/createBoxGeometry.js +2 -2
- package/dist/cesium/Workers/createBoxOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCircleGeometry.js +2 -2
- package/dist/cesium/Workers/createCircleOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/dist/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCorridorGeometry.js +2 -2
- package/dist/cesium/Workers/createCorridorOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createCylinderGeometry.js +2 -2
- package/dist/cesium/Workers/createCylinderOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipseGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipseOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipsoidGeometry.js +2 -2
- package/dist/cesium/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createFrustumGeometry.js +2 -2
- package/dist/cesium/Workers/createFrustumOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createGeometry.js +2 -2
- package/dist/cesium/Workers/createGroundPolylineGeometry.js +2 -2
- package/dist/cesium/Workers/createPlaneGeometry.js +2 -2
- package/dist/cesium/Workers/createPlaneOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createPolygonGeometry.js +2 -2
- package/dist/cesium/Workers/createPolygonOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createPolylineGeometry.js +2 -2
- package/dist/cesium/Workers/createPolylineVolumeGeometry.js +2 -2
- package/dist/cesium/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createRectangleGeometry.js +2 -2
- package/dist/cesium/Workers/createRectangleOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createSimplePolylineGeometry.js +2 -2
- package/dist/cesium/Workers/createSphereGeometry.js +2 -2
- package/dist/cesium/Workers/createSphereOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/createTaskProcessorWorker.js +2 -2
- package/dist/cesium/Workers/createVectorTileClampedPolylines.js +2 -2
- package/dist/cesium/Workers/createVectorTileGeometries.js +2 -2
- package/dist/cesium/Workers/createVectorTilePoints.js +2 -2
- package/dist/cesium/Workers/createVectorTilePolygons.js +2 -2
- package/dist/cesium/Workers/createVectorTilePolylines.js +2 -2
- package/dist/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/dist/cesium/Workers/createVerticesFromHeightmap.js +2 -2
- package/dist/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/dist/cesium/Workers/createWallGeometry.js +2 -2
- package/dist/cesium/Workers/createWallOutlineGeometry.js +2 -2
- package/dist/cesium/Workers/decodeDraco.js +2 -2
- package/dist/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/dist/cesium/Workers/decodeI3S.js +2 -2
- package/dist/cesium/Workers/transcodeKTX2.js +10 -10
- package/dist/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/cesium/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/dist/core.js +34193 -34105
- package/dist/core.umd.cjs +3866 -3820
- package/dist/index.d.ts +212 -217
- package/package.json +5 -5
- package/src/Map/ClusteredLayers/index.tsx +2 -2
- package/src/Map/Layer/index.tsx +3 -3
- package/src/Map/Layers/hooks.ts +0 -10
- package/src/Map/Layers/index.tsx +2 -2
- package/src/Map/Sketch/hooks.ts +66 -46
- package/src/Map/Sketch/index.tsx +24 -2
- package/src/Map/Sketch/preset.ts +0 -2
- package/src/Map/Sketch/types.ts +0 -31
- package/src/Map/hooks.ts +4 -0
- package/src/Map/index.tsx +5 -8
- package/src/Map/ref.ts +7 -4
- package/src/Map/types/index.ts +216 -34
- package/src/Map/useTimelineManager.ts +3 -5
- package/src/Map/utils.ts +43 -1
- package/src/Visualizer/coreContext.tsx +8 -1
- package/src/Visualizer/hooks.ts +75 -6
- package/src/Visualizer/index.stories.tsx +48 -4
- package/src/Visualizer/index.tsx +6 -8
- package/src/engines/Cesium/Feature/Ellipse/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Frustum/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Model/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Model/index.tsx +9 -10
- package/src/engines/Cesium/Feature/Polygon/index.stories.tsx +6 -8
- package/src/engines/Cesium/Feature/Raster/index.stories.tsx +2 -2
- package/src/engines/Cesium/Feature/Resource/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Tileset/hooks.ts +11 -12
- package/src/engines/Cesium/Feature/Tileset/index.stories.tsx +1 -1
- package/src/engines/Cesium/Feature/Tileset/index.tsx +4 -4
- package/src/engines/Cesium/Feature/Tileset/useClippingBox.ts +1 -10
- package/src/engines/Cesium/Feature/index.tsx +4 -5
- package/src/engines/Cesium/Feature/utils.tsx +2 -3
- package/src/engines/Cesium/Shaders/OverriddenShaders/GlobeFS/IBL.glsl +6 -10
- package/src/engines/Cesium/{hooks/useOverrideGlobeShader/VertexTerrainElevationMaterial.ts → VertexTerrainElevationMaterial.ts} +2 -3
- package/src/engines/Cesium/{hooks/useCameraLimiter.ts → cameraLimiter.ts} +45 -22
- package/src/engines/Cesium/core/Globe.tsx +68 -36
- package/src/engines/Cesium/core/Imagery.test.ts +9 -9
- package/src/engines/Cesium/core/Imagery.tsx +19 -17
- package/src/engines/Cesium/core/Indicator/Indicator.tsx +8 -8
- package/src/engines/Cesium/hooks.ts +365 -124
- package/src/engines/Cesium/index.stories.tsx +1 -1
- package/src/engines/Cesium/index.tsx +62 -60
- package/src/engines/Cesium/{hooks/useEngineRef.test.tsx → useEngineRef.test.tsx} +34 -38
- package/src/engines/Cesium/{hooks/useEngineRef.ts → useEngineRef.ts} +41 -43
- package/src/engines/Cesium/{hooks/useOverrideGlobeShader/useOverrideGlobeShader.ts → useOverrideGlobeShader.ts} +17 -20
- package/src/engines/index.ts +1 -1
- package/src/mantle/compat/types.ts +7 -7
- package/dist/cesium/Workers/chunk-45U7TTT3.js +0 -26
- package/dist/cesium/Workers/chunk-7VJK3KHI.js +0 -26
- package/dist/cesium/Workers/chunk-CUOR5F7T.js +0 -28
- package/dist/cesium/Workers/chunk-DGCK3LD2.js +0 -30
- package/dist/cesium/Workers/chunk-DXEZYE3K.js +0 -62
- package/dist/cesium/Workers/chunk-VAKC5J5C.js +0 -26
- package/dist/cesium/Workers/chunk-VKV642QV.js +0 -26
- package/dist/cesium/Workers/chunk-VMSXG4OA.js +0 -26
- package/src/Map/types/viewerProperty.ts +0 -215
- package/src/Visualizer/useCoreAPI.ts +0 -30
- package/src/engines/Cesium/hooks/useCamera.ts +0 -135
- package/src/engines/Cesium/hooks/useExplicitRender.ts +0 -65
- package/src/engines/Cesium/hooks/useLayerDragDrop.ts +0 -77
- package/src/engines/Cesium/hooks/useViewerProperty.ts +0 -90
- /package/src/engines/Cesium/{hooks/useOverrideGlobeShader/JapanSeaLevelEllipsoid.ts → JapanSeaLevelEllipsoid.ts} +0 -0
- /package/src/engines/Cesium/{hooks/useOverrideGlobeShader/vertexTerrainElevationMaterial.glsl → vertexTerrainElevationMaterial.glsl} +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.116
|
|
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 _}from"./chunk-LDCAXLGS.js";import{a as te}from"./chunk-VMSXG4OA.js";import{e as Z,h as me}from"./chunk-DXEZYE3K.js";import{a as fe,b as j}from"./chunk-DGCK3LD2.js";import{a as e,b as ie,c as ee,e as O}from"./chunk-CUOR5F7T.js";import{a as Q}from"./chunk-74N6MC2V.js";import{a as se}from"./chunk-NPBZI5YA.js";import{a as le}from"./chunk-7X2YQ6I4.js";import{e as $}from"./chunk-R2AN7EKC.js";var Se={ROUNDED:0,MITERED:1,BEVELED:2},G=Object.freeze(Se);var ue={};function P(r,n){if(!$(r))throw new le("identifier is required.");$(ue[r])||(ue[r]=!0,console.warn(se(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 he=P;var w=[new e,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,De=new e,I=new e,W=new e,R={},re=new ie;function je(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 He(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 Me=new e(-1,0,0),H=new j,Ve=new j,oe=new O,Ne=O.IDENTITY.clone(),Fe=new e,Ge=new fe,de=new e;function v(r,n,a,o,t,c,f,l){let m=Fe,s=Ge;H=me.eastNorthUpToFixedFrame(r,t,H),m=j.multiplyByPointAsVector(H,Me,m),m=e.normalize(m,m);let S=He(m,n,r,t);oe=O.fromRotationZ(S,oe),de.z=c,H=j.multiplyTransformation(H,j.fromRotationTranslation(oe,de,Ve),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 Ie=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,Ie);o=v(m,n,a,o,t,c[l/3],f,1)}return o}function Le(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 ge(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 ye=new Z,we=new e,pe=new O;function xe(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),ye),pe):x=O.fromQuaternion(Z.fromAxisAngle(r,S/(d+1),ye),pe);let i,g;if(n=e.clone(n,we),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,we),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 qe=new e,Pe=new e;R.computePositions=function(r,n,a,o,t){let c=o._ellipsoid,f=je(r,c),l=o._granularity,m=o._cornerType,s=t?Le(n,a):ge(n,a),S=t?ge(n,a):void 0,d=a.height/2,x=a.width/2,i=r.length,g=[],D=t?[]:void 0,y=Te,b=Be,h=Ce,E=ze,B=Ae,C=be,z=Oe,u=ve,T=De,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 V=f[0],A=f[1];t&&(D=v(p,u,S,D,c,V+d,1,1)),T=e.clone(p,T),p=M,b=e.negate(y,b);let N,F;for(let U=1;U<i-1;U++){let ae=t?2:1;if(M=r[U+1],p.equals(M)){he("Positions are too close and are considered equivalent with rounding error.");continue}y=e.subtract(M,p,y),y=e.normalize(y,y),h=e.add(y,b,h),h=e.normalize(h,h),E=c.geodeticSurfaceNormal(p,E);let L=e.multiplyByScalar(E,e.dot(y,E),qe);e.subtract(y,L,L),e.normalize(L,L);let q=e.multiplyByScalar(E,e.dot(b,E),Pe);if(e.subtract(b,q,q),e.normalize(q,q),!Q.equalsEpsilon(Math.abs(e.dot(L,q)),1,Q.EPSILON7)){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]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,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?xe(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]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,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?xe(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,V+d,1,1),T=p;V=A,A=f[U+1],p=M}w[0]=e.clone(T,w[0]),w[1]=e.clone(p,w[1]),N=ne(w,V+d,A+d,l),F=_.generateArc({positions:w,granularity:l,ellipsoid:c}),g=ce(F,u,s,g,c,N,1),t&&(D=v(p,u,S,D,c,A+d,1,1)),i=g.length;let Ee=t?i+D.length:i,J=new Float64Array(Ee);return J.set(g),t&&J.set(D,i),J};var lt=R;export{G as a,he as b,lt as c};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.116
|
|
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{e as O,h as G}from"./chunk-DXEZYE3K.js";import{b as l,c as R,d as L}from"./chunk-DGCK3LD2.js";import{a as A,b as h,c as a,e as y}from"./chunk-CUOR5F7T.js";import{a as c}from"./chunk-CSISXEG7.js";import{a as s}from"./chunk-NPBZI5YA.js";import{a as N,b as w}from"./chunk-7X2YQ6I4.js";import{e as I}from"./chunk-R2AN7EKC.js";var U={NONE:0,TRIANGLES:1,LINES:2,POLYLINES:3},M=Object.freeze(U);var r={POINTS:c.POINTS,LINES:c.LINES,LINE_LOOP:c.LINE_LOOP,LINE_STRIP:c.LINE_STRIP,TRIANGLES:c.TRIANGLES,TRIANGLE_STRIP:c.TRIANGLE_STRIP,TRIANGLE_FAN:c.TRIANGLE_FAN};r.isLines=function(t){return t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP};r.isTriangles=function(t){return t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};r.validate=function(t){return t===r.POINTS||t===r.LINES||t===r.LINE_LOOP||t===r.LINE_STRIP||t===r.TRIANGLES||t===r.TRIANGLE_STRIP||t===r.TRIANGLE_FAN};var F=Object.freeze(r);function _(t){t=s(t,s.EMPTY_OBJECT),w.typeOf.object("options.attributes",t.attributes),this.attributes=t.attributes,this.indices=t.indices,this.primitiveType=s(t.primitiveType,F.TRIANGLES),this.boundingSphere=t.boundingSphere,this.geometryType=s(t.geometryType,M.NONE),this.boundingSphereCV=t.boundingSphereCV,this.offsetAttribute=t.offsetAttribute}_.computeNumberOfVertices=function(t){w.typeOf.object("geometry",t);let m=-1;for(let u in t.attributes)if(t.attributes.hasOwnProperty(u)&&I(t.attributes[u])&&I(t.attributes[u].values)){let o=t.attributes[u],e=o.values.length/o.componentsPerAttribute;if(m!==e&&m!==-1)throw new N("All attribute lists must have the same number of attributes.");m=e}return m};var W=new h,H=new A,V=new l,Z=[new h,new h,new h],K=[new a,new a,new a],$=[new a,new a,new a],tt=new A,et=new O,rt=new l,nt=new L;_._textureCoordinateRotationPoints=function(t,m,u,o){let e,g=R.center(o,W),D=h.toCartesian(g,u,H),Y=G.eastNorthUpToFixedFrame(D,u,V),C=l.inverse(Y,V),b=K,f=Z;f[0].longitude=o.west,f[0].latitude=o.south,f[1].longitude=o.west,f[1].latitude=o.north,f[2].longitude=o.east,f[2].latitude=o.south;let n=tt;for(e=0;e<3;e++)h.toCartesian(f[e],u,n),n=l.multiplyByPointAsVector(C,n,n),b[e].x=n.x,b[e].y=n.y;let B=O.fromAxisAngle(A.UNIT_Z,-m,et),v=y.fromQuaternion(B,rt),j=t.length,T=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY,d=Number.NEGATIVE_INFINITY,x=Number.NEGATIVE_INFINITY;for(e=0;e<j;e++)n=l.multiplyByPointAsVector(C,t[e],n),n=y.multiplyByVector(v,n,n),T=Math.min(T,n.x),p=Math.min(p,n.y),d=Math.max(d,n.x),x=Math.max(x,n.y);let k=L.fromRotation(m,nt),i=$;i[0].x=T,i[0].y=p,i[1].x=T,i[1].y=x,i[2].x=d,i[2].y=p;let P=b[0],z=b[2].x-P.x,X=b[1].y-P.y;for(e=0;e<3;e++){let E=i[e];L.multiplyByVector(k,E,E),E.x=(E.x-P.x)/z,E.y=(E.y-P.y)/X}let q=i[0],J=i[1],Q=i[2],S=new Array(6);return a.pack(q,S),a.pack(J,S,2),a.pack(Q,S,4),S};var Lt=_;function ot(t){if(t=s(t,s.EMPTY_OBJECT),!I(t.componentDatatype))throw new N("options.componentDatatype is required.");if(!I(t.componentsPerAttribute))throw new N("options.componentsPerAttribute is required.");if(t.componentsPerAttribute<1||t.componentsPerAttribute>4)throw new N("options.componentsPerAttribute must be between 1 and 4.");if(!I(t.values))throw new N("options.values is required.");this.componentDatatype=t.componentDatatype,this.componentsPerAttribute=t.componentsPerAttribute,this.normalize=s(t.normalize,!1),this.values=t.values}var Ot=ot;export{M as a,F as b,Lt as c,Ot as d};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.116
|
|
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 w}from"./chunk-74N6MC2V.js";import{a as u}from"./chunk-NPBZI5YA.js";import{a as M,b as c}from"./chunk-7X2YQ6I4.js";import{e as a}from"./chunk-R2AN7EKC.js";function f(n,o,e){this.x=u(n,0),this.y=u(o,0),this.z=u(e,0)}f.fromSpherical=function(n,o){c.typeOf.object("spherical",n),a(o)||(o=new f);let e=n.clock,t=n.cone,i=u(n.magnitude,1),p=i*Math.sin(t);return o.x=p*Math.cos(e),o.y=p*Math.sin(e),o.z=i*Math.cos(t),o};f.fromElements=function(n,o,e,t){return a(t)?(t.x=n,t.y=o,t.z=e,t):new f(n,o,e)};f.clone=function(n,o){if(a(n))return a(o)?(o.x=n.x,o.y=n.y,o.z=n.z,o):new f(n.x,n.y,n.z)};f.fromCartesian4=f.clone;f.packedLength=3;f.pack=function(n,o,e){return c.typeOf.object("value",n),c.defined("array",o),e=u(e,0),o[e++]=n.x,o[e++]=n.y,o[e]=n.z,o};f.unpack=function(n,o,e){return c.defined("array",n),o=u(o,0),a(e)||(e=new f),e.x=n[o++],e.y=n[o++],e.z=n[o],e};f.packArray=function(n,o){c.defined("array",n);let e=n.length,t=e*3;if(!a(o))o=new Array(t);else{if(!Array.isArray(o)&&o.length!==t)throw new M("If result is a typed array, it must have exactly array.length * 3 elements");o.length!==t&&(o.length=t)}for(let i=0;i<e;++i)f.pack(n[i],o,i*3);return o};f.unpackArray=function(n,o){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,3),n.length%3!==0)throw new M("array length must be a multiple of 3.");let e=n.length;a(o)?o.length=e/3:o=new Array(e/3);for(let t=0;t<e;t+=3){let i=t/3;o[i]=f.unpack(n,t,o[i])}return o};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,o,e){return c.typeOf.object("first",n),c.typeOf.object("second",o),c.typeOf.object("result",e),e.x=Math.min(n.x,o.x),e.y=Math.min(n.y,o.y),e.z=Math.min(n.z,o.z),e};f.maximumByComponent=function(n,o,e){return c.typeOf.object("first",n),c.typeOf.object("second",o),c.typeOf.object("result",e),e.x=Math.max(n.x,o.x),e.y=Math.max(n.y,o.y),e.z=Math.max(n.z,o.z),e};f.clamp=function(n,o,e,t){c.typeOf.object("value",n),c.typeOf.object("min",o),c.typeOf.object("max",e),c.typeOf.object("result",t);let i=w.clamp(n.x,o.x,e.x),p=w.clamp(n.y,o.y,e.y),m=w.clamp(n.z,o.z,e.z);return t.x=i,t.y=p,t.z=m,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 P=new f;f.distance=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),f.subtract(n,o,P),f.magnitude(P)};f.distanceSquared=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),f.subtract(n,o,P),f.magnitudeSquared(P)};f.normalize=function(n,o){c.typeOf.object("cartesian",n),c.typeOf.object("result",o);let e=f.magnitude(n);if(o.x=n.x/e,o.y=n.y/e,o.z=n.z/e,isNaN(o.x)||isNaN(o.y)||isNaN(o.z))throw new M("normalized result is not a number");return o};f.dot=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),n.x*o.x+n.y*o.y+n.z*o.z};f.multiplyComponents=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x*o.x,e.y=n.y*o.y,e.z=n.z*o.z,e};f.divideComponents=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x/o.x,e.y=n.y/o.y,e.z=n.z/o.z,e};f.add=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x+o.x,e.y=n.y+o.y,e.z=n.z+o.z,e};f.subtract=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x-o.x,e.y=n.y-o.y,e.z=n.z-o.z,e};f.multiplyByScalar=function(n,o,e){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",o),c.typeOf.object("result",e),e.x=n.x*o,e.y=n.y*o,e.z=n.z*o,e};f.divideByScalar=function(n,o,e){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",o),c.typeOf.object("result",e),e.x=n.x/o,e.y=n.y/o,e.z=n.z/o,e};f.negate=function(n,o){return c.typeOf.object("cartesian",n),c.typeOf.object("result",o),o.x=-n.x,o.y=-n.y,o.z=-n.z,o};f.abs=function(n,o){return c.typeOf.object("cartesian",n),c.typeOf.object("result",o),o.x=Math.abs(n.x),o.y=Math.abs(n.y),o.z=Math.abs(n.z),o};var tn=new f;f.lerp=function(n,o,e,t){return c.typeOf.object("start",n),c.typeOf.object("end",o),c.typeOf.number("t",e),c.typeOf.object("result",t),f.multiplyByScalar(o,e,tn),t=f.multiplyByScalar(n,1-e,t),f.add(tn,t,t)};var D=new f,F=new f;f.angleBetween=function(n,o){c.typeOf.object("left",n),c.typeOf.object("right",o),f.normalize(n,D),f.normalize(o,F);let e=f.dot(D,F),t=f.magnitude(f.cross(D,F,D));return Math.atan2(t,e)};var bn=new f;f.mostOrthogonalAxis=function(n,o){c.typeOf.object("cartesian",n),c.typeOf.object("result",o);let e=f.normalize(n,bn);return f.abs(e,e),e.x<=e.y?e.x<=e.z?o=f.clone(f.UNIT_X,o):o=f.clone(f.UNIT_Z,o):e.y<=e.z?o=f.clone(f.UNIT_Y,o):o=f.clone(f.UNIT_Z,o),o};f.projectVector=function(n,o,e){c.defined("a",n),c.defined("b",o),c.defined("result",e);let t=f.dot(n,o)/f.dot(o,o);return f.multiplyByScalar(o,t,e)};f.equals=function(n,o){return n===o||a(n)&&a(o)&&n.x===o.x&&n.y===o.y&&n.z===o.z};f.equalsArray=function(n,o,e){return n.x===o[e]&&n.y===o[e+1]&&n.z===o[e+2]};f.equalsEpsilon=function(n,o,e,t){return n===o||a(n)&&a(o)&&w.equalsEpsilon(n.x,o.x,e,t)&&w.equalsEpsilon(n.y,o.y,e,t)&&w.equalsEpsilon(n.z,o.z,e,t)};f.cross=function(n,o,e){c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e);let t=n.x,i=n.y,p=n.z,m=o.x,h=o.y,b=o.z,j=i*b-p*h,z=p*m-t*b,S=t*h-i*m;return e.x=j,e.y=z,e.z=S,e};f.midpoint=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=(n.x+o.x)*.5,e.y=(n.y+o.y)*.5,e.z=(n.z+o.z)*.5,e};f.fromDegrees=function(n,o,e,t,i){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",o),n=w.toRadians(n),o=w.toRadians(o),f.fromRadians(n,o,e,t,i)};var C=new f,U=new f,un=new f(6378137*6378137,6378137*6378137,6356752314245179e-9*6356752314245179e-9);f.fromRadians=function(n,o,e,t,i){c.typeOf.number("longitude",n),c.typeOf.number("latitude",o),e=u(e,0);let p=a(t)?t.radiiSquared:un,m=Math.cos(o);C.x=m*Math.cos(n),C.y=m*Math.sin(n),C.z=Math.sin(o),C=f.normalize(C,C),f.multiplyComponents(p,C,U);let h=Math.sqrt(f.dot(C,U));return U=f.divideByScalar(U,h,U),C=f.multiplyByScalar(C,e,C),a(i)||(i=new f),f.add(U,C,i)};f.fromDegreesArray=function(n,o,e){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new M("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;a(e)?e.length=t/2:e=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],m=n[i+1],h=i/2;e[h]=f.fromDegrees(p,m,0,o,e[h])}return e};f.fromRadiansArray=function(n,o,e){if(c.defined("coordinates",n),n.length<2||n.length%2!==0)throw new M("the number of coordinates must be a multiple of 2 and at least 2");let t=n.length;a(e)?e.length=t/2:e=new Array(t/2);for(let i=0;i<t;i+=2){let p=n[i],m=n[i+1],h=i/2;e[h]=f.fromRadians(p,m,0,o,e[h])}return e};f.fromDegreesArrayHeights=function(n,o,e){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new M("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;a(e)?e.length=t/3:e=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],m=n[i+1],h=n[i+2],b=i/3;e[b]=f.fromDegrees(p,m,h,o,e[b])}return e};f.fromRadiansArrayHeights=function(n,o,e){if(c.defined("coordinates",n),n.length<3||n.length%3!==0)throw new M("the number of coordinates must be a multiple of 3 and at least 3");let t=n.length;a(e)?e.length=t/3:e=new Array(t/3);for(let i=0;i<t;i+=3){let p=n[i],m=n[i+1],h=n[i+2],b=i/3;e[b]=f.fromRadians(p,m,h,o,e[b])}return e};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,o,e){return f.equalsEpsilon(this,n,o,e)};f.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};var O=f;var jn=new O,wn=new O;function rn(n,o,e,t,i){if(!a(n))throw new M("cartesian is required.");if(!a(o))throw new M("oneOverRadii is required.");if(!a(e))throw new M("oneOverRadiiSquared is required.");if(!a(t))throw new M("centerToleranceSquared is required.");let p=n.x,m=n.y,h=n.z,b=o.x,j=o.y,z=o.z,S=p*p*b*b,q=m*m*j*j,g=h*h*z*z,E=S+q+g,T=Math.sqrt(1/E),_=O.multiplyByScalar(n,T,jn);if(E<t)return isFinite(T)?O.clone(_,i):void 0;let s=e.x,A=e.y,k=e.z,N=wn;N.x=_.x*s*2,N.y=_.y*A*2,N.z=_.z*k*2;let Z=(1-T)*O.magnitude(n)/(.5*O.magnitude(N)),J=0,W,l,L,x,B,I,V,v,nn,on,en;do{Z-=J,L=1/(1+Z*s),x=1/(1+Z*A),B=1/(1+Z*k),I=L*L,V=x*x,v=B*B,nn=I*L,on=V*x,en=v*B,W=S*I+q*V+g*v-1,l=S*nn*s+q*on*A+g*en*k;let hn=-2*l;J=W/hn}while(Math.abs(W)>w.EPSILON12);return a(i)?(i.x=p*L,i.y=m*x,i.z=h*B,i):new O(p*L,m*x,h*B)}var X=rn;function R(n,o,e){this.longitude=u(n,0),this.latitude=u(o,0),this.height=u(e,0)}R.fromRadians=function(n,o,e,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",o),e=u(e,0),a(t)?(t.longitude=n,t.latitude=o,t.height=e,t):new R(n,o,e)};R.fromDegrees=function(n,o,e,t){return c.typeOf.number("longitude",n),c.typeOf.number("latitude",o),n=w.toRadians(n),o=w.toRadians(o),R.fromRadians(n,o,e,t)};var zn=new O,Sn=new O,Mn=new O,qn=new O(1/6378137,1/6378137,1/6356752314245179e-9),Rn=new O(1/(6378137*6378137),1/(6378137*6378137),1/(6356752314245179e-9*6356752314245179e-9)),gn=w.EPSILON1;R.fromCartesian=function(n,o,e){let t=a(o)?o.oneOverRadii:qn,i=a(o)?o.oneOverRadiiSquared:Rn,p=a(o)?o._centerToleranceSquared:gn,m=X(n,t,i,p,Sn);if(!a(m))return;let h=O.multiplyComponents(m,i,zn);h=O.normalize(h,h);let b=O.subtract(n,m,Mn),j=Math.atan2(h.y,h.x),z=Math.asin(h.z),S=w.sign(O.dot(b,n))*O.magnitude(b);return a(e)?(e.longitude=j,e.latitude=z,e.height=S,e):new R(j,z,S)};R.toCartesian=function(n,o,e){return c.defined("cartographic",n),O.fromRadians(n.longitude,n.latitude,n.height,o,e)};R.clone=function(n,o){if(a(n))return a(o)?(o.longitude=n.longitude,o.latitude=n.latitude,o.height=n.height,o):new R(n.longitude,n.latitude,n.height)};R.equals=function(n,o){return n===o||a(n)&&a(o)&&n.longitude===o.longitude&&n.latitude===o.latitude&&n.height===o.height};R.equalsEpsilon=function(n,o,e){return e=u(e,0),n===o||a(n)&&a(o)&&Math.abs(n.longitude-o.longitude)<=e&&Math.abs(n.latitude-o.latitude)<=e&&Math.abs(n.height-o.height)<=e};R.ZERO=Object.freeze(new R(0,0,0));R.prototype.clone=function(n){return R.clone(this,n)};R.prototype.equals=function(n){return R.equals(this,n)};R.prototype.equalsEpsilon=function(n,o){return R.equalsEpsilon(this,n,o)};R.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};var cn=R;function d(n,o){this.x=u(n,0),this.y=u(o,0)}d.fromElements=function(n,o,e){return a(e)?(e.x=n,e.y=o,e):new d(n,o)};d.clone=function(n,o){if(a(n))return a(o)?(o.x=n.x,o.y=n.y,o):new d(n.x,n.y)};d.fromCartesian3=d.clone;d.fromCartesian4=d.clone;d.packedLength=2;d.pack=function(n,o,e){return c.typeOf.object("value",n),c.defined("array",o),e=u(e,0),o[e++]=n.x,o[e]=n.y,o};d.unpack=function(n,o,e){return c.defined("array",n),o=u(o,0),a(e)||(e=new d),e.x=n[o++],e.y=n[o],e};d.packArray=function(n,o){c.defined("array",n);let e=n.length,t=e*2;if(!a(o))o=new Array(t);else{if(!Array.isArray(o)&&o.length!==t)throw new M("If result is a typed array, it must have exactly array.length * 2 elements");o.length!==t&&(o.length=t)}for(let i=0;i<e;++i)d.pack(n[i],o,i*2);return o};d.unpackArray=function(n,o){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,2),n.length%2!==0)throw new M("array length must be a multiple of 2.");let e=n.length;a(o)?o.length=e/2:o=new Array(e/2);for(let t=0;t<e;t+=2){let i=t/2;o[i]=d.unpack(n,t,o[i])}return o};d.fromArray=d.unpack;d.maximumComponent=function(n){return c.typeOf.object("cartesian",n),Math.max(n.x,n.y)};d.minimumComponent=function(n){return c.typeOf.object("cartesian",n),Math.min(n.x,n.y)};d.minimumByComponent=function(n,o,e){return c.typeOf.object("first",n),c.typeOf.object("second",o),c.typeOf.object("result",e),e.x=Math.min(n.x,o.x),e.y=Math.min(n.y,o.y),e};d.maximumByComponent=function(n,o,e){return c.typeOf.object("first",n),c.typeOf.object("second",o),c.typeOf.object("result",e),e.x=Math.max(n.x,o.x),e.y=Math.max(n.y,o.y),e};d.clamp=function(n,o,e,t){c.typeOf.object("value",n),c.typeOf.object("min",o),c.typeOf.object("max",e),c.typeOf.object("result",t);let i=w.clamp(n.x,o.x,e.x),p=w.clamp(n.y,o.y,e.y);return t.x=i,t.y=p,t};d.magnitudeSquared=function(n){return c.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y};d.magnitude=function(n){return Math.sqrt(d.magnitudeSquared(n))};var Y=new d;d.distance=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),d.subtract(n,o,Y),d.magnitude(Y)};d.distanceSquared=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),d.subtract(n,o,Y),d.magnitudeSquared(Y)};d.normalize=function(n,o){c.typeOf.object("cartesian",n),c.typeOf.object("result",o);let e=d.magnitude(n);if(o.x=n.x/e,o.y=n.y/e,isNaN(o.x)||isNaN(o.y))throw new M("normalized result is not a number");return o};d.dot=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),n.x*o.x+n.y*o.y};d.cross=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),n.x*o.y-n.y*o.x};d.multiplyComponents=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x*o.x,e.y=n.y*o.y,e};d.divideComponents=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x/o.x,e.y=n.y/o.y,e};d.add=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x+o.x,e.y=n.y+o.y,e};d.subtract=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e.x=n.x-o.x,e.y=n.y-o.y,e};d.multiplyByScalar=function(n,o,e){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",o),c.typeOf.object("result",e),e.x=n.x*o,e.y=n.y*o,e};d.divideByScalar=function(n,o,e){return c.typeOf.object("cartesian",n),c.typeOf.number("scalar",o),c.typeOf.object("result",e),e.x=n.x/o,e.y=n.y/o,e};d.negate=function(n,o){return c.typeOf.object("cartesian",n),c.typeOf.object("result",o),o.x=-n.x,o.y=-n.y,o};d.abs=function(n,o){return c.typeOf.object("cartesian",n),c.typeOf.object("result",o),o.x=Math.abs(n.x),o.y=Math.abs(n.y),o};var fn=new d;d.lerp=function(n,o,e,t){return c.typeOf.object("start",n),c.typeOf.object("end",o),c.typeOf.number("t",e),c.typeOf.object("result",t),d.multiplyByScalar(o,e,fn),t=d.multiplyByScalar(n,1-e,t),d.add(fn,t,t)};var yn=new d,pn=new d;d.angleBetween=function(n,o){return c.typeOf.object("left",n),c.typeOf.object("right",o),d.normalize(n,yn),d.normalize(o,pn),w.acosClamped(d.dot(yn,pn))};var Tn=new d;d.mostOrthogonalAxis=function(n,o){c.typeOf.object("cartesian",n),c.typeOf.object("result",o);let e=d.normalize(n,Tn);return d.abs(e,e),e.x<=e.y?o=d.clone(d.UNIT_X,o):o=d.clone(d.UNIT_Y,o),o};d.equals=function(n,o){return n===o||a(n)&&a(o)&&n.x===o.x&&n.y===o.y};d.equalsArray=function(n,o,e){return n.x===o[e]&&n.y===o[e+1]};d.equalsEpsilon=function(n,o,e,t){return n===o||a(n)&&a(o)&&w.equalsEpsilon(n.x,o.x,e,t)&&w.equalsEpsilon(n.y,o.y,e,t)};d.ZERO=Object.freeze(new d(0,0));d.ONE=Object.freeze(new d(1,1));d.UNIT_X=Object.freeze(new d(1,0));d.UNIT_Y=Object.freeze(new d(0,1));d.prototype.clone=function(n){return d.clone(this,n)};d.prototype.equals=function(n){return d.equals(this,n)};d.prototype.equalsEpsilon=function(n,o,e){return d.equalsEpsilon(this,n,o,e)};d.prototype.toString=function(){return`(${this.x}, ${this.y})`};var G=d;function dn(n,o,e,t){o=u(o,0),e=u(e,0),t=u(t,0),c.typeOf.number.greaterThanOrEquals("x",o,0),c.typeOf.number.greaterThanOrEquals("y",e,0),c.typeOf.number.greaterThanOrEquals("z",t,0),n._radii=new O(o,e,t),n._radiiSquared=new O(o*o,e*e,t*t),n._radiiToTheFourth=new O(o*o*o*o,e*e*e*e,t*t*t*t),n._oneOverRadii=new O(o===0?0:1/o,e===0?0:1/e,t===0?0:1/t),n._oneOverRadiiSquared=new O(o===0?0:1/(o*o),e===0?0:1/(e*e),t===0?0:1/(t*t)),n._minimumRadius=Math.min(o,e,t),n._maximumRadius=Math.max(o,e,t),n._centerToleranceSquared=w.EPSILON1,n._radiiSquared.z!==0&&(n._squaredXOverSquaredZ=n._radiiSquared.x/n._radiiSquared.z)}function r(n,o,e){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,dn(this,n,o,e)}Object.defineProperties(r.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}}});r.clone=function(n,o){if(!a(n))return;let e=n._radii;return a(o)?(O.clone(e,o._radii),O.clone(n._radiiSquared,o._radiiSquared),O.clone(n._radiiToTheFourth,o._radiiToTheFourth),O.clone(n._oneOverRadii,o._oneOverRadii),O.clone(n._oneOverRadiiSquared,o._oneOverRadiiSquared),o._minimumRadius=n._minimumRadius,o._maximumRadius=n._maximumRadius,o._centerToleranceSquared=n._centerToleranceSquared,o):new r(e.x,e.y,e.z)};r.fromCartesian3=function(n,o){return a(o)||(o=new r),a(n)&&dn(o,n.x,n.y,n.z),o};r.WGS84=Object.freeze(new r(6378137,6378137,6356752314245179e-9));r.UNIT_SPHERE=Object.freeze(new r(1,1,1));r.MOON=Object.freeze(new r(w.LUNAR_RADIUS,w.LUNAR_RADIUS,w.LUNAR_RADIUS));r.prototype.clone=function(n){return r.clone(this,n)};r.packedLength=O.packedLength;r.pack=function(n,o,e){return c.typeOf.object("value",n),c.defined("array",o),e=u(e,0),O.pack(n._radii,o,e),o};r.unpack=function(n,o,e){c.defined("array",n),o=u(o,0);let t=O.unpack(n,o);return r.fromCartesian3(t,e)};r.prototype.geocentricSurfaceNormal=O.normalize;r.prototype.geodeticSurfaceNormalCartographic=function(n,o){c.typeOf.object("cartographic",n);let e=n.longitude,t=n.latitude,i=Math.cos(t),p=i*Math.cos(e),m=i*Math.sin(e),h=Math.sin(t);return a(o)||(o=new O),o.x=p,o.y=m,o.z=h,O.normalize(o,o)};r.prototype.geodeticSurfaceNormal=function(n,o){if(c.typeOf.object("cartesian",n),isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new M("cartesian has a NaN component");if(!O.equalsEpsilon(n,O.ZERO,w.EPSILON14))return a(o)||(o=new O),o=O.multiplyComponents(n,this._oneOverRadiiSquared,o),O.normalize(o,o)};var Cn=new O,En=new O;r.prototype.cartographicToCartesian=function(n,o){let e=Cn,t=En;this.geodeticSurfaceNormalCartographic(n,e),O.multiplyComponents(this._radiiSquared,e,t);let i=Math.sqrt(O.dot(e,t));return O.divideByScalar(t,i,t),O.multiplyByScalar(e,n.height,e),a(o)||(o=new O),O.add(t,e,o)};r.prototype.cartographicArrayToCartesianArray=function(n,o){c.defined("cartographics",n);let e=n.length;a(o)?o.length=e:o=new Array(e);for(let t=0;t<e;t++)o[t]=this.cartographicToCartesian(n[t],o[t]);return o};var _n=new O,Nn=new O,sn=new O;r.prototype.cartesianToCartographic=function(n,o){let e=this.scaleToGeodeticSurface(n,Nn);if(!a(e))return;let t=this.geodeticSurfaceNormal(e,_n),i=O.subtract(n,e,sn),p=Math.atan2(t.y,t.x),m=Math.asin(t.z),h=w.sign(O.dot(i,n))*O.magnitude(i);return a(o)?(o.longitude=p,o.latitude=m,o.height=h,o):new cn(p,m,h)};r.prototype.cartesianArrayToCartographicArray=function(n,o){c.defined("cartesians",n);let e=n.length;a(o)?o.length=e:o=new Array(e);for(let t=0;t<e;++t)o[t]=this.cartesianToCartographic(n[t],o[t]);return o};r.prototype.scaleToGeodeticSurface=function(n,o){return X(n,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,o)};r.prototype.scaleToGeocentricSurface=function(n,o){c.typeOf.object("cartesian",n),a(o)||(o=new O);let e=n.x,t=n.y,i=n.z,p=this._oneOverRadiiSquared,m=1/Math.sqrt(e*e*p.x+t*t*p.y+i*i*p.z);return O.multiplyByScalar(n,m,o)};r.prototype.transformPositionToScaledSpace=function(n,o){return a(o)||(o=new O),O.multiplyComponents(n,this._oneOverRadii,o)};r.prototype.transformPositionFromScaledSpace=function(n,o){return a(o)||(o=new O),O.multiplyComponents(n,this._radii,o)};r.prototype.equals=function(n){return this===n||a(n)&&O.equals(this._radii,n._radii)};r.prototype.toString=function(){return this._radii.toString()};r.prototype.getSurfaceNormalIntersectionWithZAxis=function(n,o,e){if(c.typeOf.object("position",n),!w.equalsEpsilon(this._radii.x,this._radii.y,w.EPSILON15))throw new M("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");c.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),o=u(o,0);let t=this._squaredXOverSquaredZ;if(a(e)||(e=new O),e.x=0,e.y=0,e.z=n.z*(1-t),!(Math.abs(e.z)>=this._radii.z-o))return e};var An=new O;r.prototype.getLocalCurvature=function(n,o){c.typeOf.object("surfacePosition",n),a(o)||(o=new G);let e=this.getSurfaceNormalIntersectionWithZAxis(n,0,An),t=O.distance(n,e),i=this.minimumRadius*t/this.maximumRadius**2,p=t*i**2;return G.fromElements(1/t,1/p,o)};var kn=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],Ln=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function an(n,o,e){c.typeOf.number("a",n),c.typeOf.number("b",o),c.typeOf.func("func",e);let t=.5*(o+n),i=.5*(o-n),p=0;for(let m=0;m<5;m++){let h=i*kn[m];p+=Ln[m]*(e(t+h)+e(t-h))}return p*=i,p}r.prototype.surfaceArea=function(n){c.typeOf.object("rectangle",n);let o=n.west,e=n.east,t=n.south,i=n.north;for(;e<o;)e+=w.TWO_PI;let p=this._radiiSquared,m=p.x,h=p.y,b=p.z,j=m*h;return an(t,i,function(z){let S=Math.cos(z),q=Math.sin(z);return Math.cos(z)*an(o,e,function(g){let E=Math.cos(g),T=Math.sin(g);return Math.sqrt(j*q*q+b*(h*E*E+m*T*T)*S*S)})})};var qo=r;function y(n,o,e,t,i,p,m,h,b){this[0]=u(n,0),this[1]=u(t,0),this[2]=u(m,0),this[3]=u(o,0),this[4]=u(i,0),this[5]=u(h,0),this[6]=u(e,0),this[7]=u(p,0),this[8]=u(b,0)}y.packedLength=9;y.pack=function(n,o,e){return c.typeOf.object("value",n),c.defined("array",o),e=u(e,0),o[e++]=n[0],o[e++]=n[1],o[e++]=n[2],o[e++]=n[3],o[e++]=n[4],o[e++]=n[5],o[e++]=n[6],o[e++]=n[7],o[e++]=n[8],o};y.unpack=function(n,o,e){return c.defined("array",n),o=u(o,0),a(e)||(e=new y),e[0]=n[o++],e[1]=n[o++],e[2]=n[o++],e[3]=n[o++],e[4]=n[o++],e[5]=n[o++],e[6]=n[o++],e[7]=n[o++],e[8]=n[o++],e};y.packArray=function(n,o){c.defined("array",n);let e=n.length,t=e*9;if(!a(o))o=new Array(t);else{if(!Array.isArray(o)&&o.length!==t)throw new M("If result is a typed array, it must have exactly array.length * 9 elements");o.length!==t&&(o.length=t)}for(let i=0;i<e;++i)y.pack(n[i],o,i*9);return o};y.unpackArray=function(n,o){if(c.defined("array",n),c.typeOf.number.greaterThanOrEquals("array.length",n.length,9),n.length%9!==0)throw new M("array length must be a multiple of 9.");let e=n.length;a(o)?o.length=e/9:o=new Array(e/9);for(let t=0;t<e;t+=9){let i=t/9;o[i]=y.unpack(n,t,o[i])}return o};y.clone=function(n,o){if(a(n))return a(o)?(o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o[4]=n[4],o[5]=n[5],o[6]=n[6],o[7]=n[7],o[8]=n[8],o):new y(n[0],n[3],n[6],n[1],n[4],n[7],n[2],n[5],n[8])};y.fromArray=y.unpack;y.fromColumnMajorArray=function(n,o){return c.defined("values",n),y.clone(n,o)};y.fromRowMajorArray=function(n,o){return c.defined("values",n),a(o)?(o[0]=n[0],o[1]=n[3],o[2]=n[6],o[3]=n[1],o[4]=n[4],o[5]=n[7],o[6]=n[2],o[7]=n[5],o[8]=n[8],o):new y(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])};y.fromQuaternion=function(n,o){c.typeOf.object("quaternion",n);let e=n.x*n.x,t=n.x*n.y,i=n.x*n.z,p=n.x*n.w,m=n.y*n.y,h=n.y*n.z,b=n.y*n.w,j=n.z*n.z,z=n.z*n.w,S=n.w*n.w,q=e-m-j+S,g=2*(t-z),E=2*(i+b),T=2*(t+z),_=-e+m-j+S,s=2*(h-p),A=2*(i-b),k=2*(h+p),N=-e-m+j+S;return a(o)?(o[0]=q,o[1]=T,o[2]=A,o[3]=g,o[4]=_,o[5]=k,o[6]=E,o[7]=s,o[8]=N,o):new y(q,g,E,T,_,s,A,k,N)};y.fromHeadingPitchRoll=function(n,o){c.typeOf.object("headingPitchRoll",n);let e=Math.cos(-n.pitch),t=Math.cos(-n.heading),i=Math.cos(n.roll),p=Math.sin(-n.pitch),m=Math.sin(-n.heading),h=Math.sin(n.roll),b=e*t,j=-i*m+h*p*t,z=h*m+i*p*t,S=e*m,q=i*t+h*p*m,g=-h*t+i*p*m,E=-p,T=h*e,_=i*e;return a(o)?(o[0]=b,o[1]=S,o[2]=E,o[3]=j,o[4]=q,o[5]=T,o[6]=z,o[7]=g,o[8]=_,o):new y(b,j,z,S,q,g,E,T,_)};y.fromScale=function(n,o){return c.typeOf.object("scale",n),a(o)?(o[0]=n.x,o[1]=0,o[2]=0,o[3]=0,o[4]=n.y,o[5]=0,o[6]=0,o[7]=0,o[8]=n.z,o):new y(n.x,0,0,0,n.y,0,0,0,n.z)};y.fromUniformScale=function(n,o){return c.typeOf.number("scale",n),a(o)?(o[0]=n,o[1]=0,o[2]=0,o[3]=0,o[4]=n,o[5]=0,o[6]=0,o[7]=0,o[8]=n,o):new y(n,0,0,0,n,0,0,0,n)};y.fromCrossProduct=function(n,o){return c.typeOf.object("vector",n),a(o)?(o[0]=0,o[1]=n.z,o[2]=-n.y,o[3]=-n.z,o[4]=0,o[5]=n.x,o[6]=n.y,o[7]=-n.x,o[8]=0,o):new y(0,-n.z,n.y,n.z,0,-n.x,-n.y,n.x,0)};y.fromRotationX=function(n,o){c.typeOf.number("angle",n);let e=Math.cos(n),t=Math.sin(n);return a(o)?(o[0]=1,o[1]=0,o[2]=0,o[3]=0,o[4]=e,o[5]=t,o[6]=0,o[7]=-t,o[8]=e,o):new y(1,0,0,0,e,-t,0,t,e)};y.fromRotationY=function(n,o){c.typeOf.number("angle",n);let e=Math.cos(n),t=Math.sin(n);return a(o)?(o[0]=e,o[1]=0,o[2]=-t,o[3]=0,o[4]=1,o[5]=0,o[6]=t,o[7]=0,o[8]=e,o):new y(e,0,t,0,1,0,-t,0,e)};y.fromRotationZ=function(n,o){c.typeOf.number("angle",n);let e=Math.cos(n),t=Math.sin(n);return a(o)?(o[0]=e,o[1]=t,o[2]=0,o[3]=-t,o[4]=e,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o):new y(e,-t,0,t,e,0,0,0,1)};y.toArray=function(n,o){return c.typeOf.object("matrix",n),a(o)?(o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o[4]=n[4],o[5]=n[5],o[6]=n[6],o[7]=n[7],o[8]=n[8],o):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8]]};y.getElementIndex=function(n,o){return c.typeOf.number.greaterThanOrEquals("row",o,0),c.typeOf.number.lessThanOrEquals("row",o,2),c.typeOf.number.greaterThanOrEquals("column",n,0),c.typeOf.number.lessThanOrEquals("column",n,2),n*3+o};y.getColumn=function(n,o,e){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",o,0),c.typeOf.number.lessThanOrEquals("index",o,2),c.typeOf.object("result",e);let t=o*3,i=n[t],p=n[t+1],m=n[t+2];return e.x=i,e.y=p,e.z=m,e};y.setColumn=function(n,o,e,t){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",o,0),c.typeOf.number.lessThanOrEquals("index",o,2),c.typeOf.object("cartesian",e),c.typeOf.object("result",t),t=y.clone(n,t);let i=o*3;return t[i]=e.x,t[i+1]=e.y,t[i+2]=e.z,t};y.getRow=function(n,o,e){c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",o,0),c.typeOf.number.lessThanOrEquals("index",o,2),c.typeOf.object("result",e);let t=n[o],i=n[o+3],p=n[o+6];return e.x=t,e.y=i,e.z=p,e};y.setRow=function(n,o,e,t){return c.typeOf.object("matrix",n),c.typeOf.number.greaterThanOrEquals("index",o,0),c.typeOf.number.lessThanOrEquals("index",o,2),c.typeOf.object("cartesian",e),c.typeOf.object("result",t),t=y.clone(n,t),t[o]=e.x,t[o+3]=e.y,t[o+6]=e.z,t};var xn=new O;y.setScale=function(n,o,e){c.typeOf.object("matrix",n),c.typeOf.object("scale",o),c.typeOf.object("result",e);let t=y.getScale(n,xn),i=o.x/t.x,p=o.y/t.y,m=o.z/t.z;return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=n[3]*p,e[4]=n[4]*p,e[5]=n[5]*p,e[6]=n[6]*m,e[7]=n[7]*m,e[8]=n[8]*m,e};var Bn=new O;y.setUniformScale=function(n,o,e){c.typeOf.object("matrix",n),c.typeOf.number("scale",o),c.typeOf.object("result",e);let t=y.getScale(n,Bn),i=o/t.x,p=o/t.y,m=o/t.z;return e[0]=n[0]*i,e[1]=n[1]*i,e[2]=n[2]*i,e[3]=n[3]*p,e[4]=n[4]*p,e[5]=n[5]*p,e[6]=n[6]*m,e[7]=n[7]*m,e[8]=n[8]*m,e};var H=new O;y.getScale=function(n,o){return c.typeOf.object("matrix",n),c.typeOf.object("result",o),o.x=O.magnitude(O.fromElements(n[0],n[1],n[2],H)),o.y=O.magnitude(O.fromElements(n[3],n[4],n[5],H)),o.z=O.magnitude(O.fromElements(n[6],n[7],n[8],H)),o};var mn=new O;y.getMaximumScale=function(n){return y.getScale(n,mn),O.maximumComponent(mn)};var Un=new O;y.setRotation=function(n,o,e){c.typeOf.object("matrix",n),c.typeOf.object("result",e);let t=y.getScale(n,Un);return e[0]=o[0]*t.x,e[1]=o[1]*t.x,e[2]=o[2]*t.x,e[3]=o[3]*t.y,e[4]=o[4]*t.y,e[5]=o[5]*t.y,e[6]=o[6]*t.z,e[7]=o[7]*t.z,e[8]=o[8]*t.z,e};var Zn=new O;y.getRotation=function(n,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let e=y.getScale(n,Zn);return 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};y.multiply=function(n,o,e){c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e);let t=n[0]*o[0]+n[3]*o[1]+n[6]*o[2],i=n[1]*o[0]+n[4]*o[1]+n[7]*o[2],p=n[2]*o[0]+n[5]*o[1]+n[8]*o[2],m=n[0]*o[3]+n[3]*o[4]+n[6]*o[5],h=n[1]*o[3]+n[4]*o[4]+n[7]*o[5],b=n[2]*o[3]+n[5]*o[4]+n[8]*o[5],j=n[0]*o[6]+n[3]*o[7]+n[6]*o[8],z=n[1]*o[6]+n[4]*o[7]+n[7]*o[8],S=n[2]*o[6]+n[5]*o[7]+n[8]*o[8];return e[0]=t,e[1]=i,e[2]=p,e[3]=m,e[4]=h,e[5]=b,e[6]=j,e[7]=z,e[8]=S,e};y.add=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e[0]=n[0]+o[0],e[1]=n[1]+o[1],e[2]=n[2]+o[2],e[3]=n[3]+o[3],e[4]=n[4]+o[4],e[5]=n[5]+o[5],e[6]=n[6]+o[6],e[7]=n[7]+o[7],e[8]=n[8]+o[8],e};y.subtract=function(n,o,e){return c.typeOf.object("left",n),c.typeOf.object("right",o),c.typeOf.object("result",e),e[0]=n[0]-o[0],e[1]=n[1]-o[1],e[2]=n[2]-o[2],e[3]=n[3]-o[3],e[4]=n[4]-o[4],e[5]=n[5]-o[5],e[6]=n[6]-o[6],e[7]=n[7]-o[7],e[8]=n[8]-o[8],e};y.multiplyByVector=function(n,o,e){c.typeOf.object("matrix",n),c.typeOf.object("cartesian",o),c.typeOf.object("result",e);let t=o.x,i=o.y,p=o.z,m=n[0]*t+n[3]*i+n[6]*p,h=n[1]*t+n[4]*i+n[7]*p,b=n[2]*t+n[5]*i+n[8]*p;return e.x=m,e.y=h,e.z=b,e};y.multiplyByScalar=function(n,o,e){return c.typeOf.object("matrix",n),c.typeOf.number("scalar",o),c.typeOf.object("result",e),e[0]=n[0]*o,e[1]=n[1]*o,e[2]=n[2]*o,e[3]=n[3]*o,e[4]=n[4]*o,e[5]=n[5]*o,e[6]=n[6]*o,e[7]=n[7]*o,e[8]=n[8]*o,e};y.multiplyByScale=function(n,o,e){return c.typeOf.object("matrix",n),c.typeOf.object("scale",o),c.typeOf.object("result",e),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};y.multiplyByUniformScale=function(n,o,e){return c.typeOf.object("matrix",n),c.typeOf.number("scale",o),c.typeOf.object("result",e),e[0]=n[0]*o,e[1]=n[1]*o,e[2]=n[2]*o,e[3]=n[3]*o,e[4]=n[4]*o,e[5]=n[5]*o,e[6]=n[6]*o,e[7]=n[7]*o,e[8]=n[8]*o,e};y.negate=function(n,o){return c.typeOf.object("matrix",n),c.typeOf.object("result",o),o[0]=-n[0],o[1]=-n[1],o[2]=-n[2],o[3]=-n[3],o[4]=-n[4],o[5]=-n[5],o[6]=-n[6],o[7]=-n[7],o[8]=-n[8],o};y.transpose=function(n,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let e=n[0],t=n[3],i=n[6],p=n[1],m=n[4],h=n[7],b=n[2],j=n[5],z=n[8];return o[0]=e,o[1]=t,o[2]=i,o[3]=p,o[4]=m,o[5]=h,o[6]=b,o[7]=j,o[8]=z,o};function Dn(n){let o=0;for(let e=0;e<9;++e){let t=n[e];o+=t*t}return Math.sqrt(o)}var K=[1,0,0],Q=[2,2,1];function Pn(n){let o=0;for(let e=0;e<3;++e){let t=n[y.getElementIndex(Q[e],K[e])];o+=2*t*t}return Math.sqrt(o)}function Xn(n,o){let e=w.EPSILON15,t=0,i=1;for(let j=0;j<3;++j){let z=Math.abs(n[y.getElementIndex(Q[j],K[j])]);z>t&&(i=j,t=z)}let p=1,m=0,h=K[i],b=Q[i];if(Math.abs(n[y.getElementIndex(b,h)])>e){let j=n[y.getElementIndex(b,b)],z=n[y.getElementIndex(h,h)],S=n[y.getElementIndex(b,h)],q=(j-z)/2/S,g;q<0?g=-1/(-q+Math.sqrt(1+q*q)):g=1/(q+Math.sqrt(1+q*q)),p=1/Math.sqrt(1+g*g),m=g*p}return o=y.clone(y.IDENTITY,o),o[y.getElementIndex(h,h)]=o[y.getElementIndex(b,b)]=p,o[y.getElementIndex(b,h)]=m,o[y.getElementIndex(h,b)]=-m,o}var $=new y,On=new y;y.computeEigenDecomposition=function(n,o){c.typeOf.object("matrix",n);let e=w.EPSILON20,t=10,i=0,p=0;a(o)||(o={});let m=o.unitary=y.clone(y.IDENTITY,o.unitary),h=o.diagonal=y.clone(n,o.diagonal),b=e*Dn(h);for(;p<t&&Pn(h)>b;)Xn(h,$),y.transpose($,On),y.multiply(h,$,h),y.multiply(On,h,h),y.multiply(m,$,m),++i>2&&(++p,i=0);return o};y.abs=function(n,o){return c.typeOf.object("matrix",n),c.typeOf.object("result",o),o[0]=Math.abs(n[0]),o[1]=Math.abs(n[1]),o[2]=Math.abs(n[2]),o[3]=Math.abs(n[3]),o[4]=Math.abs(n[4]),o[5]=Math.abs(n[5]),o[6]=Math.abs(n[6]),o[7]=Math.abs(n[7]),o[8]=Math.abs(n[8]),o};y.determinant=function(n){c.typeOf.object("matrix",n);let o=n[0],e=n[3],t=n[6],i=n[1],p=n[4],m=n[7],h=n[2],b=n[5],j=n[8];return o*(p*j-b*m)+i*(b*t-e*j)+h*(e*m-p*t)};y.inverse=function(n,o){c.typeOf.object("matrix",n),c.typeOf.object("result",o);let e=n[0],t=n[1],i=n[2],p=n[3],m=n[4],h=n[5],b=n[6],j=n[7],z=n[8],S=y.determinant(n);if(Math.abs(S)<=w.EPSILON15)throw new M("matrix is not invertible");o[0]=m*z-j*h,o[1]=j*i-t*z,o[2]=t*h-m*i,o[3]=b*h-p*z,o[4]=e*z-b*i,o[5]=p*i-e*h,o[6]=p*j-b*m,o[7]=b*t-e*j,o[8]=e*m-p*t;let q=1/S;return y.multiplyByScalar(o,q,o)};var Yn=new y;y.inverseTranspose=function(n,o){return c.typeOf.object("matrix",n),c.typeOf.object("result",o),y.inverse(y.transpose(n,Yn),o)};y.equals=function(n,o){return n===o||a(n)&&a(o)&&n[0]===o[0]&&n[1]===o[1]&&n[2]===o[2]&&n[3]===o[3]&&n[4]===o[4]&&n[5]===o[5]&&n[6]===o[6]&&n[7]===o[7]&&n[8]===o[8]};y.equalsEpsilon=function(n,o,e){return e=u(e,0),n===o||a(n)&&a(o)&&Math.abs(n[0]-o[0])<=e&&Math.abs(n[1]-o[1])<=e&&Math.abs(n[2]-o[2])<=e&&Math.abs(n[3]-o[3])<=e&&Math.abs(n[4]-o[4])<=e&&Math.abs(n[5]-o[5])<=e&&Math.abs(n[6]-o[6])<=e&&Math.abs(n[7]-o[7])<=e&&Math.abs(n[8]-o[8])<=e};y.IDENTITY=Object.freeze(new y(1,0,0,0,1,0,0,0,1));y.ZERO=Object.freeze(new y(0,0,0,0,0,0,0,0,0));y.COLUMN0ROW0=0;y.COLUMN0ROW1=1;y.COLUMN0ROW2=2;y.COLUMN1ROW0=3;y.COLUMN1ROW1=4;y.COLUMN1ROW2=5;y.COLUMN2ROW0=6;y.COLUMN2ROW1=7;y.COLUMN2ROW2=8;Object.defineProperties(y.prototype,{length:{get:function(){return y.packedLength}}});y.prototype.clone=function(n){return y.clone(this,n)};y.prototype.equals=function(n){return y.equals(this,n)};y.equalsArray=function(n,o,e){return n[0]===o[e]&&n[1]===o[e+1]&&n[2]===o[e+2]&&n[3]===o[e+3]&&n[4]===o[e+4]&&n[5]===o[e+5]&&n[6]===o[e+6]&&n[7]===o[e+7]&&n[8]===o[e+8]};y.prototype.equalsEpsilon=function(n,o){return y.equalsEpsilon(this,n,o)};y.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
27
|
-
(${this[1]}, ${this[4]}, ${this[7]})
|
|
28
|
-
(${this[2]}, ${this[5]}, ${this[8]})`};var so=y;export{O as a,cn as b,G as c,qo as d,so as e};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.116
|
|
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 L,b as u,c as H,d as jn,e as on}from"./chunk-CUOR5F7T.js";import{a as d}from"./chunk-74N6MC2V.js";import{a as Rn}from"./chunk-VHNZBQTR.js";import{a as T}from"./chunk-NPBZI5YA.js";import{a as J,b as y}from"./chunk-7X2YQ6I4.js";import{e as z}from"./chunk-R2AN7EKC.js";function h(n,o,c,f){this.x=T(n,0),this.y=T(o,0),this.z=T(c,0),this.w=T(f,0)}h.fromElements=function(n,o,c,f,O){return z(O)?(O.x=n,O.y=o,O.z=c,O.w=f,O):new h(n,o,c,f)};h.fromColor=function(n,o){return y.typeOf.object("color",n),z(o)?(o.x=n.red,o.y=n.green,o.z=n.blue,o.w=n.alpha,o):new h(n.red,n.green,n.blue,n.alpha)};h.clone=function(n,o){if(z(n))return z(o)?(o.x=n.x,o.y=n.y,o.z=n.z,o.w=n.w,o):new h(n.x,n.y,n.z,n.w)};h.packedLength=4;h.pack=function(n,o,c){return y.typeOf.object("value",n),y.defined("array",o),c=T(c,0),o[c++]=n.x,o[c++]=n.y,o[c++]=n.z,o[c]=n.w,o};h.unpack=function(n,o,c){return y.defined("array",n),o=T(o,0),z(c)||(c=new h),c.x=n[o++],c.y=n[o++],c.z=n[o++],c.w=n[o],c};h.packArray=function(n,o){y.defined("array",n);let c=n.length,f=c*4;if(!z(o))o=new Array(f);else{if(!Array.isArray(o)&&o.length!==f)throw new J("If result is a typed array, it must have exactly array.length * 4 elements");o.length!==f&&(o.length=f)}for(let O=0;O<c;++O)h.pack(n[O],o,O*4);return o};h.unpackArray=function(n,o){if(y.defined("array",n),y.typeOf.number.greaterThanOrEquals("array.length",n.length,4),n.length%4!==0)throw new J("array length must be a multiple of 4.");let c=n.length;z(o)?o.length=c/4:o=new Array(c/4);for(let f=0;f<c;f+=4){let O=f/4;o[O]=h.unpack(n,f,o[O])}return o};h.fromArray=h.unpack;h.maximumComponent=function(n){return y.typeOf.object("cartesian",n),Math.max(n.x,n.y,n.z,n.w)};h.minimumComponent=function(n){return y.typeOf.object("cartesian",n),Math.min(n.x,n.y,n.z,n.w)};h.minimumByComponent=function(n,o,c){return y.typeOf.object("first",n),y.typeOf.object("second",o),y.typeOf.object("result",c),c.x=Math.min(n.x,o.x),c.y=Math.min(n.y,o.y),c.z=Math.min(n.z,o.z),c.w=Math.min(n.w,o.w),c};h.maximumByComponent=function(n,o,c){return y.typeOf.object("first",n),y.typeOf.object("second",o),y.typeOf.object("result",c),c.x=Math.max(n.x,o.x),c.y=Math.max(n.y,o.y),c.z=Math.max(n.z,o.z),c.w=Math.max(n.w,o.w),c};h.clamp=function(n,o,c,f){y.typeOf.object("value",n),y.typeOf.object("min",o),y.typeOf.object("max",c),y.typeOf.object("result",f);let O=d.clamp(n.x,o.x,c.x),p=d.clamp(n.y,o.y,c.y),b=d.clamp(n.z,o.z,c.z),e=d.clamp(n.w,o.w,c.w);return f.x=O,f.y=p,f.z=b,f.w=e,f};h.magnitudeSquared=function(n){return y.typeOf.object("cartesian",n),n.x*n.x+n.y*n.y+n.z*n.z+n.w*n.w};h.magnitude=function(n){return Math.sqrt(h.magnitudeSquared(n))};var fn=new h;h.distance=function(n,o){return y.typeOf.object("left",n),y.typeOf.object("right",o),h.subtract(n,o,fn),h.magnitude(fn)};h.distanceSquared=function(n,o){return y.typeOf.object("left",n),y.typeOf.object("right",o),h.subtract(n,o,fn),h.magnitudeSquared(fn)};h.normalize=function(n,o){y.typeOf.object("cartesian",n),y.typeOf.object("result",o);let c=h.magnitude(n);if(o.x=n.x/c,o.y=n.y/c,o.z=n.z/c,o.w=n.w/c,isNaN(o.x)||isNaN(o.y)||isNaN(o.z)||isNaN(o.w))throw new J("normalized result is not a number");return o};h.dot=function(n,o){return y.typeOf.object("left",n),y.typeOf.object("right",o),n.x*o.x+n.y*o.y+n.z*o.z+n.w*o.w};h.multiplyComponents=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x*o.x,c.y=n.y*o.y,c.z=n.z*o.z,c.w=n.w*o.w,c};h.divideComponents=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x/o.x,c.y=n.y/o.y,c.z=n.z/o.z,c.w=n.w/o.w,c};h.add=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x+o.x,c.y=n.y+o.y,c.z=n.z+o.z,c.w=n.w+o.w,c};h.subtract=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c.x=n.x-o.x,c.y=n.y-o.y,c.z=n.z-o.z,c.w=n.w-o.w,c};h.multiplyByScalar=function(n,o,c){return y.typeOf.object("cartesian",n),y.typeOf.number("scalar",o),y.typeOf.object("result",c),c.x=n.x*o,c.y=n.y*o,c.z=n.z*o,c.w=n.w*o,c};h.divideByScalar=function(n,o,c){return y.typeOf.object("cartesian",n),y.typeOf.number("scalar",o),y.typeOf.object("result",c),c.x=n.x/o,c.y=n.y/o,c.z=n.z/o,c.w=n.w/o,c};h.negate=function(n,o){return y.typeOf.object("cartesian",n),y.typeOf.object("result",o),o.x=-n.x,o.y=-n.y,o.z=-n.z,o.w=-n.w,o};h.abs=function(n,o){return y.typeOf.object("cartesian",n),y.typeOf.object("result",o),o.x=Math.abs(n.x),o.y=Math.abs(n.y),o.z=Math.abs(n.z),o.w=Math.abs(n.w),o};var Tn=new h;h.lerp=function(n,o,c,f){return y.typeOf.object("start",n),y.typeOf.object("end",o),y.typeOf.number("t",c),y.typeOf.object("result",f),h.multiplyByScalar(o,c,Tn),f=h.multiplyByScalar(n,1-c,f),h.add(Tn,f,f)};var Nn=new h;h.mostOrthogonalAxis=function(n,o){y.typeOf.object("cartesian",n),y.typeOf.object("result",o);let c=h.normalize(n,Nn);return h.abs(c,c),c.x<=c.y?c.x<=c.z?c.x<=c.w?o=h.clone(h.UNIT_X,o):o=h.clone(h.UNIT_W,o):c.z<=c.w?o=h.clone(h.UNIT_Z,o):o=h.clone(h.UNIT_W,o):c.y<=c.z?c.y<=c.w?o=h.clone(h.UNIT_Y,o):o=h.clone(h.UNIT_W,o):c.z<=c.w?o=h.clone(h.UNIT_Z,o):o=h.clone(h.UNIT_W,o),o};h.equals=function(n,o){return n===o||z(n)&&z(o)&&n.x===o.x&&n.y===o.y&&n.z===o.z&&n.w===o.w};h.equalsArray=function(n,o,c){return n.x===o[c]&&n.y===o[c+1]&&n.z===o[c+2]&&n.w===o[c+3]};h.equalsEpsilon=function(n,o,c,f){return n===o||z(n)&&z(o)&&d.equalsEpsilon(n.x,o.x,c,f)&&d.equalsEpsilon(n.y,o.y,c,f)&&d.equalsEpsilon(n.z,o.z,c,f)&&d.equalsEpsilon(n.w,o.w,c,f)};h.ZERO=Object.freeze(new h(0,0,0,0));h.ONE=Object.freeze(new h(1,1,1,1));h.UNIT_X=Object.freeze(new h(1,0,0,0));h.UNIT_Y=Object.freeze(new h(0,1,0,0));h.UNIT_Z=Object.freeze(new h(0,0,1,0));h.UNIT_W=Object.freeze(new h(0,0,0,1));h.prototype.clone=function(n){return h.clone(this,n)};h.prototype.equals=function(n){return h.equals(this,n)};h.prototype.equalsEpsilon=function(n,o,c){return h.equalsEpsilon(this,n,o,c)};h.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};var Mn=new Float32Array(1),Q=new Uint8Array(Mn.buffer),_n=new Uint32Array([287454020]),Un=new Uint8Array(_n.buffer),dn=Un[0]===68;h.packFloat=function(n,o){return y.typeOf.number("value",n),z(o)||(o=new h),Mn[0]=n,dn?(o.x=Q[0],o.y=Q[1],o.z=Q[2],o.w=Q[3]):(o.x=Q[3],o.y=Q[2],o.z=Q[1],o.w=Q[0]),o};h.unpackFloat=function(n){return y.typeOf.object("packedFloat",n),dn?(Q[0]=n.x,Q[1]=n.y,Q[2]=n.z,Q[3]=n.w):(Q[0]=n.w,Q[1]=n.z,Q[2]=n.y,Q[3]=n.x),Mn[0]};var yn=h;function w(n,o,c,f,O,p,b,e,j,t,R,E,A,C,S,P){this[0]=T(n,0),this[1]=T(O,0),this[2]=T(j,0),this[3]=T(A,0),this[4]=T(o,0),this[5]=T(p,0),this[6]=T(t,0),this[7]=T(C,0),this[8]=T(c,0),this[9]=T(b,0),this[10]=T(R,0),this[11]=T(S,0),this[12]=T(f,0),this[13]=T(e,0),this[14]=T(E,0),this[15]=T(P,0)}w.packedLength=16;w.pack=function(n,o,c){return y.typeOf.object("value",n),y.defined("array",o),c=T(c,0),o[c++]=n[0],o[c++]=n[1],o[c++]=n[2],o[c++]=n[3],o[c++]=n[4],o[c++]=n[5],o[c++]=n[6],o[c++]=n[7],o[c++]=n[8],o[c++]=n[9],o[c++]=n[10],o[c++]=n[11],o[c++]=n[12],o[c++]=n[13],o[c++]=n[14],o[c]=n[15],o};w.unpack=function(n,o,c){return y.defined("array",n),o=T(o,0),z(c)||(c=new w),c[0]=n[o++],c[1]=n[o++],c[2]=n[o++],c[3]=n[o++],c[4]=n[o++],c[5]=n[o++],c[6]=n[o++],c[7]=n[o++],c[8]=n[o++],c[9]=n[o++],c[10]=n[o++],c[11]=n[o++],c[12]=n[o++],c[13]=n[o++],c[14]=n[o++],c[15]=n[o],c};w.packArray=function(n,o){y.defined("array",n);let c=n.length,f=c*16;if(!z(o))o=new Array(f);else{if(!Array.isArray(o)&&o.length!==f)throw new J("If result is a typed array, it must have exactly array.length * 16 elements");o.length!==f&&(o.length=f)}for(let O=0;O<c;++O)w.pack(n[O],o,O*16);return o};w.unpackArray=function(n,o){if(y.defined("array",n),y.typeOf.number.greaterThanOrEquals("array.length",n.length,16),n.length%16!==0)throw new J("array length must be a multiple of 16.");let c=n.length;z(o)?o.length=c/16:o=new Array(c/16);for(let f=0;f<c;f+=16){let O=f/16;o[O]=w.unpack(n,f,o[O])}return o};w.clone=function(n,o){if(z(n))return z(o)?(o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o[4]=n[4],o[5]=n[5],o[6]=n[6],o[7]=n[7],o[8]=n[8],o[9]=n[9],o[10]=n[10],o[11]=n[11],o[12]=n[12],o[13]=n[13],o[14]=n[14],o[15]=n[15],o):new w(n[0],n[4],n[8],n[12],n[1],n[5],n[9],n[13],n[2],n[6],n[10],n[14],n[3],n[7],n[11],n[15])};w.fromArray=w.unpack;w.fromColumnMajorArray=function(n,o){return y.defined("values",n),w.clone(n,o)};w.fromRowMajorArray=function(n,o){return y.defined("values",n),z(o)?(o[0]=n[0],o[1]=n[4],o[2]=n[8],o[3]=n[12],o[4]=n[1],o[5]=n[5],o[6]=n[9],o[7]=n[13],o[8]=n[2],o[9]=n[6],o[10]=n[10],o[11]=n[14],o[12]=n[3],o[13]=n[7],o[14]=n[11],o[15]=n[15],o):new w(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])};w.fromRotationTranslation=function(n,o,c){return y.typeOf.object("rotation",n),o=T(o,L.ZERO),z(c)?(c[0]=n[0],c[1]=n[1],c[2]=n[2],c[3]=0,c[4]=n[3],c[5]=n[4],c[6]=n[5],c[7]=0,c[8]=n[6],c[9]=n[7],c[10]=n[8],c[11]=0,c[12]=o.x,c[13]=o.y,c[14]=o.z,c[15]=1,c):new w(n[0],n[3],n[6],o.x,n[1],n[4],n[7],o.y,n[2],n[5],n[8],o.z,0,0,0,1)};w.fromTranslationQuaternionRotationScale=function(n,o,c,f){y.typeOf.object("translation",n),y.typeOf.object("rotation",o),y.typeOf.object("scale",c),z(f)||(f=new w);let O=c.x,p=c.y,b=c.z,e=o.x*o.x,j=o.x*o.y,t=o.x*o.z,R=o.x*o.w,E=o.y*o.y,A=o.y*o.z,C=o.y*o.w,S=o.z*o.z,P=o.z*o.w,W=o.w*o.w,N=e-E-S+W,_=2*(j-P),U=2*(t+C),m=2*(j+P),V=-e+E-S+W,X=2*(A-R),k=2*(t-C),$=2*(A+R),B=-e-E+S+W;return f[0]=N*O,f[1]=m*O,f[2]=k*O,f[3]=0,f[4]=_*p,f[5]=V*p,f[6]=$*p,f[7]=0,f[8]=U*b,f[9]=X*b,f[10]=B*b,f[11]=0,f[12]=n.x,f[13]=n.y,f[14]=n.z,f[15]=1,f};w.fromTranslationRotationScale=function(n,o){return y.typeOf.object("translationRotationScale",n),w.fromTranslationQuaternionRotationScale(n.translation,n.rotation,n.scale,o)};w.fromTranslation=function(n,o){return y.typeOf.object("translation",n),w.fromRotationTranslation(on.IDENTITY,n,o)};w.fromScale=function(n,o){return y.typeOf.object("scale",n),z(o)?(o[0]=n.x,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=n.y,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=n.z,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o):new w(n.x,0,0,0,0,n.y,0,0,0,0,n.z,0,0,0,0,1)};w.fromUniformScale=function(n,o){return y.typeOf.number("scale",n),z(o)?(o[0]=n,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=n,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=n,o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o):new w(n,0,0,0,0,n,0,0,0,0,n,0,0,0,0,1)};w.fromRotation=function(n,o){return y.typeOf.object("rotation",n),z(o)||(o=new w),o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=0,o[4]=n[3],o[5]=n[4],o[6]=n[5],o[7]=0,o[8]=n[6],o[9]=n[7],o[10]=n[8],o[11]=0,o[12]=0,o[13]=0,o[14]=0,o[15]=1,o};var s=new L,x=new L,cn=new L;w.fromCamera=function(n,o){y.typeOf.object("camera",n);let c=n.position,f=n.direction,O=n.up;y.typeOf.object("camera.position",c),y.typeOf.object("camera.direction",f),y.typeOf.object("camera.up",O),L.normalize(f,s),L.normalize(L.cross(s,O,x),x),L.normalize(L.cross(x,s,cn),cn);let p=x.x,b=x.y,e=x.z,j=s.x,t=s.y,R=s.z,E=cn.x,A=cn.y,C=cn.z,S=c.x,P=c.y,W=c.z,N=p*-S+b*-P+e*-W,_=E*-S+A*-P+C*-W,U=j*S+t*P+R*W;return z(o)?(o[0]=p,o[1]=E,o[2]=-j,o[3]=0,o[4]=b,o[5]=A,o[6]=-t,o[7]=0,o[8]=e,o[9]=C,o[10]=-R,o[11]=0,o[12]=N,o[13]=_,o[14]=U,o[15]=1,o):new w(p,b,e,N,E,A,C,_,-j,-t,-R,U,0,0,0,1)};w.computePerspectiveFieldOfView=function(n,o,c,f,O){y.typeOf.number.greaterThan("fovY",n,0),y.typeOf.number.lessThan("fovY",n,Math.PI),y.typeOf.number.greaterThan("near",c,0),y.typeOf.number.greaterThan("far",f,0),y.typeOf.object("result",O);let b=1/Math.tan(n*.5),e=b/o,j=(f+c)/(c-f),t=2*f*c/(c-f);return O[0]=e,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=b,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=j,O[11]=-1,O[12]=0,O[13]=0,O[14]=t,O[15]=0,O};w.computeOrthographicOffCenter=function(n,o,c,f,O,p,b){y.typeOf.number("left",n),y.typeOf.number("right",o),y.typeOf.number("bottom",c),y.typeOf.number("top",f),y.typeOf.number("near",O),y.typeOf.number("far",p),y.typeOf.object("result",b);let e=1/(o-n),j=1/(f-c),t=1/(p-O),R=-(o+n)*e,E=-(f+c)*j,A=-(p+O)*t;return e*=2,j*=2,t*=-2,b[0]=e,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=j,b[6]=0,b[7]=0,b[8]=0,b[9]=0,b[10]=t,b[11]=0,b[12]=R,b[13]=E,b[14]=A,b[15]=1,b};w.computePerspectiveOffCenter=function(n,o,c,f,O,p,b){y.typeOf.number("left",n),y.typeOf.number("right",o),y.typeOf.number("bottom",c),y.typeOf.number("top",f),y.typeOf.number("near",O),y.typeOf.number("far",p),y.typeOf.object("result",b);let e=2*O/(o-n),j=2*O/(f-c),t=(o+n)/(o-n),R=(f+c)/(f-c),E=-(p+O)/(p-O),A=-1,C=-2*p*O/(p-O);return b[0]=e,b[1]=0,b[2]=0,b[3]=0,b[4]=0,b[5]=j,b[6]=0,b[7]=0,b[8]=t,b[9]=R,b[10]=E,b[11]=A,b[12]=0,b[13]=0,b[14]=C,b[15]=0,b};w.computeInfinitePerspectiveOffCenter=function(n,o,c,f,O,p){y.typeOf.number("left",n),y.typeOf.number("right",o),y.typeOf.number("bottom",c),y.typeOf.number("top",f),y.typeOf.number("near",O),y.typeOf.object("result",p);let b=2*O/(o-n),e=2*O/(f-c),j=(o+n)/(o-n),t=(f+c)/(f-c),R=-1,E=-1,A=-2*O;return p[0]=b,p[1]=0,p[2]=0,p[3]=0,p[4]=0,p[5]=e,p[6]=0,p[7]=0,p[8]=j,p[9]=t,p[10]=R,p[11]=E,p[12]=0,p[13]=0,p[14]=A,p[15]=0,p};w.computeViewportTransformation=function(n,o,c,f){z(f)||(f=new w),n=T(n,T.EMPTY_OBJECT);let O=T(n.x,0),p=T(n.y,0),b=T(n.width,0),e=T(n.height,0);o=T(o,0),c=T(c,1);let j=b*.5,t=e*.5,R=(c-o)*.5,E=j,A=t,C=R,S=O+j,P=p+t,W=o+R,N=1;return f[0]=E,f[1]=0,f[2]=0,f[3]=0,f[4]=0,f[5]=A,f[6]=0,f[7]=0,f[8]=0,f[9]=0,f[10]=C,f[11]=0,f[12]=S,f[13]=P,f[14]=W,f[15]=N,f};w.computeView=function(n,o,c,f,O){return y.typeOf.object("position",n),y.typeOf.object("direction",o),y.typeOf.object("up",c),y.typeOf.object("right",f),y.typeOf.object("result",O),O[0]=f.x,O[1]=c.x,O[2]=-o.x,O[3]=0,O[4]=f.y,O[5]=c.y,O[6]=-o.y,O[7]=0,O[8]=f.z,O[9]=c.z,O[10]=-o.z,O[11]=0,O[12]=-L.dot(f,n),O[13]=-L.dot(c,n),O[14]=L.dot(o,n),O[15]=1,O};w.toArray=function(n,o){return y.typeOf.object("matrix",n),z(o)?(o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o[4]=n[4],o[5]=n[5],o[6]=n[6],o[7]=n[7],o[8]=n[8],o[9]=n[9],o[10]=n[10],o[11]=n[11],o[12]=n[12],o[13]=n[13],o[14]=n[14],o[15]=n[15],o):[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]]};w.getElementIndex=function(n,o){return y.typeOf.number.greaterThanOrEquals("row",o,0),y.typeOf.number.lessThanOrEquals("row",o,3),y.typeOf.number.greaterThanOrEquals("column",n,0),y.typeOf.number.lessThanOrEquals("column",n,3),n*4+o};w.getColumn=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,3),y.typeOf.object("result",c);let f=o*4,O=n[f],p=n[f+1],b=n[f+2],e=n[f+3];return c.x=O,c.y=p,c.z=b,c.w=e,c};w.setColumn=function(n,o,c,f){y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,3),y.typeOf.object("cartesian",c),y.typeOf.object("result",f),f=w.clone(n,f);let O=o*4;return f[O]=c.x,f[O+1]=c.y,f[O+2]=c.z,f[O+3]=c.w,f};w.getRow=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,3),y.typeOf.object("result",c);let f=n[o],O=n[o+4],p=n[o+8],b=n[o+12];return c.x=f,c.y=O,c.z=p,c.w=b,c};w.setRow=function(n,o,c,f){return y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,3),y.typeOf.object("cartesian",c),y.typeOf.object("result",f),f=w.clone(n,f),f[o]=c.x,f[o+4]=c.y,f[o+8]=c.z,f[o+12]=c.w,f};w.setTranslation=function(n,o,c){return y.typeOf.object("matrix",n),y.typeOf.object("translation",o),y.typeOf.object("result",c),c[0]=n[0],c[1]=n[1],c[2]=n[2],c[3]=n[3],c[4]=n[4],c[5]=n[5],c[6]=n[6],c[7]=n[7],c[8]=n[8],c[9]=n[9],c[10]=n[10],c[11]=n[11],c[12]=o.x,c[13]=o.y,c[14]=o.z,c[15]=n[15],c};var Ln=new L;w.setScale=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("scale",o),y.typeOf.object("result",c);let f=w.getScale(n,Ln),O=o.x/f.x,p=o.y/f.y,b=o.z/f.z;return c[0]=n[0]*O,c[1]=n[1]*O,c[2]=n[2]*O,c[3]=n[3],c[4]=n[4]*p,c[5]=n[5]*p,c[6]=n[6]*p,c[7]=n[7],c[8]=n[8]*b,c[9]=n[9]*b,c[10]=n[10]*b,c[11]=n[11],c[12]=n[12],c[13]=n[13],c[14]=n[14],c[15]=n[15],c};var mn=new L;w.setUniformScale=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.number("scale",o),y.typeOf.object("result",c);let f=w.getScale(n,mn),O=o/f.x,p=o/f.y,b=o/f.z;return c[0]=n[0]*O,c[1]=n[1]*O,c[2]=n[2]*O,c[3]=n[3],c[4]=n[4]*p,c[5]=n[5]*p,c[6]=n[6]*p,c[7]=n[7],c[8]=n[8]*b,c[9]=n[9]*b,c[10]=n[10]*b,c[11]=n[11],c[12]=n[12],c[13]=n[13],c[14]=n[14],c[15]=n[15],c};var zn=new L;w.getScale=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o.x=L.magnitude(L.fromElements(n[0],n[1],n[2],zn)),o.y=L.magnitude(L.fromElements(n[4],n[5],n[6],zn)),o.z=L.magnitude(L.fromElements(n[8],n[9],n[10],zn)),o};var En=new L;w.getMaximumScale=function(n){return w.getScale(n,En),L.maximumComponent(En)};var Vn=new L;w.setRotation=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("result",c);let f=w.getScale(n,Vn);return c[0]=o[0]*f.x,c[1]=o[1]*f.x,c[2]=o[2]*f.x,c[3]=n[3],c[4]=o[3]*f.y,c[5]=o[4]*f.y,c[6]=o[5]*f.y,c[7]=n[7],c[8]=o[6]*f.z,c[9]=o[7]*f.z,c[10]=o[8]*f.z,c[11]=n[11],c[12]=n[12],c[13]=n[13],c[14]=n[14],c[15]=n[15],c};var Xn=new L;w.getRotation=function(n,o){y.typeOf.object("matrix",n),y.typeOf.object("result",o);let c=w.getScale(n,Xn);return o[0]=n[0]/c.x,o[1]=n[1]/c.x,o[2]=n[2]/c.x,o[3]=n[4]/c.y,o[4]=n[5]/c.y,o[5]=n[6]/c.y,o[6]=n[8]/c.z,o[7]=n[9]/c.z,o[8]=n[10]/c.z,o};w.multiply=function(n,o,c){y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c);let f=n[0],O=n[1],p=n[2],b=n[3],e=n[4],j=n[5],t=n[6],R=n[7],E=n[8],A=n[9],C=n[10],S=n[11],P=n[12],W=n[13],N=n[14],_=n[15],U=o[0],m=o[1],V=o[2],X=o[3],k=o[4],$=o[5],B=o[6],Z=o[7],I=o[8],D=o[9],G=o[10],K=o[11],F=o[12],v=o[13],i=o[14],g=o[15],a=f*U+e*m+E*V+P*X,l=O*U+j*m+A*V+W*X,r=p*U+t*m+C*V+N*X,nn=b*U+R*m+S*V+_*X,On=f*k+e*$+E*B+P*Z,pn=O*k+j*$+A*B+W*Z,bn=p*k+t*$+C*B+N*Z,wn=b*k+R*$+S*B+_*Z,hn=f*I+e*D+E*G+P*K,en=O*I+j*D+A*G+W*K,tn=p*I+t*D+C*G+N*K,Y=b*I+R*D+S*G+_*K,Cn=f*F+e*v+E*i+P*g,Pn=O*F+j*v+A*i+W*g,Sn=p*F+t*v+C*i+N*g,Wn=b*F+R*v+S*i+_*g;return c[0]=a,c[1]=l,c[2]=r,c[3]=nn,c[4]=On,c[5]=pn,c[6]=bn,c[7]=wn,c[8]=hn,c[9]=en,c[10]=tn,c[11]=Y,c[12]=Cn,c[13]=Pn,c[14]=Sn,c[15]=Wn,c};w.add=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c[0]=n[0]+o[0],c[1]=n[1]+o[1],c[2]=n[2]+o[2],c[3]=n[3]+o[3],c[4]=n[4]+o[4],c[5]=n[5]+o[5],c[6]=n[6]+o[6],c[7]=n[7]+o[7],c[8]=n[8]+o[8],c[9]=n[9]+o[9],c[10]=n[10]+o[10],c[11]=n[11]+o[11],c[12]=n[12]+o[12],c[13]=n[13]+o[13],c[14]=n[14]+o[14],c[15]=n[15]+o[15],c};w.subtract=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c[0]=n[0]-o[0],c[1]=n[1]-o[1],c[2]=n[2]-o[2],c[3]=n[3]-o[3],c[4]=n[4]-o[4],c[5]=n[5]-o[5],c[6]=n[6]-o[6],c[7]=n[7]-o[7],c[8]=n[8]-o[8],c[9]=n[9]-o[9],c[10]=n[10]-o[10],c[11]=n[11]-o[11],c[12]=n[12]-o[12],c[13]=n[13]-o[13],c[14]=n[14]-o[14],c[15]=n[15]-o[15],c};w.multiplyTransformation=function(n,o,c){y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c);let f=n[0],O=n[1],p=n[2],b=n[4],e=n[5],j=n[6],t=n[8],R=n[9],E=n[10],A=n[12],C=n[13],S=n[14],P=o[0],W=o[1],N=o[2],_=o[4],U=o[5],m=o[6],V=o[8],X=o[9],k=o[10],$=o[12],B=o[13],Z=o[14],I=f*P+b*W+t*N,D=O*P+e*W+R*N,G=p*P+j*W+E*N,K=f*_+b*U+t*m,F=O*_+e*U+R*m,v=p*_+j*U+E*m,i=f*V+b*X+t*k,g=O*V+e*X+R*k,a=p*V+j*X+E*k,l=f*$+b*B+t*Z+A,r=O*$+e*B+R*Z+C,nn=p*$+j*B+E*Z+S;return c[0]=I,c[1]=D,c[2]=G,c[3]=0,c[4]=K,c[5]=F,c[6]=v,c[7]=0,c[8]=i,c[9]=g,c[10]=a,c[11]=0,c[12]=l,c[13]=r,c[14]=nn,c[15]=1,c};w.multiplyByMatrix3=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("rotation",o),y.typeOf.object("result",c);let f=n[0],O=n[1],p=n[2],b=n[4],e=n[5],j=n[6],t=n[8],R=n[9],E=n[10],A=o[0],C=o[1],S=o[2],P=o[3],W=o[4],N=o[5],_=o[6],U=o[7],m=o[8],V=f*A+b*C+t*S,X=O*A+e*C+R*S,k=p*A+j*C+E*S,$=f*P+b*W+t*N,B=O*P+e*W+R*N,Z=p*P+j*W+E*N,I=f*_+b*U+t*m,D=O*_+e*U+R*m,G=p*_+j*U+E*m;return c[0]=V,c[1]=X,c[2]=k,c[3]=0,c[4]=$,c[5]=B,c[6]=Z,c[7]=0,c[8]=I,c[9]=D,c[10]=G,c[11]=0,c[12]=n[12],c[13]=n[13],c[14]=n[14],c[15]=n[15],c};w.multiplyByTranslation=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("translation",o),y.typeOf.object("result",c);let f=o.x,O=o.y,p=o.z,b=f*n[0]+O*n[4]+p*n[8]+n[12],e=f*n[1]+O*n[5]+p*n[9]+n[13],j=f*n[2]+O*n[6]+p*n[10]+n[14];return c[0]=n[0],c[1]=n[1],c[2]=n[2],c[3]=n[3],c[4]=n[4],c[5]=n[5],c[6]=n[6],c[7]=n[7],c[8]=n[8],c[9]=n[9],c[10]=n[10],c[11]=n[11],c[12]=b,c[13]=e,c[14]=j,c[15]=n[15],c};w.multiplyByScale=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("scale",o),y.typeOf.object("result",c);let f=o.x,O=o.y,p=o.z;return f===1&&O===1&&p===1?w.clone(n,c):(c[0]=f*n[0],c[1]=f*n[1],c[2]=f*n[2],c[3]=n[3],c[4]=O*n[4],c[5]=O*n[5],c[6]=O*n[6],c[7]=n[7],c[8]=p*n[8],c[9]=p*n[9],c[10]=p*n[10],c[11]=n[11],c[12]=n[12],c[13]=n[13],c[14]=n[14],c[15]=n[15],c)};w.multiplyByUniformScale=function(n,o,c){return y.typeOf.object("matrix",n),y.typeOf.number("scale",o),y.typeOf.object("result",c),c[0]=n[0]*o,c[1]=n[1]*o,c[2]=n[2]*o,c[3]=n[3],c[4]=n[4]*o,c[5]=n[5]*o,c[6]=n[6]*o,c[7]=n[7],c[8]=n[8]*o,c[9]=n[9]*o,c[10]=n[10]*o,c[11]=n[11],c[12]=n[12],c[13]=n[13],c[14]=n[14],c[15]=n[15],c};w.multiplyByVector=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("cartesian",o),y.typeOf.object("result",c);let f=o.x,O=o.y,p=o.z,b=o.w,e=n[0]*f+n[4]*O+n[8]*p+n[12]*b,j=n[1]*f+n[5]*O+n[9]*p+n[13]*b,t=n[2]*f+n[6]*O+n[10]*p+n[14]*b,R=n[3]*f+n[7]*O+n[11]*p+n[15]*b;return c.x=e,c.y=j,c.z=t,c.w=R,c};w.multiplyByPointAsVector=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("cartesian",o),y.typeOf.object("result",c);let f=o.x,O=o.y,p=o.z,b=n[0]*f+n[4]*O+n[8]*p,e=n[1]*f+n[5]*O+n[9]*p,j=n[2]*f+n[6]*O+n[10]*p;return c.x=b,c.y=e,c.z=j,c};w.multiplyByPoint=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("cartesian",o),y.typeOf.object("result",c);let f=o.x,O=o.y,p=o.z,b=n[0]*f+n[4]*O+n[8]*p+n[12],e=n[1]*f+n[5]*O+n[9]*p+n[13],j=n[2]*f+n[6]*O+n[10]*p+n[14];return c.x=b,c.y=e,c.z=j,c};w.multiplyByScalar=function(n,o,c){return y.typeOf.object("matrix",n),y.typeOf.number("scalar",o),y.typeOf.object("result",c),c[0]=n[0]*o,c[1]=n[1]*o,c[2]=n[2]*o,c[3]=n[3]*o,c[4]=n[4]*o,c[5]=n[5]*o,c[6]=n[6]*o,c[7]=n[7]*o,c[8]=n[8]*o,c[9]=n[9]*o,c[10]=n[10]*o,c[11]=n[11]*o,c[12]=n[12]*o,c[13]=n[13]*o,c[14]=n[14]*o,c[15]=n[15]*o,c};w.negate=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o[0]=-n[0],o[1]=-n[1],o[2]=-n[2],o[3]=-n[3],o[4]=-n[4],o[5]=-n[5],o[6]=-n[6],o[7]=-n[7],o[8]=-n[8],o[9]=-n[9],o[10]=-n[10],o[11]=-n[11],o[12]=-n[12],o[13]=-n[13],o[14]=-n[14],o[15]=-n[15],o};w.transpose=function(n,o){y.typeOf.object("matrix",n),y.typeOf.object("result",o);let c=n[1],f=n[2],O=n[3],p=n[6],b=n[7],e=n[11];return o[0]=n[0],o[1]=n[4],o[2]=n[8],o[3]=n[12],o[4]=c,o[5]=n[5],o[6]=n[9],o[7]=n[13],o[8]=f,o[9]=p,o[10]=n[10],o[11]=n[14],o[12]=O,o[13]=b,o[14]=e,o[15]=n[15],o};w.abs=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o[0]=Math.abs(n[0]),o[1]=Math.abs(n[1]),o[2]=Math.abs(n[2]),o[3]=Math.abs(n[3]),o[4]=Math.abs(n[4]),o[5]=Math.abs(n[5]),o[6]=Math.abs(n[6]),o[7]=Math.abs(n[7]),o[8]=Math.abs(n[8]),o[9]=Math.abs(n[9]),o[10]=Math.abs(n[10]),o[11]=Math.abs(n[11]),o[12]=Math.abs(n[12]),o[13]=Math.abs(n[13]),o[14]=Math.abs(n[14]),o[15]=Math.abs(n[15]),o};w.equals=function(n,o){return n===o||z(n)&&z(o)&&n[12]===o[12]&&n[13]===o[13]&&n[14]===o[14]&&n[0]===o[0]&&n[1]===o[1]&&n[2]===o[2]&&n[4]===o[4]&&n[5]===o[5]&&n[6]===o[6]&&n[8]===o[8]&&n[9]===o[9]&&n[10]===o[10]&&n[3]===o[3]&&n[7]===o[7]&&n[11]===o[11]&&n[15]===o[15]};w.equalsEpsilon=function(n,o,c){return c=T(c,0),n===o||z(n)&&z(o)&&Math.abs(n[0]-o[0])<=c&&Math.abs(n[1]-o[1])<=c&&Math.abs(n[2]-o[2])<=c&&Math.abs(n[3]-o[3])<=c&&Math.abs(n[4]-o[4])<=c&&Math.abs(n[5]-o[5])<=c&&Math.abs(n[6]-o[6])<=c&&Math.abs(n[7]-o[7])<=c&&Math.abs(n[8]-o[8])<=c&&Math.abs(n[9]-o[9])<=c&&Math.abs(n[10]-o[10])<=c&&Math.abs(n[11]-o[11])<=c&&Math.abs(n[12]-o[12])<=c&&Math.abs(n[13]-o[13])<=c&&Math.abs(n[14]-o[14])<=c&&Math.abs(n[15]-o[15])<=c};w.getTranslation=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o.x=n[12],o.y=n[13],o.z=n[14],o};w.getMatrix3=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[4],o[4]=n[5],o[5]=n[6],o[6]=n[8],o[7]=n[9],o[8]=n[10],o};var kn=new on,$n=new on,Bn=new yn,Yn=new yn(0,0,0,1);w.inverse=function(n,o){y.typeOf.object("matrix",n),y.typeOf.object("result",o);let c=n[0],f=n[4],O=n[8],p=n[12],b=n[1],e=n[5],j=n[9],t=n[13],R=n[2],E=n[6],A=n[10],C=n[14],S=n[3],P=n[7],W=n[11],N=n[15],_=A*N,U=C*W,m=E*N,V=C*P,X=E*W,k=A*P,$=R*N,B=C*S,Z=R*W,I=A*S,D=R*P,G=E*S,K=_*e+V*j+X*t-(U*e+m*j+k*t),F=U*b+$*j+I*t-(_*b+B*j+Z*t),v=m*b+B*e+D*t-(V*b+$*e+G*t),i=k*b+Z*e+G*j-(X*b+I*e+D*j),g=U*f+m*O+k*p-(_*f+V*O+X*p),a=_*c+B*O+Z*p-(U*c+$*O+I*p),l=V*c+$*f+G*p-(m*c+B*f+D*p),r=X*c+I*f+D*O-(k*c+Z*f+G*O);_=O*t,U=p*j,m=f*t,V=p*e,X=f*j,k=O*e,$=c*t,B=p*b,Z=c*j,I=O*b,D=c*e,G=f*b;let nn=_*P+V*W+X*N-(U*P+m*W+k*N),On=U*S+$*W+I*N-(_*S+B*W+Z*N),pn=m*S+B*P+D*N-(V*S+$*P+G*N),bn=k*S+Z*P+G*W-(X*S+I*P+D*W),wn=m*A+k*C+U*E-(X*C+_*E+V*A),hn=Z*C+_*R+B*A-($*A+I*C+U*R),en=$*E+G*C+V*R-(D*C+m*R+B*E),tn=D*A+X*R+I*E-(Z*E+G*A+k*R),Y=c*K+f*F+O*v+p*i;if(Math.abs(Y)<d.EPSILON21){if(on.equalsEpsilon(w.getMatrix3(n,kn),$n,d.EPSILON7)&&yn.equals(w.getRow(n,3,Bn),Yn))return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=0,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=0,o[11]=0,o[12]=-n[12],o[13]=-n[13],o[14]=-n[14],o[15]=1,o;throw new Rn("matrix is not invertible because its determinate is zero.")}return Y=1/Y,o[0]=K*Y,o[1]=F*Y,o[2]=v*Y,o[3]=i*Y,o[4]=g*Y,o[5]=a*Y,o[6]=l*Y,o[7]=r*Y,o[8]=nn*Y,o[9]=On*Y,o[10]=pn*Y,o[11]=bn*Y,o[12]=wn*Y,o[13]=hn*Y,o[14]=en*Y,o[15]=tn*Y,o};w.inverseTransformation=function(n,o){y.typeOf.object("matrix",n),y.typeOf.object("result",o);let c=n[0],f=n[1],O=n[2],p=n[4],b=n[5],e=n[6],j=n[8],t=n[9],R=n[10],E=n[12],A=n[13],C=n[14],S=-c*E-f*A-O*C,P=-p*E-b*A-e*C,W=-j*E-t*A-R*C;return o[0]=c,o[1]=p,o[2]=j,o[3]=0,o[4]=f,o[5]=b,o[6]=t,o[7]=0,o[8]=O,o[9]=e,o[10]=R,o[11]=0,o[12]=S,o[13]=P,o[14]=W,o[15]=1,o};var Zn=new w;w.inverseTranspose=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),w.inverse(w.transpose(n,Zn),o)};w.IDENTITY=Object.freeze(new w(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1));w.ZERO=Object.freeze(new w(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0));w.COLUMN0ROW0=0;w.COLUMN0ROW1=1;w.COLUMN0ROW2=2;w.COLUMN0ROW3=3;w.COLUMN1ROW0=4;w.COLUMN1ROW1=5;w.COLUMN1ROW2=6;w.COLUMN1ROW3=7;w.COLUMN2ROW0=8;w.COLUMN2ROW1=9;w.COLUMN2ROW2=10;w.COLUMN2ROW3=11;w.COLUMN3ROW0=12;w.COLUMN3ROW1=13;w.COLUMN3ROW2=14;w.COLUMN3ROW3=15;Object.defineProperties(w.prototype,{length:{get:function(){return w.packedLength}}});w.prototype.clone=function(n){return w.clone(this,n)};w.prototype.equals=function(n){return w.equals(this,n)};w.equalsArray=function(n,o,c){return n[0]===o[c]&&n[1]===o[c+1]&&n[2]===o[c+2]&&n[3]===o[c+3]&&n[4]===o[c+4]&&n[5]===o[c+5]&&n[6]===o[c+6]&&n[7]===o[c+7]&&n[8]===o[c+8]&&n[9]===o[c+9]&&n[10]===o[c+10]&&n[11]===o[c+11]&&n[12]===o[c+12]&&n[13]===o[c+13]&&n[14]===o[c+14]&&n[15]===o[c+15]};w.prototype.equalsEpsilon=function(n,o){return w.equalsEpsilon(this,n,o)};w.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
|
|
27
|
-
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
|
|
28
|
-
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
|
|
29
|
-
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};var yo=w;function q(n,o,c,f){this.west=T(n,0),this.south=T(o,0),this.east=T(c,0),this.north=T(f,0)}Object.defineProperties(q.prototype,{width:{get:function(){return q.computeWidth(this)}},height:{get:function(){return q.computeHeight(this)}}});q.packedLength=4;q.pack=function(n,o,c){return y.typeOf.object("value",n),y.defined("array",o),c=T(c,0),o[c++]=n.west,o[c++]=n.south,o[c++]=n.east,o[c]=n.north,o};q.unpack=function(n,o,c){return y.defined("array",n),o=T(o,0),z(c)||(c=new q),c.west=n[o++],c.south=n[o++],c.east=n[o++],c.north=n[o],c};q.computeWidth=function(n){y.typeOf.object("rectangle",n);let o=n.east,c=n.west;return o<c&&(o+=d.TWO_PI),o-c};q.computeHeight=function(n){return y.typeOf.object("rectangle",n),n.north-n.south};q.fromDegrees=function(n,o,c,f,O){return n=d.toRadians(T(n,0)),o=d.toRadians(T(o,0)),c=d.toRadians(T(c,0)),f=d.toRadians(T(f,0)),z(O)?(O.west=n,O.south=o,O.east=c,O.north=f,O):new q(n,o,c,f)};q.fromRadians=function(n,o,c,f,O){return z(O)?(O.west=T(n,0),O.south=T(o,0),O.east=T(c,0),O.north=T(f,0),O):new q(n,o,c,f)};q.fromCartographicArray=function(n,o){y.defined("cartographics",n);let c=Number.MAX_VALUE,f=-Number.MAX_VALUE,O=Number.MAX_VALUE,p=-Number.MAX_VALUE,b=Number.MAX_VALUE,e=-Number.MAX_VALUE;for(let j=0,t=n.length;j<t;j++){let R=n[j];c=Math.min(c,R.longitude),f=Math.max(f,R.longitude),b=Math.min(b,R.latitude),e=Math.max(e,R.latitude);let E=R.longitude>=0?R.longitude:R.longitude+d.TWO_PI;O=Math.min(O,E),p=Math.max(p,E)}return f-c>p-O&&(c=O,f=p,f>d.PI&&(f=f-d.TWO_PI),c>d.PI&&(c=c-d.TWO_PI)),z(o)?(o.west=c,o.south=b,o.east=f,o.north=e,o):new q(c,b,f,e)};q.fromCartesianArray=function(n,o,c){y.defined("cartesians",n),o=T(o,jn.WGS84);let f=Number.MAX_VALUE,O=-Number.MAX_VALUE,p=Number.MAX_VALUE,b=-Number.MAX_VALUE,e=Number.MAX_VALUE,j=-Number.MAX_VALUE;for(let t=0,R=n.length;t<R;t++){let E=o.cartesianToCartographic(n[t]);f=Math.min(f,E.longitude),O=Math.max(O,E.longitude),e=Math.min(e,E.latitude),j=Math.max(j,E.latitude);let A=E.longitude>=0?E.longitude:E.longitude+d.TWO_PI;p=Math.min(p,A),b=Math.max(b,A)}return O-f>b-p&&(f=p,O=b,O>d.PI&&(O=O-d.TWO_PI),f>d.PI&&(f=f-d.TWO_PI)),z(c)?(c.west=f,c.south=e,c.east=O,c.north=j,c):new q(f,e,O,j)};q.clone=function(n,o){if(z(n))return z(o)?(o.west=n.west,o.south=n.south,o.east=n.east,o.north=n.north,o):new q(n.west,n.south,n.east,n.north)};q.equalsEpsilon=function(n,o,c){return c=T(c,0),n===o||z(n)&&z(o)&&Math.abs(n.west-o.west)<=c&&Math.abs(n.south-o.south)<=c&&Math.abs(n.east-o.east)<=c&&Math.abs(n.north-o.north)<=c};q.prototype.clone=function(n){return q.clone(this,n)};q.prototype.equals=function(n){return q.equals(this,n)};q.equals=function(n,o){return n===o||z(n)&&z(o)&&n.west===o.west&&n.south===o.south&&n.east===o.east&&n.north===o.north};q.prototype.equalsEpsilon=function(n,o){return q.equalsEpsilon(this,n,o)};q.validate=function(n){y.typeOf.object("rectangle",n);let o=n.north;y.typeOf.number.greaterThanOrEquals("north",o,-d.PI_OVER_TWO),y.typeOf.number.lessThanOrEquals("north",o,d.PI_OVER_TWO);let c=n.south;y.typeOf.number.greaterThanOrEquals("south",c,-d.PI_OVER_TWO),y.typeOf.number.lessThanOrEquals("south",c,d.PI_OVER_TWO);let f=n.west;y.typeOf.number.greaterThanOrEquals("west",f,-Math.PI),y.typeOf.number.lessThanOrEquals("west",f,Math.PI);let O=n.east;y.typeOf.number.greaterThanOrEquals("east",O,-Math.PI),y.typeOf.number.lessThanOrEquals("east",O,Math.PI)};q.southwest=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.west,o.latitude=n.south,o.height=0,o):new u(n.west,n.south)};q.northwest=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.west,o.latitude=n.north,o.height=0,o):new u(n.west,n.north)};q.northeast=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.east,o.latitude=n.north,o.height=0,o):new u(n.east,n.north)};q.southeast=function(n,o){return y.typeOf.object("rectangle",n),z(o)?(o.longitude=n.east,o.latitude=n.south,o.height=0,o):new u(n.east,n.south)};q.center=function(n,o){y.typeOf.object("rectangle",n);let c=n.east,f=n.west;c<f&&(c+=d.TWO_PI);let O=d.negativePiToPi((f+c)*.5),p=(n.south+n.north)*.5;return z(o)?(o.longitude=O,o.latitude=p,o.height=0,o):new u(O,p)};q.intersection=function(n,o,c){y.typeOf.object("rectangle",n),y.typeOf.object("otherRectangle",o);let f=n.east,O=n.west,p=o.east,b=o.west;f<O&&p>0?f+=d.TWO_PI:p<b&&f>0&&(p+=d.TWO_PI),f<O&&b<0?b+=d.TWO_PI:p<b&&O<0&&(O+=d.TWO_PI);let e=d.negativePiToPi(Math.max(O,b)),j=d.negativePiToPi(Math.min(f,p));if((n.west<n.east||o.west<o.east)&&j<=e)return;let t=Math.max(n.south,o.south),R=Math.min(n.north,o.north);if(!(t>=R))return z(c)?(c.west=e,c.south=t,c.east=j,c.north=R,c):new q(e,t,j,R)};q.simpleIntersection=function(n,o,c){y.typeOf.object("rectangle",n),y.typeOf.object("otherRectangle",o);let f=Math.max(n.west,o.west),O=Math.max(n.south,o.south),p=Math.min(n.east,o.east),b=Math.min(n.north,o.north);if(!(O>=b||f>=p))return z(c)?(c.west=f,c.south=O,c.east=p,c.north=b,c):new q(f,O,p,b)};q.union=function(n,o,c){y.typeOf.object("rectangle",n),y.typeOf.object("otherRectangle",o),z(c)||(c=new q);let f=n.east,O=n.west,p=o.east,b=o.west;f<O&&p>0?f+=d.TWO_PI:p<b&&f>0&&(p+=d.TWO_PI),f<O&&b<0?b+=d.TWO_PI:p<b&&O<0&&(O+=d.TWO_PI);let e=d.negativePiToPi(Math.min(O,b)),j=d.negativePiToPi(Math.max(f,p));return c.west=e,c.south=Math.min(n.south,o.south),c.east=j,c.north=Math.max(n.north,o.north),c};q.expand=function(n,o,c){return y.typeOf.object("rectangle",n),y.typeOf.object("cartographic",o),z(c)||(c=new q),c.west=Math.min(n.west,o.longitude),c.south=Math.min(n.south,o.latitude),c.east=Math.max(n.east,o.longitude),c.north=Math.max(n.north,o.latitude),c};q.contains=function(n,o){y.typeOf.object("rectangle",n),y.typeOf.object("cartographic",o);let c=o.longitude,f=o.latitude,O=n.west,p=n.east;return p<O&&(p+=d.TWO_PI,c<0&&(c+=d.TWO_PI)),(c>O||d.equalsEpsilon(c,O,d.EPSILON14))&&(c<p||d.equalsEpsilon(c,p,d.EPSILON14))&&f>=n.south&&f<=n.north};var In=new u;q.subsample=function(n,o,c,f){y.typeOf.object("rectangle",n),o=T(o,jn.WGS84),c=T(c,0),z(f)||(f=[]);let O=0,p=n.north,b=n.south,e=n.east,j=n.west,t=In;t.height=c,t.longitude=j,t.latitude=p,f[O]=o.cartographicToCartesian(t,f[O]),O++,t.longitude=e,f[O]=o.cartographicToCartesian(t,f[O]),O++,t.latitude=b,f[O]=o.cartographicToCartesian(t,f[O]),O++,t.longitude=j,f[O]=o.cartographicToCartesian(t,f[O]),O++,p<0?t.latitude=p:b>0?t.latitude=b:t.latitude=0;for(let R=1;R<8;++R)t.longitude=-Math.PI+R*d.PI_OVER_TWO,q.contains(n,t)&&(f[O]=o.cartographicToCartesian(t,f[O]),O++);return t.latitude===0&&(t.longitude=j,f[O]=o.cartographicToCartesian(t,f[O]),O++,t.longitude=e,f[O]=o.cartographicToCartesian(t,f[O]),O++),f.length=O,f};q.subsection=function(n,o,c,f,O,p){if(y.typeOf.object("rectangle",n),y.typeOf.number.greaterThanOrEquals("westLerp",o,0),y.typeOf.number.lessThanOrEquals("westLerp",o,1),y.typeOf.number.greaterThanOrEquals("southLerp",c,0),y.typeOf.number.lessThanOrEquals("southLerp",c,1),y.typeOf.number.greaterThanOrEquals("eastLerp",f,0),y.typeOf.number.lessThanOrEquals("eastLerp",f,1),y.typeOf.number.greaterThanOrEquals("northLerp",O,0),y.typeOf.number.lessThanOrEquals("northLerp",O,1),y.typeOf.number.lessThanOrEquals("westLerp",o,f),y.typeOf.number.lessThanOrEquals("southLerp",c,O),z(p)||(p=new q),n.west<=n.east){let e=n.east-n.west;p.west=n.west+o*e,p.east=n.west+f*e}else{let e=d.TWO_PI+n.east-n.west;p.west=d.negativePiToPi(n.west+o*e),p.east=d.negativePiToPi(n.west+f*e)}let b=n.north-n.south;return p.south=n.south+c*b,p.north=n.south+O*b,o===1&&(p.west=n.east),f===1&&(p.east=n.east),c===1&&(p.south=n.north),O===1&&(p.north=n.north),p};q.MAX_VALUE=Object.freeze(new q(-Math.PI,-d.PI_OVER_TWO,Math.PI,d.PI_OVER_TWO));var jo=q;function M(n,o,c,f){this[0]=T(n,0),this[1]=T(c,0),this[2]=T(o,0),this[3]=T(f,0)}M.packedLength=4;M.pack=function(n,o,c){return y.typeOf.object("value",n),y.defined("array",o),c=T(c,0),o[c++]=n[0],o[c++]=n[1],o[c++]=n[2],o[c++]=n[3],o};M.unpack=function(n,o,c){return y.defined("array",n),o=T(o,0),z(c)||(c=new M),c[0]=n[o++],c[1]=n[o++],c[2]=n[o++],c[3]=n[o++],c};M.packArray=function(n,o){y.defined("array",n);let c=n.length,f=c*4;if(!z(o))o=new Array(f);else{if(!Array.isArray(o)&&o.length!==f)throw new J("If result is a typed array, it must have exactly array.length * 4 elements");o.length!==f&&(o.length=f)}for(let O=0;O<c;++O)M.pack(n[O],o,O*4);return o};M.unpackArray=function(n,o){if(y.defined("array",n),y.typeOf.number.greaterThanOrEquals("array.length",n.length,4),n.length%4!==0)throw new J("array length must be a multiple of 4.");let c=n.length;z(o)?o.length=c/4:o=new Array(c/4);for(let f=0;f<c;f+=4){let O=f/4;o[O]=M.unpack(n,f,o[O])}return o};M.clone=function(n,o){if(z(n))return z(o)?(o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o):new M(n[0],n[2],n[1],n[3])};M.fromArray=M.unpack;M.fromColumnMajorArray=function(n,o){return y.defined("values",n),M.clone(n,o)};M.fromRowMajorArray=function(n,o){return y.defined("values",n),z(o)?(o[0]=n[0],o[1]=n[2],o[2]=n[1],o[3]=n[3],o):new M(n[0],n[1],n[2],n[3])};M.fromScale=function(n,o){return y.typeOf.object("scale",n),z(o)?(o[0]=n.x,o[1]=0,o[2]=0,o[3]=n.y,o):new M(n.x,0,0,n.y)};M.fromUniformScale=function(n,o){return y.typeOf.number("scale",n),z(o)?(o[0]=n,o[1]=0,o[2]=0,o[3]=n,o):new M(n,0,0,n)};M.fromRotation=function(n,o){y.typeOf.number("angle",n);let c=Math.cos(n),f=Math.sin(n);return z(o)?(o[0]=c,o[1]=f,o[2]=-f,o[3]=c,o):new M(c,-f,f,c)};M.toArray=function(n,o){return y.typeOf.object("matrix",n),z(o)?(o[0]=n[0],o[1]=n[1],o[2]=n[2],o[3]=n[3],o):[n[0],n[1],n[2],n[3]]};M.getElementIndex=function(n,o){return y.typeOf.number.greaterThanOrEquals("row",o,0),y.typeOf.number.lessThanOrEquals("row",o,1),y.typeOf.number.greaterThanOrEquals("column",n,0),y.typeOf.number.lessThanOrEquals("column",n,1),n*2+o};M.getColumn=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,1),y.typeOf.object("result",c);let f=o*2,O=n[f],p=n[f+1];return c.x=O,c.y=p,c};M.setColumn=function(n,o,c,f){y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,1),y.typeOf.object("cartesian",c),y.typeOf.object("result",f),f=M.clone(n,f);let O=o*2;return f[O]=c.x,f[O+1]=c.y,f};M.getRow=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,1),y.typeOf.object("result",c);let f=n[o],O=n[o+2];return c.x=f,c.y=O,c};M.setRow=function(n,o,c,f){return y.typeOf.object("matrix",n),y.typeOf.number.greaterThanOrEquals("index",o,0),y.typeOf.number.lessThanOrEquals("index",o,1),y.typeOf.object("cartesian",c),y.typeOf.object("result",f),f=M.clone(n,f),f[o]=c.x,f[o+2]=c.y,f};var Dn=new H;M.setScale=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("scale",o),y.typeOf.object("result",c);let f=M.getScale(n,Dn),O=o.x/f.x,p=o.y/f.y;return c[0]=n[0]*O,c[1]=n[1]*O,c[2]=n[2]*p,c[3]=n[3]*p,c};var Gn=new H;M.setUniformScale=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.number("scale",o),y.typeOf.object("result",c);let f=M.getScale(n,Gn),O=o/f.x,p=o/f.y;return c[0]=n[0]*O,c[1]=n[1]*O,c[2]=n[2]*p,c[3]=n[3]*p,c};var qn=new H;M.getScale=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o.x=H.magnitude(H.fromElements(n[0],n[1],qn)),o.y=H.magnitude(H.fromElements(n[2],n[3],qn)),o};var An=new H;M.getMaximumScale=function(n){return M.getScale(n,An),H.maximumComponent(An)};var Qn=new H;M.setRotation=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("result",c);let f=M.getScale(n,Qn);return c[0]=o[0]*f.x,c[1]=o[1]*f.x,c[2]=o[2]*f.y,c[3]=o[3]*f.y,c};var Hn=new H;M.getRotation=function(n,o){y.typeOf.object("matrix",n),y.typeOf.object("result",o);let c=M.getScale(n,Hn);return o[0]=n[0]/c.x,o[1]=n[1]/c.x,o[2]=n[2]/c.y,o[3]=n[3]/c.y,o};M.multiply=function(n,o,c){y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c);let f=n[0]*o[0]+n[2]*o[1],O=n[0]*o[2]+n[2]*o[3],p=n[1]*o[0]+n[3]*o[1],b=n[1]*o[2]+n[3]*o[3];return c[0]=f,c[1]=p,c[2]=O,c[3]=b,c};M.add=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c[0]=n[0]+o[0],c[1]=n[1]+o[1],c[2]=n[2]+o[2],c[3]=n[3]+o[3],c};M.subtract=function(n,o,c){return y.typeOf.object("left",n),y.typeOf.object("right",o),y.typeOf.object("result",c),c[0]=n[0]-o[0],c[1]=n[1]-o[1],c[2]=n[2]-o[2],c[3]=n[3]-o[3],c};M.multiplyByVector=function(n,o,c){y.typeOf.object("matrix",n),y.typeOf.object("cartesian",o),y.typeOf.object("result",c);let f=n[0]*o.x+n[2]*o.y,O=n[1]*o.x+n[3]*o.y;return c.x=f,c.y=O,c};M.multiplyByScalar=function(n,o,c){return y.typeOf.object("matrix",n),y.typeOf.number("scalar",o),y.typeOf.object("result",c),c[0]=n[0]*o,c[1]=n[1]*o,c[2]=n[2]*o,c[3]=n[3]*o,c};M.multiplyByScale=function(n,o,c){return y.typeOf.object("matrix",n),y.typeOf.object("scale",o),y.typeOf.object("result",c),c[0]=n[0]*o.x,c[1]=n[1]*o.x,c[2]=n[2]*o.y,c[3]=n[3]*o.y,c};M.multiplyByUniformScale=function(n,o,c){return y.typeOf.object("matrix",n),y.typeOf.number("scale",o),y.typeOf.object("result",c),c[0]=n[0]*o,c[1]=n[1]*o,c[2]=n[2]*o,c[3]=n[3]*o,c};M.negate=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o[0]=-n[0],o[1]=-n[1],o[2]=-n[2],o[3]=-n[3],o};M.transpose=function(n,o){y.typeOf.object("matrix",n),y.typeOf.object("result",o);let c=n[0],f=n[2],O=n[1],p=n[3];return o[0]=c,o[1]=f,o[2]=O,o[3]=p,o};M.abs=function(n,o){return y.typeOf.object("matrix",n),y.typeOf.object("result",o),o[0]=Math.abs(n[0]),o[1]=Math.abs(n[1]),o[2]=Math.abs(n[2]),o[3]=Math.abs(n[3]),o};M.equals=function(n,o){return n===o||z(n)&&z(o)&&n[0]===o[0]&&n[1]===o[1]&&n[2]===o[2]&&n[3]===o[3]};M.equalsArray=function(n,o,c){return n[0]===o[c]&&n[1]===o[c+1]&&n[2]===o[c+2]&&n[3]===o[c+3]};M.equalsEpsilon=function(n,o,c){return c=T(c,0),n===o||z(n)&&z(o)&&Math.abs(n[0]-o[0])<=c&&Math.abs(n[1]-o[1])<=c&&Math.abs(n[2]-o[2])<=c&&Math.abs(n[3]-o[3])<=c};M.IDENTITY=Object.freeze(new M(1,0,0,1));M.ZERO=Object.freeze(new M(0,0,0,0));M.COLUMN0ROW0=0;M.COLUMN0ROW1=1;M.COLUMN1ROW0=2;M.COLUMN1ROW1=3;Object.defineProperties(M.prototype,{length:{get:function(){return M.packedLength}}});M.prototype.clone=function(n){return M.clone(this,n)};M.prototype.equals=function(n){return M.equals(this,n)};M.prototype.equalsEpsilon=function(n,o){return M.equalsEpsilon(this,n,o)};M.prototype.toString=function(){return`(${this[0]}, ${this[2]})
|
|
30
|
-
(${this[1]}, ${this[3]})`};var Ao=M;export{yn as a,yo as b,jo as c,Ao as d};
|