earthsdk3-cesium 3.7.0-beta.15 → 3.7.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/dist/earthsdk3-cesium.iife.js +3 -3
  2. package/dist/earthsdk3-cesium.js +39 -33
  3. package/dist/earthsdk3-cesium.umd.cjs +45 -45
  4. package/dist/types/CzmObjects/base/InnerClass/XbsjGroundPolylinePrimitive/GroundPolylinePrimitive.d.ts +148 -0
  5. package/dist/types/CzmObjects/general/CzmESSignalTransmission/XbsjPolyline/XbsjPolylineGeometry.d.ts +3 -0
  6. package/dist/types/CzmObjects/general/CzmESSignalTransmission/XbsjPolyline/xbsjCreateODLinesPrimitive.d.ts +29 -0
  7. package/dist/types/CzmObjects/general/CzmESVideoFusion/XbsjCameraVideo/XbsjCameraVideo.d.ts +18 -0
  8. package/dist/types/CzmObjects/general/CzmESViewShed/XbsjViewshed/XbsjViewshed.d.ts +16 -0
  9. package/dist/types/ESCesiumViewer/BackGroundImage/BackGroundImage.d.ts +5 -0
  10. package/dist/types/ESCesiumViewer/LocalSkyBox/SkyAtmosphere.d.ts +14 -0
  11. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatPipelineStage.d.ts +12 -0
  12. package/dist/types/ESCesiumViewer/initCesiumViewer/GaussianSplattingExtend/GaussianSplatTexturePipelineStage.d.ts +11 -0
  13. package/dist/types/ESCesiumViewer/initCesiumViewer/fixGoogleEarth/cesiumFixGoogleEarth.d.ts +1 -0
  14. package/dist/types/__declares/cesium.d.ts +434 -0
  15. package/dist/types/utils/czmUtils/todo/generateCartesianArc/czm/generateCartesianArc.d.ts +8 -0
  16. package/dist/types/utils/generalUtils/geoPolylineToBezierSpline/bezierSpline/index.d.ts +37 -0
  17. package/dist/types/utils/generalUtils/geoPolylineToBezierSpline/bezierSpline/lib/spline.d.ts +62 -0
  18. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- var EarthSDK3_Cesium=function(ne,$e,c){"use strict";var m9=Object.defineProperty;var y9=(ne,$e,c)=>$e in ne?m9(ne,$e,{enumerable:!0,configurable:!0,writable:!0,value:c}):ne[$e]=c;var O=(ne,$e,c)=>y9(ne,typeof $e!="symbol"?$e+"":$e,c);var Ni=typeof document<"u"?document.currentScript:null;function IE(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const w=IE($e);window.Cesium=w;function FE(){Object.keys(w).forEach(t=>{w[t].prototype&&Object.defineProperty(w[t].prototype,"ESSceneObjectID",{writable:!0,enumerable:!0,value:c.createGuid()})})}fetch("https://cdn.jsdelivr.net/gh/CesiumGS/cesium/packages/engine/Source/Core/Ion.js").then(t=>t.text()).then(t=>{const n=t.match(/defaultAccessToken\s*=\s*["'`](.*?)["'`]/);n&&(w.Ion.defaultAccessToken=n[1],console.log("更新默认Cesium.Ion.Token成功"))}).catch(t=>{w.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhN2VkNDM5ZS1jMDk0LTQ3NDItOTM5ZS00MzU3M2M1MTc2ZTkiLCJpZCI6MjU5LCJpYXQiOjE3NjIxODg4MDB9.ZZG574sONzeHxsX8HJMaL_ZiGA3dh_HrOxL7DrKRcd4"});const _u=class _u extends c.Destroyable{};O(_u,"defaults",{enabled:!0}),O(_u,"createDefaultProps",()=>({..._u.defaults}));let Fn=_u;c.extendClassProps(Fn.prototype,Fn.createDefaultProps);class Nn extends c.EngineObject{constructor(n,e){if(super(n,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(n.flyToEvent.don((o,r,s)=>this.flyTo(o,r,s))),this.d(n.flyInEvent.don((o,r,s)=>this.flyIn(o,r,s))),this.dispose(n.calcFlyInParamEvent.disposableOn(()=>{if(!e.actived)return;const o=e.getCameraInfo();if(!o)return;const{position:r,rotation:s}=o;n.flyInParam={position:r,rotation:s,flyDuration:1}})),this.dispose(n.calcFlyToParamEvent.disposableOn(()=>{n.useCalcFlyToParamInESObjectWithLocation||console.warn("calcFlyToParam无法调用,该对象缺少position属性!")}))}flyToWithPromise(n,e,i,o,r,s,a,l="default"){const{sceneObject:u,czmViewer:A}=this,h=A.flyTo({distance:i??0,heading:o?o[0]:0,pitch:o?o[1]:0,flyDuration:r??1,hDelta:s??0,pDelta:a??0},e,l);h&&h.then(f=>{})}flyTo(n,e,i="default"){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam&&(o.useCalcFlyToParamInESObjectWithLocation||console.warn("flyToParam无法使用,该对象缺少position属性,若飞行失败,请清空flyToParam后重试!")),o.flyInParam){const{position:s,rotation:a,flyDuration:l}=o.flyInParam,u=n??l;return this.flyToWithPromise(e,s,void 0,a,u,void 0,void 0,i),!0}return!1}flyIn(n,e,i="default"){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyInParam){const{position:s,rotation:a,flyDuration:l}=o.flyInParam,u=n??l;return this.flyToWithPromise(e,s,void 0,a,u,void 0,void 0,i),!0}return!1}get czmViewer(){return this.viewer}}function Ye(t,n){return w.Cartesian3.fromDegrees(...t,void 0,n)}const ME=new w.Cartographic;function Oe(t,n){const e=w.Cartographic.fromCartesian(t,void 0,ME);if(e)return n=n||[0,0,0],n[0]=w.Math.toDegrees(e.longitude),n[1]=w.Math.toDegrees(e.latitude),n[2]=e.height,n}function Ze(t,n){return n=n||new w.Cartesian2,n.x=t[0],n.y=t[1],n}function Vv(t,n){return n=n||[0,0],n[0]=t.x,n[1]=t.y,n}function ri(t,n){return n=n||new w.Cartesian3,n.x=t[0],n.y=t[1],n.z=t[2],n}function $a(t,n){return n=n||[0,0,0],n[0]=t.x,n[1]=t.y,n[2]=t.z,n}function rp(t,n){return n=n||new w.Cartesian4,n.x=t[0],n.y=t[1],n.z=t[2],n.w=t[3],n}function Nv(t,n){return n=n||[0,0,0,0],n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w,n}function oi(t,n){if(t.length===4)return rp(t,n);if(t.length===3)return ri(t,n);if(t.length===2)return Ze(t,n);throw new Error("toCartesian error: should not be here!")}function DE(t,n){if(t instanceof w.Cartesian2)return Vv(t,n);if(t instanceof w.Cartesian3)return $a(t,n);if(t instanceof w.Cartesian4)return Nv(t,n);throw new Error("fromCartesian error: should not be here!")}function RE(t,n){return n=n||new w.Cartographic,n.longitude=w.Math.toRadians(t[0]),n.latitude=w.Math.toRadians(t[1]),n.height=t[2],n}function go(t,n){return n=n||[0,0,0],n[0]=w.Math.toDegrees(t.longitude),n[1]=w.Math.toDegrees(t.latitude),n[2]=t.height,n}function Be(t,n){return n=n||new w.Color,n.red=t[0],n.green=t[1],n.blue=t[2],n.alpha=t[3],n}function UE(t,n){return n=n||[0,0,0,0],n[0]=t.red,n[1]=t.green,n[2]=t.blue,n[3]=t.alpha,n}function yr(t,n){return n=n||new w.NearFarScalar,n.near=t[0],n.nearValue=t[1],n.far=t[2],n.farValue=t[3],n}function OE(t,n){return n=n||[0,0,0,0],n[0]=t.near,n[1]=t.nearValue,n[2]=t.far,n[3]=t.farValue,n}function Hv(t,n){return n=n||new w.HeadingPitchRoll,n.heading=w.Math.toRadians(t[0]-90),n.pitch=w.Math.toRadians(t[1]),n.roll=w.Math.toRadians(t[2]),n}function LE(t,n){return n=n||[0,0,0],n[0]=w.Math.toDegrees(t.heading+w.Math.PI_OVER_TWO),n[1]=w.Math.toDegrees(t.pitch),n[2]=w.Math.toDegrees(t.roll),n}function Ya(t,n){return n=n||new w.DistanceDisplayCondition,n.near=t[0],n.far=t[1],n}function zE(t,n){return n=n||[0,0],n[0]=t.near,n[1]=t.far,n}function kE(t,n){return n=n||new w.Quaternion,n.x=t[0],n.y=t[1],n.z=t[2],n.w=t[3],n}function QE(t,n){return n=n||[0,0,0,0],n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w,n}const VE=new w.HeadingPitchRoll,NE=new w.Cartesian3;function HE(t,n,e){const i=Hv(n,VE),o=Ye(t,NE);return w.Transforms.headingPitchRollQuaternion(o,i,void 0,void 0,e)}function mt(t,n){return n=n||new w.Rectangle,n.west=t[0]*Math.PI/180,n.south=t[1]*Math.PI/180,n.east=t[2]*Math.PI/180,n.north=t[3]*Math.PI/180,n}function GE(t,n){return n=n||[0,0,0,0],n[0]=t.west,n[1]=t.south,n[2]=t.east,n[3]=t.north,n}const WE=new w.Cartesian3;function Ke(t,n){return n=n||new w.Ellipsoid,w.Ellipsoid.fromCartesian3(w.Cartesian3.fromArray(t,void 0,WE),n)}function jE(t,n){return n=n||[0,0,0],n[0]=t.radii.x,n[1]=t.radii.y,n[2]=t.radii.z,n}function si(t){if(t.type==="GeographicTilingScheme")return new w.GeographicTilingScheme({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),rectangle:t.rectangle&&mt(t.rectangle),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY});if(t.type==="WebMercatorTilingScheme")return new w.WebMercatorTilingScheme({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY,rectangleSouthwestInMeters:t.rectangleSouthwestInMeters&&Ze(t.rectangleSouthwestInMeters),rectangleNortheastInMeters:t.rectangleNortheastInMeters&&Ze(t.rectangleNortheastInMeters)});if(t.type==="ToGCJ02WebMercatorTilingScheme")return new hx({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY,rectangleSouthwestInMeters:t.rectangleSouthwestInMeters&&Ze(t.rectangleSouthwestInMeters),rectangleNortheastInMeters:t.rectangleNortheastInMeters&&Ze(t.rectangleNortheastInMeters)});if(t.type==="ToWGS84WebMercatorTilingScheme")return new Ax({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY,rectangleSouthwestInMeters:t.rectangleSouthwestInMeters&&Ze(t.rectangleSouthwestInMeters),rectangleNortheastInMeters:t.rectangleNortheastInMeters&&Ze(t.rectangleNortheastInMeters)});console.warn(`未能识别的类型tilingSchemaJson.type: ${t.type}`)}function Ja(t,n){const{planes:e,enabled:i,modelMatrix:o,unionClippingRegions:r,edgeColor:s,edgeWidth:a}=t;let l=o&&w.Matrix4.fromArray(o);return n&&(l=l||w.Matrix4.clone(w.Matrix4.IDENTITY,new w.Matrix4),w.Matrix4.multiply(n,l,l)),new w.ClippingPlaneCollection({planes:e&&e.map(u=>new w.ClippingPlane(ri(u.normal),u.distance)),enabled:i,modelMatrix:l,unionClippingRegions:r,edgeColor:s&&Be(s),edgeWidth:a})}function vh(t,n,e){const i=n;if(!i){t.removeAll(),t.enabled=!1;return}if(t.removeAll(),i.planes)for(let r of i.planes)t.add(new w.ClippingPlane(ri(r.normal),r.distance));let o=i.modelMatrix&&w.Matrix4.fromArray(i.modelMatrix)||w.Matrix4.clone(w.Matrix4.IDENTITY,new w.Matrix4);e&&w.Matrix4.multiply(e,o,o),t.enabled=i.enabled??!0,t.modelMatrix=o,t.unionClippingRegions=i.unionClippingRegions??!1,t.edgeColor=Be(i.edgeColor??[1,1,1,1]),t.edgeWidth=i.edgeWidth??2}function wh(t){const{polygons:n,enabled:e,inverse:i}=t;return new w.ClippingPolygonCollection({polygons:n&&n.map(o=>new w.ClippingPolygon({positions:o.positions.map(r=>Ye(r))})),enabled:e,inverse:i})}function bh(t,n){return op(t,w.Cartesian3.UNIT_Y,w.Cartesian3.UNIT_Z,w.Cartesian3.UNIT_X,n)}function Gv(t,n){return op(t,w.Cartesian3.UNIT_X,w.Cartesian3.UNIT_Z,new w.Cartesian3(0,-1,0),n)}function op(t,n,e,i,o){const[r,s,a]=t,l=w.Quaternion.fromAxisAngle(e,w.Math.toRadians(-r)),u=w.Quaternion.fromAxisAngle(i,w.Math.toRadians(s)),A=w.Quaternion.fromAxisAngle(n,w.Math.toRadians(a)),h=w.Quaternion.clone(w.Quaternion.IDENTITY,o);return w.Quaternion.multiply(A,h,h),w.Quaternion.multiply(u,h,h),w.Quaternion.multiply(l,h,h),h}function vr(t,n){return Array.isArray(t)?t.length!==n?(console.warn(`array.length !== ${n}`),!1):t.every(e=>Number.isFinite(e))?!0:(console.warn("!array.every(v => Number.isFinite(v))"),!1):(console.warn("!Array.isArray(array)"),!1)}function Wv(t){return t.some(n=>n===0)?(console.warn("array.some(e => e === 0)"),!1):!0}function lt(t,n){if(!((!t.localScale||vr(t.localScale,3))&&(!t.localRotation||vr(t.localRotation,3))&&(!t.localPosition||vr(t.localPosition,3))&&(!t.localModelMatrix||vr(t.localModelMatrix,16))&&(!t.scale||vr(t.scale,3))&&(!t.rotation||vr(t.rotation,3))&&(!t.position||vr(t.position,3))&&(!t.modelMatrix||vr(t.modelMatrix,16)))||t.localScale&&!Wv(t.localScale)||t.scale&&!Wv(t.scale))return;if(t.sceneScaleFromPixelSize){if(!Number.isFinite(t.sceneScaleFromPixelSize)){console.warn("!Number.isFinite(options.sceneScaleFromPixelSize)");return}if(t.sceneScaleFromPixelSize===0){console.warn("options.sceneScaleFromPixelSize === 0");return}}const i=n??w.Matrix4.clone(w.Matrix4.IDENTITY);if(t.localScale){const[o,r,s]=t.localScale??[1,1,1],a=w.Matrix4.fromScale(w.Cartesian3.fromElements(o,r,s),new w.Matrix4);w.Matrix4.multiply(a,i,i)}if((t.initialRotation??"yForwardzUp")==="xForwardzUp"){const o=w.Quaternion.fromAxisAngle(w.Cartesian3.UNIT_Z,w.Math.toRadians(90)),r=w.Matrix3.fromQuaternion(o);w.Matrix4.multiply(w.Matrix4.fromRotationTranslation(r),i,i)}if(t.localRotation){const o=bh(t.localRotation),r=w.Matrix3.fromQuaternion(o);w.Matrix4.multiply(w.Matrix4.fromRotationTranslation(r),i,i)}if(t.localPosition){const o=w.Matrix4.fromTranslation(w.Cartesian3.fromArray(t.localPosition));w.Matrix4.multiply(o,i,i)}if(t.localModelMatrix){const o=w.Matrix4.fromArray(t.localModelMatrix);w.Matrix4.multiply(o,i,i)}if(t.sceneScaleFromPixelSize!==void 0&&Number.isFinite(t.sceneScaleFromPixelSize)){const o=t.sceneScaleFromPixelSize,r=w.Matrix4.fromScale(w.Cartesian3.fromElements(o,o,o),new w.Matrix4);w.Matrix4.multiply(r,i,i)}if(t.scale){const[o,r,s]=t.scale??[1,1,1],a=w.Matrix4.fromScale(w.Cartesian3.fromElements(o,r,s),new w.Matrix4);w.Matrix4.multiply(a,i,i)}if(t.rotation){const o=bh(t.rotation),r=w.Matrix3.fromQuaternion(o);w.Matrix4.multiply(w.Matrix4.fromRotationTranslation(r),i,i)}if(t.position){const o=w.Cartesian3.fromDegrees(...t.position),r=w.Transforms.eastNorthUpToFixedFrame(o);w.Matrix4.multiply(r,i,i)}if(t.modelMatrix){const o=w.Matrix4.fromArray(t.modelMatrix);w.Matrix4.multiply(o,i,i)}return i}const KE=new w.Cartesian3,el=new w.HeadingPitchRoll,qE=new w.Matrix4,ZE=new w.Cartesian3,XE=new w.Cartographic;function $E(t,n=[0,0,0],e=0,i){const[o,r,s]=t,a=w.Cartesian3.fromDegrees(o,r,s,void 0,KE),l=[...n];for(let A=0;A<3;++A)l[A]=w.Math.RADIANS_PER_DEGREE*l[A];if(e!==0){el.heading=l[0],el.pitch=l[1],el.roll=l[2],el.heading-=w.Math.PI_OVER_TWO;const A=w.Transforms.headingPitchRollToFixedFrame(a,el,void 0,void 0,qE),h=w.Matrix4.multiplyByPointAsVector(A,w.Cartesian3.UNIT_X,ZE);w.Cartesian3.multiplyByScalar(h,e,h),w.Cartesian3.subtract(a,h,a)}const u=w.Cartographic.fromCartesian(a,void 0,XE);if(u)return i=i||[0,0,0],i[0]=u.longitude*180/Math.PI,i[1]=u.latitude*180/Math.PI,i[2]=u.height,i}function jv(t,n,e,i){return $E(t,n,e,i)}const wr=w.Math.toDegrees;function Mn(t,n){const{longitude:e,latitude:i,height:o}=t.positionCartographic;return n?(n[0]=wr(e),n[1]=wr(i),n[2]=o,n):[wr(e),wr(i),o]}function ms(t,n){const{heading:e,pitch:i,roll:o}=t;return n?(n[0]=wr(e),n[1]=wr(i),n[2]=wr(o),n):[e,i,o].map(wr)}class xh extends c.Destroyable{constructor(e){super();O(this,"_originViewMatrix",new w.Matrix4);O(this,"_originProjMatrix",new w.Matrix4);O(this,"_changed",new c.Event);this._scene=e;const i=this._scene.camera;w.Matrix4.clone(i.viewMatrix,this._originViewMatrix),w.Matrix4.clone(i.frustum.projectionMatrix,this._originViewMatrix),this.dispose(this._scene.preUpdate.addEventListener(()=>{this._update()}))}_update(){w.Matrix4.equals(this._scene.camera.viewMatrix,this._originViewMatrix)||(w.Matrix4.clone(this._scene.camera.viewMatrix,this._originViewMatrix),this._changed.emit()),w.Matrix4.equals(this._scene.camera.frustum.projectionMatrix,this._originProjMatrix)||(w.Matrix4.clone(this._scene.camera.frustum.projectionMatrix,this._originProjMatrix),this._changed.emit())}get changed(){return this._changed}}class YE extends c.Destroyable{constructor(n){super();const e=()=>{};this.dispose(n.viewDistanceChanged.disposableOn(e)),this.dispose(n.visibleAlphaChanged.disposableOn(e))}}class JE extends c.Destroyable{constructor(e){super();O(this,"_debugObjResetting");this._control=e,this._debugObjResetting=this.disposeVar(new c.ObjResettingWithEvent(this._control.debugChanged,()=>{if(this._control.debug)return new YE(this._control)}))}get debugObjResetting(){return this._debugObjResetting}}class mo extends c.Destroyable{constructor(e,i,o,r){super();O(this,"_visibleAlpha",this.disposeVar(c.react(1)));O(this,"_viewDistance",this.disposeVar(c.react(0)));O(this,"_debug",this.disposeVar(c.react(!1)));O(this,"_viewDistanceDebug",this.disposeVar(new JE(this)));this._czmViewer=e,this._positionReact=o;const{positionReact:s,czmViewer:a}=this,[l,u,A]=c.getReactFuncs(i),[h,f,p]=c.getReactFuncs(s),[d,g,v]=r?c.getReactFuncs(r):[void 0,void 0,void 0],y=()=>{let x=1,E=Number.NEGATIVE_INFINITY;const B=l(),P=h(),I=d?d():0,D=a.getCurrentCameraInfo();if(!B||!P||!D){this._viewDistance.value=E,this._visibleAlpha.value=x;return}E=c.cartesianDistance(D.position,P)-(I??0);const[F,S,T,b]=B;F>S||S>T||T>b?console.error("viewDistanceRange存在问题,需要满足逐级增大的条件,否则不生效!"):E>=S&&E<=T?x=1:E<=F||E>=b?x=0:E>F&&E<S?S-F<=0?x=0:x=(E-F)/(S-F):E>T&&E<b?(b<=T&&(x=0),x=(b-E)/(b-T)):(x=1,console.error("不应该运行至此!")),this._viewDistance.value=E,this._visibleAlpha.value=x};y();const m=[a.cameraChanged,A,p];v&&m.push(v);const _=this.disposeVar(c.createNextAnimateFrameEvent(...m));this.dispose(_.disposableOn(y))}get visibleAlpha(){return this._visibleAlpha.value}get visibleAlphaChanged(){return this._visibleAlpha.changed}get viewDistance(){return this._viewDistance.value}set viewDistance(e){this._viewDistance.value=e}get viewDistanceChanged(){return this._viewDistance.changed}get debug(){return this._debug.value}set debug(e){this._debug.value=e}get debugChanged(){return this._debug.changed}get positionReact(){return this._positionReact}get czmViewer(){return this._czmViewer}get viewDistanceDebug(){return this._viewDistanceDebug}}const e2=new w.BoundingSphere(w.Cartesian3.ZERO,0);function Hi(t,n,e){var i=e2;w.Cartesian3.clone(n,i.center);const o=t.camera.getPixelSize(i,t.drawingBufferWidth,t.drawingBufferHeight);if(o<=0)return;const r=e*o;if(Number.isFinite(r)&&r>0)return r}function Yt(t,n=!1){const e=t.length;let i;const o=[];for(let r=0;r<e;++r){const[s,a,l]=t[r],u=n?w.Cartesian3.fromDegrees(s,a):w.Cartesian3.fromDegrees(s,a,l);if(!u)continue;const{x:A,y:h,z:f}=u;[A,h,f].every(Number.isFinite)&&(!i||!w.Cartesian3.equals(i,u))&&(i=u,o.push(i))}return o}function yo(t,n,e,i){const o=c.geoRhumbDistance(t,e),r=c.geoRhumbHeading(t,e),s=Math.cos(r*Math.PI/180)*Math.cos(n*Math.PI/180)+Math.sin(r*Math.PI/180)*Math.sin(n*Math.PI/180);return s>0?c.geoRhumbDestination(t,o,n,i):c.geoRhumbDestination(t,o,n+180,i),[s>0?o:-o,i]}function t2(t,n,e){const i=e*.1,o=[];for(let r=-9;r<10;++r){const s=c.geoRhumbDestination(t,i*r,n);s&&o.push(s)}return o}function n2(t,n){return c.geoNearestPointOnLine(t,n).geometry.coordinates}const Kv=new w.Cartesian3,i2=new w.Ray,r2=new w.Plane(w.Cartesian3.UNIT_X,0);function _h(t,n,e,i){const o=w.Cartesian3.normalize(n,Kv),r=w.Cartesian3.cross(t.camera.right,o,Kv);w.Cartesian3.normalize(r,r);const s=w.Plane.fromPointNormal(n,r,r2),a=t.camera.getPickRay(e,i2);if(a)return w.IntersectionTests.rayPlane(a,s,i)}const sp=new w.Cartesian3,o2=new w.Ray,s2=new w.Cartographic,a2=new w.Ellipsoid;function ys(t,n,e,i){const o=t.camera.getPickRay(n,o2);if(!o)return;const r=w.Cartesian3.fromElements(e,e,e,sp),s=w.Cartesian3.add(r,w.Ellipsoid.WGS84.radii,sp),a=w.Ellipsoid.fromCartesian3(s,a2),l=w.IntersectionTests.rayEllipsoid(o,a);if(l){const u=l.start>0?l.start:l.stop;if(u){const A=w.Ray.getPoint(o,u,sp),h=w.Cartographic.fromCartesian(A,void 0,s2);return i=i||new w.Cartographic,i.longitude=h.longitude,i.latitude=h.latitude,i.height=e,i}else return}else return}function vs(t,n){n[0]=t[0],n[1]=t[1],n[2]=t[2]}function qv(t){const n=w.Ellipsoid.WGS84.minimumRadius;return(t+n)/n}const Zv=new w.Cartographic,Xv=new w.Cartesian3,yn=[0,0,0],br=[0,0,0],ap=new w.Cartesian2,lp=new w.Cartesian3;function up(t,n,e,i,o,r){o.constraintMode="none",vs([0,0,0],o.startDragPos),r=r||{},oi(c.getDomEventCurrentTargetPos(t),ap);const s=e.position;if(!Ye(s,lp))return;const a=Hi(n,lp,i);if(a===void 0||!_h(n,lp,ap,Xv)||!Oe(Xv,yn))return;const l=qv(yn[2])*c.geoDistance(s,yn);if(!r.z&&l<a&&Math.abs(s[2]-yn[2])<e.dimensions[0]&&yn[2]>s[2])return o.constraintMode="z",vs(yn,o.startDragPos),!0;if(!ys(n,ap,s[2],Zv)||!go(Zv,yn))return;const u=qv(s[2])*c.geoDistance(s,yn),A=e.dimensions[0];if(!(u>1.05*A)){if(!r.zAxis&&u>.95*A&&u<=1.05*A){o.constraintMode="zAxis",vs(yn,o.startDragPos);return}{const[h,f]=yo(s,e.heading+90,yn,br);if(!r.x&&h>0&&f&&(br[2]=s[2],c.geoDistance(br,yn)<a)){o.constraintMode="x",vs(br,o.startDragPos);return}}{const[h,f]=yo(s,e.heading,yn,br);if(!r.y&&h>0&&f&&(br[2]=s[2],c.geoDistance(br,yn)<a)){o.constraintMode="y",vs(br,o.startDragPos);return}}r.xy||(o.constraintMode="xy",vs(yn,o.startDragPos))}}async function $v(t,n,e,i){var a;const o=(a=t.viewer)==null?void 0:a.scene;if(!o)throw new Error("!scene");const r=c.getDomEventCurrentTargetPos(n),s=oi(r);if(e===void 0){const l=t.quickPickPosition(r);return l?await l:void 0}else{const l=ys(o,s,e);return l?go(l):void 0}}let cp,hp;function Yv(t,n,e,i,o){o=o||new w.Cartesian3,cp=cp||new w.Ray,hp=hp||new w.Plane(w.Cartesian3.UNIT_X,0);const r=t.camera.getPickRay(i,cp),s=w.Plane.fromPointNormal(n,e,hp);return o=w.IntersectionTests.rayPlane(r,s,o),o}function Jv(t){const n=w.Material.fromType(t.type);return Ap(n,t),n}function vn(t){return t&&c.ESSceneObject.context.getStrFromEnv(t)||w.Material.DefaultImageId}function l2(t){return{x:t[0],y:t[1]}}function Ap(t,n){n.type==="Color"?t.uniforms.color=Be(n.color??[1,1,1,1]):n.type==="PolylineArrow"?t.uniforms.color=Be(n.color??[1,1,1,1]):n.type==="PolylineDash"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.gapColor=Be(n.gapColor??[0,0,0,0]),t.uniforms.dashLength=n.dashLength??16,t.uniforms.dashPattern=n.dashPattern??255):n.type==="PolylineGlow"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.glowPower=n.glowPower??.25,t.uniforms.taperPower=n.taperPower??1):n.type==="PolylineOutline"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.outlineColor=Be(n.outlineColor??[1,0,0,1]),t.uniforms.outlineWidth=n.outlineWidth??1):n.type==="Image"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.color=Be(n.color??[1,1,1,1])):n.type==="DiffuseMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channels=n.channels??"rgb"):n.type==="AlphaMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channel=n.channel??"a"):n.type==="SpecularMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channel=n.channel??"r"):n.type==="EmissionMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channels=n.channels??"rgb"):n.type==="BumpMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channel=n.channel??"r",t.uniforms.strength=n.strength??.8):n.type==="NormalMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channels=n.channels??"rgb",t.uniforms.strength=n.strength??.8):n.type==="Grid"?(t.uniforms.color=Be(n.color??[0,1,0,1]),t.uniforms.cellAlpha=n.cellAlpha??.1,t.uniforms.lineCount=Ze(n.lineCount??[8,8]),t.uniforms.lineThickness=Ze(n.lineThickness??[1,1]),t.uniforms.lineOffset=Ze(n.lineOffset??[0,0])):n.type==="Stripe"?(t.uniforms.evenColor=Be(n.evenColor??[1,1,1,.5]),t.uniforms.oddColor=Be(n.oddColor??[0,0,1,.5]),t.uniforms.horizontal=n.horizontal??!0,t.uniforms.offset=n.offset??0,t.uniforms.repeat=n.repeat??5):n.type==="Checkerboard"?(t.uniforms.lightColor=Be(n.lightColor??[1,1,1,.5]),t.uniforms.darkColor=Be(n.darkColor??[0,0,0,.5]),t.uniforms.repeat=Ze(n.repeat??[5,5])):n.type==="Dot"?(t.uniforms.lightColor=Be(n.lightColor??[1,1,0,.75]),t.uniforms.darkColor=Be(n.darkColor??[0,1,1,.75]),t.uniforms.repeat=Ze(n.repeat??[5,5])):n.type==="Water"?(t.uniforms.baseWaterColor=Be(n.baseWaterColor??[.2,.3,.6,1]),t.uniforms.blendColor=Be(n.blendColor??[0,1,.699,1]),t.uniforms.specularMap=vn(n.specularMap),t.uniforms.normalMap=vn(n.normalMap),t.uniforms.frequency=n.frequency??10,t.uniforms.animationSpeed=n.animationSpeed??.01,t.uniforms.amplitude=n.amplitude??1,t.uniforms.specularIntensity=n.specularIntensity??.5,t.uniforms.fadeFactor=n.fadeFactor??1):n.type==="RimLighting"?(t.uniforms.color=Be(n.color??[1,0,0,.7]),t.uniforms.rimColor=Be(n.rimColor??[1,1,1,.4]),t.uniforms.width=n.width??.3):n.type==="Fade"?(t.uniforms.fadeInColor=Be(n.fadeInColor??[1,0,0,1]),t.uniforms.fadeOutColor=Be(n.fadeOutColor??[0,0,0,0]),t.uniforms.maximumDistance=n.maximumDistance??.5,t.uniforms.repeat=n.repeat??!0,t.uniforms.fadeDirection=l2(n.fadeDirection??[!0,!0]),t.uniforms.time=Ze(n.time??[.5,.5])):n.type==="ElevationContour"?(t.uniforms.color=Be(n.color??[1,0,0,1]),t.uniforms.spacing=n.spacing??100,t.uniforms.width=n.width??1):n.type==="ElevationRamp"?(t.uniforms.image=vn(n.image),t.uniforms.minimumHeight=n.minimumHeight??0,t.uniforms.maximumHeight=n.maximumHeight??1e4):n.type==="AspectRamp"?t.uniforms.image=vn(n.image):n.type==="ElevationBand"?(t.uniforms.color=vn(n.colors),t.uniforms.heights=vn(n.heights)):n.type==="XbsjPolylineArrow"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.image=vn(n.image),t.uniforms.repeat=n.repeat??60,t.uniforms.speed=n.speed??1,t.uniforms.lineLength=n.lineLength??1,t.uniforms.arrowColor=Be(n.arrowColor??[1,1,1,1])):console.warn(`未知材质类型,无法更新 ${n.type}`)}function ai(t,n){const e=c.react(void 0);let i="";const[o,r,s]=c.getReactFuncs(t),a=()=>{try{const l=o()??n;l?i!==l.type?(i=l.type,e.value=Jv(l)):e.value&&Ap(e.value,l):(i="",e.value=void 0)}catch{}};return a(),e.dispose(s.disposableOn(a)),e}function Gi(t,n=!1){const e=Yt(t.positions,n),i=t.holes&&t.holes.map(o=>Gi(o));return{positions:e,holes:i}}function fp(t,n){const e=Math.PI/180,i=1/e,o=new w.Cartographic(t[0]*e,t[1]*e,t[2]),r=new w.Cartographic(n[0]*e,n[1]*e,n[2]),s=new w.EllipsoidGeodesic(o,r).interpolateUsingFraction(.5,new w.Cartographic);if(s)return s.height=(o.height+r.height)*.5,[s.longitude*i,s.latitude*i,s.height]}const e0=new w.Cartesian4,u2=new w.Matrix4;function c2(){return{left:0,top:0,right:0,bottom:0,depth:0}}function t0(t,n){return t.left===n.left&&t.right===n.right&&t.bottom===n.bottom&&t.top===n.top&&t.depth===n.depth}function n0(t,n,e){if(t.scene.mode!==w.SceneMode.SCENE3D)return;const i=t.canvas.clientHeight,o=t.canvas.clientWidth,r=t.camera.viewMatrix,s=t.camera.frustum.projectionMatrix,a=w.Matrix4.multiply(s,r,u2),l=w.Matrix4.multiplyByVector(a,w.Cartesian4.fromElements(n.x,n.y,n.z,1,e0),e0);l.x/=l.w,l.y/=l.w,l.z/=l.w,l.w=1;const u=o*(l.x*.5+.5),A=i*(l.y*.5+.5),h=o-u,f=i-A,p=l.z;if(!(u<0||A<0||h<0||f<0||p<0||p>1))return e?(e.left=u,e.top=f,e.right=h,e.bottom=A,e.depth=p):e={left:u,top:f,right:h,bottom:A,depth:p},e}const vo={left:0,top:0,right:0,bottom:0,depth:0};class Ch extends c.Destroyable{constructor(e,i=!0,o){super();O(this,"_cartesian",new w.Cartesian3);O(this,"_winPos",{left:0,top:0,right:0,bottom:0,depth:0});O(this,"_winPosValid",!1);O(this,"_changedEvent",new c.Event);O(this,"_enabled",!0);this._viewer=e,o=o||this.disposeVar(new xh(this._viewer.scene)),this.dispose(o.changed.disposableOn(()=>this._updateWinPos())),this.dispose(()=>{this._changedEvent.empty||console.warn("WinPosFromCartesian需要销毁,但是changed事件仍有监听,代码未必有错,但是说明代码不严谨。")}),this.enabled=i}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,e&&this._updateWinPos())}_updateWinPos(){if(!this._enabled)return;let e=!1;const i=n0(this._viewer,this._cartesian,vo);!!i!==this._winPosValid&&(e=!0,this._winPosValid=!!i),this._winPosValid?t0(this._winPos,vo)||(e=!0,this._winPos.left=vo.left,this._winPos.top=vo.top,this._winPos.right=vo.right,this._winPos.bottom=vo.bottom,this._winPos.depth=vo.depth):(e=!0,this._winPos.left=Number.NaN,this._winPos.top=Number.NaN,this._winPos.right=Number.NaN,this._winPos.bottom=Number.NaN,this._winPos.depth=Number.NaN),e&&this._changedEvent.emit(this._winPosValid,this._winPos)}get cartesian(){return this._cartesian}set cartesian(e){w.Cartesian3.equals(this._cartesian,e)||(w.Cartesian3.clone(e,this._cartesian),this._updateWinPos())}get changed(){return this._changedEvent}get winPosValid(){return this._winPosValid}get winPos(){return this._winPos}}function i0(t){const n=w.Math.toRadians(t[0]),e=w.Math.toRadians(t[1]),i=w.Math.toRadians(t[2]),o=w.Matrix3.fromHeadingPitchRoll(new w.HeadingPitchRoll(n,e,i)),r=new w.Cartesian3;return w.Matrix3.multiplyByVector(o,w.Cartesian3.UNIT_X,r),[r.x,r.y,r.z]}const h2=w.Check,wo=w.defined,r0=w.Math.EPSILON10;function A2(t,n,e,i){if(h2.defined("equalsEpsilon",n),!wo(t))return;e=e??!1;const o=wo(i),r=t.length;if(r<2)return t;let s,a=t[0],l,u,A=0,h=-1;for(s=1;s<r;++s)l=t[s],n(a,l,r0)?(wo(u)||(u=t.slice(0,s),A=s-1,h=0),o&&i.push(s)):(wo(u)&&(u.push(l),A=s,o&&(h=i.length)),a=l);return e&&n(t[0],t[r-1],r0)&&(o&&(wo(u)?i.splice(h,0,A):i.push(r-1)),wo(u)?u.length-=1:u=t.slice(0,-1)),wo(u)?u:t}const Ne=w.Cartesian3,ws=w.Cartographic,bo=w.defined,o0=w.DeveloperError,s0=w.Ellipsoid,f2=w.EllipsoidGeodesic,a0=w.EllipsoidRhumbLine,p2=w.IntersectionTests,pp=w.Math,bs=w.Matrix4,xo=w.Plane,Dt={};Dt.numberOfPoints=function(t,n,e){const i=Ne.distance(t,n);return Math.ceil(i/e)},Dt.numberOfPointsRhumbLine=function(t,n,e){const i=Math.pow(t.longitude-n.longitude,2)+Math.pow(t.latitude-n.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(e*e))))};const d2=new ws;Dt.extractHeights=function(t,n){const e=t.length,i=new Array(e);for(let o=0;o<e;o++){const r=t[o];i[o]=n.cartesianToCartographic(r,d2).height}return i};const g2=new bs,m2=new Ne,l0=new Ne,y2=new xo(Ne.UNIT_X,0),u0=new Ne,v2=new xo(Ne.UNIT_X,0),w2=new Ne,b2=new Ne,dp=[];function c0(t,n,e){const i=dp;i.length=t;let o;if(n===e){for(o=0;o<t;o++)i[o]=n;return i}const s=(e-n)/t;for(o=0;o<t;o++){const a=n+o*s;i[o]=a}return i}const Sh=new ws,Eh=new ws,xr=new Ne,gp=new Ne,x2=new Ne,mp=new f2;let tl=new a0;function _2(t,n,e,i,o,r,s,a){const l=i.scaleToGeodeticSurface(t,gp),u=i.scaleToGeodeticSurface(n,x2),A=Dt.numberOfPoints(t,n,e),h=i.cartesianToCartographic(l,Sh),f=i.cartesianToCartographic(u,Eh),p=c0(A,o,r);mp.setEndPoints(h,f);const d=mp.surfaceDistance/A;let g=a;h.height=o;let v=i.cartographicToCartesian(h,xr);Ne.pack(v,s,g),g+=3;for(let y=1;y<A;y++){const m=mp.interpolateUsingSurfaceDistance(y*d,Eh);m.height=p[y],v=i.cartographicToCartesian(m,xr),Ne.pack(v,s,g),g+=3}return g}function C2(t,n,e,i,o,r,s,a){const l=i.cartesianToCartographic(t,Sh),u=i.cartesianToCartographic(n,Eh),A=Dt.numberOfPointsRhumbLine(l,u,e);l.height=0,u.height=0;const h=c0(A,o,r);tl.ellipsoid.equals(i)||(tl=new a0(void 0,void 0,i)),tl.setEndPoints(l,u);const f=tl.surfaceDistance/A;let p=a;l.height=o;let d=i.cartographicToCartesian(l,xr);Ne.pack(d,s,p),p+=3;for(let g=1;g<A;g++){const v=tl.interpolateUsingSurfaceDistance(g*f,Eh);v.height=h[g],d=i.cartographicToCartesian(v,xr),Ne.pack(d,s,p),p+=3}return p}Dt.wrapLongitude=function(t,n){const e=[],i=[];if(bo(t)&&t.length>0){n=n??bs.IDENTITY;const o=bs.inverseTransformation(n,g2),r=bs.multiplyByPoint(o,Ne.ZERO,m2),s=Ne.normalize(bs.multiplyByPointAsVector(o,Ne.UNIT_Y,l0),l0),a=xo.fromPointNormal(r,s,y2),l=Ne.normalize(bs.multiplyByPointAsVector(o,Ne.UNIT_X,u0),u0),u=xo.fromPointNormal(r,l,v2);let A=1;e.push(Ne.clone(t[0]));let h=e[0];const f=t.length;for(let p=1;p<f;++p){const d=t[p];if(xo.getPointDistance(u,h)<0||xo.getPointDistance(u,d)<0){const g=p2.lineSegmentPlane(h,d,a,w2);if(bo(g)){const v=Ne.multiplyByScalar(s,5e-9,b2);xo.getPointDistance(a,h)<0&&Ne.negate(v,v),e.push(Ne.add(g,v,new Ne)),i.push(A+1),Ne.negate(v,v),e.push(Ne.add(g,v,new Ne)),A=1}}e.push(Ne.clone(t[p])),A++,h=d}i.push(A)}return{positions:e,lengths:i}},Dt.generateArc=function(t){bo(t)||(t={});const n=t.positions;if(!bo(n))throw new o0("options.positions is required.");const e=n.length,i=t.ellipsoid??s0.WGS84;let o=t.height??0;const r=Array.isArray(o);if(e<1)return[];if(e===1){const g=i.scaleToGeodeticSurface(n[0],gp);if(o=r?o[0]:o,o!==0){const v=i.geodeticSurfaceNormal(g,xr);Ne.multiplyByScalar(v,o,v),Ne.add(g,v,g)}return[g.x,g.y,g.z]}let s=t.minDistance;if(!bo(s)){const g=t.granularity??pp.RADIANS_PER_DEGREE;s=pp.chordLength(g,i.maximumRadius)}let a=0,l;for(l=0;l<e-1;l++)a+=Dt.numberOfPoints(n[l],n[l+1],s);const u=(a+1)*3,A=new Array(u);let h=0;for(l=0;l<e-1;l++){const g=n[l],v=n[l+1],y=r?o[l]:o,m=r?o[l+1]:o;h=_2(g,v,s,i,y,m,A,h)}dp.length=0;const f=n[e-1],p=i.cartesianToCartographic(f,Sh);p.height=r?o[e-1]:o;const d=i.cartographicToCartesian(p,xr);return Ne.pack(d,A,u-3),A};const h0=new ws,S2=new ws;Dt.generateRhumbArc=function(t){bo(t)||(t={});const n=t.positions;if(!bo(n))throw new o0("options.positions is required.");const e=n.length,i=t.ellipsoid??s0.WGS84;let o=t.height??0;const r=Array.isArray(o);if(e<1)return[];if(e===1){const y=i.scaleToGeodeticSurface(n[0],gp);if(o=r?o[0]:o,o!==0){const m=i.geodeticSurfaceNormal(y,xr);Ne.multiplyByScalar(m,o,m),Ne.add(y,m,y)}return[y.x,y.y,y.z]}const s=t.granularity??pp.RADIANS_PER_DEGREE;let a=0,l,u=i.cartesianToCartographic(n[0],h0),A;for(l=0;l<e-1;l++)A=i.cartesianToCartographic(n[l+1],S2),a+=Dt.numberOfPointsRhumbLine(u,A,s),u=ws.clone(A,h0);const h=(a+1)*3,f=new Array(h);let p=0;for(l=0;l<e-1;l++){const y=n[l],m=n[l+1],_=r?o[l]:o,x=r?o[l+1]:o;p=C2(y,m,s,i,_,x,f,p)}dp.length=0;const d=n[e-1],g=i.cartesianToCartographic(d,Sh);g.height=r?o[e-1]:o;const v=i.cartographicToCartesian(g,xr);return Ne.pack(v,f,h-3),f},Dt.generateCartesianArc=function(t){const n=Dt.generateArc(t),e=n.length/3,i=new Array(e);for(let o=0;o<e;o++)i[o]=Ne.unpack(n,o*3);return i},Dt.generateCartesianRhumbArc=function(t){const n=Dt.generateRhumbArc(t),e=n.length/3,i=new Array(e);for(let o=0;o<e;o++)i[o]=Ne.unpack(n,o*3);return i};const Ph=w.ArcType,E2=w.Cartesian3,P2=w.Math;function A0(t){const n=t.arcType,e=t.granularity,i=t.ellipsoid,o=[];let r=A2(t.positions,E2.equalsEpsilon,!1,o);if(!(r.length<2)){if(n===Ph.GEODESIC||n===Ph.RHUMB){let a;n===Ph.GEODESIC?(a=P2.chordLength(e,i.maximumRadius),Dt.numberOfPoints):(a=e,Dt.numberOfPointsRhumbLine);const l=Dt.extractHeights(r,i);n===Ph.GEODESIC?r=Dt.generateCartesianArc({positions:r,minDistance:a,ellipsoid:i,height:l}):r=Dt.generateCartesianRhumbArc({positions:r,granularity:a,ellipsoid:i,height:l})}return r}}function yp(t,n="GEODESIC",e){const o=t.map(c.lbhToXyz).map(h=>w.Cartesian3.fromArray(h));let r;if(e>0&&n!=="NONE"){if(r=A0({arcType:w.ArcType[n??"GEODESIC"],granularity:e,ellipsoid:w.Ellipsoid.WGS84,positions:o}),!r)return}else r=o;let s=0;const a=[0],l=r.length;for(let h=1;h<l;++h)s+=w.Cartesian3.distance(r[h-1],r[h]),a.push(s);const u=r.map(h=>c.xyzToLbh([h.x,h.y,h.z]));return{timePosRots:a.map((h,f)=>[a[f],u[f],void 0]),distances:a}}function f0(t,n){n=n??new Array(16);for(let e=0;e<16;++e)n[e]=t[e];return n}function vp(t,n){const e=w.Matrix4.clone(w.Matrix4.IDENTITY),{position:i,rotation:o,scale:r,initialRotationMode:s="YForwardZUp"}=t;if(i){const[a,l,u]=i;w.Transforms.eastNorthUpToFixedFrame(w.Cartesian3.fromDegrees(a,l,u),void 0,e)}if(o){const a=new w.Quaternion;s==="YForwardZUp"?bh(o,a):s==="XForwardZUp"&&Gv(o,a);const l=w.Matrix3.fromQuaternion(a);w.Matrix4.multiply(e,w.Matrix4.fromRotationTranslation(l),e)}return r&&w.Matrix4.multiplyByScale(e,oi(r),e),f0(e,n)}const B2=new w.Matrix4;function p0(t,n){const e=w.Matrix4.fromArray(t,0,B2);return w.Matrix4.inverse(e,e),f0(e,n)}const T2=new w.Matrix4,I2=new w.Cartesian3;function d0(t,n,e){const[i,o,r]=n,s=w.Cartesian3.fromDegrees(i,o,r,void 0,I2),a=w.Matrix4.fromArray(t,0,T2),l=w.Matrix4.multiplyByPoint(a,s,s),{x:u,y:A,z:h}=l;return e=e||[0,0,0],e[0]=u,e[1]=A,e[2]=h,e}const F2=new w.Matrix4,M2=new w.Cartesian3,D2=new w.Cartographic;function g0(t,n,e){const[i,o,r]=n,s=w.Cartesian3.fromElements(i,o,r,M2),a=w.Matrix4.fromArray(t,0,F2),l=w.Matrix4.multiplyByPoint(a,s,s),u=w.Cartographic.fromCartesian(l,void 0,D2);return e=e||[0,0,0],e[0]=w.Math.toDegrees(u.longitude),e[1]=w.Math.toDegrees(u.latitude),e[2]=u.height,e}function wn(t,n){const{originPosition:e,originRotation:i,originScale:o,initialRotationMode:r}=t,s=vp({position:e,rotation:i,scale:o,initialRotationMode:r}),a=p0(s);return[n.map(u=>d0(a,u)),s,a]}function _r(t,n){const{originPosition:e,originRotation:i,originScale:o,initialRotationMode:r}=t,s=vp({position:e,rotation:i,scale:o,initialRotationMode:r});return[n.map(l=>g0(s,l)),s]}function m0(t){if(t.length<2)return console.error("getIncludedAngleFromPositions需要传入的点不能少于三个!!!!!"),!1;let n=[];for(let e=0;e<t.length-2;e++){const i=$e.Cartesian3.fromDegrees(...t[e]),o=$e.Cartesian3.fromDegrees(...t[e+1]),r=$e.Cartesian3.fromDegrees(...t[e+2]),s=$e.Cartesian3.angleBetween($e.Cartesian3.subtract(i,o,new $e.Cartesian3),$e.Cartesian3.subtract(r,o,new $e.Cartesian3));n.push(isNaN(s)?0:$e.Math.toDegrees(s))}return n}function wp(t,n){let e=n||[];return t.positions&&(e[e.length]??(e[e.length]=[]),e[e.length-1].push(...t.positions.map(i=>Oe(i)))),t.holes&&t.holes.forEach(i=>{e=wp(i,e)}),e}function Hn(t){return typeof t=="string"?c.ESSceneObject.context.getStrFromEnv(t):new w.Resource({url:c.ESSceneObject.context.getStrFromEnv(t.url),headers:t.headers,queryParameters:t.queryParameters,templateValues:t.templateValues,proxy:t.proxy,retryCallback:t.retryCallback,retryAttempts:t.retryAttempts,request:t.request,parseUrl:t.parseUrl})}class bp extends c.Destroyable{constructor(n,e,i,o){if(super(),!n.viewer)return;const{scene:r}=n.viewer,[s,a,l]=c.getReactFuncs(e),[u,A,h]=c.getReactFuncs(i),f=new w.Cartesian3,p=()=>{let d=s();d&&(d=[...d],n.editingHeightOffset&&(d[2]-=n.editingHeightOffset),w.Cartesian3.fromDegrees(...d,void 0,f))};p(),this.dispose(l.disposableOn(p)),this.dispose(r.preUpdate.addEventListener(()=>{if(w.Cartesian3.ZERO.equals(f))return;const d=Hi(r,f,o);d!==void 0?A([d,d,d]):console.warn(`CzmGeoCoordinatesEditor warn: scale: ${d??"undefined"}`)}))}}function R2(t,n){const e=w.Cartesian3.fromArray(t,0),i=w.Cartesian3.fromArray(t,3),o=w.Cartesian3.fromArray(t,6),r=w.Cartesian3.fromArray(t,9),s=[],a=[[1,1,1],[1,1,-1],[1,-1,1],[1,-1,-1],[-1,1,1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]];for(let l of a){let u=new w.Cartesian3;w.Cartesian3.multiplyByScalar(i,l[0],u);let A=new w.Cartesian3;w.Cartesian3.multiplyByScalar(o,l[1],A),w.Cartesian3.add(u,A,u),w.Cartesian3.multiplyByScalar(r,l[2],A),w.Cartesian3.add(u,A,u),w.Cartesian3.add(e,u,u),u=w.Matrix4.multiplyByPoint(n,u,new w.Cartesian3),s.push(u)}return s}function U2(t,n){const e=w.Matrix4.multiplyByPoint(n,w.Cartesian3.fromArray(t,0),new w.Cartesian3),i=t[3],o=[],r=[[i,0,0],[-i,0,0],[0,i,0],[0,-i,0],[0,0,i],[0,0,-i]];for(let s of r){let a=new w.Cartesian3(e.x+s[0],e.y+s[1],e.z+s[2]);a=w.Matrix4.multiplyByPoint(n,a,new w.Cartesian3),o.push(a)}return o}function O2(t){const[n,e,i,o,r,s]=t,a=[],l=[n,i],u=[e,o],A=[r,s];for(let h of l)for(let f of u)for(let p of A)a.push(w.Cartesian3.fromRadians(h,f,p));return a}function y0(t,n,e){let i=n;t.transform&&(i=w.Matrix4.multiplyTransformation(n,w.Matrix4.fromArray(t.transform),new w.Matrix4));const o=t.boundingVolume;if(o.box&&e.push(...R2(o.box,i)),o.sphere&&e.push(...U2(o.sphere,i)),o.region&&e.push(...O2(o.region)),t.children)for(let r of t.children)y0(r,i,e)}function L2(t){if(!t||!t.root)return console.warn("无法生成包围盒,请检查包围盒是否正确"),[];const n=[],e=t.root.transform?w.Matrix4.fromArray(t.root.transform):w.Matrix4.IDENTITY;if(y0(t.root,e,n),n.length===0)return console.warn("无法生成包围盒,请检查包围盒是否正确"),[];let i=[1/0,1/0,1/0],o=[-1/0,-1/0,-1/0];for(let r of n){const s=w.Cartographic.fromCartesian(r);i[0]=Math.min(i[0],s.longitude),i[1]=Math.min(i[1],s.latitude),i[2]=Math.min(i[2],s.height),o[0]=Math.max(o[0],s.longitude),o[1]=Math.max(o[1],s.latitude),o[2]=Math.max(o[2],s.height)}return[i[0],i[1],o[0],o[1],i[2],o[2]]}const v0=c.createProcessingFromAsyncFunc(async(t,n)=>{let e={state:"success",tilesUrl:{asset:{version:"1.1"},geometricError:0,refine:"REPLACE",root:{boundingVolume:{region:[]},geometricError:0,refine:"REPLACE",children:[]}}},i={},o=[];if(await c.step(t,async l=>new Promise(async(u,A)=>{for(let h=0;h<n.length;h++){const f=n[h];await fetch(f).then(p=>p.json()).then(p=>{p&&!Reflect.has(p,"success")?i[f]=p:o.push({index:h,url:f,message:p.message}),h==n.length-1&&u()}).catch(p=>{o.push({index:h,url:f,message:p}),h==n.length-1&&u()})}})),o.length>0&&(e.state="error",e.info=o,o.length==n.length))return e.tilesUrl=void 0,e;const r=[],s=[],a=[];for(const l in i){const u=i[l];s.push(u.geometricError??u.root.geometricError??0);const A=L2(u);r.push(A),a.push({content:{uri:l},boundingVolume:{region:A},geometricError:u.geometricError,refine:"REPLACE"})}return e.tilesUrl&&(e.tilesUrl.geometricError=e.tilesUrl.root.geometricError=Math.max(...s),e.tilesUrl.root.boundingVolume.region=[Math.min(...r.map(l=>l[0])),Math.min(...r.map(l=>l[1])),Math.max(...r.map(l=>l[2])),Math.max(...r.map(l=>l[3])),Math.min(...r.map(l=>l[4])),Math.max(...r.map(l=>l[5]))],e.tilesUrl.root.children=a),e});function z2(t){return new Promise((n,e)=>{v0.restart(void 0,t),v0.completeEvent.don(i=>{n(i)})})}class xp extends c.Destroyable{constructor(e){super();O(this,"_center",this.disposeVar(c.reactArrayWithUndefined(void 0)));O(this,"_radius",this.disposeVar(c.react(0)));const[i,o,r]=c.getReactFuncs(e);{const s=()=>{const a=i();if(a){const{center:l,minPos:u,maxPos:A}=c.getMinMaxCorner(a);this._center.value=l,this._radius.value=c.geoDistance(u,A)/2}else this._center.value=void 0};s(),this.dispose(r.disposableOn(s))}}get centerReact(){return this._center}get center(){return this._center.value}get centerChanged(){return this._center.changed}get radiusReact(){return this._radius}get radius(){return this._radius.value}get radiusChanged(){return this._radius.changed}}function w0(t){return new w.Material({fabric:{type:"XbsjWater",uniforms:{baseWaterImage:"",repeatX:1,repeatY:1,flowSpeed:0,baseWaterColor:new w.Color(.2,.3,.6,1),blendColor:new w.Color(0,1,.699,1),specularMap:w.Material.DefaultImageId,normalMap:w.Material.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1,...t},source:`// Thanks for the contribution Jonas
1
+ var EarthSDK3_Cesium=function(ne,$e,c){"use strict";var m9=Object.defineProperty;var y9=(ne,$e,c)=>$e in ne?m9(ne,$e,{enumerable:!0,configurable:!0,writable:!0,value:c}):ne[$e]=c;var O=(ne,$e,c)=>y9(ne,typeof $e!="symbol"?$e+"":$e,c);var Ni=typeof document<"u"?document.currentScript:null;function IE(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const w=IE($e);window.Cesium=w;function FE(){Object.keys(w).forEach(t=>{w[t].prototype&&Object.defineProperty(w[t].prototype,"ESSceneObjectID",{writable:!0,enumerable:!0,value:c.createGuid()})})}fetch("https://cdn.jsdelivr.net/gh/CesiumGS/cesium/packages/engine/Source/Core/Ion.js").then(t=>t.text()).then(t=>{const n=t.match(/defaultAccessToken\s*=\s*["'`](.*?)["'`]/);n&&(w.Ion.defaultAccessToken=n[1],console.log("更新默认Cesium.Ion.Token成功"))}).catch(t=>{w.Ion.defaultAccessToken="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhN2VkNDM5ZS1jMDk0LTQ3NDItOTM5ZS00MzU3M2M1MTc2ZTkiLCJpZCI6MjU5LCJpYXQiOjE3NjIxODg4MDB9.ZZG574sONzeHxsX8HJMaL_ZiGA3dh_HrOxL7DrKRcd4"});const _u=class _u extends c.Destroyable{};O(_u,"defaults",{enabled:!0}),O(_u,"createDefaultProps",()=>({..._u.defaults}));let Fn=_u;c.extendClassProps(Fn.prototype,Fn.createDefaultProps);class Nn extends c.EngineObject{constructor(n,e){if(super(n,e),!e.viewer){console.warn("viewer is undefined!");return}this.d(n.flyToEvent.don((o,r,s)=>this.flyTo(o,r,s))),this.d(n.flyInEvent.don((o,r,s)=>this.flyIn(o,r,s))),this.dispose(n.calcFlyInParamEvent.disposableOn(()=>{if(!e.actived)return;const o=e.getCameraInfo();if(!o)return;const{position:r,rotation:s}=o;n.flyInParam={position:r,rotation:s,flyDuration:1}})),this.dispose(n.calcFlyToParamEvent.disposableOn(()=>{n.useCalcFlyToParamInESObjectWithLocation||console.warn("calcFlyToParam无法调用,该对象缺少position属性!")}))}flyToWithPromise(n,e,i,o,r,s,a,l="default"){const{sceneObject:u,czmViewer:A}=this,h=A.flyTo({distance:i??0,heading:o?o[0]:0,pitch:o?o[1]:0,flyDuration:r??1,hDelta:s??0,pDelta:a??0},e,l);h&&h.then(f=>{})}flyTo(n,e,i="default"){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam&&(o.useCalcFlyToParamInESObjectWithLocation||console.warn("flyToParam无法使用,该对象缺少position属性,若飞行失败,请清空flyToParam后重试!")),o.flyInParam){const{position:s,rotation:a,flyDuration:l}=o.flyInParam,u=n??l;return this.flyToWithPromise(e,s,void 0,a,u,void 0,void 0,i),!0}return!1}flyIn(n,e,i="default"){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyInParam){const{position:s,rotation:a,flyDuration:l}=o.flyInParam,u=n??l;return this.flyToWithPromise(e,s,void 0,a,u,void 0,void 0,i),!0}return!1}get czmViewer(){return this.viewer}}function Ye(t,n){return w.Cartesian3.fromDegrees(...t,void 0,n)}const ME=new w.Cartographic;function Oe(t,n){const e=w.Cartographic.fromCartesian(t,void 0,ME);if(e)return n=n||[0,0,0],n[0]=w.Math.toDegrees(e.longitude),n[1]=w.Math.toDegrees(e.latitude),n[2]=e.height,n}function Ze(t,n){return n=n||new w.Cartesian2,n.x=t[0],n.y=t[1],n}function Vv(t,n){return n=n||[0,0],n[0]=t.x,n[1]=t.y,n}function ri(t,n){return n=n||new w.Cartesian3,n.x=t[0],n.y=t[1],n.z=t[2],n}function $a(t,n){return n=n||[0,0,0],n[0]=t.x,n[1]=t.y,n[2]=t.z,n}function rp(t,n){return n=n||new w.Cartesian4,n.x=t[0],n.y=t[1],n.z=t[2],n.w=t[3],n}function Nv(t,n){return n=n||[0,0,0,0],n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w,n}function oi(t,n){if(t.length===4)return rp(t,n);if(t.length===3)return ri(t,n);if(t.length===2)return Ze(t,n);throw new Error("toCartesian error: should not be here!")}function DE(t,n){if(t instanceof w.Cartesian2)return Vv(t,n);if(t instanceof w.Cartesian3)return $a(t,n);if(t instanceof w.Cartesian4)return Nv(t,n);throw new Error("fromCartesian error: should not be here!")}function RE(t,n){return n=n||new w.Cartographic,n.longitude=w.Math.toRadians(t[0]),n.latitude=w.Math.toRadians(t[1]),n.height=t[2],n}function go(t,n){return n=n||[0,0,0],n[0]=w.Math.toDegrees(t.longitude),n[1]=w.Math.toDegrees(t.latitude),n[2]=t.height,n}function Be(t,n){return n=n||new w.Color,n.red=t[0],n.green=t[1],n.blue=t[2],n.alpha=t[3],n}function UE(t,n){return n=n||[0,0,0,0],n[0]=t.red,n[1]=t.green,n[2]=t.blue,n[3]=t.alpha,n}function yr(t,n){return n=n||new w.NearFarScalar,n.near=t[0],n.nearValue=t[1],n.far=t[2],n.farValue=t[3],n}function OE(t,n){return n=n||[0,0,0,0],n[0]=t.near,n[1]=t.nearValue,n[2]=t.far,n[3]=t.farValue,n}function Hv(t,n){return n=n||new w.HeadingPitchRoll,n.heading=w.Math.toRadians(t[0]-90),n.pitch=w.Math.toRadians(t[1]),n.roll=w.Math.toRadians(t[2]),n}function LE(t,n){return n=n||[0,0,0],n[0]=w.Math.toDegrees(t.heading+w.Math.PI_OVER_TWO),n[1]=w.Math.toDegrees(t.pitch),n[2]=w.Math.toDegrees(t.roll),n}function Ya(t,n){return n=n||new w.DistanceDisplayCondition,n.near=t[0],n.far=t[1],n}function zE(t,n){return n=n||[0,0],n[0]=t.near,n[1]=t.far,n}function kE(t,n){return n=n||new w.Quaternion,n.x=t[0],n.y=t[1],n.z=t[2],n.w=t[3],n}function QE(t,n){return n=n||[0,0,0,0],n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w,n}const VE=new w.HeadingPitchRoll,NE=new w.Cartesian3;function HE(t,n,e){const i=Hv(n,VE),o=Ye(t,NE);return w.Transforms.headingPitchRollQuaternion(o,i,void 0,void 0,e)}function mt(t,n){return n=n||new w.Rectangle,n.west=t[0]*Math.PI/180,n.south=t[1]*Math.PI/180,n.east=t[2]*Math.PI/180,n.north=t[3]*Math.PI/180,n}function GE(t,n){return n=n||[0,0,0,0],n[0]=t.west,n[1]=t.south,n[2]=t.east,n[3]=t.north,n}const WE=new w.Cartesian3;function Ke(t,n){return n=n||new w.Ellipsoid,w.Ellipsoid.fromCartesian3(w.Cartesian3.fromArray(t,void 0,WE),n)}function jE(t,n){return n=n||[0,0,0],n[0]=t.radii.x,n[1]=t.radii.y,n[2]=t.radii.z,n}function si(t){if(t.type==="GeographicTilingScheme")return new w.GeographicTilingScheme({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),rectangle:t.rectangle&&mt(t.rectangle),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY});if(t.type==="WebMercatorTilingScheme")return new w.WebMercatorTilingScheme({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY,rectangleSouthwestInMeters:t.rectangleSouthwestInMeters&&Ze(t.rectangleSouthwestInMeters),rectangleNortheastInMeters:t.rectangleNortheastInMeters&&Ze(t.rectangleNortheastInMeters)});if(t.type==="ToGCJ02WebMercatorTilingScheme")return new hx({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY,rectangleSouthwestInMeters:t.rectangleSouthwestInMeters&&Ze(t.rectangleSouthwestInMeters),rectangleNortheastInMeters:t.rectangleNortheastInMeters&&Ze(t.rectangleNortheastInMeters)});if(t.type==="ToWGS84WebMercatorTilingScheme")return new Ax({ellipsoid:t.ellipsoid&&Ke(t.ellipsoid),numberOfLevelZeroTilesX:t.numberOfLevelZeroTilesX,numberOfLevelZeroTilesY:t.numberOfLevelZeroTilesY,rectangleSouthwestInMeters:t.rectangleSouthwestInMeters&&Ze(t.rectangleSouthwestInMeters),rectangleNortheastInMeters:t.rectangleNortheastInMeters&&Ze(t.rectangleNortheastInMeters)});console.warn(`未能识别的类型tilingSchemaJson.type: ${t.type}`)}function Ja(t,n){const{planes:e,enabled:i,modelMatrix:o,unionClippingRegions:r,edgeColor:s,edgeWidth:a}=t;let l=o&&w.Matrix4.fromArray(o);return n&&(l=l||w.Matrix4.clone(w.Matrix4.IDENTITY,new w.Matrix4),w.Matrix4.multiply(n,l,l)),new w.ClippingPlaneCollection({planes:e&&e.map(u=>new w.ClippingPlane(ri(u.normal),u.distance)),enabled:i,modelMatrix:l,unionClippingRegions:r,edgeColor:s&&Be(s),edgeWidth:a})}function vh(t,n,e){const i=n;if(!i){t.removeAll(),t.enabled=!1;return}if(t.removeAll(),i.planes)for(let r of i.planes)t.add(new w.ClippingPlane(ri(r.normal),r.distance));let o=i.modelMatrix&&w.Matrix4.fromArray(i.modelMatrix)||w.Matrix4.clone(w.Matrix4.IDENTITY,new w.Matrix4);e&&w.Matrix4.multiply(e,o,o),t.enabled=i.enabled??!0,t.modelMatrix=o,t.unionClippingRegions=i.unionClippingRegions??!1,t.edgeColor=Be(i.edgeColor??[1,1,1,1]),t.edgeWidth=i.edgeWidth??2}function wh(t){const{polygons:n,enabled:e,inverse:i}=t;return new w.ClippingPolygonCollection({polygons:n&&n.map(o=>new w.ClippingPolygon({positions:o.positions.map(r=>Ye(r))})),enabled:e,inverse:i})}function bh(t,n){return op(t,w.Cartesian3.UNIT_Y,w.Cartesian3.UNIT_Z,w.Cartesian3.UNIT_X,n)}function Gv(t,n){return op(t,w.Cartesian3.UNIT_X,w.Cartesian3.UNIT_Z,new w.Cartesian3(0,-1,0),n)}function op(t,n,e,i,o){const[r,s,a]=t,l=w.Quaternion.fromAxisAngle(e,w.Math.toRadians(-r)),u=w.Quaternion.fromAxisAngle(i,w.Math.toRadians(s)),A=w.Quaternion.fromAxisAngle(n,w.Math.toRadians(a)),h=w.Quaternion.clone(w.Quaternion.IDENTITY,o);return w.Quaternion.multiply(A,h,h),w.Quaternion.multiply(u,h,h),w.Quaternion.multiply(l,h,h),h}function vr(t,n){return Array.isArray(t)?t.length!==n?(console.warn(`array.length !== ${n}`),!1):t.every(e=>Number.isFinite(e))?!0:(console.warn("!array.every(v => Number.isFinite(v))"),!1):(console.warn("!Array.isArray(array)"),!1)}function Wv(t){return t.some(n=>n===0)?(console.warn("array.some(e => e === 0)"),!1):!0}function lt(t,n){if(!((!t.localScale||vr(t.localScale,3))&&(!t.localRotation||vr(t.localRotation,3))&&(!t.localPosition||vr(t.localPosition,3))&&(!t.localModelMatrix||vr(t.localModelMatrix,16))&&(!t.scale||vr(t.scale,3))&&(!t.rotation||vr(t.rotation,3))&&(!t.position||vr(t.position,3))&&(!t.modelMatrix||vr(t.modelMatrix,16)))||t.localScale&&!Wv(t.localScale)||t.scale&&!Wv(t.scale))return;if(t.sceneScaleFromPixelSize){if(!Number.isFinite(t.sceneScaleFromPixelSize)){console.warn("!Number.isFinite(options.sceneScaleFromPixelSize)");return}if(t.sceneScaleFromPixelSize===0){console.warn("options.sceneScaleFromPixelSize === 0");return}}const i=n??w.Matrix4.clone(w.Matrix4.IDENTITY);if(t.localScale){const[o,r,s]=t.localScale??[1,1,1],a=w.Matrix4.fromScale(w.Cartesian3.fromElements(o,r,s),new w.Matrix4);w.Matrix4.multiply(a,i,i)}if((t.initialRotation??"yForwardzUp")==="xForwardzUp"){const o=w.Quaternion.fromAxisAngle(w.Cartesian3.UNIT_Z,w.Math.toRadians(90)),r=w.Matrix3.fromQuaternion(o);w.Matrix4.multiply(w.Matrix4.fromRotationTranslation(r),i,i)}if(t.localRotation){const o=bh(t.localRotation),r=w.Matrix3.fromQuaternion(o);w.Matrix4.multiply(w.Matrix4.fromRotationTranslation(r),i,i)}if(t.localPosition){const o=w.Matrix4.fromTranslation(w.Cartesian3.fromArray(t.localPosition));w.Matrix4.multiply(o,i,i)}if(t.localModelMatrix){const o=w.Matrix4.fromArray(t.localModelMatrix);w.Matrix4.multiply(o,i,i)}if(t.sceneScaleFromPixelSize!==void 0&&Number.isFinite(t.sceneScaleFromPixelSize)){const o=t.sceneScaleFromPixelSize,r=w.Matrix4.fromScale(w.Cartesian3.fromElements(o,o,o),new w.Matrix4);w.Matrix4.multiply(r,i,i)}if(t.scale){const[o,r,s]=t.scale??[1,1,1],a=w.Matrix4.fromScale(w.Cartesian3.fromElements(o,r,s),new w.Matrix4);w.Matrix4.multiply(a,i,i)}if(t.rotation){const o=bh(t.rotation),r=w.Matrix3.fromQuaternion(o);w.Matrix4.multiply(w.Matrix4.fromRotationTranslation(r),i,i)}if(t.position){const o=w.Cartesian3.fromDegrees(...t.position),r=w.Transforms.eastNorthUpToFixedFrame(o);w.Matrix4.multiply(r,i,i)}if(t.modelMatrix){const o=w.Matrix4.fromArray(t.modelMatrix);w.Matrix4.multiply(o,i,i)}return i}const KE=new w.Cartesian3,el=new w.HeadingPitchRoll,qE=new w.Matrix4,ZE=new w.Cartesian3,XE=new w.Cartographic;function $E(t,n=[0,0,0],e=0,i){const[o,r,s]=t,a=w.Cartesian3.fromDegrees(o,r,s,void 0,KE),l=[...n];for(let A=0;A<3;++A)l[A]=w.Math.RADIANS_PER_DEGREE*l[A];if(e!==0){el.heading=l[0],el.pitch=l[1],el.roll=l[2],el.heading-=w.Math.PI_OVER_TWO;const A=w.Transforms.headingPitchRollToFixedFrame(a,el,void 0,void 0,qE),h=w.Matrix4.multiplyByPointAsVector(A,w.Cartesian3.UNIT_X,ZE);w.Cartesian3.multiplyByScalar(h,e,h),w.Cartesian3.subtract(a,h,a)}const u=w.Cartographic.fromCartesian(a,void 0,XE);if(u)return i=i||[0,0,0],i[0]=u.longitude*180/Math.PI,i[1]=u.latitude*180/Math.PI,i[2]=u.height,i}function jv(t,n,e,i){return $E(t,n,e,i)}const wr=w.Math.toDegrees;function Mn(t,n){const{longitude:e,latitude:i,height:o}=t.positionCartographic;return n?(n[0]=wr(e),n[1]=wr(i),n[2]=o,n):[wr(e),wr(i),o]}function ms(t,n){const{heading:e,pitch:i,roll:o}=t;return n?(n[0]=wr(e),n[1]=wr(i),n[2]=wr(o),n):[e,i,o].map(wr)}class xh extends c.Destroyable{constructor(e){super();O(this,"_originViewMatrix",new w.Matrix4);O(this,"_originProjMatrix",new w.Matrix4);O(this,"_changed",new c.Event);this._scene=e;const i=this._scene.camera;w.Matrix4.clone(i.viewMatrix,this._originViewMatrix),w.Matrix4.clone(i.frustum.projectionMatrix,this._originViewMatrix),this.dispose(this._scene.preUpdate.addEventListener(()=>{this._update()}))}_update(){w.Matrix4.equals(this._scene.camera.viewMatrix,this._originViewMatrix)||(w.Matrix4.clone(this._scene.camera.viewMatrix,this._originViewMatrix),this._changed.emit()),w.Matrix4.equals(this._scene.camera.frustum.projectionMatrix,this._originProjMatrix)||(w.Matrix4.clone(this._scene.camera.frustum.projectionMatrix,this._originProjMatrix),this._changed.emit())}get changed(){return this._changed}}class YE extends c.Destroyable{constructor(n){super();const e=()=>{};this.dispose(n.viewDistanceChanged.disposableOn(e)),this.dispose(n.visibleAlphaChanged.disposableOn(e))}}class JE extends c.Destroyable{constructor(e){super();O(this,"_debugObjResetting");this._control=e,this._debugObjResetting=this.disposeVar(new c.ObjResettingWithEvent(this._control.debugChanged,()=>{if(this._control.debug)return new YE(this._control)}))}get debugObjResetting(){return this._debugObjResetting}}class mo extends c.Destroyable{constructor(e,i,o,r){super();O(this,"_visibleAlpha",this.disposeVar(c.react(1)));O(this,"_viewDistance",this.disposeVar(c.react(0)));O(this,"_debug",this.disposeVar(c.react(!1)));O(this,"_viewDistanceDebug",this.disposeVar(new JE(this)));this._czmViewer=e,this._positionReact=o;const{positionReact:s,czmViewer:a}=this,[l,u,A]=c.getReactFuncs(i),[h,f,p]=c.getReactFuncs(s),[d,g,v]=r?c.getReactFuncs(r):[void 0,void 0,void 0],y=()=>{let x=1,E=Number.NEGATIVE_INFINITY;const B=l(),P=h(),I=d?d():0,D=a.getCurrentCameraInfo();if(!B||!P||!D){this._viewDistance.value=E,this._visibleAlpha.value=x;return}E=c.cartesianDistance(D.position,P)-(I??0);const[F,S,T,b]=B;F>S||S>T||T>b?console.error("viewDistanceRange存在问题,需要满足逐级增大的条件,否则不生效!"):E>=S&&E<=T?x=1:E<=F||E>=b?x=0:E>F&&E<S?S-F<=0?x=0:x=(E-F)/(S-F):E>T&&E<b?(b<=T&&(x=0),x=(b-E)/(b-T)):(x=1,console.error("不应该运行至此!")),this._viewDistance.value=E,this._visibleAlpha.value=x};y();const m=[a.cameraChanged,A,p];v&&m.push(v);const _=this.disposeVar(c.createNextAnimateFrameEvent(...m));this.dispose(_.disposableOn(y))}get visibleAlpha(){return this._visibleAlpha.value}get visibleAlphaChanged(){return this._visibleAlpha.changed}get viewDistance(){return this._viewDistance.value}set viewDistance(e){this._viewDistance.value=e}get viewDistanceChanged(){return this._viewDistance.changed}get debug(){return this._debug.value}set debug(e){this._debug.value=e}get debugChanged(){return this._debug.changed}get positionReact(){return this._positionReact}get czmViewer(){return this._czmViewer}get viewDistanceDebug(){return this._viewDistanceDebug}}const e2=new w.BoundingSphere(w.Cartesian3.ZERO,0);function Hi(t,n,e){var i=e2;w.Cartesian3.clone(n,i.center);const o=t.camera.getPixelSize(i,t.drawingBufferWidth,t.drawingBufferHeight);if(o<=0)return;const r=e*o;if(Number.isFinite(r)&&r>0)return r}function Yt(t,n=!1){const e=t.length;let i;const o=[];for(let r=0;r<e;++r){const[s,a,l]=t[r],u=n?w.Cartesian3.fromDegrees(s,a):w.Cartesian3.fromDegrees(s,a,l);if(!u)continue;const{x:A,y:h,z:f}=u;[A,h,f].every(Number.isFinite)&&(!i||!w.Cartesian3.equals(i,u))&&(i=u,o.push(i))}return o}function yo(t,n,e,i){const o=c.geoRhumbDistance(t,e),r=c.geoRhumbHeading(t,e),s=Math.cos(r*Math.PI/180)*Math.cos(n*Math.PI/180)+Math.sin(r*Math.PI/180)*Math.sin(n*Math.PI/180);return s>0?c.geoRhumbDestination(t,o,n,i):c.geoRhumbDestination(t,o,n+180,i),[s>0?o:-o,i]}function t2(t,n,e){const i=e*.1,o=[];for(let r=-9;r<10;++r){const s=c.geoRhumbDestination(t,i*r,n);s&&o.push(s)}return o}function n2(t,n){return c.geoNearestPointOnLine(t,n).geometry.coordinates}const Kv=new w.Cartesian3,i2=new w.Ray,r2=new w.Plane(w.Cartesian3.UNIT_X,0);function _h(t,n,e,i){const o=w.Cartesian3.normalize(n,Kv),r=w.Cartesian3.cross(t.camera.right,o,Kv);w.Cartesian3.normalize(r,r);const s=w.Plane.fromPointNormal(n,r,r2),a=t.camera.getPickRay(e,i2);if(a)return w.IntersectionTests.rayPlane(a,s,i)}const sp=new w.Cartesian3,o2=new w.Ray,s2=new w.Cartographic,a2=new w.Ellipsoid;function ys(t,n,e,i){const o=t.camera.getPickRay(n,o2);if(!o)return;const r=w.Cartesian3.fromElements(e,e,e,sp),s=w.Cartesian3.add(r,w.Ellipsoid.WGS84.radii,sp),a=w.Ellipsoid.fromCartesian3(s,a2),l=w.IntersectionTests.rayEllipsoid(o,a);if(l){const u=l.start>0?l.start:l.stop;if(u){const A=w.Ray.getPoint(o,u,sp),h=w.Cartographic.fromCartesian(A,void 0,s2);return i=i||new w.Cartographic,i.longitude=h.longitude,i.latitude=h.latitude,i.height=e,i}else return}else return}function vs(t,n){n[0]=t[0],n[1]=t[1],n[2]=t[2]}function qv(t){const n=w.Ellipsoid.WGS84.minimumRadius;return(t+n)/n}const Zv=new w.Cartographic,Xv=new w.Cartesian3,yn=[0,0,0],br=[0,0,0],ap=new w.Cartesian2,lp=new w.Cartesian3;function up(t,n,e,i,o,r){o.constraintMode="none",vs([0,0,0],o.startDragPos),r=r||{},oi(c.getDomEventCurrentTargetPos(t),ap);const s=e.position;if(!Ye(s,lp))return;const a=Hi(n,lp,i);if(a===void 0||!_h(n,lp,ap,Xv)||!Oe(Xv,yn))return;const l=qv(yn[2])*c.geoDistance(s,yn);if(!r.z&&l<a&&Math.abs(s[2]-yn[2])<e.dimensions[0]&&yn[2]>s[2])return o.constraintMode="z",vs(yn,o.startDragPos),!0;if(!ys(n,ap,s[2],Zv)||!go(Zv,yn))return;const u=qv(s[2])*c.geoDistance(s,yn),A=e.dimensions[0];if(!(u>1.05*A)){if(!r.zAxis&&u>.95*A&&u<=1.05*A){o.constraintMode="zAxis",vs(yn,o.startDragPos);return}{const[h,f]=yo(s,e.heading+90,yn,br);if(!r.x&&h>0&&f&&(br[2]=s[2],c.geoDistance(br,yn)<a)){o.constraintMode="x",vs(br,o.startDragPos);return}}{const[h,f]=yo(s,e.heading,yn,br);if(!r.y&&h>0&&f&&(br[2]=s[2],c.geoDistance(br,yn)<a)){o.constraintMode="y",vs(br,o.startDragPos);return}}r.xy||(o.constraintMode="xy",vs(yn,o.startDragPos))}}async function $v(t,n,e,i){var a;const o=(a=t.viewer)==null?void 0:a.scene;if(!o)throw new Error("!scene");const r=c.getDomEventCurrentTargetPos(n),s=oi(r);if(e===void 0){const l=t.quickPickPosition(r);return l?await l:void 0}else{const l=ys(o,s,e);return l?go(l):void 0}}let cp,hp;function Yv(t,n,e,i,o){o=o||new w.Cartesian3,cp=cp||new w.Ray,hp=hp||new w.Plane(w.Cartesian3.UNIT_X,0);const r=t.camera.getPickRay(i,cp),s=w.Plane.fromPointNormal(n,e,hp);return o=w.IntersectionTests.rayPlane(r,s,o),o}function Jv(t){const n=w.Material.fromType(t.type);return Ap(n,t),n}function vn(t){return t&&c.ESSceneObject.context.getStrFromEnv(t)||w.Material.DefaultImageId}function l2(t){return{x:t[0],y:t[1]}}function Ap(t,n){n.type==="Color"?t.uniforms.color=Be(n.color??[1,1,1,1]):n.type==="PolylineArrow"?t.uniforms.color=Be(n.color??[1,1,1,1]):n.type==="PolylineDash"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.gapColor=Be(n.gapColor??[0,0,0,0]),t.uniforms.dashLength=n.dashLength??16,t.uniforms.dashPattern=n.dashPattern??255):n.type==="PolylineGlow"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.glowPower=n.glowPower??.25,t.uniforms.taperPower=n.taperPower??1):n.type==="PolylineOutline"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.outlineColor=Be(n.outlineColor??[1,0,0,1]),t.uniforms.outlineWidth=n.outlineWidth??1):n.type==="Image"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.color=Be(n.color??[1,1,1,1])):n.type==="DiffuseMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channels=n.channels??"rgb"):n.type==="AlphaMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channel=n.channel??"a"):n.type==="SpecularMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channel=n.channel??"r"):n.type==="EmissionMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channels=n.channels??"rgb"):n.type==="BumpMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channel=n.channel??"r",t.uniforms.strength=n.strength??.8):n.type==="NormalMap"?(t.uniforms.image=vn(n.image),t.uniforms.repeat=Ze(n.repeat??[1,1]),t.uniforms.channels=n.channels??"rgb",t.uniforms.strength=n.strength??.8):n.type==="Grid"?(t.uniforms.color=Be(n.color??[0,1,0,1]),t.uniforms.cellAlpha=n.cellAlpha??.1,t.uniforms.lineCount=Ze(n.lineCount??[8,8]),t.uniforms.lineThickness=Ze(n.lineThickness??[1,1]),t.uniforms.lineOffset=Ze(n.lineOffset??[0,0])):n.type==="Stripe"?(t.uniforms.evenColor=Be(n.evenColor??[1,1,1,.5]),t.uniforms.oddColor=Be(n.oddColor??[0,0,1,.5]),t.uniforms.horizontal=n.horizontal??!0,t.uniforms.offset=n.offset??0,t.uniforms.repeat=n.repeat??5):n.type==="Checkerboard"?(t.uniforms.lightColor=Be(n.lightColor??[1,1,1,.5]),t.uniforms.darkColor=Be(n.darkColor??[0,0,0,.5]),t.uniforms.repeat=Ze(n.repeat??[5,5])):n.type==="Dot"?(t.uniforms.lightColor=Be(n.lightColor??[1,1,0,.75]),t.uniforms.darkColor=Be(n.darkColor??[0,1,1,.75]),t.uniforms.repeat=Ze(n.repeat??[5,5])):n.type==="Water"?(t.uniforms.baseWaterColor=Be(n.baseWaterColor??[.2,.3,.6,1]),t.uniforms.blendColor=Be(n.blendColor??[0,1,.699,1]),t.uniforms.specularMap=vn(n.specularMap),t.uniforms.normalMap=vn(n.normalMap),t.uniforms.frequency=n.frequency??10,t.uniforms.animationSpeed=n.animationSpeed??.01,t.uniforms.amplitude=n.amplitude??1,t.uniforms.specularIntensity=n.specularIntensity??.5,t.uniforms.fadeFactor=n.fadeFactor??1):n.type==="RimLighting"?(t.uniforms.color=Be(n.color??[1,0,0,.7]),t.uniforms.rimColor=Be(n.rimColor??[1,1,1,.4]),t.uniforms.width=n.width??.3):n.type==="Fade"?(t.uniforms.fadeInColor=Be(n.fadeInColor??[1,0,0,1]),t.uniforms.fadeOutColor=Be(n.fadeOutColor??[0,0,0,0]),t.uniforms.maximumDistance=n.maximumDistance??.5,t.uniforms.repeat=n.repeat??!0,t.uniforms.fadeDirection=l2(n.fadeDirection??[!0,!0]),t.uniforms.time=Ze(n.time??[.5,.5])):n.type==="ElevationContour"?(t.uniforms.color=Be(n.color??[1,0,0,1]),t.uniforms.spacing=n.spacing??100,t.uniforms.width=n.width??1):n.type==="ElevationRamp"?(t.uniforms.image=vn(n.image),t.uniforms.minimumHeight=n.minimumHeight??0,t.uniforms.maximumHeight=n.maximumHeight??1e4):n.type==="AspectRamp"?t.uniforms.image=vn(n.image):n.type==="ElevationBand"?(t.uniforms.color=vn(n.colors),t.uniforms.heights=vn(n.heights)):n.type==="XbsjPolylineArrow"?(t.uniforms.color=Be(n.color??[1,1,1,1]),t.uniforms.image=vn(n.image),t.uniforms.repeat=n.repeat??60,t.uniforms.speed=n.speed??1,t.uniforms.lineLength=n.lineLength??1,t.uniforms.arrowColor=Be(n.arrowColor??[1,1,1,1])):console.warn(`未知材质类型,无法更新 ${n.type}`)}function ai(t,n){const e=c.react(void 0);let i="";const[o,r,s]=c.getReactFuncs(t),a=()=>{try{const l=o()??n;l?i!==l.type?(i=l.type,e.value=Jv(l)):e.value&&Ap(e.value,l):(i="",e.value=void 0)}catch{}};return a(),e.dispose(s.disposableOn(a)),e}function Gi(t,n=!1){const e=Yt(t.positions,n),i=t.holes&&t.holes.map(o=>Gi(o));return{positions:e,holes:i}}function fp(t,n){const e=Math.PI/180,i=1/e,o=new w.Cartographic(t[0]*e,t[1]*e,t[2]),r=new w.Cartographic(n[0]*e,n[1]*e,n[2]),s=new w.EllipsoidGeodesic(o,r).interpolateUsingFraction(.5,new w.Cartographic);if(s)return s.height=(o.height+r.height)*.5,[s.longitude*i,s.latitude*i,s.height]}const e0=new w.Cartesian4,u2=new w.Matrix4;function c2(){return{left:0,top:0,right:0,bottom:0,depth:0}}function t0(t,n){return t.left===n.left&&t.right===n.right&&t.bottom===n.bottom&&t.top===n.top&&t.depth===n.depth}function n0(t,n,e){if(t.scene.mode!==w.SceneMode.SCENE3D)return;const i=t.canvas.clientHeight,o=t.canvas.clientWidth,r=t.camera.viewMatrix,s=t.camera.frustum.projectionMatrix,a=w.Matrix4.multiply(s,r,u2),l=w.Matrix4.multiplyByVector(a,w.Cartesian4.fromElements(n.x,n.y,n.z,1,e0),e0);l.x/=l.w,l.y/=l.w,l.z/=l.w,l.w=1;const u=o*(l.x*.5+.5),A=i*(l.y*.5+.5),h=o-u,f=i-A,p=l.z;if(!(u<0||A<0||h<0||f<0||p<0||p>1))return e?(e.left=u,e.top=f,e.right=h,e.bottom=A,e.depth=p):e={left:u,top:f,right:h,bottom:A,depth:p},e}const vo={left:0,top:0,right:0,bottom:0,depth:0};class Ch extends c.Destroyable{constructor(e,i=!0,o){super();O(this,"_cartesian",new w.Cartesian3);O(this,"_winPos",{left:0,top:0,right:0,bottom:0,depth:0});O(this,"_winPosValid",!1);O(this,"_changedEvent",new c.Event);O(this,"_enabled",!0);this._viewer=e,o=o||this.disposeVar(new xh(this._viewer.scene)),this.dispose(o.changed.disposableOn(()=>this._updateWinPos())),this.dispose(()=>{this._changedEvent.empty||console.warn("WinPosFromCartesian需要销毁,但是changed事件仍有监听,代码未必有错,但是说明代码不严谨。")}),this.enabled=i}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,e&&this._updateWinPos())}_updateWinPos(){if(!this._enabled)return;let e=!1;const i=n0(this._viewer,this._cartesian,vo);!!i!==this._winPosValid&&(e=!0,this._winPosValid=!!i),this._winPosValid?t0(this._winPos,vo)||(e=!0,this._winPos.left=vo.left,this._winPos.top=vo.top,this._winPos.right=vo.right,this._winPos.bottom=vo.bottom,this._winPos.depth=vo.depth):(e=!0,this._winPos.left=Number.NaN,this._winPos.top=Number.NaN,this._winPos.right=Number.NaN,this._winPos.bottom=Number.NaN,this._winPos.depth=Number.NaN),e&&this._changedEvent.emit(this._winPosValid,this._winPos)}get cartesian(){return this._cartesian}set cartesian(e){w.Cartesian3.equals(this._cartesian,e)||(w.Cartesian3.clone(e,this._cartesian),this._updateWinPos())}get changed(){return this._changedEvent}get winPosValid(){return this._winPosValid}get winPos(){return this._winPos}}function i0(t){const n=w.Math.toRadians(t[0]),e=w.Math.toRadians(t[1]),i=w.Math.toRadians(t[2]),o=w.Matrix3.fromHeadingPitchRoll(new w.HeadingPitchRoll(n,e,i)),r=new w.Cartesian3;return w.Matrix3.multiplyByVector(o,w.Cartesian3.UNIT_X,r),[r.x,r.y,r.z]}const h2=w.Check,wo=w.defined,r0=w.Math.EPSILON10;function A2(t,n,e,i){if(h2.defined("equalsEpsilon",n),!wo(t))return;e=e??!1;const o=wo(i),r=t.length;if(r<2)return t;let s,a=t[0],l,u,A=0,h=-1;for(s=1;s<r;++s)l=t[s],n(a,l,r0)?(wo(u)||(u=t.slice(0,s),A=s-1,h=0),o&&i.push(s)):(wo(u)&&(u.push(l),A=s,o&&(h=i.length)),a=l);return e&&n(t[0],t[r-1],r0)&&(o&&(wo(u)?i.splice(h,0,A):i.push(r-1)),wo(u)?u.length-=1:u=t.slice(0,-1)),wo(u)?u:t}const Ne=w.Cartesian3,ws=w.Cartographic,bo=w.defined,o0=w.DeveloperError,s0=w.Ellipsoid,f2=w.EllipsoidGeodesic,a0=w.EllipsoidRhumbLine,p2=w.IntersectionTests,pp=w.Math,bs=w.Matrix4,xo=w.Plane,Dt={};Dt.numberOfPoints=function(t,n,e){const i=Ne.distance(t,n);return Math.ceil(i/e)},Dt.numberOfPointsRhumbLine=function(t,n,e){const i=Math.pow(t.longitude-n.longitude,2)+Math.pow(t.latitude-n.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(i/(e*e))))};const d2=new ws;Dt.extractHeights=function(t,n){const e=t.length,i=new Array(e);for(let o=0;o<e;o++){const r=t[o];i[o]=n.cartesianToCartographic(r,d2).height}return i};const g2=new bs,m2=new Ne,l0=new Ne,y2=new xo(Ne.UNIT_X,0),u0=new Ne,v2=new xo(Ne.UNIT_X,0),w2=new Ne,b2=new Ne,dp=[];function c0(t,n,e){const i=dp;i.length=t;let o;if(n===e){for(o=0;o<t;o++)i[o]=n;return i}const s=(e-n)/t;for(o=0;o<t;o++){const a=n+o*s;i[o]=a}return i}const Sh=new ws,Eh=new ws,xr=new Ne,gp=new Ne,x2=new Ne,mp=new f2;let tl=new a0;function _2(t,n,e,i,o,r,s,a){const l=i.scaleToGeodeticSurface(t,gp),u=i.scaleToGeodeticSurface(n,x2),A=Dt.numberOfPoints(t,n,e),h=i.cartesianToCartographic(l,Sh),f=i.cartesianToCartographic(u,Eh),p=c0(A,o,r);mp.setEndPoints(h,f);const d=mp.surfaceDistance/A;let g=a;h.height=o;let v=i.cartographicToCartesian(h,xr);Ne.pack(v,s,g),g+=3;for(let y=1;y<A;y++){const m=mp.interpolateUsingSurfaceDistance(y*d,Eh);m.height=p[y],v=i.cartographicToCartesian(m,xr),Ne.pack(v,s,g),g+=3}return g}function C2(t,n,e,i,o,r,s,a){const l=i.cartesianToCartographic(t,Sh),u=i.cartesianToCartographic(n,Eh),A=Dt.numberOfPointsRhumbLine(l,u,e);l.height=0,u.height=0;const h=c0(A,o,r);tl.ellipsoid.equals(i)||(tl=new a0(void 0,void 0,i)),tl.setEndPoints(l,u);const f=tl.surfaceDistance/A;let p=a;l.height=o;let d=i.cartographicToCartesian(l,xr);Ne.pack(d,s,p),p+=3;for(let g=1;g<A;g++){const v=tl.interpolateUsingSurfaceDistance(g*f,Eh);v.height=h[g],d=i.cartographicToCartesian(v,xr),Ne.pack(d,s,p),p+=3}return p}Dt.wrapLongitude=function(t,n){const e=[],i=[];if(bo(t)&&t.length>0){n=n??bs.IDENTITY;const o=bs.inverseTransformation(n,g2),r=bs.multiplyByPoint(o,Ne.ZERO,m2),s=Ne.normalize(bs.multiplyByPointAsVector(o,Ne.UNIT_Y,l0),l0),a=xo.fromPointNormal(r,s,y2),l=Ne.normalize(bs.multiplyByPointAsVector(o,Ne.UNIT_X,u0),u0),u=xo.fromPointNormal(r,l,v2);let A=1;e.push(Ne.clone(t[0]));let h=e[0];const f=t.length;for(let p=1;p<f;++p){const d=t[p];if(xo.getPointDistance(u,h)<0||xo.getPointDistance(u,d)<0){const g=p2.lineSegmentPlane(h,d,a,w2);if(bo(g)){const v=Ne.multiplyByScalar(s,5e-9,b2);xo.getPointDistance(a,h)<0&&Ne.negate(v,v),e.push(Ne.add(g,v,new Ne)),i.push(A+1),Ne.negate(v,v),e.push(Ne.add(g,v,new Ne)),A=1}}e.push(Ne.clone(t[p])),A++,h=d}i.push(A)}return{positions:e,lengths:i}},Dt.generateArc=function(t){bo(t)||(t={});const n=t.positions;if(!bo(n))throw new o0("options.positions is required.");const e=n.length,i=t.ellipsoid??s0.WGS84;let o=t.height??0;const r=Array.isArray(o);if(e<1)return[];if(e===1){const g=i.scaleToGeodeticSurface(n[0],gp);if(o=r?o[0]:o,o!==0){const v=i.geodeticSurfaceNormal(g,xr);Ne.multiplyByScalar(v,o,v),Ne.add(g,v,g)}return[g.x,g.y,g.z]}let s=t.minDistance;if(!bo(s)){const g=t.granularity??pp.RADIANS_PER_DEGREE;s=pp.chordLength(g,i.maximumRadius)}let a=0,l;for(l=0;l<e-1;l++)a+=Dt.numberOfPoints(n[l],n[l+1],s);const u=(a+1)*3,A=new Array(u);let h=0;for(l=0;l<e-1;l++){const g=n[l],v=n[l+1],y=r?o[l]:o,m=r?o[l+1]:o;h=_2(g,v,s,i,y,m,A,h)}dp.length=0;const f=n[e-1],p=i.cartesianToCartographic(f,Sh);p.height=r?o[e-1]:o;const d=i.cartographicToCartesian(p,xr);return Ne.pack(d,A,u-3),A};const h0=new ws,S2=new ws;Dt.generateRhumbArc=function(t){bo(t)||(t={});const n=t.positions;if(!bo(n))throw new o0("options.positions is required.");const e=n.length,i=t.ellipsoid??s0.WGS84;let o=t.height??0;const r=Array.isArray(o);if(e<1)return[];if(e===1){const y=i.scaleToGeodeticSurface(n[0],gp);if(o=r?o[0]:o,o!==0){const m=i.geodeticSurfaceNormal(y,xr);Ne.multiplyByScalar(m,o,m),Ne.add(y,m,y)}return[y.x,y.y,y.z]}const s=t.granularity??pp.RADIANS_PER_DEGREE;let a=0,l,u=i.cartesianToCartographic(n[0],h0),A;for(l=0;l<e-1;l++)A=i.cartesianToCartographic(n[l+1],S2),a+=Dt.numberOfPointsRhumbLine(u,A,s),u=ws.clone(A,h0);const h=(a+1)*3,f=new Array(h);let p=0;for(l=0;l<e-1;l++){const y=n[l],m=n[l+1],_=r?o[l]:o,x=r?o[l+1]:o;p=C2(y,m,s,i,_,x,f,p)}dp.length=0;const d=n[e-1],g=i.cartesianToCartographic(d,Sh);g.height=r?o[e-1]:o;const v=i.cartographicToCartesian(g,xr);return Ne.pack(v,f,h-3),f},Dt.generateCartesianArc=function(t){const n=Dt.generateArc(t),e=n.length/3,i=new Array(e);for(let o=0;o<e;o++)i[o]=Ne.unpack(n,o*3);return i},Dt.generateCartesianRhumbArc=function(t){const n=Dt.generateRhumbArc(t),e=n.length/3,i=new Array(e);for(let o=0;o<e;o++)i[o]=Ne.unpack(n,o*3);return i};const Ph=w.ArcType,E2=w.Cartesian3,P2=w.Math;function A0(t){const n=t.arcType,e=t.granularity,i=t.ellipsoid,o=[];let r=A2(t.positions,E2.equalsEpsilon,!1,o);if(!(r.length<2)){if(n===Ph.GEODESIC||n===Ph.RHUMB){let a;n===Ph.GEODESIC?(a=P2.chordLength(e,i.maximumRadius),Dt.numberOfPoints):(a=e,Dt.numberOfPointsRhumbLine);const l=Dt.extractHeights(r,i);n===Ph.GEODESIC?r=Dt.generateCartesianArc({positions:r,minDistance:a,ellipsoid:i,height:l}):r=Dt.generateCartesianRhumbArc({positions:r,granularity:a,ellipsoid:i,height:l})}return r}}function yp(t,n="GEODESIC",e){const o=t.map(c.lbhToXyz).map(h=>w.Cartesian3.fromArray(h));let r;if(e>0&&n!=="NONE"){if(r=A0({arcType:w.ArcType[n??"GEODESIC"],granularity:e,ellipsoid:w.Ellipsoid.WGS84,positions:o}),!r)return}else r=o;let s=0;const a=[0],l=r.length;for(let h=1;h<l;++h)s+=w.Cartesian3.distance(r[h-1],r[h]),a.push(s);const u=r.map(h=>c.xyzToLbh([h.x,h.y,h.z]));return{timePosRots:a.map((h,f)=>[a[f],u[f],void 0]),distances:a}}function f0(t,n){n=n??new Array(16);for(let e=0;e<16;++e)n[e]=t[e];return n}function vp(t,n){const e=w.Matrix4.clone(w.Matrix4.IDENTITY),{position:i,rotation:o,scale:r,initialRotationMode:s="YForwardZUp"}=t;if(i){const[a,l,u]=i;w.Transforms.eastNorthUpToFixedFrame(w.Cartesian3.fromDegrees(a,l,u),void 0,e)}if(o){const a=new w.Quaternion;s==="YForwardZUp"?bh(o,a):s==="XForwardZUp"&&Gv(o,a);const l=w.Matrix3.fromQuaternion(a);w.Matrix4.multiply(e,w.Matrix4.fromRotationTranslation(l),e)}return r&&w.Matrix4.multiplyByScale(e,oi(r),e),f0(e,n)}const B2=new w.Matrix4;function p0(t,n){const e=w.Matrix4.fromArray(t,0,B2);return w.Matrix4.inverse(e,e),f0(e,n)}const T2=new w.Matrix4,I2=new w.Cartesian3;function d0(t,n,e){const[i,o,r]=n,s=w.Cartesian3.fromDegrees(i,o,r,void 0,I2),a=w.Matrix4.fromArray(t,0,T2),l=w.Matrix4.multiplyByPoint(a,s,s),{x:u,y:A,z:h}=l;return e=e||[0,0,0],e[0]=u,e[1]=A,e[2]=h,e}const F2=new w.Matrix4,M2=new w.Cartesian3,D2=new w.Cartographic;function g0(t,n,e){const[i,o,r]=n,s=w.Cartesian3.fromElements(i,o,r,M2),a=w.Matrix4.fromArray(t,0,F2),l=w.Matrix4.multiplyByPoint(a,s,s),u=w.Cartographic.fromCartesian(l,void 0,D2);return e=e||[0,0,0],e[0]=w.Math.toDegrees(u.longitude),e[1]=w.Math.toDegrees(u.latitude),e[2]=u.height,e}function wn(t,n){const{originPosition:e,originRotation:i,originScale:o,initialRotationMode:r}=t,s=vp({position:e,rotation:i,scale:o,initialRotationMode:r}),a=p0(s);return[n.map(u=>d0(a,u)),s,a]}function _r(t,n){const{originPosition:e,originRotation:i,originScale:o,initialRotationMode:r}=t,s=vp({position:e,rotation:i,scale:o,initialRotationMode:r});return[n.map(l=>g0(s,l)),s]}function m0(t){if(t.length<2)return console.error("getIncludedAngleFromPositions需要传入的点不能少于三个!!!!!"),!1;let n=[];for(let e=0;e<t.length-2;e++){const i=$e.Cartesian3.fromDegrees(...t[e]),o=$e.Cartesian3.fromDegrees(...t[e+1]),r=$e.Cartesian3.fromDegrees(...t[e+2]),s=$e.Cartesian3.angleBetween($e.Cartesian3.subtract(i,o,new $e.Cartesian3),$e.Cartesian3.subtract(r,o,new $e.Cartesian3));n.push(isNaN(s)?0:$e.Math.toDegrees(s))}return n}function wp(t,n){let e=n||[];return t.positions&&(e[e.length]??(e[e.length]=[]),e[e.length-1].push(...t.positions.map(i=>Oe(i)))),t.holes&&t.holes.forEach(i=>{e=wp(i,e)}),e}function Hn(t){return typeof t=="string"?c.ESSceneObject.context.getStrFromEnv(t):new w.Resource({url:c.ESSceneObject.context.getStrFromEnv(t.url),headers:t.headers,queryParameters:t.queryParameters,templateValues:t.templateValues,proxy:t.proxy,retryCallback:t.retryCallback,retryAttempts:t.retryAttempts,request:t.request,parseUrl:t.parseUrl})}class bp extends c.Destroyable{constructor(n,e,i,o){if(super(),!n.viewer)return;const{scene:r}=n.viewer,[s,a,l]=c.getReactFuncs(e),[u,A,h]=c.getReactFuncs(i),f=new w.Cartesian3,p=()=>{let d=s();d&&(d=[...d],n.editingHeightOffset&&(d[2]-=n.editingHeightOffset),w.Cartesian3.fromDegrees(...d,void 0,f))};p(),this.dispose(l.disposableOn(p)),this.dispose(r.preUpdate.addEventListener(()=>{if(w.Cartesian3.ZERO.equals(f))return;const d=Hi(r,f,o);d!==void 0?A([d,d,d]):console.warn(`CzmGeoCoordinatesEditor warn: scale: ${d??"undefined"}`)}))}}function R2(t,n){const e=w.Cartesian3.fromArray(t,0),i=w.Cartesian3.fromArray(t,3),o=w.Cartesian3.fromArray(t,6),r=w.Cartesian3.fromArray(t,9),s=[],a=[[1,1,1],[1,1,-1],[1,-1,1],[1,-1,-1],[-1,1,1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]];for(let l of a){let u=new w.Cartesian3;w.Cartesian3.multiplyByScalar(i,l[0],u);let A=new w.Cartesian3;w.Cartesian3.multiplyByScalar(o,l[1],A),w.Cartesian3.add(u,A,u),w.Cartesian3.multiplyByScalar(r,l[2],A),w.Cartesian3.add(u,A,u),w.Cartesian3.add(e,u,u),u=w.Matrix4.multiplyByPoint(n,u,new w.Cartesian3),s.push(u)}return s}function U2(t,n){const e=w.Matrix4.multiplyByPoint(n,w.Cartesian3.fromArray(t,0),new w.Cartesian3),i=t[3],o=[],r=[[i,0,0],[-i,0,0],[0,i,0],[0,-i,0],[0,0,i],[0,0,-i]];for(let s of r){let a=new w.Cartesian3(e.x+s[0],e.y+s[1],e.z+s[2]);a=w.Matrix4.multiplyByPoint(n,a,new w.Cartesian3),o.push(a)}return o}function O2(t){const[n,e,i,o,r,s]=t,a=[],l=[n,i],u=[e,o],A=[r,s];for(let h of l)for(let f of u)for(let p of A)a.push(w.Cartesian3.fromRadians(h,f,p));return a}function y0(t,n,e){let i=n;t.transform&&(i=w.Matrix4.multiplyTransformation(n,w.Matrix4.fromArray(t.transform),new w.Matrix4));const o=t.boundingVolume;if(o.box&&e.push(...R2(o.box,i)),o.sphere&&e.push(...U2(o.sphere,i)),o.region&&e.push(...O2(o.region)),t.children)for(let r of t.children)y0(r,i,e)}function L2(t){if(!t||!t.root)return console.warn("无法生成包围盒,请检查包围盒是否正确"),[];const n=[],e=t.root.transform?w.Matrix4.fromArray(t.root.transform):w.Matrix4.IDENTITY;if(y0(t.root,e,n),n.length===0)return console.warn("无法生成包围盒,请检查包围盒是否正确"),[];let i=[1/0,1/0,1/0],o=[-1/0,-1/0,-1/0];for(let r of n){const s=w.Cartographic.fromCartesian(r);i[0]=Math.min(i[0],s.longitude),i[1]=Math.min(i[1],s.latitude),i[2]=Math.min(i[2],s.height),o[0]=Math.max(o[0],s.longitude),o[1]=Math.max(o[1],s.latitude),o[2]=Math.max(o[2],s.height)}return[i[0],i[1],o[0],o[1],i[2],o[2]]}const v0=c.createProcessingFromAsyncFunc(async(t,n)=>{let e={state:"success",tilesUrl:{asset:{version:"1.1"},geometricError:0,refine:"REPLACE",root:{boundingVolume:{region:[]},geometricError:0,refine:"REPLACE",children:[]}}},i={},o=[];if(await c.step(t,async A=>new Promise(async(h,f)=>{for(let p=0;p<n.length;p++){const d=n[p];await fetch(d).then(g=>g.json()).then(g=>{g&&!Reflect.has(g,"success")?i[d]=g:o.push({index:p,url:d,message:g.message}),p==n.length-1&&h()}).catch(g=>{o.push({index:p,url:d,message:g}),p==n.length-1&&h()})}})),o.length>0&&(e.state="error",e.info=o,o.length==n.length))return e.tilesUrl=void 0,e;const r=[],s=[],a=[],l=[];for(const A in i){const h=i[A];s.push(h.geometricError??h.root.geometricError??0),a.push(h.asset);const f=L2(h);r.push(f),l.push({content:{uri:A},boundingVolume:{region:f},geometricError:h.geometricError,refine:"REPLACE"})}return a.some((A,h)=>{(A.gltfUpAxis??"Y").toUpperCase(),(a[(h+1)%a.length].gltfUpAxis??"Y").toUpperCase()})&&(e.state="error",e.info=[{index:0,url:"",message:"gltfUpAxis不一致"}]),e.tilesUrl&&(Object.assign(e.tilesUrl.asset,...a),e.tilesUrl.geometricError=e.tilesUrl.root.geometricError=Math.max(...s),e.tilesUrl.root.boundingVolume.region=[Math.min(...r.map(A=>A[0])),Math.min(...r.map(A=>A[1])),Math.max(...r.map(A=>A[2])),Math.max(...r.map(A=>A[3])),Math.min(...r.map(A=>A[4])),Math.max(...r.map(A=>A[5]))],e.tilesUrl.root.children=l),e});function z2(t){return new Promise((n,e)=>{v0.restart(void 0,t),v0.completeEvent.don(i=>{n(i)})})}class xp extends c.Destroyable{constructor(e){super();O(this,"_center",this.disposeVar(c.reactArrayWithUndefined(void 0)));O(this,"_radius",this.disposeVar(c.react(0)));const[i,o,r]=c.getReactFuncs(e);{const s=()=>{const a=i();if(a){const{center:l,minPos:u,maxPos:A}=c.getMinMaxCorner(a);this._center.value=l,this._radius.value=c.geoDistance(u,A)/2}else this._center.value=void 0};s(),this.dispose(r.disposableOn(s))}}get centerReact(){return this._center}get center(){return this._center.value}get centerChanged(){return this._center.changed}get radiusReact(){return this._radius}get radius(){return this._radius.value}get radiusChanged(){return this._radius.changed}}function w0(t){return new w.Material({fabric:{type:"XbsjWater",uniforms:{baseWaterImage:"",repeatX:1,repeatY:1,flowSpeed:0,baseWaterColor:new w.Color(.2,.3,.6,1),blendColor:new w.Color(0,1,.699,1),specularMap:w.Material.DefaultImageId,normalMap:w.Material.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1,...t},source:`// Thanks for the contribution Jonas
2
2
  // http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog
3
3
 
4
4
  uniform sampler2D specularMap;
@@ -4143,10 +4143,10 @@ async function initCesiumViewer(container, czmViewer) {
4143
4143
  `;function d9(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
4144
4144
  github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
4145
4145
  gitee地址:${t}
4146
- `;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const Wt=class Wt extends c.ESViewer{constructor(e){super(e);O(this,"_disabledInputStack",this.disposeVar(c.react(0)));O(this,"_viewer",this.dv(c.react(void 0)));O(this,"_viewerInstance");O(this,"_viewerLegend");O(this,"pickCustomAttachedInfo");O(this,"_fps",this.dv(c.react(0)));O(this,"_notSupportEditingCount",this.disposeVar(c.react(0)));O(this,"_editingSystem",Kf);O(this,"_moveObjectsProcess",this.ad(zS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new MV(this)),this.ad(new DV(this)),this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new LV(this)})),this._viewerLegend=this.dv(new u9(this)),this._viewerInstance=this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new kv(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 c.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new OH(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&&Mt(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=w.Cartographic.fromDegrees(e[0],e[1],e[2],Wt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ms(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:i}=this.viewer;if(!i||!e)return;const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,i.positionWC,new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=ms(i),f=h[0]-A,p=h[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:1,hDelta:f,pDelta:p}}flyIn(e,i,o,r="default"){var l;const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&ol(a,s,r)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:A}=e,h={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:A},f=(p=this.viewer)==null?void 0:p.camera;return f&&ol(f,h,o)}flyToBoundingSphere(e,i,o=1){var h;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=c.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(h=this.viewer)==null?void 0:h.camera;return A&&ol(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ms(e)}}transformFlyParam(e,i){if("position"in i){const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,Ye(i.position),new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=i.rotation[0]-A,f=i.rotation[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:i.flyDuration??1,hDelta:h,pDelta:f}}else{const o=Ye(e);let r={heading:w.Math.toRadians(i.heading),pitch:w.Math.toRadians(i.pitch),roll:0};const s=new w.HeadingPitchRoll;if(i.distance){s.heading=r.heading,s.pitch=r.pitch,s.roll=0,s.heading-=w.Math.PI_OVER_TWO;const l=w.Transforms.headingPitchRollToFixedFrame(o,s,void 0,void 0),u=w.Matrix4.multiplyByPointAsVector(l,w.Cartesian3.UNIT_X,new w.Cartesian3);w.Cartesian3.multiplyByScalar(u,i.distance,u),w.Cartesian3.subtract(o,u,o)}i.hDelta&&(r.heading+=w.Math.toRadians(i.hDelta)),i.pDelta&&(r.pitch+=w.Math.toRadians(i.pDelta));const a=Oe(o);return a?{position:a,rotation:[w.Math.toDegrees(r.heading),w.Math.toDegrees(r.pitch),w.Math.toDegrees(r.roll)],flyDuration:i.flyDuration??1}:void 0}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.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,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,s,a){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,s),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:w.VERSION},e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=w.Cartographic.fromDegrees(e,i,void 0,Wt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await I0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(Ye(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}_${c.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=c.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&i.push(a)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=Wt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Wt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Wt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return wn(e,i)}localPositionsToPositions(e,i){return _r(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=e instanceof w.Cartesian3?e:Ye(e),o=new w.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=Wt.defaults;return{...e,more:[...e.more,new c.GroupProperty([],"通用","通用"),new c.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",p9,f9,!0),new c.FunctionProperty([],()=>Wt.getCesiumIonToken(),[],"获取官方token"),new c.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new c.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new c.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new c.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new c.GroupProperty([],"Viewer","Viewer"),new c.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new c.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new c.BooleanProperty([this,"shadows"]),new c.GroupProperty([],"比例尺","比例尺(Legend)"),new c.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new c.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new c.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new c.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new c.GroupProperty([],"场景","场景(Scene)"),new c.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new c.GroupProperty([],"Globe","Globe"),new c.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new c.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new c.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new c.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new c.BooleanProperty([this,"sceneGlobeShowSkirts"]),new c.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new c.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new c.JsonProperty([this,"sceneGlobeClippingPlanes"]),new c.StringProperty([this,"sceneGlobeClippingPlanesId"]),new c.JsonProperty([this,"sceneGlobeClippingPolygons"]),new c.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new c.GroupProperty([],"underground","underground"),new c.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new c.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new c.GroupProperty([],"Translucency","Translucency"),new c.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new c.GroupProperty([],"Sun","Sun"),new c.BooleanProperty([this,"sun"],"sun",i.sun,!0),new c.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new c.GroupProperty([],"Moon","Moon"),new c.BooleanProperty([this,"moon"],"moon",i.moon,!0),new c.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new c.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new c.GroupProperty([],"SkyBox","SkyBox"),new c.BooleanProperty([this,"sceneSkyBoxShow"]),new c.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new c.GroupProperty([],"Background","Background"),new c.BooleanProperty([this,"xbsjUseBackground"]),new c.StringProperty([this,"xbsjBackgroundImageUri"]),new c.ColorProperty([this,"xbsjBackgroundColor"]),new c.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new c.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new c.GroupProperty([],"Fog","Fog"),new c.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new c.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new c.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new c.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new c.GroupProperty([],"Sscc","Sscc"),new c.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new c.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new c.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new c.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new c.GroupProperty([],"后处理","后处理"),new c.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new c.GroupProperty([],"环境遮蔽","环境遮蔽"),new c.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new c.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new c.GroupProperty([],"Bloom","Bloom"),new c.BooleanProperty([this,"scenePpsBloomEnabled"]),new c.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new c.NumberProperty([this,"scenePpsBloomContrast"]),new c.NumberProperty([this,"scenePpsBloomBrightness"]),new c.NumberProperty([this,"scenePpsBloomDelta"]),new c.NumberProperty([this,"scenePpsBloomSigma"]),new c.NumberProperty([this,"scenePpsBloomStepSize"]),new c.GroupProperty([],"调试","调试"),new c.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new c.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new c.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new c.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new c.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new c.GroupProperty([],"Inspector","Inspector"),new c.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new c.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new c.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};O(Wt,"type",Wt.register("ESCesiumViewer",Wt)),O(Wt,"getCesiumIonToken",d9),O(Wt,"currentDefaultAccessToken",w.Ion.defaultAccessToken),O(Wt,"latestDefaultAccessToken"),O(Wt,"ObjectsToExcludeWrapper",OV),O(Wt,"defaults",{...c.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:w.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:w.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}),O(Wt,"getHeightsScartchCarto",new w.Cartographic);let at=Wt;(t=>{t.createDefaultProps=()=>({...c.ESViewer.createDefaultProps(),...A9()})})(at||(at={})),c.extendClassProps(at.prototype,at.createDefaultProps),ne.copyright=void 0;try{const t="earthsdk3-cesium",n="3.7.0-beta.15",e="2025-12-05T02:47:15.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="d8c29113375db416d6f35bc7eede3908a5b4a945",a=((Date.now()-1764902835e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
4146
+ `;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const Wt=class Wt extends c.ESViewer{constructor(e){super(e);O(this,"_disabledInputStack",this.disposeVar(c.react(0)));O(this,"_viewer",this.dv(c.react(void 0)));O(this,"_viewerInstance");O(this,"_viewerLegend");O(this,"pickCustomAttachedInfo");O(this,"_fps",this.dv(c.react(0)));O(this,"_notSupportEditingCount",this.disposeVar(c.react(0)));O(this,"_editingSystem",Kf);O(this,"_moveObjectsProcess",this.ad(zS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new MV(this)),this.ad(new DV(this)),this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new LV(this)})),this._viewerLegend=this.dv(new u9(this)),this._viewerInstance=this.dv(new c.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new kv(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 c.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new OH(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&&Mt(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=w.Cartographic.fromDegrees(e[0],e[1],e[2],Wt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ms(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:i}=this.viewer;if(!i||!e)return;const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,i.positionWC,new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=ms(i),f=h[0]-A,p=h[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:1,hDelta:f,pDelta:p}}flyIn(e,i,o,r="default"){var l;const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&ol(a,s,r)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:A}=e,h={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:A},f=(p=this.viewer)==null?void 0:p.camera;return f&&ol(f,h,o)}flyToBoundingSphere(e,i,o=1){var h;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=c.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},A=(h=this.viewer)==null?void 0:h.camera;return A&&ol(A,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Mn(e),rotation:ms(e)}}transformFlyParam(e,i){if("position"in i){const o=w.Cartesian3.fromDegrees(...e),r=w.Transforms.eastNorthUpToFixedFrame(o),s=w.Matrix4.inverse(r,new w.Matrix4),a=w.Matrix4.multiplyByPoint(s,Ye(i.position),new w.Cartesian3),l=w.Cartesian3.magnitude(a);let u=-Math.asin(a.z/l);u=w.Math.toDegrees(u);let A=w.Math.PI_OVER_TWO-Math.atan(a.y/a.x);a.x>0&&(A+=a.y<0?-w.Math.PI:w.Math.PI),A=w.Math.toDegrees(A);const h=i.rotation[0]-A,f=i.rotation[1]-u;return{distance:l,heading:A,pitch:u,flyDuration:i.flyDuration??1,hDelta:h,pDelta:f}}else{const o=Ye(e);let r={heading:w.Math.toRadians(i.heading),pitch:w.Math.toRadians(i.pitch),roll:0};const s=new w.HeadingPitchRoll;if(i.distance){s.heading=r.heading,s.pitch=r.pitch,s.roll=0,s.heading-=w.Math.PI_OVER_TWO;const l=w.Transforms.headingPitchRollToFixedFrame(o,s,void 0,void 0),u=w.Matrix4.multiplyByPointAsVector(l,w.Cartesian3.UNIT_X,new w.Cartesian3);w.Cartesian3.multiplyByScalar(u,i.distance,u),w.Cartesian3.subtract(o,u,o)}i.hDelta&&(r.heading+=w.Math.toRadians(i.hDelta)),i.pDelta&&(r.pitch+=w.Math.toRadians(i.pDelta));const a=Oe(o);return a?{position:a,rotation:[w.Math.toDegrees(r.heading),w.Math.toDegrees(r.pitch),w.Math.toDegrees(r.roll)],flyDuration:i.flyDuration??1}:void 0}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.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,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,s,a){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,s),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:w.VERSION},e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=w.Cartographic.fromDegrees(e,i,void 0,Wt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await I0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(Ye(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}_${c.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=c.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&i.push(a)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=Wt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!Wt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=Wt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return wn(e,i)}localPositionsToPositions(e,i){return _r(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=e instanceof w.Cartesian3?e:Ye(e),o=new w.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=Wt.defaults;return{...e,more:[...e.more,new c.GroupProperty([],"通用","通用"),new c.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",p9,f9,!0),new c.FunctionProperty([],()=>Wt.getCesiumIonToken(),[],"获取官方token"),new c.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new c.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new c.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new c.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new c.GroupProperty([],"Viewer","Viewer"),new c.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new c.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new c.BooleanProperty([this,"shadows"]),new c.GroupProperty([],"比例尺","比例尺(Legend)"),new c.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new c.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new c.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new c.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new c.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new c.GroupProperty([],"场景","场景(Scene)"),new c.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new c.GroupProperty([],"Globe","Globe"),new c.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new c.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new c.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new c.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new c.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new c.BooleanProperty([this,"sceneGlobeShowSkirts"]),new c.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new c.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new c.JsonProperty([this,"sceneGlobeClippingPlanes"]),new c.StringProperty([this,"sceneGlobeClippingPlanesId"]),new c.JsonProperty([this,"sceneGlobeClippingPolygons"]),new c.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new c.GroupProperty([],"underground","underground"),new c.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new c.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new c.GroupProperty([],"Translucency","Translucency"),new c.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new c.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new c.GroupProperty([],"Sun","Sun"),new c.BooleanProperty([this,"sun"],"sun",i.sun,!0),new c.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new c.GroupProperty([],"Moon","Moon"),new c.BooleanProperty([this,"moon"],"moon",i.moon,!0),new c.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new c.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new c.GroupProperty([],"SkyBox","SkyBox"),new c.BooleanProperty([this,"sceneSkyBoxShow"]),new c.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new c.GroupProperty([],"Background","Background"),new c.BooleanProperty([this,"xbsjUseBackground"]),new c.StringProperty([this,"xbsjBackgroundImageUri"]),new c.ColorProperty([this,"xbsjBackgroundColor"]),new c.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new c.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new c.GroupProperty([],"Fog","Fog"),new c.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new c.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new c.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new c.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new c.GroupProperty([],"Sscc","Sscc"),new c.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new c.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new c.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new c.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new c.GroupProperty([],"后处理","后处理"),new c.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new c.GroupProperty([],"环境遮蔽","环境遮蔽"),new c.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new c.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new c.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new c.GroupProperty([],"Bloom","Bloom"),new c.BooleanProperty([this,"scenePpsBloomEnabled"]),new c.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new c.NumberProperty([this,"scenePpsBloomContrast"]),new c.NumberProperty([this,"scenePpsBloomBrightness"]),new c.NumberProperty([this,"scenePpsBloomDelta"]),new c.NumberProperty([this,"scenePpsBloomSigma"]),new c.NumberProperty([this,"scenePpsBloomStepSize"]),new c.GroupProperty([],"调试","调试"),new c.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new c.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new c.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new c.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new c.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new c.GroupProperty([],"Inspector","Inspector"),new c.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new c.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new c.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};O(Wt,"type",Wt.register("ESCesiumViewer",Wt)),O(Wt,"getCesiumIonToken",d9),O(Wt,"currentDefaultAccessToken",w.Ion.defaultAccessToken),O(Wt,"latestDefaultAccessToken"),O(Wt,"ObjectsToExcludeWrapper",OV),O(Wt,"defaults",{...c.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:w.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:w.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:w.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}),O(Wt,"getHeightsScartchCarto",new w.Cartographic);let at=Wt;(t=>{t.createDefaultProps=()=>({...c.ESViewer.createDefaultProps(),...A9()})})(at||(at={})),c.extendClassProps(at.prototype,at.createDefaultProps),ne.copyright=void 0;try{const t="earthsdk3-cesium",n="3.7.0-beta.16",e="2025-12-05T02:47:15.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="d8c29113375db416d6f35bc7eede3908a5b4a945",a=((Date.now()-1764902835e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
4147
4147
  %c${o?o+`
4148
4148
  `:""}当前网站正在使用${t},此软件版权归${i}所有
4149
- `;ne.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","d8c29113375db416d6f35bc7eede3908a5b4a945")},get info(){return l},get date(){return"2025-12-05T02:47:15.000Z"},get author(){return"suplyang"},get version(){return"3.7.0-beta.15"},get name(){return"earthsdk3-cesium"},get commitId(){return"d8c29113375db416d6f35bc7eede3908a5b4a945"},print(){console.info(this.info,`
4149
+ `;ne.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","d8c29113375db416d6f35bc7eede3908a5b4a945")},get info(){return l},get date(){return"2025-12-05T02:47:15.000Z"},get author(){return"suplyang"},get version(){return"3.7.0-beta.16"},get name(){return"earthsdk3-cesium"},get commitId(){return"d8c29113375db416d6f35bc7eede3908a5b4a945"},print(){console.info(this.info,`
4150
4150
  font-size: 18px;
4151
4151
  font-weight: 1000;
4152
4152
  line-height: 1;
@@ -1218,53 +1218,59 @@ const Ug = ze(async (t, i) => {
1218
1218
  }
1219
1219
  }
1220
1220
  }, s = {}, o = [];
1221
- if (await vi(t, async (l) => new Promise(async (c, d) => {
1222
- for (let u = 0; u < i.length; u++) {
1223
- const p = i[u];
1224
- await fetch(p).then((f) => f.json()).then((f) => {
1225
- f && !Reflect.has(f, "success") ? s[p] = f : o.push(
1221
+ if (await vi(t, async (d) => new Promise(async (u, p) => {
1222
+ for (let f = 0; f < i.length; f++) {
1223
+ const m = i[f];
1224
+ await fetch(m).then((v) => v.json()).then((v) => {
1225
+ v && !Reflect.has(v, "success") ? s[m] = v : o.push(
1226
1226
  {
1227
- index: u,
1228
- url: p,
1229
- message: f.message
1227
+ index: f,
1228
+ url: m,
1229
+ message: v.message
1230
1230
  }
1231
- ), u == i.length - 1 && c();
1232
- }).catch((f) => {
1231
+ ), f == i.length - 1 && u();
1232
+ }).catch((v) => {
1233
1233
  o.push(
1234
1234
  {
1235
- index: u,
1236
- url: p,
1237
- message: f
1235
+ index: f,
1236
+ url: m,
1237
+ message: v
1238
1238
  }
1239
- ), u == i.length - 1 && c();
1239
+ ), f == i.length - 1 && u();
1240
1240
  });
1241
1241
  }
1242
1242
  })), o.length > 0 && (e.state = "error", e.info = o, o.length == i.length))
1243
1243
  return e.tilesUrl = void 0, e;
1244
- const n = [], r = [], a = [];
1245
- for (const l in s) {
1246
- const c = s[l];
1247
- r.push(c.geometricError ?? c.root.geometricError ?? 0);
1248
- const d = Tb(c);
1249
- n.push(d), a.push({
1244
+ const n = [], r = [], a = [], l = [];
1245
+ for (const d in s) {
1246
+ const u = s[d];
1247
+ r.push(u.geometricError ?? u.root.geometricError ?? 0), a.push(u.asset);
1248
+ const p = Tb(u);
1249
+ n.push(p), l.push({
1250
1250
  content: {
1251
- uri: l
1251
+ uri: d
1252
1252
  },
1253
1253
  boundingVolume: {
1254
- region: d
1254
+ region: p
1255
1255
  },
1256
- geometricError: c.geometricError,
1256
+ geometricError: u.geometricError,
1257
1257
  refine: "REPLACE"
1258
1258
  });
1259
1259
  }
1260
- return e.tilesUrl && (e.tilesUrl.geometricError = e.tilesUrl.root.geometricError = Math.max(...r), e.tilesUrl.root.boundingVolume.region = [
1261
- Math.min(...n.map((l) => l[0])),
1262
- Math.min(...n.map((l) => l[1])),
1263
- Math.max(...n.map((l) => l[2])),
1264
- Math.max(...n.map((l) => l[3])),
1265
- Math.min(...n.map((l) => l[4])),
1266
- Math.max(...n.map((l) => l[5]))
1267
- ], e.tilesUrl.root.children = a), e;
1260
+ return a.some((d, u) => {
1261
+ (d.gltfUpAxis ?? "Y").toUpperCase(), (a[(u + 1) % a.length].gltfUpAxis ?? "Y").toUpperCase();
1262
+ }) && (e.state = "error", e.info = [{
1263
+ index: 0,
1264
+ url: "",
1265
+ message: "gltfUpAxis不一致"
1266
+ }]), e.tilesUrl && (Object.assign(e.tilesUrl.asset, ...a), e.tilesUrl.geometricError = e.tilesUrl.root.geometricError = Math.max(...r), e.tilesUrl.root.boundingVolume.region = [
1267
+ Math.min(...n.map((d) => d[0])),
1268
+ Math.min(...n.map((d) => d[1])),
1269
+ Math.max(...n.map((d) => d[2])),
1270
+ Math.max(...n.map((d) => d[3])),
1271
+ Math.min(...n.map((d) => d[4])),
1272
+ Math.max(...n.map((d) => d[5]))
1273
+ ], e.tilesUrl.root.children = l), e;
1268
1274
  });
1269
1275
  function IO(t) {
1270
1276
  return new Promise((i, e) => {
@@ -51419,7 +51425,7 @@ let qe = Pt;
51419
51425
  ae(qe.prototype, qe.createDefaultProps);
51420
51426
  let lp;
51421
51427
  try {
51422
- const t = "earthsdk3-cesium", i = "3.7.0-beta.15", e = "2025-12-05T02:47:15.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "d8c29113375db416d6f35bc7eede3908a5b4a945", a = ((Date.now() - 1764902835e3) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
51428
+ const t = "earthsdk3-cesium", i = "3.7.0-beta.16", e = "2025-12-05T02:47:15.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "d8c29113375db416d6f35bc7eede3908a5b4a945", a = ((Date.now() - 1764902835e3) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
51423
51429
  %c${o ? o + `
51424
51430
  ` : ""}当前网站正在使用${t},此软件版权归${s}所有
51425
51431
  `;
@@ -51449,7 +51455,7 @@ try {
51449
51455
  },
51450
51456
  // @ts-ignore
51451
51457
  get version() {
51452
- return "3.7.0-beta.15";
51458
+ return "3.7.0-beta.16";
51453
51459
  },
51454
51460
  // @ts-ignore
51455
51461
  get name() {