leiting-bim 2.1.62 → 2.1.65

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.

Potentially problematic release.


This version of leiting-bim might be problematic. Click here for more details.

@@ -114,7 +114,7 @@
114
114
  // 通常不需要 clamp,除非开启 HDR 后期望超亮,但负值需要避免
115
115
  material.diffuse = max(material.diffuse, vec3(0.0));
116
116
  }
117
- `});p.isModelAdjustment=!0,f.customShader=p}else e.brightness!==void 0&&e.brightness!==1&&!f.style&&(f.style=new i.Cesium3DTileStyle({color:`color('white') * ${e.brightness}`}))}}setModelBrightness(e){this.setModelColorAdjustment({brightness:e})}_defaultSkyBox=null;_updateLightDirection=e=>{e.light instanceof this.cesium.DirectionalLight&&(e.light.direction=e.camera.directionWC)};setEnvironmentMapEnable(e){this.is2d||(e?(this.viewer.scene.light=new this.cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC}),this.viewer.scene.preRender.addEventListener(this._updateLightDirection)):(this._defaultSkyBox&&(this.viewer.scene.skyBox=this._defaultSkyBox),this.viewer.scene.preRender.removeEventListener(this._updateLightDirection),this.viewer.scene.light=new this.cesium.SunLight),this.viewer.scene.imageBasedLighting&&(this.viewer.scene.imageBasedLighting.imageBasedLightingFactor=e?new this.cesium.Cartesian2(2,2):new this.cesium.Cartesian2(1,1)))}setAmbientOcclusion(e){if(this.is2d)return;const t=this.viewer.scene;if(!t||!t.postProcessStages||!t.postProcessStages.ambientOcclusion)return;const i=t.postProcessStages.ambientOcclusion;i.enabled=e,e&&(i.uniforms.ambientOcclusionOnly=!1,i.uniforms.intensity=3,i.uniforms.bias=.1,i.uniforms.lengthCap=.03,i.uniforms.stepSize=1,i.uniforms.blurStepSize=.86)}setCollisionDetection(e){if(this.is2d){this.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1;return}const t=this.viewer.scene.screenSpaceCameraController;t.enableCollisionDetection=e,e||t.minimumZoomDistance<1&&(t.minimumZoomDistance=1)}setMouseHabit(e){if(this.is2d)return;const t=this.viewer.scene.screenSpaceCameraController;t.enableTranslate=!0,t.enableRotate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!1,t.lookEventTypes=[],e===1?(t.rotateEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.MIDDLE_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.LEFT_DRAG]):(t.rotateEventTypes=[this.cesium.CameraEventType.LEFT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.MIDDLE_DRAG])}}class R0{cesium;viewer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}getCameraView(){const e=this.viewer.camera;return{position:{x:e.position.x,y:e.position.y,z:e.position.z},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:i,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(i.heading,i.pitch,i.roll);!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}getCurrentCameraPositionAndTarget(){const e=this.getCameraView();return{position:e.position,target:{heading:e.orientation.heading,pitch:e.orientation.pitch,roll:e.orientation.roll},duration:e.duration}}setCameraView(e){const t=e.target||e.orientation||{};this.flyToCameraView({position:{x:Number(e.position.x),y:Number(e.position.y),z:Number(e.position.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}}function O0(n){const{container:e,appContext:t,methods:i,viewerOptions:s,options:o,callbacks:r}=n,l=new gi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${Dg()}`;const c={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},u=t?.config?.globalProperties?.$leitingBimOptions,f={...c,...u?.viewerOptions??{},...s??{}},p=new a.Viewer(e,f);p.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let h=i;if(!h&&u&&(u.methods||(u.methods={}),h=u.methods),h){const A=new Yg({cesium:a,viewer:p,options:o,callbacks:r}),C=new Da({cesium:a,viewer:p}),g=new F0({cesium:a,viewer:p}),y=new Vg({cesium:a,viewer:p}),E=new R0({cesium:a,viewer:p});let I;const M=new tc({cesium:a,viewer:p});o&&(o.globe!==void 0&&g.setGlobeEnvironmentVisible(o.globe),o.terrain!==void 0&&g.setTerrainEnable(o.terrain),o.depthTest!==void 0&&g.setDepthTestEnable(o.depthTest),o.mapProvider&&o.mode!=="2d"&&g.changeBaseMap(o.mapProvider,{token:o.tiandituToken,layerType:o.tiandituLayerType,showAnnotation:o.tiandituShowLabel,url:o.arcgisUrl}),o.shadows!==void 0&&g.setShadowsEnable(o.shadows),o.environmentMap!==void 0&&g.setEnvironmentMapEnable(o.environmentMap),o.ambientOcclusion!==void 0&&g.setAmbientOcclusion(o.ambientOcclusion),o.time!==void 0&&g.setTime(o.time),o.brightness!==void 0&&g.setModelBrightness(o.brightness),o.backgroundColor!==void 0&&g.setBackgroundColor(o.backgroundColor),o.collision!==void 0&&g.setCollisionDetection(o.collision),o.mouseHabit!==void 0&&g.setMouseHabit(o.mouseHabit)),o&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),g.setCadMode("2d"),I=new ec({cesium:a,viewer:p})),C.events.on("tilesetLoaded",m=>{A.baseCompt.attachTileset(m,A.baseCompt.selectedColor),A.baseSection.attachTileset(m,m.leiting?.model?.modelId),h&&h.tilesLoad3dTiles&&h.tilesLoad3dTiles(m),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(m.leiting)}),C.events.on("loadingStatus",m=>{h&&h.onLoadingStatus&&h.onLoadingStatus(m)}),C.events.on("mountAll3Dtiles",({modelList:m,mapTileset:F})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(m),h?.mountAll3Dtiles&&h.mountAll3Dtiles(F)}),y.events.on("mountAllCad",m=>{o?.mountAllCad&&o.mountAllCad(m),h?.mountAllCad&&h.mountAllCad(m)}),A.baseCompt.loadNodeDetailsForModel=m=>C.loadNodeDetailsForModel(m),A.baseCompt.selectionChange(m=>{m.length!==0&&(o?.selectionChange&&o.selectionChange(m),h?.selectionChange&&h.selectionChange(m))}),h.onSearchComponent=m=>{o?.searchComponent&&o.searchComponent(m),h?.searchComponent&&h.searchComponent(m)};const k=h.saveRegion;h.saveRegion=m=>{o?.saveRegion&&o.saveRegion(m),k&&k!==o?.saveRegion&&k(m)};const S=h.saveCadCalibration;h.saveCadCalibration=m=>{o?.saveCadCalibration&&o.saveCadCalibration(m),S&&S!==o?.saveCadCalibration&&S(m)};const x=h.saveCadRegion;h.saveCadRegion=m=>{o?.saveCadRegion&&o.saveCadRegion(m),x&&x!==o?.saveCadRegion&&x(m)},h.getCesium=()=>a,h.getViewer=()=>p,h.getAnnotationInstance=()=>I,h.getMeasureInstance=()=>M,h.flyToCamera=m=>{E.setCameraView(m)},h.flyTo=h.flyToCamera,h.addDebugPoint=(m,F,T=0)=>{p.entities.add({position:a.Cartesian3.fromDegrees(m,F,T),point:{pixelSize:10,color:a.Color.RED}})},h.addPoint=h.addDebugPoint,h.toggleDebugLabels=()=>A.enableTestLabel(),h.enableTestLabel=h.toggleDebugLabels,h.setCanvasBackground=m=>g.setBackgroundColor(m),h.setBackgroundColor=h.setCanvasBackground,h.setAntiAliasing=m=>A.enableCesiumFXAA(m),h.enableCesiumFXAA=h.setAntiAliasing,h.setSceneVisibility=m=>A.setSceneOptions(m),h.setSceneOptions=h.setSceneVisibility,h.getCameraState=()=>E.getCameraView(),h.getCameraInfo=h.getCameraState,h.restoreCameraState=m=>E.flyToCameraView(m),h.flyToCameraView=h.restoreCameraState,h.getCameraPositionTarget=()=>E.getCurrentCameraPositionAndTarget(),h.getCurrentCameraPositionAndTarget=h.getCameraPositionTarget,h.setCameraLookAt=m=>E.setCameraView(m),h.setCameraView=h.setCameraLookAt,h.captureScreenshot=()=>{const m=p.scene.canvas;return p.render(),m.toDataURL("image/png")},h.getImageBase64=h.captureScreenshot,h.captureDomScreenshot=(m,F)=>A.getSnapDomSImageBase64(m,F),h.getSnapDomSImageBase64=h.captureDomScreenshot,h.addModels=m=>C.addModels(m),h.add3DtilesModel=h.addModels,h.addObliquePhotography=m=>C.addOSGB(m),h.addOSGB=h.addObliquePhotography,h.adjustOSGBModelMatrix=m=>C.updateOSGBMatrix(m),h.updateOSGBMatrix=h.adjustOSGBModelMatrix,h.setModelVisibility=m=>C.showModels(m),h.showModels=h.setModelVisibility,h.showTileset=h.setModelVisibility,h.removeModels=m=>C.deleteModels(m),h.deleteModels=h.removeModels,h.clearAllModels=()=>{C.deleteAllModels(),l.emit("deleteAllModels")},h.deleteAllModelList=h.clearAllModels,h.deleteAllModels=h.clearAllModels,h.flyToModel=m=>C.flyToTileset(m),h.flyToTileset=h.flyToModel,h.flyToByModelId=h.flyToModel,h.setModelBrightness=m=>A.updateModelEffect(m),h.updateModelEffect=h.setModelBrightness,h.getAllTilesets=()=>C.getMapTileset(),h.getMapTileset=h.getAllTilesets,h.getCurrentModelId=()=>C.getBIMmodelId(),h.getBIMmodelId=h.getCurrentModelId,h.getLoadedModels=()=>C.getModelList(),h.getModelList=h.getLoadedModels,h.loadModelStructure=m=>C.loadTreeForModel(m),h.loadTreeForModel=h.loadModelStructure,h.loadModelDetails=m=>C.loadNodeDetailsForModel(m),h.loadNodeDetailsForModel=h.loadModelDetails,h.setMapTileset=m=>C.setMapTileset(m),h.setCurrentModelId=m=>C.setBIMmodelId(m),h.setBIMmodelId=h.setCurrentModelId,h.setModelList=m=>C.setModelList(m),h.highlightComponents=(m,F={})=>A.baseCompt.setSelectColorUserModelCpt(m,F),h.setSelectColorUserModelCpt=h.highlightComponents,A.baseCompt.setLoadNodeDetailsCallback(m=>C.loadNodeDetailsForModel(m)),h.highlightAllComponents=m=>A.baseCompt.setAllSelectColorUserModelCpt(m),h.setAllSelectColorUserModelCpt=h.highlightAllComponents,h.setSelectColorUserModelCptByClear=()=>A.baseCompt.clearAllHaveSelected(),h.clearSelectColorUserModelCpt=()=>A.baseCompt.clearAllHaveSelected(),h.selectComponents=(m,F)=>A.baseCompt.setSelectColorUserModelCpt(m,F??{rank:0}),h.setSelecteds=h.selectComponents,h.setSelectionColor=(m,F,T,P)=>A.baseCompt.setSelectedColorRgba(m,F,T,P),h.setSelectedColor=h.setSelectionColor,h.clearSelection=()=>A.baseCompt.clearAllHaveSelected(),h.clearAllHaveSelected=h.clearSelection,h.getSelectedComponents=m=>A.baseCompt.getSelected(m),h.getSelected=h.getSelectedComponents,h.onSelectionChange=m=>{A.baseCompt.selectionChange(m)},h.selectionChange=h.onSelectionChange,h.flyToComponents=m=>A.baseCompt.flyToObjects(m),h.flyToObjects=h.flyToComponents,h.setConstructionData=async m=>{if(m&&Array.isArray(m)){const F=new Set;m.forEach(T=>{T.mergeCpts&&Array.isArray(T.mergeCpts)&&T.mergeCpts.forEach(P=>{P.modelId&&F.add(P.modelId)})}),F.size>0&&await Promise.all(Array.from(F).map(T=>h.loadNodeDetailsForModel(T)))}A.baseCompt.setAllConstructionProgressTracking(m)},h.setAllConstructionProgressTracking=h.setConstructionData,h.startConstructionSimulation=()=>A.baseCompt.enableConstructionProgressTracking(),h.enableAllConstructionProgressTracking=h.startConstructionSimulation,h.stopConstructionSimulation=()=>A.baseCompt.disableConstructionProgressTracking(),h.disableConstructionProgressTracking=h.stopConstructionSimulation,h.disableAllConstructionProgressTracking=h.stopConstructionSimulation,h.resetConstructionSimulation=()=>A.baseCompt.freshConstructionProgressTracking(),h.freshConstructionProgressTracking=h.resetConstructionSimulation,h.restartConstructionSimulation=()=>A.baseCompt.reStartAnimation(),h.reStartAnimation=h.restartConstructionSimulation,h.resumeFlyTo=()=>A.baseCompt.resumeFlyTo(),h.pauseConstructionSimulation=()=>A.baseCompt.pauseFlyTo(),h.pauseFlyTo=h.pauseConstructionSimulation,h.pauseAnimation=h.pauseConstructionSimulation,h.resumeConstructionSimulation=()=>A.baseCompt.resumeFlyTo(),h.resumeAnimation=h.resumeConstructionSimulation,h.setComponentsVisibility=m=>A.baseCompt.setComponentVisibility(m),h.setElementsListVisible=h.setComponentsVisibility,h.setAllComponentsVisibility=m=>A.baseCompt.setAllComponentsVisibility(m),h.setAllElementsVisible=h.setAllComponentsVisibility,h.getComponentsByVisibility=m=>A.baseCompt.getComponentsByVisibility(m),h.getElementsVisible=h.getComponentsByVisibility,h.setComponentVisibility=h.setComponentsVisibility,h.enableSectioning=(m,F)=>A.baseSection.open(m,F),h.openSection=h.enableSectioning,h.disableSectioning=m=>A.baseSection.close(m),h.closeSection=h.disableSectioning,h.updateSectionBox=m=>A.baseSection.updateRange(m),h.updateSectionRange=h.updateSectionBox,h.getSectionBox=()=>A.baseSection.getRange(),h.getSectionRange=h.getSectionBox,h.fitSectionToModel=()=>A.baseSection.fitToModels(),h.fitToModels=h.fitSectionToModel,h.setSectionBoxVisibility=m=>A.baseSection.setBoxVisibility(m),h.startFirstPersonMode=()=>{A.baseCompt.disableSelection(),A.basePlayer.openPlayer()},h.openPlayer=h.startFirstPersonMode,h.stopFirstPersonMode=()=>{A.basePlayer.closePlayer(),A.baseCompt.enableSelection()},h.closePlayer=h.stopFirstPersonMode,h.setPlayerPosition=m=>A.basePlayer.setPersonPosition(m),h.setPersonPosition=h.setPlayerPosition,h.setWalkSpeed=m=>A.basePlayer.setSpeed({speed:m}),h.setPlayerSpeed=h.setWalkSpeed,h.setPlayerConfig=m=>A.basePlayer.setParams(m),h.setPlayerParams=h.setPlayerConfig,h.setPlayerAction=(m,F)=>A.basePlayer.setMoveState(m,F),h.setPlayerMoveState=h.setPlayerAction,h.bindPlayerControls=m=>A.basePlayer.bindUiKeys(m),h.bindPlayerUiKeys=h.bindPlayerControls,h.setGlobeVisibility=m=>g.setGlobeEnvironmentVisible(m),h.setGlobeEnvironmentVisible=h.setGlobeVisibility,h.setTerrainVisibility=m=>g.setTerrainEnable(m),h.setTerrainEnable=h.setTerrainVisibility,h.setDepthTest=m=>g.setDepthTestEnable(m),h.setDepthTestEnable=h.setDepthTest,h.setBaseMap=(m,F)=>g.changeBaseMap(m,F),h.changeBaseMap=h.setBaseMap,h.setShadowVisibility=m=>g.setShadowsEnable(m),h.setShadowsEnable=h.setShadowVisibility,h.setEnvironmentMapVisibility=m=>g.setEnvironmentMapEnable(m),h.setEnvironmentMapEnable=h.setEnvironmentMapVisibility,h.setAOVisibility=m=>g.setAmbientOcclusion(m),h.setAmbientOcclusion=h.setAOVisibility,h.setBackgroundColor=m=>g.setGlobeColor(m),h.setGlobeColor=h.setBackgroundColor,h.setWorldTime=m=>g.setTime(m),h.setTime=h.setWorldTime,h.setModelBrightness=m=>g.setModelBrightness(m),h.adjustModelColor=m=>g.setModelColorAdjustment(m),h.setModelColorAdjustment=h.adjustModelColor,h.setShadowIntensity=m=>{g.setShadowDarkness?g.setShadowDarkness(m):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},h.setShadowDarkness=h.setShadowIntensity,h.switchSceneMode=async m=>{const F=m?"2d":"3d";await g.setCadMode(F),m&&!I&&(I=new ec({cesium:a,viewer:p})),l.emit("setMode",F)},h.setSceneMode=h.switchSceneMode,h.set2d=m=>h.switchSceneMode(m),h.is2dMode=()=>g.is2d,h.setMouseControlMode=m=>g.setMouseHabit(m),h.setMouseHabit=h.setMouseControlMode,h.setCollisionEnabled=m=>g.setCollisionDetection(m),h.setCollisionDetection=h.setCollisionEnabled,h.searchAndLocate=(m,F)=>g.searchLocation(m,F),h.searchLocation=h.searchAndLocate,h.setGisOptions=m=>{m.globe!==void 0&&g.setGlobeEnvironmentVisible(m.globe),m.elevation!==void 0&&g.setTerrainEnable(m.elevation),m.depthTestAgainstTerrain!==void 0&&g.setDepthTestEnable(m.depthTestAgainstTerrain),m.rendering!==void 0&&g.setAmbientOcclusion(m.rendering)},h.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),h.setConfigure=m=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",m)},h.addCadModel=m=>{const F={...m};return F.files&&!F.fileNames&&(F.fileNames=F.files),F.fileNames||(F.fileNames=[]),y.addDxfModel(F)},h.addDxfModel=h.addCadModel,h.deleteCad=m=>y.deleteCad(m),h.deleteAllCad=()=>y.deleteAllCad(),h.showCadModel=m=>y.showJson(m),h.showDxfModel=h.showCadModel,h.showCadLayer=m=>y.showJsonByLayer(m),h.showDxfLayer=h.showCadLayer,h.flyToCadModel=(m={})=>y.flyToCadModel(m),h.getCadModels=m=>y.getDxfModels(m),h.getDxfModels=h.getCadModels,h.getCadLayers=m=>y.getMapLayers(m),h.getDxfLayers=h.getCadLayers,h.getCadModelId=()=>y.getModelId(),h.setCadOpen=m=>y.setDxfOpen(m),h.setDxfOpen=h.setCadOpen,h.getCadOpen=()=>y.getDxfOpen(),h.getDxfOpen=h.getCadOpen,h.adjustCadModel=m=>y.adjustingModelByCad(m),h.adjustingModelByCad=h.adjustCadModel,h.saveAnnotations=()=>{let m=null;return I&&(m=I.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(m),m},h.loadAnnotations=m=>I?I.loadAnnotations(m):!1,h.flyToTopView=()=>{y.flyToCadModel()},h.menuEvents=l,h.addMenuItems=m=>{l.emit("insertMenu",m)},h.insertMenu=h.addMenuItems,h.filterMenuItems=m=>{l.emit("setMenuListFilter",m)},h.setMenuListFilter=h.filterMenuItems,h.setMenuVisibility=m=>{l.emit("showMenu",m)},h.showMenu=h.setMenuVisibility,h.setPanelVisibility=(m,F)=>{l.emit("setMenuActive",m,F)},h.setMenuActive=h.setPanelVisibility,h.addContextMenuItems=m=>{console.warn("addContextMenuItems is not initialized yet. Please wait for LeitingBIM component to mount.",m)},h.insertContextMenu=h.addContextMenuItems,h.removeContextMenuItems=m=>{console.warn("removeContextMenuItems is not initialized yet.",m)},h.deleteContextMenu=h.removeContextMenuItems,h.closeContextMenu=()=>{console.warn("closeContextMenu is not initialized yet.")},h.hideContextMenu=h.closeContextMenu,h.getModelTree=()=>{const m=[],F=C.getMapTileset();return Object.keys(F).forEach(T=>{const P=F[T];if(P&&P.leiting&&P.leiting.tree){const L=P.leiting.tree;Array.isArray(L)?m.push(...L):m.push(L)}}),m},h.getTree=h.getModelTree,h.getAllComponentDetails=()=>{const m=C.getMapTileset(),F={},T=[];try{Object.keys(m).forEach(P=>{const L=m[P];if(!L||!L.leiting)return;const G=L.leiting,N=G.node,b=G.model.formData,w=G.box;if(!N||!N.nodeExtras)return;const v=G.model.modelId;F[v]=N.nodeExtras;const B=N.nodeExtras.element;if(!B)return;const R=w?w.center:{x:0,y:0,z:0};Object.values(B).forEach(U=>{if(U.box3)try{const O=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(b.totalRotation||0)),D=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(O),new a.Cartesian3(0,0,0)),_=a.Cartesian3.fromDegrees(b.longitude,b.latitude,b.height),Y=a.Transforms.eastNorthUpToFixedFrame(_);a.Matrix4.multiply(Y,D,Y);const $=new a.Cartesian3(R.x,R.y,0),J=new a.Cartesian3;a.Matrix4.multiplyByPoint(Y,$,J);const ne=a.Cartographic.fromCartesian(J),re=U.box3?.Center?.x||0,V=U.box3?.Center?.y||0,j=U.box3?.Center?.z||0,q=new a.Cartesian3(-R.x+re,-R.y+V,0+j),se=a.Matrix4.fromTranslation(q),oe=a.Matrix4.clone(se);a.Matrix4.multiply(D,oe,oe);const ae=a.Cartesian3.fromDegrees(ne.longitude/Math.PI*180,ne.latitude/Math.PI*180,b.height),Ee=a.Transforms.eastNorthUpToFixedFrame(ae);a.Matrix4.multiply(Ee,oe,Ee);const le=a.Cartographic.fromCartesian(new a.Cartesian3(Ee[12],Ee[13],Ee[14]));U.box3.cartographic={longitude:le.longitude/Math.PI*180,latitude:le.latitude/Math.PI*180,height:le.height};const Pe={id:U.uniqueId,billboard:[{theme:"Tag9999",position:[U.box3.cartographic.longitude,U.box3.cartographic.latitude,U.box3.cartographic.height],options:{text:U.name}}]};T.push(Pe)}catch(O){console.warn("Error calculating component position:",O)}})})}catch(P){console.error("getAllComponents error:",P)}return F},h.getAllComponents=h.getAllComponentDetails,h.getComponentInfoList=m=>{if(!Array.isArray(m))return[];const F=C.getMapTileset(),T=[],P={};m.forEach(L=>{!L.modelId||!L.elementId||(P[L.modelId]||(P[L.modelId]=[]),P[L.modelId]?.push(L.elementId))});try{Object.keys(P).forEach(L=>{const G=F[L];if(!G||!G.leiting)return;const N=G.leiting,b=N.node,w=N.model.formData,v=N.box;if(!b||!b.nodeExtras)return;const B=b.nodeExtras.element;if(!B)return;const R=v?v.center:{x:0,y:0,z:0};P[L]?.forEach(U=>{const O=B[U];if(O&&O.box3)try{const D=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),_=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(D),new a.Cartesian3(0,0,0)),Y=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),$=a.Transforms.eastNorthUpToFixedFrame(Y);a.Matrix4.multiply($,_,$);const J=new a.Cartesian3(R.x,R.y,0),ne=new a.Cartesian3;a.Matrix4.multiplyByPoint($,J,ne);const re=a.Cartographic.fromCartesian(ne),V=O.box3?.Center?.x||0,j=O.box3?.Center?.y||0,q=O.box3?.Center?.z||0,se=new a.Cartesian3(-R.x+V,-R.y+j,0+q),oe=a.Matrix4.fromTranslation(se),ae=a.Matrix4.clone(oe);a.Matrix4.multiply(_,ae,ae);const Ee=a.Cartesian3.fromDegrees(re.longitude/Math.PI*180,re.latitude/Math.PI*180,w.height),le=a.Transforms.eastNorthUpToFixedFrame(Ee);a.Matrix4.multiply(le,ae,le);const Pe=a.Cartographic.fromCartesian(new a.Cartesian3(le[12],le[13],le[14]));O.box3.cartographic={longitude:Pe.longitude/Math.PI*180,latitude:Pe.latitude/Math.PI*180,height:Pe.height},T.push(O)}catch(D){console.warn("Error calculating component position:",D)}})})}catch(L){console.error("getCptInfos error:",L)}return T},h.getCptInfos=h.getComponentInfoList,h.baseCompt=A.baseCompt,window.Methods=h}return console.log("methods",h),{Cesium:a,viewer:p,methods:h,menuEvents:l}}function lo(n){return d.getCurrentScope()?(d.onScopeDispose(n),!0):!1}function co(n){return typeof n=="function"?n():d.unref(n)}const L0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const N0=Object.prototype.toString,U0=n=>N0.call(n)==="[object Object]",_0=()=>{};function Q0(n){return d.getCurrentInstance()}function nc(n,e=!0,t){Q0()?d.onMounted(n,t):e?n():d.nextTick(n)}function Nt(n){var e;const t=co(n);return(e=t?.$el)!=null?e:t}const Ln=L0?window:void 0;function H0(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=Ln):[e,t,i,s]=n,!e)return _0;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},l=(u,f,p,h)=>(u.addEventListener(f,p,h),()=>u.removeEventListener(f,p,h)),a=d.watch(()=>[Nt(e),co(s)],([u,f])=>{if(r(),!u)return;const p=U0(f)?{...f}:f;o.push(...t.flatMap(h=>i.map(A=>l(u,h,A,p))))},{immediate:!0,flush:"post"}),c=()=>{a(),r()};return lo(c),c}function G0(){const n=d.ref(!1),e=d.getCurrentInstance();return e&&d.onMounted(()=>{n.value=!0},e),n}function ic(n){const e=G0();return d.computed(()=>(e.value,!!n()))}function Y0(n,e={}){const{window:t=Ln}=e,i=ic(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=d.ref(!1),r=c=>{o.value=c.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=d.watchEffect(()=>{i.value&&(l(),s=t.matchMedia(co(n)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return lo(()=>{a(),l(),s=void 0}),o}function V0(n,e,t={}){const{window:i=Ln,...s}=t;let o;const r=ic(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},a=d.computed(()=>Array.isArray(n)?n.map(f=>Nt(f)):[Nt(n)]),c=d.watch(a,f=>{if(l(),r.value&&i){o=new ResizeObserver(e);for(const p of f)p&&o.observe(p,s)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return lo(u),{isSupported:r,stop:u}}function W0(n,e={width:0,height:0},t={}){const{window:i=Ln,box:s="content-box"}=t,o=d.computed(()=>{var f,p;return(p=(f=Nt(n))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),r=d.ref(e.width),l=d.ref(e.height),{stop:a}=V0(n,([f])=>{const p=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&o.value){const h=Nt(n);if(h){const A=h.getBoundingClientRect();r.value=A.width,l.value=A.height}}else if(p){const h=Array.isArray(p)?p:[p];r.value=h.reduce((A,{inlineSize:C})=>A+C,0),l.value=h.reduce((A,{blockSize:C})=>A+C,0)}else r.value=f.contentRect.width,l.value=f.contentRect.height},t);nc(()=>{const f=Nt(n);f&&(r.value="offsetWidth"in f?f.offsetWidth:e.width,l.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=d.watch(()=>Nt(n),f=>{r.value=f?e.width:0,l.value=f?e.height:0});function u(){a(),c()}return{width:r,height:l,stop:u}}function z0(n={}){const{window:e=Ln,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=n,r=d.ref(t),l=d.ref(i),a=()=>{e&&(o?(r.value=e.innerWidth,l.value=e.innerHeight):(r.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(a(),nc(a),H0("resize",a,{passive:!0}),s){const c=Y0("(orientation: portrait)");d.watch(c,()=>a())}return{width:r,height:l}}const j0={class:"title"},$0={class:"actions"},K0={class:"card-body"},q0=d.defineComponent({__name:"LeitingDraggableCard",props:{visible:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},title:{type:String,default:"Title"},initialPosition:{type:Object,default:()=>({x:0,y:0})},width:{type:[Number,String],default:300},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=e,o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:M=>{s("update:visible",M),s("update:open",M)}}),r=d.ref(null),l=d.ref(t.initialPosition?.x||0),a=d.ref(t.initialPosition?.y||0),c=d.ref(t.width),u=d.ref(t.fullHeight?"100%":"600px");d.watch(()=>t.fullHeight,M=>{M?u.value="100%":u.value==="100%"&&(u.value="600px")});const{height:f}=z0();d.watch(f,()=>{t.fullHeight&&(u.value="100%")});const p=d.ref(!1),h=M=>{p.value=!0,M.preventDefault(),M.stopPropagation();const k=M.clientX,S=M.clientY,x=typeof c.value=="number"?c.value:r.value?.offsetWidth||0,m=typeof u.value=="number"?u.value:r.value?.offsetHeight||0,F=P=>{if(!p.value)return;P.preventDefault();const L=P.clientX-k,G=P.clientY-S,N=x+L,b=m+G;N>100&&(c.value=N),b>100&&(u.value=b)},T=()=>{p.value=!1,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",T)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",T)},A=d.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof c.value=="number"?`${c.value}px`:c.value,height:typeof u.value=="number"?`${u.value}px`:u.value,position:"absolute",zIndex:2e3})),C=()=>{d.nextTick(()=>{if(r.value){const M=r.value.offsetParent||document.body,k=M.clientWidth,S=M.clientHeight,x=typeof c.value=="number"?c.value:r.value.offsetWidth||350,m=typeof u.value=="number"?u.value:r.value.offsetHeight||600;l.value+x>k&&(l.value=Math.max(0,k-x-20)),a.value+m>S&&(a.value=Math.max(0,S-m-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},g=d.ref(!1),y=M=>{if(M.target.closest(".close-btn")||M.target.closest(".actions"))return;g.value=!0,M.preventDefault(),M.stopPropagation();const k=M.clientX,S=M.clientY,x=l.value,m=a.value,F=P=>{if(!g.value)return;P.preventDefault();const L=P.clientX-k,G=P.clientY-S;l.value=x+L,a.value=m+G},T=()=>{g.value=!1,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",T),C()};document.addEventListener("mousemove",F),document.addEventListener("mouseup",T)},E=()=>{d.nextTick(()=>{if(t.align&&r.value){const M=r.value.offsetParent||document.body,k=typeof c.value=="number"?c.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,M.clientWidth-k-20):t.align==="center"&&(l.value=Math.max(0,(M.clientWidth-k)/2))}C()})};d.onMounted(()=>{t.align?E():C()}),d.watch(o,M=>{M&&(t.align?E():C())});const I=()=>{o.value=!1,s("close")};return(M,k)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref_key:"cardRef",ref:r,class:d.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+d.unref(i)]]),style:d.normalizeStyle(A.value)},[d.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:y},[d.createElementVNode("span",j0,d.toDisplayString(n.title),1),d.createElementVNode("div",$0,[d.renderSlot(M.$slots,"header-extra",{},void 0,!0),d.createElementVNode("span",{class:"close-btn",onClick:I},"×")])],544),d.createElementVNode("div",K0,[d.renderSlot(M.$slots,"default",{},void 0,!0)]),d.createElementVNode("div",{class:"resize-handle",onMousedown:h},[...k[0]||(k[0]=[d.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[d.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[d.vShow,o.value]])}}),Ue=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Re=Ue(q0,[["__scopeId","data-v-50bf6126"]]);function X0(n){const e=d.ref([]),t=d.ref([]),i=d.ref([]),s=d.ref(""),o=d.ref(!0);d.watch(()=>d.unref(n),f=>{if(!f||f.length===0)return;const p=[],h=(g,y)=>{g.forEach(E=>{const I=E.id||E.key||E.$id,M=E.modelId||y;M&&(E.modelId=M),I&&p.push(I),E.children&&E.children.length>0&&h(E.children,M)})};h(f);const A=new Set(i.value);let C=!1;p.forEach(g=>{A.has(g)||(A.add(g),C=!0)}),C&&(i.value=Array.from(A))},{immediate:!0,deep:!0});const r=d.computed(()=>{const f=d.unref(n);if(!f)return[];const p=[],h=(A,C)=>{A.forEach(g=>{const y=g.id||g.key||g.$id,E=g.name||g.title;p.push({key:y,title:E,parentKey:C}),g.children&&g.children.length>0&&h(g.children,y)})};return h(f),p}),l=f=>{e.value=f,o.value=!1},a=f=>{i.value=f},c=f=>{t.value=f},u=f=>r.value.find(h=>h.key===f)?.parentKey;return d.watch(s,f=>{if(!f)return;const h=r.value.filter(C=>C.title&&C.title.toLowerCase().includes(f.toLowerCase())).map(C=>C.parentKey),A=new Set;h.forEach(C=>{let g=C;for(;g;)A.add(g),g=u(g)}),e.value=[...A],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:i,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:c}}const J0={class:"search-box"},Z0={key:0},eC={style:{color:"#f50"}},tC={key:1},nC={key:1,class:"empty-tip"},Pi=Ue(d.defineComponent({__name:"LeitingTree",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"构件树"},width:{type:[Number,String],default:320},treeData:{type:Array,default:()=>[]},initialPosition:{type:Object,default:()=>({x:0,y:0})},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close","select","check"],setup(n,{emit:e}){const t=Ae.Input.Search,i=Ae.Tree,s=n,o=e,r=d.inject("leiting-theme",d.ref("dark")),l=d.inject("leitingMethods"),a=m=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(m)},c=d.computed({get:()=>s.open!==void 0?s.open:s.visible,set:m=>{o("update:visible",m),o("update:open",m)}}),u=d.ref(null),{height:f}=W0(u),p=d.computed(()=>f.value||300),h=d.ref({children:"children",title:"name",key:"id"}),{expandedKeys:A,selectedKeys:C,checkedKeys:g,searchValue:y,autoExpandParent:E}=X0(d.toRef(s,"treeData")),I=m=>{A.value=m,E.value=!1},M=m=>{const F=[],T=P=>{if(!P.children||P.children.length===0){const G=P.element_Id;P.modelId&&G&&F.push({modelId:P.modelId,elementId:G})}else P.children.forEach(T)};return T(m),F},k=(m,F)=>{g.value=m,o("check",m,F);const T=M(F.node).map(P=>({...P,show:F.checked}));l?.value?.setComponentVisibility&&l.value.setComponentVisibility(T),l?.value?.onTreeCheck&&l.value.onTreeCheck(m,F)},S=(m,F)=>{if(C.value=m,o("select",m,F),F.selected){const T=M(F.node);T.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:T})}l?.value?.onTreeSelect&&l.value.onTreeSelect(m,F)},x=()=>{o("update:visible",!1),o("close")};return(m,F)=>(d.openBlock(),d.createBlock(Re,{visible:c.value,"onUpdate:visible":F[1]||(F[1]=T=>c.value=T),title:n.title,"initial-position":n.initialPosition,"full-height":n.fullHeight,onClose:x},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["leiting-tree-container",[`theme-${d.unref(r)}`]])},[d.createElementVNode("div",J0,[d.createVNode(d.unref(t),{value:d.unref(y),"onUpdate:value":F[0]||(F[0]=T=>d.isRef(y)?y.value=T:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),d.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:u},[n.treeData&&n.treeData.length?(d.openBlock(),d.createBlock(d.unref(i),{key:0,"tree-data":n.treeData,"field-names":h.value,height:p.value,"expanded-keys":d.unref(A),"auto-expand-parent":d.unref(E),"selected-keys":d.unref(C),"checked-keys":d.unref(g),checkable:"","block-node":"",onExpand:I,onSelect:S,onCheck:k},{title:d.withCtx(({name:T,title:P})=>[(T||P)&&d.unref(y)&&(T||P).toLowerCase().indexOf(d.unref(y).toLowerCase())>-1?(d.openBlock(),d.createElementBlock("span",Z0,[d.createTextVNode(d.toDisplayString((T||P).substr(0,(T||P).toLowerCase().indexOf(d.unref(y).toLowerCase())))+" ",1),d.createElementVNode("span",eC,d.toDisplayString(d.unref(y)),1),d.createTextVNode(" "+d.toDisplayString((T||P).substr((T||P).toLowerCase().indexOf(d.unref(y).toLowerCase())+d.unref(y).length)),1)])):(d.openBlock(),d.createElementBlock("span",tC,d.toDisplayString(T||P),1))]),_:1},8,["tree-data","field-names","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(d.openBlock(),d.createElementBlock("div",nC,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-749af6eb"]]),iC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",sc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAERSURBVDhPvZTrEYIwEISTCrQD6EA7gA60AylBK1Aq0A7ECrQDoQPsADrACuLuTMJkIiHxjzezgyR7H3d5KJVSqRAigcaQUjYYX2JgZY/P/O4lEgYYFo7pgPcc2kSCBoIUzDeo0klPPEsNYlX7AKzA/M6ASrRzYoIGG5DAOCvzBvzMOxqQazSgLLI1QdAW5jWpUAPV0AVKIc7FRCuNy7RkWozJtj1BED7ANbpDXHhffFXUwUnZwRYp7qw7Rx8/lLkV9R4QD2w1A8pjW3sA4h5au+pXEBS76P8D6Ut9/nXXaiRQdnBXqBfEC+4GdzSxW5v6F7CTeHnbCVCBsWIE+RYVrdF4DSz6OwgiADDexbmT3X0A4fSDfDjUugcAAAAASUVORK5CYII=",sC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAFESURBVDhPlZMNEcIwDIVXBQwFgAJAAcMBDgAFIGE4wAHgABSwOdgcIAEUjPd6aS/rfhi7y12bJl9f0sxEf3xVVV0RPoetjTFvnWqGcgSylfgihA0CKcgJgBfsAqMiKiM0+gkKlCyZCN8uhPWCFOSBxARWORU4W2CdeV9XjxSEJcwkjokTqBpzjxjCn7CyVRECzjg8wHLYCmabK7CplBcLhMr2DZCqP0dCovYZ9hYGXx1izLUGUkkfxI/sTQiCf4N1zLWAWCKV2nP6PEhB2Ngd7B4GC4SJnCcP8SAFoc/Ph/TqjVvTPogFKUiJ/VGU+GdmUAA5ObA7cyC+iPt/MjUfKRL4emyuK+cGH8tufFRUHywZ+RYlnRDdIwfzLzVUibtQv1oNhoAExtfpVdIAiQIOWiY9o2sQxJemOydTS1jR1di2Zn8B8f27apou9kMAAAAASUVORK5CYII=",oC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHDSURBVDhPlZOxL0NRFIe9ECubhehoIIjJ1HYwCkIiJpUQEkN1YZBobU0kFKNI3iTGYrDRv0BIhLXCYpCwiO35fs25zWva98JNvpz37j33d8+551yvLWIEQXDG0izMe55XjvJz816MUJG1LVuvYJcQrEb5xwkV2JSHGfAhgBJiu63E4oSUzpRtusa+wBooKkWnKOujQYh7SbCShQx0m9cpds4iOseOw7BFmUPwU341IQT2MaOQgi9QND+wiqNnBxT4X7SIbrAqhNI9wiUvJ+W8A99wDEWdwrw25iVkkenAEb5LkIQPuIMJWJGQoriFd+iBCkhc8zUhfJSm7mva5l3aadubDgtpMgGKpB/eoBfuQZFoPNhBj9gTaC3kKkEEGXPswF7Y5rLro1AW8UI6GmelmAzfkUWlNaWt6/iT0DOOA5bqoSuzHfIvofATqSJQb8KoiJbtPi6x2dA9FPjXE1F/uZKrv3IwCFcNqVmoPlal7QJ9q/wZCbk7Ioo9/tehE9q1r0nIxNQbG4YEXdkVjQ5J2OZXbB88gVrgQIJNj9aaT4LboPK7J6O0Ktb1KYtc/aYxGff6h3AYY6Nvzk2GQ1WQTVj4BST70jYaqceXAAAAAElFTkSuQmCC",rC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADhSURBVHgBvVOBEYIwDEw9B2ADO4IjuIEjwAa6Aa7ABMAEuIIjOIFsUDao37vgxVZbBI+/+0tI0+fJBaIIrLUFaMAHmNNcsMAIE+vdJLQykQ+0wFHBrsyiT/sL2I1DDTac/+4Klzobov7WHxt29qGmaYaQnlhLCmUTa2l4C2ljvamFlEvY0xpCW/kA924GblfGWciZaJyXQvSmlOoDITSdXQBbcA8eKfy/nHDFeY470FIX8tzUIu84FmLWuTzz7yhRLPm54dKJ4+A5uoJ3HgHBUfUmxGIa4QDuKA4n3kLk9ZInw0qu5b1R1aYAAAAASUVORK5CYII=",aC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAADFSURBVDhPxVPBDYMwDIwnKJu0G9ANYJMyQrsBbNIRGAE2gEnSO6mpIMJxkBC1lEds52zfOeK9b51zV5wte4lIr8RWbgGQh2fGmaIHJe4EetKPtDpRcA5AvwcB7FtgCcTOH0p3YzaQNd75QBiVXJG3LRtCRyQ6Jvsekd3gTsJVoDcihZLQQjXGTRMzIzPhOCCQyNYvSuEue7Qdm02yK0u1nM2m/FQyKb8JZHH+l81Ofdpdm82tvikjThyNlbSEBvIPFj+MfwA76qSYUG3g9QAAAABJRU5ErkJggg==",lC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEcSURBVDhPrZSNDYIwEIXpBOIGjMAIOIE4AbgBGwAbOIJu4Aa4gW4gI+gE9b3mjjSmibSR5ALX3H33W4y1Ns+yrIe0EH7HPC8YnyGjAegkEB5cYyiwrdWXIEc1xnSREGcuiTQEWeg7gG4+CMcl9ALnLkvogwScv+wq6FMQJJCJDgBtBcSAI3QClwe2YZAHcY2Ho4kGAVLA6U5/CEvdp4KYhesFhBPpCZIAz6jStHhproJcHyAHbb5nF+6RZ8CsGslIQaHp/gSxRzlApU4GugPxNuDN/eNarAJxapUPgm8rQ9C1SAI9AOGiHhGApSdnRN8FshbEiLwiLI1rMUM6zSQ0tX9c2lp/Iw0iMIPU38iFIN1mTmOjKa98vyWB4QM5XQnvsbFsyAAAAABJRU5ErkJggg==",cC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGPSURBVDhPrZT9UQIxEMUvFSgViBUoFQgVABV4VqBW4FmBUIFQgZRwVqBU4HUAVHC+X2aXycQw/sPOvLncZvdlv5JQFaTv+1upp8IyhLDHRLpLfe6FrXRt7hZShYyH+n8RauGAv/AkQNYIHICshFcRdu6fE/kGRN/mQGTIpzAzMoh6EV2fIsJ5IwNOj2IpVZ6i6difSecRVnlELZHIgHROisgXRCa78Z+IrMBf2pjLYJNENGSd1kO2pPghjKQniyqY8lFr2NfaqC18wn7nZCMlWg7xLq70TxfRLyHqtABN2lbp40mSSCzBcSebif1TPyKjDBcQ0eJJRkIUpHkMPUlnkBU+pnlWItL6ERgw8o1iqRHtgzAUGNRD2qmkvgMvNnneUQcZ4ggR6VGXG+OOA1koNvrFcY7+af++VJe0hucfyKQu+RWJc+SDZ3aNvlPpRl7T0qXdafNZYPDehLEZt/rOBR9U8QSaEKX0jHAaE4tshVrgLeJ+Xdl6rS8D3BWJXKnCEwWXEuco9grQ3bb0sP0Cn8/nPm/SMRQAAAAASUVORK5CYII=",dC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",uC={class:"menu-container"},hC=["onClick","title"],fC={class:"menu-icon"},pC=["src","alt"],gC={key:3,style:{"font-size":"12px"}},mC={key:0,class:"sub-menu"},AC=["onClick"],Nn=d.defineComponent({__name:"LeitingMenu",props:{visible:{type:Boolean,default:!0},activeIds:{type:Array,default:()=>[]},is2d:{type:Boolean,default:!1},customItems:{type:Array,default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=d.inject("leiting-menu-size",d.ref("medium")),o=d.inject("leitingMethods",d.ref({})),r=d.computed(()=>i.value||i),l=d.computed(()=>s.value||s),a=d.ref([{ID:"home",title:"主视角",src:iC,key:"homeView"},{ID:"tree",title:"目录树",src:sc,key:"componentTree"},{ID:"cadLayer",title:"图层",src:sc,key:"cadLayer"},{ID:"measure",title:"量算",src:sC,key:"measurement"},{ID:"section",title:"剖切",src:oC,key:"section"},{ID:"roam",title:"人物漫游",src:rC,key:"roam"},{ID:"info",title:"构件信息",src:aC,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:lC,key:"cadPosition"},{ID:"annotation",title:"标注",src:dC,key:"annotation"},{ID:"setting",title:"设置",src:cC,key:"setting"}]),c=d.ref([]),u=d.ref([...t.activeIds]);d.watch(()=>t.activeIds,k=>{u.value=[...k]},{deep:!0});const f=d.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",k=>{c.value=k}),o.value.menuEvents.on("setMenuActive",(k,S)=>{S?u.value.includes(k)||u.value.push(k):u.value=u.value.filter(x=>x!==k)}));const p=d.computed(()=>{let k=a.value;if(t.is2d){const S=["homeView","measurement","cadLayer","annotation"];k=k.filter(x=>x.key&&S.includes(x.key))}else{const S=["cadLayer","cadPosition","annotation"];k=k.filter(x=>!x.key||!S.includes(x.key))}if(c.value.length>0&&(k=k.filter(S=>!S.key||!c.value.includes(S.key))),t.customItems&&t.customItems.length>0){const S=t.customItems.map(x=>({...x,key:x.ID,src:x.src||x.icon}));return[...k,...S]}return k}),h=e,A=k=>{const S=["homeView"];if(k.key&&S.includes(k.key))u.value.includes(k.ID)||(u.value.push(k.ID),setTimeout(()=>{const m=u.value.indexOf(k.ID);m>-1&&u.value.splice(m,1)},1e3));else{const m=u.value.indexOf(k.ID);m>-1?u.value.splice(m,1):u.value.push(k.ID)}const x=u.value.includes(k.ID);k.func&&k.func(k),k.key&&h("action",k.key,x)},C=k=>{a.value=[...a.value,...k]},g=k=>{c.value=k},y=k=>{console.log("LeitingMenu received showMenu event:",k)},E=(k,S)=>{const x=a.value.find(m=>m.ID===k||m.key===k);if(x){const m=u.value.indexOf(x.ID);S&&m===-1?u.value.push(x.ID):!S&&m>-1&&u.value.splice(m,1)}};let I=null;const M=()=>{o.value?.menuEvents&&(I&&(I.off("insertMenu",C),I.off("setMenuListFilter",g),I.off("showMenu",y),I.off("setMenuActive",E)),I=o.value.menuEvents,I.on("insertMenu",C),I.on("setMenuListFilter",g),I.on("showMenu",y),I.on("setMenuActive",E))};return d.onMounted(()=>{M()}),d.onUnmounted(()=>{I&&(I.off("insertMenu",C),I.off("setMenuListFilter",g),I.off("showMenu",y),I.off("setMenuActive",E))}),d.watch(o,()=>{M()},{deep:!0}),(k,S)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[d.createElementVNode("div",uC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(p.value,x=>(d.openBlock(),d.createElementBlock("div",{key:x.ID,class:d.normalizeClass(["menu-item",{active:u.value.includes(x.ID)}]),onClick:m=>A(x),title:x.title},[d.createElementVNode("div",fC,[x.src?(d.openBlock(),d.createElementBlock("img",{key:0,src:x.src,alt:x.title},null,8,pC)):typeof x.icon=="object"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.icon),{key:1})):typeof x.icon=="string"?(d.openBlock(),d.createElementBlock("i",{key:2,class:d.normalizeClass(["iconfont",`icon-${x.icon}`])},null,2)):(d.openBlock(),d.createElementBlock("span",gC,d.toDisplayString(x.title.substring(0,2)),1))]),x.children&&x.children.length>0?(d.openBlock(),d.createElementBlock("div",mC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.children,m=>(d.openBlock(),d.createElementBlock("div",{key:m.ID,class:d.normalizeClass(["sub-menu-item",{active:u.value.includes(m.ID)}]),onClick:d.withModifiers(F=>A(m),["stop"])},d.toDisplayString(m.title),11,AC))),128))])):d.createCommentVNode("",!0)],10,hC))),128))])],2)),[[d.vShow,f.value]])}}),yC={class:"leiting-section-content"},CC={class:"section-form-item"},EC={class:"radio-group"},wC={class:"section-form-item"},bC={class:"switch-container"},vC={class:"switch"},IC={class:"status-text"},xC={class:"section-form-item slider-item"},BC={class:"slider-wrapper"},SC={class:"section-form-item slider-item"},MC={class:"slider-wrapper"},TC={class:"section-form-item slider-item"},DC={class:"slider-wrapper"},kC={class:"section-form-item table-item"},PC={class:"model-table-container"},FC={class:"model-table"},RC={width:"40"},OC=["checked"],LC=["onClick"],NC=["value"],UC={class:"model-name"},Un=Ue(d.defineComponent({__name:"LeitingSection",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"剖切控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:N=>{i("update:visible",N),i("update:open",N)}}),r=d.ref("Box"),l=d.ref(!1),a=d.ref([]),c=d.ref([]),u=d.computed(()=>c.value.length===0?!1:c.value.every(N=>a.value.includes(N.modelId))),f=N=>{N.target.checked?a.value=c.value.map(w=>w.modelId):a.value=[],F()},p=d.ref([-10,10]),h=d.ref([-10,10]),A=d.ref([-10,10]),C=d.ref([-100,100]),g=d.ref([-100,100]),y=d.ref([-100,100]);let E=!1;const I=N=>{E=!0;const{targetZPlus:b,targetZMinus:w,targetXPlus:v,targetXMinus:B,targetYPlus:R,targetYMinus:U}=N;A.value=[-w,b],p.value=[-B,v],h.value=[-U,R],setTimeout(()=>{E=!1},100)},M=()=>{E||a.value.length===0||!s?.value?.updateSectionRange||s.value.updateSectionRange({targetZPlus:A.value[1],targetZMinus:-A.value[0],targetXPlus:p.value[1],targetXMinus:-p.value[0],targetYPlus:h.value[1],targetYMinus:-h.value[0]})},k=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},S=N=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const w=s.value.getMapTileset()[N];if(w&&w.leiting?.box){const{min:v,max:B}=w.leiting.box,R=(B.x-v.x)/2,U=(B.y-v.y)/2,O=(B.z-v.z)/2;a.value.length<=1&&(C.value=[-R*2,R*2],g.value=[-U*2,U*2],y.value=[-O*2,O*2],p.value=[-R,R],h.value=[-U,U],A.value=[-O,O],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:O,targetZMinus:O,targetXPlus:R,targetXMinus:R,targetYPlus:U,targetYMinus:U})),s.value.openSection(N,{moveCallBack:I}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},x=N=>{const b=a.value.indexOf(N);b>-1?a.value.splice(b,1):a.value.push(N),F()};let m=[];const F=()=>{const N=a.value.filter(w=>!m.includes(w)),b=m.filter(w=>!a.value.includes(w));N.forEach(w=>S(w)),b.forEach(w=>{s?.value?.closeSection&&s.value.closeSection(w)}),m=[...a.value]},T=()=>{},P=()=>{o.value=!1,i("close")},L=()=>{l.value=!1,a.value=[],m=[],p.value=[-10,10],h.value=[-10,10],A.value=[-10,10],C.value=[-100,100],g.value=[-100,100],y.value=[-100,100]};d.watch(()=>t.visible,N=>{N?G():(s?.value?.closeSection&&s.value.closeSection(),L())});const G=()=>{s?.value&&typeof s.value.getModelList=="function"&&(c.value=s.value.getModelList()||[],c.value.length>0&&a.value.length===0&&(a.value=[c.value[0].modelId],m=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(N=>S(N))))};return d.watch(()=>s?.value,()=>{G()},{immediate:!0,deep:!0}),d.onMounted(()=>{G()}),(N,b)=>(d.openBlock(),d.createBlock(Re,{visible:o.value,title:"剖切分析","full-height":n.fullHeight,"onUpdate:visible":P},{default:d.withCtx(()=>[d.createElementVNode("div",yC,[d.createElementVNode("div",CC,[b[8]||(b[8]=d.createElementVNode("span",{class:"label"},"模式",-1)),d.createElementVNode("div",EC,[d.createElementVNode("label",{class:d.normalizeClass(["radio-item",{active:r.value==="Box"}])},[d.withDirectives(d.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":b[0]||(b[0]=w=>r.value=w),onChange:T},null,544),[[d.vModelRadio,r.value]]),b[7]||(b[7]=d.createTextVNode(" 剖切盒 ",-1))],2)])]),d.createElementVNode("div",wC,[b[10]||(b[10]=d.createElementVNode("span",{class:"label"},"显示",-1)),d.createElementVNode("div",bC,[d.createElementVNode("label",vC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":b[1]||(b[1]=w=>l.value=w),onChange:k},null,544),[[d.vModelCheckbox,l.value]]),b[9]||(b[9]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",IC,d.toDisplayString(l.value?"显示":"隐藏"),1)])]),d.createElementVNode("div",xC,[b[11]||(b[11]=d.createElementVNode("span",{class:"label"},"X 轴",-1)),d.createElementVNode("div",BC,[d.createVNode(d.unref(Ae.Slider),{value:p.value,"onUpdate:value":b[2]||(b[2]=w=>p.value=w),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",SC,[b[12]||(b[12]=d.createElementVNode("span",{class:"label"},"Y 轴",-1)),d.createElementVNode("div",MC,[d.createVNode(d.unref(Ae.Slider),{value:h.value,"onUpdate:value":b[3]||(b[3]=w=>h.value=w),range:"",min:g.value[0],max:g.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",TC,[b[13]||(b[13]=d.createElementVNode("span",{class:"label"},"Z 轴",-1)),d.createElementVNode("div",DC,[d.createVNode(d.unref(Ae.Slider),{value:A.value,"onUpdate:value":b[4]||(b[4]=w=>A.value=w),range:"",min:y.value[0],max:y.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",kC,[b[15]||(b[15]=d.createElementVNode("span",{class:"label"},"模型",-1)),d.createElementVNode("div",PC,[d.createElementVNode("table",FC,[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",RC,[d.createElementVNode("input",{type:"checkbox",checked:u.value,onChange:f},null,40,OC)]),b[14]||(b[14]=d.createElementVNode("th",null,"名称",-1))])]),d.createElementVNode("tbody",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,w=>(d.openBlock(),d.createElementBlock("tr",{key:w.modelId,class:d.normalizeClass({selected:a.value.includes(w.modelId)}),onClick:v=>x(w.modelId)},[d.createElementVNode("td",null,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:w.modelId,"onUpdate:modelValue":b[5]||(b[5]=v=>a.value=v),onClick:b[6]||(b[6]=d.withModifiers(()=>{},["stop"])),onChange:F},null,40,NC),[[d.vModelCheckbox,a.value]])]),d.createElementVNode("td",UC,d.toDisplayString(w.modelName),1)],10,LC))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee4d9a12"]]),_C={class:"leiting-player-content"},QC={class:"player-form-item"},HC={class:"switch-container"},GC={class:"switch"},YC={class:"status-text"},VC={class:"player-form-item"},WC={class:"switch-container"},zC={class:"switch"},jC={class:"status-text"},$C={class:"player-form-item"},KC={class:"switch-container"},qC={class:"switch"},XC={class:"status-text"},JC={class:"player-form-item slider-item"},ZC={class:"slider-wrapper"},eE={class:"value-text"},tE={class:"instructions"},nE={class:"key-map"},iE={class:"key-row"},sE={class:"key-row"},oE={class:"key-row"},rE={class:"key-row"},aE={class:"key-row"},lE={class:"key-row"},_n=Ue(d.defineComponent({__name:"LeitingPlayer",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"漫游控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(!1),r=d.ref(!1),l=d.ref(!0),a=d.ref(5),c=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:S=>{i("update:visible",S),i("update:open",S)}}),u=d.ref(null),f=d.ref(null),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=d.ref(null),g=()=>{o.value?E():I()},y=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},E=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),y(),s.value.bindPlayerUiKeys&&(await d.nextTick(),s.value.bindPlayerUiKeys({moveFront:u.value,moveBack:f.value,moveLeft:p.value,moveRight:h.value,moveUp:A.value,moveDown:C.value})))},I=()=>{s?.value?.closePlayer&&s.value.closePlayer()},M=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},k=()=>{c.value=!1,i("close")};return d.watch(()=>t.visible,S=>{S?(o.value=!0,s?.value?E():setTimeout(()=>{s?.value&&E()},100)):o.value&&(o.value=!1,I())},{immediate:!0}),(S,x)=>(d.openBlock(),d.createBlock(Re,{title:n.title,visible:c.value,"full-height":n.fullHeight,"onUpdate:visible":k},{default:d.withCtx(()=>[d.createElementVNode("div",_C,[d.createElementVNode("div",QC,[x[5]||(x[5]=d.createElementVNode("span",{class:"label"},"启用",-1)),d.createElementVNode("div",HC,[d.createElementVNode("label",GC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[0]||(x[0]=m=>o.value=m),onChange:g},null,544),[[d.vModelCheckbox,o.value]]),x[4]||(x[4]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",YC,d.toDisplayString(o.value?"开启":"关闭"),1)])]),d.createElementVNode("div",VC,[x[7]||(x[7]=d.createElementVNode("span",{class:"label"},"重力",-1)),d.createElementVNode("div",WC,[d.createElementVNode("label",zC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[1]||(x[1]=m=>r.value=m),onChange:y},null,544),[[d.vModelCheckbox,r.value]]),x[6]||(x[6]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",jC,d.toDisplayString(r.value?"开启":"关闭"),1)])]),d.createElementVNode("div",$C,[x[9]||(x[9]=d.createElementVNode("span",{class:"label"},"碰撞",-1)),d.createElementVNode("div",KC,[d.createElementVNode("label",qC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[2]||(x[2]=m=>l.value=m),onChange:y},null,544),[[d.vModelCheckbox,l.value]]),x[8]||(x[8]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",XC,d.toDisplayString(l.value?"开启":"关闭"),1)])]),d.createElementVNode("div",JC,[x[10]||(x[10]=d.createElementVNode("span",{class:"label"},"速度",-1)),d.createElementVNode("div",ZC,[d.createVNode(d.unref(Ae.Slider),{value:a.value,"onUpdate:value":x[3]||(x[3]=m=>a.value=m),min:1,max:10,step:1,onChange:M},null,8,["value"])]),d.createElementVNode("span",eE,d.toDisplayString(a.value),1)]),x[19]||(x[19]=d.createElementVNode("div",{class:"divider"},null,-1)),d.createElementVNode("div",tE,[x[18]||(x[18]=d.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),d.createElementVNode("div",nE,[d.createElementVNode("div",iE,[d.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:u},"W",512),x[11]||(x[11]=d.createTextVNode(" 前进 ",-1))]),d.createElementVNode("div",sE,[d.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:f},"S",512),x[12]||(x[12]=d.createTextVNode(" 后退 ",-1))]),d.createElementVNode("div",oE,[d.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:p},"A",512),x[13]||(x[13]=d.createTextVNode(" 左移 ",-1))]),d.createElementVNode("div",rE,[d.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:h},"D",512),x[14]||(x[14]=d.createTextVNode(" 右移 ",-1))]),d.createElementVNode("div",aE,[d.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:A},"Q",512),x[15]||(x[15]=d.createTextVNode(" 上升 ",-1))]),d.createElementVNode("div",lE,[d.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:C},"E",512),x[16]||(x[16]=d.createTextVNode(" 下降 ",-1))]),x[17]||(x[17]=d.createElementVNode("div",{class:"key-row"},[d.createElementVNode("span",{class:"mouse-icon"},"🖱️"),d.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-ff3f266e"]]),cE={class:"info-content"},dE={key:0,class:"component-title"},Qn=Ue(d.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref([]),r=d.ref(!1),l=d.ref([]),a=d.ref([]),c=d.ref(0),u=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:y=>{i("update:visible",y),i("update:open",y)}}),f=()=>{u.value=!1},p=y=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[y]||y,h=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],A=async y=>{const E=++c.value;if(a.value=y,!y||y.length===0){o.value=[];return}if(!u.value)return;let I=y;y.length>10&&(me.warning(`选中构件数量过多(${y.length}个),仅显示前10个`),I=y.slice(0,10));const M=s?.value;let k=M?.getMapTileset?M.getMapTileset():{};r.value=!0;const S=[],x={};if(I.forEach(T=>{const L=k[T.modelId]?.leiting?.model?.dbName;L&&T.elementId&&S.push({dbName:L,elementId:T.elementId,modelId:T.modelId})}),S.length>0){try{const T=S.map(L=>({dbName:L.dbName,elementId:L.elementId})),P=await Tg(T);P&&Array.isArray(P)&&P.forEach(L=>{const G=S.find(N=>N.dbName===L.dbName&&N.elementId===L.elementId);if(G){const N=`${G.modelId}_${L.elementId}`;x[N]=L}})}catch(T){console.warn("API fetch component details failed, falling back to local data",T)}console.log("123")}const m=new Set;if(I.forEach(T=>{const P=k[T.modelId],L=`${T.modelId}_${T.elementId}`;x[L]||P&&P.leiting&&!P.leiting?.node?.nodeExtras&&P.leiting.model?.nodeUrl&&m.add(T.modelId)}),m.size>0&&M?.loadNodeDetailsForModel)try{const T=Array.from(m).map(P=>M.loadNodeDetailsForModel(P));await Promise.all(T)}catch(T){console.error("Failed to load node details",T)}if(E!==c.value)return;k=M?.getMapTileset?M.getMapTileset():{};const F=[];I.forEach((T,P)=>{const G=k[T.modelId]?.leiting||{},N=x[`${T.modelId}_${T.elementId}`];let b={modelName:G.model?.modelId||T.modelId};b.elementID||(b.elementID=T.elementId);let w=null;if(N)w=N;else{const R=G.node?.nodeExtras?.element||G.node?.nodeExtras;if(R){const U=b.elementID;R[U]&&(w=R[U])}}w&&w.box3&&(b.length=`${w.box3.length?.toFixed(2)||0}米`,b.width=`${w.box3.width?.toFixed(2)||0}米`,b.height=`${w.box3.height?.toFixed(2)||0}米`);const v=[];w&&(w.name&&(b.elementName=w.name),w.categoryName&&(b.categoryName=w.categoryName),w.familySymbolName&&(b.familySymbolName=w.familySymbolName),w.levelName&&(b.levelName=w.levelName));const B={};if(h.forEach(R=>{b[R]!==void 0&&(B[R]=b[R])}),v.push({name:"基础信息",params:B}),w){const R=Array.isArray(w)?w:Array.isArray(w?.parameters)?w.parameters:null;if(R){if(R.flat().forEach(O=>{if(O&&O.GroupName&&Array.isArray(O.Parameters)){const D={};O.Parameters.forEach(_=>{_.name&&(D[_.name]=_.value??"")}),Object.keys(D).length>0&&v.push({name:O.GroupName,params:D})}}),!Array.isArray(w)){const{parameters:O,...D}=w,_={};Object.keys(D).forEach(Y=>{!h.includes(Y)&&Y!=="uniqueId"&&typeof D[Y]!="object"&&(_[Y]=D[Y])}),Object.keys(_).length>0&&v.push({name:"其他属性",params:_})}}else{let U=!1;if(Object.keys(w).forEach(O=>{w[O]&&typeof w[O]=="object"&&!Array.isArray(w[O])&&(U=!0,v.push({name:O,params:w[O]}))}),!U){const O={};Object.keys(w).forEach(D=>{if(!h.includes(D)&&D!=="batchId"){const _=w[D];typeof _=="string"&&_.length>500?O[D]=_.substring(0,500)+"...":O[D]=_}}),Object.keys(O).length>0&&v.push({name:"属性",params:O})}}}F.push({id:P,title:`${b.modelName}${b.elementName?` - ${b.elementName}`:""}`,groups:v})}),o.value=F,E===c.value&&(r.value=!1),F.length>0?l.value=[`${F[0].id}-基础信息`]:l.value=[]};let C=!1;const g=()=>{if(C)return;const y=s?.value;y&&y.selectionChange&&(y.selectionChange(A),C=!0)};return d.watch(()=>s?.value,()=>{g()},{deep:!0,immediate:!0}),d.watch(u,y=>{y&&a.value.length>0&&A(a.value)}),d.onMounted(()=>{g()}),(y,E)=>(d.openBlock(),d.createBlock(Re,{visible:u.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":n.fullHeight,onClose:f,"onUpdate:visible":E[1]||(E[1]=I=>u.value=I),class:"base-info-card"},{default:d.withCtx(()=>[d.createElementVNode("div",cE,[d.createVNode(d.unref(Ae.Spin),{spinning:r.value},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,I=>(d.openBlock(),d.createElementBlock("div",{key:I.id,class:"component-block"},[o.value.length>1?(d.openBlock(),d.createElementBlock("div",dE,d.toDisplayString(I.title),1)):d.createCommentVNode("",!0),d.createVNode(d.unref(Ae.Collapse),{activeKey:l.value,"onUpdate:activeKey":E[0]||(E[0]=M=>l.value=M),ghost:"","expand-icon-position":"end"},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(I.groups,M=>(d.openBlock(),d.createBlock(d.unref(Ae.CollapsePanel),{key:`${I.id}-${M.name}`,header:M.name},{default:d.withCtx(()=>[d.createVNode(d.unref(Ae.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(M.params,(k,S)=>(d.openBlock(),d.createBlock(d.unref(Ae.DescriptionsItem),{key:S,label:p(String(S))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(k),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))]),_:1},8,["spinning"])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-cd881bde"]]);class oc{viewer;Cesium;pickHandler=null;bimEntityId="";mapEntityId="";constructor(e,t){this.viewer=e,this.Cesium=t}removeMarker(e){if(!this.viewer)return;const t=e==="BIM"?this.bimEntityId:this.mapEntityId;t&&(this.viewer.entities.removeById(t),e==="BIM"?this.bimEntityId="":this.mapEntityId="")}clearMarkers(){this.removeMarker("BIM"),this.removeMarker("MAP")}addMarker(e,t){if(!this.viewer||!this.Cesium)return;this.removeMarker(e);const i=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=i:this.mapEntityId=i,this.viewer.entities.add({id:i,position:this.Cesium.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),point:{pixelSize:10,color:e==="BIM"?this.Cesium.Color.RED:this.Cesium.Color.ORANGE,outlineColor:this.Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`${e==="BIM"?"BIM":"地图"}标记点`,font:"14pt sans-serif",style:this.Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:this.Cesium.VerticalOrigin.BOTTOM,pixelOffset:new this.Cesium.Cartesian2(0,-10),fillColor:this.Cesium.Color.WHITE,outlineColor:this.Cesium.Color.BLACK,backgroundColor:new this.Cesium.Color(.1,.1,.1,.8),showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}})}registerPickHandler(e){this.destroyPickHandler(),!(!this.Cesium||!this.viewer)&&(this.pickHandler=new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.pickHandler.setInputAction(t=>{let i;try{i=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!i){const s=this.viewer.camera.getPickRay(t.position);i=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(i||(i=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),i){const s=this.Cesium.Cartographic.fromCartesian(i),o=this.Cesium.Math.toDegrees(s.longitude),r=this.Cesium.Math.toDegrees(s.latitude),l=s.height;e({longitude:o,latitude:r,height:l})}},this.Cesium.ScreenSpaceEventType.LEFT_CLICK,this.Cesium.KeyboardEventModifier.SHIFT))}destroyPickHandler(){this.pickHandler&&(this.pickHandler.destroy(),this.pickHandler=null)}calculateOffset(e,t){return{dLon:t.longitude-e.longitude,dLat:t.latitude-e.latitude,dHeight:t.height-e.height}}}const uE={class:"adjust-panel"},hE={class:"control-panel"},fE={class:"form-item"},pE={class:"radio-group"},gE={class:"form-item"},mE={class:"radio-group"},AE={class:"form-item"},yE={class:"value"},CE={class:"param-row"},EE={class:"param-row"},wE={class:"param-row"},bE={class:"param-row"},vE={class:"param-row"},IE={class:"param-row"},xE={class:"param-row"},BE={class:"button-grid"},SE={key:1,class:"pick-mode-ui"},ME={class:"form-item",style:{display:"block","margin-bottom":"15px"}},TE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},DE=["checked"],kE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},PE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},FE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},RE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},OE=["checked"],LE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},NE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},UE={class:"list-panel"},_E={class:"list-header"},QE={class:"col-check"},HE=["checked"],GE={class:"list-body"},YE={class:"col-check"},VE=["onUpdate:modelValue"],WE={class:"col-index"},zE=["title"],jE={class:"col-main"},$E=["checked","onChange"],Hn=Ue(d.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.computed({get:()=>i.open!==void 0?i.open:i.visible,set:O=>{s("update:visible",O),s("update:open",O)}}),r=d.inject("leitingMethods"),l=d.ref("BIM"),a=d.ref("param"),c=d.ref(""),u=d.ref([]),f=d.ref("BIM"),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=()=>(!A.value&&r?.value?.getViewer&&r?.value?.getCesium&&(A.value=new oc(r.value.getViewer(),r.value.getCesium())),A.value),g=()=>{C()?.clearMarkers(),p.value=null,h.value=null},y=(O,D)=>{O==="BIM"?p.value=D:h.value=D,C()?.addMarker(O,D),me.success(`${O==="BIM"?"BIM":"地图"}标记点已添加`)},E=()=>{C()?.registerPickHandler(O=>{y(f.value,O)})},I=()=>{C()?.destroyPickHandler()},M=()=>{if(!p.value||!h.value){me.warning("请先选择BIM标记点和地图标记点");return}if(!c.value){me.warning("请先选择主模型");return}const O=C();let D=0,_=0,Y=0;if(O){const{dLon:$,dLat:J,dHeight:ne}=O.calculateOffset(p.value,h.value);D=$,_=J,Y=ne}else D=h.value.longitude-p.value.longitude,_=h.value.latitude-p.value.latitude,Y=h.value.height-p.value.height;S.value.longitude+=D,S.value.latitude+=_,S.value.height+=Y,w(c.value,{longitude:S.value.longitude,latitude:S.value.latitude,height:S.value.height}),me.success("位置已调整")};d.watch(()=>a.value,O=>{O==="pick"?E():I()}),e({addMarker:y,setModelType:O=>{(O==="BIM"||O==="OSGB")&&(l.value=O)}});const S=d.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),x=d.computed(()=>{const O=u.value.find(D=>D.modelId===c.value);return O?O.modelName:""}),m=d.computed(()=>T.value.length>0&&T.value.every(O=>O.selected)),F=()=>{o.value=!1,s("close")},T=d.computed(()=>u.value.filter(O=>O.type===l.value)),P=O=>{const D=O.target.checked;T.value.forEach(_=>_.selected=D)},L=()=>{if(!r?.value)return;const O=r.value,D=O.getMapTileset?O.getMapTileset():{},_=[];if(Object.keys(D).forEach(Y=>{const J=D[Y].leiting||{};J.model&&_.push({modelId:J.model.modelId,modelName:J.model.modelName,selected:!1,formData:J.model.formData||{},dbName:J.model.dbName,url:J.model.url,type:J.model.type||"BIM"})}),u.value=_,_.length>0){const Y=O.getBIMmodelId?O.getBIMmodelId():"";Y&&_.find($=>$.modelId===Y)?N(Y):N(_[0].modelId),_.forEach($=>$.selected=!0)}},G=()=>{me.info("拖动右下角标,可显示模型列表",void 0,2)},N=O=>{c.value=O;const D=u.value.find(_=>_.modelId===O);D&&D.formData&&Object.keys(S.value).forEach(_=>{D.formData[_]!==void 0&&(S.value[_]=D.formData[_])})},b=O=>r?.value?.getMapTileset?r.value.getMapTileset()[O]:null,w=(O,D)=>{const _=b(O),Y=r.value.getCesium();if(_&&Y){if(_.leiting?.model){_.leiting.model.formData={..._.leiting.model.formData,...D};const $=u.value.find(J=>J.modelId===O);$&&($.formData=_.leiting.model.formData)}cr({Cesium:Y,tileset:_})}},v=O=>{if(!c.value)return;const D=S.value[O];w(c.value,{[O]:D})},B=O=>{const D=T.value.filter(J=>J.selected);if(D.length===0){me.warning("请先选择要调整的模型");return}const{lonlat:_,heightDistance:Y,rotation:$}=S.value;D.forEach(J=>{const ne={...J.formData};switch(O){case"north":ne.latitude+=_;break;case"south":ne.latitude-=_;break;case"east":ne.longitude+=_;break;case"west":ne.longitude-=_;break;case"up":ne.height+=Y;break;case"down":ne.height-=Y;break;case"rotateLeft":ne.totalRotation=(ne.totalRotation||0)+$;break;case"rotateRight":ne.totalRotation=(ne.totalRotation||0)-$;break}J.modelId===c.value&&(ne.lonlat=_,ne.heightDistance=Y,ne.rotation=$,Object.assign(S.value,ne)),w(J.modelId,ne)})},R=()=>{if(!c.value){me.warning("请先选择主模型");return}const O=b(c.value);if(!O||!r?.value?.getViewer)return;const D=r.value.getViewer(),_=r.value.getCesium(),Y=O.boundingSphere;D.camera.flyToBoundingSphere(Y,{offset:new _.HeadingPitchRange(0,_.Math.toRadians(-90),Y.radius*2),duration:1.5})},U=()=>{r?.value?.saveRegion?(r.value.saveRegion(u.value),s("save",d.unref(u))):(console.log("Save models:",u.value),me.warning("未找到保存接口,数据已打印控制台"))};return d.watch(()=>i.visible,O=>{O?(L(),G(),a.value==="pick"&&E()):(I(),g())}),d.onMounted(()=>{i.visible&&(L(),G(),a.value==="pick"&&E())}),(O,D)=>(d.openBlock(),d.createBlock(Re,{visible:o.value,title:"调整位置(调整前可选择正北俯视)","full-height":n.fullHeight,"onUpdate:visible":D[25]||(D[25]=_=>o.value=_),onClose:F,onSave:U},{default:d.withCtx(()=>[d.createElementVNode("div",uE,[d.createElementVNode("div",hE,[d.createElementVNode("div",fE,[D[26]||(D[26]=d.createElementVNode("label",null,"模型类型:",-1)),d.createElementVNode("div",pE,[d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="BIM"}),onClick:D[0]||(D[0]=_=>l.value="BIM")},"BIM模型",2),d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="OSGB"}),onClick:D[1]||(D[1]=_=>l.value="OSGB")},"倾斜摄影",2)])]),d.createElementVNode("div",gE,[D[27]||(D[27]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",mE,[d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="param"}),onClick:D[2]||(D[2]=_=>a.value="param")},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="pick"}),onClick:D[3]||(D[3]=_=>a.value="pick")},"地图点选",2)])]),d.createElementVNode("div",AE,[D[28]||(D[28]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",yE,d.toDisplayString(x.value||"未选择"),1)]),D[42]||(D[42]=d.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[D[36]||(D[36]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",CE,[D[29]||(D[29]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[4]||(D[4]=_=>S.value.longitude=_),onChange:D[5]||(D[5]=_=>v("longitude")),step:"0.000001"},null,544),[[d.vModelText,S.value.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",EE,[D[30]||(D[30]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[6]||(D[6]=_=>S.value.latitude=_),onChange:D[7]||(D[7]=_=>v("latitude")),step:"0.000001"},null,544),[[d.vModelText,S.value.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",wE,[D[31]||(D[31]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[8]||(D[8]=_=>S.value.height=_),onChange:D[9]||(D[9]=_=>v("height")),step:"0.1"},null,544),[[d.vModelText,S.value.height,void 0,{number:!0}]])]),d.createElementVNode("div",bE,[D[32]||(D[32]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[10]||(D[10]=_=>S.value.totalRotation=_),onChange:D[11]||(D[11]=_=>v("totalRotation")),step:"1"},null,544),[[d.vModelText,S.value.totalRotation,void 0,{number:!0}]])]),D[37]||(D[37]=d.createElementVNode("div",{class:"separator"},null,-1)),D[38]||(D[38]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",vE,[D[33]||(D[33]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[12]||(D[12]=_=>S.value.lonlat=_),step:"0.000001"},null,512),[[d.vModelText,S.value.lonlat,void 0,{number:!0}]])]),d.createElementVNode("div",IE,[D[34]||(D[34]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[13]||(D[13]=_=>S.value.heightDistance=_),step:"0.1"},null,512),[[d.vModelText,S.value.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",xE,[D[35]||(D[35]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[14]||(D[14]=_=>S.value.rotation=_),step:"1"},null,512),[[d.vModelText,S.value.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",BE,[d.createElementVNode("button",{onClick:D[15]||(D[15]=_=>B("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:D[16]||(D[16]=_=>B("north"))},"北移"),d.createElementVNode("button",{onClick:D[17]||(D[17]=_=>B("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:D[18]||(D[18]=_=>B("west"))},"西移"),d.createElementVNode("button",{onClick:D[19]||(D[19]=_=>B("south"))},"南移"),d.createElementVNode("button",{onClick:D[20]||(D[20]=_=>B("east"))},"东移"),d.createElementVNode("button",{onClick:D[21]||(D[21]=_=>B("up"))},"上移"),d.createElementVNode("button",{onClick:D[22]||(D[22]=_=>B("down"))},"下移"),d.createElementVNode("button",{onClick:R,class:"primary-btn"},"正北俯视"),d.createElementVNode("button",{onClick:U,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(d.openBlock(),d.createElementBlock("div",SE,[d.createElementVNode("div",ME,[d.createElementVNode("div",TE,[d.createElementVNode("div",{onClick:D[23]||(D[23]=_=>f.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="BIM",style:{"margin-right":"5px"}},null,8,DE),D[39]||(D[39]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),p.value?(d.openBlock(),d.createElementBlock("div",kE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(p.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(p.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",PE,"未选择"))])]),d.createElementVNode("div",FE,[d.createElementVNode("div",RE,[d.createElementVNode("div",{onClick:D[24]||(D[24]=_=>f.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="MAP",style:{"margin-right":"5px"}},null,8,OE),D[40]||(D[40]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),h.value?(d.openBlock(),d.createElementBlock("div",LE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(h.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(h.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",NE,"未选择"))])]),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:M},"调整位置"),d.createElementVNode("button",{onClick:U},"保存")]),D[41]||(D[41]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):d.createCommentVNode("",!0)]),d.createElementVNode("div",UE,[d.createElementVNode("div",_E,[d.createElementVNode("div",QE,[d.createElementVNode("input",{type:"checkbox",checked:m.value,onChange:P},null,40,HE)]),D[43]||(D[43]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),D[44]||(D[44]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),D[45]||(D[45]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",GE,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(T.value,(_,Y)=>(d.openBlock(),d.createElementBlock("div",{key:_.modelId,class:d.normalizeClass(["list-item",{active:_.modelId===c.value}])},[d.createElementVNode("div",YE,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":$=>_.selected=$},null,8,VE),[[d.vModelCheckbox,_.selected]])]),d.createElementVNode("div",WE,d.toDisplayString(Y+1),1),d.createElementVNode("div",{class:"col-name",title:_.modelName},d.toDisplayString(_.modelName),9,zE),d.createElementVNode("div",jE,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:_.modelId===c.value,onChange:$=>N(_.modelId)},null,40,$E)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-3bfda484"]]);function Fi(){return Fi=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Fi.apply(null,arguments)}const KE={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},qE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},rc={lang:Fi({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},KE),timePickerLocale:Fi({},qE)};rc.lang.ok="确定";var Ri={exports:{}},XE=Ri.exports,ac;function lc(){return ac||(ac=1,(function(n,e){(function(t,i){n.exports=i()})(XE,(function(){var t=1e3,i=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",c="day",u="week",f="month",p="quarter",h="year",A="date",C="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var b=["th","st","nd","rd"],w=N%100;return"["+N+(b[(w-20)%10]||b[w]||b[0])+"]"}},I=function(N,b,w){var v=String(N);return!v||v.length>=b?N:""+Array(b+1-v.length).join(w)+N},M={s:I,z:function(N){var b=-N.utcOffset(),w=Math.abs(b),v=Math.floor(w/60),B=w%60;return(b<=0?"+":"-")+I(v,2,"0")+":"+I(B,2,"0")},m:function N(b,w){if(b.date()<w.date())return-N(w,b);var v=12*(w.year()-b.year())+(w.month()-b.month()),B=b.clone().add(v,f),R=w-B<0,U=b.clone().add(v+(R?-1:1),f);return+(-(v+(w-B)/(R?B-U:U-B))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:h,w:u,d:c,D:A,h:a,m:l,s:r,ms:o,Q:p}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},k="en",S={};S[k]=E;var x="$isDayjsObject",m=function(N){return N instanceof L||!(!N||!N[x])},F=function N(b,w,v){var B;if(!b)return k;if(typeof b=="string"){var R=b.toLowerCase();S[R]&&(B=R),w&&(S[R]=w,B=R);var U=b.split("-");if(!B&&U.length>1)return N(U[0])}else{var O=b.name;S[O]=b,B=O}return!v&&B&&(k=B),B||!v&&k},T=function(N,b){if(m(N))return N.clone();var w=typeof b=="object"?b:{};return w.date=N,w.args=arguments,new L(w)},P=M;P.l=F,P.i=m,P.w=function(N,b){return T(N,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var L=(function(){function N(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[x]=!0}var b=N.prototype;return b.parse=function(w){this.$d=(function(v){var B=v.date,R=v.utc;if(B===null)return new Date(NaN);if(P.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var U=B.match(g);if(U){var O=U[2]-1||0,D=(U[7]||"0").substring(0,3);return R?new Date(Date.UTC(U[1],O,U[3]||1,U[4]||0,U[5]||0,U[6]||0,D)):new Date(U[1],O,U[3]||1,U[4]||0,U[5]||0,U[6]||0,D)}}return new Date(B)})(w),this.init()},b.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},b.$utils=function(){return P},b.isValid=function(){return this.$d.toString()!==C},b.isSame=function(w,v){var B=T(w);return this.startOf(v)<=B&&B<=this.endOf(v)},b.isAfter=function(w,v){return T(w)<this.startOf(v)},b.isBefore=function(w,v){return this.endOf(v)<T(w)},b.$g=function(w,v,B){return P.u(w)?this[v]:this.set(B,w)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(w,v){var B=this,R=!!P.u(v)||v,U=P.p(w),O=function(V,j){var q=P.w(B.$u?Date.UTC(B.$y,j,V):new Date(B.$y,j,V),B);return R?q:q.endOf(c)},D=function(V,j){return P.w(B.toDate()[V].apply(B.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(j)),B)},_=this.$W,Y=this.$M,$=this.$D,J="set"+(this.$u?"UTC":"");switch(U){case h:return R?O(1,0):O(31,11);case f:return R?O(1,Y):O(0,Y+1);case u:var ne=this.$locale().weekStart||0,re=(_<ne?_+7:_)-ne;return O(R?$-re:$+(6-re),Y);case c:case A:return D(J+"Hours",0);case a:return D(J+"Minutes",1);case l:return D(J+"Seconds",2);case r:return D(J+"Milliseconds",3);default:return this.clone()}},b.endOf=function(w){return this.startOf(w,!1)},b.$set=function(w,v){var B,R=P.p(w),U="set"+(this.$u?"UTC":""),O=(B={},B[c]=U+"Date",B[A]=U+"Date",B[f]=U+"Month",B[h]=U+"FullYear",B[a]=U+"Hours",B[l]=U+"Minutes",B[r]=U+"Seconds",B[o]=U+"Milliseconds",B)[R],D=R===c?this.$D+(v-this.$W):v;if(R===f||R===h){var _=this.clone().set(A,1);_.$d[O](D),_.init(),this.$d=_.set(A,Math.min(this.$D,_.daysInMonth())).$d}else O&&this.$d[O](D);return this.init(),this},b.set=function(w,v){return this.clone().$set(w,v)},b.get=function(w){return this[P.p(w)]()},b.add=function(w,v){var B,R=this;w=Number(w);var U=P.p(v),O=function(Y){var $=T(R);return P.w($.date($.date()+Math.round(Y*w)),R)};if(U===f)return this.set(f,this.$M+w);if(U===h)return this.set(h,this.$y+w);if(U===c)return O(1);if(U===u)return O(7);var D=(B={},B[l]=i,B[a]=s,B[r]=t,B)[U]||1,_=this.$d.getTime()+w*D;return P.w(_,this)},b.subtract=function(w,v){return this.add(-1*w,v)},b.format=function(w){var v=this,B=this.$locale();if(!this.isValid())return B.invalidDate||C;var R=w||"YYYY-MM-DDTHH:mm:ssZ",U=P.z(this),O=this.$H,D=this.$m,_=this.$M,Y=B.weekdays,$=B.months,J=B.meridiem,ne=function(j,q,se,oe){return j&&(j[q]||j(v,R))||se[q].slice(0,oe)},re=function(j){return P.s(O%12||12,j,"0")},V=J||function(j,q,se){var oe=j<12?"AM":"PM";return se?oe.toLowerCase():oe};return R.replace(y,(function(j,q){return q||(function(se){switch(se){case"YY":return String(v.$y).slice(-2);case"YYYY":return P.s(v.$y,4,"0");case"M":return _+1;case"MM":return P.s(_+1,2,"0");case"MMM":return ne(B.monthsShort,_,$,3);case"MMMM":return ne($,_);case"D":return v.$D;case"DD":return P.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return ne(B.weekdaysMin,v.$W,Y,2);case"ddd":return ne(B.weekdaysShort,v.$W,Y,3);case"dddd":return Y[v.$W];case"H":return String(O);case"HH":return P.s(O,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return V(O,D,!0);case"A":return V(O,D,!1);case"m":return String(D);case"mm":return P.s(D,2,"0");case"s":return String(v.$s);case"ss":return P.s(v.$s,2,"0");case"SSS":return P.s(v.$ms,3,"0");case"Z":return U}return null})(j)||U.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(w,v,B){var R,U=this,O=P.p(v),D=T(w),_=(D.utcOffset()-this.utcOffset())*i,Y=this-D,$=function(){return P.m(U,D)};switch(O){case h:R=$()/12;break;case f:R=$();break;case p:R=$()/3;break;case u:R=(Y-_)/6048e5;break;case c:R=(Y-_)/864e5;break;case a:R=Y/s;break;case l:R=Y/i;break;case r:R=Y/t;break;default:R=Y}return B?R:P.a(R)},b.daysInMonth=function(){return this.endOf(f).$D},b.$locale=function(){return S[this.$L]},b.locale=function(w,v){if(!w)return this.$L;var B=this.clone(),R=F(w,v,!0);return R&&(B.$L=R),B},b.clone=function(){return P.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},N})(),G=L.prototype;return T.prototype=G,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",c],["$M",f],["$y",h],["$D",A]].forEach((function(N){G[N[1]]=function(b){return this.$g(b,N[0],N[1])}})),T.extend=function(N,b){return N.$i||(N(b,L,T),N.$i=!0),T},T.locale=F,T.isDayjs=m,T.unix=function(N){return T(1e3*N)},T.en=S[k],T.Ls=S,T.p={},T}))})(Ri)),Ri.exports}var JE=lc();const ze=tn(JE);var Oi={exports:{}},ZE=Oi.exports,cc;function ew(){return cc||(cc=1,(function(n,e){(function(t,i){n.exports=i(lc())})(ZE,(function(t){function i(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=i(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(r,l){return l==="W"?r+"周":r+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(r,l){var a=100*r+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return s.default.locale(o,null,!0),o}))})(Oi)),Oi.exports}ew();var Li={exports:{}},tw=Li.exports,dc;function nw(){return dc||(dc=1,(function(n,e){(function(t,i){n.exports=i()})(tw,(function(){return function(t,i,s){var o=i.prototype,r=function(f){return f&&(f.indexOf?f:f.s)},l=function(f,p,h,A,C){var g=f.name?f:f.$locale(),y=r(g[p]),E=r(g[h]),I=y||E.map((function(k){return k.slice(0,A)}));if(!C)return I;var M=g.weekStart;return I.map((function(k,S){return I[(S+(M||0))%7]}))},a=function(){return s.Ls[s.locale()]},c=function(f,p){return f.formats[p]||(function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(A,C,g){return C||g.slice(1)}))})(f.formats[p.toUpperCase()])},u=function(){var f=this;return{months:function(p){return p?p.format("MMMM"):l(f,"months")},monthsShort:function(p){return p?p.format("MMM"):l(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):l(f,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):l(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):l(f,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return c(f.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var f=a();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(p){return c(f,p)},meridiem:f.meridiem,ordinal:f.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(f){return l(a(),"weekdays",null,null,f)},s.weekdaysShort=function(f){return l(a(),"weekdaysShort","weekdays",3,f)},s.weekdaysMin=function(f){return l(a(),"weekdaysMin","weekdays",2,f)}}}))})(Li)),Li.exports}var iw=nw();const sw=tn(iw);var Ni={exports:{}},ow=Ni.exports,uc;function rw(){return uc||(uc=1,(function(n,e){(function(t,i){n.exports=i()})(ow,(function(){return function(t,i){i.prototype.weekday=function(s){var o=this.$locale().weekStart||0,r=this.$W,l=(r<o?r+7:r)-o;return this.$utils().u(s)?l:this.subtract(l,"day").add(s,"day")}}}))})(Ni)),Ni.exports}var aw=rw();const lw=tn(aw);var Ui={exports:{}},cw=Ui.exports,hc;function dw(){return hc||(hc=1,(function(n,e){(function(t,i){n.exports=i()})(cw,(function(){var t="week",i="year";return function(s,o,r){var l=o.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),f=r(this).endOf(t);if(u.isBefore(f))return 1}var p=r(this).startOf(i).date(c).startOf(t).subtract(1,"millisecond"),h=this.diff(p,t,!0);return h<0?r(this).startOf("week").week():Math.ceil(h)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Ui)),Ui.exports}var uw=dw();const hw=tn(uw);var _i={exports:{}},fw=_i.exports,fc;function pw(){return fc||(fc=1,(function(n,e){(function(t,i){n.exports=i()})(fw,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},c=function(g){return(g=+g)+(g>68?1900:2e3)},u=function(g){return function(y){this[g]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var E=y.match(/([+-]|\d\d)/g),I=60*E[1]+(+E[2]||0);return I===0?0:E[0]==="+"?-I:I})(g)}],p=function(g){var y=a[g];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(g,y){var E,I=a.meridiem;if(I){for(var M=1;M<=24;M+=1)if(g.indexOf(I(M,0,y))>-1){E=M>12;break}}else E=g===(y?"pm":"PM");return E},A={A:[l,function(g){this.afternoon=h(g,!1)}],a:[l,function(g){this.afternoon=h(g,!0)}],Q:[s,function(g){this.month=3*(g-1)+1}],S:[s,function(g){this.milliseconds=100*+g}],SS:[o,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(g){var y=a.ordinal,E=g.match(/\d+/);if(this.day=E[0],y)for(var I=1;I<=31;I+=1)y(I).replace(/\[|\]/g,"")===g&&(this.day=I)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(g){var y=p("months"),E=(p("monthsShort")||y.map((function(I){return I.slice(0,3)}))).indexOf(g)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[l,function(g){var y=p("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(g){this.year=c(g)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function C(g){var y,E;y=g,E=a&&a.formats;for(var I=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(T,P,L){var G=L&&L.toUpperCase();return P||E[L]||t[L]||E[G].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,b,w){return b||w.slice(1)}))}))).match(i),M=I.length,k=0;k<M;k+=1){var S=I[k],x=A[S],m=x&&x[0],F=x&&x[1];I[k]=F?{regex:m,parser:F}:S.replace(/^\[|\]$/g,"")}return function(T){for(var P={},L=0,G=0;L<M;L+=1){var N=I[L];if(typeof N=="string")G+=N.length;else{var b=N.regex,w=N.parser,v=T.slice(G),B=b.exec(v)[0];w.call(P,B),T=T.replace(B,"")}}return(function(R){var U=R.afternoon;if(U!==void 0){var O=R.hours;U?O<12&&(R.hours+=12):O===12&&(R.hours=0),delete R.afternoon}})(P),P}}return function(g,y,E){E.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(c=g.parseTwoDigitYear);var I=y.prototype,M=I.parse;I.parse=function(k){var S=k.date,x=k.utc,m=k.args;this.$u=x;var F=m[1];if(typeof F=="string"){var T=m[2]===!0,P=m[3]===!0,L=T||P,G=m[2];P&&(G=m[2]),a=this.$locale(),!T&&G&&(a=E.Ls[G]),this.$d=(function(v,B,R,U){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*v);var O=C(B)(v),D=O.year,_=O.month,Y=O.day,$=O.hours,J=O.minutes,ne=O.seconds,re=O.milliseconds,V=O.zone,j=O.week,q=new Date,se=Y||(D||_?1:q.getDate()),oe=D||q.getFullYear(),ae=0;D&&!_||(ae=_>0?_-1:q.getMonth());var Ee,le=$||0,Pe=J||0,ct=ne||0,$e=re||0;return V?new Date(Date.UTC(oe,ae,se,le,Pe,ct,$e+60*V.offset*1e3)):R?new Date(Date.UTC(oe,ae,se,le,Pe,ct,$e)):(Ee=new Date(oe,ae,se,le,Pe,ct,$e),j&&(Ee=U(Ee).week(j).toDate()),Ee)}catch{return new Date("")}})(S,F,x,E),this.init(),G&&G!==!0&&(this.$L=this.locale(G).$L),L&&S!=this.format(F)&&(this.$d=new Date("")),a={}}else if(F instanceof Array)for(var N=F.length,b=1;b<=N;b+=1){m[1]=F[b-1];var w=E.apply(this,m);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}b===N&&(this.$d=new Date(""))}else M.call(this,k)}}}))})(_i)),_i.exports}var gw=pw();const mw=tn(gw),Aw={class:"setting-panel"},yw={class:"tabs-header"},Cw={class:"tab-content"},Ew={key:0,class:"section"},ww={class:"setting-item"},bw={class:"setting-item"},vw={class:"setting-item"},Iw={key:1,class:"section"},xw={class:"tabs-header",style:{"margin-bottom":"8px"}},Bw={key:0},Sw={class:"setting-item column"},Mw={class:"setting-item column"},Tw={class:"setting-item"},Dw={key:1},kw={class:"setting-item column"},Pw={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},Fw={class:"search-box"},Rw={key:2,class:"section"},Ow={class:"setting-item"},Lw={key:0,class:"setting-item column"},Nw={class:"sub-label"},Uw={class:"setting-item"},_w={class:"setting-item"},Qw={class:"setting-item column"},Hw={class:"setting-item column"},Gw={class:"sub-label"},Yw={class:"setting-item column"},Vw={class:"sub-label"},Ww={class:"setting-item column"},zw={class:"sub-label"},jw={class:"setting-item column"},$w={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},Kw=["onClick","title"],qw={style:{display:"flex",gap:"8px","align-items":"center"}},Xw={key:3,class:"section"},Jw={class:"setting-item"},Zw={class:"setting-item column"},Gn=Ue(d.defineComponent({__name:"LeitingSetting",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean,default:!1},tiandituToken:{type:String,default:""},initialConfig:{type:Object,default:()=>({})}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){ze.locale("zh-cn"),ze.extend(sw),ze.extend(lw),ze.extend(hw),ze.extend(mw);const t=Ae.Switch,i=Ae.Radio.Group,s=Ae.Radio,o=Ae.Input,r=Ae.Slider,l=Ae.Select,a=Ae.Select.Option,c=Ae.DatePicker,u=n,f=e,p=d.inject("leitingMethods"),h=d.computed({get:()=>u.open!==void 0?u.open:u.visible,set:b=>{f("update:visible",b),f("update:open",b)}}),A=d.ref("GIS"),C=d.reactive({globe:!1,terrain:!1,depthTest:!1}),g=d.reactive({provider:"tianditu",tianditu:{token:"c25f14fb6bd4397cf8fe45144ff768d6",layerType:"img_w",showLabel:!1},arcgis:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},baseMap:"tianditu"}),y=d.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:ze("2025-06-22 10:00"),brightness:1.5,contrast:1,saturation:1,backgroundColor:"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)"}),E=d.reactive({collision:!1,habit:0}),I=b=>{b&&(b.globe!==void 0&&(C.globe=b.globe),b.terrain!==void 0&&(C.terrain=b.terrain),b.depthTest!==void 0&&(C.depthTest=b.depthTest),b.mapProvider!==void 0&&(g.provider=b.mapProvider),b.tiandituLayerType!==void 0&&(g.tianditu.layerType=b.tiandituLayerType),b.tiandituShowLabel!==void 0&&(g.tianditu.showLabel=b.tiandituShowLabel),b.arcgisUrl!==void 0&&(g.arcgis.url=b.arcgisUrl),b.shadows!==void 0&&(y.shadows=b.shadows),b.shadowDarkness!==void 0&&(y.shadowDarkness=b.shadowDarkness),b.environmentMap!==void 0&&(y.environmentMap=b.environmentMap),b.ambientOcclusion!==void 0&&(y.ambientOcclusion=b.ambientOcclusion),b.time!==void 0&&(typeof b.time=="number"?y.time=ze().startOf("day").add(b.time,"hour"):y.time=ze(b.time)),b.brightness!==void 0&&(y.brightness=b.brightness),b.contrast!==void 0&&(y.contrast=b.contrast),b.saturation!==void 0&&(y.saturation=b.saturation),b.backgroundColor!==void 0&&(y.backgroundColor=b.backgroundColor),b.collision!==void 0&&(E.collision=b.collision),b.mouseHabit!==void 0&&(E.habit=b.mouseHabit))};d.watch(()=>u.initialConfig,b=>{I(b)},{deep:!0,immediate:!0});const M=["linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)","linear-gradient(0deg, #0f2027 0%, #203a43 50%, #2c5364 100%)","linear-gradient(0deg, #cfd9df 0%, #e2ebf0 100%)"],k=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],S=()=>{const b=g.provider,w={};b==="tianditu"?(w.token=g.tianditu.token,w.layerType=g.tianditu.layerType,w.showAnnotation=g.tianditu.showLabel):b==="arcgis"&&(w.url=g.arcgis.url),p.value?.changeBaseMap?.(b,w)};d.watch(()=>g.provider,S),d.watch(()=>g.tianditu.layerType,S),d.watch(()=>g.tianditu.showLabel,S),d.watch(()=>g.tianditu.token,hs(S,1e3)),d.watch(()=>g.arcgis.url,hs(S,1e3)),d.onMounted(()=>{u.tiandituToken&&(g.tianditu.token=u.tiandituToken)}),d.watch(()=>C.globe,b=>p.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>C.terrain,b=>p.value?.setTerrainEnable?.(b)),d.watch(()=>C.depthTest,b=>p.value?.setDepthTestEnable?.(b)),d.watch(()=>p?.value,b=>{if(b){if(b.getConfigure=()=>({globe:C.globe,terrain:C.terrain,depthTest:C.depthTest,mapProvider:g.provider,tiandituLayerType:g.tianditu.layerType,tiandituShowLabel:g.tianditu.showLabel,arcgisUrl:g.arcgis.url,shadows:y.shadows,shadowDarkness:y.shadowDarkness,environmentMap:y.environmentMap,ambientOcclusion:y.ambientOcclusion,time:ze.isDayjs(y.time)?y.time.format("YYYY-MM-DD HH:mm"):y.time,brightness:y.brightness,contrast:y.contrast,saturation:y.saturation,backgroundColor:y.backgroundColor,collision:E.collision,mouseHabit:E.habit}),b.setConfigure=w=>{I(w)},b.setBackgroundColor&&y.backgroundColor&&b.setBackgroundColor(y.backgroundColor),b.setGlobeEnvironmentVisible&&b.setGlobeEnvironmentVisible(C.globe),b.setShadowsEnable&&b.setShadowsEnable(y.shadows),b.setShadowDarkness&&b.setShadowDarkness(y.shadowDarkness),b.setEnvironmentMapEnable&&b.setEnvironmentMapEnable(y.environmentMap),b.setAmbientOcclusion&&b.setAmbientOcclusion(y.ambientOcclusion),b.setTime){const w=ze.isDayjs(y.time)?y.time.toDate():new Date;b.setTime(w)}b.setModelBrightness&&b.setModelBrightness(y.brightness),b.setCollisionDetection&&b.setCollisionDetection(E.collision),b.setMouseHabit&&b.setMouseHabit(E.habit),b.changeBaseMap&&g.baseMap&&b.changeBaseMap(g.baseMap,{token:g.tianditu.token,layerType:g.tianditu.layerType,showAnnotation:g.tianditu.showLabel,url:g.arcgis.url})}},{immediate:!0});const x=d.computed({get:()=>{const b=y.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(b)?b:"#ffffff"},set:b=>{y.backgroundColor=b}}),m=d.ref(""),F=d.ref(!1),T=d.ref([]);d.watch(()=>C.globe,b=>p.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>C.terrain,b=>p.value?.setTerrainEnable?.(b)),d.watch(()=>g.baseMap,b=>{p.value?.changeBaseMap?.(b,{token:u.tiandituToken})}),d.watch(()=>y.shadows,b=>p.value?.setShadowsEnable?.(b)),d.watch(()=>y.shadowDarkness,b=>p.value?.setShadowDarkness?.(b)),d.watch(()=>y.environmentMap,b=>p.value?.setEnvironmentMapEnable?.(b)),d.watch(()=>y.ambientOcclusion,b=>p.value?.setAmbientOcclusion?.(b)),d.watch(()=>y.time,b=>{const w=ze.isDayjs(b)?b.toDate():new Date;p.value?.setTime?.(w)}),d.watch(()=>[y.brightness,y.contrast,y.saturation],([b,w,v])=>{const B=p.value;B?.setModelColorAdjustment?B.setModelColorAdjustment({brightness:b,contrast:w,saturation:v}):B?.setModelBrightness?.(b)}),d.watch(()=>y.backgroundColor,b=>{if(p.value?.setBackgroundColor)p.value.setBackgroundColor(b);else{const w=document.querySelector(".cesium-viewer");w&&(w.style.background=b)}}),d.watch(()=>E.collision,b=>p.value?.setCollisionDetection?.(b)),d.watch(()=>E.habit,b=>p.value?.setMouseHabit?.(b));const P=b=>{if(b?.pois&&Array.isArray(b.pois)&&b.pois.length>0){const w=b.pois[0],v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}if(b?.area&&b.area.lonlat){const w=b.area,v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}return null},G=hs(async()=>{const b=(m.value||"").trim();if(!b)return;const w=u.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";F.value=!0,T.value=[];try{if(p.value?.searchLocation){const v=await p.value.searchLocation(b,w),B=P(v);B&&(T.value=[B],me.success(`找到:${B.name||""}`),p.value.flyTo(B.lon,B.lat,5e3))}else{const B=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:b,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(w)}`,R=await fetch(B);if(!R.ok)throw new Error(`HTTP ${R.status}`);const U=await R.json(),O=P(U);O&&(T.value=[O],me.success(`找到:${O.name||""}`),p.value?.flyTo?.(O.lon,O.lat,5e3))}}catch(v){console.error("tianditu search error",v)}finally{F.value=!1}},800);d.watch(m,()=>{G()});const N=()=>{h.value=!1,f("close")};return d.onMounted(()=>{}),(b,w)=>(d.openBlock(),d.createBlock(Re,{visible:h.value,title:"设置","full-height":n.fullHeight,onClose:N,"onUpdate:visible":w[26]||(w[26]=v=>h.value=v)},{default:d.withCtx(()=>[d.createElementVNode("div",Aw,[d.createElementVNode("div",yw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="GIS"}]),onClick:w[0]||(w[0]=v=>A.value="GIS")},"GIS",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MAP"}]),onClick:w[1]||(w[1]=v=>A.value="MAP")},"地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="RENDER"}]),onClick:w[2]||(w[2]=v=>A.value="RENDER")},"渲染",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MOUSE"}]),onClick:w[3]||(w[3]=v=>A.value="MOUSE")},"鼠标",2)]),d.createElementVNode("div",Cw,[A.value==="GIS"?(d.openBlock(),d.createElementBlock("div",Ew,[d.createElementVNode("div",ww,[w[27]||(w[27]=d.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),d.createVNode(d.unref(t),{checked:C.globe,"onUpdate:checked":w[4]||(w[4]=v=>C.globe=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",bw,[w[28]||(w[28]=d.createElementVNode("span",null,"地形 (高程)",-1)),d.createVNode(d.unref(t),{checked:C.terrain,"onUpdate:checked":w[5]||(w[5]=v=>C.terrain=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",vw,[w[29]||(w[29]=d.createElementVNode("span",null,"地形遮挡",-1)),d.createVNode(d.unref(t),{checked:C.depthTest,"onUpdate:checked":w[6]||(w[6]=v=>C.depthTest=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),A.value==="MAP"?(d.openBlock(),d.createElementBlock("div",Iw,[d.createElementVNode("div",xw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:g.provider==="tianditu"}]),onClick:w[7]||(w[7]=v=>g.provider="tianditu")},"天地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:g.provider==="arcgis"}]),onClick:w[8]||(w[8]=v=>g.provider="arcgis")},"ArcGIS",2)]),g.provider==="tianditu"?(d.openBlock(),d.createElementBlock("div",Bw,[d.createElementVNode("div",Sw,[w[30]||(w[30]=d.createElementVNode("div",{class:"sub-label"},"Token",-1)),d.createVNode(d.unref(o),{value:g.tianditu.token,"onUpdate:value":w[9]||(w[9]=v=>g.tianditu.token=v),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),d.createElementVNode("div",Mw,[w[31]||(w[31]=d.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),d.createVNode(d.unref(l),{value:g.tianditu.layerType,"onUpdate:value":w[10]||(w[10]=v=>g.tianditu.layerType=v),size:"small",style:{width:"100%"}},{default:d.withCtx(()=>[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(k,v=>d.createVNode(d.unref(a),{key:v.value,value:v.value},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(v.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),d.createElementVNode("div",Tw,[w[32]||(w[32]=d.createElementVNode("span",null,"叠加注记",-1)),d.createVNode(d.unref(t),{checked:g.tianditu.showLabel,"onUpdate:checked":w[11]||(w[11]=v=>g.tianditu.showLabel=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),g.provider==="arcgis"?(d.openBlock(),d.createElementBlock("div",Dw,[d.createElementVNode("div",kw,[w[33]||(w[33]=d.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),d.createVNode(d.unref(o),{value:g.arcgis.url,"onUpdate:value":w[12]||(w[12]=v=>g.arcgis.url=v),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):d.createCommentVNode("",!0),d.createElementVNode("div",Pw,[w[34]||(w[34]=d.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),d.createElementVNode("div",Fw,[d.createVNode(d.unref(o),{value:m.value,"onUpdate:value":w[13]||(w[13]=v=>m.value=v),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="RENDER"?(d.openBlock(),d.createElementBlock("div",Rw,[d.createElementVNode("div",Ow,[w[35]||(w[35]=d.createElementVNode("span",null,"阴影",-1)),d.createVNode(d.unref(t),{checked:y.shadows,"onUpdate:checked":w[14]||(w[14]=v=>y.shadows=v),size:"small"},null,8,["checked"])]),y.shadows?(d.openBlock(),d.createElementBlock("div",Lw,[d.createElementVNode("div",Nw,"阴影暗度 ("+d.toDisplayString(y.shadowDarkness.toFixed(2))+")",1),d.createVNode(d.unref(r),{value:y.shadowDarkness,"onUpdate:value":w[15]||(w[15]=v=>y.shadowDarkness=v),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Uw,[w[36]||(w[36]=d.createElementVNode("span",null,"环境贴图 (HDR)",-1)),d.createVNode(d.unref(t),{checked:y.environmentMap,"onUpdate:checked":w[16]||(w[16]=v=>y.environmentMap=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",_w,[w[37]||(w[37]=d.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),d.createVNode(d.unref(t),{checked:y.ambientOcclusion,"onUpdate:checked":w[17]||(w[17]=v=>y.ambientOcclusion=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Qw,[w[38]||(w[38]=d.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),d.createVNode(d.unref(c),{value:y.time,"onUpdate:value":w[18]||(w[18]=v=>y.time=v),"show-time":"",locale:d.unref(rc),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),d.createElementVNode("div",Hw,[d.createElementVNode("div",Gw,"模型亮度 ("+d.toDisplayString(y.brightness.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.brightness,"onUpdate:value":w[19]||(w[19]=v=>y.brightness=v),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Yw,[d.createElementVNode("div",Vw,"模型对比度 ("+d.toDisplayString(y.contrast.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.contrast,"onUpdate:value":w[20]||(w[20]=v=>y.contrast=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Ww,[d.createElementVNode("div",zw,"模型饱和度 ("+d.toDisplayString(y.saturation.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.saturation,"onUpdate:value":w[21]||(w[21]=v=>y.saturation=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",jw,[w[39]||(w[39]=d.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),d.createElementVNode("div",$w,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(M,(v,B)=>d.createElementVNode("div",{key:B,style:d.normalizeStyle({background:v,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:R=>y.backgroundColor=v,title:"预设 "+(B+1)},null,12,Kw)),64))]),d.createElementVNode("div",qw,[d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":w[22]||(w[22]=v=>x.value=v),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[d.vModelText,x.value]]),d.createVNode(d.unref(o),{value:y.backgroundColor,"onUpdate:value":w[23]||(w[23]=v=>y.backgroundColor=v),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="MOUSE"?(d.openBlock(),d.createElementBlock("div",Xw,[d.createElementVNode("div",Jw,[w[40]||(w[40]=d.createElementVNode("span",null,"碰撞检测",-1)),d.createVNode(d.unref(t),{checked:E.collision,"onUpdate:checked":w[24]||(w[24]=v=>E.collision=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Zw,[w[43]||(w[43]=d.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),d.createVNode(d.unref(i),{value:E.habit,"onUpdate:value":w[25]||(w[25]=v=>E.habit=v),size:"small"},{default:d.withCtx(()=>[d.createVNode(d.unref(s),{value:0},{default:d.withCtx(()=>[...w[41]||(w[41]=[d.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),d.createVNode(d.unref(s),{value:1},{default:d.withCtx(()=>[...w[42]||(w[42]=[d.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):d.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-1ed17be9"]]),eb={class:"cad-layer-panel"},tb={class:"layer-list-container"},nb={class:"list-header"},ib={class:"col-check"},sb=["checked"],ob={class:"list-body"},rb={class:"col-check"},ab=["checked","onChange"],lb={class:"col-index"},cb=["title"],db={class:"col-color"},ub=["value"],hb={key:0,class:"empty-text"},fb=Ue(d.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(""),r=d.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(E=>({modelId:E.modelId,modelName:E.modelName}))||[])},a=d.computed(()=>r.value.map(E=>({value:E.modelId,label:E.modelName}))),c=d.ref([]),u=d.ref([]),f=d.computed(()=>c.value.length>0&&u.value.length===c.value.length),p=({modelId:E})=>{if(c.value=[],u.value=[],s.value&&s.value.getDxfLayers){const I=s.value.getDxfLayers({modelId:E});I&&Object.keys(I).forEach((M,k)=>{I[M].length&&(c.value.push({index:k+1,layerName:M,layerColor:I[M][0].color||"#ffffff",key:M}),u.value.push(M))})}},h=E=>{o.value=E,p({modelId:E})},A=E=>{E.target.checked?u.value=c.value.map(M=>M.key):u.value=[],g()},C=(E,I)=>{I.target.checked?u.value.includes(E)||u.value.push(E):u.value=u.value.filter(k=>k!==E),g()},g=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:u.value}),s.value.getDxfLayers)){const E=s.value.getDxfLayers({modelId:o.value});if(E){const I=Object.keys(E).filter(M=>!u.value.includes(M));s.value.showDxfLayer({modelId:o.value,show:!1,layers:I})}}},y=()=>{i("update:visible",!1),i("handleCloseCardByCadCard")};return d.watch(()=>t.visible,E=>{E&&(l(),t.currentModelId?(o.value=t.currentModelId,p({modelId:t.currentModelId})):a.value.length>0&&(o.value=a.value[0]?.value,p({modelId:o.value})))}),d.watch(()=>t.currentModelId,E=>{E&&t.visible&&(o.value=E,p({modelId:E}))}),(E,I)=>(d.openBlock(),d.createBlock(Re,{visible:n.visible,title:"CAD图层","onUpdate:visible":I[3]||(I[3]=M=>E.$emit("update:visible",M)),onClose:y,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":d.withCtx(()=>[d.createElementVNode("div",{class:"header-select-container",onMousedown:I[2]||(I[2]=d.withModifiers(()=>{},["stop"]))},[I[4]||(I[4]=d.createElementVNode("span",{class:"header-label"},"图纸:",-1)),d.createVNode(d.unref(Ae.Select),{value:o.value,"onUpdate:value":I[0]||(I[0]=M=>o.value=M),options:a.value,onChange:I[1]||(I[1]=M=>h(M)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:d.withCtx(()=>[d.createElementVNode("div",eb,[d.createElementVNode("div",tb,[d.createElementVNode("div",nb,[d.createElementVNode("div",ib,[d.createElementVNode("input",{type:"checkbox",checked:f.value,onChange:A},null,40,sb)]),I[5]||(I[5]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),I[6]||(I[6]=d.createElementVNode("div",{class:"col-name"},"图层名称",-1)),I[7]||(I[7]=d.createElementVNode("div",{class:"col-color"},"颜色",-1))]),d.createElementVNode("div",ob,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,M=>(d.openBlock(),d.createElementBlock("div",{key:M.key,class:"list-item"},[d.createElementVNode("div",rb,[d.createElementVNode("input",{type:"checkbox",checked:u.value.includes(M.key),onChange:k=>C(M.key,k)},null,40,ab)]),d.createElementVNode("div",lb,d.toDisplayString(M.index),1),d.createElementVNode("div",{class:"col-name",title:M.layerName},d.toDisplayString(M.layerName),9,cb),d.createElementVNode("div",db,[d.createElementVNode("input",{type:"color",value:M.layerColor,disabled:""},null,8,ub)])]))),128)),c.value.length===0?(d.openBlock(),d.createElementBlock("div",hb,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),pb={class:"adjust-panel"},gb={class:"control-panel"},mb={class:"form-item"},Ab={class:"radio-group"},yb={class:"form-item"},Cb=["title"],Eb={class:"param-row"},wb=["step"],bb={class:"param-row"},vb=["step"],Ib={class:"param-row"},xb=["step"],Bb={class:"param-row"},Sb=["step"],Mb={class:"param-row"},Tb=["step"],Db={class:"param-row"},kb=["step"],Pb={class:"param-row"},Fb=["step"],Rb={class:"button-grid"},Ob={key:1,class:"pick-mode-ui"},Lb=["onClick"],Nb=["checked"],Ub={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},_b={class:"param-row"},Qb={style:{width:"40px"}},Hb=["onUpdate:modelValue"],Gb={class:"param-row"},Yb={style:{width:"40px"}},Vb=["onUpdate:modelValue"],Wb={class:"param-row"},zb={style:{width:"40px"}},jb=["onUpdate:modelValue"],$b={class:"list-panel"},Kb={class:"list-header"},qb={class:"col-check"},Xb=["checked"],Jb={class:"list-body"},Zb={class:"col-check"},ev=["onUpdate:modelValue"],tv={class:"col-index"},nv=["title"],iv={class:"col-main"},sv=["checked","onChange"],ov={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},rv=Ue(d.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.inject("leitingMethods"),r=d.ref([]),l=d.ref(""),a=d.computed(()=>r.value.length>0&&r.value.every(w=>w.selected)),c=d.ref("param"),u=d.ref("bimPoint1"),f=d.ref(null),p=d.ref("bimPoint1"),h=d.reactive({bimPoint1:{longitude:void 0,latitude:void 0,type:"CAD标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0},bimPoint2:{longitude:void 0,latitude:void 0,type:"地图标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0}}),A=d.ref(1e-6),C=d.reactive({modelId:"",longitude:0,latitude:0,distance:1e-6,rotation:1,totalRotation:0,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0}),g=d.computed(()=>{const w=r.value.find(v=>v.modelId===l.value);return w?w.modelName:""}),y=()=>{s("update:visible",!1)},E=()=>(!f.value&&o?.value?.getViewer&&o?.value?.getCesium&&(f.value=new oc(o.value.getViewer(),o.value.getCesium())),f.value),I=()=>{E()?.clearMarkers(),h.bimPoint1.longitude=void 0,h.bimPoint1.latitude=void 0,h.bimPoint1.height=void 0,h.bimPoint2.longitude=void 0,h.bimPoint2.latitude=void 0,h.bimPoint2.height=void 0},M=w=>{const v=u.value,B=h[v];if(B){B.longitude=w.longitude,B.latitude=w.latitude,B.height=w.height;const R=v==="bimPoint1"?"BIM":"MAP";E()?.addMarker(R,w),me.success(`${B.type}已添加`)}},k=()=>{E()?.registerPickHandler(w=>{M(w)})},S=()=>{E()?.destroyPickHandler()},x=w=>{c.value=w,w!=="pick"&&s("clearBimPointList")};d.watch(()=>c.value,w=>{w==="pick"?k():S()}),d.onUnmounted(()=>{S()});const m=()=>{if(!o?.value?.getDxfModels)return;const w=o.value.getDxfModels();if(Array.isArray(w)?r.value=w.map(v=>({modelId:v.modelId,modelName:v.modelName,formData:v.formData||{},selected:!1,tileset:v})):r.value=[],r.value.length>0){const v=o.value.getCadModelId?o.value.getCadModelId():"";v&&r.value.find(B=>B.modelId===v)?F(v):F(r.value[0].modelId),r.value.forEach(B=>B.selected=!0)}},F=w=>{l.value=w;const v=r.value.find(B=>B.modelId===w);v&&v.formData&&Object.keys(C).forEach(B=>{v.formData[B]!==void 0&&(C[B]=v.formData[B])})},T=(w,v)=>{if(!o?.value?.adjustingModelByCad)return;const B=r.value.find(R=>R.modelId===w);B&&B.tileset&&(B.formData={...B.formData,...v},B.tileset.formData=B.formData,o.value.adjustingModelByCad({...B.formData,tileset:B.tileset}))},P=w=>{if(!l.value)return;const v=C[w];T(l.value,{[w]:v})},L=w=>{const v=r.value.filter(O=>O.selected);if(v.length===0){me.warning("请先选择要调整的模型");return}const{distance:B,heightDistance:R,rotation:U}=C;v.forEach(O=>{const D={...O.formData};switch(w){case"north":D.latitude+=B;break;case"south":D.latitude-=B;break;case"east":D.longitude+=B;break;case"west":D.longitude-=B;break;case"up":D.height+=R;break;case"down":D.height-=R;break;case"rotateLeft":D.totalRotation=(D.totalRotation||0)-U;break;case"rotateRight":D.totalRotation=(D.totalRotation||0)+U;break}O.modelId===l.value&&Object.assign(C,D),T(O.modelId,D)})},G=w=>{const v=w.target.checked;r.value.forEach(B=>B.selected=v)},N=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},b=()=>{const w=h.bimPoint1,v=h.bimPoint2;if(w.longitude===void 0||v.longitude===void 0){me.warning("请先完成点选操作");return}const B=r.value.filter(_=>_.selected);if(B.length===0){me.warning("请先选择要调整的模型");return}let R=0,U=0,O=0;const D=E();if(D){const{dLon:_,dLat:Y,dHeight:$}=D.calculateOffset(w,v);R=_,U=Y,O=$}else R=v.longitude-w.longitude,U=v.latitude-w.latitude,O=v.height-w.height;B.forEach(_=>{const Y={..._.formData};Y.longitude+=R,Y.latitude+=U,Y.height+=O,_.modelId===l.value&&Object.assign(C,Y),T(_.modelId,Y)}),me.success("位置已调整")};return d.watch(()=>i.visible,w=>{w?m():(S(),I())}),d.onMounted(()=>{i.visible&&m()}),e({setBIMPointsList:({longitude:w,latitude:v,height:B})=>{h[p.value].longitude=w,h[p.value].latitude=v,h[p.value].height=B},addGltfOr3dTilesModelList:w=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(w,v)=>(d.openBlock(),d.createBlock(Re,{visible:i.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":v[21]||(v[21]=B=>s("update:visible",B)),onClose:y},{default:d.withCtx(()=>[d.createElementVNode("div",pb,[d.createElementVNode("div",gb,[d.createElementVNode("div",mb,[v[22]||(v[22]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",Ab,[d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="param"}),onClick:v[0]||(v[0]=B=>x("param"))},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="pick"}),onClick:v[1]||(v[1]=B=>x("pick"))},"地图点选",2)])]),d.createElementVNode("div",yb,[v[23]||(v[23]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",{class:"value",title:g.value},d.toDisplayString(g.value||"未选择"),9,Cb)]),v[35]||(v[35]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[v[31]||(v[31]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",Eb,[v[24]||(v[24]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[2]||(v[2]=B=>C.longitude=B),onChange:v[3]||(v[3]=B=>P("longitude")),step:A.value},null,40,wb),[[d.vModelText,C.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",bb,[v[25]||(v[25]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[4]||(v[4]=B=>C.latitude=B),onChange:v[5]||(v[5]=B=>P("latitude")),step:A.value},null,40,vb),[[d.vModelText,C.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Ib,[v[26]||(v[26]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[6]||(v[6]=B=>C.height=B),onChange:v[7]||(v[7]=B=>P("height")),step:A.value},null,40,xb),[[d.vModelText,C.height,void 0,{number:!0}]])]),d.createElementVNode("div",Bb,[v[27]||(v[27]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[8]||(v[8]=B=>C.totalRotation=B),onChange:v[9]||(v[9]=B=>P("totalRotation")),step:A.value},null,40,Sb),[[d.vModelText,C.totalRotation,void 0,{number:!0}]])]),v[32]||(v[32]=d.createElementVNode("div",{class:"separator"},null,-1)),v[33]||(v[33]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",Mb,[v[28]||(v[28]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[10]||(v[10]=B=>C.distance=B),step:A.value},null,8,Tb),[[d.vModelText,C.distance,void 0,{number:!0}]])]),d.createElementVNode("div",Db,[v[29]||(v[29]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[11]||(v[11]=B=>C.heightDistance=B),step:A.value},null,8,kb),[[d.vModelText,C.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",Pb,[v[30]||(v[30]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[12]||(v[12]=B=>C.rotation=B),step:A.value},null,8,Fb),[[d.vModelText,C.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",Rb,[d.createElementVNode("button",{onClick:v[13]||(v[13]=B=>L("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:v[14]||(v[14]=B=>L("north"))},"北移"),d.createElementVNode("button",{onClick:v[15]||(v[15]=B=>L("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:v[16]||(v[16]=B=>L("west"))},"西移"),d.createElementVNode("button",{onClick:v[17]||(v[17]=B=>L("south"))},"南移"),d.createElementVNode("button",{onClick:v[18]||(v[18]=B=>L("east"))},"东移"),d.createElementVNode("button",{onClick:v[19]||(v[19]=B=>L("up"))},"上移"),d.createElementVNode("button",{onClick:v[20]||(v[20]=B=>L("down"))},"下移"),d.createElementVNode("button",{onClick:N,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(d.openBlock(),d.createElementBlock("div",Ob,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(h,(B,R)=>(d.openBlock(),d.createElementBlock("div",{key:R,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[d.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:U=>u.value=R},[d.createElementVNode("input",{type:"radio",checked:u.value===R,style:{"margin-right":"5px"}},null,8,Nb),d.createTextVNode(" "+d.toDisplayString(B.type)+": ",1)],8,Lb),d.createElementVNode("div",Ub,[d.createElementVNode("div",_b,[d.createElementVNode("label",Qb,d.toDisplayString(B.longitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":U=>B.longitude=U,readonly:"",style:{width:"100px"}},null,8,Hb),[[d.vModelText,B.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Gb,[d.createElementVNode("label",Yb,d.toDisplayString(B.latitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":U=>B.latitude=U,readonly:"",style:{width:"100px"}},null,8,Vb),[[d.vModelText,B.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Wb,[d.createElementVNode("label",zb,d.toDisplayString(B.heightText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":U=>B.height=U,readonly:"",style:{width:"100px"}},null,8,jb),[[d.vModelText,B.height,void 0,{number:!0}]])])])]))),128)),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:b,class:"primary-btn"},"应用校准"),d.createElementVNode("button",{onClick:N},"保存")]),v[34]||(v[34]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),d.createElementVNode("div",$b,[d.createElementVNode("div",Kb,[d.createElementVNode("div",qb,[d.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:G},null,40,Xb)]),v[36]||(v[36]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),v[37]||(v[37]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),v[38]||(v[38]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",Jb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(B,R)=>(d.openBlock(),d.createElementBlock("div",{key:B.modelId,class:d.normalizeClass(["list-item",{active:B.modelId===l.value}])},[d.createElementVNode("div",Zb,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":U=>B.selected=U},null,8,ev),[[d.vModelCheckbox,B.selected]])]),d.createElementVNode("div",tv,d.toDisplayString(R+1),1),d.createElementVNode("div",{class:"col-name",title:B.modelName},d.toDisplayString(B.modelName),9,nv),d.createElementVNode("div",iv,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:B.modelId===l.value,onChange:U=>F(B.modelId)},null,40,sv)])],2))),128)),r.value.length===0?(d.openBlock(),d.createElementBlock("div",ov,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),av={class:"annotation-content"},lv={class:"annotation-tools"},cv={class:"annotation-controls"},dv={class:"control-group",title:"颜色"},uv={class:"tool-item color-tool"},hv={class:"control-group line-width-container",title:"线宽"},fv=["onClick"],pv={class:"option-label"},gv=Ue(d.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(""),r=d.ref("#ff0000"),l=d.ref(1),a=d.ref(!1),c=d.ref(null),u=d.ref(null),f=d.ref({top:"0px",left:"0px"}),p=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],h=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,A=()=>{i("update:visible",!1)},C=x=>{o.value=x;const m=h();if(m)switch(x){case"freehandLine":m.startFreehandLine();break;case"arrow":m.startArrow();break;case"straightLine":m.startStraightLine();break;case"rectangle":m.startRectangle();break;case"ellipse":m.startEllipse();break}},g=()=>{const x=h();x&&(x.setCurrentColor(r.value),x.changeColor(r.value))},y=()=>{if(!a.value&&c.value){const x=c.value.getBoundingClientRect();f.value={top:`${x.top}px`,left:`${x.right+8}px`}}a.value=!a.value},E=x=>{l.value=x,a.value=!1;const m=h();m&&(m.setCurrentWidth(x),m.changeWidth(x))},I=()=>{const x=h();x&&x.deleteSelectedEntity()},M=()=>{const x=h();x&&x.clearAll()},k=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const x=h();x&&x.saveAnnotations()},S=x=>{const m=x.target,F=c.value&&c.value.contains(m),T=u.value&&u.value.contains(m);!F&&!T&&(a.value=!1)};return d.onMounted(()=>{document.addEventListener("click",S)}),d.onUnmounted(()=>{document.removeEventListener("click",S)}),(x,m)=>(d.openBlock(),d.createBlock(Re,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":m[6]||(m[6]=F=>i("update:visible",F)),onClose:A},{default:d.withCtx(()=>[d.createElementVNode("div",av,[d.createElementVNode("div",lv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:m[0]||(m[0]=F=>C("freehandLine")),title:"手绘线"},[...m[7]||(m[7]=[d.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:m[1]||(m[1]=F=>C("arrow")),title:"箭头"},[...m[8]||(m[8]=[d.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:m[2]||(m[2]=F=>C("straightLine")),title:"直线"},[...m[9]||(m[9]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:m[3]||(m[3]=F=>C("rectangle")),title:"矩形"},[...m[10]||(m[10]=[d.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:m[4]||(m[4]=F=>C("ellipse")),title:"椭圆"},[...m[11]||(m[11]=[d.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),m[13]||(m[13]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",cv,[d.createElementVNode("div",dv,[d.createElementVNode("div",uv,[d.createElementVNode("div",{class:"color-swatch",style:d.normalizeStyle({backgroundColor:r.value})},null,4),d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":m[5]||(m[5]=F=>r.value=F),onChange:g,class:"color-input-overlay"},null,544),[[d.vModelText,r.value]])])]),d.createElementVNode("div",hv,[d.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:c,class:"tool-item",onClick:d.withModifiers(y,["stop"])},[d.createElementVNode("div",{class:"current-width-preview",style:d.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[a.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:u,class:"line-width-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(p,F=>d.createElementVNode("div",{key:F.value,class:d.normalizeClass(["line-width-option",{selected:l.value===F.value}]),onClick:d.withModifiers(T=>E(F.value),["stop"])},[d.createElementVNode("span",pv,d.toDisplayString(F.label),1),d.createElementVNode("div",{class:"line-preview",style:d.normalizeStyle({height:F.value+"px",backgroundColor:l.value===F.value?"#1890ff":"#ddd"})},null,4)],10,fv)),64))],4)):d.createCommentVNode("",!0)]))]),m[12]||(m[12]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("button",{class:"control-btn",onClick:I,title:"删除选中"}," 🗑️ "),d.createElementVNode("button",{class:"control-btn",onClick:M,title:"清空"}," ❌ "),d.createElementVNode("button",{class:"control-btn",onClick:k,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),mv={class:"measure-content"},Av={class:"measure-tools"},yv={key:0,class:"measure-results"},Cv={class:"result-row"},Ev={class:"result-value"},wv={class:"result-row"},bv={class:"result-value"},vv={class:"result-row"},Iv={class:"result-value"},xv={class:"result-row"},Bv={class:"result-value"},Sv={key:1,class:"result-row"},Mv={class:"result-value"},Tv={key:2,class:"result-row"},Dv={class:"result-value"},kv={class:"measure-controls"},Pv={class:"control-group",title:"单位"},Fv={class:"unit-display"},Rv=["onClick"],Ov=Ue(d.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(null),r=d.ref(null),l=d.ref("m"),a=d.ref(!1),c=d.ref(null),u=d.ref(!1),f=d.ref({}),p=d.ref(null),h=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],A=x=>{const m=l.value;return m==="mm"?`${(x*1e3).toFixed(0)}mm`:m==="cm"?`${(x*100).toFixed(1)}cm`:`${x.toFixed(2)}m`},C=x=>x>1e6?`${(x/1e6).toFixed(2)} km²`:`${x.toFixed(2)} m²`,g=()=>{if(!o.value&&s.value?.getViewer){const x=s.value.getViewer(),m=s.value.getCesium();x&&m&&(o.value=new tc({viewer:x,cesium:m}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=F=>{c.value=F})}},y=x=>{o.value||g(),r.value===x?(r.value=null,o.value?.stop()):(r.value=x,o.value?.start(x))},E=x=>{l.value=x,u.value=!1},I=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},M=()=>{i("update:visible",!1)},k=x=>{if(u.value){u.value=!1;return}const F=x.currentTarget.getBoundingClientRect();f.value={position:"fixed",top:`${F.top}px`,left:`${F.right+5}px`,zIndex:3e3},u.value=!0},S=x=>{u.value&&p.value&&!p.value.contains(x.target)&&(u.value=!1)};return d.onMounted(()=>{document.addEventListener("click",S),t.visible&&d.nextTick(()=>g())}),d.onUnmounted(()=>{document.removeEventListener("click",S),o.value&&o.value.destroy()}),d.watch(()=>t.visible,x=>{x?d.nextTick(()=>g()):o.value&&(o.value.stop(),r.value=null)}),d.watch(s,x=>{x&&x.getViewer&&!o.value&&t.visible&&g()}),d.watch(l,x=>{o.value&&o.value.setUnit(x)}),(x,m)=>(d.openBlock(),d.createBlock(Re,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":m[3]||(m[3]=F=>i("update:visible",F)),onClose:M},{default:d.withCtx(()=>[d.createElementVNode("div",mv,[d.createElementVNode("div",Av,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:m[0]||(m[0]=F=>y("distance")),title:"距离测量"},[...m[4]||(m[4]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:m[1]||(m[1]=F=>y("angle")),title:"角度测量"},[...m[5]||(m[5]=[d.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:m[2]||(m[2]=F=>y("area")),title:"面积测量"},[...m[6]||(m[6]=[d.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),m[15]||(m[15]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value?(d.openBlock(),d.createElementBlock("div",yv,[c.value.type==="distance"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",Cv,[m[7]||(m[7]=d.createElementVNode("span",{class:"result-label"},"总长:",-1)),d.createElementVNode("span",Ev,d.toDisplayString(A(c.value.dist)),1)]),d.createElementVNode("div",wv,[m[8]||(m[8]=d.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),d.createElementVNode("span",bv,d.toDisplayString(A(c.value.dx)),1)]),d.createElementVNode("div",vv,[m[9]||(m[9]=d.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),d.createElementVNode("span",Iv,d.toDisplayString(A(c.value.dy)),1)]),d.createElementVNode("div",xv,[m[10]||(m[10]=d.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),d.createElementVNode("span",Bv,d.toDisplayString(A(c.value.dz)),1)])],64)):d.createCommentVNode("",!0),c.value.type==="angle"?(d.openBlock(),d.createElementBlock("div",Sv,[m[11]||(m[11]=d.createElementVNode("span",{class:"result-label"},"角度:",-1)),d.createElementVNode("span",Mv,d.toDisplayString(c.value.angle.toFixed(1))+"°",1)])):d.createCommentVNode("",!0),c.value.type==="area"?(d.openBlock(),d.createElementBlock("div",Tv,[m[12]||(m[12]=d.createElementVNode("span",{class:"result-label"},"面积:",-1)),d.createElementVNode("span",Dv,d.toDisplayString(C(c.value.area)),1)])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.createElementVNode("div",kv,[d.createElementVNode("div",Pv,[d.createElementVNode("div",{class:"tool-item",onClick:d.withModifiers(k,["stop"])},[d.createElementVNode("div",Fv,d.toDisplayString(l.value),1)]),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[u.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:p,class:"unit-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(h,F=>d.createElementVNode("div",{key:F.value,class:d.normalizeClass(["unit-option",{selected:l.value===F.value}]),onClick:d.withModifiers(T=>E(F.value),["stop"])},d.toDisplayString(F.label),11,Rv)),64))],4)):d.createCommentVNode("",!0)]))]),m[14]||(m[14]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("div",{class:"tool-item control-btn",onClick:I,title:"清空"},[...m[13]||(m[13]=[d.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function Lv(){const n=d.ref(!1),e=d.reactive({x:0,y:0}),t=d.ref([]),i=d.ref(null);return{visible:n,position:e,items:t,contextData:i,show:(a,c,u)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=c,i.value=u,n.value=!0},hide:()=>{n.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(c=>c.id!==a)}}}const Nv=["onClick"],Uv={class:"menu-label"},_v={key:0,class:"menu-arrow"},Qv=Ue(d.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(n,{emit:e}){const t=n,i=e,s=r=>{r.disabled||(r.action&&r.action(),i("action",r),i("update:visible",!1))},o=()=>{t.visible&&i("update:visible",!1)};return d.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),d.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:"leiting-context-menu",style:d.normalizeStyle({left:n.position.x+"px",top:n.position.y+"px"}),onContextmenu:l[0]||(l[0]=d.withModifiers(()=>{},["prevent"]))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.items,a=>(d.openBlock(),d.createElementBlock("div",{key:a.id,class:d.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:c=>s(a)},[d.createElementVNode("span",Uv,d.toDisplayString(a.label),1),a.children?(d.openBlock(),d.createElementBlock("span",_v,"▶")):d.createCommentVNode("",!0)],10,Nv))),128))],36)),[[d.vShow,n.visible]])}}),[["__scopeId","data-v-f288753b"]]),Hv={class:"leiting-ui-overlay"},Qi=Ue(d.defineComponent({__name:"LeitingBIM",props:{accessToken:{},cesiumUrl:{},cesiumCssUrl:{},methods:{},viewerOptions:{},treeProps:{},showTree:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!1},playerUrl:{default:"https://leiting.chenxisoft.com/resource/person/person.glb"},playerModelName:{default:"Person"},playerModelId:{default:"player_111"},playerScale:{default:.0032},tiandituToken:{default:"c25f14fb6bd4397cf8fe45144ff768d6"},globe:{type:Boolean,default:void 0},terrain:{type:Boolean,default:void 0},depthTest:{type:Boolean,default:void 0},mapProvider:{},tiandituLayerType:{},tiandituShowLabel:{type:Boolean,default:void 0},arcgisUrl:{},shadows:{type:Boolean,default:void 0},environmentMap:{type:Boolean,default:void 0},ambientOcclusion:{type:Boolean,default:void 0},time:{},brightness:{},backgroundColor:{},collision:{type:Boolean,default:void 0},mouseHabit:{},mode:{default:"3d"},mountAll3Dtiles:{},mountAllCad:{},saveRegion:{},saveCadRegion:{},saveCadCalibration:{},selectionChange:{},searchComponent:{}},emits:["register","init","ready"],setup(n,{emit:e}){const t=d.ref(),i=d.getCurrentInstance(),s=d.ref(!1),o=d.ref(""),r=d.ref({}),l=d.ref("3d"),a=n,c={title:"构件树",treeData:[]},u=d.ref(!1),f=d.ref(!1),p=d.ref(!1),h=d.ref(!1),A=d.ref(!1),C=d.ref(!1),g=d.ref(!1),y=d.ref(!1),E=d.ref(!1),I=d.ref(!1),{visible:M,position:k,items:S,show:x,hide:m}=Lv(),F=d.ref([]),T=V=>{F.value.push(V)},P=V=>{F.value=F.value.filter(j=>j.id!==V)},L=d.ref([]),G=d.ref(""),N=d.ref(null),b=d.ref([]),w=d.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),v=(V,j)=>{V==="componentTree"&&(V="tree"),V==="componentInfo"&&(V="info"),V in w&&(w[V]=j)},B=d.shallowRef({});d.provide("leitingMethods",B);const R=d.ref(a.showMenu),U=d.ref([]);d.watch(()=>a.showMenu,V=>{R.value=V},{immediate:!0}),d.watch(()=>a.mode,V=>{V&&B.value?.set2d&&B.value.set2d(V==="2d")});const O=d.ref("dark");d.provide("leiting-theme",O);const D=d.ref([]),_=d.computed(()=>{const V=[];return u.value&&(V.push("tree"),V.push("componentTree")),f.value&&V.push("section"),p.value&&V.push("roam"),h.value&&(V.push("info"),V.push("componentInfo")),A.value&&V.push("adjust"),C.value&&V.push("setting"),g.value&&V.push("cadLayer"),y.value&&V.push("cadPosition"),E.value&&V.push("annotation"),I.value&&(V.push("measure"),V.push("measurement")),V.push(...D.value),V}),Y=d.ref(null),$=(V,j)=>{V==="componentTree"||V==="tree"?u.value=j:V==="section"?f.value=j:V==="roam"?p.value=j:V==="componentInfo"||V==="info"?h.value=j:V==="homeView"?B.value?.is2dMode?.()?B.value?.flyToTopView?.({}):B.value?.flyToTileset?.({}):V==="adjustModel"?(A.value=j,j&&Y.value&&Y.value.setModelType("BIM")):V==="osgbAdjust"?(A.value=j,j&&Y.value&&Y.value.setModelType("OSGB")):V==="setting"?C.value=j:V==="cadLayer"?g.value=j:V==="cadPosition"?y.value=j:V==="annotation"?E.value=j:V==="measurement"?I.value=j:j?D.value.includes(V)||D.value.push(V):D.value=D.value.filter(q=>q!==V)};d.watch(u,async V=>{if(V&&B.value?.loadTreeForModel&&B.value?.getMapTileset){const j=B.value.getMapTileset(),q=Object.values(j).map(async se=>{if(se.leiting&&!se.leiting.tree&&se.leiting.model?.treeUrl){const oe=se.leiting.model.modelId;try{se.leiting?.node?.batchIdEIDInfos||await B.value.loadNodeDetailsForModel(oe);const ae=await B.value.loadTreeForModel(oe);ae&&(Array.isArray(ae)?ae:[ae]).forEach(le=>{le&&!b.value.find(Pe=>Pe.id===le.id)&&(le.modelId=oe,b.value=[...b.value,le])})}catch(ae){console.warn(`Failed to lazy load tree for ${oe}`,ae)}}});await Promise.all(q)}});const J=()=>{B.value&&(B.value.getDxfModels&&(L.value=B.value.getDxfModels()||[]),B.value.getCadModelId&&(G.value=B.value.getCadModelId()||""))};d.watch(g,V=>{V&&J()}),d.watch(y,V=>{V&&(J(),N.value&&L.value.length&&N.value.addGltfOr3dTilesModelList(L.value))});const ne=e,re=V=>{B.value&&B.value.saveCadCalibration&&B.value.saveCadCalibration(V),B.value&&B.value.saveCadRegion&&B.value.saveCadRegion(V)};return d.onMounted(async()=>{if(t.value)try{const V={...xt,cesiumUrl:a.cesiumUrl||xt.cesiumUrl,cesiumCssUrl:a.cesiumCssUrl||xt.cesiumCssUrl,accessToken:a.accessToken||ns()||xt.accessToken};await ts(V);const j=a.accessToken||ns()||xt.accessToken;j&&(Cesium.Ion.defaultAccessToken=j),s.value=!0;const q=(oe={},ae)=>{if(t.value){const{showMenu:Ee,showTree:le,globe:Pe,terrain:ct,depthTest:$e,mapProvider:vt,tiandituLayerType:it,tiandituShowLabel:dn,arcgisUrl:Ut,shadows:_t,environmentMap:qi,ambientOcclusion:Ke,time:Oe,brightness:st,backgroundColor:dt,collision:Qt,mouseHabit:Ht,mode:It,...Be}=oe||{},To=a.showMenu!==void 0?a.showMenu:Ee!==void 0?Ee:!0;R.value=To;const ke=(ee,Ie,Yt)=>ee!==void 0?ee:Ie!==void 0?Ie:Yt,un=ke(a.globe,Pe,!1),hn=ke(a.terrain,ct,!1),$n=ke(a.depthTest,$e,!1),Kn=ke(a.mapProvider,vt,"tianditu"),qn=ke(a.tiandituLayerType,it,"img_w"),Xi=ke(a.tiandituShowLabel,dn,!1),Xc=ke(a.arcgisUrl,Ut,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Jc=ke(a.shadows,_t,!1),Zc=ke(a.environmentMap,qi,!1),ed=ke(a.ambientOcclusion,Ke,!1),td=ke(a.time,Oe,void 0),nd=ke(a.brightness,st,1),Ji=a.mode||It||"3d";console.log("LeitingBIM Mode:",Ji,"Props:",a.mode,"Options:",It),l.value=Ji;const Gx=Ji==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",id=ke(a.backgroundColor,dt,Gx),sd=ke(a.collision,Qt,!1),od=ke(a.mouseHabit,Ht,0);r.value={globe:un,terrain:hn,depthTest:$n,mapProvider:Kn,tiandituLayerType:qn,tiandituShowLabel:Xi,arcgisUrl:Xc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od};const Xn=O0({container:t.value,appContext:i?.appContext,methods:{...B.value,handleMenuAction:$,setCardFullHeight:v,onLoadingStatus:ee=>{ee?me.loading(ee,"",t.value):me.close()},...Be,tilesLoad3dTiles:async ee=>{let Ie=ee.leiting?.tree;const Yt=ee.leiting?.model?.modelId;if(!Ie&&u.value&&B.value?.loadTreeForModel)try{Ie=await B.value.loadTreeForModel(Yt)}catch(Zn){console.warn("Failed to lazy load tree",Zn)}Ie&&(Array.isArray(Ie)?Ie:[Ie]).forEach(Vt=>{Vt&&!b.value.find(ad=>ad.id===Vt.id)&&(Vt.modelId=Yt,b.value=[...b.value,Vt])});const{brightness:Do,contrast:ko,saturation:ut}=Xn.methods.getConfigure();Xn.methods.setModelColorAdjustment({brightness:Do,contrast:ko,saturation:ut}),Be.tilesLoad3dTiles?.(ee)},mountAll3Dtiles:ee=>{a.mountAll3Dtiles&&a.mountAll3Dtiles(ee),Be.mountAll3Dtiles?.(ee)},mountAllCad:ee=>{if(Xn.methods.setModelBrightness){const Ie=a.brightness!==void 0?a.brightness:r.value.brightness;Ie!==void 0&&Xn.methods.setModelBrightness(Ie)}a.mountAllCad&&a.mountAllCad(ee),Be.mountAllCad?.(ee)},saveRegion:ee=>{a.saveRegion&&a.saveRegion(ee),Be.saveRegion?.(ee)},saveCadRegion:ee=>{a.saveCadRegion&&a.saveCadRegion(ee),Be.saveCadRegion?.(ee)},saveCadCalibration:ee=>{a.saveCadCalibration&&a.saveCadCalibration(ee),Be.saveCadCalibration?.(ee)},selectionChange:ee=>{a.selectionChange&&a.selectionChange(ee),Be.selectionChange?.(ee)},onSearchComponent:ee=>{a.searchComponent&&a.searchComponent(ee),Be.searchComponent?.(ee)}},viewerOptions:a.viewerOptions,options:{...Be,mode:Ji,playerUrl:a.playerUrl,playerModelName:a.playerModelName,playerModelId:a.playerModelId,playerScale:a.playerScale,globe:un,terrain:hn,depthTest:$n,mapProvider:Kn,tiandituLayerType:qn,tiandituShowLabel:Xi,tiandituToken:a.tiandituToken,arcgisUrl:Xc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od},callbacks:{onLoading:ee=>ee?me.loading(ee,"",t.value):me.close(),onSuccess:ee=>me.success(ee,"",void 0,t.value),onError:ee=>me.error(ee,"",void 0,t.value)}}),{Cesium:Gt,viewer:fn,methods:Zi,menuEvents:Jn}=Xn,ge=Zi;Jn.on("showMenu",ee=>{R.value=ee}),Jn.on("insertMenu",ee=>{U.value=ee}),Jn.on("setMenuActive",(ee,Ie)=>{$(ee,Ie)}),B.value=ge,ae&&(ae.value=ge),Jn.on("setMode",ee=>{l.value=ee}),Jn.on("deleteAllModels",()=>{b.value=[]}),new Gt.ScreenSpaceEventHandler(fn.scene.canvas).setInputAction(async ee=>{if(m(),l.value==="2d")return;const Ie=fn.scene.pick(ee.position),Yt=fn.container.getBoundingClientRect(),Do=Yt.left+ee.position.x,ko=Yt.top+ee.position.y,ut=[];if(Gt.defined(Ie)&&Ie instanceof Gt.Cesium3DTileFeature){const Zn=ge.baseCompt.getFeatureId(Ie),Vt=Sn(Ie.tileset);ge.baseCompt.hasSelectedFeaturesMap[Vt]?.some(ei=>ei.batchId===Zn&&ei.rank===0)||(await ge.baseCompt.clearSelection(),await ge.baseCompt.toggleMultiSelect(Vt,Zn,ge.baseCompt.selectedColor)),ut.push({id:"details",label:"构件详情",action:()=>{h.value=!0}}),ut.push({id:"hide",label:"隐藏选中构件",action:()=>{const ti=ge.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!1}));ge.baseCompt.setComponentVisibility(ti)}}),ut.push({id:"translucent",label:"半透明选中构件",action:async()=>{const ti=ge.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,rgba:{...ht.rgba,a:.3}}));await ge.baseCompt.setSelectColorUserModelCpt(ti,{rank:0})}}),ut.push({id:"isolate",label:"隔离选中构件",divided:!0,action:()=>{ge.baseCompt.setAllComponentsVisibility(!1);const ti=ge.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!0}));ge.baseCompt.setComponentVisibility(ti)}})}ut.push({id:"showAll",label:"显示所有",action:async()=>{ge.baseCompt.setAllComponentsVisibility(!0),await ge.baseCompt.clearSelection()}}),ut.push(...F.value),x({x:Do,y:ko},ut)},Gt.ScreenSpaceEventType.RIGHT_CLICK),ge.addContextMenuItems=T,ge.insertContextMenu=ge.addContextMenuItems,ge.removeContextMenuItems=P,ge.deleteContextMenu=ge.removeContextMenuItems,ge.closeContextMenu=m,ge.hideContextMenu=ge.closeContextMenu;const rd=oe?.onLoaded||oe?.onloaded;rd&&rd({Cesium:Gt,viewer:fn,methods:Zi}),ne("init",{Cesium:Gt,viewer:fn,methods:Zi}),ne("ready",{Cesium:Gt,viewer:fn,methods:Zi})}};let se=!1;ne("register",(oe,ae)=>{se=!0,q(oe,ae)}),se||setTimeout(()=>{B.value.getViewer||q()},0)}catch(V){o.value="Failed to load Cesium: "+(V.message||V),console.error(V)}}),(V,j)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-bim-container",[`theme-${O.value}`]]),onContextmenu:j[11]||(j[11]=d.withModifiers(()=>{},["prevent","stop"]))},[!s.value&&!o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):d.createCommentVNode("",!0),o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Alert),{key:1,class:"error",type:"error",message:o.value,"show-icon":""},null,8,["message"])):d.createCommentVNode("",!0),d.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[d.createElementVNode("div",Hv,[d.createVNode(Qn,{visible:h.value,"full-height":w.info,"onUpdate:visible":j[0]||(j[0]=q=>h.value=q)},null,8,["visible","full-height"]),d.createVNode(Hn,{ref_key:"LeitingPositionRef",ref:Y,visible:A.value,"full-height":w.adjustModel,"onUpdate:visible":j[1]||(j[1]=q=>A.value=q)},null,8,["visible","full-height"]),d.createVNode(Gn,{visible:C.value,"full-height":w.setting,"tianditu-token":a.tiandituToken,"initial-config":r.value,"onUpdate:visible":j[2]||(j[2]=q=>C.value=q)},null,8,["visible","full-height","tianditu-token","initial-config"]),n.showTree!==!1?(d.openBlock(),d.createBlock(Pi,d.mergeProps({key:0},{...c,...n.treeProps},{visible:u.value,"full-height":w.tree,"tree-data":b.value.length>0?b.value:n.treeProps?.treeData||[],"onUpdate:visible":j[3]||(j[3]=q=>{u.value=q})}),null,16,["visible","full-height","tree-data"])):d.createCommentVNode("",!0),d.createVNode(gv,{visible:E.value,"onUpdate:visible":j[4]||(j[4]=q=>E.value=q)},null,8,["visible"]),d.createVNode(Ov,{visible:I.value,"onUpdate:visible":j[5]||(j[5]=q=>I.value=q)},null,8,["visible"]),d.createVNode(Un,{visible:f.value,"full-height":w.section,"onUpdate:visible":j[6]||(j[6]=q=>f.value=q)},null,8,["visible","full-height"]),d.createVNode(_n,{visible:p.value,"full-height":w.roam,"onUpdate:visible":j[7]||(j[7]=q=>p.value=q)},null,8,["visible","full-height"]),d.createVNode(Nn,{visible:R.value,"active-ids":_.value,"custom-items":U.value,onAction:$,"is-2d":l.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),d.createVNode(fb,{visible:g.value,"current-model-id":G.value,"onUpdate:visible":j[8]||(j[8]=q=>g.value=q)},null,8,["visible","current-model-id"]),d.createVNode(rv,{ref_key:"cadPositionRef",ref:N,visible:y.value,"onUpdate:visible":j[9]||(j[9]=q=>y.value=q),onSave:re},null,8,["visible"]),d.createVNode(Qv,{visible:d.unref(M),position:d.unref(k),items:d.unref(S),"onUpdate:visible":j[10]||(j[10]=q=>M.value=q)},null,8,["visible","position","items"]),d.renderSlot(V.$slots,"default",d.normalizeProps(d.guardReactiveProps({methods:B.value,isReady:s.value})),void 0,!0)])],512)],34))}}),[["__scopeId","data-v-65bc0124"]]);function pc(n){const e=d.ref(),t=d.ref(n.theme||"dark"),i=d.ref(n.menuSize||"medium");d.provide("leiting-theme",t),d.provide("leiting-menu-size",i);function s(l){d.onUnmounted(()=>{e.value=null}),l(n,e)}function o(){const l=d.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const c=o();if(!c)return;const u=c[a];return typeof u=="function"?u.bind(c):u},set(l,a,c){const u=o();return u?(u[a]=c,!0):!1}});return[s,r]}const Gv=xt,Yv={install:(n,e)=>{if(n.component("LeitingBIM",Qi),n.component("LeitingTree",Pi),n.component("LeitingDraggableCard",Re),n.component("leiting-draggable-card",Re),n.component("LeitingMenu",Nn),n.component("leiting-menu",Nn),n.component("LeitingSection",Un),n.component("leiting-section",Un),n.component("LeitingPlayer",_n),n.component("leiting-player",_n),n.component("LeitingInfo",Qn),n.component("leiting-info",Qn),n.component("LeitingPosition",Hn),n.component("leiting-position",Hn),n.component("LeitingSetting",Gn),n.component("leiting-setting",Gn),!e)return;const t={...Gv,...e};t.cesiumUrl&&ts(t).catch(i=>{console.error("[LeitingBim] Failed to load Cesium resources:",i)}),n.config.globalProperties.$leitingBimOptions=t}};var W={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function gc(n="soft"){switch(n){case"auto":{W.session.styleMap=new Map,W.session.nodeMap=new Map;return}case"soft":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap,W.computedStyle=new WeakMap,W.baseStyle=new Map,W.defaultStyle=new Map,W.image=new Map,W.background=new Map,W.resource=new Map,W.font=new Set;return}default:{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}}}function uo(n){const e=n.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;const t=e[2].trim();return t.startsWith("#")?null:t}function Vv(n){if(!n||n==="none")return"";let e=n.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==6?`matrix(${i})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${i})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Hi(n){if(/%[0-9A-Fa-f]{2}/.test(n))return n;try{return encodeURI(n)}catch{return n}}function Wv(n="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:t=12}={}){const i=new Map;let s=0;function o(r,l,a){if(s>=t)return;const c=Date.now();(i.get(l)||0)>c||(i.set(l,c+e),s++,r==="warn"&&console&&console.warn?console.warn(`${n} ${a}`):console&&console.error&&console.error(`${n} ${a}`))}return{warnOnce(r,l){o("warn",r,l)},errorOnce(r,l){o("error",r,l)},reset(){i.clear(),s=0}}}var mc=Wv("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),ho=new Map,Gi=new Map;function zv(n){return/^data:|^blob:|^about:blank$/i.test(n)}function jv(n,e){try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(i||".",t),o=new URL(n,t);if(o.origin===s.origin)return!0;const r=o.searchParams;if(r&&(r.has("url")||r.has("target")))return!0}catch{}return!1}function $v(n,e){if(!e||zv(n)||jv(n,e))return!1;try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=new URL(n,t);return typeof location<"u"?i.origin!==location.origin:!0}catch{return!!e}}function Kv(n,e){if(!e)return n;if(e.includes("{url}"))return e.replace("{urlRaw}",Hi(n)).replace("{url}",encodeURIComponent(n));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(n)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(n)}`;if(e.endsWith("/"))return`${e}${Hi(n)}`;const t=e.includes("?")?"&":"?";return`${e}${t}url=${encodeURIComponent(n)}`}function Ac(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(new Error("read_failed")),i.readAsDataURL(n)})}function qv(n,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,n].join("|")}async function je(n,e={}){const t=e.as??"blob",i=e.timeout??3e3,s=e.useProxy||"",o=e.errorTTL??8e3,r=e.headers||{},l=!!e.silent;if(/^data:/i.test(n))try{if(t==="text")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1};if(t==="dataURL")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1,mime:String(n).slice(5).split(";")[0]||""};const[,g="",y=""]=String(n).match(/^data:([^,]*),(.*)$/)||[],I=/;base64/i.test(g)?atob(y):decodeURIComponent(y),M=new Uint8Array([...I].map(S=>S.charCodeAt(0))),k=new Blob([M],{type:(g||"").split(";")[0]||""});return{ok:!0,data:k,status:200,url:n,fromCache:!1,mime:k.type||""}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(n))try{const g=await fetch(n);if(!g.ok)return{ok:!1,data:null,status:g.status,url:n,fromCache:!1,reason:"http_error"};const y=await g.blob(),E=y.type||g.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(y),status:g.status,url:n,fromCache:!1,mime:E}:t==="text"?{ok:!0,data:await y.text(),status:g.status,url:n,fromCache:!1,mime:E}:{ok:!0,data:y,status:g.status,url:n,fromCache:!1,mime:E}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(n))return t==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:n,fromCache:!1,mime:"image/png"}:{ok:!0,data:t==="text"?"":new Blob([]),status:200,url:n,fromCache:!1};const a=qv(n,{as:t,timeout:i,useProxy:s,errorTTL:o}),c=Gi.get(a);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Gi.delete(a);const u=ho.get(a);if(u)return u;const f=$v(n,s)?Kv(n,s):n;let p=e.credentials;if(!p)try{const g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(n,g);p=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{p="omit"}const h=new AbortController,A=setTimeout(()=>h.abort("timeout"),i),C=(async()=>{try{const g=await fetch(f,{signal:h.signal,credentials:p,headers:r});if(!g.ok){const I={ok:!1,data:null,status:g.status,url:f,fromCache:!1,reason:"http_error"};if(o>0&&Gi.set(a,{until:Date.now()+o,result:I}),!l){const M=`${g.status} ${g.statusText||""}`.trim();mc.warnOnce(`http:${g.status}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,`HTTP error ${M} while fetching ${t} ${n}`)}return e.onError&&e.onError(I),I}if(t==="text")return{ok:!0,data:await g.text(),status:g.status,url:f,fromCache:!1};const y=await g.blob(),E=y.type||g.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(y),status:g.status,url:f,fromCache:!1,mime:E}:{ok:!0,data:y,status:g.status,url:f,fromCache:!1,mime:E}}catch(g){const y=g&&typeof g=="object"&&"name"in g&&g.name==="AbortError"?String(g.message||"").includes("timeout")?"timeout":"abort":"network",E={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(!/^blob:/i.test(n)&&o>0&&Gi.set(a,{until:Date.now()+o,result:E}),!l){const I=`${y}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,M=y==="timeout"?`Timeout after ${i}ms. Consider increasing timeout or using a proxy for ${n}`:y==="abort"?`Request aborted while fetching ${t} ${n}`:`Network/CORS issue while fetching ${t} ${n}. A proxy may be required`;mc.errorOnce(I,M)}return e.onError&&e.onError(E),E}finally{clearTimeout(A),ho.delete(a)}})();return ho.set(a,C),C}function fo(n,e){if(!e||!n.width||!n.height)return n;const t=document.createElement("canvas");t.width=n.width,t.height=n.height;const i=t.getContext("2d");return i.fillStyle=e,i.fillRect(0,0,t.width,t.height),i.drawImage(n,0,0),t}async function po(n,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(n)||n.trim()==="none")return n;const i=uo(n);if(!i)return n;const s=Hi(i);if(W.background.has(s)){const o=W.background.get(s);return o?`url("${o}")`:"none"}try{const o=await je(s,{as:"dataURL",useProxy:e.useProxy});return o.ok?(W.background.set(s,o.data),`url("${o.data}")`):(W.background.set(s,null),"none")}catch{return W.background.set(s,null),"none"}}var yc=new Set(["meta","script","noscript","title","link","template"]),Yi=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Xv=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function Jv(){for(let n of Xv){const e=String(n).toLowerCase();yc.has(e)||Yi.has(e)||Cc(e)}}function Cc(n){if(n=String(n).toLowerCase(),Yi.has(n)){const o={};return W.defaultStyle.set(n,o),o}if(W.defaultStyle.has(n))return W.defaultStyle.get(n);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));const t=document.createElement(n);t.style.all="initial",e.appendChild(t);const i=getComputedStyle(t),s={};for(let o of i){if(Ec(o))continue;const r=i.getPropertyValue(o);s[o]=r}return e.removeChild(t),W.defaultStyle.set(n,s),s}var Zv=/(?:^|-)(animation|transition)(?:-|$)/i,eI=/^(--|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,tI=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope"]);function Ec(n){const e=String(n).toLowerCase();return!!(tI.has(e)||eI.test(e)||Zv.test(e))}function go(n,e){if(e=String(e||"").toLowerCase(),Yi.has(e))return"";const t=[],i=Cc(e);for(let[s,o]of Object.entries(n)){if(Ec(s))continue;const r=i[s];o&&o!==r&&t.push(`${s}:${o}`)}return t.sort(),t.join(";")}function nI(n){const e=new Set;return n.nodeType!==Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(n.tagName&&e.add(n.tagName.toLowerCase()),typeof n.querySelectorAll=="function"&&n.querySelectorAll("*").forEach(t=>e.add(t.tagName.toLowerCase())),Array.from(e))}function iI(n){const e=new Map;for(let i of n){const s=W.defaultStyle.get(i);if(!s)continue;const o=Object.entries(s).map(([r,l])=>`${r}:${l};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(i))}let t="";for(let[i,s]of e.entries())t+=`${s.join(",")} { ${i} }
117
+ `});p.isModelAdjustment=!0,f.customShader=p}else e.brightness!==void 0&&e.brightness!==1&&!f.style&&(f.style=new i.Cesium3DTileStyle({color:`color('white') * ${e.brightness}`}))}}setModelBrightness(e){this.setModelColorAdjustment({brightness:e})}_defaultSkyBox=null;_updateLightDirection=e=>{e.light instanceof this.cesium.DirectionalLight&&(e.light.direction=e.camera.directionWC)};setEnvironmentMapEnable(e){this.is2d||(e?(this.viewer.scene.light=new this.cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC}),this.viewer.scene.preRender.addEventListener(this._updateLightDirection)):(this._defaultSkyBox&&(this.viewer.scene.skyBox=this._defaultSkyBox),this.viewer.scene.preRender.removeEventListener(this._updateLightDirection),this.viewer.scene.light=new this.cesium.SunLight),this.viewer.scene.imageBasedLighting&&(this.viewer.scene.imageBasedLighting.imageBasedLightingFactor=e?new this.cesium.Cartesian2(2,2):new this.cesium.Cartesian2(1,1)))}setAmbientOcclusion(e){if(this.is2d)return;const t=this.viewer.scene;if(!t||!t.postProcessStages||!t.postProcessStages.ambientOcclusion)return;const i=t.postProcessStages.ambientOcclusion;i.enabled=e,e&&(i.uniforms.ambientOcclusionOnly=!1,i.uniforms.intensity=3,i.uniforms.bias=.1,i.uniforms.lengthCap=.03,i.uniforms.stepSize=1,i.uniforms.blurStepSize=.86)}setCollisionDetection(e){if(this.is2d){this.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1;return}const t=this.viewer.scene.screenSpaceCameraController;t.enableCollisionDetection=e,e||t.minimumZoomDistance<1&&(t.minimumZoomDistance=1)}setMouseHabit(e){if(this.is2d)return;const t=this.viewer.scene.screenSpaceCameraController;t.enableTranslate=!0,t.enableRotate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!1,t.lookEventTypes=[],e===1?(t.rotateEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.MIDDLE_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.LEFT_DRAG]):(t.rotateEventTypes=[this.cesium.CameraEventType.LEFT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.MIDDLE_DRAG])}}class R0{cesium;viewer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}getCameraView(){const e=this.viewer.camera;return{position:{x:e.position.x,y:e.position.y,z:e.position.z},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:i,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(i.heading,i.pitch,i.roll);!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}getCurrentCameraPositionAndTarget(){const e=this.getCameraView();return{position:e.position,target:{heading:e.orientation.heading,pitch:e.orientation.pitch,roll:e.orientation.roll},duration:e.duration}}setCameraView(e){const t=e.target||e.orientation||{};this.flyToCameraView({position:{x:Number(e.position.x),y:Number(e.position.y),z:Number(e.position.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}}function O0(n){const{container:e,appContext:t,methods:i,viewerOptions:s,options:o,callbacks:r}=n,l=new gi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${Dg()}`;const c={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},u=t?.config?.globalProperties?.$leitingBimOptions,f={...c,...u?.viewerOptions??{},...s??{}},p=new a.Viewer(e,f);p.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let h=i;if(!h&&u&&(u.methods||(u.methods={}),h=u.methods),h){const A=new Yg({cesium:a,viewer:p,options:o,callbacks:r}),C=new Da({cesium:a,viewer:p}),g=new F0({cesium:a,viewer:p}),y=new Vg({cesium:a,viewer:p}),E=new R0({cesium:a,viewer:p});let I;const M=new tc({cesium:a,viewer:p});o&&(o.globe!==void 0&&g.setGlobeEnvironmentVisible(o.globe),o.terrain!==void 0&&g.setTerrainEnable(o.terrain),o.depthTest!==void 0&&g.setDepthTestEnable(o.depthTest),o.mapProvider&&o.mode!=="2d"&&g.changeBaseMap(o.mapProvider,{token:o.tiandituToken,layerType:o.tiandituLayerType,showAnnotation:o.tiandituShowLabel,url:o.arcgisUrl}),o.shadows!==void 0&&g.setShadowsEnable(o.shadows),o.environmentMap!==void 0&&g.setEnvironmentMapEnable(o.environmentMap),o.ambientOcclusion!==void 0&&g.setAmbientOcclusion(o.ambientOcclusion),o.time!==void 0&&g.setTime(o.time),o.brightness!==void 0&&g.setModelBrightness(o.brightness),o.backgroundColor!==void 0&&g.setBackgroundColor(o.backgroundColor),o.collision!==void 0&&g.setCollisionDetection(o.collision),o.mouseHabit!==void 0&&g.setMouseHabit(o.mouseHabit)),o&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),g.setCadMode("2d"),I=new ec({cesium:a,viewer:p})),C.events.on("tilesetLoaded",m=>{A.baseCompt.attachTileset(m,A.baseCompt.selectedColor),A.baseSection.attachTileset(m,m.leiting?.model?.modelId),h&&h.tilesLoad3dTiles&&h.tilesLoad3dTiles(m),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(m.leiting)}),C.events.on("loadingStatus",m=>{h&&h.onLoadingStatus&&h.onLoadingStatus(m)}),C.events.on("mountAll3Dtiles",({modelList:m,mapTileset:F})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(m),h?.mountAll3Dtiles&&h.mountAll3Dtiles(F)}),y.events.on("mountAllCad",m=>{o?.mountAllCad&&o.mountAllCad(m),h?.mountAllCad&&h.mountAllCad(m)}),A.baseCompt.loadNodeDetailsForModel=m=>C.loadNodeDetailsForModel(m),A.baseCompt.selectionChange(m=>{m.length!==0&&(o?.selectionChange&&o.selectionChange(m),h?.selectionChange&&h.selectionChange(m))}),h.onSearchComponent=m=>{o?.searchComponent&&o.searchComponent(m),h?.searchComponent&&h.searchComponent(m)};const k=h.saveRegion;h.saveRegion=m=>{o?.saveRegion&&o.saveRegion(m),k&&k!==o?.saveRegion&&k(m)};const S=h.saveCadCalibration;h.saveCadCalibration=m=>{o?.saveCadCalibration&&o.saveCadCalibration(m),S&&S!==o?.saveCadCalibration&&S(m)};const x=h.saveCadRegion;h.saveCadRegion=m=>{o?.saveCadRegion&&o.saveCadRegion(m),x&&x!==o?.saveCadRegion&&x(m)},h.getCesium=()=>a,h.getViewer=()=>p,h.getAnnotationInstance=()=>I,h.getMeasureInstance=()=>M,h.flyToCamera=m=>{E.setCameraView(m)},h.flyTo=h.flyToCamera,h.addDebugPoint=(m,F,T=0)=>{p.entities.add({position:a.Cartesian3.fromDegrees(m,F,T),point:{pixelSize:10,color:a.Color.RED}})},h.addPoint=h.addDebugPoint,h.toggleDebugLabels=()=>A.enableTestLabel(),h.enableTestLabel=h.toggleDebugLabels,h.setCanvasBackground=m=>g.setBackgroundColor(m),h.setBackgroundColor=h.setCanvasBackground,h.setAntiAliasing=m=>A.enableCesiumFXAA(m),h.enableCesiumFXAA=h.setAntiAliasing,h.setSceneVisibility=m=>A.setSceneOptions(m),h.setSceneOptions=h.setSceneVisibility,h.getCameraState=()=>E.getCameraView(),h.getCameraInfo=h.getCameraState,h.restoreCameraState=m=>E.flyToCameraView(m),h.flyToCameraView=h.restoreCameraState,h.getCameraPositionTarget=()=>E.getCurrentCameraPositionAndTarget(),h.getCurrentCameraPositionAndTarget=h.getCameraPositionTarget,h.setCameraLookAt=m=>E.setCameraView(m),h.setCameraView=h.setCameraLookAt,h.captureScreenshot=()=>{const m=p.scene.canvas;return p.render(),m.toDataURL("image/png")},h.getImageBase64=h.captureScreenshot,h.captureDomScreenshot=(m,F)=>A.getSnapDomSImageBase64(m,F),h.getSnapDomSImageBase64=h.captureDomScreenshot,h.addModels=m=>C.addModels(m),h.add3DtilesModel=h.addModels,h.addObliquePhotography=m=>C.addOSGB(m),h.addOSGB=h.addObliquePhotography,h.adjustOSGBModelMatrix=m=>C.updateOSGBMatrix(m),h.updateOSGBMatrix=h.adjustOSGBModelMatrix,h.setModelVisibility=m=>C.showModels(m),h.showModels=h.setModelVisibility,h.showTileset=h.setModelVisibility,h.removeModels=m=>C.deleteModels(m),h.deleteModels=h.removeModels,h.clearAllModels=()=>{C.deleteAllModels(),l.emit("deleteAllModels")},h.deleteAllModelList=h.clearAllModels,h.deleteAllModels=h.clearAllModels,h.flyToModel=m=>C.flyToTileset(m),h.flyToTileset=h.flyToModel,h.flyToByModelId=h.flyToModel,h.setModelBrightness=m=>A.updateModelEffect(m),h.updateModelEffect=h.setModelBrightness,h.getAllTilesets=()=>C.getMapTileset(),h.getMapTileset=h.getAllTilesets,h.getCurrentModelId=()=>C.getBIMmodelId(),h.getBIMmodelId=h.getCurrentModelId,h.getLoadedModels=()=>C.getModelList(),h.getModelList=h.getLoadedModels,h.loadModelStructure=m=>C.loadTreeForModel(m),h.loadTreeForModel=h.loadModelStructure,h.loadModelDetails=m=>C.loadNodeDetailsForModel(m),h.loadNodeDetailsForModel=h.loadModelDetails,h.setMapTileset=m=>C.setMapTileset(m),h.setCurrentModelId=m=>C.setBIMmodelId(m),h.setBIMmodelId=h.setCurrentModelId,h.setModelList=m=>C.setModelList(m),h.highlightComponents=(m,F={})=>A.baseCompt.setSelectColorUserModelCpt(m,F),h.setSelectColorUserModelCpt=h.highlightComponents,A.baseCompt.setLoadNodeDetailsCallback(m=>C.loadNodeDetailsForModel(m)),h.highlightAllComponents=m=>A.baseCompt.setAllSelectColorUserModelCpt(m),h.setAllSelectColorUserModelCpt=h.highlightAllComponents,h.setSelectColorUserModelCptByClear=()=>A.baseCompt.clearAllHaveSelected(),h.clearSelectColorUserModelCpt=()=>A.baseCompt.clearAllHaveSelected(),h.selectComponents=(m,F)=>A.baseCompt.setSelectColorUserModelCpt(m,F??{rank:0}),h.setSelecteds=h.selectComponents,h.setSelectionColor=(m,F,T,P)=>A.baseCompt.setSelectedColorRgba(m,F,T,P),h.setSelectedColor=h.setSelectionColor,h.clearSelection=()=>A.baseCompt.clearAllHaveSelected(),h.clearAllHaveSelected=h.clearSelection,h.getSelectedComponents=m=>A.baseCompt.getSelected(m),h.getSelected=h.getSelectedComponents,h.onSelectionChange=m=>{A.baseCompt.selectionChange(m)},h.selectionChange=h.onSelectionChange,h.flyToComponents=m=>A.baseCompt.flyToObjects(m),h.flyToObjects=h.flyToComponents,h.setConstructionData=async m=>{if(m&&Array.isArray(m)){const F=new Set;m.forEach(T=>{T.mergeCpts&&Array.isArray(T.mergeCpts)&&T.mergeCpts.forEach(P=>{P.modelId&&F.add(P.modelId)})}),F.size>0&&await Promise.all(Array.from(F).map(T=>h.loadNodeDetailsForModel(T)))}A.baseCompt.setAllConstructionProgressTracking(m)},h.setAllConstructionProgressTracking=h.setConstructionData,h.startConstructionSimulation=()=>A.baseCompt.enableConstructionProgressTracking(),h.enableAllConstructionProgressTracking=h.startConstructionSimulation,h.stopConstructionSimulation=()=>A.baseCompt.disableConstructionProgressTracking(),h.disableConstructionProgressTracking=h.stopConstructionSimulation,h.disableAllConstructionProgressTracking=h.stopConstructionSimulation,h.resetConstructionSimulation=()=>A.baseCompt.freshConstructionProgressTracking(),h.freshConstructionProgressTracking=h.resetConstructionSimulation,h.restartConstructionSimulation=()=>A.baseCompt.reStartAnimation(),h.reStartAnimation=h.restartConstructionSimulation,h.resumeFlyTo=()=>A.baseCompt.resumeFlyTo(),h.pauseConstructionSimulation=()=>A.baseCompt.pauseFlyTo(),h.pauseFlyTo=h.pauseConstructionSimulation,h.pauseAnimation=h.pauseConstructionSimulation,h.resumeConstructionSimulation=()=>A.baseCompt.resumeFlyTo(),h.resumeAnimation=h.resumeConstructionSimulation,h.setComponentsVisibility=m=>A.baseCompt.setComponentVisibility(m),h.setElementsListVisible=h.setComponentsVisibility,h.setAllComponentsVisibility=m=>A.baseCompt.setAllComponentsVisibility(m),h.setAllElementsVisible=h.setAllComponentsVisibility,h.getComponentsByVisibility=m=>A.baseCompt.getComponentsByVisibility(m),h.getElementsVisible=h.getComponentsByVisibility,h.setComponentVisibility=h.setComponentsVisibility,h.enableSectioning=(m,F)=>A.baseSection.open(m,F),h.openSection=h.enableSectioning,h.disableSectioning=m=>A.baseSection.close(m),h.closeSection=h.disableSectioning,h.updateSectionBox=m=>A.baseSection.updateRange(m),h.updateSectionRange=h.updateSectionBox,h.getSectionBox=()=>A.baseSection.getRange(),h.getSectionRange=h.getSectionBox,h.fitSectionToModel=()=>A.baseSection.fitToModels(),h.fitToModels=h.fitSectionToModel,h.setSectionBoxVisibility=m=>A.baseSection.setBoxVisibility(m),h.startFirstPersonMode=()=>{A.baseCompt.disableSelection(),A.basePlayer.openPlayer()},h.openPlayer=h.startFirstPersonMode,h.stopFirstPersonMode=()=>{A.basePlayer.closePlayer(),A.baseCompt.enableSelection()},h.closePlayer=h.stopFirstPersonMode,h.setPlayerPosition=m=>A.basePlayer.setPersonPosition(m),h.setPersonPosition=h.setPlayerPosition,h.setWalkSpeed=m=>A.basePlayer.setSpeed({speed:m}),h.setPlayerSpeed=h.setWalkSpeed,h.setPlayerConfig=m=>A.basePlayer.setParams(m),h.setPlayerParams=h.setPlayerConfig,h.setPlayerAction=(m,F)=>A.basePlayer.setMoveState(m,F),h.setPlayerMoveState=h.setPlayerAction,h.bindPlayerControls=m=>A.basePlayer.bindUiKeys(m),h.bindPlayerUiKeys=h.bindPlayerControls,h.setGlobeVisibility=m=>g.setGlobeEnvironmentVisible(m),h.setGlobeEnvironmentVisible=h.setGlobeVisibility,h.setTerrainVisibility=m=>g.setTerrainEnable(m),h.setTerrainEnable=h.setTerrainVisibility,h.setDepthTest=m=>g.setDepthTestEnable(m),h.setDepthTestEnable=h.setDepthTest,h.setBaseMap=(m,F)=>g.changeBaseMap(m,F),h.changeBaseMap=h.setBaseMap,h.setShadowVisibility=m=>g.setShadowsEnable(m),h.setShadowsEnable=h.setShadowVisibility,h.setEnvironmentMapVisibility=m=>g.setEnvironmentMapEnable(m),h.setEnvironmentMapEnable=h.setEnvironmentMapVisibility,h.setAOVisibility=m=>g.setAmbientOcclusion(m),h.setAmbientOcclusion=h.setAOVisibility,h.setBackgroundColor=m=>g.setGlobeColor(m),h.setGlobeColor=h.setBackgroundColor,h.setWorldTime=m=>g.setTime(m),h.setTime=h.setWorldTime,h.setModelBrightness=m=>g.setModelBrightness(m),h.adjustModelColor=m=>g.setModelColorAdjustment(m),h.setModelColorAdjustment=h.adjustModelColor,h.setShadowIntensity=m=>{g.setShadowDarkness?g.setShadowDarkness(m):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},h.setShadowDarkness=h.setShadowIntensity,h.switchSceneMode=async m=>{const F=m?"2d":"3d";await g.setCadMode(F),m&&!I&&(I=new ec({cesium:a,viewer:p})),l.emit("setMode",F)},h.setSceneMode=h.switchSceneMode,h.set2d=m=>h.switchSceneMode(m),h.is2dMode=()=>g.is2d,h.setMouseControlMode=m=>g.setMouseHabit(m),h.setMouseHabit=h.setMouseControlMode,h.setCollisionEnabled=m=>g.setCollisionDetection(m),h.setCollisionDetection=h.setCollisionEnabled,h.searchAndLocate=(m,F)=>g.searchLocation(m,F),h.searchLocation=h.searchAndLocate,h.setGisOptions=m=>{m.globe!==void 0&&g.setGlobeEnvironmentVisible(m.globe),m.elevation!==void 0&&g.setTerrainEnable(m.elevation),m.depthTestAgainstTerrain!==void 0&&g.setDepthTestEnable(m.depthTestAgainstTerrain),m.rendering!==void 0&&g.setAmbientOcclusion(m.rendering)},h.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),h.setConfigure=m=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",m)},h.addCadModel=m=>{const F={...m};return F.files&&!F.fileNames&&(F.fileNames=F.files),F.fileNames||(F.fileNames=[]),y.addDxfModel(F)},h.addDxfModel=h.addCadModel,h.deleteCad=m=>y.deleteCad(m),h.deleteAllCad=()=>y.deleteAllCad(),h.showCadModel=m=>y.showJson(m),h.showDxfModel=h.showCadModel,h.showCadLayer=m=>y.showJsonByLayer(m),h.showDxfLayer=h.showCadLayer,h.flyToCadModel=(m={})=>y.flyToCadModel(m),h.getCadModels=m=>y.getDxfModels(m),h.getDxfModels=h.getCadModels,h.getCadLayers=m=>y.getMapLayers(m),h.getDxfLayers=h.getCadLayers,h.getCadModelId=()=>y.getModelId(),h.setCadOpen=m=>y.setDxfOpen(m),h.setDxfOpen=h.setCadOpen,h.getCadOpen=()=>y.getDxfOpen(),h.getDxfOpen=h.getCadOpen,h.adjustCadModel=m=>y.adjustingModelByCad(m),h.adjustingModelByCad=h.adjustCadModel,h.saveAnnotations=()=>{let m=null;return I&&(m=I.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(m),m},h.loadAnnotations=m=>I?I.loadAnnotations(m):!1,h.flyToTopView=()=>{y.flyToCadModel()},h.menuEvents=l,h.addMenuItems=m=>{l.emit("insertMenu",m)},h.insertMenu=h.addMenuItems,h.filterMenuItems=m=>{l.emit("setMenuListFilter",m)},h.setMenuListFilter=h.filterMenuItems,h.setMenuVisibility=m=>{l.emit("showMenu",m)},h.showMenu=h.setMenuVisibility,h.setPanelVisibility=(m,F)=>{l.emit("setMenuActive",m,F)},h.setMenuActive=h.setPanelVisibility,h.addContextMenuItems=m=>{console.warn("addContextMenuItems is not initialized yet. Please wait for LeitingBIM component to mount.",m)},h.insertContextMenu=h.addContextMenuItems,h.removeContextMenuItems=m=>{console.warn("removeContextMenuItems is not initialized yet.",m)},h.deleteContextMenu=h.removeContextMenuItems,h.closeContextMenu=()=>{console.warn("closeContextMenu is not initialized yet.")},h.hideContextMenu=h.closeContextMenu,h.getModelTree=()=>{const m=[],F=C.getMapTileset();return Object.keys(F).forEach(T=>{const P=F[T];if(P&&P.leiting&&P.leiting.tree){const L=P.leiting.tree;Array.isArray(L)?m.push(...L):m.push(L)}}),m},h.getTree=h.getModelTree,h.getAllComponentDetails=()=>{const m=C.getMapTileset(),F={},T=[];try{Object.keys(m).forEach(P=>{const L=m[P];if(!L||!L.leiting)return;const G=L.leiting,N=G.node,b=G.model.formData,w=G.box;if(!N||!N.nodeExtras)return;const v=G.model.modelId;F[v]=N.nodeExtras;const B=N.nodeExtras.element;if(!B)return;const R=w?w.center:{x:0,y:0,z:0};Object.values(B).forEach(U=>{if(U.box3)try{const O=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(b.totalRotation||0)),D=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(O),new a.Cartesian3(0,0,0)),_=a.Cartesian3.fromDegrees(b.longitude,b.latitude,b.height),Y=a.Transforms.eastNorthUpToFixedFrame(_);a.Matrix4.multiply(Y,D,Y);const $=new a.Cartesian3(R.x,R.y,0),J=new a.Cartesian3;a.Matrix4.multiplyByPoint(Y,$,J);const ne=a.Cartographic.fromCartesian(J),re=U.box3?.Center?.x||0,V=U.box3?.Center?.y||0,j=U.box3?.Center?.z||0,q=new a.Cartesian3(-R.x+re,-R.y+V,0+j),se=a.Matrix4.fromTranslation(q),oe=a.Matrix4.clone(se);a.Matrix4.multiply(D,oe,oe);const ae=a.Cartesian3.fromDegrees(ne.longitude/Math.PI*180,ne.latitude/Math.PI*180,b.height),Ee=a.Transforms.eastNorthUpToFixedFrame(ae);a.Matrix4.multiply(Ee,oe,Ee);const le=a.Cartographic.fromCartesian(new a.Cartesian3(Ee[12],Ee[13],Ee[14]));U.box3.cartographic={longitude:le.longitude/Math.PI*180,latitude:le.latitude/Math.PI*180,height:le.height};const Pe={id:U.uniqueId,billboard:[{theme:"Tag9999",position:[U.box3.cartographic.longitude,U.box3.cartographic.latitude,U.box3.cartographic.height],options:{text:U.name}}]};T.push(Pe)}catch(O){console.warn("Error calculating component position:",O)}})})}catch(P){console.error("getAllComponents error:",P)}return F},h.getAllComponents=h.getAllComponentDetails,h.getComponentInfoList=m=>{if(!Array.isArray(m))return[];const F=C.getMapTileset(),T=[],P={};m.forEach(L=>{!L.modelId||!L.elementId||(P[L.modelId]||(P[L.modelId]=[]),P[L.modelId]?.push(L.elementId))});try{Object.keys(P).forEach(L=>{const G=F[L];if(!G||!G.leiting)return;const N=G.leiting,b=N.node,w=N.model.formData,v=N.box;if(!b||!b.nodeExtras)return;const B=b.nodeExtras.element;if(!B)return;const R=v?v.center:{x:0,y:0,z:0};P[L]?.forEach(U=>{const O=B[U];if(O&&O.box3)try{const D=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),_=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(D),new a.Cartesian3(0,0,0)),Y=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),$=a.Transforms.eastNorthUpToFixedFrame(Y);a.Matrix4.multiply($,_,$);const J=new a.Cartesian3(R.x,R.y,0),ne=new a.Cartesian3;a.Matrix4.multiplyByPoint($,J,ne);const re=a.Cartographic.fromCartesian(ne),V=O.box3?.Center?.x||0,j=O.box3?.Center?.y||0,q=O.box3?.Center?.z||0,se=new a.Cartesian3(-R.x+V,-R.y+j,0+q),oe=a.Matrix4.fromTranslation(se),ae=a.Matrix4.clone(oe);a.Matrix4.multiply(_,ae,ae);const Ee=a.Cartesian3.fromDegrees(re.longitude/Math.PI*180,re.latitude/Math.PI*180,w.height),le=a.Transforms.eastNorthUpToFixedFrame(Ee);a.Matrix4.multiply(le,ae,le);const Pe=a.Cartographic.fromCartesian(new a.Cartesian3(le[12],le[13],le[14]));O.box3.cartographic={longitude:Pe.longitude/Math.PI*180,latitude:Pe.latitude/Math.PI*180,height:Pe.height},O.elementId=U,O.modelId=L,T.push(O)}catch(D){console.warn("Error calculating component position:",D)}})})}catch(L){console.error("getCptInfos error:",L)}return T},h.getCptInfos=h.getComponentInfoList,h.baseCompt=A.baseCompt,window.Methods=h}return console.log("methods",h),{Cesium:a,viewer:p,methods:h,menuEvents:l}}function lo(n){return d.getCurrentScope()?(d.onScopeDispose(n),!0):!1}function co(n){return typeof n=="function"?n():d.unref(n)}const L0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const N0=Object.prototype.toString,U0=n=>N0.call(n)==="[object Object]",_0=()=>{};function Q0(n){return d.getCurrentInstance()}function nc(n,e=!0,t){Q0()?d.onMounted(n,t):e?n():d.nextTick(n)}function Nt(n){var e;const t=co(n);return(e=t?.$el)!=null?e:t}const Ln=L0?window:void 0;function H0(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=Ln):[e,t,i,s]=n,!e)return _0;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},l=(u,f,p,h)=>(u.addEventListener(f,p,h),()=>u.removeEventListener(f,p,h)),a=d.watch(()=>[Nt(e),co(s)],([u,f])=>{if(r(),!u)return;const p=U0(f)?{...f}:f;o.push(...t.flatMap(h=>i.map(A=>l(u,h,A,p))))},{immediate:!0,flush:"post"}),c=()=>{a(),r()};return lo(c),c}function G0(){const n=d.ref(!1),e=d.getCurrentInstance();return e&&d.onMounted(()=>{n.value=!0},e),n}function ic(n){const e=G0();return d.computed(()=>(e.value,!!n()))}function Y0(n,e={}){const{window:t=Ln}=e,i=ic(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=d.ref(!1),r=c=>{o.value=c.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=d.watchEffect(()=>{i.value&&(l(),s=t.matchMedia(co(n)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return lo(()=>{a(),l(),s=void 0}),o}function V0(n,e,t={}){const{window:i=Ln,...s}=t;let o;const r=ic(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},a=d.computed(()=>Array.isArray(n)?n.map(f=>Nt(f)):[Nt(n)]),c=d.watch(a,f=>{if(l(),r.value&&i){o=new ResizeObserver(e);for(const p of f)p&&o.observe(p,s)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return lo(u),{isSupported:r,stop:u}}function W0(n,e={width:0,height:0},t={}){const{window:i=Ln,box:s="content-box"}=t,o=d.computed(()=>{var f,p;return(p=(f=Nt(n))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),r=d.ref(e.width),l=d.ref(e.height),{stop:a}=V0(n,([f])=>{const p=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&o.value){const h=Nt(n);if(h){const A=h.getBoundingClientRect();r.value=A.width,l.value=A.height}}else if(p){const h=Array.isArray(p)?p:[p];r.value=h.reduce((A,{inlineSize:C})=>A+C,0),l.value=h.reduce((A,{blockSize:C})=>A+C,0)}else r.value=f.contentRect.width,l.value=f.contentRect.height},t);nc(()=>{const f=Nt(n);f&&(r.value="offsetWidth"in f?f.offsetWidth:e.width,l.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=d.watch(()=>Nt(n),f=>{r.value=f?e.width:0,l.value=f?e.height:0});function u(){a(),c()}return{width:r,height:l,stop:u}}function z0(n={}){const{window:e=Ln,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=n,r=d.ref(t),l=d.ref(i),a=()=>{e&&(o?(r.value=e.innerWidth,l.value=e.innerHeight):(r.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(a(),nc(a),H0("resize",a,{passive:!0}),s){const c=Y0("(orientation: portrait)");d.watch(c,()=>a())}return{width:r,height:l}}const j0={class:"title"},$0={class:"actions"},K0={class:"card-body"},q0=d.defineComponent({__name:"LeitingDraggableCard",props:{visible:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},title:{type:String,default:"Title"},initialPosition:{type:Object,default:()=>({x:0,y:0})},width:{type:[Number,String],default:300},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=e,o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:M=>{s("update:visible",M),s("update:open",M)}}),r=d.ref(null),l=d.ref(t.initialPosition?.x||0),a=d.ref(t.initialPosition?.y||0),c=d.ref(t.width),u=d.ref(t.fullHeight?"100%":"600px");d.watch(()=>t.fullHeight,M=>{M?u.value="100%":u.value==="100%"&&(u.value="600px")});const{height:f}=z0();d.watch(f,()=>{t.fullHeight&&(u.value="100%")});const p=d.ref(!1),h=M=>{p.value=!0,M.preventDefault(),M.stopPropagation();const k=M.clientX,S=M.clientY,x=typeof c.value=="number"?c.value:r.value?.offsetWidth||0,m=typeof u.value=="number"?u.value:r.value?.offsetHeight||0,F=P=>{if(!p.value)return;P.preventDefault();const L=P.clientX-k,G=P.clientY-S,N=x+L,b=m+G;N>100&&(c.value=N),b>100&&(u.value=b)},T=()=>{p.value=!1,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",T)};document.addEventListener("mousemove",F),document.addEventListener("mouseup",T)},A=d.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof c.value=="number"?`${c.value}px`:c.value,height:typeof u.value=="number"?`${u.value}px`:u.value,position:"absolute",zIndex:2e3})),C=()=>{d.nextTick(()=>{if(r.value){const M=r.value.offsetParent||document.body,k=M.clientWidth,S=M.clientHeight,x=typeof c.value=="number"?c.value:r.value.offsetWidth||350,m=typeof u.value=="number"?u.value:r.value.offsetHeight||600;l.value+x>k&&(l.value=Math.max(0,k-x-20)),a.value+m>S&&(a.value=Math.max(0,S-m-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},g=d.ref(!1),y=M=>{if(M.target.closest(".close-btn")||M.target.closest(".actions"))return;g.value=!0,M.preventDefault(),M.stopPropagation();const k=M.clientX,S=M.clientY,x=l.value,m=a.value,F=P=>{if(!g.value)return;P.preventDefault();const L=P.clientX-k,G=P.clientY-S;l.value=x+L,a.value=m+G},T=()=>{g.value=!1,document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",T),C()};document.addEventListener("mousemove",F),document.addEventListener("mouseup",T)},E=()=>{d.nextTick(()=>{if(t.align&&r.value){const M=r.value.offsetParent||document.body,k=typeof c.value=="number"?c.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,M.clientWidth-k-20):t.align==="center"&&(l.value=Math.max(0,(M.clientWidth-k)/2))}C()})};d.onMounted(()=>{t.align?E():C()}),d.watch(o,M=>{M&&(t.align?E():C())});const I=()=>{o.value=!1,s("close")};return(M,k)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref_key:"cardRef",ref:r,class:d.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+d.unref(i)]]),style:d.normalizeStyle(A.value)},[d.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:y},[d.createElementVNode("span",j0,d.toDisplayString(n.title),1),d.createElementVNode("div",$0,[d.renderSlot(M.$slots,"header-extra",{},void 0,!0),d.createElementVNode("span",{class:"close-btn",onClick:I},"×")])],544),d.createElementVNode("div",K0,[d.renderSlot(M.$slots,"default",{},void 0,!0)]),d.createElementVNode("div",{class:"resize-handle",onMousedown:h},[...k[0]||(k[0]=[d.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[d.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[d.vShow,o.value]])}}),Ue=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Re=Ue(q0,[["__scopeId","data-v-50bf6126"]]);function X0(n){const e=d.ref([]),t=d.ref([]),i=d.ref([]),s=d.ref(""),o=d.ref(!0);d.watch(()=>d.unref(n),f=>{if(!f||f.length===0)return;const p=[],h=(g,y)=>{g.forEach(E=>{const I=E.id||E.key||E.$id,M=E.modelId||y;M&&(E.modelId=M),I&&p.push(I),E.children&&E.children.length>0&&h(E.children,M)})};h(f);const A=new Set(i.value);let C=!1;p.forEach(g=>{A.has(g)||(A.add(g),C=!0)}),C&&(i.value=Array.from(A))},{immediate:!0,deep:!0});const r=d.computed(()=>{const f=d.unref(n);if(!f)return[];const p=[],h=(A,C)=>{A.forEach(g=>{const y=g.id||g.key||g.$id,E=g.name||g.title;p.push({key:y,title:E,parentKey:C}),g.children&&g.children.length>0&&h(g.children,y)})};return h(f),p}),l=f=>{e.value=f,o.value=!1},a=f=>{i.value=f},c=f=>{t.value=f},u=f=>r.value.find(h=>h.key===f)?.parentKey;return d.watch(s,f=>{if(!f)return;const h=r.value.filter(C=>C.title&&C.title.toLowerCase().includes(f.toLowerCase())).map(C=>C.parentKey),A=new Set;h.forEach(C=>{let g=C;for(;g;)A.add(g),g=u(g)}),e.value=[...A],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:i,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:c}}const J0={class:"search-box"},Z0={key:0},eC={style:{color:"#f50"}},tC={key:1},nC={key:1,class:"empty-tip"},Pi=Ue(d.defineComponent({__name:"LeitingTree",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"构件树"},width:{type:[Number,String],default:320},treeData:{type:Array,default:()=>[]},initialPosition:{type:Object,default:()=>({x:0,y:0})},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close","select","check"],setup(n,{emit:e}){const t=Ae.Input.Search,i=Ae.Tree,s=n,o=e,r=d.inject("leiting-theme",d.ref("dark")),l=d.inject("leitingMethods"),a=m=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(m)},c=d.computed({get:()=>s.open!==void 0?s.open:s.visible,set:m=>{o("update:visible",m),o("update:open",m)}}),u=d.ref(null),{height:f}=W0(u),p=d.computed(()=>f.value||300),h=d.ref({children:"children",title:"name",key:"id"}),{expandedKeys:A,selectedKeys:C,checkedKeys:g,searchValue:y,autoExpandParent:E}=X0(d.toRef(s,"treeData")),I=m=>{A.value=m,E.value=!1},M=m=>{const F=[],T=P=>{if(!P.children||P.children.length===0){const G=P.element_Id;P.modelId&&G&&F.push({modelId:P.modelId,elementId:G})}else P.children.forEach(T)};return T(m),F},k=(m,F)=>{g.value=m,o("check",m,F);const T=M(F.node).map(P=>({...P,show:F.checked}));l?.value?.setComponentVisibility&&l.value.setComponentVisibility(T),l?.value?.onTreeCheck&&l.value.onTreeCheck(m,F)},S=(m,F)=>{if(C.value=m,o("select",m,F),F.selected){const T=M(F.node);T.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:T})}l?.value?.onTreeSelect&&l.value.onTreeSelect(m,F)},x=()=>{o("update:visible",!1),o("close")};return(m,F)=>(d.openBlock(),d.createBlock(Re,{visible:c.value,"onUpdate:visible":F[1]||(F[1]=T=>c.value=T),title:n.title,"initial-position":n.initialPosition,"full-height":n.fullHeight,onClose:x},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["leiting-tree-container",[`theme-${d.unref(r)}`]])},[d.createElementVNode("div",J0,[d.createVNode(d.unref(t),{value:d.unref(y),"onUpdate:value":F[0]||(F[0]=T=>d.isRef(y)?y.value=T:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),d.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:u},[n.treeData&&n.treeData.length?(d.openBlock(),d.createBlock(d.unref(i),{key:0,"tree-data":n.treeData,"field-names":h.value,height:p.value,"expanded-keys":d.unref(A),"auto-expand-parent":d.unref(E),"selected-keys":d.unref(C),"checked-keys":d.unref(g),checkable:"","block-node":"",onExpand:I,onSelect:S,onCheck:k},{title:d.withCtx(({name:T,title:P})=>[(T||P)&&d.unref(y)&&(T||P).toLowerCase().indexOf(d.unref(y).toLowerCase())>-1?(d.openBlock(),d.createElementBlock("span",Z0,[d.createTextVNode(d.toDisplayString((T||P).substr(0,(T||P).toLowerCase().indexOf(d.unref(y).toLowerCase())))+" ",1),d.createElementVNode("span",eC,d.toDisplayString(d.unref(y)),1),d.createTextVNode(" "+d.toDisplayString((T||P).substr((T||P).toLowerCase().indexOf(d.unref(y).toLowerCase())+d.unref(y).length)),1)])):(d.openBlock(),d.createElementBlock("span",tC,d.toDisplayString(T||P),1))]),_:1},8,["tree-data","field-names","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(d.openBlock(),d.createElementBlock("div",nC,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-749af6eb"]]),iC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",sc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAERSURBVDhPvZTrEYIwEISTCrQD6EA7gA60AylBK1Aq0A7ECrQDoQPsADrACuLuTMJkIiHxjzezgyR7H3d5KJVSqRAigcaQUjYYX2JgZY/P/O4lEgYYFo7pgPcc2kSCBoIUzDeo0klPPEsNYlX7AKzA/M6ASrRzYoIGG5DAOCvzBvzMOxqQazSgLLI1QdAW5jWpUAPV0AVKIc7FRCuNy7RkWozJtj1BED7ANbpDXHhffFXUwUnZwRYp7qw7Rx8/lLkV9R4QD2w1A8pjW3sA4h5au+pXEBS76P8D6Ut9/nXXaiRQdnBXqBfEC+4GdzSxW5v6F7CTeHnbCVCBsWIE+RYVrdF4DSz6OwgiADDexbmT3X0A4fSDfDjUugcAAAAASUVORK5CYII=",sC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAFESURBVDhPlZMNEcIwDIVXBQwFgAJAAcMBDgAFIGE4wAHgABSwOdgcIAEUjPd6aS/rfhi7y12bJl9f0sxEf3xVVV0RPoetjTFvnWqGcgSylfgihA0CKcgJgBfsAqMiKiM0+gkKlCyZCN8uhPWCFOSBxARWORU4W2CdeV9XjxSEJcwkjokTqBpzjxjCn7CyVRECzjg8wHLYCmabK7CplBcLhMr2DZCqP0dCovYZ9hYGXx1izLUGUkkfxI/sTQiCf4N1zLWAWCKV2nP6PEhB2Ngd7B4GC4SJnCcP8SAFoc/Ph/TqjVvTPogFKUiJ/VGU+GdmUAA5ObA7cyC+iPt/MjUfKRL4emyuK+cGH8tufFRUHywZ+RYlnRDdIwfzLzVUibtQv1oNhoAExtfpVdIAiQIOWiY9o2sQxJemOydTS1jR1di2Zn8B8f27apou9kMAAAAASUVORK5CYII=",oC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHDSURBVDhPlZOxL0NRFIe9ECubhehoIIjJ1HYwCkIiJpUQEkN1YZBobU0kFKNI3iTGYrDRv0BIhLXCYpCwiO35fs25zWva98JNvpz37j33d8+551yvLWIEQXDG0izMe55XjvJz816MUJG1LVuvYJcQrEb5xwkV2JSHGfAhgBJiu63E4oSUzpRtusa+wBooKkWnKOujQYh7SbCShQx0m9cpds4iOseOw7BFmUPwU341IQT2MaOQgi9QND+wiqNnBxT4X7SIbrAqhNI9wiUvJ+W8A99wDEWdwrw25iVkkenAEb5LkIQPuIMJWJGQoriFd+iBCkhc8zUhfJSm7mva5l3aadubDgtpMgGKpB/eoBfuQZFoPNhBj9gTaC3kKkEEGXPswF7Y5rLro1AW8UI6GmelmAzfkUWlNaWt6/iT0DOOA5bqoSuzHfIvofATqSJQb8KoiJbtPi6x2dA9FPjXE1F/uZKrv3IwCFcNqVmoPlal7QJ9q/wZCbk7Ioo9/tehE9q1r0nIxNQbG4YEXdkVjQ5J2OZXbB88gVrgQIJNj9aaT4LboPK7J6O0Ktb1KYtc/aYxGff6h3AYY6Nvzk2GQ1WQTVj4BST70jYaqceXAAAAAElFTkSuQmCC",rC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADhSURBVHgBvVOBEYIwDEw9B2ADO4IjuIEjwAa6Aa7ABMAEuIIjOIFsUDao37vgxVZbBI+/+0tI0+fJBaIIrLUFaMAHmNNcsMAIE+vdJLQykQ+0wFHBrsyiT/sL2I1DDTac/+4Klzobov7WHxt29qGmaYaQnlhLCmUTa2l4C2ljvamFlEvY0xpCW/kA924GblfGWciZaJyXQvSmlOoDITSdXQBbcA8eKfy/nHDFeY470FIX8tzUIu84FmLWuTzz7yhRLPm54dKJ4+A5uoJ3HgHBUfUmxGIa4QDuKA4n3kLk9ZInw0qu5b1R1aYAAAAASUVORK5CYII=",aC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAADFSURBVDhPxVPBDYMwDIwnKJu0G9ANYJMyQrsBbNIRGAE2gEnSO6mpIMJxkBC1lEds52zfOeK9b51zV5wte4lIr8RWbgGQh2fGmaIHJe4EetKPtDpRcA5AvwcB7FtgCcTOH0p3YzaQNd75QBiVXJG3LRtCRyQ6Jvsekd3gTsJVoDcihZLQQjXGTRMzIzPhOCCQyNYvSuEue7Qdm02yK0u1nM2m/FQyKb8JZHH+l81Ofdpdm82tvikjThyNlbSEBvIPFj+MfwA76qSYUG3g9QAAAABJRU5ErkJggg==",lC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEcSURBVDhPrZSNDYIwEIXpBOIGjMAIOIE4AbgBGwAbOIJu4Aa4gW4gI+gE9b3mjjSmibSR5ALX3H33W4y1Ns+yrIe0EH7HPC8YnyGjAegkEB5cYyiwrdWXIEc1xnSREGcuiTQEWeg7gG4+CMcl9ALnLkvogwScv+wq6FMQJJCJDgBtBcSAI3QClwe2YZAHcY2Ho4kGAVLA6U5/CEvdp4KYhesFhBPpCZIAz6jStHhproJcHyAHbb5nF+6RZ8CsGslIQaHp/gSxRzlApU4GugPxNuDN/eNarAJxapUPgm8rQ9C1SAI9AOGiHhGApSdnRN8FshbEiLwiLI1rMUM6zSQ0tX9c2lp/Iw0iMIPU38iFIN1mTmOjKa98vyWB4QM5XQnvsbFsyAAAAABJRU5ErkJggg==",cC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGPSURBVDhPrZT9UQIxEMUvFSgViBUoFQgVABV4VqBW4FmBUIFQgZRwVqBU4HUAVHC+X2aXycQw/sPOvLncZvdlv5JQFaTv+1upp8IyhLDHRLpLfe6FrXRt7hZShYyH+n8RauGAv/AkQNYIHICshFcRdu6fE/kGRN/mQGTIpzAzMoh6EV2fIsJ5IwNOj2IpVZ6i6difSecRVnlELZHIgHROisgXRCa78Z+IrMBf2pjLYJNENGSd1kO2pPghjKQniyqY8lFr2NfaqC18wn7nZCMlWg7xLq70TxfRLyHqtABN2lbp40mSSCzBcSebif1TPyKjDBcQ0eJJRkIUpHkMPUlnkBU+pnlWItL6ERgw8o1iqRHtgzAUGNRD2qmkvgMvNnneUQcZ4ggR6VGXG+OOA1koNvrFcY7+af++VJe0hucfyKQu+RWJc+SDZ3aNvlPpRl7T0qXdafNZYPDehLEZt/rOBR9U8QSaEKX0jHAaE4tshVrgLeJ+Xdl6rS8D3BWJXKnCEwWXEuco9grQ3bb0sP0Cn8/nPm/SMRQAAAAASUVORK5CYII=",dC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",uC={class:"menu-container"},hC=["onClick","title"],fC={class:"menu-icon"},pC=["src","alt"],gC={key:3,style:{"font-size":"12px"}},mC={key:0,class:"sub-menu"},AC=["onClick"],Nn=d.defineComponent({__name:"LeitingMenu",props:{visible:{type:Boolean,default:!0},activeIds:{type:Array,default:()=>[]},is2d:{type:Boolean,default:!1},customItems:{type:Array,default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=d.inject("leiting-menu-size",d.ref("medium")),o=d.inject("leitingMethods",d.ref({})),r=d.computed(()=>i.value||i),l=d.computed(()=>s.value||s),a=d.ref([{ID:"home",title:"主视角",src:iC,key:"homeView"},{ID:"tree",title:"目录树",src:sc,key:"componentTree"},{ID:"cadLayer",title:"图层",src:sc,key:"cadLayer"},{ID:"measure",title:"量算",src:sC,key:"measurement"},{ID:"section",title:"剖切",src:oC,key:"section"},{ID:"roam",title:"人物漫游",src:rC,key:"roam"},{ID:"info",title:"构件信息",src:aC,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:lC,key:"cadPosition"},{ID:"annotation",title:"标注",src:dC,key:"annotation"},{ID:"setting",title:"设置",src:cC,key:"setting"}]),c=d.ref([]),u=d.ref([...t.activeIds]);d.watch(()=>t.activeIds,k=>{u.value=[...k]},{deep:!0});const f=d.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",k=>{c.value=k}),o.value.menuEvents.on("setMenuActive",(k,S)=>{S?u.value.includes(k)||u.value.push(k):u.value=u.value.filter(x=>x!==k)}));const p=d.computed(()=>{let k=a.value;if(t.is2d){const S=["homeView","measurement","cadLayer","annotation"];k=k.filter(x=>x.key&&S.includes(x.key))}else{const S=["cadLayer","cadPosition","annotation"];k=k.filter(x=>!x.key||!S.includes(x.key))}if(c.value.length>0&&(k=k.filter(S=>!S.key||!c.value.includes(S.key))),t.customItems&&t.customItems.length>0){const S=t.customItems.map(x=>({...x,key:x.ID,src:x.src||x.icon}));return[...k,...S]}return k}),h=e,A=k=>{const S=["homeView"];if(k.key&&S.includes(k.key))u.value.includes(k.ID)||(u.value.push(k.ID),setTimeout(()=>{const m=u.value.indexOf(k.ID);m>-1&&u.value.splice(m,1)},1e3));else{const m=u.value.indexOf(k.ID);m>-1?u.value.splice(m,1):u.value.push(k.ID)}const x=u.value.includes(k.ID);k.func&&k.func(k),k.key&&h("action",k.key,x)},C=k=>{a.value=[...a.value,...k]},g=k=>{c.value=k},y=k=>{console.log("LeitingMenu received showMenu event:",k)},E=(k,S)=>{const x=a.value.find(m=>m.ID===k||m.key===k);if(x){const m=u.value.indexOf(x.ID);S&&m===-1?u.value.push(x.ID):!S&&m>-1&&u.value.splice(m,1)}};let I=null;const M=()=>{o.value?.menuEvents&&(I&&(I.off("insertMenu",C),I.off("setMenuListFilter",g),I.off("showMenu",y),I.off("setMenuActive",E)),I=o.value.menuEvents,I.on("insertMenu",C),I.on("setMenuListFilter",g),I.on("showMenu",y),I.on("setMenuActive",E))};return d.onMounted(()=>{M()}),d.onUnmounted(()=>{I&&(I.off("insertMenu",C),I.off("setMenuListFilter",g),I.off("showMenu",y),I.off("setMenuActive",E))}),d.watch(o,()=>{M()},{deep:!0}),(k,S)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[d.createElementVNode("div",uC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(p.value,x=>(d.openBlock(),d.createElementBlock("div",{key:x.ID,class:d.normalizeClass(["menu-item",{active:u.value.includes(x.ID)}]),onClick:m=>A(x),title:x.title},[d.createElementVNode("div",fC,[x.src?(d.openBlock(),d.createElementBlock("img",{key:0,src:x.src,alt:x.title},null,8,pC)):typeof x.icon=="object"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.icon),{key:1})):typeof x.icon=="string"?(d.openBlock(),d.createElementBlock("i",{key:2,class:d.normalizeClass(["iconfont",`icon-${x.icon}`])},null,2)):(d.openBlock(),d.createElementBlock("span",gC,d.toDisplayString(x.title.substring(0,2)),1))]),x.children&&x.children.length>0?(d.openBlock(),d.createElementBlock("div",mC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.children,m=>(d.openBlock(),d.createElementBlock("div",{key:m.ID,class:d.normalizeClass(["sub-menu-item",{active:u.value.includes(m.ID)}]),onClick:d.withModifiers(F=>A(m),["stop"])},d.toDisplayString(m.title),11,AC))),128))])):d.createCommentVNode("",!0)],10,hC))),128))])],2)),[[d.vShow,f.value]])}}),yC={class:"leiting-section-content"},CC={class:"section-form-item"},EC={class:"radio-group"},wC={class:"section-form-item"},bC={class:"switch-container"},vC={class:"switch"},IC={class:"status-text"},xC={class:"section-form-item slider-item"},BC={class:"slider-wrapper"},SC={class:"section-form-item slider-item"},MC={class:"slider-wrapper"},TC={class:"section-form-item slider-item"},DC={class:"slider-wrapper"},kC={class:"section-form-item table-item"},PC={class:"model-table-container"},FC={class:"model-table"},RC={width:"40"},OC=["checked"],LC=["onClick"],NC=["value"],UC={class:"model-name"},Un=Ue(d.defineComponent({__name:"LeitingSection",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"剖切控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:N=>{i("update:visible",N),i("update:open",N)}}),r=d.ref("Box"),l=d.ref(!1),a=d.ref([]),c=d.ref([]),u=d.computed(()=>c.value.length===0?!1:c.value.every(N=>a.value.includes(N.modelId))),f=N=>{N.target.checked?a.value=c.value.map(w=>w.modelId):a.value=[],F()},p=d.ref([-10,10]),h=d.ref([-10,10]),A=d.ref([-10,10]),C=d.ref([-100,100]),g=d.ref([-100,100]),y=d.ref([-100,100]);let E=!1;const I=N=>{E=!0;const{targetZPlus:b,targetZMinus:w,targetXPlus:v,targetXMinus:B,targetYPlus:R,targetYMinus:U}=N;A.value=[-w,b],p.value=[-B,v],h.value=[-U,R],setTimeout(()=>{E=!1},100)},M=()=>{E||a.value.length===0||!s?.value?.updateSectionRange||s.value.updateSectionRange({targetZPlus:A.value[1],targetZMinus:-A.value[0],targetXPlus:p.value[1],targetXMinus:-p.value[0],targetYPlus:h.value[1],targetYMinus:-h.value[0]})},k=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},S=N=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const w=s.value.getMapTileset()[N];if(w&&w.leiting?.box){const{min:v,max:B}=w.leiting.box,R=(B.x-v.x)/2,U=(B.y-v.y)/2,O=(B.z-v.z)/2;a.value.length<=1&&(C.value=[-R*2,R*2],g.value=[-U*2,U*2],y.value=[-O*2,O*2],p.value=[-R,R],h.value=[-U,U],A.value=[-O,O],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:O,targetZMinus:O,targetXPlus:R,targetXMinus:R,targetYPlus:U,targetYMinus:U})),s.value.openSection(N,{moveCallBack:I}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},x=N=>{const b=a.value.indexOf(N);b>-1?a.value.splice(b,1):a.value.push(N),F()};let m=[];const F=()=>{const N=a.value.filter(w=>!m.includes(w)),b=m.filter(w=>!a.value.includes(w));N.forEach(w=>S(w)),b.forEach(w=>{s?.value?.closeSection&&s.value.closeSection(w)}),m=[...a.value]},T=()=>{},P=()=>{o.value=!1,i("close")},L=()=>{l.value=!1,a.value=[],m=[],p.value=[-10,10],h.value=[-10,10],A.value=[-10,10],C.value=[-100,100],g.value=[-100,100],y.value=[-100,100]};d.watch(()=>t.visible,N=>{N?G():(s?.value?.closeSection&&s.value.closeSection(),L())});const G=()=>{s?.value&&typeof s.value.getModelList=="function"&&(c.value=s.value.getModelList()||[],c.value.length>0&&a.value.length===0&&(a.value=[c.value[0].modelId],m=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(N=>S(N))))};return d.watch(()=>s?.value,()=>{G()},{immediate:!0,deep:!0}),d.onMounted(()=>{G()}),(N,b)=>(d.openBlock(),d.createBlock(Re,{visible:o.value,title:"剖切分析","full-height":n.fullHeight,"onUpdate:visible":P},{default:d.withCtx(()=>[d.createElementVNode("div",yC,[d.createElementVNode("div",CC,[b[8]||(b[8]=d.createElementVNode("span",{class:"label"},"模式",-1)),d.createElementVNode("div",EC,[d.createElementVNode("label",{class:d.normalizeClass(["radio-item",{active:r.value==="Box"}])},[d.withDirectives(d.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":b[0]||(b[0]=w=>r.value=w),onChange:T},null,544),[[d.vModelRadio,r.value]]),b[7]||(b[7]=d.createTextVNode(" 剖切盒 ",-1))],2)])]),d.createElementVNode("div",wC,[b[10]||(b[10]=d.createElementVNode("span",{class:"label"},"显示",-1)),d.createElementVNode("div",bC,[d.createElementVNode("label",vC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":b[1]||(b[1]=w=>l.value=w),onChange:k},null,544),[[d.vModelCheckbox,l.value]]),b[9]||(b[9]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",IC,d.toDisplayString(l.value?"显示":"隐藏"),1)])]),d.createElementVNode("div",xC,[b[11]||(b[11]=d.createElementVNode("span",{class:"label"},"X 轴",-1)),d.createElementVNode("div",BC,[d.createVNode(d.unref(Ae.Slider),{value:p.value,"onUpdate:value":b[2]||(b[2]=w=>p.value=w),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",SC,[b[12]||(b[12]=d.createElementVNode("span",{class:"label"},"Y 轴",-1)),d.createElementVNode("div",MC,[d.createVNode(d.unref(Ae.Slider),{value:h.value,"onUpdate:value":b[3]||(b[3]=w=>h.value=w),range:"",min:g.value[0],max:g.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",TC,[b[13]||(b[13]=d.createElementVNode("span",{class:"label"},"Z 轴",-1)),d.createElementVNode("div",DC,[d.createVNode(d.unref(Ae.Slider),{value:A.value,"onUpdate:value":b[4]||(b[4]=w=>A.value=w),range:"",min:y.value[0],max:y.value[1],step:.1,onChange:M},null,8,["value","min","max"])])]),d.createElementVNode("div",kC,[b[15]||(b[15]=d.createElementVNode("span",{class:"label"},"模型",-1)),d.createElementVNode("div",PC,[d.createElementVNode("table",FC,[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",RC,[d.createElementVNode("input",{type:"checkbox",checked:u.value,onChange:f},null,40,OC)]),b[14]||(b[14]=d.createElementVNode("th",null,"名称",-1))])]),d.createElementVNode("tbody",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,w=>(d.openBlock(),d.createElementBlock("tr",{key:w.modelId,class:d.normalizeClass({selected:a.value.includes(w.modelId)}),onClick:v=>x(w.modelId)},[d.createElementVNode("td",null,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:w.modelId,"onUpdate:modelValue":b[5]||(b[5]=v=>a.value=v),onClick:b[6]||(b[6]=d.withModifiers(()=>{},["stop"])),onChange:F},null,40,NC),[[d.vModelCheckbox,a.value]])]),d.createElementVNode("td",UC,d.toDisplayString(w.modelName),1)],10,LC))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee4d9a12"]]),_C={class:"leiting-player-content"},QC={class:"player-form-item"},HC={class:"switch-container"},GC={class:"switch"},YC={class:"status-text"},VC={class:"player-form-item"},WC={class:"switch-container"},zC={class:"switch"},jC={class:"status-text"},$C={class:"player-form-item"},KC={class:"switch-container"},qC={class:"switch"},XC={class:"status-text"},JC={class:"player-form-item slider-item"},ZC={class:"slider-wrapper"},eE={class:"value-text"},tE={class:"instructions"},nE={class:"key-map"},iE={class:"key-row"},sE={class:"key-row"},oE={class:"key-row"},rE={class:"key-row"},aE={class:"key-row"},lE={class:"key-row"},_n=Ue(d.defineComponent({__name:"LeitingPlayer",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"漫游控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(!1),r=d.ref(!1),l=d.ref(!0),a=d.ref(5),c=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:S=>{i("update:visible",S),i("update:open",S)}}),u=d.ref(null),f=d.ref(null),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=d.ref(null),g=()=>{o.value?E():I()},y=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},E=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),y(),s.value.bindPlayerUiKeys&&(await d.nextTick(),s.value.bindPlayerUiKeys({moveFront:u.value,moveBack:f.value,moveLeft:p.value,moveRight:h.value,moveUp:A.value,moveDown:C.value})))},I=()=>{s?.value?.closePlayer&&s.value.closePlayer()},M=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},k=()=>{c.value=!1,i("close")};return d.watch(()=>t.visible,S=>{S?(o.value=!0,s?.value?E():setTimeout(()=>{s?.value&&E()},100)):o.value&&(o.value=!1,I())},{immediate:!0}),(S,x)=>(d.openBlock(),d.createBlock(Re,{title:n.title,visible:c.value,"full-height":n.fullHeight,"onUpdate:visible":k},{default:d.withCtx(()=>[d.createElementVNode("div",_C,[d.createElementVNode("div",QC,[x[5]||(x[5]=d.createElementVNode("span",{class:"label"},"启用",-1)),d.createElementVNode("div",HC,[d.createElementVNode("label",GC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[0]||(x[0]=m=>o.value=m),onChange:g},null,544),[[d.vModelCheckbox,o.value]]),x[4]||(x[4]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",YC,d.toDisplayString(o.value?"开启":"关闭"),1)])]),d.createElementVNode("div",VC,[x[7]||(x[7]=d.createElementVNode("span",{class:"label"},"重力",-1)),d.createElementVNode("div",WC,[d.createElementVNode("label",zC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[1]||(x[1]=m=>r.value=m),onChange:y},null,544),[[d.vModelCheckbox,r.value]]),x[6]||(x[6]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",jC,d.toDisplayString(r.value?"开启":"关闭"),1)])]),d.createElementVNode("div",$C,[x[9]||(x[9]=d.createElementVNode("span",{class:"label"},"碰撞",-1)),d.createElementVNode("div",KC,[d.createElementVNode("label",qC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[2]||(x[2]=m=>l.value=m),onChange:y},null,544),[[d.vModelCheckbox,l.value]]),x[8]||(x[8]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",XC,d.toDisplayString(l.value?"开启":"关闭"),1)])]),d.createElementVNode("div",JC,[x[10]||(x[10]=d.createElementVNode("span",{class:"label"},"速度",-1)),d.createElementVNode("div",ZC,[d.createVNode(d.unref(Ae.Slider),{value:a.value,"onUpdate:value":x[3]||(x[3]=m=>a.value=m),min:1,max:10,step:1,onChange:M},null,8,["value"])]),d.createElementVNode("span",eE,d.toDisplayString(a.value),1)]),x[19]||(x[19]=d.createElementVNode("div",{class:"divider"},null,-1)),d.createElementVNode("div",tE,[x[18]||(x[18]=d.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),d.createElementVNode("div",nE,[d.createElementVNode("div",iE,[d.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:u},"W",512),x[11]||(x[11]=d.createTextVNode(" 前进 ",-1))]),d.createElementVNode("div",sE,[d.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:f},"S",512),x[12]||(x[12]=d.createTextVNode(" 后退 ",-1))]),d.createElementVNode("div",oE,[d.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:p},"A",512),x[13]||(x[13]=d.createTextVNode(" 左移 ",-1))]),d.createElementVNode("div",rE,[d.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:h},"D",512),x[14]||(x[14]=d.createTextVNode(" 右移 ",-1))]),d.createElementVNode("div",aE,[d.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:A},"Q",512),x[15]||(x[15]=d.createTextVNode(" 上升 ",-1))]),d.createElementVNode("div",lE,[d.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:C},"E",512),x[16]||(x[16]=d.createTextVNode(" 下降 ",-1))]),x[17]||(x[17]=d.createElementVNode("div",{class:"key-row"},[d.createElementVNode("span",{class:"mouse-icon"},"🖱️"),d.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-ff3f266e"]]),cE={class:"info-content"},dE={key:0,class:"component-title"},Qn=Ue(d.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref([]),r=d.ref(!1),l=d.ref([]),a=d.ref([]),c=d.ref(0),u=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:y=>{i("update:visible",y),i("update:open",y)}}),f=()=>{u.value=!1},p=y=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[y]||y,h=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],A=async y=>{const E=++c.value;if(a.value=y,!y||y.length===0){o.value=[];return}if(!u.value)return;let I=y;y.length>10&&(me.warning(`选中构件数量过多(${y.length}个),仅显示前10个`),I=y.slice(0,10));const M=s?.value;let k=M?.getMapTileset?M.getMapTileset():{};r.value=!0;const S=[],x={};if(I.forEach(T=>{const L=k[T.modelId]?.leiting?.model?.dbName;L&&T.elementId&&S.push({dbName:L,elementId:T.elementId,modelId:T.modelId})}),S.length>0){try{const T=S.map(L=>({dbName:L.dbName,elementId:L.elementId})),P=await Tg(T);P&&Array.isArray(P)&&P.forEach(L=>{const G=S.find(N=>N.dbName===L.dbName&&N.elementId===L.elementId);if(G){const N=`${G.modelId}_${L.elementId}`;x[N]=L}})}catch(T){console.warn("API fetch component details failed, falling back to local data",T)}console.log("123")}const m=new Set;if(I.forEach(T=>{const P=k[T.modelId],L=`${T.modelId}_${T.elementId}`;x[L]||P&&P.leiting&&!P.leiting?.node?.nodeExtras&&P.leiting.model?.nodeUrl&&m.add(T.modelId)}),m.size>0&&M?.loadNodeDetailsForModel)try{const T=Array.from(m).map(P=>M.loadNodeDetailsForModel(P));await Promise.all(T)}catch(T){console.error("Failed to load node details",T)}if(E!==c.value)return;k=M?.getMapTileset?M.getMapTileset():{};const F=[];I.forEach((T,P)=>{const G=k[T.modelId]?.leiting||{},N=x[`${T.modelId}_${T.elementId}`];let b={modelName:G.model?.modelId||T.modelId};b.elementID||(b.elementID=T.elementId);let w=null;if(N)w=N;else{const R=G.node?.nodeExtras?.element||G.node?.nodeExtras;if(R){const U=b.elementID;R[U]&&(w=R[U])}}w&&w.box3&&(b.length=`${w.box3.length?.toFixed(2)||0}米`,b.width=`${w.box3.width?.toFixed(2)||0}米`,b.height=`${w.box3.height?.toFixed(2)||0}米`);const v=[];w&&(w.name&&(b.elementName=w.name),w.categoryName&&(b.categoryName=w.categoryName),w.familySymbolName&&(b.familySymbolName=w.familySymbolName),w.levelName&&(b.levelName=w.levelName));const B={};if(h.forEach(R=>{b[R]!==void 0&&(B[R]=b[R])}),v.push({name:"基础信息",params:B}),w){const R=Array.isArray(w)?w:Array.isArray(w?.parameters)?w.parameters:null;if(R){if(R.flat().forEach(O=>{if(O&&O.GroupName&&Array.isArray(O.Parameters)){const D={};O.Parameters.forEach(_=>{_.name&&(D[_.name]=_.value??"")}),Object.keys(D).length>0&&v.push({name:O.GroupName,params:D})}}),!Array.isArray(w)){const{parameters:O,...D}=w,_={};Object.keys(D).forEach(Y=>{!h.includes(Y)&&Y!=="uniqueId"&&typeof D[Y]!="object"&&(_[Y]=D[Y])}),Object.keys(_).length>0&&v.push({name:"其他属性",params:_})}}else{let U=!1;if(Object.keys(w).forEach(O=>{w[O]&&typeof w[O]=="object"&&!Array.isArray(w[O])&&(U=!0,v.push({name:O,params:w[O]}))}),!U){const O={};Object.keys(w).forEach(D=>{if(!h.includes(D)&&D!=="batchId"){const _=w[D];typeof _=="string"&&_.length>500?O[D]=_.substring(0,500)+"...":O[D]=_}}),Object.keys(O).length>0&&v.push({name:"属性",params:O})}}}F.push({id:P,title:`${b.modelName}${b.elementName?` - ${b.elementName}`:""}`,groups:v})}),o.value=F,E===c.value&&(r.value=!1),F.length>0?l.value=[`${F[0].id}-基础信息`]:l.value=[]};let C=!1;const g=()=>{if(C)return;const y=s?.value;y&&y.selectionChange&&(y.selectionChange(A),C=!0)};return d.watch(()=>s?.value,()=>{g()},{deep:!0,immediate:!0}),d.watch(u,y=>{y&&a.value.length>0&&A(a.value)}),d.onMounted(()=>{g()}),(y,E)=>(d.openBlock(),d.createBlock(Re,{visible:u.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":n.fullHeight,onClose:f,"onUpdate:visible":E[1]||(E[1]=I=>u.value=I),class:"base-info-card"},{default:d.withCtx(()=>[d.createElementVNode("div",cE,[d.createVNode(d.unref(Ae.Spin),{spinning:r.value},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,I=>(d.openBlock(),d.createElementBlock("div",{key:I.id,class:"component-block"},[o.value.length>1?(d.openBlock(),d.createElementBlock("div",dE,d.toDisplayString(I.title),1)):d.createCommentVNode("",!0),d.createVNode(d.unref(Ae.Collapse),{activeKey:l.value,"onUpdate:activeKey":E[0]||(E[0]=M=>l.value=M),ghost:"","expand-icon-position":"end"},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(I.groups,M=>(d.openBlock(),d.createBlock(d.unref(Ae.CollapsePanel),{key:`${I.id}-${M.name}`,header:M.name},{default:d.withCtx(()=>[d.createVNode(d.unref(Ae.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(M.params,(k,S)=>(d.openBlock(),d.createBlock(d.unref(Ae.DescriptionsItem),{key:S,label:p(String(S))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(k),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))]),_:1},8,["spinning"])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-cd881bde"]]);class oc{viewer;Cesium;pickHandler=null;bimEntityId="";mapEntityId="";constructor(e,t){this.viewer=e,this.Cesium=t}removeMarker(e){if(!this.viewer)return;const t=e==="BIM"?this.bimEntityId:this.mapEntityId;t&&(this.viewer.entities.removeById(t),e==="BIM"?this.bimEntityId="":this.mapEntityId="")}clearMarkers(){this.removeMarker("BIM"),this.removeMarker("MAP")}addMarker(e,t){if(!this.viewer||!this.Cesium)return;this.removeMarker(e);const i=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=i:this.mapEntityId=i,this.viewer.entities.add({id:i,position:this.Cesium.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),point:{pixelSize:10,color:e==="BIM"?this.Cesium.Color.RED:this.Cesium.Color.ORANGE,outlineColor:this.Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`${e==="BIM"?"BIM":"地图"}标记点`,font:"14pt sans-serif",style:this.Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:this.Cesium.VerticalOrigin.BOTTOM,pixelOffset:new this.Cesium.Cartesian2(0,-10),fillColor:this.Cesium.Color.WHITE,outlineColor:this.Cesium.Color.BLACK,backgroundColor:new this.Cesium.Color(.1,.1,.1,.8),showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}})}registerPickHandler(e){this.destroyPickHandler(),!(!this.Cesium||!this.viewer)&&(this.pickHandler=new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.pickHandler.setInputAction(t=>{let i;try{i=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!i){const s=this.viewer.camera.getPickRay(t.position);i=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(i||(i=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),i){const s=this.Cesium.Cartographic.fromCartesian(i),o=this.Cesium.Math.toDegrees(s.longitude),r=this.Cesium.Math.toDegrees(s.latitude),l=s.height;e({longitude:o,latitude:r,height:l})}},this.Cesium.ScreenSpaceEventType.LEFT_CLICK,this.Cesium.KeyboardEventModifier.SHIFT))}destroyPickHandler(){this.pickHandler&&(this.pickHandler.destroy(),this.pickHandler=null)}calculateOffset(e,t){return{dLon:t.longitude-e.longitude,dLat:t.latitude-e.latitude,dHeight:t.height-e.height}}}const uE={class:"adjust-panel"},hE={class:"control-panel"},fE={class:"form-item"},pE={class:"radio-group"},gE={class:"form-item"},mE={class:"radio-group"},AE={class:"form-item"},yE={class:"value"},CE={class:"param-row"},EE={class:"param-row"},wE={class:"param-row"},bE={class:"param-row"},vE={class:"param-row"},IE={class:"param-row"},xE={class:"param-row"},BE={class:"button-grid"},SE={key:1,class:"pick-mode-ui"},ME={class:"form-item",style:{display:"block","margin-bottom":"15px"}},TE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},DE=["checked"],kE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},PE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},FE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},RE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},OE=["checked"],LE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},NE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},UE={class:"list-panel"},_E={class:"list-header"},QE={class:"col-check"},HE=["checked"],GE={class:"list-body"},YE={class:"col-check"},VE=["onUpdate:modelValue"],WE={class:"col-index"},zE=["title"],jE={class:"col-main"},$E=["checked","onChange"],Hn=Ue(d.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.computed({get:()=>i.open!==void 0?i.open:i.visible,set:O=>{s("update:visible",O),s("update:open",O)}}),r=d.inject("leitingMethods"),l=d.ref("BIM"),a=d.ref("param"),c=d.ref(""),u=d.ref([]),f=d.ref("BIM"),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=()=>(!A.value&&r?.value?.getViewer&&r?.value?.getCesium&&(A.value=new oc(r.value.getViewer(),r.value.getCesium())),A.value),g=()=>{C()?.clearMarkers(),p.value=null,h.value=null},y=(O,D)=>{O==="BIM"?p.value=D:h.value=D,C()?.addMarker(O,D),me.success(`${O==="BIM"?"BIM":"地图"}标记点已添加`)},E=()=>{C()?.registerPickHandler(O=>{y(f.value,O)})},I=()=>{C()?.destroyPickHandler()},M=()=>{if(!p.value||!h.value){me.warning("请先选择BIM标记点和地图标记点");return}if(!c.value){me.warning("请先选择主模型");return}const O=C();let D=0,_=0,Y=0;if(O){const{dLon:$,dLat:J,dHeight:ne}=O.calculateOffset(p.value,h.value);D=$,_=J,Y=ne}else D=h.value.longitude-p.value.longitude,_=h.value.latitude-p.value.latitude,Y=h.value.height-p.value.height;S.value.longitude+=D,S.value.latitude+=_,S.value.height+=Y,w(c.value,{longitude:S.value.longitude,latitude:S.value.latitude,height:S.value.height}),me.success("位置已调整")};d.watch(()=>a.value,O=>{O==="pick"?E():I()}),e({addMarker:y,setModelType:O=>{(O==="BIM"||O==="OSGB")&&(l.value=O)}});const S=d.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),x=d.computed(()=>{const O=u.value.find(D=>D.modelId===c.value);return O?O.modelName:""}),m=d.computed(()=>T.value.length>0&&T.value.every(O=>O.selected)),F=()=>{o.value=!1,s("close")},T=d.computed(()=>u.value.filter(O=>O.type===l.value)),P=O=>{const D=O.target.checked;T.value.forEach(_=>_.selected=D)},L=()=>{if(!r?.value)return;const O=r.value,D=O.getMapTileset?O.getMapTileset():{},_=[];if(Object.keys(D).forEach(Y=>{const J=D[Y].leiting||{};J.model&&_.push({modelId:J.model.modelId,modelName:J.model.modelName,selected:!1,formData:J.model.formData||{},dbName:J.model.dbName,url:J.model.url,type:J.model.type||"BIM"})}),u.value=_,_.length>0){const Y=O.getBIMmodelId?O.getBIMmodelId():"";Y&&_.find($=>$.modelId===Y)?N(Y):N(_[0].modelId),_.forEach($=>$.selected=!0)}},G=()=>{me.info("拖动右下角标,可显示模型列表",void 0,2)},N=O=>{c.value=O;const D=u.value.find(_=>_.modelId===O);D&&D.formData&&Object.keys(S.value).forEach(_=>{D.formData[_]!==void 0&&(S.value[_]=D.formData[_])})},b=O=>r?.value?.getMapTileset?r.value.getMapTileset()[O]:null,w=(O,D)=>{const _=b(O),Y=r.value.getCesium();if(_&&Y){if(_.leiting?.model){_.leiting.model.formData={..._.leiting.model.formData,...D};const $=u.value.find(J=>J.modelId===O);$&&($.formData=_.leiting.model.formData)}cr({Cesium:Y,tileset:_})}},v=O=>{if(!c.value)return;const D=S.value[O];w(c.value,{[O]:D})},B=O=>{const D=T.value.filter(J=>J.selected);if(D.length===0){me.warning("请先选择要调整的模型");return}const{lonlat:_,heightDistance:Y,rotation:$}=S.value;D.forEach(J=>{const ne={...J.formData};switch(O){case"north":ne.latitude+=_;break;case"south":ne.latitude-=_;break;case"east":ne.longitude+=_;break;case"west":ne.longitude-=_;break;case"up":ne.height+=Y;break;case"down":ne.height-=Y;break;case"rotateLeft":ne.totalRotation=(ne.totalRotation||0)+$;break;case"rotateRight":ne.totalRotation=(ne.totalRotation||0)-$;break}J.modelId===c.value&&(ne.lonlat=_,ne.heightDistance=Y,ne.rotation=$,Object.assign(S.value,ne)),w(J.modelId,ne)})},R=()=>{if(!c.value){me.warning("请先选择主模型");return}const O=b(c.value);if(!O||!r?.value?.getViewer)return;const D=r.value.getViewer(),_=r.value.getCesium(),Y=O.boundingSphere;D.camera.flyToBoundingSphere(Y,{offset:new _.HeadingPitchRange(0,_.Math.toRadians(-90),Y.radius*2),duration:1.5})},U=()=>{r?.value?.saveRegion?(r.value.saveRegion(u.value),s("save",d.unref(u))):(console.log("Save models:",u.value),me.warning("未找到保存接口,数据已打印控制台"))};return d.watch(()=>i.visible,O=>{O?(L(),G(),a.value==="pick"&&E()):(I(),g())}),d.onMounted(()=>{i.visible&&(L(),G(),a.value==="pick"&&E())}),(O,D)=>(d.openBlock(),d.createBlock(Re,{visible:o.value,title:"调整位置(调整前可选择正北俯视)","full-height":n.fullHeight,"onUpdate:visible":D[25]||(D[25]=_=>o.value=_),onClose:F,onSave:U},{default:d.withCtx(()=>[d.createElementVNode("div",uE,[d.createElementVNode("div",hE,[d.createElementVNode("div",fE,[D[26]||(D[26]=d.createElementVNode("label",null,"模型类型:",-1)),d.createElementVNode("div",pE,[d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="BIM"}),onClick:D[0]||(D[0]=_=>l.value="BIM")},"BIM模型",2),d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="OSGB"}),onClick:D[1]||(D[1]=_=>l.value="OSGB")},"倾斜摄影",2)])]),d.createElementVNode("div",gE,[D[27]||(D[27]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",mE,[d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="param"}),onClick:D[2]||(D[2]=_=>a.value="param")},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="pick"}),onClick:D[3]||(D[3]=_=>a.value="pick")},"地图点选",2)])]),d.createElementVNode("div",AE,[D[28]||(D[28]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",yE,d.toDisplayString(x.value||"未选择"),1)]),D[42]||(D[42]=d.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[D[36]||(D[36]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",CE,[D[29]||(D[29]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[4]||(D[4]=_=>S.value.longitude=_),onChange:D[5]||(D[5]=_=>v("longitude")),step:"0.000001"},null,544),[[d.vModelText,S.value.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",EE,[D[30]||(D[30]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[6]||(D[6]=_=>S.value.latitude=_),onChange:D[7]||(D[7]=_=>v("latitude")),step:"0.000001"},null,544),[[d.vModelText,S.value.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",wE,[D[31]||(D[31]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[8]||(D[8]=_=>S.value.height=_),onChange:D[9]||(D[9]=_=>v("height")),step:"0.1"},null,544),[[d.vModelText,S.value.height,void 0,{number:!0}]])]),d.createElementVNode("div",bE,[D[32]||(D[32]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[10]||(D[10]=_=>S.value.totalRotation=_),onChange:D[11]||(D[11]=_=>v("totalRotation")),step:"1"},null,544),[[d.vModelText,S.value.totalRotation,void 0,{number:!0}]])]),D[37]||(D[37]=d.createElementVNode("div",{class:"separator"},null,-1)),D[38]||(D[38]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",vE,[D[33]||(D[33]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[12]||(D[12]=_=>S.value.lonlat=_),step:"0.000001"},null,512),[[d.vModelText,S.value.lonlat,void 0,{number:!0}]])]),d.createElementVNode("div",IE,[D[34]||(D[34]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[13]||(D[13]=_=>S.value.heightDistance=_),step:"0.1"},null,512),[[d.vModelText,S.value.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",xE,[D[35]||(D[35]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[14]||(D[14]=_=>S.value.rotation=_),step:"1"},null,512),[[d.vModelText,S.value.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",BE,[d.createElementVNode("button",{onClick:D[15]||(D[15]=_=>B("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:D[16]||(D[16]=_=>B("north"))},"北移"),d.createElementVNode("button",{onClick:D[17]||(D[17]=_=>B("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:D[18]||(D[18]=_=>B("west"))},"西移"),d.createElementVNode("button",{onClick:D[19]||(D[19]=_=>B("south"))},"南移"),d.createElementVNode("button",{onClick:D[20]||(D[20]=_=>B("east"))},"东移"),d.createElementVNode("button",{onClick:D[21]||(D[21]=_=>B("up"))},"上移"),d.createElementVNode("button",{onClick:D[22]||(D[22]=_=>B("down"))},"下移"),d.createElementVNode("button",{onClick:R,class:"primary-btn"},"正北俯视"),d.createElementVNode("button",{onClick:U,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(d.openBlock(),d.createElementBlock("div",SE,[d.createElementVNode("div",ME,[d.createElementVNode("div",TE,[d.createElementVNode("div",{onClick:D[23]||(D[23]=_=>f.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="BIM",style:{"margin-right":"5px"}},null,8,DE),D[39]||(D[39]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),p.value?(d.openBlock(),d.createElementBlock("div",kE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(p.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(p.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",PE,"未选择"))])]),d.createElementVNode("div",FE,[d.createElementVNode("div",RE,[d.createElementVNode("div",{onClick:D[24]||(D[24]=_=>f.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="MAP",style:{"margin-right":"5px"}},null,8,OE),D[40]||(D[40]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),h.value?(d.openBlock(),d.createElementBlock("div",LE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(h.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(h.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",NE,"未选择"))])]),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:M},"调整位置"),d.createElementVNode("button",{onClick:U},"保存")]),D[41]||(D[41]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):d.createCommentVNode("",!0)]),d.createElementVNode("div",UE,[d.createElementVNode("div",_E,[d.createElementVNode("div",QE,[d.createElementVNode("input",{type:"checkbox",checked:m.value,onChange:P},null,40,HE)]),D[43]||(D[43]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),D[44]||(D[44]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),D[45]||(D[45]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",GE,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(T.value,(_,Y)=>(d.openBlock(),d.createElementBlock("div",{key:_.modelId,class:d.normalizeClass(["list-item",{active:_.modelId===c.value}])},[d.createElementVNode("div",YE,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":$=>_.selected=$},null,8,VE),[[d.vModelCheckbox,_.selected]])]),d.createElementVNode("div",WE,d.toDisplayString(Y+1),1),d.createElementVNode("div",{class:"col-name",title:_.modelName},d.toDisplayString(_.modelName),9,zE),d.createElementVNode("div",jE,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:_.modelId===c.value,onChange:$=>N(_.modelId)},null,40,$E)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-3bfda484"]]);function Fi(){return Fi=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Fi.apply(null,arguments)}const KE={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},qE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},rc={lang:Fi({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},KE),timePickerLocale:Fi({},qE)};rc.lang.ok="确定";var Ri={exports:{}},XE=Ri.exports,ac;function lc(){return ac||(ac=1,(function(n,e){(function(t,i){n.exports=i()})(XE,(function(){var t=1e3,i=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",c="day",u="week",f="month",p="quarter",h="year",A="date",C="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var b=["th","st","nd","rd"],w=N%100;return"["+N+(b[(w-20)%10]||b[w]||b[0])+"]"}},I=function(N,b,w){var v=String(N);return!v||v.length>=b?N:""+Array(b+1-v.length).join(w)+N},M={s:I,z:function(N){var b=-N.utcOffset(),w=Math.abs(b),v=Math.floor(w/60),B=w%60;return(b<=0?"+":"-")+I(v,2,"0")+":"+I(B,2,"0")},m:function N(b,w){if(b.date()<w.date())return-N(w,b);var v=12*(w.year()-b.year())+(w.month()-b.month()),B=b.clone().add(v,f),R=w-B<0,U=b.clone().add(v+(R?-1:1),f);return+(-(v+(w-B)/(R?B-U:U-B))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:h,w:u,d:c,D:A,h:a,m:l,s:r,ms:o,Q:p}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},k="en",S={};S[k]=E;var x="$isDayjsObject",m=function(N){return N instanceof L||!(!N||!N[x])},F=function N(b,w,v){var B;if(!b)return k;if(typeof b=="string"){var R=b.toLowerCase();S[R]&&(B=R),w&&(S[R]=w,B=R);var U=b.split("-");if(!B&&U.length>1)return N(U[0])}else{var O=b.name;S[O]=b,B=O}return!v&&B&&(k=B),B||!v&&k},T=function(N,b){if(m(N))return N.clone();var w=typeof b=="object"?b:{};return w.date=N,w.args=arguments,new L(w)},P=M;P.l=F,P.i=m,P.w=function(N,b){return T(N,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var L=(function(){function N(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[x]=!0}var b=N.prototype;return b.parse=function(w){this.$d=(function(v){var B=v.date,R=v.utc;if(B===null)return new Date(NaN);if(P.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var U=B.match(g);if(U){var O=U[2]-1||0,D=(U[7]||"0").substring(0,3);return R?new Date(Date.UTC(U[1],O,U[3]||1,U[4]||0,U[5]||0,U[6]||0,D)):new Date(U[1],O,U[3]||1,U[4]||0,U[5]||0,U[6]||0,D)}}return new Date(B)})(w),this.init()},b.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},b.$utils=function(){return P},b.isValid=function(){return this.$d.toString()!==C},b.isSame=function(w,v){var B=T(w);return this.startOf(v)<=B&&B<=this.endOf(v)},b.isAfter=function(w,v){return T(w)<this.startOf(v)},b.isBefore=function(w,v){return this.endOf(v)<T(w)},b.$g=function(w,v,B){return P.u(w)?this[v]:this.set(B,w)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(w,v){var B=this,R=!!P.u(v)||v,U=P.p(w),O=function(V,j){var q=P.w(B.$u?Date.UTC(B.$y,j,V):new Date(B.$y,j,V),B);return R?q:q.endOf(c)},D=function(V,j){return P.w(B.toDate()[V].apply(B.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(j)),B)},_=this.$W,Y=this.$M,$=this.$D,J="set"+(this.$u?"UTC":"");switch(U){case h:return R?O(1,0):O(31,11);case f:return R?O(1,Y):O(0,Y+1);case u:var ne=this.$locale().weekStart||0,re=(_<ne?_+7:_)-ne;return O(R?$-re:$+(6-re),Y);case c:case A:return D(J+"Hours",0);case a:return D(J+"Minutes",1);case l:return D(J+"Seconds",2);case r:return D(J+"Milliseconds",3);default:return this.clone()}},b.endOf=function(w){return this.startOf(w,!1)},b.$set=function(w,v){var B,R=P.p(w),U="set"+(this.$u?"UTC":""),O=(B={},B[c]=U+"Date",B[A]=U+"Date",B[f]=U+"Month",B[h]=U+"FullYear",B[a]=U+"Hours",B[l]=U+"Minutes",B[r]=U+"Seconds",B[o]=U+"Milliseconds",B)[R],D=R===c?this.$D+(v-this.$W):v;if(R===f||R===h){var _=this.clone().set(A,1);_.$d[O](D),_.init(),this.$d=_.set(A,Math.min(this.$D,_.daysInMonth())).$d}else O&&this.$d[O](D);return this.init(),this},b.set=function(w,v){return this.clone().$set(w,v)},b.get=function(w){return this[P.p(w)]()},b.add=function(w,v){var B,R=this;w=Number(w);var U=P.p(v),O=function(Y){var $=T(R);return P.w($.date($.date()+Math.round(Y*w)),R)};if(U===f)return this.set(f,this.$M+w);if(U===h)return this.set(h,this.$y+w);if(U===c)return O(1);if(U===u)return O(7);var D=(B={},B[l]=i,B[a]=s,B[r]=t,B)[U]||1,_=this.$d.getTime()+w*D;return P.w(_,this)},b.subtract=function(w,v){return this.add(-1*w,v)},b.format=function(w){var v=this,B=this.$locale();if(!this.isValid())return B.invalidDate||C;var R=w||"YYYY-MM-DDTHH:mm:ssZ",U=P.z(this),O=this.$H,D=this.$m,_=this.$M,Y=B.weekdays,$=B.months,J=B.meridiem,ne=function(j,q,se,oe){return j&&(j[q]||j(v,R))||se[q].slice(0,oe)},re=function(j){return P.s(O%12||12,j,"0")},V=J||function(j,q,se){var oe=j<12?"AM":"PM";return se?oe.toLowerCase():oe};return R.replace(y,(function(j,q){return q||(function(se){switch(se){case"YY":return String(v.$y).slice(-2);case"YYYY":return P.s(v.$y,4,"0");case"M":return _+1;case"MM":return P.s(_+1,2,"0");case"MMM":return ne(B.monthsShort,_,$,3);case"MMMM":return ne($,_);case"D":return v.$D;case"DD":return P.s(v.$D,2,"0");case"d":return String(v.$W);case"dd":return ne(B.weekdaysMin,v.$W,Y,2);case"ddd":return ne(B.weekdaysShort,v.$W,Y,3);case"dddd":return Y[v.$W];case"H":return String(O);case"HH":return P.s(O,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return V(O,D,!0);case"A":return V(O,D,!1);case"m":return String(D);case"mm":return P.s(D,2,"0");case"s":return String(v.$s);case"ss":return P.s(v.$s,2,"0");case"SSS":return P.s(v.$ms,3,"0");case"Z":return U}return null})(j)||U.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(w,v,B){var R,U=this,O=P.p(v),D=T(w),_=(D.utcOffset()-this.utcOffset())*i,Y=this-D,$=function(){return P.m(U,D)};switch(O){case h:R=$()/12;break;case f:R=$();break;case p:R=$()/3;break;case u:R=(Y-_)/6048e5;break;case c:R=(Y-_)/864e5;break;case a:R=Y/s;break;case l:R=Y/i;break;case r:R=Y/t;break;default:R=Y}return B?R:P.a(R)},b.daysInMonth=function(){return this.endOf(f).$D},b.$locale=function(){return S[this.$L]},b.locale=function(w,v){if(!w)return this.$L;var B=this.clone(),R=F(w,v,!0);return R&&(B.$L=R),B},b.clone=function(){return P.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},N})(),G=L.prototype;return T.prototype=G,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",c],["$M",f],["$y",h],["$D",A]].forEach((function(N){G[N[1]]=function(b){return this.$g(b,N[0],N[1])}})),T.extend=function(N,b){return N.$i||(N(b,L,T),N.$i=!0),T},T.locale=F,T.isDayjs=m,T.unix=function(N){return T(1e3*N)},T.en=S[k],T.Ls=S,T.p={},T}))})(Ri)),Ri.exports}var JE=lc();const ze=tn(JE);var Oi={exports:{}},ZE=Oi.exports,cc;function ew(){return cc||(cc=1,(function(n,e){(function(t,i){n.exports=i(lc())})(ZE,(function(t){function i(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=i(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(r,l){return l==="W"?r+"周":r+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(r,l){var a=100*r+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return s.default.locale(o,null,!0),o}))})(Oi)),Oi.exports}ew();var Li={exports:{}},tw=Li.exports,dc;function nw(){return dc||(dc=1,(function(n,e){(function(t,i){n.exports=i()})(tw,(function(){return function(t,i,s){var o=i.prototype,r=function(f){return f&&(f.indexOf?f:f.s)},l=function(f,p,h,A,C){var g=f.name?f:f.$locale(),y=r(g[p]),E=r(g[h]),I=y||E.map((function(k){return k.slice(0,A)}));if(!C)return I;var M=g.weekStart;return I.map((function(k,S){return I[(S+(M||0))%7]}))},a=function(){return s.Ls[s.locale()]},c=function(f,p){return f.formats[p]||(function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(A,C,g){return C||g.slice(1)}))})(f.formats[p.toUpperCase()])},u=function(){var f=this;return{months:function(p){return p?p.format("MMMM"):l(f,"months")},monthsShort:function(p){return p?p.format("MMM"):l(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):l(f,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):l(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):l(f,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return c(f.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var f=a();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(p){return c(f,p)},meridiem:f.meridiem,ordinal:f.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(f){return l(a(),"weekdays",null,null,f)},s.weekdaysShort=function(f){return l(a(),"weekdaysShort","weekdays",3,f)},s.weekdaysMin=function(f){return l(a(),"weekdaysMin","weekdays",2,f)}}}))})(Li)),Li.exports}var iw=nw();const sw=tn(iw);var Ni={exports:{}},ow=Ni.exports,uc;function rw(){return uc||(uc=1,(function(n,e){(function(t,i){n.exports=i()})(ow,(function(){return function(t,i){i.prototype.weekday=function(s){var o=this.$locale().weekStart||0,r=this.$W,l=(r<o?r+7:r)-o;return this.$utils().u(s)?l:this.subtract(l,"day").add(s,"day")}}}))})(Ni)),Ni.exports}var aw=rw();const lw=tn(aw);var Ui={exports:{}},cw=Ui.exports,hc;function dw(){return hc||(hc=1,(function(n,e){(function(t,i){n.exports=i()})(cw,(function(){var t="week",i="year";return function(s,o,r){var l=o.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),f=r(this).endOf(t);if(u.isBefore(f))return 1}var p=r(this).startOf(i).date(c).startOf(t).subtract(1,"millisecond"),h=this.diff(p,t,!0);return h<0?r(this).startOf("week").week():Math.ceil(h)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Ui)),Ui.exports}var uw=dw();const hw=tn(uw);var _i={exports:{}},fw=_i.exports,fc;function pw(){return fc||(fc=1,(function(n,e){(function(t,i){n.exports=i()})(fw,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},c=function(g){return(g=+g)+(g>68?1900:2e3)},u=function(g){return function(y){this[g]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var E=y.match(/([+-]|\d\d)/g),I=60*E[1]+(+E[2]||0);return I===0?0:E[0]==="+"?-I:I})(g)}],p=function(g){var y=a[g];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(g,y){var E,I=a.meridiem;if(I){for(var M=1;M<=24;M+=1)if(g.indexOf(I(M,0,y))>-1){E=M>12;break}}else E=g===(y?"pm":"PM");return E},A={A:[l,function(g){this.afternoon=h(g,!1)}],a:[l,function(g){this.afternoon=h(g,!0)}],Q:[s,function(g){this.month=3*(g-1)+1}],S:[s,function(g){this.milliseconds=100*+g}],SS:[o,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(g){var y=a.ordinal,E=g.match(/\d+/);if(this.day=E[0],y)for(var I=1;I<=31;I+=1)y(I).replace(/\[|\]/g,"")===g&&(this.day=I)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(g){var y=p("months"),E=(p("monthsShort")||y.map((function(I){return I.slice(0,3)}))).indexOf(g)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[l,function(g){var y=p("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(g){this.year=c(g)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function C(g){var y,E;y=g,E=a&&a.formats;for(var I=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(T,P,L){var G=L&&L.toUpperCase();return P||E[L]||t[L]||E[G].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,b,w){return b||w.slice(1)}))}))).match(i),M=I.length,k=0;k<M;k+=1){var S=I[k],x=A[S],m=x&&x[0],F=x&&x[1];I[k]=F?{regex:m,parser:F}:S.replace(/^\[|\]$/g,"")}return function(T){for(var P={},L=0,G=0;L<M;L+=1){var N=I[L];if(typeof N=="string")G+=N.length;else{var b=N.regex,w=N.parser,v=T.slice(G),B=b.exec(v)[0];w.call(P,B),T=T.replace(B,"")}}return(function(R){var U=R.afternoon;if(U!==void 0){var O=R.hours;U?O<12&&(R.hours+=12):O===12&&(R.hours=0),delete R.afternoon}})(P),P}}return function(g,y,E){E.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(c=g.parseTwoDigitYear);var I=y.prototype,M=I.parse;I.parse=function(k){var S=k.date,x=k.utc,m=k.args;this.$u=x;var F=m[1];if(typeof F=="string"){var T=m[2]===!0,P=m[3]===!0,L=T||P,G=m[2];P&&(G=m[2]),a=this.$locale(),!T&&G&&(a=E.Ls[G]),this.$d=(function(v,B,R,U){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*v);var O=C(B)(v),D=O.year,_=O.month,Y=O.day,$=O.hours,J=O.minutes,ne=O.seconds,re=O.milliseconds,V=O.zone,j=O.week,q=new Date,se=Y||(D||_?1:q.getDate()),oe=D||q.getFullYear(),ae=0;D&&!_||(ae=_>0?_-1:q.getMonth());var Ee,le=$||0,Pe=J||0,ct=ne||0,$e=re||0;return V?new Date(Date.UTC(oe,ae,se,le,Pe,ct,$e+60*V.offset*1e3)):R?new Date(Date.UTC(oe,ae,se,le,Pe,ct,$e)):(Ee=new Date(oe,ae,se,le,Pe,ct,$e),j&&(Ee=U(Ee).week(j).toDate()),Ee)}catch{return new Date("")}})(S,F,x,E),this.init(),G&&G!==!0&&(this.$L=this.locale(G).$L),L&&S!=this.format(F)&&(this.$d=new Date("")),a={}}else if(F instanceof Array)for(var N=F.length,b=1;b<=N;b+=1){m[1]=F[b-1];var w=E.apply(this,m);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}b===N&&(this.$d=new Date(""))}else M.call(this,k)}}}))})(_i)),_i.exports}var gw=pw();const mw=tn(gw),Aw={class:"setting-panel"},yw={class:"tabs-header"},Cw={class:"tab-content"},Ew={key:0,class:"section"},ww={class:"setting-item"},bw={class:"setting-item"},vw={class:"setting-item"},Iw={key:1,class:"section"},xw={class:"tabs-header",style:{"margin-bottom":"8px"}},Bw={key:0},Sw={class:"setting-item column"},Mw={class:"setting-item column"},Tw={class:"setting-item"},Dw={key:1},kw={class:"setting-item column"},Pw={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},Fw={class:"search-box"},Rw={key:2,class:"section"},Ow={class:"setting-item"},Lw={key:0,class:"setting-item column"},Nw={class:"sub-label"},Uw={class:"setting-item"},_w={class:"setting-item"},Qw={class:"setting-item column"},Hw={class:"setting-item column"},Gw={class:"sub-label"},Yw={class:"setting-item column"},Vw={class:"sub-label"},Ww={class:"setting-item column"},zw={class:"sub-label"},jw={class:"setting-item column"},$w={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},Kw=["onClick","title"],qw={style:{display:"flex",gap:"8px","align-items":"center"}},Xw={key:3,class:"section"},Jw={class:"setting-item"},Zw={class:"setting-item column"},Gn=Ue(d.defineComponent({__name:"LeitingSetting",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean,default:!1},tiandituToken:{type:String,default:""},initialConfig:{type:Object,default:()=>({})}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){ze.locale("zh-cn"),ze.extend(sw),ze.extend(lw),ze.extend(hw),ze.extend(mw);const t=Ae.Switch,i=Ae.Radio.Group,s=Ae.Radio,o=Ae.Input,r=Ae.Slider,l=Ae.Select,a=Ae.Select.Option,c=Ae.DatePicker,u=n,f=e,p=d.inject("leitingMethods"),h=d.computed({get:()=>u.open!==void 0?u.open:u.visible,set:b=>{f("update:visible",b),f("update:open",b)}}),A=d.ref("GIS"),C=d.reactive({globe:!1,terrain:!1,depthTest:!1}),g=d.reactive({provider:"tianditu",tianditu:{token:"c25f14fb6bd4397cf8fe45144ff768d6",layerType:"img_w",showLabel:!1},arcgis:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},baseMap:"tianditu"}),y=d.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:ze("2025-06-22 10:00"),brightness:1.5,contrast:1,saturation:1,backgroundColor:"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)"}),E=d.reactive({collision:!1,habit:0}),I=b=>{b&&(b.globe!==void 0&&(C.globe=b.globe),b.terrain!==void 0&&(C.terrain=b.terrain),b.depthTest!==void 0&&(C.depthTest=b.depthTest),b.mapProvider!==void 0&&(g.provider=b.mapProvider),b.tiandituLayerType!==void 0&&(g.tianditu.layerType=b.tiandituLayerType),b.tiandituShowLabel!==void 0&&(g.tianditu.showLabel=b.tiandituShowLabel),b.arcgisUrl!==void 0&&(g.arcgis.url=b.arcgisUrl),b.shadows!==void 0&&(y.shadows=b.shadows),b.shadowDarkness!==void 0&&(y.shadowDarkness=b.shadowDarkness),b.environmentMap!==void 0&&(y.environmentMap=b.environmentMap),b.ambientOcclusion!==void 0&&(y.ambientOcclusion=b.ambientOcclusion),b.time!==void 0&&(typeof b.time=="number"?y.time=ze().startOf("day").add(b.time,"hour"):y.time=ze(b.time)),b.brightness!==void 0&&(y.brightness=b.brightness),b.contrast!==void 0&&(y.contrast=b.contrast),b.saturation!==void 0&&(y.saturation=b.saturation),b.backgroundColor!==void 0&&(y.backgroundColor=b.backgroundColor),b.collision!==void 0&&(E.collision=b.collision),b.mouseHabit!==void 0&&(E.habit=b.mouseHabit))};d.watch(()=>u.initialConfig,b=>{I(b)},{deep:!0,immediate:!0});const M=["linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)","linear-gradient(0deg, #0f2027 0%, #203a43 50%, #2c5364 100%)","linear-gradient(0deg, #cfd9df 0%, #e2ebf0 100%)"],k=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],S=()=>{const b=g.provider,w={};b==="tianditu"?(w.token=g.tianditu.token,w.layerType=g.tianditu.layerType,w.showAnnotation=g.tianditu.showLabel):b==="arcgis"&&(w.url=g.arcgis.url),p.value?.changeBaseMap?.(b,w)};d.watch(()=>g.provider,S),d.watch(()=>g.tianditu.layerType,S),d.watch(()=>g.tianditu.showLabel,S),d.watch(()=>g.tianditu.token,hs(S,1e3)),d.watch(()=>g.arcgis.url,hs(S,1e3)),d.onMounted(()=>{u.tiandituToken&&(g.tianditu.token=u.tiandituToken)}),d.watch(()=>C.globe,b=>p.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>C.terrain,b=>p.value?.setTerrainEnable?.(b)),d.watch(()=>C.depthTest,b=>p.value?.setDepthTestEnable?.(b)),d.watch(()=>p?.value,b=>{if(b){if(b.getConfigure=()=>({globe:C.globe,terrain:C.terrain,depthTest:C.depthTest,mapProvider:g.provider,tiandituLayerType:g.tianditu.layerType,tiandituShowLabel:g.tianditu.showLabel,arcgisUrl:g.arcgis.url,shadows:y.shadows,shadowDarkness:y.shadowDarkness,environmentMap:y.environmentMap,ambientOcclusion:y.ambientOcclusion,time:ze.isDayjs(y.time)?y.time.format("YYYY-MM-DD HH:mm"):y.time,brightness:y.brightness,contrast:y.contrast,saturation:y.saturation,backgroundColor:y.backgroundColor,collision:E.collision,mouseHabit:E.habit}),b.setConfigure=w=>{I(w)},b.setBackgroundColor&&y.backgroundColor&&b.setBackgroundColor(y.backgroundColor),b.setGlobeEnvironmentVisible&&b.setGlobeEnvironmentVisible(C.globe),b.setShadowsEnable&&b.setShadowsEnable(y.shadows),b.setShadowDarkness&&b.setShadowDarkness(y.shadowDarkness),b.setEnvironmentMapEnable&&b.setEnvironmentMapEnable(y.environmentMap),b.setAmbientOcclusion&&b.setAmbientOcclusion(y.ambientOcclusion),b.setTime){const w=ze.isDayjs(y.time)?y.time.toDate():new Date;b.setTime(w)}b.setModelBrightness&&b.setModelBrightness(y.brightness),b.setCollisionDetection&&b.setCollisionDetection(E.collision),b.setMouseHabit&&b.setMouseHabit(E.habit),b.changeBaseMap&&g.baseMap&&b.changeBaseMap(g.baseMap,{token:g.tianditu.token,layerType:g.tianditu.layerType,showAnnotation:g.tianditu.showLabel,url:g.arcgis.url})}},{immediate:!0});const x=d.computed({get:()=>{const b=y.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(b)?b:"#ffffff"},set:b=>{y.backgroundColor=b}}),m=d.ref(""),F=d.ref(!1),T=d.ref([]);d.watch(()=>C.globe,b=>p.value?.setGlobeEnvironmentVisible?.(b)),d.watch(()=>C.terrain,b=>p.value?.setTerrainEnable?.(b)),d.watch(()=>g.baseMap,b=>{p.value?.changeBaseMap?.(b,{token:u.tiandituToken})}),d.watch(()=>y.shadows,b=>p.value?.setShadowsEnable?.(b)),d.watch(()=>y.shadowDarkness,b=>p.value?.setShadowDarkness?.(b)),d.watch(()=>y.environmentMap,b=>p.value?.setEnvironmentMapEnable?.(b)),d.watch(()=>y.ambientOcclusion,b=>p.value?.setAmbientOcclusion?.(b)),d.watch(()=>y.time,b=>{const w=ze.isDayjs(b)?b.toDate():new Date;p.value?.setTime?.(w)}),d.watch(()=>[y.brightness,y.contrast,y.saturation],([b,w,v])=>{const B=p.value;B?.setModelColorAdjustment?B.setModelColorAdjustment({brightness:b,contrast:w,saturation:v}):B?.setModelBrightness?.(b)}),d.watch(()=>y.backgroundColor,b=>{if(p.value?.setBackgroundColor)p.value.setBackgroundColor(b);else{const w=document.querySelector(".cesium-viewer");w&&(w.style.background=b)}}),d.watch(()=>E.collision,b=>p.value?.setCollisionDetection?.(b)),d.watch(()=>E.habit,b=>p.value?.setMouseHabit?.(b));const P=b=>{if(b?.pois&&Array.isArray(b.pois)&&b.pois.length>0){const w=b.pois[0],v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}if(b?.area&&b.area.lonlat){const w=b.area,v=w.lonlat.split(/[, ]/).map(Number);if(v.length>=2&&!isNaN(v[0])&&!isNaN(v[1]))return{name:w.name,lon:v[0],lat:v[1],raw:w}}return null},G=hs(async()=>{const b=(m.value||"").trim();if(!b)return;const w=u.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";F.value=!0,T.value=[];try{if(p.value?.searchLocation){const v=await p.value.searchLocation(b,w),B=P(v);B&&(T.value=[B],me.success(`找到:${B.name||""}`),p.value.flyTo(B.lon,B.lat,5e3))}else{const B=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:b,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(w)}`,R=await fetch(B);if(!R.ok)throw new Error(`HTTP ${R.status}`);const U=await R.json(),O=P(U);O&&(T.value=[O],me.success(`找到:${O.name||""}`),p.value?.flyTo?.(O.lon,O.lat,5e3))}}catch(v){console.error("tianditu search error",v)}finally{F.value=!1}},800);d.watch(m,()=>{G()});const N=()=>{h.value=!1,f("close")};return d.onMounted(()=>{}),(b,w)=>(d.openBlock(),d.createBlock(Re,{visible:h.value,title:"设置","full-height":n.fullHeight,onClose:N,"onUpdate:visible":w[26]||(w[26]=v=>h.value=v)},{default:d.withCtx(()=>[d.createElementVNode("div",Aw,[d.createElementVNode("div",yw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="GIS"}]),onClick:w[0]||(w[0]=v=>A.value="GIS")},"GIS",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MAP"}]),onClick:w[1]||(w[1]=v=>A.value="MAP")},"地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="RENDER"}]),onClick:w[2]||(w[2]=v=>A.value="RENDER")},"渲染",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MOUSE"}]),onClick:w[3]||(w[3]=v=>A.value="MOUSE")},"鼠标",2)]),d.createElementVNode("div",Cw,[A.value==="GIS"?(d.openBlock(),d.createElementBlock("div",Ew,[d.createElementVNode("div",ww,[w[27]||(w[27]=d.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),d.createVNode(d.unref(t),{checked:C.globe,"onUpdate:checked":w[4]||(w[4]=v=>C.globe=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",bw,[w[28]||(w[28]=d.createElementVNode("span",null,"地形 (高程)",-1)),d.createVNode(d.unref(t),{checked:C.terrain,"onUpdate:checked":w[5]||(w[5]=v=>C.terrain=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",vw,[w[29]||(w[29]=d.createElementVNode("span",null,"地形遮挡",-1)),d.createVNode(d.unref(t),{checked:C.depthTest,"onUpdate:checked":w[6]||(w[6]=v=>C.depthTest=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),A.value==="MAP"?(d.openBlock(),d.createElementBlock("div",Iw,[d.createElementVNode("div",xw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:g.provider==="tianditu"}]),onClick:w[7]||(w[7]=v=>g.provider="tianditu")},"天地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:g.provider==="arcgis"}]),onClick:w[8]||(w[8]=v=>g.provider="arcgis")},"ArcGIS",2)]),g.provider==="tianditu"?(d.openBlock(),d.createElementBlock("div",Bw,[d.createElementVNode("div",Sw,[w[30]||(w[30]=d.createElementVNode("div",{class:"sub-label"},"Token",-1)),d.createVNode(d.unref(o),{value:g.tianditu.token,"onUpdate:value":w[9]||(w[9]=v=>g.tianditu.token=v),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),d.createElementVNode("div",Mw,[w[31]||(w[31]=d.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),d.createVNode(d.unref(l),{value:g.tianditu.layerType,"onUpdate:value":w[10]||(w[10]=v=>g.tianditu.layerType=v),size:"small",style:{width:"100%"}},{default:d.withCtx(()=>[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(k,v=>d.createVNode(d.unref(a),{key:v.value,value:v.value},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(v.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),d.createElementVNode("div",Tw,[w[32]||(w[32]=d.createElementVNode("span",null,"叠加注记",-1)),d.createVNode(d.unref(t),{checked:g.tianditu.showLabel,"onUpdate:checked":w[11]||(w[11]=v=>g.tianditu.showLabel=v),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),g.provider==="arcgis"?(d.openBlock(),d.createElementBlock("div",Dw,[d.createElementVNode("div",kw,[w[33]||(w[33]=d.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),d.createVNode(d.unref(o),{value:g.arcgis.url,"onUpdate:value":w[12]||(w[12]=v=>g.arcgis.url=v),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):d.createCommentVNode("",!0),d.createElementVNode("div",Pw,[w[34]||(w[34]=d.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),d.createElementVNode("div",Fw,[d.createVNode(d.unref(o),{value:m.value,"onUpdate:value":w[13]||(w[13]=v=>m.value=v),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="RENDER"?(d.openBlock(),d.createElementBlock("div",Rw,[d.createElementVNode("div",Ow,[w[35]||(w[35]=d.createElementVNode("span",null,"阴影",-1)),d.createVNode(d.unref(t),{checked:y.shadows,"onUpdate:checked":w[14]||(w[14]=v=>y.shadows=v),size:"small"},null,8,["checked"])]),y.shadows?(d.openBlock(),d.createElementBlock("div",Lw,[d.createElementVNode("div",Nw,"阴影暗度 ("+d.toDisplayString(y.shadowDarkness.toFixed(2))+")",1),d.createVNode(d.unref(r),{value:y.shadowDarkness,"onUpdate:value":w[15]||(w[15]=v=>y.shadowDarkness=v),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Uw,[w[36]||(w[36]=d.createElementVNode("span",null,"环境贴图 (HDR)",-1)),d.createVNode(d.unref(t),{checked:y.environmentMap,"onUpdate:checked":w[16]||(w[16]=v=>y.environmentMap=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",_w,[w[37]||(w[37]=d.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),d.createVNode(d.unref(t),{checked:y.ambientOcclusion,"onUpdate:checked":w[17]||(w[17]=v=>y.ambientOcclusion=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Qw,[w[38]||(w[38]=d.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),d.createVNode(d.unref(c),{value:y.time,"onUpdate:value":w[18]||(w[18]=v=>y.time=v),"show-time":"",locale:d.unref(rc),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),d.createElementVNode("div",Hw,[d.createElementVNode("div",Gw,"模型亮度 ("+d.toDisplayString(y.brightness.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.brightness,"onUpdate:value":w[19]||(w[19]=v=>y.brightness=v),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Yw,[d.createElementVNode("div",Vw,"模型对比度 ("+d.toDisplayString(y.contrast.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.contrast,"onUpdate:value":w[20]||(w[20]=v=>y.contrast=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Ww,[d.createElementVNode("div",zw,"模型饱和度 ("+d.toDisplayString(y.saturation.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.saturation,"onUpdate:value":w[21]||(w[21]=v=>y.saturation=v),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",jw,[w[39]||(w[39]=d.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),d.createElementVNode("div",$w,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(M,(v,B)=>d.createElementVNode("div",{key:B,style:d.normalizeStyle({background:v,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:R=>y.backgroundColor=v,title:"预设 "+(B+1)},null,12,Kw)),64))]),d.createElementVNode("div",qw,[d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":w[22]||(w[22]=v=>x.value=v),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[d.vModelText,x.value]]),d.createVNode(d.unref(o),{value:y.backgroundColor,"onUpdate:value":w[23]||(w[23]=v=>y.backgroundColor=v),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="MOUSE"?(d.openBlock(),d.createElementBlock("div",Xw,[d.createElementVNode("div",Jw,[w[40]||(w[40]=d.createElementVNode("span",null,"碰撞检测",-1)),d.createVNode(d.unref(t),{checked:E.collision,"onUpdate:checked":w[24]||(w[24]=v=>E.collision=v),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Zw,[w[43]||(w[43]=d.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),d.createVNode(d.unref(i),{value:E.habit,"onUpdate:value":w[25]||(w[25]=v=>E.habit=v),size:"small"},{default:d.withCtx(()=>[d.createVNode(d.unref(s),{value:0},{default:d.withCtx(()=>[...w[41]||(w[41]=[d.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),d.createVNode(d.unref(s),{value:1},{default:d.withCtx(()=>[...w[42]||(w[42]=[d.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):d.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-1ed17be9"]]),eb={class:"cad-layer-panel"},tb={class:"layer-list-container"},nb={class:"list-header"},ib={class:"col-check"},sb=["checked"],ob={class:"list-body"},rb={class:"col-check"},ab=["checked","onChange"],lb={class:"col-index"},cb=["title"],db={class:"col-color"},ub=["value"],hb={key:0,class:"empty-text"},fb=Ue(d.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(""),r=d.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(E=>({modelId:E.modelId,modelName:E.modelName}))||[])},a=d.computed(()=>r.value.map(E=>({value:E.modelId,label:E.modelName}))),c=d.ref([]),u=d.ref([]),f=d.computed(()=>c.value.length>0&&u.value.length===c.value.length),p=({modelId:E})=>{if(c.value=[],u.value=[],s.value&&s.value.getDxfLayers){const I=s.value.getDxfLayers({modelId:E});I&&Object.keys(I).forEach((M,k)=>{I[M].length&&(c.value.push({index:k+1,layerName:M,layerColor:I[M][0].color||"#ffffff",key:M}),u.value.push(M))})}},h=E=>{o.value=E,p({modelId:E})},A=E=>{E.target.checked?u.value=c.value.map(M=>M.key):u.value=[],g()},C=(E,I)=>{I.target.checked?u.value.includes(E)||u.value.push(E):u.value=u.value.filter(k=>k!==E),g()},g=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:u.value}),s.value.getDxfLayers)){const E=s.value.getDxfLayers({modelId:o.value});if(E){const I=Object.keys(E).filter(M=>!u.value.includes(M));s.value.showDxfLayer({modelId:o.value,show:!1,layers:I})}}},y=()=>{i("update:visible",!1),i("handleCloseCardByCadCard")};return d.watch(()=>t.visible,E=>{E&&(l(),t.currentModelId?(o.value=t.currentModelId,p({modelId:t.currentModelId})):a.value.length>0&&(o.value=a.value[0]?.value,p({modelId:o.value})))}),d.watch(()=>t.currentModelId,E=>{E&&t.visible&&(o.value=E,p({modelId:E}))}),(E,I)=>(d.openBlock(),d.createBlock(Re,{visible:n.visible,title:"CAD图层","onUpdate:visible":I[3]||(I[3]=M=>E.$emit("update:visible",M)),onClose:y,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":d.withCtx(()=>[d.createElementVNode("div",{class:"header-select-container",onMousedown:I[2]||(I[2]=d.withModifiers(()=>{},["stop"]))},[I[4]||(I[4]=d.createElementVNode("span",{class:"header-label"},"图纸:",-1)),d.createVNode(d.unref(Ae.Select),{value:o.value,"onUpdate:value":I[0]||(I[0]=M=>o.value=M),options:a.value,onChange:I[1]||(I[1]=M=>h(M)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:d.withCtx(()=>[d.createElementVNode("div",eb,[d.createElementVNode("div",tb,[d.createElementVNode("div",nb,[d.createElementVNode("div",ib,[d.createElementVNode("input",{type:"checkbox",checked:f.value,onChange:A},null,40,sb)]),I[5]||(I[5]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),I[6]||(I[6]=d.createElementVNode("div",{class:"col-name"},"图层名称",-1)),I[7]||(I[7]=d.createElementVNode("div",{class:"col-color"},"颜色",-1))]),d.createElementVNode("div",ob,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,M=>(d.openBlock(),d.createElementBlock("div",{key:M.key,class:"list-item"},[d.createElementVNode("div",rb,[d.createElementVNode("input",{type:"checkbox",checked:u.value.includes(M.key),onChange:k=>C(M.key,k)},null,40,ab)]),d.createElementVNode("div",lb,d.toDisplayString(M.index),1),d.createElementVNode("div",{class:"col-name",title:M.layerName},d.toDisplayString(M.layerName),9,cb),d.createElementVNode("div",db,[d.createElementVNode("input",{type:"color",value:M.layerColor,disabled:""},null,8,ub)])]))),128)),c.value.length===0?(d.openBlock(),d.createElementBlock("div",hb,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),pb={class:"adjust-panel"},gb={class:"control-panel"},mb={class:"form-item"},Ab={class:"radio-group"},yb={class:"form-item"},Cb=["title"],Eb={class:"param-row"},wb=["step"],bb={class:"param-row"},vb=["step"],Ib={class:"param-row"},xb=["step"],Bb={class:"param-row"},Sb=["step"],Mb={class:"param-row"},Tb=["step"],Db={class:"param-row"},kb=["step"],Pb={class:"param-row"},Fb=["step"],Rb={class:"button-grid"},Ob={key:1,class:"pick-mode-ui"},Lb=["onClick"],Nb=["checked"],Ub={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},_b={class:"param-row"},Qb={style:{width:"40px"}},Hb=["onUpdate:modelValue"],Gb={class:"param-row"},Yb={style:{width:"40px"}},Vb=["onUpdate:modelValue"],Wb={class:"param-row"},zb={style:{width:"40px"}},jb=["onUpdate:modelValue"],$b={class:"list-panel"},Kb={class:"list-header"},qb={class:"col-check"},Xb=["checked"],Jb={class:"list-body"},Zb={class:"col-check"},ev=["onUpdate:modelValue"],tv={class:"col-index"},nv=["title"],iv={class:"col-main"},sv=["checked","onChange"],ov={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},rv=Ue(d.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.inject("leitingMethods"),r=d.ref([]),l=d.ref(""),a=d.computed(()=>r.value.length>0&&r.value.every(w=>w.selected)),c=d.ref("param"),u=d.ref("bimPoint1"),f=d.ref(null),p=d.ref("bimPoint1"),h=d.reactive({bimPoint1:{longitude:void 0,latitude:void 0,type:"CAD标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0},bimPoint2:{longitude:void 0,latitude:void 0,type:"地图标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0}}),A=d.ref(1e-6),C=d.reactive({modelId:"",longitude:0,latitude:0,distance:1e-6,rotation:1,totalRotation:0,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0}),g=d.computed(()=>{const w=r.value.find(v=>v.modelId===l.value);return w?w.modelName:""}),y=()=>{s("update:visible",!1)},E=()=>(!f.value&&o?.value?.getViewer&&o?.value?.getCesium&&(f.value=new oc(o.value.getViewer(),o.value.getCesium())),f.value),I=()=>{E()?.clearMarkers(),h.bimPoint1.longitude=void 0,h.bimPoint1.latitude=void 0,h.bimPoint1.height=void 0,h.bimPoint2.longitude=void 0,h.bimPoint2.latitude=void 0,h.bimPoint2.height=void 0},M=w=>{const v=u.value,B=h[v];if(B){B.longitude=w.longitude,B.latitude=w.latitude,B.height=w.height;const R=v==="bimPoint1"?"BIM":"MAP";E()?.addMarker(R,w),me.success(`${B.type}已添加`)}},k=()=>{E()?.registerPickHandler(w=>{M(w)})},S=()=>{E()?.destroyPickHandler()},x=w=>{c.value=w,w!=="pick"&&s("clearBimPointList")};d.watch(()=>c.value,w=>{w==="pick"?k():S()}),d.onUnmounted(()=>{S()});const m=()=>{if(!o?.value?.getDxfModels)return;const w=o.value.getDxfModels();if(Array.isArray(w)?r.value=w.map(v=>({modelId:v.modelId,modelName:v.modelName,formData:v.formData||{},selected:!1,tileset:v})):r.value=[],r.value.length>0){const v=o.value.getCadModelId?o.value.getCadModelId():"";v&&r.value.find(B=>B.modelId===v)?F(v):F(r.value[0].modelId),r.value.forEach(B=>B.selected=!0)}},F=w=>{l.value=w;const v=r.value.find(B=>B.modelId===w);v&&v.formData&&Object.keys(C).forEach(B=>{v.formData[B]!==void 0&&(C[B]=v.formData[B])})},T=(w,v)=>{if(!o?.value?.adjustingModelByCad)return;const B=r.value.find(R=>R.modelId===w);B&&B.tileset&&(B.formData={...B.formData,...v},B.tileset.formData=B.formData,o.value.adjustingModelByCad({...B.formData,tileset:B.tileset}))},P=w=>{if(!l.value)return;const v=C[w];T(l.value,{[w]:v})},L=w=>{const v=r.value.filter(O=>O.selected);if(v.length===0){me.warning("请先选择要调整的模型");return}const{distance:B,heightDistance:R,rotation:U}=C;v.forEach(O=>{const D={...O.formData};switch(w){case"north":D.latitude+=B;break;case"south":D.latitude-=B;break;case"east":D.longitude+=B;break;case"west":D.longitude-=B;break;case"up":D.height+=R;break;case"down":D.height-=R;break;case"rotateLeft":D.totalRotation=(D.totalRotation||0)-U;break;case"rotateRight":D.totalRotation=(D.totalRotation||0)+U;break}O.modelId===l.value&&Object.assign(C,D),T(O.modelId,D)})},G=w=>{const v=w.target.checked;r.value.forEach(B=>B.selected=v)},N=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},b=()=>{const w=h.bimPoint1,v=h.bimPoint2;if(w.longitude===void 0||v.longitude===void 0){me.warning("请先完成点选操作");return}const B=r.value.filter(_=>_.selected);if(B.length===0){me.warning("请先选择要调整的模型");return}let R=0,U=0,O=0;const D=E();if(D){const{dLon:_,dLat:Y,dHeight:$}=D.calculateOffset(w,v);R=_,U=Y,O=$}else R=v.longitude-w.longitude,U=v.latitude-w.latitude,O=v.height-w.height;B.forEach(_=>{const Y={..._.formData};Y.longitude+=R,Y.latitude+=U,Y.height+=O,_.modelId===l.value&&Object.assign(C,Y),T(_.modelId,Y)}),me.success("位置已调整")};return d.watch(()=>i.visible,w=>{w?m():(S(),I())}),d.onMounted(()=>{i.visible&&m()}),e({setBIMPointsList:({longitude:w,latitude:v,height:B})=>{h[p.value].longitude=w,h[p.value].latitude=v,h[p.value].height=B},addGltfOr3dTilesModelList:w=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(w,v)=>(d.openBlock(),d.createBlock(Re,{visible:i.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":v[21]||(v[21]=B=>s("update:visible",B)),onClose:y},{default:d.withCtx(()=>[d.createElementVNode("div",pb,[d.createElementVNode("div",gb,[d.createElementVNode("div",mb,[v[22]||(v[22]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",Ab,[d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="param"}),onClick:v[0]||(v[0]=B=>x("param"))},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="pick"}),onClick:v[1]||(v[1]=B=>x("pick"))},"地图点选",2)])]),d.createElementVNode("div",yb,[v[23]||(v[23]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",{class:"value",title:g.value},d.toDisplayString(g.value||"未选择"),9,Cb)]),v[35]||(v[35]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[v[31]||(v[31]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",Eb,[v[24]||(v[24]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[2]||(v[2]=B=>C.longitude=B),onChange:v[3]||(v[3]=B=>P("longitude")),step:A.value},null,40,wb),[[d.vModelText,C.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",bb,[v[25]||(v[25]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[4]||(v[4]=B=>C.latitude=B),onChange:v[5]||(v[5]=B=>P("latitude")),step:A.value},null,40,vb),[[d.vModelText,C.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Ib,[v[26]||(v[26]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[6]||(v[6]=B=>C.height=B),onChange:v[7]||(v[7]=B=>P("height")),step:A.value},null,40,xb),[[d.vModelText,C.height,void 0,{number:!0}]])]),d.createElementVNode("div",Bb,[v[27]||(v[27]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[8]||(v[8]=B=>C.totalRotation=B),onChange:v[9]||(v[9]=B=>P("totalRotation")),step:A.value},null,40,Sb),[[d.vModelText,C.totalRotation,void 0,{number:!0}]])]),v[32]||(v[32]=d.createElementVNode("div",{class:"separator"},null,-1)),v[33]||(v[33]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",Mb,[v[28]||(v[28]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[10]||(v[10]=B=>C.distance=B),step:A.value},null,8,Tb),[[d.vModelText,C.distance,void 0,{number:!0}]])]),d.createElementVNode("div",Db,[v[29]||(v[29]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[11]||(v[11]=B=>C.heightDistance=B),step:A.value},null,8,kb),[[d.vModelText,C.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",Pb,[v[30]||(v[30]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":v[12]||(v[12]=B=>C.rotation=B),step:A.value},null,8,Fb),[[d.vModelText,C.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",Rb,[d.createElementVNode("button",{onClick:v[13]||(v[13]=B=>L("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:v[14]||(v[14]=B=>L("north"))},"北移"),d.createElementVNode("button",{onClick:v[15]||(v[15]=B=>L("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:v[16]||(v[16]=B=>L("west"))},"西移"),d.createElementVNode("button",{onClick:v[17]||(v[17]=B=>L("south"))},"南移"),d.createElementVNode("button",{onClick:v[18]||(v[18]=B=>L("east"))},"东移"),d.createElementVNode("button",{onClick:v[19]||(v[19]=B=>L("up"))},"上移"),d.createElementVNode("button",{onClick:v[20]||(v[20]=B=>L("down"))},"下移"),d.createElementVNode("button",{onClick:N,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(d.openBlock(),d.createElementBlock("div",Ob,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(h,(B,R)=>(d.openBlock(),d.createElementBlock("div",{key:R,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[d.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:U=>u.value=R},[d.createElementVNode("input",{type:"radio",checked:u.value===R,style:{"margin-right":"5px"}},null,8,Nb),d.createTextVNode(" "+d.toDisplayString(B.type)+": ",1)],8,Lb),d.createElementVNode("div",Ub,[d.createElementVNode("div",_b,[d.createElementVNode("label",Qb,d.toDisplayString(B.longitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":U=>B.longitude=U,readonly:"",style:{width:"100px"}},null,8,Hb),[[d.vModelText,B.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Gb,[d.createElementVNode("label",Yb,d.toDisplayString(B.latitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":U=>B.latitude=U,readonly:"",style:{width:"100px"}},null,8,Vb),[[d.vModelText,B.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Wb,[d.createElementVNode("label",zb,d.toDisplayString(B.heightText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":U=>B.height=U,readonly:"",style:{width:"100px"}},null,8,jb),[[d.vModelText,B.height,void 0,{number:!0}]])])])]))),128)),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:b,class:"primary-btn"},"应用校准"),d.createElementVNode("button",{onClick:N},"保存")]),v[34]||(v[34]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),d.createElementVNode("div",$b,[d.createElementVNode("div",Kb,[d.createElementVNode("div",qb,[d.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:G},null,40,Xb)]),v[36]||(v[36]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),v[37]||(v[37]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),v[38]||(v[38]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",Jb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(B,R)=>(d.openBlock(),d.createElementBlock("div",{key:B.modelId,class:d.normalizeClass(["list-item",{active:B.modelId===l.value}])},[d.createElementVNode("div",Zb,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":U=>B.selected=U},null,8,ev),[[d.vModelCheckbox,B.selected]])]),d.createElementVNode("div",tv,d.toDisplayString(R+1),1),d.createElementVNode("div",{class:"col-name",title:B.modelName},d.toDisplayString(B.modelName),9,nv),d.createElementVNode("div",iv,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:B.modelId===l.value,onChange:U=>F(B.modelId)},null,40,sv)])],2))),128)),r.value.length===0?(d.openBlock(),d.createElementBlock("div",ov,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),av={class:"annotation-content"},lv={class:"annotation-tools"},cv={class:"annotation-controls"},dv={class:"control-group",title:"颜色"},uv={class:"tool-item color-tool"},hv={class:"control-group line-width-container",title:"线宽"},fv=["onClick"],pv={class:"option-label"},gv=Ue(d.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(""),r=d.ref("#ff0000"),l=d.ref(1),a=d.ref(!1),c=d.ref(null),u=d.ref(null),f=d.ref({top:"0px",left:"0px"}),p=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],h=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,A=()=>{i("update:visible",!1)},C=x=>{o.value=x;const m=h();if(m)switch(x){case"freehandLine":m.startFreehandLine();break;case"arrow":m.startArrow();break;case"straightLine":m.startStraightLine();break;case"rectangle":m.startRectangle();break;case"ellipse":m.startEllipse();break}},g=()=>{const x=h();x&&(x.setCurrentColor(r.value),x.changeColor(r.value))},y=()=>{if(!a.value&&c.value){const x=c.value.getBoundingClientRect();f.value={top:`${x.top}px`,left:`${x.right+8}px`}}a.value=!a.value},E=x=>{l.value=x,a.value=!1;const m=h();m&&(m.setCurrentWidth(x),m.changeWidth(x))},I=()=>{const x=h();x&&x.deleteSelectedEntity()},M=()=>{const x=h();x&&x.clearAll()},k=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const x=h();x&&x.saveAnnotations()},S=x=>{const m=x.target,F=c.value&&c.value.contains(m),T=u.value&&u.value.contains(m);!F&&!T&&(a.value=!1)};return d.onMounted(()=>{document.addEventListener("click",S)}),d.onUnmounted(()=>{document.removeEventListener("click",S)}),(x,m)=>(d.openBlock(),d.createBlock(Re,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":m[6]||(m[6]=F=>i("update:visible",F)),onClose:A},{default:d.withCtx(()=>[d.createElementVNode("div",av,[d.createElementVNode("div",lv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:m[0]||(m[0]=F=>C("freehandLine")),title:"手绘线"},[...m[7]||(m[7]=[d.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:m[1]||(m[1]=F=>C("arrow")),title:"箭头"},[...m[8]||(m[8]=[d.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:m[2]||(m[2]=F=>C("straightLine")),title:"直线"},[...m[9]||(m[9]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:m[3]||(m[3]=F=>C("rectangle")),title:"矩形"},[...m[10]||(m[10]=[d.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:m[4]||(m[4]=F=>C("ellipse")),title:"椭圆"},[...m[11]||(m[11]=[d.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),m[13]||(m[13]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",cv,[d.createElementVNode("div",dv,[d.createElementVNode("div",uv,[d.createElementVNode("div",{class:"color-swatch",style:d.normalizeStyle({backgroundColor:r.value})},null,4),d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":m[5]||(m[5]=F=>r.value=F),onChange:g,class:"color-input-overlay"},null,544),[[d.vModelText,r.value]])])]),d.createElementVNode("div",hv,[d.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:c,class:"tool-item",onClick:d.withModifiers(y,["stop"])},[d.createElementVNode("div",{class:"current-width-preview",style:d.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[a.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:u,class:"line-width-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(p,F=>d.createElementVNode("div",{key:F.value,class:d.normalizeClass(["line-width-option",{selected:l.value===F.value}]),onClick:d.withModifiers(T=>E(F.value),["stop"])},[d.createElementVNode("span",pv,d.toDisplayString(F.label),1),d.createElementVNode("div",{class:"line-preview",style:d.normalizeStyle({height:F.value+"px",backgroundColor:l.value===F.value?"#1890ff":"#ddd"})},null,4)],10,fv)),64))],4)):d.createCommentVNode("",!0)]))]),m[12]||(m[12]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("button",{class:"control-btn",onClick:I,title:"删除选中"}," 🗑️ "),d.createElementVNode("button",{class:"control-btn",onClick:M,title:"清空"}," ❌ "),d.createElementVNode("button",{class:"control-btn",onClick:k,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),mv={class:"measure-content"},Av={class:"measure-tools"},yv={key:0,class:"measure-results"},Cv={class:"result-row"},Ev={class:"result-value"},wv={class:"result-row"},bv={class:"result-value"},vv={class:"result-row"},Iv={class:"result-value"},xv={class:"result-row"},Bv={class:"result-value"},Sv={key:1,class:"result-row"},Mv={class:"result-value"},Tv={key:2,class:"result-row"},Dv={class:"result-value"},kv={class:"measure-controls"},Pv={class:"control-group",title:"单位"},Fv={class:"unit-display"},Rv=["onClick"],Ov=Ue(d.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(null),r=d.ref(null),l=d.ref("m"),a=d.ref(!1),c=d.ref(null),u=d.ref(!1),f=d.ref({}),p=d.ref(null),h=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],A=x=>{const m=l.value;return m==="mm"?`${(x*1e3).toFixed(0)}mm`:m==="cm"?`${(x*100).toFixed(1)}cm`:`${x.toFixed(2)}m`},C=x=>x>1e6?`${(x/1e6).toFixed(2)} km²`:`${x.toFixed(2)} m²`,g=()=>{if(!o.value&&s.value?.getViewer){const x=s.value.getViewer(),m=s.value.getCesium();x&&m&&(o.value=new tc({viewer:x,cesium:m}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=F=>{c.value=F})}},y=x=>{o.value||g(),r.value===x?(r.value=null,o.value?.stop()):(r.value=x,o.value?.start(x))},E=x=>{l.value=x,u.value=!1},I=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},M=()=>{i("update:visible",!1)},k=x=>{if(u.value){u.value=!1;return}const F=x.currentTarget.getBoundingClientRect();f.value={position:"fixed",top:`${F.top}px`,left:`${F.right+5}px`,zIndex:3e3},u.value=!0},S=x=>{u.value&&p.value&&!p.value.contains(x.target)&&(u.value=!1)};return d.onMounted(()=>{document.addEventListener("click",S),t.visible&&d.nextTick(()=>g())}),d.onUnmounted(()=>{document.removeEventListener("click",S),o.value&&o.value.destroy()}),d.watch(()=>t.visible,x=>{x?d.nextTick(()=>g()):o.value&&(o.value.stop(),r.value=null)}),d.watch(s,x=>{x&&x.getViewer&&!o.value&&t.visible&&g()}),d.watch(l,x=>{o.value&&o.value.setUnit(x)}),(x,m)=>(d.openBlock(),d.createBlock(Re,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":m[3]||(m[3]=F=>i("update:visible",F)),onClose:M},{default:d.withCtx(()=>[d.createElementVNode("div",mv,[d.createElementVNode("div",Av,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:m[0]||(m[0]=F=>y("distance")),title:"距离测量"},[...m[4]||(m[4]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:m[1]||(m[1]=F=>y("angle")),title:"角度测量"},[...m[5]||(m[5]=[d.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:m[2]||(m[2]=F=>y("area")),title:"面积测量"},[...m[6]||(m[6]=[d.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),m[15]||(m[15]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value?(d.openBlock(),d.createElementBlock("div",yv,[c.value.type==="distance"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",Cv,[m[7]||(m[7]=d.createElementVNode("span",{class:"result-label"},"总长:",-1)),d.createElementVNode("span",Ev,d.toDisplayString(A(c.value.dist)),1)]),d.createElementVNode("div",wv,[m[8]||(m[8]=d.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),d.createElementVNode("span",bv,d.toDisplayString(A(c.value.dx)),1)]),d.createElementVNode("div",vv,[m[9]||(m[9]=d.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),d.createElementVNode("span",Iv,d.toDisplayString(A(c.value.dy)),1)]),d.createElementVNode("div",xv,[m[10]||(m[10]=d.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),d.createElementVNode("span",Bv,d.toDisplayString(A(c.value.dz)),1)])],64)):d.createCommentVNode("",!0),c.value.type==="angle"?(d.openBlock(),d.createElementBlock("div",Sv,[m[11]||(m[11]=d.createElementVNode("span",{class:"result-label"},"角度:",-1)),d.createElementVNode("span",Mv,d.toDisplayString(c.value.angle.toFixed(1))+"°",1)])):d.createCommentVNode("",!0),c.value.type==="area"?(d.openBlock(),d.createElementBlock("div",Tv,[m[12]||(m[12]=d.createElementVNode("span",{class:"result-label"},"面积:",-1)),d.createElementVNode("span",Dv,d.toDisplayString(C(c.value.area)),1)])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.createElementVNode("div",kv,[d.createElementVNode("div",Pv,[d.createElementVNode("div",{class:"tool-item",onClick:d.withModifiers(k,["stop"])},[d.createElementVNode("div",Fv,d.toDisplayString(l.value),1)]),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[u.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:p,class:"unit-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(h,F=>d.createElementVNode("div",{key:F.value,class:d.normalizeClass(["unit-option",{selected:l.value===F.value}]),onClick:d.withModifiers(T=>E(F.value),["stop"])},d.toDisplayString(F.label),11,Rv)),64))],4)):d.createCommentVNode("",!0)]))]),m[14]||(m[14]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("div",{class:"tool-item control-btn",onClick:I,title:"清空"},[...m[13]||(m[13]=[d.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function Lv(){const n=d.ref(!1),e=d.reactive({x:0,y:0}),t=d.ref([]),i=d.ref(null);return{visible:n,position:e,items:t,contextData:i,show:(a,c,u)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=c,i.value=u,n.value=!0},hide:()=>{n.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(c=>c.id!==a)}}}const Nv=["onClick"],Uv={class:"menu-label"},_v={key:0,class:"menu-arrow"},Qv=Ue(d.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(n,{emit:e}){const t=n,i=e,s=r=>{r.disabled||(r.action&&r.action(),i("action",r),i("update:visible",!1))},o=()=>{t.visible&&i("update:visible",!1)};return d.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),d.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:"leiting-context-menu",style:d.normalizeStyle({left:n.position.x+"px",top:n.position.y+"px"}),onContextmenu:l[0]||(l[0]=d.withModifiers(()=>{},["prevent"]))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.items,a=>(d.openBlock(),d.createElementBlock("div",{key:a.id,class:d.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:c=>s(a)},[d.createElementVNode("span",Uv,d.toDisplayString(a.label),1),a.children?(d.openBlock(),d.createElementBlock("span",_v,"▶")):d.createCommentVNode("",!0)],10,Nv))),128))],36)),[[d.vShow,n.visible]])}}),[["__scopeId","data-v-f288753b"]]),Hv={class:"leiting-ui-overlay"},Qi=Ue(d.defineComponent({__name:"LeitingBIM",props:{accessToken:{},cesiumUrl:{},cesiumCssUrl:{},methods:{},viewerOptions:{},treeProps:{},showTree:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!1},playerUrl:{default:"https://leiting.chenxisoft.com/resource/person/person.glb"},playerModelName:{default:"Person"},playerModelId:{default:"player_111"},playerScale:{default:.0032},tiandituToken:{default:"c25f14fb6bd4397cf8fe45144ff768d6"},globe:{type:Boolean,default:void 0},terrain:{type:Boolean,default:void 0},depthTest:{type:Boolean,default:void 0},mapProvider:{},tiandituLayerType:{},tiandituShowLabel:{type:Boolean,default:void 0},arcgisUrl:{},shadows:{type:Boolean,default:void 0},environmentMap:{type:Boolean,default:void 0},ambientOcclusion:{type:Boolean,default:void 0},time:{},brightness:{},backgroundColor:{},collision:{type:Boolean,default:void 0},mouseHabit:{},mode:{default:"3d"},mountAll3Dtiles:{},mountAllCad:{},saveRegion:{},saveCadRegion:{},saveCadCalibration:{},selectionChange:{},searchComponent:{}},emits:["register","init","ready"],setup(n,{emit:e}){const t=d.ref(),i=d.getCurrentInstance(),s=d.ref(!1),o=d.ref(""),r=d.ref({}),l=d.ref("3d"),a=n,c={title:"构件树",treeData:[]},u=d.ref(!1),f=d.ref(!1),p=d.ref(!1),h=d.ref(!1),A=d.ref(!1),C=d.ref(!1),g=d.ref(!1),y=d.ref(!1),E=d.ref(!1),I=d.ref(!1),{visible:M,position:k,items:S,show:x,hide:m}=Lv(),F=d.ref([]),T=V=>{F.value.push(V)},P=V=>{F.value=F.value.filter(j=>j.id!==V)},L=d.ref([]),G=d.ref(""),N=d.ref(null),b=d.ref([]),w=d.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),v=(V,j)=>{V==="componentTree"&&(V="tree"),V==="componentInfo"&&(V="info"),V in w&&(w[V]=j)},B=d.shallowRef({});d.provide("leitingMethods",B);const R=d.ref(a.showMenu),U=d.ref([]);d.watch(()=>a.showMenu,V=>{R.value=V},{immediate:!0}),d.watch(()=>a.mode,V=>{V&&B.value?.set2d&&B.value.set2d(V==="2d")});const O=d.ref("dark");d.provide("leiting-theme",O);const D=d.ref([]),_=d.computed(()=>{const V=[];return u.value&&(V.push("tree"),V.push("componentTree")),f.value&&V.push("section"),p.value&&V.push("roam"),h.value&&(V.push("info"),V.push("componentInfo")),A.value&&V.push("adjust"),C.value&&V.push("setting"),g.value&&V.push("cadLayer"),y.value&&V.push("cadPosition"),E.value&&V.push("annotation"),I.value&&(V.push("measure"),V.push("measurement")),V.push(...D.value),V}),Y=d.ref(null),$=(V,j)=>{V==="componentTree"||V==="tree"?u.value=j:V==="section"?f.value=j:V==="roam"?p.value=j:V==="componentInfo"||V==="info"?h.value=j:V==="homeView"?B.value?.is2dMode?.()?B.value?.flyToTopView?.({}):B.value?.flyToTileset?.({}):V==="adjustModel"?(A.value=j,j&&Y.value&&Y.value.setModelType("BIM")):V==="osgbAdjust"?(A.value=j,j&&Y.value&&Y.value.setModelType("OSGB")):V==="setting"?C.value=j:V==="cadLayer"?g.value=j:V==="cadPosition"?y.value=j:V==="annotation"?E.value=j:V==="measurement"?I.value=j:j?D.value.includes(V)||D.value.push(V):D.value=D.value.filter(q=>q!==V)};d.watch(u,async V=>{if(V&&B.value?.loadTreeForModel&&B.value?.getMapTileset){const j=B.value.getMapTileset(),q=Object.values(j).map(async se=>{if(se.leiting&&!se.leiting.tree&&se.leiting.model?.treeUrl){const oe=se.leiting.model.modelId;try{se.leiting?.node?.batchIdEIDInfos||await B.value.loadNodeDetailsForModel(oe);const ae=await B.value.loadTreeForModel(oe);ae&&(Array.isArray(ae)?ae:[ae]).forEach(le=>{le&&!b.value.find(Pe=>Pe.id===le.id)&&(le.modelId=oe,b.value=[...b.value,le])})}catch(ae){console.warn(`Failed to lazy load tree for ${oe}`,ae)}}});await Promise.all(q)}});const J=()=>{B.value&&(B.value.getDxfModels&&(L.value=B.value.getDxfModels()||[]),B.value.getCadModelId&&(G.value=B.value.getCadModelId()||""))};d.watch(g,V=>{V&&J()}),d.watch(y,V=>{V&&(J(),N.value&&L.value.length&&N.value.addGltfOr3dTilesModelList(L.value))});const ne=e,re=V=>{B.value&&B.value.saveCadCalibration&&B.value.saveCadCalibration(V),B.value&&B.value.saveCadRegion&&B.value.saveCadRegion(V)};return d.onMounted(async()=>{if(t.value)try{const V={...xt,cesiumUrl:a.cesiumUrl||xt.cesiumUrl,cesiumCssUrl:a.cesiumCssUrl||xt.cesiumCssUrl,accessToken:a.accessToken||ns()||xt.accessToken};await ts(V);const j=a.accessToken||ns()||xt.accessToken;j&&(Cesium.Ion.defaultAccessToken=j),s.value=!0;const q=(oe={},ae)=>{if(t.value){const{showMenu:Ee,showTree:le,globe:Pe,terrain:ct,depthTest:$e,mapProvider:vt,tiandituLayerType:it,tiandituShowLabel:dn,arcgisUrl:Ut,shadows:_t,environmentMap:qi,ambientOcclusion:Ke,time:Oe,brightness:st,backgroundColor:dt,collision:Qt,mouseHabit:Ht,mode:It,...Be}=oe||{},To=a.showMenu!==void 0?a.showMenu:Ee!==void 0?Ee:!0;R.value=To;const ke=(ee,Ie,Yt)=>ee!==void 0?ee:Ie!==void 0?Ie:Yt,un=ke(a.globe,Pe,!1),hn=ke(a.terrain,ct,!1),$n=ke(a.depthTest,$e,!1),Kn=ke(a.mapProvider,vt,"tianditu"),qn=ke(a.tiandituLayerType,it,"img_w"),Xi=ke(a.tiandituShowLabel,dn,!1),Xc=ke(a.arcgisUrl,Ut,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),Jc=ke(a.shadows,_t,!1),Zc=ke(a.environmentMap,qi,!1),ed=ke(a.ambientOcclusion,Ke,!1),td=ke(a.time,Oe,void 0),nd=ke(a.brightness,st,1),Ji=a.mode||It||"3d";console.log("LeitingBIM Mode:",Ji,"Props:",a.mode,"Options:",It),l.value=Ji;const Gx=Ji==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",id=ke(a.backgroundColor,dt,Gx),sd=ke(a.collision,Qt,!1),od=ke(a.mouseHabit,Ht,0);r.value={globe:un,terrain:hn,depthTest:$n,mapProvider:Kn,tiandituLayerType:qn,tiandituShowLabel:Xi,arcgisUrl:Xc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od};const Xn=O0({container:t.value,appContext:i?.appContext,methods:{...B.value,handleMenuAction:$,setCardFullHeight:v,onLoadingStatus:ee=>{ee?me.loading(ee,"",t.value):me.close()},...Be,tilesLoad3dTiles:async ee=>{let Ie=ee.leiting?.tree;const Yt=ee.leiting?.model?.modelId;if(!Ie&&u.value&&B.value?.loadTreeForModel)try{Ie=await B.value.loadTreeForModel(Yt)}catch(Zn){console.warn("Failed to lazy load tree",Zn)}Ie&&(Array.isArray(Ie)?Ie:[Ie]).forEach(Vt=>{Vt&&!b.value.find(ad=>ad.id===Vt.id)&&(Vt.modelId=Yt,b.value=[...b.value,Vt])});const{brightness:Do,contrast:ko,saturation:ut}=Xn.methods.getConfigure();Xn.methods.setModelColorAdjustment({brightness:Do,contrast:ko,saturation:ut}),Be.tilesLoad3dTiles?.(ee)},mountAll3Dtiles:ee=>{a.mountAll3Dtiles&&a.mountAll3Dtiles(ee),Be.mountAll3Dtiles?.(ee)},mountAllCad:ee=>{if(Xn.methods.setModelBrightness){const Ie=a.brightness!==void 0?a.brightness:r.value.brightness;Ie!==void 0&&Xn.methods.setModelBrightness(Ie)}a.mountAllCad&&a.mountAllCad(ee),Be.mountAllCad?.(ee)},saveRegion:ee=>{a.saveRegion&&a.saveRegion(ee),Be.saveRegion?.(ee)},saveCadRegion:ee=>{a.saveCadRegion&&a.saveCadRegion(ee),Be.saveCadRegion?.(ee)},saveCadCalibration:ee=>{a.saveCadCalibration&&a.saveCadCalibration(ee),Be.saveCadCalibration?.(ee)},selectionChange:ee=>{a.selectionChange&&a.selectionChange(ee),Be.selectionChange?.(ee)},onSearchComponent:ee=>{a.searchComponent&&a.searchComponent(ee),Be.searchComponent?.(ee)}},viewerOptions:a.viewerOptions,options:{...Be,mode:Ji,playerUrl:a.playerUrl,playerModelName:a.playerModelName,playerModelId:a.playerModelId,playerScale:a.playerScale,globe:un,terrain:hn,depthTest:$n,mapProvider:Kn,tiandituLayerType:qn,tiandituShowLabel:Xi,tiandituToken:a.tiandituToken,arcgisUrl:Xc,shadows:Jc,environmentMap:Zc,ambientOcclusion:ed,time:td,brightness:nd,backgroundColor:id,collision:sd,mouseHabit:od},callbacks:{onLoading:ee=>ee?me.loading(ee,"",t.value):me.close(),onSuccess:ee=>me.success(ee,"",void 0,t.value),onError:ee=>me.error(ee,"",void 0,t.value)}}),{Cesium:Gt,viewer:fn,methods:Zi,menuEvents:Jn}=Xn,ge=Zi;Jn.on("showMenu",ee=>{R.value=ee}),Jn.on("insertMenu",ee=>{U.value=ee}),Jn.on("setMenuActive",(ee,Ie)=>{$(ee,Ie)}),B.value=ge,ae&&(ae.value=ge),Jn.on("setMode",ee=>{l.value=ee}),Jn.on("deleteAllModels",()=>{b.value=[]}),new Gt.ScreenSpaceEventHandler(fn.scene.canvas).setInputAction(async ee=>{if(m(),l.value==="2d")return;const Ie=fn.scene.pick(ee.position),Yt=fn.container.getBoundingClientRect(),Do=Yt.left+ee.position.x,ko=Yt.top+ee.position.y,ut=[];if(Gt.defined(Ie)&&Ie instanceof Gt.Cesium3DTileFeature){const Zn=ge.baseCompt.getFeatureId(Ie),Vt=Sn(Ie.tileset);ge.baseCompt.hasSelectedFeaturesMap[Vt]?.some(ei=>ei.batchId===Zn&&ei.rank===0)||(await ge.baseCompt.clearSelection(),await ge.baseCompt.toggleMultiSelect(Vt,Zn,ge.baseCompt.selectedColor)),ut.push({id:"details",label:"构件详情",action:()=>{h.value=!0}}),ut.push({id:"hide",label:"隐藏选中构件",action:()=>{const ti=ge.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!1}));ge.baseCompt.setComponentVisibility(ti)}}),ut.push({id:"translucent",label:"半透明选中构件",action:async()=>{const ti=ge.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,rgba:{...ht.rgba,a:.3}}));await ge.baseCompt.setSelectColorUserModelCpt(ti,{rank:0})}}),ut.push({id:"isolate",label:"隔离选中构件",divided:!0,action:()=>{ge.baseCompt.setAllComponentsVisibility(!1);const ti=ge.baseCompt.getSelected().map(ht=>({elementId:ht.elementId,modelId:ht.modelId,show:!0}));ge.baseCompt.setComponentVisibility(ti)}})}ut.push({id:"showAll",label:"显示所有",action:async()=>{ge.baseCompt.setAllComponentsVisibility(!0),await ge.baseCompt.clearSelection()}}),ut.push(...F.value),x({x:Do,y:ko},ut)},Gt.ScreenSpaceEventType.RIGHT_CLICK),ge.addContextMenuItems=T,ge.insertContextMenu=ge.addContextMenuItems,ge.removeContextMenuItems=P,ge.deleteContextMenu=ge.removeContextMenuItems,ge.closeContextMenu=m,ge.hideContextMenu=ge.closeContextMenu;const rd=oe?.onLoaded||oe?.onloaded;rd&&rd({Cesium:Gt,viewer:fn,methods:Zi}),ne("init",{Cesium:Gt,viewer:fn,methods:Zi}),ne("ready",{Cesium:Gt,viewer:fn,methods:Zi})}};let se=!1;ne("register",(oe,ae)=>{se=!0,q(oe,ae)}),se||setTimeout(()=>{B.value.getViewer||q()},0)}catch(V){o.value="Failed to load Cesium: "+(V.message||V),console.error(V)}}),(V,j)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-bim-container",[`theme-${O.value}`]]),onContextmenu:j[11]||(j[11]=d.withModifiers(()=>{},["prevent","stop"]))},[!s.value&&!o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):d.createCommentVNode("",!0),o.value?(d.openBlock(),d.createBlock(d.unref(Ae.Alert),{key:1,class:"error",type:"error",message:o.value,"show-icon":""},null,8,["message"])):d.createCommentVNode("",!0),d.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[d.createElementVNode("div",Hv,[d.createVNode(Qn,{visible:h.value,"full-height":w.info,"onUpdate:visible":j[0]||(j[0]=q=>h.value=q)},null,8,["visible","full-height"]),d.createVNode(Hn,{ref_key:"LeitingPositionRef",ref:Y,visible:A.value,"full-height":w.adjustModel,"onUpdate:visible":j[1]||(j[1]=q=>A.value=q)},null,8,["visible","full-height"]),d.createVNode(Gn,{visible:C.value,"full-height":w.setting,"tianditu-token":a.tiandituToken,"initial-config":r.value,"onUpdate:visible":j[2]||(j[2]=q=>C.value=q)},null,8,["visible","full-height","tianditu-token","initial-config"]),n.showTree!==!1?(d.openBlock(),d.createBlock(Pi,d.mergeProps({key:0},{...c,...n.treeProps},{visible:u.value,"full-height":w.tree,"tree-data":b.value.length>0?b.value:n.treeProps?.treeData||[],"onUpdate:visible":j[3]||(j[3]=q=>{u.value=q})}),null,16,["visible","full-height","tree-data"])):d.createCommentVNode("",!0),d.createVNode(gv,{visible:E.value,"onUpdate:visible":j[4]||(j[4]=q=>E.value=q)},null,8,["visible"]),d.createVNode(Ov,{visible:I.value,"onUpdate:visible":j[5]||(j[5]=q=>I.value=q)},null,8,["visible"]),d.createVNode(Un,{visible:f.value,"full-height":w.section,"onUpdate:visible":j[6]||(j[6]=q=>f.value=q)},null,8,["visible","full-height"]),d.createVNode(_n,{visible:p.value,"full-height":w.roam,"onUpdate:visible":j[7]||(j[7]=q=>p.value=q)},null,8,["visible","full-height"]),d.createVNode(Nn,{visible:R.value,"active-ids":_.value,"custom-items":U.value,onAction:$,"is-2d":l.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),d.createVNode(fb,{visible:g.value,"current-model-id":G.value,"onUpdate:visible":j[8]||(j[8]=q=>g.value=q)},null,8,["visible","current-model-id"]),d.createVNode(rv,{ref_key:"cadPositionRef",ref:N,visible:y.value,"onUpdate:visible":j[9]||(j[9]=q=>y.value=q),onSave:re},null,8,["visible"]),d.createVNode(Qv,{visible:d.unref(M),position:d.unref(k),items:d.unref(S),"onUpdate:visible":j[10]||(j[10]=q=>M.value=q)},null,8,["visible","position","items"]),d.renderSlot(V.$slots,"default",d.normalizeProps(d.guardReactiveProps({methods:B.value,isReady:s.value})),void 0,!0)])],512)],34))}}),[["__scopeId","data-v-d72ba9e6"]]);function pc(n){const e=d.ref(),t=d.ref(n.theme||"dark"),i=d.ref(n.menuSize||"medium");d.provide("leiting-theme",t),d.provide("leiting-menu-size",i);function s(l){d.onUnmounted(()=>{e.value=null}),l(n,e)}function o(){const l=d.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const c=o();if(!c)return;const u=c[a];return typeof u=="function"?u.bind(c):u},set(l,a,c){const u=o();return u?(u[a]=c,!0):!1}});return[s,r]}const Gv=xt,Yv={install:(n,e)=>{if(n.component("LeitingBIM",Qi),n.component("LeitingTree",Pi),n.component("LeitingDraggableCard",Re),n.component("leiting-draggable-card",Re),n.component("LeitingMenu",Nn),n.component("leiting-menu",Nn),n.component("LeitingSection",Un),n.component("leiting-section",Un),n.component("LeitingPlayer",_n),n.component("leiting-player",_n),n.component("LeitingInfo",Qn),n.component("leiting-info",Qn),n.component("LeitingPosition",Hn),n.component("leiting-position",Hn),n.component("LeitingSetting",Gn),n.component("leiting-setting",Gn),!e)return;const t={...Gv,...e};t.cesiumUrl&&ts(t).catch(i=>{console.error("[LeitingBim] Failed to load Cesium resources:",i)}),n.config.globalProperties.$leitingBimOptions=t}};var W={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function gc(n="soft"){switch(n){case"auto":{W.session.styleMap=new Map,W.session.nodeMap=new Map;return}case"soft":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap,W.computedStyle=new WeakMap,W.baseStyle=new Map,W.defaultStyle=new Map,W.image=new Map,W.background=new Map,W.resource=new Map,W.font=new Set;return}default:{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}}}function uo(n){const e=n.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;const t=e[2].trim();return t.startsWith("#")?null:t}function Vv(n){if(!n||n==="none")return"";let e=n.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==6?`matrix(${i})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${i})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Hi(n){if(/%[0-9A-Fa-f]{2}/.test(n))return n;try{return encodeURI(n)}catch{return n}}function Wv(n="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:t=12}={}){const i=new Map;let s=0;function o(r,l,a){if(s>=t)return;const c=Date.now();(i.get(l)||0)>c||(i.set(l,c+e),s++,r==="warn"&&console&&console.warn?console.warn(`${n} ${a}`):console&&console.error&&console.error(`${n} ${a}`))}return{warnOnce(r,l){o("warn",r,l)},errorOnce(r,l){o("error",r,l)},reset(){i.clear(),s=0}}}var mc=Wv("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),ho=new Map,Gi=new Map;function zv(n){return/^data:|^blob:|^about:blank$/i.test(n)}function jv(n,e){try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(i||".",t),o=new URL(n,t);if(o.origin===s.origin)return!0;const r=o.searchParams;if(r&&(r.has("url")||r.has("target")))return!0}catch{}return!1}function $v(n,e){if(!e||zv(n)||jv(n,e))return!1;try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=new URL(n,t);return typeof location<"u"?i.origin!==location.origin:!0}catch{return!!e}}function Kv(n,e){if(!e)return n;if(e.includes("{url}"))return e.replace("{urlRaw}",Hi(n)).replace("{url}",encodeURIComponent(n));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(n)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(n)}`;if(e.endsWith("/"))return`${e}${Hi(n)}`;const t=e.includes("?")?"&":"?";return`${e}${t}url=${encodeURIComponent(n)}`}function Ac(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(new Error("read_failed")),i.readAsDataURL(n)})}function qv(n,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,n].join("|")}async function je(n,e={}){const t=e.as??"blob",i=e.timeout??3e3,s=e.useProxy||"",o=e.errorTTL??8e3,r=e.headers||{},l=!!e.silent;if(/^data:/i.test(n))try{if(t==="text")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1};if(t==="dataURL")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1,mime:String(n).slice(5).split(";")[0]||""};const[,g="",y=""]=String(n).match(/^data:([^,]*),(.*)$/)||[],I=/;base64/i.test(g)?atob(y):decodeURIComponent(y),M=new Uint8Array([...I].map(S=>S.charCodeAt(0))),k=new Blob([M],{type:(g||"").split(";")[0]||""});return{ok:!0,data:k,status:200,url:n,fromCache:!1,mime:k.type||""}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(n))try{const g=await fetch(n);if(!g.ok)return{ok:!1,data:null,status:g.status,url:n,fromCache:!1,reason:"http_error"};const y=await g.blob(),E=y.type||g.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(y),status:g.status,url:n,fromCache:!1,mime:E}:t==="text"?{ok:!0,data:await y.text(),status:g.status,url:n,fromCache:!1,mime:E}:{ok:!0,data:y,status:g.status,url:n,fromCache:!1,mime:E}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(n))return t==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:n,fromCache:!1,mime:"image/png"}:{ok:!0,data:t==="text"?"":new Blob([]),status:200,url:n,fromCache:!1};const a=qv(n,{as:t,timeout:i,useProxy:s,errorTTL:o}),c=Gi.get(a);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Gi.delete(a);const u=ho.get(a);if(u)return u;const f=$v(n,s)?Kv(n,s):n;let p=e.credentials;if(!p)try{const g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(n,g);p=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{p="omit"}const h=new AbortController,A=setTimeout(()=>h.abort("timeout"),i),C=(async()=>{try{const g=await fetch(f,{signal:h.signal,credentials:p,headers:r});if(!g.ok){const I={ok:!1,data:null,status:g.status,url:f,fromCache:!1,reason:"http_error"};if(o>0&&Gi.set(a,{until:Date.now()+o,result:I}),!l){const M=`${g.status} ${g.statusText||""}`.trim();mc.warnOnce(`http:${g.status}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,`HTTP error ${M} while fetching ${t} ${n}`)}return e.onError&&e.onError(I),I}if(t==="text")return{ok:!0,data:await g.text(),status:g.status,url:f,fromCache:!1};const y=await g.blob(),E=y.type||g.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await Ac(y),status:g.status,url:f,fromCache:!1,mime:E}:{ok:!0,data:y,status:g.status,url:f,fromCache:!1,mime:E}}catch(g){const y=g&&typeof g=="object"&&"name"in g&&g.name==="AbortError"?String(g.message||"").includes("timeout")?"timeout":"abort":"network",E={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(!/^blob:/i.test(n)&&o>0&&Gi.set(a,{until:Date.now()+o,result:E}),!l){const I=`${y}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,M=y==="timeout"?`Timeout after ${i}ms. Consider increasing timeout or using a proxy for ${n}`:y==="abort"?`Request aborted while fetching ${t} ${n}`:`Network/CORS issue while fetching ${t} ${n}. A proxy may be required`;mc.errorOnce(I,M)}return e.onError&&e.onError(E),E}finally{clearTimeout(A),ho.delete(a)}})();return ho.set(a,C),C}function fo(n,e){if(!e||!n.width||!n.height)return n;const t=document.createElement("canvas");t.width=n.width,t.height=n.height;const i=t.getContext("2d");return i.fillStyle=e,i.fillRect(0,0,t.width,t.height),i.drawImage(n,0,0),t}async function po(n,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(n)||n.trim()==="none")return n;const i=uo(n);if(!i)return n;const s=Hi(i);if(W.background.has(s)){const o=W.background.get(s);return o?`url("${o}")`:"none"}try{const o=await je(s,{as:"dataURL",useProxy:e.useProxy});return o.ok?(W.background.set(s,o.data),`url("${o.data}")`):(W.background.set(s,null),"none")}catch{return W.background.set(s,null),"none"}}var yc=new Set(["meta","script","noscript","title","link","template"]),Yi=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Xv=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function Jv(){for(let n of Xv){const e=String(n).toLowerCase();yc.has(e)||Yi.has(e)||Cc(e)}}function Cc(n){if(n=String(n).toLowerCase(),Yi.has(n)){const o={};return W.defaultStyle.set(n,o),o}if(W.defaultStyle.has(n))return W.defaultStyle.get(n);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));const t=document.createElement(n);t.style.all="initial",e.appendChild(t);const i=getComputedStyle(t),s={};for(let o of i){if(Ec(o))continue;const r=i.getPropertyValue(o);s[o]=r}return e.removeChild(t),W.defaultStyle.set(n,s),s}var Zv=/(?:^|-)(animation|transition)(?:-|$)/i,eI=/^(--|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,tI=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope"]);function Ec(n){const e=String(n).toLowerCase();return!!(tI.has(e)||eI.test(e)||Zv.test(e))}function go(n,e){if(e=String(e||"").toLowerCase(),Yi.has(e))return"";const t=[],i=Cc(e);for(let[s,o]of Object.entries(n)){if(Ec(s))continue;const r=i[s];o&&o!==r&&t.push(`${s}:${o}`)}return t.sort(),t.join(";")}function nI(n){const e=new Set;return n.nodeType!==Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(n.tagName&&e.add(n.tagName.toLowerCase()),typeof n.querySelectorAll=="function"&&n.querySelectorAll("*").forEach(t=>e.add(t.tagName.toLowerCase())),Array.from(e))}function iI(n){const e=new Map;for(let i of n){const s=W.defaultStyle.get(i);if(!s)continue;const o=Object.entries(s).map(([r,l])=>`${r}:${l};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(i))}let t="";for(let[i,s]of e.entries())t+=`${s.join(",")} { ${i} }
118
118
  `;return t}function sI(n){const e=Array.from(new Set(n.values())).filter(Boolean).sort(),t=new Map;let i=1;for(const s of e)t.set(s,`c${i++}`);return t}function mo(n,e=null){if(!(n instanceof Element))return window.getComputedStyle(n,e);let t=W.computedStyle.get(n);if(t||(t=new Map,W.computedStyle.set(n,t)),!t.has(e)){const i=window.getComputedStyle(n,e);t.set(e,i)}return t.get(e)}function wc(n){const e={};for(let t of n)e[t]=n.getPropertyValue(t);return e}function Ao(n){const e=[];let t=0,i=0;for(let s=0;s<n.length;s++){const o=n[s];o==="("&&t++,o===")"&&t--,o===","&&t===0&&(e.push(n.slice(i,s).trim()),i=s+1)}return e.push(n.slice(i).trim()),e}function ln(n,{fast:e=!1}={}){if(e)return n();"requestIdleCallback"in window?requestIdleCallback(n,{timeout:50}):setTimeout(n,1)}function nt(){const n=typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"",e=/^((?!chrome|android).)*safari/i.test(n),t=/AppleWebKit/i.test(n)&&/Mobile/i.test(n)&&!/Safari/i.test(n),i=/(MicroMessenger|wxwork|WeCom|WindowsWechat|MacWechat)/i.test(n);return e||t||i}var bc=new WeakMap,yo=new Map,Co=0;function Yn(){Co++}var vc=!1;function oI(n=document.documentElement){if(!vc){vc=!0;try{new MutationObserver(()=>Yn()).observe(n,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(()=>Yn()).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{const e=document.fonts;e&&(e.addEventListener?.("loadingdone",Yn),e.ready?.then(()=>Yn()).catch(()=>{}))}catch{}}}function rI(n,e={}){const t={},i=n.getPropertyValue("visibility");for(let s=0;s<n.length;s++){const o=n[s];let r=n.getPropertyValue(o);(o==="background-image"||o==="content")&&r.includes("url(")&&!r.includes("data:")&&(r="none"),t[o]=r}if(e.embedFonts){const s=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(const o of s)if(!t[o])try{const r=n.getPropertyValue(o);r&&(t[o]=r)}catch{}}return i==="hidden"&&(t.opacity="0"),t}var Ic=new WeakMap;function aI(n){let e=Ic.get(n);return e||(e=Object.entries(n).sort((i,s)=>i[0]<s[0]?-1:i[0]>s[0]?1:0).map(([i,s])=>`${i}:${s}`).join(";"),Ic.set(n,e),e)}function lI(n,e=null,t={}){const i=bc.get(n);if(i&&i.epoch===Co)return i.snapshot;const s=e||getComputedStyle(n),o=rI(s,t);return pI(n,s,o),bc.set(n,{epoch:Co,snapshot:o}),o}function cI(n,e){return n&&n.session&&n.persist?n:n&&(n.styleMap||n.styleCache||n.nodeMap)?{session:n,persist:{snapshotKeyCache:yo,defaultStyle:W.defaultStyle,baseStyle:W.baseStyle,image:W.image,resource:W.resource,background:W.background,font:W.font},options:e||{}}:{session:W.session,persist:{snapshotKeyCache:yo,defaultStyle:W.defaultStyle,baseStyle:W.baseStyle,image:W.image,resource:W.resource,background:W.background,font:W.font},options:n||e||{}}}async function cn(n,e,t,i){if(n.tagName==="STYLE")return;const s=cI(t,i),o=s.options&&s.options.cache||"auto";if(o!=="disabled"&&oI(document.documentElement),o==="disabled"&&!s.session.__bumpedForDisabled&&(Yn(),yo.clear(),s.session.__bumpedForDisabled=!0),Yi.has(n.tagName?.toLowerCase())){const p=n.getAttribute?.("style");p&&e.setAttribute("style",p)}const{session:r,persist:l}=s;r.styleCache.has(n)||r.styleCache.set(n,getComputedStyle(n));const a=r.styleCache.get(n),c=lI(n,a,s.options),u=aI(c);let f=l.snapshotKeyCache.get(u);if(!f){const p=n.tagName?.toLowerCase()||"div";f=go(c,p),l.snapshotKeyCache.set(u,f)}r.styleMap.set(e,f)}function dI(n){return n instanceof HTMLImageElement||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof HTMLIFrameElement||n instanceof SVGElement||n instanceof HTMLObjectElement||n instanceof HTMLEmbedElement}function uI(n){return n.backgroundImage&&n.backgroundImage!=="none"||n.backgroundColor&&n.backgroundColor!=="rgba(0, 0, 0, 0)"&&n.backgroundColor!=="transparent"||(parseFloat(n.borderTopWidth)||0)>0||(parseFloat(n.borderBottomWidth)||0)>0||(parseFloat(n.paddingTop)||0)>0||(parseFloat(n.paddingBottom)||0)>0?!0:(n.overflowBlock||n.overflowY||"visible")!=="visible"}function hI(n){const e=n.parentElement;if(!e)return!1;const t=getComputedStyle(e).display||"";return t.includes("flex")||t.includes("grid")}function fI(n,e){if(n.textContent&&/\S/.test(n.textContent))return!0;const t=n.firstElementChild,i=n.lastElementChild;if(t&&t.tagName==="BR"||i&&i.tagName==="BR")return!0;const s=n.scrollHeight;if(s===0)return!1;const o=parseFloat(e.paddingTop)||0,r=parseFloat(e.paddingBottom)||0;return s>o+r}function pI(n,e,t){if(n instanceof HTMLElement&&n.style&&n.style.height)return;const i=e.display||"";if(i.includes("flex")||i.includes("grid")||dI(n))return;const s=e.position;s==="absolute"||s==="fixed"||s==="sticky"||e.transform==="none"&&(uI(e)||hI(n)||fI(n,e)&&(delete t.height,delete t["block-size"]))}function gI(n,e){if(!(n instanceof Element)||!(e instanceof Element))return;const t=n.getAttribute?.("style");let i=!!(t&&t.includes("var("));if(!i&&n.attributes?.length){const r=n.attributes;for(let l=0;l<r.length;l++){const a=r[l];if(a&&typeof a.value=="string"&&a.value.includes("var(")){i=!0;break}}}if(!i)return;let s;try{s=getComputedStyle(n)}catch{return}const o=n.style;if(o&&o.length)for(let r=0;r<o.length;r++){const l=o[r],a=o.getPropertyValue(l);if(!a||!a.includes("var("))continue;const c=s.getPropertyValue(l);if(c)try{e.style.setProperty(l,c.trim(),o.getPropertyPriority(l))}catch{}}if(n.attributes?.length){const r=n.attributes;for(let l=0;l<r.length;l++){const a=r[l];if(!a||typeof a.value!="string"||!a.value.includes("var("))continue;const c=a.name;let u="";try{u=s.getPropertyValue(c)}catch{}if(u)try{e.style.setProperty(c,u.trim())}catch{}}}}function Eo(n,e,t){return Promise.all(n.map(i=>new Promise(s=>{function o(){ln(r=>{(r&&typeof r.timeRemaining=="function"?r.timeRemaining()>0:!0)?e(i,s):o()},{fast:t})}o()})))}function mI(n){return n=n.trim(),!n||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(n)?n:`${n}:not([data-sd-slotted])`}function AI(n,e,t=!0){return n.split(",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")||i.startsWith("@"))return i;const s=t?mI(i):i;return`:where(${e} ${s})`}).join(", ")}function yI(n,e){return n?(n=n.replace(/:host\(([^)]+)\)/g,(t,i)=>`:where(${e}:is(${i.trim()}))`),n=n.replace(/:host\b/g,`:where(${e})`),n=n.replace(/:host-context\(([^)]+)\)/g,(t,i)=>`:where(:where(${i.trim()}) ${e})`),n=n.replace(/::slotted\(([^)]+)\)/g,(t,i)=>`:where(${e} ${i.trim()})`),n=n.replace(/(^|})(\s*)([^@}{]+){/g,(t,i,s,o)=>{const r=AI(o,e,!0);return`${i}${s}${r}{`}),n):""}function CI(n){return n.shadowScopeSeq=(n.shadowScopeSeq||0)+1,`s${n.shadowScopeSeq}`}function EI(n){let e="";try{n.querySelectorAll("style").forEach(i=>{e+=(i.textContent||"")+`
119
119
  `});const t=n.adoptedStyleSheets||[];for(const i of t)try{if(i&&i.cssRules)for(const s of i.cssRules)e+=s.cssText+`
120
120
  `}catch{}}catch{}return e}function wI(n,e,t){if(!e)return;const i=document.createElement("style");i.setAttribute("data-sd",t),i.textContent=e,n.insertBefore(i,n.firstChild||null)}function bI(n,e){try{const t=n.currentSrc||n.src||"";if(!t)return;e.setAttribute("src",t),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function vI(n){const e=new Set;if(!n)return e;const t=/var\(\s*(--[A-Za-z0-9_-]+)\b/g;let i;for(;i=t.exec(n);)e.add(i[1]);return e}function II(n,e){try{let i=getComputedStyle(n).getPropertyValue(e).trim();if(i)return i}catch{}try{let i=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(i)return i}catch{}return""}function xI(n,e,t){const i=[];for(const s of e){const o=II(n,s);o&&i.push(`${s}: ${o};`)}return i.length?`${t}{${i.join("")}}