iflow-engine 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4750,7 +4750,7 @@ ${JSON.stringify(l,null,2)}
4750
4750
  4) 代码需要能在浏览器环境运行(不要使用 Node 专属 API)`},h=await this.llmApi.chat([o,a,c]);try{return this.extractCodeFromResponse(h)}catch(u){throw new Error(`无法从大模型响应中提取代码(修复重试阶段):${u.message}`)}}catch(o){throw console.error("[AI Manager] 修复后代码生成失败:",o),o}}async executeCode(e,t){try{const n=this.engine;let i=e;i=i.replace(/\b(const|let|var)\s+previousStepOutput\s*=\s*[^;]*;/g,""),i=i.replace(/\b(const|let|var)\s+previousStepOutput\s*;/g,"");const r=new Function("engine","previousStepOutput",`
4751
4751
  'use strict';
4752
4752
  ${i}
4753
- `)(n,t);return r&&typeof r.then=="function"?await r:r}catch(n){return console.error("[AI Manager] 代码执行失败:",n),"error"+n.message}}reset(){this.conversationHistory=[],this.steps=[],this.stepResults.clear(),this.state="idle",this.config?.debug&&console.log("[AI Manager] 对话已重置")}getState(){return this.state}getHistory(){return[...this.conversationHistory]}getSteps(){return[...this.steps]}getStepResults(){return new Map(this.stepResults)}}class zE{engine;points=[];isPlaying=!1;animationFrameId=null;playStartTime=0;playFromIndex=0;playToIndex=0;playOptions={};stayTimerId=null;playRangeToIndex=0;constructor(e){this.engine=e}init(){this.points=[],this.stop()}getCurrentPoint(){return{...this.engine.cameraModule.getCameraPose(),stayTime:0}}addPoint(e=0){const t=this.getCurrentPoint();return t.stayTime=e,this.points.push(t),this.points.length}addPoints(e){for(const t of e)this.points.push({...t});return this.points.length}savePoints(e){return this.addPoints(e)}removePoint(e){return e>=0&&e<this.points.length?(this.points.splice(e,1),!0):!1}clearPoints(){this.stop(),this.points=[]}getPoints(){return[...this.points]}getPointCount(){return this.points.length}updatePoint(e,t){return e>=0&&e<this.points.length?(this.points[e]={...t},!0):!1}jumpToPoint(e){return e>=0&&e<this.points.length?(this.stop(),this.engine.cameraModule.restoreCameraPose(this.points[e]),!0):!1}play(e={}){return this.points.length<2?(console.warn("PathRoaming: 至少需要2个点位才能播放"),!1):(this.isPlaying&&this.stop(),this.isPlaying=!0,this.playOptions={duration:3e3,loop:!1,...e},this.engine.controlModule.disActive(),this.playFromIndex=0,this.playToIndex=1,this.playRangeToIndex=this.points.length-1,this.playStartTime=performance.now(),this.animate(),!0)}playRange(e,t,n={}){return e<0||t>=this.points.length||e>=t?(console.warn("PathRoaming: 无效的索引范围"),!1):this.points.length<2?(console.warn("PathRoaming: 至少需要2个点位才能播放"),!1):(this.isPlaying&&this.stop(),this.isPlaying=!0,this.playOptions={duration:3e3,loop:!1,...n},this.engine.controlModule.disActive(),this.playFromIndex=e,this.playToIndex=e+1,this.playStartTime=performance.now(),this.playRangeToIndex=t,this.animate(),!0)}stop(){this.isPlaying=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.stayTimerId!==null&&(clearTimeout(this.stayTimerId),this.stayTimerId=null),this.engine.controlModule.active()}pause(){this.isPlaying&&(this.isPlaying=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.stayTimerId!==null&&(clearTimeout(this.stayTimerId),this.stayTimerId=null))}getIsPlaying(){return this.isPlaying}animate=()=>{if(!this.isPlaying)return;const e=performance.now()-this.playStartTime,t=this.playOptions.duration||3e3,n=Math.min(e/t,1),i=this.points[this.playFromIndex],r=this.points[this.playToIndex],o=this.interpolatePose(i,r,n);this.engine.cameraModule.restoreCameraPose(o),n>=1?this.onSegmentComplete():this.animationFrameId=requestAnimationFrame(this.animate)};onSegmentComplete(){const e=this.playToIndex;this.playOptions.onPointComplete&&this.playOptions.onPointComplete(e);const t=this.points[e];t.stayTime&&t.stayTime>0?this.stayTimerId=globalThis.setTimeout(()=>{this.stayTimerId=null,this.moveToNextSegment()},t.stayTime):this.moveToNextSegment()}moveToNextSegment(){const e=this.playToIndex>=this.playRangeToIndex,t=this.playToIndex>=this.points.length-1;e||t?this.playOptions.loop&&this.points.length>=2?(this.playFromIndex=0,this.playToIndex=1,this.playRangeToIndex=this.points.length-1,this.playStartTime=performance.now(),this.animate()):this.onPlayComplete():(this.playFromIndex=this.playToIndex,this.playToIndex=this.playToIndex+1,this.playStartTime=performance.now(),this.animate())}onPlayComplete(){this.stop(),this.playOptions.onComplete&&this.playOptions.onComplete()}interpolatePose(e,t,n){const i=this.easeInOutCubic(n),r={type:t.type,position:{x:Ft.lerp(e.position.x,t.position.x,i),y:Ft.lerp(e.position.y,t.position.y,i),z:Ft.lerp(e.position.z,t.position.z,i)},rotation:{x:Ft.lerp(e.rotation.x,t.rotation.x,i),y:Ft.lerp(e.rotation.y,t.rotation.y,i),z:Ft.lerp(e.rotation.z,t.rotation.z,i)},quaternion:{x:Ft.lerp(e.quaternion.x,t.quaternion.x,i),y:Ft.lerp(e.quaternion.y,t.quaternion.y,i),z:Ft.lerp(e.quaternion.z,t.quaternion.z,i),w:Ft.lerp(e.quaternion.w,t.quaternion.w,i)}};return e.target&&t.target?r.target={x:Ft.lerp(e.target.x,t.target.x,i),y:Ft.lerp(e.target.y,t.target.y,i),z:Ft.lerp(e.target.z,t.target.z,i)}:t.target&&(r.target={...t.target}),e.zoom!==void 0&&t.zoom!==void 0&&(r.zoom=Ft.lerp(e.zoom,t.zoom,i)),r}easeInOutCubic(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}dispose(){this.stop(),this.points=[],this.playOptions={}}}class HE{options;DeviceType;animationId=null;isRenderingPaused=!1;controlsEnabledBeforePause=!0;animate;onWindowResize;scene;camera;renderer;sceneModule;cameraModule;deviceModule;renderModule;controlModule;composerModule;loaderModule;engineStatus;events;lightModule;interactionModule;modelToolModule;worldToScreen;handelBehaved;octreeBox;controls;stats;catchSvg;viewCube;rangeScale;setting;measure;clipping;modelTree;engineInfo;modelProperties;modelMapperBatch;modelEdge;ai;pathRoaming;models=[];reactBoundingClientRect={left:0,top:0};container;constructor(e){if(this.options=e,this.container=document.getElementById(e.containerId),!this.container)throw new Error(`Container ${e.containerId} not found`);this.ai=new FE(this),this.deviceModule=new c2(this),this.DeviceType=this.deviceModule.getDeviceType(),this.cameraModule=new l2(this),this.sceneModule=new a2(this),this.scene=this.sceneModule.scene,this.renderModule=new h2(this),this.renderer=this.renderModule.createRenderer(),this.camera=this.cameraModule.orthographicCamera,this.scene.camera=this.camera,this.controlModule=new E2(this),this.controlModule.switchDefaultMode(),this.controls=this.controlModule.orbitControls,this.composerModule=new F2(this),this.composerModule.init(),this.events=new h3,this.engineStatus=new c3(this),this.engineStatus.init(),this.loaderModule=new l3(this),this.lightModule=new u3(this),this.lightModule.init(),this.viewCube=new T3(this),this.viewCube.init(),this.options.showViewCube==!1&&this.viewCube.hide(),this.octreeBox=C3(this),this.rangeScale=new A3(this),this.rangeScale.init(),this.clipping=new IE(this),this.clipping.init(),this.setting=new P3(this),this.setting.init(),this.handelBehaved=Xh(this),this.modelMapperBatch=new kE(this),this.measure=new O3(this),this.modelToolModule=new p3(this),this.modelProperties=new NE(this),this.interactionModule=new d3(this),this.interactionModule.init(),this.interactionModule.active(),this.modelEdge=new UE(this),this.modelTree=new DE(this),this.engineInfo=new BE(this),this.pathRoaming=new zE(this),this.pathRoaming.init(),this.worldToScreen=new Un(this.camera,this.renderer,this.scene),this.options.showStats&&(this.stats=new y3,this.stats.showPanel(0),this.stats.dom.style.position="absolute",this.stats.dom.style.top="0px",this.stats.dom.style.left="0px",this.stats.dom.style.zIndex="1000",this.container.appendChild(this.stats.dom));let t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.style.position="absolute",t.style.width="100%",t.style.height="100%",t.style.zIndex="1000",t.style.left="0px",t.style.top="0px",t.style.pointerEvents="none";const n=this.renderer?.domElement.width||1920,i=this.renderer?.domElement.height||1080;t.setAttribute("viewBox",`0 0 ${n} ${i}`),t.setAttribute("preserveAspectRatio","none"),this.container.appendChild(t),this.catchSvg=t,this.onWindowResize=()=>{this.handleWindowResize()},window.addEventListener("resize",this.onWindowResize),this.animate=()=>{if(!this.isRenderingPaused)this.animationId=requestAnimationFrame(this.animate);else{this.animationId=null;return}if(this.stats&&this.stats.begin(),this.composerModule&&this.composerModule.composer.render(),this.viewCube&&this.viewCube.cubeTool.RenderScene(),this.measure.update(),this.controlModule.update(),this.stats&&this.stats.end(),this.scene){let r=this.scene?.dirLight;r&&this.camera&&this.updateLightPosition(this.camera,r)}},this.animate()}updateLightPosition(e,t){const n=new R;e.getWorldDirection(n);const i=new R().copy(n).multiplyScalar(-100);t.position.copy(e.position).add(i);const r=new R().copy(e.position).add(n.multiplyScalar(20));t.target.position.copy(r),t.target.updateMatrixWorld()}pauseRendering(){if(this.isRenderingPaused){console.warn("[BimEngine] Rendering is already paused");return}this.isRenderingPaused=!0,this.controls&&(this.controlsEnabledBeforePause=this.controls.enabled,this.controls.enabled=!1)}resumeRendering(){if(!this.isRenderingPaused){console.warn("[BimEngine] Rendering is not paused");return}this.isRenderingPaused=!1,this.controls&&(this.controls.enabled=this.controlsEnabledBeforePause),this.animationId===null&&this.animate()}isRenderingPausedState(){return this.isRenderingPaused}handleWindowResize(e,t){if(!this.container||!this.renderer||!this.camera)return;if(e===void 0||t===void 0){const i=this.deviceModule.getContainerSize();e=e??i.width,t=t??i.height}if(!e||!t)return;this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(e,t);const n=e/t;if(this.camera===this.cameraModule.perspectiveCamera)this.cameraModule.perspectiveCamera.aspect=n,this.cameraModule.perspectiveCamera.updateProjectionMatrix(),this.camera=this.cameraModule.perspectiveCamera;else if(this.camera===this.cameraModule.orthographicCamera){const i=this.cameraModule.orthographicCamera,r=50,o=this.container.clientWidth/this.container.clientHeight;i.left=r*o/-2,i.right=r*o/2,i.top=r/2,i.bottom=r/-2,i.updateProjectionMatrix()}if(this.catchSvg){const i=this.renderer.domElement.width,r=this.renderer.domElement.height;this.catchSvg.setAttribute("viewBox",`0 0 ${i} ${r}`)}this.events&&this.events.trigger(Ar.ViewportResize,{width:e,height:t})}dispose(){console.log("[BimEngine] Starting engine disposal..."),this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.isRenderingPaused=!0,this.onWindowResize&&window.removeEventListener("resize",this.onWindowResize);try{this.measure&&(this.measure.disActive(),this.measure.clearAll(),this.measure.annotationContainer&&this.measure.annotationContainer.remove()),this.clipping&&this.clipping.disActive(),this.interactionModule&&this.interactionModule.disActive(),this.viewCube&&this.viewCube.cubeTool&&typeof this.viewCube.cubeTool.dispose=="function"&&this.viewCube.cubeTool.dispose()}catch(e){console.warn("[BimEngine] Error disposing managers:",e)}try{this.controlModule&&(this.controlModule.originDiv&&this.controlModule.originDiv.remove(),this.controlModule.orbitControls&&typeof this.controlModule.orbitControls.dispose=="function"&&this.controlModule.orbitControls.dispose(),this.controlModule.firstPersonControls&&typeof this.controlModule.firstPersonControls.dispose=="function"&&this.controlModule.firstPersonControls.dispose())}catch(e){console.warn("[BimEngine] Error disposing controls:",e)}this.scene&&this.clearScene(this.scene);try{this.composerModule&&this.composerModule.composer&&(this.composerModule.composer.passes&&this.composerModule.composer.passes.forEach(e=>{e.dispose&&e.dispose()}),this.composerModule.composer.renderTarget1&&this.composerModule.composer.renderTarget1.dispose(),this.composerModule.composer.renderTarget2&&this.composerModule.composer.renderTarget2.dispose())}catch(e){console.warn("[BimEngine] Error disposing composer:",e)}try{this.renderModule&&this.renderModule.disposeRenderer(),this.renderer&&(this.renderer.domElement&&this.renderer.domElement.parentElement&&this.renderer.domElement.parentElement.removeChild(this.renderer.domElement),this.renderer.dispose(),this.renderer.forceContextLoss())}catch(e){console.warn("[BimEngine] Error disposing renderer:",e)}try{this.stats&&this.stats.dom&&this.stats.dom.parentElement&&this.stats.dom.parentElement.removeChild(this.stats.dom),this.catchSvg&&this.catchSvg.parentElement&&this.catchSvg.parentElement.removeChild(this.catchSvg)}catch(e){console.warn("[BimEngine] Error disposing DOM elements:",e)}try{this.events&&this.events.listeners&&this.events.listeners.clear()}catch(e){console.warn("[BimEngine] Error clearing event listeners:",e)}this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.models=[],this.container=null,console.log("[BimEngine] Engine disposal completed")}clearScene(e){e&&([...e.children].forEach(t=>{this.clearScene(t)}),e.parent&&e.parent.remove(e),e instanceof mt&&(e.geometry&&e.geometry.dispose(),e.material&&(Array.isArray(e.material)?e.material.forEach(t=>this.disposeMaterial(t)):this.disposeMaterial(e.material))),e instanceof hr&&(e.geometry&&e.geometry.dispose(),e.material&&this.disposeMaterial(e.material)),e instanceof Cp&&(e.geometry&&e.geometry.dispose(),e.material&&this.disposeMaterial(e.material)),e instanceof Ht&&(e.geometry&&e.geometry.dispose(),e.material&&(Array.isArray(e.material)?e.material.forEach(t=>this.disposeMaterial(t)):this.disposeMaterial(e.material)),e.instanceMatrix&&(e.instanceMatrix=null),e.instanceColor&&(e.instanceColor=null)),e instanceof Ax&&e.material&&this.disposeMaterial(e.material))}disposeMaterial(e){e&&(["map","lightMap","bumpMap","normalMap","specularMap","envMap","alphaMap","aoMap","displacementMap","emissiveMap","gradientMap","metalnessMap","roughnessMap","clearcoatMap","clearcoatNormalMap","clearcoatRoughnessMap","transmissionMap","thicknessMap","sheenColorMap","sheenRoughnessMap","specularIntensityMap","specularColorMap","iridescenceMap","iridescenceThicknessMap"].forEach(t=>{const n=e[t];n&&n instanceof zt&&n.dispose()}),e.dispose())}}function VE(s){return new HE(s)}class ns{engine=null;container;containerId;options;_isInitialized=!1;_isDestroyed=!1;unsubscribeTheme=null;currentMeasureType=null;isMeasureActive=!1;currentSectionMode=null;selectedComponent=null;constructor(e){this.container=e.container,this.container.id?this.containerId=this.container.id:(this.containerId=`engine-container-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,this.container.id=this.containerId),this.options={backgroundColor:"linear-gradient(to bottom, rgb(214, 224, 235), rgb(246, 250, 255))",version:e.version??"v2",showStats:e.showStats??!1,showViewCube:e.showViewCube??!0}}init(){if(this._isInitialized){console.warn("[Engine] Engine already initialized.");return}if(this._isDestroyed){console.error("[Engine] Cannot initialize destroyed engine.");return}try{typeof this.options.backgroundColor=="string"&&(this.container.style.background=this.options.backgroundColor);const e={containerId:this.containerId,backgroundColor:this.options.backgroundColor,version:this.options.version,showStats:this.options.showStats,showViewCube:this.options.showViewCube};if(console.log("引擎配置信息:",e),this.engine=VE(e),!this.engine)throw new Error("Failed to create engine instance");this._isInitialized=!0,this.unsubscribeTheme=ot.subscribe(t=>{this.setTheme(t)}),this.setTheme(ot.getTheme()),this.engine.events.on("click",t=>{const n=ft.getInstance();t&&t.object?(this.selectedComponent={url:t.object.url,id:t.object.name},console.log("[Engine] 构件选中:",this.selectedComponent),n.emit("component:selected",this.selectedComponent)):(this.selectedComponent=null,console.log("[Engine] 取消选中"),n.emit("component:deselected",{}))})}catch(e){throw console.error("[Engine] Failed to initialize engine:",e),this._isInitialized=!1,e}}setTheme(e){}setLocales(){}isInitialized(){return this._isInitialized}loadModel(e,t){if(!this._isInitialized||!this.engine){console.error("[Engine] Engine not initialized. Please call init() first.");return}if(!e){console.error("[Engine] Model URL is required.");return}this.engine.loaderModule.loadModels([e],t)}CameraGoHome(){this.engine.viewCube.CameraGoHome()}getEngine(){return this.engine}pauseRendering(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.pauseRendering()}resumeRendering(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.resumeRendering()}dispose(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.dispose()}activateMeasure(e){if(!this._isInitialized||!this.engine?.measure){console.error("[Engine] Cannot activate measure: engine not initialized.");return}if(this.currentMeasureType===e){console.log(`[Engine] Measure ${e} already active, skipping.`);return}this.isMeasureActive||(console.log("[Engine] Activating measure module"),this.engine.measure.active(),this.isMeasureActive=!0),console.log(`[Engine] Activating measure: ${e}`);const t=this.engine.measure;switch(e){case"clearHeight":t.clearHeightMeasure.active();break;case"clearDistance":t.clearDistanceMeasure.active();break;case"distance":t.distanceMeasure.active();break;case"elevation":t.elevationMeasure.active();break;case"point":t.pointMeasure.active();break;case"angle":t.angleMeasure.active();break;case"area":t.areaMeasure.active();break;case"slope":t.slopeMeasure.active();break;default:console.error(`[Engine] Unknown measure type: ${e}`);return}this.currentMeasureType=e}getCurrentMeasureType(){return this.currentMeasureType}deactivateMeasure(){!this._isInitialized||!this.engine?.measure||(console.log("[Engine] Deactivating measure"),this.engine.measure.disActive(),this.engine.measure.clearAll(),this.isMeasureActive=!1,this.currentMeasureType=null)}clearAllMeasures(){!this._isInitialized||!this.engine?.measure||(console.log("[Engine] Clearing all measures"),this.engine.measure.clearAll())}saveMeasureSetting(e){!this._isInitialized||!this.engine?.measure||this.engine.measure.saveSetting?.(e)}activeSection(e){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot activate section: engine not initialized.");return}if(this.currentSectionMode===e){console.log(`[Engine] Section ${e} already active, skipping.`);return}console.log(`[Engine] Activating section: ${e}`),this.engine.clipping.active(e),this.currentSectionMode=e}getCurrentSectionMode(){return this.currentSectionMode}setSectionBoxRange(e){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot set section box range: engine not initialized.");return}this.engine.clipping.updateClippingValue(e)}deactivateSection(){!this._isInitialized||!this.engine?.clipping||(console.log("[Engine] Deactivating all sections"),this.engine.clipping.disActive(),this.currentSectionMode=null)}hideSection(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot hide section: engine not initialized.");return}console.log("[Engine] Hiding section"),this.engine.clipping.disabled()}recoverSection(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot recover section: engine not initialized.");return}console.log("[Engine] Recovering section"),this.engine.clipping.recover()}fitSectionBoxToModel(){if(!this._isInitialized||!this.engine){console.error("[Engine] Cannot fit section box: engine not initialized.");return}const e=this.engine.engineStatus?.highlightModels;e&&(console.log("[Engine] Fitting section box to model"),this.engine.clipping?.clippingModel(e))}scaleSectionBox(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot scale section box: engine not initialized.");return}this.engine.clipping.scaleBox()}reverseSection(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot reverse section: engine not initialized.");return}this.engine.clipping.reverse()}isWalkModeActive=!1;activateFirstPersonMode(){if(!this._isInitialized||!this.engine){console.error("[Engine] Cannot activate first person mode: engine not initialized.");return}if(!this.engine.controlModule){console.error("[Engine] Control module not available.");return}if(this.isWalkModeActive){console.log("[Engine] First person mode already active, skipping.");return}console.log("[Engine] Activating first person mode"),this.engine.controlModule.switchFirstPersonMode(),this.loadWalkSettings(),this.isWalkModeActive=!0}deactivateFirstPersonMode(){!this._isInitialized||!this.engine?.controlModule||this.isWalkModeActive&&(console.log("[Engine] Deactivating first person mode"),this.engine.controlModule.switchDefaultMode(),this.isWalkModeActive=!1)}static WALK_SPEED_KEY="bim-walk-speed";static WALK_GRAVITY_KEY="bim-walk-gravity";static WALK_COLLISION_KEY="bim-walk-collision";setWalkSpeed(e){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot set walk speed: engine not initialized.");return}localStorage.setItem(ns.WALK_SPEED_KEY,String(e)),this.engine.controlModule.setMoveSpeed(e)}setWalkGravity(e){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot set walk gravity: engine not initialized.");return}localStorage.setItem(ns.WALK_GRAVITY_KEY,String(e)),this.engine.controlModule.setApplyGravity(e)}setWalkCollision(e){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot set walk collision: engine not initialized.");return}localStorage.setItem(ns.WALK_COLLISION_KEY,String(e)),this.engine.controlModule.setApplyCollision(e)}loadWalkSettings(){if(!this.engine?.controlModule)return;const e=localStorage.getItem(ns.WALK_SPEED_KEY),t=localStorage.getItem(ns.WALK_GRAVITY_KEY),n=localStorage.getItem(ns.WALK_COLLISION_KEY);this.engine.controlModule.setMoveSpeed(e?Number(e):1),this.engine.controlModule.setApplyGravity(t==="true"),this.engine.controlModule.setApplyCollision(n==="true")}toggleMiniMap(){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot toggle mini map: engine not initialized.");return}this.engine.controlModule.toggleMinMap()}isFirstPersonModeActive(){return this.isWalkModeActive}getSelectedComponent(){return this.selectedComponent}getComponentProperties(e,t,n){if(!this._isInitialized||!this.engine){console.error("[Engine] Cannot get component properties: engine not initialized.");return}if(!this.engine.modelProperties){console.error("[Engine] modelProperties not available");return}console.log("[Engine] Getting component properties:",{url:e,id:t}),this.engine.modelProperties.getModelProperties(e,t,n)}getTypeTreeData(){return!this._isInitialized||!this.engine?.modelTree?[]:this.engine.modelTree.getTypeTreeData()}getLevelTreeData(){return!this._isInitialized||!this.engine?.modelTree?[]:this.engine.modelTree.getLevelTreeData()}getMajorTreeData(){return!this._isInitialized||!this.engine?.modelTree?[]:this.engine.modelTree.getMajorTreeData()}activateZoomBox(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.rangeScale?.active()}getEngineInfo(){return!this._isInitialized||!this.engine?(console.warn("[Engine] Engine not initialized."),null):this.engine.engineInfo.getEngineInfo()}pathRoamingAddPoint(){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.addPoint(0)}pathRoamingRemovePoint(e){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.removePoint(e)}pathRoamingClearPoints(){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.clearPoints()}pathRoamingGetPoints(){return!this._isInitialized||!this.engine?.pathRoaming?(console.warn("[Engine] pathRoaming not available"),[]):this.engine.pathRoaming.getPoints()??[]}pathRoamingJumpToPoint(e){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.jumpToPoint(e)}pathRoamingPlay(e){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.play(e)}pathRoamingStop(){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.stop()}getHighlightModels(){return!this._isInitialized||!this.engine?null:this.engine.engineStatus?.highlightModels??null}highlightModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot highlight model: engine not initialized.");return}this.engine.modelToolModule.highlightModel(e)}unhighlightAllModels(){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot unhighlight models: engine not initialized.");return}this.engine.modelToolModule.unhighlightAllModels()}viewScaleToModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot view scale to model: engine not initialized.");return}this.engine.modelToolModule.viewScaleToModel(e)}hideModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot hide models: engine not initialized.");return}this.engine.modelToolModule.hideModel(e)}showModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot show model: engine not initialized.");return}this.engine.modelToolModule.showModel(e)}translucentModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot translucent models: engine not initialized.");return}e&&this.engine.modelToolModule.translucentModel(e)}unTranslucentModel(){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot cancel translucent: engine not initialized.");return}this.engine.modelToolModule.unTranslucentModel()}isolateModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot isolate models: engine not initialized.");return}e&&this.engine.modelToolModule.isolateModel(e)}translucentOtherModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot translucent other models: engine not initialized.");return}e&&this.engine.modelToolModule.translucentOtherModel(e)}showAllModels(){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot show all models: engine not initialized.");return}this.deactivateSection(),this.engine.modelToolModule.showAllModels()}batchSelectSameTypeModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot batch select: engine not initialized.");return}e&&this.engine.modelToolModule.batchSelectSameTypeModel(e)}batchSelectSameLevelModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot batch select: engine not initialized.");return}e&&this.engine.modelToolModule.batchSelectSameLevelModel(e)}batchSelectSameLevelTypeModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot batch select: engine not initialized.");return}e&&this.engine.modelToolModule.batchSelectSameLevelTypeModel(e)}destroy(){this._isDestroyed||(this.deactivateMeasure(),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.engine&&(this.engine.dispose(),this.engine=null),this.container.innerHTML="",this.currentMeasureType=null,this.isMeasureActive=!1,this._isDestroyed=!0,this._isInitialized=!1)}}class GE{element;content=null;isVisible=!1;onCloseCallback;options;mouseDownTime=0;CLICK_THRESHOLD=200;constructor(e){this.options=e,this.element=document.createElement("div"),this.element.className=`bim-right-key ${e?.className||""}`,e?.zIndex&&(this.element.style.zIndex=e.zIndex.toString()),document.body.appendChild(this.element)}init(){document.addEventListener("mousedown",this.handleGlobalClick),this.element.addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation()}),this.options?.container&&(this.options.container.addEventListener("mousedown",this.handleContainerMouseDown),this.options.container.addEventListener("mouseup",this.handleContainerMouseUp),this.options.container.addEventListener("contextmenu",this.handleContainerContextMenu))}setTheme(e){}setLocales(){}destroy(){document.removeEventListener("mousedown",this.handleGlobalClick),this.options?.container&&(this.options.container.removeEventListener("mousedown",this.handleContainerMouseDown),this.options.container.removeEventListener("mouseup",this.handleContainerMouseUp),this.options.container.removeEventListener("contextmenu",this.handleContainerContextMenu)),this.unmountContent(),this.element.remove()}handleContainerMouseDown=e=>{e.button===2&&(this.mouseDownTime=Date.now())};handleContainerMouseUp=e=>{e.button!==2||Date.now()-this.mouseDownTime>this.CLICK_THRESHOLD||this.options?.onContext&&this.options.onContext(e)};handleContainerContextMenu=e=>{e.preventDefault()};setOnClose(e){this.onCloseCallback=e}mount(e){this.unmountContent(),this.content=e,this.element.appendChild(e.getElement())}unmountContent(){this.content&&(this.content.destroy(),this.element.innerHTML="",this.content=null)}show(e,t){this.element.classList.add("visible"),this.isVisible=!0,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`;const n=this.element.getBoundingClientRect(),i=window.innerWidth,r=window.innerHeight;let o=e,a=t;e+n.width>i&&(o=e-n.width),t+n.height>r&&(a=t-n.height),this.element.style.left=`${o}px`,this.element.style.top=`${a}px`}hide(){this.element.classList.remove("visible"),this.isVisible=!1,this.unmountContent(),this.onCloseCallback&&this.onCloseCallback()}handleGlobalClick=e=>{this.isVisible&&(this.element.contains(e.target)||this.hide())}}class ed{element;options;unsubscribeLocale=null;unsubscribeTheme=null;activeSubMenu=null;constructor(e){this.options=e,this.element=document.createElement("ul"),this.element.className="bim-menu"}init(){this.render(),this.unsubscribeLocale=Yt.subscribe(()=>{this.setLocales()}),this.unsubscribeTheme=ot.subscribe(e=>{this.setTheme(e)})}setTheme(e){const t=this.element.style;t.setProperty("--bim-bg-elevated",e.bgElevated),t.setProperty("--bim-text-primary",e.textPrimary),t.setProperty("--bim-divider",e.divider),t.setProperty("--bim-component-bg-hover",e.componentBgHover),t.setProperty("--bim-shadow-lg",e.shadowLg)}setLocales(){this.element.innerHTML="",this.render()}destroy(){this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.closeSubMenu(),this.element.remove()}getElement(){return this.element}hasAnyIcon(e){return e.some(t=>t.icon?!0:t.children?this.hasAnyIcon(t.children):!1)}render(){const{items:e,groupOrder:t}=this.options;this.hasAnyIcon(e)?this.element.classList.add("has-icons"):this.element.classList.remove("has-icons");const n=new Map,i="default";e.forEach(o=>{const a=o.group||i;n.has(a)||n.set(a,[]),n.get(a).push(o)});let r=[];if(t){r=t.filter(o=>n.has(o));for(const o of n.keys())r.includes(o)||r.push(o)}else r=Array.from(n.keys());r.forEach((o,a)=>{if(a>0){const c=document.createElement("li");c.className="bim-menu-divider",this.element.appendChild(c)}const l=n.get(o);l.sort((c,h)=>(c.order||0)-(h.order||0)),l.forEach(c=>{if(c.visible!==!1&&(this.element.appendChild(this.createItemElement(c)),c.divider)){const h=document.createElement("li");h.className="bim-menu-divider",this.element.appendChild(h)}})})}createItemElement(e){const t=document.createElement("li"),n=!e.disabled;t.className=`bim-menu-item ${n?"":"disabled"}`;const i=document.createElement("div");i.className="bim-menu-item-icon",e.icon&&(i.innerHTML=e.icon),t.appendChild(i);const r=document.createElement("div");r.className="bim-menu-item-label",r.textContent=ve(e.label),t.appendChild(r);const o=e.children,a=o&&o.length>0;if(a){const l=document.createElement("div");l.className="bim-menu-item-arrow",l.innerHTML='<svg viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',t.appendChild(l),t.addEventListener("mouseenter",()=>this.openSubMenu(e,t))}else t.addEventListener("mouseenter",()=>this.closeSubMenu());return n&&t.addEventListener("click",l=>{l.stopPropagation(),console.log(`[BimMenu] Clicked item: ${e.id}`),a||(e.onClick?(console.log(`[BimMenu] Executing onClick for ${e.id}`),e.onClick()):console.warn(`[BimMenu] No onClick handler for ${e.id}`))}),t}openSubMenu(e,t){const n=e.children;if(!n||n.length===0)return;this.closeSubMenu();const i=document.createElement("div");i.style.position="fixed",i.style.zIndex="10001";const r=t.getBoundingClientRect();i.style.top=`${r.top}px`,i.style.left=`${r.right}px`,i.addEventListener("mousedown",l=>l.stopPropagation());const o=new ed({items:n});o.init(),i.appendChild(o.element),document.body.appendChild(i),this.activeSubMenu={menu:o,container:i};const a=i.getBoundingClientRect();a.right>window.innerWidth&&(i.style.left=`${r.left-a.width}px`)}closeSubMenu(){this.activeSubMenu&&(this.activeSubMenu.menu.destroy(),this.activeSubMenu.container.remove(),this.activeSubMenu=null)}}class Ug extends mi{container;rightKeyPanel;contextHandlers=[];constructor(e){super(),this.container=e,this.rightKeyPanel=new GE({zIndex:9e3,container:this.container,onContext:this.handleContextMenu}),this.rightKeyPanel.init()}destroy(){this.rightKeyPanel.destroy(),super.destroy()}registerHandler(e){this.contextHandlers.push(e)}showMenu(e,t,n,i){if(!n||n.length===0)return;const r=new ed({items:n,groupOrder:i});r.init(),this.rightKeyPanel.mount(r),this.rightKeyPanel.show(e,t)}hide(){this.rightKeyPanel.hide()}handleContextMenu=e=>{let t=null;for(const n of this.contextHandlers){const i=n(e);i&&i.length>0&&(t||(t=[]),t=t.concat(i))}t&&t.length>0?this.showMenu(e.clientX,e.clientY,t):this.hide()}}class WE extends mi{container;engineInstance=null;rightKey=null;constructor(e){super(),this.container=e}initialize(e){this.engineInstance&&this.engineInstance.isInitialized()&&(console.warn("[EngineManager] 3D Engine already initialized. Destroying old instance..."),this.engineInstance.destroy(),this.engineInstance=null);try{return this.engineInstance=new ns({container:this.container,...e}),this.engineInstance.init(),this.rightKey=new Ug(this.container),this.rightKey.registerHandler(t=>{const n=this.getSelectedComponent(),i=[];return n&&(i.push({id:"componentDetail",label:"menu.componentDetail",group:"component",order:1,divider:!0,onClick:()=>{ft.getInstance().componentDetail?.show(),this.rightKey?.hide()}}),i.push({id:"hideSelected",label:"menu.hideSelected",group:"component",order:2,onClick:()=>{const r=this.getHighlightModels();r&&this.hideModels(r),this.rightKey?.hide()}}),i.push({id:"transparentSelected",label:"menu.transparentSelected",group:"component",order:3,onClick:()=>{const r=this.getHighlightModels();r&&this.translucentModels(r),this.rightKey?.hide()}}),i.push({id:"cancelTranslucent",label:"menu.cancelTranslucent",group:"component",order:4,onClick:()=>{this.unTranslucentModel(),this.rightKey?.hide()}}),i.push({id:"isolateSelected",label:"menu.isolateSelected",group:"component",order:5,divider:!0,children:[{id:"hideOthers",label:"menu.hideOthers",onClick:()=>{const r=this.getHighlightModels();r&&this.isolateModels(r),this.rightKey?.hide()}},{id:"transparentOthers",label:"menu.transparentOthers",onClick:()=>{const r=this.getHighlightModels();r&&this.translucentOtherModels(r),this.rightKey?.hide()}}]}),i.push({id:"quickSelect",label:"menu.quickSelect",group:"component",order:6,children:[{id:"selectSameType",label:"menu.selectSameType",onClick:()=>{const r=this.getHighlightModels();r&&this.batchSelectSameTypeModel(r),this.rightKey?.hide()}},{id:"selectSameLevel",label:"menu.selectSameLevel",onClick:()=>{const r=this.getHighlightModels();r&&this.batchSelectSameLevelModel(r),this.rightKey?.hide()}},{id:"selectSameLevelType",label:"menu.selectSameLevelType",onClick:()=>{const r=this.getHighlightModels();r&&this.batchSelectSameLevelTypeModel(r),this.rightKey?.hide()}}]}),i.push({id:"fitSectionBox",label:"menu.fitSectionBox",group:"component",order:7,onClick:()=>{this.fitSectionBoxToModel(),this.rightKey?.hide()}})),i.push({id:"showAll",label:"menu.showAll",group:"component",order:8,onClick:()=>{this.showAllModels(),this.emit("menu:show-all",{}),this.rightKey?.hide()}}),i}),this.engineInstance.isInitialized()}catch(t){return console.error("[EngineManager] Failed to initialize 3D engine:",t),this.engineInstance=null,!1}}isInitialized(){return this.engineInstance!==null&&this.engineInstance.isInitialized()}loadModel(e,t){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.loadModel(e,t)}getEngine(){return this.engineInstance?this.engineInstance.getEngine():(console.warn("[EngineManager] 3D Engine not initialized."),null)}CameraGoHome(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.CameraGoHome()}pauseRendering(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.pauseRendering()}resumeRendering(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.resumeRendering()}activateMeasure(e){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activateMeasure(e)}deactivateMeasure(){this.engineInstance&&this.engineInstance.deactivateMeasure()}getCurrentMeasureType(){return this.engineInstance?this.engineInstance.getCurrentMeasureType():null}clearAllMeasures(){this.engineInstance&&this.engineInstance.clearAllMeasures()}saveMeasureSetting(e){this.engineInstance&&this.engineInstance.saveMeasureSetting(e)}activeSection(e){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activeSection(e)}getCurrentSectionMode(){return this.engineInstance?this.engineInstance.getCurrentSectionMode():null}deactivateSection(){this.engineInstance&&this.engineInstance.deactivateSection()}setSectionBoxRange(e){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.setSectionBoxRange(e)}hideSection(){this.engineInstance&&this.engineInstance.hideSection()}recoverSection(){this.engineInstance&&this.engineInstance.recoverSection()}fitSectionBoxToModel(){this.engineInstance&&this.engineInstance.fitSectionBoxToModel()}scaleSectionBox(){this.engineInstance&&this.engineInstance.scaleSectionBox()}reverseSection(){this.engineInstance&&this.engineInstance.reverseSection()}activateZoomBox(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activateZoomBox()}activateFirstPersonMode(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activateFirstPersonMode()}deactivateFirstPersonMode(){this.engineInstance&&this.engineInstance.deactivateFirstPersonMode()}setWalkSpeed(e){this.engineInstance?.setWalkSpeed(e)}setWalkGravity(e){this.engineInstance?.setWalkGravity(e)}setWalkCollision(e){this.engineInstance?.setWalkCollision(e)}toggleMiniMap(){this.engineInstance?.toggleMiniMap()}isFirstPersonModeActive(){return this.engineInstance?.isFirstPersonModeActive()??!1}getSelectedComponent(){return this.engineInstance?.getSelectedComponent()??null}getComponentProperties(e,t,n){this.engineInstance?.getComponentProperties(e,t,n)}getTypeTreeData(){return this.engineInstance?.getTypeTreeData()??[]}getLevelTreeData(){return this.engineInstance?.getLevelTreeData()??[]}getMajorTreeData(){return this.engineInstance?.getMajorTreeData()??[]}getEngineInfo(){return this.engineInstance?.getEngineInfo()??null}pathRoamingAddPoint(){this.engineInstance?.pathRoamingAddPoint()}pathRoamingRemovePoint(e){this.engineInstance?.pathRoamingRemovePoint(e)}pathRoamingClearPoints(){this.engineInstance?.pathRoamingClearPoints()}pathRoamingGetPoints(){return this.engineInstance?.pathRoamingGetPoints()??[]}pathRoamingJumpToPoint(e){this.engineInstance?.pathRoamingJumpToPoint(e)}pathRoamingPlay(e){this.engineInstance?.pathRoamingPlay(e)}pathRoamingStop(){this.engineInstance?.pathRoamingStop()}getHighlightModels(){return this.engineInstance?.getHighlightModels()??null}highlightModel(e){this.engineInstance?.highlightModel(e)}unhighlightAllModels(){this.engineInstance?.unhighlightAllModels()}viewScaleToModel(e){this.engineInstance?.viewScaleToModel(e)}hideModels(e){this.engineInstance?.hideModels(e)}showModel(e){this.engineInstance?.showModel(e)}translucentModels(e){this.engineInstance?.translucentModels(e)}unTranslucentModel(){this.engineInstance?.unTranslucentModel()}isolateModels(e){this.engineInstance?.isolateModels(e)}translucentOtherModels(e){this.engineInstance?.translucentOtherModels(e)}showAllModels(){this.engineInstance?.showAllModels()}batchSelectSameTypeModel(e){this.engineInstance?.batchSelectSameTypeModel(e)}batchSelectSameLevelModel(e){this.engineInstance?.batchSelectSameLevelModel(e)}batchSelectSameLevelTypeModel(e){this.engineInstance?.batchSelectSameLevelTypeModel(e)}destroy(){this.engineInstance&&(this.engineInstance.destroy(),this.engineInstance=null),this.rightKey&&(this.rightKey.destroy(),this.rightKey=null),super.destroy()}}var Mt=(s=>(s[s.Unchecked=0]="Unchecked",s[s.Checked=1]="Checked",s[s.Indeterminate=2]="Indeterminate",s))(Mt||{});class XE{config;element;children=[];parent=null;checkState=Mt.Unchecked;contentEl;switcherEl;checkboxEl=null;titleEl;actionsEl;childrenContainer;onExpandChange;onCheckChange;onNodeClick;renderActions;constructor(e,t,n){this.config=e,this.onExpandChange=n.onExpand,this.onCheckChange=n.onCheck,this.onNodeClick=n.onClick,this.renderActions=t.renderActions,this.checkState=e.checked?Mt.Checked:Mt.Unchecked,this.element=this.createDom(t)}createDom(e){const t=document.createElement("div");t.className="bim-tree-node",this.config.disabled&&t.classList.add("is-disabled"),this.contentEl=document.createElement("div"),this.contentEl.className="bim-tree-node-content",this.switcherEl=document.createElement("span"),this.switcherEl.className="bim-tree-switcher",this.switcherEl.innerHTML='<svg viewBox="0 0 1024 1024"><path d="M288 192l448 320-448 320z"></path></svg>';const n=this.config.children&&this.config.children.length>0;if(n?this.config.expanded&&this.switcherEl.classList.add("is-expanded"):this.switcherEl.classList.add("is-hidden"),this.switcherEl.addEventListener("click",r=>{r.stopPropagation(),this.toggleExpand()}),this.contentEl.appendChild(this.switcherEl),e.checkable!==!1&&(this.checkboxEl=document.createElement("span"),this.checkboxEl.className="bim-tree-checkbox",this.updateCheckboxUI(),this.checkboxEl.addEventListener("click",r=>{r.stopPropagation(),!this.config.disabled&&this.toggleCheck()}),this.contentEl.appendChild(this.checkboxEl)),this.config.icon){const r=document.createElement("span");r.className="bim-tree-icon",r.innerHTML=this.config.icon.includes("<svg")?this.config.icon:`<img src="${this.config.icon}" />`,this.contentEl.appendChild(r)}this.titleEl=document.createElement("span"),this.titleEl.className="bim-tree-title",this.updateLabel(),this.contentEl.appendChild(this.titleEl),this.actionsEl=document.createElement("div"),this.actionsEl.className="bim-tree-node-actions",this.actionsEl.addEventListener("click",r=>{r.stopPropagation()}),this.contentEl.appendChild(this.actionsEl),this.contentEl.addEventListener("click",r=>{if(r.stopPropagation(),this.config.disabled)return;(this.config.clickAction||"select")==="expand"?this.toggleExpand():this.onNodeClick(this)}),t.appendChild(this.contentEl),this.childrenContainer=document.createElement("div"),this.childrenContainer.className="bim-tree-children";const i=e.indent||24;return this.childrenContainer.style.paddingLeft=`${i}px`,this.config.expanded&&n&&this.childrenContainer.classList.add("is-visible"),t.appendChild(this.childrenContainer),t}setSelected(e){if(e){if(this.contentEl.classList.add("is-selected"),this.renderActions){const t=this.renderActions(this.config);this.actionsEl.innerHTML="",typeof t=="string"?this.actionsEl.innerHTML=t:t instanceof HTMLElement&&this.actionsEl.appendChild(t)}}else this.contentEl.classList.remove("is-selected"),this.actionsEl.innerHTML=""}updateLabel(){this.titleEl&&(this.titleEl.textContent=this.config.label)}toggleExpand(e){if(!this.config.children||this.config.children.length===0)return;const t=e!==void 0?e:!this.config.expanded;this.config.expanded=t,t?(this.switcherEl.classList.add("is-expanded"),this.childrenContainer.classList.add("is-visible")):(this.switcherEl.classList.remove("is-expanded"),this.childrenContainer.classList.remove("is-visible")),e===void 0&&this.onExpandChange(this)}toggleCheck(){const e=this.checkState!==Mt.Checked;this.setChecked(e?Mt.Checked:Mt.Unchecked,!0)}setChecked(e,t=!1,n=!1){!n&&this.checkState===e||(this.checkState=e,this.config.checked=e===Mt.Checked,this.updateCheckboxUI(),t&&this.onCheckChange(this))}updateCheckboxUI(){this.checkboxEl&&(this.checkboxEl.classList.remove("is-checked","is-indeterminate"),this.checkState===Mt.Checked?this.checkboxEl.classList.add("is-checked"):this.checkState===Mt.Indeterminate&&this.checkboxEl.classList.add("is-indeterminate"))}appendChild(e){e.parent=this,this.children.push(e),this.childrenContainer.appendChild(e.element),this.children.length===1&&this.switcherEl.classList.remove("is-hidden")}destroy(){this.children.forEach(e=>e.destroy()),this.children=[],this.element.remove(),this.parent=null}}class jE{element;contentElement;searchInput=null;searchResults=null;options;nodeMap=new Map;rootNodes=[];selectedNode=null;unsubscribeLocale=null;unsubscribeTheme=null;clickOutsideHandler=null;onNodeCheck;onNodeSelect;onNodeDeselect;onNodeExpand;constructor(e){this.options={checkable:!0,checkStrictly:!0,indent:24,defaultExpandAll:!0,enableSearch:!1,searchPlaceholder:"tree.searchPlaceholder",...e},this.element=document.createElement("div"),this.element.className="bim-tree",this.options.enableSearch&&this.createSearchDOM(),this.contentElement=document.createElement("div"),this.contentElement.className="bim-tree-content",this.element.appendChild(this.contentElement),e.onNodeCheck&&(this.onNodeCheck=e.onNodeCheck),e.onNodeSelect&&(this.onNodeSelect=e.onNodeSelect),e.onNodeDeselect&&(this.onNodeDeselect=e.onNodeDeselect),e.onNodeExpand&&(this.onNodeExpand=e.onNodeExpand)}createSearchDOM(){const e=document.createElement("div");e.className="bim-tree-search";const t=document.createElement("div");t.className="bim-tree-search-wrapper";const n=document.createElement("span");n.className="bim-tree-search-icon",n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m21 21l-4.343-4.343m0 0A8 8 0 1 0 5.343 5.343a8 8 0 0 0 11.314 11.314"/></svg>',t.appendChild(n),this.searchInput=document.createElement("input"),this.searchInput.className="bim-tree-search-input",this.searchInput.type="text",this.searchInput.placeholder=ve(this.options.searchPlaceholder||"搜索..."),this.searchInput.addEventListener("input",i=>{const r=i.target.value;this.handleSearch(r)}),t.appendChild(this.searchInput),e.appendChild(t),this.searchResults=document.createElement("div"),this.searchResults.className="bim-tree-search-results",e.appendChild(this.searchResults),this.element.appendChild(e),this.clickOutsideHandler=i=>{this.searchResults&&!this.searchResults.contains(i.target)&&!this.searchInput?.contains(i.target)&&this.searchResults.classList.remove("is-visible")},document.addEventListener("click",this.clickOutsideHandler)}init(){this.render(),this.unsubscribeLocale=Yt.subscribe(()=>this.setLocales()),this.unsubscribeTheme=ot.subscribe(e=>this.setTheme(e)),this.setTheme(ot.getTheme())}handleSearch(e){if(!this.searchResults)return;if(!e.trim()){this.searchResults.classList.remove("is-visible"),this.searchResults.innerHTML="";return}const t=[],n=e.toLowerCase();this.nodeMap.forEach(i=>{const r=i.config.label;r.toLowerCase().includes(n)&&t.push({node:i,label:r,path:this.getNodePath(i)})}),this.renderSearchResults(t)}getNodePath(e){const t=[];let n=e.parent;for(;n;)t.unshift(n.config.label),n=n.parent;return t.join(" > ")}renderSearchResults(e){if(this.searchResults){if(this.searchResults.innerHTML="",e.length===0){const t=document.createElement("div");t.className="bim-tree-search-item",t.style.cursor="default",t.style.color="#999",t.textContent="No results",this.searchResults.appendChild(t)}else e.forEach(t=>{const n=document.createElement("div");n.className="bim-tree-search-item";const i=document.createElement("span");i.className="bim-tree-search-item-title",i.textContent=t.label;const r=document.createElement("span");r.className="bim-tree-search-item-path",r.textContent=t.path,n.appendChild(i),t.path&&n.appendChild(r),n.addEventListener("click",()=>{this.revealNode(t.node)}),this.searchResults.appendChild(n)});this.searchResults.classList.add("is-visible")}}revealNode(e){this.searchResults&&(this.searchResults.classList.remove("is-visible"),this.searchInput&&(this.searchInput.value=""));let t=e.parent;for(;t;)t.toggleExpand(!0),t=t.parent;this.handleNodeSelect(e),setTimeout(()=>{e.element.scrollIntoView({behavior:"smooth",block:"center"})},100)}setTheme(e){const t=this.element.style;t.setProperty("--bim-primary",e.primary),t.setProperty("--bim-bg-elevated",e.bgElevated),t.setProperty("--bim-text-primary",e.textPrimary),t.setProperty("--bim-text-secondary",e.textSecondary),t.setProperty("--bim-text-tertiary",e.textTertiary),t.setProperty("--bim-text-disabled",e.textDisabled),t.setProperty("--bim-text-inverse",e.textInverse),t.setProperty("--bim-border-default",e.borderDefault),t.setProperty("--bim-border-disabled",e.borderDisabled),t.setProperty("--bim-component-bg-hover",e.componentBgHover),t.setProperty("--bim-component-bg-selected",e.componentBgSelected),t.setProperty("--bim-component-bg-disabled",e.componentBgDisabled),t.setProperty("--bim-shadow-md",e.shadowMd),t.setProperty("--bim-focus-ring",e.focusRing)}setLocales(){this.nodeMap.forEach(e=>e.updateLabel()),this.searchInput&&(this.searchInput.placeholder=ve(this.options.searchPlaceholder||"tree.searchPlaceholder"))}destroy(){this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.clickOutsideHandler&&(document.removeEventListener("click",this.clickOutsideHandler),this.clickOutsideHandler=null),this.rootNodes.forEach(e=>e.destroy()),this.rootNodes=[],this.nodeMap.clear(),this.element.remove(),this.selectedNode=null}render(){this.contentElement.innerHTML="",this.nodeMap.clear(),this.rootNodes=[],this.options.data.forEach(e=>{this.createNodeRecursively(e,null)})}createNodeRecursively(e,t){e.expanded===void 0&&(e.expanded=this.options.defaultExpandAll);const n=new XE(e,this.options,{onExpand:i=>{this.onNodeExpand&&this.onNodeExpand(i)},onCheck:i=>this.handleNodeCheck(i),onClick:i=>this.handleNodeSelect(i)});this.nodeMap.set(e.id,n),t?t.appendChild(n):(this.rootNodes.push(n),this.contentElement.appendChild(n.element)),e.children&&e.children.length>0&&e.children.forEach(i=>{this.createNodeRecursively(i,n)})}handleNodeSelect(e){if(this.selectedNode===e){e.setSelected(!1),this.selectedNode=null,this.onNodeDeselect&&this.onNodeDeselect(e);return}this.selectedNode&&this.selectedNode.setSelected(!1),e.setSelected(!0),this.selectedNode=e,this.onNodeSelect&&this.onNodeSelect(e)}handleNodeCheck(e){const t=e.checkState===Mt.Checked;if(this.onNodeCheck&&this.onNodeCheck(e),this.options.checkStrictly===!1)return;const n=(r,o)=>{r.children.forEach(a=>{a.config.disabled||(a.setChecked(o,!1),n(a,o))})};t?n(e,Mt.Checked):n(e,Mt.Unchecked);let i=e.parent;for(;i;){if(i.config.disabled){i=i.parent;continue}const r=i.children,o=r.every(l=>l.checkState===Mt.Checked),a=r.every(l=>l.checkState===Mt.Unchecked);o?i.setChecked(Mt.Checked,!1):a?i.setChecked(Mt.Unchecked,!1):i.setChecked(Mt.Indeterminate,!1),i=i.parent}}getNode(e){return this.nodeMap.get(e)}checkNode(e,t){const n=this.nodeMap.get(e);n&&n.setChecked(t?Mt.Checked:Mt.Unchecked,!0)}expandAll(e){this.nodeMap.forEach(t=>t.toggleExpand(e))}checkAllNodes(e){const t=e?Mt.Checked:Mt.Unchecked;this.nodeMap.forEach(n=>n.setChecked(t,!1,!0))}getCheckedNodes(e=!1){const t=[];return this.nodeMap.forEach(n=>{(n.checkState===Mt.Checked||e&&n.checkState===Mt.Indeterminate)&&t.push(n.config)}),t}}class Og{element;navElement;contentElement;options;activeId;tabMap=new Map;panelMap=new Map;unsubscribeLocale=null;unsubscribeTheme=null;navClickHandler=null;constructor(e){this.options=e,this.activeId=e.activeId||(e.tabs[0]?.id??null),e.tabs.forEach(t=>this.tabMap.set(t.id,t)),this.element=document.createElement("div"),this.element.className="bim-tab",this.navElement=document.createElement("div"),this.navElement.className="bim-tab__nav",this.navElement.setAttribute("role","tablist"),this.element.appendChild(this.navElement),this.contentElement=document.createElement("div"),this.contentElement.className="bim-tab__content",this.element.appendChild(this.contentElement),this.options.container.appendChild(this.element)}init(){this.renderNav(),this.renderPanels(),this.setLocales(),this.setTheme(ot.getTheme()),this.unsubscribeLocale=Yt.subscribe(()=>this.setLocales()),this.unsubscribeTheme=ot.subscribe(e=>this.setTheme(e))}renderNav(){this.navElement.innerHTML="",this.navClickHandler=e=>{const t=e.target.closest(".bim-tab__item");if(!t)return;const n=t.dataset.id;!n||this.tabMap.get(n)?.disabled||this.activateTab(n)},this.navElement.addEventListener("click",this.navClickHandler),this.options.tabs.forEach(e=>{const t=document.createElement("button");if(t.type="button",t.className="bim-tab__item",t.dataset.id=e.id,t.setAttribute("role","tab"),t.id=`tab-${e.id}`,t.setAttribute("aria-selected",`${e.id===this.activeId}`),e.disabled&&(t.disabled=!0,t.setAttribute("aria-disabled","true"),t.classList.add("is-disabled")),e.icon){const i=document.createElement("span");i.className="bim-tab__icon",i.innerHTML=e.icon,t.appendChild(i)}const n=document.createElement("span");n.className="bim-tab__title",n.textContent=this.resolveTitle(e.title),t.appendChild(n),e.id===this.activeId&&t.classList.add("is-active"),this.navElement.appendChild(t)})}renderPanels(){this.contentElement.innerHTML="",this.panelMap.clear(),this.options.tabs.forEach(e=>{const t=document.createElement("div");t.className="bim-tab__panel",t.dataset.id=e.id,t.setAttribute("role","tabpanel"),t.setAttribute("aria-labelledby",`tab-${e.id}`),e.content instanceof HTMLElement?t.appendChild(e.content):typeof e.content=="string"&&(t.innerHTML=e.content),e.id===this.activeId?t.classList.add("is-active"):t.style.display="none",this.panelMap.set(e.id,t),this.contentElement.appendChild(t)})}activateTab(e){if(this.activeId===e)return;const t=this.tabMap.get(e);if(!t||t.disabled)return;this.activeId=e,this.navElement.querySelectorAll(".bim-tab__item").forEach(i=>{const r=i.dataset.id===e;i.classList.toggle("is-active",r),i.setAttribute("aria-selected",`${r}`)}),this.panelMap.forEach((i,r)=>{const o=r===e;i.classList.toggle("is-active",o),i.style.display=o?"block":"none"}),this.options.onChange&&this.options.onChange(e,t)}setTheme(e){const t=this.element.style;t.setProperty("--bim-tab-bg",e.bgElevated),t.setProperty("--bim-tab-nav-bg",e.bgElevated),t.setProperty("--bim-tab-text",e.textPrimary),t.setProperty("--bim-tab-text-secondary",e.textSecondary),t.setProperty("--bim-tab-text-active",e.primary),t.setProperty("--bim-tab-border",e.borderDefault),t.setProperty("--bim-tab-hover-bg",e.componentBgHover),t.setProperty("--bim-tab-active-bg",e.componentBgActive),t.setProperty("--bim-tab-icon",e.iconDefault)}setLocales(){this.navElement.querySelectorAll(".bim-tab__item").forEach(t=>{const n=t.dataset.id;if(!n)return;const i=this.tabMap.get(n);if(!i)return;const r=t.querySelector(".bim-tab__title");r&&(r.textContent=this.resolveTitle(i.title))})}destroy(){this.navClickHandler&&(this.navElement.removeEventListener("click",this.navClickHandler),this.navClickHandler=null),this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.panelMap.clear(),this.tabMap.clear(),this.element.remove()}resolveTitle(e){try{return ve(e)||e}catch{return e}}}const Fg={测量:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M0,28.207H3.429v3.526H44.571V28.207H48v7.052H0ZM0,3.526v14.1a3.478,3.478,0,0,0,3.429,3.526H6.857V17.629h3.429v3.526h3.429V17.629h3.429v3.526h3.429V10.578H24V21.155h3.429V17.629h3.429v3.526h3.429V17.629h3.429v3.526h3.429V10.578h3.429V21.155A3.478,3.478,0,0,0,48,17.629V3.526A3.478,3.478,0,0,0,44.571,0H3.429A3.478,3.478,0,0,0,0,3.526Z" transform="translate(0 5.456)"/></svg>',地图:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M32.984,563.2H26.329a66.982,66.982,0,0,1-5.471,7.121l-1.455,1.61-1.455-1.61a66.978,66.978,0,0,1-5.471-7.121H5.821L0,580.662H38.8Z" transform="translate(4.598 -537.259)"/><path fill="currentColor" d="M275.4,9.7a9.7,9.7,0,1,0-19.4,0c0,6.636,9.7,17.462,9.7,17.462S275.4,16.337,275.4,9.7Zm-13.582,0a3.88,3.88,0,1,1,3.88,3.88,3.88,3.88,0,0,1-3.88-3.88Z" transform="translate(-241.701 4.598)"/></svg>',框选放大:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M336.351,336.158l-5.5.037-.037-5.5-3.665.025.037,5.5-5.491.037.025,3.665,5.491-.037.041,5.491,3.661-.025-.037-5.491,5.5-.041Z" transform="translate(-305.467 -314.477)"/><path fill="currentColor" d="M41.88,40.861l-.227-.223-7.167-7.068a14.787,14.787,0,1,0-2.832,2.4l7.4,7.3.227.223.021-.021a1.821,1.821,0,0,0,1.065.33,1.849,1.849,0,0,0,1.837-1.862,1.868,1.868,0,0,0-.343-1.061l.017-.021ZM23.648,34.668A11.1,11.1,0,1,1,34.675,23.487,11.106,11.106,0,0,1,23.648,34.668ZM3,41.492H6.241v3.241H3ZM3,15.564H6.241v3.241H3ZM3,2.6H6.241V5.841H3Zm12.964,0h3.241V5.841H15.964Zm-6.482,0h3.241V5.841H9.482Zm12.964,0h3.241V5.841H22.446Zm6.482,0h3.241V5.841H28.928Zm6.482,0h3.241V5.841H35.41Zm6.482,0h3.241V5.841H41.892Zm0,6.482h3.241v3.241H41.892Zm0,6.482h3.241v3.241H41.892Zm0,6.482h3.241v3.241H41.892ZM9.482,41.492h3.241v3.241H9.482Zm6.482,0h3.241v3.241H15.964Zm6.482,0h3.241v3.241H22.446ZM3,9.082H6.241v3.241H3ZM3,22.046H6.241v3.241H3Zm38.892,6.482h3.241v3.241H41.892ZM3,28.528H6.241v3.241H3ZM3,35.01H6.241v3.241H3Z" transform="translate(-0.067 0.333)"/></svg>',漫游:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M327.239,38.548a6.01,6.01,0,1,0-6.358-6A6.144,6.144,0,0,0,327.239,38.548Zm8.006,5.76a3.082,3.082,0,0,0-3.061-2.64h-1.648c-.471,0-.706.24-1.177.48l-2.119,1.68-2.119-1.92a1.781,1.781,0,0,0-1.177-.48h-1.648a2.914,2.914,0,0,0-3.061,2.64l-1.413,10.8c0,.48,0,.96.471,1.2a1.781,1.781,0,0,0,1.177.48h1.648l1.413,15.36a3.082,3.082,0,0,0,3.061,2.64h3.532a2.914,2.914,0,0,0,3.061-2.64l1.413-15.36h1.648a1.781,1.781,0,0,0,1.177-.48,2.2,2.2,0,0,0,.235-1.2Z" transform="translate(-303.239 -26.548)"/></svg>',目录树:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M116.8,153.474h12a1.2,1.2,0,0,0,1.2-1.185v-7.111a1.2,1.2,0,0,0-1.2-1.184h-12a1.2,1.2,0,0,0-1.2,1.184v1.629H93.553v-7.554H100a1.2,1.2,0,0,0,1.2-1.185v-7.112a1.2,1.2,0,0,0-1.2-1.185H83.2a1.2,1.2,0,0,0-1.2,1.185v7.112a1.2,1.2,0,0,0,1.2,1.185h6.45v28a2.383,2.383,0,0,0,2.4,2.37H115.6v1.63a1.2,1.2,0,0,0,1.2,1.185h12a1.2,1.2,0,0,0,1.2-1.185v-7.112a1.2,1.2,0,0,0-1.2-1.185h-12a1.2,1.2,0,0,0-1.2,1.185v1.63H93.553V150.657H115.6v1.629a1.2,1.2,0,0,0,1.2,1.185Z" transform="translate(-82 -126.874)"/></svg>',剖切:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-176.967 -101.068)"><path d="M306.33,364.55h14.737v19.115H306.33Z" transform="translate(-118.068 -248.554)"/><path d="M487.114,140.356a1.6,1.6,0,0,1-1.744-1.393V99.573a1.787,1.787,0,0,1,3.487,0v39.389A1.6,1.6,0,0,1,487.114,140.356Z" transform="translate(-285.677 6.11)"/><path d="M508.34,274.031H487.114a1.743,1.743,0,1,1,0-3.487h17.739V242.767H487.114a1.744,1.744,0,1,1,0-3.487H508.34Z" transform="translate(-285.677 -131.282)"/><path d="M201.437,274.031h-3.278a1.743,1.743,0,1,1,0-3.487h3.278a1.743,1.743,0,1,1,0,3.487Zm-8.858,0H187a1.743,1.743,0,1,1,0-3.487h5.579a1.743,1.743,0,1,1,0,3.487Zm-10.626-.532a1.743,1.743,0,0,1-1.743-1.744v-5.579a1.743,1.743,0,1,1,3.487,0v5.579A1.743,1.743,0,0,1,181.953,273.5Zm0-11.159a1.743,1.743,0,0,1-1.743-1.743v-5.579a1.743,1.743,0,1,1,3.487,0V260.6A1.743,1.743,0,0,1,181.953,262.34Zm0-11.158a1.744,1.744,0,0,1-1.743-1.744v-5.579a1.743,1.743,0,1,1,3.487,0v5.579A1.744,1.744,0,0,1,181.953,251.181Zm19.484-8.414h-5.579a1.744,1.744,0,1,1,0-3.487h5.579a1.744,1.744,0,0,1,0,3.487Zm-11.159,0H184.7a1.744,1.744,0,1,1,0-3.487h5.579a1.744,1.744,0,1,1,0,3.487Z" transform="translate(0 -131.282)"/></g></svg>',剖切盒:'<svg width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-56.83 2.793)"><path d="M194.963,19.168a1.69,1.69,0,0,1-.607-.119l-19.027-8.292a1.253,1.253,0,0,1,0-2.35L191.289.112a1.592,1.592,0,0,1,1.24,0l18.663,8.294a1.267,1.267,0,0,1,.791,1.175,1.308,1.308,0,0,1-.791,1.175l-15.6,8.278a1.519,1.519,0,0,1-.633.143Zm-15.7-9.586,15.7,6.832,12.331-6.832L191.9,2.749Z" transform="translate(-109.947 0)"/><path d="M195.008,417.821a1.691,1.691,0,0,1-.607-.119l-19.025-8.294a1.253,1.253,0,0,1,0-2.35l15.958-8.294a1.592,1.592,0,0,1,1.24,0l18.657,8.294a1.267,1.267,0,0,1,.791,1.175,1.308,1.308,0,0,1-.791,1.175l-15.6,8.278c-.211.095-3.483.143-3.694.143Zm-15.6-9.588,15.6,6.832,12.329-6.832L191.948,401.4Z" transform="translate(-109.992 -382.638)"/><path d="M200.046,603.93a1.976,1.976,0,0,1-.634-.119l-18.774-8.3a1.257,1.257,0,0,1-.655-1.754,1.512,1.512,0,0,1,1.931-.595l18.131,8.013,14.971-8.007a1.51,1.51,0,0,1,1.928.6,1.256,1.256,0,0,1-.661,1.75l-15.6,8.282a1.489,1.489,0,0,1-.634.119Z" transform="translate(-115.041 -568.787)"/><path d="M101.029,216.82a1.467,1.467,0,0,1-1-.377,1.237,1.237,0,0,1-.41-.917V198.817a1.413,1.413,0,0,1,2.816,0V215.5a1.241,1.241,0,0,1-.4.931A1.472,1.472,0,0,1,101.029,216.82Zm-34.377.143a1.467,1.467,0,0,1-1-.377,1.237,1.237,0,0,1-.41-.917V198.817a1.413,1.413,0,0,1,2.816,0v16.852a1.237,1.237,0,0,1-.41.917A1.467,1.467,0,0,1,66.652,216.964Zm-5.215,2.8a1.467,1.467,0,0,1-1-.377,1.237,1.237,0,0,1-.41-.917V201.621a1.413,1.413,0,0,1,2.816,0v16.852a1.237,1.237,0,0,1-.41.917A1.467,1.467,0,0,1,61.436,219.768Z" transform="translate(-0.4 -189.683)"/><path d="M60.922,37.617A1.32,1.32,0,0,1,60,37.258a1.2,1.2,0,0,1-.378-.876V20.295a1.3,1.3,0,0,1,2.588,0V36.382a1.276,1.276,0,0,1-1.294,1.235Zm-1.175,8.411a1.341,1.341,0,0,1,1.75-.578l15.126,7.071a1.224,1.224,0,0,1,.6,1.671,1.337,1.337,0,0,1-1.75.572L60.347,47.708a1.228,1.228,0,0,1-.606-1.671Z" transform="translate(0 -18.25)"/><path d="M71.756,44.947a1.337,1.337,0,0,1,1.75-.582l15.126,7.118a1.235,1.235,0,0,1,.6,1.682,1.333,1.333,0,0,1-1.75.576L72.356,46.629a1.239,1.239,0,0,1-.606-1.682ZM59.915,12.652a1.337,1.337,0,0,1,1.75-.582L76.79,19.194a1.235,1.235,0,0,1,.6,1.682,1.333,1.333,0,0,1-1.75.576L60.515,14.334A1.247,1.247,0,0,1,59.915,12.652Z" transform="translate(-0.168 -11.442)"/><path d="M334.418,146.671a1.341,1.341,0,0,1,1.75-.578l15.126,7.073a1.224,1.224,0,0,1,.6,1.671,1.337,1.337,0,0,1-1.75.573l-15.126-7.09a1.25,1.25,0,0,1-.663-.7,1.177,1.177,0,0,1,.058-.945Zm16.3,35.276a1.32,1.32,0,0,1-.917-.36,1.2,1.2,0,0,1-.377-.875v-16.1a1.3,1.3,0,0,1,2.588,0V180.7a1.2,1.2,0,0,1-.38.878,1.321,1.321,0,0,1-.922.357Z" transform="translate(-260.918 -139.687)"/><path d="M576.438,360.4a1.288,1.288,0,0,1-1.294-1.294V342.253a1.294,1.294,0,1,1,2.588,0v16.852A1.3,1.3,0,0,1,576.438,360.4ZM572.8,344.248,573,361.1l-2.613.024-.2-16.857Z" transform="translate(-486.154 -327.316)"/><path d="M508.543,26.833l.192,16.852-2.613.024-.192-16.852Z" transform="translate(-425.253 -25.689)"/></g></svg>',全屏:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M6.241,3.671H12.85a1.734,1.734,0,0,0,1.836-1.836A1.734,1.734,0,0,0,12.85,0H1.469C1.1,0,.734.367.367.734A1.349,1.349,0,0,0,0,1.836V12.85a1.734,1.734,0,0,0,1.836,1.836A1.734,1.734,0,0,0,3.671,12.85V6.241l9.913,9.913a1.817,1.817,0,1,0,2.57-2.57ZM13.584,27.9,6.975,34.51l-3.3,3.3V31.206a1.734,1.734,0,0,0-1.836-1.836A1.734,1.734,0,0,0,0,31.206V42.22a1.734,1.734,0,0,0,1.836,1.836H12.85a1.836,1.836,0,0,0,0-3.671H6.241l3.3-3.3,6.608-6.608a1.817,1.817,0,1,0-2.57-2.57ZM42.22,29.371a1.734,1.734,0,0,0-1.836,1.836v6.608l-3.3-3.3L30.472,27.9a1.817,1.817,0,1,0-2.57,2.57L34.51,37.08l3.3,3.3H31.206a1.836,1.836,0,1,0,0,3.671H42.22a1.734,1.734,0,0,0,1.836-1.836V31.206a1.734,1.734,0,0,0-1.836-1.836ZM42.22,0H31.206a1.734,1.734,0,0,0-1.836,1.836,1.734,1.734,0,0,0,1.836,1.836h6.608l-3.3,3.3L27.9,13.584a1.817,1.817,0,1,0,2.57,2.57L37.08,9.545l3.3-3.3V12.85a1.836,1.836,0,0,0,3.671,0V1.836A1.734,1.734,0,0,0,42.22,0Z" transform="translate(1.972 1.972)"/></svg>',设置:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M112.388,106.443l-2.668-.373a1.687,1.687,0,0,1-1.306-1.031,16.337,16.337,0,0,0-2-3.475,1.681,1.681,0,0,1-.243-1.646l1.012-2.5a1.652,1.652,0,0,0-.709-2.057l-5.769-3.335a1.654,1.654,0,0,0-2.136.415L96.919,94.56a1.693,1.693,0,0,1-1.562.62,15.32,15.32,0,0,0-3.992,0,1.693,1.693,0,0,1-1.562-.62l-1.651-2.113a1.654,1.654,0,0,0-2.136-.415l-5.769,3.33a1.659,1.659,0,0,0-.709,2.057l1.012,2.5a1.679,1.679,0,0,1-.243,1.646,16.141,16.141,0,0,0-2,3.475A1.669,1.669,0,0,1,77,106.066l-2.668.373a1.663,1.663,0,0,0-1.432,1.646v6.665a1.662,1.662,0,0,0,1.427,1.642l2.668.373a1.687,1.687,0,0,1,1.306,1.031,16.338,16.338,0,0,0,2,3.475,1.681,1.681,0,0,1,.243,1.646l-1.012,2.5a1.652,1.652,0,0,0,.709,2.057l5.769,3.33a1.654,1.654,0,0,0,2.136-.415L89.8,128.27a1.693,1.693,0,0,1,1.562-.62,15.321,15.321,0,0,0,3.992,0,1.693,1.693,0,0,1,1.562.62l1.651,2.113a1.654,1.654,0,0,0,2.136.415l5.769-3.33a1.659,1.659,0,0,0,.709-2.057l-1.012-2.5a1.681,1.681,0,0,1,.243-1.646,16.141,16.141,0,0,0,2-3.475,1.669,1.669,0,0,1,1.306-1.031l2.668-.373a1.658,1.658,0,0,0,1.427-1.642v-6.665A1.639,1.639,0,0,0,112.388,106.443ZM93.36,117.893a6.478,6.478,0,1,1,6.478-6.478A6.479,6.479,0,0,1,93.36,117.893Z" transform="translate(-69.355 -87.415)"/></svg>',拾曲面剖切:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-59.63 -21.333)"><path d="M302.465,495.393l2.363-4.363a.842.842,0,0,1,1.091-.273.914.914,0,0,1,.454,1l-1.636,3,11.453-3.454c.091,0,.091,0,.182-.091a.785.785,0,1,1,.273,1.545l-11.453,3.454,3,1.545h.091a.645.645,0,0,1,.182,1,.842.842,0,0,1-1.091.273l-4.545-2.363c-.091,0-.182-.091-.273-.182A.742.742,0,0,1,302.465,495.393Z" transform="translate(205.84 -520.136) rotate(43)"/><path d="M88.23,54.014v2.86l-21.123,8.17V34l21.123-8.17V47.069h2.9l-.207-25.736L64,31.75V69.333L91.129,58.916v-4.9Z"/><path d="M199,255.9l-15.532,6.268v-21.23L199,234.667Z" transform="translate(-113.668 -202.979)"/></g></svg>',轴向剖切:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-59.63 -21.333)"><path d="M.194,3.727,2.558,8.089a.842.842,0,0,0,1.091.273.914.914,0,0,0,.454-1l-1.636-3L13.919,7.817c.091,0,.091,0,.182.091a.785.785,0,1,0,.273-1.545L2.921,2.909l3-1.545h.091a.645.645,0,0,0,.182-1A.842.842,0,0,0,5.1.091L.558,2.454c-.091,0-.182.091-.273.182A.742.742,0,0,0,.194,3.727Z" transform="translate(102.244 57.563) rotate(-178)"/><path d="M88.23,54.014v2.86l-21.123,8.17V34l21.123-8.17V47.069h2.9l-.207-25.736L64,31.75V69.333L91.129,58.916v-4.9Z"/><path d="M199,255.9l-15.532,6.268v-21.23L199,234.667Z" transform="translate(-113.668 -202.979)"/></g></svg>',主视角:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M122.32,181.835v-13.16h-9.87V163.74h19.74v18.095Zm-19.74,0V163.74h9.87v18.095ZM96,163.74,117.385,144l21.385,19.74Z" transform="translate(-93.385 -138.917)"/></svg>',文档:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M64,128h1.714v41.143H64Zm46.286,0H112v41.143h-1.714Zm-44.571,0h44.571v3.429H65.714Zm0,6.857h44.571v3.429H65.714Zm0-3.429h3.429v3.429H65.714Zm8.571,0h3.429v3.429H74.286Zm8.571,0h27.429v3.429H82.857Zm-17.143,36h44.571v1.714H65.714Zm5.143-24H76v1.714H70.857Zm10.286,0h24v1.714h-24Zm-10.286,6.857H76V152H70.857Zm10.286,0h24V152h-24Zm-10.286,6.857H76v1.714H70.857Zm10.286,0h24v1.714h-24Z" transform="translate(-64 -124.571)"/></svg>',第一人称漫游:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><path d="M178.325,132.27a6.411,6.411,0,0,0,0-9.429,7.359,7.359,0,0,0-9.984,0,6.411,6.411,0,0,0,0,9.429,7.359,7.359,0,0,0,9.984,0Zm-2-7.543a3.845,3.845,0,0,1,0,5.657,4.414,4.414,0,0,1-5.99,0,3.847,3.847,0,0,1,0-5.657,4.414,4.414,0,0,1,5.99,0Zm6.618,31.639q4.975,1.006,4.975,3.189t-4.975,3.189a57.4,57.4,0,0,1-19.226,0q-4.973-1.006-4.973-3.189t4.975-3.189q.777-.156,1.613-.284v-2.521a4.488,4.488,0,0,1-1.412.217,4.761,4.761,0,0,1-.587-.036l-.038,0a29.007,29.007,0,0,0-7.657,2.332q-3.482,1.712-3.482,3.484a2.944,2.944,0,0,0,1.3,2.116,14.359,14.359,0,0,0,4.4,2.293,46.614,46.614,0,0,0,15.477,2.258,46.614,46.614,0,0,0,15.477-2.258,14.362,14.362,0,0,0,4.4-2.293,2.943,2.943,0,0,0,1.3-2.116q0-1.772-3.482-3.484a29.007,29.007,0,0,0-7.657-2.332,4.908,4.908,0,0,1-.625.039,4.488,4.488,0,0,1-1.412-.217v2.521q.836.128,1.613.284Zm-14.788-6.588v5.979q2.391-.2,5.176-.2t5.176.2v-12.2h2.824v6.222a1.25,1.25,0,0,0,.414.942v0l.081.071q.744.1,1.457.22a1.41,1.41,0,0,0,.457-.293,1.25,1.25,0,0,0,.414-.942v-8a3.75,3.75,0,0,0-1.24-2.828,4.2,4.2,0,0,0-2.995-1.172H166.745a4.2,4.2,0,0,0-2.995,1.172,3.75,3.75,0,0,0-1.24,2.828v8a1.268,1.268,0,0,0,.414.942,1.415,1.415,0,0,0,.456.293q.715-.119,1.459-.222.041-.034.081-.071a1.25,1.25,0,0,0,.414-.942v-6.222h2.824Zm-8.471-6.222v-1.778a6.253,6.253,0,0,1,2.067-4.715,7.013,7.013,0,0,1,4.992-1.952h13.176a7.013,7.013,0,0,1,4.992,1.952,6.253,6.253,0,0,1,2.067,4.715v8a3.722,3.722,0,0,1-.484,1.881l0,.005a28.526,28.526,0,0,1,5.841,2.041q5,2.462,5,5.851,0,4.238-7.531,6.9a49.5,49.5,0,0,1-16.469,2.428,49.5,49.5,0,0,1-16.469-2.428q-7.531-2.667-7.531-6.9,0-3.388,5-5.849a28.381,28.381,0,0,1,5.841-2.044,3.707,3.707,0,0,1-.488-1.884Zm24.8,16a13.145,13.145,0,0,0-2.129-.581,54.5,54.5,0,0,0-18.044,0,13.079,13.079,0,0,0-2.127.581,13.078,13.078,0,0,0,2.127.581,54.5,54.5,0,0,0,18.044,0,13.078,13.078,0,0,0,2.127-.581Z" transform="translate(-149.333 -120.889)"/></svg>',反向:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(0.364 4.658)"><path d="M0,287.1m0-.817v-2.042a.722.722,0,0,1,.817-.817H44.509a.722.722,0,0,1,.817.817v2.042a.722.722,0,0,1-.817.817H.817A.722.722,0,0,1,0,286.28Z" transform="translate(-0.001 -272.164)"/><path d="M829.7,13.238l-1.443,1.444a.817.817,0,0,1-1.155,0L815.263,2.844a.817.817,0,0,1,0-1.156L816.706.244a.817.817,0,0,1,1.155,0L829.7,12.083a.817.817,0,0,1,0,1.155Z" transform="translate(-782.667)"/><path d="M94.367,648m0,.817v2.042a.722.722,0,0,1-.817.817H49.858a.722.722,0,0,1-.817-.817v-2.042a.722.722,0,0,1,.817-.817H93.55A.722.722,0,0,1,94.367,648.816Z" transform="translate(-47.095 -622.268)"/><path d="M.239,649.97l1.443-1.444a.817.817,0,0,1,1.155,0l11.838,11.838a.817.817,0,0,1,0,1.156l-1.443,1.443a.817.817,0,0,1-1.155,0L.239,651.124a.817.817,0,0,1,0-1.155Z" transform="translate(0 -622.544)"/></g></svg>',路径漫游:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(0 -4.9)"><path d="M43.755,35.8a23.352,23.352,0,0,1-8.074-3.095c-1.131-.912-2.263-1.819-2.263-3.458,0-.364-.164-.548-.486-.548-1.776-.364-2.263,0-1.935,2.183a5,5,0,0,0,1.776,3.095,14.337,14.337,0,0,0,4.521,2.551c2.1.912,4.521,1.276,6.461,2.551,1.935,1.091,2.1,2.551.809,4.37A12.572,12.572,0,0,1,37.3,48.187a30.594,30.594,0,0,1-17.115-1.455c-2.585-.912-4.2-.364-5.488,2,0,.184-.164.184-.323.548,2.1.728,3.876,1.455,5.811,2,5.811,1.639,11.786,2.367,17.76.548A14.453,14.453,0,0,0,46.663,45.1c2.422-4.2,1.613-8.381-2.908-9.293Zm-19.7-7.97a11.943,11.943,0,0,0-7.382-10.952A12.17,12.17,0,0,0,3.457,19.546a10.951,10.951,0,0,0-2.3,12.879c2.459,5.329,6.456,9.77,10.453,14.06.463.444.617.444,1.075,0,3.689-4.143,7.382-8.287,10-13.172A11.6,11.6,0,0,0,24.059,27.833Zm-4.151,3.255c-1.692,3.851-4.614,6.955-7.382,10.215-.463.444-.617.3-.921,0A44.891,44.891,0,0,1,4.228,31.088a7.684,7.684,0,0,1-.767-3.109A8.664,8.664,0,0,1,18.22,21.909a8.155,8.155,0,0,1,1.688,9.18ZM33.007,4.9c-5.685,0-9.785,6.416-7.274,11.76,1.454,3.34,4.1,5.745,6.746,8.15a.492.492,0,0,0,.795,0c2.908-2.537,5.554-5.211,7.008-8.821A8.117,8.117,0,0,0,33.007,4.9Zm4.366,10.422A16.825,16.825,0,0,1,33.4,20c-.4.269-.659.269-.926,0a16.342,16.342,0,0,1-3.969-4.545,5.033,5.033,0,1,1,8.864-.132Z"/><path d="M183.031,141.935a2.136,2.136,0,0,0,2.053-2.18,2.084,2.084,0,0,0-2.18-2.18,2.171,2.171,0,0,0-2.053,2.307A2.058,2.058,0,0,0,183.031,141.935Zm-20.094,7.854a4.7,4.7,0,0,0-4.6,4.881,4.913,4.913,0,0,0,4.74,4.881,4.882,4.882,0,0,0-.14-9.762Zm0,6.417a1.77,1.77,0,0,1-1.532-1.532A1.79,1.79,0,0,1,162.937,153a1.611,1.611,0,0,1,1.672,1.672A1.578,1.578,0,0,1,162.937,156.206Z" transform="translate(-150.629 -126.653)"/></g></svg>',适应到模型:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-84.667 -84.667)"><path d="M87.667,97V87.667H97V85.333H86.733a1.4,1.4,0,0,0-1.4,1.4V97Zm0,23.333H85.333V130.6a1.4,1.4,0,0,0,1.4,1.4H97v-2.333H87.667v-9.333Zm32.667,9.333V132H130.6a1.4,1.4,0,0,0,1.4-1.4V120.333h-2.333v9.333h-9.333ZM129.667,97H132V86.733a1.4,1.4,0,0,0-1.4-1.4H120.333v2.333h9.333Z"/><path d="M270.857,243.5l11.3-6.652V223.387l-11.3,6.361V243.5Zm-1.8,0v-13.75l-11.3-6.361v13.456l11.3,6.652Zm-10.278-21.621,11.177,6.284,11.177-6.284L269.958,215.3l-11.177,6.573Zm11.622-8.426,13.1,7.709a.919.919,0,0,1,.448.793v15.419a.926.926,0,0,1-.448.793l-13.1,7.709a.887.887,0,0,1-.9,0l-13.1-7.709a.905.905,0,0,1-.448-.793V221.954a.919.919,0,0,1,.448-.793l13.1-7.709A.887.887,0,0,1,270.4,213.452Z" transform="translate(-161.292 -120.997)"/></g></svg>',隐藏:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><path d="M61.274,76.178l0-.007-.007,0a32.458,32.458,0,0,0-7.014-9.981L51.53,68.91a28.382,28.382,0,0,1,6.124,8.635c-4.472,9.25-10.809,13.636-19.472,13.636A20.615,20.615,0,0,1,30.6,89.838l-2.937,2.933a23.916,23.916,0,0,0,10.514,2.277q15.472,0,23.088-16.116a3.229,3.229,0,0,0,0-2.755ZM57.839,58.351l-2.274-2.277a.429.429,0,0,0-.608,0l-6.265,6.262a23.775,23.775,0,0,0-10.51-2.281q-15.472,0-23.088,16.116v.007a3.236,3.236,0,0,0,0,2.765,32.617,32.617,0,0,0,7.014,9.985L16.7,94.32a.429.429,0,0,0,0,.608l2.274,2.277a.429.429,0,0,0,.608,0L57.839,58.949a.426.426,0,0,0,0-.6ZM32.113,78.915a6.011,6.011,0,0,1,7.22-7.22l-7.223,7.22Zm9.9-9.9A9.452,9.452,0,0,0,29.43,81.6l-4.6,4.6a28.424,28.424,0,0,1-6.124-8.635c4.475-9.25,10.816-13.636,19.472-13.636a20.615,20.615,0,0,1,7.577,1.343Zm-4.046,14.55a5.752,5.752,0,0,1-1.01-.086l-2.744,2.741A9.446,9.446,0,0,0,46.638,73.794L43.9,76.538a6.018,6.018,0,0,1-5.932,7.024Z" transform="translate(-14.182 -52.64)"/></svg>',重置:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><path d="M32.936,32.658a15.914,15.914,0,0,1-9.6,3.064c-.451-.006-.9-.042-1.342-.077-.182-.018-.357-.047-.539-.077-.352-.047-.7-.089-1.037-.164-.211-.036-.422-.1-.621-.148-.334-.077-.668-.154-.99-.254-.153-.059-.3-.11-.457-.177-.381-.124-.755-.26-1.113-.414-.082-.036-.162-.071-.24-.1-.422-.2-.844-.408-1.248-.627-.017-.012-.035-.018-.054-.03a16.485,16.485,0,0,1-3.732-2.9c-.017-.018-.035-.042-.054-.059-.34-.355-.668-.721-.979-1.118-.065-.083-.123-.16-.194-.254A17.286,17.286,0,0,1,7.149,18.751h3.98L6.318,9.076,0,18.874H3.942a20.809,20.809,0,0,0,3.5,11.57.871.871,0,0,0,.075.14c.225.34.486.648.724.961.1.113.177.232.274.362.354.443.746.869,1.133,1.285.043.043.075.076.108.113a19.778,19.778,0,0,0,4.436,3.446c.043.027.08.043.128.076.467.259.949.5,1.432.719.124.055.242.113.359.164.419.184.847.335,1.277.493.2.076.4.14.611.21.378.113.762.21,1.153.3.257.065.509.129.772.184a2.252,2.252,0,0,0,.316.076c.37.07.735.1,1.1.151.134.027.27.049.4.065.66.065,1.314.11,1.974.11,4.006,0,8.852-1.3,11.85-4.177a1.908,1.908,0,0,0,.333-2.484,2.228,2.228,0,0,0-2.952.023ZM44.053,20.424a20.728,20.728,0,0,0-3.47-11.537c-.032-.055-.054-.113-.08-.164-.284-.405-.574-.778-.869-1.161a1.289,1.289,0,0,1-.1-.14A19.86,19.86,0,0,0,32.168,1.7c-.086-.032-.155-.076-.242-.11-.456-.195-.922-.362-1.394-.53C30.37,1,30.2.937,30.033.883,29.62.754,29.212.651,28.792.548c-.231-.055-.467-.113-.7-.164-.113-.022-.22-.055-.338-.081-.311-.055-.617-.081-.933-.124C26.6.151,26.392.119,26.18.1,25.655.042,25.135.021,24.616.016c-.1,0-.188-.016-.284-.016-.016,0-.032.005-.049.005A19.124,19.124,0,0,0,13.02,3.695a1.682,1.682,0,0,0-.466,2.515,1.777,1.777,0,0,0,2.309.3A15.251,15.251,0,0,1,24.374,3.45c.486.006.971.03,1.441.077.147.012.287.036.432.059a11.3,11.3,0,0,1,1.16.189c.162.03.334.077.493.11.381.089.744.178,1.107.3a2.577,2.577,0,0,1,.34.124c.422.142.832.29,1.23.467.047.012.082.047.123.059a16.492,16.492,0,0,1,6.182,4.8.367.367,0,0,0,.024.036A17.308,17.308,0,0,1,40.629,20.43H36.645l5.048,9.787L48,20.424Zm0,0" transform="translate(0 4.349)"/></svg>',标高:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M84.131,193.119a1.056,1.056,0,0,1,1.116.982v7.857a1.056,1.056,0,0,1-1.116.982H54.367a1.056,1.056,0,0,1-1.116-.982V194.1a1.056,1.056,0,0,1,1.116-.982Zm-1.116,1.964H55.483v5.893H83.015Zm1.116-13.749a1.064,1.064,0,0,1,1.114.935,1.032,1.032,0,0,1-1.007,1.025l-.107,0H71.2l-7.858,6.914a1.227,1.227,0,0,1-1.578,0l-8.185-7.2-.018-.016-.032-.031.049.047a1.107,1.107,0,0,1-.092-.092l-.011-.014a.869.869,0,0,1-.182-.857l0-.008L53.31,182l.012-.029.02-.045.019-.035a1.1,1.1,0,0,1,.891-.552h.007q.053,0,.107,0ZM68.043,183.3H57.06l5.492,4.831Z" transform="translate(-53.247 -176.136)"/></svg>',距离:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M29.692,3.03,27.55.919a.529.529,0,0,1-.014-.756A.549.549,0,0,1,28.3.15l.014.013,3.067,3.023a.529.529,0,0,1,0,.756L28.317,6.966a.549.549,0,0,1-.767.013.529.529,0,0,1-.014-.756l.014-.013L29.692,4.1H2.31L4.452,6.21a.528.528,0,0,1,.013.756.547.547,0,0,1-.766.013l-.014-.013L.616,3.942a.531.531,0,0,1,0-.756L3.685.163a.548.548,0,0,1,.767.014.528.528,0,0,1,0,.742L2.31,3.03ZM24.136,15.055H23.051V18H21.966v-2.94H20.882V18H19.8v-2.94H18.712V18H17.627v-2.94H16.543v5.078H15.458V15.055H14.373V18H13.288v-2.94H12.2V18H11.119v-2.94H10.034V18H8.949v-2.94H7.865V18H6.78v-2.94H5.7v5.078H4.61V15.055H1.9a.27.27,0,0,0-.272.268v6.413A.269.269,0,0,0,1.9,22H30.1a.268.268,0,0,0,.271-.267V15.323a.269.269,0,0,0-.271-.268H27.39v5.078H26.305V15.055H25.221V18H24.136Zm5.966-1.6A1.884,1.884,0,0,1,32,15.323v6.413a1.885,1.885,0,0,1-1.9,1.871H1.9A1.885,1.885,0,0,1,0,21.736V15.323a1.885,1.885,0,0,1,1.9-1.871Z" transform="translate(0 4.197)"/></svg>',最小距离:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M-5.839,24.8H-34.16A1.875,1.875,0,0,1-36,22.933V16.52a1.887,1.887,0,0,1,1.9-1.871H-5.9A1.887,1.887,0,0,1-4,16.52v6.412A1.875,1.875,0,0,1-5.839,24.8ZM-34.1,16.252a.27.27,0,0,0-.272.268v6.412a.27.27,0,0,0,.272.267H-5.9a.269.269,0,0,0,.271-.267V16.52a.27.27,0,0,0-.271-.268H-8.61V21.33H-9.695V16.252h-1.085v2.939h-1.085V16.252h-1.085v2.939h-1.085V16.252h-1.084v2.939H-16.2V16.252h-1.085v2.939h-1.085V16.252h-1.084V21.33h-1.084V16.252h-1.085v2.939h-1.085V16.252H-23.8v2.939h-1.085V16.252h-1.085v2.939h-1.085V16.252h-1.084v2.939H-29.22V16.252H-30.3V21.33H-31.39V16.252Z" transform="translate(36 2)"/><path fill="currentColor" d="M23.716,7.947V4.875c0-.8-.232-1.085-.765-1.085a1.573,1.573,0,0,0-1.133.585V7.947H20.4V2.75h1.163l.1.687H21.7a2.547,2.547,0,0,1,1.763-.817c1.172,0,1.676.78,1.676,2.089V7.947Zm-7.26,0V2.62h1.58V7.947Zm-3.8,0V4.875c0-.8-.243-1.085-.76-1.085a1.606,1.606,0,0,0-1.049.585V7.947H9.421V4.875c0-.8-.243-1.085-.758-1.085a1.608,1.608,0,0,0-1.05.585V7.947H6.194V2.75H7.36l.1.7H7.5A2.326,2.326,0,0,1,9.169,2.62a1.486,1.486,0,0,1,1.5.91A2.445,2.445,0,0,1,12.4,2.62c1.156,0,1.691.78,1.691,2.089V7.947Zm3.8-6.849a.79.79,0,0,1,1.58,0,.79.79,0,0,1-1.58,0Z" transform="translate(0.333 3.053)"/></svg>',激光边距:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M0,1.293v31.96H32V1.293ZM30.97,32.182H1.03V2.323H30.97Z"/><path fill="currentColor" d="M160.026,291.9l1.6,1.6,7.305-7.305-7.305-7.305-1.6,1.6,4.794,4.566h-6.392v2.283h6.392Zm-5.251,0-4.566-4.566h6.164v-2.283H150.21l4.566-4.566-1.37-1.6L146.1,286.19l7.305,7.305Z" transform="translate(-141.535 -268.917)"/></svg>',角度:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M39.587,50.766h13.7a1,1,0,0,1,0,2H23.171a1,1,0,0,1,0-2h1.418l6.582-7.006v-.006a.517.517,0,0,1,.14-.357.456.456,0,0,1,.337-.144l12.1-12.876a.451.451,0,0,1,.665,0,.524.524,0,0,1,0,.708L32.883,43.355a8.3,8.3,0,0,1,6.7,7.411Zm-.949,0a7.254,7.254,0,0,0-6.611-6.5l-6.108,6.5Z" transform="translate(-22.229 -26.489)"/></svg>',坡度:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M202.1,188.337l2.629-2.191-8.447-3.106,1.533,8.871,2.629-2.194,9.341,11.209,1.656-1.379Zm-13.726-.435a1.075,1.075,0,0,0-1.07-.341,1.057,1.057,0,0,0-.5.277l-5.11,4.08a1.08,1.08,0,0,0-.406.84l-.007,17.386a1.079,1.079,0,0,0,1.077,1.077L205.7,211.2a1.078,1.078,0,0,0,.822-1.774Zm-4.934,21.164.007-15.788,3.968-3.171,15.974,18.941Z" transform="translate(-180.36 -181.131)"/></svg>',体积:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M94.74,86.658V71.189a.371.371,0,0,1,.2-.329l13.869-7.22a.371.371,0,0,1,.344,0l13.053,6.891h0l.819.431a.371.371,0,0,1,.2.328v15.3a.371.371,0,0,1-.2.328l-13.872,7.255a.371.371,0,0,1-.342,0L94.94,86.987a.371.371,0,0,1-.2-.329Zm2.119-.837,11.2,5.8a.024.024,0,0,0,.035-.022V79.483a.371.371,0,0,0-.2-.328l-11.2-5.909a.024.024,0,0,0-.035.021V85.492A.371.371,0,0,0,96.859,85.821Zm13.151-6.459v12a.12.12,0,0,0,.176.106L114,89.474l3.334-1.745,3.771-1.978a.371.371,0,0,0,.2-.328V73.5a.193.193,0,0,0-.284-.171l-10.812,5.708A.371.371,0,0,0,110.01,79.362ZM97.925,71.725l10.839,5.72a.371.371,0,0,0,.346,0L119.8,71.808a.214.214,0,0,0,0-.378l-10.649-5.621a.371.371,0,0,0-.344,0L97.925,71.47A.144.144,0,0,0,97.925,71.725Z" transform="translate(-92.982 -62.907)"/></svg>',空间体积:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M125.977,128.829l13.076-7.363v-13.6l-13.076,6.8Zm-3.126-15.655a.565.565,0,0,1-.258-.064L109.3,106.323a.567.567,0,0,1-.011-1L122.578,98a.567.567,0,0,1,.55,0l13.288,7.325a.567.567,0,0,1-.011,1l-13.292,6.79A.63.63,0,0,1,122.851,113.174ZM110.773,105.8l12.078,6.172,12.078-6.172-12.078-6.657Z" transform="translate(-1.922)"/><path fill="currentColor" d="M120.649,322.52a.58.58,0,0,1-.262-.064l-13.08-6.8a.573.573,0,0,1-.307-.5V301a.566.566,0,0,1,.273-.486.573.573,0,0,1,.558-.019l13.076,6.8a.573.573,0,0,1,.307.5v14.161a.57.57,0,0,1-.565.569Zm-12.511-7.708,11.942,6.206V308.136l-11.942-6.206Zm15.917,9.408a.585.585,0,0,1-.288-.076.567.567,0,0,1-.281-.489V309.49a.562.562,0,0,1,.307-.5l13.076-6.8a.573.573,0,0,1,.558.019.562.562,0,0,1,.273.486v13.6a.568.568,0,0,1-.288.493l-13.076,7.359A.557.557,0,0,1,124.055,324.22Zm.569-14.385V322.68l11.942-6.722V303.629Z" transform="translate(0 -194.822)"/></svg>',close:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>',check:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"/></svg>',warning:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>',error:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>',success:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',plus:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>',minus:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19 13H5v-2h14v2z"/></svg>',arrowUp:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"/></svg>',arrowUpBold:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8l-8 8z"/></svg>',arrowDown:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6z"/></svg>',arrowLeft:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"/></svg>',arrowRight:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',search:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z"/></svg>',refresh:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>',delete:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></svg>',edit:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83l3.75 3.75l1.83-1.83z"/></svg>',save:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3s3 1.34 3 3s-1.34 3-3 3zm3-10H5V5h10v4z"/></svg>',expand:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M16.59 8.59L12 13.17L7.41 8.59L6 10l6 6l6-6z"/></svg>',collapse:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 8l-6 6l1.41 1.41L12 10.83l4.59 4.58L18 14z"/></svg>',bot:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 0 1 2-2M7.5 13A2.5 2.5 0 0 0 5 15.5A2.5 2.5 0 0 0 7.5 18a2.5 2.5 0 0 0 2.5-2.5A2.5 2.5 0 0 0 7.5 13m9 0a2.5 2.5 0 0 0-2.5 2.5a2.5 2.5 0 0 0 2.5 2.5a2.5 2.5 0 0 0 2.5-2.5a2.5 2.5 0 0 0-2.5-2.5Z"/></svg>',history:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M13 3a9 9 0 0 0-9 9H1l3.89 3.89l.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7s-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54l.72-1.21l-3.5-2.08V8H12z"/></svg>',settings:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5a3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97c0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1c0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66Z"/></svg>',loader:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',send:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M2 21l21-9L2 3v7l15 2l-15 2v7z"/></svg>',default:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/></svg>'};function rt(s){const e=Fg[s];return e||(console.warn(`[IconManager] Icon "${s}" not found, using default icon`),Fg.default)}function zg(s,e){let t=e>>>0;for(let n=0;n<s.length;n++){const i=s.charCodeAt(n);t^=i&255,t=Math.imul(t,16777619),t^=i>>>8&255,t=Math.imul(t,16777619)}return t>>>0}async function qE(s){const e=JSON.stringify(s),t=zg(e,2166136261),n=zg(e,522970236);return`${t.toString(16).padStart(8,"0")}${n.toString(16).padStart(8,"0")}`}function td(s){const e=[],t=s.config.data;t?.ids?.length&&e.push(...t.ids);for(const n of s.children||[])e.push(...td(n));return e}let ZE=0;async function YE(s){if(!s||s.length===0)return[];const e=async(t,n)=>{const i=t.children&&t.children.length>0;let r;return t.ids?.length?r=await qE(t.ids):t.id?r=t.id:r=`node_${++ZE}`,{id:r,label:t.name||"未命名",expanded:!1,checked:!0,children:i?await Promise.all(t.children.map(o=>e(o,n))):void 0,data:{...t,_modelUrl:n}}};return Promise.all(s.map(async t=>{const n=t.children&&t.children.length>0,i=t.url;return{id:i,label:t.name||"模型",expanded:!0,checked:!0,children:n?await Promise.all(t.children.map(r=>e(r,i))):void 0,data:{_modelUrl:i}}}))}class $E extends mi{toolbar=null;toolbarContainer=null;container;dialog=null;constructor(e){super(),this.container=e,this.init()}init(){this.toolbarContainer=document.createElement("div"),this.toolbarContainer.id="bim-construct-tree",this.container.appendChild(this.toolbarContainer),this.toolbar=new Hl({container:this.toolbarContainer,showLabel:!1,direction:"column",position:"top-left",align:"vertical",expand:"up"}),this.toolbar.init(),this.toolbar.addGroup("construct-tree"),this.toolbar.addButton({id:"construct-tree-btn",groupId:"construct-tree",type:"button",label:"construct-tree",icon:rt("目录树"),onClick:()=>{this.openConstructTreeDialog()}}),this.toolbar.render()}async openConstructTreeDialog(){this.setVisible(!1);const e=this.registry.engine3d?.getLevelTreeData()??[],t=this.registry.engine3d?.getTypeTreeData()??[],n=this.registry.engine3d?.getMajorTreeData()??[];console.log("[ConstructTree] 原始数据 (Level):",e),console.log("[ConstructTree] 原始数据 (Type):",t),console.log("[ConstructTree] 原始数据 (Major):",n);const i=async(f,x)=>{const g=await YE(f);console.log(`[ConstructTree] 转换后数据 (${x}):`,g);const b=new jE({data:g,checkable:!0,indent:0,enableSearch:!0,checkStrictly:!0,defaultExpandAll:!0,onNodeCheck:v=>{const y=v.config.data;if(!y?._modelUrl)return;const _=y.ids?.length?y.ids:td(v);if(!_.length)return;const E=[{url:y._modelUrl,ids:_.map(Number)}];v.checkState===Mt.Checked?this.registry.engine3d?.showModel(E):this.registry.engine3d?.hideModels(E)},onNodeSelect:v=>{const y=v.config.data;if(!y?._modelUrl)return;const _=y.ids?.length?y.ids:td(v);if(!_.length)return;const E=[{url:y._modelUrl,ids:_.map(Number)}];this.registry.engine3d?.unhighlightAllModels(),this.registry.engine3d?.highlightModel(E),this.registry.engine3d?.viewScaleToModel(E)},onNodeDeselect:()=>{this.registry.engine3d?.unhighlightAllModels()},onNodeExpand:()=>{this.dialog?.fitWidth()}});return b.init(),b},r=await i(e,"Level"),o=await i(t,"Type"),a=await i(n,"Major"),l=document.createElement("div");l.className="construct-tab__panel-content",l.appendChild(r.element);const c=document.createElement("div");c.className="construct-tab__panel-content",c.appendChild(o.element);const h=document.createElement("div");h.className="construct-tab__panel-content",h.appendChild(a.element);const u=document.createElement("div");u.className="construct-tab__container",u.style.height="100%",u.style.overflow="hidden";const p=()=>{this.registry.engine3d?.showAllModels(),r.checkAllNodes(!0),o.checkAllNodes(!0),a.checkAllNodes(!0)},d=new Og({container:u,tabs:[{id:"component",title:"tab.component",content:l},{id:"type",title:"tab.type",content:c},{id:"major",title:"tab.major",content:h}],activeId:"component",onChange:()=>{p(),this.dialog?.fitWidth()}});d.init(),p();const m=this.registry.on("menu:show-all",()=>{p()});this.dialog=this.registry.dialog.create({title:"constructTree.title",minWidth:320,height:600,content:u,position:{x:20,y:20},resizable:!1,onClose:()=>{m(),d.destroy(),r.destroy(),o.destroy(),a.destroy(),this.setVisible(!0)}}),this.dialog?.fitWidth()}refresh(){this.toolbar?.render()}destroy(){this.toolbar?.destroy(),this.toolbar=null,super.destroy()}addGroup(e,t){this.toolbar?.addGroup(e,t),this.toolbar?.render()}addButton(e){this.toolbar?.addButton(e),this.toolbar?.render()}setButtonVisibility(e,t){this.toolbar?.updateButtonVisibility(e,t)}setShowLabel(e){this.toolbar?.setShowLabel(e)}setVisible(e){this.toolbarContainer&&(this.toolbarContainer.style.visibility=e?"visible":"hidden")}setBackgroundColor(e){this.toolbar?.setBackgroundColor(e)}setColors(e){this.toolbar?.setColors(e)}}class Fr extends mi{dialog=null;isVisible=!1;get dialogWidth(){return 300}get dialogHeight(){return"auto"}get dialogOptions(){return{draggable:!0,resizable:!1}}onDialogClose(){}onDialogCreated(){}onBeforeDestroy(){}getDialogPosition(){const e=this.registry.container;if(!e)return{x:100,y:100};const t=e.clientWidth,n=e.clientHeight,i=this.dialogWidth,r=typeof this.dialogHeight=="number"?this.dialogHeight:300;return{x:t-i-20,y:(n-r)/2}}show(){if(!this.registry.dialog||!this.registry.container){console.warn(`[${this.dialogId}] Dialog manager or container is not initialized`);return}this.dialog&&this.destroyDialog();const e=this.getDialogPosition(),t=this.createContent(),n=this.dialogOptions;this.dialog=this.registry.dialog.create({id:this.dialogId,title:this.dialogTitle,content:t,width:this.dialogWidth,height:this.dialogHeight,position:e,draggable:n.draggable,resizable:n.resizable,onClose:()=>{this.onDialogClose(),this.destroyDialog()}}),this.dialog.init(),this.isVisible=!0,this.onDialogCreated()}hide(){this.destroyDialog()}toggle(){this.isVisible?this.hide():this.show()}isOpen(){return this.isVisible}destroyDialog(){this.onBeforeDestroy(),this.dialog&&(this.dialog.destroy(),this.dialog=null),this.isVisible=!1}destroy(){this.destroyDialog(),super.destroy()}}const is={clearHeight:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">净高</text></svg>',clearDistance:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">净距</text></svg>',distance:'<svg viewBox="0 0 32 32" aria-hidden="true"><g transform="translate(0 4.197)"><path fill="currentColor" d="M29.692,3.03,27.55.919a.529.529,0,0,1-.014-.756A.549.549,0,0,1,28.3.15l.014.013,3.067,3.023a.529.529,0,0,1,0,.756L28.317,6.966a.549.549,0,0,1-.767.013.529.529,0,0,1-.014-.756l.014-.013L29.692,4.1H2.31L4.452,6.21a.528.528,0,0,1,.013.756.547.547,0,0,1-.766.013l-.014-.013L.616,3.942a.531.531,0,0,1,0-.756L3.685.163a.548.548,0,0,1,.767.014.528.528,0,0,1,0,.742L2.31,3.03ZM24.136,15.055H23.051V18H21.966v-2.94H20.882V18H19.8v-2.94H18.712V18H17.627v-2.94H16.543v5.078H15.458V15.055H14.373V18H13.288v-2.94H12.2V18H11.119v-2.94H10.034V18H8.949v-2.94H7.865V18H6.78v-2.94H5.7v5.078H4.61V15.055H1.9a.27.27,0,0,0-.272.268v6.413A.269.269,0,0,0,1.9,22H30.1a.268.268,0,0,0,.271-.267V15.323a.269.269,0,0,0-.271-.268H27.39v5.078H26.305V15.055H25.221V18H24.136Zm5.966-1.6A1.884,1.884,0,0,1,32,15.323v6.413a1.885,1.885,0,0,1-1.9,1.871H1.9A1.885,1.885,0,0,1,0,21.736V15.323a1.885,1.885,0,0,1,1.9-1.871Z"/></g></svg>',elevation:'<svg viewBox="0 0 32 32" aria-hidden="true"><path fill="currentColor" d="M84.131,193.119a1.056,1.056,0,0,1,1.116.982v7.857a1.056,1.056,0,0,1-1.116.982H54.367a1.056,1.056,0,0,1-1.116-.982V194.1a1.056,1.056,0,0,1,1.116-.982Zm-1.116,1.964H55.483v5.893H83.015Zm1.116-13.749a1.064,1.064,0,0,1,1.114.935,1.032,1.032,0,0,1-1.007,1.025l-.107,0H71.2l-7.858,6.914a1.227,1.227,0,0,1-1.578,0l-8.185-7.2-.018-.016-.032-.031.049.047a1.107,1.107,0,0,1-.092-.092l-.011-.014a.869.869,0,0,1-.182-.857l0-.008L53.31,182l.012-.029.02-.045.019-.035a1.1,1.1,0,0,1,.891-.552h.007q.053,0,.107,0ZM68.043,183.3H57.06l5.492,4.831Z" transform="translate(-53.247 -176.136)"/></svg>',point:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">坐标</text></svg>',angle:'<svg viewBox="0 0 32 32" aria-hidden="true"><path fill="currentColor" d="M39.587,50.766h13.7a1,1,0,0,1,0,2H23.171a1,1,0,0,1,0-2h1.418l6.582-7.006v-.006a.517.517,0,0,1,.14-.357.456.456,0,0,1,.337-.144l12.1-12.876a.451.451,0,0,1,.665,0,.524.524,0,0,1,0,.708L32.883,43.355a8.3,8.3,0,0,1,6.7,7.411Zm-.949,0a7.254,7.254,0,0,0-6.611-6.5l-6.108,6.5Z" transform="translate(-22.229 -26.489)"/></svg>',area:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">面积</text></svg>',slope:'<svg viewBox="0 0 32 32" aria-hidden="true"><path fill="currentColor" d="M202.1,188.337l2.629-2.191-8.447-3.106,1.533,8.871,2.629-2.194,9.341,11.209,1.656-1.379Zm-13.726-.435a1.075,1.075,0,0,0-1.07-.341,1.057,1.057,0,0,0-.5.277l-5.11,4.08a1.08,1.08,0,0,0-.406.84l-.007,17.386a1.079,1.079,0,0,0,1.077,1.077L205.7,211.2a1.078,1.078,0,0,0,.822-1.774Zm-4.934,21.164.007-15.788,3.968-3.171,15.974,18.941Z" transform="translate(-180.36 -181.131)"/></svg>'},Vo={distance:{key:"distance",callBackType:"distance",icon:is.distance,order:0},clearHeight:{key:"clearHeight",callBackType:"clear-height",icon:is.clearHeight,order:1},clearDistance:{key:"clearDistance",callBackType:"clear-distance",icon:is.clearDistance,order:2},elevation:{key:"elevation",callBackType:"elevation",icon:is.elevation,order:3},point:{key:"point",callBackType:"point",icon:is.point,order:4},angle:{key:"angle",callBackType:"angle",icon:is.angle,order:5},area:{key:"area",callBackType:"area",icon:is.area,order:6},slope:{key:"slope",callBackType:"slope",icon:is.slope,order:7}},Hg=Object.values(Vo).sort((s,e)=>s.order-e.order).map(s=>s.key);function Vg(s){switch(s){case"clearHeight":case"clearDistance":case"distance":case"elevation":return"length";case"area":return"area";case"angle":return"angle";case"slope":return"percent";case"point":default:return"point"}}function KE(s){return Object.values(Vo).find(e=>e.callBackType===s)?.key}class Go{element;options;activeMode;isExpanded;result=null;config;draftConfig=null;view="main";static CONFIG_CACHE_KEY="bim-engine:measure:config";static DEFAULT_CONFIG={unit:"mm",precision:2};toolButtons=new Map;toggleBtn;toggleTextEl;mainValueRowEl;mainValueValueEl;mainValueLabelEl;mainNumberEl;mainUnitEl;xyzBoxEl;xyzXEl;xyzYEl;xyzZEl;clearBtn;settingsBtn;mainViewEl;settingsViewEl;unitSelectEl;precisionSelectEl;saveSettingsBtn;cancelSettingsBtn;unsubscribeLocale=null;unsubscribeTheme=null;constructor(e={}){this.options=e,this.activeMode=e.defaultMode??"distance",this.isExpanded=e.defaultExpanded??!1,this.config=this.loadConfigFromCache()??{...Go.DEFAULT_CONFIG},this.element=this.createDom()}init(){this.unsubscribeLocale=Yt.subscribe(()=>{this.setLocales()}),this.unsubscribeTheme=ot.subscribe(e=>{this.setTheme(e)}),this.setLocales(),this.setTheme(ot.getTheme()),this.applyExpandedState(),this.applyActiveModeState(),this.applyViewState(),this.renderResult(),this.options.onModeChange&&this.options.onModeChange(this.activeMode)}setTheme(e){const t=this.element.style;t.setProperty("--bim-bg-inset",e.bgInset??"#152232"),t.setProperty("--bim-bg-elevated",e.bgElevated??"#1f2d3e"),t.setProperty("--bim-border-default",e.borderDefault??"#334155"),t.setProperty("--bim-border-strong",e.borderStrong??"#475569"),t.setProperty("--bim-divider",e.divider??"#334155"),t.setProperty("--bim-primary",e.primary??"#3b82f6"),t.setProperty("--bim-primary-hover",e.primaryHover??"#60a5fa"),t.setProperty("--bim-primary-subtle",e.primarySubtle??"rgba(59, 130, 246, 0.15)"),t.setProperty("--bim-danger",e.danger??"#ef4444"),t.setProperty("--bim-text-primary",e.textPrimary??"#ffffff"),t.setProperty("--bim-text-secondary",e.textSecondary??"#94a3b8"),t.setProperty("--bim-text-tertiary",e.textTertiary??"#64748b"),t.setProperty("--bim-text-inverse",e.textInverse??"#152232"),t.setProperty("--bim-icon-default",e.iconDefault??"#ffffff"),t.setProperty("--bim-component-bg-hover",e.componentBgHover??"rgba(248, 250, 252, 0.06)")}setLocales(){for(const[t,n]of this.toolButtons.entries())n.title=ve(this.getModeI18nKey(t)),n.setAttribute("aria-label",n.title);this.toggleBtn.title=this.isExpanded?ve("measure.actions.collapse"):ve("measure.actions.expand"),this.toggleBtn.setAttribute("aria-label",this.toggleBtn.title),this.toggleTextEl&&(this.toggleTextEl.textContent=this.toggleBtn.title),this.clearBtn.textContent=ve("measure.actions.clearAll"),this.settingsBtn.title=ve("measure.actions.settings"),this.settingsBtn.setAttribute("aria-label",this.settingsBtn.title),this.mainValueLabelEl.textContent=ve(this.getModeValueLabelI18nKey(this.activeMode)),this.element.querySelectorAll("[data-i18n-key]").forEach(t=>{const n=t.dataset.i18nKey;n&&(t.textContent=ve(n))}),this.saveSettingsBtn.textContent=ve("measure.settings.save"),this.cancelSettingsBtn.textContent=ve("measure.settings.cancel")}destroy(){this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.element.remove()}getActiveMode(){return this.activeMode}switchMode(e,t=!0){this.setActiveMode(e,t)}setActiveMode(e,t=!0){this.activeMode!==e&&(this.activeMode=e,this.applyActiveModeState(),this.mainValueLabelEl.textContent=ve(this.getModeValueLabelI18nKey(this.activeMode)),t&&this.options.onModeChange&&this.options.onModeChange(e),this.renderResult(),this.options.onExpandedChange&&this.options.onExpandedChange(this.isExpanded))}setResult(e){this.result=e,this.renderResult()}clearAll(){this.result=null,this.renderResult(),this.options.onClearAll&&this.options.onClearAll()}openSettings(){this.enterSettingsView(),this.options.onSettings&&this.options.onSettings()}getConfig(){return{...this.config}}setConfig(e,t=!1){const n={unit:e.unit??this.config.unit,precision:e.precision??this.config.precision};this.config=n,t&&this.saveConfigToCache(n),this.renderResult(),this.view==="settings"&&this.syncSettingsFormFromConfig(n)}setExpanded(e){this.isExpanded!==e&&(this.isExpanded=e,this.applyExpandedState(),this.setLocales(),this.options.onExpandedChange&&this.options.onExpandedChange(this.isExpanded))}getExpanded(){return this.isExpanded}createDom(){const e=document.createElement("div");e.className="bim-measure-panel",this.mainViewEl=document.createElement("div"),this.mainViewEl.className="bim-measure-main";const t=document.createElement("div");t.className="bim-measure-tools";const n=document.createElement("div");n.className="bim-measure-tool-grid";const i=`
4753
+ `)(n,t);return r&&typeof r.then=="function"?await r:r}catch(n){return console.error("[AI Manager] 代码执行失败:",n),"error"+n.message}}reset(){this.conversationHistory=[],this.steps=[],this.stepResults.clear(),this.state="idle",this.config?.debug&&console.log("[AI Manager] 对话已重置")}getState(){return this.state}getHistory(){return[...this.conversationHistory]}getSteps(){return[...this.steps]}getStepResults(){return new Map(this.stepResults)}}class zE{engine;points=[];isPlaying=!1;animationFrameId=null;playStartTime=0;playFromIndex=0;playToIndex=0;playOptions={};stayTimerId=null;playRangeToIndex=0;constructor(e){this.engine=e}init(){this.points=[],this.stop()}getCurrentPoint(){return{...this.engine.cameraModule.getCameraPose(),stayTime:0}}addPoint(e=0){const t=this.getCurrentPoint();return t.stayTime=e,this.points.push(t),this.points.length}addPoints(e){for(const t of e)this.points.push({...t});return this.points.length}savePoints(e){return this.addPoints(e)}removePoint(e){return e>=0&&e<this.points.length?(this.points.splice(e,1),!0):!1}clearPoints(){this.stop(),this.points=[]}getPoints(){return[...this.points]}getPointCount(){return this.points.length}updatePoint(e,t){return e>=0&&e<this.points.length?(this.points[e]={...t},!0):!1}jumpToPoint(e){return e>=0&&e<this.points.length?(this.stop(),this.engine.cameraModule.restoreCameraPose(this.points[e]),!0):!1}play(e={}){return this.points.length<2?(console.warn("PathRoaming: 至少需要2个点位才能播放"),!1):(this.isPlaying&&this.stop(),this.isPlaying=!0,this.playOptions={duration:3e3,loop:!1,...e},this.engine.controlModule.disActive(),this.playFromIndex=0,this.playToIndex=1,this.playRangeToIndex=this.points.length-1,this.playStartTime=performance.now(),this.animate(),!0)}playRange(e,t,n={}){return e<0||t>=this.points.length||e>=t?(console.warn("PathRoaming: 无效的索引范围"),!1):this.points.length<2?(console.warn("PathRoaming: 至少需要2个点位才能播放"),!1):(this.isPlaying&&this.stop(),this.isPlaying=!0,this.playOptions={duration:3e3,loop:!1,...n},this.engine.controlModule.disActive(),this.playFromIndex=e,this.playToIndex=e+1,this.playStartTime=performance.now(),this.playRangeToIndex=t,this.animate(),!0)}stop(){this.isPlaying=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.stayTimerId!==null&&(clearTimeout(this.stayTimerId),this.stayTimerId=null),this.engine.controlModule.active()}pause(){this.isPlaying&&(this.isPlaying=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null),this.stayTimerId!==null&&(clearTimeout(this.stayTimerId),this.stayTimerId=null))}getIsPlaying(){return this.isPlaying}animate=()=>{if(!this.isPlaying)return;const e=performance.now()-this.playStartTime,t=this.playOptions.duration||3e3,n=Math.min(e/t,1),i=this.points[this.playFromIndex],r=this.points[this.playToIndex],o=this.interpolatePose(i,r,n);this.engine.cameraModule.restoreCameraPose(o),n>=1?this.onSegmentComplete():this.animationFrameId=requestAnimationFrame(this.animate)};onSegmentComplete(){const e=this.playToIndex;this.playOptions.onPointComplete&&this.playOptions.onPointComplete(e);const t=this.points[e];t.stayTime&&t.stayTime>0?this.stayTimerId=globalThis.setTimeout(()=>{this.stayTimerId=null,this.moveToNextSegment()},t.stayTime):this.moveToNextSegment()}moveToNextSegment(){const e=this.playToIndex>=this.playRangeToIndex,t=this.playToIndex>=this.points.length-1;e||t?this.playOptions.loop&&this.points.length>=2?(this.playFromIndex=0,this.playToIndex=1,this.playRangeToIndex=this.points.length-1,this.playStartTime=performance.now(),this.animate()):this.onPlayComplete():(this.playFromIndex=this.playToIndex,this.playToIndex=this.playToIndex+1,this.playStartTime=performance.now(),this.animate())}onPlayComplete(){this.stop(),this.playOptions.onComplete&&this.playOptions.onComplete()}interpolatePose(e,t,n){const i=this.easeInOutCubic(n),r={type:t.type,position:{x:Ft.lerp(e.position.x,t.position.x,i),y:Ft.lerp(e.position.y,t.position.y,i),z:Ft.lerp(e.position.z,t.position.z,i)},rotation:{x:Ft.lerp(e.rotation.x,t.rotation.x,i),y:Ft.lerp(e.rotation.y,t.rotation.y,i),z:Ft.lerp(e.rotation.z,t.rotation.z,i)},quaternion:{x:Ft.lerp(e.quaternion.x,t.quaternion.x,i),y:Ft.lerp(e.quaternion.y,t.quaternion.y,i),z:Ft.lerp(e.quaternion.z,t.quaternion.z,i),w:Ft.lerp(e.quaternion.w,t.quaternion.w,i)}};return e.target&&t.target?r.target={x:Ft.lerp(e.target.x,t.target.x,i),y:Ft.lerp(e.target.y,t.target.y,i),z:Ft.lerp(e.target.z,t.target.z,i)}:t.target&&(r.target={...t.target}),e.zoom!==void 0&&t.zoom!==void 0&&(r.zoom=Ft.lerp(e.zoom,t.zoom,i)),r}easeInOutCubic(e){return e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2}dispose(){this.stop(),this.points=[],this.playOptions={}}}class HE{options;DeviceType;animationId=null;isRenderingPaused=!1;controlsEnabledBeforePause=!0;animate;onWindowResize;scene;camera;renderer;sceneModule;cameraModule;deviceModule;renderModule;controlModule;composerModule;loaderModule;engineStatus;events;lightModule;interactionModule;modelToolModule;worldToScreen;handelBehaved;octreeBox;controls;stats;catchSvg;viewCube;rangeScale;setting;measure;clipping;modelTree;engineInfo;modelProperties;modelMapperBatch;modelEdge;ai;pathRoaming;models=[];reactBoundingClientRect={left:0,top:0};container;constructor(e){if(this.options=e,this.container=document.getElementById(e.containerId),!this.container)throw new Error(`Container ${e.containerId} not found`);this.ai=new FE(this),this.deviceModule=new c2(this),this.DeviceType=this.deviceModule.getDeviceType(),this.cameraModule=new l2(this),this.sceneModule=new a2(this),this.scene=this.sceneModule.scene,this.renderModule=new h2(this),this.renderer=this.renderModule.createRenderer(),this.camera=this.cameraModule.orthographicCamera,this.scene.camera=this.camera,this.controlModule=new E2(this),this.controlModule.switchDefaultMode(),this.controls=this.controlModule.orbitControls,this.composerModule=new F2(this),this.composerModule.init(),this.events=new h3,this.engineStatus=new c3(this),this.engineStatus.init(),this.loaderModule=new l3(this),this.lightModule=new u3(this),this.lightModule.init(),this.viewCube=new T3(this),this.viewCube.init(),this.options.showViewCube==!1&&this.viewCube.hide(),this.octreeBox=C3(this),this.rangeScale=new A3(this),this.rangeScale.init(),this.clipping=new IE(this),this.clipping.init(),this.setting=new P3(this),this.setting.init(),this.handelBehaved=Xh(this),this.modelMapperBatch=new kE(this),this.measure=new O3(this),this.modelToolModule=new p3(this),this.modelProperties=new NE(this),this.interactionModule=new d3(this),this.interactionModule.init(),this.interactionModule.active(),this.modelEdge=new UE(this),this.modelTree=new DE(this),this.engineInfo=new BE(this),this.pathRoaming=new zE(this),this.pathRoaming.init(),this.worldToScreen=new Un(this.camera,this.renderer,this.scene),this.options.showStats&&(this.stats=new y3,this.stats.showPanel(0),this.stats.dom.style.position="absolute",this.stats.dom.style.top="0px",this.stats.dom.style.left="0px",this.stats.dom.style.zIndex="1000",this.container.appendChild(this.stats.dom));let t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.style.position="absolute",t.style.width="100%",t.style.height="100%",t.style.zIndex="1000",t.style.left="0px",t.style.top="0px",t.style.pointerEvents="none";const n=this.renderer?.domElement.width||1920,i=this.renderer?.domElement.height||1080;t.setAttribute("viewBox",`0 0 ${n} ${i}`),t.setAttribute("preserveAspectRatio","none"),this.container.appendChild(t),this.catchSvg=t,this.onWindowResize=()=>{this.handleWindowResize()},window.addEventListener("resize",this.onWindowResize),this.animate=()=>{if(!this.isRenderingPaused)this.animationId=requestAnimationFrame(this.animate);else{this.animationId=null;return}if(this.stats&&this.stats.begin(),this.composerModule&&this.composerModule.composer.render(),this.viewCube&&this.viewCube.cubeTool.RenderScene(),this.measure.update(),this.controlModule.update(),this.stats&&this.stats.end(),this.scene){let r=this.scene?.dirLight;r&&this.camera&&this.updateLightPosition(this.camera,r)}},this.animate()}updateLightPosition(e,t){const n=new R;e.getWorldDirection(n);const i=new R().copy(n).multiplyScalar(-100);t.position.copy(e.position).add(i);const r=new R().copy(e.position).add(n.multiplyScalar(20));t.target.position.copy(r),t.target.updateMatrixWorld()}pauseRendering(){if(this.isRenderingPaused){console.warn("[BimEngine] Rendering is already paused");return}this.isRenderingPaused=!0,this.controls&&(this.controlsEnabledBeforePause=this.controls.enabled,this.controls.enabled=!1)}resumeRendering(){if(!this.isRenderingPaused){console.warn("[BimEngine] Rendering is not paused");return}this.isRenderingPaused=!1,this.controls&&(this.controls.enabled=this.controlsEnabledBeforePause),this.animationId===null&&this.animate()}isRenderingPausedState(){return this.isRenderingPaused}handleWindowResize(e,t){if(!this.container||!this.renderer||!this.camera)return;if(e===void 0||t===void 0){const i=this.deviceModule.getContainerSize();e=e??i.width,t=t??i.height}if(!e||!t)return;this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(e,t);const n=e/t;if(this.camera===this.cameraModule.perspectiveCamera)this.cameraModule.perspectiveCamera.aspect=n,this.cameraModule.perspectiveCamera.updateProjectionMatrix(),this.camera=this.cameraModule.perspectiveCamera;else if(this.camera===this.cameraModule.orthographicCamera){const i=this.cameraModule.orthographicCamera,r=50,o=this.container.clientWidth/this.container.clientHeight;i.left=r*o/-2,i.right=r*o/2,i.top=r/2,i.bottom=r/-2,i.updateProjectionMatrix()}if(this.catchSvg){const i=this.renderer.domElement.width,r=this.renderer.domElement.height;this.catchSvg.setAttribute("viewBox",`0 0 ${i} ${r}`)}this.events&&this.events.trigger(Ar.ViewportResize,{width:e,height:t})}dispose(){console.log("[BimEngine] Starting engine disposal..."),this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null),this.isRenderingPaused=!0,this.onWindowResize&&window.removeEventListener("resize",this.onWindowResize);try{this.measure&&(this.measure.disActive(),this.measure.clearAll(),this.measure.annotationContainer&&this.measure.annotationContainer.remove()),this.clipping&&this.clipping.disActive(),this.interactionModule&&this.interactionModule.disActive(),this.viewCube&&this.viewCube.cubeTool&&typeof this.viewCube.cubeTool.dispose=="function"&&this.viewCube.cubeTool.dispose()}catch(e){console.warn("[BimEngine] Error disposing managers:",e)}try{this.controlModule&&(this.controlModule.originDiv&&this.controlModule.originDiv.remove(),this.controlModule.orbitControls&&typeof this.controlModule.orbitControls.dispose=="function"&&this.controlModule.orbitControls.dispose(),this.controlModule.firstPersonControls&&typeof this.controlModule.firstPersonControls.dispose=="function"&&this.controlModule.firstPersonControls.dispose())}catch(e){console.warn("[BimEngine] Error disposing controls:",e)}this.scene&&this.clearScene(this.scene);try{this.composerModule&&this.composerModule.composer&&(this.composerModule.composer.passes&&this.composerModule.composer.passes.forEach(e=>{e.dispose&&e.dispose()}),this.composerModule.composer.renderTarget1&&this.composerModule.composer.renderTarget1.dispose(),this.composerModule.composer.renderTarget2&&this.composerModule.composer.renderTarget2.dispose())}catch(e){console.warn("[BimEngine] Error disposing composer:",e)}try{this.renderModule&&this.renderModule.disposeRenderer(),this.renderer&&(this.renderer.domElement&&this.renderer.domElement.parentElement&&this.renderer.domElement.parentElement.removeChild(this.renderer.domElement),this.renderer.dispose(),this.renderer.forceContextLoss())}catch(e){console.warn("[BimEngine] Error disposing renderer:",e)}try{this.stats&&this.stats.dom&&this.stats.dom.parentElement&&this.stats.dom.parentElement.removeChild(this.stats.dom),this.catchSvg&&this.catchSvg.parentElement&&this.catchSvg.parentElement.removeChild(this.catchSvg)}catch(e){console.warn("[BimEngine] Error disposing DOM elements:",e)}try{this.events&&this.events.listeners&&this.events.listeners.clear()}catch(e){console.warn("[BimEngine] Error clearing event listeners:",e)}this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.models=[],this.container=null,console.log("[BimEngine] Engine disposal completed")}clearScene(e){e&&([...e.children].forEach(t=>{this.clearScene(t)}),e.parent&&e.parent.remove(e),e instanceof mt&&(e.geometry&&e.geometry.dispose(),e.material&&(Array.isArray(e.material)?e.material.forEach(t=>this.disposeMaterial(t)):this.disposeMaterial(e.material))),e instanceof hr&&(e.geometry&&e.geometry.dispose(),e.material&&this.disposeMaterial(e.material)),e instanceof Cp&&(e.geometry&&e.geometry.dispose(),e.material&&this.disposeMaterial(e.material)),e instanceof Ht&&(e.geometry&&e.geometry.dispose(),e.material&&(Array.isArray(e.material)?e.material.forEach(t=>this.disposeMaterial(t)):this.disposeMaterial(e.material)),e.instanceMatrix&&(e.instanceMatrix=null),e.instanceColor&&(e.instanceColor=null)),e instanceof Ax&&e.material&&this.disposeMaterial(e.material))}disposeMaterial(e){e&&(["map","lightMap","bumpMap","normalMap","specularMap","envMap","alphaMap","aoMap","displacementMap","emissiveMap","gradientMap","metalnessMap","roughnessMap","clearcoatMap","clearcoatNormalMap","clearcoatRoughnessMap","transmissionMap","thicknessMap","sheenColorMap","sheenRoughnessMap","specularIntensityMap","specularColorMap","iridescenceMap","iridescenceThicknessMap"].forEach(t=>{const n=e[t];n&&n instanceof zt&&n.dispose()}),e.dispose())}}function VE(s){return new HE(s)}class ns{engine=null;container;containerId;options;_isInitialized=!1;_isDestroyed=!1;unsubscribeTheme=null;currentMeasureType=null;isMeasureActive=!1;currentSectionMode=null;selectedComponent=null;constructor(e){this.container=e.container,this.container.id?this.containerId=this.container.id:(this.containerId=`engine-container-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,this.container.id=this.containerId),this.options={backgroundColor:"linear-gradient(to bottom, rgb(214, 224, 235), rgb(246, 250, 255))",version:e.version??"v2",showStats:e.showStats??!1,showViewCube:e.showViewCube??!0}}init(){if(this._isInitialized){console.warn("[Engine] Engine already initialized.");return}if(this._isDestroyed){console.error("[Engine] Cannot initialize destroyed engine.");return}try{typeof this.options.backgroundColor=="string"&&(this.container.style.background=this.options.backgroundColor);const e={containerId:this.containerId,backgroundColor:this.options.backgroundColor,version:this.options.version,showStats:this.options.showStats,showViewCube:this.options.showViewCube};if(console.log("引擎配置信息:",e),this.engine=VE(e),!this.engine)throw new Error("Failed to create engine instance");this._isInitialized=!0,this.unsubscribeTheme=ot.subscribe(t=>{this.setTheme(t)}),this.setTheme(ot.getTheme()),this.engine.events.on("click",t=>{const n=ft.getInstance();t&&t.object?(this.selectedComponent={url:t.object.url,id:t.object.name},console.log("[Engine] 构件选中:",this.selectedComponent),n.emit("component:selected",this.selectedComponent)):(this.selectedComponent=null,console.log("[Engine] 取消选中"),n.emit("component:deselected",{}))})}catch(e){throw console.error("[Engine] Failed to initialize engine:",e),this._isInitialized=!1,e}}setTheme(e){}setLocales(){}isInitialized(){return this._isInitialized}loadModel(e,t){if(!this._isInitialized||!this.engine){console.error("[Engine] Engine not initialized. Please call init() first.");return}if(!e||e.length===0){console.error("[Engine] Model URLs are required.");return}this.engine.loaderModule.loadModels(e,t)}CameraGoHome(){this.engine.viewCube.CameraGoHome()}getEngine(){return this.engine}pauseRendering(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.pauseRendering()}resumeRendering(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.resumeRendering()}dispose(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.dispose()}activateMeasure(e){if(!this._isInitialized||!this.engine?.measure){console.error("[Engine] Cannot activate measure: engine not initialized.");return}if(this.currentMeasureType===e){console.log(`[Engine] Measure ${e} already active, skipping.`);return}this.isMeasureActive||(console.log("[Engine] Activating measure module"),this.engine.measure.active(),this.isMeasureActive=!0),console.log(`[Engine] Activating measure: ${e}`);const t=this.engine.measure;switch(e){case"clearHeight":t.clearHeightMeasure.active();break;case"clearDistance":t.clearDistanceMeasure.active();break;case"distance":t.distanceMeasure.active();break;case"elevation":t.elevationMeasure.active();break;case"point":t.pointMeasure.active();break;case"angle":t.angleMeasure.active();break;case"area":t.areaMeasure.active();break;case"slope":t.slopeMeasure.active();break;default:console.error(`[Engine] Unknown measure type: ${e}`);return}this.currentMeasureType=e}getCurrentMeasureType(){return this.currentMeasureType}deactivateMeasure(){!this._isInitialized||!this.engine?.measure||(console.log("[Engine] Deactivating measure"),this.engine.measure.disActive(),this.engine.measure.clearAll(),this.isMeasureActive=!1,this.currentMeasureType=null)}clearAllMeasures(){!this._isInitialized||!this.engine?.measure||(console.log("[Engine] Clearing all measures"),this.engine.measure.clearAll())}saveMeasureSetting(e){!this._isInitialized||!this.engine?.measure||this.engine.measure.saveSetting?.(e)}activeSection(e){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot activate section: engine not initialized.");return}if(this.currentSectionMode===e){console.log(`[Engine] Section ${e} already active, skipping.`);return}console.log(`[Engine] Activating section: ${e}`),this.engine.clipping.active(e),this.currentSectionMode=e}getCurrentSectionMode(){return this.currentSectionMode}setSectionBoxRange(e){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot set section box range: engine not initialized.");return}this.engine.clipping.updateClippingValue(e)}deactivateSection(){!this._isInitialized||!this.engine?.clipping||(console.log("[Engine] Deactivating all sections"),this.engine.clipping.disActive(),this.currentSectionMode=null)}hideSection(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot hide section: engine not initialized.");return}console.log("[Engine] Hiding section"),this.engine.clipping.disabled()}recoverSection(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot recover section: engine not initialized.");return}console.log("[Engine] Recovering section"),this.engine.clipping.recover()}fitSectionBoxToModel(){if(!this._isInitialized||!this.engine){console.error("[Engine] Cannot fit section box: engine not initialized.");return}const e=this.engine.engineStatus?.highlightModels;e&&(console.log("[Engine] Fitting section box to model"),this.engine.clipping?.clippingModel(e))}scaleSectionBox(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot scale section box: engine not initialized.");return}this.engine.clipping.scaleBox()}reverseSection(){if(!this._isInitialized||!this.engine?.clipping){console.error("[Engine] Cannot reverse section: engine not initialized.");return}this.engine.clipping.reverse()}isWalkModeActive=!1;activateFirstPersonMode(){if(!this._isInitialized||!this.engine){console.error("[Engine] Cannot activate first person mode: engine not initialized.");return}if(!this.engine.controlModule){console.error("[Engine] Control module not available.");return}if(this.isWalkModeActive){console.log("[Engine] First person mode already active, skipping.");return}console.log("[Engine] Activating first person mode"),this.engine.controlModule.switchFirstPersonMode(),this.loadWalkSettings(),this.isWalkModeActive=!0}deactivateFirstPersonMode(){!this._isInitialized||!this.engine?.controlModule||this.isWalkModeActive&&(console.log("[Engine] Deactivating first person mode"),this.engine.controlModule.switchDefaultMode(),this.isWalkModeActive=!1)}static WALK_SPEED_KEY="bim-walk-speed";static WALK_GRAVITY_KEY="bim-walk-gravity";static WALK_COLLISION_KEY="bim-walk-collision";setWalkSpeed(e){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot set walk speed: engine not initialized.");return}localStorage.setItem(ns.WALK_SPEED_KEY,String(e)),this.engine.controlModule.setMoveSpeed(e)}setWalkGravity(e){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot set walk gravity: engine not initialized.");return}localStorage.setItem(ns.WALK_GRAVITY_KEY,String(e)),this.engine.controlModule.setApplyGravity(e)}setWalkCollision(e){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot set walk collision: engine not initialized.");return}localStorage.setItem(ns.WALK_COLLISION_KEY,String(e)),this.engine.controlModule.setApplyCollision(e)}loadWalkSettings(){if(!this.engine?.controlModule)return;const e=localStorage.getItem(ns.WALK_SPEED_KEY),t=localStorage.getItem(ns.WALK_GRAVITY_KEY),n=localStorage.getItem(ns.WALK_COLLISION_KEY);this.engine.controlModule.setMoveSpeed(e?Number(e):1),this.engine.controlModule.setApplyGravity(t==="true"),this.engine.controlModule.setApplyCollision(n==="true")}toggleMiniMap(){if(!this._isInitialized||!this.engine?.controlModule){console.error("[Engine] Cannot toggle mini map: engine not initialized.");return}this.engine.controlModule.toggleMinMap()}isFirstPersonModeActive(){return this.isWalkModeActive}getSelectedComponent(){return this.selectedComponent}getComponentProperties(e,t,n){if(!this._isInitialized||!this.engine){console.error("[Engine] Cannot get component properties: engine not initialized.");return}if(!this.engine.modelProperties){console.error("[Engine] modelProperties not available");return}console.log("[Engine] Getting component properties:",{url:e,id:t}),this.engine.modelProperties.getModelProperties(e,t,n)}getTypeTreeData(){return!this._isInitialized||!this.engine?.modelTree?[]:this.engine.modelTree.getTypeTreeData()}getLevelTreeData(){return!this._isInitialized||!this.engine?.modelTree?[]:this.engine.modelTree.getLevelTreeData()}getMajorTreeData(){return!this._isInitialized||!this.engine?.modelTree?[]:this.engine.modelTree.getMajorTreeData()}activateZoomBox(){if(!this._isInitialized||!this.engine){console.warn("[Engine] Engine not initialized.");return}this.engine.rangeScale?.active()}getEngineInfo(){return!this._isInitialized||!this.engine?(console.warn("[Engine] Engine not initialized."),null):this.engine.engineInfo.getEngineInfo()}pathRoamingAddPoint(){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.addPoint(0)}pathRoamingRemovePoint(e){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.removePoint(e)}pathRoamingClearPoints(){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.clearPoints()}pathRoamingGetPoints(){return!this._isInitialized||!this.engine?.pathRoaming?(console.warn("[Engine] pathRoaming not available"),[]):this.engine.pathRoaming.getPoints()??[]}pathRoamingJumpToPoint(e){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.jumpToPoint(e)}pathRoamingPlay(e){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.play(e)}pathRoamingStop(){if(!this._isInitialized||!this.engine?.pathRoaming){console.warn("[Engine] pathRoaming not available");return}this.engine.pathRoaming.stop()}getHighlightModels(){return!this._isInitialized||!this.engine?null:this.engine.engineStatus?.highlightModels??null}highlightModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot highlight model: engine not initialized.");return}this.engine.modelToolModule.highlightModel(e)}unhighlightAllModels(){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot unhighlight models: engine not initialized.");return}this.engine.modelToolModule.unhighlightAllModels()}viewScaleToModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot view scale to model: engine not initialized.");return}this.engine.modelToolModule.viewScaleToModel(e)}hideModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot hide models: engine not initialized.");return}this.engine.modelToolModule.hideModel(e)}showModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot show model: engine not initialized.");return}this.engine.modelToolModule.showModel(e)}translucentModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot translucent models: engine not initialized.");return}e&&this.engine.modelToolModule.translucentModel(e)}unTranslucentModel(){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot cancel translucent: engine not initialized.");return}this.engine.modelToolModule.unTranslucentModel()}isolateModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot isolate models: engine not initialized.");return}e&&this.engine.modelToolModule.isolateModel(e)}translucentOtherModels(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot translucent other models: engine not initialized.");return}e&&this.engine.modelToolModule.translucentOtherModel(e)}showAllModels(){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot show all models: engine not initialized.");return}this.deactivateSection(),this.engine.modelToolModule.showAllModels()}batchSelectSameTypeModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot batch select: engine not initialized.");return}e&&this.engine.modelToolModule.batchSelectSameTypeModel(e)}batchSelectSameLevelModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot batch select: engine not initialized.");return}e&&this.engine.modelToolModule.batchSelectSameLevelModel(e)}batchSelectSameLevelTypeModel(e){if(!this._isInitialized||!this.engine?.modelToolModule){console.warn("[Engine] Cannot batch select: engine not initialized.");return}e&&this.engine.modelToolModule.batchSelectSameLevelTypeModel(e)}destroy(){this._isDestroyed||(this.deactivateMeasure(),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.engine&&(this.engine.dispose(),this.engine=null),this.container.innerHTML="",this.currentMeasureType=null,this.isMeasureActive=!1,this._isDestroyed=!0,this._isInitialized=!1)}}class GE{element;content=null;isVisible=!1;onCloseCallback;options;mouseDownTime=0;CLICK_THRESHOLD=200;constructor(e){this.options=e,this.element=document.createElement("div"),this.element.className=`bim-right-key ${e?.className||""}`,e?.zIndex&&(this.element.style.zIndex=e.zIndex.toString()),document.body.appendChild(this.element)}init(){document.addEventListener("mousedown",this.handleGlobalClick),this.element.addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation()}),this.options?.container&&(this.options.container.addEventListener("mousedown",this.handleContainerMouseDown),this.options.container.addEventListener("mouseup",this.handleContainerMouseUp),this.options.container.addEventListener("contextmenu",this.handleContainerContextMenu))}setTheme(e){}setLocales(){}destroy(){document.removeEventListener("mousedown",this.handleGlobalClick),this.options?.container&&(this.options.container.removeEventListener("mousedown",this.handleContainerMouseDown),this.options.container.removeEventListener("mouseup",this.handleContainerMouseUp),this.options.container.removeEventListener("contextmenu",this.handleContainerContextMenu)),this.unmountContent(),this.element.remove()}handleContainerMouseDown=e=>{e.button===2&&(this.mouseDownTime=Date.now())};handleContainerMouseUp=e=>{e.button!==2||Date.now()-this.mouseDownTime>this.CLICK_THRESHOLD||this.options?.onContext&&this.options.onContext(e)};handleContainerContextMenu=e=>{e.preventDefault()};setOnClose(e){this.onCloseCallback=e}mount(e){this.unmountContent(),this.content=e,this.element.appendChild(e.getElement())}unmountContent(){this.content&&(this.content.destroy(),this.element.innerHTML="",this.content=null)}show(e,t){this.element.classList.add("visible"),this.isVisible=!0,this.element.style.left=`${e}px`,this.element.style.top=`${t}px`;const n=this.element.getBoundingClientRect(),i=window.innerWidth,r=window.innerHeight;let o=e,a=t;e+n.width>i&&(o=e-n.width),t+n.height>r&&(a=t-n.height),this.element.style.left=`${o}px`,this.element.style.top=`${a}px`}hide(){this.element.classList.remove("visible"),this.isVisible=!1,this.unmountContent(),this.onCloseCallback&&this.onCloseCallback()}handleGlobalClick=e=>{this.isVisible&&(this.element.contains(e.target)||this.hide())}}class ed{element;options;unsubscribeLocale=null;unsubscribeTheme=null;activeSubMenu=null;constructor(e){this.options=e,this.element=document.createElement("ul"),this.element.className="bim-menu"}init(){this.render(),this.unsubscribeLocale=Yt.subscribe(()=>{this.setLocales()}),this.unsubscribeTheme=ot.subscribe(e=>{this.setTheme(e)})}setTheme(e){const t=this.element.style;t.setProperty("--bim-bg-elevated",e.bgElevated),t.setProperty("--bim-text-primary",e.textPrimary),t.setProperty("--bim-divider",e.divider),t.setProperty("--bim-component-bg-hover",e.componentBgHover),t.setProperty("--bim-shadow-lg",e.shadowLg)}setLocales(){this.element.innerHTML="",this.render()}destroy(){this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.closeSubMenu(),this.element.remove()}getElement(){return this.element}hasAnyIcon(e){return e.some(t=>t.icon?!0:t.children?this.hasAnyIcon(t.children):!1)}render(){const{items:e,groupOrder:t}=this.options;this.hasAnyIcon(e)?this.element.classList.add("has-icons"):this.element.classList.remove("has-icons");const n=new Map,i="default";e.forEach(o=>{const a=o.group||i;n.has(a)||n.set(a,[]),n.get(a).push(o)});let r=[];if(t){r=t.filter(o=>n.has(o));for(const o of n.keys())r.includes(o)||r.push(o)}else r=Array.from(n.keys());r.forEach((o,a)=>{if(a>0){const c=document.createElement("li");c.className="bim-menu-divider",this.element.appendChild(c)}const l=n.get(o);l.sort((c,h)=>(c.order||0)-(h.order||0)),l.forEach(c=>{if(c.visible!==!1&&(this.element.appendChild(this.createItemElement(c)),c.divider)){const h=document.createElement("li");h.className="bim-menu-divider",this.element.appendChild(h)}})})}createItemElement(e){const t=document.createElement("li"),n=!e.disabled;t.className=`bim-menu-item ${n?"":"disabled"}`;const i=document.createElement("div");i.className="bim-menu-item-icon",e.icon&&(i.innerHTML=e.icon),t.appendChild(i);const r=document.createElement("div");r.className="bim-menu-item-label",r.textContent=ve(e.label),t.appendChild(r);const o=e.children,a=o&&o.length>0;if(a){const l=document.createElement("div");l.className="bim-menu-item-arrow",l.innerHTML='<svg viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',t.appendChild(l),t.addEventListener("mouseenter",()=>this.openSubMenu(e,t))}else t.addEventListener("mouseenter",()=>this.closeSubMenu());return n&&t.addEventListener("click",l=>{l.stopPropagation(),console.log(`[BimMenu] Clicked item: ${e.id}`),a||(e.onClick?(console.log(`[BimMenu] Executing onClick for ${e.id}`),e.onClick()):console.warn(`[BimMenu] No onClick handler for ${e.id}`))}),t}openSubMenu(e,t){const n=e.children;if(!n||n.length===0)return;this.closeSubMenu();const i=document.createElement("div");i.style.position="fixed",i.style.zIndex="10001";const r=t.getBoundingClientRect();i.style.top=`${r.top}px`,i.style.left=`${r.right}px`,i.addEventListener("mousedown",l=>l.stopPropagation());const o=new ed({items:n});o.init(),i.appendChild(o.element),document.body.appendChild(i),this.activeSubMenu={menu:o,container:i};const a=i.getBoundingClientRect();a.right>window.innerWidth&&(i.style.left=`${r.left-a.width}px`)}closeSubMenu(){this.activeSubMenu&&(this.activeSubMenu.menu.destroy(),this.activeSubMenu.container.remove(),this.activeSubMenu=null)}}class Ug extends mi{container;rightKeyPanel;contextHandlers=[];constructor(e){super(),this.container=e,this.rightKeyPanel=new GE({zIndex:9e3,container:this.container,onContext:this.handleContextMenu}),this.rightKeyPanel.init()}destroy(){this.rightKeyPanel.destroy(),super.destroy()}registerHandler(e){this.contextHandlers.push(e)}showMenu(e,t,n,i){if(!n||n.length===0)return;const r=new ed({items:n,groupOrder:i});r.init(),this.rightKeyPanel.mount(r),this.rightKeyPanel.show(e,t)}hide(){this.rightKeyPanel.hide()}handleContextMenu=e=>{let t=null;for(const n of this.contextHandlers){const i=n(e);i&&i.length>0&&(t||(t=[]),t=t.concat(i))}t&&t.length>0?this.showMenu(e.clientX,e.clientY,t):this.hide()}}class WE extends mi{container;engineInstance=null;rightKey=null;constructor(e){super(),this.container=e}initialize(e){this.engineInstance&&this.engineInstance.isInitialized()&&(console.warn("[EngineManager] 3D Engine already initialized. Destroying old instance..."),this.engineInstance.destroy(),this.engineInstance=null);try{return this.engineInstance=new ns({container:this.container,...e}),this.engineInstance.init(),this.rightKey=new Ug(this.container),this.rightKey.registerHandler(t=>{const n=this.getSelectedComponent(),i=[];return n&&(i.push({id:"componentDetail",label:"menu.componentDetail",group:"component",order:1,divider:!0,onClick:()=>{ft.getInstance().componentDetail?.show(),this.rightKey?.hide()}}),i.push({id:"hideSelected",label:"menu.hideSelected",group:"component",order:2,onClick:()=>{const r=this.getHighlightModels();r&&this.hideModels(r),this.rightKey?.hide()}}),i.push({id:"transparentSelected",label:"menu.transparentSelected",group:"component",order:3,onClick:()=>{const r=this.getHighlightModels();r&&this.translucentModels(r),this.rightKey?.hide()}}),i.push({id:"cancelTranslucent",label:"menu.cancelTranslucent",group:"component",order:4,onClick:()=>{this.unTranslucentModel(),this.rightKey?.hide()}}),i.push({id:"isolateSelected",label:"menu.isolateSelected",group:"component",order:5,divider:!0,children:[{id:"hideOthers",label:"menu.hideOthers",onClick:()=>{const r=this.getHighlightModels();r&&this.isolateModels(r),this.rightKey?.hide()}},{id:"transparentOthers",label:"menu.transparentOthers",onClick:()=>{const r=this.getHighlightModels();r&&this.translucentOtherModels(r),this.rightKey?.hide()}}]}),i.push({id:"quickSelect",label:"menu.quickSelect",group:"component",order:6,children:[{id:"selectSameType",label:"menu.selectSameType",onClick:()=>{const r=this.getHighlightModels();r&&this.batchSelectSameTypeModel(r),this.rightKey?.hide()}},{id:"selectSameLevel",label:"menu.selectSameLevel",onClick:()=>{const r=this.getHighlightModels();r&&this.batchSelectSameLevelModel(r),this.rightKey?.hide()}},{id:"selectSameLevelType",label:"menu.selectSameLevelType",onClick:()=>{const r=this.getHighlightModels();r&&this.batchSelectSameLevelTypeModel(r),this.rightKey?.hide()}}]}),i.push({id:"fitSectionBox",label:"menu.fitSectionBox",group:"component",order:7,onClick:()=>{this.fitSectionBoxToModel(),this.rightKey?.hide()}})),i.push({id:"showAll",label:"menu.showAll",group:"component",order:8,onClick:()=>{this.showAllModels(),this.emit("menu:show-all",{}),this.rightKey?.hide()}}),i}),this.engineInstance.isInitialized()}catch(t){return console.error("[EngineManager] Failed to initialize 3D engine:",t),this.engineInstance=null,!1}}isInitialized(){return this.engineInstance!==null&&this.engineInstance.isInitialized()}loadModel(e,t){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.loadModel(e,t)}getEngine(){return this.engineInstance?this.engineInstance.getEngine():(console.warn("[EngineManager] 3D Engine not initialized."),null)}CameraGoHome(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.CameraGoHome()}pauseRendering(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.pauseRendering()}resumeRendering(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.resumeRendering()}activateMeasure(e){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activateMeasure(e)}deactivateMeasure(){this.engineInstance&&this.engineInstance.deactivateMeasure()}getCurrentMeasureType(){return this.engineInstance?this.engineInstance.getCurrentMeasureType():null}clearAllMeasures(){this.engineInstance&&this.engineInstance.clearAllMeasures()}saveMeasureSetting(e){this.engineInstance&&this.engineInstance.saveMeasureSetting(e)}activeSection(e){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activeSection(e)}getCurrentSectionMode(){return this.engineInstance?this.engineInstance.getCurrentSectionMode():null}deactivateSection(){this.engineInstance&&this.engineInstance.deactivateSection()}setSectionBoxRange(e){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.setSectionBoxRange(e)}hideSection(){this.engineInstance&&this.engineInstance.hideSection()}recoverSection(){this.engineInstance&&this.engineInstance.recoverSection()}fitSectionBoxToModel(){this.engineInstance&&this.engineInstance.fitSectionBoxToModel()}scaleSectionBox(){this.engineInstance&&this.engineInstance.scaleSectionBox()}reverseSection(){this.engineInstance&&this.engineInstance.reverseSection()}activateZoomBox(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activateZoomBox()}activateFirstPersonMode(){if(!this.engineInstance){console.warn("[EngineManager] 3D Engine not initialized.");return}this.engineInstance.activateFirstPersonMode()}deactivateFirstPersonMode(){this.engineInstance&&this.engineInstance.deactivateFirstPersonMode()}setWalkSpeed(e){this.engineInstance?.setWalkSpeed(e)}setWalkGravity(e){this.engineInstance?.setWalkGravity(e)}setWalkCollision(e){this.engineInstance?.setWalkCollision(e)}toggleMiniMap(){this.engineInstance?.toggleMiniMap()}isFirstPersonModeActive(){return this.engineInstance?.isFirstPersonModeActive()??!1}getSelectedComponent(){return this.engineInstance?.getSelectedComponent()??null}getComponentProperties(e,t,n){this.engineInstance?.getComponentProperties(e,t,n)}getTypeTreeData(){return this.engineInstance?.getTypeTreeData()??[]}getLevelTreeData(){return this.engineInstance?.getLevelTreeData()??[]}getMajorTreeData(){return this.engineInstance?.getMajorTreeData()??[]}getEngineInfo(){return this.engineInstance?.getEngineInfo()??null}pathRoamingAddPoint(){this.engineInstance?.pathRoamingAddPoint()}pathRoamingRemovePoint(e){this.engineInstance?.pathRoamingRemovePoint(e)}pathRoamingClearPoints(){this.engineInstance?.pathRoamingClearPoints()}pathRoamingGetPoints(){return this.engineInstance?.pathRoamingGetPoints()??[]}pathRoamingJumpToPoint(e){this.engineInstance?.pathRoamingJumpToPoint(e)}pathRoamingPlay(e){this.engineInstance?.pathRoamingPlay(e)}pathRoamingStop(){this.engineInstance?.pathRoamingStop()}getHighlightModels(){return this.engineInstance?.getHighlightModels()??null}highlightModel(e){this.engineInstance?.highlightModel(e)}unhighlightAllModels(){this.engineInstance?.unhighlightAllModels()}viewScaleToModel(e){this.engineInstance?.viewScaleToModel(e)}hideModels(e){this.engineInstance?.hideModels(e)}showModel(e){this.engineInstance?.showModel(e)}translucentModels(e){this.engineInstance?.translucentModels(e)}unTranslucentModel(){this.engineInstance?.unTranslucentModel()}isolateModels(e){this.engineInstance?.isolateModels(e)}translucentOtherModels(e){this.engineInstance?.translucentOtherModels(e)}showAllModels(){this.engineInstance?.showAllModels()}batchSelectSameTypeModel(e){this.engineInstance?.batchSelectSameTypeModel(e)}batchSelectSameLevelModel(e){this.engineInstance?.batchSelectSameLevelModel(e)}batchSelectSameLevelTypeModel(e){this.engineInstance?.batchSelectSameLevelTypeModel(e)}destroy(){this.engineInstance&&(this.engineInstance.destroy(),this.engineInstance=null),this.rightKey&&(this.rightKey.destroy(),this.rightKey=null),super.destroy()}}var Mt=(s=>(s[s.Unchecked=0]="Unchecked",s[s.Checked=1]="Checked",s[s.Indeterminate=2]="Indeterminate",s))(Mt||{});class XE{config;element;children=[];parent=null;checkState=Mt.Unchecked;contentEl;switcherEl;checkboxEl=null;titleEl;actionsEl;childrenContainer;onExpandChange;onCheckChange;onNodeClick;renderActions;constructor(e,t,n){this.config=e,this.onExpandChange=n.onExpand,this.onCheckChange=n.onCheck,this.onNodeClick=n.onClick,this.renderActions=t.renderActions,this.checkState=e.checked?Mt.Checked:Mt.Unchecked,this.element=this.createDom(t)}createDom(e){const t=document.createElement("div");t.className="bim-tree-node",this.config.disabled&&t.classList.add("is-disabled"),this.contentEl=document.createElement("div"),this.contentEl.className="bim-tree-node-content",this.switcherEl=document.createElement("span"),this.switcherEl.className="bim-tree-switcher",this.switcherEl.innerHTML='<svg viewBox="0 0 1024 1024"><path d="M288 192l448 320-448 320z"></path></svg>';const n=this.config.children&&this.config.children.length>0;if(n?this.config.expanded&&this.switcherEl.classList.add("is-expanded"):this.switcherEl.classList.add("is-hidden"),this.switcherEl.addEventListener("click",r=>{r.stopPropagation(),this.toggleExpand()}),this.contentEl.appendChild(this.switcherEl),e.checkable!==!1&&(this.checkboxEl=document.createElement("span"),this.checkboxEl.className="bim-tree-checkbox",this.updateCheckboxUI(),this.checkboxEl.addEventListener("click",r=>{r.stopPropagation(),!this.config.disabled&&this.toggleCheck()}),this.contentEl.appendChild(this.checkboxEl)),this.config.icon){const r=document.createElement("span");r.className="bim-tree-icon",r.innerHTML=this.config.icon.includes("<svg")?this.config.icon:`<img src="${this.config.icon}" />`,this.contentEl.appendChild(r)}this.titleEl=document.createElement("span"),this.titleEl.className="bim-tree-title",this.updateLabel(),this.contentEl.appendChild(this.titleEl),this.actionsEl=document.createElement("div"),this.actionsEl.className="bim-tree-node-actions",this.actionsEl.addEventListener("click",r=>{r.stopPropagation()}),this.contentEl.appendChild(this.actionsEl),this.contentEl.addEventListener("click",r=>{if(r.stopPropagation(),this.config.disabled)return;(this.config.clickAction||"select")==="expand"?this.toggleExpand():this.onNodeClick(this)}),t.appendChild(this.contentEl),this.childrenContainer=document.createElement("div"),this.childrenContainer.className="bim-tree-children";const i=e.indent||24;return this.childrenContainer.style.paddingLeft=`${i}px`,this.config.expanded&&n&&this.childrenContainer.classList.add("is-visible"),t.appendChild(this.childrenContainer),t}setSelected(e){if(e){if(this.contentEl.classList.add("is-selected"),this.renderActions){const t=this.renderActions(this.config);this.actionsEl.innerHTML="",typeof t=="string"?this.actionsEl.innerHTML=t:t instanceof HTMLElement&&this.actionsEl.appendChild(t)}}else this.contentEl.classList.remove("is-selected"),this.actionsEl.innerHTML=""}updateLabel(){this.titleEl&&(this.titleEl.textContent=this.config.label)}toggleExpand(e){if(!this.config.children||this.config.children.length===0)return;const t=e!==void 0?e:!this.config.expanded;this.config.expanded=t,t?(this.switcherEl.classList.add("is-expanded"),this.childrenContainer.classList.add("is-visible")):(this.switcherEl.classList.remove("is-expanded"),this.childrenContainer.classList.remove("is-visible")),e===void 0&&this.onExpandChange(this)}toggleCheck(){const e=this.checkState!==Mt.Checked;this.setChecked(e?Mt.Checked:Mt.Unchecked,!0)}setChecked(e,t=!1,n=!1){!n&&this.checkState===e||(this.checkState=e,this.config.checked=e===Mt.Checked,this.updateCheckboxUI(),t&&this.onCheckChange(this))}updateCheckboxUI(){this.checkboxEl&&(this.checkboxEl.classList.remove("is-checked","is-indeterminate"),this.checkState===Mt.Checked?this.checkboxEl.classList.add("is-checked"):this.checkState===Mt.Indeterminate&&this.checkboxEl.classList.add("is-indeterminate"))}appendChild(e){e.parent=this,this.children.push(e),this.childrenContainer.appendChild(e.element),this.children.length===1&&this.switcherEl.classList.remove("is-hidden")}destroy(){this.children.forEach(e=>e.destroy()),this.children=[],this.element.remove(),this.parent=null}}class jE{element;contentElement;searchInput=null;searchResults=null;options;nodeMap=new Map;rootNodes=[];selectedNode=null;unsubscribeLocale=null;unsubscribeTheme=null;clickOutsideHandler=null;onNodeCheck;onNodeSelect;onNodeDeselect;onNodeExpand;constructor(e){this.options={checkable:!0,checkStrictly:!0,indent:24,defaultExpandAll:!0,enableSearch:!1,searchPlaceholder:"tree.searchPlaceholder",...e},this.element=document.createElement("div"),this.element.className="bim-tree",this.options.enableSearch&&this.createSearchDOM(),this.contentElement=document.createElement("div"),this.contentElement.className="bim-tree-content",this.element.appendChild(this.contentElement),e.onNodeCheck&&(this.onNodeCheck=e.onNodeCheck),e.onNodeSelect&&(this.onNodeSelect=e.onNodeSelect),e.onNodeDeselect&&(this.onNodeDeselect=e.onNodeDeselect),e.onNodeExpand&&(this.onNodeExpand=e.onNodeExpand)}createSearchDOM(){const e=document.createElement("div");e.className="bim-tree-search";const t=document.createElement("div");t.className="bim-tree-search-wrapper";const n=document.createElement("span");n.className="bim-tree-search-icon",n.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m21 21l-4.343-4.343m0 0A8 8 0 1 0 5.343 5.343a8 8 0 0 0 11.314 11.314"/></svg>',t.appendChild(n),this.searchInput=document.createElement("input"),this.searchInput.className="bim-tree-search-input",this.searchInput.type="text",this.searchInput.placeholder=ve(this.options.searchPlaceholder||"搜索..."),this.searchInput.addEventListener("input",i=>{const r=i.target.value;this.handleSearch(r)}),t.appendChild(this.searchInput),e.appendChild(t),this.searchResults=document.createElement("div"),this.searchResults.className="bim-tree-search-results",e.appendChild(this.searchResults),this.element.appendChild(e),this.clickOutsideHandler=i=>{this.searchResults&&!this.searchResults.contains(i.target)&&!this.searchInput?.contains(i.target)&&this.searchResults.classList.remove("is-visible")},document.addEventListener("click",this.clickOutsideHandler)}init(){this.render(),this.unsubscribeLocale=Yt.subscribe(()=>this.setLocales()),this.unsubscribeTheme=ot.subscribe(e=>this.setTheme(e)),this.setTheme(ot.getTheme())}handleSearch(e){if(!this.searchResults)return;if(!e.trim()){this.searchResults.classList.remove("is-visible"),this.searchResults.innerHTML="";return}const t=[],n=e.toLowerCase();this.nodeMap.forEach(i=>{const r=i.config.label;r.toLowerCase().includes(n)&&t.push({node:i,label:r,path:this.getNodePath(i)})}),this.renderSearchResults(t)}getNodePath(e){const t=[];let n=e.parent;for(;n;)t.unshift(n.config.label),n=n.parent;return t.join(" > ")}renderSearchResults(e){if(this.searchResults){if(this.searchResults.innerHTML="",e.length===0){const t=document.createElement("div");t.className="bim-tree-search-item",t.style.cursor="default",t.style.color="#999",t.textContent="No results",this.searchResults.appendChild(t)}else e.forEach(t=>{const n=document.createElement("div");n.className="bim-tree-search-item";const i=document.createElement("span");i.className="bim-tree-search-item-title",i.textContent=t.label;const r=document.createElement("span");r.className="bim-tree-search-item-path",r.textContent=t.path,n.appendChild(i),t.path&&n.appendChild(r),n.addEventListener("click",()=>{this.revealNode(t.node)}),this.searchResults.appendChild(n)});this.searchResults.classList.add("is-visible")}}revealNode(e){this.searchResults&&(this.searchResults.classList.remove("is-visible"),this.searchInput&&(this.searchInput.value=""));let t=e.parent;for(;t;)t.toggleExpand(!0),t=t.parent;this.handleNodeSelect(e),setTimeout(()=>{e.element.scrollIntoView({behavior:"smooth",block:"center"})},100)}setTheme(e){const t=this.element.style;t.setProperty("--bim-primary",e.primary),t.setProperty("--bim-bg-elevated",e.bgElevated),t.setProperty("--bim-text-primary",e.textPrimary),t.setProperty("--bim-text-secondary",e.textSecondary),t.setProperty("--bim-text-tertiary",e.textTertiary),t.setProperty("--bim-text-disabled",e.textDisabled),t.setProperty("--bim-text-inverse",e.textInverse),t.setProperty("--bim-border-default",e.borderDefault),t.setProperty("--bim-border-disabled",e.borderDisabled),t.setProperty("--bim-component-bg-hover",e.componentBgHover),t.setProperty("--bim-component-bg-selected",e.componentBgSelected),t.setProperty("--bim-component-bg-disabled",e.componentBgDisabled),t.setProperty("--bim-shadow-md",e.shadowMd),t.setProperty("--bim-focus-ring",e.focusRing)}setLocales(){this.nodeMap.forEach(e=>e.updateLabel()),this.searchInput&&(this.searchInput.placeholder=ve(this.options.searchPlaceholder||"tree.searchPlaceholder"))}destroy(){this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.clickOutsideHandler&&(document.removeEventListener("click",this.clickOutsideHandler),this.clickOutsideHandler=null),this.rootNodes.forEach(e=>e.destroy()),this.rootNodes=[],this.nodeMap.clear(),this.element.remove(),this.selectedNode=null}render(){this.contentElement.innerHTML="",this.nodeMap.clear(),this.rootNodes=[],this.options.data.forEach(e=>{this.createNodeRecursively(e,null)})}createNodeRecursively(e,t){e.expanded===void 0&&(e.expanded=this.options.defaultExpandAll);const n=new XE(e,this.options,{onExpand:i=>{this.onNodeExpand&&this.onNodeExpand(i)},onCheck:i=>this.handleNodeCheck(i),onClick:i=>this.handleNodeSelect(i)});this.nodeMap.set(e.id,n),t?t.appendChild(n):(this.rootNodes.push(n),this.contentElement.appendChild(n.element)),e.children&&e.children.length>0&&e.children.forEach(i=>{this.createNodeRecursively(i,n)})}handleNodeSelect(e){if(this.selectedNode===e){e.setSelected(!1),this.selectedNode=null,this.onNodeDeselect&&this.onNodeDeselect(e);return}this.selectedNode&&this.selectedNode.setSelected(!1),e.setSelected(!0),this.selectedNode=e,this.onNodeSelect&&this.onNodeSelect(e)}handleNodeCheck(e){const t=e.checkState===Mt.Checked;if(this.onNodeCheck&&this.onNodeCheck(e),this.options.checkStrictly===!1)return;const n=(r,o)=>{r.children.forEach(a=>{a.config.disabled||(a.setChecked(o,!1),n(a,o))})};t?n(e,Mt.Checked):n(e,Mt.Unchecked);let i=e.parent;for(;i;){if(i.config.disabled){i=i.parent;continue}const r=i.children,o=r.every(l=>l.checkState===Mt.Checked),a=r.every(l=>l.checkState===Mt.Unchecked);o?i.setChecked(Mt.Checked,!1):a?i.setChecked(Mt.Unchecked,!1):i.setChecked(Mt.Indeterminate,!1),i=i.parent}}getNode(e){return this.nodeMap.get(e)}checkNode(e,t){const n=this.nodeMap.get(e);n&&n.setChecked(t?Mt.Checked:Mt.Unchecked,!0)}expandAll(e){this.nodeMap.forEach(t=>t.toggleExpand(e))}checkAllNodes(e){const t=e?Mt.Checked:Mt.Unchecked;this.nodeMap.forEach(n=>n.setChecked(t,!1,!0))}getCheckedNodes(e=!1){const t=[];return this.nodeMap.forEach(n=>{(n.checkState===Mt.Checked||e&&n.checkState===Mt.Indeterminate)&&t.push(n.config)}),t}}class Og{element;navElement;contentElement;options;activeId;tabMap=new Map;panelMap=new Map;unsubscribeLocale=null;unsubscribeTheme=null;navClickHandler=null;constructor(e){this.options=e,this.activeId=e.activeId||(e.tabs[0]?.id??null),e.tabs.forEach(t=>this.tabMap.set(t.id,t)),this.element=document.createElement("div"),this.element.className="bim-tab",this.navElement=document.createElement("div"),this.navElement.className="bim-tab__nav",this.navElement.setAttribute("role","tablist"),this.element.appendChild(this.navElement),this.contentElement=document.createElement("div"),this.contentElement.className="bim-tab__content",this.element.appendChild(this.contentElement),this.options.container.appendChild(this.element)}init(){this.renderNav(),this.renderPanels(),this.setLocales(),this.setTheme(ot.getTheme()),this.unsubscribeLocale=Yt.subscribe(()=>this.setLocales()),this.unsubscribeTheme=ot.subscribe(e=>this.setTheme(e))}renderNav(){this.navElement.innerHTML="",this.navClickHandler=e=>{const t=e.target.closest(".bim-tab__item");if(!t)return;const n=t.dataset.id;!n||this.tabMap.get(n)?.disabled||this.activateTab(n)},this.navElement.addEventListener("click",this.navClickHandler),this.options.tabs.forEach(e=>{const t=document.createElement("button");if(t.type="button",t.className="bim-tab__item",t.dataset.id=e.id,t.setAttribute("role","tab"),t.id=`tab-${e.id}`,t.setAttribute("aria-selected",`${e.id===this.activeId}`),e.disabled&&(t.disabled=!0,t.setAttribute("aria-disabled","true"),t.classList.add("is-disabled")),e.icon){const i=document.createElement("span");i.className="bim-tab__icon",i.innerHTML=e.icon,t.appendChild(i)}const n=document.createElement("span");n.className="bim-tab__title",n.textContent=this.resolveTitle(e.title),t.appendChild(n),e.id===this.activeId&&t.classList.add("is-active"),this.navElement.appendChild(t)})}renderPanels(){this.contentElement.innerHTML="",this.panelMap.clear(),this.options.tabs.forEach(e=>{const t=document.createElement("div");t.className="bim-tab__panel",t.dataset.id=e.id,t.setAttribute("role","tabpanel"),t.setAttribute("aria-labelledby",`tab-${e.id}`),e.content instanceof HTMLElement?t.appendChild(e.content):typeof e.content=="string"&&(t.innerHTML=e.content),e.id===this.activeId?t.classList.add("is-active"):t.style.display="none",this.panelMap.set(e.id,t),this.contentElement.appendChild(t)})}activateTab(e){if(this.activeId===e)return;const t=this.tabMap.get(e);if(!t||t.disabled)return;this.activeId=e,this.navElement.querySelectorAll(".bim-tab__item").forEach(i=>{const r=i.dataset.id===e;i.classList.toggle("is-active",r),i.setAttribute("aria-selected",`${r}`)}),this.panelMap.forEach((i,r)=>{const o=r===e;i.classList.toggle("is-active",o),i.style.display=o?"block":"none"}),this.options.onChange&&this.options.onChange(e,t)}setTheme(e){const t=this.element.style;t.setProperty("--bim-tab-bg",e.bgElevated),t.setProperty("--bim-tab-nav-bg",e.bgElevated),t.setProperty("--bim-tab-text",e.textPrimary),t.setProperty("--bim-tab-text-secondary",e.textSecondary),t.setProperty("--bim-tab-text-active",e.primary),t.setProperty("--bim-tab-border",e.borderDefault),t.setProperty("--bim-tab-hover-bg",e.componentBgHover),t.setProperty("--bim-tab-active-bg",e.componentBgActive),t.setProperty("--bim-tab-icon",e.iconDefault)}setLocales(){this.navElement.querySelectorAll(".bim-tab__item").forEach(t=>{const n=t.dataset.id;if(!n)return;const i=this.tabMap.get(n);if(!i)return;const r=t.querySelector(".bim-tab__title");r&&(r.textContent=this.resolveTitle(i.title))})}destroy(){this.navClickHandler&&(this.navElement.removeEventListener("click",this.navClickHandler),this.navClickHandler=null),this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.panelMap.clear(),this.tabMap.clear(),this.element.remove()}resolveTitle(e){try{return ve(e)||e}catch{return e}}}const Fg={测量:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M0,28.207H3.429v3.526H44.571V28.207H48v7.052H0ZM0,3.526v14.1a3.478,3.478,0,0,0,3.429,3.526H6.857V17.629h3.429v3.526h3.429V17.629h3.429v3.526h3.429V10.578H24V21.155h3.429V17.629h3.429v3.526h3.429V17.629h3.429v3.526h3.429V10.578h3.429V21.155A3.478,3.478,0,0,0,48,17.629V3.526A3.478,3.478,0,0,0,44.571,0H3.429A3.478,3.478,0,0,0,0,3.526Z" transform="translate(0 5.456)"/></svg>',地图:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M32.984,563.2H26.329a66.982,66.982,0,0,1-5.471,7.121l-1.455,1.61-1.455-1.61a66.978,66.978,0,0,1-5.471-7.121H5.821L0,580.662H38.8Z" transform="translate(4.598 -537.259)"/><path fill="currentColor" d="M275.4,9.7a9.7,9.7,0,1,0-19.4,0c0,6.636,9.7,17.462,9.7,17.462S275.4,16.337,275.4,9.7Zm-13.582,0a3.88,3.88,0,1,1,3.88,3.88,3.88,3.88,0,0,1-3.88-3.88Z" transform="translate(-241.701 4.598)"/></svg>',框选放大:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M336.351,336.158l-5.5.037-.037-5.5-3.665.025.037,5.5-5.491.037.025,3.665,5.491-.037.041,5.491,3.661-.025-.037-5.491,5.5-.041Z" transform="translate(-305.467 -314.477)"/><path fill="currentColor" d="M41.88,40.861l-.227-.223-7.167-7.068a14.787,14.787,0,1,0-2.832,2.4l7.4,7.3.227.223.021-.021a1.821,1.821,0,0,0,1.065.33,1.849,1.849,0,0,0,1.837-1.862,1.868,1.868,0,0,0-.343-1.061l.017-.021ZM23.648,34.668A11.1,11.1,0,1,1,34.675,23.487,11.106,11.106,0,0,1,23.648,34.668ZM3,41.492H6.241v3.241H3ZM3,15.564H6.241v3.241H3ZM3,2.6H6.241V5.841H3Zm12.964,0h3.241V5.841H15.964Zm-6.482,0h3.241V5.841H9.482Zm12.964,0h3.241V5.841H22.446Zm6.482,0h3.241V5.841H28.928Zm6.482,0h3.241V5.841H35.41Zm6.482,0h3.241V5.841H41.892Zm0,6.482h3.241v3.241H41.892Zm0,6.482h3.241v3.241H41.892Zm0,6.482h3.241v3.241H41.892ZM9.482,41.492h3.241v3.241H9.482Zm6.482,0h3.241v3.241H15.964Zm6.482,0h3.241v3.241H22.446ZM3,9.082H6.241v3.241H3ZM3,22.046H6.241v3.241H3Zm38.892,6.482h3.241v3.241H41.892ZM3,28.528H6.241v3.241H3ZM3,35.01H6.241v3.241H3Z" transform="translate(-0.067 0.333)"/></svg>',漫游:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M327.239,38.548a6.01,6.01,0,1,0-6.358-6A6.144,6.144,0,0,0,327.239,38.548Zm8.006,5.76a3.082,3.082,0,0,0-3.061-2.64h-1.648c-.471,0-.706.24-1.177.48l-2.119,1.68-2.119-1.92a1.781,1.781,0,0,0-1.177-.48h-1.648a2.914,2.914,0,0,0-3.061,2.64l-1.413,10.8c0,.48,0,.96.471,1.2a1.781,1.781,0,0,0,1.177.48h1.648l1.413,15.36a3.082,3.082,0,0,0,3.061,2.64h3.532a2.914,2.914,0,0,0,3.061-2.64l1.413-15.36h1.648a1.781,1.781,0,0,0,1.177-.48,2.2,2.2,0,0,0,.235-1.2Z" transform="translate(-303.239 -26.548)"/></svg>',目录树:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M116.8,153.474h12a1.2,1.2,0,0,0,1.2-1.185v-7.111a1.2,1.2,0,0,0-1.2-1.184h-12a1.2,1.2,0,0,0-1.2,1.184v1.629H93.553v-7.554H100a1.2,1.2,0,0,0,1.2-1.185v-7.112a1.2,1.2,0,0,0-1.2-1.185H83.2a1.2,1.2,0,0,0-1.2,1.185v7.112a1.2,1.2,0,0,0,1.2,1.185h6.45v28a2.383,2.383,0,0,0,2.4,2.37H115.6v1.63a1.2,1.2,0,0,0,1.2,1.185h12a1.2,1.2,0,0,0,1.2-1.185v-7.112a1.2,1.2,0,0,0-1.2-1.185h-12a1.2,1.2,0,0,0-1.2,1.185v1.63H93.553V150.657H115.6v1.629a1.2,1.2,0,0,0,1.2,1.185Z" transform="translate(-82 -126.874)"/></svg>',剖切:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-176.967 -101.068)"><path d="M306.33,364.55h14.737v19.115H306.33Z" transform="translate(-118.068 -248.554)"/><path d="M487.114,140.356a1.6,1.6,0,0,1-1.744-1.393V99.573a1.787,1.787,0,0,1,3.487,0v39.389A1.6,1.6,0,0,1,487.114,140.356Z" transform="translate(-285.677 6.11)"/><path d="M508.34,274.031H487.114a1.743,1.743,0,1,1,0-3.487h17.739V242.767H487.114a1.744,1.744,0,1,1,0-3.487H508.34Z" transform="translate(-285.677 -131.282)"/><path d="M201.437,274.031h-3.278a1.743,1.743,0,1,1,0-3.487h3.278a1.743,1.743,0,1,1,0,3.487Zm-8.858,0H187a1.743,1.743,0,1,1,0-3.487h5.579a1.743,1.743,0,1,1,0,3.487Zm-10.626-.532a1.743,1.743,0,0,1-1.743-1.744v-5.579a1.743,1.743,0,1,1,3.487,0v5.579A1.743,1.743,0,0,1,181.953,273.5Zm0-11.159a1.743,1.743,0,0,1-1.743-1.743v-5.579a1.743,1.743,0,1,1,3.487,0V260.6A1.743,1.743,0,0,1,181.953,262.34Zm0-11.158a1.744,1.744,0,0,1-1.743-1.744v-5.579a1.743,1.743,0,1,1,3.487,0v5.579A1.744,1.744,0,0,1,181.953,251.181Zm19.484-8.414h-5.579a1.744,1.744,0,1,1,0-3.487h5.579a1.744,1.744,0,0,1,0,3.487Zm-11.159,0H184.7a1.744,1.744,0,1,1,0-3.487h5.579a1.744,1.744,0,1,1,0,3.487Z" transform="translate(0 -131.282)"/></g></svg>',剖切盒:'<svg width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-56.83 2.793)"><path d="M194.963,19.168a1.69,1.69,0,0,1-.607-.119l-19.027-8.292a1.253,1.253,0,0,1,0-2.35L191.289.112a1.592,1.592,0,0,1,1.24,0l18.663,8.294a1.267,1.267,0,0,1,.791,1.175,1.308,1.308,0,0,1-.791,1.175l-15.6,8.278a1.519,1.519,0,0,1-.633.143Zm-15.7-9.586,15.7,6.832,12.331-6.832L191.9,2.749Z" transform="translate(-109.947 0)"/><path d="M195.008,417.821a1.691,1.691,0,0,1-.607-.119l-19.025-8.294a1.253,1.253,0,0,1,0-2.35l15.958-8.294a1.592,1.592,0,0,1,1.24,0l18.657,8.294a1.267,1.267,0,0,1,.791,1.175,1.308,1.308,0,0,1-.791,1.175l-15.6,8.278c-.211.095-3.483.143-3.694.143Zm-15.6-9.588,15.6,6.832,12.329-6.832L191.948,401.4Z" transform="translate(-109.992 -382.638)"/><path d="M200.046,603.93a1.976,1.976,0,0,1-.634-.119l-18.774-8.3a1.257,1.257,0,0,1-.655-1.754,1.512,1.512,0,0,1,1.931-.595l18.131,8.013,14.971-8.007a1.51,1.51,0,0,1,1.928.6,1.256,1.256,0,0,1-.661,1.75l-15.6,8.282a1.489,1.489,0,0,1-.634.119Z" transform="translate(-115.041 -568.787)"/><path d="M101.029,216.82a1.467,1.467,0,0,1-1-.377,1.237,1.237,0,0,1-.41-.917V198.817a1.413,1.413,0,0,1,2.816,0V215.5a1.241,1.241,0,0,1-.4.931A1.472,1.472,0,0,1,101.029,216.82Zm-34.377.143a1.467,1.467,0,0,1-1-.377,1.237,1.237,0,0,1-.41-.917V198.817a1.413,1.413,0,0,1,2.816,0v16.852a1.237,1.237,0,0,1-.41.917A1.467,1.467,0,0,1,66.652,216.964Zm-5.215,2.8a1.467,1.467,0,0,1-1-.377,1.237,1.237,0,0,1-.41-.917V201.621a1.413,1.413,0,0,1,2.816,0v16.852a1.237,1.237,0,0,1-.41.917A1.467,1.467,0,0,1,61.436,219.768Z" transform="translate(-0.4 -189.683)"/><path d="M60.922,37.617A1.32,1.32,0,0,1,60,37.258a1.2,1.2,0,0,1-.378-.876V20.295a1.3,1.3,0,0,1,2.588,0V36.382a1.276,1.276,0,0,1-1.294,1.235Zm-1.175,8.411a1.341,1.341,0,0,1,1.75-.578l15.126,7.071a1.224,1.224,0,0,1,.6,1.671,1.337,1.337,0,0,1-1.75.572L60.347,47.708a1.228,1.228,0,0,1-.606-1.671Z" transform="translate(0 -18.25)"/><path d="M71.756,44.947a1.337,1.337,0,0,1,1.75-.582l15.126,7.118a1.235,1.235,0,0,1,.6,1.682,1.333,1.333,0,0,1-1.75.576L72.356,46.629a1.239,1.239,0,0,1-.606-1.682ZM59.915,12.652a1.337,1.337,0,0,1,1.75-.582L76.79,19.194a1.235,1.235,0,0,1,.6,1.682,1.333,1.333,0,0,1-1.75.576L60.515,14.334A1.247,1.247,0,0,1,59.915,12.652Z" transform="translate(-0.168 -11.442)"/><path d="M334.418,146.671a1.341,1.341,0,0,1,1.75-.578l15.126,7.073a1.224,1.224,0,0,1,.6,1.671,1.337,1.337,0,0,1-1.75.573l-15.126-7.09a1.25,1.25,0,0,1-.663-.7,1.177,1.177,0,0,1,.058-.945Zm16.3,35.276a1.32,1.32,0,0,1-.917-.36,1.2,1.2,0,0,1-.377-.875v-16.1a1.3,1.3,0,0,1,2.588,0V180.7a1.2,1.2,0,0,1-.38.878,1.321,1.321,0,0,1-.922.357Z" transform="translate(-260.918 -139.687)"/><path d="M576.438,360.4a1.288,1.288,0,0,1-1.294-1.294V342.253a1.294,1.294,0,1,1,2.588,0v16.852A1.3,1.3,0,0,1,576.438,360.4ZM572.8,344.248,573,361.1l-2.613.024-.2-16.857Z" transform="translate(-486.154 -327.316)"/><path d="M508.543,26.833l.192,16.852-2.613.024-.192-16.852Z" transform="translate(-425.253 -25.689)"/></g></svg>',全屏:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M6.241,3.671H12.85a1.734,1.734,0,0,0,1.836-1.836A1.734,1.734,0,0,0,12.85,0H1.469C1.1,0,.734.367.367.734A1.349,1.349,0,0,0,0,1.836V12.85a1.734,1.734,0,0,0,1.836,1.836A1.734,1.734,0,0,0,3.671,12.85V6.241l9.913,9.913a1.817,1.817,0,1,0,2.57-2.57ZM13.584,27.9,6.975,34.51l-3.3,3.3V31.206a1.734,1.734,0,0,0-1.836-1.836A1.734,1.734,0,0,0,0,31.206V42.22a1.734,1.734,0,0,0,1.836,1.836H12.85a1.836,1.836,0,0,0,0-3.671H6.241l3.3-3.3,6.608-6.608a1.817,1.817,0,1,0-2.57-2.57ZM42.22,29.371a1.734,1.734,0,0,0-1.836,1.836v6.608l-3.3-3.3L30.472,27.9a1.817,1.817,0,1,0-2.57,2.57L34.51,37.08l3.3,3.3H31.206a1.836,1.836,0,1,0,0,3.671H42.22a1.734,1.734,0,0,0,1.836-1.836V31.206a1.734,1.734,0,0,0-1.836-1.836ZM42.22,0H31.206a1.734,1.734,0,0,0-1.836,1.836,1.734,1.734,0,0,0,1.836,1.836h6.608l-3.3,3.3L27.9,13.584a1.817,1.817,0,1,0,2.57,2.57L37.08,9.545l3.3-3.3V12.85a1.836,1.836,0,0,0,3.671,0V1.836A1.734,1.734,0,0,0,42.22,0Z" transform="translate(1.972 1.972)"/></svg>',设置:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M112.388,106.443l-2.668-.373a1.687,1.687,0,0,1-1.306-1.031,16.337,16.337,0,0,0-2-3.475,1.681,1.681,0,0,1-.243-1.646l1.012-2.5a1.652,1.652,0,0,0-.709-2.057l-5.769-3.335a1.654,1.654,0,0,0-2.136.415L96.919,94.56a1.693,1.693,0,0,1-1.562.62,15.32,15.32,0,0,0-3.992,0,1.693,1.693,0,0,1-1.562-.62l-1.651-2.113a1.654,1.654,0,0,0-2.136-.415l-5.769,3.33a1.659,1.659,0,0,0-.709,2.057l1.012,2.5a1.679,1.679,0,0,1-.243,1.646,16.141,16.141,0,0,0-2,3.475A1.669,1.669,0,0,1,77,106.066l-2.668.373a1.663,1.663,0,0,0-1.432,1.646v6.665a1.662,1.662,0,0,0,1.427,1.642l2.668.373a1.687,1.687,0,0,1,1.306,1.031,16.338,16.338,0,0,0,2,3.475,1.681,1.681,0,0,1,.243,1.646l-1.012,2.5a1.652,1.652,0,0,0,.709,2.057l5.769,3.33a1.654,1.654,0,0,0,2.136-.415L89.8,128.27a1.693,1.693,0,0,1,1.562-.62,15.321,15.321,0,0,0,3.992,0,1.693,1.693,0,0,1,1.562.62l1.651,2.113a1.654,1.654,0,0,0,2.136.415l5.769-3.33a1.659,1.659,0,0,0,.709-2.057l-1.012-2.5a1.681,1.681,0,0,1,.243-1.646,16.141,16.141,0,0,0,2-3.475,1.669,1.669,0,0,1,1.306-1.031l2.668-.373a1.658,1.658,0,0,0,1.427-1.642v-6.665A1.639,1.639,0,0,0,112.388,106.443ZM93.36,117.893a6.478,6.478,0,1,1,6.478-6.478A6.479,6.479,0,0,1,93.36,117.893Z" transform="translate(-69.355 -87.415)"/></svg>',拾曲面剖切:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-59.63 -21.333)"><path d="M302.465,495.393l2.363-4.363a.842.842,0,0,1,1.091-.273.914.914,0,0,1,.454,1l-1.636,3,11.453-3.454c.091,0,.091,0,.182-.091a.785.785,0,1,1,.273,1.545l-11.453,3.454,3,1.545h.091a.645.645,0,0,1,.182,1,.842.842,0,0,1-1.091.273l-4.545-2.363c-.091,0-.182-.091-.273-.182A.742.742,0,0,1,302.465,495.393Z" transform="translate(205.84 -520.136) rotate(43)"/><path d="M88.23,54.014v2.86l-21.123,8.17V34l21.123-8.17V47.069h2.9l-.207-25.736L64,31.75V69.333L91.129,58.916v-4.9Z"/><path d="M199,255.9l-15.532,6.268v-21.23L199,234.667Z" transform="translate(-113.668 -202.979)"/></g></svg>',轴向剖切:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-59.63 -21.333)"><path d="M.194,3.727,2.558,8.089a.842.842,0,0,0,1.091.273.914.914,0,0,0,.454-1l-1.636-3L13.919,7.817c.091,0,.091,0,.182.091a.785.785,0,1,0,.273-1.545L2.921,2.909l3-1.545h.091a.645.645,0,0,0,.182-1A.842.842,0,0,0,5.1.091L.558,2.454c-.091,0-.182.091-.273.182A.742.742,0,0,0,.194,3.727Z" transform="translate(102.244 57.563) rotate(-178)"/><path d="M88.23,54.014v2.86l-21.123,8.17V34l21.123-8.17V47.069h2.9l-.207-25.736L64,31.75V69.333L91.129,58.916v-4.9Z"/><path d="M199,255.9l-15.532,6.268v-21.23L199,234.667Z" transform="translate(-113.668 -202.979)"/></g></svg>',主视角:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M122.32,181.835v-13.16h-9.87V163.74h19.74v18.095Zm-19.74,0V163.74h9.87v18.095ZM96,163.74,117.385,144l21.385,19.74Z" transform="translate(-93.385 -138.917)"/></svg>',文档:'<svg width="48" height="48" viewBox="0 0 48 48"><path fill="currentColor" d="M64,128h1.714v41.143H64Zm46.286,0H112v41.143h-1.714Zm-44.571,0h44.571v3.429H65.714Zm0,6.857h44.571v3.429H65.714Zm0-3.429h3.429v3.429H65.714Zm8.571,0h3.429v3.429H74.286Zm8.571,0h27.429v3.429H82.857Zm-17.143,36h44.571v1.714H65.714Zm5.143-24H76v1.714H70.857Zm10.286,0h24v1.714h-24Zm-10.286,6.857H76V152H70.857Zm10.286,0h24V152h-24Zm-10.286,6.857H76v1.714H70.857Zm10.286,0h24v1.714h-24Z" transform="translate(-64 -124.571)"/></svg>',第一人称漫游:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><path d="M178.325,132.27a6.411,6.411,0,0,0,0-9.429,7.359,7.359,0,0,0-9.984,0,6.411,6.411,0,0,0,0,9.429,7.359,7.359,0,0,0,9.984,0Zm-2-7.543a3.845,3.845,0,0,1,0,5.657,4.414,4.414,0,0,1-5.99,0,3.847,3.847,0,0,1,0-5.657,4.414,4.414,0,0,1,5.99,0Zm6.618,31.639q4.975,1.006,4.975,3.189t-4.975,3.189a57.4,57.4,0,0,1-19.226,0q-4.973-1.006-4.973-3.189t4.975-3.189q.777-.156,1.613-.284v-2.521a4.488,4.488,0,0,1-1.412.217,4.761,4.761,0,0,1-.587-.036l-.038,0a29.007,29.007,0,0,0-7.657,2.332q-3.482,1.712-3.482,3.484a2.944,2.944,0,0,0,1.3,2.116,14.359,14.359,0,0,0,4.4,2.293,46.614,46.614,0,0,0,15.477,2.258,46.614,46.614,0,0,0,15.477-2.258,14.362,14.362,0,0,0,4.4-2.293,2.943,2.943,0,0,0,1.3-2.116q0-1.772-3.482-3.484a29.007,29.007,0,0,0-7.657-2.332,4.908,4.908,0,0,1-.625.039,4.488,4.488,0,0,1-1.412-.217v2.521q.836.128,1.613.284Zm-14.788-6.588v5.979q2.391-.2,5.176-.2t5.176.2v-12.2h2.824v6.222a1.25,1.25,0,0,0,.414.942v0l.081.071q.744.1,1.457.22a1.41,1.41,0,0,0,.457-.293,1.25,1.25,0,0,0,.414-.942v-8a3.75,3.75,0,0,0-1.24-2.828,4.2,4.2,0,0,0-2.995-1.172H166.745a4.2,4.2,0,0,0-2.995,1.172,3.75,3.75,0,0,0-1.24,2.828v8a1.268,1.268,0,0,0,.414.942,1.415,1.415,0,0,0,.456.293q.715-.119,1.459-.222.041-.034.081-.071a1.25,1.25,0,0,0,.414-.942v-6.222h2.824Zm-8.471-6.222v-1.778a6.253,6.253,0,0,1,2.067-4.715,7.013,7.013,0,0,1,4.992-1.952h13.176a7.013,7.013,0,0,1,4.992,1.952,6.253,6.253,0,0,1,2.067,4.715v8a3.722,3.722,0,0,1-.484,1.881l0,.005a28.526,28.526,0,0,1,5.841,2.041q5,2.462,5,5.851,0,4.238-7.531,6.9a49.5,49.5,0,0,1-16.469,2.428,49.5,49.5,0,0,1-16.469-2.428q-7.531-2.667-7.531-6.9,0-3.388,5-5.849a28.381,28.381,0,0,1,5.841-2.044,3.707,3.707,0,0,1-.488-1.884Zm24.8,16a13.145,13.145,0,0,0-2.129-.581,54.5,54.5,0,0,0-18.044,0,13.079,13.079,0,0,0-2.127.581,13.078,13.078,0,0,0,2.127.581,54.5,54.5,0,0,0,18.044,0,13.078,13.078,0,0,0,2.127-.581Z" transform="translate(-149.333 -120.889)"/></svg>',反向:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(0.364 4.658)"><path d="M0,287.1m0-.817v-2.042a.722.722,0,0,1,.817-.817H44.509a.722.722,0,0,1,.817.817v2.042a.722.722,0,0,1-.817.817H.817A.722.722,0,0,1,0,286.28Z" transform="translate(-0.001 -272.164)"/><path d="M829.7,13.238l-1.443,1.444a.817.817,0,0,1-1.155,0L815.263,2.844a.817.817,0,0,1,0-1.156L816.706.244a.817.817,0,0,1,1.155,0L829.7,12.083a.817.817,0,0,1,0,1.155Z" transform="translate(-782.667)"/><path d="M94.367,648m0,.817v2.042a.722.722,0,0,1-.817.817H49.858a.722.722,0,0,1-.817-.817v-2.042a.722.722,0,0,1,.817-.817H93.55A.722.722,0,0,1,94.367,648.816Z" transform="translate(-47.095 -622.268)"/><path d="M.239,649.97l1.443-1.444a.817.817,0,0,1,1.155,0l11.838,11.838a.817.817,0,0,1,0,1.156l-1.443,1.443a.817.817,0,0,1-1.155,0L.239,651.124a.817.817,0,0,1,0-1.155Z" transform="translate(0 -622.544)"/></g></svg>',路径漫游:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(0 -4.9)"><path d="M43.755,35.8a23.352,23.352,0,0,1-8.074-3.095c-1.131-.912-2.263-1.819-2.263-3.458,0-.364-.164-.548-.486-.548-1.776-.364-2.263,0-1.935,2.183a5,5,0,0,0,1.776,3.095,14.337,14.337,0,0,0,4.521,2.551c2.1.912,4.521,1.276,6.461,2.551,1.935,1.091,2.1,2.551.809,4.37A12.572,12.572,0,0,1,37.3,48.187a30.594,30.594,0,0,1-17.115-1.455c-2.585-.912-4.2-.364-5.488,2,0,.184-.164.184-.323.548,2.1.728,3.876,1.455,5.811,2,5.811,1.639,11.786,2.367,17.76.548A14.453,14.453,0,0,0,46.663,45.1c2.422-4.2,1.613-8.381-2.908-9.293Zm-19.7-7.97a11.943,11.943,0,0,0-7.382-10.952A12.17,12.17,0,0,0,3.457,19.546a10.951,10.951,0,0,0-2.3,12.879c2.459,5.329,6.456,9.77,10.453,14.06.463.444.617.444,1.075,0,3.689-4.143,7.382-8.287,10-13.172A11.6,11.6,0,0,0,24.059,27.833Zm-4.151,3.255c-1.692,3.851-4.614,6.955-7.382,10.215-.463.444-.617.3-.921,0A44.891,44.891,0,0,1,4.228,31.088a7.684,7.684,0,0,1-.767-3.109A8.664,8.664,0,0,1,18.22,21.909a8.155,8.155,0,0,1,1.688,9.18ZM33.007,4.9c-5.685,0-9.785,6.416-7.274,11.76,1.454,3.34,4.1,5.745,6.746,8.15a.492.492,0,0,0,.795,0c2.908-2.537,5.554-5.211,7.008-8.821A8.117,8.117,0,0,0,33.007,4.9Zm4.366,10.422A16.825,16.825,0,0,1,33.4,20c-.4.269-.659.269-.926,0a16.342,16.342,0,0,1-3.969-4.545,5.033,5.033,0,1,1,8.864-.132Z"/><path d="M183.031,141.935a2.136,2.136,0,0,0,2.053-2.18,2.084,2.084,0,0,0-2.18-2.18,2.171,2.171,0,0,0-2.053,2.307A2.058,2.058,0,0,0,183.031,141.935Zm-20.094,7.854a4.7,4.7,0,0,0-4.6,4.881,4.913,4.913,0,0,0,4.74,4.881,4.882,4.882,0,0,0-.14-9.762Zm0,6.417a1.77,1.77,0,0,1-1.532-1.532A1.79,1.79,0,0,1,162.937,153a1.611,1.611,0,0,1,1.672,1.672A1.578,1.578,0,0,1,162.937,156.206Z" transform="translate(-150.629 -126.653)"/></g></svg>',适应到模型:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><g transform="translate(-84.667 -84.667)"><path d="M87.667,97V87.667H97V85.333H86.733a1.4,1.4,0,0,0-1.4,1.4V97Zm0,23.333H85.333V130.6a1.4,1.4,0,0,0,1.4,1.4H97v-2.333H87.667v-9.333Zm32.667,9.333V132H130.6a1.4,1.4,0,0,0,1.4-1.4V120.333h-2.333v9.333h-9.333ZM129.667,97H132V86.733a1.4,1.4,0,0,0-1.4-1.4H120.333v2.333h9.333Z"/><path d="M270.857,243.5l11.3-6.652V223.387l-11.3,6.361V243.5Zm-1.8,0v-13.75l-11.3-6.361v13.456l11.3,6.652Zm-10.278-21.621,11.177,6.284,11.177-6.284L269.958,215.3l-11.177,6.573Zm11.622-8.426,13.1,7.709a.919.919,0,0,1,.448.793v15.419a.926.926,0,0,1-.448.793l-13.1,7.709a.887.887,0,0,1-.9,0l-13.1-7.709a.905.905,0,0,1-.448-.793V221.954a.919.919,0,0,1,.448-.793l13.1-7.709A.887.887,0,0,1,270.4,213.452Z" transform="translate(-161.292 -120.997)"/></g></svg>',隐藏:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><path d="M61.274,76.178l0-.007-.007,0a32.458,32.458,0,0,0-7.014-9.981L51.53,68.91a28.382,28.382,0,0,1,6.124,8.635c-4.472,9.25-10.809,13.636-19.472,13.636A20.615,20.615,0,0,1,30.6,89.838l-2.937,2.933a23.916,23.916,0,0,0,10.514,2.277q15.472,0,23.088-16.116a3.229,3.229,0,0,0,0-2.755ZM57.839,58.351l-2.274-2.277a.429.429,0,0,0-.608,0l-6.265,6.262a23.775,23.775,0,0,0-10.51-2.281q-15.472,0-23.088,16.116v.007a3.236,3.236,0,0,0,0,2.765,32.617,32.617,0,0,0,7.014,9.985L16.7,94.32a.429.429,0,0,0,0,.608l2.274,2.277a.429.429,0,0,0,.608,0L57.839,58.949a.426.426,0,0,0,0-.6ZM32.113,78.915a6.011,6.011,0,0,1,7.22-7.22l-7.223,7.22Zm9.9-9.9A9.452,9.452,0,0,0,29.43,81.6l-4.6,4.6a28.424,28.424,0,0,1-6.124-8.635c4.475-9.25,10.816-13.636,19.472-13.636a20.615,20.615,0,0,1,7.577,1.343Zm-4.046,14.55a5.752,5.752,0,0,1-1.01-.086l-2.744,2.741A9.446,9.446,0,0,0,46.638,73.794L43.9,76.538a6.018,6.018,0,0,1-5.932,7.024Z" transform="translate(-14.182 -52.64)"/></svg>',重置:'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="currentColor"><path d="M32.936,32.658a15.914,15.914,0,0,1-9.6,3.064c-.451-.006-.9-.042-1.342-.077-.182-.018-.357-.047-.539-.077-.352-.047-.7-.089-1.037-.164-.211-.036-.422-.1-.621-.148-.334-.077-.668-.154-.99-.254-.153-.059-.3-.11-.457-.177-.381-.124-.755-.26-1.113-.414-.082-.036-.162-.071-.24-.1-.422-.2-.844-.408-1.248-.627-.017-.012-.035-.018-.054-.03a16.485,16.485,0,0,1-3.732-2.9c-.017-.018-.035-.042-.054-.059-.34-.355-.668-.721-.979-1.118-.065-.083-.123-.16-.194-.254A17.286,17.286,0,0,1,7.149,18.751h3.98L6.318,9.076,0,18.874H3.942a20.809,20.809,0,0,0,3.5,11.57.871.871,0,0,0,.075.14c.225.34.486.648.724.961.1.113.177.232.274.362.354.443.746.869,1.133,1.285.043.043.075.076.108.113a19.778,19.778,0,0,0,4.436,3.446c.043.027.08.043.128.076.467.259.949.5,1.432.719.124.055.242.113.359.164.419.184.847.335,1.277.493.2.076.4.14.611.21.378.113.762.21,1.153.3.257.065.509.129.772.184a2.252,2.252,0,0,0,.316.076c.37.07.735.1,1.1.151.134.027.27.049.4.065.66.065,1.314.11,1.974.11,4.006,0,8.852-1.3,11.85-4.177a1.908,1.908,0,0,0,.333-2.484,2.228,2.228,0,0,0-2.952.023ZM44.053,20.424a20.728,20.728,0,0,0-3.47-11.537c-.032-.055-.054-.113-.08-.164-.284-.405-.574-.778-.869-1.161a1.289,1.289,0,0,1-.1-.14A19.86,19.86,0,0,0,32.168,1.7c-.086-.032-.155-.076-.242-.11-.456-.195-.922-.362-1.394-.53C30.37,1,30.2.937,30.033.883,29.62.754,29.212.651,28.792.548c-.231-.055-.467-.113-.7-.164-.113-.022-.22-.055-.338-.081-.311-.055-.617-.081-.933-.124C26.6.151,26.392.119,26.18.1,25.655.042,25.135.021,24.616.016c-.1,0-.188-.016-.284-.016-.016,0-.032.005-.049.005A19.124,19.124,0,0,0,13.02,3.695a1.682,1.682,0,0,0-.466,2.515,1.777,1.777,0,0,0,2.309.3A15.251,15.251,0,0,1,24.374,3.45c.486.006.971.03,1.441.077.147.012.287.036.432.059a11.3,11.3,0,0,1,1.16.189c.162.03.334.077.493.11.381.089.744.178,1.107.3a2.577,2.577,0,0,1,.34.124c.422.142.832.29,1.23.467.047.012.082.047.123.059a16.492,16.492,0,0,1,6.182,4.8.367.367,0,0,0,.024.036A17.308,17.308,0,0,1,40.629,20.43H36.645l5.048,9.787L48,20.424Zm0,0" transform="translate(0 4.349)"/></svg>',标高:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M84.131,193.119a1.056,1.056,0,0,1,1.116.982v7.857a1.056,1.056,0,0,1-1.116.982H54.367a1.056,1.056,0,0,1-1.116-.982V194.1a1.056,1.056,0,0,1,1.116-.982Zm-1.116,1.964H55.483v5.893H83.015Zm1.116-13.749a1.064,1.064,0,0,1,1.114.935,1.032,1.032,0,0,1-1.007,1.025l-.107,0H71.2l-7.858,6.914a1.227,1.227,0,0,1-1.578,0l-8.185-7.2-.018-.016-.032-.031.049.047a1.107,1.107,0,0,1-.092-.092l-.011-.014a.869.869,0,0,1-.182-.857l0-.008L53.31,182l.012-.029.02-.045.019-.035a1.1,1.1,0,0,1,.891-.552h.007q.053,0,.107,0ZM68.043,183.3H57.06l5.492,4.831Z" transform="translate(-53.247 -176.136)"/></svg>',距离:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M29.692,3.03,27.55.919a.529.529,0,0,1-.014-.756A.549.549,0,0,1,28.3.15l.014.013,3.067,3.023a.529.529,0,0,1,0,.756L28.317,6.966a.549.549,0,0,1-.767.013.529.529,0,0,1-.014-.756l.014-.013L29.692,4.1H2.31L4.452,6.21a.528.528,0,0,1,.013.756.547.547,0,0,1-.766.013l-.014-.013L.616,3.942a.531.531,0,0,1,0-.756L3.685.163a.548.548,0,0,1,.767.014.528.528,0,0,1,0,.742L2.31,3.03ZM24.136,15.055H23.051V18H21.966v-2.94H20.882V18H19.8v-2.94H18.712V18H17.627v-2.94H16.543v5.078H15.458V15.055H14.373V18H13.288v-2.94H12.2V18H11.119v-2.94H10.034V18H8.949v-2.94H7.865V18H6.78v-2.94H5.7v5.078H4.61V15.055H1.9a.27.27,0,0,0-.272.268v6.413A.269.269,0,0,0,1.9,22H30.1a.268.268,0,0,0,.271-.267V15.323a.269.269,0,0,0-.271-.268H27.39v5.078H26.305V15.055H25.221V18H24.136Zm5.966-1.6A1.884,1.884,0,0,1,32,15.323v6.413a1.885,1.885,0,0,1-1.9,1.871H1.9A1.885,1.885,0,0,1,0,21.736V15.323a1.885,1.885,0,0,1,1.9-1.871Z" transform="translate(0 4.197)"/></svg>',最小距离:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M-5.839,24.8H-34.16A1.875,1.875,0,0,1-36,22.933V16.52a1.887,1.887,0,0,1,1.9-1.871H-5.9A1.887,1.887,0,0,1-4,16.52v6.412A1.875,1.875,0,0,1-5.839,24.8ZM-34.1,16.252a.27.27,0,0,0-.272.268v6.412a.27.27,0,0,0,.272.267H-5.9a.269.269,0,0,0,.271-.267V16.52a.27.27,0,0,0-.271-.268H-8.61V21.33H-9.695V16.252h-1.085v2.939h-1.085V16.252h-1.085v2.939h-1.085V16.252h-1.084v2.939H-16.2V16.252h-1.085v2.939h-1.085V16.252h-1.084V21.33h-1.084V16.252h-1.085v2.939h-1.085V16.252H-23.8v2.939h-1.085V16.252h-1.085v2.939h-1.085V16.252h-1.084v2.939H-29.22V16.252H-30.3V21.33H-31.39V16.252Z" transform="translate(36 2)"/><path fill="currentColor" d="M23.716,7.947V4.875c0-.8-.232-1.085-.765-1.085a1.573,1.573,0,0,0-1.133.585V7.947H20.4V2.75h1.163l.1.687H21.7a2.547,2.547,0,0,1,1.763-.817c1.172,0,1.676.78,1.676,2.089V7.947Zm-7.26,0V2.62h1.58V7.947Zm-3.8,0V4.875c0-.8-.243-1.085-.76-1.085a1.606,1.606,0,0,0-1.049.585V7.947H9.421V4.875c0-.8-.243-1.085-.758-1.085a1.608,1.608,0,0,0-1.05.585V7.947H6.194V2.75H7.36l.1.7H7.5A2.326,2.326,0,0,1,9.169,2.62a1.486,1.486,0,0,1,1.5.91A2.445,2.445,0,0,1,12.4,2.62c1.156,0,1.691.78,1.691,2.089V7.947Zm3.8-6.849a.79.79,0,0,1,1.58,0,.79.79,0,0,1-1.58,0Z" transform="translate(0.333 3.053)"/></svg>',激光边距:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M0,1.293v31.96H32V1.293ZM30.97,32.182H1.03V2.323H30.97Z"/><path fill="currentColor" d="M160.026,291.9l1.6,1.6,7.305-7.305-7.305-7.305-1.6,1.6,4.794,4.566h-6.392v2.283h6.392Zm-5.251,0-4.566-4.566h6.164v-2.283H150.21l4.566-4.566-1.37-1.6L146.1,286.19l7.305,7.305Z" transform="translate(-141.535 -268.917)"/></svg>',角度:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M39.587,50.766h13.7a1,1,0,0,1,0,2H23.171a1,1,0,0,1,0-2h1.418l6.582-7.006v-.006a.517.517,0,0,1,.14-.357.456.456,0,0,1,.337-.144l12.1-12.876a.451.451,0,0,1,.665,0,.524.524,0,0,1,0,.708L32.883,43.355a8.3,8.3,0,0,1,6.7,7.411Zm-.949,0a7.254,7.254,0,0,0-6.611-6.5l-6.108,6.5Z" transform="translate(-22.229 -26.489)"/></svg>',坡度:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M202.1,188.337l2.629-2.191-8.447-3.106,1.533,8.871,2.629-2.194,9.341,11.209,1.656-1.379Zm-13.726-.435a1.075,1.075,0,0,0-1.07-.341,1.057,1.057,0,0,0-.5.277l-5.11,4.08a1.08,1.08,0,0,0-.406.84l-.007,17.386a1.079,1.079,0,0,0,1.077,1.077L205.7,211.2a1.078,1.078,0,0,0,.822-1.774Zm-4.934,21.164.007-15.788,3.968-3.171,15.974,18.941Z" transform="translate(-180.36 -181.131)"/></svg>',体积:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M94.74,86.658V71.189a.371.371,0,0,1,.2-.329l13.869-7.22a.371.371,0,0,1,.344,0l13.053,6.891h0l.819.431a.371.371,0,0,1,.2.328v15.3a.371.371,0,0,1-.2.328l-13.872,7.255a.371.371,0,0,1-.342,0L94.94,86.987a.371.371,0,0,1-.2-.329Zm2.119-.837,11.2,5.8a.024.024,0,0,0,.035-.022V79.483a.371.371,0,0,0-.2-.328l-11.2-5.909a.024.024,0,0,0-.035.021V85.492A.371.371,0,0,0,96.859,85.821Zm13.151-6.459v12a.12.12,0,0,0,.176.106L114,89.474l3.334-1.745,3.771-1.978a.371.371,0,0,0,.2-.328V73.5a.193.193,0,0,0-.284-.171l-10.812,5.708A.371.371,0,0,0,110.01,79.362ZM97.925,71.725l10.839,5.72a.371.371,0,0,0,.346,0L119.8,71.808a.214.214,0,0,0,0-.378l-10.649-5.621a.371.371,0,0,0-.344,0L97.925,71.47A.144.144,0,0,0,97.925,71.725Z" transform="translate(-92.982 -62.907)"/></svg>',空间体积:'<svg width="32" height="32" viewBox="0 0 32 32"><path fill="currentColor" d="M125.977,128.829l13.076-7.363v-13.6l-13.076,6.8Zm-3.126-15.655a.565.565,0,0,1-.258-.064L109.3,106.323a.567.567,0,0,1-.011-1L122.578,98a.567.567,0,0,1,.55,0l13.288,7.325a.567.567,0,0,1-.011,1l-13.292,6.79A.63.63,0,0,1,122.851,113.174ZM110.773,105.8l12.078,6.172,12.078-6.172-12.078-6.657Z" transform="translate(-1.922)"/><path fill="currentColor" d="M120.649,322.52a.58.58,0,0,1-.262-.064l-13.08-6.8a.573.573,0,0,1-.307-.5V301a.566.566,0,0,1,.273-.486.573.573,0,0,1,.558-.019l13.076,6.8a.573.573,0,0,1,.307.5v14.161a.57.57,0,0,1-.565.569Zm-12.511-7.708,11.942,6.206V308.136l-11.942-6.206Zm15.917,9.408a.585.585,0,0,1-.288-.076.567.567,0,0,1-.281-.489V309.49a.562.562,0,0,1,.307-.5l13.076-6.8a.573.573,0,0,1,.558.019.562.562,0,0,1,.273.486v13.6a.568.568,0,0,1-.288.493l-13.076,7.359A.557.557,0,0,1,124.055,324.22Zm.569-14.385V322.68l11.942-6.722V303.629Z" transform="translate(0 -194.822)"/></svg>',close:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>',check:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"/></svg>',warning:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M1 21h22L12 2L1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>',error:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></svg>',success:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',plus:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>',minus:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19 13H5v-2h14v2z"/></svg>',arrowUp:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"/></svg>',arrowUpBold:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8l-8 8z"/></svg>',arrowDown:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6z"/></svg>',arrowLeft:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"/></svg>',arrowRight:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',search:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14z"/></svg>',refresh:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>',delete:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/></svg>',edit:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a.996.996 0 0 0 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83l3.75 3.75l1.83-1.83z"/></svg>',save:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3s3 1.34 3 3s-1.34 3-3 3zm3-10H5V5h10v4z"/></svg>',expand:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M16.59 8.59L12 13.17L7.41 8.59L6 10l6 6l6-6z"/></svg>',collapse:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 8l-6 6l1.41 1.41L12 10.83l4.59 4.58L18 14z"/></svg>',bot:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 0 1 2-2M7.5 13A2.5 2.5 0 0 0 5 15.5A2.5 2.5 0 0 0 7.5 18a2.5 2.5 0 0 0 2.5-2.5A2.5 2.5 0 0 0 7.5 13m9 0a2.5 2.5 0 0 0-2.5 2.5a2.5 2.5 0 0 0 2.5 2.5a2.5 2.5 0 0 0 2.5-2.5a2.5 2.5 0 0 0-2.5-2.5Z"/></svg>',history:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M13 3a9 9 0 0 0-9 9H1l3.89 3.89l.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7s-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42A8.954 8.954 0 0 0 13 21a9 9 0 0 0 0-18zm-1 5v5l4.28 2.54l.72-1.21l-3.5-2.08V8H12z"/></svg>',settings:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 15.5A3.5 3.5 0 0 1 8.5 12A3.5 3.5 0 0 1 12 8.5a3.5 3.5 0 0 1 3.5 3.5a3.5 3.5 0 0 1-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97c0-.33-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.31-.61-.22l-2.49 1c-.52-.39-1.06-.73-1.69-.98l-.37-2.65A.506.506 0 0 0 14 2h-4c-.25 0-.46.18-.5.42l-.37 2.65c-.63.25-1.17.59-1.69.98l-2.49-1c-.22-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1c0 .33.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.06.74 1.69.99l.37 2.65c.04.24.25.42.5.42h4c.25 0 .46-.18.5-.42l.37-2.65c.63-.26 1.17-.59 1.69-.99l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66Z"/></svg>',loader:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8Z"><animateTransform attributeName="transform" dur="0.75s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"/></path></svg>',send:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M2 21l21-9L2 3v7l15 2l-15 2v7z"/></svg>',default:'<svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"/></svg>'};function rt(s){const e=Fg[s];return e||(console.warn(`[IconManager] Icon "${s}" not found, using default icon`),Fg.default)}function zg(s,e){let t=e>>>0;for(let n=0;n<s.length;n++){const i=s.charCodeAt(n);t^=i&255,t=Math.imul(t,16777619),t^=i>>>8&255,t=Math.imul(t,16777619)}return t>>>0}async function qE(s){const e=JSON.stringify(s),t=zg(e,2166136261),n=zg(e,522970236);return`${t.toString(16).padStart(8,"0")}${n.toString(16).padStart(8,"0")}`}function td(s){const e=[],t=s.config.data;t?.ids?.length&&e.push(...t.ids);for(const n of s.children||[])e.push(...td(n));return e}let ZE=0;async function YE(s){if(!s||s.length===0)return[];const e=async(t,n)=>{const i=t.children&&t.children.length>0;let r;return t.ids?.length?r=await qE(t.ids):t.id?r=t.id:r=`node_${++ZE}`,{id:r,label:t.name||"未命名",expanded:!1,checked:!0,children:i?await Promise.all(t.children.map(o=>e(o,n))):void 0,data:{...t,_modelUrl:n}}};return Promise.all(s.map(async t=>{const n=t.children&&t.children.length>0,i=t.url;return{id:i,label:t.name||"模型",expanded:!0,checked:!0,children:n?await Promise.all(t.children.map(r=>e(r,i))):void 0,data:{_modelUrl:i}}}))}class $E extends mi{toolbar=null;toolbarContainer=null;container;dialog=null;constructor(e){super(),this.container=e,this.init()}init(){this.toolbarContainer=document.createElement("div"),this.toolbarContainer.id="bim-construct-tree",this.container.appendChild(this.toolbarContainer),this.toolbar=new Hl({container:this.toolbarContainer,showLabel:!1,direction:"column",position:"top-left",align:"vertical",expand:"up"}),this.toolbar.init(),this.toolbar.addGroup("construct-tree"),this.toolbar.addButton({id:"construct-tree-btn",groupId:"construct-tree",type:"button",label:"construct-tree",icon:rt("目录树"),onClick:()=>{this.openConstructTreeDialog()}}),this.toolbar.render()}async openConstructTreeDialog(){this.setVisible(!1);const e=this.registry.engine3d?.getLevelTreeData()??[],t=this.registry.engine3d?.getTypeTreeData()??[],n=this.registry.engine3d?.getMajorTreeData()??[];console.log("[ConstructTree] 原始数据 (Level):",e),console.log("[ConstructTree] 原始数据 (Type):",t),console.log("[ConstructTree] 原始数据 (Major):",n);const i=async(f,x)=>{const g=await YE(f);console.log(`[ConstructTree] 转换后数据 (${x}):`,g);const b=new jE({data:g,checkable:!0,indent:0,enableSearch:!0,checkStrictly:!0,defaultExpandAll:!0,onNodeCheck:v=>{const y=v.config.data;if(!y?._modelUrl)return;const _=y.ids?.length?y.ids:td(v);if(!_.length)return;const E=[{url:y._modelUrl,ids:_.map(Number)}];v.checkState===Mt.Checked?this.registry.engine3d?.showModel(E):this.registry.engine3d?.hideModels(E)},onNodeSelect:v=>{const y=v.config.data;if(!y?._modelUrl)return;const _=y.ids?.length?y.ids:td(v);if(!_.length)return;const E=[{url:y._modelUrl,ids:_.map(Number)}];this.registry.engine3d?.unhighlightAllModels(),this.registry.engine3d?.highlightModel(E),this.registry.engine3d?.viewScaleToModel(E)},onNodeDeselect:()=>{this.registry.engine3d?.unhighlightAllModels()},onNodeExpand:()=>{this.dialog?.fitWidth()}});return b.init(),b},r=await i(e,"Level"),o=await i(t,"Type"),a=await i(n,"Major"),l=document.createElement("div");l.className="construct-tab__panel-content",l.appendChild(r.element);const c=document.createElement("div");c.className="construct-tab__panel-content",c.appendChild(o.element);const h=document.createElement("div");h.className="construct-tab__panel-content",h.appendChild(a.element);const u=document.createElement("div");u.className="construct-tab__container",u.style.height="100%",u.style.overflow="hidden";const p=()=>{this.registry.engine3d?.showAllModels(),r.checkAllNodes(!0),o.checkAllNodes(!0),a.checkAllNodes(!0)},d=new Og({container:u,tabs:[{id:"component",title:"tab.component",content:l},{id:"type",title:"tab.type",content:c},{id:"major",title:"tab.major",content:h}],activeId:"component",onChange:()=>{p(),this.dialog?.fitWidth()}});d.init(),p();const m=this.registry.on("menu:show-all",()=>{p()});this.dialog=this.registry.dialog.create({title:"constructTree.title",minWidth:320,height:600,content:u,position:{x:20,y:20},resizable:!1,onClose:()=>{m(),d.destroy(),r.destroy(),o.destroy(),a.destroy(),this.setVisible(!0)}}),this.dialog?.fitWidth()}refresh(){this.toolbar?.render()}destroy(){this.toolbar?.destroy(),this.toolbar=null,super.destroy()}addGroup(e,t){this.toolbar?.addGroup(e,t),this.toolbar?.render()}addButton(e){this.toolbar?.addButton(e),this.toolbar?.render()}setButtonVisibility(e,t){this.toolbar?.updateButtonVisibility(e,t)}setShowLabel(e){this.toolbar?.setShowLabel(e)}setVisible(e){this.toolbarContainer&&(this.toolbarContainer.style.visibility=e?"visible":"hidden")}setBackgroundColor(e){this.toolbar?.setBackgroundColor(e)}setColors(e){this.toolbar?.setColors(e)}}class Fr extends mi{dialog=null;isVisible=!1;get dialogWidth(){return 300}get dialogHeight(){return"auto"}get dialogOptions(){return{draggable:!0,resizable:!1}}onDialogClose(){}onDialogCreated(){}onBeforeDestroy(){}getDialogPosition(){const e=this.registry.container;if(!e)return{x:100,y:100};const t=e.clientWidth,n=e.clientHeight,i=this.dialogWidth,r=typeof this.dialogHeight=="number"?this.dialogHeight:300;return{x:t-i-20,y:(n-r)/2}}show(){if(!this.registry.dialog||!this.registry.container){console.warn(`[${this.dialogId}] Dialog manager or container is not initialized`);return}this.dialog&&this.destroyDialog();const e=this.getDialogPosition(),t=this.createContent(),n=this.dialogOptions;this.dialog=this.registry.dialog.create({id:this.dialogId,title:this.dialogTitle,content:t,width:this.dialogWidth,height:this.dialogHeight,position:e,draggable:n.draggable,resizable:n.resizable,onClose:()=>{this.onDialogClose(),this.destroyDialog()}}),this.dialog.init(),this.isVisible=!0,this.onDialogCreated()}hide(){this.destroyDialog()}toggle(){this.isVisible?this.hide():this.show()}isOpen(){return this.isVisible}destroyDialog(){this.onBeforeDestroy(),this.dialog&&(this.dialog.destroy(),this.dialog=null),this.isVisible=!1}destroy(){this.destroyDialog(),super.destroy()}}const is={clearHeight:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">净高</text></svg>',clearDistance:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">净距</text></svg>',distance:'<svg viewBox="0 0 32 32" aria-hidden="true"><g transform="translate(0 4.197)"><path fill="currentColor" d="M29.692,3.03,27.55.919a.529.529,0,0,1-.014-.756A.549.549,0,0,1,28.3.15l.014.013,3.067,3.023a.529.529,0,0,1,0,.756L28.317,6.966a.549.549,0,0,1-.767.013.529.529,0,0,1-.014-.756l.014-.013L29.692,4.1H2.31L4.452,6.21a.528.528,0,0,1,.013.756.547.547,0,0,1-.766.013l-.014-.013L.616,3.942a.531.531,0,0,1,0-.756L3.685.163a.548.548,0,0,1,.767.014.528.528,0,0,1,0,.742L2.31,3.03ZM24.136,15.055H23.051V18H21.966v-2.94H20.882V18H19.8v-2.94H18.712V18H17.627v-2.94H16.543v5.078H15.458V15.055H14.373V18H13.288v-2.94H12.2V18H11.119v-2.94H10.034V18H8.949v-2.94H7.865V18H6.78v-2.94H5.7v5.078H4.61V15.055H1.9a.27.27,0,0,0-.272.268v6.413A.269.269,0,0,0,1.9,22H30.1a.268.268,0,0,0,.271-.267V15.323a.269.269,0,0,0-.271-.268H27.39v5.078H26.305V15.055H25.221V18H24.136Zm5.966-1.6A1.884,1.884,0,0,1,32,15.323v6.413a1.885,1.885,0,0,1-1.9,1.871H1.9A1.885,1.885,0,0,1,0,21.736V15.323a1.885,1.885,0,0,1,1.9-1.871Z"/></g></svg>',elevation:'<svg viewBox="0 0 32 32" aria-hidden="true"><path fill="currentColor" d="M84.131,193.119a1.056,1.056,0,0,1,1.116.982v7.857a1.056,1.056,0,0,1-1.116.982H54.367a1.056,1.056,0,0,1-1.116-.982V194.1a1.056,1.056,0,0,1,1.116-.982Zm-1.116,1.964H55.483v5.893H83.015Zm1.116-13.749a1.064,1.064,0,0,1,1.114.935,1.032,1.032,0,0,1-1.007,1.025l-.107,0H71.2l-7.858,6.914a1.227,1.227,0,0,1-1.578,0l-8.185-7.2-.018-.016-.032-.031.049.047a1.107,1.107,0,0,1-.092-.092l-.011-.014a.869.869,0,0,1-.182-.857l0-.008L53.31,182l.012-.029.02-.045.019-.035a1.1,1.1,0,0,1,.891-.552h.007q.053,0,.107,0ZM68.043,183.3H57.06l5.492,4.831Z" transform="translate(-53.247 -176.136)"/></svg>',point:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">坐标</text></svg>',angle:'<svg viewBox="0 0 32 32" aria-hidden="true"><path fill="currentColor" d="M39.587,50.766h13.7a1,1,0,0,1,0,2H23.171a1,1,0,0,1,0-2h1.418l6.582-7.006v-.006a.517.517,0,0,1,.14-.357.456.456,0,0,1,.337-.144l12.1-12.876a.451.451,0,0,1,.665,0,.524.524,0,0,1,0,.708L32.883,43.355a8.3,8.3,0,0,1,6.7,7.411Zm-.949,0a7.254,7.254,0,0,0-6.611-6.5l-6.108,6.5Z" transform="translate(-22.229 -26.489)"/></svg>',area:'<svg viewBox="0 0 32 32" aria-hidden="true"><text x="16" y="20" text-anchor="middle" fill="currentColor" font-size="12" font-family="system-ui, sans-serif">面积</text></svg>',slope:'<svg viewBox="0 0 32 32" aria-hidden="true"><path fill="currentColor" d="M202.1,188.337l2.629-2.191-8.447-3.106,1.533,8.871,2.629-2.194,9.341,11.209,1.656-1.379Zm-13.726-.435a1.075,1.075,0,0,0-1.07-.341,1.057,1.057,0,0,0-.5.277l-5.11,4.08a1.08,1.08,0,0,0-.406.84l-.007,17.386a1.079,1.079,0,0,0,1.077,1.077L205.7,211.2a1.078,1.078,0,0,0,.822-1.774Zm-4.934,21.164.007-15.788,3.968-3.171,15.974,18.941Z" transform="translate(-180.36 -181.131)"/></svg>'},Vo={distance:{key:"distance",callBackType:"distance",icon:is.distance,order:0},clearHeight:{key:"clearHeight",callBackType:"clear-height",icon:is.clearHeight,order:1},clearDistance:{key:"clearDistance",callBackType:"clear-distance",icon:is.clearDistance,order:2},elevation:{key:"elevation",callBackType:"elevation",icon:is.elevation,order:3},point:{key:"point",callBackType:"point",icon:is.point,order:4},angle:{key:"angle",callBackType:"angle",icon:is.angle,order:5},area:{key:"area",callBackType:"area",icon:is.area,order:6},slope:{key:"slope",callBackType:"slope",icon:is.slope,order:7}},Hg=Object.values(Vo).sort((s,e)=>s.order-e.order).map(s=>s.key);function Vg(s){switch(s){case"clearHeight":case"clearDistance":case"distance":case"elevation":return"length";case"area":return"area";case"angle":return"angle";case"slope":return"percent";case"point":default:return"point"}}function KE(s){return Object.values(Vo).find(e=>e.callBackType===s)?.key}class Go{element;options;activeMode;isExpanded;result=null;config;draftConfig=null;view="main";static CONFIG_CACHE_KEY="bim-engine:measure:config";static DEFAULT_CONFIG={unit:"mm",precision:2};toolButtons=new Map;toggleBtn;toggleTextEl;mainValueRowEl;mainValueValueEl;mainValueLabelEl;mainNumberEl;mainUnitEl;xyzBoxEl;xyzXEl;xyzYEl;xyzZEl;clearBtn;settingsBtn;mainViewEl;settingsViewEl;unitSelectEl;precisionSelectEl;saveSettingsBtn;cancelSettingsBtn;unsubscribeLocale=null;unsubscribeTheme=null;constructor(e={}){this.options=e,this.activeMode=e.defaultMode??"distance",this.isExpanded=e.defaultExpanded??!1,this.config=this.loadConfigFromCache()??{...Go.DEFAULT_CONFIG},this.element=this.createDom()}init(){this.unsubscribeLocale=Yt.subscribe(()=>{this.setLocales()}),this.unsubscribeTheme=ot.subscribe(e=>{this.setTheme(e)}),this.setLocales(),this.setTheme(ot.getTheme()),this.applyExpandedState(),this.applyActiveModeState(),this.applyViewState(),this.renderResult(),this.options.onModeChange&&this.options.onModeChange(this.activeMode)}setTheme(e){const t=this.element.style;t.setProperty("--bim-bg-inset",e.bgInset??"#152232"),t.setProperty("--bim-bg-elevated",e.bgElevated??"#1f2d3e"),t.setProperty("--bim-border-default",e.borderDefault??"#334155"),t.setProperty("--bim-border-strong",e.borderStrong??"#475569"),t.setProperty("--bim-divider",e.divider??"#334155"),t.setProperty("--bim-primary",e.primary??"#3b82f6"),t.setProperty("--bim-primary-hover",e.primaryHover??"#60a5fa"),t.setProperty("--bim-primary-subtle",e.primarySubtle??"rgba(59, 130, 246, 0.15)"),t.setProperty("--bim-danger",e.danger??"#ef4444"),t.setProperty("--bim-text-primary",e.textPrimary??"#ffffff"),t.setProperty("--bim-text-secondary",e.textSecondary??"#94a3b8"),t.setProperty("--bim-text-tertiary",e.textTertiary??"#64748b"),t.setProperty("--bim-text-inverse",e.textInverse??"#152232"),t.setProperty("--bim-icon-default",e.iconDefault??"#ffffff"),t.setProperty("--bim-component-bg-hover",e.componentBgHover??"rgba(248, 250, 252, 0.06)")}setLocales(){for(const[t,n]of this.toolButtons.entries())n.title=ve(this.getModeI18nKey(t)),n.setAttribute("aria-label",n.title);this.toggleBtn.title=this.isExpanded?ve("measure.actions.collapse"):ve("measure.actions.expand"),this.toggleBtn.setAttribute("aria-label",this.toggleBtn.title),this.toggleTextEl&&(this.toggleTextEl.textContent=this.toggleBtn.title),this.clearBtn.textContent=ve("measure.actions.clearAll"),this.settingsBtn.title=ve("measure.actions.settings"),this.settingsBtn.setAttribute("aria-label",this.settingsBtn.title),this.mainValueLabelEl.textContent=ve(this.getModeValueLabelI18nKey(this.activeMode)),this.element.querySelectorAll("[data-i18n-key]").forEach(t=>{const n=t.dataset.i18nKey;n&&(t.textContent=ve(n))}),this.saveSettingsBtn.textContent=ve("measure.settings.save"),this.cancelSettingsBtn.textContent=ve("measure.settings.cancel")}destroy(){this.unsubscribeLocale&&(this.unsubscribeLocale(),this.unsubscribeLocale=null),this.unsubscribeTheme&&(this.unsubscribeTheme(),this.unsubscribeTheme=null),this.element.remove()}getActiveMode(){return this.activeMode}switchMode(e,t=!0){this.setActiveMode(e,t)}setActiveMode(e,t=!0){this.activeMode!==e&&(this.activeMode=e,this.applyActiveModeState(),this.mainValueLabelEl.textContent=ve(this.getModeValueLabelI18nKey(this.activeMode)),t&&this.options.onModeChange&&this.options.onModeChange(e),this.renderResult(),this.options.onExpandedChange&&this.options.onExpandedChange(this.isExpanded))}setResult(e){this.result=e,this.renderResult()}clearAll(){this.result=null,this.renderResult(),this.options.onClearAll&&this.options.onClearAll()}openSettings(){this.enterSettingsView(),this.options.onSettings&&this.options.onSettings()}getConfig(){return{...this.config}}setConfig(e,t=!1){const n={unit:e.unit??this.config.unit,precision:e.precision??this.config.precision};this.config=n,t&&this.saveConfigToCache(n),this.renderResult(),this.view==="settings"&&this.syncSettingsFormFromConfig(n)}setExpanded(e){this.isExpanded!==e&&(this.isExpanded=e,this.applyExpandedState(),this.setLocales(),this.options.onExpandedChange&&this.options.onExpandedChange(this.isExpanded))}getExpanded(){return this.isExpanded}createDom(){const e=document.createElement("div");e.className="bim-measure-panel",this.mainViewEl=document.createElement("div"),this.mainViewEl.className="bim-measure-main";const t=document.createElement("div");t.className="bim-measure-tools";const n=document.createElement("div");n.className="bim-measure-tool-grid";const i=`
4754
4754
  <svg viewBox="0 0 24 24" aria-hidden="true">
4755
4755
  <circle cx="12" cy="12" r="9"></circle>
4756
4756
  </svg>