earthsdk3-cesium 3.5.0-beta.3 → 3.5.0-beta.5
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/earthsdk3-cesium.iife.js +11 -11
- package/dist/earthsdk3-cesium.js +1340 -1340
- package/dist/earthsdk3-cesium.umd.cjs +48 -48
- package/dist/types/ESCesiumViewer/ViewerInstance.d.ts.map +1 -1
- package/dist/types/ESCesiumViewer/createBaseProps.d.ts +0 -3
- package/dist/types/ESCesiumViewer/createBaseProps.d.ts.map +1 -1
- package/dist/types/ESCesiumViewer/index.d.ts +0 -6
- package/dist/types/ESCesiumViewer/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -338,13 +338,13 @@ ${H0}
|
|
|
338
338
|
// #endif
|
|
339
339
|
}
|
|
340
340
|
`;o.vertexShaderSource=r,o.fragmentShaderSource=a;const s={depthTest:{enabled:!0},cull:{enabled:!0,face:1029},blending:{enabled:!0,equationRgb:32774,equationAlpha:32774,functionSourceRgb:770,functionSourceAlpha:1,functionDestinationRgb:771,functionDestinationAlpha:771}};o.renderState=s;const l=()=>{this.czmTextureId?o.uniformMap={myImage:{type:"texture",id:this.czmTextureId},myColor:this.color??[1,1,1,1]}:o.uniformMap={myImage:{type:"image",uri:h.ESSceneObject.context.getStrFromEnv(this.uri??"${earthsdk3-assets-script-dir}/assets/img/location.png")},myColor:this.color??[1,1,1,1]}};l(),this.dispose(this.uriChanged.disposableOn(l)),this.dispose(this.czmTextureIdChanged.disposableOn(l)),this.dispose(this.colorChanged.disposableOn(l)),this.dispose(h.bind([o,"show"],[this,"show"])),this.dispose(h.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(h.bind([o,"position"],[this,"position"]));{const c=()=>{o.pixelSize=this.pixelSize};c(),this.dispose(this.pixelSizeChanged.disposableOn(c))}this.dispose(h.track([o,"maximumScale"],[this,"maximumScale"])),this.dispose(h.track([o,"viewDistanceRange"],[this,"viewDistanceRange"])),this.dispose(h.track([o,"viewDistanceDebug"],[this,"viewDistanceDebug"]));const u=()=>{const{scale:c=[1,1]}=this;o.scale=[this.useAxis.includes("X")?c[0]:1,this.useAxis.includes("Y")?this.useAxis.includes("X")?this.size[1]:this.size[0]:1,this.useAxis.includes("Z")?c[1]:1]};u(),this.dispose(this.scaleChanged.disposableOn(u));const A=()=>{const c=-(this.originRatioAndOffset[0]*this.size[0]+this.originRatioAndOffset[2]),f=this.originRatioAndOffset[1]*this.size[1]+this.originRatioAndOffset[3];o.localPosition=[this.useAxis.includes("X")?c:0,this.useAxis.includes("Y")?this.useAxis.includes("X")?f:c:0,this.useAxis.includes("Z")?f:0],o.localScale=[this.useAxis.includes("X")?this.size[0]:1,this.useAxis.includes("Y")?this.useAxis.includes("X")?this.size[1]:this.size[0]:1,this.useAxis.includes("Z")?this.size[1]:1]};{const c=()=>{const f={XY:[0,0,0,0,-1,0,1,-1,0,1,0,0,0,0,0,0,-1,0,1,-1,0,1,0,0],YZ:[0,0,0,0,0,-1,0,1,-1,0,1,0,0,0,0,0,0,-1,0,1,-1,0,1,0],XZ:[0,0,0,0,0,-1,1,0,-1,1,0,0,0,0,0,0,0,-1,1,0,-1,1,0,0]},d={XY:{min:[0,-1,0],max:[1,0,0]},YZ:{min:[0,0,-1],max:[0,1,0]},XZ:{min:[0,0,-1],max:[1,0,0]}};o.attributes={position:{typedArray:new Float32Array(f[this.useAxis??Xl.defaults.useAxis]),componentsPerAttribute:3},normal:{typedArray:new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1]),componentsPerAttribute:3},textureCoordinates:{typedArray:new Float32Array([0,1,0,0,1,0,1,1,1,1,1,0,0,0,0,1]),componentsPerAttribute:2}},o.boundingVolume={type:"LocalAxisedBoundingBox",data:d[this.useAxis??Xl.defaults.useAxis]},A()};c(),this.d(this.useAxisChanged.don(c))}this.dispose(this.originRatioAndOffsetChanged.disposableOn(A)),this.dispose(this.sizeChanged.disposableOn(A)),this.dispose(this.flyToEvent.disposableOn(c=>{o.flyTo(c)})),this.disposeVar(new h.ObjResettingWithEvent(this.rotationModeChanged,()=>new DD(e,this)))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get customPrimitive(){return this._customPrimitive}};z(Xl,"defaults",{position:[0,0,0],viewDistanceRange:[1e3,1e4,3e4,6e4],useAxis:"XY"});let Gi=Xl;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,uri:"${earthsdk3-assets-script-dir}/assets/img/location.png",czmTextureId:"",position:h.reactArrayWithUndefined(void 0),rotation:h.reactArray([0,0,0]),rotationWithCamera:!1,rotationMode:"WithProp",useAxis:"XY",size:h.reactArray([1,1]),scale:[1,1],maximumScale:Number.MAX_VALUE,minimumScale:Number.MIN_VALUE,pixelSize:50,color:h.reactArray([1,1,1,1]),originRatioAndOffset:h.reactArray([.5,1,0,0]),viewDistanceRange:h.reactArrayWithUndefined(void 0),viewDistanceDebug:!1})})(Gi||(Gi={})),h.extendClassProps(Gi.prototype,Gi.createDefaultProps);class DD extends h.Destroyable{constructor(n,e){super(),this._czmViewer=n,this._czmImageModel=e;const{customPrimitive:i,rotationMode:o}=this._czmImageModel;if(o==="WithProp")this.dispose(h.track([i,"rotation"],[this._czmImageModel,"rotation"]));else if(o==="WithCameraOnlyZ"){const r=()=>{const{rotation:a}=this._czmImageModel,s=this._czmViewer.getCameraInfo();s&&(i.rotation=[s.rotation[0]+(this._czmImageModel.useAxis.includes("YZ")?90:0),a[1],a[2]])};r(),this.dispose(this._czmViewer.cameraChanged.disposableOn(r)),this.dispose(this._czmImageModel.rotationChanged.disposableOn(r))}else if(o==="WithCamera"){const r=()=>{const a=this._czmViewer.getCameraInfo();if(!a)return;const s=a.rotation;i.rotation=[s[0]+(this._czmImageModel.useAxis.includes("YZ")?90:0),s[1]+(this._czmImageModel.useAxis.includes("Z")?0:90),s[2]]};r(),this.dispose(this._czmViewer.cameraChanged.disposableOn(r)),this.dispose(this._czmImageModel.rotationChanged.disposableOn(r))}}}class Is extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");z(this,"_id",this.disposeVar(h.react(h.createGuid())));i&&(this.id=i);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}if(!Dn(e.viewer))return;const a=this.disposeVar(Yn([this,"material"])),s=this.disposeVar(h.createNextAnimateFrameEvent(this.polygonHierarchyChanged,this.materialChanged,this.stRotationChanged,this.arcTypeChanged,this.heightChanged,this.extrudedHeightChanged,this.perPositionHeightChanged,this.closeTopChanged,this.closeBottomChanged,this.ellipsoidChanged,this.granularityChanged,this.allowPickingChanged,a.changed)),l=this.disposeVar(new h.ObjResettingWithEvent(s,()=>{if(a.value)return new RD(e,o,this,a.value)}));this.dispose(this.flyToEvent.disposableOn(u=>{e.actived&&(s.flush(),l.obj&&l.obj.flyTo(u))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get id(){return this._id.value}set id(e){this._id.value=e}get idChanged(){return this._id.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,arcType:"GEODESIC",material:h.reactJson({type:"Color"}),stRotation:0,polygonHierarchy:h.reactJson({positions:[]}),height:void 0,extrudedHeight:void 0,ellipsoid:void 0,granularity:1,perPositionHeight:!1,closeTop:!0,closeBottom:!0})})(Is||(Is={})),h.extendClassProps(Is.prototype,Is.createDefaultProps);class RD extends h.Destroyable{constructor(e,i,o,r){super();z(this,"_boundingSphere",(()=>{const e=this._sceneObject;this._material;const i=new _.BoundingSphere;if(!e.polygonHierarchy)return;const o=Wt(e.polygonHierarchy.positions);if(o.length<3){i.radius=-1;return}return _.BoundingSphere.fromPoints(o,i),i})());this._czmViewer=e,this._viewer=i,this._sceneObject=o,this._material=r;const a=this._sceneObject,s=this._material,l=this._viewer;if(!a.polygonHierarchy)return;const u=new _.MaterialAppearance({material:s}),A=[],c=new _.GeometryInstance({geometry:new _.PolygonGeometry({vertexFormat:_.MaterialAppearance.MaterialSupport.ALL.vertexFormat,polygonHierarchy:Li(a.polygonHierarchy),stRotation:a.stRotation&&_.Math.toRadians(a.stRotation),arcType:a.arcType&&_.ArcType[a.arcType],height:a.height,extrudedHeight:a.extrudedHeight,perPositionHeight:a.perPositionHeight,closeTop:a.closeTop,closeBottom:a.closeBottom,ellipsoid:a.ellipsoid&&je(a.ellipsoid),granularity:a.granularity!==void 0?_.Math.toRadians(a.granularity):void 0}),id:this});A.push(c);const f=new _.GroundPrimitive({geometryInstances:A,appearance:u,asynchronous:!1,allowPicking:a.allowPicking,compressVertices:!1});_.GroundPrimitive.prototype&&(f.ESSceneObjectID=o.id),l.scene.primitives.add(f),this.dispose(()=>l.scene.primitives.remove(f));{const d=()=>{f.show=a.show};d(),this.dispose(a.showChanged.disposableOn(d))}this.disposeVar(new rt.ObjectsToExcludeWrapper(this._czmViewer,f))}flyTo(e){const i=this._boundingSphere;if(i&&i.radius>0){const o=Ue(i.center);o&&Fe(this._viewer,o,i.radius*4,void 0,e)}}}class UD extends h.Destroyable{constructor(e,i){super();z(this,"_groundPolygonPrimitive");this._groundPolygonPrimitive=this.disposeVar(new Is(i,e.id));const o=this._groundPolygonPrimitive;{const r=()=>{const s=e.show,l=e.fill;o.show=s&&l&&e.visibleAlpha>0,o.polygonHierarchy=o.show?{positions:e.positions||[]}:{positions:[]},o.material={type:"Color",color:e.color||[1,1,1,.5]}};r();const a=this.disposeVar(h.createNextAnimateFrameEvent(e.showChanged,e.fillChanged,e.outlineChanged,e.outlineColorChanged,e.outlineWidthChanged,e.colorChanged,e.positionsChanged,e.depthChanged,e.visibleAlphaChanged));this.dispose(a.disposableOn(r))}this.dispose(h.track([o,"allowPicking"],[e,"allowPicking"]))}get groundPolygonPrimitive(){return this._groundPolygonPrimitive}}class OD extends h.Destroyable{constructor(e,i,o){super();z(this,"_geoPolyline");this._geoPolyline=this.disposeVar(new Xe(i,e.id));const r=this._geoPolyline;r.arcType="GEODESIC",r.loop=!0;{const a=()=>{const l=e.show,u=e.outline;if(r.show=l&&u&&e.visibleAlpha>0,r.show&&e.positions&&e.positions.length>1){const A=e.positions[0][2];r.positions=e.positions.map(c=>[c[0],c[1],A])}else r.positions=void 0;r.color=e.outlineColor,r.width=e.outlineWidth};a();const s=this.disposeVar(h.createNextAnimateFrameEvent(e.showChanged,e.outlineChanged,e.outlineColorChanged,e.outlineWidthChanged,e.colorChanged,e.positionsChanged,e.visibleAlphaChanged));this.dispose(s.disposableOn(a))}this.dispose(h.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(h.track([r,"ground"],[e,"strokeGround"]))}get geoPolyline(){return this._geoPolyline}}class LD extends h.Destroyable{constructor(e,i){super();z(this,"_innerPolygon");z(this,"_bottomPolyline");const o=e.ground;this._innerPolygon=this.disposeVar(new UD(e,i)),this._bottomPolyline=this.disposeVar(new OD(e,i,o)),this.dispose(e.flyToEvent.disposableOn(r=>{if(e.viewDistanceRange){const a=e.positionsCenter.center,s=(e.viewDistanceRange[1]+e.viewDistanceRange[2])/2;Fe(i.viewer,a,s,void 0,r)}else{const a=e.positionsCenter.center;if(!e.positions)return;const s=[a[0],a[1],e.positions[0][2]],l=e.positionsCenter.radius*4;Fe(i.viewer,s,l,void 0,r)}}))}get innerPolygon(){return this._innerPolygon}get bottomPolyline(){return this._bottomPolyline}}class Tr extends h.Destroyable{constructor(e,i){super();z(this,"_positions",this.disposeVar(h.reactPositions(void 0)));z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");this.d(this.polygonHierarchyChanged.don(()=>{this.polygonHierarchy?this.positions=this.polygonHierarchy.positions:this.positions=void 0})),this.d(this.positionsChanged.don(()=>{this.positions?this.polygonHierarchy.positions=[...this.positions]:this.polygonHierarchy={positions:[]}}));const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}const r=this.disposeVar(Yn([this,"material"])),a=()=>{this._primitive&&(o.scene.primitives.remove(this._primitive),this._primitive=void 0)};this.dispose(a);const s=d=>{if(!this.polygonHierarchy)return;const p=new _.MaterialAppearance({material:d}),g=[],v=new _.GeometryInstance({geometry:new _.PolygonGeometry({vertexFormat:_.MaterialAppearance.MaterialSupport.ALL.vertexFormat,polygonHierarchy:Li(this.polygonHierarchy),stRotation:this.stRotation&&_.Math.toRadians(this.stRotation),arcType:this.arcType&&_.ArcType[this.arcType],height:this.height,extrudedHeight:this.extrudedHeight,perPositionHeight:this.perPositionHeight,closeTop:this.closeTop,closeBottom:this.closeBottom,ellipsoid:this.ellipsoid&&je(this.ellipsoid),granularity:this.granularity!==void 0?_.Math.toRadians(this.granularity):void 0}),id:this});g.push(v);const y=new _.Primitive({geometryInstances:g,appearance:p,asynchronous:!1,allowPicking:this.allowPicking,compressVertices:!1});return _.Primitive.prototype&&(y.ESSceneObjectID=i),y},l=new _.BoundingSphere,u=()=>{if(a(),!this.polygonHierarchy)return;const d=Wt(this.polygonHierarchy.positions);if(d.length<3||!r.value){l.radius=-1;return}_.BoundingSphere.fromPoints(d,l),this._primitive=s(r.value),this._primitive&&o.scene.primitives.add(this._primitive)},A=()=>{const d=this.show??!0;this._primitive&&(this._primitive.show=d)};u(),A();const c=this.disposeVar(h.createNextAnimateFrameEvent(this.polygonHierarchyChanged,this.materialChanged,this.stRotationChanged,this.arcTypeChanged,this.heightChanged,this.extrudedHeightChanged,this.perPositionHeightChanged,this.closeTopChanged,this.closeBottomChanged,this.ellipsoidChanged,this.granularityChanged,this.allowPickingChanged,r.changed));this.dispose(c.disposableOn(()=>{u(),A()}));const f=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged));this.dispose(f.disposableOn(()=>{A()})),this.dispose(this.flyToEvent.disposableOn(d=>{if(e.actived&&(c.flush(),f.flush(),l.radius>0)){const p=Ue(l.center),g=this.height??0,v=this.extrudedHeight??0,y=Math.max(g,v),m=l.radius<y?y:l.radius;p&&Fe(o,p,m*4,void 0,d)}}))}get positions(){return this._positions.value}get positionsChanged(){return this._positions.changed}set positions(e){this._positions.value=e}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}}z(Tr,"defaults",{positions:[]}),(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,arcType:void 0,material:h.reactJson({type:"Color"}),stRotation:void 0,polygonHierarchy:h.reactJson({positions:[]}),height:void 0,extrudedHeight:void 0,ellipsoid:void 0,granularity:void 0,perPositionHeight:void 0,closeTop:void 0,closeBottom:void 0})})(Tr||(Tr={})),h.extendClassProps(Tr.prototype,Tr.createDefaultProps);class $1 extends h.Destroyable{constructor(e,i,o,r){super();z(this,"_czmInnerPolygonPrimitive");this._czmInnerPolygonPrimitive=this.disposeVar(new Tr(i,e.id));const a=this._czmInnerPolygonPrimitive;{const s=()=>{const u=e.show,A=e.fill;if(a.show=u&&A&&e.visibleAlpha>0,e.positions&&e.positions.length>0&&!r?a.height=e.positions[0][2]:a.height=void 0,a.polygonHierarchy=a.show?{positions:e.positions||[]}:{positions:[]},a.material={type:"Color",color:e.color||[1,1,1,.5]},o){if(e.depth===void 0)throw new Error("sceneObject.depth === undefined");a.extrudedHeight=(a.height??0)+e.depth}};s();const l=this.disposeVar(h.createNextAnimateFrameEvent(e.showChanged,e.fillChanged,e.outlineChanged,e.outlineColorChanged,e.outlineWidthChanged,e.colorChanged,e.positionsChanged,e.depthChanged,e.visibleAlphaChanged));this.dispose(l.disposableOn(s))}this.dispose(h.track([a,"allowPicking"],[e,"allowPicking"]))}get czmInnerPolygonPrimitive(){return this._czmInnerPolygonPrimitive}}class Y1 extends h.Destroyable{constructor(e,i,o){super();z(this,"_geoPolyline");this._geoPolyline=this.disposeVar(new Xe(i,e.id));const r=this._geoPolyline;r.arcType="GEODESIC",r.loop=!0,this.dispose(h.bind([r,"depthTest"],[e,"depthTest"])),this.dispose(h.bind([r,"ground"],[e,"strokeGround"]));{const a=()=>{const l=e.show,u=e.outline;if(r.show=l&&u&&e.visibleAlpha>0,r.show&&e.positions&&e.positions.length>1){const A=e.positions[0][2];r.positions=e.positions.map(c=>[c[0],c[1],A])}else r.positions=void 0;r.color=e.outlineColor,r.width=e.outlineWidth};a();const s=this.disposeVar(h.createNextAnimateFrameEvent(e.showChanged,e.outlineChanged,e.outlineColorChanged,e.outlineWidthChanged,e.colorChanged,e.positionsChanged,e.visibleAlphaChanged));this.dispose(s.disposableOn(a))}this.dispose(h.track([r,"allowPicking"],[e,"allowPicking"]))}get geoPolyline(){return this._geoPolyline}}class zD extends h.Destroyable{constructor(n,e){super();const i=this.disposeVar(new Jn(e,n.id));i.arcType="GEODESIC",this.dispose(h.track([i,"allowPicking"],[n,"allowPicking"])),this.dispose(h.bind([i,"depthTest"],[n,"depthTest"]));{const o=()=>{if(n.depth===void 0)throw new Error("sceneObject.depth === undefined");const a=n.show,s=n.outline;i.show=a&&s&&n.visibleAlpha>0,i.color=n.outlineColor,i.width=n.outlineWidth;let l;if(i.show&&n.positions&&n.positions.length>1){const A=n.positions[0][2];l=n.positions.map(c=>[c[0],c[1],A])}let u;if(n.positions&&n.positions.length>0?u=n.positions[0][2]:u=void 0,i.show&&l){const A=u,c=(u??0)+n.depth;i.positions=l.map(f=>[[f[0],f[1],A],[f[0],f[1],c]])}else i.positions=void 0};o();const r=this.disposeVar(h.createNextAnimateFrameEvent(n.showChanged,n.outlineChanged,n.outlineColorChanged,n.outlineWidthChanged,n.colorChanged,n.positionsChanged,n.visibleAlphaChanged));this.dispose(r.disposableOn(o))}}}class kD extends h.Destroyable{constructor(n,e){super();const i=this.disposeVar(new Xe(e,n.id));i.arcType="GEODESIC",i.loop=!0,this.dispose(h.track([i,"allowPicking"],[n,"allowPicking"])),this.dispose(h.bind([i,"depthTest"],[n,"depthTest"]));{const o=()=>{if(n.depth===void 0)throw new Error("sceneObject.depth === undefined");const a=n.show,s=n.outline;i.show=a&&s&&n.visibleAlpha>0,i.color=n.outlineColor,i.width=n.outlineWidth;let l;if(i.show&&n.positions&&n.positions.length>1){const A=n.positions[0][2];l=n.positions.map(c=>[c[0],c[1],A])}let u;if(n.positions&&n.positions.length>0?u=n.positions[0][2]:u=void 0,i.show&&l){const A=(u??0)+n.depth;i.positions=l.map(c=>[c[0],c[1],A])}else i.positions=void 0};o();const r=this.disposeVar(h.createNextAnimateFrameEvent(n.showChanged,n.outlineChanged,n.outlineColorChanged,n.outlineWidthChanged,n.colorChanged,n.positionsChanged,n.visibleAlphaChanged));this.dispose(r.disposableOn(o))}}}class QD extends h.Destroyable{constructor(e,i){super();z(this,"_innerPolygon");z(this,"_bottomPolyline");const o=e.ground;this._innerPolygon=this.disposeVar(new $1(e,i,!0,o)),this._bottomPolyline=this.disposeVar(new Y1(e,i,o)),this.disposeVar(new zD(e,i)),this.disposeVar(new kD(e,i)),this.dispose(e.flyToEvent.disposableOn(r=>{if(e.viewDistanceRange){const a=e.positionsCenter.center,s=(e.viewDistanceRange[1]+e.viewDistanceRange[2])/2;Fe(i.viewer,a,s,void 0,r)}else{const a=e.positionsCenter.center;if(!e.positions)return;const s=[a[0],a[1],e.positions[0][2]],l=e.positionsCenter.radius*4;Fe(i.viewer,s,l,void 0,r)}}))}get innerPolygon(){return this._innerPolygon}get bottomPolyline(){return this._bottomPolyline}}class VD extends h.Destroyable{constructor(e,i){super();z(this,"_innerPolygon");z(this,"_bottomPolyline");const o=e.ground;this._innerPolygon=this.disposeVar(new $1(e,i,!1,o)),this._bottomPolyline=this.disposeVar(new Y1(e,i,o)),this.dispose(e.flyToEvent.disposableOn(r=>{if(e.viewDistanceRange){const a=e.positionsCenter.center,s=(e.viewDistanceRange[1]+e.viewDistanceRange[2])/2;Fe(i.viewer,a,s,void 0,r)}else{const a=e.positionsCenter.center;if(!e.positions)return;const s=[a[0],a[1],e.positions[0][2]],l=e.positionsCenter.radius*4;Fe(i.viewer,s,l,void 0,r)}}))}get innerPolygon(){return this._innerPolygon}get bottomPolyline(){return this._bottomPolyline}}class Ir extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_polygonOrGroundPolygonResetting");z(this,"_czmViewVisibleDistanceRangeControl");z(this,"_id",this.disposeVar(h.react(h.createGuid())));z(this,"_positionsCenter");this._positionsCenter=this.ad(new jf(this.positionsReact)),this._czmViewVisibleDistanceRangeControl=this.disposeVar(new ro(e,[this,"viewDistanceRange"],this._positionsCenter.centerReact)),this.dispose(h.track([this._czmViewVisibleDistanceRangeControl,"debug"],[this,"viewDistanceDebug"]));const o=this.disposeVar(h.createNextAnimateFrameEvent(this.groundChanged,this.depthChanged,this.strokeGroundChanged));this._polygonOrGroundPolygonResetting=this.disposeVar(new h.ObjResettingWithEvent(o,()=>this.ground?new LD(this,e):this.depth!==void 0&&this.depth>0?new QD(this,e):new VD(this,e)))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get polygonOrGroundPolygonResetting(){return this._polygonOrGroundPolygonResetting}get czmViewVisibleDistanceRangeControl(){return this._czmViewVisibleDistanceRangeControl}get visibleAlpha(){return this._czmViewVisibleDistanceRangeControl.visibleAlpha}get visibleAlphaChanged(){return this._czmViewVisibleDistanceRangeControl.visibleAlphaChanged}get id(){return this._id.value}set id(e){this._id.value=e}get idChanged(){return this._id.changed}get positionsCenter(){return this._positionsCenter}}z(Ir,"defaults",{positions:[],viewDistanceRange:[1e3,1e4,3e4,6e4]}),(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,ground:!1,strokeGround:!1,outline:!0,outlineColor:h.reactArray([1,1,1,1]),outlineWidth:2,fill:!0,color:h.reactArray([1,1,1,.5]),positions:h.reactPositions(void 0),depth:0,zIndex:0,viewDistanceRange:h.reactArrayWithUndefined(void 0),viewDistanceDebug:!1,depthTest:!1})})(Ir||(Ir={})),h.extendClassProps(Ir.prototype,Ir.createDefaultProps);class ul extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}const r=this.disposeVar(Yn([this,"material"])),a=()=>{this._primitive&&(o.scene.primitives.remove(this._primitive),this._primitive=void 0)};this.dispose(a);const s=(f,d)=>{const p=new _.MaterialAppearance({material:d}),g=[],v=new _.GeometryInstance({geometry:new _.RectangleGeometry({rectangle:f,height:this.height,rotation:this.rotation&&_.Math.toRadians(this.rotation),extrudedHeight:this.extrudedHeight,stRotation:this.stRotation&&_.Math.toRadians(this.stRotation),vertexFormat:_.MaterialAppearance.MaterialSupport.ALL.vertexFormat}),id:this});g.push(v);const y=new _.Primitive({geometryInstances:g,appearance:p,asynchronous:!1,allowPicking:this.allowPicking??!1,compressVertices:!1});return _.Primitive.prototype&&(y.ESSceneObjectID=i),y},l=()=>{if(a(),!this.positions)return;const f=dt(this.positions);!f||!r.value||(this._primitive=s(f,r.value),this._primitive&&o.scene.primitives.add(this._primitive))},u=()=>{const f=this.show??!0;this._primitive&&(this._primitive.show=f)};l(),u();const A=this.disposeVar(h.createNextAnimateFrameEvent(this.positionsChanged,this.materialChanged,this.extrudedHeightChanged,this.heightChanged,this.stRotationChanged,this.rotationChanged,r.changed,this.allowPickingChanged));this.dispose(A.disposableOn(()=>{l(),u()}));const c=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged));this.dispose(c.disposableOn(()=>{u()})),this.dispose(this.flyToEvent.disposableOn(f=>{if(!e.actived||!this.positions)return;const d=dt(this.positions),p=_.BoundingSphere.fromRectangle3D(d,void 0,this.height);if(p.radius>0){const g=Ue(p.center);g&&Fe(o,g,p.radius*4,void 0,f)}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}}(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,material:h.reactJsonWithUndefined(void 0),positions:h.reactArrayWithUndefined(void 0),height:void 0,extrudedHeight:void 0,rotation:void 0,stRotation:void 0})})(ul||(ul={})),h.extendClassProps(ul.prototype,ul.createDefaultProps);const Cf=class Cf extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}const r=this.disposeVar(Yn([this,"material"],Cf.defaults.material)),a=()=>{this._primitive&&(o.scene.primitives.remove(this._primitive),this._primitive=void 0)};this.dispose(a);const s=(f,d)=>{const p=new _.MaterialAppearance({material:d}),g=[],v=new _.GeometryInstance({geometry:new _.RectangleGeometry({rectangle:f,rotation:this.rotation&&_.Math.toRadians(this.rotation),stRotation:this.stRotation&&_.Math.toRadians(this.stRotation),vertexFormat:_.MaterialAppearance.MaterialSupport.ALL.vertexFormat}),id:this});g.push(v);const y=new _.GroundPrimitive({geometryInstances:g,appearance:p,asynchronous:!1,allowPicking:this.allowPicking??!1,compressVertices:!1});return _.GroundPrimitive.prototype&&(y.ESSceneObjectID=i),y},l=()=>{if(a(),!this.positions)return;const f=dt(this.positions);!f||!r.value||(this._primitive=s(f,r.value),this._primitive&&o.scene.primitives.add(this._primitive))},u=()=>{const f=this.show??!0;this._primitive&&(this._primitive.show=f)};l(),u();const A=this.disposeVar(h.createNextAnimateFrameEvent(this.positionsChanged,this.materialChanged,this.stRotationChanged,this.rotationChanged,r.changed,this.allowPickingChanged));this.dispose(A.disposableOn(()=>{l(),u()}));const c=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged));this.dispose(c.disposableOn(()=>{u()})),this.dispose(this.flyToEvent.disposableOn(f=>{if(!e.actived||!this.positions)return;const d=dt(this.positions),p=_.BoundingSphere.fromRectangle3D(d,void 0,0);if(p.radius>0){const g=Ue(p.center);g&&Fe(o,g,p.radius*4,void 0,f)}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}};z(Cf,"defaults",{material:{type:"Color",color:[1,1,1,.5]}});let _o=Cf;(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,material:h.reactJsonWithUndefined(void 0),positions:h.reactArrayWithUndefined(void 0),rotation:void 0,stRotation:void 0})})(_o||(_o={})),h.extendClassProps(_o.prototype,_o.createDefaultProps);class cl extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}const r=()=>{this._primitive&&(o.scene.primitives.remove(this._primitive),this._primitive=void 0)};this.dispose(r);const a=new _.Color,s=f=>{const d=new _.PerInstanceColorAppearance({flat:!0,translucent:this.translucent??!0}),p=[],g=new _.GeometryInstance({geometry:new _.RectangleOutlineGeometry({rectangle:f,height:this.height??0,extrudedHeight:this.extrudedHeight,rotation:this.rotation&&_.Math.toRadians(this.rotation)}),attributes:{color:this.color?_.ColorGeometryInstanceAttribute.fromColor(Be(this.color,a)):_.ColorGeometryInstanceAttribute.fromColor(new _.Color(1,1,1,1))},id:this});p.push(g);const v=new _.Primitive({geometryInstances:p,appearance:d,asynchronous:!1,allowPicking:this.allowPicking??!1,compressVertices:!1});return _.Primitive.prototype&&(v.ESSceneObjectID=i),v},l=()=>{if(r(),!this.positions)return;const f=dt(this.positions);f&&(this._primitive=s(f),this._primitive&&o.scene.primitives.add(this._primitive))},u=()=>{const f=this.show??!0;this._primitive&&(this._primitive.show=f)};l(),u();const A=this.disposeVar(h.createNextAnimateFrameEvent(this.positionsChanged,this.colorChanged,this.translucentChanged,this.extrudedHeightChanged,this.heightChanged,this.rotationChanged,this.allowPickingChanged));this.dispose(A.disposableOn(()=>{l(),u()}));const c=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged));this.dispose(c.disposableOn(()=>{u()})),this.dispose(this.flyToEvent.disposableOn(f=>{if(!e.actived||!this.positions)return;const d=dt(this.positions),p=_.BoundingSphere.fromRectangle3D(d,void 0,this.height);if(p.radius>0){const g=Ue(p.center);g&&Fe(o,g,p.radius*4,void 0,f)}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}}(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,translucent:void 0,color:h.reactArrayWithUndefined(void 0),height:void 0,extrudedHeight:void 0,rotation:void 0,positions:h.reactArrayWithUndefined(void 0)})})(cl||(cl={})),h.extendClassProps(cl.prototype,cl.createDefaultProps);const $l=class $l extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));if(!e.viewer)return;const r=this.ad(new ul(e,i)),a=this.ad(new _o(e,i)),s=this.ad(new cl(e,i));this.dispose(h.track([r,"allowPicking"],[this,"allowPicking"])),this.dispose(h.track([a,"allowPicking"],[this,"allowPicking"]));{const l=()=>{const A=this.show??!0,c=this.ground??!1,f=this.outline??!1;s.show=A&&!c&&f,r.show=A&&!c,s.show?s.positions=this.rectangle:s.positions=void 0,r.show?r.positions=this.rectangle:r.positions=void 0,s.rotation=r.rotation=this.rotation,r.material=this.material??$l.defaults.material,r.stRotation=this.stRotation,s.extrudedHeight=r.extrudedHeight=this.extrudedHeight,s.height=r.height=this.height,s.color=this.outlineColor,s.translucent=this.outlineTranslucent,a.show=A&&c,a.show?a.positions=this.rectangle:a.positions=void 0,a.rotation=this.rotation,a.material=this.material??$l.defaults.material,a.stRotation=this.stRotation};l();const u=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged,this.outlineChanged,this.heightChanged,this.extrudedHeightChanged,this.materialChanged,this.rectangleChanged,this.outlineColorChanged,this.stRotationChanged,this.rotationChanged,this.outlineTranslucentChanged,this.groundChanged));this.dispose(u.disposableOn(()=>{l()})),this.dispose(this.flyToEvent.disposableOn(A=>{this.ground?a.flyTo(A):r.flyTo(A)}))}}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}};z($l,"defaults",{material:{type:"Color",color:[1,1,1,.5]},rectangle:void 0,extrudedHeight:void 0});let mi=$l;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outlineTranslucent:!0,outline:!1,outlineColor:h.reactArray([1,1,1,1]),height:0,extrudedHeight:void 0,material:h.reactJsonWithUndefined(void 0),rectangle:h.reactArrayWithUndefined(void 0),rotation:0,stRotation:0})})(mi||(mi={})),h.extendClassProps(mi.prototype,mi.createDefaultProps);const Yl=class Yl extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}this.dispose(()=>{this._primitive&&o.scene.primitives.remove(this._primitive),this._primitive=void 0});const r=this.disposeVar(Yn([this,"material"])),a=(c,f)=>{if(!c||!this.radius)return;const d=new _.MaterialAppearance({material:f}),p=[],g=()=>{let E=this.granularity??Yl.defaults.granularity;return this.granularity===0&&console.error("granularity不能设置为0"),E=E|0,E=Math.max(1,E),_.Math.toRadians(E)},v=new _.GeometryInstance({geometry:new _.CircleGeometry({center:c,height:this.height,extrudedHeight:this.extrudedHeight,radius:this.radius,stRotation:this.stRotation&&_.Math.toRadians(this.stRotation),vertexFormat:_.MaterialAppearance.MaterialSupport.ALL.vertexFormat,ellipsoid:this.ellipsoid&&je(this.ellipsoid),granularity:g()}),id:this}),y=ot({initialRotation:"yForwardzUp",rotation:[0,0,0],position:this.position}),m=ot({initialRotation:"yForwardzUp",rotation:this.rotation?[this.rotation[0],this.rotation[2],-this.rotation[1]]:[0,0,0],position:this.position});if(!m||!y){console.warn("modelMatrix is undefined!");return}const b=_.Matrix4.inverseTransformation(y,new _.Matrix4);_.Matrix4.multiply(m,b,v.modelMatrix),p.push(v);const x=new _.Primitive({geometryInstances:p,appearance:d,asynchronous:!1,allowPicking:this.allowPicking??Yl.defaults.allowPicking,compressVertices:!1});return _.Primitive.prototype&&(x.ESSceneObjectID=i),x},s=()=>{if(this._primitive&&o.scene.primitives.remove(this._primitive),this._primitive=void 0,!this.position)return;const c=At(this.position);!c||!r.value||(this._primitive=a(c,r.value),this._primitive&&o.scene.primitives.add(this._primitive))},l=()=>{const c=this.show??!0;this._primitive&&(this._primitive.show=c)};s(),l();const u=this.disposeVar(h.createNextAnimateFrameEvent(this.allowPickingChanged,this.positionChanged,this.radiusChanged,this.materialChanged,this.extrudedHeightChanged,this.heightChanged,this.ellipsoidChanged,this.granularityChanged,this.stRotationChanged,r.changed,this.rotationChanged));this.dispose(u.disposableOn(()=>{s(),l()}));const A=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged));this.dispose(A.disposableOn(()=>{l()})),this.dispose(this.flyToEvent.disposableOn(()=>{if(!this.position){console.warn("GeoPoint当前没有位置信息,无法飞入!");return}if(this.radius)Fe(o,this.position,this.radius*4,void 0,1e3);else{const c=o.scene.camera.positionCartographic.height;Fe(o,this.position,c,void 0,1e3)}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}};z(Yl,"defaults",{show:!0,allowPicking:!1,translucent:!0,outlineColor:[1,1,1,1],position:[0,0,0],height:0,extrudedHeight:0,radius:0,stRotation:0,ellipsoid:[6378137,6378137,6356752314245179e-9],granularity:1});let Fr=Yl;(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,material:h.reactJson({type:"Color"}),position:h.reactArrayWithUndefined(void 0),rotation:h.reactArray([0,0,0]),height:void 0,extrudedHeight:void 0,radius:void 0,stRotation:void 0,ellipsoid:void 0,granularity:void 0})})(Fr||(Fr={})),h.extendClassProps(Fr.prototype,Fr.createDefaultProps);const Ko=class Ko extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}this.dispose(()=>{this._primitive&&o.scene.primitives.remove(this._primitive),this._primitive=void 0});const r=this.disposeVar(Yn([this,"material"],Ko.defaults.material)),a=(c,f)=>{if(!c||!this.radius)return;const d=new _.MaterialAppearance({material:f}),p=[],g=()=>{let m=this.granularity??Ko.defaults.granularity;return this.granularity===0&&console.error("granularity不能设置为0"),m=m|0,m=Math.max(1,m),_.Math.toRadians(m)},v=new _.GeometryInstance({geometry:new _.CircleGeometry({center:c,radius:this.radius,stRotation:this.stRotation&&_.Math.toRadians(this.stRotation),granularity:g(),vertexFormat:_.MaterialAppearance.MaterialSupport.ALL.vertexFormat,ellipsoid:this.ellipsoid&&je(this.ellipsoid)}),id:this});p.push(v);const y=new _.GroundPrimitive({geometryInstances:p,appearance:d,asynchronous:!1,allowPicking:this.allowPicking??Ko.defaults.allowPicking,compressVertices:!1});return _.GroundPrimitive.prototype&&(y.ESSceneObjectID=i),y},s=()=>{if(this._primitive&&o.scene.primitives.remove(this._primitive),this._primitive=void 0,!this.position||!this.radius||!r.value)return;const c=At(this.position);this._primitive=a(c,r.value),this._primitive&&o.scene.primitives.add(this._primitive)},l=()=>{const c=this.show??Ko.defaults.show;this._primitive&&(this._primitive.show=c)};s(),l();const u=this.disposeVar(h.createNextAnimateFrameEvent(this.allowPickingChanged,this.positionChanged,this.radiusChanged,this.stRotationChanged,this.granularityChanged,this.ellipsoidChanged,this.materialChanged,r.changed));this.dispose(u.disposableOn(()=>{s(),l()}));const A=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged));this.dispose(A.disposableOn(()=>{l()})),this.dispose(this.flyToEvent.disposableOn(()=>{if(!this.position){console.warn("GeoPoint当前没有位置信息,无法飞入!");return}if(this.radius)Fe(o,this.position,this.radius*4,void 0,1e3);else{const c=o.scene.camera.positionCartographic.height;Fe(o,this.position,c,void 0,1e3)}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}};z(Ko,"defaults",{show:!0,allowPicking:!1,material:{type:"Color",color:[1,1,1,.5]},radius:0,stRotation:0,ellipsoid:[6378137,6378137,6356752314245179e-9],granularity:1});let Mr=Ko;(t=>{t.createDefaultProps=()=>({show:void 0,allowPicking:void 0,material:h.reactJsonWithUndefined(void 0),granularity:void 0,position:h.reactArrayWithUndefined(void 0),rotation:h.reactArray([0,0,0]),radius:void 0,stRotation:void 0,ellipsoid:void 0})})(Mr||(Mr={})),h.extendClassProps(Mr.prototype,Mr.createDefaultProps);const Jl=class Jl extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));z(this,"_primitive");const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}this.dispose(()=>{this._primitive&&o.scene.primitives.remove(this._primitive),this._primitive=void 0});const r=new _.Color,a=c=>{if(!c||!this.radius)return;const f=new _.PerInstanceColorAppearance({flat:!0,translucent:this.translucent??!0}),d=[],p=_.ColorGeometryInstanceAttribute.fromColor(_.Color.WHITE),g=()=>{let E=this.granularity??Jl.defaults.granularity;return this.granularity===0&&console.error("granularity不能设置为0"),E=E|0,E=Math.max(1,E),_.Math.toRadians(E)},v=new _.GeometryInstance({geometry:new _.CircleOutlineGeometry({center:c,radius:this.radius,height:this.height,extrudedHeight:this.extrudedHeight,ellipsoid:this.ellipsoid&&je(this.ellipsoid),granularity:g(),numberOfVerticalLines:this.numberOfVerticalLines}),attributes:{color:this.outlineColor?_.ColorGeometryInstanceAttribute.fromColor(Be(this.outlineColor,r)):p},id:this}),y=ot({initialRotation:"yForwardzUp",rotation:[0,0,0],position:this.position}),m=ot({initialRotation:"yForwardzUp",rotation:this.rotation?[this.rotation[0],this.rotation[2],-this.rotation[1]]:[0,0,0],position:this.position});if(!m||!y){console.warn("modelMatrix is undefined!");return}const b=_.Matrix4.inverseTransformation(y,new _.Matrix4);_.Matrix4.multiply(m,b,v.modelMatrix),d.push(v);const x=new _.Primitive({geometryInstances:d,appearance:f,asynchronous:!1,allowPicking:this.allowPicking??Jl.defaults.allowPicking,compressVertices:!1});return _.Primitive.prototype&&(x.ESSceneObjectID=i),x},s=()=>{if(this._primitive&&o.scene.primitives.remove(this._primitive),this._primitive=void 0,!this.position)return;const c=At(this.position);c&&(this._primitive=a(c),this._primitive&&o.scene.primitives.add(this._primitive))},l=()=>{const c=this.show??!0;this._primitive&&(this._primitive.show=c)};s(),l();const u=this.disposeVar(h.createNextAnimateFrameEvent(this.allowPickingChanged,this.positionChanged,this.radiusChanged,this.extrudedHeightChanged,this.heightChanged,this.outlineColorChanged,this.translucentChanged,this.ellipsoidChanged,this.granularityChanged,this.numberOfVerticalLinesChanged,this.rotationChanged));this.dispose(u.disposableOn(()=>{s(),l()}));const A=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged));this.dispose(A.disposableOn(()=>{l()})),this.dispose(this.flyToEvent.disposableOn(()=>{if(!this.position){console.warn("GeoPoint当前没有位置信息,无法飞入!");return}const c=o.scene.camera.positionCartographic.height;Fe(o,this.position,c,void 0,1e3)}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}};z(Jl,"defaults",{show:!0,translucent:!0,allowPicking:!1,outlineColor:[1,1,1,1],position:[0,0,0],height:0,extrudedHeight:0,radius:0,ellipsoid:[6378137,6378137,6356752314245179e-9],granularity:1,numberOfVerticalLines:0});let Dr=Jl;(t=>{t.createDefaultProps=()=>({show:!0,translucent:void 0,allowPicking:void 0,outlineColor:h.reactArrayWithUndefined(void 0),position:h.reactArrayWithUndefined(void 0),rotation:h.reactArray([0,0,0]),height:void 0,extrudedHeight:void 0,radius:void 0,ellipsoid:void 0,granularity:void 0,numberOfVerticalLines:void 0})})(Dr||(Dr={})),h.extendClassProps(Dr.prototype,Dr.createDefaultProps);class Co extends h.Destroyable{constructor(e,i){super();z(this,"_flyToEvent",this.disposeVar(new h.Event));if(!e.viewer)return;const r=this.ad(new Fr(e,i)),a=this.ad(new Mr(e,i)),s=this.ad(new Dr(e,i));this.dispose(h.track([r,"allowPicking"],[this,"allowPicking"])),this.dispose(h.track([a,"allowPicking"],[this,"allowPicking"])),this.dispose(h.track([s,"allowPicking"],[this,"allowPicking"]));{const l=()=>{const A=this.show??!0,c=this.ground??!1,f=this.outline??!1;s.show=A&&!c&&f,r.show=A&&!c,s.show?s.position=this.position:s.position=void 0,r.show?r.position=this.position:r.position=void 0,r.rotation=s.rotation=this.rotation,s.radius=r.radius=this.radius,s.extrudedHeight=r.extrudedHeight=this.extrudedHeight,this.position&&(s.height=r.height=this.position[2]),this.granularity===0&&(console.error("granularity不能设置为0"),this.granularity=1),r.granularity=s.granularity=this.granularity,r.ellipsoid=s.ellipsoid=this.ellipsoid,r.material=this.material,r.stRotation=this.stRotation,s.outlineColor=this.outlineColor,s.translucent=this.outlineTranslucent,s.numberOfVerticalLines=this.numberOfVerticalLines,a.show=A&&c,a.show?a.position=this.position:a.position=void 0,a.radius=this.radius,this.granularity===0?(console.error("granularity不能设置为0"),a.granularity=1):a.granularity=this.granularity,a.rotation=this.rotation,a.ellipsoid=this.ellipsoid,a.material=this.material,a.stRotation=this.stRotation};l();const u=this.disposeVar(h.createNextAnimateFrameEvent(this.showChanged,this.radiusChanged,this.outlineChanged,this.extrudedHeightChanged,this.materialChanged,this.positionChanged,this.outlineColorChanged,this.stRotationChanged,this.outlineTranslucentChanged,this.ellipsoidChanged,this.granularityChanged,this.numberOfVerticalLinesChanged,this.groundChanged,this.rotationChanged));this.dispose(u.disposableOn(l)),this.dispose(this.flyToEvent.disposableOn(A=>{this.ground?a.flyTo(A):r.flyTo(A)}))}}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}}z(Co,"defaults",{extrudedHeight:void 0}),(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,ground:!1,outline:!0,outlineTranslucent:!0,extrudedHeight:void 0,outlineColor:h.reactArray([1,1,1,1]),material:h.reactJson({type:"Color",color:[1,1,1,.5]}),position:h.reactArrayWithUndefined(void 0),rotation:h.reactArray([0,0,0]),radius:0,stRotation:0,ellipsoid:h.reactArray([6378137,6378137,6356752314245179e-9]),granularity:1,numberOfVerticalLines:0})})(Co||(Co={})),h.extendClassProps(Co.prototype,Co.createDefaultProps);class hl extends h.Destroyable{constructor(e,i){super();z(this,"_primitive");z(this,"_flyToEvent",this.dv(new h.Event));const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}if(!Dn(e.viewer))return;const a=_.buildModuleUrl("Assets/Textures/waterNormalsSmall.jpg"),s=()=>{this._primitive&&(o.scene.primitives.remove(this._primitive),this._primitive=void 0)};this.d(s);const l=()=>{const b={baseWaterColor:Be(this.waterColor),normalMap:a,frequency:this.frequency,animationSpeed:this.waveVelocity,amplitude:this.amplitude,specularIntensity:this.specularIntensity};return new _.Material({fabric:{type:"Water",uniforms:b}})},u=()=>{if(!this.points)return;const b={positions:this.points},x=new _.PolygonGeometry({polygonHierarchy:Li(b),vertexFormat:_.MaterialAppearance.MaterialSupport.ALL.vertexFormat,height:this.height});return new _.GeometryInstance({geometry:x,id:this})},A=()=>{if(!this.points)return;const b=new _.EllipsoidSurfaceAppearance({material:l(),aboveGround:!0}),x=u();let E;return this.ground??!1?E=new _.GroundPrimitive({geometryInstances:x,appearance:b,asynchronous:!1,allowPicking:this.allowPicking,compressVertices:!1}):E=new _.Primitive({geometryInstances:x,appearance:b,asynchronous:!1,allowPicking:this.allowPicking,compressVertices:!1}),_.Primitive.prototype&&_.GroundPrimitive.prototype&&(E.ESSceneObjectID=i),E},c=new _.BoundingSphere,f=()=>{s(),d(c),this._primitive=A(),this._primitive&&o.scene.primitives.add(this._primitive)},d=b=>{if(!this.points)return;const x=Wt(this.points);if(x.length<3){b.radius=-1;return}_.BoundingSphere.fromPoints(x,b)},p=()=>{const b=this.show??!0;this._primitive&&(this._primitive.show=b)},g=()=>{f(),p()};g();let v=h.debounce(g,500);const y=this.dv(h.createNextAnimateFrameEvent(this.waterColorChanged,this.frequencyChanged,this.amplitudeChanged,this.specularIntensityChanged,this.waveVelocityChanged,this.groundChanged,this.allowPickingChanged));this.d(y.don(g));const m=this.dv(h.createNextAnimateFrameEvent(this.pointsChanged,this.heightChanged));this.d(m.don(()=>{if(!this.points){s();return}this._primitive&&!this.ground?(this._primitive._state=3,this._primitive._appearance=void 0,this._primitive.geometryInstances=u(),d(c),v&&v[0]()):g()})),this.d(this.showChanged.don(p)),this.d(this.flyToEvent.don(b=>{if(c.radius>0){const x=Ue(c.center);x&&Fe(o,x,c.radius*4,void 0,b)}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}}(t=>{t.createDefaultProps=()=>({show:!0,points:h.reactPositions(void 0),height:void 0,allowPicking:!0,ground:!1,waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,baseWaterImage:h.reactJsonWithUndefined(void 0),flowSpeed:0})})(hl||(hl={})),h.extendClassProps(hl.prototype,hl.createDefaultProps);class So extends h.Destroyable{constructor(e,i){super();z(this,"_primitive");z(this,"_flyToEvent",this.dv(new h.Event));z(this,"_updateBoundingSphereEvent",this.ad(new h.Event));const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}const r=new _.BoundingSphere,a=()=>{this._primitive&&o.scene.primitives.remove(this._primitive),this._primitive=void 0};this.d(a);const s=b=>h.ESSceneObject.context.getStrFromEnv(b),l=()=>{this._primitive=new _[this.ground?"GroundPrimitive":"Primitive"]({compressVertices:!1,asynchronous:!1,allowPicking:this.allowPicking,geometryInstances:f()}),_.Primitive.prototype&&(this._primitive.ESSceneObjectID=i),o.scene.primitives.add(this._primitive)},u=()=>{var B;const b=s(this.normalMap??_.buildModuleUrl("Assets/Textures/waterNormalsSmall.jpg")),x={baseWaterColor:Be(this.waterColor??[.25,.6,1,.7]),normalMap:b,frequency:this.frequency,animationSpeed:this.animationSpeed,amplitude:this.amplitude,specularIntensity:this.specularIntensity};if(this.blendColor&&(x.blendColor=Be(this.blendColor)),this.specularMap&&(x.specularMap=s(this.specularMap)),this.points&&this.points.length>=1){const{maxPos:P,minPos:I}=h.getMinMaxCorner(this.points),O=h.getDistancesFromPositions([I,[P[0],P[1],I[2]]],"GEODESIC")[0],M=h.getDistancesFromPositions([I,[I[0],P[1],P[2]]],"GEODESIC")[0];this.baseWaterImage&&(this.baseWaterImage.url&&(x.baseWaterImage=s(this.baseWaterImage.url)),this.baseWaterImage.uDis&&(x.repeatX=O/this.baseWaterImage.uDis),this.baseWaterImage.vDis&&(x.repeatY=M/this.baseWaterImage.vDis)),x.flowSpeed=this.flowSpeed/(((B=this.baseWaterImage)==null?void 0:B.uDis)??O)}if(this._primitive&&this._primitive.appearance){this._primitive.appearance.material.uniforms=Object.assign({},this._primitive.appearance.material.uniforms,x);return}const E=new _.EllipsoidSurfaceAppearance({material:C0(x),aboveGround:!0});this._primitive&&(this._primitive.appearance=E)},A=this.ad(h.createNextAnimateFrameEvent(this.baseWaterImageChanged,this.waterColorChanged,this.blendColorChanged,this.specularMapChanged,this.flowSpeedChanged,this.normalMapChanged,this.frequencyChanged,this.animationSpeedChanged,this.amplitudeChanged,this.specularIntensityChanged));this.ad(A.don(u));const c=b=>{if(!this.points)return;const x=Wt(this.points);if(x.length<3){b.radius=-1;return}_.BoundingSphere.fromPoints(x,b)},f=()=>{if(!this.points||this.points.length<3)return;const{minPos:b}=h.getMinMaxCorner(this.points),[x]=An({originPosition:b},this.points),{minPos:E,maxPos:B}=h.getMinMaxCorner(x),P=B[0]-E[0],I=B[1]-E[1],O={positions:this.points},M=new _.PolygonGeometry({polygonHierarchy:Li(O),vertexFormat:_.VertexFormat.DEFAULT,stRotation:this.stRotation&&_.Math.toRadians(this.stRotation),perPositionHeight:!0,attributes:{st:new _.GeometryAttribute({componentDatatype:_.ComponentDatatype.FLOAT,componentsPerAttribute:2,values:new Float32Array(x.map(T=>[_.Math.clamp(T[0]/P,0,1),_.Math.clamp(T[1]/I,0,1)]).flat())})}});return new _.GeometryInstance({id:this,geometry:M})},d=()=>{this._primitive&&(this._primitive.show=this.show??!0)},p=this.ad(h.createNextAnimateFrameEvent(this.showChanged));this.ad(p.don(d));const g=this.ad(()=>{a(),l(),d(),u(),c(r)});g();const v=this.ad(h.createNextAnimateFrameEvent(this.allowPickingChanged,this.groundChanged));this.ad(v.don(g)),this.ad(new h.ObjResettingWithEvent(this.updateBoundingSphereEvent,b=>{const x=new h.Destroyable;return b?x.ad(o.scene.preUpdate.addEventListener(()=>{const E=o.camera;o.camera.frustum.computeCullingVolume(E.position,E.direction,E.up).computeVisibility(r)===_.Intersect.OUTSIDE&&g()})):(g(),x.ad(this.pointsChanged.don(g))),x}));const y=()=>{if(!this.points||this.points.length<3){g();return}this._primitive instanceof _.Primitive?(this._primitive._state=3,this._primitive._appearance=void 0):this._primitive._primitive=void 0,this._primitive.geometryInstances=f(),this._primitive._recomputeBoundingSpheres=!0},m=this.dv(h.createNextAnimateFrameEvent(this.pointsChanged,this.stRotationChanged));this.d(m.don(y)),this.d(this.flyToEvent.don(b=>{if(r.radius>0){const x=Ue(r.center);x&&Fe(o,x,r.radius*4,void 0,b)}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get updateBoundingSphereEvent(){return this._updateBoundingSphereEvent}updateBoundingSphere(e){this._updateBoundingSphereEvent.emit(e)}}(t=>{t.createDefaultProps=()=>({show:!0,points:h.reactPositions(void 0),allowPicking:!0,waterColor:[.1497,.165,.0031,1],blendColor:h.reactArrayWithUndefined(void 0),specularMap:void 0,normalMap:_.buildModuleUrl("Assets/Textures/waterNormalsSmall.jpg"),frequency:1e3,animationSpeed:.005,amplitude:10,specularIntensity:.3,baseWaterImage:h.reactJsonWithUndefined(void 0),flowSpeed:0,stRotation:void 0,ground:void 0})})(So||(So={})),h.extendClassProps(So.prototype,So.createDefaultProps);class Eo extends h.Destroyable{constructor(e,i){super();z(this,"pointPrimitives");z(this,"_flyToEvent",this.dv(new h.Event));const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}if(!Dn(e.viewer))return;let{pointPrimitives:a}=this;const s=()=>{a&&(a.removeAll(),o.scene.primitives.remove(a),a=void 0)};this.d(s);const l=()=>{const p=new _.PointPrimitiveCollection({show:this.show??!0,debugShowBoundingVolume:this.debugShowBoundingVolume??!1,blendOption:(this.blendOption&&jt.blendOptionType[this.blendOption])??_.BlendOption.OPAQUE_AND_TRANSLUCENT});return this.pointPrimitiveOptions&&(this.pointPrimitiveOptions.forEach(v=>{p.add({show:v.show??!0,color:v.color&&Be(v.color),disableDepthTestDistance:v.disableDepthTestDistance,distanceDisplayCondition:v.distanceDisplayCondition&&Da(v.distanceDisplayCondition),outlineColor:v.outlineColor&&Be(v.outlineColor),outlineWidth:v.outlineWidth,pixelSize:v.pixelSize,position:v.position&&At(v.position),scaleByDistance:v.scaleByDistance&&ur(v.scaleByDistance),translucencyByDistance:v.translucencyByDistance&&ur(v.translucencyByDistance)})}),_.PointPrimitiveCollection.prototype&&(p.ESSceneObjectID=i)),p},u=()=>{s(),a=l(),o.scene.primitives.add(a)};u();const A=this.dv(h.createNextAnimateFrameEvent(this.showChanged,this.debugShowBoundingVolumeChanged,this.blendOptionChanged)),c=()=>{a&&(a.show=this.show??!0,a.debugShowBoundingVolume=this.debugShowBoundingVolume??!1,a.blendOption=(this.blendOption&&jt.blendOptionType[this.blendOption])??_.BlendOption.OPAQUE_AND_TRANSLUCENT)};this.d(A.don(c));const f=this.dv(h.createNextAnimateFrameEvent(this.pointPrimitiveOptionsChanged));this.d(f.don(u));const d=new _.BoundingSphere;this.d(this.flyToEvent.don(p=>{if(!(!e.actived||!this.pointPrimitiveOptions))if(A.flush(),f.flush(),this.pointPrimitiveOptions.length===1){const g=this.pointPrimitiveOptions[0].position;if(!g)return;const v=o.scene.camera.positionCartographic.height;Fe(o,g,v,void 0,p)}else{const g=this.pointPrimitiveOptions,v=[];g.forEach(m=>{m.position&&v.push(m.position)});const y=Wt(v);if(_.BoundingSphere.fromPoints(y,d),d.radius>0){const m=Ue(d.center);m&&Fe(o,m,d.radius*4,void 0,p)}}}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}}(t=>{t.createDefaultProps=()=>({show:void 0,debugShowBoundingVolume:void 0,blendOption:void 0,pointPrimitiveOptions:void 0,position:h.reactArrayWithUndefined(void 0),rotation:h.reactArrayWithUndefined(void 0),scale:h.reactArrayWithUndefined(void 0),localPosition:h.reactArrayWithUndefined(void 0),localRotation:h.reactArrayWithUndefined(void 0),localScale:h.reactArrayWithUndefined(void 0),localModelMatrix:h.reactArrayWithUndefined(void 0),modelMatrix:h.reactArrayWithUndefined(void 0)})})(Eo||(Eo={})),h.extendClassProps(Eo.prototype,Eo.createDefaultProps);class ND extends h.Destroyable{constructor(n,e){super();const i=e.viewer;if(!i)throw new Error("!viewer");const o=ze.czmJulianDateToTimeStamp,r=ze.getClockRange,a=ze.getClockStep;{const s=()=>i.clockViewModel.startTime=_.JulianDate.fromDate(new Date(n.startTime??h.getDefaultValue(ze.defaults.startTime)));s(),this.dispose(ui(i.clockViewModel,"startTime",l=>n.startTime=o(l))),this.dispose(n.startTimeChanged.disposableOn(s))}{const s=()=>i.clockViewModel.stopTime=_.JulianDate.fromDate(new Date(n.stopTime??h.getDefaultValue(ze.defaults.stopTime)));s(),this.dispose(ui(i.clockViewModel,"stopTime",l=>n.stopTime=o(l))),this.dispose(n.stopTimeChanged.disposableOn(s))}{const s=()=>i.clockViewModel.currentTime=_.JulianDate.fromDate(new Date(n.currentTime??h.getDefaultValue(ze.defaults.currentTime)));s(),this.dispose(ui(i.clockViewModel,"currentTime",l=>n.currentTime=o(l))),this.dispose(n.currentTimeChanged.disposableOn(s))}{const s=()=>i.clockViewModel.multiplier=n.multiplier??ze.defaults.multiplier;s(),this.dispose(ui(i.clockViewModel,"multiplier",l=>{(n.multiplier??ze.defaults.multiplier!==l)&&(n.multiplier=l)})),this.dispose(n.currentTimeChanged.disposableOn(s))}{const s=()=>i.clockViewModel.clockStep=_.ClockStep[n.clockStep??ze.defaults.clockStep];s(),this.dispose(ui(i.clockViewModel,"clockStep",l=>{const u=a(l);(n.clockStep??ze.defaults.clockStep!==u)&&(n.clockStep=u)})),this.dispose(n.clockStepChanged.disposableOn(s))}{const s=()=>i.clockViewModel.clockRange=_.ClockRange[n.clockRange??ze.defaults.clockRange];s(),this.dispose(ui(i.clockViewModel,"clockRange",l=>{const u=r(l);(n.clockRange??ze.defaults.clockRange!==u)&&(n.clockRange=u)})),this.dispose(n.clockRangeChanged.disposableOn(s))}{const s=()=>i.clockViewModel.shouldAnimate=n.shouldAnimate??ze.defaults.shouldAnimate;s(),this.dispose(ui(i.clockViewModel,"shouldAnimate",l=>{(n.shouldAnimate??ze.defaults.shouldAnimate!==l)&&(n.shouldAnimate=l)})),this.dispose(n.shouldAnimateChanged.disposableOn(s))}}}const Zo=class Zo extends h.Destroyable{constructor(n){super(),this.disposeVar(new h.ObjResettingWithEvent(this.enabledChanged,()=>{if(this.enabled??Zo.defaults.enabled)return new ND(this,n)}))}};z(Zo,"czmJulianDateToTimeStamp",HD),z(Zo,"getClockRange",GD),z(Zo,"getClockStep",WD),z(Zo,"defaults",{enabled:!1,startTime:()=>Date.now(),stopTime:()=>Date.now()+864e5,currentTime:()=>Date.now(),multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1});let ze=Zo;(t=>{t.createDefaultProps=()=>({enabled:void 0,startTime:void 0,stopTime:void 0,currentTime:void 0,multiplier:void 0,clockStep:void 0,clockRange:void 0,shouldAnimate:void 0})})(ze||(ze={})),h.extendClassProps(ze.prototype,ze.createDefaultProps);function HD(t){return _.JulianDate.toDate(t).getTime()}function GD(t){if(t===_.ClockRange.CLAMPED)return"CLAMPED";if(t===_.ClockRange.LOOP_STOP)return"LOOP_STOP";if(t===_.ClockRange.UNBOUNDED)return"UNBOUNDED";throw new Error(`getClockRange error: ${t}`)}function WD(t){if(t===_.ClockStep.SYSTEM_CLOCK)return"SYSTEM_CLOCK";if(t===_.ClockStep.SYSTEM_CLOCK_MULTIPLIER)return"SYSTEM_CLOCK_MULTIPLIER";if(t===_.ClockStep.TICK_DEPENDENT)return"TICK_DEPENDENT";throw new Error(`clockStep未知类型: ${t}`)}function ne(t){return t!=null}function pe(t){this.name="DeveloperError",this.message=t;let n;try{throw new Error}catch(e){n=e.stack}this.stack=n}ne(Object.create)&&(pe.prototype=Object.create(Error.prototype),pe.prototype.constructor=pe),pe.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return ne(this.stack)&&(t+=`
|
|
341
|
-
${this.stack.toString()}`),t},pe.throwInstantiationError=function(){throw new pe("This function defines an interface and should not be called directly.")};const N={};N.typeOf={};function jD(t){return`${t} is required, actual value was undefined`}function Fs(t,n,e){return`Expected ${e} to be typeof ${n}, actual typeof was ${t}`}N.defined=function(t,n){if(!ne(n))throw new pe(jD(t))},N.typeOf.func=function(t,n){if(typeof n!="function")throw new pe(Fs(typeof n,"function",t))},N.typeOf.string=function(t,n){if(typeof n!="string")throw new pe(Fs(typeof n,"string",t))},N.typeOf.number=function(t,n){if(typeof n!="number")throw new pe(Fs(typeof n,"number",t))},N.typeOf.number.lessThan=function(t,n,e){if(N.typeOf.number(t,n),n>=e)throw new pe(`Expected ${t} to be less than ${e}, actual value was ${n}`)},N.typeOf.number.lessThanOrEquals=function(t,n,e){if(N.typeOf.number(t,n),n>e)throw new pe(`Expected ${t} to be less than or equal to ${e}, actual value was ${n}`)},N.typeOf.number.greaterThan=function(t,n,e){if(N.typeOf.number(t,n),n<=e)throw new pe(`Expected ${t} to be greater than ${e}, actual value was ${n}`)},N.typeOf.number.greaterThanOrEquals=function(t,n,e){if(N.typeOf.number(t,n),n<e)throw new pe(`Expected ${t} to be greater than or equal to ${e}, actual value was ${n}`)},N.typeOf.object=function(t,n){if(typeof n!="object")throw new pe(Fs(typeof n,"object",t))},N.typeOf.bool=function(t,n){if(typeof n!="boolean")throw new pe(Fs(typeof n,"boolean",t))},N.typeOf.bigint=function(t,n){if(typeof n!="bigint")throw new pe(Fs(typeof n,"bigint",t))},N.typeOf.number.equals=function(t,n,e,i){if(N.typeOf.number(t,e),N.typeOf.number(n,i),e!==i)throw new pe(`${t} must be equal to ${n}, the actual values are ${e} and ${i}`)};var J1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Al(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ud,eb;function qD(){if(eb)return ud;eb=1;var t=function(n){n==null&&(n=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,n.constructor==Array?this.init_by_array(n,n.length):this.init_seed(n)};return t.prototype.init_seed=function(n){for(this.mt[0]=n>>>0,this.mti=1;this.mti<this.N;this.mti++){var n=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((n&4294901760)>>>16)*1812433253<<16)+(n&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},t.prototype.init_by_array=function(n,e){var i,o,r;for(this.init_seed(19650218),i=1,o=0,r=this.N>e?this.N:e;r;r--){var a=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+n[o]+o,this.mt[i]>>>=0,i++,o++,i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1),o>=e&&(o=0)}for(r=this.N-1;r;r--){var a=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-i,this.mt[i]>>>=0,i++,i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1)}this.mt[0]=2147483648},t.prototype.random_int=function(){var n,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_seed(5489),i=0;i<this.N-this.M;i++)n=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^n>>>1^e[n&1];for(;i<this.N-1;i++)n=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^n>>>1^e[n&1];n=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^n>>>1^e[n&1],this.mti=0}return n=this.mt[this.mti++],n^=n>>>11,n^=n<<7&2636928640,n^=n<<15&4022730752,n^=n>>>18,n>>>0},t.prototype.random_int31=function(){return this.random_int()>>>1},t.prototype.random_incl=function(){return this.random_int()*23283064370807974e-26},t.prototype.random=function(){return this.random_int()*23283064365386963e-26},t.prototype.random_excl=function(){return(this.random_int()+.5)*23283064365386963e-26},t.prototype.random_long=function(){var n=this.random_int()>>>5,e=this.random_int()>>>6;return(n*67108864+e)*11102230246251565e-32},ud=t,ud}var KD=qD();const tb=Al(KD),he={};he.EPSILON1=.1,he.EPSILON2=.01,he.EPSILON3=.001,he.EPSILON4=1e-4,he.EPSILON5=1e-5,he.EPSILON6=1e-6,he.EPSILON7=1e-7,he.EPSILON8=1e-8,he.EPSILON9=1e-9,he.EPSILON10=1e-10,he.EPSILON11=1e-11,he.EPSILON12=1e-12,he.EPSILON13=1e-13,he.EPSILON14=1e-14,he.EPSILON15=1e-15,he.EPSILON16=1e-16,he.EPSILON17=1e-17,he.EPSILON18=1e-18,he.EPSILON19=1e-19,he.EPSILON20=1e-20,he.EPSILON21=1e-21,he.GRAVITATIONALPARAMETER=3986004418e5,he.SOLAR_RADIUS=6955e5,he.LUNAR_RADIUS=1737400,he.SIXTY_FOUR_KILOBYTES=65536,he.FOUR_GIGABYTES=4294967296,he.sign=Math.sign??function(n){return n=+n,n===0||n!==n?n:n>0?1:-1},he.signNotZero=function(t){return t<0?-1:1},he.toSNorm=function(t,n){return n=n??255,Math.round((he.clamp(t,-1,1)*.5+.5)*n)},he.fromSNorm=function(t,n){return n=n??255,he.clamp(t,0,n)/n*2-1},he.normalize=function(t,n,e){return e=Math.max(e-n,0),e===0?0:he.clamp((t-n)/e,0,1)},he.sinh=Math.sinh??function(n){return(Math.exp(n)-Math.exp(-n))/2},he.cosh=Math.cosh??function(n){return(Math.exp(n)+Math.exp(-n))/2},he.lerp=function(t,n,e){return(1-e)*t+e*n},he.PI=Math.PI,he.ONE_OVER_PI=1/Math.PI,he.PI_OVER_TWO=Math.PI/2,he.PI_OVER_THREE=Math.PI/3,he.PI_OVER_FOUR=Math.PI/4,he.PI_OVER_SIX=Math.PI/6,he.THREE_PI_OVER_TWO=3*Math.PI/2,he.TWO_PI=2*Math.PI,he.ONE_OVER_TWO_PI=1/(2*Math.PI),he.RADIANS_PER_DEGREE=Math.PI/180,he.DEGREES_PER_RADIAN=180/Math.PI,he.RADIANS_PER_ARCSECOND=he.RADIANS_PER_DEGREE/3600,he.toRadians=function(t){if(!ne(t))throw new pe("degrees is required.");return t*he.RADIANS_PER_DEGREE},he.toDegrees=function(t){if(!ne(t))throw new pe("radians is required.");return t*he.DEGREES_PER_RADIAN},he.convertLongitudeRange=function(t){if(!ne(t))throw new pe("angle is required.");const n=he.TWO_PI,e=t-Math.floor(t/n)*n;return e<-Math.PI?e+n:e>=Math.PI?e-n:e},he.clampToLatitudeRange=function(t){if(!ne(t))throw new pe("angle is required.");return he.clamp(t,-1*he.PI_OVER_TWO,he.PI_OVER_TWO)},he.negativePiToPi=function(t){if(!ne(t))throw new pe("angle is required.");return t>=-he.PI&&t<=he.PI?t:he.zeroToTwoPi(t+he.PI)-he.PI},he.zeroToTwoPi=function(t){if(!ne(t))throw new pe("angle is required.");if(t>=0&&t<=he.TWO_PI)return t;const n=he.mod(t,he.TWO_PI);return Math.abs(n)<he.EPSILON14&&Math.abs(t)>he.EPSILON14?he.TWO_PI:n},he.mod=function(t,n){if(!ne(t))throw new pe("m is required.");if(!ne(n))throw new pe("n is required.");if(n===0)throw new pe("divisor cannot be 0.");return he.sign(t)===he.sign(n)&&Math.abs(t)<Math.abs(n)?t:(t%n+n)%n},he.equalsEpsilon=function(t,n,e,i){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");e=e??0,i=i??e;const o=Math.abs(t-n);return o<=i||o<=e*Math.max(Math.abs(t),Math.abs(n))},he.lessThan=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n<-e},he.lessThanOrEquals=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n<e},he.greaterThan=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n>e},he.greaterThanOrEquals=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n>-e};const nA=[1];he.factorial=function(t){if(typeof t!="number"||t<0)throw new pe("A number greater than or equal to 0 is required.");const n=nA.length;if(t>=n){let e=nA[n-1];for(let i=n;i<=t;i++){const o=e*i;nA.push(o),e=o}}return nA[t]},he.incrementWrap=function(t,n,e){if(e=e??0,!ne(t))throw new pe("n is required.");if(n<=e)throw new pe("maximumValue must be greater than minimumValue.");return++t,t>n&&(t=e),t},he.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new pe("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0},he.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new pe("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t},he.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new pe("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t},he.clamp=function(t,n,e){return N.typeOf.number("value",t),N.typeOf.number("min",n),N.typeOf.number("max",e),t<n?n:t>e?e:t};let nb=new tb;he.setRandomNumberSeed=function(t){if(!ne(t))throw new pe("seed is required.");nb=new tb(t)},he.nextRandomNumber=function(){return nb.random()},he.randomBetween=function(t,n){return he.nextRandomNumber()*(n-t)+t},he.acosClamped=function(t){if(!ne(t))throw new pe("value is required.");return Math.acos(he.clamp(t,-1,1))},he.asinClamped=function(t){if(!ne(t))throw new pe("value is required.");return Math.asin(he.clamp(t,-1,1))},he.chordLength=function(t,n){if(!ne(t))throw new pe("angle is required.");if(!ne(n))throw new pe("radius is required.");return 2*n*Math.sin(t*.5)},he.logBase=function(t,n){if(!ne(t))throw new pe("number is required.");if(!ne(n))throw new pe("base is required.");return Math.log(t)/Math.log(n)},he.cbrt=Math.cbrt??function(n){const e=Math.pow(Math.abs(n),.3333333333333333);return n<0?-e:e},he.log2=Math.log2??function(n){return Math.log(n)*Math.LOG2E},he.fog=function(t,n){const e=t*n;return 1-Math.exp(-(e*e))},he.fastApproximateAtan=function(t){return N.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)},he.fastApproximateAtan2=function(t,n){N.typeOf.number("x",t),N.typeOf.number("y",n);let e,i=Math.abs(t);e=Math.abs(n);const o=Math.max(i,e);e=Math.min(i,e);const r=e/o;if(isNaN(r))throw new pe("either x or y must be nonzero");return i=he.fastApproximateAtan(r),i=Math.abs(n)>Math.abs(t)?he.PI_OVER_TWO-i:i,i=t<0?he.PI-i:i,i=n<0?-i:i,i};function ae(t,n,e){this.x=t??0,this.y=n??0,this.z=e??0}ae.fromSpherical=function(t,n){N.typeOf.object("spherical",t),ne(n)||(n=new ae);const e=t.clock,i=t.cone,o=t.magnitude??1,r=o*Math.sin(i);return n.x=r*Math.cos(e),n.y=r*Math.sin(e),n.z=o*Math.cos(i),n},ae.fromElements=function(t,n,e,i){return ne(i)?(i.x=t,i.y=n,i.z=e,i):new ae(t,n,e)},ae.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n):new ae(t.x,t.y,t.z)},ae.fromCartesian4=ae.clone,ae.packedLength=3,ae.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e++]=t.y,n[e]=t.z,n},ae.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new ae),e.x=t[n++],e.y=t[n++],e.z=t[n],e},ae.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*3;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 3 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)ae.pack(t[o],n,o*3);return n},ae.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,3),t.length%3!==0)throw new pe("array length must be a multiple of 3.");const e=t.length;ne(n)?n.length=e/3:n=new Array(e/3);for(let i=0;i<e;i+=3){const o=i/3;n[o]=ae.unpack(t,i,n[o])}return n},ae.fromArray=ae.unpack,ae.maximumComponent=function(t){return N.typeOf.object("cartesian",t),Math.max(t.x,t.y,t.z)},ae.minimumComponent=function(t){return N.typeOf.object("cartesian",t),Math.min(t.x,t.y,t.z)},ae.minimumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.min(t.x,n.x),e.y=Math.min(t.y,n.y),e.z=Math.min(t.z,n.z),e},ae.maximumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.max(t.x,n.x),e.y=Math.max(t.y,n.y),e.z=Math.max(t.z,n.z),e},ae.clamp=function(t,n,e,i){N.typeOf.object("value",t),N.typeOf.object("min",n),N.typeOf.object("max",e),N.typeOf.object("result",i);const o=he.clamp(t.x,n.x,e.x),r=he.clamp(t.y,n.y,e.y),a=he.clamp(t.z,n.z,e.z);return i.x=o,i.y=r,i.z=a,i},ae.magnitudeSquared=function(t){return N.typeOf.object("cartesian",t),t.x*t.x+t.y*t.y+t.z*t.z},ae.magnitude=function(t){return Math.sqrt(ae.magnitudeSquared(t))};const iA=new ae;ae.distance=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),ae.subtract(t,n,iA),ae.magnitude(iA)},ae.distanceSquared=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),ae.subtract(t,n,iA),ae.magnitudeSquared(iA)},ae.normalize=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=ae.magnitude(t);if(n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new pe("normalized result is not a number");return n},ae.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y+t.z*n.z},ae.multiplyComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x*n.x,e.y=t.y*n.y,e.z=t.z*n.z,e},ae.divideComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x/n.x,e.y=t.y/n.y,e.z=t.z/n.z,e},ae.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e.z=t.z+n.z,e},ae.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e.z=t.z-n.z,e},ae.multiplyByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e.z=t.z*n,e},ae.divideByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e},ae.negate=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n},ae.abs=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n};const ib=new ae;ae.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),ae.multiplyByScalar(n,e,ib),i=ae.multiplyByScalar(t,1-e,i),ae.add(ib,i,i)};const rA=new ae,cd=new ae;ae.angleBetween=function(t,n){N.typeOf.object("left",t),N.typeOf.object("right",n),ae.normalize(t,rA),ae.normalize(n,cd);const e=ae.dot(rA,cd),i=ae.magnitude(ae.cross(rA,cd,rA));return Math.atan2(i,e)};const ZD=new ae;ae.mostOrthogonalAxis=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=ae.normalize(t,ZD);return ae.abs(e,e),e.x<=e.y?e.x<=e.z?n=ae.clone(ae.UNIT_X,n):n=ae.clone(ae.UNIT_Z,n):e.y<=e.z?n=ae.clone(ae.UNIT_Y,n):n=ae.clone(ae.UNIT_Z,n),n},ae.projectVector=function(t,n,e){N.defined("a",t),N.defined("b",n),N.defined("result",e);const i=ae.dot(t,n)/ae.dot(n,n);return ae.multiplyByScalar(n,i,e)},ae.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z},ae.equalsArray=function(t,n,e){return t.x===n[e]&&t.y===n[e+1]&&t.z===n[e+2]},ae.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.x,n.x,e,i)&&he.equalsEpsilon(t.y,n.y,e,i)&&he.equalsEpsilon(t.z,n.z,e,i)},ae.cross=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t.x,o=t.y,r=t.z,a=n.x,s=n.y,l=n.z,u=o*l-r*s,A=r*a-i*l,c=i*s-o*a;return e.x=u,e.y=A,e.z=c,e},ae.midpoint=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=(t.x+n.x)*.5,e.y=(t.y+n.y)*.5,e.z=(t.z+n.z)*.5,e},ae.fromDegrees=function(t,n,e,i,o){return N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),t=he.toRadians(t),n=he.toRadians(n),ae.fromRadians(t,n,e,i,o)};let Hn=new ae,Ms=new ae;ae._ellipsoidRadiiSquared=new ae(40680631590769,40680631590769,40408299984661445e-3),ae.fromRadians=function(t,n,e,i,o){N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),e=e??0;const r=ne(i)?i.radiiSquared:ae._ellipsoidRadiiSquared,a=Math.cos(n);Hn.x=a*Math.cos(t),Hn.y=a*Math.sin(t),Hn.z=Math.sin(n),Hn=ae.normalize(Hn,Hn),ae.multiplyComponents(r,Hn,Ms);const s=Math.sqrt(ae.dot(Hn,Ms));return Ms=ae.divideByScalar(Ms,s,Ms),Hn=ae.multiplyByScalar(Hn,e,Hn),ne(o)||(o=new ae),ae.add(Ms,Hn,o)},ae.fromDegreesArray=function(t,n,e){if(N.defined("coordinates",t),t.length<2||t.length%2!==0)throw new pe("the number of coordinates must be a multiple of 2 and at least 2");const i=t.length;ne(e)?e.length=i/2:e=new Array(i/2);for(let o=0;o<i;o+=2){const r=t[o],a=t[o+1],s=o/2;e[s]=ae.fromDegrees(r,a,0,n,e[s])}return e},ae.fromRadiansArray=function(t,n,e){if(N.defined("coordinates",t),t.length<2||t.length%2!==0)throw new pe("the number of coordinates must be a multiple of 2 and at least 2");const i=t.length;ne(e)?e.length=i/2:e=new Array(i/2);for(let o=0;o<i;o+=2){const r=t[o],a=t[o+1],s=o/2;e[s]=ae.fromRadians(r,a,0,n,e[s])}return e},ae.fromDegreesArrayHeights=function(t,n,e){if(N.defined("coordinates",t),t.length<3||t.length%3!==0)throw new pe("the number of coordinates must be a multiple of 3 and at least 3");const i=t.length;ne(e)?e.length=i/3:e=new Array(i/3);for(let o=0;o<i;o+=3){const r=t[o],a=t[o+1],s=t[o+2],l=o/3;e[l]=ae.fromDegrees(r,a,s,n,e[l])}return e},ae.fromRadiansArrayHeights=function(t,n,e){if(N.defined("coordinates",t),t.length<3||t.length%3!==0)throw new pe("the number of coordinates must be a multiple of 3 and at least 3");const i=t.length;ne(e)?e.length=i/3:e=new Array(i/3);for(let o=0;o<i;o+=3){const r=t[o],a=t[o+1],s=t[o+2],l=o/3;e[l]=ae.fromRadians(r,a,s,n,e[l])}return e},ae.ZERO=Object.freeze(new ae(0,0,0)),ae.ONE=Object.freeze(new ae(1,1,1)),ae.UNIT_X=Object.freeze(new ae(1,0,0)),ae.UNIT_Y=Object.freeze(new ae(0,1,0)),ae.UNIT_Z=Object.freeze(new ae(0,0,1)),ae.prototype.clone=function(t){return ae.clone(this,t)},ae.prototype.equals=function(t){return ae.equals(this,t)},ae.prototype.equalsEpsilon=function(t,n,e){return ae.equalsEpsilon(this,t,n,e)},ae.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};function be(t,n,e,i){this.x=t??0,this.y=n??0,this.z=e??0,this.w=i??0}be.fromElements=function(t,n,e,i,o){return ne(o)?(o.x=t,o.y=n,o.z=e,o.w=i,o):new be(t,n,e,i)},be.fromColor=function(t,n){return N.typeOf.object("color",t),ne(n)?(n.x=t.red,n.y=t.green,n.z=t.blue,n.w=t.alpha,n):new be(t.red,t.green,t.blue,t.alpha)},be.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new be(t.x,t.y,t.z,t.w)},be.packedLength=4,be.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e++]=t.y,n[e++]=t.z,n[e]=t.w,n},be.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new be),e.x=t[n++],e.y=t[n++],e.z=t[n++],e.w=t[n],e},be.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*4;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)be.pack(t[o],n,o*4);return n},be.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,4),t.length%4!==0)throw new pe("array length must be a multiple of 4.");const e=t.length;ne(n)?n.length=e/4:n=new Array(e/4);for(let i=0;i<e;i+=4){const o=i/4;n[o]=be.unpack(t,i,n[o])}return n},be.fromArray=be.unpack,be.maximumComponent=function(t){return N.typeOf.object("cartesian",t),Math.max(t.x,t.y,t.z,t.w)},be.minimumComponent=function(t){return N.typeOf.object("cartesian",t),Math.min(t.x,t.y,t.z,t.w)},be.minimumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.min(t.x,n.x),e.y=Math.min(t.y,n.y),e.z=Math.min(t.z,n.z),e.w=Math.min(t.w,n.w),e},be.maximumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.max(t.x,n.x),e.y=Math.max(t.y,n.y),e.z=Math.max(t.z,n.z),e.w=Math.max(t.w,n.w),e},be.clamp=function(t,n,e,i){N.typeOf.object("value",t),N.typeOf.object("min",n),N.typeOf.object("max",e),N.typeOf.object("result",i);const o=he.clamp(t.x,n.x,e.x),r=he.clamp(t.y,n.y,e.y),a=he.clamp(t.z,n.z,e.z),s=he.clamp(t.w,n.w,e.w);return i.x=o,i.y=r,i.z=a,i.w=s,i},be.magnitudeSquared=function(t){return N.typeOf.object("cartesian",t),t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},be.magnitude=function(t){return Math.sqrt(be.magnitudeSquared(t))};const oA=new be;be.distance=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),be.subtract(t,n,oA),be.magnitude(oA)},be.distanceSquared=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),be.subtract(t,n,oA),be.magnitudeSquared(oA)},be.normalize=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=be.magnitude(t);if(n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n.w=t.w/e,isNaN(n.x)||isNaN(n.y)||isNaN(n.z)||isNaN(n.w))throw new pe("normalized result is not a number");return n},be.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y+t.z*n.z+t.w*n.w},be.multiplyComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x*n.x,e.y=t.y*n.y,e.z=t.z*n.z,e.w=t.w*n.w,e},be.divideComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x/n.x,e.y=t.y/n.y,e.z=t.z/n.z,e.w=t.w/n.w,e},be.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e.z=t.z+n.z,e.w=t.w+n.w,e},be.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e.z=t.z-n.z,e.w=t.w-n.w,e},be.multiplyByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e.z=t.z*n,e.w=t.w*n,e},be.divideByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},be.negate=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=-t.w,n},be.abs=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n.w=Math.abs(t.w),n};const rb=new be;be.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),be.multiplyByScalar(n,e,rb),i=be.multiplyByScalar(t,1-e,i),be.add(rb,i,i)};const XD=new be;be.mostOrthogonalAxis=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=be.normalize(t,XD);return be.abs(e,e),e.x<=e.y?e.x<=e.z?e.x<=e.w?n=be.clone(be.UNIT_X,n):n=be.clone(be.UNIT_W,n):e.z<=e.w?n=be.clone(be.UNIT_Z,n):n=be.clone(be.UNIT_W,n):e.y<=e.z?e.y<=e.w?n=be.clone(be.UNIT_Y,n):n=be.clone(be.UNIT_W,n):e.z<=e.w?n=be.clone(be.UNIT_Z,n):n=be.clone(be.UNIT_W,n),n},be.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w},be.equalsArray=function(t,n,e){return t.x===n[e]&&t.y===n[e+1]&&t.z===n[e+2]&&t.w===n[e+3]},be.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.x,n.x,e,i)&&he.equalsEpsilon(t.y,n.y,e,i)&&he.equalsEpsilon(t.z,n.z,e,i)&&he.equalsEpsilon(t.w,n.w,e,i)},be.ZERO=Object.freeze(new be(0,0,0,0)),be.ONE=Object.freeze(new be(1,1,1,1)),be.UNIT_X=Object.freeze(new be(1,0,0,0)),be.UNIT_Y=Object.freeze(new be(0,1,0,0)),be.UNIT_Z=Object.freeze(new be(0,0,1,0)),be.UNIT_W=Object.freeze(new be(0,0,0,1)),be.prototype.clone=function(t){return be.clone(this,t)},be.prototype.equals=function(t){return be.equals(this,t)},be.prototype.equalsEpsilon=function(t,n,e){return be.equalsEpsilon(this,t,n,e)},be.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const hd=new Float32Array(1),Zt=new Uint8Array(hd.buffer),$D=new Uint32Array([287454020]),ob=new Uint8Array($D.buffer)[0]===68;be.packFloat=function(t,n){return N.typeOf.number("value",t),ne(n)||(n=new be),hd[0]=t,ob?(n.x=Zt[0],n.y=Zt[1],n.z=Zt[2],n.w=Zt[3]):(n.x=Zt[3],n.y=Zt[2],n.z=Zt[1],n.w=Zt[0]),n},be.unpackFloat=function(t){return N.typeOf.object("packedFloat",t),ob?(Zt[0]=t.x,Zt[1]=t.y,Zt[2]=t.z,Zt[3]=t.w):(Zt[0]=t.w,Zt[1]=t.z,Zt[2]=t.y,Zt[3]=t.x),hd[0]};const gi={};gi.EMPTY_OBJECT=Object.freeze({}),gi.EMPTY_ARRAY=Object.freeze([]);function me(t,n,e,i,o,r,a,s,l){this[0]=t??0,this[1]=i??0,this[2]=a??0,this[3]=n??0,this[4]=o??0,this[5]=s??0,this[6]=e??0,this[7]=r??0,this[8]=l??0}me.packedLength=9,me.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t[0],n[e++]=t[1],n[e++]=t[2],n[e++]=t[3],n[e++]=t[4],n[e++]=t[5],n[e++]=t[6],n[e++]=t[7],n[e++]=t[8],n},me.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new me),e[0]=t[n++],e[1]=t[n++],e[2]=t[n++],e[3]=t[n++],e[4]=t[n++],e[5]=t[n++],e[6]=t[n++],e[7]=t[n++],e[8]=t[n++],e},me.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*9;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 9 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)me.pack(t[o],n,o*9);return n},me.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,9),t.length%9!==0)throw new pe("array length must be a multiple of 9.");const e=t.length;ne(n)?n.length=e/9:n=new Array(e/9);for(let i=0;i<e;i+=9){const o=i/9;n[o]=me.unpack(t,i,n[o])}return n},me.clone=function(t,n){if(ne(t))return ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):new me(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])},me.fromArray=me.unpack,me.fromColumnMajorArray=function(t,n){return N.defined("values",t),me.clone(t,n)},me.fromRowMajorArray=function(t,n){return N.defined("values",t),ne(n)?(n[0]=t[0],n[1]=t[3],n[2]=t[6],n[3]=t[1],n[4]=t[4],n[5]=t[7],n[6]=t[2],n[7]=t[5],n[8]=t[8],n):new me(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},me.fromQuaternion=function(t,n){N.typeOf.object("quaternion",t);const e=t.x*t.x,i=t.x*t.y,o=t.x*t.z,r=t.x*t.w,a=t.y*t.y,s=t.y*t.z,l=t.y*t.w,u=t.z*t.z,A=t.z*t.w,c=t.w*t.w,f=e-a-u+c,d=2*(i-A),p=2*(o+l),g=2*(i+A),v=-e+a-u+c,y=2*(s-r),m=2*(o-l),b=2*(s+r),x=-e-a+u+c;return ne(n)?(n[0]=f,n[1]=g,n[2]=m,n[3]=d,n[4]=v,n[5]=b,n[6]=p,n[7]=y,n[8]=x,n):new me(f,d,p,g,v,y,m,b,x)},me.fromHeadingPitchRoll=function(t,n){N.typeOf.object("headingPitchRoll",t);const e=Math.cos(-t.pitch),i=Math.cos(-t.heading),o=Math.cos(t.roll),r=Math.sin(-t.pitch),a=Math.sin(-t.heading),s=Math.sin(t.roll),l=e*i,u=-o*a+s*r*i,A=s*a+o*r*i,c=e*a,f=o*i+s*r*a,d=-s*i+o*r*a,p=-r,g=s*e,v=o*e;return ne(n)?(n[0]=l,n[1]=c,n[2]=p,n[3]=u,n[4]=f,n[5]=g,n[6]=A,n[7]=d,n[8]=v,n):new me(l,u,A,c,f,d,p,g,v)},me.fromScale=function(t,n){return N.typeOf.object("scale",t),ne(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=t.y,n[5]=0,n[6]=0,n[7]=0,n[8]=t.z,n):new me(t.x,0,0,0,t.y,0,0,0,t.z)},me.fromUniformScale=function(t,n){return N.typeOf.number("scale",t),ne(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=t,n[5]=0,n[6]=0,n[7]=0,n[8]=t,n):new me(t,0,0,0,t,0,0,0,t)},me.fromCrossProduct=function(t,n){return N.typeOf.object("vector",t),ne(n)?(n[0]=0,n[1]=t.z,n[2]=-t.y,n[3]=-t.z,n[4]=0,n[5]=t.x,n[6]=t.y,n[7]=-t.x,n[8]=0,n):new me(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)},me.fromRotationX=function(t,n){N.typeOf.number("angle",t);const e=Math.cos(t),i=Math.sin(t);return ne(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=e,n[5]=i,n[6]=0,n[7]=-i,n[8]=e,n):new me(1,0,0,0,e,-i,0,i,e)},me.fromRotationY=function(t,n){N.typeOf.number("angle",t);const e=Math.cos(t),i=Math.sin(t);return ne(n)?(n[0]=e,n[1]=0,n[2]=-i,n[3]=0,n[4]=1,n[5]=0,n[6]=i,n[7]=0,n[8]=e,n):new me(e,0,i,0,1,0,-i,0,e)},me.fromRotationZ=function(t,n){N.typeOf.number("angle",t);const e=Math.cos(t),i=Math.sin(t);return ne(n)?(n[0]=e,n[1]=i,n[2]=0,n[3]=-i,n[4]=e,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new me(e,-i,0,i,e,0,0,0,1)},me.toArray=function(t,n){return N.typeOf.object("matrix",t),ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},me.getElementIndex=function(t,n){return N.typeOf.number.greaterThanOrEquals("row",n,0),N.typeOf.number.lessThanOrEquals("row",n,2),N.typeOf.number.greaterThanOrEquals("column",t,0),N.typeOf.number.lessThanOrEquals("column",t,2),t*3+n},me.getColumn=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("result",e);const i=n*3,o=t[i],r=t[i+1],a=t[i+2];return e.x=o,e.y=r,e.z=a,e},me.setColumn=function(t,n,e,i){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=me.clone(t,i);const o=n*3;return i[o]=e.x,i[o+1]=e.y,i[o+2]=e.z,i},me.getRow=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("result",e);const i=t[n],o=t[n+3],r=t[n+6];return e.x=i,e.y=o,e.z=r,e},me.setRow=function(t,n,e,i){return N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=me.clone(t,i),i[n]=e.x,i[n+3]=e.y,i[n+6]=e.z,i};const YD=new ae;me.setScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e);const i=me.getScale(t,YD),o=n.x/i.x,r=n.y/i.y,a=n.z/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*a,e};const JD=new ae;me.setUniformScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e);const i=me.getScale(t,JD),o=n/i.x,r=n/i.y,a=n/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*a,e};const Ad=new ae;me.getScale=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n.x=ae.magnitude(ae.fromElements(t[0],t[1],t[2],Ad)),n.y=ae.magnitude(ae.fromElements(t[3],t[4],t[5],Ad)),n.z=ae.magnitude(ae.fromElements(t[6],t[7],t[8],Ad)),n};const sb=new ae;me.getMaximumScale=function(t){return me.getScale(t,sb),ae.maximumComponent(sb)};const eR=new ae;me.setRotation=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("result",e);const i=me.getScale(t,eR);return e[0]=n[0]*i.x,e[1]=n[1]*i.x,e[2]=n[2]*i.x,e[3]=n[3]*i.y,e[4]=n[4]*i.y,e[5]=n[5]*i.y,e[6]=n[6]*i.z,e[7]=n[7]*i.z,e[8]=n[8]*i.z,e};const tR=new ae;me.getRotation=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=me.getScale(t,tR);return n[0]=t[0]/e.x,n[1]=t[1]/e.x,n[2]=t[2]/e.x,n[3]=t[3]/e.y,n[4]=t[4]/e.y,n[5]=t[5]/e.y,n[6]=t[6]/e.z,n[7]=t[7]/e.z,n[8]=t[8]/e.z,n},me.multiply=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t[0]*n[0]+t[3]*n[1]+t[6]*n[2],o=t[1]*n[0]+t[4]*n[1]+t[7]*n[2],r=t[2]*n[0]+t[5]*n[1]+t[8]*n[2],a=t[0]*n[3]+t[3]*n[4]+t[6]*n[5],s=t[1]*n[3]+t[4]*n[4]+t[7]*n[5],l=t[2]*n[3]+t[5]*n[4]+t[8]*n[5],u=t[0]*n[6]+t[3]*n[7]+t[6]*n[8],A=t[1]*n[6]+t[4]*n[7]+t[7]*n[8],c=t[2]*n[6]+t[5]*n[7]+t[8]*n[8];return e[0]=i,e[1]=o,e[2]=r,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=A,e[8]=c,e},me.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},me.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e},me.multiplyByVector=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=t[0]*i+t[3]*o+t[6]*r,s=t[1]*i+t[4]*o+t[7]*r,l=t[2]*i+t[5]*o+t[8]*r;return e.x=a,e.y=s,e.z=l,e},me.multiplyByScalar=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},me.multiplyByScale=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e),e[0]=t[0]*n.x,e[1]=t[1]*n.x,e[2]=t[2]*n.x,e[3]=t[3]*n.y,e[4]=t[4]*n.y,e[5]=t[5]*n.y,e[6]=t[6]*n.z,e[7]=t[7]*n.z,e[8]=t[8]*n.z,e},me.multiplyByUniformScale=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},me.negate=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n},me.transpose=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[3],o=t[6],r=t[1],a=t[4],s=t[7],l=t[2],u=t[5],A=t[8];return n[0]=e,n[1]=i,n[2]=o,n[3]=r,n[4]=a,n[5]=s,n[6]=l,n[7]=u,n[8]=A,n};function nR(t){let n=0;for(let e=0;e<9;++e){const i=t[e];n+=i*i}return Math.sqrt(n)}const fd=[1,0,0],pd=[2,2,1];function iR(t){let n=0;for(let e=0;e<3;++e){const i=t[me.getElementIndex(pd[e],fd[e])];n+=2*i*i}return Math.sqrt(n)}function rR(t,n){const e=he.EPSILON15;let i=0,o=1;for(let u=0;u<3;++u){const A=Math.abs(t[me.getElementIndex(pd[u],fd[u])]);A>i&&(o=u,i=A)}let r=1,a=0;const s=fd[o],l=pd[o];if(Math.abs(t[me.getElementIndex(l,s)])>e){const u=t[me.getElementIndex(l,l)],A=t[me.getElementIndex(s,s)],c=t[me.getElementIndex(l,s)],f=(u-A)/2/c;let d;f<0?d=-1/(-f+Math.sqrt(1+f*f)):d=1/(f+Math.sqrt(1+f*f)),r=1/Math.sqrt(1+d*d),a=d*r}return n=me.clone(me.IDENTITY,n),n[me.getElementIndex(s,s)]=n[me.getElementIndex(l,l)]=r,n[me.getElementIndex(l,s)]=a,n[me.getElementIndex(s,l)]=-a,n}const sA=new me,ab=new me;me.computeEigenDecomposition=function(t,n){N.typeOf.object("matrix",t);const e=he.EPSILON20,i=10;let o=0,r=0;ne(n)||(n={});const a=n.unitary=me.clone(me.IDENTITY,n.unitary),s=n.diagonal=me.clone(t,n.diagonal),l=e*nR(s);for(;r<i&&iR(s)>l;)rR(s,sA),me.transpose(sA,ab),me.multiply(s,sA,s),me.multiply(ab,s,s),me.multiply(a,sA,a),++o>2&&(++r,o=0);return n},me.abs=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n},me.determinant=function(t){N.typeOf.object("matrix",t);const n=t[0],e=t[3],i=t[6],o=t[1],r=t[4],a=t[7],s=t[2],l=t[5],u=t[8];return n*(r*u-l*a)+o*(l*i-e*u)+s*(e*a-r*i)},me.inverse=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[1],o=t[2],r=t[3],a=t[4],s=t[5],l=t[6],u=t[7],A=t[8],c=me.determinant(t);if(Math.abs(c)<=he.EPSILON15)throw new pe("matrix is not invertible");n[0]=a*A-u*s,n[1]=u*o-i*A,n[2]=i*s-a*o,n[3]=l*s-r*A,n[4]=e*A-l*o,n[5]=r*o-e*s,n[6]=r*u-l*a,n[7]=l*i-e*u,n[8]=e*a-r*i;const f=1/c;return me.multiplyByScalar(n,f,n)};const oR=new me;me.inverseTranspose=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),me.inverse(me.transpose(t,oR),n)},me.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},me.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t[0]-n[0])<=e&&Math.abs(t[1]-n[1])<=e&&Math.abs(t[2]-n[2])<=e&&Math.abs(t[3]-n[3])<=e&&Math.abs(t[4]-n[4])<=e&&Math.abs(t[5]-n[5])<=e&&Math.abs(t[6]-n[6])<=e&&Math.abs(t[7]-n[7])<=e&&Math.abs(t[8]-n[8])<=e},me.IDENTITY=Object.freeze(new me(1,0,0,0,1,0,0,0,1)),me.ZERO=Object.freeze(new me(0,0,0,0,0,0,0,0,0)),me.COLUMN0ROW0=0,me.COLUMN0ROW1=1,me.COLUMN0ROW2=2,me.COLUMN1ROW0=3,me.COLUMN1ROW1=4,me.COLUMN1ROW2=5,me.COLUMN2ROW0=6,me.COLUMN2ROW1=7,me.COLUMN2ROW2=8,Object.defineProperties(me.prototype,{length:{get:function(){return me.packedLength}}}),me.prototype.clone=function(t){return me.clone(this,t)},me.prototype.equals=function(t){return me.equals(this,t)},me.equalsArray=function(t,n,e){return t[0]===n[e]&&t[1]===n[e+1]&&t[2]===n[e+2]&&t[3]===n[e+3]&&t[4]===n[e+4]&&t[5]===n[e+5]&&t[6]===n[e+6]&&t[7]===n[e+7]&&t[8]===n[e+8]},me.prototype.equalsEpsilon=function(t,n){return me.equalsEpsilon(this,t,n)},me.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
341
|
+
${this.stack.toString()}`),t},pe.throwInstantiationError=function(){throw new pe("This function defines an interface and should not be called directly.")};const N={};N.typeOf={};function jD(t){return`${t} is required, actual value was undefined`}function Fs(t,n,e){return`Expected ${e} to be typeof ${n}, actual typeof was ${t}`}N.defined=function(t,n){if(!ne(n))throw new pe(jD(t))},N.typeOf.func=function(t,n){if(typeof n!="function")throw new pe(Fs(typeof n,"function",t))},N.typeOf.string=function(t,n){if(typeof n!="string")throw new pe(Fs(typeof n,"string",t))},N.typeOf.number=function(t,n){if(typeof n!="number")throw new pe(Fs(typeof n,"number",t))},N.typeOf.number.lessThan=function(t,n,e){if(N.typeOf.number(t,n),n>=e)throw new pe(`Expected ${t} to be less than ${e}, actual value was ${n}`)},N.typeOf.number.lessThanOrEquals=function(t,n,e){if(N.typeOf.number(t,n),n>e)throw new pe(`Expected ${t} to be less than or equal to ${e}, actual value was ${n}`)},N.typeOf.number.greaterThan=function(t,n,e){if(N.typeOf.number(t,n),n<=e)throw new pe(`Expected ${t} to be greater than ${e}, actual value was ${n}`)},N.typeOf.number.greaterThanOrEquals=function(t,n,e){if(N.typeOf.number(t,n),n<e)throw new pe(`Expected ${t} to be greater than or equal to ${e}, actual value was ${n}`)},N.typeOf.object=function(t,n){if(typeof n!="object")throw new pe(Fs(typeof n,"object",t))},N.typeOf.bool=function(t,n){if(typeof n!="boolean")throw new pe(Fs(typeof n,"boolean",t))},N.typeOf.bigint=function(t,n){if(typeof n!="bigint")throw new pe(Fs(typeof n,"bigint",t))},N.typeOf.number.equals=function(t,n,e,i){if(N.typeOf.number(t,e),N.typeOf.number(n,i),e!==i)throw new pe(`${t} must be equal to ${n}, the actual values are ${e} and ${i}`)};var J1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Al(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ud,eb;function qD(){if(eb)return ud;eb=1;var t=function(n){n==null&&(n=new Date().getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,n.constructor==Array?this.init_by_array(n,n.length):this.init_seed(n)};return t.prototype.init_seed=function(n){for(this.mt[0]=n>>>0,this.mti=1;this.mti<this.N;this.mti++){var n=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(((n&4294901760)>>>16)*1812433253<<16)+(n&65535)*1812433253+this.mti,this.mt[this.mti]>>>=0}},t.prototype.init_by_array=function(n,e){var i,o,r;for(this.init_seed(19650218),i=1,o=0,r=this.N>e?this.N:e;r;r--){var a=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(((a&4294901760)>>>16)*1664525<<16)+(a&65535)*1664525)+n[o]+o,this.mt[i]>>>=0,i++,o++,i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1),o>=e&&(o=0)}for(r=this.N-1;r;r--){var a=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(((a&4294901760)>>>16)*1566083941<<16)+(a&65535)*1566083941)-i,this.mt[i]>>>=0,i++,i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1)}this.mt[0]=2147483648},t.prototype.random_int=function(){var n,e=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_seed(5489),i=0;i<this.N-this.M;i++)n=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^n>>>1^e[n&1];for(;i<this.N-1;i++)n=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^n>>>1^e[n&1];n=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^n>>>1^e[n&1],this.mti=0}return n=this.mt[this.mti++],n^=n>>>11,n^=n<<7&2636928640,n^=n<<15&4022730752,n^=n>>>18,n>>>0},t.prototype.random_int31=function(){return this.random_int()>>>1},t.prototype.random_incl=function(){return this.random_int()*23283064370807974e-26},t.prototype.random=function(){return this.random_int()*23283064365386963e-26},t.prototype.random_excl=function(){return(this.random_int()+.5)*23283064365386963e-26},t.prototype.random_long=function(){var n=this.random_int()>>>5,e=this.random_int()>>>6;return(n*67108864+e)*11102230246251565e-32},ud=t,ud}var KD=qD();const tb=Al(KD),he={};he.EPSILON1=.1,he.EPSILON2=.01,he.EPSILON3=.001,he.EPSILON4=1e-4,he.EPSILON5=1e-5,he.EPSILON6=1e-6,he.EPSILON7=1e-7,he.EPSILON8=1e-8,he.EPSILON9=1e-9,he.EPSILON10=1e-10,he.EPSILON11=1e-11,he.EPSILON12=1e-12,he.EPSILON13=1e-13,he.EPSILON14=1e-14,he.EPSILON15=1e-15,he.EPSILON16=1e-16,he.EPSILON17=1e-17,he.EPSILON18=1e-18,he.EPSILON19=1e-19,he.EPSILON20=1e-20,he.EPSILON21=1e-21,he.GRAVITATIONALPARAMETER=3986004418e5,he.SOLAR_RADIUS=6955e5,he.LUNAR_RADIUS=1737400,he.SIXTY_FOUR_KILOBYTES=65536,he.FOUR_GIGABYTES=4294967296,he.sign=Math.sign??function(n){return n=+n,n===0||n!==n?n:n>0?1:-1},he.signNotZero=function(t){return t<0?-1:1},he.toSNorm=function(t,n){return n=n??255,Math.round((he.clamp(t,-1,1)*.5+.5)*n)},he.fromSNorm=function(t,n){return n=n??255,he.clamp(t,0,n)/n*2-1},he.normalize=function(t,n,e){return e=Math.max(e-n,0),e===0?0:he.clamp((t-n)/e,0,1)},he.sinh=Math.sinh??function(n){return(Math.exp(n)-Math.exp(-n))/2},he.cosh=Math.cosh??function(n){return(Math.exp(n)+Math.exp(-n))/2},he.lerp=function(t,n,e){return(1-e)*t+e*n},he.PI=Math.PI,he.ONE_OVER_PI=1/Math.PI,he.PI_OVER_TWO=Math.PI/2,he.PI_OVER_THREE=Math.PI/3,he.PI_OVER_FOUR=Math.PI/4,he.PI_OVER_SIX=Math.PI/6,he.THREE_PI_OVER_TWO=3*Math.PI/2,he.TWO_PI=2*Math.PI,he.ONE_OVER_TWO_PI=1/(2*Math.PI),he.RADIANS_PER_DEGREE=Math.PI/180,he.DEGREES_PER_RADIAN=180/Math.PI,he.RADIANS_PER_ARCSECOND=he.RADIANS_PER_DEGREE/3600,he.toRadians=function(t){if(!ne(t))throw new pe("degrees is required.");return t*he.RADIANS_PER_DEGREE},he.toDegrees=function(t){if(!ne(t))throw new pe("radians is required.");return t*he.DEGREES_PER_RADIAN},he.convertLongitudeRange=function(t){if(!ne(t))throw new pe("angle is required.");const n=he.TWO_PI,e=t-Math.floor(t/n)*n;return e<-Math.PI?e+n:e>=Math.PI?e-n:e},he.clampToLatitudeRange=function(t){if(!ne(t))throw new pe("angle is required.");return he.clamp(t,-1*he.PI_OVER_TWO,he.PI_OVER_TWO)},he.negativePiToPi=function(t){if(!ne(t))throw new pe("angle is required.");return t>=-he.PI&&t<=he.PI?t:he.zeroToTwoPi(t+he.PI)-he.PI},he.zeroToTwoPi=function(t){if(!ne(t))throw new pe("angle is required.");if(t>=0&&t<=he.TWO_PI)return t;const n=he.mod(t,he.TWO_PI);return Math.abs(n)<he.EPSILON14&&Math.abs(t)>he.EPSILON14?he.TWO_PI:n},he.mod=function(t,n){if(!ne(t))throw new pe("m is required.");if(!ne(n))throw new pe("n is required.");if(n===0)throw new pe("divisor cannot be 0.");return he.sign(t)===he.sign(n)&&Math.abs(t)<Math.abs(n)?t:(t%n+n)%n},he.equalsEpsilon=function(t,n,e,i){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");e=e??0,i=i??e;const o=Math.abs(t-n);return o<=i||o<=e*Math.max(Math.abs(t),Math.abs(n))},he.lessThan=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n<-e},he.lessThanOrEquals=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n<e},he.greaterThan=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n>e},he.greaterThanOrEquals=function(t,n,e){if(!ne(t))throw new pe("first is required.");if(!ne(n))throw new pe("second is required.");if(!ne(e))throw new pe("absoluteEpsilon is required.");return t-n>-e};const nA=[1];he.factorial=function(t){if(typeof t!="number"||t<0)throw new pe("A number greater than or equal to 0 is required.");const n=nA.length;if(t>=n){let e=nA[n-1];for(let i=n;i<=t;i++){const o=e*i;nA.push(o),e=o}}return nA[t]},he.incrementWrap=function(t,n,e){if(e=e??0,!ne(t))throw new pe("n is required.");if(n<=e)throw new pe("maximumValue must be greater than minimumValue.");return++t,t>n&&(t=e),t},he.isPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new pe("A number between 0 and (2^32)-1 is required.");return t!==0&&(t&t-1)===0},he.nextPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>2147483648)throw new pe("A number between 0 and 2^31 is required.");return--t,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t,t},he.previousPowerOfTwo=function(t){if(typeof t!="number"||t<0||t>4294967295)throw new pe("A number between 0 and (2^32)-1 is required.");return t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t|=t>>32,t=(t>>>0)-(t>>>1),t},he.clamp=function(t,n,e){return N.typeOf.number("value",t),N.typeOf.number("min",n),N.typeOf.number("max",e),t<n?n:t>e?e:t};let nb=new tb;he.setRandomNumberSeed=function(t){if(!ne(t))throw new pe("seed is required.");nb=new tb(t)},he.nextRandomNumber=function(){return nb.random()},he.randomBetween=function(t,n){return he.nextRandomNumber()*(n-t)+t},he.acosClamped=function(t){if(!ne(t))throw new pe("value is required.");return Math.acos(he.clamp(t,-1,1))},he.asinClamped=function(t){if(!ne(t))throw new pe("value is required.");return Math.asin(he.clamp(t,-1,1))},he.chordLength=function(t,n){if(!ne(t))throw new pe("angle is required.");if(!ne(n))throw new pe("radius is required.");return 2*n*Math.sin(t*.5)},he.logBase=function(t,n){if(!ne(t))throw new pe("number is required.");if(!ne(n))throw new pe("base is required.");return Math.log(t)/Math.log(n)},he.cbrt=Math.cbrt??function(n){const e=Math.pow(Math.abs(n),.3333333333333333);return n<0?-e:e},he.log2=Math.log2??function(n){return Math.log(n)*Math.LOG2E},he.fog=function(t,n){const e=t*n;return 1-Math.exp(-(e*e))},he.fastApproximateAtan=function(t){return N.typeOf.number("x",t),t*(-.1784*Math.abs(t)-.0663*t*t+1.0301)},he.fastApproximateAtan2=function(t,n){N.typeOf.number("x",t),N.typeOf.number("y",n);let e,i=Math.abs(t);e=Math.abs(n);const o=Math.max(i,e);e=Math.min(i,e);const r=e/o;if(isNaN(r))throw new pe("either x or y must be nonzero");return i=he.fastApproximateAtan(r),i=Math.abs(n)>Math.abs(t)?he.PI_OVER_TWO-i:i,i=t<0?he.PI-i:i,i=n<0?-i:i,i};function ae(t,n,e){this.x=t??0,this.y=n??0,this.z=e??0}ae.fromSpherical=function(t,n){N.typeOf.object("spherical",t),ne(n)||(n=new ae);const e=t.clock,i=t.cone,o=t.magnitude??1,r=o*Math.sin(i);return n.x=r*Math.cos(e),n.y=r*Math.sin(e),n.z=o*Math.cos(i),n},ae.fromElements=function(t,n,e,i){return ne(i)?(i.x=t,i.y=n,i.z=e,i):new ae(t,n,e)},ae.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n):new ae(t.x,t.y,t.z)},ae.fromCartesian4=ae.clone,ae.packedLength=3,ae.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e++]=t.y,n[e]=t.z,n},ae.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new ae),e.x=t[n++],e.y=t[n++],e.z=t[n],e},ae.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*3;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 3 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)ae.pack(t[o],n,o*3);return n},ae.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,3),t.length%3!==0)throw new pe("array length must be a multiple of 3.");const e=t.length;ne(n)?n.length=e/3:n=new Array(e/3);for(let i=0;i<e;i+=3){const o=i/3;n[o]=ae.unpack(t,i,n[o])}return n},ae.fromArray=ae.unpack,ae.maximumComponent=function(t){return N.typeOf.object("cartesian",t),Math.max(t.x,t.y,t.z)},ae.minimumComponent=function(t){return N.typeOf.object("cartesian",t),Math.min(t.x,t.y,t.z)},ae.minimumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.min(t.x,n.x),e.y=Math.min(t.y,n.y),e.z=Math.min(t.z,n.z),e},ae.maximumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.max(t.x,n.x),e.y=Math.max(t.y,n.y),e.z=Math.max(t.z,n.z),e},ae.clamp=function(t,n,e,i){N.typeOf.object("value",t),N.typeOf.object("min",n),N.typeOf.object("max",e),N.typeOf.object("result",i);const o=he.clamp(t.x,n.x,e.x),r=he.clamp(t.y,n.y,e.y),a=he.clamp(t.z,n.z,e.z);return i.x=o,i.y=r,i.z=a,i},ae.magnitudeSquared=function(t){return N.typeOf.object("cartesian",t),t.x*t.x+t.y*t.y+t.z*t.z},ae.magnitude=function(t){return Math.sqrt(ae.magnitudeSquared(t))};const iA=new ae;ae.distance=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),ae.subtract(t,n,iA),ae.magnitude(iA)},ae.distanceSquared=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),ae.subtract(t,n,iA),ae.magnitudeSquared(iA)},ae.normalize=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=ae.magnitude(t);if(n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,isNaN(n.x)||isNaN(n.y)||isNaN(n.z))throw new pe("normalized result is not a number");return n},ae.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y+t.z*n.z},ae.multiplyComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x*n.x,e.y=t.y*n.y,e.z=t.z*n.z,e},ae.divideComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x/n.x,e.y=t.y/n.y,e.z=t.z/n.z,e},ae.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e.z=t.z+n.z,e},ae.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e.z=t.z-n.z,e},ae.multiplyByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e.z=t.z*n,e},ae.divideByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e},ae.negate=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n},ae.abs=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n};const ib=new ae;ae.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),ae.multiplyByScalar(n,e,ib),i=ae.multiplyByScalar(t,1-e,i),ae.add(ib,i,i)};const rA=new ae,cd=new ae;ae.angleBetween=function(t,n){N.typeOf.object("left",t),N.typeOf.object("right",n),ae.normalize(t,rA),ae.normalize(n,cd);const e=ae.dot(rA,cd),i=ae.magnitude(ae.cross(rA,cd,rA));return Math.atan2(i,e)};const ZD=new ae;ae.mostOrthogonalAxis=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=ae.normalize(t,ZD);return ae.abs(e,e),e.x<=e.y?e.x<=e.z?n=ae.clone(ae.UNIT_X,n):n=ae.clone(ae.UNIT_Z,n):e.y<=e.z?n=ae.clone(ae.UNIT_Y,n):n=ae.clone(ae.UNIT_Z,n),n},ae.projectVector=function(t,n,e){N.defined("a",t),N.defined("b",n),N.defined("result",e);const i=ae.dot(t,n)/ae.dot(n,n);return ae.multiplyByScalar(n,i,e)},ae.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z},ae.equalsArray=function(t,n,e){return t.x===n[e]&&t.y===n[e+1]&&t.z===n[e+2]},ae.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.x,n.x,e,i)&&he.equalsEpsilon(t.y,n.y,e,i)&&he.equalsEpsilon(t.z,n.z,e,i)},ae.cross=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t.x,o=t.y,r=t.z,a=n.x,s=n.y,l=n.z,u=o*l-r*s,A=r*a-i*l,c=i*s-o*a;return e.x=u,e.y=A,e.z=c,e},ae.midpoint=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=(t.x+n.x)*.5,e.y=(t.y+n.y)*.5,e.z=(t.z+n.z)*.5,e},ae.fromDegrees=function(t,n,e,i,o){return N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),t=he.toRadians(t),n=he.toRadians(n),ae.fromRadians(t,n,e,i,o)};let Hn=new ae,Ms=new ae;ae._ellipsoidRadiiSquared=new ae(40680631590769,40680631590769,40408299984661445e-3),ae.fromRadians=function(t,n,e,i,o){N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),e=e??0;const r=ne(i)?i.radiiSquared:ae._ellipsoidRadiiSquared,a=Math.cos(n);Hn.x=a*Math.cos(t),Hn.y=a*Math.sin(t),Hn.z=Math.sin(n),Hn=ae.normalize(Hn,Hn),ae.multiplyComponents(r,Hn,Ms);const s=Math.sqrt(ae.dot(Hn,Ms));return Ms=ae.divideByScalar(Ms,s,Ms),Hn=ae.multiplyByScalar(Hn,e,Hn),ne(o)||(o=new ae),ae.add(Ms,Hn,o)},ae.fromDegreesArray=function(t,n,e){if(N.defined("coordinates",t),t.length<2||t.length%2!==0)throw new pe("the number of coordinates must be a multiple of 2 and at least 2");const i=t.length;ne(e)?e.length=i/2:e=new Array(i/2);for(let o=0;o<i;o+=2){const r=t[o],a=t[o+1],s=o/2;e[s]=ae.fromDegrees(r,a,0,n,e[s])}return e},ae.fromRadiansArray=function(t,n,e){if(N.defined("coordinates",t),t.length<2||t.length%2!==0)throw new pe("the number of coordinates must be a multiple of 2 and at least 2");const i=t.length;ne(e)?e.length=i/2:e=new Array(i/2);for(let o=0;o<i;o+=2){const r=t[o],a=t[o+1],s=o/2;e[s]=ae.fromRadians(r,a,0,n,e[s])}return e},ae.fromDegreesArrayHeights=function(t,n,e){if(N.defined("coordinates",t),t.length<3||t.length%3!==0)throw new pe("the number of coordinates must be a multiple of 3 and at least 3");const i=t.length;ne(e)?e.length=i/3:e=new Array(i/3);for(let o=0;o<i;o+=3){const r=t[o],a=t[o+1],s=t[o+2],l=o/3;e[l]=ae.fromDegrees(r,a,s,n,e[l])}return e},ae.fromRadiansArrayHeights=function(t,n,e){if(N.defined("coordinates",t),t.length<3||t.length%3!==0)throw new pe("the number of coordinates must be a multiple of 3 and at least 3");const i=t.length;ne(e)?e.length=i/3:e=new Array(i/3);for(let o=0;o<i;o+=3){const r=t[o],a=t[o+1],s=t[o+2],l=o/3;e[l]=ae.fromRadians(r,a,s,n,e[l])}return e},ae.ZERO=Object.freeze(new ae(0,0,0)),ae.ONE=Object.freeze(new ae(1,1,1)),ae.UNIT_X=Object.freeze(new ae(1,0,0)),ae.UNIT_Y=Object.freeze(new ae(0,1,0)),ae.UNIT_Z=Object.freeze(new ae(0,0,1)),ae.prototype.clone=function(t){return ae.clone(this,t)},ae.prototype.equals=function(t){return ae.equals(this,t)},ae.prototype.equalsEpsilon=function(t,n,e){return ae.equalsEpsilon(this,t,n,e)},ae.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z})`};function be(t,n,e,i){this.x=t??0,this.y=n??0,this.z=e??0,this.w=i??0}be.fromElements=function(t,n,e,i,o){return ne(o)?(o.x=t,o.y=n,o.z=e,o.w=i,o):new be(t,n,e,i)},be.fromColor=function(t,n){return N.typeOf.object("color",t),ne(n)?(n.x=t.red,n.y=t.green,n.z=t.blue,n.w=t.alpha,n):new be(t.red,t.green,t.blue,t.alpha)},be.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new be(t.x,t.y,t.z,t.w)},be.packedLength=4,be.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e++]=t.y,n[e++]=t.z,n[e]=t.w,n},be.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new be),e.x=t[n++],e.y=t[n++],e.z=t[n++],e.w=t[n],e},be.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*4;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 4 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)be.pack(t[o],n,o*4);return n},be.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,4),t.length%4!==0)throw new pe("array length must be a multiple of 4.");const e=t.length;ne(n)?n.length=e/4:n=new Array(e/4);for(let i=0;i<e;i+=4){const o=i/4;n[o]=be.unpack(t,i,n[o])}return n},be.fromArray=be.unpack,be.maximumComponent=function(t){return N.typeOf.object("cartesian",t),Math.max(t.x,t.y,t.z,t.w)},be.minimumComponent=function(t){return N.typeOf.object("cartesian",t),Math.min(t.x,t.y,t.z,t.w)},be.minimumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.min(t.x,n.x),e.y=Math.min(t.y,n.y),e.z=Math.min(t.z,n.z),e.w=Math.min(t.w,n.w),e},be.maximumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.max(t.x,n.x),e.y=Math.max(t.y,n.y),e.z=Math.max(t.z,n.z),e.w=Math.max(t.w,n.w),e},be.clamp=function(t,n,e,i){N.typeOf.object("value",t),N.typeOf.object("min",n),N.typeOf.object("max",e),N.typeOf.object("result",i);const o=he.clamp(t.x,n.x,e.x),r=he.clamp(t.y,n.y,e.y),a=he.clamp(t.z,n.z,e.z),s=he.clamp(t.w,n.w,e.w);return i.x=o,i.y=r,i.z=a,i.w=s,i},be.magnitudeSquared=function(t){return N.typeOf.object("cartesian",t),t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},be.magnitude=function(t){return Math.sqrt(be.magnitudeSquared(t))};const oA=new be;be.distance=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),be.subtract(t,n,oA),be.magnitude(oA)},be.distanceSquared=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),be.subtract(t,n,oA),be.magnitudeSquared(oA)},be.normalize=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=be.magnitude(t);if(n.x=t.x/e,n.y=t.y/e,n.z=t.z/e,n.w=t.w/e,isNaN(n.x)||isNaN(n.y)||isNaN(n.z)||isNaN(n.w))throw new pe("normalized result is not a number");return n},be.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y+t.z*n.z+t.w*n.w},be.multiplyComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x*n.x,e.y=t.y*n.y,e.z=t.z*n.z,e.w=t.w*n.w,e},be.divideComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x/n.x,e.y=t.y/n.y,e.z=t.z/n.z,e.w=t.w/n.w,e},be.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e.z=t.z+n.z,e.w=t.w+n.w,e},be.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e.z=t.z-n.z,e.w=t.w-n.w,e},be.multiplyByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e.z=t.z*n,e.w=t.w*n,e},be.divideByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},be.negate=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=-t.w,n},be.abs=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=Math.abs(t.x),n.y=Math.abs(t.y),n.z=Math.abs(t.z),n.w=Math.abs(t.w),n};const rb=new be;be.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),be.multiplyByScalar(n,e,rb),i=be.multiplyByScalar(t,1-e,i),be.add(rb,i,i)};const XD=new be;be.mostOrthogonalAxis=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=be.normalize(t,XD);return be.abs(e,e),e.x<=e.y?e.x<=e.z?e.x<=e.w?n=be.clone(be.UNIT_X,n):n=be.clone(be.UNIT_W,n):e.z<=e.w?n=be.clone(be.UNIT_Z,n):n=be.clone(be.UNIT_W,n):e.y<=e.z?e.y<=e.w?n=be.clone(be.UNIT_Y,n):n=be.clone(be.UNIT_W,n):e.z<=e.w?n=be.clone(be.UNIT_Z,n):n=be.clone(be.UNIT_W,n),n},be.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w},be.equalsArray=function(t,n,e){return t.x===n[e]&&t.y===n[e+1]&&t.z===n[e+2]&&t.w===n[e+3]},be.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.x,n.x,e,i)&&he.equalsEpsilon(t.y,n.y,e,i)&&he.equalsEpsilon(t.z,n.z,e,i)&&he.equalsEpsilon(t.w,n.w,e,i)},be.ZERO=Object.freeze(new be(0,0,0,0)),be.ONE=Object.freeze(new be(1,1,1,1)),be.UNIT_X=Object.freeze(new be(1,0,0,0)),be.UNIT_Y=Object.freeze(new be(0,1,0,0)),be.UNIT_Z=Object.freeze(new be(0,0,1,0)),be.UNIT_W=Object.freeze(new be(0,0,0,1)),be.prototype.clone=function(t){return be.clone(this,t)},be.prototype.equals=function(t){return be.equals(this,t)},be.prototype.equalsEpsilon=function(t,n,e){return be.equalsEpsilon(this,t,n,e)},be.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const hd=new Float32Array(1),Zt=new Uint8Array(hd.buffer),$D=new Uint32Array([287454020]),ob=new Uint8Array($D.buffer)[0]===68;be.packFloat=function(t,n){return N.typeOf.number("value",t),ne(n)||(n=new be),hd[0]=t,ob?(n.x=Zt[0],n.y=Zt[1],n.z=Zt[2],n.w=Zt[3]):(n.x=Zt[3],n.y=Zt[2],n.z=Zt[1],n.w=Zt[0]),n},be.unpackFloat=function(t){return N.typeOf.object("packedFloat",t),ob?(Zt[0]=t.x,Zt[1]=t.y,Zt[2]=t.z,Zt[3]=t.w):(Zt[0]=t.w,Zt[1]=t.z,Zt[2]=t.y,Zt[3]=t.x),hd[0]};const gi={};gi.EMPTY_OBJECT=Object.freeze({}),gi.EMPTY_ARRAY=Object.freeze([]);function me(t,n,e,i,o,r,a,s,l){this[0]=t??0,this[1]=i??0,this[2]=a??0,this[3]=n??0,this[4]=o??0,this[5]=s??0,this[6]=e??0,this[7]=r??0,this[8]=l??0}me.packedLength=9,me.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t[0],n[e++]=t[1],n[e++]=t[2],n[e++]=t[3],n[e++]=t[4],n[e++]=t[5],n[e++]=t[6],n[e++]=t[7],n[e++]=t[8],n},me.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new me),e[0]=t[n++],e[1]=t[n++],e[2]=t[n++],e[3]=t[n++],e[4]=t[n++],e[5]=t[n++],e[6]=t[n++],e[7]=t[n++],e[8]=t[n++],e},me.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*9;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 9 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)me.pack(t[o],n,o*9);return n},me.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,9),t.length%9!==0)throw new pe("array length must be a multiple of 9.");const e=t.length;ne(n)?n.length=e/9:n=new Array(e/9);for(let i=0;i<e;i+=9){const o=i/9;n[o]=me.unpack(t,i,n[o])}return n},me.clone=function(t,n){if(ne(t))return ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):new me(t[0],t[3],t[6],t[1],t[4],t[7],t[2],t[5],t[8])},me.fromArray=me.unpack,me.fromColumnMajorArray=function(t,n){return N.defined("values",t),me.clone(t,n)},me.fromRowMajorArray=function(t,n){return N.defined("values",t),ne(n)?(n[0]=t[0],n[1]=t[3],n[2]=t[6],n[3]=t[1],n[4]=t[4],n[5]=t[7],n[6]=t[2],n[7]=t[5],n[8]=t[8],n):new me(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},me.fromQuaternion=function(t,n){N.typeOf.object("quaternion",t);const e=t.x*t.x,i=t.x*t.y,o=t.x*t.z,r=t.x*t.w,a=t.y*t.y,s=t.y*t.z,l=t.y*t.w,u=t.z*t.z,A=t.z*t.w,c=t.w*t.w,f=e-a-u+c,d=2*(i-A),p=2*(o+l),g=2*(i+A),v=-e+a-u+c,y=2*(s-r),m=2*(o-l),b=2*(s+r),x=-e-a+u+c;return ne(n)?(n[0]=f,n[1]=g,n[2]=m,n[3]=d,n[4]=v,n[5]=b,n[6]=p,n[7]=y,n[8]=x,n):new me(f,d,p,g,v,y,m,b,x)},me.fromHeadingPitchRoll=function(t,n){N.typeOf.object("headingPitchRoll",t);const e=Math.cos(-t.pitch),i=Math.cos(-t.heading),o=Math.cos(t.roll),r=Math.sin(-t.pitch),a=Math.sin(-t.heading),s=Math.sin(t.roll),l=e*i,u=-o*a+s*r*i,A=s*a+o*r*i,c=e*a,f=o*i+s*r*a,d=-s*i+o*r*a,p=-r,g=s*e,v=o*e;return ne(n)?(n[0]=l,n[1]=c,n[2]=p,n[3]=u,n[4]=f,n[5]=g,n[6]=A,n[7]=d,n[8]=v,n):new me(l,u,A,c,f,d,p,g,v)},me.fromScale=function(t,n){return N.typeOf.object("scale",t),ne(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=t.y,n[5]=0,n[6]=0,n[7]=0,n[8]=t.z,n):new me(t.x,0,0,0,t.y,0,0,0,t.z)},me.fromUniformScale=function(t,n){return N.typeOf.number("scale",t),ne(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=t,n[5]=0,n[6]=0,n[7]=0,n[8]=t,n):new me(t,0,0,0,t,0,0,0,t)},me.fromCrossProduct=function(t,n){return N.typeOf.object("vector",t),ne(n)?(n[0]=0,n[1]=t.z,n[2]=-t.y,n[3]=-t.z,n[4]=0,n[5]=t.x,n[6]=t.y,n[7]=-t.x,n[8]=0,n):new me(0,-t.z,t.y,t.z,0,-t.x,-t.y,t.x,0)},me.fromRotationX=function(t,n){N.typeOf.number("angle",t);const e=Math.cos(t),i=Math.sin(t);return ne(n)?(n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=e,n[5]=i,n[6]=0,n[7]=-i,n[8]=e,n):new me(1,0,0,0,e,-i,0,i,e)},me.fromRotationY=function(t,n){N.typeOf.number("angle",t);const e=Math.cos(t),i=Math.sin(t);return ne(n)?(n[0]=e,n[1]=0,n[2]=-i,n[3]=0,n[4]=1,n[5]=0,n[6]=i,n[7]=0,n[8]=e,n):new me(e,0,i,0,1,0,-i,0,e)},me.fromRotationZ=function(t,n){N.typeOf.number("angle",t);const e=Math.cos(t),i=Math.sin(t);return ne(n)?(n[0]=e,n[1]=i,n[2]=0,n[3]=-i,n[4]=e,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new me(e,-i,0,i,e,0,0,0,1)},me.toArray=function(t,n){return N.typeOf.object("matrix",t),ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},me.getElementIndex=function(t,n){return N.typeOf.number.greaterThanOrEquals("row",n,0),N.typeOf.number.lessThanOrEquals("row",n,2),N.typeOf.number.greaterThanOrEquals("column",t,0),N.typeOf.number.lessThanOrEquals("column",t,2),t*3+n},me.getColumn=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("result",e);const i=n*3,o=t[i],r=t[i+1],a=t[i+2];return e.x=o,e.y=r,e.z=a,e},me.setColumn=function(t,n,e,i){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=me.clone(t,i);const o=n*3;return i[o]=e.x,i[o+1]=e.y,i[o+2]=e.z,i},me.getRow=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("result",e);const i=t[n],o=t[n+3],r=t[n+6];return e.x=i,e.y=o,e.z=r,e},me.setRow=function(t,n,e,i){return N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,2),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=me.clone(t,i),i[n]=e.x,i[n+3]=e.y,i[n+6]=e.z,i};const YD=new ae;me.setScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e);const i=me.getScale(t,YD),o=n.x/i.x,r=n.y/i.y,a=n.z/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*a,e};const JD=new ae;me.setUniformScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e);const i=me.getScale(t,JD),o=n/i.x,r=n/i.y,a=n/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*a,e};const Ad=new ae;me.getScale=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n.x=ae.magnitude(ae.fromElements(t[0],t[1],t[2],Ad)),n.y=ae.magnitude(ae.fromElements(t[3],t[4],t[5],Ad)),n.z=ae.magnitude(ae.fromElements(t[6],t[7],t[8],Ad)),n};const sb=new ae;me.getMaximumScale=function(t){return me.getScale(t,sb),ae.maximumComponent(sb)};const e4=new ae;me.setRotation=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("result",e);const i=me.getScale(t,e4);return e[0]=n[0]*i.x,e[1]=n[1]*i.x,e[2]=n[2]*i.x,e[3]=n[3]*i.y,e[4]=n[4]*i.y,e[5]=n[5]*i.y,e[6]=n[6]*i.z,e[7]=n[7]*i.z,e[8]=n[8]*i.z,e};const t4=new ae;me.getRotation=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=me.getScale(t,t4);return n[0]=t[0]/e.x,n[1]=t[1]/e.x,n[2]=t[2]/e.x,n[3]=t[3]/e.y,n[4]=t[4]/e.y,n[5]=t[5]/e.y,n[6]=t[6]/e.z,n[7]=t[7]/e.z,n[8]=t[8]/e.z,n},me.multiply=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t[0]*n[0]+t[3]*n[1]+t[6]*n[2],o=t[1]*n[0]+t[4]*n[1]+t[7]*n[2],r=t[2]*n[0]+t[5]*n[1]+t[8]*n[2],a=t[0]*n[3]+t[3]*n[4]+t[6]*n[5],s=t[1]*n[3]+t[4]*n[4]+t[7]*n[5],l=t[2]*n[3]+t[5]*n[4]+t[8]*n[5],u=t[0]*n[6]+t[3]*n[7]+t[6]*n[8],A=t[1]*n[6]+t[4]*n[7]+t[7]*n[8],c=t[2]*n[6]+t[5]*n[7]+t[8]*n[8];return e[0]=i,e[1]=o,e[2]=r,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=A,e[8]=c,e},me.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e},me.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e},me.multiplyByVector=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=t[0]*i+t[3]*o+t[6]*r,s=t[1]*i+t[4]*o+t[7]*r,l=t[2]*i+t[5]*o+t[8]*r;return e.x=a,e.y=s,e.z=l,e},me.multiplyByScalar=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},me.multiplyByScale=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e),e[0]=t[0]*n.x,e[1]=t[1]*n.x,e[2]=t[2]*n.x,e[3]=t[3]*n.y,e[4]=t[4]*n.y,e[5]=t[5]*n.y,e[6]=t[6]*n.z,e[7]=t[7]*n.z,e[8]=t[8]*n.z,e},me.multiplyByUniformScale=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e},me.negate=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n},me.transpose=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[3],o=t[6],r=t[1],a=t[4],s=t[7],l=t[2],u=t[5],A=t[8];return n[0]=e,n[1]=i,n[2]=o,n[3]=r,n[4]=a,n[5]=s,n[6]=l,n[7]=u,n[8]=A,n};function n4(t){let n=0;for(let e=0;e<9;++e){const i=t[e];n+=i*i}return Math.sqrt(n)}const fd=[1,0,0],pd=[2,2,1];function i4(t){let n=0;for(let e=0;e<3;++e){const i=t[me.getElementIndex(pd[e],fd[e])];n+=2*i*i}return Math.sqrt(n)}function r4(t,n){const e=he.EPSILON15;let i=0,o=1;for(let u=0;u<3;++u){const A=Math.abs(t[me.getElementIndex(pd[u],fd[u])]);A>i&&(o=u,i=A)}let r=1,a=0;const s=fd[o],l=pd[o];if(Math.abs(t[me.getElementIndex(l,s)])>e){const u=t[me.getElementIndex(l,l)],A=t[me.getElementIndex(s,s)],c=t[me.getElementIndex(l,s)],f=(u-A)/2/c;let d;f<0?d=-1/(-f+Math.sqrt(1+f*f)):d=1/(f+Math.sqrt(1+f*f)),r=1/Math.sqrt(1+d*d),a=d*r}return n=me.clone(me.IDENTITY,n),n[me.getElementIndex(s,s)]=n[me.getElementIndex(l,l)]=r,n[me.getElementIndex(l,s)]=a,n[me.getElementIndex(s,l)]=-a,n}const sA=new me,ab=new me;me.computeEigenDecomposition=function(t,n){N.typeOf.object("matrix",t);const e=he.EPSILON20,i=10;let o=0,r=0;ne(n)||(n={});const a=n.unitary=me.clone(me.IDENTITY,n.unitary),s=n.diagonal=me.clone(t,n.diagonal),l=e*n4(s);for(;r<i&&i4(s)>l;)r4(s,sA),me.transpose(sA,ab),me.multiply(s,sA,s),me.multiply(ab,s,s),me.multiply(a,sA,a),++o>2&&(++r,o=0);return n},me.abs=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n},me.determinant=function(t){N.typeOf.object("matrix",t);const n=t[0],e=t[3],i=t[6],o=t[1],r=t[4],a=t[7],s=t[2],l=t[5],u=t[8];return n*(r*u-l*a)+o*(l*i-e*u)+s*(e*a-r*i)},me.inverse=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[1],o=t[2],r=t[3],a=t[4],s=t[5],l=t[6],u=t[7],A=t[8],c=me.determinant(t);if(Math.abs(c)<=he.EPSILON15)throw new pe("matrix is not invertible");n[0]=a*A-u*s,n[1]=u*o-i*A,n[2]=i*s-a*o,n[3]=l*s-r*A,n[4]=e*A-l*o,n[5]=r*o-e*s,n[6]=r*u-l*a,n[7]=l*i-e*u,n[8]=e*a-r*i;const f=1/c;return me.multiplyByScalar(n,f,n)};const o4=new me;me.inverseTranspose=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),me.inverse(me.transpose(t,o4),n)},me.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},me.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t[0]-n[0])<=e&&Math.abs(t[1]-n[1])<=e&&Math.abs(t[2]-n[2])<=e&&Math.abs(t[3]-n[3])<=e&&Math.abs(t[4]-n[4])<=e&&Math.abs(t[5]-n[5])<=e&&Math.abs(t[6]-n[6])<=e&&Math.abs(t[7]-n[7])<=e&&Math.abs(t[8]-n[8])<=e},me.IDENTITY=Object.freeze(new me(1,0,0,0,1,0,0,0,1)),me.ZERO=Object.freeze(new me(0,0,0,0,0,0,0,0,0)),me.COLUMN0ROW0=0,me.COLUMN0ROW1=1,me.COLUMN0ROW2=2,me.COLUMN1ROW0=3,me.COLUMN1ROW1=4,me.COLUMN1ROW2=5,me.COLUMN2ROW0=6,me.COLUMN2ROW1=7,me.COLUMN2ROW2=8,Object.defineProperties(me.prototype,{length:{get:function(){return me.packedLength}}}),me.prototype.clone=function(t){return me.clone(this,t)},me.prototype.equals=function(t){return me.equals(this,t)},me.equalsArray=function(t,n,e){return t[0]===n[e]&&t[1]===n[e+1]&&t[2]===n[e+2]&&t[3]===n[e+3]&&t[4]===n[e+4]&&t[5]===n[e+5]&&t[6]===n[e+6]&&t[7]===n[e+7]&&t[8]===n[e+8]},me.prototype.equalsEpsilon=function(t,n){return me.equalsEpsilon(this,t,n)},me.prototype.toString=function(){return`(${this[0]}, ${this[3]}, ${this[6]})
|
|
342
342
|
(${this[1]}, ${this[4]}, ${this[7]})
|
|
343
343
|
(${this[2]}, ${this[5]}, ${this[8]})`};function Nt(t){this.name="RuntimeError",this.message=t;let n;try{throw new Error}catch(e){n=e.stack}this.stack=n}ne(Object.create)&&(Nt.prototype=Object.create(Error.prototype),Nt.prototype.constructor=Nt),Nt.prototype.toString=function(){let t=`${this.name}: ${this.message}`;return ne(this.stack)&&(t+=`
|
|
344
|
-
${this.stack.toString()}`),t};function ge(t,n,e,i,o,r,a,s,l,u,A,c,f,d,p,g){this[0]=t??0,this[1]=o??0,this[2]=l??0,this[3]=f??0,this[4]=n??0,this[5]=r??0,this[6]=u??0,this[7]=d??0,this[8]=e??0,this[9]=a??0,this[10]=A??0,this[11]=p??0,this[12]=i??0,this[13]=s??0,this[14]=c??0,this[15]=g??0}ge.packedLength=16,ge.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t[0],n[e++]=t[1],n[e++]=t[2],n[e++]=t[3],n[e++]=t[4],n[e++]=t[5],n[e++]=t[6],n[e++]=t[7],n[e++]=t[8],n[e++]=t[9],n[e++]=t[10],n[e++]=t[11],n[e++]=t[12],n[e++]=t[13],n[e++]=t[14],n[e]=t[15],n},ge.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new ge),e[0]=t[n++],e[1]=t[n++],e[2]=t[n++],e[3]=t[n++],e[4]=t[n++],e[5]=t[n++],e[6]=t[n++],e[7]=t[n++],e[8]=t[n++],e[9]=t[n++],e[10]=t[n++],e[11]=t[n++],e[12]=t[n++],e[13]=t[n++],e[14]=t[n++],e[15]=t[n],e},ge.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*16;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 16 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)ge.pack(t[o],n,o*16);return n},ge.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,16),t.length%16!==0)throw new pe("array length must be a multiple of 16.");const e=t.length;ne(n)?n.length=e/16:n=new Array(e/16);for(let i=0;i<e;i+=16){const o=i/16;n[o]=ge.unpack(t,i,n[o])}return n},ge.clone=function(t,n){if(ne(t))return ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):new ge(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])},ge.fromArray=ge.unpack,ge.fromColumnMajorArray=function(t,n){return N.defined("values",t),ge.clone(t,n)},ge.fromRowMajorArray=function(t,n){return N.defined("values",t),ne(n)?(n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=t[1],n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=t[2],n[9]=t[6],n[10]=t[10],n[11]=t[14],n[12]=t[3],n[13]=t[7],n[14]=t[11],n[15]=t[15],n):new ge(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},ge.fromRotationTranslation=function(t,n,e){return N.typeOf.object("rotation",t),n=n??ae.ZERO,ne(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=0,e[4]=t[3],e[5]=t[4],e[6]=t[5],e[7]=0,e[8]=t[6],e[9]=t[7],e[10]=t[8],e[11]=0,e[12]=n.x,e[13]=n.y,e[14]=n.z,e[15]=1,e):new ge(t[0],t[3],t[6],n.x,t[1],t[4],t[7],n.y,t[2],t[5],t[8],n.z,0,0,0,1)},ge.fromTranslationQuaternionRotationScale=function(t,n,e,i){N.typeOf.object("translation",t),N.typeOf.object("rotation",n),N.typeOf.object("scale",e),ne(i)||(i=new ge);const o=e.x,r=e.y,a=e.z,s=n.x*n.x,l=n.x*n.y,u=n.x*n.z,A=n.x*n.w,c=n.y*n.y,f=n.y*n.z,d=n.y*n.w,p=n.z*n.z,g=n.z*n.w,v=n.w*n.w,y=s-c-p+v,m=2*(l-g),b=2*(u+d),x=2*(l+g),E=-s+c-p+v,B=2*(f-A),P=2*(u-d),I=2*(f+A),O=-s-c+p+v;return i[0]=y*o,i[1]=x*o,i[2]=P*o,i[3]=0,i[4]=m*r,i[5]=E*r,i[6]=I*r,i[7]=0,i[8]=b*a,i[9]=B*a,i[10]=O*a,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i},ge.fromTranslationRotationScale=function(t,n){return N.typeOf.object("translationRotationScale",t),ge.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,n)},ge.fromTranslation=function(t,n){return N.typeOf.object("translation",t),ge.fromRotationTranslation(me.IDENTITY,t,n)},ge.fromScale=function(t,n){return N.typeOf.object("scale",t),ne(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new ge(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)},ge.fromUniformScale=function(t,n){return N.typeOf.number("scale",t),ne(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new ge(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)},ge.fromRotation=function(t,n){return N.typeOf.object("rotation",t),ne(n)||(n=new ge),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=0,n[4]=t[3],n[5]=t[4],n[6]=t[5],n[7]=0,n[8]=t[6],n[9]=t[7],n[10]=t[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n};const Ds=new ae,Rs=new ae,fl=new ae;ge.fromCamera=function(t,n){N.typeOf.object("camera",t);const e=t.position,i=t.direction,o=t.up;N.typeOf.object("camera.position",e),N.typeOf.object("camera.direction",i),N.typeOf.object("camera.up",o),ae.normalize(i,Ds),ae.normalize(ae.cross(Ds,o,Rs),Rs),ae.normalize(ae.cross(Rs,Ds,fl),fl);const r=Rs.x,a=Rs.y,s=Rs.z,l=Ds.x,u=Ds.y,A=Ds.z,c=fl.x,f=fl.y,d=fl.z,p=e.x,g=e.y,v=e.z,y=r*-p+a*-g+s*-v,m=c*-p+f*-g+d*-v,b=l*p+u*g+A*v;return ne(n)?(n[0]=r,n[1]=c,n[2]=-l,n[3]=0,n[4]=a,n[5]=f,n[6]=-u,n[7]=0,n[8]=s,n[9]=d,n[10]=-A,n[11]=0,n[12]=y,n[13]=m,n[14]=b,n[15]=1,n):new ge(r,a,s,y,c,f,d,m,-l,-u,-A,b,0,0,0,1)},ge.computePerspectiveFieldOfView=function(t,n,e,i,o){N.typeOf.number.greaterThan("fovY",t,0),N.typeOf.number.lessThan("fovY",t,Math.PI),N.typeOf.number.greaterThan("near",e,0),N.typeOf.number.greaterThan("far",i,0),N.typeOf.object("result",o);const a=1/Math.tan(t*.5),s=a/n,l=(i+e)/(e-i),u=2*i*e/(e-i);return o[0]=s,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=a,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=l,o[11]=-1,o[12]=0,o[13]=0,o[14]=u,o[15]=0,o},ge.computeOrthographicOffCenter=function(t,n,e,i,o,r,a){N.typeOf.number("left",t),N.typeOf.number("right",n),N.typeOf.number("bottom",e),N.typeOf.number("top",i),N.typeOf.number("near",o),N.typeOf.number("far",r),N.typeOf.object("result",a);let s=1/(n-t),l=1/(i-e),u=1/(r-o);const A=-(n+t)*s,c=-(i+e)*l,f=-(r+o)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=A,a[13]=c,a[14]=f,a[15]=1,a},ge.computePerspectiveOffCenter=function(t,n,e,i,o,r,a){N.typeOf.number("left",t),N.typeOf.number("right",n),N.typeOf.number("bottom",e),N.typeOf.number("top",i),N.typeOf.number("near",o),N.typeOf.number("far",r),N.typeOf.object("result",a);const s=2*o/(n-t),l=2*o/(i-e),u=(n+t)/(n-t),A=(i+e)/(i-e),c=-(r+o)/(r-o),f=-1,d=-2*r*o/(r-o);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=A,a[10]=c,a[11]=f,a[12]=0,a[13]=0,a[14]=d,a[15]=0,a},ge.computeInfinitePerspectiveOffCenter=function(t,n,e,i,o,r){N.typeOf.number("left",t),N.typeOf.number("right",n),N.typeOf.number("bottom",e),N.typeOf.number("top",i),N.typeOf.number("near",o),N.typeOf.object("result",r);const a=2*o/(n-t),s=2*o/(i-e),l=(n+t)/(n-t),u=(i+e)/(i-e),A=-1,c=-1,f=-2*o;return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=l,r[9]=u,r[10]=A,r[11]=c,r[12]=0,r[13]=0,r[14]=f,r[15]=0,r},ge.computeViewportTransformation=function(t,n,e,i){ne(i)||(i=new ge),t=t??gi.EMPTY_OBJECT;const o=t.x??0,r=t.y??0,a=t.width??0,s=t.height??0;n=n??0,e=e??1;const l=a*.5,u=s*.5,A=(e-n)*.5,c=l,f=u,d=A,p=o+l,g=r+u,v=n+A,y=1;return i[0]=c,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=f,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=d,i[11]=0,i[12]=p,i[13]=g,i[14]=v,i[15]=y,i},ge.computeView=function(t,n,e,i,o){return N.typeOf.object("position",t),N.typeOf.object("direction",n),N.typeOf.object("up",e),N.typeOf.object("right",i),N.typeOf.object("result",o),o[0]=i.x,o[1]=e.x,o[2]=-n.x,o[3]=0,o[4]=i.y,o[5]=e.y,o[6]=-n.y,o[7]=0,o[8]=i.z,o[9]=e.z,o[10]=-n.z,o[11]=0,o[12]=-ae.dot(i,t),o[13]=-ae.dot(e,t),o[14]=ae.dot(n,t),o[15]=1,o},ge.toArray=function(t,n){return N.typeOf.object("matrix",t),ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},ge.getElementIndex=function(t,n){return N.typeOf.number.greaterThanOrEquals("row",n,0),N.typeOf.number.lessThanOrEquals("row",n,3),N.typeOf.number.greaterThanOrEquals("column",t,0),N.typeOf.number.lessThanOrEquals("column",t,3),t*4+n},ge.getColumn=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("result",e);const i=n*4,o=t[i],r=t[i+1],a=t[i+2],s=t[i+3];return e.x=o,e.y=r,e.z=a,e.w=s,e},ge.setColumn=function(t,n,e,i){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=ge.clone(t,i);const o=n*4;return i[o]=e.x,i[o+1]=e.y,i[o+2]=e.z,i[o+3]=e.w,i},ge.getRow=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("result",e);const i=t[n],o=t[n+4],r=t[n+8],a=t[n+12];return e.x=i,e.y=o,e.z=r,e.w=a,e},ge.setRow=function(t,n,e,i){return N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=ge.clone(t,i),i[n]=e.x,i[n+4]=e.y,i[n+8]=e.z,i[n+12]=e.w,i},ge.setTranslation=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.object("translation",n),N.typeOf.object("result",e),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=n.x,e[13]=n.y,e[14]=n.z,e[15]=t[15],e};const sR=new ae;ge.setScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e);const i=ge.getScale(t,sR),o=n.x/i.x,r=n.y/i.y,a=n.z/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3],e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7],e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};const aR=new ae;ge.setUniformScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e);const i=ge.getScale(t,aR),o=n/i.x,r=n/i.y,a=n/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3],e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7],e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};const dd=new ae;ge.getScale=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n.x=ae.magnitude(ae.fromElements(t[0],t[1],t[2],dd)),n.y=ae.magnitude(ae.fromElements(t[4],t[5],t[6],dd)),n.z=ae.magnitude(ae.fromElements(t[8],t[9],t[10],dd)),n};const lb=new ae;ge.getMaximumScale=function(t){return ge.getScale(t,lb),ae.maximumComponent(lb)};const lR=new ae;ge.setRotation=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("result",e);const i=ge.getScale(t,lR);return e[0]=n[0]*i.x,e[1]=n[1]*i.x,e[2]=n[2]*i.x,e[3]=t[3],e[4]=n[3]*i.y,e[5]=n[4]*i.y,e[6]=n[5]*i.y,e[7]=t[7],e[8]=n[6]*i.z,e[9]=n[7]*i.z,e[10]=n[8]*i.z,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};const uR=new ae;ge.getRotation=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=ge.getScale(t,uR);return n[0]=t[0]/e.x,n[1]=t[1]/e.x,n[2]=t[2]/e.x,n[3]=t[4]/e.y,n[4]=t[5]/e.y,n[5]=t[6]/e.y,n[6]=t[8]/e.z,n[7]=t[9]/e.z,n[8]=t[10]/e.z,n},ge.multiply=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t[0],o=t[1],r=t[2],a=t[3],s=t[4],l=t[5],u=t[6],A=t[7],c=t[8],f=t[9],d=t[10],p=t[11],g=t[12],v=t[13],y=t[14],m=t[15],b=n[0],x=n[1],E=n[2],B=n[3],P=n[4],I=n[5],O=n[6],M=n[7],S=n[8],T=n[9],w=n[10],C=n[11],U=n[12],F=n[13],D=n[14],R=n[15],L=i*b+s*x+c*E+g*B,k=o*b+l*x+f*E+v*B,Q=r*b+u*x+d*E+y*B,V=a*b+A*x+p*E+m*B,G=i*P+s*I+c*O+g*M,$=o*P+l*I+f*O+v*M,Y=r*P+u*I+d*O+y*M,ie=a*P+A*I+p*O+m*M,re=i*S+s*T+c*w+g*C,le=o*S+l*T+f*w+v*C,ue=r*S+u*T+d*w+y*C,te=a*S+A*T+p*w+m*C,ce=i*U+s*F+c*D+g*R,X=o*U+l*F+f*D+v*R,q=r*U+u*F+d*D+y*R,H=a*U+A*F+p*D+m*R;return e[0]=L,e[1]=k,e[2]=Q,e[3]=V,e[4]=G,e[5]=$,e[6]=Y,e[7]=ie,e[8]=re,e[9]=le,e[10]=ue,e[11]=te,e[12]=ce,e[13]=X,e[14]=q,e[15]=H,e},ge.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},ge.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e},ge.multiplyTransformation=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t[0],o=t[1],r=t[2],a=t[4],s=t[5],l=t[6],u=t[8],A=t[9],c=t[10],f=t[12],d=t[13],p=t[14],g=n[0],v=n[1],y=n[2],m=n[4],b=n[5],x=n[6],E=n[8],B=n[9],P=n[10],I=n[12],O=n[13],M=n[14],S=i*g+a*v+u*y,T=o*g+s*v+A*y,w=r*g+l*v+c*y,C=i*m+a*b+u*x,U=o*m+s*b+A*x,F=r*m+l*b+c*x,D=i*E+a*B+u*P,R=o*E+s*B+A*P,L=r*E+l*B+c*P,k=i*I+a*O+u*M+f,Q=o*I+s*O+A*M+d,V=r*I+l*O+c*M+p;return e[0]=S,e[1]=T,e[2]=w,e[3]=0,e[4]=C,e[5]=U,e[6]=F,e[7]=0,e[8]=D,e[9]=R,e[10]=L,e[11]=0,e[12]=k,e[13]=Q,e[14]=V,e[15]=1,e},ge.multiplyByMatrix3=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("rotation",n),N.typeOf.object("result",e);const i=t[0],o=t[1],r=t[2],a=t[4],s=t[5],l=t[6],u=t[8],A=t[9],c=t[10],f=n[0],d=n[1],p=n[2],g=n[3],v=n[4],y=n[5],m=n[6],b=n[7],x=n[8],E=i*f+a*d+u*p,B=o*f+s*d+A*p,P=r*f+l*d+c*p,I=i*g+a*v+u*y,O=o*g+s*v+A*y,M=r*g+l*v+c*y,S=i*m+a*b+u*x,T=o*m+s*b+A*x,w=r*m+l*b+c*x;return e[0]=E,e[1]=B,e[2]=P,e[3]=0,e[4]=I,e[5]=O,e[6]=M,e[7]=0,e[8]=S,e[9]=T,e[10]=w,e[11]=0,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},ge.multiplyByTranslation=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("translation",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=i*t[0]+o*t[4]+r*t[8]+t[12],s=i*t[1]+o*t[5]+r*t[9]+t[13],l=i*t[2]+o*t[6]+r*t[10]+t[14];return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=a,e[13]=s,e[14]=l,e[15]=t[15],e},ge.multiplyByScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z;return i===1&&o===1&&r===1?ge.clone(t,e):(e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=o*t[6],e[7]=t[7],e[8]=r*t[8],e[9]=r*t[9],e[10]=r*t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e)},ge.multiplyByUniformScale=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3],e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7],e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},ge.multiplyByVector=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=n.w,s=t[0]*i+t[4]*o+t[8]*r+t[12]*a,l=t[1]*i+t[5]*o+t[9]*r+t[13]*a,u=t[2]*i+t[6]*o+t[10]*r+t[14]*a,A=t[3]*i+t[7]*o+t[11]*r+t[15]*a;return e.x=s,e.y=l,e.z=u,e.w=A,e},ge.multiplyByPointAsVector=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=t[0]*i+t[4]*o+t[8]*r,s=t[1]*i+t[5]*o+t[9]*r,l=t[2]*i+t[6]*o+t[10]*r;return e.x=a,e.y=s,e.z=l,e},ge.multiplyByPoint=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=t[0]*i+t[4]*o+t[8]*r+t[12],s=t[1]*i+t[5]*o+t[9]*r+t[13],l=t[2]*i+t[6]*o+t[10]*r+t[14];return e.x=a,e.y=s,e.z=l,e},ge.multiplyByScalar=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},ge.negate=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n[9]=-t[9],n[10]=-t[10],n[11]=-t[11],n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=-t[15],n},ge.transpose=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[1],i=t[2],o=t[3],r=t[6],a=t[7],s=t[11];return n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=e,n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=i,n[9]=r,n[10]=t[10],n[11]=t[14],n[12]=o,n[13]=a,n[14]=s,n[15]=t[15],n},ge.abs=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n[9]=Math.abs(t[9]),n[10]=Math.abs(t[10]),n[11]=Math.abs(t[11]),n[12]=Math.abs(t[12]),n[13]=Math.abs(t[13]),n[14]=Math.abs(t[14]),n[15]=Math.abs(t[15]),n},ge.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[3]===n[3]&&t[7]===n[7]&&t[11]===n[11]&&t[15]===n[15]},ge.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t[0]-n[0])<=e&&Math.abs(t[1]-n[1])<=e&&Math.abs(t[2]-n[2])<=e&&Math.abs(t[3]-n[3])<=e&&Math.abs(t[4]-n[4])<=e&&Math.abs(t[5]-n[5])<=e&&Math.abs(t[6]-n[6])<=e&&Math.abs(t[7]-n[7])<=e&&Math.abs(t[8]-n[8])<=e&&Math.abs(t[9]-n[9])<=e&&Math.abs(t[10]-n[10])<=e&&Math.abs(t[11]-n[11])<=e&&Math.abs(t[12]-n[12])<=e&&Math.abs(t[13]-n[13])<=e&&Math.abs(t[14]-n[14])<=e&&Math.abs(t[15]-n[15])<=e},ge.getTranslation=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n.x=t[12],n.y=t[13],n.z=t[14],n},ge.getMatrix3=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[4],n[4]=t[5],n[5]=t[6],n[6]=t[8],n[7]=t[9],n[8]=t[10],n};const cR=new me,hR=new me,AR=new be,fR=new be(0,0,0,1);ge.inverse=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[4],o=t[8],r=t[12],a=t[1],s=t[5],l=t[9],u=t[13],A=t[2],c=t[6],f=t[10],d=t[14],p=t[3],g=t[7],v=t[11],y=t[15];let m=f*y,b=d*v,x=c*y,E=d*g,B=c*v,P=f*g,I=A*y,O=d*p,M=A*v,S=f*p,T=A*g,w=c*p;const C=m*s+E*l+B*u-(b*s+x*l+P*u),U=b*a+I*l+S*u-(m*a+O*l+M*u),F=x*a+O*s+T*u-(E*a+I*s+w*u),D=P*a+M*s+w*l-(B*a+S*s+T*l),R=b*i+x*o+P*r-(m*i+E*o+B*r),L=m*e+O*o+M*r-(b*e+I*o+S*r),k=E*e+I*i+w*r-(x*e+O*i+T*r),Q=B*e+S*i+T*o-(P*e+M*i+w*o);m=o*u,b=r*l,x=i*u,E=r*s,B=i*l,P=o*s,I=e*u,O=r*a,M=e*l,S=o*a,T=e*s,w=i*a;const V=m*g+E*v+B*y-(b*g+x*v+P*y),G=b*p+I*v+S*y-(m*p+O*v+M*y),$=x*p+O*g+T*y-(E*p+I*g+w*y),Y=P*p+M*g+w*v-(B*p+S*g+T*v),ie=x*f+P*d+b*c-(B*d+m*c+E*f),re=M*d+m*A+O*f-(I*f+S*d+b*A),le=I*c+w*d+E*A-(T*d+x*A+O*c),ue=T*f+B*A+S*c-(M*c+w*f+P*A);let te=e*C+i*U+o*F+r*D;if(Math.abs(te)<he.EPSILON21){if(me.equalsEpsilon(ge.getMatrix3(t,cR),hR,he.EPSILON7)&&be.equals(ge.getRow(t,3,AR),fR))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new Nt("matrix is not invertible because its determinate is zero.")}return te=1/te,n[0]=C*te,n[1]=U*te,n[2]=F*te,n[3]=D*te,n[4]=R*te,n[5]=L*te,n[6]=k*te,n[7]=Q*te,n[8]=V*te,n[9]=G*te,n[10]=$*te,n[11]=Y*te,n[12]=ie*te,n[13]=re*te,n[14]=le*te,n[15]=ue*te,n},ge.inverseTransformation=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[1],o=t[2],r=t[4],a=t[5],s=t[6],l=t[8],u=t[9],A=t[10],c=t[12],f=t[13],d=t[14],p=-e*c-i*f-o*d,g=-r*c-a*f-s*d,v=-l*c-u*f-A*d;return n[0]=e,n[1]=r,n[2]=l,n[3]=0,n[4]=i,n[5]=a,n[6]=u,n[7]=0,n[8]=o,n[9]=s,n[10]=A,n[11]=0,n[12]=p,n[13]=g,n[14]=v,n[15]=1,n};const pR=new ge;ge.inverseTranspose=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),ge.inverse(ge.transpose(t,pR),n)},ge.IDENTITY=Object.freeze(new ge(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),ge.ZERO=Object.freeze(new ge(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),ge.COLUMN0ROW0=0,ge.COLUMN0ROW1=1,ge.COLUMN0ROW2=2,ge.COLUMN0ROW3=3,ge.COLUMN1ROW0=4,ge.COLUMN1ROW1=5,ge.COLUMN1ROW2=6,ge.COLUMN1ROW3=7,ge.COLUMN2ROW0=8,ge.COLUMN2ROW1=9,ge.COLUMN2ROW2=10,ge.COLUMN2ROW3=11,ge.COLUMN3ROW0=12,ge.COLUMN3ROW1=13,ge.COLUMN3ROW2=14,ge.COLUMN3ROW3=15,Object.defineProperties(ge.prototype,{length:{get:function(){return ge.packedLength}}}),ge.prototype.clone=function(t){return ge.clone(this,t)},ge.prototype.equals=function(t){return ge.equals(this,t)},ge.equalsArray=function(t,n,e){return t[0]===n[e]&&t[1]===n[e+1]&&t[2]===n[e+2]&&t[3]===n[e+3]&&t[4]===n[e+4]&&t[5]===n[e+5]&&t[6]===n[e+6]&&t[7]===n[e+7]&&t[8]===n[e+8]&&t[9]===n[e+9]&&t[10]===n[e+10]&&t[11]===n[e+11]&&t[12]===n[e+12]&&t[13]===n[e+13]&&t[14]===n[e+14]&&t[15]===n[e+15]},ge.prototype.equalsEpsilon=function(t,n){return ge.equalsEpsilon(this,t,n)},ge.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
|
|
344
|
+
${this.stack.toString()}`),t};function ge(t,n,e,i,o,r,a,s,l,u,A,c,f,d,p,g){this[0]=t??0,this[1]=o??0,this[2]=l??0,this[3]=f??0,this[4]=n??0,this[5]=r??0,this[6]=u??0,this[7]=d??0,this[8]=e??0,this[9]=a??0,this[10]=A??0,this[11]=p??0,this[12]=i??0,this[13]=s??0,this[14]=c??0,this[15]=g??0}ge.packedLength=16,ge.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t[0],n[e++]=t[1],n[e++]=t[2],n[e++]=t[3],n[e++]=t[4],n[e++]=t[5],n[e++]=t[6],n[e++]=t[7],n[e++]=t[8],n[e++]=t[9],n[e++]=t[10],n[e++]=t[11],n[e++]=t[12],n[e++]=t[13],n[e++]=t[14],n[e]=t[15],n},ge.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new ge),e[0]=t[n++],e[1]=t[n++],e[2]=t[n++],e[3]=t[n++],e[4]=t[n++],e[5]=t[n++],e[6]=t[n++],e[7]=t[n++],e[8]=t[n++],e[9]=t[n++],e[10]=t[n++],e[11]=t[n++],e[12]=t[n++],e[13]=t[n++],e[14]=t[n++],e[15]=t[n],e},ge.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*16;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 16 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)ge.pack(t[o],n,o*16);return n},ge.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,16),t.length%16!==0)throw new pe("array length must be a multiple of 16.");const e=t.length;ne(n)?n.length=e/16:n=new Array(e/16);for(let i=0;i<e;i+=16){const o=i/16;n[o]=ge.unpack(t,i,n[o])}return n},ge.clone=function(t,n){if(ne(t))return ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):new ge(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])},ge.fromArray=ge.unpack,ge.fromColumnMajorArray=function(t,n){return N.defined("values",t),ge.clone(t,n)},ge.fromRowMajorArray=function(t,n){return N.defined("values",t),ne(n)?(n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=t[1],n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=t[2],n[9]=t[6],n[10]=t[10],n[11]=t[14],n[12]=t[3],n[13]=t[7],n[14]=t[11],n[15]=t[15],n):new ge(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},ge.fromRotationTranslation=function(t,n,e){return N.typeOf.object("rotation",t),n=n??ae.ZERO,ne(e)?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=0,e[4]=t[3],e[5]=t[4],e[6]=t[5],e[7]=0,e[8]=t[6],e[9]=t[7],e[10]=t[8],e[11]=0,e[12]=n.x,e[13]=n.y,e[14]=n.z,e[15]=1,e):new ge(t[0],t[3],t[6],n.x,t[1],t[4],t[7],n.y,t[2],t[5],t[8],n.z,0,0,0,1)},ge.fromTranslationQuaternionRotationScale=function(t,n,e,i){N.typeOf.object("translation",t),N.typeOf.object("rotation",n),N.typeOf.object("scale",e),ne(i)||(i=new ge);const o=e.x,r=e.y,a=e.z,s=n.x*n.x,l=n.x*n.y,u=n.x*n.z,A=n.x*n.w,c=n.y*n.y,f=n.y*n.z,d=n.y*n.w,p=n.z*n.z,g=n.z*n.w,v=n.w*n.w,y=s-c-p+v,m=2*(l-g),b=2*(u+d),x=2*(l+g),E=-s+c-p+v,B=2*(f-A),P=2*(u-d),I=2*(f+A),O=-s-c+p+v;return i[0]=y*o,i[1]=x*o,i[2]=P*o,i[3]=0,i[4]=m*r,i[5]=E*r,i[6]=I*r,i[7]=0,i[8]=b*a,i[9]=B*a,i[10]=O*a,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i},ge.fromTranslationRotationScale=function(t,n){return N.typeOf.object("translationRotationScale",t),ge.fromTranslationQuaternionRotationScale(t.translation,t.rotation,t.scale,n)},ge.fromTranslation=function(t,n){return N.typeOf.object("translation",t),ge.fromRotationTranslation(me.IDENTITY,t,n)},ge.fromScale=function(t,n){return N.typeOf.object("scale",t),ne(n)?(n[0]=t.x,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t.y,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t.z,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new ge(t.x,0,0,0,0,t.y,0,0,0,0,t.z,0,0,0,0,1)},ge.fromUniformScale=function(t,n){return N.typeOf.number("scale",t),ne(n)?(n[0]=t,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n):new ge(t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1)},ge.fromRotation=function(t,n){return N.typeOf.object("rotation",t),ne(n)||(n=new ge),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=0,n[4]=t[3],n[5]=t[4],n[6]=t[5],n[7]=0,n[8]=t[6],n[9]=t[7],n[10]=t[8],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n};const Ds=new ae,Rs=new ae,fl=new ae;ge.fromCamera=function(t,n){N.typeOf.object("camera",t);const e=t.position,i=t.direction,o=t.up;N.typeOf.object("camera.position",e),N.typeOf.object("camera.direction",i),N.typeOf.object("camera.up",o),ae.normalize(i,Ds),ae.normalize(ae.cross(Ds,o,Rs),Rs),ae.normalize(ae.cross(Rs,Ds,fl),fl);const r=Rs.x,a=Rs.y,s=Rs.z,l=Ds.x,u=Ds.y,A=Ds.z,c=fl.x,f=fl.y,d=fl.z,p=e.x,g=e.y,v=e.z,y=r*-p+a*-g+s*-v,m=c*-p+f*-g+d*-v,b=l*p+u*g+A*v;return ne(n)?(n[0]=r,n[1]=c,n[2]=-l,n[3]=0,n[4]=a,n[5]=f,n[6]=-u,n[7]=0,n[8]=s,n[9]=d,n[10]=-A,n[11]=0,n[12]=y,n[13]=m,n[14]=b,n[15]=1,n):new ge(r,a,s,y,c,f,d,m,-l,-u,-A,b,0,0,0,1)},ge.computePerspectiveFieldOfView=function(t,n,e,i,o){N.typeOf.number.greaterThan("fovY",t,0),N.typeOf.number.lessThan("fovY",t,Math.PI),N.typeOf.number.greaterThan("near",e,0),N.typeOf.number.greaterThan("far",i,0),N.typeOf.object("result",o);const a=1/Math.tan(t*.5),s=a/n,l=(i+e)/(e-i),u=2*i*e/(e-i);return o[0]=s,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=a,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=l,o[11]=-1,o[12]=0,o[13]=0,o[14]=u,o[15]=0,o},ge.computeOrthographicOffCenter=function(t,n,e,i,o,r,a){N.typeOf.number("left",t),N.typeOf.number("right",n),N.typeOf.number("bottom",e),N.typeOf.number("top",i),N.typeOf.number("near",o),N.typeOf.number("far",r),N.typeOf.object("result",a);let s=1/(n-t),l=1/(i-e),u=1/(r-o);const A=-(n+t)*s,c=-(i+e)*l,f=-(r+o)*u;return s*=2,l*=2,u*=-2,a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=u,a[11]=0,a[12]=A,a[13]=c,a[14]=f,a[15]=1,a},ge.computePerspectiveOffCenter=function(t,n,e,i,o,r,a){N.typeOf.number("left",t),N.typeOf.number("right",n),N.typeOf.number("bottom",e),N.typeOf.number("top",i),N.typeOf.number("near",o),N.typeOf.number("far",r),N.typeOf.object("result",a);const s=2*o/(n-t),l=2*o/(i-e),u=(n+t)/(n-t),A=(i+e)/(i-e),c=-(r+o)/(r-o),f=-1,d=-2*r*o/(r-o);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=l,a[6]=0,a[7]=0,a[8]=u,a[9]=A,a[10]=c,a[11]=f,a[12]=0,a[13]=0,a[14]=d,a[15]=0,a},ge.computeInfinitePerspectiveOffCenter=function(t,n,e,i,o,r){N.typeOf.number("left",t),N.typeOf.number("right",n),N.typeOf.number("bottom",e),N.typeOf.number("top",i),N.typeOf.number("near",o),N.typeOf.object("result",r);const a=2*o/(n-t),s=2*o/(i-e),l=(n+t)/(n-t),u=(i+e)/(i-e),A=-1,c=-1,f=-2*o;return r[0]=a,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=l,r[9]=u,r[10]=A,r[11]=c,r[12]=0,r[13]=0,r[14]=f,r[15]=0,r},ge.computeViewportTransformation=function(t,n,e,i){ne(i)||(i=new ge),t=t??gi.EMPTY_OBJECT;const o=t.x??0,r=t.y??0,a=t.width??0,s=t.height??0;n=n??0,e=e??1;const l=a*.5,u=s*.5,A=(e-n)*.5,c=l,f=u,d=A,p=o+l,g=r+u,v=n+A,y=1;return i[0]=c,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=f,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=d,i[11]=0,i[12]=p,i[13]=g,i[14]=v,i[15]=y,i},ge.computeView=function(t,n,e,i,o){return N.typeOf.object("position",t),N.typeOf.object("direction",n),N.typeOf.object("up",e),N.typeOf.object("right",i),N.typeOf.object("result",o),o[0]=i.x,o[1]=e.x,o[2]=-n.x,o[3]=0,o[4]=i.y,o[5]=e.y,o[6]=-n.y,o[7]=0,o[8]=i.z,o[9]=e.z,o[10]=-n.z,o[11]=0,o[12]=-ae.dot(i,t),o[13]=-ae.dot(e,t),o[14]=ae.dot(n,t),o[15]=1,o},ge.toArray=function(t,n){return N.typeOf.object("matrix",t),ne(n)?(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n):[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},ge.getElementIndex=function(t,n){return N.typeOf.number.greaterThanOrEquals("row",n,0),N.typeOf.number.lessThanOrEquals("row",n,3),N.typeOf.number.greaterThanOrEquals("column",t,0),N.typeOf.number.lessThanOrEquals("column",t,3),t*4+n},ge.getColumn=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("result",e);const i=n*4,o=t[i],r=t[i+1],a=t[i+2],s=t[i+3];return e.x=o,e.y=r,e.z=a,e.w=s,e},ge.setColumn=function(t,n,e,i){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=ge.clone(t,i);const o=n*4;return i[o]=e.x,i[o+1]=e.y,i[o+2]=e.z,i[o+3]=e.w,i},ge.getRow=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("result",e);const i=t[n],o=t[n+4],r=t[n+8],a=t[n+12];return e.x=i,e.y=o,e.z=r,e.w=a,e},ge.setRow=function(t,n,e,i){return N.typeOf.object("matrix",t),N.typeOf.number.greaterThanOrEquals("index",n,0),N.typeOf.number.lessThanOrEquals("index",n,3),N.typeOf.object("cartesian",e),N.typeOf.object("result",i),i=ge.clone(t,i),i[n]=e.x,i[n+4]=e.y,i[n+8]=e.z,i[n+12]=e.w,i},ge.setTranslation=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.object("translation",n),N.typeOf.object("result",e),e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=n.x,e[13]=n.y,e[14]=n.z,e[15]=t[15],e};const s4=new ae;ge.setScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e);const i=ge.getScale(t,s4),o=n.x/i.x,r=n.y/i.y,a=n.z/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3],e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7],e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};const a4=new ae;ge.setUniformScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e);const i=ge.getScale(t,a4),o=n/i.x,r=n/i.y,a=n/i.z;return e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e[3]=t[3],e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7],e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};const dd=new ae;ge.getScale=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n.x=ae.magnitude(ae.fromElements(t[0],t[1],t[2],dd)),n.y=ae.magnitude(ae.fromElements(t[4],t[5],t[6],dd)),n.z=ae.magnitude(ae.fromElements(t[8],t[9],t[10],dd)),n};const lb=new ae;ge.getMaximumScale=function(t){return ge.getScale(t,lb),ae.maximumComponent(lb)};const l4=new ae;ge.setRotation=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("result",e);const i=ge.getScale(t,l4);return e[0]=n[0]*i.x,e[1]=n[1]*i.x,e[2]=n[2]*i.x,e[3]=t[3],e[4]=n[3]*i.y,e[5]=n[4]*i.y,e[6]=n[5]*i.y,e[7]=t[7],e[8]=n[6]*i.z,e[9]=n[7]*i.z,e[10]=n[8]*i.z,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e};const u4=new ae;ge.getRotation=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=ge.getScale(t,u4);return n[0]=t[0]/e.x,n[1]=t[1]/e.x,n[2]=t[2]/e.x,n[3]=t[4]/e.y,n[4]=t[5]/e.y,n[5]=t[6]/e.y,n[6]=t[8]/e.z,n[7]=t[9]/e.z,n[8]=t[10]/e.z,n},ge.multiply=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t[0],o=t[1],r=t[2],a=t[3],s=t[4],l=t[5],u=t[6],A=t[7],c=t[8],f=t[9],d=t[10],p=t[11],g=t[12],v=t[13],y=t[14],m=t[15],b=n[0],x=n[1],E=n[2],B=n[3],P=n[4],I=n[5],O=n[6],M=n[7],S=n[8],T=n[9],w=n[10],C=n[11],U=n[12],F=n[13],D=n[14],R=n[15],L=i*b+s*x+c*E+g*B,k=o*b+l*x+f*E+v*B,Q=r*b+u*x+d*E+y*B,V=a*b+A*x+p*E+m*B,G=i*P+s*I+c*O+g*M,$=o*P+l*I+f*O+v*M,Y=r*P+u*I+d*O+y*M,ie=a*P+A*I+p*O+m*M,re=i*S+s*T+c*w+g*C,le=o*S+l*T+f*w+v*C,ue=r*S+u*T+d*w+y*C,te=a*S+A*T+p*w+m*C,ce=i*U+s*F+c*D+g*R,X=o*U+l*F+f*D+v*R,q=r*U+u*F+d*D+y*R,H=a*U+A*F+p*D+m*R;return e[0]=L,e[1]=k,e[2]=Q,e[3]=V,e[4]=G,e[5]=$,e[6]=Y,e[7]=ie,e[8]=re,e[9]=le,e[10]=ue,e[11]=te,e[12]=ce,e[13]=X,e[14]=q,e[15]=H,e},ge.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},ge.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e},ge.multiplyTransformation=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t[0],o=t[1],r=t[2],a=t[4],s=t[5],l=t[6],u=t[8],A=t[9],c=t[10],f=t[12],d=t[13],p=t[14],g=n[0],v=n[1],y=n[2],m=n[4],b=n[5],x=n[6],E=n[8],B=n[9],P=n[10],I=n[12],O=n[13],M=n[14],S=i*g+a*v+u*y,T=o*g+s*v+A*y,w=r*g+l*v+c*y,C=i*m+a*b+u*x,U=o*m+s*b+A*x,F=r*m+l*b+c*x,D=i*E+a*B+u*P,R=o*E+s*B+A*P,L=r*E+l*B+c*P,k=i*I+a*O+u*M+f,Q=o*I+s*O+A*M+d,V=r*I+l*O+c*M+p;return e[0]=S,e[1]=T,e[2]=w,e[3]=0,e[4]=C,e[5]=U,e[6]=F,e[7]=0,e[8]=D,e[9]=R,e[10]=L,e[11]=0,e[12]=k,e[13]=Q,e[14]=V,e[15]=1,e},ge.multiplyByMatrix3=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("rotation",n),N.typeOf.object("result",e);const i=t[0],o=t[1],r=t[2],a=t[4],s=t[5],l=t[6],u=t[8],A=t[9],c=t[10],f=n[0],d=n[1],p=n[2],g=n[3],v=n[4],y=n[5],m=n[6],b=n[7],x=n[8],E=i*f+a*d+u*p,B=o*f+s*d+A*p,P=r*f+l*d+c*p,I=i*g+a*v+u*y,O=o*g+s*v+A*y,M=r*g+l*v+c*y,S=i*m+a*b+u*x,T=o*m+s*b+A*x,w=r*m+l*b+c*x;return e[0]=E,e[1]=B,e[2]=P,e[3]=0,e[4]=I,e[5]=O,e[6]=M,e[7]=0,e[8]=S,e[9]=T,e[10]=w,e[11]=0,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},ge.multiplyByTranslation=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("translation",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=i*t[0]+o*t[4]+r*t[8]+t[12],s=i*t[1]+o*t[5]+r*t[9]+t[13],l=i*t[2]+o*t[6]+r*t[10]+t[14];return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=a,e[13]=s,e[14]=l,e[15]=t[15],e},ge.multiplyByScale=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("scale",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z;return i===1&&o===1&&r===1?ge.clone(t,e):(e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=t[3],e[4]=o*t[4],e[5]=o*t[5],e[6]=o*t[6],e[7]=t[7],e[8]=r*t[8],e[9]=r*t[9],e[10]=r*t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e)},ge.multiplyByUniformScale=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scale",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3],e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7],e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},ge.multiplyByVector=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=n.w,s=t[0]*i+t[4]*o+t[8]*r+t[12]*a,l=t[1]*i+t[5]*o+t[9]*r+t[13]*a,u=t[2]*i+t[6]*o+t[10]*r+t[14]*a,A=t[3]*i+t[7]*o+t[11]*r+t[15]*a;return e.x=s,e.y=l,e.z=u,e.w=A,e},ge.multiplyByPointAsVector=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=t[0]*i+t[4]*o+t[8]*r,s=t[1]*i+t[5]*o+t[9]*r,l=t[2]*i+t[6]*o+t[10]*r;return e.x=a,e.y=s,e.z=l,e},ge.multiplyByPoint=function(t,n,e){N.typeOf.object("matrix",t),N.typeOf.object("cartesian",n),N.typeOf.object("result",e);const i=n.x,o=n.y,r=n.z,a=t[0]*i+t[4]*o+t[8]*r+t[12],s=t[1]*i+t[5]*o+t[9]*r+t[13],l=t[2]*i+t[6]*o+t[10]*r+t[14];return e.x=a,e.y=s,e.z=l,e},ge.multiplyByScalar=function(t,n,e){return N.typeOf.object("matrix",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},ge.negate=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n[4]=-t[4],n[5]=-t[5],n[6]=-t[6],n[7]=-t[7],n[8]=-t[8],n[9]=-t[9],n[10]=-t[10],n[11]=-t[11],n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=-t[15],n},ge.transpose=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[1],i=t[2],o=t[3],r=t[6],a=t[7],s=t[11];return n[0]=t[0],n[1]=t[4],n[2]=t[8],n[3]=t[12],n[4]=e,n[5]=t[5],n[6]=t[9],n[7]=t[13],n[8]=i,n[9]=r,n[10]=t[10],n[11]=t[14],n[12]=o,n[13]=a,n[14]=s,n[15]=t[15],n},ge.abs=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n[3]=Math.abs(t[3]),n[4]=Math.abs(t[4]),n[5]=Math.abs(t[5]),n[6]=Math.abs(t[6]),n[7]=Math.abs(t[7]),n[8]=Math.abs(t[8]),n[9]=Math.abs(t[9]),n[10]=Math.abs(t[10]),n[11]=Math.abs(t[11]),n[12]=Math.abs(t[12]),n[13]=Math.abs(t[13]),n[14]=Math.abs(t[14]),n[15]=Math.abs(t[15]),n},ge.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[3]===n[3]&&t[7]===n[7]&&t[11]===n[11]&&t[15]===n[15]},ge.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t[0]-n[0])<=e&&Math.abs(t[1]-n[1])<=e&&Math.abs(t[2]-n[2])<=e&&Math.abs(t[3]-n[3])<=e&&Math.abs(t[4]-n[4])<=e&&Math.abs(t[5]-n[5])<=e&&Math.abs(t[6]-n[6])<=e&&Math.abs(t[7]-n[7])<=e&&Math.abs(t[8]-n[8])<=e&&Math.abs(t[9]-n[9])<=e&&Math.abs(t[10]-n[10])<=e&&Math.abs(t[11]-n[11])<=e&&Math.abs(t[12]-n[12])<=e&&Math.abs(t[13]-n[13])<=e&&Math.abs(t[14]-n[14])<=e&&Math.abs(t[15]-n[15])<=e},ge.getTranslation=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n.x=t[12],n.y=t[13],n.z=t[14],n},ge.getMatrix3=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[4],n[4]=t[5],n[5]=t[6],n[6]=t[8],n[7]=t[9],n[8]=t[10],n};const c4=new me,h4=new me,A4=new be,f4=new be(0,0,0,1);ge.inverse=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[4],o=t[8],r=t[12],a=t[1],s=t[5],l=t[9],u=t[13],A=t[2],c=t[6],f=t[10],d=t[14],p=t[3],g=t[7],v=t[11],y=t[15];let m=f*y,b=d*v,x=c*y,E=d*g,B=c*v,P=f*g,I=A*y,O=d*p,M=A*v,S=f*p,T=A*g,w=c*p;const C=m*s+E*l+B*u-(b*s+x*l+P*u),U=b*a+I*l+S*u-(m*a+O*l+M*u),F=x*a+O*s+T*u-(E*a+I*s+w*u),D=P*a+M*s+w*l-(B*a+S*s+T*l),R=b*i+x*o+P*r-(m*i+E*o+B*r),L=m*e+O*o+M*r-(b*e+I*o+S*r),k=E*e+I*i+w*r-(x*e+O*i+T*r),Q=B*e+S*i+T*o-(P*e+M*i+w*o);m=o*u,b=r*l,x=i*u,E=r*s,B=i*l,P=o*s,I=e*u,O=r*a,M=e*l,S=o*a,T=e*s,w=i*a;const V=m*g+E*v+B*y-(b*g+x*v+P*y),G=b*p+I*v+S*y-(m*p+O*v+M*y),$=x*p+O*g+T*y-(E*p+I*g+w*y),Y=P*p+M*g+w*v-(B*p+S*g+T*v),ie=x*f+P*d+b*c-(B*d+m*c+E*f),re=M*d+m*A+O*f-(I*f+S*d+b*A),le=I*c+w*d+E*A-(T*d+x*A+O*c),ue=T*f+B*A+S*c-(M*c+w*f+P*A);let te=e*C+i*U+o*F+r*D;if(Math.abs(te)<he.EPSILON21){if(me.equalsEpsilon(ge.getMatrix3(t,c4),h4,he.EPSILON7)&&be.equals(ge.getRow(t,3,A4),f4))return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=0,n[11]=0,n[12]=-t[12],n[13]=-t[13],n[14]=-t[14],n[15]=1,n;throw new Nt("matrix is not invertible because its determinate is zero.")}return te=1/te,n[0]=C*te,n[1]=U*te,n[2]=F*te,n[3]=D*te,n[4]=R*te,n[5]=L*te,n[6]=k*te,n[7]=Q*te,n[8]=V*te,n[9]=G*te,n[10]=$*te,n[11]=Y*te,n[12]=ie*te,n[13]=re*te,n[14]=le*te,n[15]=ue*te,n},ge.inverseTransformation=function(t,n){N.typeOf.object("matrix",t),N.typeOf.object("result",n);const e=t[0],i=t[1],o=t[2],r=t[4],a=t[5],s=t[6],l=t[8],u=t[9],A=t[10],c=t[12],f=t[13],d=t[14],p=-e*c-i*f-o*d,g=-r*c-a*f-s*d,v=-l*c-u*f-A*d;return n[0]=e,n[1]=r,n[2]=l,n[3]=0,n[4]=i,n[5]=a,n[6]=u,n[7]=0,n[8]=o,n[9]=s,n[10]=A,n[11]=0,n[12]=p,n[13]=g,n[14]=v,n[15]=1,n};const p4=new ge;ge.inverseTranspose=function(t,n){return N.typeOf.object("matrix",t),N.typeOf.object("result",n),ge.inverse(ge.transpose(t,p4),n)},ge.IDENTITY=Object.freeze(new ge(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),ge.ZERO=Object.freeze(new ge(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)),ge.COLUMN0ROW0=0,ge.COLUMN0ROW1=1,ge.COLUMN0ROW2=2,ge.COLUMN0ROW3=3,ge.COLUMN1ROW0=4,ge.COLUMN1ROW1=5,ge.COLUMN1ROW2=6,ge.COLUMN1ROW3=7,ge.COLUMN2ROW0=8,ge.COLUMN2ROW1=9,ge.COLUMN2ROW2=10,ge.COLUMN2ROW3=11,ge.COLUMN3ROW0=12,ge.COLUMN3ROW1=13,ge.COLUMN3ROW2=14,ge.COLUMN3ROW3=15,Object.defineProperties(ge.prototype,{length:{get:function(){return ge.packedLength}}}),ge.prototype.clone=function(t){return ge.clone(this,t)},ge.prototype.equals=function(t){return ge.equals(this,t)},ge.equalsArray=function(t,n,e){return t[0]===n[e]&&t[1]===n[e+1]&&t[2]===n[e+2]&&t[3]===n[e+3]&&t[4]===n[e+4]&&t[5]===n[e+5]&&t[6]===n[e+6]&&t[7]===n[e+7]&&t[8]===n[e+8]&&t[9]===n[e+9]&&t[10]===n[e+10]&&t[11]===n[e+11]&&t[12]===n[e+12]&&t[13]===n[e+13]&&t[14]===n[e+14]&&t[15]===n[e+15]},ge.prototype.equalsEpsilon=function(t,n){return ge.equalsEpsilon(this,t,n)},ge.prototype.toString=function(){return`(${this[0]}, ${this[4]}, ${this[8]}, ${this[12]})
|
|
345
345
|
(${this[1]}, ${this[5]}, ${this[9]}, ${this[13]})
|
|
346
346
|
(${this[2]}, ${this[6]}, ${this[10]}, ${this[14]})
|
|
347
|
-
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};function dR(){return!0}function mR(t,n){n=n??"This object was destroyed, i.e., destroy() was called.";function e(){throw new pe(n)}for(const i in t)typeof t[i]=="function"&&(t[i]=e);t.isDestroyed=dR}let Rr;const mt={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},mn={};Object.defineProperties(mn,{element:{get:function(){if(mn.supportsFullscreen())return document[mt.fullscreenElement]}},changeEventName:{get:function(){if(mn.supportsFullscreen())return mt.fullscreenchange}},errorEventName:{get:function(){if(mn.supportsFullscreen())return mt.fullscreenerror}},enabled:{get:function(){if(mn.supportsFullscreen())return document[mt.fullscreenEnabled]}},fullscreen:{get:function(){if(mn.supportsFullscreen())return mn.element!==null}}}),mn.supportsFullscreen=function(){if(ne(Rr))return Rr;Rr=!1;const t=document.body;if(typeof t.requestFullscreen=="function")return mt.requestFullscreen="requestFullscreen",mt.exitFullscreen="exitFullscreen",mt.fullscreenEnabled="fullscreenEnabled",mt.fullscreenElement="fullscreenElement",mt.fullscreenchange="fullscreenchange",mt.fullscreenerror="fullscreenerror",Rr=!0,Rr;const n=["webkit","moz","o","ms","khtml"];let e;for(let i=0,o=n.length;i<o;++i){const r=n[i];e=`${r}RequestFullscreen`,typeof t[e]=="function"?(mt.requestFullscreen=e,Rr=!0):(e=`${r}RequestFullScreen`,typeof t[e]=="function"&&(mt.requestFullscreen=e,Rr=!0)),e=`${r}ExitFullscreen`,typeof document[e]=="function"?mt.exitFullscreen=e:(e=`${r}CancelFullScreen`,typeof document[e]=="function"&&(mt.exitFullscreen=e)),e=`${r}FullscreenEnabled`,document[e]!==void 0?mt.fullscreenEnabled=e:(e=`${r}FullScreenEnabled`,document[e]!==void 0&&(mt.fullscreenEnabled=e)),e=`${r}FullscreenElement`,document[e]!==void 0?mt.fullscreenElement=e:(e=`${r}FullScreenElement`,document[e]!==void 0&&(mt.fullscreenElement=e)),e=`${r}fullscreenchange`,document[`on${e}`]!==void 0&&(r==="ms"&&(e="MSFullscreenChange"),mt.fullscreenchange=e),e=`${r}fullscreenerror`,document[`on${e}`]!==void 0&&(r==="ms"&&(e="MSFullscreenError"),mt.fullscreenerror=e)}return Rr},mn.requestFullscreen=function(t,n){mn.supportsFullscreen()&&t[mt.requestFullscreen]({vrDisplay:n})},mn.exitFullscreen=function(){mn.supportsFullscreen()&&document[mt.exitFullscreen]()},mn._names=mt;let Xt;typeof navigator<"u"?Xt=navigator:Xt={};function Po(t){const n=t.split(".");for(let e=0,i=n.length;e<i;++e)n[e]=parseInt(n[e],10);return n}let aA,ub;function md(){if(!ne(aA)&&(aA=!1,!hA())){const t=/ Chrome\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(aA=!0,ub=Po(t[1]))}return aA}function gR(){return md()&&ub}let lA,cb;function hb(){if(!ne(lA)&&(lA=!1,!md()&&!hA()&&/ Safari\/[\.0-9]+/.test(Xt.userAgent))){const t=/ Version\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(lA=!0,cb=Po(t[1]))}return lA}function yR(){return hb()&&cb}let uA,gd;function Ab(){if(!ne(uA)){uA=!1;const t=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Xt.userAgent);t!==null&&(uA=!0,gd=Po(t[1]),gd.isNightly=!!t[2])}return uA}function vR(){return Ab()&&gd}let pl,yd;function fb(){if(!ne(pl)){pl=!1;let t;Xt.appName==="Microsoft Internet Explorer"?(t=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Xt.userAgent),t!==null&&(pl=!0,yd=Po(t[1]))):Xt.appName==="Netscape"&&(t=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Xt.userAgent),t!==null&&(pl=!0,yd=Po(t[1])))}return pl}function wR(){return fb()&&yd}let cA,pb;function hA(){if(!ne(cA)){cA=!1;const t=/ Edg\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(cA=!0,pb=Po(t[1]))}return cA}function bR(){return hA()&&pb}let AA,vd;function fA(){if(!ne(AA)){AA=!1;const t=/Firefox\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(AA=!0,vd=Po(t[1]))}return AA}let wd;function xR(){return ne(wd)||(wd=/Windows/i.test(Xt.appVersion)),wd}let bd;function _R(){return ne(bd)||(bd=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),bd}function CR(){return fA()&&vd}let xd;function SR(){return ne(xd)||(xd=!fA()&&typeof PointerEvent<"u"&&(!ne(Xt.pointerEnabled)||Xt.pointerEnabled)),xd}let db,pA;function mb(){if(!ne(pA)){const t=document.createElement("canvas");t.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");const n=t.style.imageRendering;pA=ne(n)&&n!=="",pA&&(db=n)}return pA}function ER(){return mb()?db:void 0}function $t(){if(!$t.initialized)throw new pe("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return $t._result}$t._promise=void 0,$t._result=void 0,$t.initialize=function(){return ne($t._promise)||($t._promise=new Promise(t=>{const n=new Image;n.onload=function(){$t._result=n.width>0&&n.height>0,t($t._result)},n.onerror=function(){$t._result=!1,t($t._result)},n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),$t._promise},Object.defineProperties($t,{initialized:{get:function(){return ne($t._result)}}});const Us=[];typeof ArrayBuffer<"u"&&(Us.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Us.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Us.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Us.push(BigInt64Array),typeof BigUint64Array<"u"&&Us.push(BigUint64Array));const Ht={isChrome:md,chromeVersion:gR,isSafari:hb,safariVersion:yR,isWebkit:Ab,webkitVersion:vR,isInternetExplorer:fb,internetExplorerVersion:wR,isEdge:hA,edgeVersion:bR,isFirefox:fA,firefoxVersion:CR,isWindows:xR,isIPadOrIOS:_R,hardwareConcurrency:Xt.hardwareConcurrency??3,supportsPointerEvents:SR,supportsImageRenderingPixelated:mb,supportsWebP:$t,imageRenderingValue:ER,typedArrayTypes:Us};Ht.supportsBasis=function(t){return Ht.supportsWebAssembly()&&t.context.supportsBasis},Ht.supportsFullscreen=function(){return mn.supportsFullscreen()},Ht.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},Ht.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"},Ht.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"},Ht.supportsBigInt=function(){return typeof BigInt<"u"},Ht.supportsWebWorkers=function(){return typeof Worker<"u"},Ht.supportsWebAssembly=function(){return typeof WebAssembly<"u"},Ht.supportsWebgl2=function(t){return N.defined("scene",t),t.context.webgl2},Ht.supportsEsmWebWorkers=function(){return!fA()||parseInt(vd)>=114};function _e(t,n){this.x=t??0,this.y=n??0}_e.fromElements=function(t,n,e){return ne(e)?(e.x=t,e.y=n,e):new _e(t,n)},_e.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n):new _e(t.x,t.y)},_e.fromCartesian3=_e.clone,_e.fromCartesian4=_e.clone,_e.packedLength=2,_e.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e]=t.y,n},_e.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new _e),e.x=t[n++],e.y=t[n],e},_e.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*2;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 2 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)_e.pack(t[o],n,o*2);return n},_e.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,2),t.length%2!==0)throw new pe("array length must be a multiple of 2.");const e=t.length;ne(n)?n.length=e/2:n=new Array(e/2);for(let i=0;i<e;i+=2){const o=i/2;n[o]=_e.unpack(t,i,n[o])}return n},_e.fromArray=_e.unpack,_e.maximumComponent=function(t){return N.typeOf.object("cartesian",t),Math.max(t.x,t.y)},_e.minimumComponent=function(t){return N.typeOf.object("cartesian",t),Math.min(t.x,t.y)},_e.minimumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.min(t.x,n.x),e.y=Math.min(t.y,n.y),e},_e.maximumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.max(t.x,n.x),e.y=Math.max(t.y,n.y),e},_e.clamp=function(t,n,e,i){N.typeOf.object("value",t),N.typeOf.object("min",n),N.typeOf.object("max",e),N.typeOf.object("result",i);const o=he.clamp(t.x,n.x,e.x),r=he.clamp(t.y,n.y,e.y);return i.x=o,i.y=r,i},_e.magnitudeSquared=function(t){return N.typeOf.object("cartesian",t),t.x*t.x+t.y*t.y},_e.magnitude=function(t){return Math.sqrt(_e.magnitudeSquared(t))};const dA=new _e;_e.distance=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),_e.subtract(t,n,dA),_e.magnitude(dA)},_e.distanceSquared=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),_e.subtract(t,n,dA),_e.magnitudeSquared(dA)},_e.normalize=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=_e.magnitude(t);if(n.x=t.x/e,n.y=t.y/e,isNaN(n.x)||isNaN(n.y))throw new pe("normalized result is not a number");return n},_e.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y},_e.cross=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.y-t.y*n.x},_e.multiplyComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x*n.x,e.y=t.y*n.y,e},_e.divideComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x/n.x,e.y=t.y/n.y,e},_e.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e},_e.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e},_e.multiplyByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e},_e.divideByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e},_e.negate=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n},_e.abs=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=Math.abs(t.x),n.y=Math.abs(t.y),n};const gb=new _e;_e.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),_e.multiplyByScalar(n,e,gb),i=_e.multiplyByScalar(t,1-e,i),_e.add(gb,i,i)};const yb=new _e,vb=new _e;_e.angleBetween=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),_e.normalize(t,yb),_e.normalize(n,vb),he.acosClamped(_e.dot(yb,vb))};const PR=new _e;_e.mostOrthogonalAxis=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=_e.normalize(t,PR);return _e.abs(e,e),e.x<=e.y?n=_e.clone(_e.UNIT_X,n):n=_e.clone(_e.UNIT_Y,n),n},_e.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y},_e.equalsArray=function(t,n,e){return t.x===n[e]&&t.y===n[e+1]},_e.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.x,n.x,e,i)&&he.equalsEpsilon(t.y,n.y,e,i)},_e.ZERO=Object.freeze(new _e(0,0)),_e.ONE=Object.freeze(new _e(1,1)),_e.UNIT_X=Object.freeze(new _e(1,0)),_e.UNIT_Y=Object.freeze(new _e(0,1)),_e.prototype.clone=function(t){return _e.clone(this,t)},_e.prototype.equals=function(t){return _e.equals(this,t)},_e.prototype.equalsEpsilon=function(t,n,e){return _e.equalsEpsilon(this,t,n,e)},_e.prototype.toString=function(){return`(${this.x}, ${this.y})`};const BR=new ae,TR=new ae;function wb(t,n,e,i,o){if(!ne(t))throw new pe("cartesian is required.");if(!ne(n))throw new pe("oneOverRadii is required.");if(!ne(e))throw new pe("oneOverRadiiSquared is required.");if(!ne(i))throw new pe("centerToleranceSquared is required.");const r=t.x,a=t.y,s=t.z,l=n.x,u=n.y,A=n.z,c=r*r*l*l,f=a*a*u*u,d=s*s*A*A,p=c+f+d,g=Math.sqrt(1/p),v=ae.multiplyByScalar(t,g,BR);if(p<i)return isFinite(g)?ae.clone(v,o):void 0;const y=e.x,m=e.y,b=e.z,x=TR;x.x=v.x*y*2,x.y=v.y*m*2,x.z=v.z*b*2;let E=(1-g)*ae.magnitude(t)/(.5*ae.magnitude(x)),B=0,P,I,O,M,S,T,w,C,U,F,D;do{E-=B,O=1/(1+E*y),M=1/(1+E*m),S=1/(1+E*b),T=O*O,w=M*M,C=S*S,U=T*O,F=w*M,D=C*S,P=c*T+f*w+d*C-1,I=c*U*y+f*F*m+d*D*b;const R=-2*I;B=P/R}while(Math.abs(P)>he.EPSILON12);return ne(o)?(o.x=r*O,o.y=a*M,o.z=s*S,o):new ae(r*O,a*M,s*S)}function Qe(t,n,e){this.longitude=t??0,this.latitude=n??0,this.height=e??0}Qe.fromRadians=function(t,n,e,i){return N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),e=e??0,ne(i)?(i.longitude=t,i.latitude=n,i.height=e,i):new Qe(t,n,e)},Qe.fromDegrees=function(t,n,e,i){return N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),t=he.toRadians(t),n=he.toRadians(n),Qe.fromRadians(t,n,e,i)};const IR=new ae,FR=new ae,MR=new ae;Qe._ellipsoidOneOverRadii=new ae(1567855942887398e-22,1567855942887398e-22,1573130351105623e-22),Qe._ellipsoidOneOverRadiiSquared=new ae(2458172257647332e-29,2458172257647332e-29,24747391015697002e-30),Qe._ellipsoidCenterToleranceSquared=he.EPSILON1,Qe.fromCartesian=function(t,n,e){const i=ne(n)?n.oneOverRadii:Qe._ellipsoidOneOverRadii,o=ne(n)?n.oneOverRadiiSquared:Qe._ellipsoidOneOverRadiiSquared,r=ne(n)?n._centerToleranceSquared:Qe._ellipsoidCenterToleranceSquared,a=wb(t,i,o,r,FR);if(!ne(a))return;let s=ae.multiplyComponents(a,o,IR);s=ae.normalize(s,s);const l=ae.subtract(t,a,MR),u=Math.atan2(s.y,s.x),A=Math.asin(s.z),c=he.sign(ae.dot(l,t))*ae.magnitude(l);return ne(e)?(e.longitude=u,e.latitude=A,e.height=c,e):new Qe(u,A,c)},Qe.toCartesian=function(t,n,e){return N.defined("cartographic",t),ae.fromRadians(t.longitude,t.latitude,t.height,n,e)},Qe.clone=function(t,n){if(ne(t))return ne(n)?(n.longitude=t.longitude,n.latitude=t.latitude,n.height=t.height,n):new Qe(t.longitude,t.latitude,t.height)},Qe.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.longitude===n.longitude&&t.latitude===n.latitude&&t.height===n.height},Qe.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t.longitude-n.longitude)<=e&&Math.abs(t.latitude-n.latitude)<=e&&Math.abs(t.height-n.height)<=e},Qe.ZERO=Object.freeze(new Qe(0,0,0)),Qe.prototype.clone=function(t){return Qe.clone(this,t)},Qe.prototype.equals=function(t){return Qe.equals(this,t)},Qe.prototype.equalsEpsilon=function(t,n){return Qe.equalsEpsilon(this,t,n)},Qe.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};function bb(t,n,e,i){n=n??0,e=e??0,i=i??0,N.typeOf.number.greaterThanOrEquals("x",n,0),N.typeOf.number.greaterThanOrEquals("y",e,0),N.typeOf.number.greaterThanOrEquals("z",i,0),t._radii=new ae(n,e,i),t._radiiSquared=new ae(n*n,e*e,i*i),t._radiiToTheFourth=new ae(n*n*n*n,e*e*e*e,i*i*i*i),t._oneOverRadii=new ae(n===0?0:1/n,e===0?0:1/e,i===0?0:1/i),t._oneOverRadiiSquared=new ae(n===0?0:1/(n*n),e===0?0:1/(e*e),i===0?0:1/(i*i)),t._minimumRadius=Math.min(n,e,i),t._maximumRadius=Math.max(n,e,i),t._centerToleranceSquared=he.EPSILON1,t._radiiSquared.z!==0&&(t._squaredXOverSquaredZ=t._radiiSquared.x/t._radiiSquared.z)}function De(t,n,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,bb(this,t,n,e)}Object.defineProperties(De.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}}}),De.clone=function(t,n){if(!ne(t))return;const e=t._radii;return ne(n)?(ae.clone(e,n._radii),ae.clone(t._radiiSquared,n._radiiSquared),ae.clone(t._radiiToTheFourth,n._radiiToTheFourth),ae.clone(t._oneOverRadii,n._oneOverRadii),ae.clone(t._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=t._minimumRadius,n._maximumRadius=t._maximumRadius,n._centerToleranceSquared=t._centerToleranceSquared,n):new De(e.x,e.y,e.z)},De.fromCartesian3=function(t,n){return ne(n)||(n=new De),ne(t)&&bb(n,t.x,t.y,t.z),n},De.WGS84=Object.freeze(new De(6378137,6378137,6356752314245179e-9)),De.UNIT_SPHERE=Object.freeze(new De(1,1,1)),De.MOON=Object.freeze(new De(he.LUNAR_RADIUS,he.LUNAR_RADIUS,he.LUNAR_RADIUS)),De.MARS=Object.freeze(new De(3396190,3396190,3376200)),De._default=De.WGS84,Object.defineProperties(De,{default:{get:function(){return De._default},set:function(t){N.typeOf.object("value",t),De._default=t,ae._ellipsoidRadiiSquared=t.radiiSquared,Qe._ellipsoidOneOverRadii=t.oneOverRadii,Qe._ellipsoidOneOverRadiiSquared=t.oneOverRadiiSquared,Qe._ellipsoidCenterToleranceSquared=t._centerToleranceSquared}}}),De.prototype.clone=function(t){return De.clone(this,t)},De.packedLength=ae.packedLength,De.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,ae.pack(t._radii,n,e),n},De.unpack=function(t,n,e){N.defined("array",t),n=n??0;const i=ae.unpack(t,n);return De.fromCartesian3(i,e)},De.prototype.geocentricSurfaceNormal=ae.normalize,De.prototype.geodeticSurfaceNormalCartographic=function(t,n){N.typeOf.object("cartographic",t);const e=t.longitude,i=t.latitude,o=Math.cos(i),r=o*Math.cos(e),a=o*Math.sin(e),s=Math.sin(i);return ne(n)||(n=new ae),n.x=r,n.y=a,n.z=s,ae.normalize(n,n)},De.prototype.geodeticSurfaceNormal=function(t,n){if(N.typeOf.object("cartesian",t),isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new pe("cartesian has a NaN component");if(!ae.equalsEpsilon(t,ae.ZERO,he.EPSILON14))return ne(n)||(n=new ae),n=ae.multiplyComponents(t,this._oneOverRadiiSquared,n),ae.normalize(n,n)};const DR=new ae,RR=new ae;De.prototype.cartographicToCartesian=function(t,n){const e=DR,i=RR;this.geodeticSurfaceNormalCartographic(t,e),ae.multiplyComponents(this._radiiSquared,e,i);const o=Math.sqrt(ae.dot(e,i));return ae.divideByScalar(i,o,i),ae.multiplyByScalar(e,t.height,e),ne(n)||(n=new ae),ae.add(i,e,n)},De.prototype.cartographicArrayToCartesianArray=function(t,n){N.defined("cartographics",t);const e=t.length;ne(n)?n.length=e:n=new Array(e);for(let i=0;i<e;i++)n[i]=this.cartographicToCartesian(t[i],n[i]);return n};const UR=new ae,OR=new ae,LR=new ae;De.prototype.cartesianToCartographic=function(t,n){const e=this.scaleToGeodeticSurface(t,OR);if(!ne(e))return;const i=this.geodeticSurfaceNormal(e,UR),o=ae.subtract(t,e,LR),r=Math.atan2(i.y,i.x),a=Math.asin(i.z),s=he.sign(ae.dot(o,t))*ae.magnitude(o);return ne(n)?(n.longitude=r,n.latitude=a,n.height=s,n):new Qe(r,a,s)},De.prototype.cartesianArrayToCartographicArray=function(t,n){N.defined("cartesians",t);const e=t.length;ne(n)?n.length=e:n=new Array(e);for(let i=0;i<e;++i)n[i]=this.cartesianToCartographic(t[i],n[i]);return n},De.prototype.scaleToGeodeticSurface=function(t,n){return wb(t,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,n)},De.prototype.scaleToGeocentricSurface=function(t,n){N.typeOf.object("cartesian",t),ne(n)||(n=new ae);const e=t.x,i=t.y,o=t.z,r=this._oneOverRadiiSquared,a=1/Math.sqrt(e*e*r.x+i*i*r.y+o*o*r.z);return ae.multiplyByScalar(t,a,n)},De.prototype.transformPositionToScaledSpace=function(t,n){return ne(n)||(n=new ae),ae.multiplyComponents(t,this._oneOverRadii,n)},De.prototype.transformPositionFromScaledSpace=function(t,n){return ne(n)||(n=new ae),ae.multiplyComponents(t,this._radii,n)},De.prototype.equals=function(t){return this===t||ne(t)&&ae.equals(this._radii,t._radii)},De.prototype.toString=function(){return this._radii.toString()},De.prototype.getSurfaceNormalIntersectionWithZAxis=function(t,n,e){if(N.typeOf.object("position",t),!he.equalsEpsilon(this._radii.x,this._radii.y,he.EPSILON15))throw new pe("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");N.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),n=n??0;const i=this._squaredXOverSquaredZ;if(ne(e)||(e=new ae),e.x=0,e.y=0,e.z=t.z*(1-i),!(Math.abs(e.z)>=this._radii.z-n))return e};const zR=new ae;De.prototype.getLocalCurvature=function(t,n){N.typeOf.object("surfacePosition",t),ne(n)||(n=new _e);const e=this.getSurfaceNormalIntersectionWithZAxis(t,0,zR),i=ae.distance(t,e),o=this.minimumRadius*i/this.maximumRadius**2,r=i*o**2;return _e.fromElements(1/i,1/r,n)};const kR=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],QR=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function xb(t,n,e){N.typeOf.number("a",t),N.typeOf.number("b",n),N.typeOf.func("func",e);const i=.5*(n+t),o=.5*(n-t);let r=0;for(let a=0;a<5;a++){const s=o*kR[a];r+=QR[a]*(e(i+s)+e(i-s))}return r*=o,r}De.prototype.surfaceArea=function(t){N.typeOf.object("rectangle",t);const n=t.west;let e=t.east;const i=t.south,o=t.north;for(;e<n;)e+=he.TWO_PI;const r=this._radiiSquared,a=r.x,s=r.y,l=r.z,u=a*s;return xb(i,o,function(A){const c=Math.cos(A),f=Math.sin(A);return Math.cos(A)*xb(n,e,function(d){const p=Math.cos(d),g=Math.sin(d);return Math.sqrt(u*f*f+l*(s*p*p+a*g*g)*c*c)})})};function dl(t,n,e){N.defined("array",t),N.defined("itemToFind",n),N.defined("comparator",e);let i=0,o=t.length-1,r,a;for(;i<=o;){if(r=~~((i+o)/2),a=e(t[r],n),a<0){i=r+1;continue}if(a>0){o=r-1;continue}return r}return~(o+1)}function _d(t,n,e,i,o){this.xPoleWander=t,this.yPoleWander=n,this.xPoleOffset=e,this.yPoleOffset=i,this.ut1MinusUtc=o}function Cd(t){if(t===null||isNaN(t))throw new pe("year is required and must be a number.");return t%4===0&&t%100!==0||t%400===0}const _b=[31,28,31,30,31,30,31,31,30,31,30,31];function Sd(t,n,e,i,o,r,a,s){t=t??1,n=n??1,e=e??1,i=i??0,o=o??0,r=r??0,a=a??0,s=s??!1,g(),v(),this.year=t,this.month=n,this.day=e,this.hour=i,this.minute=o,this.second=r,this.millisecond=a,this.isLeapSecond=s;function g(){N.typeOf.number.greaterThanOrEquals("Year",t,1),N.typeOf.number.lessThanOrEquals("Year",t,9999),N.typeOf.number.greaterThanOrEquals("Month",n,1),N.typeOf.number.lessThanOrEquals("Month",n,12),N.typeOf.number.greaterThanOrEquals("Day",e,1),N.typeOf.number.lessThanOrEquals("Day",e,31),N.typeOf.number.greaterThanOrEquals("Hour",i,0),N.typeOf.number.lessThanOrEquals("Hour",i,23),N.typeOf.number.greaterThanOrEquals("Minute",o,0),N.typeOf.number.lessThanOrEquals("Minute",o,59),N.typeOf.bool("IsLeapSecond",s),N.typeOf.number.greaterThanOrEquals("Second",r,0),N.typeOf.number.lessThanOrEquals("Second",r,s?60:59),N.typeOf.number.greaterThanOrEquals("Millisecond",a,0),N.typeOf.number.lessThan("Millisecond",a,1e3)}function v(){const y=n===2&&Cd(t)?_b[n-1]+1:_b[n-1];if(e>y)throw new pe("Month and Day represents invalid date")}}function Ye(t,n){this.julianDate=t,this.offset=n}const pt=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1}),Ve=Object.freeze({UTC:0,TAI:1}),Cb=new Sd,mA=[31,28,31,30,31,30,31,31,30,31,30,31],gA=29;function Ed(t,n){return we.compare(t.julianDate,n.julianDate)}const Os=new Ye;function yA(t){Os.julianDate=t;const n=we.leapSeconds;let e=dl(n,Os,Ed);e<0&&(e=~e),e>=n.length&&(e=n.length-1);let i=n[e].offset;e>0&&we.secondsDifference(n[e].julianDate,t)>i&&(e--,i=n[e].offset),we.addSeconds(t,i,t)}function Sb(t,n){Os.julianDate=t;const e=we.leapSeconds;let i=dl(e,Os,Ed);if(i<0&&(i=~i),i===0)return we.addSeconds(t,-e[0].offset,n);if(i>=e.length)return we.addSeconds(t,-e[i-1].offset,n);const o=we.secondsDifference(e[i].julianDate,t);if(o===0)return we.addSeconds(t,-e[i].offset,n);if(!(o<=1))return we.addSeconds(t,-e[--i].offset,n)}function Ur(t,n,e){const i=n/pt.SECONDS_PER_DAY|0;return t+=i,n-=pt.SECONDS_PER_DAY*i,n<0&&(t--,n+=pt.SECONDS_PER_DAY),e.dayNumber=t,e.secondsOfDay=n,e}function Pd(t,n,e,i,o,r,a){const s=(n-14)/12|0,l=t+4800+s;let u=(1461*l/4|0)+(367*(n-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+e-32075;i=i-12,i<0&&(i+=24);const A=r+(i*pt.SECONDS_PER_HOUR+o*pt.SECONDS_PER_MINUTE+a*pt.SECONDS_PER_MILLISECOND);return A>=43200&&(u-=1),[u,A]}const VR=/^(\d{4})$/,NR=/^(\d{4})-(\d{2})$/,HR=/^(\d{4})-?(\d{3})$/,GR=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,WR=/^(\d{4})-?(\d{2})-?(\d{2})$/,Bd=/([Z+\-])?(\d{2})?:?(\d{2})?$/,jR=/^(\d{2})(\.\d+)?/.source+Bd.source,qR=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Bd.source,KR=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Bd.source,ni="Invalid ISO 8601 date.";function we(t,n,e){this.dayNumber=void 0,this.secondsOfDay=void 0,t=t??0,n=n??0,e=e??Ve.UTC;const i=t|0;n=n+(t-i)*pt.SECONDS_PER_DAY,Ur(i,n,this),e===Ve.UTC&&yA(this)}we.fromGregorianDate=function(t,n){if(!(t instanceof Sd))throw new pe("date must be a valid GregorianDate.");const e=Pd(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond);return ne(n)?(Ur(e[0],e[1],n),yA(n),n):new we(e[0],e[1],Ve.UTC)},we.fromDate=function(t,n){if(!(t instanceof Date)||isNaN(t.getTime()))throw new pe("date must be a valid JavaScript Date.");const e=Pd(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());return ne(n)?(Ur(e[0],e[1],n),yA(n),n):new we(e[0],e[1],Ve.UTC)},we.fromIso8601=function(t,n){if(typeof t!="string")throw new pe(ni);t=t.replace(",",".");let e=t.split("T"),i,o=1,r=1,a=0,s=0,l=0,u=0;const A=e[0],c=e[1];let f,d;if(!ne(A))throw new pe(ni);let p;if(e=A.match(WR),e!==null){if(p=A.split("-").length-1,p>0&&p!==2)throw new pe(ni);i=+e[1],o=+e[2],r=+e[3]}else if(e=A.match(NR),e!==null)i=+e[1],o=+e[2];else if(e=A.match(VR),e!==null)i=+e[1];else{let m;if(e=A.match(HR),e!==null){if(i=+e[1],m=+e[2],d=Cd(i),m<1||d&&m>366||!d&&m>365)throw new pe(ni)}else if(e=A.match(GR),e!==null){i=+e[1];const b=+e[2],x=+e[3]||0;if(p=A.split("-").length-1,p>0&&(!ne(e[3])&&p!==1||ne(e[3])&&p!==2))throw new pe(ni);const E=new Date(Date.UTC(i,0,4));m=b*7+x-E.getUTCDay()-3}else throw new pe(ni);f=new Date(Date.UTC(i,0,1)),f.setUTCDate(m),o=f.getUTCMonth()+1,r=f.getUTCDate()}if(d=Cd(i),o<1||o>12||r<1||(o!==2||!d)&&r>mA[o-1]||d&&o===2&&r>gA)throw new pe(ni);let g;if(ne(c)){if(e=c.match(KR),e!==null){if(p=c.split(":").length-1,p>0&&p!==2&&p!==3)throw new pe(ni);a=+e[1],s=+e[2],l=+e[3],u=+(e[4]||0)*1e3,g=5}else if(e=c.match(qR),e!==null){if(p=c.split(":").length-1,p>2)throw new pe(ni);a=+e[1],s=+e[2],l=+(e[3]||0)*60,g=4}else if(e=c.match(jR),e!==null)a=+e[1],s=+(e[2]||0)*60,g=3;else throw new pe(ni);if(s>=60||l>=61||a>24||a===24&&(s>0||l>0||u>0))throw new pe(ni);const m=e[g],b=+e[g+1],x=+(e[g+2]||0);switch(m){case"+":a=a-b,s=s-x;break;case"-":a=a+b,s=s+x;break;case"Z":break;default:s=s+new Date(Date.UTC(i,o-1,r,a,s)).getTimezoneOffset();break}}const v=l===60;for(v&&l--;s>=60;)s-=60,a++;for(;a>=24;)a-=24,r++;for(f=d&&o===2?gA:mA[o-1];r>f;)r-=f,o++,o>12&&(o-=12,i++),f=d&&o===2?gA:mA[o-1];for(;s<0;)s+=60,a--;for(;a<0;)a+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),f=d&&o===2?gA:mA[o-1],r+=f;const y=Pd(i,o,r,a,s,l,u);return ne(n)?(Ur(y[0],y[1],n),yA(n)):n=new we(y[0],y[1],Ve.UTC),v&&we.addSeconds(n,1,n),n},we.now=function(t){return we.fromDate(new Date,t)};const vA=new we(0,0,Ve.TAI);we.toGregorianDate=function(t,n){if(!ne(t))throw new pe("julianDate is required.");let e=!1,i=Sb(t,vA);ne(i)||(we.addSeconds(t,-1,vA),i=Sb(vA,vA),e=!0);let o=i.dayNumber;const r=i.secondsOfDay;r>=43200&&(o+=1);let a=o+68569|0;const s=4*a/146097|0;a=a-((146097*s+3)/4|0)|0;const l=4e3*(a+1)/1461001|0;a=a-(1461*l/4|0)+31|0;const u=80*a/2447|0,A=a-(2447*u/80|0)|0;a=u/11|0;const c=u+2-12*a|0,f=100*(s-49)+l+a|0;let d=r/pt.SECONDS_PER_HOUR|0,p=r-d*pt.SECONDS_PER_HOUR;const g=p/pt.SECONDS_PER_MINUTE|0;p=p-g*pt.SECONDS_PER_MINUTE;let v=p|0;const y=(p-v)/pt.SECONDS_PER_MILLISECOND;return d+=12,d>23&&(d-=24),e&&(v+=1),ne(n)?(n.year=f,n.month=c,n.day=A,n.hour=d,n.minute=g,n.second=v,n.millisecond=y,n.isLeapSecond=e,n):new Sd(f,c,A,d,g,v,y,e)},we.toDate=function(t){if(!ne(t))throw new pe("julianDate is required.");const n=we.toGregorianDate(t,Cb);let e=n.second;return n.isLeapSecond&&(e-=1),new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,e,n.millisecond))},we.toIso8601=function(t,n){if(!ne(t))throw new pe("julianDate is required.");const e=we.toGregorianDate(t,Cb);let i=e.year,o=e.month,r=e.day,a=e.hour;const s=e.minute,l=e.second,u=e.millisecond;i===1e4&&o===1&&r===1&&a===0&&s===0&&l===0&&u===0&&(i=9999,o=12,r=31,a=24);let A;if(!ne(n)&&u!==0){const c=u*.01;return A=c<1e-6?c.toFixed(20).replace(".","").replace(/0+$/,""):c.toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${A}Z`}return!ne(n)||n===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(A=(u*.01).toFixed(n).replace(".","").slice(0,n),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${A}Z`)},we.clone=function(t,n){if(ne(t))return ne(n)?(n.dayNumber=t.dayNumber,n.secondsOfDay=t.secondsOfDay,n):new we(t.dayNumber,t.secondsOfDay,Ve.TAI)},we.compare=function(t,n){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");const e=t.dayNumber-n.dayNumber;return e!==0?e:t.secondsOfDay-n.secondsOfDay},we.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.dayNumber===n.dayNumber&&t.secondsOfDay===n.secondsOfDay},we.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(we.secondsDifference(t,n))<=e},we.totalDays=function(t){if(!ne(t))throw new pe("julianDate is required.");return t.dayNumber+t.secondsOfDay/pt.SECONDS_PER_DAY},we.secondsDifference=function(t,n){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");return(t.dayNumber-n.dayNumber)*pt.SECONDS_PER_DAY+(t.secondsOfDay-n.secondsOfDay)},we.daysDifference=function(t,n){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");const e=t.dayNumber-n.dayNumber,i=(t.secondsOfDay-n.secondsOfDay)/pt.SECONDS_PER_DAY;return e+i},we.computeTaiMinusUtc=function(t){Os.julianDate=t;const n=we.leapSeconds;let e=dl(n,Os,Ed);return e<0&&(e=~e,--e,e<0&&(e=0)),n[e].offset},we.addSeconds=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("seconds is required.");if(!ne(e))throw new pe("result is required.");return Ur(t.dayNumber,t.secondsOfDay+n,e)},we.addMinutes=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("minutes is required.");if(!ne(e))throw new pe("result is required.");const i=t.secondsOfDay+n*pt.SECONDS_PER_MINUTE;return Ur(t.dayNumber,i,e)},we.addHours=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("hours is required.");if(!ne(e))throw new pe("result is required.");const i=t.secondsOfDay+n*pt.SECONDS_PER_HOUR;return Ur(t.dayNumber,i,e)},we.addDays=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("days is required.");if(!ne(e))throw new pe("result is required.");const i=t.dayNumber+n;return Ur(i,t.secondsOfDay,e)},we.lessThan=function(t,n){return we.compare(t,n)<0},we.lessThanOrEquals=function(t,n){return we.compare(t,n)<=0},we.greaterThan=function(t,n){return we.compare(t,n)>0},we.greaterThanOrEquals=function(t,n){return we.compare(t,n)>=0},we.prototype.clone=function(t){return we.clone(this,t)},we.prototype.equals=function(t){return we.equals(this,t)},we.prototype.equalsEpsilon=function(t,n){return we.equalsEpsilon(this,t,n)},we.prototype.toString=function(){return we.toIso8601(this)},we.leapSeconds=[new Ye(new we(2441317,43210,Ve.TAI),10),new Ye(new we(2441499,43211,Ve.TAI),11),new Ye(new we(2441683,43212,Ve.TAI),12),new Ye(new we(2442048,43213,Ve.TAI),13),new Ye(new we(2442413,43214,Ve.TAI),14),new Ye(new we(2442778,43215,Ve.TAI),15),new Ye(new we(2443144,43216,Ve.TAI),16),new Ye(new we(2443509,43217,Ve.TAI),17),new Ye(new we(2443874,43218,Ve.TAI),18),new Ye(new we(2444239,43219,Ve.TAI),19),new Ye(new we(2444786,43220,Ve.TAI),20),new Ye(new we(2445151,43221,Ve.TAI),21),new Ye(new we(2445516,43222,Ve.TAI),22),new Ye(new we(2446247,43223,Ve.TAI),23),new Ye(new we(2447161,43224,Ve.TAI),24),new Ye(new we(2447892,43225,Ve.TAI),25),new Ye(new we(2448257,43226,Ve.TAI),26),new Ye(new we(2448804,43227,Ve.TAI),27),new Ye(new we(2449169,43228,Ve.TAI),28),new Ye(new we(2449534,43229,Ve.TAI),29),new Ye(new we(2450083,43230,Ve.TAI),30),new Ye(new we(2450630,43231,Ve.TAI),31),new Ye(new we(2451179,43232,Ve.TAI),32),new Ye(new we(2453736,43233,Ve.TAI),33),new Ye(new we(2454832,43234,Ve.TAI),34),new Ye(new we(2456109,43235,Ve.TAI),35),new Ye(new we(2457204,43236,Ve.TAI),36),new Ye(new we(2457754,43237,Ve.TAI),37)];var wA={exports:{}},ml={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */var ZR=ml.exports,Eb;function XR(){return Eb||(Eb=1,(function(t,n){(function(e){var i=n&&!n.nodeType&&n,o=t&&!t.nodeType&&t,r=typeof J1=="object"&&J1;(r.global===r||r.window===r||r.self===r)&&(e=r);var a,s=2147483647,l=36,u=1,A=26,c=38,f=700,d=72,p=128,g="-",v=/^xn--/,y=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-u,E=Math.floor,B=String.fromCharCode,P;function I(k){throw new RangeError(b[k])}function O(k,Q){for(var V=k.length,G=[];V--;)G[V]=Q(k[V]);return G}function M(k,Q){var V=k.split("@"),G="";V.length>1&&(G=V[0]+"@",k=V[1]),k=k.replace(m,".");var $=k.split("."),Y=O($,Q).join(".");return G+Y}function S(k){for(var Q=[],V=0,G=k.length,$,Y;V<G;)$=k.charCodeAt(V++),$>=55296&&$<=56319&&V<G?(Y=k.charCodeAt(V++),(Y&64512)==56320?Q.push((("use strict";1023)<<10)+(Y&1023)+65536):(Q.push($),V--)):Q.push($);return Q}function T(k){return O(k,function(Q){var V="";return Q>65535&&(Q-=65536,V+=B(Q>>>10&1023|55296),Q=56320|Q&1023),V+=B(Q),V}).join("")}function w(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:l}function C(k,Q){return k+22+75*(k<26)-((Q!=0)<<5)}function U(k,Q,V){var G=0;for(k=V?E(k/f):k>>1,k+=E(k/Q);k>x*A>>1;G+=l)k=E(k/x);return E(G+(x+1)*k/(k+c))}function F(k){var Q=[],V=k.length,G,$=0,Y=p,ie=d,re,le,ue,te,ce,X,q,H,Z;for(re=k.lastIndexOf(g),re<0&&(re=0),le=0;le<re;++le)k.charCodeAt(le)>=128&&I("not-basic"),Q.push(k.charCodeAt(le));for(ue=re>0?re+1:0;ue<V;){for(te=$,ce=1,X=l;ue>=V&&I("invalid-input"),q=w(k.charCodeAt(ue++)),(q>=l||q>E((s-$)/ce))&&I("overflow"),$+=q*ce,H=X<=ie?u:X>=ie+A?A:X-ie,!(q<H);X+=l)Z=l-H,ce>E(s/Z)&&I("overflow"),ce*=Z;G=Q.length+1,ie=U($-te,G,te==0),E($/G)>s-Y&&I("overflow"),Y+=E($/G),$%=G,Q.splice($++,0,Y)}return T(Q)}function D(k){var Q,V,G,$,Y,ie,re,le,ue,te,ce,X=[],q,H,Z,K;for(k=S(k),q=k.length,Q=p,V=0,Y=d,ie=0;ie<q;++ie)ce=k[ie],ce<128&&X.push(B(ce));for(G=$=X.length,"use strict";&X.push(g);G<q;){for(re=s,ie=0;ie<q;++ie)ce=k[ie],ce>=Q&&ce<re&&(re=ce);for(H=G+1,re-Q>E((s-V)/H)&&I("overflow"),V+=(re-Q)*H,Q=re,ie=0;ie<q;++ie)if(ce=k[ie],ce<Q&&++V>s&&I("overflow"),ce==Q){for(le=V,ue=l;te=ue<=Y?u:ue>=Y+A?A:ue-Y,!(le<te);ue+=l)K=le-te,Z=l-te,X.push(B(C(te+K%Z,0))),le=E(K/Z);X.push(B(C(le,0))),Y=U(V,H,G==$),V=0,++G}++V,++Q}return X.join("")}function R(k){return M(k,function(Q){return v.test(Q)?F(Q.slice(4).toLowerCase()):Q})}function L(k){return M(k,function(Q){return y.test(Q)?"xn--"+D(Q):Q})}if(a={version:"1.3.2",ucs2:{decode:S,encode:T},decode:F,encode:D,toASCII:L,toUnicode:R},i&&o)if(t.exports==i)o.exports=a;else for(P in a)a.hasOwnProperty(P)&&(i[P]=a[P]);else e.punycode=a})(ZR)})(ml,ml.exports)),ml.exports}var bA={exports:{}};/*!
|
|
347
|
+
(${this[3]}, ${this[7]}, ${this[11]}, ${this[15]})`};function d4(){return!0}function m4(t,n){n=n??"This object was destroyed, i.e., destroy() was called.";function e(){throw new pe(n)}for(const i in t)typeof t[i]=="function"&&(t[i]=e);t.isDestroyed=d4}let Rr;const mt={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},mn={};Object.defineProperties(mn,{element:{get:function(){if(mn.supportsFullscreen())return document[mt.fullscreenElement]}},changeEventName:{get:function(){if(mn.supportsFullscreen())return mt.fullscreenchange}},errorEventName:{get:function(){if(mn.supportsFullscreen())return mt.fullscreenerror}},enabled:{get:function(){if(mn.supportsFullscreen())return document[mt.fullscreenEnabled]}},fullscreen:{get:function(){if(mn.supportsFullscreen())return mn.element!==null}}}),mn.supportsFullscreen=function(){if(ne(Rr))return Rr;Rr=!1;const t=document.body;if(typeof t.requestFullscreen=="function")return mt.requestFullscreen="requestFullscreen",mt.exitFullscreen="exitFullscreen",mt.fullscreenEnabled="fullscreenEnabled",mt.fullscreenElement="fullscreenElement",mt.fullscreenchange="fullscreenchange",mt.fullscreenerror="fullscreenerror",Rr=!0,Rr;const n=["webkit","moz","o","ms","khtml"];let e;for(let i=0,o=n.length;i<o;++i){const r=n[i];e=`${r}RequestFullscreen`,typeof t[e]=="function"?(mt.requestFullscreen=e,Rr=!0):(e=`${r}RequestFullScreen`,typeof t[e]=="function"&&(mt.requestFullscreen=e,Rr=!0)),e=`${r}ExitFullscreen`,typeof document[e]=="function"?mt.exitFullscreen=e:(e=`${r}CancelFullScreen`,typeof document[e]=="function"&&(mt.exitFullscreen=e)),e=`${r}FullscreenEnabled`,document[e]!==void 0?mt.fullscreenEnabled=e:(e=`${r}FullScreenEnabled`,document[e]!==void 0&&(mt.fullscreenEnabled=e)),e=`${r}FullscreenElement`,document[e]!==void 0?mt.fullscreenElement=e:(e=`${r}FullScreenElement`,document[e]!==void 0&&(mt.fullscreenElement=e)),e=`${r}fullscreenchange`,document[`on${e}`]!==void 0&&(r==="ms"&&(e="MSFullscreenChange"),mt.fullscreenchange=e),e=`${r}fullscreenerror`,document[`on${e}`]!==void 0&&(r==="ms"&&(e="MSFullscreenError"),mt.fullscreenerror=e)}return Rr},mn.requestFullscreen=function(t,n){mn.supportsFullscreen()&&t[mt.requestFullscreen]({vrDisplay:n})},mn.exitFullscreen=function(){mn.supportsFullscreen()&&document[mt.exitFullscreen]()},mn._names=mt;let Xt;typeof navigator<"u"?Xt=navigator:Xt={};function Po(t){const n=t.split(".");for(let e=0,i=n.length;e<i;++e)n[e]=parseInt(n[e],10);return n}let aA,ub;function md(){if(!ne(aA)&&(aA=!1,!hA())){const t=/ Chrome\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(aA=!0,ub=Po(t[1]))}return aA}function g4(){return md()&&ub}let lA,cb;function hb(){if(!ne(lA)&&(lA=!1,!md()&&!hA()&&/ Safari\/[\.0-9]+/.test(Xt.userAgent))){const t=/ Version\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(lA=!0,cb=Po(t[1]))}return lA}function y4(){return hb()&&cb}let uA,gd;function Ab(){if(!ne(uA)){uA=!1;const t=/ AppleWebKit\/([\.0-9]+)(\+?)/.exec(Xt.userAgent);t!==null&&(uA=!0,gd=Po(t[1]),gd.isNightly=!!t[2])}return uA}function v4(){return Ab()&&gd}let pl,yd;function fb(){if(!ne(pl)){pl=!1;let t;Xt.appName==="Microsoft Internet Explorer"?(t=/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(Xt.userAgent),t!==null&&(pl=!0,yd=Po(t[1]))):Xt.appName==="Netscape"&&(t=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(Xt.userAgent),t!==null&&(pl=!0,yd=Po(t[1])))}return pl}function w4(){return fb()&&yd}let cA,pb;function hA(){if(!ne(cA)){cA=!1;const t=/ Edg\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(cA=!0,pb=Po(t[1]))}return cA}function b4(){return hA()&&pb}let AA,vd;function fA(){if(!ne(AA)){AA=!1;const t=/Firefox\/([\.0-9]+)/.exec(Xt.userAgent);t!==null&&(AA=!0,vd=Po(t[1]))}return AA}let wd;function x4(){return ne(wd)||(wd=/Windows/i.test(Xt.appVersion)),wd}let bd;function _4(){return ne(bd)||(bd=navigator.platform==="iPhone"||navigator.platform==="iPod"||navigator.platform==="iPad"),bd}function C4(){return fA()&&vd}let xd;function S4(){return ne(xd)||(xd=!fA()&&typeof PointerEvent<"u"&&(!ne(Xt.pointerEnabled)||Xt.pointerEnabled)),xd}let db,pA;function mb(){if(!ne(pA)){const t=document.createElement("canvas");t.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");const n=t.style.imageRendering;pA=ne(n)&&n!=="",pA&&(db=n)}return pA}function E4(){return mb()?db:void 0}function $t(){if(!$t.initialized)throw new pe("You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP");return $t._result}$t._promise=void 0,$t._result=void 0,$t.initialize=function(){return ne($t._promise)||($t._promise=new Promise(t=>{const n=new Image;n.onload=function(){$t._result=n.width>0&&n.height>0,t($t._result)},n.onerror=function(){$t._result=!1,t($t._result)},n.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA"})),$t._promise},Object.defineProperties($t,{initialized:{get:function(){return ne($t._result)}}});const Us=[];typeof ArrayBuffer<"u"&&(Us.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),typeof Uint8ClampedArray<"u"&&Us.push(Uint8ClampedArray),typeof Uint8ClampedArray<"u"&&Us.push(Uint8ClampedArray),typeof BigInt64Array<"u"&&Us.push(BigInt64Array),typeof BigUint64Array<"u"&&Us.push(BigUint64Array));const Ht={isChrome:md,chromeVersion:g4,isSafari:hb,safariVersion:y4,isWebkit:Ab,webkitVersion:v4,isInternetExplorer:fb,internetExplorerVersion:w4,isEdge:hA,edgeVersion:b4,isFirefox:fA,firefoxVersion:C4,isWindows:x4,isIPadOrIOS:_4,hardwareConcurrency:Xt.hardwareConcurrency??3,supportsPointerEvents:S4,supportsImageRenderingPixelated:mb,supportsWebP:$t,imageRenderingValue:E4,typedArrayTypes:Us};Ht.supportsBasis=function(t){return Ht.supportsWebAssembly()&&t.context.supportsBasis},Ht.supportsFullscreen=function(){return mn.supportsFullscreen()},Ht.supportsTypedArrays=function(){return typeof ArrayBuffer<"u"},Ht.supportsBigInt64Array=function(){return typeof BigInt64Array<"u"},Ht.supportsBigUint64Array=function(){return typeof BigUint64Array<"u"},Ht.supportsBigInt=function(){return typeof BigInt<"u"},Ht.supportsWebWorkers=function(){return typeof Worker<"u"},Ht.supportsWebAssembly=function(){return typeof WebAssembly<"u"},Ht.supportsWebgl2=function(t){return N.defined("scene",t),t.context.webgl2},Ht.supportsEsmWebWorkers=function(){return!fA()||parseInt(vd)>=114};function _e(t,n){this.x=t??0,this.y=n??0}_e.fromElements=function(t,n,e){return ne(e)?(e.x=t,e.y=n,e):new _e(t,n)},_e.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n):new _e(t.x,t.y)},_e.fromCartesian3=_e.clone,_e.fromCartesian4=_e.clone,_e.packedLength=2,_e.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e]=t.y,n},_e.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new _e),e.x=t[n++],e.y=t[n],e},_e.packArray=function(t,n){N.defined("array",t);const e=t.length,i=e*2;if(!ne(n))n=new Array(i);else{if(!Array.isArray(n)&&n.length!==i)throw new pe("If result is a typed array, it must have exactly array.length * 2 elements");n.length!==i&&(n.length=i)}for(let o=0;o<e;++o)_e.pack(t[o],n,o*2);return n},_e.unpackArray=function(t,n){if(N.defined("array",t),N.typeOf.number.greaterThanOrEquals("array.length",t.length,2),t.length%2!==0)throw new pe("array length must be a multiple of 2.");const e=t.length;ne(n)?n.length=e/2:n=new Array(e/2);for(let i=0;i<e;i+=2){const o=i/2;n[o]=_e.unpack(t,i,n[o])}return n},_e.fromArray=_e.unpack,_e.maximumComponent=function(t){return N.typeOf.object("cartesian",t),Math.max(t.x,t.y)},_e.minimumComponent=function(t){return N.typeOf.object("cartesian",t),Math.min(t.x,t.y)},_e.minimumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.min(t.x,n.x),e.y=Math.min(t.y,n.y),e},_e.maximumByComponent=function(t,n,e){return N.typeOf.object("first",t),N.typeOf.object("second",n),N.typeOf.object("result",e),e.x=Math.max(t.x,n.x),e.y=Math.max(t.y,n.y),e},_e.clamp=function(t,n,e,i){N.typeOf.object("value",t),N.typeOf.object("min",n),N.typeOf.object("max",e),N.typeOf.object("result",i);const o=he.clamp(t.x,n.x,e.x),r=he.clamp(t.y,n.y,e.y);return i.x=o,i.y=r,i},_e.magnitudeSquared=function(t){return N.typeOf.object("cartesian",t),t.x*t.x+t.y*t.y},_e.magnitude=function(t){return Math.sqrt(_e.magnitudeSquared(t))};const dA=new _e;_e.distance=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),_e.subtract(t,n,dA),_e.magnitude(dA)},_e.distanceSquared=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),_e.subtract(t,n,dA),_e.magnitudeSquared(dA)},_e.normalize=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=_e.magnitude(t);if(n.x=t.x/e,n.y=t.y/e,isNaN(n.x)||isNaN(n.y))throw new pe("normalized result is not a number");return n},_e.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y},_e.cross=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.y-t.y*n.x},_e.multiplyComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x*n.x,e.y=t.y*n.y,e},_e.divideComponents=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x/n.x,e.y=t.y/n.y,e},_e.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e},_e.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e},_e.multiplyByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e},_e.divideByScalar=function(t,n,e){return N.typeOf.object("cartesian",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e},_e.negate=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n},_e.abs=function(t,n){return N.typeOf.object("cartesian",t),N.typeOf.object("result",n),n.x=Math.abs(t.x),n.y=Math.abs(t.y),n};const gb=new _e;_e.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),_e.multiplyByScalar(n,e,gb),i=_e.multiplyByScalar(t,1-e,i),_e.add(gb,i,i)};const yb=new _e,vb=new _e;_e.angleBetween=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),_e.normalize(t,yb),_e.normalize(n,vb),he.acosClamped(_e.dot(yb,vb))};const P4=new _e;_e.mostOrthogonalAxis=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=_e.normalize(t,P4);return _e.abs(e,e),e.x<=e.y?n=_e.clone(_e.UNIT_X,n):n=_e.clone(_e.UNIT_Y,n),n},_e.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y},_e.equalsArray=function(t,n,e){return t.x===n[e]&&t.y===n[e+1]},_e.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.x,n.x,e,i)&&he.equalsEpsilon(t.y,n.y,e,i)},_e.ZERO=Object.freeze(new _e(0,0)),_e.ONE=Object.freeze(new _e(1,1)),_e.UNIT_X=Object.freeze(new _e(1,0)),_e.UNIT_Y=Object.freeze(new _e(0,1)),_e.prototype.clone=function(t){return _e.clone(this,t)},_e.prototype.equals=function(t){return _e.equals(this,t)},_e.prototype.equalsEpsilon=function(t,n,e){return _e.equalsEpsilon(this,t,n,e)},_e.prototype.toString=function(){return`(${this.x}, ${this.y})`};const B4=new ae,T4=new ae;function wb(t,n,e,i,o){if(!ne(t))throw new pe("cartesian is required.");if(!ne(n))throw new pe("oneOverRadii is required.");if(!ne(e))throw new pe("oneOverRadiiSquared is required.");if(!ne(i))throw new pe("centerToleranceSquared is required.");const r=t.x,a=t.y,s=t.z,l=n.x,u=n.y,A=n.z,c=r*r*l*l,f=a*a*u*u,d=s*s*A*A,p=c+f+d,g=Math.sqrt(1/p),v=ae.multiplyByScalar(t,g,B4);if(p<i)return isFinite(g)?ae.clone(v,o):void 0;const y=e.x,m=e.y,b=e.z,x=T4;x.x=v.x*y*2,x.y=v.y*m*2,x.z=v.z*b*2;let E=(1-g)*ae.magnitude(t)/(.5*ae.magnitude(x)),B=0,P,I,O,M,S,T,w,C,U,F,D;do{E-=B,O=1/(1+E*y),M=1/(1+E*m),S=1/(1+E*b),T=O*O,w=M*M,C=S*S,U=T*O,F=w*M,D=C*S,P=c*T+f*w+d*C-1,I=c*U*y+f*F*m+d*D*b;const R=-2*I;B=P/R}while(Math.abs(P)>he.EPSILON12);return ne(o)?(o.x=r*O,o.y=a*M,o.z=s*S,o):new ae(r*O,a*M,s*S)}function Qe(t,n,e){this.longitude=t??0,this.latitude=n??0,this.height=e??0}Qe.fromRadians=function(t,n,e,i){return N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),e=e??0,ne(i)?(i.longitude=t,i.latitude=n,i.height=e,i):new Qe(t,n,e)},Qe.fromDegrees=function(t,n,e,i){return N.typeOf.number("longitude",t),N.typeOf.number("latitude",n),t=he.toRadians(t),n=he.toRadians(n),Qe.fromRadians(t,n,e,i)};const I4=new ae,F4=new ae,M4=new ae;Qe._ellipsoidOneOverRadii=new ae(1567855942887398e-22,1567855942887398e-22,1573130351105623e-22),Qe._ellipsoidOneOverRadiiSquared=new ae(2458172257647332e-29,2458172257647332e-29,24747391015697002e-30),Qe._ellipsoidCenterToleranceSquared=he.EPSILON1,Qe.fromCartesian=function(t,n,e){const i=ne(n)?n.oneOverRadii:Qe._ellipsoidOneOverRadii,o=ne(n)?n.oneOverRadiiSquared:Qe._ellipsoidOneOverRadiiSquared,r=ne(n)?n._centerToleranceSquared:Qe._ellipsoidCenterToleranceSquared,a=wb(t,i,o,r,F4);if(!ne(a))return;let s=ae.multiplyComponents(a,o,I4);s=ae.normalize(s,s);const l=ae.subtract(t,a,M4),u=Math.atan2(s.y,s.x),A=Math.asin(s.z),c=he.sign(ae.dot(l,t))*ae.magnitude(l);return ne(e)?(e.longitude=u,e.latitude=A,e.height=c,e):new Qe(u,A,c)},Qe.toCartesian=function(t,n,e){return N.defined("cartographic",t),ae.fromRadians(t.longitude,t.latitude,t.height,n,e)},Qe.clone=function(t,n){if(ne(t))return ne(n)?(n.longitude=t.longitude,n.latitude=t.latitude,n.height=t.height,n):new Qe(t.longitude,t.latitude,t.height)},Qe.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.longitude===n.longitude&&t.latitude===n.latitude&&t.height===n.height},Qe.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t.longitude-n.longitude)<=e&&Math.abs(t.latitude-n.latitude)<=e&&Math.abs(t.height-n.height)<=e},Qe.ZERO=Object.freeze(new Qe(0,0,0)),Qe.prototype.clone=function(t){return Qe.clone(this,t)},Qe.prototype.equals=function(t){return Qe.equals(this,t)},Qe.prototype.equalsEpsilon=function(t,n){return Qe.equalsEpsilon(this,t,n)},Qe.prototype.toString=function(){return`(${this.longitude}, ${this.latitude}, ${this.height})`};function bb(t,n,e,i){n=n??0,e=e??0,i=i??0,N.typeOf.number.greaterThanOrEquals("x",n,0),N.typeOf.number.greaterThanOrEquals("y",e,0),N.typeOf.number.greaterThanOrEquals("z",i,0),t._radii=new ae(n,e,i),t._radiiSquared=new ae(n*n,e*e,i*i),t._radiiToTheFourth=new ae(n*n*n*n,e*e*e*e,i*i*i*i),t._oneOverRadii=new ae(n===0?0:1/n,e===0?0:1/e,i===0?0:1/i),t._oneOverRadiiSquared=new ae(n===0?0:1/(n*n),e===0?0:1/(e*e),i===0?0:1/(i*i)),t._minimumRadius=Math.min(n,e,i),t._maximumRadius=Math.max(n,e,i),t._centerToleranceSquared=he.EPSILON1,t._radiiSquared.z!==0&&(t._squaredXOverSquaredZ=t._radiiSquared.x/t._radiiSquared.z)}function De(t,n,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,bb(this,t,n,e)}Object.defineProperties(De.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}}}),De.clone=function(t,n){if(!ne(t))return;const e=t._radii;return ne(n)?(ae.clone(e,n._radii),ae.clone(t._radiiSquared,n._radiiSquared),ae.clone(t._radiiToTheFourth,n._radiiToTheFourth),ae.clone(t._oneOverRadii,n._oneOverRadii),ae.clone(t._oneOverRadiiSquared,n._oneOverRadiiSquared),n._minimumRadius=t._minimumRadius,n._maximumRadius=t._maximumRadius,n._centerToleranceSquared=t._centerToleranceSquared,n):new De(e.x,e.y,e.z)},De.fromCartesian3=function(t,n){return ne(n)||(n=new De),ne(t)&&bb(n,t.x,t.y,t.z),n},De.WGS84=Object.freeze(new De(6378137,6378137,6356752314245179e-9)),De.UNIT_SPHERE=Object.freeze(new De(1,1,1)),De.MOON=Object.freeze(new De(he.LUNAR_RADIUS,he.LUNAR_RADIUS,he.LUNAR_RADIUS)),De.MARS=Object.freeze(new De(3396190,3396190,3376200)),De._default=De.WGS84,Object.defineProperties(De,{default:{get:function(){return De._default},set:function(t){N.typeOf.object("value",t),De._default=t,ae._ellipsoidRadiiSquared=t.radiiSquared,Qe._ellipsoidOneOverRadii=t.oneOverRadii,Qe._ellipsoidOneOverRadiiSquared=t.oneOverRadiiSquared,Qe._ellipsoidCenterToleranceSquared=t._centerToleranceSquared}}}),De.prototype.clone=function(t){return De.clone(this,t)},De.packedLength=ae.packedLength,De.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,ae.pack(t._radii,n,e),n},De.unpack=function(t,n,e){N.defined("array",t),n=n??0;const i=ae.unpack(t,n);return De.fromCartesian3(i,e)},De.prototype.geocentricSurfaceNormal=ae.normalize,De.prototype.geodeticSurfaceNormalCartographic=function(t,n){N.typeOf.object("cartographic",t);const e=t.longitude,i=t.latitude,o=Math.cos(i),r=o*Math.cos(e),a=o*Math.sin(e),s=Math.sin(i);return ne(n)||(n=new ae),n.x=r,n.y=a,n.z=s,ae.normalize(n,n)},De.prototype.geodeticSurfaceNormal=function(t,n){if(N.typeOf.object("cartesian",t),isNaN(t.x)||isNaN(t.y)||isNaN(t.z))throw new pe("cartesian has a NaN component");if(!ae.equalsEpsilon(t,ae.ZERO,he.EPSILON14))return ne(n)||(n=new ae),n=ae.multiplyComponents(t,this._oneOverRadiiSquared,n),ae.normalize(n,n)};const D4=new ae,R4=new ae;De.prototype.cartographicToCartesian=function(t,n){const e=D4,i=R4;this.geodeticSurfaceNormalCartographic(t,e),ae.multiplyComponents(this._radiiSquared,e,i);const o=Math.sqrt(ae.dot(e,i));return ae.divideByScalar(i,o,i),ae.multiplyByScalar(e,t.height,e),ne(n)||(n=new ae),ae.add(i,e,n)},De.prototype.cartographicArrayToCartesianArray=function(t,n){N.defined("cartographics",t);const e=t.length;ne(n)?n.length=e:n=new Array(e);for(let i=0;i<e;i++)n[i]=this.cartographicToCartesian(t[i],n[i]);return n};const U4=new ae,O4=new ae,L4=new ae;De.prototype.cartesianToCartographic=function(t,n){const e=this.scaleToGeodeticSurface(t,O4);if(!ne(e))return;const i=this.geodeticSurfaceNormal(e,U4),o=ae.subtract(t,e,L4),r=Math.atan2(i.y,i.x),a=Math.asin(i.z),s=he.sign(ae.dot(o,t))*ae.magnitude(o);return ne(n)?(n.longitude=r,n.latitude=a,n.height=s,n):new Qe(r,a,s)},De.prototype.cartesianArrayToCartographicArray=function(t,n){N.defined("cartesians",t);const e=t.length;ne(n)?n.length=e:n=new Array(e);for(let i=0;i<e;++i)n[i]=this.cartesianToCartographic(t[i],n[i]);return n},De.prototype.scaleToGeodeticSurface=function(t,n){return wb(t,this._oneOverRadii,this._oneOverRadiiSquared,this._centerToleranceSquared,n)},De.prototype.scaleToGeocentricSurface=function(t,n){N.typeOf.object("cartesian",t),ne(n)||(n=new ae);const e=t.x,i=t.y,o=t.z,r=this._oneOverRadiiSquared,a=1/Math.sqrt(e*e*r.x+i*i*r.y+o*o*r.z);return ae.multiplyByScalar(t,a,n)},De.prototype.transformPositionToScaledSpace=function(t,n){return ne(n)||(n=new ae),ae.multiplyComponents(t,this._oneOverRadii,n)},De.prototype.transformPositionFromScaledSpace=function(t,n){return ne(n)||(n=new ae),ae.multiplyComponents(t,this._radii,n)},De.prototype.equals=function(t){return this===t||ne(t)&&ae.equals(this._radii,t._radii)},De.prototype.toString=function(){return this._radii.toString()},De.prototype.getSurfaceNormalIntersectionWithZAxis=function(t,n,e){if(N.typeOf.object("position",t),!he.equalsEpsilon(this._radii.x,this._radii.y,he.EPSILON15))throw new pe("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");N.typeOf.number.greaterThan("Ellipsoid.radii.z",this._radii.z,0),n=n??0;const i=this._squaredXOverSquaredZ;if(ne(e)||(e=new ae),e.x=0,e.y=0,e.z=t.z*(1-i),!(Math.abs(e.z)>=this._radii.z-n))return e};const z4=new ae;De.prototype.getLocalCurvature=function(t,n){N.typeOf.object("surfacePosition",t),ne(n)||(n=new _e);const e=this.getSurfaceNormalIntersectionWithZAxis(t,0,z4),i=ae.distance(t,e),o=this.minimumRadius*i/this.maximumRadius**2,r=i*o**2;return _e.fromElements(1/i,1/r,n)};const k4=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],Q4=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function xb(t,n,e){N.typeOf.number("a",t),N.typeOf.number("b",n),N.typeOf.func("func",e);const i=.5*(n+t),o=.5*(n-t);let r=0;for(let a=0;a<5;a++){const s=o*k4[a];r+=Q4[a]*(e(i+s)+e(i-s))}return r*=o,r}De.prototype.surfaceArea=function(t){N.typeOf.object("rectangle",t);const n=t.west;let e=t.east;const i=t.south,o=t.north;for(;e<n;)e+=he.TWO_PI;const r=this._radiiSquared,a=r.x,s=r.y,l=r.z,u=a*s;return xb(i,o,function(A){const c=Math.cos(A),f=Math.sin(A);return Math.cos(A)*xb(n,e,function(d){const p=Math.cos(d),g=Math.sin(d);return Math.sqrt(u*f*f+l*(s*p*p+a*g*g)*c*c)})})};function dl(t,n,e){N.defined("array",t),N.defined("itemToFind",n),N.defined("comparator",e);let i=0,o=t.length-1,r,a;for(;i<=o;){if(r=~~((i+o)/2),a=e(t[r],n),a<0){i=r+1;continue}if(a>0){o=r-1;continue}return r}return~(o+1)}function _d(t,n,e,i,o){this.xPoleWander=t,this.yPoleWander=n,this.xPoleOffset=e,this.yPoleOffset=i,this.ut1MinusUtc=o}function Cd(t){if(t===null||isNaN(t))throw new pe("year is required and must be a number.");return t%4===0&&t%100!==0||t%400===0}const _b=[31,28,31,30,31,30,31,31,30,31,30,31];function Sd(t,n,e,i,o,r,a,s){t=t??1,n=n??1,e=e??1,i=i??0,o=o??0,r=r??0,a=a??0,s=s??!1,g(),v(),this.year=t,this.month=n,this.day=e,this.hour=i,this.minute=o,this.second=r,this.millisecond=a,this.isLeapSecond=s;function g(){N.typeOf.number.greaterThanOrEquals("Year",t,1),N.typeOf.number.lessThanOrEquals("Year",t,9999),N.typeOf.number.greaterThanOrEquals("Month",n,1),N.typeOf.number.lessThanOrEquals("Month",n,12),N.typeOf.number.greaterThanOrEquals("Day",e,1),N.typeOf.number.lessThanOrEquals("Day",e,31),N.typeOf.number.greaterThanOrEquals("Hour",i,0),N.typeOf.number.lessThanOrEquals("Hour",i,23),N.typeOf.number.greaterThanOrEquals("Minute",o,0),N.typeOf.number.lessThanOrEquals("Minute",o,59),N.typeOf.bool("IsLeapSecond",s),N.typeOf.number.greaterThanOrEquals("Second",r,0),N.typeOf.number.lessThanOrEquals("Second",r,s?60:59),N.typeOf.number.greaterThanOrEquals("Millisecond",a,0),N.typeOf.number.lessThan("Millisecond",a,1e3)}function v(){const y=n===2&&Cd(t)?_b[n-1]+1:_b[n-1];if(e>y)throw new pe("Month and Day represents invalid date")}}function Ye(t,n){this.julianDate=t,this.offset=n}const pt=Object.freeze({SECONDS_PER_MILLISECOND:.001,SECONDS_PER_MINUTE:60,MINUTES_PER_HOUR:60,HOURS_PER_DAY:24,SECONDS_PER_HOUR:3600,MINUTES_PER_DAY:1440,SECONDS_PER_DAY:86400,DAYS_PER_JULIAN_CENTURY:36525,PICOSECOND:1e-9,MODIFIED_JULIAN_DATE_DIFFERENCE:24000005e-1}),Ve=Object.freeze({UTC:0,TAI:1}),Cb=new Sd,mA=[31,28,31,30,31,30,31,31,30,31,30,31],gA=29;function Ed(t,n){return we.compare(t.julianDate,n.julianDate)}const Os=new Ye;function yA(t){Os.julianDate=t;const n=we.leapSeconds;let e=dl(n,Os,Ed);e<0&&(e=~e),e>=n.length&&(e=n.length-1);let i=n[e].offset;e>0&&we.secondsDifference(n[e].julianDate,t)>i&&(e--,i=n[e].offset),we.addSeconds(t,i,t)}function Sb(t,n){Os.julianDate=t;const e=we.leapSeconds;let i=dl(e,Os,Ed);if(i<0&&(i=~i),i===0)return we.addSeconds(t,-e[0].offset,n);if(i>=e.length)return we.addSeconds(t,-e[i-1].offset,n);const o=we.secondsDifference(e[i].julianDate,t);if(o===0)return we.addSeconds(t,-e[i].offset,n);if(!(o<=1))return we.addSeconds(t,-e[--i].offset,n)}function Ur(t,n,e){const i=n/pt.SECONDS_PER_DAY|0;return t+=i,n-=pt.SECONDS_PER_DAY*i,n<0&&(t--,n+=pt.SECONDS_PER_DAY),e.dayNumber=t,e.secondsOfDay=n,e}function Pd(t,n,e,i,o,r,a){const s=(n-14)/12|0,l=t+4800+s;let u=(1461*l/4|0)+(367*(n-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+e-32075;i=i-12,i<0&&(i+=24);const A=r+(i*pt.SECONDS_PER_HOUR+o*pt.SECONDS_PER_MINUTE+a*pt.SECONDS_PER_MILLISECOND);return A>=43200&&(u-=1),[u,A]}const V4=/^(\d{4})$/,N4=/^(\d{4})-(\d{2})$/,H4=/^(\d{4})-?(\d{3})$/,G4=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,W4=/^(\d{4})-?(\d{2})-?(\d{2})$/,Bd=/([Z+\-])?(\d{2})?:?(\d{2})?$/,j4=/^(\d{2})(\.\d+)?/.source+Bd.source,q4=/^(\d{2}):?(\d{2})(\.\d+)?/.source+Bd.source,K4=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+Bd.source,ni="Invalid ISO 8601 date.";function we(t,n,e){this.dayNumber=void 0,this.secondsOfDay=void 0,t=t??0,n=n??0,e=e??Ve.UTC;const i=t|0;n=n+(t-i)*pt.SECONDS_PER_DAY,Ur(i,n,this),e===Ve.UTC&&yA(this)}we.fromGregorianDate=function(t,n){if(!(t instanceof Sd))throw new pe("date must be a valid GregorianDate.");const e=Pd(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond);return ne(n)?(Ur(e[0],e[1],n),yA(n),n):new we(e[0],e[1],Ve.UTC)},we.fromDate=function(t,n){if(!(t instanceof Date)||isNaN(t.getTime()))throw new pe("date must be a valid JavaScript Date.");const e=Pd(t.getUTCFullYear(),t.getUTCMonth()+1,t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds());return ne(n)?(Ur(e[0],e[1],n),yA(n),n):new we(e[0],e[1],Ve.UTC)},we.fromIso8601=function(t,n){if(typeof t!="string")throw new pe(ni);t=t.replace(",",".");let e=t.split("T"),i,o=1,r=1,a=0,s=0,l=0,u=0;const A=e[0],c=e[1];let f,d;if(!ne(A))throw new pe(ni);let p;if(e=A.match(W4),e!==null){if(p=A.split("-").length-1,p>0&&p!==2)throw new pe(ni);i=+e[1],o=+e[2],r=+e[3]}else if(e=A.match(N4),e!==null)i=+e[1],o=+e[2];else if(e=A.match(V4),e!==null)i=+e[1];else{let m;if(e=A.match(H4),e!==null){if(i=+e[1],m=+e[2],d=Cd(i),m<1||d&&m>366||!d&&m>365)throw new pe(ni)}else if(e=A.match(G4),e!==null){i=+e[1];const b=+e[2],x=+e[3]||0;if(p=A.split("-").length-1,p>0&&(!ne(e[3])&&p!==1||ne(e[3])&&p!==2))throw new pe(ni);const E=new Date(Date.UTC(i,0,4));m=b*7+x-E.getUTCDay()-3}else throw new pe(ni);f=new Date(Date.UTC(i,0,1)),f.setUTCDate(m),o=f.getUTCMonth()+1,r=f.getUTCDate()}if(d=Cd(i),o<1||o>12||r<1||(o!==2||!d)&&r>mA[o-1]||d&&o===2&&r>gA)throw new pe(ni);let g;if(ne(c)){if(e=c.match(K4),e!==null){if(p=c.split(":").length-1,p>0&&p!==2&&p!==3)throw new pe(ni);a=+e[1],s=+e[2],l=+e[3],u=+(e[4]||0)*1e3,g=5}else if(e=c.match(q4),e!==null){if(p=c.split(":").length-1,p>2)throw new pe(ni);a=+e[1],s=+e[2],l=+(e[3]||0)*60,g=4}else if(e=c.match(j4),e!==null)a=+e[1],s=+(e[2]||0)*60,g=3;else throw new pe(ni);if(s>=60||l>=61||a>24||a===24&&(s>0||l>0||u>0))throw new pe(ni);const m=e[g],b=+e[g+1],x=+(e[g+2]||0);switch(m){case"+":a=a-b,s=s-x;break;case"-":a=a+b,s=s+x;break;case"Z":break;default:s=s+new Date(Date.UTC(i,o-1,r,a,s)).getTimezoneOffset();break}}const v=l===60;for(v&&l--;s>=60;)s-=60,a++;for(;a>=24;)a-=24,r++;for(f=d&&o===2?gA:mA[o-1];r>f;)r-=f,o++,o>12&&(o-=12,i++),f=d&&o===2?gA:mA[o-1];for(;s<0;)s+=60,a--;for(;a<0;)a+=24,r--;for(;r<1;)o--,o<1&&(o+=12,i--),f=d&&o===2?gA:mA[o-1],r+=f;const y=Pd(i,o,r,a,s,l,u);return ne(n)?(Ur(y[0],y[1],n),yA(n)):n=new we(y[0],y[1],Ve.UTC),v&&we.addSeconds(n,1,n),n},we.now=function(t){return we.fromDate(new Date,t)};const vA=new we(0,0,Ve.TAI);we.toGregorianDate=function(t,n){if(!ne(t))throw new pe("julianDate is required.");let e=!1,i=Sb(t,vA);ne(i)||(we.addSeconds(t,-1,vA),i=Sb(vA,vA),e=!0);let o=i.dayNumber;const r=i.secondsOfDay;r>=43200&&(o+=1);let a=o+68569|0;const s=4*a/146097|0;a=a-((146097*s+3)/4|0)|0;const l=4e3*(a+1)/1461001|0;a=a-(1461*l/4|0)+31|0;const u=80*a/2447|0,A=a-(2447*u/80|0)|0;a=u/11|0;const c=u+2-12*a|0,f=100*(s-49)+l+a|0;let d=r/pt.SECONDS_PER_HOUR|0,p=r-d*pt.SECONDS_PER_HOUR;const g=p/pt.SECONDS_PER_MINUTE|0;p=p-g*pt.SECONDS_PER_MINUTE;let v=p|0;const y=(p-v)/pt.SECONDS_PER_MILLISECOND;return d+=12,d>23&&(d-=24),e&&(v+=1),ne(n)?(n.year=f,n.month=c,n.day=A,n.hour=d,n.minute=g,n.second=v,n.millisecond=y,n.isLeapSecond=e,n):new Sd(f,c,A,d,g,v,y,e)},we.toDate=function(t){if(!ne(t))throw new pe("julianDate is required.");const n=we.toGregorianDate(t,Cb);let e=n.second;return n.isLeapSecond&&(e-=1),new Date(Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,e,n.millisecond))},we.toIso8601=function(t,n){if(!ne(t))throw new pe("julianDate is required.");const e=we.toGregorianDate(t,Cb);let i=e.year,o=e.month,r=e.day,a=e.hour;const s=e.minute,l=e.second,u=e.millisecond;i===1e4&&o===1&&r===1&&a===0&&s===0&&l===0&&u===0&&(i=9999,o=12,r=31,a=24);let A;if(!ne(n)&&u!==0){const c=u*.01;return A=c<1e-6?c.toFixed(20).replace(".","").replace(/0+$/,""):c.toString().replace(".",""),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${A}Z`}return!ne(n)||n===0?`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}Z`:(A=(u*.01).toFixed(n).replace(".","").slice(0,n),`${i.toString().padStart(4,"0")}-${o.toString().padStart(2,"0")}-${r.toString().padStart(2,"0")}T${a.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}:${l.toString().padStart(2,"0")}.${A}Z`)},we.clone=function(t,n){if(ne(t))return ne(n)?(n.dayNumber=t.dayNumber,n.secondsOfDay=t.secondsOfDay,n):new we(t.dayNumber,t.secondsOfDay,Ve.TAI)},we.compare=function(t,n){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");const e=t.dayNumber-n.dayNumber;return e!==0?e:t.secondsOfDay-n.secondsOfDay},we.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.dayNumber===n.dayNumber&&t.secondsOfDay===n.secondsOfDay},we.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(we.secondsDifference(t,n))<=e},we.totalDays=function(t){if(!ne(t))throw new pe("julianDate is required.");return t.dayNumber+t.secondsOfDay/pt.SECONDS_PER_DAY},we.secondsDifference=function(t,n){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");return(t.dayNumber-n.dayNumber)*pt.SECONDS_PER_DAY+(t.secondsOfDay-n.secondsOfDay)},we.daysDifference=function(t,n){if(!ne(t))throw new pe("left is required.");if(!ne(n))throw new pe("right is required.");const e=t.dayNumber-n.dayNumber,i=(t.secondsOfDay-n.secondsOfDay)/pt.SECONDS_PER_DAY;return e+i},we.computeTaiMinusUtc=function(t){Os.julianDate=t;const n=we.leapSeconds;let e=dl(n,Os,Ed);return e<0&&(e=~e,--e,e<0&&(e=0)),n[e].offset},we.addSeconds=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("seconds is required.");if(!ne(e))throw new pe("result is required.");return Ur(t.dayNumber,t.secondsOfDay+n,e)},we.addMinutes=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("minutes is required.");if(!ne(e))throw new pe("result is required.");const i=t.secondsOfDay+n*pt.SECONDS_PER_MINUTE;return Ur(t.dayNumber,i,e)},we.addHours=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("hours is required.");if(!ne(e))throw new pe("result is required.");const i=t.secondsOfDay+n*pt.SECONDS_PER_HOUR;return Ur(t.dayNumber,i,e)},we.addDays=function(t,n,e){if(!ne(t))throw new pe("julianDate is required.");if(!ne(n))throw new pe("days is required.");if(!ne(e))throw new pe("result is required.");const i=t.dayNumber+n;return Ur(i,t.secondsOfDay,e)},we.lessThan=function(t,n){return we.compare(t,n)<0},we.lessThanOrEquals=function(t,n){return we.compare(t,n)<=0},we.greaterThan=function(t,n){return we.compare(t,n)>0},we.greaterThanOrEquals=function(t,n){return we.compare(t,n)>=0},we.prototype.clone=function(t){return we.clone(this,t)},we.prototype.equals=function(t){return we.equals(this,t)},we.prototype.equalsEpsilon=function(t,n){return we.equalsEpsilon(this,t,n)},we.prototype.toString=function(){return we.toIso8601(this)},we.leapSeconds=[new Ye(new we(2441317,43210,Ve.TAI),10),new Ye(new we(2441499,43211,Ve.TAI),11),new Ye(new we(2441683,43212,Ve.TAI),12),new Ye(new we(2442048,43213,Ve.TAI),13),new Ye(new we(2442413,43214,Ve.TAI),14),new Ye(new we(2442778,43215,Ve.TAI),15),new Ye(new we(2443144,43216,Ve.TAI),16),new Ye(new we(2443509,43217,Ve.TAI),17),new Ye(new we(2443874,43218,Ve.TAI),18),new Ye(new we(2444239,43219,Ve.TAI),19),new Ye(new we(2444786,43220,Ve.TAI),20),new Ye(new we(2445151,43221,Ve.TAI),21),new Ye(new we(2445516,43222,Ve.TAI),22),new Ye(new we(2446247,43223,Ve.TAI),23),new Ye(new we(2447161,43224,Ve.TAI),24),new Ye(new we(2447892,43225,Ve.TAI),25),new Ye(new we(2448257,43226,Ve.TAI),26),new Ye(new we(2448804,43227,Ve.TAI),27),new Ye(new we(2449169,43228,Ve.TAI),28),new Ye(new we(2449534,43229,Ve.TAI),29),new Ye(new we(2450083,43230,Ve.TAI),30),new Ye(new we(2450630,43231,Ve.TAI),31),new Ye(new we(2451179,43232,Ve.TAI),32),new Ye(new we(2453736,43233,Ve.TAI),33),new Ye(new we(2454832,43234,Ve.TAI),34),new Ye(new we(2456109,43235,Ve.TAI),35),new Ye(new we(2457204,43236,Ve.TAI),36),new Ye(new we(2457754,43237,Ve.TAI),37)];var wA={exports:{}},ml={exports:{}};/*! https://mths.be/punycode v1.4.0 by @mathias */var Z4=ml.exports,Eb;function X4(){return Eb||(Eb=1,(function(t,n){(function(e){var i=n&&!n.nodeType&&n,o=t&&!t.nodeType&&t,r=typeof J1=="object"&&J1;(r.global===r||r.window===r||r.self===r)&&(e=r);var a,s=2147483647,l=36,u=1,A=26,c=38,f=700,d=72,p=128,g="-",v=/^xn--/,y=/[^\x20-\x7E]/,m=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=l-u,E=Math.floor,B=String.fromCharCode,P;function I(k){throw new RangeError(b[k])}function O(k,Q){for(var V=k.length,G=[];V--;)G[V]=Q(k[V]);return G}function M(k,Q){var V=k.split("@"),G="";V.length>1&&(G=V[0]+"@",k=V[1]),k=k.replace(m,".");var $=k.split("."),Y=O($,Q).join(".");return G+Y}function S(k){for(var Q=[],V=0,G=k.length,$,Y;V<G;)$=k.charCodeAt(V++),$>=55296&&$<=56319&&V<G?(Y=k.charCodeAt(V++),(Y&64512)==56320?Q.push((("use strict";1023)<<10)+(Y&1023)+65536):(Q.push($),V--)):Q.push($);return Q}function T(k){return O(k,function(Q){var V="";return Q>65535&&(Q-=65536,V+=B(Q>>>10&1023|55296),Q=56320|Q&1023),V+=B(Q),V}).join("")}function w(k){return k-48<10?k-22:k-65<26?k-65:k-97<26?k-97:l}function C(k,Q){return k+22+75*(k<26)-((Q!=0)<<5)}function U(k,Q,V){var G=0;for(k=V?E(k/f):k>>1,k+=E(k/Q);k>x*A>>1;G+=l)k=E(k/x);return E(G+(x+1)*k/(k+c))}function F(k){var Q=[],V=k.length,G,$=0,Y=p,ie=d,re,le,ue,te,ce,X,q,H,Z;for(re=k.lastIndexOf(g),re<0&&(re=0),le=0;le<re;++le)k.charCodeAt(le)>=128&&I("not-basic"),Q.push(k.charCodeAt(le));for(ue=re>0?re+1:0;ue<V;){for(te=$,ce=1,X=l;ue>=V&&I("invalid-input"),q=w(k.charCodeAt(ue++)),(q>=l||q>E((s-$)/ce))&&I("overflow"),$+=q*ce,H=X<=ie?u:X>=ie+A?A:X-ie,!(q<H);X+=l)Z=l-H,ce>E(s/Z)&&I("overflow"),ce*=Z;G=Q.length+1,ie=U($-te,G,te==0),E($/G)>s-Y&&I("overflow"),Y+=E($/G),$%=G,Q.splice($++,0,Y)}return T(Q)}function D(k){var Q,V,G,$,Y,ie,re,le,ue,te,ce,X=[],q,H,Z,K;for(k=S(k),q=k.length,Q=p,V=0,Y=d,ie=0;ie<q;++ie)ce=k[ie],ce<128&&X.push(B(ce));for(G=$=X.length,"use strict";&X.push(g);G<q;){for(re=s,ie=0;ie<q;++ie)ce=k[ie],ce>=Q&&ce<re&&(re=ce);for(H=G+1,re-Q>E((s-V)/H)&&I("overflow"),V+=(re-Q)*H,Q=re,ie=0;ie<q;++ie)if(ce=k[ie],ce<Q&&++V>s&&I("overflow"),ce==Q){for(le=V,ue=l;te=ue<=Y?u:ue>=Y+A?A:ue-Y,!(le<te);ue+=l)K=le-te,Z=l-te,X.push(B(C(te+K%Z,0))),le=E(K/Z);X.push(B(C(le,0))),Y=U(V,H,G==$),V=0,++G}++V,++Q}return X.join("")}function R(k){return M(k,function(Q){return v.test(Q)?F(Q.slice(4).toLowerCase()):Q})}function L(k){return M(k,function(Q){return y.test(Q)?"xn--"+D(Q):Q})}if(a={version:"1.3.2",ucs2:{decode:S,encode:T},decode:F,encode:D,toASCII:L,toUnicode:R},i&&o)if(t.exports==i)o.exports=a;else for(P in a)a.hasOwnProperty(P)&&(i[P]=a[P]);else e.punycode=a})(Z4)})(ml,ml.exports)),ml.exports}var bA={exports:{}};/*!
|
|
348
348
|
* URI.js - Mutating URLs
|
|
349
349
|
* IPv6 Support
|
|
350
350
|
*
|
|
@@ -356,7 +356,7 @@ ${this.stack.toString()}`),t};function ge(t,n,e,i,o,r,a,s,l,u,A,c,f,d,p,g){this[
|
|
|
356
356
|
* Licensed under
|
|
357
357
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
358
358
|
*
|
|
359
|
-
*/var $
|
|
359
|
+
*/var $4=bA.exports,Pb;function Y4(){return Pb||(Pb=1,(function(t){(function(n,e){t.exports?t.exports=e():n.IPv6=e(n)})($4,function(n){var e=n&&n.IPv6;function i(r){var a=r.toLowerCase(),s=a.split(":"),l=s.length,u=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[l-1]===""&&s[l-2]===""&&s.pop(),l=s.length,s[l-1].indexOf(".")!==-1&&(u=7);var A;for(A=0;A<l&&s[A]!=="";A++);if(A<u)for(s.splice(A,1,"0000");s.length<u;)s.splice(A,0,"0000");for(var c,f=0;f<u;f++){c=s[f].split("");for(var d=0;d<3&&(c[0]==="0"&&c.length>1);d++)c.splice(0,1);s[f]=c.join("")}var p=-1,g=0,v=0,y=-1,m=!1;for(f=0;f<u;f++)m?s[f]==="0"?v+=1:(m=!1,v>g&&(p=y,g=v)):s[f]==="0"&&(m=!0,y=f,v=1);v>g&&(p=y,g=v),g>1&&s.splice(p,g,""),l=s.length;var b="";for(s[0]===""&&(b=":"),f=0;f<l&&(b+=s[f],f!==l-1);f++)b+=":";return s[l-1]===""&&(b+=":"),b}function o(){return n.IPv6===this&&(n.IPv6=e),this}return{best:i,noConflict:o}})})(bA)),bA.exports}var xA={exports:{}};/*!
|
|
360
360
|
* URI.js - Mutating URLs
|
|
361
361
|
* Second Level Domain (SLD) Support
|
|
362
362
|
*
|
|
@@ -368,7 +368,7 @@ ${this.stack.toString()}`),t};function ge(t,n,e,i,o,r,a,s,l,u,A,c,f,d,p,g){this[
|
|
|
368
368
|
* Licensed under
|
|
369
369
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
370
370
|
*
|
|
371
|
-
*/var
|
|
371
|
+
*/var J4=xA.exports,Bb;function eR(){return Bb||(Bb=1,(function(t){(function(n,e){t.exports?t.exports=e():n.SecondLevelDomains=e(n)})(J4,function(n){var e=n&&n.SecondLevelDomains,i={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(o){var r=o.lastIndexOf(".");if(r<=0||r>=o.length-1)return!1;var a=o.lastIndexOf(".",r-1);if(a<=0||a>=r-1)return!1;var s=i.list[o.slice(r+1)];return s?s.indexOf(" "+o.slice(a+1,r)+" ")>=0:!1},is:function(o){var r=o.lastIndexOf(".");if(r<=0||r>=o.length-1)return!1;var a=o.lastIndexOf(".",r-1);if(a>=0)return!1;var s=i.list[o.slice(r+1)];return s?s.indexOf(" "+o.slice(0,r)+" ")>=0:!1},get:function(o){var r=o.lastIndexOf(".");if(r<=0||r>=o.length-1)return null;var a=o.lastIndexOf(".",r-1);if(a<=0||a>=r-1)return null;var s=i.list[o.slice(r+1)];return!s||s.indexOf(" "+o.slice(a+1,r)+" ")<0?null:o.slice(a+1)},noConflict:function(){return n.SecondLevelDomains===this&&(n.SecondLevelDomains=e),this}};return i})})(xA)),xA.exports}/*!
|
|
372
372
|
* URI.js - Mutating URLs
|
|
373
373
|
*
|
|
374
374
|
* Version: 1.19.11
|
|
@@ -379,11 +379,11 @@ ${this.stack.toString()}`),t};function ge(t,n,e,i,o,r,a,s,l,u,A,c,f,d,p,g){this[
|
|
|
379
379
|
* Licensed under
|
|
380
380
|
* MIT License http://www.opensource.org/licenses/mit-license
|
|
381
381
|
*
|
|
382
|
-
*/var t4=wA.exports,Tb;function n4(){return Tb||(Tb=1,(function(t){(function(n,e){t.exports?t.exports=e(XR(),YR(),e4()):n.URI=e(n.punycode,n.IPv6,n.SecondLevelDomains,n)})(t4,function(n,e,i,o){var r=o&&o.URI;function a(w,C){var U=arguments.length>=1,F=arguments.length>=2;if(!(this instanceof a))return U?F?new a(w,C):new a(w):new a;if(w===void 0){if(U)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?w=location.href+"":w=""}if(w===null&&U)throw new TypeError("null is not a valid argument for URI");return this.href(w),C!==void 0?this.absoluteTo(C):this}function s(w){return/^[0-9]+$/.test(w)}a.version="1.19.11";var l=a.prototype,u=Object.prototype.hasOwnProperty;function A(w){return w.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(w){return w===void 0?"Undefined":String(Object.prototype.toString.call(w)).slice(8,-1)}function f(w){return c(w)==="Array"}function d(w,C){var U={},F,D;if(c(C)==="RegExp")U=null;else if(f(C))for(F=0,D=C.length;F<D;F++)U[C[F]]=!0;else U[C]=!0;for(F=0,D=w.length;F<D;F++){var R=U&&U[w[F]]!==void 0||!U&&C.test(w[F]);R&&(w.splice(F,1),D--,F--)}return w}function p(w,C){var U,F;if(f(C)){for(U=0,F=C.length;U<F;U++)if(!p(w,C[U]))return!1;return!0}var D=c(C);for(U=0,F=w.length;U<F;U++)if(D==="RegExp"){if(typeof w[U]=="string"&&w[U].match(C))return!0}else if(w[U]===C)return!0;return!1}function g(w,C){if(!f(w)||!f(C)||w.length!==C.length)return!1;w.sort(),C.sort();for(var U=0,F=w.length;U<F;U++)if(w[U]!==C[U])return!1;return!0}function v(w){var C=/^\/+|\/+$/g;return w.replace(C,"")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(w){if(!(!w||!w.nodeName)){var C=w.nodeName.toLowerCase();if(!(C==="input"&&w.type!=="image"))return a.domAttributes[C]}};function y(w){return escape(w)}function m(w){return encodeURIComponent(w).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}a.encode=m,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=m,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(w,C){var U=a.encode(w+"");return C===void 0&&(C=a.escapeQuerySpace),C?U.replace(/%20/g,"+"):U},a.decodeQuery=function(w,C){w+="",C===void 0&&(C=a.escapeQuerySpace);try{return a.decode(C?w.replace(/\+/g,"%20"):w)}catch{return w}};var b={encode:"encode",decode:"decode"},x,E=function(w,C){return function(U){try{return a[C](U+"").replace(a.characters[w][C].expression,function(F){return a.characters[w][C].map[F]})}catch{return U}}};for(x in b)a[x+"PathSegment"]=E("pathname",b[x]),a[x+"UrnPathSegment"]=E("urnpath",b[x]);var B=function(w,C,U){return function(F){var D;U?D=function(Q){return a[C](a[U](Q))}:D=a[C];for(var R=(F+"").split(w),L=0,k=R.length;L<k;L++)R[L]=D(R[L]);return R.join(w)}};a.decodePath=B("/","decodePathSegment"),a.decodeUrnPath=B(":","decodeUrnPathSegment"),a.recodePath=B("/","encodePathSegment","decode"),a.recodeUrnPath=B(":","encodeUrnPathSegment","decode"),a.encodeReserved=E("reserved","encode"),a.parse=function(w,C){var U;return C||(C={preventInvalidHostname:a.preventInvalidHostname}),w=w.replace(a.leading_whitespace_expression,""),w=w.replace(a.ascii_tab_whitespace,""),U=w.indexOf("#"),U>-1&&(C.fragment=w.substring(U+1)||null,w=w.substring(0,U)),U=w.indexOf("?"),U>-1&&(C.query=w.substring(U+1)||null,w=w.substring(0,U)),w=w.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),w=w.replace(/^[/\\]{2,}/i,"//"),w.substring(0,2)==="//"?(C.protocol=null,w=w.substring(2),w=a.parseAuthority(w,C)):(U=w.indexOf(":"),U>-1&&(C.protocol=w.substring(0,U)||null,C.protocol&&!C.protocol.match(a.protocol_expression)?C.protocol=void 0:w.substring(U+1,U+3).replace(/\\/g,"/")==="//"?(w=w.substring(U+3),w=a.parseAuthority(w,C)):(w=w.substring(U+1),C.urn=!0))),C.path=w,C},a.parseHost=function(w,C){w||(w=""),w=w.replace(/\\/g,"/");var U=w.indexOf("/"),F,D;if(U===-1&&(U=w.length),w.charAt(0)==="[")F=w.indexOf("]"),C.hostname=w.substring(1,F)||null,C.port=w.substring(F+2,U)||null,C.port==="/"&&(C.port=null);else{var R=w.indexOf(":"),L=w.indexOf("/"),k=w.indexOf(":",R+1);k!==-1&&(L===-1||k<L)?(C.hostname=w.substring(0,U)||null,C.port=null):(D=w.substring(0,U).split(":"),C.hostname=D[0]||null,C.port=D[1]||null)}return C.hostname&&w.substring(U).charAt(0)!=="/"&&(U++,w="/"+w),C.preventInvalidHostname&&a.ensureValidHostname(C.hostname,C.protocol),C.port&&a.ensureValidPort(C.port),w.substring(U)||"/"},a.parseAuthority=function(w,C){return w=a.parseUserinfo(w,C),a.parseHost(w,C)},a.parseUserinfo=function(w,C){var U=w,F=w.indexOf("\\");F!==-1&&(w=w.replace(/\\/g,"/"));var D=w.indexOf("/"),R=w.lastIndexOf("@",D>-1?D:w.length-1),L;return R>-1&&(D===-1||R<D)?(L=w.substring(0,R).split(":"),C.username=L[0]?a.decode(L[0]):null,L.shift(),C.password=L[0]?a.decode(L.join(":")):null,w=U.substring(R+1)):(C.username=null,C.password=null),w},a.parseQuery=function(w,C){if(!w)return{};if(w=w.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!w)return{};for(var U={},F=w.split("&"),D=F.length,R,L,k,Q=0;Q<D;Q++)R=F[Q].split("="),L=a.decodeQuery(R.shift(),C),k=R.length?a.decodeQuery(R.join("="),C):null,L!=="__proto__"&&(u.call(U,L)?((typeof U[L]=="string"||U[L]===null)&&(U[L]=[U[L]]),U[L].push(k)):U[L]=k);return U},a.build=function(w){var C="",U=!1;return w.protocol&&(C+=w.protocol+":"),!w.urn&&(C||w.hostname)&&(C+="//",U=!0),C+=a.buildAuthority(w)||"",typeof w.path=="string"&&(w.path.charAt(0)!=="/"&&U&&(C+="/"),C+=w.path),typeof w.query=="string"&&w.query&&(C+="?"+w.query),typeof w.fragment=="string"&&w.fragment&&(C+="#"+w.fragment),C},a.buildHost=function(w){var C="";if(w.hostname)a.ip6_expression.test(w.hostname)?C+="["+w.hostname+"]":C+=w.hostname;else return"";return w.port&&(C+=":"+w.port),C},a.buildAuthority=function(w){return a.buildUserinfo(w)+a.buildHost(w)},a.buildUserinfo=function(w){var C="";return w.username&&(C+=a.encode(w.username)),w.password&&(C+=":"+a.encode(w.password)),C&&(C+="@"),C},a.buildQuery=function(w,C,U){var F="",D,R,L,k;for(R in w)if(R!=="__proto__"&&u.call(w,R))if(f(w[R]))for(D={},L=0,k=w[R].length;L<k;L++)w[R][L]!==void 0&&D[w[R][L]+""]===void 0&&(F+="&"+a.buildQueryParameter(R,w[R][L],U),C!==!0&&(D[w[R][L]+""]=!0));else w[R]!==void 0&&(F+="&"+a.buildQueryParameter(R,w[R],U));return F.substring(1)},a.buildQueryParameter=function(w,C,U){return a.encodeQuery(w,U)+(C!==null?"="+a.encodeQuery(C,U):"")},a.addQuery=function(w,C,U){if(typeof C=="object")for(var F in C)u.call(C,F)&&a.addQuery(w,F,C[F]);else if(typeof C=="string"){if(w[C]===void 0){w[C]=U;return}else typeof w[C]=="string"&&(w[C]=[w[C]]);f(U)||(U=[U]),w[C]=(w[C]||[]).concat(U)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(w,C,U){if(typeof C=="object")for(var F in C)u.call(C,F)&&a.setQuery(w,F,C[F]);else if(typeof C=="string")w[C]=U===void 0?null:U;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(w,C,U){var F,D,R;if(f(C))for(F=0,D=C.length;F<D;F++)w[C[F]]=void 0;else if(c(C)==="RegExp")for(R in w)C.test(R)&&(w[R]=void 0);else if(typeof C=="object")for(R in C)u.call(C,R)&&a.removeQuery(w,R,C[R]);else if(typeof C=="string")U!==void 0?c(U)==="RegExp"?!f(w[C])&&U.test(w[C])?w[C]=void 0:w[C]=d(w[C],U):w[C]===String(U)&&(!f(U)||U.length===1)?w[C]=void 0:f(w[C])&&(w[C]=d(w[C],U)):w[C]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(w,C,U,F){switch(c(C)){case"String":break;case"RegExp":for(var D in w)if(u.call(w,D)&&C.test(D)&&(U===void 0||a.hasQuery(w,D,U)))return!0;return!1;case"Object":for(var R in C)if(u.call(C,R)&&!a.hasQuery(w,R,C[R]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(U)){case"Undefined":return C in w;case"Boolean":var L=!!(f(w[C])?w[C].length:w[C]);return U===L;case"Function":return!!U(w[C],C,w);case"Array":if(!f(w[C]))return!1;var k=F?p:g;return k(w[C],U);case"RegExp":return f(w[C])?F?p(w[C],U):!1:!!(w[C]&&w[C].match(U));case"Number":U=String(U);case"String":return f(w[C])?F?p(w[C],U):!1:w[C]===U;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var w=[],C=[],U=0,F=0;F<arguments.length;F++){var D=new a(arguments[F]);w.push(D);for(var R=D.segment(),L=0;L<R.length;L++)typeof R[L]=="string"&&C.push(R[L]),R[L]&&U++}if(!C.length||!U)return new a("");var k=new a("").segment(C);return(w[0].path()===""||w[0].path().slice(0,1)==="/")&&k.path("/"+k.path()),k.normalize()},a.commonPath=function(w,C){var U=Math.min(w.length,C.length),F;for(F=0;F<U;F++)if(w.charAt(F)!==C.charAt(F)){F--;break}return F<1?w.charAt(0)===C.charAt(0)&&w.charAt(0)==="/"?"/":"":((w.charAt(F)!=="/"||C.charAt(F)!=="/")&&(F=w.substring(0,F).lastIndexOf("/")),w.substring(0,F+1))},a.withinString=function(w,C,U){U||(U={});var F=U.start||a.findUri.start,D=U.end||a.findUri.end,R=U.trim||a.findUri.trim,L=U.parens||a.findUri.parens,k=/[a-z0-9-]=["']?$/i;for(F.lastIndex=0;;){var Q=F.exec(w);if(!Q)break;var V=Q.index;if(U.ignoreHtml){var G=w.slice(Math.max(V-3,0),V);if(G&&k.test(G))continue}for(var $=V+w.slice(V).search(D),Y=w.slice(V,$),ie=-1;;){var re=L.exec(Y);if(!re)break;var le=re.index+re[0].length;ie=Math.max(ie,le)}if(ie>-1?Y=Y.slice(0,ie)+Y.slice(ie).replace(R,""):Y=Y.replace(R,""),!(Y.length<=Q[0].length)&&!(U.ignore&&U.ignore.test(Y))){$=V+Y.length;var ue=C(Y,V,$,w);if(ue===void 0){F.lastIndex=$;continue}ue=String(ue),w=w.slice(0,V)+ue+w.slice($),F.lastIndex=V+ue.length}}return F.lastIndex=0,w},a.ensureValidHostname=function(w,C){var U=!!w,F=!!C,D=!1;if(F&&(D=p(a.hostProtocols,C)),D&&!U)throw new TypeError("Hostname cannot be empty, if protocol is "+C);if(w&&w.match(a.invalid_hostname_characters)){if(!n)throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(n.toASCII(w).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(w){if(w){var C=Number(w);if(!(s(C)&&C>0&&C<65536))throw new TypeError('Port "'+w+'" is not a valid port')}},a.noConflict=function(w){if(w){var C={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(C.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(C.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(C.SecondLevelDomains=o.SecondLevelDomains.noConflict()),C}else o.URI===this&&(o.URI=r);return this},l.build=function(w){return w===!0?this._deferred_build=!0:(w===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new a(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function P(w){return function(C,U){return C===void 0?this._parts[w]||"":(this._parts[w]=C||null,this.build(!U),this)}}function I(w,C){return function(U,F){return U===void 0?this._parts[w]||"":(U!==null&&(U=U+"",U.charAt(0)===C&&(U=U.substring(1))),this._parts[w]=U,this.build(!F),this)}}l.protocol=P("protocol"),l.username=P("username"),l.password=P("password"),l.hostname=P("hostname"),l.port=P("port"),l.query=I("query","?"),l.fragment=I("fragment","#"),l.search=function(w,C){var U=this.query(w,C);return typeof U=="string"&&U.length?"?"+U:U},l.hash=function(w,C){var U=this.fragment(w,C);return typeof U=="string"&&U.length?"#"+U:U},l.pathname=function(w,C){if(w===void 0||w===!0){var U=this._parts.path||(this._parts.hostname?"/":"");return w?(this._parts.urn?a.decodeUrnPath:a.decodePath)(U):U}else return this._parts.urn?this._parts.path=w?a.recodeUrnPath(w):"":this._parts.path=w?a.recodePath(w):"/",this.build(!C),this},l.path=l.pathname,l.href=function(w,C){var U;if(w===void 0)return this.toString();this._string="",this._parts=a._parts();var F=w instanceof a,D=typeof w=="object"&&(w.hostname||w.path||w.pathname);if(w.nodeName){var R=a.getDomAttribute(w);w=w[R]||"",D=!1}if(!F&&D&&w.pathname!==void 0&&(w=w.toString()),typeof w=="string"||w instanceof String)this._parts=a.parse(String(w),this._parts);else if(F||D){var L=F?w._parts:w;for(U in L)U!=="query"&&u.call(this._parts,U)&&(this._parts[U]=L[U]);L.query&&this.query(L.query,!1)}else throw new TypeError("invalid input");return this.build(!C),this},l.is=function(w){var C=!1,U=!1,F=!1,D=!1,R=!1,L=!1,k=!1,Q=!this._parts.urn;switch(this._parts.hostname&&(Q=!1,U=a.ip4_expression.test(this._parts.hostname),F=a.ip6_expression.test(this._parts.hostname),C=U||F,D=!C,R=D&&i&&i.has(this._parts.hostname),L=D&&a.idn_expression.test(this._parts.hostname),k=D&&a.punycode_expression.test(this._parts.hostname)),w.toLowerCase()){case"relative":return Q;case"absolute":return!Q;case"domain":case"name":return D;case"sld":return R;case"ip":return C;case"ip4":case"ipv4":case"inet4":return U;case"ip6":case"ipv6":case"inet6":return F;case"idn":return L;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return k}return null};var O=l.protocol,M=l.port,S=l.hostname;l.protocol=function(w,C){if(w&&(w=w.replace(/:(\/\/)?$/,""),!w.match(a.protocol_expression)))throw new TypeError('Protocol "'+w+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return O.call(this,w,C)},l.scheme=l.protocol,l.port=function(w,C){return this._parts.urn?w===void 0?"":this:(w!==void 0&&(w===0&&(w=null),w&&(w+="",w.charAt(0)===":"&&(w=w.substring(1)),a.ensureValidPort(w))),M.call(this,w,C))},l.hostname=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w!==void 0){var U={preventInvalidHostname:this._parts.preventInvalidHostname},F=a.parseHost(w,U);if(F!=="/")throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-]');w=U.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(w,this._parts.protocol)}return S.call(this,w,C)},l.origin=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0){var U=this.protocol(),F=this.authority();return F?(U?U+"://":"")+this.authority():""}else{var D=a(w);return this.protocol(D.protocol()).authority(D.authority()).build(!C),this}},l.host=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var U=a.parseHost(w,this._parts);if(U!=="/")throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-]');return this.build(!C),this},l.authority=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var U=a.parseAuthority(w,this._parts);if(U!=="/")throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-]');return this.build(!C),this},l.userinfo=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0){var U=a.buildUserinfo(this._parts);return U&&U.substring(0,U.length-1)}else return w[w.length-1]!=="@"&&(w+="@"),a.parseUserinfo(w,this._parts),this.build(!C),this},l.resource=function(w,C){var U;return w===void 0?this.path()+this.search()+this.hash():(U=a.parse(w),this._parts.path=U.path,this._parts.query=U.query,this._parts.fragment=U.fragment,this.build(!C),this)},l.subdomain=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0){if(!this._parts.hostname||this.is("IP"))return"";var U=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,U)||""}else{var F=this._parts.hostname.length-this.domain().length,D=this._parts.hostname.substring(0,F),R=new RegExp("^"+A(D));if(w&&w.charAt(w.length-1)!=="."&&(w+="."),w.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return w&&a.ensureValidHostname(w,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(R,w),this.build(!C),this}},l.domain=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(typeof w=="boolean"&&(C=w,w=void 0),w===void 0){if(!this._parts.hostname||this.is("IP"))return"";var U=this._parts.hostname.match(/\./g);if(U&&U.length<2)return this._parts.hostname;var F=this._parts.hostname.length-this.tld(C).length-1;return F=this._parts.hostname.lastIndexOf(".",F-1)+1,this._parts.hostname.substring(F)||""}else{if(!w)throw new TypeError("cannot set domain empty");if(w.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(w,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=w;else{var D=new RegExp(A(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(D,w)}return this.build(!C),this}},l.tld=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(typeof w=="boolean"&&(C=w,w=void 0),w===void 0){if(!this._parts.hostname||this.is("IP"))return"";var U=this._parts.hostname.lastIndexOf("."),F=this._parts.hostname.substring(U+1);return C!==!0&&i&&i.list[F.toLowerCase()]&&i.get(this._parts.hostname)||F}else{var D;if(w)if(w.match(/[^a-zA-Z0-9-]/))if(i&&i.is(w))D=new RegExp(A(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(D,w);else throw new TypeError('TLD "'+w+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");D=new RegExp(A(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(D,w)}else throw new TypeError("cannot set TLD empty");return this.build(!C),this}},l.directory=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0||w===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var U=this._parts.path.length-this.filename().length-1,F=this._parts.path.substring(0,U)||(this._parts.hostname?"/":"");return w?a.decodePath(F):F}else{var D=this._parts.path.length-this.filename().length,R=this._parts.path.substring(0,D),L=new RegExp("^"+A(R));return this.is("relative")||(w||(w="/"),w.charAt(0)!=="/"&&(w="/"+w)),w&&w.charAt(w.length-1)!=="/"&&(w+="/"),w=a.recodePath(w),this._parts.path=this._parts.path.replace(L,w),this.build(!C),this}},l.filename=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(typeof w!="string"){if(!this._parts.path||this._parts.path==="/")return"";var U=this._parts.path.lastIndexOf("/"),F=this._parts.path.substring(U+1);return w?a.decodePathSegment(F):F}else{var D=!1;w.charAt(0)==="/"&&(w=w.substring(1)),w.match(/\.?\//)&&(D=!0);var R=new RegExp(A(this.filename())+"$");return w=a.recodePath(w),this._parts.path=this._parts.path.replace(R,w),D?this.normalizePath(C):this.build(!C),this}},l.suffix=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0||w===!0){if(!this._parts.path||this._parts.path==="/")return"";var U=this.filename(),F=U.lastIndexOf("."),D,R;return F===-1?"":(D=U.substring(F+1),R=/^[a-z0-9%]+$/i.test(D)?D:"",w?a.decodePathSegment(R):R)}else{w.charAt(0)==="."&&(w=w.substring(1));var L=this.suffix(),k;if(L)w?k=new RegExp(A(L)+"$"):k=new RegExp(A("."+L)+"$");else{if(!w)return this;this._parts.path+="."+a.recodePath(w)}return k&&(w=a.recodePath(w),this._parts.path=this._parts.path.replace(k,w)),this.build(!C),this}},l.segment=function(w,C,U){var F=this._parts.urn?":":"/",D=this.path(),R=D.substring(0,1)==="/",L=D.split(F);if(w!==void 0&&typeof w!="number"&&(U=C,C=w,w=void 0),w!==void 0&&typeof w!="number")throw new Error('Bad segment "'+w+'", must be 0-based integer');if(R&&L.shift(),w<0&&(w=Math.max(L.length+w,0)),C===void 0)return w===void 0?L:L[w];if(w===null||L[w]===void 0)if(f(C)){L=[];for(var k=0,Q=C.length;k<Q;k++)!C[k].length&&(!L.length||!L[L.length-1].length)||(L.length&&!L[L.length-1].length&&L.pop(),L.push(v(C[k])))}else(C||typeof C=="string")&&(C=v(C),L[L.length-1]===""?L[L.length-1]=C:L.push(C));else C?L[w]=v(C):L.splice(w,1);return R&&L.unshift(""),this.path(L.join(F),U)},l.segmentCoded=function(w,C,U){var F,D,R;if(typeof w!="number"&&(U=C,C=w,w=void 0),C===void 0){if(F=this.segment(w,C,U),!f(F))F=F!==void 0?a.decode(F):void 0;else for(D=0,R=F.length;D<R;D++)F[D]=a.decode(F[D]);return F}if(!f(C))C=typeof C=="string"||C instanceof String?a.encode(C):C;else for(D=0,R=C.length;D<R;D++)C[D]=a.encode(C[D]);return this.segment(w,C,U)};var T=l.query;return l.query=function(w,C){if(w===!0)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof w=="function"){var U=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),F=w.call(this,U);return this._parts.query=a.buildQuery(F||U,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!C),this}else return w!==void 0&&typeof w!="string"?(this._parts.query=a.buildQuery(w,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!C),this):T.call(this,w,C)},l.setQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof w=="string"||w instanceof String)F[w]=C!==void 0?C:null;else if(typeof w=="object")for(var D in w)u.call(w,D)&&(F[D]=w[D]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(F,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof w!="string"&&(U=C),this.build(!U),this},l.addQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(F,w,C===void 0?null:C),this._parts.query=a.buildQuery(F,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof w!="string"&&(U=C),this.build(!U),this},l.removeQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(F,w,C),this._parts.query=a.buildQuery(F,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof w!="string"&&(U=C),this.build(!U),this},l.hasQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(F,w,C,U)},l.setSearch=l.setQuery,l.addSearch=l.addQuery,l.removeSearch=l.removeQuery,l.hasSearch=l.hasQuery,l.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},l.normalizeProtocol=function(w){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!w)),this},l.normalizeHostname=function(w){return this._parts.hostname&&(this.is("IDN")&&n?this._parts.hostname=n.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!w)),this},l.normalizePort=function(w){return typeof this._parts.protocol=="string"&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!w)),this},l.normalizePath=function(w){var C=this._parts.path;if(!C)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!w),this;if(this._parts.path==="/")return this;C=a.recodePath(C);var U,F="",D,R;for(C.charAt(0)!=="/"&&(U=!0,C="/"+C),(C.slice(-3)==="/.."||C.slice(-2)==="/.")&&(C+="/"),C=C.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),U&&(F=C.substring(1).match(/^(\.\.\/)+/)||"",F&&(F=F[0]));D=C.search(/\/\.\.(\/|$)/),D!==-1;){if(D===0){C=C.substring(3);continue}R=C.substring(0,D).lastIndexOf("/"),R===-1&&(R=D),C=C.substring(0,R)+C.substring(D+3)}return U&&this.is("relative")&&(C=F+C.substring(1)),this._parts.path=C,this.build(!w),this},l.normalizePathname=l.normalizePath,l.normalizeQuery=function(w){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!w)),this},l.normalizeFragment=function(w){return this._parts.fragment||(this._parts.fragment=null,this.build(!w)),this},l.normalizeSearch=l.normalizeQuery,l.normalizeHash=l.normalizeFragment,l.iso8859=function(){var w=a.encode,C=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=w,a.decode=C}return this},l.unicode=function(){var w=a.encode,C=a.decode;a.encode=m,a.decode=unescape;try{this.normalize()}finally{a.encode=w,a.decode=C}return this},l.readable=function(){var w=this.clone();w.username("").password("").normalize();var C="";if(w._parts.protocol&&(C+=w._parts.protocol+"://"),w._parts.hostname&&(w.is("punycode")&&n?(C+=n.toUnicode(w._parts.hostname),w._parts.port&&(C+=":"+w._parts.port)):C+=w.host()),w._parts.hostname&&w._parts.path&&w._parts.path.charAt(0)!=="/"&&(C+="/"),C+=w.path(!0),w._parts.query){for(var U="",F=0,D=w._parts.query.split("&"),R=D.length;F<R;F++){var L=(D[F]||"").split("=");U+="&"+a.decodeQuery(L[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),L[1]!==void 0&&(U+="="+a.decodeQuery(L[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}C+="?"+U.substring(1)}return C+=a.decodeQuery(w.hash(),!0),C},l.absoluteTo=function(w){var C=this.clone(),U=["protocol","username","password","hostname","port"],F,D,R;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(w instanceof a||(w=new a(w)),C._parts.protocol||(C._parts.protocol=w._parts.protocol,this._parts.hostname))return C;for(D=0;R=U[D];D++)C._parts[R]=w._parts[R];return C._parts.path?(C._parts.path.substring(-2)===".."&&(C._parts.path+="/"),C.path().charAt(0)!=="/"&&(F=w.directory(),F=F||(w.path().indexOf("/")===0?"/":""),C._parts.path=(F?F+"/":"")+C._parts.path,C.normalizePath())):(C._parts.path=w._parts.path,C._parts.query||(C._parts.query=w._parts.query)),C.build(),C},l.relativeTo=function(w){var C=this.clone().normalize(),U,F,D,R,L;if(C._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(w=new a(w).normalize(),U=C._parts,F=w._parts,R=C.path(),L=w.path(),R.charAt(0)!=="/")throw new Error("URI is already relative");if(L.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(U.protocol===F.protocol&&(U.protocol=null),U.username!==F.username||U.password!==F.password||U.protocol!==null||U.username!==null||U.password!==null)return C.build();if(U.hostname===F.hostname&&U.port===F.port)U.hostname=null,U.port=null;else return C.build();if(R===L)return U.path="",C.build();if(D=a.commonPath(R,L),!D)return C.build();var k=F.path.substring(D.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return U.path=k+U.path.substring(D.length)||"./",C.build()},l.equals=function(w){var C=this.clone(),U=new a(w),F={},D={},R={},L,k,Q;if(C.normalize(),U.normalize(),C.toString()===U.toString())return!0;if(L=C.query(),k=U.query(),C.query(""),U.query(""),C.toString()!==U.toString()||L.length!==k.length)return!1;F=a.parseQuery(L,this._parts.escapeQuerySpace),D=a.parseQuery(k,this._parts.escapeQuerySpace);for(Q in F)if(u.call(F,Q)){if(f(F[Q])){if(!g(F[Q],D[Q]))return!1}else if(F[Q]!==D[Q])return!1;R[Q]=!0}for(Q in D)if(u.call(D,Q)&&!R[Q])return!1;return!0},l.preventInvalidHostname=function(w){return this._parts.preventInvalidHostname=!!w,this},l.duplicateQueryParameters=function(w){return this._parts.duplicateQueryParameters=!!w,this},l.escapeQuerySpace=function(w){return this._parts.escapeQuerySpace=!!w,this},a})})(wA)),wA.exports}var i4=n4();const Wi=Al(i4);function r4(t){return(t.length===0||t[t.length-1]!=="/")&&(t=`${t}/`),t}function Ls(t,n){if(t===null||typeof t!="object")return t;n=n??!1;const e=new t.constructor;for(const i in t)if(t.hasOwnProperty(i)){let o=t[i];n&&(o=Ls(o,n)),e[i]=o}return e}function Or(t,n,e){e=e??!1;const i={},o=ne(t),r=ne(n);let a,s,l;if(o)for(a in t)t.hasOwnProperty(a)&&(s=t[a],r&&e&&typeof s=="object"&&n.hasOwnProperty(a)?(l=n[a],typeof l=="object"?i[a]=Or(s,l,e):i[a]=s):i[a]=s);if(r)for(a in n)n.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(l=n[a],i[a]=l);return i}function gl(){let t,n;const e=new Promise(function(i,o){t=i,n=o});return{resolve:t,reject:n,promise:e}}function yl(t,n){let e;return typeof document<"u"&&(e=document),yl._implementation(t,n,e)}yl._implementation=function(t,n,e){if(!ne(t))throw new pe("relative uri is required.");if(!ne(n)){if(typeof e>"u")return t;n=e.baseURI??e.location.href}const i=new Wi(t);return i.scheme()!==""?i.toString():i.absoluteTo(n).toString()};function o4(t,n){if(!ne(t))throw new pe("uri is required.");let e="";const i=t.lastIndexOf("/");return i!==-1&&(e=t.substring(0,i+1)),n&&(t=new Wi(t),t.query().length!==0&&(e+=`?${t.query()}`),t.fragment().length!==0&&(e+=`#${t.fragment()}`)),e}function s4(t){if(!ne(t))throw new pe("uri is required.");const n=new Wi(t);n.normalize();let e=n.path(),i=e.lastIndexOf("/");return i!==-1&&(e=e.substr(i+1)),i=e.lastIndexOf("."),i===-1?e="":e=e.substr(i+1),e}const Ib={};function Fb(t,n,e){ne(n)||(n=t.width),ne(e)||(e=t.height);let i=Ib[n];ne(i)||(i={},Ib[n]=i);let o=i[e];if(!ne(o)){const r=document.createElement("canvas");r.width=n,r.height=e,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[e]=o}return o.drawImage(t,0,0,n,e),o.getImageData(0,0,n,e).data}const a4=/^blob:/i;function Mb(t){return N.typeOf.string("uri",t),a4.test(t)}let yi;function Td(t){ne(yi)||(yi=document.createElement("a")),yi.href=window.location.href;const n=yi.host,e=yi.protocol;return yi.href=t,yi.href=yi.href,e!==yi.protocol||n!==yi.host}const l4=/^data:/i;function Db(t){return N.typeOf.string("uri",t),l4.test(t)}function u4(t){const n=document.createElement("script");return n.async=!0,n.src=t,new Promise((e,i)=>{window.crossOriginIsolated&&n.setAttribute("crossorigin","anonymous");const o=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,o.removeChild(n),e()},n.onerror=function(r){i(r)},o.appendChild(n)})}function c4(t){if(!ne(t))throw new pe("obj is required.");let n="";for(const e in t)if(t.hasOwnProperty(e)){const i=t[e],o=`${encodeURIComponent(e)}=`;if(Array.isArray(i))for(let r=0,a=i.length;r<a;++r)n+=`${o+encodeURIComponent(i[r])}&`;else n+=`${o+encodeURIComponent(i)}&`}return n=n.slice(0,-1),n}function h4(t){if(!ne(t))throw new pe("queryString is required.");const n={};if(t==="")return n;const e=t.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=e.length;i<o;++i){const r=e[i].split("="),a=decodeURIComponent(r[0]);let s=r[1];ne(s)?s=decodeURIComponent(s):s="";const l=n[a];typeof l=="string"?n[a]=[l,s]:Array.isArray(l)?l.push(s):n[a]=s}return n}const vt=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),A4=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});function _A(t){t=t??gi.EMPTY_OBJECT;const n=t.throttleByServer??!1,e=t.throttle??!1;this.url=t.url,this.requestFunction=t.requestFunction,this.cancelFunction=t.cancelFunction,this.priorityFunction=t.priorityFunction,this.priority=t.priority??0,this.throttle=e,this.throttleByServer=n,this.type=t.type??A4.OTHER,this.serverKey=t.serverKey,this.state=vt.UNISSUED,this.deferred=void 0,this.cancelled=!1}_A.prototype.cancel=function(){this.cancelled=!0},_A.prototype.clone=function(t){return ne(t)?(t.url=this.url,t.requestFunction=this.requestFunction,t.cancelFunction=this.cancelFunction,t.priorityFunction=this.priorityFunction,t.priority=this.priority,t.throttle=this.throttle,t.throttleByServer=this.throttleByServer,t.type=this.type,t.serverKey=this.serverKey,t.state=vt.UNISSUED,t.deferred=void 0,t.cancelled=!1,t):new _A(this)};function f4(t){const n={};if(!t)return n;const e=t.split(`\r
|
|
383
|
-
`);for(let i=0;i<e.length;++i){const o=e[i],r=o.indexOf(": ");if(r>0){const a=o.substring(0,r),s=o.substring(r+2);n[a]=s}}return n}function vl(t,n,e){this.statusCode=t,this.response=n,this.responseHeaders=e,typeof this.responseHeaders=="string"&&(this.responseHeaders=f4(this.responseHeaders))}vl.prototype.toString=function(){let t="Request has failed.";return ne(this.statusCode)&&(t+=` Status Code: ${this.statusCode}`),t};function zs(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(zs.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),zs.prototype.addEventListener=function(t,n){N.typeOf.func("listener",t),this._listeners.push(t),this._scopes.push(n);const e=this;return function(){e.removeEventListener(t,n)}},zs.prototype.removeEventListener=function(t,n){N.typeOf.func("listener",t);const e=this._listeners,i=this._scopes;let o=-1;for(let r=0;r<e.length;r++)if(e[r]===t&&i[r]===n){o=r;break}return o!==-1?(this._insideRaiseEvent?(this._toRemove.push(o),e[o]=void 0,i[o]=void 0):(e.splice(o,1),i.splice(o,1)),!0):!1};function p4(t,n){return n-t}zs.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let t;const n=this._listeners,e=this._scopes;let i=n.length;for(t=0;t<i;t++){const r=n[t];ne(r)&&n[t].apply(e[t],arguments)}const o=this._toRemove;if(i=o.length,i>0){for(o.sort(p4),t=0;t<i;t++){const r=o[t];n.splice(r,1),e.splice(r,1)}o.length=0}this._insideRaiseEvent=!1};function Bo(t){N.typeOf.object("options",t),N.defined("options.comparator",t.comparator),this._comparator=t.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(Bo.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(t){N.typeOf.number.greaterThanOrEquals("maximumLength",t,0);const n=this._length;if(t<n){const e=this._array;for(let i=t;i<n;++i)e[i]=void 0;this._length=t,e.length=t}this._maximumLength=t}},comparator:{get:function(){return this._comparator}}});function Id(t,n,e){const i=t[n];t[n]=t[e],t[e]=i}Bo.prototype.reserve=function(t){t=t??this._length,this._array.length=t},Bo.prototype.heapify=function(t){t=t??0;const n=this._length,e=this._comparator,i=this._array;let o=-1,r=!0;for(;r;){const a=2*(t+1),s=a-1;s<n&&e(i[s],i[t])<0?o=s:o=t,a<n&&e(i[a],i[o])<0&&(o=a),o!==t?(Id(i,o,t),t=o):r=!1}},Bo.prototype.resort=function(){const t=this._length;for(let n=Math.ceil(t/2);n>=0;--n)this.heapify(n)},Bo.prototype.insert=function(t){N.defined("element",t);const n=this._array,e=this._comparator,i=this._maximumLength;let o=this._length++;for(o<n.length?n[o]=t:n.push(t);o!==0;){const a=Math.floor((o-1)/2);if(e(n[o],n[a])<0)Id(n,o,a),o=a;else break}let r;return ne(i)&&this._length>i&&(r=n[i],this._length=i),r},Bo.prototype.pop=function(t){if(t=t??0,this._length===0)return;N.typeOf.number.lessThan("index",t,this._length);const n=this._array,e=n[t];return Id(n,t,--this._length),this.heapify(t),n[this._length]=void 0,e};function d4(t,n){return t.priority-n.priority}const qe={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let ks=20;const Yt=new Bo({comparator:d4});Yt.maximumLength=ks,Yt.reserve(ks);const vi=[];let ji={};const m4=typeof document<"u"?new Wi(document.location.href):new Wi,CA=new zs;function it(){}it.maximumRequests=50,it.maximumRequestsPerServer=18,it.requestsByServer={},it.throttleRequests=!0,it.debugShowStatistics=!1,it.requestCompletedEvent=CA,Object.defineProperties(it,{statistics:{get:function(){return qe}},priorityHeapLength:{get:function(){return ks},set:function(t){if(t<ks)for(;Yt.length>t;){const n=Yt.pop();To(n)}ks=t,Yt.maximumLength=t,Yt.reserve(t)}}});function Rb(t){ne(t.priorityFunction)&&(t.priority=t.priorityFunction())}it.serverHasOpenSlots=function(t,n){n=n??1;const e=it.requestsByServer[t]??it.maximumRequestsPerServer;return ji[t]+n<=e},it.heapHasOpenSlots=function(t){return Yt.length+t<=ks};function Ub(t){return t.state===vt.UNISSUED&&(t.state=vt.ISSUED,t.deferred=gl()),t.deferred.promise}function g4(t){return function(n){if(t.state===vt.CANCELLED)return;const e=t.deferred;--qe.numberOfActiveRequests,--ji[t.serverKey],CA.raiseEvent(),t.state=vt.RECEIVED,t.deferred=void 0,e.resolve(n)}}function y4(t){return function(n){t.state!==vt.CANCELLED&&(++qe.numberOfFailedRequests,--qe.numberOfActiveRequests,--ji[t.serverKey],CA.raiseEvent(n),t.state=vt.FAILED,t.deferred.reject(n))}}function Ob(t){const n=Ub(t);return t.state=vt.ACTIVE,vi.push(t),++qe.numberOfActiveRequests,++qe.numberOfActiveRequestsEver,++ji[t.serverKey],t.requestFunction().then(g4(t)).catch(y4(t)),n}function To(t){const n=t.state===vt.ACTIVE;if(t.state=vt.CANCELLED,++qe.numberOfCancelledRequests,ne(t.deferred)){const e=t.deferred;t.deferred=void 0,e.reject()}n&&(--qe.numberOfActiveRequests,--ji[t.serverKey],++qe.numberOfCancelledActiveRequests),ne(t.cancelFunction)&&t.cancelFunction()}it.update=function(){let t,n,e=0;const i=vi.length;for(t=0;t<i;++t){if(n=vi[t],n.cancelled&&To(n),n.state!==vt.ACTIVE){++e;continue}e>0&&(vi[t-e]=n)}vi.length-=e;const o=Yt.internalArray,r=Yt.length;for(t=0;t<r;++t)Rb(o[t]);Yt.resort();const a=Math.max(it.maximumRequests-vi.length,0);let s=0;for(;s<a&&Yt.length>0;){if(n=Yt.pop(),n.cancelled){To(n);continue}if(n.throttleByServer&&!it.serverHasOpenSlots(n.serverKey)){To(n);continue}Ob(n),++s}v4()},it.getServerKey=function(t){N.typeOf.string("url",t);let n=new Wi(t);n.scheme()===""&&(n=n.absoluteTo(m4),n.normalize());let e=n.authority();/:/.test(e)||(e=`${e}:${n.scheme()==="https"?"443":"80"}`);const i=ji[e];return ne(i)||(ji[e]=0),e},it.request=function(t){if(N.typeOf.object("request",t),N.typeOf.string("request.url",t.url),N.typeOf.func("request.requestFunction",t.requestFunction),Db(t.url)||Mb(t.url))return CA.raiseEvent(),t.state=vt.RECEIVED,t.requestFunction();if(++qe.numberOfAttemptedRequests,ne(t.serverKey)||(t.serverKey=it.getServerKey(t.url)),it.throttleRequests&&t.throttleByServer&&!it.serverHasOpenSlots(t.serverKey))return;if(!it.throttleRequests||!t.throttle)return Ob(t);if(vi.length>=it.maximumRequests)return;Rb(t);const n=Yt.insert(t);if(ne(n)){if(n===t)return;To(n)}return Ub(t)};function v4(){it.debugShowStatistics&&(qe.numberOfActiveRequests===0&&qe.lastNumberOfActiveRequests>0&&(qe.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${qe.numberOfAttemptedRequests}`),qe.numberOfAttemptedRequests=0),qe.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${qe.numberOfCancelledRequests}`),qe.numberOfCancelledRequests=0),qe.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${qe.numberOfCancelledActiveRequests}`),qe.numberOfCancelledActiveRequests=0),qe.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${qe.numberOfFailedRequests}`),qe.numberOfFailedRequests=0)),qe.lastNumberOfActiveRequests=qe.numberOfActiveRequests)}it.clearForSpecs=function(){for(;Yt.length>0;){const n=Yt.pop();To(n)}const t=vi.length;for(let n=0;n<t;++n)To(vi[n]);vi.length=0,ji={},qe.numberOfAttemptedRequests=0,qe.numberOfActiveRequests=0,qe.numberOfCancelledRequests=0,qe.numberOfCancelledActiveRequests=0,qe.numberOfFailedRequests=0,qe.numberOfActiveRequestsEver=0,qe.lastNumberOfActiveRequests=0},it.numberOfActiveRequestsByServer=function(t){return ji[t]},it.requestHeap=Yt;const Qs={};let Vs={};Qs.add=function(t,n){if(!ne(t))throw new pe("host is required.");if(!ne(n)||n<=0)throw new pe("port is required to be greater than 0.");const e=`${t.toLowerCase()}:${n}`;ne(Vs[e])||(Vs[e]=!0)},Qs.remove=function(t,n){if(!ne(t))throw new pe("host is required.");if(!ne(n)||n<=0)throw new pe("port is required to be greater than 0.");const e=`${t.toLowerCase()}:${n}`;ne(Vs[e])&&delete Vs[e]};function w4(t){const n=new Wi(t);n.normalize();let e=n.authority();if(e.length!==0){if(n.authority(e),e.indexOf("@")!==-1&&(e=e.split("@")[1]),e.indexOf(":")===-1){let i=n.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")e+=":80";else if(i==="https")e+=":443";else return}return e}}Qs.contains=function(t){if(!ne(t))throw new pe("url is required.");const n=w4(t);return!!(ne(n)&&ne(Vs[n]))},Qs.clear=function(){Vs={}};const Lb=(function(){try{const t=new XMLHttpRequest;return t.open("GET","#",!0),t.responseType="blob",t.responseType==="blob"}catch{return!1}})();function xe(t){t=t??gi.EMPTY_OBJECT,typeof t=="string"&&(t={url:t}),N.typeOf.string("options.url",t.url),this._url=void 0,this._templateValues=wi(t.templateValues,{}),this._queryParameters=wi(t.queryParameters,{}),this.headers=wi(t.headers,{}),this.request=t.request??new _A,this.proxy=t.proxy,this.retryCallback=t.retryCallback,this.retryAttempts=t.retryAttempts??0,this._retryCount=0,t.parseUrl??!0?this.parseUrl(t.url,!0,!0):this._url=t.url,this._credits=t.credits}function wi(t,n){return ne(t)?Ls(t):n}xe.createIfNeeded=function(t){return t instanceof xe?t.getDerivedResource({request:t.request}):typeof t!="string"?t:new xe({url:t})};let Ns;xe.supportsImageBitmapOptions=function(){return ne(Ns)?Ns:typeof createImageBitmap!="function"?(Ns=Promise.resolve(!1),Ns):(Ns=xe.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(n){const e={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(n,e),createImageBitmap(n)])}).then(function(n){const e=Fb(n[0]),i=Fb(n[1]);return e[1]!==i[1]}).catch(function(){return!1}),Ns)},Object.defineProperties(xe,{isBlobSupported:{get:function(){return Lb}}}),Object.defineProperties(xe.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(t){this.parseUrl(t,!1,!1)}},extension:{get:function(){return s4(this._url)}},isDataUri:{get:function(){return Db(this._url)}},isBlobUri:{get:function(){return Mb(this._url)}},isCrossOriginUrl:{get:function(){return Td(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}}),xe.prototype.toString=function(){return this.getUrlComponent(!0,!0)},xe.prototype.parseUrl=function(t,n,e,i){let o=new Wi(t);const r=b4(o.query());this._queryParameters=n?SA(r,this.queryParameters,e):r,o.search(""),o.fragment(""),ne(i)&&o.scheme()===""&&(o=o.absoluteTo(yl(i))),this._url=o.toString()};function b4(t){return t.length===0?{}:t.indexOf("=")===-1?{[t]:void 0}:h4(t)}function SA(t,n,e){if(!e)return Or(t,n);const i=Ls(t,!0);for(const o in n)if(n.hasOwnProperty(o)){let r=i[o];const a=n[o];ne(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(a)):i[o]=Array.isArray(a)?a.slice():a}return i}xe.prototype.getUrlComponent=function(t,n){if(this.isDataUri)return this._url;let e=this._url;t&&(e=`${e}${x4(this.queryParameters)}`),e=e.replace(/%7B/g,"{").replace(/%7D/g,"}");const i=this._templateValues;return Object.keys(i).length>0&&(e=e.replace(/{(.*?)}/g,function(o,r){const a=i[r];return ne(a)?encodeURIComponent(a):o})),n&&ne(this.proxy)&&(e=this.proxy.getURL(e)),e};function x4(t){const n=Object.keys(t);return n.length===0?"":n.length===1&&!ne(t[n[0]])?`?${n[0]}`:`?${c4(t)}`}xe.prototype.setQueryParameters=function(t,n){n?this._queryParameters=SA(this._queryParameters,t,!1):this._queryParameters=SA(t,this._queryParameters,!1)},xe.prototype.appendQueryParameters=function(t){this._queryParameters=SA(t,this._queryParameters,!0)},xe.prototype.setTemplateValues=function(t,n){n?this._templateValues=Or(this._templateValues,t):this._templateValues=Or(t,this._templateValues)},xe.prototype.getDerivedResource=function(t){const n=this.clone();if(n._retryCount=0,ne(t.url)){const e=t.preserveQueryParameters??!1;n.parseUrl(t.url,!0,e,this._url)}return ne(t.queryParameters)&&(n._queryParameters=Or(t.queryParameters,n.queryParameters)),ne(t.templateValues)&&(n._templateValues=Or(t.templateValues,n.templateValues)),ne(t.headers)&&(n.headers=Or(t.headers,n.headers)),ne(t.proxy)&&(n.proxy=t.proxy),ne(t.request)&&(n.request=t.request),ne(t.retryCallback)&&(n.retryCallback=t.retryCallback),ne(t.retryAttempts)&&(n.retryAttempts=t.retryAttempts),n},xe.prototype.retryOnError=function(t){const n=this.retryCallback;if(typeof n!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const e=this;return Promise.resolve(n(this,t)).then(function(i){return++e._retryCount,i})},xe.prototype.clone=function(t){return ne(t)?(t._url=this._url,t._queryParameters=Ls(this._queryParameters),t._templateValues=Ls(this._templateValues),t.headers=Ls(this.headers),t.proxy=this.proxy,t.retryCallback=this.retryCallback,t.retryAttempts=this.retryAttempts,t._retryCount=0,t.request=this.request.clone(),t):new xe({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:ne(this.credits)?this.credits.slice():void 0})},xe.prototype.getBaseUri=function(t){return o4(this.getUrlComponent(t),t)},xe.prototype.appendForwardSlash=function(){this._url=r4(this._url)},xe.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},xe.fetchArrayBuffer=function(t){return new xe(t).fetchArrayBuffer()},xe.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},xe.fetchBlob=function(t){return new xe(t).fetchBlob()},xe.prototype.fetchImage=function(t){t=t??gi.EMPTY_OBJECT;const n=t.preferImageBitmap??!1,e=t.preferBlob??!1,i=t.flipY??!1,o=t.skipColorSpaceConversion??!1;if(Md(this.request),!Lb||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!e)return Fd({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:n});const r=this.fetchBlob();if(!ne(r))return;let a,s,l,u;return xe.supportsImageBitmapOptions().then(function(A){return a=A,s=a&&n,r}).then(function(A){if(!ne(A))return;if(u=A,s)return xe.createImageBitmapFromBlob(A,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});const c=window.URL.createObjectURL(A);return l=new xe({url:c}),Fd({resource:l,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(A){if(ne(A))return A.blob=u,s||window.URL.revokeObjectURL(l.url),A}).catch(function(A){return ne(l)&&window.URL.revokeObjectURL(l.url),A.blob=u,Promise.reject(A)})};function Fd(t){const n=t.resource,e=t.flipY,i=t.skipColorSpaceConversion,o=t.preferImageBitmap,r=n.request;r.url=n.url,r.requestFunction=function(){let s=!1;!n.isDataUri&&!n.isBlobUri&&(s=n.isCrossOriginUrl);const l=gl();return xe._Implementations.createImage(r,s,l,e,i,o),l.promise};const a=it.request(r);if(ne(a))return a.catch(function(s){return r.state!==vt.FAILED?Promise.reject(s):n.retryOnError(s).then(function(l){return l?(r.state=vt.UNISSUED,r.deferred=void 0,Fd({resource:n,flipY:e,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(s)})})}xe.fetchImage=function(t){return new xe(t).fetchImage({flipY:t.flipY,skipColorSpaceConversion:t.skipColorSpaceConversion,preferBlob:t.preferBlob,preferImageBitmap:t.preferImageBitmap})},xe.prototype.fetchText=function(){return this.fetch({responseType:"text"})},xe.fetchText=function(t){return new xe(t).fetchText()},xe.prototype.fetchJson=function(){const t=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(ne(t))return t.then(function(n){if(ne(n))return JSON.parse(n)})},xe.fetchJson=function(t){return new xe(t).fetchJson()},xe.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},xe.fetchXML=function(t){return new xe(t).fetchXML()},xe.prototype.fetchJsonp=function(t){t=t??"callback",Md(this.request);let n;do n=`loadJsonp${he.nextRandomNumber().toString().substring(2,8)}`;while(ne(window[n]));return zb(this,t,n)};function zb(t,n,e){const i={};i[n]=e,t.setQueryParameters(i);const o=t.request,r=t.url;o.url=r,o.requestFunction=function(){const s=gl();return window[e]=function(l){s.resolve(l);try{delete window[e]}catch{window[e]=void 0}},xe._Implementations.loadAndExecuteScript(r,e,s),s.promise};const a=it.request(o);if(ne(a))return a.catch(function(s){return o.state!==vt.FAILED?Promise.reject(s):t.retryOnError(s).then(function(l){return l?(o.state=vt.UNISSUED,o.deferred=void 0,zb(t,n,e)):Promise.reject(s)})})}xe.fetchJsonp=function(t){return new xe(t).fetchJsonp(t.callbackParameterName)},xe.prototype._makeRequest=function(t){const n=this;Md(n.request);const e=n.request,i=n.url;e.url=i,e.requestFunction=function(){const r=t.responseType,a=Or(t.headers,n.headers),s=t.overrideMimeType,l=t.method,u=t.data,A=gl(),c=xe._Implementations.loadWithXhr(i,r,l,u,a,A,s);return ne(c)&&ne(c.abort)&&(e.cancelFunction=function(){c.abort()}),A.promise};const o=it.request(e);if(ne(o))return o.then(function(r){return e.cancelFunction=void 0,r}).catch(function(r){return e.cancelFunction=void 0,e.state!==vt.FAILED?Promise.reject(r):n.retryOnError(r).then(function(a){return a?(e.state=vt.UNISSUED,e.deferred=void 0,n.fetch(t)):Promise.reject(r)})})};function Md(t){if(t.state===vt.ISSUED||t.state===vt.ACTIVE)throw new Nt("The Resource is already being fetched.");t.state=vt.UNISSUED,t.deferred=void 0}const _4=/^data:(.*?)(;base64)?,(.*)$/;function EA(t,n){const e=decodeURIComponent(n);return t?atob(e):e}function kb(t,n){const e=EA(t,n),i=new ArrayBuffer(e.length),o=new Uint8Array(i);for(let r=0;r<e.length;r++)o[r]=e.charCodeAt(r);return i}function C4(t,n){n=n??"";const e=t[1],i=!!t[2],o=t[3];let r,a;switch(n){case"":case"text":return EA(i,o);case"arraybuffer":return kb(i,o);case"blob":return r=kb(i,o),new Blob([r],{type:e});case"document":return a=new DOMParser,a.parseFromString(EA(i,o),e);case"json":return JSON.parse(EA(i,o));default:throw new pe(`Unhandled responseType: ${n}`)}}xe.prototype.fetch=function(t){return t=wi(t,{}),t.method="GET",this._makeRequest(t)},xe.fetch=function(t){return new xe(t).fetch({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.delete=function(t){return t=wi(t,{}),t.method="DELETE",this._makeRequest(t)},xe.delete=function(t){return new xe(t).delete({responseType:t.responseType,overrideMimeType:t.overrideMimeType,data:t.data})},xe.prototype.head=function(t){return t=wi(t,{}),t.method="HEAD",this._makeRequest(t)},xe.head=function(t){return new xe(t).head({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.options=function(t){return t=wi(t,{}),t.method="OPTIONS",this._makeRequest(t)},xe.options=function(t){return new xe(t).options({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.post=function(t,n){return N.defined("data",t),n=wi(n,{}),n.method="POST",n.data=t,this._makeRequest(n)},xe.post=function(t){return new xe(t).post(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.put=function(t,n){return N.defined("data",t),n=wi(n,{}),n.method="PUT",n.data=t,this._makeRequest(n)},xe.put=function(t){return new xe(t).put(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.patch=function(t,n){return N.defined("data",t),n=wi(n,{}),n.method="PATCH",n.data=t,this._makeRequest(n)},xe.patch=function(t){return new xe(t).patch(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe._Implementations={},xe._Implementations.loadImageElement=function(t,n,e){const i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),e.resolve(i)},i.onerror=function(o){e.reject(o)},n&&(Qs.contains(t)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=t},xe._Implementations.createImage=function(t,n,e,i,o,r){const a=t.url;xe.supportsImageBitmapOptions().then(function(s){if(!(s&&r)){xe._Implementations.loadImageElement(a,n,e);return}const l="blob",u="GET",A=gl(),c=xe._Implementations.loadWithXhr(a,l,u,void 0,void 0,A,void 0,void 0,void 0);return ne(c)&&ne(c.abort)&&(t.cancelFunction=function(){c.abort()}),A.promise.then(function(f){if(!ne(f)){e.reject(new Nt(`Successfully retrieved ${a} but it contained no content.`));return}return xe.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(f){e.resolve(f)})}).catch(function(s){e.reject(s)})},xe.createImageBitmapFromBlob=function(t,n){return N.defined("options",n),N.typeOf.bool("options.flipY",n.flipY),N.typeOf.bool("options.premultiplyAlpha",n.premultiplyAlpha),N.typeOf.bool("options.skipColorSpaceConversion",n.skipColorSpaceConversion),createImageBitmap(t,{imageOrientation:n.flipY?"flipY":"from-image",premultiplyAlpha:n.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:n.skipColorSpaceConversion?"none":"default"})};function S4(t,n,e,i,o,r,a){fetch(t,{method:e,headers:o}).then(async s=>{if(!s.ok){const l={};s.headers.forEach((u,A)=>{l[A]=u}),r.reject(new vl(s.status,s,l));return}switch(n){case"text":r.resolve(s.text());break;case"json":r.resolve(s.json());break;default:r.resolve(new Uint8Array(await s.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new vl)})}const E4=typeof XMLHttpRequest>"u";xe._Implementations.loadWithXhr=function(t,n,e,i,o,r,a){const s=_4.exec(t);if(s!==null){r.resolve(C4(s,n));return}if(E4){S4(t,n,e,i,o,r);return}const l=new XMLHttpRequest;if(Qs.contains(t)&&(l.withCredentials=!0),l.open(e,t,!0),ne(a)&&ne(l.overrideMimeType)&&l.overrideMimeType(a),ne(o))for(const A in o)o.hasOwnProperty(A)&&l.setRequestHeader(A,o[A]);ne(n)&&(l.responseType=n);let u=!1;return typeof t=="string"&&(u=t.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),l.onload=function(){if((l.status<200||l.status>=300)&&!(u&&l.status===0)){r.reject(new vl(l.status,l.response,l.getAllResponseHeaders()));return}const A=l.response,c=l.responseType;if(e==="HEAD"||e==="OPTIONS"){const d=l.getAllResponseHeaders().trim().split(/[\r\n]+/),p={};d.forEach(function(g){const v=g.split(": "),y=v.shift();p[y]=v.join(": ")}),r.resolve(p);return}if(l.status===204)r.resolve(void 0);else if(ne(A)&&(!ne(n)||c===n))r.resolve(A);else if(n==="json"&&typeof A=="string")try{r.resolve(JSON.parse(A))}catch(f){r.reject(f)}else(c===""||c==="document")&&ne(l.responseXML)&&l.responseXML.hasChildNodes()?r.resolve(l.responseXML):(c===""||c==="text")&&ne(l.responseText)?r.resolve(l.responseText):r.reject(new Nt("Invalid XMLHttpRequest response type."))},l.onerror=function(A){r.reject(new vl)},l.send(i),l},xe._Implementations.loadAndExecuteScript=function(t,n,e){return u4(t).catch(function(i){e.reject(i)})},xe._DefaultImplementations={},xe._DefaultImplementations.createImage=xe._Implementations.createImage,xe._DefaultImplementations.loadWithXhr=xe._Implementations.loadWithXhr,xe._DefaultImplementations.loadAndExecuteScript=xe._Implementations.loadAndExecuteScript,xe.DEFAULT=Object.freeze(new xe({url:typeof document>"u"?"":document.location.href.split("?")[0]}));function wl(t){t=t??gi.EMPTY_OBJECT,this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=t.addNewLeapSeconds??!0,ne(t.data)?Qb(this,t.data):Qb(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}wl.fromUrl=async function(t,n){N.defined("url",t),n=n??gi.EMPTY_OBJECT;const e=xe.createIfNeeded(t);let i;try{i=await e.fetchJson()}catch{throw new Nt(`An error occurred while retrieving the EOP data from the URL ${e.url}.`)}return new wl({addNewLeapSeconds:n.addNewLeapSeconds,data:i})},wl.NONE=Object.freeze({compute:function(t,n){return ne(n)?(n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0):n=new _d(0,0,0,0,0),n}}),wl.prototype.compute=function(t,n){if(!ne(this._samples))return;if(ne(n)||(n=new _d(0,0,0,0,0)),this._samples.length===0)return n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0,n;const e=this._dates,i=this._lastIndex;let o=0,r=0;if(ne(i)){const s=e[i],l=e[i+1],u=we.lessThanOrEquals(s,t),A=!ne(l),c=A||we.greaterThanOrEquals(l,t);if(u&&c)return o=i,!A&&l.equals(t)&&++o,r=o+1,Nb(this,e,this._samples,t,o,r,n),n}let a=dl(e,t,we.compare,this._dateColumn);return a>=0?(a<e.length-1&&e[a+1].equals(t)&&++a,o=a,r=a):(r=~a,o=r-1,o<0&&(o=0)),this._lastIndex=o,Nb(this,e,this._samples,t,o,r,n),n};function P4(t,n){return we.compare(t.julianDate,n)}function Qb(t,n){if(!ne(n.columnNames))throw new Nt("Error in loaded EOP data: The columnNames property is required.");if(!ne(n.samples))throw new Nt("Error in loaded EOP data: The samples property is required.");const e=n.columnNames.indexOf("modifiedJulianDateUtc"),i=n.columnNames.indexOf("xPoleWanderRadians"),o=n.columnNames.indexOf("yPoleWanderRadians"),r=n.columnNames.indexOf("ut1MinusUtcSeconds"),a=n.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=n.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=n.columnNames.indexOf("taiMinusUtcSeconds");if(e<0||i<0||o<0||r<0||a<0||s<0||l<0)throw new Nt("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const u=t._samples=n.samples,A=t._dates=[];t._dateColumn=e,t._xPoleWanderRadiansColumn=i,t._yPoleWanderRadiansColumn=o,t._ut1MinusUtcSecondsColumn=r,t._xCelestialPoleOffsetRadiansColumn=a,t._yCelestialPoleOffsetRadiansColumn=s,t._taiMinusUtcSecondsColumn=l,t._columnCount=n.columnNames.length,t._lastIndex=void 0;let c;const f=t._addNewLeapSeconds;for(let d=0,p=u.length;d<p;d+=t._columnCount){const g=u[d+e],v=u[d+l],y=g+pt.MODIFIED_JULIAN_DATE_DIFFERENCE,m=new we(y,v,Ve.TAI);if(A.push(m),f){if(v!==c&&ne(c)){const b=we.leapSeconds,x=dl(b,m,P4);if(x<0){const E=new Ye(m,v);b.splice(~x,0,E)}}c=v}}}function Vb(t,n,e,i,o){const r=e*i;o.xPoleWander=n[r+t._xPoleWanderRadiansColumn],o.yPoleWander=n[r+t._yPoleWanderRadiansColumn],o.xPoleOffset=n[r+t._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=n[r+t._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=n[r+t._ut1MinusUtcSecondsColumn]}function bl(t,n,e){return n+t*(e-n)}function Nb(t,n,e,i,o,r,a){const s=t._columnCount;if(r>n.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;const l=n[o],u=n[r];if(l.equals(u)||i.equals(l))return Vb(t,e,o,s,a),a;if(i.equals(u))return Vb(t,e,r,s,a),a;const A=we.secondsDifference(i,l)/we.secondsDifference(u,l),c=o*s,f=r*s;let d=e[c+t._ut1MinusUtcSecondsColumn],p=e[f+t._ut1MinusUtcSecondsColumn];const g=p-d;if(g>.5||g<-.5){const v=e[c+t._taiMinusUtcSecondsColumn],y=e[f+t._taiMinusUtcSecondsColumn];v!==y&&(u.equals(i)?d=p:p-=y-v)}return a.xPoleWander=bl(A,e[c+t._xPoleWanderRadiansColumn],e[f+t._xPoleWanderRadiansColumn]),a.yPoleWander=bl(A,e[c+t._yPoleWanderRadiansColumn],e[f+t._yPoleWanderRadiansColumn]),a.xPoleOffset=bl(A,e[c+t._xCelestialPoleOffsetRadiansColumn],e[f+t._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=bl(A,e[c+t._yCelestialPoleOffsetRadiansColumn],e[f+t._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=bl(A,d,p),a}function Rt(t,n,e){this.heading=t??0,this.pitch=n??0,this.roll=e??0}Rt.fromQuaternion=function(t,n){if(!ne(t))throw new pe("quaternion is required");ne(n)||(n=new Rt);const e=2*(t.w*t.y-t.z*t.x),i=1-2*(t.x*t.x+t.y*t.y),o=2*(t.w*t.x+t.y*t.z),r=1-2*(t.y*t.y+t.z*t.z),a=2*(t.w*t.z+t.x*t.y);return n.heading=-Math.atan2(a,r),n.roll=Math.atan2(o,i),n.pitch=-he.asinClamped(e),n},Rt.fromDegrees=function(t,n,e,i){if(!ne(t))throw new pe("heading is required");if(!ne(n))throw new pe("pitch is required");if(!ne(e))throw new pe("roll is required");return ne(i)||(i=new Rt),i.heading=t*he.RADIANS_PER_DEGREE,i.pitch=n*he.RADIANS_PER_DEGREE,i.roll=e*he.RADIANS_PER_DEGREE,i},Rt.clone=function(t,n){if(ne(t))return ne(n)?(n.heading=t.heading,n.pitch=t.pitch,n.roll=t.roll,n):new Rt(t.heading,t.pitch,t.roll)},Rt.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.heading===n.heading&&t.pitch===n.pitch&&t.roll===n.roll},Rt.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.heading,n.heading,e,i)&&he.equalsEpsilon(t.pitch,n.pitch,e,i)&&he.equalsEpsilon(t.roll,n.roll,e,i)},Rt.prototype.clone=function(t){return Rt.clone(this,t)},Rt.prototype.equals=function(t){return Rt.equals(this,t)},Rt.prototype.equalsEpsilon=function(t,n,e){return Rt.equalsEpsilon(this,t,n,e)},Rt.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};const Hb=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function B4(){const t=document.getElementsByTagName("script");for(let n=0,e=t.length;n<e;++n){const i=t[n].getAttribute("src"),o=Hb.exec(i);if(o!==null)return o[1]}}let PA;function Gb(t){return typeof document>"u"?t:(ne(PA)||(PA=document.createElement("a")),PA.href=t,PA.href)}let Io;function Wb(){if(ne(Io))return Io;let t;if(typeof CESIUM_BASE_URL<"u"?t=CESIUM_BASE_URL:ne(is&&is.tagName.toUpperCase()==="SCRIPT"&&is.src||new URL("earthsdk3-cesium.iife.js",document.baseURI).href)?t=yl(".",is&&is.tagName.toUpperCase()==="SCRIPT"&&is.src||new URL("earthsdk3-cesium.iife.js",document.baseURI).href):typeof define=="object"&&ne(define.amd)&&!define.amd.toUrlUndefined&&ne(require.toUrl)?t=yl("..",Gn("Core/buildModuleUrl.js")):t=B4(),!ne(t))throw new pe("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return Io=new xe({url:Gb(t)}),Io.appendForwardSlash(),Io}function T4(t){return Gb(require.toUrl(`../${t}`))}function jb(t){return Wb().getDerivedResource({url:t}).url}let BA;function Gn(t){return ne(BA)||(typeof define=="object"&&ne(define.amd)&&!define.amd.toUrlUndefined&&ne(require.toUrl)?BA=T4:BA=jb),BA(t)}Gn._cesiumScriptRegex=Hb,Gn._buildModuleUrlFromBaseUrl=jb,Gn._clearBaseResource=function(){Io=void 0},Gn.setBaseUrl=function(t){Io=xe.DEFAULT.getDerivedResource({url:t})},Gn.getCesiumBaseUrl=Wb;function qb(t,n,e){this.x=t,this.y=n,this.s=e}function Dd(t){t=t??gi.EMPTY_OBJECT,this._xysFileUrlTemplate=xe.createIfNeeded(t.xysFileUrlTemplate),this._interpolationOrder=t.interpolationOrder??9,this._sampleZeroJulianEphemerisDate=t.sampleZeroJulianEphemerisDate??24423965e-1,this._sampleZeroDateTT=new we(this._sampleZeroJulianEphemerisDate,0,Ve.TAI),this._stepSizeDays=t.stepSizeDays??1,this._samplesPerXysFile=t.samplesPerXysFile??1e3,this._totalSamples=t.totalSamples??27426,this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];const n=this._interpolationOrder,e=this._denominators=new Array(n+1),i=this._xTable=new Array(n+1),o=Math.pow(this._stepSizeDays,n);for(let r=0;r<=n;++r){e[r]=o,i[r]=r*this._stepSizeDays;for(let a=0;a<=n;++a)a!==r&&(e[r]*=r-a);e[r]=1/e[r]}this._work=new Array(n+1),this._coef=new Array(n+1)}const I4=new we(0,0,Ve.TAI);function Rd(t,n,e){const i=I4;return i.dayNumber=n,i.secondsOfDay=e,we.daysDifference(i,t._sampleZeroDateTT)}Dd.prototype.preload=function(t,n,e,i){const o=Rd(this,t,n),r=Rd(this,e,i);let a=o/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);let s=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);const l=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,A=[];for(let c=l;c<=u;++c)A.push(Ud(this,c));return Promise.all(A)},Dd.prototype.computeXysRadians=function(t,n,e){const i=Rd(this,t,n);if(i<0)return;const o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;const r=this._interpolationOrder;let a=o-(r/2|0);a<0&&(a=0);let s=a+r;s>=this._totalSamples&&(s=this._totalSamples-1,a=s-r,a<0&&(a=0));let l=!1;const u=this._samples;if(ne(u[a*3])||(Ud(this,a/this._samplesPerXysFile|0),l=!0),ne(u[s*3])||(Ud(this,s/this._samplesPerXysFile|0),l=!0),l)return;ne(e)?(e.x=0,e.y=0,e.s=0):e=new qb(0,0,0);const A=i-a*this._stepSizeDays,c=this._work,f=this._denominators,d=this._coef,p=this._xTable;let g,v;for(g=0;g<=r;++g)c[g]=A-p[g];for(g=0;g<=r;++g){for(d[g]=1,v=0;v<=r;++v)v!==g&&(d[g]*=c[v]);d[g]*=f[g];let y=(a+g)*3;e.x+=d[g]*u[y++],e.y+=d[g]*u[y++],e.s+=d[g]*u[y]}return e};function Ud(t,n){if(t._chunkDownloadsInProgress[n])return t._chunkDownloadsInProgress[n];let e;const i=t._xysFileUrlTemplate;ne(i)?e=i.getDerivedResource({templateValues:{0:n}}):e=new xe({url:Gn(`Assets/IAU2006_XYS/IAU2006_XYS_${n}.json`)});const o=e.fetchJson().then(function(r){t._chunkDownloadsInProgress[n]=!1;const a=t._samples,s=r.samples,l=n*t._samplesPerXysFile*3;for(let u=0,A=s.length;u<A;++u)a[l+u]=s[u]});return t._chunkDownloadsInProgress[n]=o,o}function ve(t,n,e,i){this.x=t??0,this.y=n??0,this.z=e??0,this.w=i??0}let xl=new ae;ve.fromAxisAngle=function(t,n,e){N.typeOf.object("axis",t),N.typeOf.number("angle",n);const i=n/2,o=Math.sin(i);xl=ae.normalize(t,xl);const r=xl.x*o,a=xl.y*o,s=xl.z*o,l=Math.cos(i);return ne(e)?(e.x=r,e.y=a,e.z=s,e.w=l,e):new ve(r,a,s,l)};const F4=[1,2,0],M4=new Array(3);ve.fromRotationMatrix=function(t,n){N.typeOf.object("matrix",t);let e,i,o,r,a;const s=t[me.COLUMN0ROW0],l=t[me.COLUMN1ROW1],u=t[me.COLUMN2ROW2],A=s+l+u;if(A>0)e=Math.sqrt(A+1),a=.5*e,e=.5/e,i=(t[me.COLUMN1ROW2]-t[me.COLUMN2ROW1])*e,o=(t[me.COLUMN2ROW0]-t[me.COLUMN0ROW2])*e,r=(t[me.COLUMN0ROW1]-t[me.COLUMN1ROW0])*e;else{const c=F4;let f=0;l>s&&(f=1),u>s&&u>l&&(f=2);const d=c[f],p=c[d];e=Math.sqrt(t[me.getElementIndex(f,f)]-t[me.getElementIndex(d,d)]-t[me.getElementIndex(p,p)]+1);const g=M4;g[f]=.5*e,e=.5/e,a=(t[me.getElementIndex(p,d)]-t[me.getElementIndex(d,p)])*e,g[d]=(t[me.getElementIndex(d,f)]+t[me.getElementIndex(f,d)])*e,g[p]=(t[me.getElementIndex(p,f)]+t[me.getElementIndex(f,p)])*e,i=-g[0],o=-g[1],r=-g[2]}return ne(n)?(n.x=i,n.y=o,n.z=r,n.w=a,n):new ve(i,o,r,a)};const Kb=new ve;let Zb=new ve,Od=new ve,Xb=new ve;ve.fromHeadingPitchRoll=function(t,n){return N.typeOf.object("headingPitchRoll",t),Xb=ve.fromAxisAngle(ae.UNIT_X,t.roll,Kb),Od=ve.fromAxisAngle(ae.UNIT_Y,-t.pitch,n),n=ve.multiply(Od,Xb,Od),Zb=ve.fromAxisAngle(ae.UNIT_Z,-t.heading,Kb),ve.multiply(Zb,n,n)};const TA=new ae,Ld=new ae,ii=new ve,$b=new ve,IA=new ve;ve.packedLength=4,ve.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e++]=t.y,n[e++]=t.z,n[e]=t.w,n},ve.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new ve),e.x=t[n],e.y=t[n+1],e.z=t[n+2],e.w=t[n+3],e},ve.packedInterpolationLength=3,ve.convertPackedArrayForInterpolation=function(t,n,e,i){ve.unpack(t,e*4,IA),ve.conjugate(IA,IA);for(let o=0,r=e-n+1;o<r;o++){const a=o*3;ve.unpack(t,(n+o)*4,ii),ve.multiply(ii,IA,ii),ii.w<0&&ve.negate(ii,ii),ve.computeAxis(ii,TA);const s=ve.computeAngle(ii);ne(i)||(i=[]),i[a]=TA.x*s,i[a+1]=TA.y*s,i[a+2]=TA.z*s}},ve.unpackInterpolationResult=function(t,n,e,i,o){ne(o)||(o=new ve),ae.fromArray(t,0,Ld);const r=ae.magnitude(Ld);return ve.unpack(n,i*4,$b),r===0?ve.clone(ve.IDENTITY,ii):ve.fromAxisAngle(Ld,r,ii),ve.multiply(ii,$b,o)},ve.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new ve(t.x,t.y,t.z,t.w)},ve.conjugate=function(t,n){return N.typeOf.object("quaternion",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=t.w,n},ve.magnitudeSquared=function(t){return N.typeOf.object("quaternion",t),t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},ve.magnitude=function(t){return Math.sqrt(ve.magnitudeSquared(t))},ve.normalize=function(t,n){N.typeOf.object("result",n);const e=1/ve.magnitude(t),i=t.x*e,o=t.y*e,r=t.z*e,a=t.w*e;return n.x=i,n.y=o,n.z=r,n.w=a,n},ve.inverse=function(t,n){N.typeOf.object("result",n);const e=ve.magnitudeSquared(t);return n=ve.conjugate(t,n),ve.multiplyByScalar(n,1/e,n)},ve.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e.z=t.z+n.z,e.w=t.w+n.w,e},ve.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e.z=t.z-n.z,e.w=t.w-n.w,e},ve.negate=function(t,n){return N.typeOf.object("quaternion",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=-t.w,n},ve.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y+t.z*n.z+t.w*n.w},ve.multiply=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t.x,o=t.y,r=t.z,a=t.w,s=n.x,l=n.y,u=n.z,A=n.w,c=a*s+i*A+o*u-r*l,f=a*l-i*u+o*A+r*s,d=a*u+i*l-o*s+r*A,p=a*A-i*s-o*l-r*u;return e.x=c,e.y=f,e.z=d,e.w=p,e},ve.multiplyByScalar=function(t,n,e){return N.typeOf.object("quaternion",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e.z=t.z*n,e.w=t.w*n,e},ve.divideByScalar=function(t,n,e){return N.typeOf.object("quaternion",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},ve.computeAxis=function(t,n){N.typeOf.object("quaternion",t),N.typeOf.object("result",n);const e=t.w;if(Math.abs(e-1)<he.EPSILON6||Math.abs(e+1)<he.EPSILON6)return n.x=1,n.y=n.z=0,n;const i=1/Math.sqrt(1-e*e);return n.x=t.x*i,n.y=t.y*i,n.z=t.z*i,n},ve.computeAngle=function(t){return N.typeOf.object("quaternion",t),Math.abs(t.w-1)<he.EPSILON6?0:2*Math.acos(t.w)};let zd=new ve;ve.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),zd=ve.multiplyByScalar(n,e,zd),i=ve.multiplyByScalar(t,1-e,i),ve.add(zd,i,i)};let Yb=new ve,kd=new ve,Qd=new ve;ve.slerp=function(t,n,e,i){N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i);let o=ve.dot(t,n),r=n;if(o<0&&(o=-o,r=Yb=ve.negate(n,Yb)),1-o<he.EPSILON6)return ve.lerp(t,r,e,i);const a=Math.acos(o);return kd=ve.multiplyByScalar(t,Math.sin((1-e)*a),kd),Qd=ve.multiplyByScalar(r,Math.sin(e*a),Qd),i=ve.add(kd,Qd,i),ve.multiplyByScalar(i,1/Math.sin(a),i)},ve.log=function(t,n){N.typeOf.object("quaternion",t),N.typeOf.object("result",n);const e=he.acosClamped(t.w);let i=0;return e!==0&&(i=e/Math.sin(e)),ae.multiplyByScalar(t,i,n)},ve.exp=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=ae.magnitude(t);let i=0;return e!==0&&(i=Math.sin(e)/e),n.x=t.x*i,n.y=t.y*i,n.z=t.z*i,n.w=Math.cos(e),n};const D4=new ae,R4=new ae,_l=new ve,Hs=new ve;ve.computeInnerQuadrangle=function(t,n,e,i){N.typeOf.object("q0",t),N.typeOf.object("q1",n),N.typeOf.object("q2",e),N.typeOf.object("result",i);const o=ve.conjugate(n,_l);ve.multiply(o,e,Hs);const r=ve.log(Hs,D4);ve.multiply(o,t,Hs);const a=ve.log(Hs,R4);return ae.add(r,a,r),ae.multiplyByScalar(r,.25,r),ae.negate(r,r),ve.exp(r,_l),ve.multiply(n,_l,i)},ve.squad=function(t,n,e,i,o,r){N.typeOf.object("q0",t),N.typeOf.object("q1",n),N.typeOf.object("s0",e),N.typeOf.object("s1",i),N.typeOf.number("t",o),N.typeOf.object("result",r);const a=ve.slerp(t,n,o,_l),s=ve.slerp(e,i,o,Hs);return ve.slerp(a,s,2*o*(1-o),r)};const U4=new ve,Jb=1.9011074535173003,FA=Ht.supportsTypedArrays()?new Float32Array(8):[],MA=Ht.supportsTypedArrays()?new Float32Array(8):[],qi=Ht.supportsTypedArrays()?new Float32Array(8):[],Ki=Ht.supportsTypedArrays()?new Float32Array(8):[];for(let t=0;t<7;++t){const n=t+1,e=2*n+1;FA[t]=1/(n*e),MA[t]=n/e}FA[7]=Jb/136,MA[7]=Jb*8/17,ve.fastSlerp=function(t,n,e,i){N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i);let o=ve.dot(t,n),r;o>=0?r=1:(r=-1,o=-o);const a=o-1,s=1-e,l=e*e,u=s*s;for(let d=7;d>=0;--d)qi[d]=(FA[d]*l-MA[d])*a,Ki[d]=(FA[d]*u-MA[d])*a;const A=r*e*(1+qi[0]*(1+qi[1]*(1+qi[2]*(1+qi[3]*(1+qi[4]*(1+qi[5]*(1+qi[6]*(1+qi[7])))))))),c=s*(1+Ki[0]*(1+Ki[1]*(1+Ki[2]*(1+Ki[3]*(1+Ki[4]*(1+Ki[5]*(1+Ki[6]*(1+Ki[7])))))))),f=ve.multiplyByScalar(t,c,U4);return ve.multiplyByScalar(n,A,i),ve.add(f,i,i)},ve.fastSquad=function(t,n,e,i,o,r){N.typeOf.object("q0",t),N.typeOf.object("q1",n),N.typeOf.object("s0",e),N.typeOf.object("s1",i),N.typeOf.number("t",o),N.typeOf.object("result",r);const a=ve.fastSlerp(t,n,o,_l),s=ve.fastSlerp(e,i,o,Hs);return ve.fastSlerp(a,s,2*o*(1-o),r)},ve.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w},ve.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t.x-n.x)<=e&&Math.abs(t.y-n.y)<=e&&Math.abs(t.z-n.z)<=e&&Math.abs(t.w-n.w)<=e},ve.ZERO=Object.freeze(new ve(0,0,0,0)),ve.IDENTITY=Object.freeze(new ve(0,0,0,1)),ve.prototype.clone=function(t){return ve.clone(this,t)},ve.prototype.equals=function(t){return ve.equals(this,t)},ve.prototype.equalsEpsilon=function(t,n){return ve.equalsEpsilon(this,t,n)},ve.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const ke={},Vd={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Gs={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Nd={},gn={east:new ae,north:new ae,up:new ae,west:new ae,south:new ae,down:new ae};let Lr=new ae,zr=new ae,kr=new ae;ke.localFrameToFixedFrameGenerator=function(t,n){if(!Vd.hasOwnProperty(t)||!Vd[t].hasOwnProperty(n))throw new pe("firstAxis and secondAxis must be east, north, up, west, south or down.");const e=Vd[t][n];let i;const o=t+n;return ne(Nd[o])?i=Nd[o]:(i=function(r,a,s){if(!ne(r))throw new pe("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new pe("origin has a NaN component");if(ne(s)||(s=new ge),ae.equalsEpsilon(r,ae.ZERO,he.EPSILON14))ae.unpack(Gs[t],0,Lr),ae.unpack(Gs[n],0,zr),ae.unpack(Gs[e],0,kr);else if(he.equalsEpsilon(r.x,0,he.EPSILON14)&&he.equalsEpsilon(r.y,0,he.EPSILON14)){const l=he.sign(r.z);ae.unpack(Gs[t],0,Lr),t!=="east"&&t!=="west"&&ae.multiplyByScalar(Lr,l,Lr),ae.unpack(Gs[n],0,zr),n!=="east"&&n!=="west"&&ae.multiplyByScalar(zr,l,zr),ae.unpack(Gs[e],0,kr),e!=="east"&&e!=="west"&&ae.multiplyByScalar(kr,l,kr)}else{a=a??De.default,a.geodeticSurfaceNormal(r,gn.up);const l=gn.up,u=gn.east;u.x=-r.y,u.y=r.x,u.z=0,ae.normalize(u,gn.east),ae.cross(l,u,gn.north),ae.multiplyByScalar(gn.up,-1,gn.down),ae.multiplyByScalar(gn.east,-1,gn.west),ae.multiplyByScalar(gn.north,-1,gn.south),Lr=gn[t],zr=gn[n],kr=gn[e]}return s[0]=Lr.x,s[1]=Lr.y,s[2]=Lr.z,s[3]=0,s[4]=zr.x,s[5]=zr.y,s[6]=zr.z,s[7]=0,s[8]=kr.x,s[9]=kr.y,s[10]=kr.z,s[11]=0,s[12]=r.x,s[13]=r.y,s[14]=r.z,s[15]=1,s},Nd[o]=i),i},ke.eastNorthUpToFixedFrame=ke.localFrameToFixedFrameGenerator("east","north"),ke.northEastDownToFixedFrame=ke.localFrameToFixedFrameGenerator("north","east"),ke.northUpEastToFixedFrame=ke.localFrameToFixedFrameGenerator("north","up"),ke.northWestUpToFixedFrame=ke.localFrameToFixedFrameGenerator("north","west");const O4=new ve,L4=new ae(1,1,1),z4=new ge;ke.headingPitchRollToFixedFrame=function(t,n,e,i,o){N.typeOf.object("HeadingPitchRoll",n),i=i??ke.eastNorthUpToFixedFrame;const r=ve.fromHeadingPitchRoll(n,O4),a=ge.fromTranslationQuaternionRotationScale(ae.ZERO,r,L4,z4);return o=i(t,e,o),ge.multiply(o,a,o)};const k4=new ge,Q4=new me;ke.headingPitchRollQuaternion=function(t,n,e,i,o){N.typeOf.object("HeadingPitchRoll",n);const r=ke.headingPitchRollToFixedFrame(t,n,e,i,k4),a=ge.getMatrix3(r,Q4);return ve.fromRotationMatrix(a,o)};const V4=new ae(1,1,1),N4=new ae,ex=new ge,H4=new ge,G4=new me,W4=new ve;ke.fixedFrameToHeadingPitchRoll=function(t,n,e,i){N.defined("transform",t),n=n??De.default,e=e??ke.eastNorthUpToFixedFrame,ne(i)||(i=new Rt);const o=ge.getTranslation(t,N4);if(ae.equals(o,ae.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=ge.inverseTransformation(e(o,n,ex),ex),a=ge.setScale(t,V4,H4);a=ge.setTranslation(a,ae.ZERO,a),r=ge.multiply(r,a,r);let s=ve.fromRotationMatrix(ge.getMatrix3(r,G4),W4);return s=ve.normalize(s,s),Rt.fromQuaternion(s,i)};const j4=6*3600+2460+50.54841,q4=8640184812866e-6,K4=.093104,Z4=-62e-7,X4=11772758384668e-32,$4=72921158553e-15,Y4=he.TWO_PI/86400;let DA=new we;ke.computeIcrfToCentralBodyFixedMatrix=function(t,n){let e=ke.computeIcrfToFixedMatrix(t,n);return ne(e)||(e=ke.computeTemeToPseudoFixedMatrix(t,n)),e},ke.computeTemeToPseudoFixedMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");DA=we.addSeconds(t,-we.computeTaiMinusUtc(t),DA);const e=DA.dayNumber,i=DA.secondsOfDay;let o;const r=e-2451545;i>=43200?o=(r+.5)/pt.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/pt.DAYS_PER_JULIAN_CENTURY;const s=(j4+o*(q4+o*(K4+o*Z4)))*Y4%he.TWO_PI,l=$4+X4*(e-24515455e-1),u=(i+pt.SECONDS_PER_DAY*.5)%pt.SECONDS_PER_DAY,A=s+l*u,c=Math.cos(A),f=Math.sin(A);return ne(n)?(n[0]=c,n[1]=-f,n[2]=0,n[3]=f,n[4]=c,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new me(c,f,0,-f,c,0,0,0,1)},ke.iau2006XysData=new Dd,ke.earthOrientationParameters=wl.NONE;const Hd=32.184,J4=2451545;ke.preloadIcrfFixed=function(t){const n=t.start.dayNumber,e=t.start.secondsOfDay+Hd,i=t.stop.dayNumber,o=t.stop.secondsOfDay+Hd;return ke.iau2006XysData.preload(n,e,i,o)},ke.computeIcrfToFixedMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");ne(n)||(n=new me);const e=ke.computeFixedToIcrfMatrix(t,n);if(ne(e))return me.transpose(e,n)};const e5=32.184,t5=2451545,RA=new Rt,n5=new me,i5=new we;ke.computeMoonFixedToIcrfMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");const e=we.addSeconds(t,e5,i5),i=we.totalDays(e)-t5,o=he.toRadians(12.112)-he.toRadians(.052992)*i,r=he.toRadians(24.224)-he.toRadians(.105984)*i,a=he.toRadians(227.645)+he.toRadians(13.012)*i,s=he.toRadians(261.105)+he.toRadians(13.340716)*i,l=he.toRadians(358)+he.toRadians(.9856)*i;return RA.pitch=he.toRadians(180)-he.toRadians(3.878)*Math.sin(o)-he.toRadians(.12)*Math.sin(r)+he.toRadians(.07)*Math.sin(a)-he.toRadians(.017)*Math.sin(s),RA.roll=he.toRadians(-23.47)+he.toRadians(1.543)*Math.cos(o)+he.toRadians(.24)*Math.cos(r)-he.toRadians(.028)*Math.cos(a)+he.toRadians(.007)*Math.cos(s),RA.heading=he.toRadians(154.375)+he.toRadians(13.17635831)*i+he.toRadians(3.558)*Math.sin(o)+he.toRadians(.121)*Math.sin(r)-he.toRadians(.064)*Math.sin(a)+he.toRadians(.016)*Math.sin(s)+he.toRadians(.025)*Math.sin(l),me.fromHeadingPitchRoll(RA,n5)},ke.computeIcrfToMoonFixedMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");ne(n)||(n=new me);const e=ke.computeMoonFixedToIcrfMatrix(t,n);if(ne(e))return me.transpose(e,n)};const r5=new qb(0,0,0),o5=new _d(0,0,0,0,0),Gd=new me,Wd=new me;ke.computeFixedToIcrfMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");ne(n)||(n=new me);const e=ke.earthOrientationParameters.compute(t,o5);if(!ne(e))return;const i=t.dayNumber,o=t.secondsOfDay+Hd,r=ke.iau2006XysData.computeXysRadians(i,o,r5);if(!ne(r))return;const a=r.x+e.xPoleOffset,s=r.y+e.yPoleOffset,l=1/(1+Math.sqrt(1-a*a-s*s)),u=Gd;u[0]=1-l*a*a,u[3]=-l*a*s,u[6]=a,u[1]=-l*a*s,u[4]=1-l*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-l*(a*a+s*s);const A=me.fromRotationZ(-r.s,Wd),c=me.multiply(u,A,Gd),f=t.dayNumber,d=t.secondsOfDay-we.computeTaiMinusUtc(t)+e.ut1MinusUtc,p=f-2451545,g=d/pt.SECONDS_PER_DAY;let v=.779057273264+g+.00273781191135448*(p+g);v=v%1*he.TWO_PI;const y=me.fromRotationZ(v,Wd),m=me.multiply(c,y,Gd),b=Math.cos(e.xPoleWander),x=Math.cos(e.yPoleWander),E=Math.sin(e.xPoleWander),B=Math.sin(e.yPoleWander);let P=i-J4+o/pt.SECONDS_PER_DAY;P/=36525;const I=-47e-6*P*he.RADIANS_PER_DEGREE/3600,O=Math.cos(I),M=Math.sin(I),S=Wd;return S[0]=b*O,S[1]=b*M,S[2]=E,S[3]=-x*M+B*E*O,S[4]=x*O+B*E*M,S[5]=-B*b,S[6]=-B*M-x*E*O,S[7]=B*O-x*E*M,S[8]=x*b,me.multiply(m,S,n)};const s5=new be;ke.pointToWindowCoordinates=function(t,n,e,i){return i=ke.pointToGLWindowCoordinates(t,n,e,i),i.y=2*n[5]-i.y,i},ke.pointToGLWindowCoordinates=function(t,n,e,i){if(!ne(t))throw new pe("modelViewProjectionMatrix is required.");if(!ne(n))throw new pe("viewportTransformation is required.");if(!ne(e))throw new pe("point is required.");ne(i)||(i=new _e);const o=s5;return ge.multiplyByVector(t,be.fromElements(e.x,e.y,e.z,1,o),o),be.multiplyByScalar(o,1/o.w,o),ge.multiplyByVector(n,o,o),_e.fromCartesian4(o,i)};const a5=new ae,l5=new ae,u5=new ae;ke.rotationMatrixFromPositionVelocity=function(t,n,e,i){if(!ne(t))throw new pe("position is required.");if(!ne(n))throw new pe("velocity is required.");const o=(e??De.default).geodeticSurfaceNormal(t,a5);let r=ae.cross(n,o,l5);ae.equalsEpsilon(r,ae.ZERO,he.EPSILON6)&&(r=ae.clone(ae.UNIT_X,r));const a=ae.cross(r,n,u5);return ae.normalize(a,a),ae.cross(n,a,r),ae.negate(r,r),ae.normalize(r,r),ne(i)||(i=new me),i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=a.x,i[7]=a.y,i[8]=a.z,i};const tx=new ge(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),nx=new Qe,jd=new ae,c5=new ae,h5=new me,qd=new ge,ix=new ge;ke.basisTo2D=function(t,n,e){if(!ne(t))throw new pe("projection is required.");if(!ne(n))throw new pe("matrix is required.");if(!ne(e))throw new pe("result is required.");const i=ge.getTranslation(n,c5),o=t.ellipsoid;let r;if(ae.equals(i,ae.ZERO))r=ae.clone(ae.ZERO,jd);else{const A=o.cartesianToCartographic(i,nx);r=t.project(A,jd),ae.fromElements(r.z,r.x,r.y,r)}const a=ke.eastNorthUpToFixedFrame(i,o,qd),s=ge.inverseTransformation(a,ix),l=ge.getMatrix3(n,h5),u=ge.multiplyByMatrix3(s,l,e);return ge.multiply(tx,u,e),ge.setTranslation(e,r,e),e},ke.ellipsoidTo2DModelMatrix=function(t,n,e){if(!ne(t))throw new pe("projection is required.");if(!ne(n))throw new pe("center is required.");if(!ne(e))throw new pe("result is required.");const i=t.ellipsoid,o=ke.eastNorthUpToFixedFrame(n,i,qd),r=ge.inverseTransformation(o,ix),a=i.cartesianToCartographic(n,nx),s=t.project(a,jd);ae.fromElements(s.z,s.x,s.y,s);const l=ge.fromTranslation(s,qd);return ge.multiply(tx,r,e),ge.multiply(l,e,e),e};function Te(t,n,e,i){this.west=t??0,this.south=n??0,this.east=e??0,this.north=i??0}Object.defineProperties(Te.prototype,{width:{get:function(){return Te.computeWidth(this)}},height:{get:function(){return Te.computeHeight(this)}}}),Te.packedLength=4,Te.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.west,n[e++]=t.south,n[e++]=t.east,n[e]=t.north,n},Te.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new Te),e.west=t[n++],e.south=t[n++],e.east=t[n++],e.north=t[n],e},Te.computeWidth=function(t){N.typeOf.object("rectangle",t);let n=t.east;const e=t.west;return n<e&&(n+=he.TWO_PI),n-e},Te.computeHeight=function(t){return N.typeOf.object("rectangle",t),t.north-t.south},Te.fromDegrees=function(t,n,e,i,o){return t=he.toRadians(t??0),n=he.toRadians(n??0),e=he.toRadians(e??0),i=he.toRadians(i??0),ne(o)?(o.west=t,o.south=n,o.east=e,o.north=i,o):new Te(t,n,e,i)},Te.fromRadians=function(t,n,e,i,o){return ne(o)?(o.west=t??0,o.south=n??0,o.east=e??0,o.north=i??0,o):new Te(t,n,e,i)},Te.fromCartographicArray=function(t,n){N.defined("cartographics",t);let e=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(let l=0,u=t.length;l<u;l++){const A=t[l];e=Math.min(e,A.longitude),i=Math.max(i,A.longitude),a=Math.min(a,A.latitude),s=Math.max(s,A.latitude);const c=A.longitude>=0?A.longitude:A.longitude+he.TWO_PI;o=Math.min(o,c),r=Math.max(r,c)}return i-e>r-o&&(e=o,i=r,i>he.PI&&(i=i-he.TWO_PI),e>he.PI&&(e=e-he.TWO_PI)),ne(n)?(n.west=e,n.south=a,n.east=i,n.north=s,n):new Te(e,a,i,s)},Te.fromCartesianArray=function(t,n,e){N.defined("cartesians",t),n=n??De.default;let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let u=0,A=t.length;u<A;u++){const c=n.cartesianToCartographic(t[u]);i=Math.min(i,c.longitude),o=Math.max(o,c.longitude),s=Math.min(s,c.latitude),l=Math.max(l,c.latitude);const f=c.longitude>=0?c.longitude:c.longitude+he.TWO_PI;r=Math.min(r,f),a=Math.max(a,f)}return o-i>a-r&&(i=r,o=a,o>he.PI&&(o=o-he.TWO_PI),i>he.PI&&(i=i-he.TWO_PI)),ne(e)?(e.west=i,e.south=s,e.east=o,e.north=l,e):new Te(i,s,o,l)};const A5=new ae,f5=new ae,p5=new ae,d5=new ae,m5=new ae,Kd=new Array(5);for(let t=0;t<Kd.length;++t)Kd[t]=new ae;Te.fromBoundingSphere=function(t,n,e){N.typeOf.object("boundingSphere",t);const i=t.center,o=t.radius;if(ne(n)||(n=De.default),ne(e)||(e=new Te),ae.equals(i,ae.ZERO))return Te.clone(Te.MAX_VALUE,e),e;const r=ke.eastNorthUpToFixedFrame(i,n,A5),a=ge.multiplyByPointAsVector(r,ae.UNIT_X,f5);ae.normalize(a,a);const s=ge.multiplyByPointAsVector(r,ae.UNIT_Y,p5);ae.normalize(s,s),ae.multiplyByScalar(s,o,s),ae.multiplyByScalar(a,o,a);const l=ae.negate(s,m5),u=ae.negate(a,d5),A=Kd;let c=A[0];return ae.add(i,s,c),c=A[1],ae.add(i,u,c),c=A[2],ae.add(i,l,c),c=A[3],ae.add(i,a,c),A[4]=i,Te.fromCartesianArray(A,n,e)},Te.clone=function(t,n){if(ne(t))return ne(n)?(n.west=t.west,n.south=t.south,n.east=t.east,n.north=t.north,n):new Te(t.west,t.south,t.east,t.north)},Te.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t.west-n.west)<=e&&Math.abs(t.south-n.south)<=e&&Math.abs(t.east-n.east)<=e&&Math.abs(t.north-n.north)<=e},Te.prototype.clone=function(t){return Te.clone(this,t)},Te.prototype.equals=function(t){return Te.equals(this,t)},Te.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.west===n.west&&t.south===n.south&&t.east===n.east&&t.north===n.north},Te.prototype.equalsEpsilon=function(t,n){return Te.equalsEpsilon(this,t,n)},Te._validate=function(t){N.typeOf.object("rectangle",t);const n=t.north;N.typeOf.number.greaterThanOrEquals("north",n,-he.PI_OVER_TWO),N.typeOf.number.lessThanOrEquals("north",n,he.PI_OVER_TWO);const e=t.south;N.typeOf.number.greaterThanOrEquals("south",e,-he.PI_OVER_TWO),N.typeOf.number.lessThanOrEquals("south",e,he.PI_OVER_TWO);const i=t.west;N.typeOf.number.greaterThanOrEquals("west",i,-Math.PI),N.typeOf.number.lessThanOrEquals("west",i,Math.PI);const o=t.east;N.typeOf.number.greaterThanOrEquals("east",o,-Math.PI),N.typeOf.number.lessThanOrEquals("east",o,Math.PI)},Te.southwest=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.west,n.latitude=t.south,n.height=0,n):new Qe(t.west,t.south)},Te.northwest=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.west,n.latitude=t.north,n.height=0,n):new Qe(t.west,t.north)},Te.northeast=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.east,n.latitude=t.north,n.height=0,n):new Qe(t.east,t.north)},Te.southeast=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.east,n.latitude=t.south,n.height=0,n):new Qe(t.east,t.south)},Te.center=function(t,n){N.typeOf.object("rectangle",t);let e=t.east;const i=t.west;e<i&&(e+=he.TWO_PI);const o=he.negativePiToPi((i+e)*.5),r=(t.south+t.north)*.5;return ne(n)?(n.longitude=o,n.latitude=r,n.height=0,n):new Qe(o,r)},Te.intersection=function(t,n,e){N.typeOf.object("rectangle",t),N.typeOf.object("otherRectangle",n);let i=t.east,o=t.west,r=n.east,a=n.west;i<o&&r>0?i+=he.TWO_PI:r<a&&i>0&&(r+=he.TWO_PI),i<o&&a<0?a+=he.TWO_PI:r<a&&o<0&&(o+=he.TWO_PI);const s=he.negativePiToPi(Math.max(o,a)),l=he.negativePiToPi(Math.min(i,r));if((t.west<t.east||n.west<n.east)&&l<=s)return;const u=Math.max(t.south,n.south),A=Math.min(t.north,n.north);if(!(u>=A))return ne(e)?(e.west=s,e.south=u,e.east=l,e.north=A,e):new Te(s,u,l,A)},Te.simpleIntersection=function(t,n,e){N.typeOf.object("rectangle",t),N.typeOf.object("otherRectangle",n);const i=Math.max(t.west,n.west),o=Math.max(t.south,n.south),r=Math.min(t.east,n.east),a=Math.min(t.north,n.north);if(!(o>=a||i>=r))return ne(e)?(e.west=i,e.south=o,e.east=r,e.north=a,e):new Te(i,o,r,a)},Te.union=function(t,n,e){N.typeOf.object("rectangle",t),N.typeOf.object("otherRectangle",n),ne(e)||(e=new Te);let i=t.east,o=t.west,r=n.east,a=n.west;i<o&&r>0?i+=he.TWO_PI:r<a&&i>0&&(r+=he.TWO_PI),i<o&&a<0?a+=he.TWO_PI:r<a&&o<0&&(o+=he.TWO_PI);const s=he.negativePiToPi(Math.min(o,a)),l=he.negativePiToPi(Math.max(i,r));return e.west=s,e.south=Math.min(t.south,n.south),e.east=l,e.north=Math.max(t.north,n.north),e},Te.expand=function(t,n,e){return N.typeOf.object("rectangle",t),N.typeOf.object("cartographic",n),ne(e)||(e=new Te),e.west=Math.min(t.west,n.longitude),e.south=Math.min(t.south,n.latitude),e.east=Math.max(t.east,n.longitude),e.north=Math.max(t.north,n.latitude),e},Te.contains=function(t,n){N.typeOf.object("rectangle",t),N.typeOf.object("cartographic",n);let e=n.longitude;const i=n.latitude,o=t.west;let r=t.east;return r<o&&(r+=he.TWO_PI,e<0&&(e+=he.TWO_PI)),(e>o||he.equalsEpsilon(e,o,he.EPSILON14))&&(e<r||he.equalsEpsilon(e,r,he.EPSILON14))&&i>=t.south&&i<=t.north};const g5=new Qe;Te.subsample=function(t,n,e,i){N.typeOf.object("rectangle",t),n=n??De.default,e=e??0,ne(i)||(i=[]);let o=0;const r=t.north,a=t.south,s=t.east,l=t.west,u=g5;u.height=e,u.longitude=l,u.latitude=r,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.longitude=s,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.latitude=a,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.longitude=l,i[o]=n.cartographicToCartesian(u,i[o]),o++,r<0?u.latitude=r:a>0?u.latitude=a:u.latitude=0;for(let A=1;A<8;++A)u.longitude=-Math.PI+A*he.PI_OVER_TWO,Te.contains(t,u)&&(i[o]=n.cartographicToCartesian(u,i[o]),o++);return u.latitude===0&&(u.longitude=l,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.longitude=s,i[o]=n.cartographicToCartesian(u,i[o]),o++),i.length=o,i},Te.subsection=function(t,n,e,i,o,r){if(N.typeOf.object("rectangle",t),N.typeOf.number.greaterThanOrEquals("westLerp",n,0),N.typeOf.number.lessThanOrEquals("westLerp",n,1),N.typeOf.number.greaterThanOrEquals("southLerp",e,0),N.typeOf.number.lessThanOrEquals("southLerp",e,1),N.typeOf.number.greaterThanOrEquals("eastLerp",i,0),N.typeOf.number.lessThanOrEquals("eastLerp",i,1),N.typeOf.number.greaterThanOrEquals("northLerp",o,0),N.typeOf.number.lessThanOrEquals("northLerp",o,1),N.typeOf.number.lessThanOrEquals("westLerp",n,i),N.typeOf.number.lessThanOrEquals("southLerp",e,o),ne(r)||(r=new Te),t.west<=t.east){const s=t.east-t.west;r.west=t.west+n*s,r.east=t.west+i*s}else{const s=he.TWO_PI+t.east-t.west;r.west=he.negativePiToPi(t.west+n*s),r.east=he.negativePiToPi(t.west+i*s)}const a=t.north-t.south;return r.south=t.south+e*a,r.north=t.south+o*a,n===1&&(r.west=t.east),i===1&&(r.east=t.east),e===1&&(r.south=t.north),o===1&&(r.north=t.north),r},Te.MAX_VALUE=Object.freeze(new Te(-Math.PI,-he.PI_OVER_TWO,Math.PI,he.PI_OVER_TWO));function Ws(t,n,e,i,o){this._format=t,this._datatype=n,this._width=e,this._height=i,this._buffer=o}Object.defineProperties(Ws.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}}),Ws.clone=function(t){if(ne(t))return new Ws(t._format,t._datatype,t._width,t._height,t._buffer)},Ws.prototype.clone=function(){return Ws.clone(this)};function rx(){if(!ne(Ut._canTransferArrayBuffer)){const t=$d("transferTypedArrayTest");t.postMessage=t.webkitPostMessage??t.postMessage;const n=99,e=new Int8Array([n]);try{t.postMessage({array:e},[e.buffer])}catch{return Ut._canTransferArrayBuffer=!1,Ut._canTransferArrayBuffer}Ut._canTransferArrayBuffer=new Promise(i=>{t.onmessage=function(o){const r=o.data.array,a=ne(r)&&r[0]===n;i(a),t.terminate(),Ut._canTransferArrayBuffer=a}})}return Ut._canTransferArrayBuffer}const Zd=new zs;function Xd(t){let n;try{n=new Blob([t],{type:"application/javascript"})}catch{const o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(t),n=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(n)}function $d(t){const n=new Wi(t),e=n.scheme().length!==0&&n.fragment().length===0,i=t.replace(/\.js$/,""),o={};let r,a;if(Td(t))a=t;else if(!e){const s=Gn(`${Ut._workerModulePrefix}/${i}.js`);Td(s)&&(a=s)}if(a){const s=`import "${a}";`;return r=Xd(s),o.type="module",new Worker(r,o)}if(!e&&typeof CESIUM_WORKERS<"u"){const s=`
|
|
382
|
+
*/var tR=wA.exports,Tb;function nR(){return Tb||(Tb=1,(function(t){(function(n,e){t.exports?t.exports=e(X4(),Y4(),eR()):n.URI=e(n.punycode,n.IPv6,n.SecondLevelDomains,n)})(tR,function(n,e,i,o){var r=o&&o.URI;function a(w,C){var U=arguments.length>=1,F=arguments.length>=2;if(!(this instanceof a))return U?F?new a(w,C):new a(w):new a;if(w===void 0){if(U)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?w=location.href+"":w=""}if(w===null&&U)throw new TypeError("null is not a valid argument for URI");return this.href(w),C!==void 0?this.absoluteTo(C):this}function s(w){return/^[0-9]+$/.test(w)}a.version="1.19.11";var l=a.prototype,u=Object.prototype.hasOwnProperty;function A(w){return w.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(w){return w===void 0?"Undefined":String(Object.prototype.toString.call(w)).slice(8,-1)}function f(w){return c(w)==="Array"}function d(w,C){var U={},F,D;if(c(C)==="RegExp")U=null;else if(f(C))for(F=0,D=C.length;F<D;F++)U[C[F]]=!0;else U[C]=!0;for(F=0,D=w.length;F<D;F++){var R=U&&U[w[F]]!==void 0||!U&&C.test(w[F]);R&&(w.splice(F,1),D--,F--)}return w}function p(w,C){var U,F;if(f(C)){for(U=0,F=C.length;U<F;U++)if(!p(w,C[U]))return!1;return!0}var D=c(C);for(U=0,F=w.length;U<F;U++)if(D==="RegExp"){if(typeof w[U]=="string"&&w[U].match(C))return!0}else if(w[U]===C)return!0;return!1}function g(w,C){if(!f(w)||!f(C)||w.length!==C.length)return!1;w.sort(),C.sort();for(var U=0,F=w.length;U<F;U++)if(w[U]!==C[U])return!1;return!0}function v(w){var C=/^\/+|\/+$/g;return w.replace(C,"")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(w){if(!(!w||!w.nodeName)){var C=w.nodeName.toLowerCase();if(!(C==="input"&&w.type!=="image"))return a.domAttributes[C]}};function y(w){return escape(w)}function m(w){return encodeURIComponent(w).replace(/[!'()*]/g,y).replace(/\*/g,"%2A")}a.encode=m,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=m,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(w,C){var U=a.encode(w+"");return C===void 0&&(C=a.escapeQuerySpace),C?U.replace(/%20/g,"+"):U},a.decodeQuery=function(w,C){w+="",C===void 0&&(C=a.escapeQuerySpace);try{return a.decode(C?w.replace(/\+/g,"%20"):w)}catch{return w}};var b={encode:"encode",decode:"decode"},x,E=function(w,C){return function(U){try{return a[C](U+"").replace(a.characters[w][C].expression,function(F){return a.characters[w][C].map[F]})}catch{return U}}};for(x in b)a[x+"PathSegment"]=E("pathname",b[x]),a[x+"UrnPathSegment"]=E("urnpath",b[x]);var B=function(w,C,U){return function(F){var D;U?D=function(Q){return a[C](a[U](Q))}:D=a[C];for(var R=(F+"").split(w),L=0,k=R.length;L<k;L++)R[L]=D(R[L]);return R.join(w)}};a.decodePath=B("/","decodePathSegment"),a.decodeUrnPath=B(":","decodeUrnPathSegment"),a.recodePath=B("/","encodePathSegment","decode"),a.recodeUrnPath=B(":","encodeUrnPathSegment","decode"),a.encodeReserved=E("reserved","encode"),a.parse=function(w,C){var U;return C||(C={preventInvalidHostname:a.preventInvalidHostname}),w=w.replace(a.leading_whitespace_expression,""),w=w.replace(a.ascii_tab_whitespace,""),U=w.indexOf("#"),U>-1&&(C.fragment=w.substring(U+1)||null,w=w.substring(0,U)),U=w.indexOf("?"),U>-1&&(C.query=w.substring(U+1)||null,w=w.substring(0,U)),w=w.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),w=w.replace(/^[/\\]{2,}/i,"//"),w.substring(0,2)==="//"?(C.protocol=null,w=w.substring(2),w=a.parseAuthority(w,C)):(U=w.indexOf(":"),U>-1&&(C.protocol=w.substring(0,U)||null,C.protocol&&!C.protocol.match(a.protocol_expression)?C.protocol=void 0:w.substring(U+1,U+3).replace(/\\/g,"/")==="//"?(w=w.substring(U+3),w=a.parseAuthority(w,C)):(w=w.substring(U+1),C.urn=!0))),C.path=w,C},a.parseHost=function(w,C){w||(w=""),w=w.replace(/\\/g,"/");var U=w.indexOf("/"),F,D;if(U===-1&&(U=w.length),w.charAt(0)==="[")F=w.indexOf("]"),C.hostname=w.substring(1,F)||null,C.port=w.substring(F+2,U)||null,C.port==="/"&&(C.port=null);else{var R=w.indexOf(":"),L=w.indexOf("/"),k=w.indexOf(":",R+1);k!==-1&&(L===-1||k<L)?(C.hostname=w.substring(0,U)||null,C.port=null):(D=w.substring(0,U).split(":"),C.hostname=D[0]||null,C.port=D[1]||null)}return C.hostname&&w.substring(U).charAt(0)!=="/"&&(U++,w="/"+w),C.preventInvalidHostname&&a.ensureValidHostname(C.hostname,C.protocol),C.port&&a.ensureValidPort(C.port),w.substring(U)||"/"},a.parseAuthority=function(w,C){return w=a.parseUserinfo(w,C),a.parseHost(w,C)},a.parseUserinfo=function(w,C){var U=w,F=w.indexOf("\\");F!==-1&&(w=w.replace(/\\/g,"/"));var D=w.indexOf("/"),R=w.lastIndexOf("@",D>-1?D:w.length-1),L;return R>-1&&(D===-1||R<D)?(L=w.substring(0,R).split(":"),C.username=L[0]?a.decode(L[0]):null,L.shift(),C.password=L[0]?a.decode(L.join(":")):null,w=U.substring(R+1)):(C.username=null,C.password=null),w},a.parseQuery=function(w,C){if(!w)return{};if(w=w.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!w)return{};for(var U={},F=w.split("&"),D=F.length,R,L,k,Q=0;Q<D;Q++)R=F[Q].split("="),L=a.decodeQuery(R.shift(),C),k=R.length?a.decodeQuery(R.join("="),C):null,L!=="__proto__"&&(u.call(U,L)?((typeof U[L]=="string"||U[L]===null)&&(U[L]=[U[L]]),U[L].push(k)):U[L]=k);return U},a.build=function(w){var C="",U=!1;return w.protocol&&(C+=w.protocol+":"),!w.urn&&(C||w.hostname)&&(C+="//",U=!0),C+=a.buildAuthority(w)||"",typeof w.path=="string"&&(w.path.charAt(0)!=="/"&&U&&(C+="/"),C+=w.path),typeof w.query=="string"&&w.query&&(C+="?"+w.query),typeof w.fragment=="string"&&w.fragment&&(C+="#"+w.fragment),C},a.buildHost=function(w){var C="";if(w.hostname)a.ip6_expression.test(w.hostname)?C+="["+w.hostname+"]":C+=w.hostname;else return"";return w.port&&(C+=":"+w.port),C},a.buildAuthority=function(w){return a.buildUserinfo(w)+a.buildHost(w)},a.buildUserinfo=function(w){var C="";return w.username&&(C+=a.encode(w.username)),w.password&&(C+=":"+a.encode(w.password)),C&&(C+="@"),C},a.buildQuery=function(w,C,U){var F="",D,R,L,k;for(R in w)if(R!=="__proto__"&&u.call(w,R))if(f(w[R]))for(D={},L=0,k=w[R].length;L<k;L++)w[R][L]!==void 0&&D[w[R][L]+""]===void 0&&(F+="&"+a.buildQueryParameter(R,w[R][L],U),C!==!0&&(D[w[R][L]+""]=!0));else w[R]!==void 0&&(F+="&"+a.buildQueryParameter(R,w[R],U));return F.substring(1)},a.buildQueryParameter=function(w,C,U){return a.encodeQuery(w,U)+(C!==null?"="+a.encodeQuery(C,U):"")},a.addQuery=function(w,C,U){if(typeof C=="object")for(var F in C)u.call(C,F)&&a.addQuery(w,F,C[F]);else if(typeof C=="string"){if(w[C]===void 0){w[C]=U;return}else typeof w[C]=="string"&&(w[C]=[w[C]]);f(U)||(U=[U]),w[C]=(w[C]||[]).concat(U)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(w,C,U){if(typeof C=="object")for(var F in C)u.call(C,F)&&a.setQuery(w,F,C[F]);else if(typeof C=="string")w[C]=U===void 0?null:U;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(w,C,U){var F,D,R;if(f(C))for(F=0,D=C.length;F<D;F++)w[C[F]]=void 0;else if(c(C)==="RegExp")for(R in w)C.test(R)&&(w[R]=void 0);else if(typeof C=="object")for(R in C)u.call(C,R)&&a.removeQuery(w,R,C[R]);else if(typeof C=="string")U!==void 0?c(U)==="RegExp"?!f(w[C])&&U.test(w[C])?w[C]=void 0:w[C]=d(w[C],U):w[C]===String(U)&&(!f(U)||U.length===1)?w[C]=void 0:f(w[C])&&(w[C]=d(w[C],U)):w[C]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(w,C,U,F){switch(c(C)){case"String":break;case"RegExp":for(var D in w)if(u.call(w,D)&&C.test(D)&&(U===void 0||a.hasQuery(w,D,U)))return!0;return!1;case"Object":for(var R in C)if(u.call(C,R)&&!a.hasQuery(w,R,C[R]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(U)){case"Undefined":return C in w;case"Boolean":var L=!!(f(w[C])?w[C].length:w[C]);return U===L;case"Function":return!!U(w[C],C,w);case"Array":if(!f(w[C]))return!1;var k=F?p:g;return k(w[C],U);case"RegExp":return f(w[C])?F?p(w[C],U):!1:!!(w[C]&&w[C].match(U));case"Number":U=String(U);case"String":return f(w[C])?F?p(w[C],U):!1:w[C]===U;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var w=[],C=[],U=0,F=0;F<arguments.length;F++){var D=new a(arguments[F]);w.push(D);for(var R=D.segment(),L=0;L<R.length;L++)typeof R[L]=="string"&&C.push(R[L]),R[L]&&U++}if(!C.length||!U)return new a("");var k=new a("").segment(C);return(w[0].path()===""||w[0].path().slice(0,1)==="/")&&k.path("/"+k.path()),k.normalize()},a.commonPath=function(w,C){var U=Math.min(w.length,C.length),F;for(F=0;F<U;F++)if(w.charAt(F)!==C.charAt(F)){F--;break}return F<1?w.charAt(0)===C.charAt(0)&&w.charAt(0)==="/"?"/":"":((w.charAt(F)!=="/"||C.charAt(F)!=="/")&&(F=w.substring(0,F).lastIndexOf("/")),w.substring(0,F+1))},a.withinString=function(w,C,U){U||(U={});var F=U.start||a.findUri.start,D=U.end||a.findUri.end,R=U.trim||a.findUri.trim,L=U.parens||a.findUri.parens,k=/[a-z0-9-]=["']?$/i;for(F.lastIndex=0;;){var Q=F.exec(w);if(!Q)break;var V=Q.index;if(U.ignoreHtml){var G=w.slice(Math.max(V-3,0),V);if(G&&k.test(G))continue}for(var $=V+w.slice(V).search(D),Y=w.slice(V,$),ie=-1;;){var re=L.exec(Y);if(!re)break;var le=re.index+re[0].length;ie=Math.max(ie,le)}if(ie>-1?Y=Y.slice(0,ie)+Y.slice(ie).replace(R,""):Y=Y.replace(R,""),!(Y.length<=Q[0].length)&&!(U.ignore&&U.ignore.test(Y))){$=V+Y.length;var ue=C(Y,V,$,w);if(ue===void 0){F.lastIndex=$;continue}ue=String(ue),w=w.slice(0,V)+ue+w.slice($),F.lastIndex=V+ue.length}}return F.lastIndex=0,w},a.ensureValidHostname=function(w,C){var U=!!w,F=!!C,D=!1;if(F&&(D=p(a.hostProtocols,C)),D&&!U)throw new TypeError("Hostname cannot be empty, if protocol is "+C);if(w&&w.match(a.invalid_hostname_characters)){if(!n)throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(n.toASCII(w).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(w){if(w){var C=Number(w);if(!(s(C)&&C>0&&C<65536))throw new TypeError('Port "'+w+'" is not a valid port')}},a.noConflict=function(w){if(w){var C={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(C.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(C.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(C.SecondLevelDomains=o.SecondLevelDomains.noConflict()),C}else o.URI===this&&(o.URI=r);return this},l.build=function(w){return w===!0?this._deferred_build=!0:(w===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},l.clone=function(){return new a(this)},l.valueOf=l.toString=function(){return this.build(!1)._string};function P(w){return function(C,U){return C===void 0?this._parts[w]||"":(this._parts[w]=C||null,this.build(!U),this)}}function I(w,C){return function(U,F){return U===void 0?this._parts[w]||"":(U!==null&&(U=U+"",U.charAt(0)===C&&(U=U.substring(1))),this._parts[w]=U,this.build(!F),this)}}l.protocol=P("protocol"),l.username=P("username"),l.password=P("password"),l.hostname=P("hostname"),l.port=P("port"),l.query=I("query","?"),l.fragment=I("fragment","#"),l.search=function(w,C){var U=this.query(w,C);return typeof U=="string"&&U.length?"?"+U:U},l.hash=function(w,C){var U=this.fragment(w,C);return typeof U=="string"&&U.length?"#"+U:U},l.pathname=function(w,C){if(w===void 0||w===!0){var U=this._parts.path||(this._parts.hostname?"/":"");return w?(this._parts.urn?a.decodeUrnPath:a.decodePath)(U):U}else return this._parts.urn?this._parts.path=w?a.recodeUrnPath(w):"":this._parts.path=w?a.recodePath(w):"/",this.build(!C),this},l.path=l.pathname,l.href=function(w,C){var U;if(w===void 0)return this.toString();this._string="",this._parts=a._parts();var F=w instanceof a,D=typeof w=="object"&&(w.hostname||w.path||w.pathname);if(w.nodeName){var R=a.getDomAttribute(w);w=w[R]||"",D=!1}if(!F&&D&&w.pathname!==void 0&&(w=w.toString()),typeof w=="string"||w instanceof String)this._parts=a.parse(String(w),this._parts);else if(F||D){var L=F?w._parts:w;for(U in L)U!=="query"&&u.call(this._parts,U)&&(this._parts[U]=L[U]);L.query&&this.query(L.query,!1)}else throw new TypeError("invalid input");return this.build(!C),this},l.is=function(w){var C=!1,U=!1,F=!1,D=!1,R=!1,L=!1,k=!1,Q=!this._parts.urn;switch(this._parts.hostname&&(Q=!1,U=a.ip4_expression.test(this._parts.hostname),F=a.ip6_expression.test(this._parts.hostname),C=U||F,D=!C,R=D&&i&&i.has(this._parts.hostname),L=D&&a.idn_expression.test(this._parts.hostname),k=D&&a.punycode_expression.test(this._parts.hostname)),w.toLowerCase()){case"relative":return Q;case"absolute":return!Q;case"domain":case"name":return D;case"sld":return R;case"ip":return C;case"ip4":case"ipv4":case"inet4":return U;case"ip6":case"ipv6":case"inet6":return F;case"idn":return L;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return k}return null};var O=l.protocol,M=l.port,S=l.hostname;l.protocol=function(w,C){if(w&&(w=w.replace(/:(\/\/)?$/,""),!w.match(a.protocol_expression)))throw new TypeError('Protocol "'+w+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return O.call(this,w,C)},l.scheme=l.protocol,l.port=function(w,C){return this._parts.urn?w===void 0?"":this:(w!==void 0&&(w===0&&(w=null),w&&(w+="",w.charAt(0)===":"&&(w=w.substring(1)),a.ensureValidPort(w))),M.call(this,w,C))},l.hostname=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w!==void 0){var U={preventInvalidHostname:this._parts.preventInvalidHostname},F=a.parseHost(w,U);if(F!=="/")throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-]');w=U.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(w,this._parts.protocol)}return S.call(this,w,C)},l.origin=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0){var U=this.protocol(),F=this.authority();return F?(U?U+"://":"")+this.authority():""}else{var D=a(w);return this.protocol(D.protocol()).authority(D.authority()).build(!C),this}},l.host=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var U=a.parseHost(w,this._parts);if(U!=="/")throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-]');return this.build(!C),this},l.authority=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var U=a.parseAuthority(w,this._parts);if(U!=="/")throw new TypeError('Hostname "'+w+'" contains characters other than [A-Z0-9.-]');return this.build(!C),this},l.userinfo=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0){var U=a.buildUserinfo(this._parts);return U&&U.substring(0,U.length-1)}else return w[w.length-1]!=="@"&&(w+="@"),a.parseUserinfo(w,this._parts),this.build(!C),this},l.resource=function(w,C){var U;return w===void 0?this.path()+this.search()+this.hash():(U=a.parse(w),this._parts.path=U.path,this._parts.query=U.query,this._parts.fragment=U.fragment,this.build(!C),this)},l.subdomain=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0){if(!this._parts.hostname||this.is("IP"))return"";var U=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,U)||""}else{var F=this._parts.hostname.length-this.domain().length,D=this._parts.hostname.substring(0,F),R=new RegExp("^"+A(D));if(w&&w.charAt(w.length-1)!=="."&&(w+="."),w.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return w&&a.ensureValidHostname(w,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(R,w),this.build(!C),this}},l.domain=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(typeof w=="boolean"&&(C=w,w=void 0),w===void 0){if(!this._parts.hostname||this.is("IP"))return"";var U=this._parts.hostname.match(/\./g);if(U&&U.length<2)return this._parts.hostname;var F=this._parts.hostname.length-this.tld(C).length-1;return F=this._parts.hostname.lastIndexOf(".",F-1)+1,this._parts.hostname.substring(F)||""}else{if(!w)throw new TypeError("cannot set domain empty");if(w.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(w,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=w;else{var D=new RegExp(A(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(D,w)}return this.build(!C),this}},l.tld=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(typeof w=="boolean"&&(C=w,w=void 0),w===void 0){if(!this._parts.hostname||this.is("IP"))return"";var U=this._parts.hostname.lastIndexOf("."),F=this._parts.hostname.substring(U+1);return C!==!0&&i&&i.list[F.toLowerCase()]&&i.get(this._parts.hostname)||F}else{var D;if(w)if(w.match(/[^a-zA-Z0-9-]/))if(i&&i.is(w))D=new RegExp(A(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(D,w);else throw new TypeError('TLD "'+w+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");D=new RegExp(A(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(D,w)}else throw new TypeError("cannot set TLD empty");return this.build(!C),this}},l.directory=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0||w===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var U=this._parts.path.length-this.filename().length-1,F=this._parts.path.substring(0,U)||(this._parts.hostname?"/":"");return w?a.decodePath(F):F}else{var D=this._parts.path.length-this.filename().length,R=this._parts.path.substring(0,D),L=new RegExp("^"+A(R));return this.is("relative")||(w||(w="/"),w.charAt(0)!=="/"&&(w="/"+w)),w&&w.charAt(w.length-1)!=="/"&&(w+="/"),w=a.recodePath(w),this._parts.path=this._parts.path.replace(L,w),this.build(!C),this}},l.filename=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(typeof w!="string"){if(!this._parts.path||this._parts.path==="/")return"";var U=this._parts.path.lastIndexOf("/"),F=this._parts.path.substring(U+1);return w?a.decodePathSegment(F):F}else{var D=!1;w.charAt(0)==="/"&&(w=w.substring(1)),w.match(/\.?\//)&&(D=!0);var R=new RegExp(A(this.filename())+"$");return w=a.recodePath(w),this._parts.path=this._parts.path.replace(R,w),D?this.normalizePath(C):this.build(!C),this}},l.suffix=function(w,C){if(this._parts.urn)return w===void 0?"":this;if(w===void 0||w===!0){if(!this._parts.path||this._parts.path==="/")return"";var U=this.filename(),F=U.lastIndexOf("."),D,R;return F===-1?"":(D=U.substring(F+1),R=/^[a-z0-9%]+$/i.test(D)?D:"",w?a.decodePathSegment(R):R)}else{w.charAt(0)==="."&&(w=w.substring(1));var L=this.suffix(),k;if(L)w?k=new RegExp(A(L)+"$"):k=new RegExp(A("."+L)+"$");else{if(!w)return this;this._parts.path+="."+a.recodePath(w)}return k&&(w=a.recodePath(w),this._parts.path=this._parts.path.replace(k,w)),this.build(!C),this}},l.segment=function(w,C,U){var F=this._parts.urn?":":"/",D=this.path(),R=D.substring(0,1)==="/",L=D.split(F);if(w!==void 0&&typeof w!="number"&&(U=C,C=w,w=void 0),w!==void 0&&typeof w!="number")throw new Error('Bad segment "'+w+'", must be 0-based integer');if(R&&L.shift(),w<0&&(w=Math.max(L.length+w,0)),C===void 0)return w===void 0?L:L[w];if(w===null||L[w]===void 0)if(f(C)){L=[];for(var k=0,Q=C.length;k<Q;k++)!C[k].length&&(!L.length||!L[L.length-1].length)||(L.length&&!L[L.length-1].length&&L.pop(),L.push(v(C[k])))}else(C||typeof C=="string")&&(C=v(C),L[L.length-1]===""?L[L.length-1]=C:L.push(C));else C?L[w]=v(C):L.splice(w,1);return R&&L.unshift(""),this.path(L.join(F),U)},l.segmentCoded=function(w,C,U){var F,D,R;if(typeof w!="number"&&(U=C,C=w,w=void 0),C===void 0){if(F=this.segment(w,C,U),!f(F))F=F!==void 0?a.decode(F):void 0;else for(D=0,R=F.length;D<R;D++)F[D]=a.decode(F[D]);return F}if(!f(C))C=typeof C=="string"||C instanceof String?a.encode(C):C;else for(D=0,R=C.length;D<R;D++)C[D]=a.encode(C[D]);return this.segment(w,C,U)};var T=l.query;return l.query=function(w,C){if(w===!0)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof w=="function"){var U=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),F=w.call(this,U);return this._parts.query=a.buildQuery(F||U,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!C),this}else return w!==void 0&&typeof w!="string"?(this._parts.query=a.buildQuery(w,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!C),this):T.call(this,w,C)},l.setQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof w=="string"||w instanceof String)F[w]=C!==void 0?C:null;else if(typeof w=="object")for(var D in w)u.call(w,D)&&(F[D]=w[D]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(F,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof w!="string"&&(U=C),this.build(!U),this},l.addQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(F,w,C===void 0?null:C),this._parts.query=a.buildQuery(F,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof w!="string"&&(U=C),this.build(!U),this},l.removeQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(F,w,C),this._parts.query=a.buildQuery(F,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof w!="string"&&(U=C),this.build(!U),this},l.hasQuery=function(w,C,U){var F=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(F,w,C,U)},l.setSearch=l.setQuery,l.addSearch=l.addQuery,l.removeSearch=l.removeQuery,l.hasSearch=l.hasQuery,l.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},l.normalizeProtocol=function(w){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!w)),this},l.normalizeHostname=function(w){return this._parts.hostname&&(this.is("IDN")&&n?this._parts.hostname=n.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!w)),this},l.normalizePort=function(w){return typeof this._parts.protocol=="string"&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!w)),this},l.normalizePath=function(w){var C=this._parts.path;if(!C)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!w),this;if(this._parts.path==="/")return this;C=a.recodePath(C);var U,F="",D,R;for(C.charAt(0)!=="/"&&(U=!0,C="/"+C),(C.slice(-3)==="/.."||C.slice(-2)==="/.")&&(C+="/"),C=C.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),U&&(F=C.substring(1).match(/^(\.\.\/)+/)||"",F&&(F=F[0]));D=C.search(/\/\.\.(\/|$)/),D!==-1;){if(D===0){C=C.substring(3);continue}R=C.substring(0,D).lastIndexOf("/"),R===-1&&(R=D),C=C.substring(0,R)+C.substring(D+3)}return U&&this.is("relative")&&(C=F+C.substring(1)),this._parts.path=C,this.build(!w),this},l.normalizePathname=l.normalizePath,l.normalizeQuery=function(w){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!w)),this},l.normalizeFragment=function(w){return this._parts.fragment||(this._parts.fragment=null,this.build(!w)),this},l.normalizeSearch=l.normalizeQuery,l.normalizeHash=l.normalizeFragment,l.iso8859=function(){var w=a.encode,C=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=w,a.decode=C}return this},l.unicode=function(){var w=a.encode,C=a.decode;a.encode=m,a.decode=unescape;try{this.normalize()}finally{a.encode=w,a.decode=C}return this},l.readable=function(){var w=this.clone();w.username("").password("").normalize();var C="";if(w._parts.protocol&&(C+=w._parts.protocol+"://"),w._parts.hostname&&(w.is("punycode")&&n?(C+=n.toUnicode(w._parts.hostname),w._parts.port&&(C+=":"+w._parts.port)):C+=w.host()),w._parts.hostname&&w._parts.path&&w._parts.path.charAt(0)!=="/"&&(C+="/"),C+=w.path(!0),w._parts.query){for(var U="",F=0,D=w._parts.query.split("&"),R=D.length;F<R;F++){var L=(D[F]||"").split("=");U+="&"+a.decodeQuery(L[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),L[1]!==void 0&&(U+="="+a.decodeQuery(L[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}C+="?"+U.substring(1)}return C+=a.decodeQuery(w.hash(),!0),C},l.absoluteTo=function(w){var C=this.clone(),U=["protocol","username","password","hostname","port"],F,D,R;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(w instanceof a||(w=new a(w)),C._parts.protocol||(C._parts.protocol=w._parts.protocol,this._parts.hostname))return C;for(D=0;R=U[D];D++)C._parts[R]=w._parts[R];return C._parts.path?(C._parts.path.substring(-2)===".."&&(C._parts.path+="/"),C.path().charAt(0)!=="/"&&(F=w.directory(),F=F||(w.path().indexOf("/")===0?"/":""),C._parts.path=(F?F+"/":"")+C._parts.path,C.normalizePath())):(C._parts.path=w._parts.path,C._parts.query||(C._parts.query=w._parts.query)),C.build(),C},l.relativeTo=function(w){var C=this.clone().normalize(),U,F,D,R,L;if(C._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(w=new a(w).normalize(),U=C._parts,F=w._parts,R=C.path(),L=w.path(),R.charAt(0)!=="/")throw new Error("URI is already relative");if(L.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(U.protocol===F.protocol&&(U.protocol=null),U.username!==F.username||U.password!==F.password||U.protocol!==null||U.username!==null||U.password!==null)return C.build();if(U.hostname===F.hostname&&U.port===F.port)U.hostname=null,U.port=null;else return C.build();if(R===L)return U.path="",C.build();if(D=a.commonPath(R,L),!D)return C.build();var k=F.path.substring(D.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return U.path=k+U.path.substring(D.length)||"./",C.build()},l.equals=function(w){var C=this.clone(),U=new a(w),F={},D={},R={},L,k,Q;if(C.normalize(),U.normalize(),C.toString()===U.toString())return!0;if(L=C.query(),k=U.query(),C.query(""),U.query(""),C.toString()!==U.toString()||L.length!==k.length)return!1;F=a.parseQuery(L,this._parts.escapeQuerySpace),D=a.parseQuery(k,this._parts.escapeQuerySpace);for(Q in F)if(u.call(F,Q)){if(f(F[Q])){if(!g(F[Q],D[Q]))return!1}else if(F[Q]!==D[Q])return!1;R[Q]=!0}for(Q in D)if(u.call(D,Q)&&!R[Q])return!1;return!0},l.preventInvalidHostname=function(w){return this._parts.preventInvalidHostname=!!w,this},l.duplicateQueryParameters=function(w){return this._parts.duplicateQueryParameters=!!w,this},l.escapeQuerySpace=function(w){return this._parts.escapeQuerySpace=!!w,this},a})})(wA)),wA.exports}var iR=nR();const Wi=Al(iR);function rR(t){return(t.length===0||t[t.length-1]!=="/")&&(t=`${t}/`),t}function Ls(t,n){if(t===null||typeof t!="object")return t;n=n??!1;const e=new t.constructor;for(const i in t)if(t.hasOwnProperty(i)){let o=t[i];n&&(o=Ls(o,n)),e[i]=o}return e}function Or(t,n,e){e=e??!1;const i={},o=ne(t),r=ne(n);let a,s,l;if(o)for(a in t)t.hasOwnProperty(a)&&(s=t[a],r&&e&&typeof s=="object"&&n.hasOwnProperty(a)?(l=n[a],typeof l=="object"?i[a]=Or(s,l,e):i[a]=s):i[a]=s);if(r)for(a in n)n.hasOwnProperty(a)&&!i.hasOwnProperty(a)&&(l=n[a],i[a]=l);return i}function gl(){let t,n;const e=new Promise(function(i,o){t=i,n=o});return{resolve:t,reject:n,promise:e}}function yl(t,n){let e;return typeof document<"u"&&(e=document),yl._implementation(t,n,e)}yl._implementation=function(t,n,e){if(!ne(t))throw new pe("relative uri is required.");if(!ne(n)){if(typeof e>"u")return t;n=e.baseURI??e.location.href}const i=new Wi(t);return i.scheme()!==""?i.toString():i.absoluteTo(n).toString()};function oR(t,n){if(!ne(t))throw new pe("uri is required.");let e="";const i=t.lastIndexOf("/");return i!==-1&&(e=t.substring(0,i+1)),n&&(t=new Wi(t),t.query().length!==0&&(e+=`?${t.query()}`),t.fragment().length!==0&&(e+=`#${t.fragment()}`)),e}function sR(t){if(!ne(t))throw new pe("uri is required.");const n=new Wi(t);n.normalize();let e=n.path(),i=e.lastIndexOf("/");return i!==-1&&(e=e.substr(i+1)),i=e.lastIndexOf("."),i===-1?e="":e=e.substr(i+1),e}const Ib={};function Fb(t,n,e){ne(n)||(n=t.width),ne(e)||(e=t.height);let i=Ib[n];ne(i)||(i={},Ib[n]=i);let o=i[e];if(!ne(o)){const r=document.createElement("canvas");r.width=n,r.height=e,o=r.getContext("2d",{willReadFrequently:!0}),o.globalCompositeOperation="copy",i[e]=o}return o.drawImage(t,0,0,n,e),o.getImageData(0,0,n,e).data}const aR=/^blob:/i;function Mb(t){return N.typeOf.string("uri",t),aR.test(t)}let yi;function Td(t){ne(yi)||(yi=document.createElement("a")),yi.href=window.location.href;const n=yi.host,e=yi.protocol;return yi.href=t,yi.href=yi.href,e!==yi.protocol||n!==yi.host}const lR=/^data:/i;function Db(t){return N.typeOf.string("uri",t),lR.test(t)}function uR(t){const n=document.createElement("script");return n.async=!0,n.src=t,new Promise((e,i)=>{window.crossOriginIsolated&&n.setAttribute("crossorigin","anonymous");const o=document.getElementsByTagName("head")[0];n.onload=function(){n.onload=void 0,o.removeChild(n),e()},n.onerror=function(r){i(r)},o.appendChild(n)})}function cR(t){if(!ne(t))throw new pe("obj is required.");let n="";for(const e in t)if(t.hasOwnProperty(e)){const i=t[e],o=`${encodeURIComponent(e)}=`;if(Array.isArray(i))for(let r=0,a=i.length;r<a;++r)n+=`${o+encodeURIComponent(i[r])}&`;else n+=`${o+encodeURIComponent(i)}&`}return n=n.slice(0,-1),n}function hR(t){if(!ne(t))throw new pe("queryString is required.");const n={};if(t==="")return n;const e=t.replace(/\+/g,"%20").split(/[&;]/);for(let i=0,o=e.length;i<o;++i){const r=e[i].split("="),a=decodeURIComponent(r[0]);let s=r[1];ne(s)?s=decodeURIComponent(s):s="";const l=n[a];typeof l=="string"?n[a]=[l,s]:Array.isArray(l)?l.push(s):n[a]=s}return n}const vt=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5}),AR=Object.freeze({TERRAIN:0,IMAGERY:1,TILES3D:2,OTHER:3});function _A(t){t=t??gi.EMPTY_OBJECT;const n=t.throttleByServer??!1,e=t.throttle??!1;this.url=t.url,this.requestFunction=t.requestFunction,this.cancelFunction=t.cancelFunction,this.priorityFunction=t.priorityFunction,this.priority=t.priority??0,this.throttle=e,this.throttleByServer=n,this.type=t.type??AR.OTHER,this.serverKey=t.serverKey,this.state=vt.UNISSUED,this.deferred=void 0,this.cancelled=!1}_A.prototype.cancel=function(){this.cancelled=!0},_A.prototype.clone=function(t){return ne(t)?(t.url=this.url,t.requestFunction=this.requestFunction,t.cancelFunction=this.cancelFunction,t.priorityFunction=this.priorityFunction,t.priority=this.priority,t.throttle=this.throttle,t.throttleByServer=this.throttleByServer,t.type=this.type,t.serverKey=this.serverKey,t.state=vt.UNISSUED,t.deferred=void 0,t.cancelled=!1,t):new _A(this)};function fR(t){const n={};if(!t)return n;const e=t.split(`\r
|
|
383
|
+
`);for(let i=0;i<e.length;++i){const o=e[i],r=o.indexOf(": ");if(r>0){const a=o.substring(0,r),s=o.substring(r+2);n[a]=s}}return n}function vl(t,n,e){this.statusCode=t,this.response=n,this.responseHeaders=e,typeof this.responseHeaders=="string"&&(this.responseHeaders=fR(this.responseHeaders))}vl.prototype.toString=function(){let t="Request has failed.";return ne(this.statusCode)&&(t+=` Status Code: ${this.statusCode}`),t};function zs(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}Object.defineProperties(zs.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),zs.prototype.addEventListener=function(t,n){N.typeOf.func("listener",t),this._listeners.push(t),this._scopes.push(n);const e=this;return function(){e.removeEventListener(t,n)}},zs.prototype.removeEventListener=function(t,n){N.typeOf.func("listener",t);const e=this._listeners,i=this._scopes;let o=-1;for(let r=0;r<e.length;r++)if(e[r]===t&&i[r]===n){o=r;break}return o!==-1?(this._insideRaiseEvent?(this._toRemove.push(o),e[o]=void 0,i[o]=void 0):(e.splice(o,1),i.splice(o,1)),!0):!1};function pR(t,n){return n-t}zs.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;let t;const n=this._listeners,e=this._scopes;let i=n.length;for(t=0;t<i;t++){const r=n[t];ne(r)&&n[t].apply(e[t],arguments)}const o=this._toRemove;if(i=o.length,i>0){for(o.sort(pR),t=0;t<i;t++){const r=o[t];n.splice(r,1),e.splice(r,1)}o.length=0}this._insideRaiseEvent=!1};function Bo(t){N.typeOf.object("options",t),N.defined("options.comparator",t.comparator),this._comparator=t.comparator,this._array=[],this._length=0,this._maximumLength=void 0}Object.defineProperties(Bo.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(t){N.typeOf.number.greaterThanOrEquals("maximumLength",t,0);const n=this._length;if(t<n){const e=this._array;for(let i=t;i<n;++i)e[i]=void 0;this._length=t,e.length=t}this._maximumLength=t}},comparator:{get:function(){return this._comparator}}});function Id(t,n,e){const i=t[n];t[n]=t[e],t[e]=i}Bo.prototype.reserve=function(t){t=t??this._length,this._array.length=t},Bo.prototype.heapify=function(t){t=t??0;const n=this._length,e=this._comparator,i=this._array;let o=-1,r=!0;for(;r;){const a=2*(t+1),s=a-1;s<n&&e(i[s],i[t])<0?o=s:o=t,a<n&&e(i[a],i[o])<0&&(o=a),o!==t?(Id(i,o,t),t=o):r=!1}},Bo.prototype.resort=function(){const t=this._length;for(let n=Math.ceil(t/2);n>=0;--n)this.heapify(n)},Bo.prototype.insert=function(t){N.defined("element",t);const n=this._array,e=this._comparator,i=this._maximumLength;let o=this._length++;for(o<n.length?n[o]=t:n.push(t);o!==0;){const a=Math.floor((o-1)/2);if(e(n[o],n[a])<0)Id(n,o,a),o=a;else break}let r;return ne(i)&&this._length>i&&(r=n[i],this._length=i),r},Bo.prototype.pop=function(t){if(t=t??0,this._length===0)return;N.typeOf.number.lessThan("index",t,this._length);const n=this._array,e=n[t];return Id(n,t,--this._length),this.heapify(t),n[this._length]=void 0,e};function dR(t,n){return t.priority-n.priority}const qe={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0};let ks=20;const Yt=new Bo({comparator:dR});Yt.maximumLength=ks,Yt.reserve(ks);const vi=[];let ji={};const mR=typeof document<"u"?new Wi(document.location.href):new Wi,CA=new zs;function it(){}it.maximumRequests=50,it.maximumRequestsPerServer=18,it.requestsByServer={},it.throttleRequests=!0,it.debugShowStatistics=!1,it.requestCompletedEvent=CA,Object.defineProperties(it,{statistics:{get:function(){return qe}},priorityHeapLength:{get:function(){return ks},set:function(t){if(t<ks)for(;Yt.length>t;){const n=Yt.pop();To(n)}ks=t,Yt.maximumLength=t,Yt.reserve(t)}}});function Rb(t){ne(t.priorityFunction)&&(t.priority=t.priorityFunction())}it.serverHasOpenSlots=function(t,n){n=n??1;const e=it.requestsByServer[t]??it.maximumRequestsPerServer;return ji[t]+n<=e},it.heapHasOpenSlots=function(t){return Yt.length+t<=ks};function Ub(t){return t.state===vt.UNISSUED&&(t.state=vt.ISSUED,t.deferred=gl()),t.deferred.promise}function gR(t){return function(n){if(t.state===vt.CANCELLED)return;const e=t.deferred;--qe.numberOfActiveRequests,--ji[t.serverKey],CA.raiseEvent(),t.state=vt.RECEIVED,t.deferred=void 0,e.resolve(n)}}function yR(t){return function(n){t.state!==vt.CANCELLED&&(++qe.numberOfFailedRequests,--qe.numberOfActiveRequests,--ji[t.serverKey],CA.raiseEvent(n),t.state=vt.FAILED,t.deferred.reject(n))}}function Ob(t){const n=Ub(t);return t.state=vt.ACTIVE,vi.push(t),++qe.numberOfActiveRequests,++qe.numberOfActiveRequestsEver,++ji[t.serverKey],t.requestFunction().then(gR(t)).catch(yR(t)),n}function To(t){const n=t.state===vt.ACTIVE;if(t.state=vt.CANCELLED,++qe.numberOfCancelledRequests,ne(t.deferred)){const e=t.deferred;t.deferred=void 0,e.reject()}n&&(--qe.numberOfActiveRequests,--ji[t.serverKey],++qe.numberOfCancelledActiveRequests),ne(t.cancelFunction)&&t.cancelFunction()}it.update=function(){let t,n,e=0;const i=vi.length;for(t=0;t<i;++t){if(n=vi[t],n.cancelled&&To(n),n.state!==vt.ACTIVE){++e;continue}e>0&&(vi[t-e]=n)}vi.length-=e;const o=Yt.internalArray,r=Yt.length;for(t=0;t<r;++t)Rb(o[t]);Yt.resort();const a=Math.max(it.maximumRequests-vi.length,0);let s=0;for(;s<a&&Yt.length>0;){if(n=Yt.pop(),n.cancelled){To(n);continue}if(n.throttleByServer&&!it.serverHasOpenSlots(n.serverKey)){To(n);continue}Ob(n),++s}vR()},it.getServerKey=function(t){N.typeOf.string("url",t);let n=new Wi(t);n.scheme()===""&&(n=n.absoluteTo(mR),n.normalize());let e=n.authority();/:/.test(e)||(e=`${e}:${n.scheme()==="https"?"443":"80"}`);const i=ji[e];return ne(i)||(ji[e]=0),e},it.request=function(t){if(N.typeOf.object("request",t),N.typeOf.string("request.url",t.url),N.typeOf.func("request.requestFunction",t.requestFunction),Db(t.url)||Mb(t.url))return CA.raiseEvent(),t.state=vt.RECEIVED,t.requestFunction();if(++qe.numberOfAttemptedRequests,ne(t.serverKey)||(t.serverKey=it.getServerKey(t.url)),it.throttleRequests&&t.throttleByServer&&!it.serverHasOpenSlots(t.serverKey))return;if(!it.throttleRequests||!t.throttle)return Ob(t);if(vi.length>=it.maximumRequests)return;Rb(t);const n=Yt.insert(t);if(ne(n)){if(n===t)return;To(n)}return Ub(t)};function vR(){it.debugShowStatistics&&(qe.numberOfActiveRequests===0&&qe.lastNumberOfActiveRequests>0&&(qe.numberOfAttemptedRequests>0&&(console.log(`Number of attempted requests: ${qe.numberOfAttemptedRequests}`),qe.numberOfAttemptedRequests=0),qe.numberOfCancelledRequests>0&&(console.log(`Number of cancelled requests: ${qe.numberOfCancelledRequests}`),qe.numberOfCancelledRequests=0),qe.numberOfCancelledActiveRequests>0&&(console.log(`Number of cancelled active requests: ${qe.numberOfCancelledActiveRequests}`),qe.numberOfCancelledActiveRequests=0),qe.numberOfFailedRequests>0&&(console.log(`Number of failed requests: ${qe.numberOfFailedRequests}`),qe.numberOfFailedRequests=0)),qe.lastNumberOfActiveRequests=qe.numberOfActiveRequests)}it.clearForSpecs=function(){for(;Yt.length>0;){const n=Yt.pop();To(n)}const t=vi.length;for(let n=0;n<t;++n)To(vi[n]);vi.length=0,ji={},qe.numberOfAttemptedRequests=0,qe.numberOfActiveRequests=0,qe.numberOfCancelledRequests=0,qe.numberOfCancelledActiveRequests=0,qe.numberOfFailedRequests=0,qe.numberOfActiveRequestsEver=0,qe.lastNumberOfActiveRequests=0},it.numberOfActiveRequestsByServer=function(t){return ji[t]},it.requestHeap=Yt;const Qs={};let Vs={};Qs.add=function(t,n){if(!ne(t))throw new pe("host is required.");if(!ne(n)||n<=0)throw new pe("port is required to be greater than 0.");const e=`${t.toLowerCase()}:${n}`;ne(Vs[e])||(Vs[e]=!0)},Qs.remove=function(t,n){if(!ne(t))throw new pe("host is required.");if(!ne(n)||n<=0)throw new pe("port is required to be greater than 0.");const e=`${t.toLowerCase()}:${n}`;ne(Vs[e])&&delete Vs[e]};function wR(t){const n=new Wi(t);n.normalize();let e=n.authority();if(e.length!==0){if(n.authority(e),e.indexOf("@")!==-1&&(e=e.split("@")[1]),e.indexOf(":")===-1){let i=n.scheme();if(i.length===0&&(i=window.location.protocol,i=i.substring(0,i.length-1)),i==="http")e+=":80";else if(i==="https")e+=":443";else return}return e}}Qs.contains=function(t){if(!ne(t))throw new pe("url is required.");const n=wR(t);return!!(ne(n)&&ne(Vs[n]))},Qs.clear=function(){Vs={}};const Lb=(function(){try{const t=new XMLHttpRequest;return t.open("GET","#",!0),t.responseType="blob",t.responseType==="blob"}catch{return!1}})();function xe(t){t=t??gi.EMPTY_OBJECT,typeof t=="string"&&(t={url:t}),N.typeOf.string("options.url",t.url),this._url=void 0,this._templateValues=wi(t.templateValues,{}),this._queryParameters=wi(t.queryParameters,{}),this.headers=wi(t.headers,{}),this.request=t.request??new _A,this.proxy=t.proxy,this.retryCallback=t.retryCallback,this.retryAttempts=t.retryAttempts??0,this._retryCount=0,t.parseUrl??!0?this.parseUrl(t.url,!0,!0):this._url=t.url,this._credits=t.credits}function wi(t,n){return ne(t)?Ls(t):n}xe.createIfNeeded=function(t){return t instanceof xe?t.getDerivedResource({request:t.request}):typeof t!="string"?t:new xe({url:t})};let Ns;xe.supportsImageBitmapOptions=function(){return ne(Ns)?Ns:typeof createImageBitmap!="function"?(Ns=Promise.resolve(!1),Ns):(Ns=xe.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAAE4g3rEiDgAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADElEQVQI12Ng6GAAAAEUAIngE3ZiAAAAAElFTkSuQmCC"}).then(function(n){const e={imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"};return Promise.all([createImageBitmap(n,e),createImageBitmap(n)])}).then(function(n){const e=Fb(n[0]),i=Fb(n[1]);return e[1]!==i[1]}).catch(function(){return!1}),Ns)},Object.defineProperties(xe,{isBlobSupported:{get:function(){return Lb}}}),Object.defineProperties(xe.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(t){this.parseUrl(t,!1,!1)}},extension:{get:function(){return sR(this._url)}},isDataUri:{get:function(){return Db(this._url)}},isBlobUri:{get:function(){return Mb(this._url)}},isCrossOriginUrl:{get:function(){return Td(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}},credits:{get:function(){return this._credits}}}),xe.prototype.toString=function(){return this.getUrlComponent(!0,!0)},xe.prototype.parseUrl=function(t,n,e,i){let o=new Wi(t);const r=bR(o.query());this._queryParameters=n?SA(r,this.queryParameters,e):r,o.search(""),o.fragment(""),ne(i)&&o.scheme()===""&&(o=o.absoluteTo(yl(i))),this._url=o.toString()};function bR(t){return t.length===0?{}:t.indexOf("=")===-1?{[t]:void 0}:hR(t)}function SA(t,n,e){if(!e)return Or(t,n);const i=Ls(t,!0);for(const o in n)if(n.hasOwnProperty(o)){let r=i[o];const a=n[o];ne(r)?(Array.isArray(r)||(r=i[o]=[r]),i[o]=r.concat(a)):i[o]=Array.isArray(a)?a.slice():a}return i}xe.prototype.getUrlComponent=function(t,n){if(this.isDataUri)return this._url;let e=this._url;t&&(e=`${e}${xR(this.queryParameters)}`),e=e.replace(/%7B/g,"{").replace(/%7D/g,"}");const i=this._templateValues;return Object.keys(i).length>0&&(e=e.replace(/{(.*?)}/g,function(o,r){const a=i[r];return ne(a)?encodeURIComponent(a):o})),n&&ne(this.proxy)&&(e=this.proxy.getURL(e)),e};function xR(t){const n=Object.keys(t);return n.length===0?"":n.length===1&&!ne(t[n[0]])?`?${n[0]}`:`?${cR(t)}`}xe.prototype.setQueryParameters=function(t,n){n?this._queryParameters=SA(this._queryParameters,t,!1):this._queryParameters=SA(t,this._queryParameters,!1)},xe.prototype.appendQueryParameters=function(t){this._queryParameters=SA(t,this._queryParameters,!0)},xe.prototype.setTemplateValues=function(t,n){n?this._templateValues=Or(this._templateValues,t):this._templateValues=Or(t,this._templateValues)},xe.prototype.getDerivedResource=function(t){const n=this.clone();if(n._retryCount=0,ne(t.url)){const e=t.preserveQueryParameters??!1;n.parseUrl(t.url,!0,e,this._url)}return ne(t.queryParameters)&&(n._queryParameters=Or(t.queryParameters,n.queryParameters)),ne(t.templateValues)&&(n._templateValues=Or(t.templateValues,n.templateValues)),ne(t.headers)&&(n.headers=Or(t.headers,n.headers)),ne(t.proxy)&&(n.proxy=t.proxy),ne(t.request)&&(n.request=t.request),ne(t.retryCallback)&&(n.retryCallback=t.retryCallback),ne(t.retryAttempts)&&(n.retryAttempts=t.retryAttempts),n},xe.prototype.retryOnError=function(t){const n=this.retryCallback;if(typeof n!="function"||this._retryCount>=this.retryAttempts)return Promise.resolve(!1);const e=this;return Promise.resolve(n(this,t)).then(function(i){return++e._retryCount,i})},xe.prototype.clone=function(t){return ne(t)?(t._url=this._url,t._queryParameters=Ls(this._queryParameters),t._templateValues=Ls(this._templateValues),t.headers=Ls(this.headers),t.proxy=this.proxy,t.retryCallback=this.retryCallback,t.retryAttempts=this.retryAttempts,t._retryCount=0,t.request=this.request.clone(),t):new xe({url:this._url,queryParameters:this.queryParameters,templateValues:this.templateValues,headers:this.headers,proxy:this.proxy,retryCallback:this.retryCallback,retryAttempts:this.retryAttempts,request:this.request.clone(),parseUrl:!1,credits:ne(this.credits)?this.credits.slice():void 0})},xe.prototype.getBaseUri=function(t){return oR(this.getUrlComponent(t),t)},xe.prototype.appendForwardSlash=function(){this._url=rR(this._url)},xe.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},xe.fetchArrayBuffer=function(t){return new xe(t).fetchArrayBuffer()},xe.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},xe.fetchBlob=function(t){return new xe(t).fetchBlob()},xe.prototype.fetchImage=function(t){t=t??gi.EMPTY_OBJECT;const n=t.preferImageBitmap??!1,e=t.preferBlob??!1,i=t.flipY??!1,o=t.skipColorSpaceConversion??!1;if(Md(this.request),!Lb||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!e)return Fd({resource:this,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:n});const r=this.fetchBlob();if(!ne(r))return;let a,s,l,u;return xe.supportsImageBitmapOptions().then(function(A){return a=A,s=a&&n,r}).then(function(A){if(!ne(A))return;if(u=A,s)return xe.createImageBitmapFromBlob(A,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o});const c=window.URL.createObjectURL(A);return l=new xe({url:c}),Fd({resource:l,flipY:i,skipColorSpaceConversion:o,preferImageBitmap:!1})}).then(function(A){if(ne(A))return A.blob=u,s||window.URL.revokeObjectURL(l.url),A}).catch(function(A){return ne(l)&&window.URL.revokeObjectURL(l.url),A.blob=u,Promise.reject(A)})};function Fd(t){const n=t.resource,e=t.flipY,i=t.skipColorSpaceConversion,o=t.preferImageBitmap,r=n.request;r.url=n.url,r.requestFunction=function(){let s=!1;!n.isDataUri&&!n.isBlobUri&&(s=n.isCrossOriginUrl);const l=gl();return xe._Implementations.createImage(r,s,l,e,i,o),l.promise};const a=it.request(r);if(ne(a))return a.catch(function(s){return r.state!==vt.FAILED?Promise.reject(s):n.retryOnError(s).then(function(l){return l?(r.state=vt.UNISSUED,r.deferred=void 0,Fd({resource:n,flipY:e,skipColorSpaceConversion:i,preferImageBitmap:o})):Promise.reject(s)})})}xe.fetchImage=function(t){return new xe(t).fetchImage({flipY:t.flipY,skipColorSpaceConversion:t.skipColorSpaceConversion,preferBlob:t.preferBlob,preferImageBitmap:t.preferImageBitmap})},xe.prototype.fetchText=function(){return this.fetch({responseType:"text"})},xe.fetchText=function(t){return new xe(t).fetchText()},xe.prototype.fetchJson=function(){const t=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(ne(t))return t.then(function(n){if(ne(n))return JSON.parse(n)})},xe.fetchJson=function(t){return new xe(t).fetchJson()},xe.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},xe.fetchXML=function(t){return new xe(t).fetchXML()},xe.prototype.fetchJsonp=function(t){t=t??"callback",Md(this.request);let n;do n=`loadJsonp${he.nextRandomNumber().toString().substring(2,8)}`;while(ne(window[n]));return zb(this,t,n)};function zb(t,n,e){const i={};i[n]=e,t.setQueryParameters(i);const o=t.request,r=t.url;o.url=r,o.requestFunction=function(){const s=gl();return window[e]=function(l){s.resolve(l);try{delete window[e]}catch{window[e]=void 0}},xe._Implementations.loadAndExecuteScript(r,e,s),s.promise};const a=it.request(o);if(ne(a))return a.catch(function(s){return o.state!==vt.FAILED?Promise.reject(s):t.retryOnError(s).then(function(l){return l?(o.state=vt.UNISSUED,o.deferred=void 0,zb(t,n,e)):Promise.reject(s)})})}xe.fetchJsonp=function(t){return new xe(t).fetchJsonp(t.callbackParameterName)},xe.prototype._makeRequest=function(t){const n=this;Md(n.request);const e=n.request,i=n.url;e.url=i,e.requestFunction=function(){const r=t.responseType,a=Or(t.headers,n.headers),s=t.overrideMimeType,l=t.method,u=t.data,A=gl(),c=xe._Implementations.loadWithXhr(i,r,l,u,a,A,s);return ne(c)&&ne(c.abort)&&(e.cancelFunction=function(){c.abort()}),A.promise};const o=it.request(e);if(ne(o))return o.then(function(r){return e.cancelFunction=void 0,r}).catch(function(r){return e.cancelFunction=void 0,e.state!==vt.FAILED?Promise.reject(r):n.retryOnError(r).then(function(a){return a?(e.state=vt.UNISSUED,e.deferred=void 0,n.fetch(t)):Promise.reject(r)})})};function Md(t){if(t.state===vt.ISSUED||t.state===vt.ACTIVE)throw new Nt("The Resource is already being fetched.");t.state=vt.UNISSUED,t.deferred=void 0}const _R=/^data:(.*?)(;base64)?,(.*)$/;function EA(t,n){const e=decodeURIComponent(n);return t?atob(e):e}function kb(t,n){const e=EA(t,n),i=new ArrayBuffer(e.length),o=new Uint8Array(i);for(let r=0;r<e.length;r++)o[r]=e.charCodeAt(r);return i}function CR(t,n){n=n??"";const e=t[1],i=!!t[2],o=t[3];let r,a;switch(n){case"":case"text":return EA(i,o);case"arraybuffer":return kb(i,o);case"blob":return r=kb(i,o),new Blob([r],{type:e});case"document":return a=new DOMParser,a.parseFromString(EA(i,o),e);case"json":return JSON.parse(EA(i,o));default:throw new pe(`Unhandled responseType: ${n}`)}}xe.prototype.fetch=function(t){return t=wi(t,{}),t.method="GET",this._makeRequest(t)},xe.fetch=function(t){return new xe(t).fetch({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.delete=function(t){return t=wi(t,{}),t.method="DELETE",this._makeRequest(t)},xe.delete=function(t){return new xe(t).delete({responseType:t.responseType,overrideMimeType:t.overrideMimeType,data:t.data})},xe.prototype.head=function(t){return t=wi(t,{}),t.method="HEAD",this._makeRequest(t)},xe.head=function(t){return new xe(t).head({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.options=function(t){return t=wi(t,{}),t.method="OPTIONS",this._makeRequest(t)},xe.options=function(t){return new xe(t).options({responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.post=function(t,n){return N.defined("data",t),n=wi(n,{}),n.method="POST",n.data=t,this._makeRequest(n)},xe.post=function(t){return new xe(t).post(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.put=function(t,n){return N.defined("data",t),n=wi(n,{}),n.method="PUT",n.data=t,this._makeRequest(n)},xe.put=function(t){return new xe(t).put(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe.prototype.patch=function(t,n){return N.defined("data",t),n=wi(n,{}),n.method="PATCH",n.data=t,this._makeRequest(n)},xe.patch=function(t){return new xe(t).patch(t.data,{responseType:t.responseType,overrideMimeType:t.overrideMimeType})},xe._Implementations={},xe._Implementations.loadImageElement=function(t,n,e){const i=new Image;i.onload=function(){i.naturalWidth===0&&i.naturalHeight===0&&i.width===0&&i.height===0&&(i.width=300,i.height=150),e.resolve(i)},i.onerror=function(o){e.reject(o)},n&&(Qs.contains(t)?i.crossOrigin="use-credentials":i.crossOrigin=""),i.src=t},xe._Implementations.createImage=function(t,n,e,i,o,r){const a=t.url;xe.supportsImageBitmapOptions().then(function(s){if(!(s&&r)){xe._Implementations.loadImageElement(a,n,e);return}const l="blob",u="GET",A=gl(),c=xe._Implementations.loadWithXhr(a,l,u,void 0,void 0,A,void 0,void 0,void 0);return ne(c)&&ne(c.abort)&&(t.cancelFunction=function(){c.abort()}),A.promise.then(function(f){if(!ne(f)){e.reject(new Nt(`Successfully retrieved ${a} but it contained no content.`));return}return xe.createImageBitmapFromBlob(f,{flipY:i,premultiplyAlpha:!1,skipColorSpaceConversion:o})}).then(function(f){e.resolve(f)})}).catch(function(s){e.reject(s)})},xe.createImageBitmapFromBlob=function(t,n){return N.defined("options",n),N.typeOf.bool("options.flipY",n.flipY),N.typeOf.bool("options.premultiplyAlpha",n.premultiplyAlpha),N.typeOf.bool("options.skipColorSpaceConversion",n.skipColorSpaceConversion),createImageBitmap(t,{imageOrientation:n.flipY?"flipY":"from-image",premultiplyAlpha:n.premultiplyAlpha?"premultiply":"none",colorSpaceConversion:n.skipColorSpaceConversion?"none":"default"})};function SR(t,n,e,i,o,r,a){fetch(t,{method:e,headers:o}).then(async s=>{if(!s.ok){const l={};s.headers.forEach((u,A)=>{l[A]=u}),r.reject(new vl(s.status,s,l));return}switch(n){case"text":r.resolve(s.text());break;case"json":r.resolve(s.json());break;default:r.resolve(new Uint8Array(await s.arrayBuffer()).buffer);break}}).catch(()=>{r.reject(new vl)})}const ER=typeof XMLHttpRequest>"u";xe._Implementations.loadWithXhr=function(t,n,e,i,o,r,a){const s=_R.exec(t);if(s!==null){r.resolve(CR(s,n));return}if(ER){SR(t,n,e,i,o,r);return}const l=new XMLHttpRequest;if(Qs.contains(t)&&(l.withCredentials=!0),l.open(e,t,!0),ne(a)&&ne(l.overrideMimeType)&&l.overrideMimeType(a),ne(o))for(const A in o)o.hasOwnProperty(A)&&l.setRequestHeader(A,o[A]);ne(n)&&(l.responseType=n);let u=!1;return typeof t=="string"&&(u=t.indexOf("file://")===0||typeof window<"u"&&window.location.origin==="file://"),l.onload=function(){if((l.status<200||l.status>=300)&&!(u&&l.status===0)){r.reject(new vl(l.status,l.response,l.getAllResponseHeaders()));return}const A=l.response,c=l.responseType;if(e==="HEAD"||e==="OPTIONS"){const d=l.getAllResponseHeaders().trim().split(/[\r\n]+/),p={};d.forEach(function(g){const v=g.split(": "),y=v.shift();p[y]=v.join(": ")}),r.resolve(p);return}if(l.status===204)r.resolve(void 0);else if(ne(A)&&(!ne(n)||c===n))r.resolve(A);else if(n==="json"&&typeof A=="string")try{r.resolve(JSON.parse(A))}catch(f){r.reject(f)}else(c===""||c==="document")&&ne(l.responseXML)&&l.responseXML.hasChildNodes()?r.resolve(l.responseXML):(c===""||c==="text")&&ne(l.responseText)?r.resolve(l.responseText):r.reject(new Nt("Invalid XMLHttpRequest response type."))},l.onerror=function(A){r.reject(new vl)},l.send(i),l},xe._Implementations.loadAndExecuteScript=function(t,n,e){return uR(t).catch(function(i){e.reject(i)})},xe._DefaultImplementations={},xe._DefaultImplementations.createImage=xe._Implementations.createImage,xe._DefaultImplementations.loadWithXhr=xe._Implementations.loadWithXhr,xe._DefaultImplementations.loadAndExecuteScript=xe._Implementations.loadAndExecuteScript,xe.DEFAULT=Object.freeze(new xe({url:typeof document>"u"?"":document.location.href.split("?")[0]}));function wl(t){t=t??gi.EMPTY_OBJECT,this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._addNewLeapSeconds=t.addNewLeapSeconds??!0,ne(t.data)?Qb(this,t.data):Qb(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}wl.fromUrl=async function(t,n){N.defined("url",t),n=n??gi.EMPTY_OBJECT;const e=xe.createIfNeeded(t);let i;try{i=await e.fetchJson()}catch{throw new Nt(`An error occurred while retrieving the EOP data from the URL ${e.url}.`)}return new wl({addNewLeapSeconds:n.addNewLeapSeconds,data:i})},wl.NONE=Object.freeze({compute:function(t,n){return ne(n)?(n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0):n=new _d(0,0,0,0,0),n}}),wl.prototype.compute=function(t,n){if(!ne(this._samples))return;if(ne(n)||(n=new _d(0,0,0,0,0)),this._samples.length===0)return n.xPoleWander=0,n.yPoleWander=0,n.xPoleOffset=0,n.yPoleOffset=0,n.ut1MinusUtc=0,n;const e=this._dates,i=this._lastIndex;let o=0,r=0;if(ne(i)){const s=e[i],l=e[i+1],u=we.lessThanOrEquals(s,t),A=!ne(l),c=A||we.greaterThanOrEquals(l,t);if(u&&c)return o=i,!A&&l.equals(t)&&++o,r=o+1,Nb(this,e,this._samples,t,o,r,n),n}let a=dl(e,t,we.compare,this._dateColumn);return a>=0?(a<e.length-1&&e[a+1].equals(t)&&++a,o=a,r=a):(r=~a,o=r-1,o<0&&(o=0)),this._lastIndex=o,Nb(this,e,this._samples,t,o,r,n),n};function PR(t,n){return we.compare(t.julianDate,n)}function Qb(t,n){if(!ne(n.columnNames))throw new Nt("Error in loaded EOP data: The columnNames property is required.");if(!ne(n.samples))throw new Nt("Error in loaded EOP data: The samples property is required.");const e=n.columnNames.indexOf("modifiedJulianDateUtc"),i=n.columnNames.indexOf("xPoleWanderRadians"),o=n.columnNames.indexOf("yPoleWanderRadians"),r=n.columnNames.indexOf("ut1MinusUtcSeconds"),a=n.columnNames.indexOf("xCelestialPoleOffsetRadians"),s=n.columnNames.indexOf("yCelestialPoleOffsetRadians"),l=n.columnNames.indexOf("taiMinusUtcSeconds");if(e<0||i<0||o<0||r<0||a<0||s<0||l<0)throw new Nt("Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns");const u=t._samples=n.samples,A=t._dates=[];t._dateColumn=e,t._xPoleWanderRadiansColumn=i,t._yPoleWanderRadiansColumn=o,t._ut1MinusUtcSecondsColumn=r,t._xCelestialPoleOffsetRadiansColumn=a,t._yCelestialPoleOffsetRadiansColumn=s,t._taiMinusUtcSecondsColumn=l,t._columnCount=n.columnNames.length,t._lastIndex=void 0;let c;const f=t._addNewLeapSeconds;for(let d=0,p=u.length;d<p;d+=t._columnCount){const g=u[d+e],v=u[d+l],y=g+pt.MODIFIED_JULIAN_DATE_DIFFERENCE,m=new we(y,v,Ve.TAI);if(A.push(m),f){if(v!==c&&ne(c)){const b=we.leapSeconds,x=dl(b,m,PR);if(x<0){const E=new Ye(m,v);b.splice(~x,0,E)}}c=v}}}function Vb(t,n,e,i,o){const r=e*i;o.xPoleWander=n[r+t._xPoleWanderRadiansColumn],o.yPoleWander=n[r+t._yPoleWanderRadiansColumn],o.xPoleOffset=n[r+t._xCelestialPoleOffsetRadiansColumn],o.yPoleOffset=n[r+t._yCelestialPoleOffsetRadiansColumn],o.ut1MinusUtc=n[r+t._ut1MinusUtcSecondsColumn]}function bl(t,n,e){return n+t*(e-n)}function Nb(t,n,e,i,o,r,a){const s=t._columnCount;if(r>n.length-1)return a.xPoleWander=0,a.yPoleWander=0,a.xPoleOffset=0,a.yPoleOffset=0,a.ut1MinusUtc=0,a;const l=n[o],u=n[r];if(l.equals(u)||i.equals(l))return Vb(t,e,o,s,a),a;if(i.equals(u))return Vb(t,e,r,s,a),a;const A=we.secondsDifference(i,l)/we.secondsDifference(u,l),c=o*s,f=r*s;let d=e[c+t._ut1MinusUtcSecondsColumn],p=e[f+t._ut1MinusUtcSecondsColumn];const g=p-d;if(g>.5||g<-.5){const v=e[c+t._taiMinusUtcSecondsColumn],y=e[f+t._taiMinusUtcSecondsColumn];v!==y&&(u.equals(i)?d=p:p-=y-v)}return a.xPoleWander=bl(A,e[c+t._xPoleWanderRadiansColumn],e[f+t._xPoleWanderRadiansColumn]),a.yPoleWander=bl(A,e[c+t._yPoleWanderRadiansColumn],e[f+t._yPoleWanderRadiansColumn]),a.xPoleOffset=bl(A,e[c+t._xCelestialPoleOffsetRadiansColumn],e[f+t._xCelestialPoleOffsetRadiansColumn]),a.yPoleOffset=bl(A,e[c+t._yCelestialPoleOffsetRadiansColumn],e[f+t._yCelestialPoleOffsetRadiansColumn]),a.ut1MinusUtc=bl(A,d,p),a}function Rt(t,n,e){this.heading=t??0,this.pitch=n??0,this.roll=e??0}Rt.fromQuaternion=function(t,n){if(!ne(t))throw new pe("quaternion is required");ne(n)||(n=new Rt);const e=2*(t.w*t.y-t.z*t.x),i=1-2*(t.x*t.x+t.y*t.y),o=2*(t.w*t.x+t.y*t.z),r=1-2*(t.y*t.y+t.z*t.z),a=2*(t.w*t.z+t.x*t.y);return n.heading=-Math.atan2(a,r),n.roll=Math.atan2(o,i),n.pitch=-he.asinClamped(e),n},Rt.fromDegrees=function(t,n,e,i){if(!ne(t))throw new pe("heading is required");if(!ne(n))throw new pe("pitch is required");if(!ne(e))throw new pe("roll is required");return ne(i)||(i=new Rt),i.heading=t*he.RADIANS_PER_DEGREE,i.pitch=n*he.RADIANS_PER_DEGREE,i.roll=e*he.RADIANS_PER_DEGREE,i},Rt.clone=function(t,n){if(ne(t))return ne(n)?(n.heading=t.heading,n.pitch=t.pitch,n.roll=t.roll,n):new Rt(t.heading,t.pitch,t.roll)},Rt.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.heading===n.heading&&t.pitch===n.pitch&&t.roll===n.roll},Rt.equalsEpsilon=function(t,n,e,i){return t===n||ne(t)&&ne(n)&&he.equalsEpsilon(t.heading,n.heading,e,i)&&he.equalsEpsilon(t.pitch,n.pitch,e,i)&&he.equalsEpsilon(t.roll,n.roll,e,i)},Rt.prototype.clone=function(t){return Rt.clone(this,t)},Rt.prototype.equals=function(t){return Rt.equals(this,t)},Rt.prototype.equalsEpsilon=function(t,n,e){return Rt.equalsEpsilon(this,t,n,e)},Rt.prototype.toString=function(){return`(${this.heading}, ${this.pitch}, ${this.roll})`};const Hb=/((?:.*\/)|^)Cesium\.js(?:\?|\#|$)/;function BR(){const t=document.getElementsByTagName("script");for(let n=0,e=t.length;n<e;++n){const i=t[n].getAttribute("src"),o=Hb.exec(i);if(o!==null)return o[1]}}let PA;function Gb(t){return typeof document>"u"?t:(ne(PA)||(PA=document.createElement("a")),PA.href=t,PA.href)}let Io;function Wb(){if(ne(Io))return Io;let t;if(typeof CESIUM_BASE_URL<"u"?t=CESIUM_BASE_URL:ne(is&&is.tagName.toUpperCase()==="SCRIPT"&&is.src||new URL("earthsdk3-cesium.iife.js",document.baseURI).href)?t=yl(".",is&&is.tagName.toUpperCase()==="SCRIPT"&&is.src||new URL("earthsdk3-cesium.iife.js",document.baseURI).href):typeof define=="object"&&ne(define.amd)&&!define.amd.toUrlUndefined&&ne(require.toUrl)?t=yl("..",Gn("Core/buildModuleUrl.js")):t=BR(),!ne(t))throw new pe("Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.");return Io=new xe({url:Gb(t)}),Io.appendForwardSlash(),Io}function TR(t){return Gb(require.toUrl(`../${t}`))}function jb(t){return Wb().getDerivedResource({url:t}).url}let BA;function Gn(t){return ne(BA)||(typeof define=="object"&&ne(define.amd)&&!define.amd.toUrlUndefined&&ne(require.toUrl)?BA=TR:BA=jb),BA(t)}Gn._cesiumScriptRegex=Hb,Gn._buildModuleUrlFromBaseUrl=jb,Gn._clearBaseResource=function(){Io=void 0},Gn.setBaseUrl=function(t){Io=xe.DEFAULT.getDerivedResource({url:t})},Gn.getCesiumBaseUrl=Wb;function qb(t,n,e){this.x=t,this.y=n,this.s=e}function Dd(t){t=t??gi.EMPTY_OBJECT,this._xysFileUrlTemplate=xe.createIfNeeded(t.xysFileUrlTemplate),this._interpolationOrder=t.interpolationOrder??9,this._sampleZeroJulianEphemerisDate=t.sampleZeroJulianEphemerisDate??24423965e-1,this._sampleZeroDateTT=new we(this._sampleZeroJulianEphemerisDate,0,Ve.TAI),this._stepSizeDays=t.stepSizeDays??1,this._samplesPerXysFile=t.samplesPerXysFile??1e3,this._totalSamples=t.totalSamples??27426,this._samples=new Array(this._totalSamples*3),this._chunkDownloadsInProgress=[];const n=this._interpolationOrder,e=this._denominators=new Array(n+1),i=this._xTable=new Array(n+1),o=Math.pow(this._stepSizeDays,n);for(let r=0;r<=n;++r){e[r]=o,i[r]=r*this._stepSizeDays;for(let a=0;a<=n;++a)a!==r&&(e[r]*=r-a);e[r]=1/e[r]}this._work=new Array(n+1),this._coef=new Array(n+1)}const IR=new we(0,0,Ve.TAI);function Rd(t,n,e){const i=IR;return i.dayNumber=n,i.secondsOfDay=e,we.daysDifference(i,t._sampleZeroDateTT)}Dd.prototype.preload=function(t,n,e,i){const o=Rd(this,t,n),r=Rd(this,e,i);let a=o/this._stepSizeDays-this._interpolationOrder/2|0;a<0&&(a=0);let s=r/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;s>=this._totalSamples&&(s=this._totalSamples-1);const l=a/this._samplesPerXysFile|0,u=s/this._samplesPerXysFile|0,A=[];for(let c=l;c<=u;++c)A.push(Ud(this,c));return Promise.all(A)},Dd.prototype.computeXysRadians=function(t,n,e){const i=Rd(this,t,n);if(i<0)return;const o=i/this._stepSizeDays|0;if(o>=this._totalSamples)return;const r=this._interpolationOrder;let a=o-(r/2|0);a<0&&(a=0);let s=a+r;s>=this._totalSamples&&(s=this._totalSamples-1,a=s-r,a<0&&(a=0));let l=!1;const u=this._samples;if(ne(u[a*3])||(Ud(this,a/this._samplesPerXysFile|0),l=!0),ne(u[s*3])||(Ud(this,s/this._samplesPerXysFile|0),l=!0),l)return;ne(e)?(e.x=0,e.y=0,e.s=0):e=new qb(0,0,0);const A=i-a*this._stepSizeDays,c=this._work,f=this._denominators,d=this._coef,p=this._xTable;let g,v;for(g=0;g<=r;++g)c[g]=A-p[g];for(g=0;g<=r;++g){for(d[g]=1,v=0;v<=r;++v)v!==g&&(d[g]*=c[v]);d[g]*=f[g];let y=(a+g)*3;e.x+=d[g]*u[y++],e.y+=d[g]*u[y++],e.s+=d[g]*u[y]}return e};function Ud(t,n){if(t._chunkDownloadsInProgress[n])return t._chunkDownloadsInProgress[n];let e;const i=t._xysFileUrlTemplate;ne(i)?e=i.getDerivedResource({templateValues:{0:n}}):e=new xe({url:Gn(`Assets/IAU2006_XYS/IAU2006_XYS_${n}.json`)});const o=e.fetchJson().then(function(r){t._chunkDownloadsInProgress[n]=!1;const a=t._samples,s=r.samples,l=n*t._samplesPerXysFile*3;for(let u=0,A=s.length;u<A;++u)a[l+u]=s[u]});return t._chunkDownloadsInProgress[n]=o,o}function ve(t,n,e,i){this.x=t??0,this.y=n??0,this.z=e??0,this.w=i??0}let xl=new ae;ve.fromAxisAngle=function(t,n,e){N.typeOf.object("axis",t),N.typeOf.number("angle",n);const i=n/2,o=Math.sin(i);xl=ae.normalize(t,xl);const r=xl.x*o,a=xl.y*o,s=xl.z*o,l=Math.cos(i);return ne(e)?(e.x=r,e.y=a,e.z=s,e.w=l,e):new ve(r,a,s,l)};const FR=[1,2,0],MR=new Array(3);ve.fromRotationMatrix=function(t,n){N.typeOf.object("matrix",t);let e,i,o,r,a;const s=t[me.COLUMN0ROW0],l=t[me.COLUMN1ROW1],u=t[me.COLUMN2ROW2],A=s+l+u;if(A>0)e=Math.sqrt(A+1),a=.5*e,e=.5/e,i=(t[me.COLUMN1ROW2]-t[me.COLUMN2ROW1])*e,o=(t[me.COLUMN2ROW0]-t[me.COLUMN0ROW2])*e,r=(t[me.COLUMN0ROW1]-t[me.COLUMN1ROW0])*e;else{const c=FR;let f=0;l>s&&(f=1),u>s&&u>l&&(f=2);const d=c[f],p=c[d];e=Math.sqrt(t[me.getElementIndex(f,f)]-t[me.getElementIndex(d,d)]-t[me.getElementIndex(p,p)]+1);const g=MR;g[f]=.5*e,e=.5/e,a=(t[me.getElementIndex(p,d)]-t[me.getElementIndex(d,p)])*e,g[d]=(t[me.getElementIndex(d,f)]+t[me.getElementIndex(f,d)])*e,g[p]=(t[me.getElementIndex(p,f)]+t[me.getElementIndex(f,p)])*e,i=-g[0],o=-g[1],r=-g[2]}return ne(n)?(n.x=i,n.y=o,n.z=r,n.w=a,n):new ve(i,o,r,a)};const Kb=new ve;let Zb=new ve,Od=new ve,Xb=new ve;ve.fromHeadingPitchRoll=function(t,n){return N.typeOf.object("headingPitchRoll",t),Xb=ve.fromAxisAngle(ae.UNIT_X,t.roll,Kb),Od=ve.fromAxisAngle(ae.UNIT_Y,-t.pitch,n),n=ve.multiply(Od,Xb,Od),Zb=ve.fromAxisAngle(ae.UNIT_Z,-t.heading,Kb),ve.multiply(Zb,n,n)};const TA=new ae,Ld=new ae,ii=new ve,$b=new ve,IA=new ve;ve.packedLength=4,ve.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.x,n[e++]=t.y,n[e++]=t.z,n[e]=t.w,n},ve.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new ve),e.x=t[n],e.y=t[n+1],e.z=t[n+2],e.w=t[n+3],e},ve.packedInterpolationLength=3,ve.convertPackedArrayForInterpolation=function(t,n,e,i){ve.unpack(t,e*4,IA),ve.conjugate(IA,IA);for(let o=0,r=e-n+1;o<r;o++){const a=o*3;ve.unpack(t,(n+o)*4,ii),ve.multiply(ii,IA,ii),ii.w<0&&ve.negate(ii,ii),ve.computeAxis(ii,TA);const s=ve.computeAngle(ii);ne(i)||(i=[]),i[a]=TA.x*s,i[a+1]=TA.y*s,i[a+2]=TA.z*s}},ve.unpackInterpolationResult=function(t,n,e,i,o){ne(o)||(o=new ve),ae.fromArray(t,0,Ld);const r=ae.magnitude(Ld);return ve.unpack(n,i*4,$b),r===0?ve.clone(ve.IDENTITY,ii):ve.fromAxisAngle(Ld,r,ii),ve.multiply(ii,$b,o)},ve.clone=function(t,n){if(ne(t))return ne(n)?(n.x=t.x,n.y=t.y,n.z=t.z,n.w=t.w,n):new ve(t.x,t.y,t.z,t.w)},ve.conjugate=function(t,n){return N.typeOf.object("quaternion",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=t.w,n},ve.magnitudeSquared=function(t){return N.typeOf.object("quaternion",t),t.x*t.x+t.y*t.y+t.z*t.z+t.w*t.w},ve.magnitude=function(t){return Math.sqrt(ve.magnitudeSquared(t))},ve.normalize=function(t,n){N.typeOf.object("result",n);const e=1/ve.magnitude(t),i=t.x*e,o=t.y*e,r=t.z*e,a=t.w*e;return n.x=i,n.y=o,n.z=r,n.w=a,n},ve.inverse=function(t,n){N.typeOf.object("result",n);const e=ve.magnitudeSquared(t);return n=ve.conjugate(t,n),ve.multiplyByScalar(n,1/e,n)},ve.add=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x+n.x,e.y=t.y+n.y,e.z=t.z+n.z,e.w=t.w+n.w,e},ve.subtract=function(t,n,e){return N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e),e.x=t.x-n.x,e.y=t.y-n.y,e.z=t.z-n.z,e.w=t.w-n.w,e},ve.negate=function(t,n){return N.typeOf.object("quaternion",t),N.typeOf.object("result",n),n.x=-t.x,n.y=-t.y,n.z=-t.z,n.w=-t.w,n},ve.dot=function(t,n){return N.typeOf.object("left",t),N.typeOf.object("right",n),t.x*n.x+t.y*n.y+t.z*n.z+t.w*n.w},ve.multiply=function(t,n,e){N.typeOf.object("left",t),N.typeOf.object("right",n),N.typeOf.object("result",e);const i=t.x,o=t.y,r=t.z,a=t.w,s=n.x,l=n.y,u=n.z,A=n.w,c=a*s+i*A+o*u-r*l,f=a*l-i*u+o*A+r*s,d=a*u+i*l-o*s+r*A,p=a*A-i*s-o*l-r*u;return e.x=c,e.y=f,e.z=d,e.w=p,e},ve.multiplyByScalar=function(t,n,e){return N.typeOf.object("quaternion",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x*n,e.y=t.y*n,e.z=t.z*n,e.w=t.w*n,e},ve.divideByScalar=function(t,n,e){return N.typeOf.object("quaternion",t),N.typeOf.number("scalar",n),N.typeOf.object("result",e),e.x=t.x/n,e.y=t.y/n,e.z=t.z/n,e.w=t.w/n,e},ve.computeAxis=function(t,n){N.typeOf.object("quaternion",t),N.typeOf.object("result",n);const e=t.w;if(Math.abs(e-1)<he.EPSILON6||Math.abs(e+1)<he.EPSILON6)return n.x=1,n.y=n.z=0,n;const i=1/Math.sqrt(1-e*e);return n.x=t.x*i,n.y=t.y*i,n.z=t.z*i,n},ve.computeAngle=function(t){return N.typeOf.object("quaternion",t),Math.abs(t.w-1)<he.EPSILON6?0:2*Math.acos(t.w)};let zd=new ve;ve.lerp=function(t,n,e,i){return N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i),zd=ve.multiplyByScalar(n,e,zd),i=ve.multiplyByScalar(t,1-e,i),ve.add(zd,i,i)};let Yb=new ve,kd=new ve,Qd=new ve;ve.slerp=function(t,n,e,i){N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i);let o=ve.dot(t,n),r=n;if(o<0&&(o=-o,r=Yb=ve.negate(n,Yb)),1-o<he.EPSILON6)return ve.lerp(t,r,e,i);const a=Math.acos(o);return kd=ve.multiplyByScalar(t,Math.sin((1-e)*a),kd),Qd=ve.multiplyByScalar(r,Math.sin(e*a),Qd),i=ve.add(kd,Qd,i),ve.multiplyByScalar(i,1/Math.sin(a),i)},ve.log=function(t,n){N.typeOf.object("quaternion",t),N.typeOf.object("result",n);const e=he.acosClamped(t.w);let i=0;return e!==0&&(i=e/Math.sin(e)),ae.multiplyByScalar(t,i,n)},ve.exp=function(t,n){N.typeOf.object("cartesian",t),N.typeOf.object("result",n);const e=ae.magnitude(t);let i=0;return e!==0&&(i=Math.sin(e)/e),n.x=t.x*i,n.y=t.y*i,n.z=t.z*i,n.w=Math.cos(e),n};const DR=new ae,RR=new ae,_l=new ve,Hs=new ve;ve.computeInnerQuadrangle=function(t,n,e,i){N.typeOf.object("q0",t),N.typeOf.object("q1",n),N.typeOf.object("q2",e),N.typeOf.object("result",i);const o=ve.conjugate(n,_l);ve.multiply(o,e,Hs);const r=ve.log(Hs,DR);ve.multiply(o,t,Hs);const a=ve.log(Hs,RR);return ae.add(r,a,r),ae.multiplyByScalar(r,.25,r),ae.negate(r,r),ve.exp(r,_l),ve.multiply(n,_l,i)},ve.squad=function(t,n,e,i,o,r){N.typeOf.object("q0",t),N.typeOf.object("q1",n),N.typeOf.object("s0",e),N.typeOf.object("s1",i),N.typeOf.number("t",o),N.typeOf.object("result",r);const a=ve.slerp(t,n,o,_l),s=ve.slerp(e,i,o,Hs);return ve.slerp(a,s,2*o*(1-o),r)};const UR=new ve,Jb=1.9011074535173003,FA=Ht.supportsTypedArrays()?new Float32Array(8):[],MA=Ht.supportsTypedArrays()?new Float32Array(8):[],qi=Ht.supportsTypedArrays()?new Float32Array(8):[],Ki=Ht.supportsTypedArrays()?new Float32Array(8):[];for(let t=0;t<7;++t){const n=t+1,e=2*n+1;FA[t]=1/(n*e),MA[t]=n/e}FA[7]=Jb/136,MA[7]=Jb*8/17,ve.fastSlerp=function(t,n,e,i){N.typeOf.object("start",t),N.typeOf.object("end",n),N.typeOf.number("t",e),N.typeOf.object("result",i);let o=ve.dot(t,n),r;o>=0?r=1:(r=-1,o=-o);const a=o-1,s=1-e,l=e*e,u=s*s;for(let d=7;d>=0;--d)qi[d]=(FA[d]*l-MA[d])*a,Ki[d]=(FA[d]*u-MA[d])*a;const A=r*e*(1+qi[0]*(1+qi[1]*(1+qi[2]*(1+qi[3]*(1+qi[4]*(1+qi[5]*(1+qi[6]*(1+qi[7])))))))),c=s*(1+Ki[0]*(1+Ki[1]*(1+Ki[2]*(1+Ki[3]*(1+Ki[4]*(1+Ki[5]*(1+Ki[6]*(1+Ki[7])))))))),f=ve.multiplyByScalar(t,c,UR);return ve.multiplyByScalar(n,A,i),ve.add(f,i,i)},ve.fastSquad=function(t,n,e,i,o,r){N.typeOf.object("q0",t),N.typeOf.object("q1",n),N.typeOf.object("s0",e),N.typeOf.object("s1",i),N.typeOf.number("t",o),N.typeOf.object("result",r);const a=ve.fastSlerp(t,n,o,_l),s=ve.fastSlerp(e,i,o,Hs);return ve.fastSlerp(a,s,2*o*(1-o),r)},ve.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.x===n.x&&t.y===n.y&&t.z===n.z&&t.w===n.w},ve.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t.x-n.x)<=e&&Math.abs(t.y-n.y)<=e&&Math.abs(t.z-n.z)<=e&&Math.abs(t.w-n.w)<=e},ve.ZERO=Object.freeze(new ve(0,0,0,0)),ve.IDENTITY=Object.freeze(new ve(0,0,0,1)),ve.prototype.clone=function(t){return ve.clone(this,t)},ve.prototype.equals=function(t){return ve.equals(this,t)},ve.prototype.equalsEpsilon=function(t,n){return ve.equalsEpsilon(this,t,n)},ve.prototype.toString=function(){return`(${this.x}, ${this.y}, ${this.z}, ${this.w})`};const ke={},Vd={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},Gs={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},Nd={},gn={east:new ae,north:new ae,up:new ae,west:new ae,south:new ae,down:new ae};let Lr=new ae,zr=new ae,kr=new ae;ke.localFrameToFixedFrameGenerator=function(t,n){if(!Vd.hasOwnProperty(t)||!Vd[t].hasOwnProperty(n))throw new pe("firstAxis and secondAxis must be east, north, up, west, south or down.");const e=Vd[t][n];let i;const o=t+n;return ne(Nd[o])?i=Nd[o]:(i=function(r,a,s){if(!ne(r))throw new pe("origin is required.");if(isNaN(r.x)||isNaN(r.y)||isNaN(r.z))throw new pe("origin has a NaN component");if(ne(s)||(s=new ge),ae.equalsEpsilon(r,ae.ZERO,he.EPSILON14))ae.unpack(Gs[t],0,Lr),ae.unpack(Gs[n],0,zr),ae.unpack(Gs[e],0,kr);else if(he.equalsEpsilon(r.x,0,he.EPSILON14)&&he.equalsEpsilon(r.y,0,he.EPSILON14)){const l=he.sign(r.z);ae.unpack(Gs[t],0,Lr),t!=="east"&&t!=="west"&&ae.multiplyByScalar(Lr,l,Lr),ae.unpack(Gs[n],0,zr),n!=="east"&&n!=="west"&&ae.multiplyByScalar(zr,l,zr),ae.unpack(Gs[e],0,kr),e!=="east"&&e!=="west"&&ae.multiplyByScalar(kr,l,kr)}else{a=a??De.default,a.geodeticSurfaceNormal(r,gn.up);const l=gn.up,u=gn.east;u.x=-r.y,u.y=r.x,u.z=0,ae.normalize(u,gn.east),ae.cross(l,u,gn.north),ae.multiplyByScalar(gn.up,-1,gn.down),ae.multiplyByScalar(gn.east,-1,gn.west),ae.multiplyByScalar(gn.north,-1,gn.south),Lr=gn[t],zr=gn[n],kr=gn[e]}return s[0]=Lr.x,s[1]=Lr.y,s[2]=Lr.z,s[3]=0,s[4]=zr.x,s[5]=zr.y,s[6]=zr.z,s[7]=0,s[8]=kr.x,s[9]=kr.y,s[10]=kr.z,s[11]=0,s[12]=r.x,s[13]=r.y,s[14]=r.z,s[15]=1,s},Nd[o]=i),i},ke.eastNorthUpToFixedFrame=ke.localFrameToFixedFrameGenerator("east","north"),ke.northEastDownToFixedFrame=ke.localFrameToFixedFrameGenerator("north","east"),ke.northUpEastToFixedFrame=ke.localFrameToFixedFrameGenerator("north","up"),ke.northWestUpToFixedFrame=ke.localFrameToFixedFrameGenerator("north","west");const OR=new ve,LR=new ae(1,1,1),zR=new ge;ke.headingPitchRollToFixedFrame=function(t,n,e,i,o){N.typeOf.object("HeadingPitchRoll",n),i=i??ke.eastNorthUpToFixedFrame;const r=ve.fromHeadingPitchRoll(n,OR),a=ge.fromTranslationQuaternionRotationScale(ae.ZERO,r,LR,zR);return o=i(t,e,o),ge.multiply(o,a,o)};const kR=new ge,QR=new me;ke.headingPitchRollQuaternion=function(t,n,e,i,o){N.typeOf.object("HeadingPitchRoll",n);const r=ke.headingPitchRollToFixedFrame(t,n,e,i,kR),a=ge.getMatrix3(r,QR);return ve.fromRotationMatrix(a,o)};const VR=new ae(1,1,1),NR=new ae,ex=new ge,HR=new ge,GR=new me,WR=new ve;ke.fixedFrameToHeadingPitchRoll=function(t,n,e,i){N.defined("transform",t),n=n??De.default,e=e??ke.eastNorthUpToFixedFrame,ne(i)||(i=new Rt);const o=ge.getTranslation(t,NR);if(ae.equals(o,ae.ZERO))return i.heading=0,i.pitch=0,i.roll=0,i;let r=ge.inverseTransformation(e(o,n,ex),ex),a=ge.setScale(t,VR,HR);a=ge.setTranslation(a,ae.ZERO,a),r=ge.multiply(r,a,r);let s=ve.fromRotationMatrix(ge.getMatrix3(r,GR),WR);return s=ve.normalize(s,s),Rt.fromQuaternion(s,i)};const jR=6*3600+2460+50.54841,qR=8640184812866e-6,KR=.093104,ZR=-62e-7,XR=11772758384668e-32,$R=72921158553e-15,YR=he.TWO_PI/86400;let DA=new we;ke.computeIcrfToCentralBodyFixedMatrix=function(t,n){let e=ke.computeIcrfToFixedMatrix(t,n);return ne(e)||(e=ke.computeTemeToPseudoFixedMatrix(t,n)),e},ke.computeTemeToPseudoFixedMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");DA=we.addSeconds(t,-we.computeTaiMinusUtc(t),DA);const e=DA.dayNumber,i=DA.secondsOfDay;let o;const r=e-2451545;i>=43200?o=(r+.5)/pt.DAYS_PER_JULIAN_CENTURY:o=(r-.5)/pt.DAYS_PER_JULIAN_CENTURY;const s=(jR+o*(qR+o*(KR+o*ZR)))*YR%he.TWO_PI,l=$R+XR*(e-24515455e-1),u=(i+pt.SECONDS_PER_DAY*.5)%pt.SECONDS_PER_DAY,A=s+l*u,c=Math.cos(A),f=Math.sin(A);return ne(n)?(n[0]=c,n[1]=-f,n[2]=0,n[3]=f,n[4]=c,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n):new me(c,f,0,-f,c,0,0,0,1)},ke.iau2006XysData=new Dd,ke.earthOrientationParameters=wl.NONE;const Hd=32.184,JR=2451545;ke.preloadIcrfFixed=function(t){const n=t.start.dayNumber,e=t.start.secondsOfDay+Hd,i=t.stop.dayNumber,o=t.stop.secondsOfDay+Hd;return ke.iau2006XysData.preload(n,e,i,o)},ke.computeIcrfToFixedMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");ne(n)||(n=new me);const e=ke.computeFixedToIcrfMatrix(t,n);if(ne(e))return me.transpose(e,n)};const e5=32.184,t5=2451545,RA=new Rt,n5=new me,i5=new we;ke.computeMoonFixedToIcrfMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");const e=we.addSeconds(t,e5,i5),i=we.totalDays(e)-t5,o=he.toRadians(12.112)-he.toRadians(.052992)*i,r=he.toRadians(24.224)-he.toRadians(.105984)*i,a=he.toRadians(227.645)+he.toRadians(13.012)*i,s=he.toRadians(261.105)+he.toRadians(13.340716)*i,l=he.toRadians(358)+he.toRadians(.9856)*i;return RA.pitch=he.toRadians(180)-he.toRadians(3.878)*Math.sin(o)-he.toRadians(.12)*Math.sin(r)+he.toRadians(.07)*Math.sin(a)-he.toRadians(.017)*Math.sin(s),RA.roll=he.toRadians(-23.47)+he.toRadians(1.543)*Math.cos(o)+he.toRadians(.24)*Math.cos(r)-he.toRadians(.028)*Math.cos(a)+he.toRadians(.007)*Math.cos(s),RA.heading=he.toRadians(154.375)+he.toRadians(13.17635831)*i+he.toRadians(3.558)*Math.sin(o)+he.toRadians(.121)*Math.sin(r)-he.toRadians(.064)*Math.sin(a)+he.toRadians(.016)*Math.sin(s)+he.toRadians(.025)*Math.sin(l),me.fromHeadingPitchRoll(RA,n5)},ke.computeIcrfToMoonFixedMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");ne(n)||(n=new me);const e=ke.computeMoonFixedToIcrfMatrix(t,n);if(ne(e))return me.transpose(e,n)};const r5=new qb(0,0,0),o5=new _d(0,0,0,0,0),Gd=new me,Wd=new me;ke.computeFixedToIcrfMatrix=function(t,n){if(!ne(t))throw new pe("date is required.");ne(n)||(n=new me);const e=ke.earthOrientationParameters.compute(t,o5);if(!ne(e))return;const i=t.dayNumber,o=t.secondsOfDay+Hd,r=ke.iau2006XysData.computeXysRadians(i,o,r5);if(!ne(r))return;const a=r.x+e.xPoleOffset,s=r.y+e.yPoleOffset,l=1/(1+Math.sqrt(1-a*a-s*s)),u=Gd;u[0]=1-l*a*a,u[3]=-l*a*s,u[6]=a,u[1]=-l*a*s,u[4]=1-l*s*s,u[7]=s,u[2]=-a,u[5]=-s,u[8]=1-l*(a*a+s*s);const A=me.fromRotationZ(-r.s,Wd),c=me.multiply(u,A,Gd),f=t.dayNumber,d=t.secondsOfDay-we.computeTaiMinusUtc(t)+e.ut1MinusUtc,p=f-2451545,g=d/pt.SECONDS_PER_DAY;let v=.779057273264+g+.00273781191135448*(p+g);v=v%1*he.TWO_PI;const y=me.fromRotationZ(v,Wd),m=me.multiply(c,y,Gd),b=Math.cos(e.xPoleWander),x=Math.cos(e.yPoleWander),E=Math.sin(e.xPoleWander),B=Math.sin(e.yPoleWander);let P=i-JR+o/pt.SECONDS_PER_DAY;P/=36525;const I=-47e-6*P*he.RADIANS_PER_DEGREE/3600,O=Math.cos(I),M=Math.sin(I),S=Wd;return S[0]=b*O,S[1]=b*M,S[2]=E,S[3]=-x*M+B*E*O,S[4]=x*O+B*E*M,S[5]=-B*b,S[6]=-B*M-x*E*O,S[7]=B*O-x*E*M,S[8]=x*b,me.multiply(m,S,n)};const s5=new be;ke.pointToWindowCoordinates=function(t,n,e,i){return i=ke.pointToGLWindowCoordinates(t,n,e,i),i.y=2*n[5]-i.y,i},ke.pointToGLWindowCoordinates=function(t,n,e,i){if(!ne(t))throw new pe("modelViewProjectionMatrix is required.");if(!ne(n))throw new pe("viewportTransformation is required.");if(!ne(e))throw new pe("point is required.");ne(i)||(i=new _e);const o=s5;return ge.multiplyByVector(t,be.fromElements(e.x,e.y,e.z,1,o),o),be.multiplyByScalar(o,1/o.w,o),ge.multiplyByVector(n,o,o),_e.fromCartesian4(o,i)};const a5=new ae,l5=new ae,u5=new ae;ke.rotationMatrixFromPositionVelocity=function(t,n,e,i){if(!ne(t))throw new pe("position is required.");if(!ne(n))throw new pe("velocity is required.");const o=(e??De.default).geodeticSurfaceNormal(t,a5);let r=ae.cross(n,o,l5);ae.equalsEpsilon(r,ae.ZERO,he.EPSILON6)&&(r=ae.clone(ae.UNIT_X,r));const a=ae.cross(r,n,u5);return ae.normalize(a,a),ae.cross(n,a,r),ae.negate(r,r),ae.normalize(r,r),ne(i)||(i=new me),i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=r.x,i[4]=r.y,i[5]=r.z,i[6]=a.x,i[7]=a.y,i[8]=a.z,i};const tx=new ge(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),nx=new Qe,jd=new ae,c5=new ae,h5=new me,qd=new ge,ix=new ge;ke.basisTo2D=function(t,n,e){if(!ne(t))throw new pe("projection is required.");if(!ne(n))throw new pe("matrix is required.");if(!ne(e))throw new pe("result is required.");const i=ge.getTranslation(n,c5),o=t.ellipsoid;let r;if(ae.equals(i,ae.ZERO))r=ae.clone(ae.ZERO,jd);else{const A=o.cartesianToCartographic(i,nx);r=t.project(A,jd),ae.fromElements(r.z,r.x,r.y,r)}const a=ke.eastNorthUpToFixedFrame(i,o,qd),s=ge.inverseTransformation(a,ix),l=ge.getMatrix3(n,h5),u=ge.multiplyByMatrix3(s,l,e);return ge.multiply(tx,u,e),ge.setTranslation(e,r,e),e},ke.ellipsoidTo2DModelMatrix=function(t,n,e){if(!ne(t))throw new pe("projection is required.");if(!ne(n))throw new pe("center is required.");if(!ne(e))throw new pe("result is required.");const i=t.ellipsoid,o=ke.eastNorthUpToFixedFrame(n,i,qd),r=ge.inverseTransformation(o,ix),a=i.cartesianToCartographic(n,nx),s=t.project(a,jd);ae.fromElements(s.z,s.x,s.y,s);const l=ge.fromTranslation(s,qd);return ge.multiply(tx,r,e),ge.multiply(l,e,e),e};function Te(t,n,e,i){this.west=t??0,this.south=n??0,this.east=e??0,this.north=i??0}Object.defineProperties(Te.prototype,{width:{get:function(){return Te.computeWidth(this)}},height:{get:function(){return Te.computeHeight(this)}}}),Te.packedLength=4,Te.pack=function(t,n,e){return N.typeOf.object("value",t),N.defined("array",n),e=e??0,n[e++]=t.west,n[e++]=t.south,n[e++]=t.east,n[e]=t.north,n},Te.unpack=function(t,n,e){return N.defined("array",t),n=n??0,ne(e)||(e=new Te),e.west=t[n++],e.south=t[n++],e.east=t[n++],e.north=t[n],e},Te.computeWidth=function(t){N.typeOf.object("rectangle",t);let n=t.east;const e=t.west;return n<e&&(n+=he.TWO_PI),n-e},Te.computeHeight=function(t){return N.typeOf.object("rectangle",t),t.north-t.south},Te.fromDegrees=function(t,n,e,i,o){return t=he.toRadians(t??0),n=he.toRadians(n??0),e=he.toRadians(e??0),i=he.toRadians(i??0),ne(o)?(o.west=t,o.south=n,o.east=e,o.north=i,o):new Te(t,n,e,i)},Te.fromRadians=function(t,n,e,i,o){return ne(o)?(o.west=t??0,o.south=n??0,o.east=e??0,o.north=i??0,o):new Te(t,n,e,i)},Te.fromCartographicArray=function(t,n){N.defined("cartographics",t);let e=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,a=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(let l=0,u=t.length;l<u;l++){const A=t[l];e=Math.min(e,A.longitude),i=Math.max(i,A.longitude),a=Math.min(a,A.latitude),s=Math.max(s,A.latitude);const c=A.longitude>=0?A.longitude:A.longitude+he.TWO_PI;o=Math.min(o,c),r=Math.max(r,c)}return i-e>r-o&&(e=o,i=r,i>he.PI&&(i=i-he.TWO_PI),e>he.PI&&(e=e-he.TWO_PI)),ne(n)?(n.west=e,n.south=a,n.east=i,n.north=s,n):new Te(e,a,i,s)},Te.fromCartesianArray=function(t,n,e){N.defined("cartesians",t),n=n??De.default;let i=Number.MAX_VALUE,o=-Number.MAX_VALUE,r=Number.MAX_VALUE,a=-Number.MAX_VALUE,s=Number.MAX_VALUE,l=-Number.MAX_VALUE;for(let u=0,A=t.length;u<A;u++){const c=n.cartesianToCartographic(t[u]);i=Math.min(i,c.longitude),o=Math.max(o,c.longitude),s=Math.min(s,c.latitude),l=Math.max(l,c.latitude);const f=c.longitude>=0?c.longitude:c.longitude+he.TWO_PI;r=Math.min(r,f),a=Math.max(a,f)}return o-i>a-r&&(i=r,o=a,o>he.PI&&(o=o-he.TWO_PI),i>he.PI&&(i=i-he.TWO_PI)),ne(e)?(e.west=i,e.south=s,e.east=o,e.north=l,e):new Te(i,s,o,l)};const A5=new ae,f5=new ae,p5=new ae,d5=new ae,m5=new ae,Kd=new Array(5);for(let t=0;t<Kd.length;++t)Kd[t]=new ae;Te.fromBoundingSphere=function(t,n,e){N.typeOf.object("boundingSphere",t);const i=t.center,o=t.radius;if(ne(n)||(n=De.default),ne(e)||(e=new Te),ae.equals(i,ae.ZERO))return Te.clone(Te.MAX_VALUE,e),e;const r=ke.eastNorthUpToFixedFrame(i,n,A5),a=ge.multiplyByPointAsVector(r,ae.UNIT_X,f5);ae.normalize(a,a);const s=ge.multiplyByPointAsVector(r,ae.UNIT_Y,p5);ae.normalize(s,s),ae.multiplyByScalar(s,o,s),ae.multiplyByScalar(a,o,a);const l=ae.negate(s,m5),u=ae.negate(a,d5),A=Kd;let c=A[0];return ae.add(i,s,c),c=A[1],ae.add(i,u,c),c=A[2],ae.add(i,l,c),c=A[3],ae.add(i,a,c),A[4]=i,Te.fromCartesianArray(A,n,e)},Te.clone=function(t,n){if(ne(t))return ne(n)?(n.west=t.west,n.south=t.south,n.east=t.east,n.north=t.north,n):new Te(t.west,t.south,t.east,t.north)},Te.equalsEpsilon=function(t,n,e){return e=e??0,t===n||ne(t)&&ne(n)&&Math.abs(t.west-n.west)<=e&&Math.abs(t.south-n.south)<=e&&Math.abs(t.east-n.east)<=e&&Math.abs(t.north-n.north)<=e},Te.prototype.clone=function(t){return Te.clone(this,t)},Te.prototype.equals=function(t){return Te.equals(this,t)},Te.equals=function(t,n){return t===n||ne(t)&&ne(n)&&t.west===n.west&&t.south===n.south&&t.east===n.east&&t.north===n.north},Te.prototype.equalsEpsilon=function(t,n){return Te.equalsEpsilon(this,t,n)},Te._validate=function(t){N.typeOf.object("rectangle",t);const n=t.north;N.typeOf.number.greaterThanOrEquals("north",n,-he.PI_OVER_TWO),N.typeOf.number.lessThanOrEquals("north",n,he.PI_OVER_TWO);const e=t.south;N.typeOf.number.greaterThanOrEquals("south",e,-he.PI_OVER_TWO),N.typeOf.number.lessThanOrEquals("south",e,he.PI_OVER_TWO);const i=t.west;N.typeOf.number.greaterThanOrEquals("west",i,-Math.PI),N.typeOf.number.lessThanOrEquals("west",i,Math.PI);const o=t.east;N.typeOf.number.greaterThanOrEquals("east",o,-Math.PI),N.typeOf.number.lessThanOrEquals("east",o,Math.PI)},Te.southwest=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.west,n.latitude=t.south,n.height=0,n):new Qe(t.west,t.south)},Te.northwest=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.west,n.latitude=t.north,n.height=0,n):new Qe(t.west,t.north)},Te.northeast=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.east,n.latitude=t.north,n.height=0,n):new Qe(t.east,t.north)},Te.southeast=function(t,n){return N.typeOf.object("rectangle",t),ne(n)?(n.longitude=t.east,n.latitude=t.south,n.height=0,n):new Qe(t.east,t.south)},Te.center=function(t,n){N.typeOf.object("rectangle",t);let e=t.east;const i=t.west;e<i&&(e+=he.TWO_PI);const o=he.negativePiToPi((i+e)*.5),r=(t.south+t.north)*.5;return ne(n)?(n.longitude=o,n.latitude=r,n.height=0,n):new Qe(o,r)},Te.intersection=function(t,n,e){N.typeOf.object("rectangle",t),N.typeOf.object("otherRectangle",n);let i=t.east,o=t.west,r=n.east,a=n.west;i<o&&r>0?i+=he.TWO_PI:r<a&&i>0&&(r+=he.TWO_PI),i<o&&a<0?a+=he.TWO_PI:r<a&&o<0&&(o+=he.TWO_PI);const s=he.negativePiToPi(Math.max(o,a)),l=he.negativePiToPi(Math.min(i,r));if((t.west<t.east||n.west<n.east)&&l<=s)return;const u=Math.max(t.south,n.south),A=Math.min(t.north,n.north);if(!(u>=A))return ne(e)?(e.west=s,e.south=u,e.east=l,e.north=A,e):new Te(s,u,l,A)},Te.simpleIntersection=function(t,n,e){N.typeOf.object("rectangle",t),N.typeOf.object("otherRectangle",n);const i=Math.max(t.west,n.west),o=Math.max(t.south,n.south),r=Math.min(t.east,n.east),a=Math.min(t.north,n.north);if(!(o>=a||i>=r))return ne(e)?(e.west=i,e.south=o,e.east=r,e.north=a,e):new Te(i,o,r,a)},Te.union=function(t,n,e){N.typeOf.object("rectangle",t),N.typeOf.object("otherRectangle",n),ne(e)||(e=new Te);let i=t.east,o=t.west,r=n.east,a=n.west;i<o&&r>0?i+=he.TWO_PI:r<a&&i>0&&(r+=he.TWO_PI),i<o&&a<0?a+=he.TWO_PI:r<a&&o<0&&(o+=he.TWO_PI);const s=he.negativePiToPi(Math.min(o,a)),l=he.negativePiToPi(Math.max(i,r));return e.west=s,e.south=Math.min(t.south,n.south),e.east=l,e.north=Math.max(t.north,n.north),e},Te.expand=function(t,n,e){return N.typeOf.object("rectangle",t),N.typeOf.object("cartographic",n),ne(e)||(e=new Te),e.west=Math.min(t.west,n.longitude),e.south=Math.min(t.south,n.latitude),e.east=Math.max(t.east,n.longitude),e.north=Math.max(t.north,n.latitude),e},Te.contains=function(t,n){N.typeOf.object("rectangle",t),N.typeOf.object("cartographic",n);let e=n.longitude;const i=n.latitude,o=t.west;let r=t.east;return r<o&&(r+=he.TWO_PI,e<0&&(e+=he.TWO_PI)),(e>o||he.equalsEpsilon(e,o,he.EPSILON14))&&(e<r||he.equalsEpsilon(e,r,he.EPSILON14))&&i>=t.south&&i<=t.north};const g5=new Qe;Te.subsample=function(t,n,e,i){N.typeOf.object("rectangle",t),n=n??De.default,e=e??0,ne(i)||(i=[]);let o=0;const r=t.north,a=t.south,s=t.east,l=t.west,u=g5;u.height=e,u.longitude=l,u.latitude=r,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.longitude=s,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.latitude=a,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.longitude=l,i[o]=n.cartographicToCartesian(u,i[o]),o++,r<0?u.latitude=r:a>0?u.latitude=a:u.latitude=0;for(let A=1;A<8;++A)u.longitude=-Math.PI+A*he.PI_OVER_TWO,Te.contains(t,u)&&(i[o]=n.cartographicToCartesian(u,i[o]),o++);return u.latitude===0&&(u.longitude=l,i[o]=n.cartographicToCartesian(u,i[o]),o++,u.longitude=s,i[o]=n.cartographicToCartesian(u,i[o]),o++),i.length=o,i},Te.subsection=function(t,n,e,i,o,r){if(N.typeOf.object("rectangle",t),N.typeOf.number.greaterThanOrEquals("westLerp",n,0),N.typeOf.number.lessThanOrEquals("westLerp",n,1),N.typeOf.number.greaterThanOrEquals("southLerp",e,0),N.typeOf.number.lessThanOrEquals("southLerp",e,1),N.typeOf.number.greaterThanOrEquals("eastLerp",i,0),N.typeOf.number.lessThanOrEquals("eastLerp",i,1),N.typeOf.number.greaterThanOrEquals("northLerp",o,0),N.typeOf.number.lessThanOrEquals("northLerp",o,1),N.typeOf.number.lessThanOrEquals("westLerp",n,i),N.typeOf.number.lessThanOrEquals("southLerp",e,o),ne(r)||(r=new Te),t.west<=t.east){const s=t.east-t.west;r.west=t.west+n*s,r.east=t.west+i*s}else{const s=he.TWO_PI+t.east-t.west;r.west=he.negativePiToPi(t.west+n*s),r.east=he.negativePiToPi(t.west+i*s)}const a=t.north-t.south;return r.south=t.south+e*a,r.north=t.south+o*a,n===1&&(r.west=t.east),i===1&&(r.east=t.east),e===1&&(r.south=t.north),o===1&&(r.north=t.north),r},Te.MAX_VALUE=Object.freeze(new Te(-Math.PI,-he.PI_OVER_TWO,Math.PI,he.PI_OVER_TWO));function Ws(t,n,e,i,o){this._format=t,this._datatype=n,this._width=e,this._height=i,this._buffer=o}Object.defineProperties(Ws.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}},arrayBufferView:{get:function(){return this._buffer}}}),Ws.clone=function(t){if(ne(t))return new Ws(t._format,t._datatype,t._width,t._height,t._buffer)},Ws.prototype.clone=function(){return Ws.clone(this)};function rx(){if(!ne(Ut._canTransferArrayBuffer)){const t=$d("transferTypedArrayTest");t.postMessage=t.webkitPostMessage??t.postMessage;const n=99,e=new Int8Array([n]);try{t.postMessage({array:e},[e.buffer])}catch{return Ut._canTransferArrayBuffer=!1,Ut._canTransferArrayBuffer}Ut._canTransferArrayBuffer=new Promise(i=>{t.onmessage=function(o){const r=o.data.array,a=ne(r)&&r[0]===n;i(a),t.terminate(),Ut._canTransferArrayBuffer=a}})}return Ut._canTransferArrayBuffer}const Zd=new zs;function Xd(t){let n;try{n=new Blob([t],{type:"application/javascript"})}catch{const o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,r=new o;r.append(t),n=r.getBlob("application/javascript")}return(window.URL||window.webkitURL).createObjectURL(n)}function $d(t){const n=new Wi(t),e=n.scheme().length!==0&&n.fragment().length===0,i=t.replace(/\.js$/,""),o={};let r,a;if(Td(t))a=t;else if(!e){const s=Gn(`${Ut._workerModulePrefix}/${i}.js`);Td(s)&&(a=s)}if(a){const s=`import "${a}";`;return r=Xd(s),o.type="module",new Worker(r,o)}if(!e&&typeof CESIUM_WORKERS<"u"){const s=`
|
|
384
384
|
importScripts("${Xd(CESIUM_WORKERS)}");
|
|
385
385
|
CesiumWorkers["${i}"]();
|
|
386
|
-
`;return r=Xd(s),new Worker(r,o)}if(r=t,e||(r=Gn(`${Ut._workerModulePrefix+i}.js`)),!Ht.supportsEsmWebWorkers())throw new Nt("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function y5(t,n){const e={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!Ht.supportsWebAssembly()){if(!ne(n.fallbackModulePath))throw new Nt(`This browser does not support Web Assembly, and no backup module was provided for ${t._workerPath}`);return e.modulePath=Gn(n.fallbackModulePath),e}e.wasmBinaryFile=Gn(n.wasmBinaryFile);const i=await xe.fetchArrayBuffer({url:e.wasmBinaryFile});return e.wasmBinary=i,e}function Ut(t,n){this._workerPath=t,this._maximumActiveTasks=n??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}const v5=(t,n,e,i)=>{const o=({data:r})=>{if(r.id===n){if(ne(r.error)){let a=r.error;a.name==="RuntimeError"?(a=new Nt(r.error.message),a.stack=r.error.stack):a.name==="DeveloperError"?(a=new pe(r.error.message),a.stack=r.error.stack):a.name==="Error"&&(a=new Error(r.error.message),a.stack=r.error.stack),Zd.raiseEvent(a),i(a)}else Zd.raiseEvent(),e(r.result);t.removeEventListener("message",o)}};return o},w5=[];async function b5(t,n,e){const i=await Promise.resolve(rx());ne(e)?i||(e.length=0):e=w5;const o=t._nextID++,r=new Promise((a,s)=>{t._worker.addEventListener("message",v5(t._worker,o,a,s))});return t._worker.postMessage({id:o,baseUrl:Gn.getCesiumBaseUrl().url,parameters:n,canTransferArrayBuffer:i},e),r}async function x5(t,n,e){++t._activeTasks;try{const i=await b5(t,n,e);return--t._activeTasks,i}catch(i){throw--t._activeTasks,i}}Ut.prototype.scheduleTask=function(t,n){if(ne(this._worker)||(this._worker=$d(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return x5(this,t,n)},Ut.prototype.initWebAssemblyModule=async function(t){if(ne(this._webAssemblyPromise))return this._webAssemblyPromise;const n=async()=>{const e=this._worker=$d(this._workerPath),i=await y5(this,t),o=await Promise.resolve(rx());let r;const a=i.wasmBinary;ne(a)&&o&&(r=[a]);const s=new Promise((l,u)=>{e.onmessage=function({data:A}){ne(A)?l(A.result):u(new Nt("Could not configure wasm module"))}});return e.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),s};return this._webAssemblyPromise=n(),this._webAssemblyPromise},Ut.prototype.isDestroyed=function(){return!1},Ut.prototype.destroy=function(){return ne(this._worker)&&this._worker.terminate(),mR(this)},Ut.taskCompletedEvent=Zd,Ut._defaultWorkerModulePrefix="Workers/",Ut._workerModulePrefix=Ut._defaultWorkerModulePrefix,Ut._canTransferArrayBuffer=void 0;function Zi(){}Zi._transcodeTaskProcessor=new Ut("transcodeKTX2",Number.POSITIVE_INFINITY),Zi._readyPromise=void 0;function _5(){const t=Zi._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(n){if(n)return Zi._transcodeTaskProcessor;throw new Nt("KTX2 transcoder could not be initialized.")});Zi._readyPromise=t}Zi.transcode=function(t,n){return N.defined("supportedTargetFormats",n),ne(Zi._readyPromise)||_5(),Zi._readyPromise.then(function(e){let i=t;t instanceof ArrayBuffer&&(i=new Uint8Array(t));const o={supportedTargetFormats:n,ktx2Buffer:i};return e.scheduleTask(o,[i.buffer])}).then(function(e){const i=e.length,o=Object.keys(e[0]);for(let r=0;r<i;r++){const a=e[r];for(let s=0;s<o.length;s++){const l=a[o[s]];a[o[s]]=new Ws(l.internalFormat,l.datatype,l.width,l.height,l.levelBuffer)}}if(o.length===1){for(let r=0;r<i;++r)e[r]=e[r][o[0]];i===1&&(e=e[0])}return e}).catch(function(e){throw e})};let ox;sx.setKTX2SupportedFormats=function(t,n,e,i,o,r){ox={s3tc:t,pvrtc:n,astc:e,etc:i,etc1:o,bc7:r}};function sx(t){N.defined("resourceOrUrlOrBuffer",t);let n;return t instanceof ArrayBuffer||ArrayBuffer.isView(t)?n=Promise.resolve(t):n=xe.createIfNeeded(t).fetchArrayBuffer(),n.then(function(e){return Zi.transcode(e,ox)})}function yn(t){this._ellipsoid=t??De.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(yn.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),yn.mercatorAngleToGeodeticLatitude=function(t){return he.PI_OVER_TWO-2*Math.atan(Math.exp(-t))},yn.geodeticLatitudeToMercatorAngle=function(t){t>yn.MaximumLatitude?t=yn.MaximumLatitude:t<-yn.MaximumLatitude&&(t=-yn.MaximumLatitude);const n=Math.sin(t);return .5*Math.log((1+n)/(1-n))},yn.MaximumLatitude=yn.mercatorAngleToGeodeticLatitude(Math.PI),yn.prototype.project=function(t,n){const e=this._semimajorAxis,i=t.longitude*e,o=yn.geodeticLatitudeToMercatorAngle(t.latitude)*e,r=t.height;return ne(n)?(n.x=i,n.y=o,n.z=r,n):new ae(i,o,r)},yn.prototype.unproject=function(t,n){if(!ne(t))throw new pe("cartesian is required");const e=this._oneOverSemimajorAxis,i=t.x*e,o=yn.mercatorAngleToGeodeticLatitude(t.y*e),r=t.z;return ne(n)?(n.longitude=i,n.latitude=o,n.height=r,n):new Qe(i,o,r)};const ax={};function Cl(t,n){if(!ne(t))throw new pe("identifier is required.");ne(ax[t])||(ax[t]=!0,console.warn(n??t))}Cl.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.",Cl.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",Cl.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",Cl.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";function lx(t,n){if(!ne(t)||!ne(n))throw new pe("identifier and message are required.");Cl(t,n)}function js(){pe.throwInstantiationError()}Object.defineProperties(js.prototype,{rectangle:{get:pe.throwInstantiationError},tileWidth:{get:pe.throwInstantiationError},tileHeight:{get:pe.throwInstantiationError},maximumLevel:{get:pe.throwInstantiationError},minimumLevel:{get:pe.throwInstantiationError},tilingScheme:{get:pe.throwInstantiationError},tileDiscardPolicy:{get:pe.throwInstantiationError},errorEvent:{get:pe.throwInstantiationError},credit:{get:pe.throwInstantiationError},proxy:{get:pe.throwInstantiationError},hasAlphaChannel:{get:pe.throwInstantiationError}}),js.prototype.getTileCredits=function(t,n,e){pe.throwInstantiationError()},js.prototype.requestImage=function(t,n,e,i){pe.throwInstantiationError()},js.prototype.pickFeatures=function(t,n,e,i,o){pe.throwInstantiationError()};const C5=/\.ktx2$/i;js.loadImage=function(t,n){N.defined("url",n);const e=xe.createIfNeeded(n);return C5.test(e.url)?sx(e):ne(t)&&ne(t.tileDiscardPolicy)?e.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):e.fetchImage({preferImageBitmap:!0,flipY:!0})};function ux(t,n){return lx("defaultValue","defaultValue has been deprecated and will be removed in Cesium 1.134. Use the nullish coalescing operator instead: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing"),t??n}Object.defineProperty(ux,"EMPTY_OBJECT",{get:function(){return lx("defaultValue.EMPTY_OBJECT","defaultValue.EMPTY_OBJECT has been deprecated and will be removed in Cesium 1.134. Use Frozen.EMPTY_OBJECT instead"),gi.EMPTY_OBJECT}});var UA=3.141592653589793*3e3/180,Ot=3.141592653589793,OA=6378245,LA=.006693421622965943,cx=function(i,o){var i=+i,o=+o,r=i-.0065,a=o-.006,s=Math.sqrt(r*r+a*a)-2e-5*Math.sin(a*UA),l=Math.atan2(a,r)-3e-6*Math.cos(r*UA),u=s*Math.cos(l),A=s*Math.sin(l);return[u,A]},hx=function(o,i){var i=+i,o=+o,r=Math.sqrt(o*o+i*i)+2e-5*Math.sin(i*UA),a=Math.atan2(i,o)+3e-6*Math.cos(o*UA),s=r*Math.cos(a)+.0065,l=r*Math.sin(a)+.006;return[s,l]},Yd=function(o,i){var i=+i,o=+o;if(px(o,i))return[o,i];var r=Ax(o-105,i-35),a=fx(o-105,i-35),s=i/180*Ot,l=Math.sin(s);l=1-LA*l*l;var u=Math.sqrt(l);r=r*180/(OA*(1-LA)/(l*u)*Ot),a=a*180/(OA/u*Math.cos(s)*Ot);var A=i+r,c=o+a;return[c,A]},Jd=function(o,i){var i=+i,o=+o;if(px(o,i))return[o,i];var r=Ax(o-105,i-35),a=fx(o-105,i-35),s=i/180*Ot,l=Math.sin(s);l=1-LA*l*l;var u=Math.sqrt(l);r=r*180/(OA*(1-LA)/(l*u)*Ot),a=a*180/(OA/u*Math.cos(s)*Ot);var A=i+r,c=o+a;return[o*2-c,i*2-A]},Ax=function(o,i){var i=+i,o=+o,r=-100+2*o+3*i+.2*i*i+.1*o*i+.2*Math.sqrt(Math.abs(o));return r+=(20*Math.sin(6*o*Ot)+20*Math.sin(2*o*Ot))*2/3,r+=(20*Math.sin(i*Ot)+40*Math.sin(i/3*Ot))*2/3,r+=(160*Math.sin(i/12*Ot)+320*Math.sin(i*Ot/30))*2/3,r},fx=function(o,i){var i=+i,o=+o,r=300+o+2*i+.1*o*o+.1*o*i+.1*Math.sqrt(Math.abs(o));return r+=(20*Math.sin(6*o*Ot)+20*Math.sin(2*o*Ot))*2/3,r+=(20*Math.sin(o*Ot)+40*Math.sin(o/3*Ot))*2/3,r+=(150*Math.sin(o/12*Ot)+300*Math.sin(o/30*Ot))*2/3,r},px=function(o,i){var i=+i,o=+o;return!(o>73.66&&o<135.05&&i>3.86&&i<53.55)};function em(t,n){this.x=t||0,this.y=n||0,this.x=this.x,this.y=this.y}em.prototype.equals=function(t){return t&&t.x==this.x&&t.y==this.y};function ri(t,n){isNaN(t)&&(t=decode64(t),t=isNaN(t)?0:t),typeof t=="string"&&(t=parseFloat(t)),isNaN(n)&&(n=decode64(n),n=isNaN(n)?0:n),typeof t=="lat"&&(n=parseFloat(n)),this.lng=t,this.lat=n}ri.isInRange=function(t){return t&&t.lng<=180&&t.lng>=-180&&t.lat<=74&&t.lat>=-74},ri.prototype.equals=function(t){return t&&this.lat==t.lat&&this.lng==t.lng};function at(){}at.EARTHRADIUS=637099681e-2,at.MCBAND=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],at.LLBAND=[75,60,45,30,15,0],at.MC2LL=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],at.LL2MC=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],at.getDistanceByMC=function(t,n){if(!t||!n)return 0;var e,i,o,r;return t=this.convertMC2LL(t),!t||(e=this.toRadians(t.lng),i=this.toRadians(t.lat),n=this.convertMC2LL(n),!n)?0:(o=this.toRadians(n.lng),r=this.toRadians(n.lat),this.getDistance(e,o,i,r))},at.getDistanceByLL=function(t,n){if(!t||!n)return 0;t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74),n.lng=this.getLoop(n.lng,-180,180),n.lat=this.getRange(n.lat,-74,74);var e,i,o,r;return e=this.toRadians(t.lng),o=this.toRadians(t.lat),i=this.toRadians(n.lng),r=this.toRadians(n.lat),this.getDistance(e,i,o,r)},at.convertMC2LL=function(r){var n,e;n=new ri(Math.abs(r.lng),Math.abs(r.lat));for(var i=0;i<this.MCBAND.length;i++)if(n.lat>=this.MCBAND[i]){e=this.MC2LL[i];break}var o=this.convertor(r,e),r=new ri(o.lng.toFixed(6),o.lat.toFixed(6));return r},at.convertLL2MC=function(r){var n,e;r.lng=this.getLoop(r.lng,-180,180),r.lat=this.getRange(r.lat,-74,74),n=new ri(r.lng,r.lat);for(var i=0;i<this.LLBAND.length;i++)if(n.lat>=this.LLBAND[i]){e=this.LL2MC[i];break}if(!e){for(var i=this.LLBAND.length-1;i>=0;i--)if(n.lat<=-this.LLBAND[i]){e=this.LL2MC[i];break}}var o=this.convertor(r,e),r=new ri(o.lng.toFixed(2),o.lat.toFixed(2));return r},at.convertor=function(t,n){if(!(!t||!n)){var e=n[0]+n[1]*Math.abs(t.lng),i=Math.abs(t.lat)/n[9],o=n[2]+n[3]*i+n[4]*i*i+n[5]*i*i*i+n[6]*i*i*i*i+n[7]*i*i*i*i*i+n[8]*i*i*i*i*i*i;return e*=t.lng<0?-1:1,o*=t.lat<0?-1:1,new ri(e,o)}},at.getDistance=function(t,n,e,i){return this.EARTHRADIUS*Math.acos(Math.sin(e)*Math.sin(i)+Math.cos(e)*Math.cos(i)*Math.cos(n-t))},at.toRadians=function(t){return Math.PI*t/180},at.toDegrees=function(t){return 180*t/Math.PI},at.getRange=function(t,n,e){return n!=null&&(t=Math.max(t,n)),e!=null&&(t=Math.min(t,e)),t},at.getLoop=function(t,n,e){for(;t>e;)t-=e-n;for(;t<n;)t+=e-n;return t},at.prototype.lngLatToMercator=function(t){return at.convertLL2MC(t)},at.prototype.lngLatToPoint=function(t){var n=at.convertLL2MC(t);return new em(n.lng,n.lat)},at.prototype.mercatorToLngLat=function(t){return at.convertMC2LL(t)},at.prototype.PointToLngLat=function(t){var n=new ri(t.x,t.y);return at.convertMC2LL(n)},at.prototype.PointToPixel=function(t,n,e,i,o){if(t){t=this.lngLatToMercator(t,o);var r=this.getZoomUnits(n),a=Math.round((t.lng-e.lng)/r+i[Twidth]/2),s=Math.round((e.lat-t.lat)/r+i[Theight]/2);return new em(a,s)}},at.prototype.PixelToPoint=function(t,n,e,i,o){if(t){var r=this.getZoomUnits(n),a=e.lng+r*(t.x-i[Twidth]/2),s=e.lat-r*(t.y-i[Theight]/2),l=new ri(a,s);return this.mercatorToLngLat(l,o)}},at.prototype.getZoomUnits=function(t){return Math.pow(2,18-t)};function Qr(t){t=t||{},this._ellipsoid=ux(t.ellipsoid,De.WGS84);var n=!0;ne(t.wgs84)&&(n=t.wgs84),this._projection=new yn(this._ellipsoid);var e=new at;this._projection.project=function(a){var s={};return n?(s=Yd(he.toDegrees(a.longitude),he.toDegrees(a.latitude)),s=hx(s[0],s[1])):s=hx(he.toDegrees(a.longitude),he.toDegrees(a.latitude)),s[0]=Math.min(s[0],180),s[0]=Math.max(s[0],-180),s[1]=Math.min(s[1],74.000022),s[1]=Math.max(s[1],-71.988531),s=e.lngLatToPoint(new ri(s[0],s[1])),new _e(s.x,s.y)},this._projection.unproject=function(a){var s=e.mercatorToLngLat(new ri(a.x,a.y));return s[0]=(s[0]+180)%360-180,n?(s=cx(s.lng,s.lat),s=Jd(s[0],s[1])):s=cx(s.lng,s.lat),new Qe(he.toRadians(s[0]),he.toRadians(s[1]))},this._rectangleSouthwestInMeters=new _e(-2003772637e-2,-1170804166e-2),this._rectangleNortheastInMeters=new _e(2003772637e-2,1247410417e-2);var i=this._projection.unproject(this._rectangleSouthwestInMeters),o=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new Te(i.longitude,i.latitude,o.longitude,o.latitude),this.levelWidth=[];for(var r=0;r<19;r++)this.levelWidth[r]=Math.pow(2,18-r)*256}Object.defineProperties(Qr.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),Qr.prototype.getNumberOfXTilesAtLevel=function(t){return(1<<t)*.7},Qr.prototype.getNumberOfYTilesAtLevel=function(t){return 1<<t},Qr.prototype.rectangleToNativeRectangle=function(t,n){var e=this._projection,i=e.project(Te.southwest(t)),o=e.project(Te.northeast(t));return ne(n)?(n.west=i.x,n.south=i.y,n.east=o.x,n.north=o.y,n):new Te(i.x,i.y,o.x,o.y)},Qr.prototype.tileXYToNativeRectangle=function(t,n,e,i){var o=this.levelWidth[e],r=t*o,a=(t+1)*o;n=-n;var s=(n+1)*o,l=n*o;return ne(i)?(i.west=r,i.south=l,i.east=a,i.north=s,i):new Te(r,l,a,s)},Qr.prototype.tileXYToRectangle=function(t,n,e,i){var o=this.tileXYToNativeRectangle(t,n,e,i),r=this._projection,a=r.unproject(new _e(o.west,o.south)),s=r.unproject(new _e(o.east,o.north));return o.west=a.longitude,o.south=a.latitude,o.east=s.longitude,o.north=s.latitude,o},Qr.prototype.positionToTileXY=function(t,n,e){var i=this._rectangle;if(Te.contains(i,t)){var o=this._projection,r=o.project(t);if(ne(r)){var a=this.levelWidth[n],s=Math.floor(r.x/a),l=-Math.floor(r.y/a);return ne(e)?(e.x=s,e.y=l,e):new _e(s,l)}}};function zA(t){this._url=t.url||"http://online2.map.bdimg.com/onlinelabel/?qt=tile&styles=pl&x={x}&y={y}&z={z}",this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._tilingScheme=new Qr(t),this._credit=void 0,this._rectangle=this._tilingScheme.rectangle,this._ready=!0}function S5(t,n,e,i){var o=t._url;return o=o.replace("{x}",n).replace("{y}",-e).replace("{z}",i),o}Object.defineProperties(zA.prototype,{url:{get:function(){return this._url}},token:{get:function(){return this._token}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){if(!this._ready)throw new DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 3}},tilingScheme:{get:function(){if(!this._ready)throw new DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),zA.prototype.getTileCredits=function(t,n,e){},zA.prototype.requestImage=function(t,n,e){if(!this._ready)throw new DeveloperError("requestImage must not be called before the imagery provider is ready.");var i=S5(this,t,n,e);return js.loadImage(this,i)};class E5 extends _.UrlTemplateImageryProvider{constructor(e){super(e);z(this,"_indexTime",0);e.url="https://tileser.giiiis.com/timetile/",e.minimumLevel=1,e.maximumLevel=18,e.tilingScheme=new _.GeographicTilingScheme,this.indexTime=e.indexTime||0}get indexTime(){return this._indexTime}set indexTime(e){this._indexTime=e}async requestImage(e,i,o,r){try{let a=this.buildImageUrl(this.indexTime,e,i,o);return _.ImageryProvider.loadImage(this,a)}catch{return}}buildImageUrl(e,i,o,r){return`https://tileser.giiiis.com/timetile/${e}/${r}/${i}/${o}.jpg`}}class P5 extends _.UrlTemplateImageryProvider{constructor(e){super(e);z(this,"_indexTimeID",0);e.url="https://wayback.maptiles.arcgis.com/",e.minimumLevel=1,e.maximumLevel=18,this.indexTimeID=e.indexTimeID||0}get indexTimeID(){return this._indexTimeID}set indexTimeID(e){this._indexTimeID=e}async requestImage(e,i,o,r){try{let a;return this.indexTimeID!==0?a=this.buildImageUrl(this.indexTimeID,e,i,o):a=`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${o}/${i}/${e}`,_.ImageryProvider.loadImage(this,a)}catch{return}}buildImageUrl(e,i,o,r){return`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${e}/${r}/${o}/${i}`}}var tm={exports:{}};/*! For license information please see mvt-basic-render.js.LICENSE.txt */var dx;function B5(){return dx||(dx=1,(function(t,n){(function(e,i){t.exports=i()})(self,(function(){return(function(){var e={3226:function(r){r.exports=(function(){return(a=new Float32Array(3))[0]=0,a[1]=0,a[2]=0,(function(){var s=new Float32Array(4);s[0]=0,s[1]=0,s[2]=0,s[3]=0})(),{vec3:{transformMat3:function(s,l,u){var A=l[0],c=l[1],f=l[2];return s[0]=A*u[0]+c*u[3]+f*u[6],s[1]=A*u[1]+c*u[4]+f*u[7],s[2]=A*u[2]+c*u[5]+f*u[8],s}},vec4:{transformMat4:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3];return s[0]=u[0]*A+u[4]*c+u[8]*f+u[12]*d,s[1]=u[1]*A+u[5]*c+u[9]*f+u[13]*d,s[2]=u[2]*A+u[6]*c+u[10]*f+u[14]*d,s[3]=u[3]*A+u[7]*c+u[11]*f+u[15]*d,s}},mat2:{create:function(){var s=new Float32Array(4);return s[0]=1,s[1]=0,s[2]=0,s[3]=1,s},rotate:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3],p=Math.sin(u),g=Math.cos(u);return s[0]=A*g+f*p,s[1]=c*g+d*p,s[2]=A*-p+f*g,s[3]=c*-p+d*g,s},scale:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3],p=u[0],g=u[1];return s[0]=A*p,s[1]=c*p,s[2]=f*g,s[3]=d*g,s}},mat3:{create:function(){var s=new Float32Array(9);return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=1,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s},fromRotation:function(s,l){var u=Math.sin(l),A=Math.cos(l);return s[0]=A,s[1]=u,s[2]=0,s[3]=-u,s[4]=A,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s}},mat4:{create:function(){var s=new Float32Array(16);return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},identity:function(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},translate:function(s,l,u){var A,c,f,d,p,g,v,y,m,b,x,E,B=u[0],P=u[1],I=u[2];return l===s?(s[12]=l[0]*B+l[4]*P+l[8]*I+l[12],s[13]=l[1]*B+l[5]*P+l[9]*I+l[13],s[14]=l[2]*B+l[6]*P+l[10]*I+l[14],s[15]=l[3]*B+l[7]*P+l[11]*I+l[15]):(A=l[0],c=l[1],f=l[2],d=l[3],p=l[4],g=l[5],v=l[6],y=l[7],m=l[8],b=l[9],x=l[10],E=l[11],s[0]=A,s[1]=c,s[2]=f,s[3]=d,s[4]=p,s[5]=g,s[6]=v,s[7]=y,s[8]=m,s[9]=b,s[10]=x,s[11]=E,s[12]=A*B+p*P+m*I+l[12],s[13]=c*B+g*P+b*I+l[13],s[14]=f*B+v*P+x*I+l[14],s[15]=d*B+y*P+E*I+l[15]),s},scale:function(s,l,u){var A=u[0],c=u[1],f=u[2];return s[0]=l[0]*A,s[1]=l[1]*A,s[2]=l[2]*A,s[3]=l[3]*A,s[4]=l[4]*c,s[5]=l[5]*c,s[6]=l[6]*c,s[7]=l[7]*c,s[8]=l[8]*f,s[9]=l[9]*f,s[10]=l[10]*f,s[11]=l[11]*f,s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15],s},multiply:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3],p=l[4],g=l[5],v=l[6],y=l[7],m=l[8],b=l[9],x=l[10],E=l[11],B=l[12],P=l[13],I=l[14],O=l[15],M=u[0],S=u[1],T=u[2],w=u[3];return s[0]=M*A+S*p+T*m+w*B,s[1]=M*c+S*g+T*b+w*P,s[2]=M*f+S*v+T*x+w*I,s[3]=M*d+S*y+T*E+w*O,M=u[4],S=u[5],T=u[6],w=u[7],s[4]=M*A+S*p+T*m+w*B,s[5]=M*c+S*g+T*b+w*P,s[6]=M*f+S*v+T*x+w*I,s[7]=M*d+S*y+T*E+w*O,M=u[8],S=u[9],T=u[10],w=u[11],s[8]=M*A+S*p+T*m+w*B,s[9]=M*c+S*g+T*b+w*P,s[10]=M*f+S*v+T*x+w*I,s[11]=M*d+S*y+T*E+w*O,M=u[12],S=u[13],T=u[14],w=u[15],s[12]=M*A+S*p+T*m+w*B,s[13]=M*c+S*g+T*b+w*P,s[14]=M*f+S*v+T*x+w*I,s[15]=M*d+S*y+T*E+w*O,s},perspective:function(s,l,u,A,c){var f=1/Math.tan(l/2),d=1/(A-c);return s[0]=f/u,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=f,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(c+A)*d,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*c*A*d,s[15]=0,s},rotateX:function(s,l,u){var A=Math.sin(u),c=Math.cos(u),f=l[4],d=l[5],p=l[6],g=l[7],v=l[8],y=l[9],m=l[10],b=l[11];return l!==s&&(s[0]=l[0],s[1]=l[1],s[2]=l[2],s[3]=l[3],s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15]),s[4]=f*c+v*A,s[5]=d*c+y*A,s[6]=p*c+m*A,s[7]=g*c+b*A,s[8]=v*c-f*A,s[9]=y*c-d*A,s[10]=m*c-p*A,s[11]=b*c-g*A,s},rotateZ:function(s,l,u){var A=Math.sin(u),c=Math.cos(u),f=l[0],d=l[1],p=l[2],g=l[3],v=l[4],y=l[5],m=l[6],b=l[7];return l!==s&&(s[8]=l[8],s[9]=l[9],s[10]=l[10],s[11]=l[11],s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15]),s[0]=f*c+v*A,s[1]=d*c+y*A,s[2]=p*c+m*A,s[3]=g*c+b*A,s[4]=v*c-f*A,s[5]=y*c-d*A,s[6]=m*c-p*A,s[7]=b*c-g*A,s},invert:function(s,l){var u=l[0],A=l[1],c=l[2],f=l[3],d=l[4],p=l[5],g=l[6],v=l[7],y=l[8],m=l[9],b=l[10],x=l[11],E=l[12],B=l[13],P=l[14],I=l[15],O=u*p-A*d,M=u*g-c*d,S=u*v-f*d,T=A*g-c*p,w=A*v-f*p,C=c*v-f*g,U=y*B-m*E,F=y*P-b*E,D=y*I-x*E,R=m*P-b*B,L=m*I-x*B,k=b*I-x*P,Q=O*k-M*L+S*R+T*D-w*F+C*U;return Q?(Q=1/Q,s[0]=(p*k-g*L+v*R)*Q,s[1]=(c*L-A*k-f*R)*Q,s[2]=(B*C-P*w+I*T)*Q,s[3]=(b*w-m*C-x*T)*Q,s[4]=(g*D-d*k-v*F)*Q,s[5]=(u*k-c*D+f*F)*Q,s[6]=(P*S-E*C-I*M)*Q,s[7]=(y*C-b*S+x*M)*Q,s[8]=(d*L-p*D+v*U)*Q,s[9]=(A*D-u*L-f*U)*Q,s[10]=(E*w-B*S+I*O)*Q,s[11]=(m*S-y*w-x*O)*Q,s[12]=(p*F-d*R-g*U)*Q,s[13]=(u*R-A*F+c*U)*Q,s[14]=(B*M-E*T-P*O)*Q,s[15]=(y*T-m*M+b*O)*Q,s):null},ortho:function(s,l,u,A,c,f,d){var p=1/(l-u),g=1/(A-c),v=1/(f-d);return s[0]=-2*p,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=-2*g,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2*v,s[11]=0,s[12]=(l+u)*p,s[13]=(c+A)*g,s[14]=(d+f)*v,s[15]=1,s}}};var a})()},2235:function(r){function a(l){return!!(typeof window<"u"&&typeof document<"u"&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&(function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var A,c,f=new Blob([""],{type:"text/javascript"}),d=URL.createObjectURL(f);try{c=new Worker(d),A=!0}catch{A=!1}return c&&c.terminate(),URL.revokeObjectURL(d),A})()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&(u=l&&l.failIfMajorPerformanceCaveat,s[u]===void 0&&(s[u]=(function(A){var c=document.createElement("canvas"),f=Object.create(a.webGLContextAttributes);return f.failIfMajorPerformanceCaveat=A,c.probablySupportsContext?c.probablySupportsContext("webgl",f)||c.probablySupportsContext("experimental-webgl",f):c.supportsContext?c.supportsContext("webgl",f)||c.supportsContext("experimental-webgl",f):c.getContext("webgl",f)||c.getContext("experimental-webgl",f)})(u)),s[u]));var u}r.exports?r.exports=a:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=a);var s={};a.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},5550:function(r){function a(s,l){this.x=s,this.y=l}r.exports=a,a.prototype={clone:function(){return new a(this.x,this.y)},add:function(s){return this.clone()._add(s)},sub:function(s){return this.clone()._sub(s)},multByPoint:function(s){return this.clone()._multByPoint(s)},divByPoint:function(s){return this.clone()._divByPoint(s)},mult:function(s){return this.clone()._mult(s)},div:function(s){return this.clone()._div(s)},rotate:function(s){return this.clone()._rotate(s)},rotateAround:function(s,l){return this.clone()._rotateAround(s,l)},matMult:function(s){return this.clone()._matMult(s)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(s){return this.x===s.x&&this.y===s.y},dist:function(s){return Math.sqrt(this.distSqr(s))},distSqr:function(s){var l=s.x-this.x,u=s.y-this.y;return l*l+u*u},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(s){return Math.atan2(this.y-s.y,this.x-s.x)},angleWith:function(s){return this.angleWithSep(s.x,s.y)},angleWithSep:function(s,l){return Math.atan2(this.x*l-this.y*s,this.x*s+this.y*l)},_matMult:function(s){var l=s[0]*this.x+s[1]*this.y,u=s[2]*this.x+s[3]*this.y;return this.x=l,this.y=u,this},_add:function(s){return this.x+=s.x,this.y+=s.y,this},_sub:function(s){return this.x-=s.x,this.y-=s.y,this},_mult:function(s){return this.x*=s,this.y*=s,this},_div:function(s){return this.x/=s,this.y/=s,this},_multByPoint:function(s){return this.x*=s.x,this.y*=s.y,this},_divByPoint:function(s){return this.x/=s.x,this.y/=s.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var s=this.y;return this.y=this.x,this.x=-s,this},_rotate:function(s){var l=Math.cos(s),u=Math.sin(s),A=l*this.x-u*this.y,c=u*this.x+l*this.y;return this.x=A,this.y=c,this},_rotateAround:function(s,l){var u=Math.cos(s),A=Math.sin(s),c=l.x+u*(this.x-l.x)-A*(this.y-l.y),f=l.y+A*(this.x-l.x)+u*(this.y-l.y);return this.x=c,this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(s){return s instanceof a?s:Array.isArray(s)?new a(s[0],s[1]):s}},3775:function(r){r.exports=(function(){function a(u,A,c){c=c||{},this.w=u||64,this.h=A||64,this.autoResize=!!c.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function s(u,A,c){this.x=0,this.y=u,this.w=this.free=A,this.h=c}function l(u,A,c,f,d,p,g){this.id=u,this.x=A,this.y=c,this.w=f,this.h=d,this.maxw=p||f,this.maxh=g||d,this.refcount=0}return a.prototype.pack=function(u,A){u=[].concat(u),A=A||{};for(var c,f,d,p,g=[],v=0;v<u.length;v++)if(c=u[v].w||u[v].width,f=u[v].h||u[v].height,d=u[v].id,c&&f){if(!(p=this.packOne(c,f,d)))continue;A.inPlace&&(u[v].x=p.x,u[v].y=p.y,u[v].id=p.id),g.push(p)}return this.shrink(),g},a.prototype.packOne=function(u,A,c){var f,d,p,g,v,y,m,b,x={freebin:-1,shelf:-1,waste:1/0},E=0;if(typeof c=="string"||typeof c=="number"){if(f=this.getBin(c))return this.ref(f),f;typeof c=="number"&&(this.maxId=Math.max(c,this.maxId))}else c=++this.maxId;for(g=0;g<this.freebins.length;g++){if(A===(f=this.freebins[g]).maxh&&u===f.maxw)return this.allocFreebin(g,u,A,c);A>f.maxh||u>f.maxw||A<=f.maxh&&u<=f.maxw&&(p=f.maxw*f.maxh-u*A)<x.waste&&(x.waste=p,x.freebin=g)}for(g=0;g<this.shelves.length;g++)if(E+=(d=this.shelves[g]).h,!(u>d.free)){if(A===d.h)return this.allocShelf(g,u,A,c);A>d.h||A<d.h&&(p=(d.h-A)*u)<x.waste&&(x.freebin=-1,x.waste=p,x.shelf=g)}return x.freebin!==-1?this.allocFreebin(x.freebin,u,A,c):x.shelf!==-1?this.allocShelf(x.shelf,u,A,c):A<=this.h-E&&u<=this.w?(d=new s(E,this.w,A),this.allocShelf(this.shelves.push(d)-1,u,A,c)):this.autoResize?(v=y=this.h,((m=b=this.w)<=v||u>m)&&(b=2*Math.max(u,m)),(v<m||A>v)&&(y=2*Math.max(A,v)),this.resize(b,y),this.packOne(u,A,c)):null},a.prototype.allocFreebin=function(u,A,c,f){var d=this.freebins.splice(u,1)[0];return d.id=f,d.w=A,d.h=c,d.refcount=0,this.bins[f]=d,this.ref(d),d},a.prototype.allocShelf=function(u,A,c,f){var d=this.shelves[u].alloc(A,c,f);return this.bins[f]=d,this.ref(d),d},a.prototype.shrink=function(){if(this.shelves.length>0){for(var u=0,A=0,c=0;c<this.shelves.length;c++){var f=this.shelves[c];A+=f.h,u=Math.max(f.w-f.free,u)}this.resize(u,A)}},a.prototype.getBin=function(u){return this.bins[u]},a.prototype.ref=function(u){if(++u.refcount==1){var A=u.h;this.stats[A]=1+(0|this.stats[A])}return u.refcount},a.prototype.unref=function(u){return u.refcount===0?0:(--u.refcount==0&&(this.stats[u.h]--,delete this.bins[u.id],this.freebins.push(u)),u.refcount)},a.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},a.prototype.resize=function(u,A){this.w=u,this.h=A;for(var c=0;c<this.shelves.length;c++)this.shelves[c].resize(u);return!0},s.prototype.alloc=function(u,A,c){if(u>this.free||A>this.h)return null;var f=this.x;return this.x+=u,this.free-=u,new l(c,f,this.y,u,A,u,this.h)},s.prototype.resize=function(u){return this.free+=u-this.w,this.w=u,!0},a})()},3673:function(r,a){var s=(function(){var l={},u=Math.PI/180,A=180/Math.PI,c=6378137,f=20037508342789244e-9;function d(g){return Number(g)===g&&g%1!=0}function p(g){if(g=g||{},this.size=g.size||256,this.expansion=g.antimeridian===!0?2:1,!l[this.size]){var v=this.size,y=l[this.size]={};y.Bc=[],y.Cc=[],y.zc=[],y.Ac=[];for(var m=0;m<30;m++)y.Bc.push(v/360),y.Cc.push(v/(2*Math.PI)),y.zc.push(v/2),y.Ac.push(v),v*=2}this.Bc=l[this.size].Bc,this.Cc=l[this.size].Cc,this.zc=l[this.size].zc,this.Ac=l[this.size].Ac}return p.prototype.px=function(g,v){if(d(v)){var y=this.size*Math.pow(2,v),m=y/2,b=y/360,x=y/(2*Math.PI),E=y,B=Math.min(Math.max(Math.sin(u*g[1]),-.9999),.9999),P=m+g[0]*b,I=m+.5*Math.log((1+B)/(1-B))*-x;return P>E*this.expansion&&(P=E*this.expansion),I>E&&(I=E),[P,I]}return m=this.zc[v],B=Math.min(Math.max(Math.sin(u*g[1]),-.9999),.9999),P=Math.round(m+g[0]*this.Bc[v]),I=Math.round(m+.5*Math.log((1+B)/(1-B))*-this.Cc[v]),P>this.Ac[v]*this.expansion&&(P=this.Ac[v]*this.expansion),I>this.Ac[v]&&(I=this.Ac[v]),[P,I]},p.prototype.ll=function(g,v){if(d(v)){var y=this.size*Math.pow(2,v),m=y/360,b=y/(2*Math.PI),x=y/2,E=(g[1]-x)/-b;return[(g[0]-x)/m,A*(2*Math.atan(Math.exp(E))-.5*Math.PI)]}return E=(g[1]-this.zc[v])/-this.Cc[v],[(g[0]-this.zc[v])/this.Bc[v],A*(2*Math.atan(Math.exp(E))-.5*Math.PI)]},p.prototype.bbox=function(g,v,y,m,b){m&&(v=Math.pow(2,y)-1-v);var x=[g*this.size,(+v+1)*this.size],E=[(+g+1)*this.size,v*this.size],B=this.ll(x,y).concat(this.ll(E,y));return b==="900913"?this.convert(B,"900913"):B},p.prototype.xyz=function(g,v,y,m){m==="900913"&&(g=this.convert(g,"WGS84"));var b=[g[0],g[1]],x=[g[2],g[3]],E=this.px(b,v),B=this.px(x,v),P=[Math.floor(E[0]/this.size),Math.floor((B[0]-1)/this.size)],I=[Math.floor(B[1]/this.size),Math.floor((E[1]-1)/this.size)],O={minX:Math.min.apply(Math,P)<0?0:Math.min.apply(Math,P),minY:Math.min.apply(Math,I)<0?0:Math.min.apply(Math,I),maxX:Math.max.apply(Math,P),maxY:Math.max.apply(Math,I)};if(y){var M={minY:Math.pow(2,v)-1-O.maxY,maxY:Math.pow(2,v)-1-O.minY};O.minY=M.minY,O.maxY=M.maxY}return O},p.prototype.convert=function(g,v){return v==="900913"?this.forward(g.slice(0,2)).concat(this.forward(g.slice(2,4))):this.inverse(g.slice(0,2)).concat(this.inverse(g.slice(2,4)))},p.prototype.forward=function(g){var v=[c*g[0]*u,c*Math.log(Math.tan(.25*Math.PI+.5*g[1]*u))];return v[0]>f&&(v[0]=f),v[0]<-f&&(v[0]=-f),v[1]>f&&(v[1]=f),v[1]<-f&&(v[1]=-f),v},p.prototype.inverse=function(g){return[g[0]*A/c,(.5*Math.PI-2*Math.atan(Math.exp(-g[1]/c)))*A]},p})();r.exports=s},9296:function(r){r.exports=s,r.exports.default=s;var a=1e20;function s(A,c,f,d,p,g){this.fontSize=A||24,this.buffer=c===void 0?3:c,this.cutoff=d||.25,this.fontFamily=p||"sans-serif",this.fontWeight=g||"normal",this.radius=f||8;var v=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=v,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(v*v),this.gridInner=new Float64Array(v*v),this.f=new Float64Array(v),this.d=new Float64Array(v),this.z=new Float64Array(v+1),this.v=new Int16Array(v),this.middle=Math.round(v/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function l(A,c,f,d,p,g,v){for(var y=0;y<c;y++){for(var m=0;m<f;m++)d[m]=A[m*c+y];for(u(d,p,g,v,f),m=0;m<f;m++)A[m*c+y]=p[m]}for(m=0;m<f;m++){for(y=0;y<c;y++)d[y]=A[m*c+y];for(u(d,p,g,v,c),y=0;y<c;y++)A[m*c+y]=Math.sqrt(p[y])}}function u(A,c,f,d,p){f[0]=0,d[0]=-a,d[1]=+a;for(var g=1,v=0;g<p;g++){for(var y=(A[g]+g*g-(A[f[v]]+f[v]*f[v]))/(2*g-2*f[v]);y<=d[v];)v--,y=(A[g]+g*g-(A[f[v]]+f[v]*f[v]))/(2*g-2*f[v]);f[++v]=g,d[v]=y,d[v+1]=+a}for(g=0,v=0;g<p;g++){for(;d[v+1]<g;)v++;c[g]=(g-f[v])*(g-f[v])+A[f[v]]}}s.prototype.draw=function(A){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(A,this.buffer,this.middle);for(var c=this.ctx.getImageData(0,0,this.size,this.size),f=new Uint8ClampedArray(this.size*this.size),d=0;d<this.size*this.size;d++){var p=c.data[4*d+3]/255;this.gridOuter[d]=p===1?0:p===0?a:Math.pow(Math.max(0,.5-p),2),this.gridInner[d]=p===1?a:p===0?0:Math.pow(Math.max(0,p-.5),2)}for(l(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),l(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),d=0;d<this.size*this.size;d++){var g=this.gridOuter[d]-this.gridInner[d];f[d]=Math.max(0,Math.min(255,Math.round(255-255*(g/this.radius+this.cutoff))))}return f}},9874:function(r){function a(s,l,u,A){this.cx=3*s,this.bx=3*(u-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(A-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=A,this.p2x=u,this.p2y=A}r.exports=a,a.prototype.sampleCurveX=function(s){return((this.ax*s+this.bx)*s+this.cx)*s},a.prototype.sampleCurveY=function(s){return((this.ay*s+this.by)*s+this.cy)*s},a.prototype.sampleCurveDerivativeX=function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},a.prototype.solveCurveX=function(s,l){var u,A,c,f,d;for(l===void 0&&(l=1e-6),c=s,d=0;d<8;d++){if(f=this.sampleCurveX(c)-s,Math.abs(f)<l)return c;var p=this.sampleCurveDerivativeX(c);if(Math.abs(p)<1e-6)break;c-=f/p}if((c=s)<(u=0))return u;if(c>(A=1))return A;for(;u<A;){if(f=this.sampleCurveX(c),Math.abs(f-s)<l)return c;s>f?u=c:A=c,c=.5*(A-u)+u}return c},a.prototype.solve=function(s,l){return this.sampleCurveY(this.solveCurveX(s,l))}},8929:function(r,a,s){r.exports.VectorTile=s(4054),r.exports.VectorTileFeature=s(6024),r.exports.VectorTileLayer=s(9701)},4054:function(r,a,s){var l=s(9701);function u(A,c,f){if(A===3){var d=new l(f,f.readVarint()+f.pos);d.length&&(c[d.name]=d)}}r.exports=function(A,c){this.layers=A.readFields(u,{},c)}},6024:function(r,a,s){var l=s(5550);function u(f,d,p,g,v){this.properties={},this.extent=p,this.type=0,this._pbf=f,this._geometry=-1,this._keys=g,this._values=v,f.readFields(A,this,d)}function A(f,d,p){f==1?d.id=p.readVarint():f==2?(function(g,v){for(var y=g.readVarint()+g.pos;g.pos<y;){var m=v._keys[g.readVarint()],b=v._values[g.readVarint()];v.properties[m]=b}})(p,d):f==3?d.type=p.readVarint():f==4&&(d._geometry=p.pos)}function c(f){for(var d,p,g=0,v=0,y=f.length,m=y-1;v<y;m=v++)d=f[v],g+=((p=f[m]).x-d.x)*(d.y+p.y);return g}r.exports=u,u.types=["Unknown","Point","LineString","Polygon"],u.prototype.loadGeometry=function(){var f=this._pbf;f.pos=this._geometry;for(var d,p=f.readVarint()+f.pos,g=1,v=0,y=0,m=0,b=[];f.pos<p;){if(v<=0){var x=f.readVarint();g=7&x,v=x>>3}if(v--,g===1||g===2)y+=f.readSVarint(),m+=f.readSVarint(),g===1&&(d&&b.push(d),d=[]),d.push(new l(y,m));else{if(g!==7)throw new Error("unknown command "+g);d&&d.push(d[0].clone())}}return d&&b.push(d),b},u.prototype.bbox=function(){var f=this._pbf;f.pos=this._geometry;for(var d=f.readVarint()+f.pos,p=1,g=0,v=0,y=0,m=1/0,b=-1/0,x=1/0,E=-1/0;f.pos<d;){if(g<=0){var B=f.readVarint();p=7&B,g=B>>3}if(g--,p===1||p===2)(v+=f.readSVarint())<m&&(m=v),v>b&&(b=v),(y+=f.readSVarint())<x&&(x=y),y>E&&(E=y);else if(p!==7)throw new Error("unknown command "+p)}return[m,x,b,E]},u.prototype.toGeoJSON=function(f,d,p){var g,v,y=this.extent*Math.pow(2,p),m=this.extent*f,b=this.extent*d,x=this.loadGeometry(),E=u.types[this.type];function B(O){for(var M=0;M<O.length;M++){var S=O[M],T=180-360*(S.y+b)/y;O[M]=[360*(S.x+m)/y-180,360/Math.PI*Math.atan(Math.exp(T*Math.PI/180))-90]}}switch(this.type){case 1:var P=[];for(g=0;g<x.length;g++)P[g]=x[g][0];B(x=P);break;case 2:for(g=0;g<x.length;g++)B(x[g]);break;case 3:for(x=(function(O){var M=O.length;if(M<=1)return[O];for(var S,T,w=[],C=0;C<M;C++){var U=c(O[C]);U!==0&&(T===void 0&&(T=U<0),T===U<0?(S&&w.push(S),S=[O[C]]):S.push(O[C]))}return S&&w.push(S),w})(x),g=0;g<x.length;g++)for(v=0;v<x[g].length;v++)B(x[g][v])}x.length===1?x=x[0]:E="Multi"+E;var I={type:"Feature",geometry:{type:E,coordinates:x},properties:this.properties};return"id"in this&&(I.id=this.id),I}},9701:function(r,a,s){var l=s(6024);function u(c,f){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=c,this._keys=[],this._values=[],this._features=[],c.readFields(A,this,f),this.length=this._features.length}function A(c,f,d){c===15?f.version=d.readVarint():c===1?f.name=d.readString():c===5?f.extent=d.readVarint():c===2?f._features.push(d.pos):c===3?f._keys.push(d.readString()):c===4&&f._values.push((function(p){for(var g=null,v=p.readVarint()+p.pos;p.pos<v;){var y=p.readVarint()>>3;g=y===1?p.readString():y===2?p.readFloat():y===3?p.readDouble():y===4?p.readVarint64():y===5?p.readVarint():y===6?p.readSVarint():y===7?p.readBoolean():null}return g})(d))}r.exports=u,u.prototype.feature=function(c){if(c<0||c>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[c];var f=this._pbf.readVarint()+this._pbf.pos;return new l(this._pbf,f,this.extent,this._keys,this._values)}},8583:function(r,a,s){var l=s(7418);function u(w,C){if(w===C)return 0;for(var U=w.length,F=C.length,D=0,R=Math.min(U,F);D<R;++D)if(w[D]!==C[D]){U=w[D],F=C[D];break}return U<F?-1:F<U?1:0}function A(w){return s.g.Buffer&&typeof s.g.Buffer.isBuffer=="function"?s.g.Buffer.isBuffer(w):!(w==null||!w._isBuffer)}var c=s(69),f=Object.prototype.hasOwnProperty,d=Array.prototype.slice,p=(function(){}).name==="foo";function g(w){return Object.prototype.toString.call(w)}function v(w){return!A(w)&&typeof s.g.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(w):!!w&&(w instanceof DataView||!!(w.buffer&&w.buffer instanceof ArrayBuffer)))}var y=r.exports=P,m=/\s*function\s+([^\(\s]*)\s*/;function b(w){if(c.isFunction(w)){if(p)return w.name;var C=w.toString().match(m);return C&&C[1]}}function x(w,C){return typeof w=="string"?w.length<C?w:w.slice(0,C):w}function E(w){if(p||!c.isFunction(w))return c.inspect(w);var C=b(w);return"[Function"+(C?": "+C:"")+"]"}function B(w,C,U,F,D){throw new y.AssertionError({message:U,actual:w,expected:C,operator:F,stackStartFunction:D})}function P(w,C){w||B(w,!0,C,"==",y.ok)}function I(w,C,U,F){if(w===C)return!0;if(A(w)&&A(C))return u(w,C)===0;if(c.isDate(w)&&c.isDate(C))return w.getTime()===C.getTime();if(c.isRegExp(w)&&c.isRegExp(C))return w.source===C.source&&w.global===C.global&&w.multiline===C.multiline&&w.lastIndex===C.lastIndex&&w.ignoreCase===C.ignoreCase;if(w!==null&&typeof w=="object"||C!==null&&typeof C=="object"){if(v(w)&&v(C)&&g(w)===g(C)&&!(w instanceof Float32Array||w instanceof Float64Array))return u(new Uint8Array(w.buffer),new Uint8Array(C.buffer))===0;if(A(w)!==A(C))return!1;var D=(F=F||{actual:[],expected:[]}).actual.indexOf(w);return D!==-1&&D===F.expected.indexOf(C)||(F.actual.push(w),F.expected.push(C),(function(R,L,k,Q){if(R==null||L==null)return!1;if(c.isPrimitive(R)||c.isPrimitive(L))return R===L;if(k&&Object.getPrototypeOf(R)!==Object.getPrototypeOf(L))return!1;var V=O(R),G=O(L);if(V&&!G||!V&&G)return!1;if(V)return I(R=d.call(R),L=d.call(L),k);var $,Y,ie=T(R),re=T(L);if(ie.length!==re.length)return!1;for(ie.sort(),re.sort(),Y=ie.length-1;Y>=0;Y--)if(ie[Y]!==re[Y])return!1;for(Y=ie.length-1;Y>=0;Y--)if(!I(R[$=ie[Y]],L[$],k,Q))return!1;return!0})(w,C,U,F))}return U?w===C:w==C}function O(w){return Object.prototype.toString.call(w)=="[object Arguments]"}function M(w,C){if(!w||!C)return!1;if(Object.prototype.toString.call(C)=="[object RegExp]")return C.test(w);try{if(w instanceof C)return!0}catch{}return!Error.isPrototypeOf(C)&&C.call({},w)===!0}function S(w,C,U,F){var D;if(typeof C!="function")throw new TypeError('"block" argument must be a function');typeof U=="string"&&(F=U,U=null),D=(function(k){var Q;try{k()}catch(V){Q=V}return Q})(C),F=(U&&U.name?" ("+U.name+").":".")+(F?" "+F:"."),w&&!D&&B(D,U,"Missing expected exception"+F);var R=typeof F=="string",L=!w&&D&&!U;if((!w&&c.isError(D)&&R&&M(D,U)||L)&&B(D,U,"Got unwanted exception"+F),w&&D&&U&&!M(D,U)||!w&&D)throw D}y.AssertionError=function(w){this.name="AssertionError",this.actual=w.actual,this.expected=w.expected,this.operator=w.operator,w.message?(this.message=w.message,this.generatedMessage=!1):(this.message=(function(k){return x(E(k.actual),128)+" "+k.operator+" "+x(E(k.expected),128)})(this),this.generatedMessage=!0);var C=w.stackStartFunction||B;if(Error.captureStackTrace)Error.captureStackTrace(this,C);else{var U=new Error;if(U.stack){var F=U.stack,D=b(C),R=F.indexOf(`
|
|
386
|
+
`;return r=Xd(s),new Worker(r,o)}if(r=t,e||(r=Gn(`${Ut._workerModulePrefix+i}.js`)),!Ht.supportsEsmWebWorkers())throw new Nt("This browser is not supported. Please update your browser to continue.");return o.type="module",new Worker(r,o)}async function y5(t,n){const e={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!Ht.supportsWebAssembly()){if(!ne(n.fallbackModulePath))throw new Nt(`This browser does not support Web Assembly, and no backup module was provided for ${t._workerPath}`);return e.modulePath=Gn(n.fallbackModulePath),e}e.wasmBinaryFile=Gn(n.wasmBinaryFile);const i=await xe.fetchArrayBuffer({url:e.wasmBinaryFile});return e.wasmBinary=i,e}function Ut(t,n){this._workerPath=t,this._maximumActiveTasks=n??Number.POSITIVE_INFINITY,this._activeTasks=0,this._nextID=0,this._webAssemblyPromise=void 0}const v5=(t,n,e,i)=>{const o=({data:r})=>{if(r.id===n){if(ne(r.error)){let a=r.error;a.name==="RuntimeError"?(a=new Nt(r.error.message),a.stack=r.error.stack):a.name==="DeveloperError"?(a=new pe(r.error.message),a.stack=r.error.stack):a.name==="Error"&&(a=new Error(r.error.message),a.stack=r.error.stack),Zd.raiseEvent(a),i(a)}else Zd.raiseEvent(),e(r.result);t.removeEventListener("message",o)}};return o},w5=[];async function b5(t,n,e){const i=await Promise.resolve(rx());ne(e)?i||(e.length=0):e=w5;const o=t._nextID++,r=new Promise((a,s)=>{t._worker.addEventListener("message",v5(t._worker,o,a,s))});return t._worker.postMessage({id:o,baseUrl:Gn.getCesiumBaseUrl().url,parameters:n,canTransferArrayBuffer:i},e),r}async function x5(t,n,e){++t._activeTasks;try{const i=await b5(t,n,e);return--t._activeTasks,i}catch(i){throw--t._activeTasks,i}}Ut.prototype.scheduleTask=function(t,n){if(ne(this._worker)||(this._worker=$d(this._workerPath)),!(this._activeTasks>=this._maximumActiveTasks))return x5(this,t,n)},Ut.prototype.initWebAssemblyModule=async function(t){if(ne(this._webAssemblyPromise))return this._webAssemblyPromise;const n=async()=>{const e=this._worker=$d(this._workerPath),i=await y5(this,t),o=await Promise.resolve(rx());let r;const a=i.wasmBinary;ne(a)&&o&&(r=[a]);const s=new Promise((l,u)=>{e.onmessage=function({data:A}){ne(A)?l(A.result):u(new Nt("Could not configure wasm module"))}});return e.postMessage({canTransferArrayBuffer:o,parameters:{webAssemblyConfig:i}},r),s};return this._webAssemblyPromise=n(),this._webAssemblyPromise},Ut.prototype.isDestroyed=function(){return!1},Ut.prototype.destroy=function(){return ne(this._worker)&&this._worker.terminate(),m4(this)},Ut.taskCompletedEvent=Zd,Ut._defaultWorkerModulePrefix="Workers/",Ut._workerModulePrefix=Ut._defaultWorkerModulePrefix,Ut._canTransferArrayBuffer=void 0;function Zi(){}Zi._transcodeTaskProcessor=new Ut("transcodeKTX2",Number.POSITIVE_INFINITY),Zi._readyPromise=void 0;function _5(){const t=Zi._transcodeTaskProcessor.initWebAssemblyModule({wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then(function(n){if(n)return Zi._transcodeTaskProcessor;throw new Nt("KTX2 transcoder could not be initialized.")});Zi._readyPromise=t}Zi.transcode=function(t,n){return N.defined("supportedTargetFormats",n),ne(Zi._readyPromise)||_5(),Zi._readyPromise.then(function(e){let i=t;t instanceof ArrayBuffer&&(i=new Uint8Array(t));const o={supportedTargetFormats:n,ktx2Buffer:i};return e.scheduleTask(o,[i.buffer])}).then(function(e){const i=e.length,o=Object.keys(e[0]);for(let r=0;r<i;r++){const a=e[r];for(let s=0;s<o.length;s++){const l=a[o[s]];a[o[s]]=new Ws(l.internalFormat,l.datatype,l.width,l.height,l.levelBuffer)}}if(o.length===1){for(let r=0;r<i;++r)e[r]=e[r][o[0]];i===1&&(e=e[0])}return e}).catch(function(e){throw e})};let ox;sx.setKTX2SupportedFormats=function(t,n,e,i,o,r){ox={s3tc:t,pvrtc:n,astc:e,etc:i,etc1:o,bc7:r}};function sx(t){N.defined("resourceOrUrlOrBuffer",t);let n;return t instanceof ArrayBuffer||ArrayBuffer.isView(t)?n=Promise.resolve(t):n=xe.createIfNeeded(t).fetchArrayBuffer(),n.then(function(e){return Zi.transcode(e,ox)})}function yn(t){this._ellipsoid=t??De.WGS84,this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(yn.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),yn.mercatorAngleToGeodeticLatitude=function(t){return he.PI_OVER_TWO-2*Math.atan(Math.exp(-t))},yn.geodeticLatitudeToMercatorAngle=function(t){t>yn.MaximumLatitude?t=yn.MaximumLatitude:t<-yn.MaximumLatitude&&(t=-yn.MaximumLatitude);const n=Math.sin(t);return .5*Math.log((1+n)/(1-n))},yn.MaximumLatitude=yn.mercatorAngleToGeodeticLatitude(Math.PI),yn.prototype.project=function(t,n){const e=this._semimajorAxis,i=t.longitude*e,o=yn.geodeticLatitudeToMercatorAngle(t.latitude)*e,r=t.height;return ne(n)?(n.x=i,n.y=o,n.z=r,n):new ae(i,o,r)},yn.prototype.unproject=function(t,n){if(!ne(t))throw new pe("cartesian is required");const e=this._oneOverSemimajorAxis,i=t.x*e,o=yn.mercatorAngleToGeodeticLatitude(t.y*e),r=t.z;return ne(n)?(n.longitude=i,n.latitude=o,n.height=r,n):new Qe(i,o,r)};const ax={};function Cl(t,n){if(!ne(t))throw new pe("identifier is required.");ne(ax[t])||(ax[t]=!0,console.warn(n??t))}Cl.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.",Cl.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",Cl.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",Cl.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored";function lx(t,n){if(!ne(t)||!ne(n))throw new pe("identifier and message are required.");Cl(t,n)}function js(){pe.throwInstantiationError()}Object.defineProperties(js.prototype,{rectangle:{get:pe.throwInstantiationError},tileWidth:{get:pe.throwInstantiationError},tileHeight:{get:pe.throwInstantiationError},maximumLevel:{get:pe.throwInstantiationError},minimumLevel:{get:pe.throwInstantiationError},tilingScheme:{get:pe.throwInstantiationError},tileDiscardPolicy:{get:pe.throwInstantiationError},errorEvent:{get:pe.throwInstantiationError},credit:{get:pe.throwInstantiationError},proxy:{get:pe.throwInstantiationError},hasAlphaChannel:{get:pe.throwInstantiationError}}),js.prototype.getTileCredits=function(t,n,e){pe.throwInstantiationError()},js.prototype.requestImage=function(t,n,e,i){pe.throwInstantiationError()},js.prototype.pickFeatures=function(t,n,e,i,o){pe.throwInstantiationError()};const C5=/\.ktx2$/i;js.loadImage=function(t,n){N.defined("url",n);const e=xe.createIfNeeded(n);return C5.test(e.url)?sx(e):ne(t)&&ne(t.tileDiscardPolicy)?e.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):e.fetchImage({preferImageBitmap:!0,flipY:!0})};function ux(t,n){return lx("defaultValue","defaultValue has been deprecated and will be removed in Cesium 1.134. Use the nullish coalescing operator instead: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing"),t??n}Object.defineProperty(ux,"EMPTY_OBJECT",{get:function(){return lx("defaultValue.EMPTY_OBJECT","defaultValue.EMPTY_OBJECT has been deprecated and will be removed in Cesium 1.134. Use Frozen.EMPTY_OBJECT instead"),gi.EMPTY_OBJECT}});var UA=3.141592653589793*3e3/180,Ot=3.141592653589793,OA=6378245,LA=.006693421622965943,cx=function(i,o){var i=+i,o=+o,r=i-.0065,a=o-.006,s=Math.sqrt(r*r+a*a)-2e-5*Math.sin(a*UA),l=Math.atan2(a,r)-3e-6*Math.cos(r*UA),u=s*Math.cos(l),A=s*Math.sin(l);return[u,A]},hx=function(o,i){var i=+i,o=+o,r=Math.sqrt(o*o+i*i)+2e-5*Math.sin(i*UA),a=Math.atan2(i,o)+3e-6*Math.cos(o*UA),s=r*Math.cos(a)+.0065,l=r*Math.sin(a)+.006;return[s,l]},Yd=function(o,i){var i=+i,o=+o;if(px(o,i))return[o,i];var r=Ax(o-105,i-35),a=fx(o-105,i-35),s=i/180*Ot,l=Math.sin(s);l=1-LA*l*l;var u=Math.sqrt(l);r=r*180/(OA*(1-LA)/(l*u)*Ot),a=a*180/(OA/u*Math.cos(s)*Ot);var A=i+r,c=o+a;return[c,A]},Jd=function(o,i){var i=+i,o=+o;if(px(o,i))return[o,i];var r=Ax(o-105,i-35),a=fx(o-105,i-35),s=i/180*Ot,l=Math.sin(s);l=1-LA*l*l;var u=Math.sqrt(l);r=r*180/(OA*(1-LA)/(l*u)*Ot),a=a*180/(OA/u*Math.cos(s)*Ot);var A=i+r,c=o+a;return[o*2-c,i*2-A]},Ax=function(o,i){var i=+i,o=+o,r=-100+2*o+3*i+.2*i*i+.1*o*i+.2*Math.sqrt(Math.abs(o));return r+=(20*Math.sin(6*o*Ot)+20*Math.sin(2*o*Ot))*2/3,r+=(20*Math.sin(i*Ot)+40*Math.sin(i/3*Ot))*2/3,r+=(160*Math.sin(i/12*Ot)+320*Math.sin(i*Ot/30))*2/3,r},fx=function(o,i){var i=+i,o=+o,r=300+o+2*i+.1*o*o+.1*o*i+.1*Math.sqrt(Math.abs(o));return r+=(20*Math.sin(6*o*Ot)+20*Math.sin(2*o*Ot))*2/3,r+=(20*Math.sin(o*Ot)+40*Math.sin(o/3*Ot))*2/3,r+=(150*Math.sin(o/12*Ot)+300*Math.sin(o/30*Ot))*2/3,r},px=function(o,i){var i=+i,o=+o;return!(o>73.66&&o<135.05&&i>3.86&&i<53.55)};function em(t,n){this.x=t||0,this.y=n||0,this.x=this.x,this.y=this.y}em.prototype.equals=function(t){return t&&t.x==this.x&&t.y==this.y};function ri(t,n){isNaN(t)&&(t=decode64(t),t=isNaN(t)?0:t),typeof t=="string"&&(t=parseFloat(t)),isNaN(n)&&(n=decode64(n),n=isNaN(n)?0:n),typeof t=="lat"&&(n=parseFloat(n)),this.lng=t,this.lat=n}ri.isInRange=function(t){return t&&t.lng<=180&&t.lng>=-180&&t.lat<=74&&t.lat>=-74},ri.prototype.equals=function(t){return t&&this.lat==t.lat&&this.lng==t.lng};function at(){}at.EARTHRADIUS=637099681e-2,at.MCBAND=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],at.LLBAND=[75,60,45,30,15,0],at.MC2LL=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],at.LL2MC=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],at.getDistanceByMC=function(t,n){if(!t||!n)return 0;var e,i,o,r;return t=this.convertMC2LL(t),!t||(e=this.toRadians(t.lng),i=this.toRadians(t.lat),n=this.convertMC2LL(n),!n)?0:(o=this.toRadians(n.lng),r=this.toRadians(n.lat),this.getDistance(e,o,i,r))},at.getDistanceByLL=function(t,n){if(!t||!n)return 0;t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74),n.lng=this.getLoop(n.lng,-180,180),n.lat=this.getRange(n.lat,-74,74);var e,i,o,r;return e=this.toRadians(t.lng),o=this.toRadians(t.lat),i=this.toRadians(n.lng),r=this.toRadians(n.lat),this.getDistance(e,i,o,r)},at.convertMC2LL=function(r){var n,e;n=new ri(Math.abs(r.lng),Math.abs(r.lat));for(var i=0;i<this.MCBAND.length;i++)if(n.lat>=this.MCBAND[i]){e=this.MC2LL[i];break}var o=this.convertor(r,e),r=new ri(o.lng.toFixed(6),o.lat.toFixed(6));return r},at.convertLL2MC=function(r){var n,e;r.lng=this.getLoop(r.lng,-180,180),r.lat=this.getRange(r.lat,-74,74),n=new ri(r.lng,r.lat);for(var i=0;i<this.LLBAND.length;i++)if(n.lat>=this.LLBAND[i]){e=this.LL2MC[i];break}if(!e){for(var i=this.LLBAND.length-1;i>=0;i--)if(n.lat<=-this.LLBAND[i]){e=this.LL2MC[i];break}}var o=this.convertor(r,e),r=new ri(o.lng.toFixed(2),o.lat.toFixed(2));return r},at.convertor=function(t,n){if(!(!t||!n)){var e=n[0]+n[1]*Math.abs(t.lng),i=Math.abs(t.lat)/n[9],o=n[2]+n[3]*i+n[4]*i*i+n[5]*i*i*i+n[6]*i*i*i*i+n[7]*i*i*i*i*i+n[8]*i*i*i*i*i*i;return e*=t.lng<0?-1:1,o*=t.lat<0?-1:1,new ri(e,o)}},at.getDistance=function(t,n,e,i){return this.EARTHRADIUS*Math.acos(Math.sin(e)*Math.sin(i)+Math.cos(e)*Math.cos(i)*Math.cos(n-t))},at.toRadians=function(t){return Math.PI*t/180},at.toDegrees=function(t){return 180*t/Math.PI},at.getRange=function(t,n,e){return n!=null&&(t=Math.max(t,n)),e!=null&&(t=Math.min(t,e)),t},at.getLoop=function(t,n,e){for(;t>e;)t-=e-n;for(;t<n;)t+=e-n;return t},at.prototype.lngLatToMercator=function(t){return at.convertLL2MC(t)},at.prototype.lngLatToPoint=function(t){var n=at.convertLL2MC(t);return new em(n.lng,n.lat)},at.prototype.mercatorToLngLat=function(t){return at.convertMC2LL(t)},at.prototype.PointToLngLat=function(t){var n=new ri(t.x,t.y);return at.convertMC2LL(n)},at.prototype.PointToPixel=function(t,n,e,i,o){if(t){t=this.lngLatToMercator(t,o);var r=this.getZoomUnits(n),a=Math.round((t.lng-e.lng)/r+i[Twidth]/2),s=Math.round((e.lat-t.lat)/r+i[Theight]/2);return new em(a,s)}},at.prototype.PixelToPoint=function(t,n,e,i,o){if(t){var r=this.getZoomUnits(n),a=e.lng+r*(t.x-i[Twidth]/2),s=e.lat-r*(t.y-i[Theight]/2),l=new ri(a,s);return this.mercatorToLngLat(l,o)}},at.prototype.getZoomUnits=function(t){return Math.pow(2,18-t)};function Qr(t){t=t||{},this._ellipsoid=ux(t.ellipsoid,De.WGS84);var n=!0;ne(t.wgs84)&&(n=t.wgs84),this._projection=new yn(this._ellipsoid);var e=new at;this._projection.project=function(a){var s={};return n?(s=Yd(he.toDegrees(a.longitude),he.toDegrees(a.latitude)),s=hx(s[0],s[1])):s=hx(he.toDegrees(a.longitude),he.toDegrees(a.latitude)),s[0]=Math.min(s[0],180),s[0]=Math.max(s[0],-180),s[1]=Math.min(s[1],74.000022),s[1]=Math.max(s[1],-71.988531),s=e.lngLatToPoint(new ri(s[0],s[1])),new _e(s.x,s.y)},this._projection.unproject=function(a){var s=e.mercatorToLngLat(new ri(a.x,a.y));return s[0]=(s[0]+180)%360-180,n?(s=cx(s.lng,s.lat),s=Jd(s[0],s[1])):s=cx(s.lng,s.lat),new Qe(he.toRadians(s[0]),he.toRadians(s[1]))},this._rectangleSouthwestInMeters=new _e(-2003772637e-2,-1170804166e-2),this._rectangleNortheastInMeters=new _e(2003772637e-2,1247410417e-2);var i=this._projection.unproject(this._rectangleSouthwestInMeters),o=this._projection.unproject(this._rectangleNortheastInMeters);this._rectangle=new Te(i.longitude,i.latitude,o.longitude,o.latitude),this.levelWidth=[];for(var r=0;r<19;r++)this.levelWidth[r]=Math.pow(2,18-r)*256}Object.defineProperties(Qr.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),Qr.prototype.getNumberOfXTilesAtLevel=function(t){return(1<<t)*.7},Qr.prototype.getNumberOfYTilesAtLevel=function(t){return 1<<t},Qr.prototype.rectangleToNativeRectangle=function(t,n){var e=this._projection,i=e.project(Te.southwest(t)),o=e.project(Te.northeast(t));return ne(n)?(n.west=i.x,n.south=i.y,n.east=o.x,n.north=o.y,n):new Te(i.x,i.y,o.x,o.y)},Qr.prototype.tileXYToNativeRectangle=function(t,n,e,i){var o=this.levelWidth[e],r=t*o,a=(t+1)*o;n=-n;var s=(n+1)*o,l=n*o;return ne(i)?(i.west=r,i.south=l,i.east=a,i.north=s,i):new Te(r,l,a,s)},Qr.prototype.tileXYToRectangle=function(t,n,e,i){var o=this.tileXYToNativeRectangle(t,n,e,i),r=this._projection,a=r.unproject(new _e(o.west,o.south)),s=r.unproject(new _e(o.east,o.north));return o.west=a.longitude,o.south=a.latitude,o.east=s.longitude,o.north=s.latitude,o},Qr.prototype.positionToTileXY=function(t,n,e){var i=this._rectangle;if(Te.contains(i,t)){var o=this._projection,r=o.project(t);if(ne(r)){var a=this.levelWidth[n],s=Math.floor(r.x/a),l=-Math.floor(r.y/a);return ne(e)?(e.x=s,e.y=l,e):new _e(s,l)}}};function zA(t){this._url=t.url||"http://online2.map.bdimg.com/onlinelabel/?qt=tile&styles=pl&x={x}&y={y}&z={z}",this._tileWidth=256,this._tileHeight=256,this._maximumLevel=18,this._tilingScheme=new Qr(t),this._credit=void 0,this._rectangle=this._tilingScheme.rectangle,this._ready=!0}function S5(t,n,e,i){var o=t._url;return o=o.replace("{x}",n).replace("{y}",-e).replace("{z}",i),o}Object.defineProperties(zA.prototype,{url:{get:function(){return this._url}},token:{get:function(){return this._token}},proxy:{get:function(){return this._proxy}},tileWidth:{get:function(){if(!this._ready)throw new DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 3}},tilingScheme:{get:function(){if(!this._ready)throw new DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new DeveloperError("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),zA.prototype.getTileCredits=function(t,n,e){},zA.prototype.requestImage=function(t,n,e){if(!this._ready)throw new DeveloperError("requestImage must not be called before the imagery provider is ready.");var i=S5(this,t,n,e);return js.loadImage(this,i)};class E5 extends _.UrlTemplateImageryProvider{constructor(e){super(e);z(this,"_indexTime",0);e.url="https://tileser.giiiis.com/timetile/",e.minimumLevel=1,e.maximumLevel=18,e.tilingScheme=new _.GeographicTilingScheme,this.indexTime=e.indexTime||0}get indexTime(){return this._indexTime}set indexTime(e){this._indexTime=e}async requestImage(e,i,o,r){try{let a=this.buildImageUrl(this.indexTime,e,i,o);return _.ImageryProvider.loadImage(this,a)}catch{return}}buildImageUrl(e,i,o,r){return`https://tileser.giiiis.com/timetile/${e}/${r}/${i}/${o}.jpg`}}class P5 extends _.UrlTemplateImageryProvider{constructor(e){super(e);z(this,"_indexTimeID",0);e.url="https://wayback.maptiles.arcgis.com/",e.minimumLevel=1,e.maximumLevel=18,this.indexTimeID=e.indexTimeID||0}get indexTimeID(){return this._indexTimeID}set indexTimeID(e){this._indexTimeID=e}async requestImage(e,i,o,r){try{let a;return this.indexTimeID!==0?a=this.buildImageUrl(this.indexTimeID,e,i,o):a=`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${o}/${i}/${e}`,_.ImageryProvider.loadImage(this,a)}catch{return}}buildImageUrl(e,i,o,r){return`https://wayback.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/WMTS/1.0.0/default028mm/MapServer/tile/${e}/${r}/${o}/${i}`}}var tm={exports:{}};/*! For license information please see mvt-basic-render.js.LICENSE.txt */var dx;function B5(){return dx||(dx=1,(function(t,n){(function(e,i){t.exports=i()})(self,(function(){return(function(){var e={3226:function(r){r.exports=(function(){return(a=new Float32Array(3))[0]=0,a[1]=0,a[2]=0,(function(){var s=new Float32Array(4);s[0]=0,s[1]=0,s[2]=0,s[3]=0})(),{vec3:{transformMat3:function(s,l,u){var A=l[0],c=l[1],f=l[2];return s[0]=A*u[0]+c*u[3]+f*u[6],s[1]=A*u[1]+c*u[4]+f*u[7],s[2]=A*u[2]+c*u[5]+f*u[8],s}},vec4:{transformMat4:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3];return s[0]=u[0]*A+u[4]*c+u[8]*f+u[12]*d,s[1]=u[1]*A+u[5]*c+u[9]*f+u[13]*d,s[2]=u[2]*A+u[6]*c+u[10]*f+u[14]*d,s[3]=u[3]*A+u[7]*c+u[11]*f+u[15]*d,s}},mat2:{create:function(){var s=new Float32Array(4);return s[0]=1,s[1]=0,s[2]=0,s[3]=1,s},rotate:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3],p=Math.sin(u),g=Math.cos(u);return s[0]=A*g+f*p,s[1]=c*g+d*p,s[2]=A*-p+f*g,s[3]=c*-p+d*g,s},scale:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3],p=u[0],g=u[1];return s[0]=A*p,s[1]=c*p,s[2]=f*g,s[3]=d*g,s}},mat3:{create:function(){var s=new Float32Array(9);return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=1,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s},fromRotation:function(s,l){var u=Math.sin(l),A=Math.cos(l);return s[0]=A,s[1]=u,s[2]=0,s[3]=-u,s[4]=A,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s}},mat4:{create:function(){var s=new Float32Array(16);return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},identity:function(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},translate:function(s,l,u){var A,c,f,d,p,g,v,y,m,b,x,E,B=u[0],P=u[1],I=u[2];return l===s?(s[12]=l[0]*B+l[4]*P+l[8]*I+l[12],s[13]=l[1]*B+l[5]*P+l[9]*I+l[13],s[14]=l[2]*B+l[6]*P+l[10]*I+l[14],s[15]=l[3]*B+l[7]*P+l[11]*I+l[15]):(A=l[0],c=l[1],f=l[2],d=l[3],p=l[4],g=l[5],v=l[6],y=l[7],m=l[8],b=l[9],x=l[10],E=l[11],s[0]=A,s[1]=c,s[2]=f,s[3]=d,s[4]=p,s[5]=g,s[6]=v,s[7]=y,s[8]=m,s[9]=b,s[10]=x,s[11]=E,s[12]=A*B+p*P+m*I+l[12],s[13]=c*B+g*P+b*I+l[13],s[14]=f*B+v*P+x*I+l[14],s[15]=d*B+y*P+E*I+l[15]),s},scale:function(s,l,u){var A=u[0],c=u[1],f=u[2];return s[0]=l[0]*A,s[1]=l[1]*A,s[2]=l[2]*A,s[3]=l[3]*A,s[4]=l[4]*c,s[5]=l[5]*c,s[6]=l[6]*c,s[7]=l[7]*c,s[8]=l[8]*f,s[9]=l[9]*f,s[10]=l[10]*f,s[11]=l[11]*f,s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15],s},multiply:function(s,l,u){var A=l[0],c=l[1],f=l[2],d=l[3],p=l[4],g=l[5],v=l[6],y=l[7],m=l[8],b=l[9],x=l[10],E=l[11],B=l[12],P=l[13],I=l[14],O=l[15],M=u[0],S=u[1],T=u[2],w=u[3];return s[0]=M*A+S*p+T*m+w*B,s[1]=M*c+S*g+T*b+w*P,s[2]=M*f+S*v+T*x+w*I,s[3]=M*d+S*y+T*E+w*O,M=u[4],S=u[5],T=u[6],w=u[7],s[4]=M*A+S*p+T*m+w*B,s[5]=M*c+S*g+T*b+w*P,s[6]=M*f+S*v+T*x+w*I,s[7]=M*d+S*y+T*E+w*O,M=u[8],S=u[9],T=u[10],w=u[11],s[8]=M*A+S*p+T*m+w*B,s[9]=M*c+S*g+T*b+w*P,s[10]=M*f+S*v+T*x+w*I,s[11]=M*d+S*y+T*E+w*O,M=u[12],S=u[13],T=u[14],w=u[15],s[12]=M*A+S*p+T*m+w*B,s[13]=M*c+S*g+T*b+w*P,s[14]=M*f+S*v+T*x+w*I,s[15]=M*d+S*y+T*E+w*O,s},perspective:function(s,l,u,A,c){var f=1/Math.tan(l/2),d=1/(A-c);return s[0]=f/u,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=f,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(c+A)*d,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*c*A*d,s[15]=0,s},rotateX:function(s,l,u){var A=Math.sin(u),c=Math.cos(u),f=l[4],d=l[5],p=l[6],g=l[7],v=l[8],y=l[9],m=l[10],b=l[11];return l!==s&&(s[0]=l[0],s[1]=l[1],s[2]=l[2],s[3]=l[3],s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15]),s[4]=f*c+v*A,s[5]=d*c+y*A,s[6]=p*c+m*A,s[7]=g*c+b*A,s[8]=v*c-f*A,s[9]=y*c-d*A,s[10]=m*c-p*A,s[11]=b*c-g*A,s},rotateZ:function(s,l,u){var A=Math.sin(u),c=Math.cos(u),f=l[0],d=l[1],p=l[2],g=l[3],v=l[4],y=l[5],m=l[6],b=l[7];return l!==s&&(s[8]=l[8],s[9]=l[9],s[10]=l[10],s[11]=l[11],s[12]=l[12],s[13]=l[13],s[14]=l[14],s[15]=l[15]),s[0]=f*c+v*A,s[1]=d*c+y*A,s[2]=p*c+m*A,s[3]=g*c+b*A,s[4]=v*c-f*A,s[5]=y*c-d*A,s[6]=m*c-p*A,s[7]=b*c-g*A,s},invert:function(s,l){var u=l[0],A=l[1],c=l[2],f=l[3],d=l[4],p=l[5],g=l[6],v=l[7],y=l[8],m=l[9],b=l[10],x=l[11],E=l[12],B=l[13],P=l[14],I=l[15],O=u*p-A*d,M=u*g-c*d,S=u*v-f*d,T=A*g-c*p,w=A*v-f*p,C=c*v-f*g,U=y*B-m*E,F=y*P-b*E,D=y*I-x*E,R=m*P-b*B,L=m*I-x*B,k=b*I-x*P,Q=O*k-M*L+S*R+T*D-w*F+C*U;return Q?(Q=1/Q,s[0]=(p*k-g*L+v*R)*Q,s[1]=(c*L-A*k-f*R)*Q,s[2]=(B*C-P*w+I*T)*Q,s[3]=(b*w-m*C-x*T)*Q,s[4]=(g*D-d*k-v*F)*Q,s[5]=(u*k-c*D+f*F)*Q,s[6]=(P*S-E*C-I*M)*Q,s[7]=(y*C-b*S+x*M)*Q,s[8]=(d*L-p*D+v*U)*Q,s[9]=(A*D-u*L-f*U)*Q,s[10]=(E*w-B*S+I*O)*Q,s[11]=(m*S-y*w-x*O)*Q,s[12]=(p*F-d*R-g*U)*Q,s[13]=(u*R-A*F+c*U)*Q,s[14]=(B*M-E*T-P*O)*Q,s[15]=(y*T-m*M+b*O)*Q,s):null},ortho:function(s,l,u,A,c,f,d){var p=1/(l-u),g=1/(A-c),v=1/(f-d);return s[0]=-2*p,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=-2*g,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2*v,s[11]=0,s[12]=(l+u)*p,s[13]=(c+A)*g,s[14]=(d+f)*v,s[15]=1,s}}};var a})()},2235:function(r){function a(l){return!!(typeof window<"u"&&typeof document<"u"&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&(function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var A,c,f=new Blob([""],{type:"text/javascript"}),d=URL.createObjectURL(f);try{c=new Worker(d),A=!0}catch{A=!1}return c&&c.terminate(),URL.revokeObjectURL(d),A})()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&(u=l&&l.failIfMajorPerformanceCaveat,s[u]===void 0&&(s[u]=(function(A){var c=document.createElement("canvas"),f=Object.create(a.webGLContextAttributes);return f.failIfMajorPerformanceCaveat=A,c.probablySupportsContext?c.probablySupportsContext("webgl",f)||c.probablySupportsContext("experimental-webgl",f):c.supportsContext?c.supportsContext("webgl",f)||c.supportsContext("experimental-webgl",f):c.getContext("webgl",f)||c.getContext("experimental-webgl",f)})(u)),s[u]));var u}r.exports?r.exports=a:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=a);var s={};a.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}},5550:function(r){function a(s,l){this.x=s,this.y=l}r.exports=a,a.prototype={clone:function(){return new a(this.x,this.y)},add:function(s){return this.clone()._add(s)},sub:function(s){return this.clone()._sub(s)},multByPoint:function(s){return this.clone()._multByPoint(s)},divByPoint:function(s){return this.clone()._divByPoint(s)},mult:function(s){return this.clone()._mult(s)},div:function(s){return this.clone()._div(s)},rotate:function(s){return this.clone()._rotate(s)},rotateAround:function(s,l){return this.clone()._rotateAround(s,l)},matMult:function(s){return this.clone()._matMult(s)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(s){return this.x===s.x&&this.y===s.y},dist:function(s){return Math.sqrt(this.distSqr(s))},distSqr:function(s){var l=s.x-this.x,u=s.y-this.y;return l*l+u*u},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(s){return Math.atan2(this.y-s.y,this.x-s.x)},angleWith:function(s){return this.angleWithSep(s.x,s.y)},angleWithSep:function(s,l){return Math.atan2(this.x*l-this.y*s,this.x*s+this.y*l)},_matMult:function(s){var l=s[0]*this.x+s[1]*this.y,u=s[2]*this.x+s[3]*this.y;return this.x=l,this.y=u,this},_add:function(s){return this.x+=s.x,this.y+=s.y,this},_sub:function(s){return this.x-=s.x,this.y-=s.y,this},_mult:function(s){return this.x*=s,this.y*=s,this},_div:function(s){return this.x/=s,this.y/=s,this},_multByPoint:function(s){return this.x*=s.x,this.y*=s.y,this},_divByPoint:function(s){return this.x/=s.x,this.y/=s.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var s=this.y;return this.y=this.x,this.x=-s,this},_rotate:function(s){var l=Math.cos(s),u=Math.sin(s),A=l*this.x-u*this.y,c=u*this.x+l*this.y;return this.x=A,this.y=c,this},_rotateAround:function(s,l){var u=Math.cos(s),A=Math.sin(s),c=l.x+u*(this.x-l.x)-A*(this.y-l.y),f=l.y+A*(this.x-l.x)+u*(this.y-l.y);return this.x=c,this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(s){return s instanceof a?s:Array.isArray(s)?new a(s[0],s[1]):s}},3775:function(r){r.exports=(function(){function a(u,A,c){c=c||{},this.w=u||64,this.h=A||64,this.autoResize=!!c.autoResize,this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0}function s(u,A,c){this.x=0,this.y=u,this.w=this.free=A,this.h=c}function l(u,A,c,f,d,p,g){this.id=u,this.x=A,this.y=c,this.w=f,this.h=d,this.maxw=p||f,this.maxh=g||d,this.refcount=0}return a.prototype.pack=function(u,A){u=[].concat(u),A=A||{};for(var c,f,d,p,g=[],v=0;v<u.length;v++)if(c=u[v].w||u[v].width,f=u[v].h||u[v].height,d=u[v].id,c&&f){if(!(p=this.packOne(c,f,d)))continue;A.inPlace&&(u[v].x=p.x,u[v].y=p.y,u[v].id=p.id),g.push(p)}return this.shrink(),g},a.prototype.packOne=function(u,A,c){var f,d,p,g,v,y,m,b,x={freebin:-1,shelf:-1,waste:1/0},E=0;if(typeof c=="string"||typeof c=="number"){if(f=this.getBin(c))return this.ref(f),f;typeof c=="number"&&(this.maxId=Math.max(c,this.maxId))}else c=++this.maxId;for(g=0;g<this.freebins.length;g++){if(A===(f=this.freebins[g]).maxh&&u===f.maxw)return this.allocFreebin(g,u,A,c);A>f.maxh||u>f.maxw||A<=f.maxh&&u<=f.maxw&&(p=f.maxw*f.maxh-u*A)<x.waste&&(x.waste=p,x.freebin=g)}for(g=0;g<this.shelves.length;g++)if(E+=(d=this.shelves[g]).h,!(u>d.free)){if(A===d.h)return this.allocShelf(g,u,A,c);A>d.h||A<d.h&&(p=(d.h-A)*u)<x.waste&&(x.freebin=-1,x.waste=p,x.shelf=g)}return x.freebin!==-1?this.allocFreebin(x.freebin,u,A,c):x.shelf!==-1?this.allocShelf(x.shelf,u,A,c):A<=this.h-E&&u<=this.w?(d=new s(E,this.w,A),this.allocShelf(this.shelves.push(d)-1,u,A,c)):this.autoResize?(v=y=this.h,((m=b=this.w)<=v||u>m)&&(b=2*Math.max(u,m)),(v<m||A>v)&&(y=2*Math.max(A,v)),this.resize(b,y),this.packOne(u,A,c)):null},a.prototype.allocFreebin=function(u,A,c,f){var d=this.freebins.splice(u,1)[0];return d.id=f,d.w=A,d.h=c,d.refcount=0,this.bins[f]=d,this.ref(d),d},a.prototype.allocShelf=function(u,A,c,f){var d=this.shelves[u].alloc(A,c,f);return this.bins[f]=d,this.ref(d),d},a.prototype.shrink=function(){if(this.shelves.length>0){for(var u=0,A=0,c=0;c<this.shelves.length;c++){var f=this.shelves[c];A+=f.h,u=Math.max(f.w-f.free,u)}this.resize(u,A)}},a.prototype.getBin=function(u){return this.bins[u]},a.prototype.ref=function(u){if(++u.refcount==1){var A=u.h;this.stats[A]=1+(0|this.stats[A])}return u.refcount},a.prototype.unref=function(u){return u.refcount===0?0:(--u.refcount==0&&(this.stats[u.h]--,delete this.bins[u.id],this.freebins.push(u)),u.refcount)},a.prototype.clear=function(){this.shelves=[],this.freebins=[],this.stats={},this.bins={},this.maxId=0},a.prototype.resize=function(u,A){this.w=u,this.h=A;for(var c=0;c<this.shelves.length;c++)this.shelves[c].resize(u);return!0},s.prototype.alloc=function(u,A,c){if(u>this.free||A>this.h)return null;var f=this.x;return this.x+=u,this.free-=u,new l(c,f,this.y,u,A,u,this.h)},s.prototype.resize=function(u){return this.free+=u-this.w,this.w=u,!0},a})()},3673:function(r,a){var s=(function(){var l={},u=Math.PI/180,A=180/Math.PI,c=6378137,f=20037508342789244e-9;function d(g){return Number(g)===g&&g%1!=0}function p(g){if(g=g||{},this.size=g.size||256,this.expansion=g.antimeridian===!0?2:1,!l[this.size]){var v=this.size,y=l[this.size]={};y.Bc=[],y.Cc=[],y.zc=[],y.Ac=[];for(var m=0;m<30;m++)y.Bc.push(v/360),y.Cc.push(v/(2*Math.PI)),y.zc.push(v/2),y.Ac.push(v),v*=2}this.Bc=l[this.size].Bc,this.Cc=l[this.size].Cc,this.zc=l[this.size].zc,this.Ac=l[this.size].Ac}return p.prototype.px=function(g,v){if(d(v)){var y=this.size*Math.pow(2,v),m=y/2,b=y/360,x=y/(2*Math.PI),E=y,B=Math.min(Math.max(Math.sin(u*g[1]),-.9999),.9999),P=m+g[0]*b,I=m+.5*Math.log((1+B)/(1-B))*-x;return P>E*this.expansion&&(P=E*this.expansion),I>E&&(I=E),[P,I]}return m=this.zc[v],B=Math.min(Math.max(Math.sin(u*g[1]),-.9999),.9999),P=Math.round(m+g[0]*this.Bc[v]),I=Math.round(m+.5*Math.log((1+B)/(1-B))*-this.Cc[v]),P>this.Ac[v]*this.expansion&&(P=this.Ac[v]*this.expansion),I>this.Ac[v]&&(I=this.Ac[v]),[P,I]},p.prototype.ll=function(g,v){if(d(v)){var y=this.size*Math.pow(2,v),m=y/360,b=y/(2*Math.PI),x=y/2,E=(g[1]-x)/-b;return[(g[0]-x)/m,A*(2*Math.atan(Math.exp(E))-.5*Math.PI)]}return E=(g[1]-this.zc[v])/-this.Cc[v],[(g[0]-this.zc[v])/this.Bc[v],A*(2*Math.atan(Math.exp(E))-.5*Math.PI)]},p.prototype.bbox=function(g,v,y,m,b){m&&(v=Math.pow(2,y)-1-v);var x=[g*this.size,(+v+1)*this.size],E=[(+g+1)*this.size,v*this.size],B=this.ll(x,y).concat(this.ll(E,y));return b==="900913"?this.convert(B,"900913"):B},p.prototype.xyz=function(g,v,y,m){m==="900913"&&(g=this.convert(g,"WGS84"));var b=[g[0],g[1]],x=[g[2],g[3]],E=this.px(b,v),B=this.px(x,v),P=[Math.floor(E[0]/this.size),Math.floor((B[0]-1)/this.size)],I=[Math.floor(B[1]/this.size),Math.floor((E[1]-1)/this.size)],O={minX:Math.min.apply(Math,P)<0?0:Math.min.apply(Math,P),minY:Math.min.apply(Math,I)<0?0:Math.min.apply(Math,I),maxX:Math.max.apply(Math,P),maxY:Math.max.apply(Math,I)};if(y){var M={minY:Math.pow(2,v)-1-O.maxY,maxY:Math.pow(2,v)-1-O.minY};O.minY=M.minY,O.maxY=M.maxY}return O},p.prototype.convert=function(g,v){return v==="900913"?this.forward(g.slice(0,2)).concat(this.forward(g.slice(2,4))):this.inverse(g.slice(0,2)).concat(this.inverse(g.slice(2,4)))},p.prototype.forward=function(g){var v=[c*g[0]*u,c*Math.log(Math.tan(.25*Math.PI+.5*g[1]*u))];return v[0]>f&&(v[0]=f),v[0]<-f&&(v[0]=-f),v[1]>f&&(v[1]=f),v[1]<-f&&(v[1]=-f),v},p.prototype.inverse=function(g){return[g[0]*A/c,(.5*Math.PI-2*Math.atan(Math.exp(-g[1]/c)))*A]},p})();r.exports=s},9296:function(r){r.exports=s,r.exports.default=s;var a=1e20;function s(A,c,f,d,p,g){this.fontSize=A||24,this.buffer=c===void 0?3:c,this.cutoff=d||.25,this.fontFamily=p||"sans-serif",this.fontWeight=g||"normal",this.radius=f||8;var v=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=v,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(v*v),this.gridInner=new Float64Array(v*v),this.f=new Float64Array(v),this.d=new Float64Array(v),this.z=new Float64Array(v+1),this.v=new Int16Array(v),this.middle=Math.round(v/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function l(A,c,f,d,p,g,v){for(var y=0;y<c;y++){for(var m=0;m<f;m++)d[m]=A[m*c+y];for(u(d,p,g,v,f),m=0;m<f;m++)A[m*c+y]=p[m]}for(m=0;m<f;m++){for(y=0;y<c;y++)d[y]=A[m*c+y];for(u(d,p,g,v,c),y=0;y<c;y++)A[m*c+y]=Math.sqrt(p[y])}}function u(A,c,f,d,p){f[0]=0,d[0]=-a,d[1]=+a;for(var g=1,v=0;g<p;g++){for(var y=(A[g]+g*g-(A[f[v]]+f[v]*f[v]))/(2*g-2*f[v]);y<=d[v];)v--,y=(A[g]+g*g-(A[f[v]]+f[v]*f[v]))/(2*g-2*f[v]);f[++v]=g,d[v]=y,d[v+1]=+a}for(g=0,v=0;g<p;g++){for(;d[v+1]<g;)v++;c[g]=(g-f[v])*(g-f[v])+A[f[v]]}}s.prototype.draw=function(A){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(A,this.buffer,this.middle);for(var c=this.ctx.getImageData(0,0,this.size,this.size),f=new Uint8ClampedArray(this.size*this.size),d=0;d<this.size*this.size;d++){var p=c.data[4*d+3]/255;this.gridOuter[d]=p===1?0:p===0?a:Math.pow(Math.max(0,.5-p),2),this.gridInner[d]=p===1?a:p===0?0:Math.pow(Math.max(0,p-.5),2)}for(l(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),l(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),d=0;d<this.size*this.size;d++){var g=this.gridOuter[d]-this.gridInner[d];f[d]=Math.max(0,Math.min(255,Math.round(255-255*(g/this.radius+this.cutoff))))}return f}},9874:function(r){function a(s,l,u,A){this.cx=3*s,this.bx=3*(u-s)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(A-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=s,this.p1y=A,this.p2x=u,this.p2y=A}r.exports=a,a.prototype.sampleCurveX=function(s){return((this.ax*s+this.bx)*s+this.cx)*s},a.prototype.sampleCurveY=function(s){return((this.ay*s+this.by)*s+this.cy)*s},a.prototype.sampleCurveDerivativeX=function(s){return(3*this.ax*s+2*this.bx)*s+this.cx},a.prototype.solveCurveX=function(s,l){var u,A,c,f,d;for(l===void 0&&(l=1e-6),c=s,d=0;d<8;d++){if(f=this.sampleCurveX(c)-s,Math.abs(f)<l)return c;var p=this.sampleCurveDerivativeX(c);if(Math.abs(p)<1e-6)break;c-=f/p}if((c=s)<(u=0))return u;if(c>(A=1))return A;for(;u<A;){if(f=this.sampleCurveX(c),Math.abs(f-s)<l)return c;s>f?u=c:A=c,c=.5*(A-u)+u}return c},a.prototype.solve=function(s,l){return this.sampleCurveY(this.solveCurveX(s,l))}},8929:function(r,a,s){r.exports.VectorTile=s(4054),r.exports.VectorTileFeature=s(6024),r.exports.VectorTileLayer=s(9701)},4054:function(r,a,s){var l=s(9701);function u(A,c,f){if(A===3){var d=new l(f,f.readVarint()+f.pos);d.length&&(c[d.name]=d)}}r.exports=function(A,c){this.layers=A.readFields(u,{},c)}},6024:function(r,a,s){var l=s(5550);function u(f,d,p,g,v){this.properties={},this.extent=p,this.type=0,this._pbf=f,this._geometry=-1,this._keys=g,this._values=v,f.readFields(A,this,d)}function A(f,d,p){f==1?d.id=p.readVarint():f==2?(function(g,v){for(var y=g.readVarint()+g.pos;g.pos<y;){var m=v._keys[g.readVarint()],b=v._values[g.readVarint()];v.properties[m]=b}})(p,d):f==3?d.type=p.readVarint():f==4&&(d._geometry=p.pos)}function c(f){for(var d,p,g=0,v=0,y=f.length,m=y-1;v<y;m=v++)d=f[v],g+=((p=f[m]).x-d.x)*(d.y+p.y);return g}r.exports=u,u.types=["Unknown","Point","LineString","Polygon"],u.prototype.loadGeometry=function(){var f=this._pbf;f.pos=this._geometry;for(var d,p=f.readVarint()+f.pos,g=1,v=0,y=0,m=0,b=[];f.pos<p;){if(v<=0){var x=f.readVarint();g=7&x,v=x>>3}if(v--,g===1||g===2)y+=f.readSVarint(),m+=f.readSVarint(),g===1&&(d&&b.push(d),d=[]),d.push(new l(y,m));else{if(g!==7)throw new Error("unknown command "+g);d&&d.push(d[0].clone())}}return d&&b.push(d),b},u.prototype.bbox=function(){var f=this._pbf;f.pos=this._geometry;for(var d=f.readVarint()+f.pos,p=1,g=0,v=0,y=0,m=1/0,b=-1/0,x=1/0,E=-1/0;f.pos<d;){if(g<=0){var B=f.readVarint();p=7&B,g=B>>3}if(g--,p===1||p===2)(v+=f.readSVarint())<m&&(m=v),v>b&&(b=v),(y+=f.readSVarint())<x&&(x=y),y>E&&(E=y);else if(p!==7)throw new Error("unknown command "+p)}return[m,x,b,E]},u.prototype.toGeoJSON=function(f,d,p){var g,v,y=this.extent*Math.pow(2,p),m=this.extent*f,b=this.extent*d,x=this.loadGeometry(),E=u.types[this.type];function B(O){for(var M=0;M<O.length;M++){var S=O[M],T=180-360*(S.y+b)/y;O[M]=[360*(S.x+m)/y-180,360/Math.PI*Math.atan(Math.exp(T*Math.PI/180))-90]}}switch(this.type){case 1:var P=[];for(g=0;g<x.length;g++)P[g]=x[g][0];B(x=P);break;case 2:for(g=0;g<x.length;g++)B(x[g]);break;case 3:for(x=(function(O){var M=O.length;if(M<=1)return[O];for(var S,T,w=[],C=0;C<M;C++){var U=c(O[C]);U!==0&&(T===void 0&&(T=U<0),T===U<0?(S&&w.push(S),S=[O[C]]):S.push(O[C]))}return S&&w.push(S),w})(x),g=0;g<x.length;g++)for(v=0;v<x[g].length;v++)B(x[g][v])}x.length===1?x=x[0]:E="Multi"+E;var I={type:"Feature",geometry:{type:E,coordinates:x},properties:this.properties};return"id"in this&&(I.id=this.id),I}},9701:function(r,a,s){var l=s(6024);function u(c,f){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=c,this._keys=[],this._values=[],this._features=[],c.readFields(A,this,f),this.length=this._features.length}function A(c,f,d){c===15?f.version=d.readVarint():c===1?f.name=d.readString():c===5?f.extent=d.readVarint():c===2?f._features.push(d.pos):c===3?f._keys.push(d.readString()):c===4&&f._values.push((function(p){for(var g=null,v=p.readVarint()+p.pos;p.pos<v;){var y=p.readVarint()>>3;g=y===1?p.readString():y===2?p.readFloat():y===3?p.readDouble():y===4?p.readVarint64():y===5?p.readVarint():y===6?p.readSVarint():y===7?p.readBoolean():null}return g})(d))}r.exports=u,u.prototype.feature=function(c){if(c<0||c>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[c];var f=this._pbf.readVarint()+this._pbf.pos;return new l(this._pbf,f,this.extent,this._keys,this._values)}},8583:function(r,a,s){var l=s(7418);function u(w,C){if(w===C)return 0;for(var U=w.length,F=C.length,D=0,R=Math.min(U,F);D<R;++D)if(w[D]!==C[D]){U=w[D],F=C[D];break}return U<F?-1:F<U?1:0}function A(w){return s.g.Buffer&&typeof s.g.Buffer.isBuffer=="function"?s.g.Buffer.isBuffer(w):!(w==null||!w._isBuffer)}var c=s(69),f=Object.prototype.hasOwnProperty,d=Array.prototype.slice,p=(function(){}).name==="foo";function g(w){return Object.prototype.toString.call(w)}function v(w){return!A(w)&&typeof s.g.ArrayBuffer=="function"&&(typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(w):!!w&&(w instanceof DataView||!!(w.buffer&&w.buffer instanceof ArrayBuffer)))}var y=r.exports=P,m=/\s*function\s+([^\(\s]*)\s*/;function b(w){if(c.isFunction(w)){if(p)return w.name;var C=w.toString().match(m);return C&&C[1]}}function x(w,C){return typeof w=="string"?w.length<C?w:w.slice(0,C):w}function E(w){if(p||!c.isFunction(w))return c.inspect(w);var C=b(w);return"[Function"+(C?": "+C:"")+"]"}function B(w,C,U,F,D){throw new y.AssertionError({message:U,actual:w,expected:C,operator:F,stackStartFunction:D})}function P(w,C){w||B(w,!0,C,"==",y.ok)}function I(w,C,U,F){if(w===C)return!0;if(A(w)&&A(C))return u(w,C)===0;if(c.isDate(w)&&c.isDate(C))return w.getTime()===C.getTime();if(c.isRegExp(w)&&c.isRegExp(C))return w.source===C.source&&w.global===C.global&&w.multiline===C.multiline&&w.lastIndex===C.lastIndex&&w.ignoreCase===C.ignoreCase;if(w!==null&&typeof w=="object"||C!==null&&typeof C=="object"){if(v(w)&&v(C)&&g(w)===g(C)&&!(w instanceof Float32Array||w instanceof Float64Array))return u(new Uint8Array(w.buffer),new Uint8Array(C.buffer))===0;if(A(w)!==A(C))return!1;var D=(F=F||{actual:[],expected:[]}).actual.indexOf(w);return D!==-1&&D===F.expected.indexOf(C)||(F.actual.push(w),F.expected.push(C),(function(R,L,k,Q){if(R==null||L==null)return!1;if(c.isPrimitive(R)||c.isPrimitive(L))return R===L;if(k&&Object.getPrototypeOf(R)!==Object.getPrototypeOf(L))return!1;var V=O(R),G=O(L);if(V&&!G||!V&&G)return!1;if(V)return I(R=d.call(R),L=d.call(L),k);var $,Y,ie=T(R),re=T(L);if(ie.length!==re.length)return!1;for(ie.sort(),re.sort(),Y=ie.length-1;Y>=0;Y--)if(ie[Y]!==re[Y])return!1;for(Y=ie.length-1;Y>=0;Y--)if(!I(R[$=ie[Y]],L[$],k,Q))return!1;return!0})(w,C,U,F))}return U?w===C:w==C}function O(w){return Object.prototype.toString.call(w)=="[object Arguments]"}function M(w,C){if(!w||!C)return!1;if(Object.prototype.toString.call(C)=="[object RegExp]")return C.test(w);try{if(w instanceof C)return!0}catch{}return!Error.isPrototypeOf(C)&&C.call({},w)===!0}function S(w,C,U,F){var D;if(typeof C!="function")throw new TypeError('"block" argument must be a function');typeof U=="string"&&(F=U,U=null),D=(function(k){var Q;try{k()}catch(V){Q=V}return Q})(C),F=(U&&U.name?" ("+U.name+").":".")+(F?" "+F:"."),w&&!D&&B(D,U,"Missing expected exception"+F);var R=typeof F=="string",L=!w&&D&&!U;if((!w&&c.isError(D)&&R&&M(D,U)||L)&&B(D,U,"Got unwanted exception"+F),w&&D&&U&&!M(D,U)||!w&&D)throw D}y.AssertionError=function(w){this.name="AssertionError",this.actual=w.actual,this.expected=w.expected,this.operator=w.operator,w.message?(this.message=w.message,this.generatedMessage=!1):(this.message=(function(k){return x(E(k.actual),128)+" "+k.operator+" "+x(E(k.expected),128)})(this),this.generatedMessage=!0);var C=w.stackStartFunction||B;if(Error.captureStackTrace)Error.captureStackTrace(this,C);else{var U=new Error;if(U.stack){var F=U.stack,D=b(C),R=F.indexOf(`
|
|
387
387
|
`+D);if(R>=0){var L=F.indexOf(`
|
|
388
388
|
`,R+1);F=F.substring(L+1)}this.stack=F}}},c.inherits(y.AssertionError,Error),y.fail=B,y.ok=P,y.equal=function(w,C,U){w!=C&&B(w,C,U,"==",y.equal)},y.notEqual=function(w,C,U){w==C&&B(w,C,U,"!=",y.notEqual)},y.deepEqual=function(w,C,U){I(w,C,!1)||B(w,C,U,"deepEqual",y.deepEqual)},y.deepStrictEqual=function(w,C,U){I(w,C,!0)||B(w,C,U,"deepStrictEqual",y.deepStrictEqual)},y.notDeepEqual=function(w,C,U){I(w,C,!1)&&B(w,C,U,"notDeepEqual",y.notDeepEqual)},y.notDeepStrictEqual=function w(C,U,F){I(C,U,!0)&&B(C,U,F,"notDeepStrictEqual",w)},y.strictEqual=function(w,C,U){w!==C&&B(w,C,U,"===",y.strictEqual)},y.notStrictEqual=function(w,C,U){w===C&&B(w,C,U,"!==",y.notStrictEqual)},y.throws=function(w,C,U){S(!0,w,C,U)},y.doesNotThrow=function(w,C,U){S(!1,w,C,U)},y.ifError=function(w){if(w)throw w},y.strict=l((function w(C,U){C||B(C,!0,U,"==",w)}),y,{equal:y.strictEqual,deepEqual:y.deepStrictEqual,notEqual:y.notStrictEqual,notDeepEqual:y.notDeepStrictEqual}),y.strict.strict=y.strict;var T=Object.keys||function(w){var C=[];for(var U in w)f.call(w,U)&&C.push(U);return C}},6076:function(r){typeof Object.create=="function"?r.exports=function(a,s){a.super_=s,a.prototype=Object.create(s.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:r.exports=function(a,s){a.super_=s;var l=function(){};l.prototype=s.prototype,a.prototype=new l,a.prototype.constructor=a}},2014:function(r){r.exports=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"}},69:function(r,a,s){var l=/%[sdj%]/g;a.format=function(D){if(!E(D)){for(var R=[],L=0;L<arguments.length;L++)R.push(c(arguments[L]));return R.join(" ")}L=1;for(var k=arguments,Q=k.length,V=String(D).replace(l,(function($){if($==="%%")return"%";if(L>=Q)return $;switch($){case"%s":return String(k[L++]);case"%d":return Number(k[L++]);case"%j":try{return JSON.stringify(k[L++])}catch{return"[Circular]"}default:return $}})),G=k[L];L<Q;G=k[++L])b(G)||!I(G)?V+=" "+G:V+=" "+c(G);return V},a.deprecate=function(D,R){if(B(s.g.process))return function(){return a.deprecate(D,R).apply(this,arguments)};if(process.noDeprecation===!0)return D;var L=!1;return function(){if(!L){if(process.throwDeprecation)throw new Error(R);process.traceDeprecation?console.trace(R):console.error(R),L=!0}return D.apply(this,arguments)}};var u,A={};function c(D,R){var L={seen:[],stylize:d};return arguments.length>=3&&(L.depth=arguments[2]),arguments.length>=4&&(L.colors=arguments[3]),m(R)?L.showHidden=R:R&&a._extend(L,R),B(L.showHidden)&&(L.showHidden=!1),B(L.depth)&&(L.depth=2),B(L.colors)&&(L.colors=!1),B(L.customInspect)&&(L.customInspect=!0),L.colors&&(L.stylize=f),p(L,D,L.depth)}function f(D,R){var L=c.styles[R];return L?"\x1B["+c.colors[L][0]+"m"+D+"\x1B["+c.colors[L][1]+"m":D}function d(D,R){return D}function p(D,R,L){if(D.customInspect&&R&&S(R.inspect)&&R.inspect!==a.inspect&&(!R.constructor||R.constructor.prototype!==R)){var k=R.inspect(L,D);return E(k)||(k=p(D,k,L)),k}var Q=(function(ue,te){if(B(te))return ue.stylize("undefined","undefined");if(E(te)){var ce="'"+JSON.stringify(te).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ue.stylize(ce,"string")}return x(te)?ue.stylize(""+te,"number"):m(te)?ue.stylize(""+te,"boolean"):b(te)?ue.stylize("null","null"):void 0})(D,R);if(Q)return Q;var V=Object.keys(R),G=(function(ue){var te={};return ue.forEach((function(ce,X){te[ce]=!0})),te})(V);if(D.showHidden&&(V=Object.getOwnPropertyNames(R)),M(R)&&(V.indexOf("message")>=0||V.indexOf("description")>=0))return g(R);if(V.length===0){if(S(R)){var $=R.name?": "+R.name:"";return D.stylize("[Function"+$+"]","special")}if(P(R))return D.stylize(RegExp.prototype.toString.call(R),"regexp");if(O(R))return D.stylize(Date.prototype.toString.call(R),"date");if(M(R))return g(R)}var Y,ie="",re=!1,le=["{","}"];return y(R)&&(re=!0,le=["[","]"]),S(R)&&(ie=" [Function"+(R.name?": "+R.name:"")+"]"),P(R)&&(ie=" "+RegExp.prototype.toString.call(R)),O(R)&&(ie=" "+Date.prototype.toUTCString.call(R)),M(R)&&(ie=" "+g(R)),V.length!==0||re&&R.length!=0?L<0?P(R)?D.stylize(RegExp.prototype.toString.call(R),"regexp"):D.stylize("[Object]","special"):(D.seen.push(R),Y=re?(function(ue,te,ce,X,q){for(var H=[],Z=0,K=te.length;Z<K;++Z)F(te,String(Z))?H.push(v(ue,te,ce,X,String(Z),!0)):H.push("");return q.forEach((function(j){j.match(/^\d+$/)||H.push(v(ue,te,ce,X,j,!0))})),H})(D,R,L,G,V):V.map((function(ue){return v(D,R,L,G,ue,re)})),D.seen.pop(),(function(ue,te,ce){return ue.reduce((function(X,q){return q.indexOf(`
|
|
389
389
|
`),X+q.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?ce[0]+(te===""?"":te+`
|
|
@@ -4020,7 +4020,7 @@ void main (void)
|
|
|
4020
4020
|
out_FragColor = color;
|
|
4021
4021
|
// ------------------ skybox vtxf end -------------------
|
|
4022
4022
|
}
|
|
4023
|
-
`,Yr=_.Cartesian3,MV=_.defaultValue,ir=_.defined,DV=_.destroyObject,RV=_.Ellipsoid,dE=_.EllipsoidGeometry,UV=_.GeometryPipeline,ba=_.Math,rr=_.Matrix4,OV=_.VertexFormat,LV=_.BufferUsage,zV=_.DrawCommand,kV=_.RenderState,QV=_.ShaderProgram,mE=_.ShaderSource,VV=_.VertexArray,gE=_._shadersAtmosphereCommon,yE=_._shadersSkyAtmosphereCommon,NV=_._shadersSkyAtmosphereVS,HV=_.Axis,GV=_.BlendingState,WV=_.CullFace,vE=_.SceneMode,xf=_.Transforms,jV=_.Matrix3,wE=_.DeveloperError,qV=_.loadCubeMap,KV=_.CubeMap;function xa(t,n){t=MV(t,RV.WGS84),this.show=!0,this.sources=n,this.perFragmentAtmosphere=!1,this._ellipsoid=t;const e=1.025,i=Yr.multiplyByScalar(t.radii,e,new Yr);this._scaleMatrix=rr.fromScale(i),this._modelMatrix=new rr,this._command=new zV({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new Yr(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new Yr(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new Yr;const o=new Yr;o.x=t.maximumRadius*e,o.y=t.maximumRadius,o.z=0,this._radiiAndDynamicAtmosphereColor=o;const r=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return r._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return r._hueSaturationBrightness.x=r.hueShift,r._hueSaturationBrightness.y=r.saturationShift,r._hueSaturationBrightness.z=r.brightnessShift,r._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return r.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return r.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return r.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return r.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return r.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return r.atmosphereMieAnisotropy},u_rotateMatrix:function(){return r._scratchRoateMatrix=r._scratchRoateMatrix||new jV,rr.getMatrix3(r._eunMatrix||rr.IDENTITY,r._scratchRoateMatrix)},u_cubeMap:function(){return r._cubeMap}}}Object.defineProperties(xa.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),xa.prototype.setDynamicLighting=function(t){this._radiiAndDynamicAtmosphereColor.z=t};const Gv=new rr;xa.prototype.update=function(t,n){if(!this.show)return;const e=t.mode;if(e!==vE.SCENE3D&&e!==vE.MORPHING||!t.passes.render)return;if(this._sources!==this.sources){const p=t.context;var i=this;this._sources=this.sources;var o=this.sources;if(!ir(o.positiveX)||!ir(o.negativeX)||!ir(o.positiveY)||!ir(o.negativeY)||!ir(o.positiveZ)||!ir(o.negativeZ))throw new wE("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof o.positiveX!=typeof o.negativeX||typeof o.positiveX!=typeof o.positiveY||typeof o.positiveX!=typeof o.negativeY||typeof o.positiveX!=typeof o.positiveZ||typeof o.positiveX!=typeof o.negativeZ)throw new wE("this.sources properties must all be the same type.");typeof o.positiveX=="string"?qV(p,this._sources).then(function(g){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=g}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new KV({context:p,source:o}))}const r=rr.fromRotationTranslation(t.context.uniformState.inverseViewRotation,Yr.ZERO,Gv),a=rr.multiplyTransformation(r,HV.Y_UP_TO_Z_UP,Gv),s=rr.multiply(this._scaleMatrix,a,Gv);rr.clone(s,this._modelMatrix);const l=t.context,u=ZV(this),A=t.globeTranslucencyState.translucent,c=this.perFragmentAtmosphere||A||!ir(n)||!n.show,f=this._command;if(xf.eastUpNorthToFixedFrame=xf.eastUpNorthToFixedFrame||xf.localFrameToFixedFrameGenerator("east","up"),this._eunMatrix=xf.eastUpNorthToFixedFrame(t.camera._positionWC,void 0,this._eunMatrix),!ir(f.vertexArray)){const p=dE.createGeometry(new dE({radii:new Yr(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:OV.POSITION_ONLY}));f.vertexArray=VV.fromGeometry({context:l,geometry:p,attributeLocations:UV.createAttributeLocations(p),bufferUsage:LV.STATIC_DRAW}),f.renderState=kV.fromCache({cull:{enabled:!0,face:WV.FRONT},blending:GV.ALPHA_BLEND,depthMask:!1})}const d=u|c<<2|A<<3;if(d!==this._flags){this._flags=d;const p=[];u&&p.push("COLOR_CORRECT"),c&&p.push("PER_FRAGMENT_ATMOSPHERE"),A&&p.push("GLOBE_TRANSLUCENT");const g=new mE({defines:p,sources:[gE,yE,NV]}),v=new mE({defines:p,sources:[gE,yE,FV]});this._spSkyAtmosphere=QV.fromCache({context:l,vertexShaderSource:g,fragmentShaderSource:v}),f.shaderProgram=this._spSkyAtmosphere}if(ir(this._cubeMap))return f};function ZV(t){return!(ba.equalsEpsilon(t.hueShift,0,ba.EPSILON7)&&ba.equalsEpsilon(t.saturationShift,0,ba.EPSILON7)&&ba.equalsEpsilon(t.brightnessShift,0,ba.EPSILON7))}xa.prototype.isDestroyed=function(){return!1},xa.prototype.destroy=function(){const t=this._command;return t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),DV(this)};const Fa=class Fa extends h.Destroyable{constructor(e,i){super();z(this,"_navigationManager");z(this,"_envManager");z(this,"_reu",(e,i)=>h.registerEventUpdate(this,e,i));this._czmViewer=e,this._viewer=i;const o=this.viewer,r=this.czmViewer,a=o.scene.screenSpaceCameraController;this._navigationManager=this.dv(new pV(r)),this._envManager=this.dv(new CV(r)),this.disposeVar(new h.ObjResettingWithEvent(this._czmViewer.xbsjUseBackgroundChanged,()=>{if(this._czmViewer.xbsjUseBackground)return new Fa.BackGroundResetting(this._czmViewer,this._viewer)})),this.disposeVar(new h.ObjResettingWithEvent(this._czmViewer.xbsjLocalBoxSourcesChanged,()=>{if(!this._czmViewer.xbsjLocalBoxSources)return;const s=pE(this._czmViewer.xbsjLocalBoxSources);if(s)return new Fa.LocalSkyBoxResetting(this._czmViewer,this._viewer,s)}));{this._reu(r.disabledInputStackChanged,()=>{const l=r.disabledInputStack===0;a.enableInputs=l,a.enableTranslate=l,a.enableZoom=l,a.enableRotate=l,a.enableTilt=l,a.enableLook=l});class s extends h.Destroyable{constructor(){super(),r.incrementDisabledInputStack(),this.dispose(()=>r.decrementDisabledInputStack())}}this.disposeVar(new h.ObjResettingWithEvent(r.sceneSsccEnableInputsChanged,()=>r.sceneSsccEnableInputs??!0?void 0:new s))}this.d(o.scene.camera.changed.addEventListener(()=>r.cameraChanged.emit()));{const s=()=>{const l=rt.latestDefaultAccessToken??rt.currentDefaultAccessToken;_.Ion.defaultAccessToken=r.ionAccessToken===""?l:r.ionAccessToken};s(),this.dispose(r.ionAccessTokenChanged.disposableOn(s))}{const{scene:s}=o,l=()=>{if(s.globe.show=r.globeShow??!0,"fov"in s.camera.frustum){const A=s.camera.frustum.aspectRatio;if(!A){console.error("aspectRatio is undefined,请检查Cesium的scene.camera.frustum");return}s.camera.frustum.fov=_.Math.toRadians(A>=1?r.fov:r.fov/A)}};l();const u=this.dv(h.createNextAnimateFrameEvent(r.globeShowChanged,r.fovChanged));this.d(u.don(l))}o.clockViewModel.currentTime=_.JulianDate.fromDate(new Date(r.currentTime)),this.dispose(r.currentTimeChanged.disposableOn(()=>{if(r.currentTime===void 0)return;const s=_.JulianDate.fromDate(new Date(r.currentTime));_.JulianDate.equals(s,o.clockViewModel.currentTime)||(o.clockViewModel.currentTime=s)})),this.dispose(ui(o.clockViewModel,"currentTime",s=>{const l=_.JulianDate.toDate(o.clockViewModel.currentTime).getTime();l!==r.currentTime&&(r.currentTime=l)}));{let s=_.getTimestamp(),l=0;this.d(o.scene.preUpdate.addEventListener(()=>{var u=_.getTimestamp();l++;var A=u-s;A>1e3&&(r._fps.value=l*1e3/A|0,s=u,l=0)}))}{const s=new _.SunLight,l=new _.DirectionalLight({direction:o.scene.camera.directionWC});class u extends h.Destroyable{constructor(){super();const c=r.flashLighting??!1;o.scene.light=c?l:s,c&&this.dispose(o.scene.preRender.addEventListener(function(f,d){l.direction=_.Cartesian3.clone(f.camera.directionWC,f.light.direction)}))}}this.disposeVar(new h.ObjResettingWithEvent(r.flashLightingChanged,()=>new u))}{const{scene:s}=o,{screenSpaceCameraController:l,globe:u}=s,A=(p,g)=>h.registerEventUpdate(this,p,g),c=rt.defaults,f=(p,g)=>A(r[p+"Changed"],()=>{if(!Reflect.has(r,p))throw new Error(`!Reflect.has(czmViewer, ${p})`);if(!Reflect.has(c,p))throw new Error(`!Reflect.has(CzmViewer.defaults, ${p})`);g(r[p]??c[p])}),d=(p,g)=>A(r[p+"Changed"],()=>{if(!Reflect.has(r,p))throw new Error(`!Reflect.has(czmViewer, ${p})`);g(r[p])});f("splitPosition",p=>o.scene.splitPosition=p),f("resolutionScale",p=>o.resolutionScale=p),f("msaaSamples",p=>o.scene.msaaSamples=p),d("shadows",p=>o.shadows=p),f("scenePpsfxaaEnabled",p=>s.postProcessStages.fxaa.enabled=p),d("scenePpsAmbientOcclusionEnabled",p=>s.postProcessStages.ambientOcclusion.enabled=p),d("scenePpsAmbientOcclusionAmbientOcclusionOnly",p=>s.postProcessStages.ambientOcclusion.uniforms.ambientOcclusionOnly=p),d("scenePpsAmbientOcclusionIntensity",p=>s.postProcessStages.ambientOcclusion.uniforms.intensity=p),d("scenePpsAmbientOcclusionBias",p=>s.postProcessStages.ambientOcclusion.uniforms.bias=p),d("scenePpsAmbientOcclusionLengthCap",p=>s.postProcessStages.ambientOcclusion.uniforms.lengthCap=p),d("scenePpsAmbientOcclusionStepSize",p=>s.postProcessStages.ambientOcclusion.uniforms.stepSize=p),d("scenePpsAmbientOcclusionBlurStepSize",p=>s.postProcessStages.ambientOcclusion.uniforms.blurStepSize=p),d("scenePpsBloomEnabled",p=>s.postProcessStages.bloom.enabled=p),d("scenePpsBloomGlowOnly",p=>s.postProcessStages.bloom.uniforms.glowOnly=p),d("scenePpsBloomContrast",p=>s.postProcessStages.bloom.uniforms.contrast=p),d("scenePpsBloomBrightness",p=>s.postProcessStages.bloom.uniforms.brightness=p),d("scenePpsBloomDelta",p=>s.postProcessStages.bloom.uniforms.delta=p),d("scenePpsBloomSigma",p=>s.postProcessStages.bloom.uniforms.sigma=p),d("scenePpsBloomStepSize",p=>s.postProcessStages.bloom.uniforms.stepSize=p),f("globeShow",p=>s.globe.show=p),f("depthTestAgainstTerrain",p=>{s.globe.depthTestAgainstTerrain=p}),f("terrainOpacity",p=>{s.globe.translucency.frontFaceAlpha=s.globe.translucency.backFaceAlpha=h.clamp(p,0,1)}),f("sceneGlobeShadows",p=>s.globe.shadows=_.ShadowMode[p]),d("sceneGlobeTerrainExaggeration",p=>s.globe.terrainExaggeration=p),d("sceneGlobeTerrainExaggerationRelativeHeight",p=>s.globe.terrainExaggerationRelativeHeight=p),d("sceneGlobeVerticalExaggeration",p=>s.globe.verticalExaggeration=p),d("sceneGlobeVerticalExaggerationRelativeHeight",p=>s.globe.verticalExaggerationRelativeHeight=p),d("sceneGlobeBackFaceCulling",p=>s.globe.backFaceCulling=p),d("sceneGlobeShowSkirts",p=>s.globe.showSkirts=p),d("sceneGlobeShowWaterEffect",p=>s.globe.showWaterEffect=p),d("sceneGlobeBaseColor",p=>s.globe.baseColor=Be(p)),d("sceneGlobeCartographicLimitRectangle",p=>s.globe.cartographicLimitRectangle=dt(p)),d("sceneGlobeClippingPlanes",p=>{if(!s.globe.clippingPlanes){s.globe.clippingPlanes=Ra(p??{enabled:!1});return}jc(s.globe.clippingPlanes,p)}),d("sceneGlobeClippingPolygons",p=>{s.globe.clippingPolygons=p?qc(p):void 0}),f("sceneSunGlowFactor",p=>s.sun&&(s.sun.glowFactor=p)),f("moon",p=>s.moon&&(s.moon.show=p)),f("sceneMoonOnlySunLighting",p=>s.moon&&(s.moon.onlySunLighting=p)),f("sceneMoonTextureUrl",p=>s.moon&&(s.moon.textureUrl=h.ESSceneObject.context.getStrFromEnv(p))),d("sceneSkyBoxShow",p=>s._xbsjOriginSkyBox.show=p),f("sceneSkyBoxSources",p=>s._xbsjOriginSkyBox.sources=p&&pE(p)),d("atmosphere",p=>o.scene._xbsjOriginSkyAtmosphere.show=p),d("sceneBackgroundColor",p=>o.scene.backgroundColor=Be(p)),f("sceneFogEnabled",p=>s.fog.enabled=p),f("sceneFogDensity",p=>s.fog.density=p),f("sceneFogScreenSpaceErrorFactor",p=>s.fog.screenSpaceErrorFactor=p),f("sceneFogMinimumBrightness",p=>s.fog.minimumBrightness=p),f("sceneDebugShowFramesPerSecond",p=>s.debugShowFramesPerSecond=p),f("sceneDebugShowCommands",p=>s.debugShowCommands=p),f("sceneDebugShowFrustums",p=>s.debugShowFrustums=p),f("sceneDebugShowFrustumPlanes",p=>s.debugShowFrustumPlanes=p),f("sceneDebugShowDepthFrustum",p=>s.debugShowDepthFrustum=p),f("sceneGlobeUndergroundColor",p=>u.undergroundColor=Be(p)),f("sceneGlobeUndergroundColorAlphaByDistance",p=>u.undergroundColorAlphaByDistance=ur(p)),f("sceneGlobeTranslucencyEnabled",p=>u.translucency.enabled=p),f("sceneGlobeTranslucencyBackFaceAlpha",p=>u.translucency.backFaceAlpha=p),f("sceneGlobeTranslucencyBackFaceAlphaByDistance",p=>u.translucency.backFaceAlphaByDistance=p&&ur(p)),f("sceneGlobeTranslucencyFrontFaceAlpha",p=>u.translucency.frontFaceAlpha=p),d("sceneGlobeTranslucencyFrontFaceAlphaByDistance",p=>u.translucency.frontFaceAlphaByDistance=p&&ur(p)),f("sceneGlobeTranslucencyRectangle",p=>u.translucency.rectangle=dt(p)),f("sceneSplitPosition",p=>s.splitPosition=h.clamp(p,0,1)),f("sceneSsccEnableCollisionDetection",p=>s.screenSpaceCameraController.enableCollisionDetection=p),f("sceneSsccZoomFactor",p=>s.screenSpaceCameraController._zoomFactor=p);{const p=()=>{o.cesiumInspector&&(o.cesiumInspector.container.style.display=r.showCesiumInspector??!1?"block":"none")};p(),this.d(r.showCesiumInspectorChanged.don(p))}f("cesiumInspectorWireframe",p=>{"cesiumInspector"in o&&(o.cesiumInspector.viewModel.wireframe=p)});{const p=()=>{o.cesium3DTilesInspector&&(o.cesium3DTilesInspector.container.style.display=r.showCesium3DTilesInspector??!1?"block":"none")};p(),this.dispose(r.showCesium3DTilesInspectorChanged.disposableOn(p))}this.ad(new h.ObjResettingWithEvent(r.particleGlobalControlChanged,()=>{if(!r.particleGlobalControl)return new Uv}))}}get czmViewer(){return this._czmViewer}get viewer(){return this._viewer}get navigationManager(){return this._navigationManager}get envManager(){return this._envManager}};z(Fa,"BackGroundResetting",class extends h.Destroyable{constructor(i,o){super(),this._czmViewer=i,this._viewer=o;const r=new bf;r.material=_.Material.fromType("Image");const a=this._viewer;a.scene.skyBox=r,this.dispose(()=>a.scene.skyBox=a.scene._xbsjOriginSkyBox);{const s=()=>{r.show=this._czmViewer.sceneSkyBoxShow};s(),this.dispose(this._czmViewer.sceneSkyBoxShowChanged.disposableOn(s))}{const s=()=>{r.material.uniforms.color=Be(this._czmViewer.xbsjBackgroundColor)};s(),this.dispose(this._czmViewer.xbsjBackgroundColorChanged.disposableOn(s))}{const s=()=>{r.material.uniforms.image=SceneObject.context.getStrFromEnv(this._czmViewer.xbsjBackgroundImageUri)};s(),this.dispose(this._czmViewer.xbsjBackgroundImageUriChanged.disposableOn(s))}}}),z(Fa,"LocalSkyBoxResetting",class extends h.Destroyable{constructor(o,r,a){super();z(this,"_skyAtmosphere");this._czmViewer=o,this._viewer=r,this._sources=a,this._skyAtmosphere=new xa(void 0,this._sources);const s=this._viewer;s.scene.skyAtmosphere=this._skyAtmosphere,this.dispose(()=>s.scene.skyAtmosphere=s.scene._xbsjOriginSkyAtmosphere);{const l=()=>{this._skyAtmosphere.show=this._czmViewer.atmosphere};l(),this.dispose(this._czmViewer.atmosphereChanged.disposableOn(l))}}get skyAtmosphere(){return this._skyAtmosphere}});let Wv=Fa;function XV(t,n,e,i,o){var r=_.Cartesian3.subtract(t,e,new _.Cartesian3),a=_.Cartesian3.dot(r,n);if(!(a<=0))return a*Math.tan(i*.5)*2/o}async function $V(t){const{viewer:n}=t;if(!n)return;const{width:e,height:i}=n.canvas,o=t.quickPickPosition([e*.5,i*.5]);if(!o)return;const r=await o;if(!r)return;const a=_.Cartesian3.fromDegrees(...r);if(!a)return;const s=n.camera.positionWC,l=n.camera.directionWC,u=n.camera.frustum.fovy;if(u===void 0)return;const A=n.canvas.height;return[XV(a,l,s,u,A),r]}const YV=_.Ellipsoid.WGS84.maximumRadius*2*Math.PI/512;function JV(t){return-Math.log2(t/YV)}var jv=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];function e3(t){const n=t|0;if(n<1||n>1e8)return;let e=-1;for(;n>=jv[++e];);const i=n/jv[e-1]|0;return[i*jv[e-1],i,e]}class t3 extends h.Destroyable{constructor(){super();z(this,"_lengthInPixels",this.disposeVar(h.react(100)));z(this,"_resolution",this.disposeVar(h.react(void 0)));z(this,"_computedLengthInPixels",this.disposeVar(h.react(void 0)));z(this,"_computedLengthInMeters",this.disposeVar(h.react(void 0)));z(this,"_computedLengthInStr",this.disposeVar(h.react(void 0)));{const e=()=>{let i,o;const{lengthInPixels:r,resolution:a}=this;if(r&&a){const s=e3(r*a);if(s){const[l,u,A]=s;o=l,i=l/a}}this._computedLengthInPixels.value=i,this._computedLengthInMeters.value=o};e(),this.dispose(this.lengthInPixelsChanged.disposableOn(e)),this.dispose(this.resolutionChanged.disposableOn(e))}{const e=()=>{const i=this.computedLengthInMeters;if(!i){this._computedLengthInStr.value=void 0;return}this._computedLengthInStr.value=i>1e3?`${i/1e3|0}km`:`${i}m`};e(),this.dispose(this.computedLengthInMetersChanged.disposableOn(e))}}get lengthInPixels(){return this._lengthInPixels.value}set lengthInPixels(e){this._lengthInPixels.value=e}get lengthInPixelsChanged(){return this._lengthInPixels.changed}get resolution(){return this._resolution.value}set resolution(e){this._resolution.value=e}get resolutionChanged(){return this._resolution.changed}get computedLengthInPixels(){return this._computedLengthInPixels.value}get computedLengthInPixelsChanged(){return this._computedLengthInPixels.changed}get computedLengthInMeters(){return this._computedLengthInMeters.value}get computedLengthInMetersChanged(){return this._computedLengthInMeters.changed}get computedLengthInStr(){return this._computedLengthInStr.value}get computedLengthInStrChanged(){return this._computedLengthInStr.changed}}class n3 extends h.Destroyable{constructor(e){super();z(this,"_enabled",this.dv(h.react(!0)));z(this,"_resolution",this.dv(h.react(void 0)));z(this,"_center",this.dv(h.react(void 0)));z(this,"_zoom",this.dv(h.react(void 0)));z(this,"_legend",this.dv(new t3));this._czmViewer=e;{const i=this.dv(h.createProcessingFromAsyncFunc(async o=>{let r,a,s;await o.promise(h.sleep(1e3));const l=await o.promise($V(this._czmViewer));if(l){const[u,A]=l;r=u,a=JV(u),s=A}this._resolution.value=r,this._zoom.value=a,this._center.value=s}));i.restart();{const o=()=>{this.enabled?i.restart():i.cancel()};o();const r=this.dv(h.createNextAnimateFrameEvent(this._czmViewer.cameraChanged,this.enabledChanged));this.dispose(r.disposableOn(o))}}{const i=()=>{this._legend.resolution=this.resolution};i(),this.dispose(this.resolutionChanged.disposableOn(i))}}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get resolution(){return this._resolution.value}set resolution(e){this._resolution.value=e}get resolutionChanged(){return this._resolution.changed}get center(){return this._center.value}get centerChanged(){return this._center.changed}get zoom(){return this._zoom.value}get zoomChanged(){return this._zoom.changed}get legend(){return this._legend}get length(){return(this.legend.computedLengthInMeters??-1)/(this.legend.computedLengthInPixels??1)}}function i3(t,n){try{const e=_.Ellipsoid.WGS84,i=e.scaleToGeodeticSurface(t);return n=_.Transforms.eastNorthUpToFixedFrame(i,e,n),n}catch{return _.Matrix4.clone(_.Matrix4.IDENTITY,n)}}const{combine:r3}=_,{ShaderDestination:qo}=_,bE={name:"FlattenedPipelineStage"};bE.process=function(t,n,e){if(n.xbsjFlattened){const i=t.shaderBuilder;i.addDefine("XBSJ_FLATTERN",void 0,qo.BOTH),i.addUniform("sampler2D","u_flattenedPolygonTexture",qo.BOTH),i.addUniform("vec4","u_flattenedBound",qo.BOTH),i.addUniform("bool","u_flattened",qo.BOTH),i.addUniform("mat4","u_inverseModelElevationMatrix",qo.BOTH),i.addUniform("mat4","u_inverseElevationModelMatrix",qo.BOTH),i.addUniform("bool","u_flattenDiscard",qo.BOTH);const o={u_flattenedBound:function(){return n.xbsjFlattenedBound??_.Cartesian4.ZERO},u_flattened:function(){return n.xbsjFlattened},u_inverseModelElevationMatrix:function(){const r=e.context.uniformState.inverseModel??_.Matrix4.IDENTITY;return n._uniformElevationInverseModelMatrix=_.Matrix4.multiply(r,n.xbsjElevationMatrix??_.Matrix4.IDENTITY,n._uniformElevationInverseModelMatrix??new _.Matrix4),n._uniformElevationInverseModelMatrix},u_inverseElevationModelMatrix:function(){const r=e.context.uniformState.model??_.Matrix4.IDENTITY;return n._uniformInverseElevationModelMatrix=_.Matrix4.multiply(n.xbsjElevationMatrixInv??_.Matrix4.IDENTITY,r,n._uniformInverseElevationModelMatrix??new _.Matrix4),n._uniformInverseElevationModelMatrix},u_flattenedPolygonTexture:function(){return n.xbsjGetFlattenedTextureFunc?n.xbsjGetFlattenedTextureFunc()??e.context.defaultTexture:e.context.defaultTexture}};t.uniformMap=r3(o,t.uniformMap)}};function xE(){Object.defineProperties(_.Model.prototype,{xbsjFlattened:{get:function(){return this._xbsjFlattened??!1},set:function(t){t!==this._xbsjFlattened&&this.resetDrawCommands(),this._xbsjFlattened=t}},xbsjElevationMatrix:{get:function(){return this._xbsjElevationMatrix},set:function(t){t!==this._xbsjElevationMatrix&&this.resetDrawCommands(),this._xbsjElevationMatrix=t,this._xbsjElevationMatrixInv=this._xbsjElevationMatrix&&_.Matrix4.inverseTransformation(this._xbsjElevationMatrix,new _.Matrix4)}},xbsjElevationMatrixInv:{get:function(){return this._xbsjElevationMatrixInv}},xbsjFlattenedBound:{get:function(){return this._xbsjFlattenedBound},set:function(t){t!==this._xbsjFlattenedBound&&this.resetDrawCommands(),this._xbsjFlattenedBound=t}},xbsjGetFlattenedTextureFunc:{get:function(){return this._xbsjGetFlattenedTextureFunc},set:function(t){t!==this._xbsjGetFlattenedTextureFunc&&this.resetDrawCommands(),this._xbsjGetFlattenedTextureFunc=t}}})}function _E(){Object.defineProperties(_.Cesium3DTileset.prototype,{xbsjFlattened:{get:function(){return this._xbsjFlattened??!1},set:function(t){this._xbsjFlattened=t}},xbsjElevationMatrix:{get:function(){return this._xbsjElevationMatrix},set:function(t){this._xbsjElevationMatrix=t}},xbsjFlattenedBound:{get:function(){return this._xbsjFlattenedBound},set:function(t){this._xbsjFlattenedBound=t}},xbsjGetFlattenedTextureFunc:{get:function(){return this._xbsjGetFlattenedTextureFunc},set:function(t){this._xbsjGetFlattenedTextureFunc=t}}})}function CE(){const t=_.Model3DTileContent.prototype.update;_.Model3DTileContent.prototype.update=function(n,e,...i){const o=this._model;return o.xbsjFlattened=n.xbsjFlattened,o.xbsjElevationMatrix=n.xbsjElevationMatrix,o.xbsjFlattenedBound=n.xbsjFlattenedBound,o.xbsjGetFlattenedTextureFunc=n.xbsjGetFlattenedTextureFunc,t.call(this,n,e,...i)}}function SE(){const t=_.ModelSceneGraph.prototype.configurePipeline;_.ModelSceneGraph.prototype.configurePipeline=function(n,...e){const i=t.call(this,n,...e),o=this._model,r=this.modelPipelineStages;return o.xbsjFlattened&&r.push(bE),i}}xE(),_E(),CE(),SE();const o3=()=>({createCesiumViewerFuncStr:void 0,flashLighting:void 0,resolutionScale:void 0,msaaSamples:void 0,shadows:!1,sceneSplitPosition:void 0,sceneGlobeShadows:void 0,sceneGlobeTerrainExaggeration:1,sceneGlobeTerrainExaggerationRelativeHeight:0,sceneGlobeVerticalExaggeration:1,sceneGlobeVerticalExaggerationRelativeHeight:0,sceneGlobeBackFaceCulling:!0,sceneGlobeShowSkirts:!0,sceneGlobeShowWaterEffect:!0,sceneGlobeBaseColor:h.reactArray([0,0,1,0]),sceneGlobeCartographicLimitRectangle:h.reactArray([-180,-90,180,90]),sceneGlobeClippingPlanes:h.reactJson(void 0),sceneGlobeClippingPlanesId:"",sceneGlobeClippingPolygons:h.reactJsonWithUndefined(void 0),sceneGlobeClippingPolygonsId:h.reactArray([]),sceneGlobeUndergroundColor:h.reactArrayWithUndefined(void 0),sceneGlobeUndergroundColorAlphaByDistance:h.reactArrayWithUndefined(void 0),sceneGlobeTranslucencyEnabled:void 0,sceneGlobeTranslucencyBackFaceAlpha:void 0,sceneGlobeTranslucencyBackFaceAlphaByDistance:h.reactArrayWithUndefined(void 0),sceneGlobeTranslucencyFrontFaceAlpha:void 0,sceneGlobeTranslucencyFrontFaceAlphaByDistance:h.reactArrayWithUndefined(void 0),sceneGlobeTranslucencyRectangle:h.reactArrayWithUndefined(void 0),sun:void 0,sceneSunGlowFactor:void 0,moon:void 0,sceneMoonTextureUrl:void 0,sceneMoonOnlySunLighting:void 0,sceneSkyBoxShow:!0,sceneSkyBoxSources:h.reactJson(rt.defaults.sceneSkyBoxSources),xbsjUseBackground:!1,xbsjBackgroundImageUri:"",xbsjBackgroundColor:h.reactArray([1,1,1,1]),xbsjLocalBoxSources:h.reactJsonWithUndefined(void 0),sceneBackgroundColor:h.reactArray([0,0,0,0]),sceneFogEnabled:void 0,sceneFogDensity:void 0,sceneFogScreenSpaceErrorFactor:void 0,sceneFogMinimumBrightness:void 0,sceneSsccEnableInputs:void 0,sceneSsccEnableCollisionDetection:void 0,sceneSsccZoomFactor:void 0,scenePpsfxaaEnabled:void 0,scenePpsAmbientOcclusionEnabled:!1,scenePpsAmbientOcclusionAmbientOcclusionOnly:!1,scenePpsAmbientOcclusionIntensity:3,scenePpsAmbientOcclusionBias:.1,scenePpsAmbientOcclusionLengthCap:.03,scenePpsAmbientOcclusionStepSize:1,scenePpsAmbientOcclusionBlurStepSize:.86,scenePpsBloomEnabled:!1,scenePpsBloomGlowOnly:!1,scenePpsBloomContrast:128,scenePpsBloomBrightness:-.3,scenePpsBloomDelta:1,scenePpsBloomSigma:3.78,scenePpsBloomStepSize:5,sceneDebugShowFramesPerSecond:void 0,sceneDebugShowCommands:void 0,sceneDebugShowFrustums:void 0,sceneDebugShowFrustumPlanes:void 0,sceneDebugShowDepthFrustum:void 0,showCesiumInspector:void 0,cesiumInspectorWireframe:void 0,showCesium3DTilesInspector:void 0,particleGlobalControl:!1}),s3=`
|
|
4023
|
+
`,Yr=_.Cartesian3,MV=_.defaultValue,ir=_.defined,DV=_.destroyObject,RV=_.Ellipsoid,dE=_.EllipsoidGeometry,UV=_.GeometryPipeline,ba=_.Math,rr=_.Matrix4,OV=_.VertexFormat,LV=_.BufferUsage,zV=_.DrawCommand,kV=_.RenderState,QV=_.ShaderProgram,mE=_.ShaderSource,VV=_.VertexArray,gE=_._shadersAtmosphereCommon,yE=_._shadersSkyAtmosphereCommon,NV=_._shadersSkyAtmosphereVS,HV=_.Axis,GV=_.BlendingState,WV=_.CullFace,vE=_.SceneMode,xf=_.Transforms,jV=_.Matrix3,wE=_.DeveloperError,qV=_.loadCubeMap,KV=_.CubeMap;function xa(t,n){t=MV(t,RV.WGS84),this.show=!0,this.sources=n,this.perFragmentAtmosphere=!1,this._ellipsoid=t;const e=1.025,i=Yr.multiplyByScalar(t.radii,e,new Yr);this._scaleMatrix=rr.fromScale(i),this._modelMatrix=new rr,this._command=new zV({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.atmosphereLightIntensity=50,this.atmosphereRayleighCoefficient=new Yr(55e-7,13e-6,284e-7),this.atmosphereMieCoefficient=new Yr(21e-6,21e-6,21e-6),this.atmosphereRayleighScaleHeight=1e4,this.atmosphereMieScaleHeight=3200,this.atmosphereMieAnisotropy=.9,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new Yr;const o=new Yr;o.x=t.maximumRadius*e,o.y=t.maximumRadius,o.z=0,this._radiiAndDynamicAtmosphereColor=o;const r=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return r._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return r._hueSaturationBrightness.x=r.hueShift,r._hueSaturationBrightness.y=r.saturationShift,r._hueSaturationBrightness.z=r.brightnessShift,r._hueSaturationBrightness},u_atmosphereLightIntensity:function(){return r.atmosphereLightIntensity},u_atmosphereRayleighCoefficient:function(){return r.atmosphereRayleighCoefficient},u_atmosphereMieCoefficient:function(){return r.atmosphereMieCoefficient},u_atmosphereRayleighScaleHeight:function(){return r.atmosphereRayleighScaleHeight},u_atmosphereMieScaleHeight:function(){return r.atmosphereMieScaleHeight},u_atmosphereMieAnisotropy:function(){return r.atmosphereMieAnisotropy},u_rotateMatrix:function(){return r._scratchRoateMatrix=r._scratchRoateMatrix||new jV,rr.getMatrix3(r._eunMatrix||rr.IDENTITY,r._scratchRoateMatrix)},u_cubeMap:function(){return r._cubeMap}}}Object.defineProperties(xa.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),xa.prototype.setDynamicLighting=function(t){this._radiiAndDynamicAtmosphereColor.z=t};const Gv=new rr;xa.prototype.update=function(t,n){if(!this.show)return;const e=t.mode;if(e!==vE.SCENE3D&&e!==vE.MORPHING||!t.passes.render)return;if(this._sources!==this.sources){const p=t.context;var i=this;this._sources=this.sources;var o=this.sources;if(!ir(o.positiveX)||!ir(o.negativeX)||!ir(o.positiveY)||!ir(o.negativeY)||!ir(o.positiveZ)||!ir(o.negativeZ))throw new wE("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof o.positiveX!=typeof o.negativeX||typeof o.positiveX!=typeof o.positiveY||typeof o.positiveX!=typeof o.negativeY||typeof o.positiveX!=typeof o.positiveZ||typeof o.positiveX!=typeof o.negativeZ)throw new wE("this.sources properties must all be the same type.");typeof o.positiveX=="string"?qV(p,this._sources).then(function(g){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=g}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new KV({context:p,source:o}))}const r=rr.fromRotationTranslation(t.context.uniformState.inverseViewRotation,Yr.ZERO,Gv),a=rr.multiplyTransformation(r,HV.Y_UP_TO_Z_UP,Gv),s=rr.multiply(this._scaleMatrix,a,Gv);rr.clone(s,this._modelMatrix);const l=t.context,u=ZV(this),A=t.globeTranslucencyState.translucent,c=this.perFragmentAtmosphere||A||!ir(n)||!n.show,f=this._command;if(xf.eastUpNorthToFixedFrame=xf.eastUpNorthToFixedFrame||xf.localFrameToFixedFrameGenerator("east","up"),this._eunMatrix=xf.eastUpNorthToFixedFrame(t.camera._positionWC,void 0,this._eunMatrix),!ir(f.vertexArray)){const p=dE.createGeometry(new dE({radii:new Yr(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:OV.POSITION_ONLY}));f.vertexArray=VV.fromGeometry({context:l,geometry:p,attributeLocations:UV.createAttributeLocations(p),bufferUsage:LV.STATIC_DRAW}),f.renderState=kV.fromCache({cull:{enabled:!0,face:WV.FRONT},blending:GV.ALPHA_BLEND,depthMask:!1})}const d=u|c<<2|A<<3;if(d!==this._flags){this._flags=d;const p=[];u&&p.push("COLOR_CORRECT"),c&&p.push("PER_FRAGMENT_ATMOSPHERE"),A&&p.push("GLOBE_TRANSLUCENT");const g=new mE({defines:p,sources:[gE,yE,NV]}),v=new mE({defines:p,sources:[gE,yE,FV]});this._spSkyAtmosphere=QV.fromCache({context:l,vertexShaderSource:g,fragmentShaderSource:v}),f.shaderProgram=this._spSkyAtmosphere}if(ir(this._cubeMap))return f};function ZV(t){return!(ba.equalsEpsilon(t.hueShift,0,ba.EPSILON7)&&ba.equalsEpsilon(t.saturationShift,0,ba.EPSILON7)&&ba.equalsEpsilon(t.brightnessShift,0,ba.EPSILON7))}xa.prototype.isDestroyed=function(){return!1},xa.prototype.destroy=function(){const t=this._command;return t.vertexArray=t.vertexArray&&t.vertexArray.destroy(),this._spSkyAtmosphere=this._spSkyAtmosphere&&this._spSkyAtmosphere.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),DV(this)};const Fa=class Fa extends h.Destroyable{constructor(e,i){super();z(this,"_navigationManager");z(this,"_envManager");z(this,"_reu",(e,i)=>h.registerEventUpdate(this,e,i));this._czmViewer=e,this._viewer=i;const o=this.viewer,r=this.czmViewer,a=o.scene.screenSpaceCameraController;this._navigationManager=this.dv(new pV(r)),this._envManager=this.dv(new CV(r)),this.disposeVar(new h.ObjResettingWithEvent(this._czmViewer.xbsjUseBackgroundChanged,()=>{if(this._czmViewer.xbsjUseBackground)return new Fa.BackGroundResetting(this._czmViewer,this._viewer)})),this.disposeVar(new h.ObjResettingWithEvent(this._czmViewer.xbsjLocalBoxSourcesChanged,()=>{if(!this._czmViewer.xbsjLocalBoxSources)return;const s=pE(this._czmViewer.xbsjLocalBoxSources);if(s)return new Fa.LocalSkyBoxResetting(this._czmViewer,this._viewer,s)}));{this._reu(r.disabledInputStackChanged,()=>{const l=r.disabledInputStack===0;a.enableInputs=l,a.enableTranslate=l,a.enableZoom=l,a.enableRotate=l,a.enableTilt=l,a.enableLook=l});class s extends h.Destroyable{constructor(){super(),r.incrementDisabledInputStack(),this.dispose(()=>r.decrementDisabledInputStack())}}this.disposeVar(new h.ObjResettingWithEvent(r.sceneSsccEnableInputsChanged,()=>r.sceneSsccEnableInputs??!0?void 0:new s))}this.d(o.scene.camera.changed.addEventListener(()=>r.cameraChanged.emit()));{const s=()=>{const l=rt.latestDefaultAccessToken??rt.currentDefaultAccessToken;_.Ion.defaultAccessToken=r.ionAccessToken===""?l:r.ionAccessToken};s(),this.dispose(r.ionAccessTokenChanged.disposableOn(s))}{const{scene:s}=o,l=()=>{if(s.globe.show=r.globeShow??!0,"fov"in s.camera.frustum){const A=s.camera.frustum.aspectRatio;if(!A){console.error("aspectRatio is undefined,请检查Cesium的scene.camera.frustum");return}s.camera.frustum.fov=_.Math.toRadians(A>=1?r.fov:r.fov/A)}};l();const u=this.dv(h.createNextAnimateFrameEvent(r.globeShowChanged,r.fovChanged));this.d(u.don(l))}o.clockViewModel.currentTime=_.JulianDate.fromDate(new Date(r.currentTime)),this.dispose(r.currentTimeChanged.disposableOn(()=>{if(r.currentTime===void 0)return;const s=_.JulianDate.fromDate(new Date(r.currentTime));_.JulianDate.equals(s,o.clockViewModel.currentTime)||(o.clockViewModel.currentTime=s)})),this.dispose(ui(o.clockViewModel,"currentTime",s=>{const l=_.JulianDate.toDate(o.clockViewModel.currentTime).getTime();l!==r.currentTime&&(r.currentTime=l)}));{let s=_.getTimestamp(),l=0;this.d(o.scene.preUpdate.addEventListener(()=>{var u=_.getTimestamp();l++;var A=u-s;A>1e3&&(r._fps.value=l*1e3/A|0,s=u,l=0)}))}{const s=new _.SunLight,l=new _.DirectionalLight({direction:o.scene.camera.directionWC});class u extends h.Destroyable{constructor(){super();const c=r.flashLighting??!1;o.scene.light=c?l:s,c&&this.dispose(o.scene.preRender.addEventListener(function(f,d){l.direction=_.Cartesian3.clone(f.camera.directionWC,f.light.direction)}))}}this.disposeVar(new h.ObjResettingWithEvent(r.flashLightingChanged,()=>new u))}{const{scene:s}=o,{screenSpaceCameraController:l,globe:u}=s,A=(p,g)=>h.registerEventUpdate(this,p,g),c=rt.defaults,f=(p,g)=>A(r[p+"Changed"],()=>{if(!Reflect.has(r,p))throw new Error(`!Reflect.has(czmViewer, ${p})`);if(!Reflect.has(c,p))throw new Error(`!Reflect.has(CzmViewer.defaults, ${p})`);g(r[p]??c[p])}),d=(p,g)=>A(r[p+"Changed"],()=>{if(!Reflect.has(r,p))throw new Error(`!Reflect.has(czmViewer, ${p})`);g(r[p])});f("splitPosition",p=>o.scene.splitPosition=p),f("resolutionScale",p=>o.resolutionScale=p),f("msaaSamples",p=>o.scene.msaaSamples=p),d("shadows",p=>o.shadows=p),f("scenePpsfxaaEnabled",p=>s.postProcessStages.fxaa.enabled=p),d("scenePpsAmbientOcclusionEnabled",p=>s.postProcessStages.ambientOcclusion.enabled=p),d("scenePpsAmbientOcclusionAmbientOcclusionOnly",p=>s.postProcessStages.ambientOcclusion.uniforms.ambientOcclusionOnly=p),d("scenePpsAmbientOcclusionIntensity",p=>s.postProcessStages.ambientOcclusion.uniforms.intensity=p),d("scenePpsAmbientOcclusionBias",p=>s.postProcessStages.ambientOcclusion.uniforms.bias=p),d("scenePpsAmbientOcclusionLengthCap",p=>s.postProcessStages.ambientOcclusion.uniforms.lengthCap=p),d("scenePpsAmbientOcclusionStepSize",p=>s.postProcessStages.ambientOcclusion.uniforms.stepSize=p),d("scenePpsAmbientOcclusionBlurStepSize",p=>s.postProcessStages.ambientOcclusion.uniforms.blurStepSize=p),d("scenePpsBloomEnabled",p=>s.postProcessStages.bloom.enabled=p),d("scenePpsBloomGlowOnly",p=>s.postProcessStages.bloom.uniforms.glowOnly=p),d("scenePpsBloomContrast",p=>s.postProcessStages.bloom.uniforms.contrast=p),d("scenePpsBloomBrightness",p=>s.postProcessStages.bloom.uniforms.brightness=p),d("scenePpsBloomDelta",p=>s.postProcessStages.bloom.uniforms.delta=p),d("scenePpsBloomSigma",p=>s.postProcessStages.bloom.uniforms.sigma=p),d("scenePpsBloomStepSize",p=>s.postProcessStages.bloom.uniforms.stepSize=p),f("globeShow",p=>s.globe.show=p),f("depthTestAgainstTerrain",p=>{s.globe.depthTestAgainstTerrain=p}),s.globe.translucency.enabled=!0,f("terrainOpacity",p=>{s.globe.translucency.frontFaceAlpha=s.globe.translucency.backFaceAlpha=h.clamp(p,0,1)}),f("sceneGlobeShadows",p=>s.globe.shadows=_.ShadowMode[p]),d("sceneGlobeTerrainExaggeration",p=>s.globe.terrainExaggeration=p),d("sceneGlobeTerrainExaggerationRelativeHeight",p=>s.globe.terrainExaggerationRelativeHeight=p),d("sceneGlobeVerticalExaggeration",p=>s.globe.verticalExaggeration=p),d("sceneGlobeVerticalExaggerationRelativeHeight",p=>s.globe.verticalExaggerationRelativeHeight=p),d("sceneGlobeBackFaceCulling",p=>s.globe.backFaceCulling=p),d("sceneGlobeShowSkirts",p=>s.globe.showSkirts=p),d("sceneGlobeShowWaterEffect",p=>s.globe.showWaterEffect=p),d("sceneGlobeBaseColor",p=>s.globe.baseColor=Be(p)),d("sceneGlobeCartographicLimitRectangle",p=>s.globe.cartographicLimitRectangle=dt(p)),d("sceneGlobeClippingPlanes",p=>{if(!s.globe.clippingPlanes){s.globe.clippingPlanes=Ra(p??{enabled:!1});return}jc(s.globe.clippingPlanes,p)}),d("sceneGlobeClippingPolygons",p=>{s.globe.clippingPolygons=p?qc(p):void 0}),f("sceneSunGlowFactor",p=>s.sun&&(s.sun.glowFactor=p)),f("moon",p=>s.moon&&(s.moon.show=p)),f("sceneMoonOnlySunLighting",p=>s.moon&&(s.moon.onlySunLighting=p)),f("sceneMoonTextureUrl",p=>s.moon&&(s.moon.textureUrl=h.ESSceneObject.context.getStrFromEnv(p))),d("sceneSkyBoxShow",p=>s._xbsjOriginSkyBox.show=p),f("sceneSkyBoxSources",p=>s._xbsjOriginSkyBox.sources=p&&pE(p)),d("atmosphere",p=>o.scene._xbsjOriginSkyAtmosphere.show=p),d("sceneBackgroundColor",p=>o.scene.backgroundColor=Be(p)),f("sceneFogEnabled",p=>s.fog.enabled=p),f("sceneFogDensity",p=>s.fog.density=p),f("sceneFogScreenSpaceErrorFactor",p=>s.fog.screenSpaceErrorFactor=p),f("sceneFogMinimumBrightness",p=>s.fog.minimumBrightness=p),f("sceneDebugShowFramesPerSecond",p=>s.debugShowFramesPerSecond=p),f("sceneDebugShowCommands",p=>s.debugShowCommands=p),f("sceneDebugShowFrustums",p=>s.debugShowFrustums=p),f("sceneDebugShowFrustumPlanes",p=>s.debugShowFrustumPlanes=p),f("sceneDebugShowDepthFrustum",p=>s.debugShowDepthFrustum=p),f("sceneGlobeUndergroundColor",p=>u.undergroundColor=Be(p)),f("sceneGlobeUndergroundColorAlphaByDistance",p=>u.undergroundColorAlphaByDistance=ur(p)),f("sceneGlobeTranslucencyBackFaceAlphaByDistance",p=>u.translucency.backFaceAlphaByDistance=p&&ur(p)),d("sceneGlobeTranslucencyFrontFaceAlphaByDistance",p=>u.translucency.frontFaceAlphaByDistance=p&&ur(p)),f("sceneGlobeTranslucencyRectangle",p=>u.translucency.rectangle=dt(p)),f("sceneSplitPosition",p=>s.splitPosition=h.clamp(p,0,1)),f("sceneSsccEnableCollisionDetection",p=>s.screenSpaceCameraController.enableCollisionDetection=p),f("sceneSsccZoomFactor",p=>s.screenSpaceCameraController._zoomFactor=p);{const p=()=>{o.cesiumInspector&&(o.cesiumInspector.container.style.display=r.showCesiumInspector??!1?"block":"none")};p(),this.d(r.showCesiumInspectorChanged.don(p))}f("cesiumInspectorWireframe",p=>{"cesiumInspector"in o&&(o.cesiumInspector.viewModel.wireframe=p)});{const p=()=>{o.cesium3DTilesInspector&&(o.cesium3DTilesInspector.container.style.display=r.showCesium3DTilesInspector??!1?"block":"none")};p(),this.dispose(r.showCesium3DTilesInspectorChanged.disposableOn(p))}this.ad(new h.ObjResettingWithEvent(r.particleGlobalControlChanged,()=>{if(!r.particleGlobalControl)return new Uv}))}}get czmViewer(){return this._czmViewer}get viewer(){return this._viewer}get navigationManager(){return this._navigationManager}get envManager(){return this._envManager}};z(Fa,"BackGroundResetting",class extends h.Destroyable{constructor(i,o){super(),this._czmViewer=i,this._viewer=o;const r=new bf;r.material=_.Material.fromType("Image");const a=this._viewer;a.scene.skyBox=r,this.dispose(()=>a.scene.skyBox=a.scene._xbsjOriginSkyBox);{const s=()=>{r.show=this._czmViewer.sceneSkyBoxShow};s(),this.dispose(this._czmViewer.sceneSkyBoxShowChanged.disposableOn(s))}{const s=()=>{r.material.uniforms.color=Be(this._czmViewer.xbsjBackgroundColor)};s(),this.dispose(this._czmViewer.xbsjBackgroundColorChanged.disposableOn(s))}{const s=()=>{r.material.uniforms.image=SceneObject.context.getStrFromEnv(this._czmViewer.xbsjBackgroundImageUri)};s(),this.dispose(this._czmViewer.xbsjBackgroundImageUriChanged.disposableOn(s))}}}),z(Fa,"LocalSkyBoxResetting",class extends h.Destroyable{constructor(o,r,a){super();z(this,"_skyAtmosphere");this._czmViewer=o,this._viewer=r,this._sources=a,this._skyAtmosphere=new xa(void 0,this._sources);const s=this._viewer;s.scene.skyAtmosphere=this._skyAtmosphere,this.dispose(()=>s.scene.skyAtmosphere=s.scene._xbsjOriginSkyAtmosphere);{const l=()=>{this._skyAtmosphere.show=this._czmViewer.atmosphere};l(),this.dispose(this._czmViewer.atmosphereChanged.disposableOn(l))}}get skyAtmosphere(){return this._skyAtmosphere}});let Wv=Fa;function XV(t,n,e,i,o){var r=_.Cartesian3.subtract(t,e,new _.Cartesian3),a=_.Cartesian3.dot(r,n);if(!(a<=0))return a*Math.tan(i*.5)*2/o}async function $V(t){const{viewer:n}=t;if(!n)return;const{width:e,height:i}=n.canvas,o=t.quickPickPosition([e*.5,i*.5]);if(!o)return;const r=await o;if(!r)return;const a=_.Cartesian3.fromDegrees(...r);if(!a)return;const s=n.camera.positionWC,l=n.camera.directionWC,u=n.camera.frustum.fovy;if(u===void 0)return;const A=n.canvas.height;return[XV(a,l,s,u,A),r]}const YV=_.Ellipsoid.WGS84.maximumRadius*2*Math.PI/512;function JV(t){return-Math.log2(t/YV)}var jv=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8];function e3(t){const n=t|0;if(n<1||n>1e8)return;let e=-1;for(;n>=jv[++e];);const i=n/jv[e-1]|0;return[i*jv[e-1],i,e]}class t3 extends h.Destroyable{constructor(){super();z(this,"_lengthInPixels",this.disposeVar(h.react(100)));z(this,"_resolution",this.disposeVar(h.react(void 0)));z(this,"_computedLengthInPixels",this.disposeVar(h.react(void 0)));z(this,"_computedLengthInMeters",this.disposeVar(h.react(void 0)));z(this,"_computedLengthInStr",this.disposeVar(h.react(void 0)));{const e=()=>{let i,o;const{lengthInPixels:r,resolution:a}=this;if(r&&a){const s=e3(r*a);if(s){const[l,u,A]=s;o=l,i=l/a}}this._computedLengthInPixels.value=i,this._computedLengthInMeters.value=o};e(),this.dispose(this.lengthInPixelsChanged.disposableOn(e)),this.dispose(this.resolutionChanged.disposableOn(e))}{const e=()=>{const i=this.computedLengthInMeters;if(!i){this._computedLengthInStr.value=void 0;return}this._computedLengthInStr.value=i>1e3?`${i/1e3|0}km`:`${i}m`};e(),this.dispose(this.computedLengthInMetersChanged.disposableOn(e))}}get lengthInPixels(){return this._lengthInPixels.value}set lengthInPixels(e){this._lengthInPixels.value=e}get lengthInPixelsChanged(){return this._lengthInPixels.changed}get resolution(){return this._resolution.value}set resolution(e){this._resolution.value=e}get resolutionChanged(){return this._resolution.changed}get computedLengthInPixels(){return this._computedLengthInPixels.value}get computedLengthInPixelsChanged(){return this._computedLengthInPixels.changed}get computedLengthInMeters(){return this._computedLengthInMeters.value}get computedLengthInMetersChanged(){return this._computedLengthInMeters.changed}get computedLengthInStr(){return this._computedLengthInStr.value}get computedLengthInStrChanged(){return this._computedLengthInStr.changed}}class n3 extends h.Destroyable{constructor(e){super();z(this,"_enabled",this.dv(h.react(!0)));z(this,"_resolution",this.dv(h.react(void 0)));z(this,"_center",this.dv(h.react(void 0)));z(this,"_zoom",this.dv(h.react(void 0)));z(this,"_legend",this.dv(new t3));this._czmViewer=e;{const i=this.dv(h.createProcessingFromAsyncFunc(async o=>{let r,a,s;await o.promise(h.sleep(1e3));const l=await o.promise($V(this._czmViewer));if(l){const[u,A]=l;r=u,a=JV(u),s=A}this._resolution.value=r,this._zoom.value=a,this._center.value=s}));i.restart();{const o=()=>{this.enabled?i.restart():i.cancel()};o();const r=this.dv(h.createNextAnimateFrameEvent(this._czmViewer.cameraChanged,this.enabledChanged));this.dispose(r.disposableOn(o))}}{const i=()=>{this._legend.resolution=this.resolution};i(),this.dispose(this.resolutionChanged.disposableOn(i))}}get enabled(){return this._enabled.value}set enabled(e){this._enabled.value=e}get enabledChanged(){return this._enabled.changed}get resolution(){return this._resolution.value}set resolution(e){this._resolution.value=e}get resolutionChanged(){return this._resolution.changed}get center(){return this._center.value}get centerChanged(){return this._center.changed}get zoom(){return this._zoom.value}get zoomChanged(){return this._zoom.changed}get legend(){return this._legend}get length(){return(this.legend.computedLengthInMeters??-1)/(this.legend.computedLengthInPixels??1)}}function i3(t,n){try{const e=_.Ellipsoid.WGS84,i=e.scaleToGeodeticSurface(t);return n=_.Transforms.eastNorthUpToFixedFrame(i,e,n),n}catch{return _.Matrix4.clone(_.Matrix4.IDENTITY,n)}}const{combine:r3}=_,{ShaderDestination:qo}=_,bE={name:"FlattenedPipelineStage"};bE.process=function(t,n,e){if(n.xbsjFlattened){const i=t.shaderBuilder;i.addDefine("XBSJ_FLATTERN",void 0,qo.BOTH),i.addUniform("sampler2D","u_flattenedPolygonTexture",qo.BOTH),i.addUniform("vec4","u_flattenedBound",qo.BOTH),i.addUniform("bool","u_flattened",qo.BOTH),i.addUniform("mat4","u_inverseModelElevationMatrix",qo.BOTH),i.addUniform("mat4","u_inverseElevationModelMatrix",qo.BOTH),i.addUniform("bool","u_flattenDiscard",qo.BOTH);const o={u_flattenedBound:function(){return n.xbsjFlattenedBound??_.Cartesian4.ZERO},u_flattened:function(){return n.xbsjFlattened},u_inverseModelElevationMatrix:function(){const r=e.context.uniformState.inverseModel??_.Matrix4.IDENTITY;return n._uniformElevationInverseModelMatrix=_.Matrix4.multiply(r,n.xbsjElevationMatrix??_.Matrix4.IDENTITY,n._uniformElevationInverseModelMatrix??new _.Matrix4),n._uniformElevationInverseModelMatrix},u_inverseElevationModelMatrix:function(){const r=e.context.uniformState.model??_.Matrix4.IDENTITY;return n._uniformInverseElevationModelMatrix=_.Matrix4.multiply(n.xbsjElevationMatrixInv??_.Matrix4.IDENTITY,r,n._uniformInverseElevationModelMatrix??new _.Matrix4),n._uniformInverseElevationModelMatrix},u_flattenedPolygonTexture:function(){return n.xbsjGetFlattenedTextureFunc?n.xbsjGetFlattenedTextureFunc()??e.context.defaultTexture:e.context.defaultTexture}};t.uniformMap=r3(o,t.uniformMap)}};function xE(){Object.defineProperties(_.Model.prototype,{xbsjFlattened:{get:function(){return this._xbsjFlattened??!1},set:function(t){t!==this._xbsjFlattened&&this.resetDrawCommands(),this._xbsjFlattened=t}},xbsjElevationMatrix:{get:function(){return this._xbsjElevationMatrix},set:function(t){t!==this._xbsjElevationMatrix&&this.resetDrawCommands(),this._xbsjElevationMatrix=t,this._xbsjElevationMatrixInv=this._xbsjElevationMatrix&&_.Matrix4.inverseTransformation(this._xbsjElevationMatrix,new _.Matrix4)}},xbsjElevationMatrixInv:{get:function(){return this._xbsjElevationMatrixInv}},xbsjFlattenedBound:{get:function(){return this._xbsjFlattenedBound},set:function(t){t!==this._xbsjFlattenedBound&&this.resetDrawCommands(),this._xbsjFlattenedBound=t}},xbsjGetFlattenedTextureFunc:{get:function(){return this._xbsjGetFlattenedTextureFunc},set:function(t){t!==this._xbsjGetFlattenedTextureFunc&&this.resetDrawCommands(),this._xbsjGetFlattenedTextureFunc=t}}})}function _E(){Object.defineProperties(_.Cesium3DTileset.prototype,{xbsjFlattened:{get:function(){return this._xbsjFlattened??!1},set:function(t){this._xbsjFlattened=t}},xbsjElevationMatrix:{get:function(){return this._xbsjElevationMatrix},set:function(t){this._xbsjElevationMatrix=t}},xbsjFlattenedBound:{get:function(){return this._xbsjFlattenedBound},set:function(t){this._xbsjFlattenedBound=t}},xbsjGetFlattenedTextureFunc:{get:function(){return this._xbsjGetFlattenedTextureFunc},set:function(t){this._xbsjGetFlattenedTextureFunc=t}}})}function CE(){const t=_.Model3DTileContent.prototype.update;_.Model3DTileContent.prototype.update=function(n,e,...i){const o=this._model;return o.xbsjFlattened=n.xbsjFlattened,o.xbsjElevationMatrix=n.xbsjElevationMatrix,o.xbsjFlattenedBound=n.xbsjFlattenedBound,o.xbsjGetFlattenedTextureFunc=n.xbsjGetFlattenedTextureFunc,t.call(this,n,e,...i)}}function SE(){const t=_.ModelSceneGraph.prototype.configurePipeline;_.ModelSceneGraph.prototype.configurePipeline=function(n,...e){const i=t.call(this,n,...e),o=this._model,r=this.modelPipelineStages;return o.xbsjFlattened&&r.push(bE),i}}xE(),_E(),CE(),SE();const o3=()=>({createCesiumViewerFuncStr:void 0,flashLighting:void 0,resolutionScale:void 0,msaaSamples:void 0,shadows:!1,sceneSplitPosition:void 0,sceneGlobeShadows:void 0,sceneGlobeTerrainExaggeration:1,sceneGlobeTerrainExaggerationRelativeHeight:0,sceneGlobeVerticalExaggeration:1,sceneGlobeVerticalExaggerationRelativeHeight:0,sceneGlobeBackFaceCulling:!0,sceneGlobeShowSkirts:!0,sceneGlobeShowWaterEffect:!0,sceneGlobeBaseColor:h.reactArray([0,0,1,0]),sceneGlobeCartographicLimitRectangle:h.reactArray([-180,-90,180,90]),sceneGlobeClippingPlanes:h.reactJson(void 0),sceneGlobeClippingPlanesId:"",sceneGlobeClippingPolygons:h.reactJsonWithUndefined(void 0),sceneGlobeClippingPolygonsId:h.reactArray([]),sceneGlobeUndergroundColor:h.reactArrayWithUndefined(void 0),sceneGlobeUndergroundColorAlphaByDistance:h.reactArrayWithUndefined(void 0),sceneGlobeTranslucencyBackFaceAlphaByDistance:h.reactArrayWithUndefined(void 0),sceneGlobeTranslucencyFrontFaceAlphaByDistance:h.reactArrayWithUndefined(void 0),sceneGlobeTranslucencyRectangle:h.reactArrayWithUndefined(void 0),sun:void 0,sceneSunGlowFactor:void 0,moon:void 0,sceneMoonTextureUrl:void 0,sceneMoonOnlySunLighting:void 0,sceneSkyBoxShow:!0,sceneSkyBoxSources:h.reactJson(rt.defaults.sceneSkyBoxSources),xbsjUseBackground:!1,xbsjBackgroundImageUri:"",xbsjBackgroundColor:h.reactArray([1,1,1,1]),xbsjLocalBoxSources:h.reactJsonWithUndefined(void 0),sceneBackgroundColor:h.reactArray([0,0,0,0]),sceneFogEnabled:void 0,sceneFogDensity:void 0,sceneFogScreenSpaceErrorFactor:void 0,sceneFogMinimumBrightness:void 0,sceneSsccEnableInputs:void 0,sceneSsccEnableCollisionDetection:void 0,sceneSsccZoomFactor:void 0,scenePpsfxaaEnabled:void 0,scenePpsAmbientOcclusionEnabled:!1,scenePpsAmbientOcclusionAmbientOcclusionOnly:!1,scenePpsAmbientOcclusionIntensity:3,scenePpsAmbientOcclusionBias:.1,scenePpsAmbientOcclusionLengthCap:.03,scenePpsAmbientOcclusionStepSize:1,scenePpsAmbientOcclusionBlurStepSize:.86,scenePpsBloomEnabled:!1,scenePpsBloomGlowOnly:!1,scenePpsBloomContrast:128,scenePpsBloomBrightness:-.3,scenePpsBloomDelta:1,scenePpsBloomSigma:3.78,scenePpsBloomStepSize:5,sceneDebugShowFramesPerSecond:void 0,sceneDebugShowCommands:void 0,sceneDebugShowFrustums:void 0,sceneDebugShowFrustumPlanes:void 0,sceneDebugShowDepthFrustum:void 0,showCesiumInspector:void 0,cesiumInspectorWireframe:void 0,showCesium3DTilesInspector:void 0,particleGlobalControl:!1}),s3=`
|
|
4024
4024
|
#### 示例代码1
|
|
4025
4025
|
\`\`\`
|
|
4026
4026
|
async function initCesiumViewer(container, czmViewer) {
|
|
@@ -4106,10 +4106,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
4106
4106
|
`;function l3(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
4107
4107
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
4108
4108
|
gitee地址:${t}
|
|
4109
|
-
`;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const zt=class zt extends h.ESViewer{constructor(e){super(e);z(this,"_disabledInputStack",this.disposeVar(h.react(0)));z(this,"_viewer",this.dv(h.react(void 0)));z(this,"_viewerInstance");z(this,"_viewerLegend");z(this,"pickCustomAttachedInfo");z(this,"_fps",this.dv(h.react(0)));z(this,"_notSupportEditingCount",this.disposeVar(h.react(0)));z(this,"_editingSystem",gf);z(this,"_moveObjectsProcess",this.ad(QS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new N6(this)),this.ad(new H6(this)),this.dv(new h.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new q6(this)})),this._viewerLegend=this.dv(new n3(this)),this._viewerInstance=this.dv(new h.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Wv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Be([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new h.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new W8(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Dn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=_.Cartographic.fromDegrees(e[0],e[1],e[2],zt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Cn(e),rotation:os(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const a=_.Cartesian3.fromDegrees(...e),s=_.Cartesian3.distance(o.positionWC,a),l=_.Cartesian3.subtract(a,r,new _.Cartesian3);_.Cartesian3.normalize(l,l);const u=_.Transforms.rotationMatrixFromPositionVelocity(r,l,_.Ellipsoid.WGS84),A=_.Matrix4.fromRotationTranslation(u,r);var c=_.Transforms.eastNorthUpToFixedFrame(_.Matrix4.getTranslation(A,new _.Cartesian3),_.Ellipsoid.WGS84,new _.Matrix4),f=_.Matrix4.multiply(_.Matrix4.inverse(c,new _.Matrix4),A,new _.Matrix4),d=_.Matrix4.getMatrix3(f,new _.Matrix3),p=_.Quaternion.fromRotationMatrix(d),g=_.HeadingPitchRoll.fromQuaternion(p);const v=os(o);return{distance:s,heading:_.Math.toDegrees(g.heading)+90,pitch:_.Math.toDegrees(g.pitch),flyDuration:1,hDelta:-(v[0]-(_.Math.toDegrees(g.heading)+90)),pDelta:v[1]-_.Math.toDegrees(g.pitch)}}flyIn(e,i,o,r="default"){var l;if(!i)return;i[0]=-i[0];const a={position:e,rotation:i,duration:(o??1)*1e3},s=(l=this.viewer)==null?void 0:l.camera;return s&&Qa(s,a)}flyTo(e,i,o="default"){var d;const{distance:r,heading:a,pitch:s,flyDuration:l,hDelta:u,pDelta:A}=e,c={position:i,viewDistance:r,rotation:[a,s,0],duration:l*1e3,hdelta:u,pdelta:A},f=(d=this.viewer)==null?void 0:d.camera;return f&&Qa(f,c)}flyToBoundingSphere(e,i,o=1){var c;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],a=h.getGeoBoundingSphereFromPositions(r);if(!a)return;const{center:s,radius:l}=a,u={position:s,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(c=this.viewer)==null?void 0:c.camera;return A&&Qa(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Cn(e),rotation:os(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,a,s){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,a,s),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,a),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,a),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=_.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=_.Cartographic.fromDegrees(e,i,void 0,zt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(a=>this.getHeightByLonLat(...a));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await D0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(At(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${h.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=h.createGuid();for(let r=0;r<e.length;r++){const a=e[r],s=a.components.main??a;s.editingID=o,s&&i.push(s)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=zt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!zt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=zt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return An(e,i)}localPositionsToPositions(e,i){return dr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=At(e),o=new _.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=zt.defaults;return{...e,more:[...e.more,new h.GroupProperty([],"通用","通用"),new h.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",a3,s3,!0),new h.FunctionProperty([],()=>zt.getCesiumIonToken(),[],"获取官方token"),new h.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new h.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new h.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new h.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new h.GroupProperty([],"Viewer","Viewer"),new h.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new h.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new h.BooleanProperty([this,"shadows"]),new h.GroupProperty([],"比例尺","比例尺(Legend)"),new h.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new h.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new h.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new h.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new h.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new h.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new h.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new h.GroupProperty([],"场景","场景(Scene)"),new h.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new h.GroupProperty([],"Globe","Globe"),new h.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new h.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new h.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new h.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new h.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new h.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new h.BooleanProperty([this,"sceneGlobeShowSkirts"]),new h.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new h.ColorProperty([this,"sceneGlobeBaseColor"]),new h.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new h.JsonProperty([this,"sceneGlobeClippingPlanes"]),new h.StringProperty([this,"sceneGlobeClippingPlanesId"]),new h.JsonProperty([this,"sceneGlobeClippingPolygons"]),new h.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new h.GroupProperty([],"underground","underground"),new h.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new h.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new h.GroupProperty([],"Translucency","Translucency"),new h.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",i.sceneGlobeTranslucencyEnabled,!0),new h.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",i.sceneGlobeTranslucencyBackFaceAlpha,!0),new h.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new h.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",i.sceneGlobeTranslucencyFrontFaceAlpha,!0),new h.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new h.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new h.GroupProperty([],"Sun","Sun"),new h.BooleanProperty([this,"sun"],"sun",i.sun,!0),new h.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new h.GroupProperty([],"Moon","Moon"),new h.BooleanProperty([this,"moon"],"moon",i.moon,!0),new h.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new h.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new h.GroupProperty([],"SkyBox","SkyBox"),new h.BooleanProperty([this,"sceneSkyBoxShow"]),new h.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new h.GroupProperty([],"Background","Background"),new h.BooleanProperty([this,"xbsjUseBackground"]),new h.StringProperty([this,"xbsjBackgroundImageUri"]),new h.ColorProperty([this,"xbsjBackgroundColor"]),new h.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new h.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new h.ColorProperty([this,"sceneBackgroundColor"]),new h.GroupProperty([],"Fog","Fog"),new h.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new h.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new h.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new h.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new h.GroupProperty([],"Sscc","Sscc"),new h.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new h.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new h.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new h.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new h.GroupProperty([],"后处理","后处理"),new h.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new h.GroupProperty([],"环境遮蔽","环境遮蔽"),new h.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new h.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new h.GroupProperty([],"Bloom","Bloom"),new h.BooleanProperty([this,"scenePpsBloomEnabled"]),new h.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new h.NumberProperty([this,"scenePpsBloomContrast"]),new h.NumberProperty([this,"scenePpsBloomBrightness"]),new h.NumberProperty([this,"scenePpsBloomDelta"]),new h.NumberProperty([this,"scenePpsBloomSigma"]),new h.NumberProperty([this,"scenePpsBloomStepSize"]),new h.GroupProperty([],"调试","调试"),new h.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new h.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new h.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new h.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new h.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new h.GroupProperty([],"Inspector","Inspector"),new h.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new h.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new h.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};z(zt,"type",zt.register("ESCesiumViewer",zt)),z(zt,"getCesiumIonToken",l3),z(zt,"currentDefaultAccessToken",_.Ion.defaultAccessToken),z(zt,"latestDefaultAccessToken"),z(zt,"ObjectsToExcludeWrapper",j6),z(zt,"defaults",{...h.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:_.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),z(zt,"getHeightsScartchCarto",new _.Cartographic);let rt=zt;(t=>{t.createDefaultProps=()=>({...h.ESViewer.createDefaultProps(),...o3()})})(rt||(rt={})),h.extendClassProps(rt.prototype,rt.createDefaultProps),oe.copyright=void 0;try{const t="earthsdk3-cesium",n="3.5.0-beta.3",e="2025-09-24T02:01:07.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="62920530555151f915731e05be61453cd9598271",s=((Date.now()-1758679267e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${s}个小时)
|
|
4109
|
+
`;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const zt=class zt extends h.ESViewer{constructor(e){super(e);z(this,"_disabledInputStack",this.disposeVar(h.react(0)));z(this,"_viewer",this.dv(h.react(void 0)));z(this,"_viewerInstance");z(this,"_viewerLegend");z(this,"pickCustomAttachedInfo");z(this,"_fps",this.dv(h.react(0)));z(this,"_notSupportEditingCount",this.disposeVar(h.react(0)));z(this,"_editingSystem",gf);z(this,"_moveObjectsProcess",this.ad(QS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new N6(this)),this.ad(new H6(this)),this.dv(new h.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new q6(this)})),this._viewerLegend=this.dv(new n3(this)),this._viewerInstance=this.dv(new h.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Wv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Be([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new h.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new W8(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Dn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=_.Cartographic.fromDegrees(e[0],e[1],e[2],zt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Cn(e),rotation:os(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const a=_.Cartesian3.fromDegrees(...e),s=_.Cartesian3.distance(o.positionWC,a),l=_.Cartesian3.subtract(a,r,new _.Cartesian3);_.Cartesian3.normalize(l,l);const u=_.Transforms.rotationMatrixFromPositionVelocity(r,l,_.Ellipsoid.WGS84),A=_.Matrix4.fromRotationTranslation(u,r);var c=_.Transforms.eastNorthUpToFixedFrame(_.Matrix4.getTranslation(A,new _.Cartesian3),_.Ellipsoid.WGS84,new _.Matrix4),f=_.Matrix4.multiply(_.Matrix4.inverse(c,new _.Matrix4),A,new _.Matrix4),d=_.Matrix4.getMatrix3(f,new _.Matrix3),p=_.Quaternion.fromRotationMatrix(d),g=_.HeadingPitchRoll.fromQuaternion(p);const v=os(o);return{distance:s,heading:_.Math.toDegrees(g.heading)+90,pitch:_.Math.toDegrees(g.pitch),flyDuration:1,hDelta:-(v[0]-(_.Math.toDegrees(g.heading)+90)),pDelta:v[1]-_.Math.toDegrees(g.pitch)}}flyIn(e,i,o,r="default"){var l;if(!i)return;i[0]=-i[0];const a={position:e,rotation:i,duration:(o??1)*1e3},s=(l=this.viewer)==null?void 0:l.camera;return s&&Qa(s,a)}flyTo(e,i,o="default"){var d;const{distance:r,heading:a,pitch:s,flyDuration:l,hDelta:u,pDelta:A}=e,c={position:i,viewDistance:r,rotation:[a,s,0],duration:l*1e3,hdelta:u,pdelta:A},f=(d=this.viewer)==null?void 0:d.camera;return f&&Qa(f,c)}flyToBoundingSphere(e,i,o=1){var c;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],a=h.getGeoBoundingSphereFromPositions(r);if(!a)return;const{center:s,radius:l}=a,u={position:s,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(c=this.viewer)==null?void 0:c.camera;return A&&Qa(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Cn(e),rotation:os(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,a;(a=(r=this._viewerInstance)==null?void 0:r.obj)==null||a.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,a,s){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,a,s),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,a),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,a){var s,l;(l=(s=this._viewerInstance)==null?void 0:s.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,a),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=_.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=_.Cartographic.fromDegrees(e,i,void 0,zt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(a=>this.getHeightByLonLat(...a));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await D0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(At(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${h.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=h.createGuid();for(let r=0;r<e.length;r++){const a=e[r],s=a.components.main??a;s.editingID=o,s&&i.push(s)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=zt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!zt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=zt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return An(e,i)}localPositionsToPositions(e,i){return dr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=At(e),o=new _.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=zt.defaults;return{...e,more:[...e.more,new h.GroupProperty([],"通用","通用"),new h.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",a3,s3,!0),new h.FunctionProperty([],()=>zt.getCesiumIonToken(),[],"获取官方token"),new h.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new h.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new h.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new h.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new h.GroupProperty([],"Viewer","Viewer"),new h.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new h.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new h.BooleanProperty([this,"shadows"]),new h.GroupProperty([],"比例尺","比例尺(Legend)"),new h.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new h.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new h.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new h.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new h.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new h.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new h.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new h.GroupProperty([],"场景","场景(Scene)"),new h.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new h.GroupProperty([],"Globe","Globe"),new h.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new h.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new h.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new h.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new h.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new h.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new h.BooleanProperty([this,"sceneGlobeShowSkirts"]),new h.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new h.ColorProperty([this,"sceneGlobeBaseColor"]),new h.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new h.JsonProperty([this,"sceneGlobeClippingPlanes"]),new h.StringProperty([this,"sceneGlobeClippingPlanesId"]),new h.JsonProperty([this,"sceneGlobeClippingPolygons"]),new h.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new h.GroupProperty([],"underground","underground"),new h.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new h.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new h.GroupProperty([],"Translucency","Translucency"),new h.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new h.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new h.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new h.GroupProperty([],"Sun","Sun"),new h.BooleanProperty([this,"sun"],"sun",i.sun,!0),new h.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new h.GroupProperty([],"Moon","Moon"),new h.BooleanProperty([this,"moon"],"moon",i.moon,!0),new h.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new h.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new h.GroupProperty([],"SkyBox","SkyBox"),new h.BooleanProperty([this,"sceneSkyBoxShow"]),new h.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new h.GroupProperty([],"Background","Background"),new h.BooleanProperty([this,"xbsjUseBackground"]),new h.StringProperty([this,"xbsjBackgroundImageUri"]),new h.ColorProperty([this,"xbsjBackgroundColor"]),new h.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new h.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new h.ColorProperty([this,"sceneBackgroundColor"]),new h.GroupProperty([],"Fog","Fog"),new h.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new h.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new h.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new h.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new h.GroupProperty([],"Sscc","Sscc"),new h.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new h.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new h.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new h.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new h.GroupProperty([],"后处理","后处理"),new h.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new h.GroupProperty([],"环境遮蔽","环境遮蔽"),new h.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new h.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new h.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new h.GroupProperty([],"Bloom","Bloom"),new h.BooleanProperty([this,"scenePpsBloomEnabled"]),new h.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new h.NumberProperty([this,"scenePpsBloomContrast"]),new h.NumberProperty([this,"scenePpsBloomBrightness"]),new h.NumberProperty([this,"scenePpsBloomDelta"]),new h.NumberProperty([this,"scenePpsBloomSigma"]),new h.NumberProperty([this,"scenePpsBloomStepSize"]),new h.GroupProperty([],"调试","调试"),new h.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new h.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new h.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new h.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new h.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new h.GroupProperty([],"Inspector","Inspector"),new h.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new h.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new h.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};z(zt,"type",zt.register("ESCesiumViewer",zt)),z(zt,"getCesiumIonToken",l3),z(zt,"currentDefaultAccessToken",_.Ion.defaultAccessToken),z(zt,"latestDefaultAccessToken"),z(zt,"ObjectsToExcludeWrapper",j6),z(zt,"defaults",{...h.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:_.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:_.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),z(zt,"getHeightsScartchCarto",new _.Cartographic);let rt=zt;(t=>{t.createDefaultProps=()=>({...h.ESViewer.createDefaultProps(),...o3()})})(rt||(rt={})),h.extendClassProps(rt.prototype,rt.createDefaultProps),oe.copyright=void 0;try{const t="earthsdk3-cesium",n="3.5.0-beta.5",e="2025-09-24T07:23:51.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="ea712304739478d789df3bcf0879dd53bb160f02",s=((Date.now()-1758698631e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${s}个小时)
|
|
4110
4110
|
%c${o?o+`
|
|
4111
4111
|
`:""}当前网站正在使用${t},此软件版权归${i}所有
|
|
4112
|
-
`;oe.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
4112
|
+
`;oe.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","ea712304739478d789df3bcf0879dd53bb160f02")},get info(){return l},get date(){return"2025-09-24T07:23:51.000Z"},get author(){return"suplyang"},get version(){return"3.5.0-beta.5"},get name(){return"earthsdk3-cesium"},get commitId(){return"ea712304739478d789df3bcf0879dd53bb160f02"},print(){console.info(this.info,`
|
|
4113
4113
|
font-size: 18px;
|
|
4114
4114
|
font-weight: 1000;
|
|
4115
4115
|
line-height: 1;
|