earthsdk3-cesium 3.5.0-beta.19 → 3.5.0-beta.20
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.
|
@@ -1250,7 +1250,7 @@ export type IndexJsonType = {
|
|
|
1250
1250
|
\`\`\`
|
|
1251
1251
|
${Ry}
|
|
1252
1252
|
\`\`\`
|
|
1253
|
-
`,He=class He extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_loadFuncReact",this.disposeVar(a.react(void 0)));v(this,"_dataSource",this.disposeVar(a.react(void 0)));v(this,"_data");v(this,"_defaultHeight",{});v(this,"_defaultBoundingSphere",new h.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let s=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{s()});{const r=this.dv(a.createProcessingFromAsyncFunc(async u=>{this.dataSource&&s(),this.url&&(typeof this.url=="object"?this._data=this.url:a.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(a.ESSceneObject.context.getStrFromEnv(this.url)).then(d=>d.json()).then(d=>{this._data=d}).catch(d=>{console.warn("ESGeoJson数据加载失败",d)}),this.dataSource=await h.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(d=>{var f,g;const p=[];for(const m of d.entities.values)if(h.Entity.prototype&&(m.ESSceneObjectID=n),this._isEntityShow(m,e),m.polygon&&p.push(...(f=m.polygon.hierarchy)==null?void 0:f.getValue(h.JulianDate.now()).positions),m.polyline&&p.push(...(g=m.polyline.positions)==null?void 0:g.getValue(h.JulianDate.now())),m.position){const y=m.position.getValue(h.JulianDate.now());y&&p.push(y)}this._defaultBoundingSphere=h.BoundingSphere.fromPoints(p)}))})),l=()=>{r.isRunning&&r.cancel(),r.restart()};l();const c=this.dv(a.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(c.don(l))}{const r=()=>{var c,u;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(d){console.error(d)}else{const d=this.dataSource.entities.values;for(let p=0;p<d.length;p++){const f=d[p];if(f.polygon){this._defaultHeight[f.id]||(this._defaultHeight[f.id]=(c=f.polygon.height)==null?void 0:c.getValue(h.JulianDate.now())),f.polygon.height=this.fillGround?void 0:new h.ConstantProperty(this._defaultHeight[f.id]),f.polygon.perPositionHeight=new h.ConstantProperty(!this.fillGround),f.polygon.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.polygon.show=new h.ConstantProperty(this.filled??He.defaults.filled),f.polygon.material=new h.ColorMaterialProperty(new h.Color(...this.fillColor??He.defaults.fillColor)),f.polygon.outline=new h.ConstantProperty(!1),f.polygon.classificationType=h.ClassificationType[this.classificationType.toUpperCase()],f.polyline=new h.PolylineGraphics;const g=JSON.parse(JSON.stringify((u=f.polygon.hierarchy)==null?void 0:u.getValue(h.JulianDate.now()).positions));h.Cartesian3.equals(g[0],g[g.length-1])||g.push(g[0]),f.polyline.positions=g,f.polyline.classificationType=h.ClassificationType[this.classificationType.toUpperCase()]}if(f.polyline&&(f.polyline.classificationType=h.ClassificationType[this.classificationType.toUpperCase()],f.polyline.show=new h.ConstantProperty(this.stroked??He.defaults.stroked),f.polyline.width=new h.ConstantProperty(this.strokeWidth??He.defaults.strokeWidth),f.polyline.material=new h.ColorMaterialProperty(new h.Color(...this.strokeColor??He.defaults.strokeColor)),f.polyline.clampToGround=new h.ConstantProperty(this.strokeGround)),f.billboard){f.billboard.show=new h.ConstantProperty(this.imageShow??He.defaults.imageShow),f.billboard.width=new h.ConstantProperty(this.imageSize?this.imageSize[0]:He.defaults.imageSize[0]),f.billboard.height=new h.ConstantProperty(this.imageSize?this.imageSize[1]:He.defaults.imageSize[1]);const g=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:He.defaults.imageUrl;f.billboard.image=new h.ConstantProperty(a.ESSceneObject.context.getStrFromEnv(g)),f.billboard.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.billboard.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.billboard.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND);const m=this.imageAnchor??He.defaults.imageAnchor,y=this.imageOffset??He.defaults.imageOffset;if(f.billboard.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-m[0]*f.billboard.width.getValue(h.JulianDate.now())+y[0],-m[1]*f.billboard.height.getValue(h.JulianDate.now())+y[1]])),f.label=new h.LabelGraphics,!f.label)return;f.label.show=new h.ConstantProperty(this.textShow??He.defaults.textShow),f.label.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.label.text=new h.ConstantProperty(this.textProperty&&this.textProperty!==""&&f.properties&&f.properties[this.textProperty]?f.properties[this.textProperty].getValue():this.textDefaultText??He.defaults.textDefaultText),f.label.fillColor=new h.ConstantProperty(new h.Color(...this.textColor??He.defaults.textColor)),f.label.showBackground=new h.ConstantProperty(this.textBackgroundColor!=null);const _=this.textFontSize&&this.textFontSize!=0?this.textFontSize:He.defaults.textFontSize,P=this.textOffset??He.defaults.textOffset;f.label.backgroundColor=new h.ConstantProperty(new h.Color(...this.textBackgroundColor??He.defaults.textBackgroundColor)),f.label.font=new h.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${_}px ${this.textFontFamily??He.defaults.textFontFamily}`),f.label.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.label.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.label.eyeOffset=new h.ConstantProperty(h.Cartesian3.fromArray([0,0,-1]));const C=this.textAnchor??He.defaults.textAnchor;f.label.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-C[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(f.label.text.getValue(h.JulianDate.now()),f.label.font.getValue(h.JulianDate.now())))+P[0],-C[1]*((this.textBackgroundColor?10:0)+_)+P[1]]))}}}};r();const l=this.dv(a.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged,this.classificationTypeChanged));this.dispose(l.don(r))}{const r=()=>{if(!this.dataSource)return;const c=this.dataSource.entities.values;for(let u=0;u<c.length;u++){const d=c[u];this._isEntityShow(d,e)}};r();const l=this.ad(a.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(l.don(r))}{const r=()=>{if(this.loadFuncStr)try{const l=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=l}catch(l){console.error(l),this.loadFun=void 0}else this.loadFun=void 0};r(),this.dispose(this.loadFuncStrChanged.disposableOn(r))}this.dispose(this.flyToEvent.disposableOn(r=>{e.actived&&this.dataSource&&(r!==void 0?o.flyTo(this.dataSource,{duration:r/1e3}).then(l=>{l||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:r/1e3})}):o.flyTo(this.dataSource).then(l=>{l||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,n="16px sans-serif"){const s=document.createElement("canvas").getContext("2d");return s.font=n,s.measureText(e).width}_isEntityShow(e,n){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=n.viewer)!=null&&o.camera&&this.show){let s;if(e.polygon&&e.polygon.hierarchy)s=a.getMinMaxCorner(e.polygon.hierarchy.getValue(h.JulianDate.now()).positions.map(c=>re(c))).center;else if(e.polyline&&e.polyline.positions)s=a.getMinMaxCorner(e.polyline.positions.getValue(h.JulianDate.now()).map(c=>re(c))).center;else if(e.position){const c=e.position.getValue(h.JulianDate.now());c&&(s=re(c))}if(!s||isNaN(s[0]))return;const r=a.getDistancesFromPositions([s,Gt(n.viewer.camera)],"NONE")[0];let l=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?l=this.minFeatureVisibleDistance<r&&r<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?l=r>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(l=r<this.maxFeatureVisibleDistance),e.show=this.show&&l}}};v(He,"defaults",{show:!0,allowPicking:!0,url:Fy,defaultLoadFuncStr:Ry,defaultLoadFuncDocStr:zA,data:RA,dataMd:FA,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Mo=He;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:a.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:a.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:a.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:a.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:a.reactArrayWithUndefined(void 0),imageAnchor:a.reactArrayWithUndefined(void 0),imageOffset:a.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:a.reactArrayWithUndefined(void 0),textBackgroundColor:a.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:a.reactArrayWithUndefined(void 0),textOffset:a.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN"})})(Mo||(Mo={})),a.extendClassProps(Mo.prototype,Mo.createDefaultProps);const Ya=class Ya extends Jt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.ad(new Mo(e,i.id));this.ad(a.track([o,"show"],[i,"show"])),this.ad(a.track([o,"allowPicking"],[i,"allowPicking"])),this.ad(a.track([o,"loadFuncStr"],[i,"loadFuncStr"])),this.ad(a.track([o,"url"],[i,"features"])),this.ad(a.track([o,"stroked"],[i,"stroked"])),this.ad(a.track([o,"strokeWidth"],[i,"strokeWidth"])),this.ad(a.track([o,"strokeWidthType"],[i,"strokeWidthType"])),this.ad(a.track([o,"strokeColor"],[i,"strokeColor"])),this.ad(a.track([o,"strokeMaterial"],[i,"strokeMaterial"])),this.ad(a.track([o,"strokeMaterialParams"],[i,"strokeMaterialParams"])),this.ad(a.track([o,"strokeGround"],[i,"strokeGround"])),this.ad(a.track([o,"filled"],[i,"filled"])),this.ad(a.track([o,"fillColor"],[i,"fillColor"])),this.ad(a.track([o,"fillMaterial"],[i,"fillMaterial"])),this.ad(a.track([o,"fillMaterialParams"],[i,"fillMaterialParams"])),this.ad(a.track([o,"fillGround"],[i,"fillGround"])),this.ad(a.track([o,"imageShow"],[i,"imageShow"])),this.ad(a.track([o,"imageUrl"],[i,"imageUrl"])),this.ad(a.track([o,"imageSize"],[i,"imageSize"])),this.ad(a.track([o,"imageAnchor"],[i,"imageAnchor"])),this.ad(a.track([o,"imageOffset"],[i,"imageOffset"])),this.ad(a.track([o,"textShow"],[i,"textShow"])),this.ad(a.track([o,"textProperty"],[i,"textProperty"])),this.ad(a.track([o,"textDefaultText"],[i,"textDefaultText"])),this.ad(a.track([o,"textColor"],[i,"textColor"])),this.ad(a.track([o,"textBackgroundColor"],[i,"textBackgroundColor"])),this.ad(a.track([o,"textFontFamily"],[i,"textFontFamily"])),this.ad(a.track([o,"textFontSize"],[i,"textFontSize"])),this.ad(a.track([o,"textFontStyle"],[i,"textFontStyle"])),this.ad(a.track([o,"textFontWeight"],[i,"textFontWeight"])),this.ad(a.track([o,"textAnchor"],[i,"textAnchor"])),this.ad(a.track([o,"textOffset"],[i,"textOffset"])),this.ad(a.track([o,"minFeatureVisibleDistance"],[i,"minFeatureVisibleDistance"])),this.ad(a.track([o,"maxFeatureVisibleDistance"],[i,"maxFeatureVisibleDistance"])),this.ad(a.track([o,"heightReference"],[i,"heightReference"])),this.ad(a.track([o,"classificationType"],[i,"classificationType"])),this.ad(i.flyToEvent.disposableOn(s=>{if(e.actived){if(i.flyInParam){const{position:r,rotation:l,flyDuration:c}=i.flyInParam;return ne(e.viewer,r,void 0,l,c),!0}o.flyTo(s&&s*1e3)}}));{const s=async(r,l,c)=>{if(!e.actived)return;const u=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(r,l)));if(!(!u||!(u!=null&&u.positions)))if(u.type=="Point"||u.type=="MultiPoint")ei(e,i,this.id,await this._calculateFeatureHeight(u.type=="MultiPoint"?u.positions.flat():u.positions,i.heightReference,e),1e3,c);else{const d=u.type=="Polygon"||u.type=="MultiPolygon"||u.type=="MultiLineString";let p=[];d?p=u.positions.flat(u.type=="MultiPolygon"?2:1).map(y=>this._calculateFeatureHeight(y,i.fillGround?"CLAMP_TO_GROUND":"NONE",e)):p=u.positions.map(y=>this._calculateFeatureHeight(y,i.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:f,maxPos:g,center:m}=a.getMinMaxCorner(p);ei(e,i,this.id,m,a.getDistancesFromPositions([f,g],"NONE")[0],c)}};this.d(i.flyToFeatureEvent.don((r,l,c)=>s(r,l,c))),this.d(i.flyToFeatureIndexEvent.don((r,l)=>s(r,void 0,l)))}}_getFeatureByIndexOrProperties(i,e){var r,l,c,u,d,p,f,g;const{sceneObject:n}=this,o=n.features;if(!o)return;const s=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(s){if(e){let m=s.find(y=>(y==null?void 0:y.properties[i])==e);return{type:m!=null&&m.coordinates?m.type:(r=m==null?void 0:m.geometry)==null?void 0:r.type,positions:(m==null?void 0:m.coordinates)||((l=m==null?void 0:m.geometry)==null?void 0:l.coordinates)}}else if(typeof i=="number")return{type:(c=s[i])!=null&&c.coordinates?s[i].type:(d=(u=s[i])==null?void 0:u.geometry)==null?void 0:d.type,positions:((p=s[i])==null?void 0:p.coordinates)||((g=(f=s[i])==null?void 0:f.geometry)==null?void 0:g.coordinates)}}}async _calculateFeatureHeight(i,e,n){const o=[...i];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await n.getTerrainHeight(o)??0:o[2]+=await n.getTerrainHeight(o)??0,o}};v(Ya,"type",Ya.register("ESCesiumViewer",a.ESGeoJson.type,Ya));let ap=Ya;const Za=class Za extends vt{constructor(e,n){super(e,n);v(this,"_czmGeoESRectangle");v(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new be(n,e.id)),this._czmGeoESRectangle=this.disposeVar(new Si(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmGeoESRectangle,r=this._geoPolyline;r.arcType="RHUMB",this.dispose(a.track([r,"color"],[e,"strokeColor"])),this.dispose(a.track([r,"width"],[e,"strokeWidth"])),this.dispose(a.track([r,"ground"],[e,"strokeGround"])),this.dispose(a.track([s,"ground"],[e,"fillGround"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"]));{const l=()=>{r.show=e.show&&e.stroked,s.show=e.show&&e.filled};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(c.disposableOn(l))}{const l=()=>{e.filled?s.material={type:"Color",color:e.fillColor}:s.material=void 0};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(c.disposableOn(l))}{const l=()=>{const c=e.points;if(c&&c.length>=2){const{minPos:u,maxPos:d}=a.getMinMaxCorner(c);s.rectangle=[u[0],u[1],d[0],d[1]],s.height=c[0][2],s.extrudedHeight=c[0][2];const p=c.map(y=>(c&&(y[2]=c[0][2]),y)),f=p[0],g=p[1],m=[f,[f[0],g[1],f[2]],g,[g[0],f[1],g[2]]];r.positions=[...m,f]}else s.rectangle=void 0,r.positions=void 0,s.height=0,s.extrudedHeight=0};l(),this.dispose(e.pointsChanged.disposableOn(()=>l()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.points?(oe(s,o,n,o.points,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmGeoESRectangle:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):o.points?(oe(s,o,n,o.points,e),!0):!1:!1}};v(Za,"type",Za.register("ESCesiumViewer",a.ESGeoRectangle.type,Za));let lp=Za;class Zr extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new Sn(e,n));const{geoPolygon:o}=this;this.dispose(a.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(r=>{o.flyTo(r)})),this.dispose(a.bind([o,"show"],[this,"show"])),this.dispose(a.bind([o,"fill"],[this,"filled"])),this.dispose(a.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(a.bind([o,"ground"],[this,"ground"])),this.dispose(a.bind([o,"outline"],[this,"outline"])),this.dispose(a.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(a.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(a.bind([o,"color"],[this,"color"])),this.dispose(a.bind([o,"depth"],[this,"depth"]));const s=()=>{if(this.positions&&this.positions.length>=2){const r=xu([...this.positions,this.positions[0]]);o.positions=r}else o.positions=void 0};s(),this.dispose(this.positionsChanged.disposableOn(s))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:a.reactArray([1,1,1,1]),outlineWidth:1,color:a.reactArrayWithUndefined([1,1,1,.5]),positions:a.reactPositions(void 0),depth:0})})(Zr||(Zr={})),a.extendClassProps(Zr.prototype,Zr.createDefaultProps);const Qa=class Qa extends vt{constructor(e,n){super(e,n);v(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Zr(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._geoSmoothPolygon;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"positions"],[e,"points"])),this.dispose(a.track([s,"strokeGround"],[e,"strokeGround"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.track([s,"outline"],[e,"stroked"])),this.dispose(a.track([s,"outlineColor"],[e,"strokeColor"])),this.dispose(a.track([s,"outlineWidth"],[e,"strokeWidth"])),this.dispose(a.track([s,"strokeGround"],[e,"strokeGround"])),this.dispose(a.track([s,"filled"],[e,"filled"])),this.dispose(a.track([s,"color"],[e,"fillColor"])),this.dispose(a.track([s,"ground"],[e,"ground"]));{const r=()=>{s.ground=e.ground||e.fillGround};r();const l=this.dv(a.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(l.don(r))}{const r=()=>{s.color=e.filled?e.fillColor:Yr.defaults.fillStyle.color};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(r))}this.dispose(a.track([s,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,n){const{sceneObject:o,czmViewer:s,geoSmoothPolygon:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,geoSmoothPolygon:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}};v(Qa,"type",Qa.register("ESCesiumViewer",Yr.type,Qa));let cp=Qa;const ka=class ka extends fe{constructor(e,n){super(e,n);v(this,"_czmModel");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new rt(n,e.id));const s=this._czmModel;this.d(s.readyEvent.don(l=>{s.gltf.animations&&(s.activeAnimationsJson=s.gltf.animations.map((c,u)=>({index:u,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}))),e.czmModelReadyEvent.emit(l),e.readyEvent.emit(l)})),this.ad(new Pc(o,this._czmModel)),this.d(a.track([s,"show"],[e,"show"])),this.d(a.track([s,"color"],[e,"czmColor"])),this.d(a.track([s,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(a.track([s,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(a.bind([s,"position"],[e,"position"])),this.d(a.track([s,"nativeScale"],[e,"czmNativeScale"])),this.d(a.track([s,"scale"],[e,"scale"])),this.ad(a.track([s,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(a.track([s,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const l=c=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:c}:{atmosphereScatteringIntensity:c}};l(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(c=>l(c)))}{const l=()=>{var c,u;(c=e.czmEnvironmentMapManager)!=null&&c.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(u=e.czmEnvironmentMapManager)==null?void 0:u.atmosphereScatteringIntensity)};l(),this.ad(e.czmEnvironmentMapManagerChanged.don(l))}{const l=()=>{const c=[...e.rotation??[0,0,0]];c[0]+=e.instances&&e.instances.length!=0?0:90,s.rotation=c};l(),this.d(e.rotationChanged.don(l));{const c=()=>{if(l(),!e.instances){s.instances=e.instances;return}s.instances=e.instances.map(u=>{const d=JSON.parse(JSON.stringify(u));return!d.rotation&&(d.rotation=[0,0,0]),d.rotation[0]+=90,d})};c(),this.ad(e.instancesChanged.don(c))}}this.ad(e.setMaterialEvent.don(l=>{s.setMaterial(l)}));{const l=()=>{const c=[...s.rotation];c[0]-=e.instances&&e.instances.length!=0?0:90,e.rotation=c};l(),this.d(s.rotationChanged.don(l))}{const l=this.dv(a.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),c=()=>{e.allowPicking&&!e.editing?s.allowPicking=!0:s.allowPicking=!1};c(),this.d(l.don(c))}const r=()=>{s.url=a.ESSceneObject.context.getStrFromEnv(bc(typeof e.url=="string"?e.url:e.url.url))};r(),this.d(e.urlChanged.don(r)),this.d(e.setNodePositionEvent.don((l,c)=>{s.setNodeTranslation(l,c)})),this.d(e.setNodeRotationEvent.don((l,c)=>{s.setNodeRotation(l,c)})),this.d(e.setNodeScaleEvent.don((l,c)=>{s.setNodeScale(l,c)})),this.d(e.printDebugInfoEvent.don(()=>{s.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,n){const{sceneObject:o,czmViewer:s,model:r}=this;return s.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(r&&Dt(s,o,n,e,r,!0),!!r):!1}};v(ka,"type",ka.register("ESCesiumViewer",a.ESGltfModel.type,ka));let hp=ka;function zy(t,i){const e=t[0]-i[0],n=t[1]-i[1],o=t[2]-i[2];return Math.sqrt(e*e+n*n+o*o)}class Qr extends a.Destroyable{constructor(e,n){super();v(this,"_pickedEvent",this.disposeVar(new a.Event));v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_distance",this.disposeVar(a.react(0)));v(this,"_surfaceDistance",this.disposeVar(a.react(0)));v(this,"_height",this.disposeVar(a.react(0)));v(this,"_middlePosition",this.disposeVar(a.reactArrayWithUndefined(void 0)));v(this,"_heightPosition",this.disposeVar(a.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const r=this._surfaceDistance.value=a.geoDistance(this.positions[0],this.positions[1]),l=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(r*r+l*l)}else if(this.arcType==="RHUMB"){const r=this._surfaceDistance.value=a.geoRhumbDistance(this.positions[0],this.positions[1]),l=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(r*r+l*l)}else if(this.arcType==="NONE"){const r=a.lbhToXyz(this.positions[0]),l=a.lbhToXyz(this.positions[1]);this._distance.value=zy(r,l),this._surfaceDistance.value=zy(a.lbhToXyz(this._middlePosition.value),l),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const s=this.disposeVar(a.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(s.disposableOn(o));{const r=this.disposeVar(new be(e,n));r.ground=!1,r.loop=!1,this.dispose(a.track([r,"allowPicking"],[this,"allowPicking"])),this.dispose(a.bind([r,"arcType"],[this,"arcType"])),this.dispose(a.bind([r,"color"],[this,"color"])),this.dispose(a.bind([r,"dashLength"],[this,"dashLength"])),this.dispose(a.bind([r,"dashPattern"],[this,"dashPattern"])),this.dispose(a.bind([r,"gapColor"],[this,"gapColor"])),this.dispose(a.bind([r,"hasArrow"],[this,"hasArrow"])),this.dispose(a.bind([r,"hasDash"],[this,"hasDash"])),this.dispose(a.bind([r,"show"],[this,"show"])),this.dispose(a.bind([r,"width"],[this,"width"])),this.dispose(a.bind([r,"depthTest"],[this,"depthTest"]));{r.loop=!0;const c=()=>{if(this.positions&&this.positions.length===2){const[u,d]=this.positions;r.positions=[u,d,[u[0],u[1],d[2]]]}else r.positions=void 0};c(),this.dispose(this.positionsChanged.disposableOn(c))}this.dispose(this.flyToEvent.disposableOn(c=>{e.actived&&r.flyTo(c)}));const l=this.disposeVar(new We(e,n));this.dispose(a.track([l,"shadowDom"],[this,"shadowDom"])),this.dispose(a.track([l,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(a.track([l,"show"],[this,"show"]));{const c=()=>{l.position=this.heightPosition};c(),this.dispose(this.heightPositionChanged.disposableOn(c))}{const c=()=>{l.innerHTML=ao(`高度: ${Sc(this.height)}`,0)};c(),this.dispose(this.heightChanged.disposableOn(c))}this.ad(l.pickedEvent.don(c=>{Hi(c)===0&&this.pickedEvent.emit(c)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:a.reactPositions(void 0),width:1,color:a.reactArray([1,1,1,1]),hasDash:!1,gapColor:a.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})(Qr||(Qr={})),a.extendClassProps(Qr.prototype,Qr.createDefaultProps);const Ka=class Ka extends vt{constructor(e,n){super(e,n);v(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new Qr(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:s}=this;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.bind([s,"positions"],[e,"points"]));{const r=()=>{if(e.stroked)s.width=e.strokeWidth;else{s.width=0;return}s.width=e.strokeWidth,s.color=e.strokeColor;const u=e.strokeMaterial??"normal";u==="hasDash"?(s.hasDash=!0,s.hasArrow=!1):u==="hasArrow"?(s.hasDash=!1,s.hasArrow=!0):(s.hasDash=!1,s.hasArrow=!1);const d=e.strokeStyle;if(d.material==="hasDash"&&d.materialParams)try{const p=d.materialParams;Reflect.has(p,"gapColor")&&(s.gapColor=p.gapColor??[0,0,0,0]),Reflect.has(p,"dashLength")&&(s.dashLength=p.dashLength),Reflect.has(p,"dashPattern")&&(s.dashPattern=p.dashPattern)}catch(p){console.error(p)}else s.gapColor=[0,0,0,0],s.dashLength=0,s.dashPattern=0};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(l.disposableOn(r))}this.dispose(s.pickedEvent.disposableOn(r=>{Hi(r)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(r)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmHeightMeasurement:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmHeightMeasurement:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}};v(Ka,"type",Ka.register("ESCesiumViewer",a.ESHeightMeasurement.type,Ka));let up=Ka;const dp={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},Ja=class Ja extends fe{constructor(e,n){super(e,n);v(this,"_czmModelPrimitive");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new rt(n,this.sceneObject.id));const s=this._czmModelPrimitive;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(Ke([s,"rotation"],[e,"rotation"])),this.dispose(a.bind([s,"scale"],[e,"scale"])),this.d(s.readyEvent.don(y=>{e.readyEvent.emit(y)}));{const y=this.dv(a.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),_=()=>{e.allowPicking&&!e.editing?s.allowPicking=!0:s.allowPicking=!1};_(),this.d(y.don(_))}const r=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),l=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),c=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),u=a.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),d=a.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),p=a.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),f=()=>{switch(e.mode){case"worker":s.url=r;break;case"police":s.url=l;break;case"pedestrian":s.url=c;break;case"stranger":s.url=u;break;case"suitMan":s.url=d;break;case"suitWoman":s.url=p;break;default:s.url=r;break}};this.dispose(e.modeChanged.disposableOn(()=>{f()})),f();const g=()=>{const y=e.animation??a.ESHuman.defaults.animation;if(!e.show){s.activeAnimationsJson=void 0;return}y==="walking"?s.activeAnimationsJson=dp.czmAnimationsWalk:y==="standing"?s.activeAnimationsJson=dp.czmAnimationsStand:y==="running"&&(s.activeAnimationsJson=dp.czmAnimationsRun)};g();const m=this.ad(a.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(m.disposableOn(()=>g())),this.ad(new Pc(o,s))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmModelPrimitive:r}=this;return!s.actived||!s.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(r&&Dt(s,o,n,e,r,!0),!!r)}};v(Ja,"type",Ja.register("ESCesiumViewer",a.ESHuman.type,Ja));let pp=Ja;class Ly extends a.Destroyable{constructor(e,n){super();v(this,"_czmGeoCanvasImagePoi");v(this,"flyTo",(e,n)=>{if(this.czmGeoCanvasImagePoi.position){ne(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,jt,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoCanvasImagePoi=this.disposeVar(new _i(n));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(s=>{(e.allowPicking??!1)&&e.pickedEvent.emit(s)}));{const s=d=>{let p=d;return d.includes("inner://")&&(p="${earthsdk3-assets-script-dir}/assets/img/points/"+d.split("inner://")[1]),a.ESSceneObject.context.getStrFromEnv(bc(p))},r=()=>{const d=s(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=d,e.sizeByContent){const f=new Image;f.src=d,f.onload=()=>{o.size=[f.width,f.height]}}else{const f=e.size;o.size=[...f]}},l=this.disposeVar(a.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(l.disposableOn(()=>r())),r(),this.d(a.track([o,"zOrder"],[e,"zOrder"])),this.dispose(a.track([o,"show"],[e,"show"])),this.dispose(a.bind([o,"position"],[e,"position"])),this.ad(a.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const d=()=>{o.scale=[e.scale[1],e.scale[2]]};d(),this.dispose(e.scaleChanged.don(d))}const c=()=>{const d=e.anchor,p=e.offset;d?o.originRatioAndOffset=[...d,-p[0],-p[1]]:o.originRatioAndOffset=[0,0,0,0]},u=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(u.disposableOn(()=>c())),c(),this.dispose(o.clickEvent.disposableOn(d=>{const{offsetX:p,offsetY:f}=d,m={type:d.button===0?"leftClick":d.button===2?"rightClick":void 0,add:{mousePos:[p,f]}};e.widgetEvent.emit(m)})),this.dispose(o.hoveredChanged.disposableOn(d=>{if(d===void 0)return;const p={type:d?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(p)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class Oy extends a.Destroyable{constructor(e,n,o){super();v(this,"_czmGeoImageModel");v(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});v(this,"_isPointEvent",!1);v(this,"flyTo",(e,n)=>{if(this.czmGeoImageModel.position)return ei(this.czmViewer,this.sceneObject,n,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoImageModel=this.disposeVar(new qi(n,e.id));const s=this._czmGeoImageModel;this.ad(n.clickEvent.don(f=>{const g=f==null?void 0:f.pointerEvent;g&&(this._isPointEvent=!0,this._eventInfo={type:g.button==0?"leftClick":g.button==2?"rightClick":"leftClick",add:{mousePos:[g.offsetX,g.offsetY]}})})),this.d(e.pickedEvent.don(f=>{var g,m,y;f.screenPosition&&this._isPointEvent&&f.attachedInfo!="innerHoverEvent"&&((g=this._eventInfo.add)!=null&&g.mousePos)&&Math.abs(f.screenPosition[0]-((m=this._eventInfo.add)==null?void 0:m.mousePos[0]))<1&&Math.abs(f.screenPosition[1]-((y=this._eventInfo.add)==null?void 0:y.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),a.registerCreatedEventUpdate(this,e,()=>{const f=n.getEngineObject(e);this.ad(f.lastHoverResultChanged.don((g,m)=>{(g==null?void 0:g.sceneObject)==(m==null?void 0:m.sceneObject)||(g==null?void 0:g.sceneObject)!=e&&(m==null?void 0:m.sceneObject)!=e||(g!=null&&g.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:g==null?void 0:g.screenPosition}},g.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&g.sceneObject.id==e.id&&(s.scale=[s.scale[0]*1.5,s.scale[1]*1.5])),m!=null&&m.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:g==null?void 0:g.screenPosition}},m.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&m.sceneObject.id==e.id&&(s.scale=[s.scale[0]/1.5,s.scale[1]/1.5])))}))});const r=e.sizeByContent,c=(f=>{let g=f;return f.includes("inner://")&&(g="${earthsdk3-assets-script-dir}/assets/img/points/"+f.split("inner://")[1]),a.ESSceneObject.context.getStrFromEnv(bc(g))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),u=new Image;u.src=c,u.onload=()=>{if(r)s.size=[u.width/100,u.height/100];else{const f=e.size;s.size=[f[0]/100,f[1]/100]}},s.uri=c,this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),s.pixelSize=void 0,s.useAxis="XZ";{const f=()=>{s.scale=[e.scale[1],e.scale[2]]};f(),this.d(e.scaleChanged.don(f))}{const f=()=>{e.rotationType===0&&(s.rotationMode="WithProp",this.d(Ke([s,"rotation"],[e,"rotation"]))),e.rotationType===1&&(s.rotationMode="WithCamera"),e.rotationType===2&&(s.rotationMode="WithCameraOnlyZ")};f(),this.dispose(e.rotationTypeChanged.disposableOn(f))}const d=()=>{const f=e.anchor,g=e.offset;f?s.originRatioAndOffset=[...f,-g[0]/100,-g[1]/100]:s.originRatioAndOffset=[0,0,0,0]},p=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(p.disposableOn(()=>d())),d()}get czmGeoImageModel(){return this._czmGeoImageModel}}const ja=class ja extends Hr{constructor(e,n){super(e,n);v(this,"_resetting");if(!n.viewer){console.warn("viewer is undefined!");return}const s=this.disposeVar(a.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new a.ObjResettingWithEvent(s,()=>this.sceneObject.screenRender?new Ly(this.sceneObject,this.czmViewer):new Oy(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,n){const{sceneObject:o,czmViewer:s,resetting:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r&&r.obj&&r.obj.flyTo(e,n),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(ja,"type",ja.register("ESCesiumViewer",a.ESImageLabel.type,ja));let fp=ja;function LA(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const el=class el extends Jt{constructor(e,n){super(e,n);v(this,"_czmImagery");if(this._czmImagery=this.dv(new Ln(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmImagery;{const r=this.ad(a.reactJson(""));{const u=()=>{if(typeof e.url=="string")r.value=a.ESSceneObject.context.getStrFromEnv(e.url);else{const d=e.url;d.url=a.ESSceneObject.context.getStrFromEnv(d.url),r.value=d}};u(),this.ad(e.urlChanged.don(u))}const l=()=>{var m;if(!r.value)return;const u=(((m=e.options)==null?void 0:m.type)??"auto").toLowerCase(),d=e.options??{};let p={type:"UrlTemplateImageryProvider",url:r.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...d},f=r.value,g=typeof f=="string"?f:f.url;if(u==="auto"){const y=g.toLowerCase();if(y.startsWith("ion://")){const P=+y.substring(6);p={...d,assetId:P,type:"IonImageryProvider"}}else if(y.includes("{x}")||y.includes("{y}")||y.includes("{z}"))p.type="UrlTemplateImageryProvider";else if(y.includes("wmts"))p.type="WebMapTileServiceImageryProvider";else if(y.includes("wms"))p.type="WebMapServiceImageryProvider";else{if(g.includes("/tilemapresource.xml")){const _=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=_:f.url=_,p.url=f}p.type="TileMapServiceImageryProvider"}}else{if(u==="tms"&&g.includes("/tilemapresource.xml")){const y=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=y:f.url=y,p.url=f}else if(u==="ion"&&g.startsWith("ion://")){const _=+g.substring(6);p={...d,assetId:_,type:"IonImageryProvider"}}p.type=LA(u)}console.log("imageryProvider",p),s.imageryProvider=p};l();const c=this.dv(a.createNextAnimateFrameEvent(r.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(c.don(l))}this.d(a.track([s,"show"],[e,"show"])),this.d(a.bind([s,"alpha"],[e,"opacity"])),this.d(a.bind([s,"alpha"],[e,"czmAlpha"])),this.d(a.track([s,"splitDirection"],[e,"splitDirection"])),this.d(a.track([s,"brightness"],[e,"czmBrightness"])),this.d(a.track([s,"contrast"],[e,"czmContrast"])),this.d(a.track([s,"hue"],[e,"czmHue"])),this.d(a.track([s,"saturation"],[e,"czmSaturation"])),this.d(a.track([s,"gamma"],[e,"czmGamma"])),this.d(a.track([s,"rectangle"],[e,"rectangle"])),this.d(a.track([s,"zIndex"],[e,"zIndex"])),this.ad(a.track([s,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(el,"type",el.register("ESCesiumViewer",a.ESImageryLayer.type,el));let gp=el;class OA extends a.Destroyable{constructor(e,n,o,s){super();v(this,"_show");v(this,"_czmESCustomPrimitive");v(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(a.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new De(n,this._sceneObject.id)),this._czmTexture=this.dv(new ze(n));const r=e,l=this._czmESCustomPrimitive,c=this._czmTexture;this.dispose(a.track([l,"show"],[this,"show"])),this.dispose(a.track([l,"show"],[r,"show"])),this.dispose(a.track([l,"allowPicking"],[r,"allowPicking"])),this.dispose(a.track([l,"rotation"],[r,"rotation"])),this.dispose(a.track([l,"position"],[r,"position"])),this.dispose(a.track([l,"scale"],[r,"scale"])),this.ad(r.allowPickingChanged.don(()=>{l.allowPicking=r.allowPicking,l.pass=r.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const u=()=>{const p=r.size/2,f=s[0].map(z=>z*p),g=s[1].map(z=>z*p),m=s[2].map(z=>z*p),y=s[3].map(z=>z*p),_=[...f,...g,...m,...y];let P=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(P=P.reverse());const C=[0,0],S=[1,0],x=[1,1],A=[0,1];let R=[];o=="east"||o=="south"?R=[...S,...C,...A,...x]:o=="west"?R=[...S,...x,...A,...C]:o=="top"?R=[...A,...x,...S,...C]:R=[...C,...S,...x,...A],l.indexTypedArray=new Uint16Array(P),l.attributes={position:{typedArray:new Float32Array(_),componentsPerAttribute:3},st:{typedArray:new Float32Array(R),componentsPerAttribute:2}},c.uri=a.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${r.mode}/${o}.${r.mode!="blueSky"?"png":"jpg"}`);const O=n.getCameraInfo();if(O!=null){const B=a.getDistancesFromPositions([r.position,O.position],"NONE")[0]/(r.size/2*r.autoOpacityFactor);this.changeOpacity(r.autoFollow?1:B)}const N=l.computeLocalAxisedBoundingBoxFromAttribute("position");if(!N)return;const{min:V,max:U}=N;l.setLocalAxisedBoundingBox(V,U)};u();const d=this.disposeVar(a.createNextAnimateFrameEvent(r.sizeChanged,r.modeChanged));this.dispose(d.disposableOn(u))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class NA extends a.Destroyable{constructor(i,e,n){if(super(),!e.viewer)return;let o=!0,s;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{r()}));function r(){var c;if(!((c=e.viewer)!=null&&c.camera))return;const l=e.getCameraInfo();if(l!=null&&(s==null||s.position[0]!=l.position[0]||s.position[1]!=l.position[1]||s.position[2]!=l.position[2]||s.rotation[0]!=l.rotation[0]||s.rotation[1]!=l.rotation[1]||s.rotation[2]!=l.rotation[2])){s=l;const d=a.getDistancesFromPositions([i.position,s.position],"NONE")[0]/(i.size/2*i.autoOpacityFactor);i.autoFollow?(i.position=s.position,o&&(o=!1,n.forEach(p=>{p.changeOpacity(1)}))):n.forEach(p=>{p.changeOpacity(d)})}}r()}}const Ye=class Ye extends fe{constructor(e,n){super(e,n);v(this,"_czmSkyBoxComponents",[]);if(!n.viewer){console.warn("viewer is undefined!");return}!Ye._defaultLocalBox&&Ye._firstLoad&&(Ye._firstLoad=!1,Ye._defaultLocalBox=n.xbsjLocalBoxSources),Ye._eSLocalSkyBoxArr.push(e),this.d(()=>{Ye._eSLocalSkyBoxArr.includes(e)&&Ye._eSLocalSkyBoxArr.splice(Ye._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const s={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const r in s)if(Object.prototype.hasOwnProperty.call(s,r)){const l=s[r];this._czmSkyBoxComponents.push(this.dv(new OA(e,n,r,l)))}{const r=this.disposeVar(a.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new a.ObjResettingWithEvent(r,()=>(this.ChangeAutoFollow(),new NA(e,n,this._czmSkyBoxComponents))))}{const r=()=>{this.ChangeAutoFollow()},l=this.disposeVar(a.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(l.disposableOn(r))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let n=Ye._eSLocalSkyBoxArr.length-1;n>=0;n--){const o=Ye._eSLocalSkyBoxArr[n];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}n==0&&(e.xbsjLocalBoxSources=Ye._defaultLocalBox)}Ye._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Ye._defaultLocalBox)}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;if(!s.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,n);{const r=o.size??a.ESLocalSkyBox.defaults.size;return o.position?(ei(s,o,n,o.position,r,e,!0),!0):!1}}};v(Ye,"type",Ye.register("ESCesiumViewer",a.ESLocalSkyBox.type,Ye)),v(Ye,"_defaultLocalBox"),v(Ye,"_firstLoad",!0),v(Ye,"_eSLocalSkyBoxArr",[]);let mp=Ye;const li=class li extends fe{constructor(e,n){super(e,n);v(this,"_geoCustomDivPoi");v(this,"_textFunc",this.disposeVar(a.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new We(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this.geoCustomDivPoi;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"]));{this.dispose(s.pickedEvent.disposableOn(r=>{(e.allowPicking??a.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(r)})),this.dispose(s.innerHtmlMounted.disposableOn(r=>{const l=r.firstElementChild;l&&(l.style.pointerEvents="auto",l.style.cursor="default",l.onclick=c=>s.pickFromDiv(l,{type:"viewerPicking",pointerEvent:c}))}));{const r=()=>{if(!e.position)return;const c=(this.textFunc??li.defaultTextFunc_度格式)(e.position);s.innerHTML=ao(c)};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(l.disposableOn(r))}{const r=()=>{n.lonLatFormat??(n.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=n.lonLatFormat=="DECIMAL_DEGREE"?li.defaultTextFunc_度格式:n.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?li.defaultTextFunc_度分格式:li.defaultTextFunc_度分秒格式};r(),this.d(n.lonLatFormatChanged.don(()=>{r()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,n){const{sceneObject:o,czmViewer:s,geoCustomDivPoi:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e),o.flyOverEvent.emit(n,"over",s),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,geoCustomDivPoi:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(r.flyTo(e),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(li,"type",li.register("ESCesiumViewer",a.ESLocationMeasurement.type,li)),v(li,"defaultTextFunc_度格式",e=>{if(!e)return"";const[n=0,o=0,s=0]=e;return`经度: ${n.toFixed(5)}°
|
|
1253
|
+
`,He=class He extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_loadFuncReact",this.disposeVar(a.react(void 0)));v(this,"_dataSource",this.disposeVar(a.react(void 0)));v(this,"_data");v(this,"_defaultHeight",{});v(this,"_defaultBoundingSphere",new h.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let s=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{s()});{const r=this.dv(a.createProcessingFromAsyncFunc(async u=>{this.dataSource&&s(),this.url&&(typeof this.url=="object"?this._data=this.url:a.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(a.ESSceneObject.context.getStrFromEnv(this.url)).then(d=>d.json()).then(d=>{this._data=d}).catch(d=>{console.warn("ESGeoJson数据加载失败",d)}),this.dataSource=await h.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(d=>{var f,g;const p=[];for(const m of d.entities.values)if(h.Entity.prototype&&(m.ESSceneObjectID=n),this._isEntityShow(m,e),m.polygon&&p.push(...(f=m.polygon.hierarchy)==null?void 0:f.getValue(h.JulianDate.now()).positions),m.polyline&&p.push(...(g=m.polyline.positions)==null?void 0:g.getValue(h.JulianDate.now())),m.position){const y=m.position.getValue(h.JulianDate.now());y&&p.push(y)}this._defaultBoundingSphere=h.BoundingSphere.fromPoints(p)}))})),l=()=>{r.isRunning&&r.cancel(),r.restart()};l();const c=this.dv(a.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(c.don(l))}{const r=()=>{var c,u;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(d){console.error(d)}else{const d=this.dataSource.entities.values;for(let p=0;p<d.length;p++){const f=d[p];if(f.polygon){this._defaultHeight[f.id]||(this._defaultHeight[f.id]=(c=f.polygon.height)==null?void 0:c.getValue(h.JulianDate.now())),f.polygon.height=this.fillGround?void 0:new h.ConstantProperty(this._defaultHeight[f.id]),f.polygon.perPositionHeight=new h.ConstantProperty(!this.fillGround),f.polygon.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.polygon.show=new h.ConstantProperty(this.filled??He.defaults.filled),f.polygon.material=new h.ColorMaterialProperty(new h.Color(...this.fillColor??He.defaults.fillColor)),f.polygon.outline=new h.ConstantProperty(!1),f.polygon.classificationType=h.ClassificationType[this.classificationType.toUpperCase()],f.polyline=new h.PolylineGraphics;const g=JSON.parse(JSON.stringify((u=f.polygon.hierarchy)==null?void 0:u.getValue(h.JulianDate.now()).positions));h.Cartesian3.equals(g[0],g[g.length-1])||g.push(g[0]),f.polyline.positions=g,f.polyline.classificationType=h.ClassificationType[this.classificationType.toUpperCase()]}if(f.polyline&&(f.polyline.classificationType=h.ClassificationType[this.classificationType.toUpperCase()],f.polyline.show=new h.ConstantProperty(this.stroked??He.defaults.stroked),f.polyline.width=new h.ConstantProperty(this.strokeWidth??He.defaults.strokeWidth),f.polyline.material=new h.ColorMaterialProperty(new h.Color(...this.strokeColor??He.defaults.strokeColor)),f.polyline.clampToGround=new h.ConstantProperty(this.strokeGround)),f.billboard){f.billboard.show=new h.ConstantProperty(this.imageShow??He.defaults.imageShow),f.billboard.width=new h.ConstantProperty(this.imageSize?this.imageSize[0]:He.defaults.imageSize[0]),f.billboard.height=new h.ConstantProperty(this.imageSize?this.imageSize[1]:He.defaults.imageSize[1]);const g=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:He.defaults.imageUrl;f.billboard.image=new h.ConstantProperty(a.ESSceneObject.context.getStrFromEnv(g)),f.billboard.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.billboard.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.billboard.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND);const m=this.imageAnchor??He.defaults.imageAnchor,y=this.imageOffset??He.defaults.imageOffset;if(f.billboard.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-m[0]*f.billboard.width.getValue(h.JulianDate.now())+y[0],-m[1]*f.billboard.height.getValue(h.JulianDate.now())+y[1]])),f.label=new h.LabelGraphics,!f.label)return;f.label.show=new h.ConstantProperty(this.textShow??He.defaults.textShow),f.label.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.label.text=new h.ConstantProperty(this.textProperty&&this.textProperty!==""&&f.properties&&f.properties[this.textProperty]?f.properties[this.textProperty].getValue():this.textDefaultText??He.defaults.textDefaultText),f.label.fillColor=new h.ConstantProperty(new h.Color(...this.textColor??He.defaults.textColor)),f.label.showBackground=new h.ConstantProperty(this.textBackgroundColor!=null);const _=this.textFontSize&&this.textFontSize!=0?this.textFontSize:He.defaults.textFontSize,P=this.textOffset??He.defaults.textOffset;f.label.backgroundColor=new h.ConstantProperty(new h.Color(...this.textBackgroundColor??He.defaults.textBackgroundColor)),f.label.font=new h.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${_}px ${this.textFontFamily??He.defaults.textFontFamily}`),f.label.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.label.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.label.eyeOffset=new h.ConstantProperty(h.Cartesian3.fromArray([0,0,-1]));const C=this.textAnchor??He.defaults.textAnchor;f.label.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-C[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(f.label.text.getValue(h.JulianDate.now()),f.label.font.getValue(h.JulianDate.now())))+P[0],-C[1]*((this.textBackgroundColor?10:0)+_)+P[1]]))}}}};r();const l=this.dv(a.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged,this.classificationTypeChanged));this.dispose(l.don(r))}{const r=()=>{if(!this.dataSource)return;const c=this.dataSource.entities.values;for(let u=0;u<c.length;u++){const d=c[u];this._isEntityShow(d,e)}};r();const l=this.ad(a.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(l.don(r))}{const r=()=>{if(this.loadFuncStr)try{const l=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=l}catch(l){console.error(l),this.loadFun=void 0}else this.loadFun=void 0};r(),this.dispose(this.loadFuncStrChanged.disposableOn(r))}this.dispose(this.flyToEvent.disposableOn(r=>{e.actived&&this.dataSource&&(r!==void 0?o.flyTo(this.dataSource,{duration:r/1e3}).then(l=>{l||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:r/1e3})}):o.flyTo(this.dataSource).then(l=>{l||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,n="16px sans-serif"){const s=document.createElement("canvas").getContext("2d");return s.font=n,s.measureText(e).width}_isEntityShow(e,n){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=n.viewer)!=null&&o.camera&&this.show){let s;if(e.polygon&&e.polygon.hierarchy)s=a.getMinMaxCorner(e.polygon.hierarchy.getValue(h.JulianDate.now()).positions.map(c=>re(c))).center;else if(e.polyline&&e.polyline.positions)s=a.getMinMaxCorner(e.polyline.positions.getValue(h.JulianDate.now()).map(c=>re(c))).center;else if(e.position){const c=e.position.getValue(h.JulianDate.now());c&&(s=re(c))}if(!s||isNaN(s[0]))return;const r=a.getDistancesFromPositions([s,Gt(n.viewer.camera)],"NONE")[0];let l=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?l=this.minFeatureVisibleDistance<r&&r<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?l=r>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(l=r<this.maxFeatureVisibleDistance),e.show=this.show&&l}}};v(He,"defaults",{show:!0,allowPicking:!0,url:Fy,defaultLoadFuncStr:Ry,defaultLoadFuncDocStr:zA,data:RA,dataMd:FA,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Mo=He;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:a.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:a.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:a.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:a.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:a.reactArrayWithUndefined(void 0),imageAnchor:a.reactArrayWithUndefined(void 0),imageOffset:a.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:a.reactArrayWithUndefined(void 0),textBackgroundColor:a.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:a.reactArrayWithUndefined(void 0),textOffset:a.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE",classificationType:"TERRAIN"})})(Mo||(Mo={})),a.extendClassProps(Mo.prototype,Mo.createDefaultProps);const Ya=class Ya extends Jt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.ad(new Mo(e,i.id));this.ad(a.track([o,"show"],[i,"show"])),this.ad(a.track([o,"allowPicking"],[i,"allowPicking"])),this.ad(a.track([o,"loadFuncStr"],[i,"loadFuncStr"])),this.ad(a.track([o,"url"],[i,"features"])),this.ad(a.track([o,"stroked"],[i,"stroked"])),this.ad(a.track([o,"strokeWidth"],[i,"strokeWidth"])),this.ad(a.track([o,"strokeWidthType"],[i,"strokeWidthType"])),this.ad(a.track([o,"strokeColor"],[i,"strokeColor"])),this.ad(a.track([o,"strokeMaterial"],[i,"strokeMaterial"])),this.ad(a.track([o,"strokeMaterialParams"],[i,"strokeMaterialParams"])),this.ad(a.track([o,"strokeGround"],[i,"strokeGround"])),this.ad(a.track([o,"filled"],[i,"filled"])),this.ad(a.track([o,"fillColor"],[i,"fillColor"])),this.ad(a.track([o,"fillMaterial"],[i,"fillMaterial"])),this.ad(a.track([o,"fillMaterialParams"],[i,"fillMaterialParams"])),this.ad(a.track([o,"fillGround"],[i,"fillGround"])),this.ad(a.track([o,"imageShow"],[i,"imageShow"])),this.ad(a.track([o,"imageUrl"],[i,"imageUrl"])),this.ad(a.track([o,"imageSize"],[i,"imageSize"])),this.ad(a.track([o,"imageAnchor"],[i,"imageAnchor"])),this.ad(a.track([o,"imageOffset"],[i,"imageOffset"])),this.ad(a.track([o,"textShow"],[i,"textShow"])),this.ad(a.track([o,"textProperty"],[i,"textProperty"])),this.ad(a.track([o,"textDefaultText"],[i,"textDefaultText"])),this.ad(a.track([o,"textColor"],[i,"textColor"])),this.ad(a.track([o,"textBackgroundColor"],[i,"textBackgroundColor"])),this.ad(a.track([o,"textFontFamily"],[i,"textFontFamily"])),this.ad(a.track([o,"textFontSize"],[i,"textFontSize"])),this.ad(a.track([o,"textFontStyle"],[i,"textFontStyle"])),this.ad(a.track([o,"textFontWeight"],[i,"textFontWeight"])),this.ad(a.track([o,"textAnchor"],[i,"textAnchor"])),this.ad(a.track([o,"textOffset"],[i,"textOffset"])),this.ad(a.track([o,"minFeatureVisibleDistance"],[i,"minFeatureVisibleDistance"])),this.ad(a.track([o,"maxFeatureVisibleDistance"],[i,"maxFeatureVisibleDistance"])),this.ad(a.track([o,"heightReference"],[i,"heightReference"])),this.ad(a.track([o,"classificationType"],[i,"classificationType"])),this.ad(i.flyToEvent.disposableOn(s=>{if(e.actived){if(i.flyInParam){const{position:r,rotation:l,flyDuration:c}=i.flyInParam;return ne(e.viewer,r,void 0,l,c),!0}o.flyTo(s&&s*1e3)}}));{const s=async(r,l,c)=>{if(!e.actived)return;const u=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(r,l)));if(!(!u||!(u!=null&&u.positions)))if(u.type=="Point"||u.type=="MultiPoint")ei(e,i,this.id,await this._calculateFeatureHeight(u.type=="MultiPoint"?u.positions.flat():u.positions,i.heightReference,e),1e3,c);else{const d=u.type=="Polygon"||u.type=="MultiPolygon"||u.type=="MultiLineString";let p=[];d?p=u.positions.flat(u.type=="MultiPolygon"?2:1).map(y=>this._calculateFeatureHeight(y,i.fillGround?"CLAMP_TO_GROUND":"NONE",e)):p=u.positions.map(y=>this._calculateFeatureHeight(y,i.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:f,maxPos:g,center:m}=a.getMinMaxCorner(p);ei(e,i,this.id,m,a.getDistancesFromPositions([f,g],"NONE")[0],c)}};this.d(i.flyToFeatureEvent.don((r,l,c)=>s(r,l,c))),this.d(i.flyToFeatureIndexEvent.don((r,l)=>s(r,void 0,l)))}}_getFeatureByIndexOrProperties(i,e){var r,l,c,u,d,p,f,g;const{sceneObject:n}=this,o=n.features;if(!o)return;const s=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(s){if(e){let m=s.find(y=>(y==null?void 0:y.properties[i])==e);return{type:m!=null&&m.coordinates?m.type:(r=m==null?void 0:m.geometry)==null?void 0:r.type,positions:(m==null?void 0:m.coordinates)||((l=m==null?void 0:m.geometry)==null?void 0:l.coordinates)}}else if(typeof i=="number")return{type:(c=s[i])!=null&&c.coordinates?s[i].type:(d=(u=s[i])==null?void 0:u.geometry)==null?void 0:d.type,positions:((p=s[i])==null?void 0:p.coordinates)||((g=(f=s[i])==null?void 0:f.geometry)==null?void 0:g.coordinates)}}}async _calculateFeatureHeight(i,e,n){const o=[...i];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await n.getTerrainHeight(o)??0:o[2]+=await n.getTerrainHeight(o)??0,o}};v(Ya,"type",Ya.register("ESCesiumViewer",a.ESGeoJson.type,Ya));let ap=Ya;const Za=class Za extends vt{constructor(e,n){super(e,n);v(this,"_czmGeoESRectangle");v(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new be(n,e.id)),this._czmGeoESRectangle=this.disposeVar(new Si(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmGeoESRectangle,r=this._geoPolyline;r.arcType="RHUMB",this.dispose(a.track([r,"color"],[e,"strokeColor"])),this.dispose(a.track([r,"width"],[e,"strokeWidth"])),this.dispose(a.track([r,"ground"],[e,"strokeGround"])),this.dispose(a.track([s,"ground"],[e,"fillGround"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"]));{const l=()=>{r.show=e.show&&e.stroked,s.show=e.show&&e.filled};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(c.disposableOn(l))}{const l=()=>{e.filled?s.material={type:"Color",color:e.fillColor}:s.material=void 0};l();const c=this.disposeVar(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(c.disposableOn(l))}{const l=()=>{const c=e.points;if(c&&c.length>=2){const{minPos:u,maxPos:d}=a.getMinMaxCorner(c);s.rectangle=[u[0],u[1],d[0],d[1]],s.height=c[0][2],s.extrudedHeight=c[0][2];const p=c.map(y=>(c&&(y[2]=c[0][2]),y)),f=p[0],g=p[1],m=[f,[f[0],g[1],f[2]],g,[g[0],f[1],g[2]]];r.positions=[...m,f]}else s.rectangle=void 0,r.positions=void 0,s.height=0,s.extrudedHeight=0};l(),this.dispose(e.pointsChanged.disposableOn(()=>l()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.points?(oe(s,o,n,o.points,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmGeoESRectangle:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):o.points?(oe(s,o,n,o.points,e),!0):!1:!1}};v(Za,"type",Za.register("ESCesiumViewer",a.ESGeoRectangle.type,Za));let lp=Za;class Zr extends a.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new Sn(e,n));const{geoPolygon:o}=this;this.dispose(a.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(r=>{o.flyTo(r)})),this.dispose(a.bind([o,"show"],[this,"show"])),this.dispose(a.bind([o,"fill"],[this,"filled"])),this.dispose(a.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(a.bind([o,"ground"],[this,"ground"])),this.dispose(a.bind([o,"outline"],[this,"outline"])),this.dispose(a.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(a.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(a.bind([o,"color"],[this,"color"])),this.dispose(a.bind([o,"depth"],[this,"depth"]));const s=()=>{if(this.positions&&this.positions.length>=2){const r=xu([...this.positions,this.positions[0]]);o.positions=r}else o.positions=void 0};s(),this.dispose(this.positionsChanged.disposableOn(s))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:a.reactArray([1,1,1,1]),outlineWidth:1,color:a.reactArrayWithUndefined([1,1,1,.5]),positions:a.reactPositions(void 0),depth:0})})(Zr||(Zr={})),a.extendClassProps(Zr.prototype,Zr.createDefaultProps);const Qa=class Qa extends vt{constructor(e,n){super(e,n);v(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Zr(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._geoSmoothPolygon;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"positions"],[e,"points"])),this.dispose(a.track([s,"strokeGround"],[e,"strokeGround"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.track([s,"outline"],[e,"stroked"])),this.dispose(a.track([s,"outlineColor"],[e,"strokeColor"])),this.dispose(a.track([s,"outlineWidth"],[e,"strokeWidth"])),this.dispose(a.track([s,"strokeGround"],[e,"strokeGround"])),this.dispose(a.track([s,"filled"],[e,"filled"])),this.dispose(a.track([s,"color"],[e,"fillColor"])),this.dispose(a.track([s,"ground"],[e,"ground"]));{const r=()=>{s.ground=e.ground||e.fillGround};r();const l=this.dv(a.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(l.don(r))}{const r=()=>{s.color=e.filled?e.fillColor:Yr.defaults.fillStyle.color};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(r))}this.dispose(a.track([s,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,n){const{sceneObject:o,czmViewer:s,geoSmoothPolygon:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,geoSmoothPolygon:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}};v(Qa,"type",Qa.register("ESCesiumViewer",Yr.type,Qa));let cp=Qa;const ka=class ka extends fe{constructor(e,n){super(e,n);v(this,"_czmModel");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new rt(n,e.id));const s=this._czmModel;this.d(s.readyEvent.don(l=>{var c;s.activeAnimationsJson=(c=s.gltf.animations)==null?void 0:c.map((u,d)=>({index:d,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"})),e.czmModelReadyEvent.emit(l),e.readyEvent.emit(l)})),this.ad(new Pc(o,this._czmModel)),this.d(a.track([s,"show"],[e,"show"])),this.d(a.track([s,"color"],[e,"czmColor"])),this.d(a.track([s,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(a.track([s,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(a.bind([s,"position"],[e,"position"])),this.d(a.track([s,"nativeScale"],[e,"czmNativeScale"])),this.d(a.track([s,"scale"],[e,"scale"])),this.ad(a.track([s,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(a.track([s,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const l=c=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:c}:{atmosphereScatteringIntensity:c}};l(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(c=>l(c)))}{const l=()=>{var c,u;(c=e.czmEnvironmentMapManager)!=null&&c.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(u=e.czmEnvironmentMapManager)==null?void 0:u.atmosphereScatteringIntensity)};l(),this.ad(e.czmEnvironmentMapManagerChanged.don(l))}{const l=()=>{const c=[...e.rotation??[0,0,0]];c[0]+=e.instances&&e.instances.length!=0?0:90,s.rotation=c};l(),this.d(e.rotationChanged.don(l));{const c=()=>{if(l(),!e.instances){s.instances=e.instances;return}s.instances=e.instances.map(u=>{const d=JSON.parse(JSON.stringify(u));return!d.rotation&&(d.rotation=[0,0,0]),d.rotation[0]+=90,d})};c(),this.ad(e.instancesChanged.don(c))}}this.ad(e.setMaterialEvent.don(l=>{s.setMaterial(l)}));{const l=()=>{const c=[...s.rotation];c[0]-=e.instances&&e.instances.length!=0?0:90,e.rotation=c};l(),this.d(s.rotationChanged.don(l))}{const l=this.dv(a.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),c=()=>{e.allowPicking&&!e.editing?s.allowPicking=!0:s.allowPicking=!1};c(),this.d(l.don(c))}const r=()=>{var l;s.url=a.ESSceneObject.context.getStrFromEnv(bc(typeof e.url=="string"?e.url:((l=e.url)==null?void 0:l.url)??a.ESGltfModel.defaults.url))};r(),this.d(e.urlChanged.don(r)),this.d(e.setNodePositionEvent.don((l,c)=>{s.setNodeTranslation(l,c)})),this.d(e.setNodeRotationEvent.don((l,c)=>{s.setNodeRotation(l,c)})),this.d(e.setNodeScaleEvent.don((l,c)=>{s.setNodeScale(l,c)})),this.d(e.printDebugInfoEvent.don(()=>{s.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,n){const{sceneObject:o,czmViewer:s,model:r}=this;return s.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(r&&Dt(s,o,n,e,r,!0),!!r):!1}};v(ka,"type",ka.register("ESCesiumViewer",a.ESGltfModel.type,ka));let hp=ka;function zy(t,i){const e=t[0]-i[0],n=t[1]-i[1],o=t[2]-i[2];return Math.sqrt(e*e+n*n+o*o)}class Qr extends a.Destroyable{constructor(e,n){super();v(this,"_pickedEvent",this.disposeVar(new a.Event));v(this,"_flyToEvent",this.disposeVar(new a.Event));v(this,"_distance",this.disposeVar(a.react(0)));v(this,"_surfaceDistance",this.disposeVar(a.react(0)));v(this,"_height",this.disposeVar(a.react(0)));v(this,"_middlePosition",this.disposeVar(a.reactArrayWithUndefined(void 0)));v(this,"_heightPosition",this.disposeVar(a.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const r=this._surfaceDistance.value=a.geoDistance(this.positions[0],this.positions[1]),l=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(r*r+l*l)}else if(this.arcType==="RHUMB"){const r=this._surfaceDistance.value=a.geoRhumbDistance(this.positions[0],this.positions[1]),l=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(r*r+l*l)}else if(this.arcType==="NONE"){const r=a.lbhToXyz(this.positions[0]),l=a.lbhToXyz(this.positions[1]);this._distance.value=zy(r,l),this._surfaceDistance.value=zy(a.lbhToXyz(this._middlePosition.value),l),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const s=this.disposeVar(a.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(s.disposableOn(o));{const r=this.disposeVar(new be(e,n));r.ground=!1,r.loop=!1,this.dispose(a.track([r,"allowPicking"],[this,"allowPicking"])),this.dispose(a.bind([r,"arcType"],[this,"arcType"])),this.dispose(a.bind([r,"color"],[this,"color"])),this.dispose(a.bind([r,"dashLength"],[this,"dashLength"])),this.dispose(a.bind([r,"dashPattern"],[this,"dashPattern"])),this.dispose(a.bind([r,"gapColor"],[this,"gapColor"])),this.dispose(a.bind([r,"hasArrow"],[this,"hasArrow"])),this.dispose(a.bind([r,"hasDash"],[this,"hasDash"])),this.dispose(a.bind([r,"show"],[this,"show"])),this.dispose(a.bind([r,"width"],[this,"width"])),this.dispose(a.bind([r,"depthTest"],[this,"depthTest"]));{r.loop=!0;const c=()=>{if(this.positions&&this.positions.length===2){const[u,d]=this.positions;r.positions=[u,d,[u[0],u[1],d[2]]]}else r.positions=void 0};c(),this.dispose(this.positionsChanged.disposableOn(c))}this.dispose(this.flyToEvent.disposableOn(c=>{e.actived&&r.flyTo(c)}));const l=this.disposeVar(new We(e,n));this.dispose(a.track([l,"shadowDom"],[this,"shadowDom"])),this.dispose(a.track([l,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(a.track([l,"show"],[this,"show"]));{const c=()=>{l.position=this.heightPosition};c(),this.dispose(this.heightPositionChanged.disposableOn(c))}{const c=()=>{l.innerHTML=ao(`高度: ${Sc(this.height)}`,0)};c(),this.dispose(this.heightChanged.disposableOn(c))}this.ad(l.pickedEvent.don(c=>{Hi(c)===0&&this.pickedEvent.emit(c)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:a.reactPositions(void 0),width:1,color:a.reactArray([1,1,1,1]),hasDash:!1,gapColor:a.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})(Qr||(Qr={})),a.extendClassProps(Qr.prototype,Qr.createDefaultProps);const Ka=class Ka extends vt{constructor(e,n){super(e,n);v(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new Qr(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:s}=this;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),this.dispose(a.bind([s,"positions"],[e,"points"]));{const r=()=>{if(e.stroked)s.width=e.strokeWidth;else{s.width=0;return}s.width=e.strokeWidth,s.color=e.strokeColor;const u=e.strokeMaterial??"normal";u==="hasDash"?(s.hasDash=!0,s.hasArrow=!1):u==="hasArrow"?(s.hasDash=!1,s.hasArrow=!0):(s.hasDash=!1,s.hasArrow=!1);const d=e.strokeStyle;if(d.material==="hasDash"&&d.materialParams)try{const p=d.materialParams;Reflect.has(p,"gapColor")&&(s.gapColor=p.gapColor??[0,0,0,0]),Reflect.has(p,"dashLength")&&(s.dashLength=p.dashLength),Reflect.has(p,"dashPattern")&&(s.dashPattern=p.dashPattern)}catch(p){console.error(p)}else s.gapColor=[0,0,0,0],s.dashLength=0,s.dashPattern=0};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(l.disposableOn(r))}this.dispose(s.pickedEvent.disposableOn(r=>{Hi(r)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(r)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmHeightMeasurement:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmHeightMeasurement:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):r.positions?(oe(s,o,n,r.positions,e),!0):!1:!1}};v(Ka,"type",Ka.register("ESCesiumViewer",a.ESHeightMeasurement.type,Ka));let up=Ka;const dp={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},Ja=class Ja extends fe{constructor(e,n){super(e,n);v(this,"_czmModelPrimitive");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new rt(n,this.sceneObject.id));const s=this._czmModelPrimitive;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(Ke([s,"rotation"],[e,"rotation"])),this.dispose(a.bind([s,"scale"],[e,"scale"])),this.d(s.readyEvent.don(y=>{e.readyEvent.emit(y)}));{const y=this.dv(a.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),_=()=>{e.allowPicking&&!e.editing?s.allowPicking=!0:s.allowPicking=!1};_(),this.d(y.don(_))}const r=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),l=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),c=a.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),u=a.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),d=a.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),p=a.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),f=()=>{switch(e.mode){case"worker":s.url=r;break;case"police":s.url=l;break;case"pedestrian":s.url=c;break;case"stranger":s.url=u;break;case"suitMan":s.url=d;break;case"suitWoman":s.url=p;break;default:s.url=r;break}};this.dispose(e.modeChanged.disposableOn(()=>{f()})),f();const g=()=>{const y=e.animation??a.ESHuman.defaults.animation;if(!e.show){s.activeAnimationsJson=void 0;return}y==="walking"?s.activeAnimationsJson=dp.czmAnimationsWalk:y==="standing"?s.activeAnimationsJson=dp.czmAnimationsStand:y==="running"&&(s.activeAnimationsJson=dp.czmAnimationsRun)};g();const m=this.ad(a.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(m.disposableOn(()=>g())),this.ad(new Pc(o,s))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmModelPrimitive:r}=this;return!s.actived||!s.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(r&&Dt(s,o,n,e,r,!0),!!r)}};v(Ja,"type",Ja.register("ESCesiumViewer",a.ESHuman.type,Ja));let pp=Ja;class Ly extends a.Destroyable{constructor(e,n){super();v(this,"_czmGeoCanvasImagePoi");v(this,"flyTo",(e,n)=>{if(this.czmGeoCanvasImagePoi.position){ne(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,jt,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoCanvasImagePoi=this.disposeVar(new _i(n));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(s=>{(e.allowPicking??!1)&&e.pickedEvent.emit(s)}));{const s=d=>{let p=d;return d.includes("inner://")&&(p="${earthsdk3-assets-script-dir}/assets/img/points/"+d.split("inner://")[1]),a.ESSceneObject.context.getStrFromEnv(bc(p))},r=()=>{const d=s(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=d,e.sizeByContent){const f=new Image;f.src=d,f.onload=()=>{o.size=[f.width,f.height]}}else{const f=e.size;o.size=[...f]}},l=this.disposeVar(a.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(l.disposableOn(()=>r())),r(),this.d(a.track([o,"zOrder"],[e,"zOrder"])),this.dispose(a.track([o,"show"],[e,"show"])),this.dispose(a.bind([o,"position"],[e,"position"])),this.ad(a.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const d=()=>{o.scale=[e.scale[1],e.scale[2]]};d(),this.dispose(e.scaleChanged.don(d))}const c=()=>{const d=e.anchor,p=e.offset;d?o.originRatioAndOffset=[...d,-p[0],-p[1]]:o.originRatioAndOffset=[0,0,0,0]},u=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(u.disposableOn(()=>c())),c(),this.dispose(o.clickEvent.disposableOn(d=>{const{offsetX:p,offsetY:f}=d,m={type:d.button===0?"leftClick":d.button===2?"rightClick":void 0,add:{mousePos:[p,f]}};e.widgetEvent.emit(m)})),this.dispose(o.hoveredChanged.disposableOn(d=>{if(d===void 0)return;const p={type:d?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(p)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class Oy extends a.Destroyable{constructor(e,n,o){super();v(this,"_czmGeoImageModel");v(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});v(this,"_isPointEvent",!1);v(this,"flyTo",(e,n)=>{if(this.czmGeoImageModel.position)return ei(this.czmViewer,this.sceneObject,n,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoImageModel=this.disposeVar(new qi(n,e.id));const s=this._czmGeoImageModel;this.ad(n.clickEvent.don(f=>{const g=f==null?void 0:f.pointerEvent;g&&(this._isPointEvent=!0,this._eventInfo={type:g.button==0?"leftClick":g.button==2?"rightClick":"leftClick",add:{mousePos:[g.offsetX,g.offsetY]}})})),this.d(e.pickedEvent.don(f=>{var g,m,y;f.screenPosition&&this._isPointEvent&&f.attachedInfo!="innerHoverEvent"&&((g=this._eventInfo.add)!=null&&g.mousePos)&&Math.abs(f.screenPosition[0]-((m=this._eventInfo.add)==null?void 0:m.mousePos[0]))<1&&Math.abs(f.screenPosition[1]-((y=this._eventInfo.add)==null?void 0:y.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),a.registerCreatedEventUpdate(this,e,()=>{const f=n.getEngineObject(e);this.ad(f.lastHoverResultChanged.don((g,m)=>{(g==null?void 0:g.sceneObject)==(m==null?void 0:m.sceneObject)||(g==null?void 0:g.sceneObject)!=e&&(m==null?void 0:m.sceneObject)!=e||(g!=null&&g.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:g==null?void 0:g.screenPosition}},g.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&g.sceneObject.id==e.id&&(s.scale=[s.scale[0]*1.5,s.scale[1]*1.5])),m!=null&&m.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:g==null?void 0:g.screenPosition}},m.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&m.sceneObject.id==e.id&&(s.scale=[s.scale[0]/1.5,s.scale[1]/1.5])))}))});const r=e.sizeByContent,c=(f=>{let g=f;return f.includes("inner://")&&(g="${earthsdk3-assets-script-dir}/assets/img/points/"+f.split("inner://")[1]),a.ESSceneObject.context.getStrFromEnv(bc(g))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),u=new Image;u.src=c,u.onload=()=>{if(r)s.size=[u.width/100,u.height/100];else{const f=e.size;s.size=[f[0]/100,f[1]/100]}},s.uri=c,this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"])),s.pixelSize=void 0,s.useAxis="XZ";{const f=()=>{s.scale=[e.scale[1],e.scale[2]]};f(),this.d(e.scaleChanged.don(f))}{const f=()=>{e.rotationType===0&&(s.rotationMode="WithProp",this.d(Ke([s,"rotation"],[e,"rotation"]))),e.rotationType===1&&(s.rotationMode="WithCamera"),e.rotationType===2&&(s.rotationMode="WithCameraOnlyZ")};f(),this.dispose(e.rotationTypeChanged.disposableOn(f))}const d=()=>{const f=e.anchor,g=e.offset;f?s.originRatioAndOffset=[...f,-g[0]/100,-g[1]/100]:s.originRatioAndOffset=[0,0,0,0]},p=this.ad(a.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(p.disposableOn(()=>d())),d()}get czmGeoImageModel(){return this._czmGeoImageModel}}const ja=class ja extends Hr{constructor(e,n){super(e,n);v(this,"_resetting");if(!n.viewer){console.warn("viewer is undefined!");return}const s=this.disposeVar(a.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new a.ObjResettingWithEvent(s,()=>this.sceneObject.screenRender?new Ly(this.sceneObject,this.czmViewer):new Oy(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,n){const{sceneObject:o,czmViewer:s,resetting:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r&&r.obj&&r.obj.flyTo(e,n),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(ja,"type",ja.register("ESCesiumViewer",a.ESImageLabel.type,ja));let fp=ja;function LA(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const el=class el extends Jt{constructor(e,n){super(e,n);v(this,"_czmImagery");if(this._czmImagery=this.dv(new Ln(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this._czmImagery;{const r=this.ad(a.reactJson(""));{const u=()=>{if(typeof e.url=="string")r.value=a.ESSceneObject.context.getStrFromEnv(e.url);else{const d=e.url;d.url=a.ESSceneObject.context.getStrFromEnv(d.url),r.value=d}};u(),this.ad(e.urlChanged.don(u))}const l=()=>{var m;if(!r.value)return;const u=(((m=e.options)==null?void 0:m.type)??"auto").toLowerCase(),d=e.options??{};let p={type:"UrlTemplateImageryProvider",url:r.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...d},f=r.value,g=typeof f=="string"?f:f.url;if(u==="auto"){const y=g.toLowerCase();if(y.startsWith("ion://")){const P=+y.substring(6);p={...d,assetId:P,type:"IonImageryProvider"}}else if(y.includes("{x}")||y.includes("{y}")||y.includes("{z}"))p.type="UrlTemplateImageryProvider";else if(y.includes("wmts"))p.type="WebMapTileServiceImageryProvider";else if(y.includes("wms"))p.type="WebMapServiceImageryProvider";else{if(g.includes("/tilemapresource.xml")){const _=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=_:f.url=_,p.url=f}p.type="TileMapServiceImageryProvider"}}else{if(u==="tms"&&g.includes("/tilemapresource.xml")){const y=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=y:f.url=y,p.url=f}else if(u==="ion"&&g.startsWith("ion://")){const _=+g.substring(6);p={...d,assetId:_,type:"IonImageryProvider"}}p.type=LA(u)}console.log("imageryProvider",p),s.imageryProvider=p};l();const c=this.dv(a.createNextAnimateFrameEvent(r.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(c.don(l))}this.d(a.track([s,"show"],[e,"show"])),this.d(a.bind([s,"alpha"],[e,"opacity"])),this.d(a.bind([s,"alpha"],[e,"czmAlpha"])),this.d(a.track([s,"splitDirection"],[e,"splitDirection"])),this.d(a.track([s,"brightness"],[e,"czmBrightness"])),this.d(a.track([s,"contrast"],[e,"czmContrast"])),this.d(a.track([s,"hue"],[e,"czmHue"])),this.d(a.track([s,"saturation"],[e,"czmSaturation"])),this.d(a.track([s,"gamma"],[e,"czmGamma"])),this.d(a.track([s,"rectangle"],[e,"rectangle"])),this.d(a.track([s,"zIndex"],[e,"zIndex"])),this.ad(a.track([s,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,czmImagery:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(r.flyTo(e&&e),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(el,"type",el.register("ESCesiumViewer",a.ESImageryLayer.type,el));let gp=el;class OA extends a.Destroyable{constructor(e,n,o,s){super();v(this,"_show");v(this,"_czmESCustomPrimitive");v(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(a.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new De(n,this._sceneObject.id)),this._czmTexture=this.dv(new ze(n));const r=e,l=this._czmESCustomPrimitive,c=this._czmTexture;this.dispose(a.track([l,"show"],[this,"show"])),this.dispose(a.track([l,"show"],[r,"show"])),this.dispose(a.track([l,"allowPicking"],[r,"allowPicking"])),this.dispose(a.track([l,"rotation"],[r,"rotation"])),this.dispose(a.track([l,"position"],[r,"position"])),this.dispose(a.track([l,"scale"],[r,"scale"])),this.ad(r.allowPickingChanged.don(()=>{l.allowPicking=r.allowPicking,l.pass=r.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const u=()=>{const p=r.size/2,f=s[0].map(z=>z*p),g=s[1].map(z=>z*p),m=s[2].map(z=>z*p),y=s[3].map(z=>z*p),_=[...f,...g,...m,...y];let P=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(P=P.reverse());const C=[0,0],S=[1,0],x=[1,1],A=[0,1];let R=[];o=="east"||o=="south"?R=[...S,...C,...A,...x]:o=="west"?R=[...S,...x,...A,...C]:o=="top"?R=[...A,...x,...S,...C]:R=[...C,...S,...x,...A],l.indexTypedArray=new Uint16Array(P),l.attributes={position:{typedArray:new Float32Array(_),componentsPerAttribute:3},st:{typedArray:new Float32Array(R),componentsPerAttribute:2}},c.uri=a.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${r.mode}/${o}.${r.mode!="blueSky"?"png":"jpg"}`);const O=n.getCameraInfo();if(O!=null){const B=a.getDistancesFromPositions([r.position,O.position],"NONE")[0]/(r.size/2*r.autoOpacityFactor);this.changeOpacity(r.autoFollow?1:B)}const N=l.computeLocalAxisedBoundingBoxFromAttribute("position");if(!N)return;const{min:V,max:U}=N;l.setLocalAxisedBoundingBox(V,U)};u();const d=this.disposeVar(a.createNextAnimateFrameEvent(r.sizeChanged,r.modeChanged));this.dispose(d.disposableOn(u))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class NA extends a.Destroyable{constructor(i,e,n){if(super(),!e.viewer)return;let o=!0,s;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{r()}));function r(){var c;if(!((c=e.viewer)!=null&&c.camera))return;const l=e.getCameraInfo();if(l!=null&&(s==null||s.position[0]!=l.position[0]||s.position[1]!=l.position[1]||s.position[2]!=l.position[2]||s.rotation[0]!=l.rotation[0]||s.rotation[1]!=l.rotation[1]||s.rotation[2]!=l.rotation[2])){s=l;const d=a.getDistancesFromPositions([i.position,s.position],"NONE")[0]/(i.size/2*i.autoOpacityFactor);i.autoFollow?(i.position=s.position,o&&(o=!1,n.forEach(p=>{p.changeOpacity(1)}))):n.forEach(p=>{p.changeOpacity(d)})}}r()}}const Ye=class Ye extends fe{constructor(e,n){super(e,n);v(this,"_czmSkyBoxComponents",[]);if(!n.viewer){console.warn("viewer is undefined!");return}!Ye._defaultLocalBox&&Ye._firstLoad&&(Ye._firstLoad=!1,Ye._defaultLocalBox=n.xbsjLocalBoxSources),Ye._eSLocalSkyBoxArr.push(e),this.d(()=>{Ye._eSLocalSkyBoxArr.includes(e)&&Ye._eSLocalSkyBoxArr.splice(Ye._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const s={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const r in s)if(Object.prototype.hasOwnProperty.call(s,r)){const l=s[r];this._czmSkyBoxComponents.push(this.dv(new OA(e,n,r,l)))}{const r=this.disposeVar(a.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new a.ObjResettingWithEvent(r,()=>(this.ChangeAutoFollow(),new NA(e,n,this._czmSkyBoxComponents))))}{const r=()=>{this.ChangeAutoFollow()},l=this.disposeVar(a.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(l.disposableOn(r))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let n=Ye._eSLocalSkyBoxArr.length-1;n>=0;n--){const o=Ye._eSLocalSkyBoxArr[n];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}n==0&&(e.xbsjLocalBoxSources=Ye._defaultLocalBox)}Ye._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Ye._defaultLocalBox)}flyTo(e,n){const{sceneObject:o,czmViewer:s}=this;if(!s.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,n);{const r=o.size??a.ESLocalSkyBox.defaults.size;return o.position?(ei(s,o,n,o.position,r,e,!0),!0):!1}}};v(Ye,"type",Ye.register("ESCesiumViewer",a.ESLocalSkyBox.type,Ye)),v(Ye,"_defaultLocalBox"),v(Ye,"_firstLoad",!0),v(Ye,"_eSLocalSkyBoxArr",[]);let mp=Ye;const li=class li extends fe{constructor(e,n){super(e,n);v(this,"_geoCustomDivPoi");v(this,"_textFunc",this.disposeVar(a.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new We(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const s=this.geoCustomDivPoi;this.dispose(a.track([s,"show"],[e,"show"])),this.dispose(a.bind([s,"position"],[e,"position"])),this.dispose(a.track([s,"allowPicking"],[e,"allowPicking"]));{this.dispose(s.pickedEvent.disposableOn(r=>{(e.allowPicking??a.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(r)})),this.dispose(s.innerHtmlMounted.disposableOn(r=>{const l=r.firstElementChild;l&&(l.style.pointerEvents="auto",l.style.cursor="default",l.onclick=c=>s.pickFromDiv(l,{type:"viewerPicking",pointerEvent:c}))}));{const r=()=>{if(!e.position)return;const c=(this.textFunc??li.defaultTextFunc_度格式)(e.position);s.innerHTML=ao(c)};r();const l=this.disposeVar(a.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(l.disposableOn(r))}{const r=()=>{n.lonLatFormat??(n.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=n.lonLatFormat=="DECIMAL_DEGREE"?li.defaultTextFunc_度格式:n.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?li.defaultTextFunc_度分格式:li.defaultTextFunc_度分秒格式};r(),this.d(n.lonLatFormatChanged.don(()=>{r()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,n){const{sceneObject:o,czmViewer:s,geoCustomDivPoi:r}=this;return s.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(r.flyTo(e),o.flyOverEvent.emit(n,"over",s),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:s,geoCustomDivPoi:r}=this;return s.actived?o.flyInParam?super.flyIn(e,n):(r.flyTo(e),o.flyOverEvent.emit(n,"over",s),!0):!1}};v(li,"type",li.register("ESCesiumViewer",a.ESLocationMeasurement.type,li)),v(li,"defaultTextFunc_度格式",e=>{if(!e)return"";const[n=0,o=0,s=0]=e;return`经度: ${n.toFixed(5)}°
|
|
1254
1254
|
纬度: ${o.toFixed(5)}°
|
|
1255
1255
|
高度: ${s.toFixed(2)}m`}),v(li,"defaultTextFunc_度分格式",e=>{if(!e)return"";const[n,o,s]=bu(e,!0);return`经度: ${n}
|
|
1256
1256
|
纬度: ${o}
|
|
@@ -2291,10 +2291,10 @@ async function initCesiumViewer(container, czmViewer) {
|
|
|
2291
2291
|
`;function F4(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
|
|
2292
2292
|
github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
|
|
2293
2293
|
gitee地址:${t}
|
|
2294
|
-
`;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const st=class st extends a.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(a.react(0)));v(this,"_viewer",this.dv(a.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(a.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));v(this,"_editingSystem",Wh);v(this,"_moveObjectsProcess",this.ad(PC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new fF(this)),this.ad(new gF(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new wF(this)})),this._viewerLegend=this.dv(new A4(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Fg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new vL(this.subContainer,this,o=>this._viewer.value=o,n.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&&kt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],st.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=Jo(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;if(!n)return;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),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=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,st.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await bm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Le(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=st.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!st.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=st.latestDefaultAccessToken}positionsToLocalPositions(e,n){return It(e,n)}localPositionsToPositions(e,n){return yn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Le(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=st.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",R4,D4,!0),new a.FunctionProperty([],()=>st.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(st,"type",st.register("ESCesiumViewer",st)),v(st,"getCesiumIonToken",F4),v(st,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(st,"latestDefaultAccessToken"),v(st,"ObjectsToExcludeWrapper",yF),v(st,"defaults",{...a.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:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.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}),v(st,"getHeightsScartchCarto",new h.Cartographic);let Te=st;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...I4()})})(Te||(Te={})),a.extendClassProps(Te.prototype,Te.createDefaultProps),M.copyright=void 0;try{const t="earthsdk3-cesium",i="3.5.0-beta.19",e="2025-10-23T01:49:54.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="6d8cabe0d96dbee0d9cdcce3808aae369317c4c5",l=((Date.now()-1761184194e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2294
|
+
`;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const st=class st extends a.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(a.react(0)));v(this,"_viewer",this.dv(a.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(a.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(a.react(0)));v(this,"_editingSystem",Wh);v(this,"_moveObjectsProcess",this.ad(PC()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new fF(this)),this.ad(new gF(this)),this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new wF(this)})),this._viewerLegend=this.dv(new A4(this)),this._viewerInstance=this.dv(new a.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Fg(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=te([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new a.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new vL(this.subContainer,this,o=>this._viewer.value=o,n.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&&kt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:s}=this.extensions;return await s.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],st.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}calcFlyToParam(e){if(!this.viewer)return;const{camera:n}=this.viewer;if(!n||!e)return;const o=h.Cartesian3.fromDegrees(...e),s=h.Transforms.eastNorthUpToFixedFrame(o),r=h.Matrix4.inverse(s,new h.Matrix4),l=h.Matrix4.multiplyByPoint(r,n.positionWC,new h.Cartesian3),c=h.Cartesian3.magnitude(l);let u=-Math.asin(l.z/c);u=h.Math.toDegrees(u);let d=h.Math.PI_OVER_TWO-Math.atan(l.y/l.x);l.x>0&&(d+=l.y<0?-h.Math.PI:h.Math.PI),d=h.Math.toDegrees(d);const p=Jo(n),f=p[0]-d,g=p[1]-u;return{distance:c,heading:d,pitch:u,flyDuration:1,hDelta:f,pDelta:g}}flyIn(e,n,o,s="default"){var c;if(!n)return;const r={position:e,rotation:n,duration:(o??1)*1e3},l=(c=this.viewer)==null?void 0:c.camera;return l&&Er(l,r,s)}flyTo(e,n,o="default"){var g;const{distance:s,heading:r,pitch:l,flyDuration:c,hDelta:u,pDelta:d}=e,p={position:n,viewDistance:s,rotation:[r,l,0],duration:c*1e3,hdelta:u,pdelta:d},f=(g=this.viewer)==null?void 0:g.camera;return f&&Er(f,p,o)}flyToBoundingSphere(e,n,o=1){var p;const s=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],r=a.getGeoBoundingSphereFromPositions(s);if(!r)return;const{center:l,radius:c}=r,u={position:l,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},d=(p=this.viewer)==null?void 0:p.camera;return d&&Er(d,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Gt(e),rotation:Jo(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var s,r;(r=(s=this._viewerInstance)==null?void 0:s.obj)==null||r.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,s,r,l){var c,u;(u=(c=this._viewerInstance)==null?void 0:c.obj)==null||u.navigationManager.changeToLine(e,n,o,s,r,l),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,s,r),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,s,r){var l,c;(c=(l=this._viewerInstance)==null?void 0:l.obj)==null||c.navigationManager.changeToFollow(e,n,o,s,r),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=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const s=h.Cartographic.fromDegrees(e,n,void 0,st.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(s)??null}async getHeightsByLonLats(e,n){const o=e.map(r=>this.getHeightByLonLat(...r));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await bm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Le(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const s=e.components.main??e;s&&n!=null&&(s.editingID=`${o.callSource}_${a.createGuid()}`,this._editingSystem.create(this,s,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=a.createGuid();for(let s=0;s<e.length;s++){const r=e[s],l=r.components.main??r;l.editingID=o,l&&n.push(l)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=st.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!st.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=st.latestDefaultAccessToken}positionsToLocalPositions(e,n){return It(e,n)}localPositionsToPositions(e,n){return yn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Le(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const s=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!s||s.x<0||s.y<0)}getESProperties(){const e={...super.getESProperties()},n=st.defaults;return{...e,more:[...e.more,new a.GroupProperty([],"通用","通用"),new a.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",R4,D4,!0),new a.FunctionProperty([],()=>st.getCesiumIonToken(),[],"获取官方token"),new a.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new a.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new a.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new a.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new a.GroupProperty([],"Viewer","Viewer"),new a.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new a.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new a.BooleanProperty([this,"shadows"]),new a.GroupProperty([],"比例尺","比例尺(Legend)"),new a.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new a.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new a.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new a.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new a.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new a.GroupProperty([],"场景","场景(Scene)"),new a.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new a.GroupProperty([],"Globe","Globe"),new a.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new a.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new a.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new a.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new a.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new a.BooleanProperty([this,"sceneGlobeShowSkirts"]),new a.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new a.ColorProperty([this,"sceneGlobeBaseColor"]),new a.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new a.JsonProperty([this,"sceneGlobeClippingPlanes"]),new a.StringProperty([this,"sceneGlobeClippingPlanesId"]),new a.JsonProperty([this,"sceneGlobeClippingPolygons"]),new a.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new a.GroupProperty([],"underground","underground"),new a.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new a.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new a.GroupProperty([],"Translucency","Translucency"),new a.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new a.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new a.GroupProperty([],"Sun","Sun"),new a.BooleanProperty([this,"sun"],"sun",n.sun,!0),new a.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new a.GroupProperty([],"Moon","Moon"),new a.BooleanProperty([this,"moon"],"moon",n.moon,!0),new a.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new a.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new a.GroupProperty([],"SkyBox","SkyBox"),new a.BooleanProperty([this,"sceneSkyBoxShow"]),new a.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new a.GroupProperty([],"Background","Background"),new a.BooleanProperty([this,"xbsjUseBackground"]),new a.StringProperty([this,"xbsjBackgroundImageUri"]),new a.ColorProperty([this,"xbsjBackgroundColor"]),new a.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new a.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new a.ColorProperty([this,"sceneBackgroundColor"]),new a.GroupProperty([],"Fog","Fog"),new a.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new a.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new a.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new a.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new a.GroupProperty([],"Sscc","Sscc"),new a.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new a.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new a.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new a.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new a.GroupProperty([],"后处理","后处理"),new a.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new a.GroupProperty([],"环境遮蔽","环境遮蔽"),new a.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new a.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new a.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new a.GroupProperty([],"Bloom","Bloom"),new a.BooleanProperty([this,"scenePpsBloomEnabled"]),new a.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new a.NumberProperty([this,"scenePpsBloomContrast"]),new a.NumberProperty([this,"scenePpsBloomBrightness"]),new a.NumberProperty([this,"scenePpsBloomDelta"]),new a.NumberProperty([this,"scenePpsBloomSigma"]),new a.NumberProperty([this,"scenePpsBloomStepSize"]),new a.GroupProperty([],"调试","调试"),new a.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new a.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new a.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new a.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new a.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new a.GroupProperty([],"Inspector","Inspector"),new a.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new a.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new a.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(st,"type",st.register("ESCesiumViewer",st)),v(st,"getCesiumIonToken",F4),v(st,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(st,"latestDefaultAccessToken"),v(st,"ObjectsToExcludeWrapper",yF),v(st,"defaults",{...a.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:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.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}),v(st,"getHeightsScartchCarto",new h.Cartographic);let Te=st;(t=>{t.createDefaultProps=()=>({...a.ESViewer.createDefaultProps(),...I4()})})(Te||(Te={})),a.extendClassProps(Te.prototype,Te.createDefaultProps),M.copyright=void 0;try{const t="earthsdk3-cesium",i="3.5.0-beta.20",e="2025-10-23T10:01:13.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="d1e7c72f07f84b9908276e9d5e2728f3852f06c6",l=((Date.now()-1761213673e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${s.slice(0,8)}.${e} (距今${l}个小时)
|
|
2295
2295
|
%c${o?o+`
|
|
2296
2296
|
`:""}当前网站正在使用${t},此软件版权归${n}所有
|
|
2297
|
-
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","
|
|
2297
|
+
`;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","d1e7c72f07f84b9908276e9d5e2728f3852f06c6")},get info(){return c},get date(){return"2025-10-23T10:01:13.000Z"},get author(){return"suplyang"},get version(){return"3.5.0-beta.20"},get name(){return"earthsdk3-cesium"},get commitId(){return"d1e7c72f07f84b9908276e9d5e2728f3852f06c6"},print(){console.info(this.info,`
|
|
2298
2298
|
font-size: 18px;
|
|
2299
2299
|
font-weight: 1000;
|
|
2300
2300
|
line-height: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/CzmObjects/general/CzmESGltfModel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAqB,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD,qBAAa,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,SAAQ,uBAAuB,CAAC,CAAC,CAAC;IAC/F,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAwF;IAC5G,OAAO,CAAC,SAAS,CAAC;IAClB,IAAI,KAAK,QAA4B;gBAEzB,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,cAAc;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/CzmObjects/general/CzmESGltfModel/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiB,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAqB,MAAM,qBAAqB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD,qBAAa,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,SAAQ,uBAAuB,CAAC,CAAC,CAAC;IAC/F,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAwF;IAC5G,OAAO,CAAC,SAAS,CAAC;IAClB,IAAI,KAAK,QAA4B;gBAEzB,WAAW,EAAE,CAAC,EAAE,SAAS,EAAE,cAAc;IAkH5C,KAAK,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO;CAWpE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "earthsdk3-cesium",
|
|
3
|
-
"version": "3.5.0-beta.
|
|
3
|
+
"version": "3.5.0-beta.20",
|
|
4
4
|
"description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/earthsdk3-cesium.umd.cjs",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"cesium": "1.134.1",
|
|
41
|
-
"earthsdk3": "3.5.0-beta.
|
|
41
|
+
"earthsdk3": "3.5.0-beta.19"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@types/delaunator": "^5.0.2",
|