ss-component-new 1.1.366 → 1.1.367

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/{array-B4OYH6uL.cjs → array-Cs_qeJ2m.cjs} +1 -1
  2. package/dist/{array-EGWOD_Yi.js → array-I0ed2wow.js} +2 -2
  3. package/dist/{cloneDeep-BPCav0OY.cjs → cloneDeep-CYcGhlzG.cjs} +1 -1
  4. package/dist/{cloneDeep-D3jWUY57.js → cloneDeep-GOtDTHJH.js} +1 -1
  5. package/dist/{index-DxeIJqcl.js → index-8EjfXioS.js} +1 -1
  6. package/dist/{index-FnUvbwkl.cjs → index-8OLisgK0.cjs} +1 -1
  7. package/dist/{index-BPLD6fuH.js → index-B5VuM8l5.js} +8 -8
  8. package/dist/{index-CAfIBffc.cjs → index-B7Wi5BZf.cjs} +1 -1
  9. package/dist/{index-B7rnt0a7.js → index-BCKmCfQY.js} +3 -3
  10. package/dist/{index-Cj9Wq_7v.cjs → index-BDDKdGJX.cjs} +1 -1
  11. package/dist/{index-Cal7dRFc.js → index-BPWbJd07.js} +1 -1
  12. package/dist/{index-DQewAWSX.js → index-BTsOEEe8.js} +5 -5
  13. package/dist/{index-DsSqH7Ku.js → index-BUmHqNSQ.js} +5 -5
  14. package/dist/{index-CN73stto.cjs → index-BVtKkvlP.cjs} +1 -1
  15. package/dist/{index-KKYTpn-0.js → index-BWLxiwts.js} +4 -4
  16. package/dist/{index-Dy0Bjmrr.js → index-BpmoTHTK.js} +15 -15
  17. package/dist/{index-BSd6lCCf.js → index-BqCSda61.js} +3 -3
  18. package/dist/{index-D0Xtu3c5.js → index-Bt3Ruo-D.js} +4 -4
  19. package/dist/{index-BBvGttI3.cjs → index-BvA8vJuJ.cjs} +1 -1
  20. package/dist/{index-BovJtyyV.cjs → index-Bwgh1tDh.cjs} +1 -1
  21. package/dist/{index-9Kq2L6hA.cjs → index-C4arHEk-.cjs} +1 -1
  22. package/dist/{index-1LyKu48J.cjs → index-CDkcPYW6.cjs} +1 -1
  23. package/dist/{index-Cnigg-Vb.cjs → index-CFOUGn9U.cjs} +1 -1
  24. package/dist/{index-CdrtM6Jl.cjs → index-CKLAjhdz.cjs} +1 -1
  25. package/dist/{index-C_zK0qeZ.js → index-CUw8elUc.js} +3 -3
  26. package/dist/{index-CMza6E0Y.js → index-C_LjwD8t.js} +6 -6
  27. package/dist/{index-Bxt_jC-e.js → index-CdOw3chz.js} +3 -3
  28. package/dist/{index-Dp7ftR-s.cjs → index-CeWS20go.cjs} +1 -1
  29. package/dist/{index-BWoxDyyu.js → index-CpCocC41.js} +1 -1
  30. package/dist/{index-CEVLI-tF.cjs → index-D6rdau3q.cjs} +1 -1
  31. package/dist/{index-CylVtJFa.cjs → index-D7RMQttr.cjs} +1 -1
  32. package/dist/{index-FipljzbJ.cjs → index-D9bPG3j0.cjs} +1 -1
  33. package/dist/{index-Dq0BnanX.js → index-DGFAibP8.js} +6 -6
  34. package/dist/{index-qWPIXtmB.cjs → index-DH0ET7m4.cjs} +1 -1
  35. package/dist/{index-B1KIGMDS.cjs → index-DPBA1Q25.cjs} +1 -1
  36. package/dist/{index-Cks4xBFc.js → index-DPpVsGw9.js} +7 -7
  37. package/dist/{index-DgdlwjkF.js → index-DRUsyai9.js} +5 -5
  38. package/dist/{index-DXu2C7E2.js → index-DTxixBDx.js} +1 -1
  39. package/dist/{index-1mb-R5LL.js → index-Dkb7lD6V.js} +8 -8
  40. package/dist/{index-CTASWvkf.js → index-DmyMy020.js} +9 -9
  41. package/dist/{index-BXO1mk6t.cjs → index-DoPfcd5q.cjs} +1 -1
  42. package/dist/{index-BK34ZIUl.cjs → index-Dqzy8-xb.cjs} +1 -1
  43. package/dist/{index-DPoMcIHZ.js → index-NnlO4vSZ.js} +7 -7
  44. package/dist/{index-r4-byc3l.cjs → index-OCvy-QIo.cjs} +1 -1
  45. package/dist/{index-B6D0Zmro.js → index-Od7_9YnM.js} +4 -4
  46. package/dist/{index-Bo8sDOPU.js → index-PCCtRzDJ.js} +4 -4
  47. package/dist/{index-DQXp-tQk.js → index-Qx0GuwHr.js} +1 -1
  48. package/dist/{index-Cd0GOTJL.cjs → index-UKfyjk2G.cjs} +1 -1
  49. package/dist/{index-BQQE4RO9.js → index-Uzbrsz3o.js} +4 -4
  50. package/dist/{index-CkgqQw5c.js → index-c9nu1Oxk.js} +4 -4
  51. package/dist/{index-DjI83upr.js → index-d44crVNl.js} +6 -6
  52. package/dist/{index-h3vgrWAC.cjs → index-fULzuqL0.cjs} +1 -1
  53. package/dist/{index-Xd0gl2O5.cjs → index-kxN4kJ1s.cjs} +1 -1
  54. package/dist/{index-EgiRVqNe.cjs → index-mhef-1Zo.cjs} +1 -1
  55. package/dist/{index-B8PQq8Z4.cjs → index-sRwTHKAL.cjs} +1 -1
  56. package/dist/{index-C67VR66n.cjs → index-wAG1B1TR.cjs} +1 -1
  57. package/dist/{index-D_80-VnL.cjs → index-xjuo15AK.cjs} +1 -1
  58. package/dist/{index-Dj7KpYhE.cjs → index-zvArGV4H.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_script_setup_true_lang-CEx7p4se.cjs → index.vue_vue_type_script_setup_true_lang-CfJGn5rz.cjs} +1 -1
  60. package/dist/{index.vue_vue_type_script_setup_true_lang-CE6ciJHv.js → index.vue_vue_type_script_setup_true_lang-D8xCoFmH.js} +1 -1
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_23015cb0_lang-BfO2BZm9.js → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-DDredAHL.js} +13 -13
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_23015cb0_lang-_1kiYpwh.cjs → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-Db_d3OS1.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-CpZkvXyX.js → index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-Cs21Q0vD.js} +55 -39
  64. package/dist/index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-i5FsC2rm.cjs +1 -0
  65. package/dist/{login-cDG_pssN.cjs → login-CDUTeSY_.cjs} +1 -1
  66. package/dist/{login-DKf6sQrA.js → login-DMbjMzkS.js} +2 -2
  67. package/dist/{main-BY1dJ_uK.cjs → main-CRtBg87K.cjs} +1 -1
  68. package/dist/{main-DnQRFkkz.js → main-D2KxIY0t.js} +7 -7
  69. package/dist/{menu-eau-OVSc.js → menu-D_3gHkG4.js} +1 -1
  70. package/dist/{menu-Bi2msF1Z.cjs → menu-Da5Ht5hG.cjs} +1 -1
  71. package/dist/ss-component.cjs +1 -1
  72. package/dist/ss-component.css +1 -1
  73. package/dist/ss-component.js +7 -7
  74. package/dist/ss-component3.cjs +1 -1
  75. package/dist/ss-component3.js +1 -1
  76. package/package.json +1 -1
  77. package/dist/index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-BX_0yNEO.cjs +0 -1
  78. package/dist/obj/model.mtl +0 -42
  79. package/dist/obj/model.obj +0 -26110
  80. package/public/obj/model.mtl +0 -42
  81. package/public/obj/model.obj +0 -26110
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Ne=require("./index-Cnigg-Vb.cjs"),We=require("./index-FipljzbJ.cjs"),R=require("./index.vue_vue_type_style_index_0_scoped_23015cb0_lang-_1kiYpwh.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=require("./menu-Bi2msF1Z.cjs"),st=require("./login-cDG_pssN.cjs"),Te=require("./index-BpPyaNFa.cjs"),a=require("./index-Dj7KpYhE.cjs"),xe=require("./index-BovJtyyV.cjs"),$e=require("./index-CAfIBffc.cjs"),lt=require("./index-Xd0gl2O5.cjs"),Ie=require("./cloneDeep-BPCav0OY.cjs"),ut=require("./index-Cj9Wq_7v.cjs"),ot=require("./index-r4-byc3l.cjs"),Fe=require("./array-B4OYH6uL.cjs"),nt=require("./index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-BX_0yNEO.cjs"),ht={class:"tree-container"},pt=e.defineComponent({__name:"index",props:{treeData:Array,expand:{type:Boolean,default:!1}},emits:["nodeClick"],setup(i,{emit:t}){const o=t,n=i,c={children:"children",label:"label"},s=l=>{o("nodeClick",l)};return(l,r)=>{const d=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(d,{data:n==null?void 0:n.treeData,props:c,"default-expand-all":i.expand,onNodeClick:s},null,8,["data","default-expand-all"])])}}}),mt=Pe._export_sfc(pt,[["__scopeId","data-v-b4bd4658"]]),ft={class:"client-robot-side"},_t=e.defineComponent({__name:"robotMenu",props:{model:Object},setup(i){const t=i,o=e.ref(0),n=e.ref([]),c=l=>{let r=[];return Array.isArray(l)&&(l==null?void 0:l.length)>0&&(o.value++,l.forEach(d=>{!(d!=null&&d.isMesh)&&((d==null?void 0:d.type)==="URDFJoint"||(d==null?void 0:d.type)==="URDFLink")&&r.push({name:d==null?void 0:d.name,label:d==null?void 0:d.name,show:!0,level:o.value,isPenultimate:!1,type:d==null?void 0:d.type,id:d==null?void 0:d.id,limit:(d==null?void 0:d.limit)??"",children:c(d==null?void 0:d.children),path:d==null?void 0:d.name})})),r},s=l=>{let r=[];return o.value++,r.push({name:l==null?void 0:l.name,label:l==null?void 0:l.name,show:!0,level:o.value,isPenultimate:!1,type:l==null?void 0:l.type,id:l==null?void 0:l.id,limit:(l==null?void 0:l.limit)??"",children:c(l==null?void 0:l.children),path:l==null?void 0:l.name}),r};return e.watch(()=>t==null?void 0:t.model,()=>{t!=null&&t.model&&(n.value=s(t==null?void 0:t.model))},{deep:!0,immediate:!0}),(l,r)=>(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(mt,{treeData:n.value,expand:!0},null,8,["treeData"])]))}}),gt=Pe._export_sfc(_t,[["__scopeId","data-v-0411c59a"]]),at={type:"change"},tt={type:"start"},rt={type:"end"},Xe=new a.Ray,it=new a.Plane,yt=Math.cos(70*a.MathUtils.DEG2RAD),re=new a.Vector3,Ce=2*Math.PI,$={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},et=1e-6;class wt extends a.Controls{constructor(t,o=null){super(t,o),this.state=$.NONE,this.target=new a.Vector3,this.cursor=new a.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN},this.touches={ONE:a.TOUCH.ROTATE,TWO:a.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new a.Vector3,this._lastQuaternion=new a.Quaternion,this._lastTargetPosition=new a.Vector3,this._quat=new a.Quaternion().setFromUnitVectors(t.up,new a.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new a.Spherical,this._sphericalDelta=new a.Spherical,this._scale=1,this._panOffset=new a.Vector3,this._rotateStart=new a.Vector2,this._rotateEnd=new a.Vector2,this._rotateDelta=new a.Vector2,this._panStart=new a.Vector2,this._panEnd=new a.Vector2,this._panDelta=new a.Vector2,this._dollyStart=new a.Vector2,this._dollyEnd=new a.Vector2,this._dollyDelta=new a.Vector2,this._dollyDirection=new a.Vector3,this._mouse=new a.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=vt.bind(this),this._onPointerDown=Ct.bind(this),this._onPointerUp=bt.bind(this),this._onContextMenu=Nt.bind(this),this._onMouseWheel=Et.bind(this),this._onKeyDown=Tt.bind(this),this._onTouchStart=Vt.bind(this),this._onTouchMove=Bt.bind(this),this._onMouseDown=kt.bind(this),this._onMouseMove=xt.bind(this),this._interceptControlDown=Pt.bind(this),this._interceptControlUp=St.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(at),this.update(),this.state=$.NONE}update(t=null){const o=this.object.position;re.copy(o).sub(this.target),re.applyQuaternion(this._quat),this._spherical.setFromVector3(re),this.autoRotate&&this.state===$.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,c=this.maxAzimuthAngle;isFinite(n)&&isFinite(c)&&(n<-Math.PI?n+=Ce:n>Math.PI&&(n-=Ce),c<-Math.PI?c+=Ce:c>Math.PI&&(c-=Ce),n<=c?this._spherical.theta=Math.max(n,Math.min(c,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+c)/2?Math.max(n,this._spherical.theta):Math.min(c,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const l=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=l!=this._spherical.radius}if(re.setFromSpherical(this._spherical),re.applyQuaternion(this._quatInverse),o.copy(this.target).add(re),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let l=null;if(this.object.isPerspectiveCamera){const r=re.length();l=this._clampDistance(r*this._scale);const d=r-l;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),s=!!d}else if(this.object.isOrthographicCamera){const r=new a.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=d!==this.object.zoom;const C=new a.Vector3(this._mouse.x,this._mouse.y,0);C.unproject(this.object),this.object.position.sub(C).add(r),this.object.updateMatrixWorld(),l=re.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;l!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(l).add(this.object.position):(Xe.origin.copy(this.object.position),Xe.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(Xe.direction))<yt?this.object.lookAt(this.target):(it.setFromNormalAndCoplanarPoint(this.object.up,this.target),Xe.intersectPlane(it,this.target))))}else if(this.object.isOrthographicCamera){const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),l!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>et||8*(1-this._lastQuaternion.dot(this.object.quaternion))>et||this._lastTargetPosition.distanceToSquared(this.target)>et?(this.dispatchEvent(at),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?Ce/60*this.autoRotateSpeed*t:Ce/60/60*this.autoRotateSpeed}_getZoomScale(t){const o=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*o)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,o){re.setFromMatrixColumn(o,0),re.multiplyScalar(-t),this._panOffset.add(re)}_panUp(t,o){this.screenSpacePanning===!0?re.setFromMatrixColumn(o,1):(re.setFromMatrixColumn(o,0),re.crossVectors(this.object.up,re)),re.multiplyScalar(t),this._panOffset.add(re)}_pan(t,o){const n=this.domElement;if(this.object.isPerspectiveCamera){const c=this.object.position;re.copy(c).sub(this.target);let s=re.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*s/n.clientHeight,this.object.matrix),this._panUp(2*o*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(o*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,o){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),c=t-n.left,s=o-n.top,l=n.width,r=n.height;this._mouse.x=c/l*2-1,this._mouse.y=-(s/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(Ce*this._rotateDelta.x/o.clientHeight),this._rotateUp(Ce*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let o=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),o=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),o=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),o=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),o=!0;break}o&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._rotateStart.set(n,c)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._panStart.set(n,c)}}_handleTouchStartDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,c=t.pageY-o.y,s=Math.sqrt(n*n+c*c);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const n=this._getSecondPointerPosition(t),c=.5*(t.pageX+n.x),s=.5*(t.pageY+n.y);this._rotateEnd.set(c,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(Ce*this._rotateDelta.x/o.clientHeight),this._rotateUp(Ce*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._panEnd.set(n,c)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,c=t.pageY-o.y,s=Math.sqrt(n*n+c*c);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const l=(t.pageX+o.x)*.5,r=(t.pageY+o.y)*.5;this._updateZoomParameters(l,r)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId){this._pointers.splice(o,1);return}}_isTrackingPointer(t){for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId)return!0;return!1}_trackPointer(t){let o=this._pointerPositions[t.pointerId];o===void 0&&(o=new a.Vector2,this._pointerPositions[t.pointerId]=o),o.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const o=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[o]}_customWheelEvent(t){const o=t.deltaMode,n={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(o){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function Ct(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function vt(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function bt(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(rt),this.state=$.NONE;break;case 1:const t=this._pointers[0],o=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:o.x,pageY:o.y});break}}function kt(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case a.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=$.DOLLY;break;case a.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=$.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=$.ROTATE}break;case a.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=$.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=$.PAN}break;default:this.state=$.NONE}this.state!==$.NONE&&this.dispatchEvent(tt)}function xt(i){switch(this.state){case $.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case $.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case $.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function Et(i){this.enabled===!1||this.enableZoom===!1||this.state!==$.NONE||(i.preventDefault(),this.dispatchEvent(tt),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(rt))}function Tt(i){this.enabled!==!1&&this._handleKeyDown(i)}function Vt(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case a.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=$.TOUCH_ROTATE;break;case a.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=$.TOUCH_PAN;break;default:this.state=$.NONE}break;case 2:switch(this.touches.TWO){case a.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=$.TOUCH_DOLLY_PAN;break;case a.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=$.TOUCH_DOLLY_ROTATE;break;default:this.state=$.NONE}break;default:this.state=$.NONE}this.state!==$.NONE&&this.dispatchEvent(tt)}function Bt(i){switch(this._trackPointer(i),this.state){case $.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case $.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case $.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case $.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=$.NONE}}function Nt(i){this.enabled!==!1&&i.preventDefault()}function Pt(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function St(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Mt(i){let t=null,o=null,n=null,c=null,s=null,l=null;const r=e.ref([]),d=e.ref(new a.Vector3),C=e.ref(new a.Vector3),A=()=>{if(!i.value)return;t=new a.Scene,t.background=new a.Color(15790320);const f=i.value;o=new a.PerspectiveCamera(75,f.clientWidth/f.clientHeight,.1,1e4),n=new a.WebGLRenderer({antialias:!0,alpha:!0}),n.setSize(f.clientWidth,f.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=a.PCFSoftShadowMap,n.toneMapping=a.ACESFilmicToneMapping,n.toneMappingExposure=1,n.outputColorSpace=a.SRGBColorSpace,f.appendChild(n.domElement),c=new wt(o,n.domElement),c.enableDamping=!0,c.dampingFactor=.05,s=new a.Xe(o,n,{container:f,type:"cube",placement:"bottom-left",offset:{left:350,bottom:22},background:{color:"#D1D1D1"}}),s.attachControls(c),J(),X()},J=()=>{const f=new a.AmbientLight(4210752,.6);t.add(f);const _=new a.DirectionalLight(16777215,2);_.position.set(10,10,8),_.castShadow=!0,_.shadow.mapSize.width=2048,_.shadow.mapSize.height=2048,_.shadow.camera.near=.5,_.shadow.camera.far=50,t.add(_);const b=new a.DirectionalLight(16777215,.8);b.position.set(-8,-8,6),t.add(b);const v=new a.DirectionalLight(16777215,.6);v.position.set(0,-15,2),t.add(v);const L=new a.HemisphereLight(16777215,4473924,.8);t.add(L);const U=new a.PointLight(16777215,1,50);U.position.set(15,15,15),t.add(U);const z=new a.PointLight(16777215,.5,50);z.position.set(-15,-15,15),t.add(z)},X=()=>{l=requestAnimationFrame(X),c&&c.update(),n&&t&&o&&n.render(t,o),s&&s.render()},Q=f=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(b=>{f[b]&&f[b].dispose&&f[b].dispose()}),f.dispose&&f.dispose()},H=f=>{f.traverse(_=>{_.geometry&&_.geometry.dispose(),_.material&&(Array.isArray(_.material)?_.material.forEach(b=>{Q(b)}):Q(_.material))})};return{currentModels:r,initialCameraPosition:d,initialTargetPosition:C,initThreeJS:A,handleResize:()=>{if(!i.value||!o||!n||!s)return;const f=i.value,_=f.clientWidth,b=f.clientHeight;o.aspect=_/b,o.updateProjectionMatrix(),n.setSize(_,b),s.update()},fitCameraToAllModels:()=>{if(!o||!c||r.value.length===0)return;const f=new a.Box3;r.value.forEach(ce=>{f.expandByObject(ce)});const _=f.getSize(new a.Vector3),b=f.getCenter(new a.Vector3),L=Math.max(_.x,_.y,_.z)*.8,U=new a.Vector3(b.x+L,b.y+L,b.z+L),z=b.clone();o.position.copy(U),o.lookAt(z),c.target.copy(z),c.update(),d.value.copy(U),C.value.copy(z)},getThreeJSObjects:()=>({scene:t,camera:o,renderer:n,controls:c,gizmo:s}),clearAllModels:()=>{if(!t)return;r.value.forEach(_=>{t.remove(_),H(_)});const f=[];t.children.forEach(_=>{!_.isLight&&!_.isCamera&&f.push(_)}),f.forEach(_=>{t.remove(_),H(_)}),r.value=[]},cleanup:()=>{l&&cancelAnimationFrame(l),n&&n.dispose(),c&&c.dispose(),s&&s.dispose()}}}function Dt(i,t){const o=e.ref(!1);let n=null,c=12700,s=new a.Vector3,l=new a.Vector3,r=new a.Vector3,d=0,C=null;const A=u=>u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2,J=u=>{const y=new a.Vector3,h=d*1.2,E=new a.Vector3(r.x+h,r.y,r.z),f=new a.Vector3(r.x,r.y+h,r.z),_=new a.Vector3(r.x,r.y-h,r.z);if(u<=.567){const v=u/.567*Math.PI*2;y.x=r.x+Math.cos(v)*h,y.z=r.z+Math.sin(v)*h,y.y=r.y}else if(u<=.724){const b=(u-.567)/.157,v=A(b);y.lerpVectors(E,f,v)}else if(u<=.881){const b=(u-.724)/.157,L=A(b)*Math.PI;y.x=r.x+Math.sin(L)*h,y.y=r.y+Math.cos(L)*h,y.z=r.z}else{const b=(u-.881)/.119,v=A(b);y.lerpVectors(_,s,v)}return y},X=()=>{const{camera:u,controls:y}=i();if(!u||!y)return;n||(n=Date.now());const h=Date.now()-n,E=Math.min(h/c,1);if(E>=1){H();return}const f=J(E);u.position.copy(f),u.lookAt(r),y.target.copy(r),C=requestAnimationFrame(X)},Q=()=>{if(t.value.length===0)return;const{camera:u,controls:y}=i();if(!u||!y)return;s.copy(u.position),l.copy(y.target);const h=new a.Box3;t.value.forEach(U=>{h.expandByObject(U)});const E=h.getSize(new a.Vector3);r=h.getCenter(new a.Vector3),d=Math.max(E.x,E.y,E.z)*1.2;const f=new a.Vector3(r.x+d*1.2,r.y,r.z);y.enabled=!1;const _=u.position.clone(),b=1e3,v=Date.now(),L=()=>{const U=Date.now()-v,z=Math.min(U/b,1),ce=A(z);u.position.lerpVectors(_,f,ce),u.lookAt(r),y.target.copy(r),z<1?requestAnimationFrame(L):(o.value=!0,n=null,X())};L()},H=()=>{o.value=!1,n=null,C&&(cancelAnimationFrame(C),C=null);const{controls:u}=i();u&&(u.enabled=!0,u.target.copy(l))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,n=null,C&&(cancelAnimationFrame(C),C=null);const{camera:u,controls:y}=i();if(!u||!y)return;y.enabled=!0;const h=u.position.clone(),E=y.target.clone(),f=1500,_=Date.now(),b=()=>{const v=Date.now()-_,L=Math.min(v/f,1),U=A(L);u.position.lerpVectors(h,s,U),y.target.lerpVectors(E,l,U),L<1&&requestAnimationFrame(b)};b()}else Q()},startAnimation:Q,stopAnimation:H}}function Rt(i,t){const o=e.ref(!1),n=e.ref("none");let c=[],s=[],l=new a.Box3,r=new a.Vector3;const d=()=>{c=[new a.Plane(new a.Vector3(1,0,0),0),new a.Plane(new a.Vector3(0,1,0),0),new a.Plane(new a.Vector3(0,0,1),0)]},C=()=>{l.makeEmpty(),t.value.forEach(F=>{l.expandByObject(F)}),r=l.getCenter(new a.Vector3)},A=F=>{const u=l.getSize(new a.Vector3);let y,h,E;F==="x"?(y=new a.PlaneGeometry(u.z*1.2,u.y*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,Math.PI/2,0)):F==="y"?(y=new a.PlaneGeometry(u.x*1.2,u.z*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(Math.PI/2,0,0)):F==="z"&&(y=new a.PlaneGeometry(u.x*1.2,u.y*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,0,0));const f=new a.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:a.DoubleSide,depthWrite:!1}),_=new a.Mesh(y,f);return _.position.copy(h),_.rotation.copy(E),_},J=()=>{if(X(),Q(),n.value==="none")return;C();let F=null;if(n.value==="x"?(c[0].constant=-r.x,F=c[0]):n.value==="y"?(c[1].constant=-r.y,F=c[1]):n.value==="z"&&(c[2].constant=-r.z,F=c[2]),F){t.value.forEach(y=>{y.traverse(h=>{h.isMesh&&h.material&&(Array.isArray(h.material)?h.material.forEach(E=>{E.clippingPlanes=[F]}):h.material.clippingPlanes=[F])})});const{scene:u}=i();if(u){const y=A(n.value);u.add(y),s.push(y)}}},X=()=>{t.value.forEach(F=>{F.traverse(u=>{u.isMesh&&u.material&&(Array.isArray(u.material)?u.material.forEach(y=>{y.clippingPlanes=[]}):u.material.clippingPlanes=[])})})},Q=()=>{const{scene:F}=i();F&&s.forEach(u=>{F.remove(u),u.geometry.dispose(),u.material.dispose()}),s=[]};return{isClipping:o,activeClippingAxis:n,toggleClipping:()=>{o.value=!o.value,o.value?(d(),t.value.length>0&&C()):(n.value="none",X(),Q())},updateClippingPlanes:J,clearClippingPlanes:X,clearClippingMeshes:Q}}const At={class:"obj-viewer-container"},Ft={class:"floating-controls"},Lt=["disabled"],Ot=["disabled","title"],jt={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ut={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},zt=["disabled"],It=["title"],$t={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Yt={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ht={key:1,class:"clipping-panel"},Kt={class:"panel-content"},Zt={class:"radio-group"},qt={class:"radio-label"},Xt={class:"radio-label"},Wt={class:"radio-label"},Gt={class:"radio-label"},Jt={key:2,class:"loading-overlay"},Qt={__name:"threeModel",setup(i,{expose:t}){const o=e.ref(null),n=e.ref(!1),c=e.ref(""),s=e.ref(!1),l=e.ref(!1),{currentModels:r,initialCameraPosition:d,initialTargetPosition:C,initThreeJS:A,handleResize:J,fitCameraToAllModels:X,getThreeJSObjects:Q,clearAllModels:H,cleanup:F}=Mt(o),{isAnimating:u,toggleAnimation:y,stopAnimation:h}=Dt(Q,r),{isClipping:E,activeClippingAxis:f,toggleClipping:_,updateClippingPlanes:b}=Rt(Q,r),{addModelsFromUrls:v,loadModelByDefaultPath:L,urdfModel:U}=a.useModelLoader(Q,r,n,c,H),z=()=>{if(l.value||r.value.length===0)return;l.value=!0,u.value&&h();const{camera:q,controls:w}=Q();if(!q||!w)return;w.enabled=!0;const I=k=>k<.5?4*k*k*k:1-Math.pow(-2*k+2,3)/2,Ge=q.position.clone(),Ye=w.target.clone(),Je=1500,m=Date.now(),p=()=>{const k=Date.now()-m,j=Math.min(k/Je,1),B=I(j);q.position.lerpVectors(Ge,d.value,B),w.target.lerpVectors(Ye,C.value,B),j<1?requestAnimationFrame(p):l.value=!1};p()},ce=()=>{document.fullscreenElement?document.exitFullscreen().then(()=>{s.value=!1,e.nextTick(()=>{J()})}).catch(q=>{console.error("无法退出全屏:",q)}):o.value.requestFullscreen().then(()=>{s.value=!0,e.nextTick(()=>{J()})}).catch(q=>{console.error("无法进入全屏:",q)})},se=()=>{s.value=!!document.fullscreenElement,s.value||e.nextTick(()=>{J()})},me=async(q,w)=>{try{u.value&&h(),E.value&&_();const I=await w(q);return X(),I}catch(I){throw console.error("加载模型失败:",I),I}},T=async q=>me(q,v),ve=async q=>me(q,L);return e.onMounted(async()=>{await e.nextTick(),A(),window.addEventListener("resize",J),document.addEventListener("fullscreenchange",se)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",J),document.removeEventListener("fullscreenchange",se),u.value&&h(),F()}),t({addModelsFromUrls:T,loadModelByDefaultPath:ve}),(q,w)=>(e.openBlock(),e.createElementBlock("div",At,[e.unref(U)?(e.openBlock(),e.createBlock(gt,{key:0,class:"client-robot-side",model:e.unref(U)},null,8,["model"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),e.createElementVNode("div",Ft,[e.createElementVNode("button",{onClick:z,class:e.normalizeClass(["control-btn","reset-btn"]),disabled:n.value||e.unref(r).length===0||l.value,title:"重置"},w[10]||(w[10]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),e.createElementVNode("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)]),8,Lt),e.createElementVNode("button",{onClick:w[0]||(w[0]=(...I)=>e.unref(y)&&e.unref(y)(...I)),class:e.normalizeClass(["control-btn","animation-btn",{active:e.unref(u)}]),disabled:n.value||e.unref(r).length===0,title:e.unref(u)?"停止动画":"动画视图"},[e.unref(u)?(e.openBlock(),e.createElementBlock("svg",Ut,w[12]||(w[12]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("rect",{x:"9.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1),e.createElementVNode("rect",{x:"12.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",jt,w[11]||(w[11]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("polygon",{points:"10,8 16,12 10,16",fill:"currentColor"},null,-1)])))],10,Ot),e.createElementVNode("button",{onClick:w[1]||(w[1]=(...I)=>e.unref(_)&&e.unref(_)(...I)),class:e.normalizeClass(["control-btn","clipping-btn",{active:e.unref(E)}]),disabled:n.value||e.unref(r).length===0,title:"剖面视图"},w[13]||(w[13]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"3",y:"3",width:"18",height:"18"}),e.createElementVNode("line",{x1:"-14",y1:"12",x2:"30",y2:"12","stroke-dasharray":"4,2"})],-1)]),10,zt),e.createElementVNode("button",{onClick:ce,class:e.normalizeClass(["control-btn","fullscreen-btn"]),title:s.value?"退出全屏":"全屏"},[s.value?(e.openBlock(),e.createElementBlock("svg",Yt,w[15]||(w[15]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",$t,w[14]||(w[14]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])))],8,It)]),e.unref(E)?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",Kt,[e.createElementVNode("div",Zt,[e.createElementVNode("label",qt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":w[2]||(w[2]=I=>e.isRef(f)?f.value=I:null),onChange:w[3]||(w[3]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[16]||(w[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Xt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":w[4]||(w[4]=I=>e.isRef(f)?f.value=I:null),onChange:w[5]||(w[5]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[17]||(w[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":w[6]||(w[6]=I=>e.isRef(f)?f.value=I:null),onChange:w[7]||(w[7]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[18]||(w[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":w[8]||(w[8]=I=>e.isRef(f)?f.value=I:null),onChange:w[9]||(w[9]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[19]||(w[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",Jt,[w[20]||(w[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(c.value),1)])):e.createCommentVNode("",!0)]))}},eo=Pe._export_sfc(Qt,[["__scopeId","data-v-0595ce23"]]);function to(i,t,o,n,c,s){const l=e.resolveComponent("svg-icon"),r=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(r,{mode:i.mode,menuList:i.renderMenuList,onClickMenu:i.clickMenu,onOpenMenu:i.openMenu,onCloseMenu:i.closeMenu},{title:e.withCtx(({menu:d})=>[e.createVNode(l,{name:d.icon??"Fold",style:{width:"clamp(16px, 1.25rem, 20px)",height:"clamp(16px, 1.25rem, 20px)","margin-right":"8px"}},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(d.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const ct=Pe._export_sfc(R._sfc_main,[["render",to],["__scopeId","data-v-5c2d7ed2"]]),oo={class:"bread-content"},no=["onClick"],ao={key:0,class:"split-title"},io={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(i,{emit:t}){const o=i,n=e.ref([]),c=t;e.onMounted(()=>{n.value=o==null?void 0:o.breadArray}),e.watch(()=>o==null?void 0:o.breadArray,()=>{n.value=o==null?void 0:o.breadArray},{deep:!0,immediate:!0});const s=l=>{c("click",l)};return(l,r)=>(e.openBlock(),e.createElementBlock("div",oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(d,C)=>{var A;return e.openBlock(),e.createElementBlock("div",{key:C,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:J=>s(d),style:e.normalizeStyle({opacity:((A=n.value)==null?void 0:A.length)-1===C?"0.7":"1"})},e.toDisplayString(d.value),13,no),C!==n.value.length-1&&Array.isArray(n.value)?(e.openBlock(),e.createElementBlock("div",ao,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},dt=Pe._export_sfc(io,[["__scopeId","data-v-ded7e2bd"]]),so={class:"structure-buttons"},lo={class:"structure-paths"},ro={class:"client-header-user"},co={class:"model-select"},uo={class:"model-show"},ho={class:"model-fill"},po={class:"client-header-logo"},mo={class:"client-header-menu"},fo={class:"client-header-user"},_o={class:"client-main-operate"},go={key:0,class:"item-view-group"},yo={key:0,class:"calculator"},wo={key:1,class:"calculator"},Co={class:"client-main-operate"},vo=e.defineComponent({__name:"index2",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(xe.pinia),o=e.ref(!1),{selectTitle:n}=N.storeToRefs(t),c=e.ref(!1),s=e.ref(!1),l=e.ref(!1),r=e.ref(!1),d=st.useLoginState(),{loginUserInfo:C}=N.storeToRefs(d),A=a.useModelComp(xe.pinia),{isEdit:J}=N.storeToRefs(A),X=N.useMenuState(xe.pinia),Q=e.ref(!1),{importLoading:H,platName:F}=N.storeToRefs(X),u=e.ref("");return(y,h)=>{const E=e.resolveComponent("el-button"),f=e.resolveComponent("el-avatar"),_=e.resolveComponent("el-header"),b=e.resolveComponent("el-container"),v=e.resolveComponent("el-icon"),L=e.resolveComponent("el-input"),U=e.resolveComponent("el-aside"),z=e.resolveComponent("el-main"),ce=e.resolveComponent("router-view"),se=e.resolveDirective("loading");return e.unref(J)==="edit"?(e.openBlock(),e.createBlock(b,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(_,{class:"client-structure-header"},{default:e.withCtx(()=>{var me;return[e.createElementVNode("div",so,[e.createVNode(E,{id:"transparentBgButton",onClick:e.unref(R.onBack)},{default:e.withCtx(()=>h[3]||(h[3]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[3]},8,["onClick"]),e.createVNode(E,{id:"transparentBgButton",onClick:h[0]||(h[0]=T=>{var ve,q;return e.unref(R.clickSavePage)((q=(ve=e.unref(n))==null?void 0:ve.map(w=>w.value))==null?void 0:q.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[h[4]||(h[4]=e.createTextVNode(" 保存页面 "))]),_:1,__:[4]})]),e.createElementVNode("div",lo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(n),breadArray:e.unref(n),onClick:e.unref(R.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",ro,[e.renderSlot(y.$slots,"default",{},void 0,!0),e.createVNode(f,{size:35,src:(me=e.unref(C))==null?void 0:me.avatarUrl},{default:e.withCtx(()=>{var T;return[e.createTextVNode(e.toDisplayString(((T=e.unref(C))==null?void 0:T.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(J)==="edit"?(e.openBlock(),e.createBlock(b,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",co,[e.createVNode(Ne.modelSelect)]),e.createElementVNode("div",uo,[e.createVNode(Ne.modelShow)]),e.createElementVNode("div",ho,[e.createVNode(Ne.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(b,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(_,{class:"client-header"},{default:e.withCtx(()=>{var me;return[e.createElementVNode("div",po,[e.createVNode(Te.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),h[5]||(h[5]=e.createTextVNode(" ISIP "))]),e.createElementVNode("div",mo,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",fo,[e.createVNode(L,{modelValue:u.value,"onUpdate:modelValue":h[1]||(h[1]=T=>u.value=T),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(v,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(E,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[h[6]||(h[6]=e.createTextVNode(" 生成APP "))]),_:1,__:[6]})):e.createCommentVNode("",!0),i.showButton&&e.unref(J)==="view"?(e.openBlock(),e.createBlock(E,{key:1,id:"transparentBgButton",onClick:e.unref(R.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[h[7]||(h[7]=e.createTextVNode(" 修改布局 "))]),_:1,__:[7]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"default",{},void 0,!0),e.createVNode(f,{size:35,src:(me=e.unref(C))==null?void 0:me.avatarUrl},{default:e.withCtx(()=>{var T;return[e.createTextVNode(e.toDisplayString(((T=e.unref(C))==null?void 0:T.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(b,{class:"client-body"},{default:e.withCtx(()=>[y.$route.path==="/"?(e.openBlock(),e.createBlock(z,{key:0,class:"client-main"},{default:e.withCtx(()=>{var me;return[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",_o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((me=e.unref(Ie.cloneDeep)(e.unref(R.showItems)))==null?void 0:me.filter(T=>T.comp!=="FormTop"),(T,ve)=>{var q;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:ve},[((q=T==null?void 0:T.comp)==null?void 0:q.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",go,e.toDisplayString(T.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R.getComponents)(T.comp)),{compName:T.name,itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:(T==null?void 0:T.id)??ve,onChange:e.unref(R.onChange),index:(T==null?void 0:T.id)??ve,onContentChange:e.unref(R.onContentChange),onPageChange:e.unref(R.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),c.value?(e.openBlock(),e.createElementBlock("div",yo,[s.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:y.clickPreview,loading:l.value,modelValue:"预览"},null,8,["onClickTrigger","loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:h[2]||(h[2]=T=>y.showThreeContent()),loading:o.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:y.clickExecute,loading:Q.value},null,8,["onClickTrigger","loading"])])):e.createCommentVNode("",!0)])]}),_:1})):(e.openBlock(),e.createBlock(z,{key:1,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",Co,[e.createVNode(ce)])]),_:1}))]),_:1})]),_:3})),[[se,e.unref(H)]])}}}),bo=Pe._export_sfc(vo,[["__scopeId","data-v-1f0f879a"]]),M=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],ze=[{key:"型线生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"},{key:"曲面生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"},{key:"叶片生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"},{key:"轨迹规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"},{key:"加工规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"},{key:"产品检测",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/source.pcd,http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/target.pcd"},{key:"参数筛选训练方法",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"}],ko={class:"structure-buttons"},xo={class:"structure-paths"},Eo={class:"client-header-user"},To={class:"model-select"},Vo={class:"model-show"},Bo={class:"model-fill"},No={class:"client-header-logo"},Po={class:"client-header-menu"},So={class:"client-header-user"},Mo={class:"client-main-content"},Do={key:0,class:"item-view-group"},Ro={key:0,class:"calculator"},Ao={key:1,class:"calculator"},Fo={class:"router-aside"},Lo={class:"router-main"},Oo=e.defineComponent({__name:"index",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(xe.pinia),o=e.ref(0),n=e.ref(!1),{selectTitle:c}=N.storeToRefs(t),s=e.ref(!1),l=e.ref(!1),r=e.ref(!1),d=a.useTableComp(xe.pinia),C=e.ref(!1),{tableShowThree:A}=N.storeToRefs(d),J=st.useLoginState(),{loginUserInfo:X}=N.storeToRefs(J),Q=a.useModelComp(xe.pinia),{isEdit:H}=N.storeToRefs(Q),F=N.useMenuState(xe.pinia),u=ut.useFormComp(xe.pinia),{objUrl:y,blobUrls:h}=N.storeToRefs(u),E=e.ref(null),f=e.ref(!0),_=e.ref(!1),{importLoading:b,activeMenuPath:v,platName:L}=N.storeToRefs(F),U=e.ref(!1);e.watch(()=>v.value,async m=>{m&&(U.value=!0),ze!=null&&ze.find(p=>{var k;return(p==null?void 0:p.key)===((k=m==null?void 0:m.split("/"))==null?void 0:k[(m==null?void 0:m.split("/").length)-1])})?C.value=!0:C.value=!1},{immediate:!0});const z=async()=>{var P,g,ee,oe,x;_.value=!0;const m=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");let p=((ee=(g=(P=ze==null?void 0:ze.find(ne=>{var fe,de,be;return(ne==null?void 0:ne.key)===((be=(fe=v.value)==null?void 0:fe.split("/"))==null?void 0:be[((de=v.value)==null?void 0:de.split("/").length)-1])}))==null?void 0:P.value)==null?void 0:g.split(","))==null?void 0:ee[0])??"";const k=await N.axios.post(p,null,{responseType:"blob",headers:{Authorization:m,"Content-Type":"application/json"}}),j=new Blob([k.data],{type:"application/octet-stream;charset=UTF-8"});let B={suffix:"."+((x=p==null?void 0:p.split("."))==null?void 0:x[((oe=p==null?void 0:p.split("."))==null?void 0:oe.length)-1]),blob:j,mtlBlobs:[]};_.value=!1,E.value.loadModelByDefaultPath([B])},ce=async m=>{var j,B,P,g,ee,oe,x;const p=(j=m==null?void 0:m.split("/"))==null?void 0:j[0],k=await N.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:p}});return((B=k==null?void 0:k.data)==null?void 0:B.type)==="success"?((x=(oe=(ee=(g=(P=k==null?void 0:k.data)==null?void 0:P.result)==null?void 0:g[0])==null?void 0:ee.value)==null?void 0:oe.tableData)==null?void 0:x.隐藏三维显示)!==!0:!0};e.watch(()=>R.showItems.value,()=>{var m,p,k,j,B;if(((m=R.showItems.value)==null?void 0:m.length)===2&&((p=R.showItems.value)!=null&&p.find(P=>(P==null?void 0:P.name)==="输入"))&&((k=R.showItems.value)!=null&&k.find(P=>(P==null?void 0:P.name)==="输出"))){const P=(j=R.showItems.value)==null?void 0:j.find(g=>(g==null?void 0:g.name)==="输出");l.value=((B=P==null?void 0:P.comp)==null?void 0:B.toUpperCase())==="FORM",s.value=!0}else s.value=!1,l.value=!1},{deep:!0,immediate:!0}),e.watch(()=>v.value,async()=>{v.value&&(f.value=await ce(v.value))},{deep:!0,immediate:!0}),e.watch(()=>[y.value,E.value],()=>{var m;((m=y.value)==null?void 0:m.length)>0&&E.value&&E.value.addModelsFromUrls(y.value)},{immediate:!0,deep:!0}),e.watch(()=>h==null?void 0:h.value,async()=>{var m,p,k,j;if(h!=null&&h.value&&((m=h==null?void 0:h.value)==null?void 0:m.length)>0&&!C.value&&!((p=R.showItems.value)!=null&&p.find(B=>(B==null?void 0:B.name)==="输入")&&((k=R.showItems.value)!=null&&k.find(B=>(B==null?void 0:B.name)==="输出")))){let B=[];const P=await((j=Ie.cloneDeep(h==null?void 0:h.value))==null?void 0:j.map(async g=>{var fe,de,be,ae,V,ge,we,Ve,Se,Me;let ee,oe;const x=(de=(fe=g==null?void 0:g.blob)==null?void 0:fe.split("undefined,"))==null?void 0:de[1];let ne=x==null?void 0:x.split(",");if((ne==null?void 0:ne.length)>1){let ke=await(ne==null?void 0:ne.map(async W=>{var K,He,Ee,ue,D,ye;ee=await N.axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}});let ie=[];if(((K=g==null?void 0:g.mtlBlobs)==null?void 0:K.length)>0){let Le=await((He=g==null?void 0:g.mtlBlobs)==null?void 0:He.map(async G=>{let De=await N.axios.get(G,{responseType:"blob",headers:{"Content-Type":"application/json"}});return ie.push(new Blob([De.data],{type:"application/octet-stream;charset=UTF-8"})),De}));await Promise.all(Le)}return((ue=W==null?void 0:W.split("."))==null?void 0:ue[((Ee=W==null?void 0:W.split("."))==null?void 0:Ee.length)-1])!=="undefined"&&B.push({suffix:"."+((ye=W==null?void 0:W.split("."))==null?void 0:ye[((D=W==null?void 0:W.split("."))==null?void 0:D.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ie}),ee}));await Promise.all(ke)}else if(!(x!=null&&x.includes("https://"))&&!(x!=null&&x.includes("http://"))){ee=await ot.downloadAvatarApi({url:x});let ke=[];if(((be=g==null?void 0:g.mtlBlobs)==null?void 0:be.length)>0){let W=await((ae=g==null?void 0:g.mtlBlobs)==null?void 0:ae.map(async ie=>{let K=await ot.downloadAvatarApi({url:ie});return ke.push(new Blob([K.data],{type:"application/octet-stream;charset=UTF-8"})),K}));await Promise.all(W)}oe={suffix:"."+((ge=x==null?void 0:x.split("."))==null?void 0:ge[((V=x==null?void 0:x.split("."))==null?void 0:V.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ke}}else{ee=await N.axios.get(x,{responseType:"blob",headers:{"Content-Type":"application/json"}});let ke=[];if(((we=g==null?void 0:g.mtlBlobs)==null?void 0:we.length)>0){let W=await((Ve=g==null?void 0:g.mtlBlobs)==null?void 0:Ve.map(async ie=>{let K=await N.axios.get(ie,{responseType:"blob",headers:{"Content-Type":"application/json"}});return ke.push(new Blob([K.data],{type:"application/octet-stream;charset=UTF-8"})),K}));await Promise.all(W)}oe={suffix:"."+((Me=x==null?void 0:x.split("."))==null?void 0:Me[((Se=x==null?void 0:x.split("."))==null?void 0:Se.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ke}}oe&&B.push(oe)}));await Promise.all(P),E.value.loadModelByDefaultPath(B)}},{immediate:!0,deep:!0}),e.watch(()=>A.value,async()=>{var p,k,j,B;if(A.value!==""&&A.value){let P=(p=v.value)==null?void 0:p.split("/"),g=P[(P==null?void 0:P.length)-2];const oe=(((k=M==null?void 0:M.find(de=>(de==null?void 0:de.key)===g))==null?void 0:k.download)??"")+"/"+A.value,x=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),ne=await N.axios.post(oe,null,{responseType:"blob",headers:{Authorization:x,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var m=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});const fe=[{suffix:"."+((B=(j=A.value)==null?void 0:j.split("."))==null?void 0:B[1]),blob:m,mtlBlobs:[]}];E.value.loadModelByDefaultPath(fe)}},{deep:!0,immediate:!0});const se=async()=>{var ee,oe,x,ne,fe,de,be,ae,V,ge,we,Ve,Se,Me,ke,W,ie;n.value=!0;let m=(ee=v.value)==null?void 0:ee.split("/"),p=m[(m==null?void 0:m.length)-2];const k=((oe=M==null?void 0:M.find(K=>(K==null?void 0:K.key)===p))==null?void 0:oe.value)??"";let j="";const B=await N.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});((x=B==null?void 0:B.data)==null?void 0:x.code)===200&&(j=`Bearer ${(fe=(ne=B.data)==null?void 0:ne.result)==null?void 0:fe.accessToken}`,sessionStorage.setItem("magicToken",j));const P=j===""?"123456":j,g=await N.axios.post(k,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((de=g==null?void 0:g.data)==null?void 0:de.type)==="success"&&a.IsJson((ae=(be=g==null?void 0:g.data)==null?void 0:be.result)==null?void 0:ae.result)){const K=(Se=(Ve=(we=JSON.parse((ge=(V=g==null?void 0:g.data)==null?void 0:V.result)==null?void 0:ge.result))==null?void 0:we.lines_file_paths)==null?void 0:Ve[0])==null?void 0:Se.split("\\"),Ee=(((Me=M==null?void 0:M.find(D=>(D==null?void 0:D.key)===p))==null?void 0:Me.resources)??"")+"/"+(((K==null?void 0:K[(K==null?void 0:K.length)-2])==="inputResources"?"outputResources":K==null?void 0:K[(K==null?void 0:K.length)-2])??"outputResources"),ue=await N.axios.post(Ee,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ke=ue==null?void 0:ue.data)==null?void 0:ke.type)==="success"){const D=(W=ue==null?void 0:ue.data)==null?void 0:W.result,ye=R.showItems.value,Le=await((ie=Ie.cloneDeep(ye))==null?void 0:ie.map(async G=>{var De,Ke,Ze,he,Y,Be;if((G==null?void 0:G.name)==="输出"){if((G==null?void 0:G.comp)==="Table")G.compData=(De=G==null?void 0:G.compData)==null?void 0:De.map(S=>{var Z,_e;return(S==null?void 0:S.key)==="tableContents"&&(S.contents=(_e=(Z=S==null?void 0:S.contents)==null?void 0:Z.map(te=>(te=te==null?void 0:te.map((O,pe)=>{var le,Re,Oe;return typeof O=="string"&&pe>1?((le=S==null?void 0:S.contents)==null?void 0:le.length)>1?O=((Re=D==null?void 0:D[pe-1])!=null&&Re.includes("input")?O:D==null?void 0:D[pe-1])??O:O=D==null?void 0:D[0]:O=((Oe=D==null?void 0:D[pe-1])!=null&&Oe.includes("input")?O:D==null?void 0:D[pe-1])??O,O}),te)))==null?void 0:_e.filter((te,O)=>O<=(D==null?void 0:D.length)-1)),S});else if((G==null?void 0:G.comp)==="Form"){let S="";if(D==null||D.forEach(Z=>{S=S===""?S+Z:S+","+Z}),G.compData=(Ke=G==null?void 0:G.compData)==null?void 0:Ke.map(Z=>{var _e;return(Z==null?void 0:Z.key)==="formContent"&&(Z.contents=(_e=Z.contents)==null?void 0:_e.map(te=>(te.value=S,te))),Z}),(Ze=S==null?void 0:S.split(","))!=null&&Ze.find(Z=>Z.includes(".obj"))){let Z={};Z.suffix=".obj";const _e=[];let te=await((Y=(he=S==null?void 0:S.split(","))==null?void 0:he.filter(O=>O.includes(".obj")||O.includes(".mtl")))==null?void 0:Y.map(async O=>{var le,Re;if(O.includes(".obj")){const qe=(((le=M==null?void 0:M.find(Ae=>(Ae==null?void 0:Ae.key)===p))==null?void 0:le.download)??"")+"/"+O,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await N.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var pe=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});Z.blob=pe}else if(O.includes(".mtl")){const qe=(((Re=M==null?void 0:M.find(Qe=>(Qe==null?void 0:Qe.key)===p))==null?void 0:Re.download)??"")+"/"+O,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await N.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var pe=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});_e.push(pe)}}));await Promise.all(te),Z.mtlBlobs=_e,E.value.loadModelByDefaultPath([Z])}else{const Z=[];let _e=await((Be=S==null?void 0:S.split(","))==null?void 0:Be.map(async te=>{var je,Ue;let O={};O.suffix="."+((je=te==null?void 0:te.split("."))==null?void 0:je[1]);const le=(((Ue=M==null?void 0:M.find(Ae=>(Ae==null?void 0:Ae.key)===p))==null?void 0:Ue.download)??"")+"/"+te,Re=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Oe=await N.axios.post(le,null,{responseType:"blob",headers:{Authorization:Re,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var qe=new Blob([Oe.data],{type:"application/octet-stream;charset=UTF-8"});O.blob=qe,Z.push(O)}));await Promise.all(_e),E.value.loadModelByDefaultPath(Z)}}}return G}));R.showItems.value=await Promise.all(Le)}}o.value++,n.value=!1},me=e.ref(""),T=e.ref("open"),ve=e.ref("open"),q=e.ref(!1),w=()=>{const m=document.getElementById("menuCollapse");T.value==="open"?(m.style.width="18.75rem",m.style.height="96%",m.style.overflow="auto"):(m.style.width="50px",m.style.height="50px",m.style.overflow="hidden")},I=()=>{const m=document.getElementById("operateCollapse");ve.value==="open"?(m.style.width="25rem",m.style.height="96%",m.style.overflow="auto"):(m.style.width="50px",m.style.height="50px",m.style.overflow="hidden")},Ge=()=>{q.value=!q.value;const m=document.getElementById("operateCollapse"),p=document.getElementById("menuCollapse");q.value?(p.style.width="18.75rem",m.style.width="calc(100% - 24rem)"):m.style.width="400px"},Ye=m=>{const p=URL.createObjectURL(m),k=document.createElement("a");k.href=p,k.download="file.txt",document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(p),r.value=!1},Je=async()=>{var ee,oe,x,ne,fe,de,be,ae,V,ge,we,Ve,Se,Me,ke,W;r.value=!0;let m=(ee=v.value)==null?void 0:ee.split("/"),p=m[(m==null?void 0:m.length)-2];const k=((oe=M==null?void 0:M.find(ie=>(ie==null?void 0:ie.key)===p))==null?void 0:oe.value)??"";let j="";const B=await N.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});if(((x=B==null?void 0:B.data)==null?void 0:x.code)===200)j=`Bearer ${(fe=(ne=B.data)==null?void 0:ne.result)==null?void 0:fe.accessToken}`,sessionStorage.setItem("magicToken",j);else throw N.ElMessage.error("响应出错了"),new Error("响应出错了");const P=j===""?"123456":j,g=await N.axios.post(k,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((de=g==null?void 0:g.data)==null?void 0:de.code)===200){if(a.IsJson((ae=(be=g==null?void 0:g.data)==null?void 0:be.result)==null?void 0:ae.result)){const ie=(Se=(Ve=(we=JSON.parse((ge=(V=g==null?void 0:g.data)==null?void 0:V.result)==null?void 0:ge.result))==null?void 0:we.lines_file_paths)==null?void 0:Ve[0])==null?void 0:Se.split("\\"),He=(((Me=M==null?void 0:M.find(ue=>(ue==null?void 0:ue.key)===p))==null?void 0:Me.resources)??"")+"/"+((ie==null?void 0:ie[(ie==null?void 0:ie.length)-2])??"outputResources"),Ee=await N.axios.post(He,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ke=Ee==null?void 0:Ee.data)==null?void 0:ke.code)===200){const ue=(W=Ee==null?void 0:Ee.data)==null?void 0:W.result,D=Ie.cloneDeep(R.showItems.value);D==null||D.map(async ye=>{var Le,G,De,Ke,Ze;if((ye==null?void 0:ye.name)==="输出"&&(ye==null?void 0:ye.comp)==="Form"){let he="";ue==null||ue.forEach(Y=>{he=he===""?he+Y:he+","+Y}),ye.compData=(Le=ye==null?void 0:ye.compData)==null?void 0:Le.map(Y=>{var Be;return(Y==null?void 0:Y.key)==="formContent"&&(Y.contents=(Be=Y.contents)==null?void 0:Be.map(S=>(S.value=he,S))),Y}),(G=he==null?void 0:he.split(","))!=null&&G.find(Y=>Y.includes(".obj"))?(Ke=(De=he==null?void 0:he.split(","))==null?void 0:De.filter(Y=>Y.includes(".obj")||Y.includes(".mtl")))==null||Ke.map(async Y=>{var Be,S;if(Y.includes(".obj")){const _e=(((Be=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:Be.download)??"")+"/"+Y,te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),O=await N.axios.post(_e,null,{responseType:"blob",headers:{Authorization:te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let pe=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"});Ye(pe)}else if(Y.includes(".mtl")){const _e=(((S=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:S.download)??"")+"/"+Y,te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),O=await N.axios.post(_e,null,{responseType:"blob",headers:{Authorization:te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let pe=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"});Ye(pe)}}):(Ze=he==null?void 0:he.split(","))==null||Ze.map(async Y=>{var O,pe;""+((O=Y==null?void 0:Y.split("."))==null?void 0:O[1]);const S=(((pe=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:pe.download)??"")+"/"+Y,Z=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),_e=await N.axios.post(S,null,{responseType:"blob",headers:{Authorization:Z,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let te=new Blob([_e.data],{type:"application/octet-stream;charset=UTF-8"});Ye(te)})}})}else throw N.ElMessage.error("响应出错了"),new Error("响应出错了")}}else throw N.ElMessage.error("响应出错了"),new Error("响应出错了")};return(m,p)=>{const k=e.resolveComponent("el-button"),j=e.resolveComponent("el-avatar"),B=e.resolveComponent("el-header"),P=e.resolveComponent("el-container"),g=e.resolveComponent("el-icon"),ee=e.resolveComponent("el-input"),oe=e.resolveComponent("el-aside"),x=e.resolveComponent("el-collapse-item"),ne=e.resolveComponent("el-collapse"),fe=e.resolveComponent("el-main"),de=e.resolveComponent("router-view"),be=e.resolveDirective("loading");return e.unref(H)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(B,{class:"client-structure-header"},{default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",ko,[e.createVNode(k,{id:"transparentBgButton",onClick:e.unref(R.onBack)},{default:e.withCtx(()=>p[5]||(p[5]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[5]},8,["onClick"]),e.createVNode(k,{id:"transparentBgButton",onClick:p[0]||(p[0]=V=>{var ge,we;return e.unref(R.clickSavePage)((we=(ge=e.unref(c))==null?void 0:ge.map(Ve=>Ve.value))==null?void 0:we.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[p[6]||(p[6]=e.createTextVNode(" 保存页面 "))]),_:1,__:[6]})]),e.createElementVNode("div",xo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(c),breadArray:e.unref(c),onClick:e.unref(R.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",Eo,[e.renderSlot(m.$slots,"default",{},void 0,!0),e.createVNode(j,{size:35,src:(ae=e.unref(X))==null?void 0:ae.avatarUrl},{default:e.withCtx(()=>{var V;return[e.createTextVNode(e.toDisplayString(((V=e.unref(X))==null?void 0:V.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(H)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",To,[e.createVNode(Ne.modelSelect)]),e.createElementVNode("div",Vo,[e.createVNode(Ne.modelShow)]),e.createElementVNode("div",Bo,[e.createVNode(Ne.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(P,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(B,{class:"client-header"},{default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",No,[e.createVNode(Te.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),e.createTextVNode(" "+e.toDisplayString(e.unref(L)===""?"CPMPIP":e.unref(L)),1)]),e.createElementVNode("div",Po,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",So,[e.createVNode(ee,{modelValue:me.value,"onUpdate:modelValue":p[1]||(p[1]=V=>me.value=V),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(g,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(k,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[p[7]||(p[7]=e.createTextVNode(" 生成APP "))]),_:1,__:[7]})):e.createCommentVNode("",!0),i.showButton&&e.unref(H)==="view"?(e.openBlock(),e.createBlock(k,{key:1,id:"transparentBgButton",onClick:e.unref(R.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[p[8]||(p[8]=e.createTextVNode(" 修改布局 "))]),_:1,__:[8]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default",{},void 0,!0),e.createVNode(j,{size:35,src:(ae=e.unref(X))==null?void 0:ae.avatarUrl},{default:e.withCtx(()=>{var V;return[e.createTextVNode(e.toDisplayString(((V=e.unref(X))==null?void 0:V.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(P,{class:"client-body"},{default:e.withCtx(()=>[m.$route.path==="/"?(e.openBlock(),e.createBlock(fe,{key:0,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(ne,{modelValue:T.value,"onUpdate:modelValue":p[2]||(p[2]=ae=>T.value=ae),accordion:"",class:"client-aside",id:"menuCollapse",onChange:w},{default:e.withCtx(()=>[e.createVNode(x,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:T.value===""?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>[e.createVNode(oe,{style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",Mo,[e.createVNode(eo,{isShow:U.value,windowConfig:i.windowConfig,ref_key:"threeModelRef",ref:E},null,8,["isShow","windowConfig"])]),e.createVNode(ne,{modelValue:ve.value,"onUpdate:modelValue":p[4]||(p[4]=ae=>ve.value=ae),accordion:"",class:"client-main-operate",id:"operateCollapse",onChange:I},{default:e.withCtx(()=>[e.createVNode(x,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:ve.value==="open"?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",null,[e.createVNode(Te.SvgIcon,{class:"fold-icon",name:q.value?"Right":"Left",onClick:Ge},null,8,["name"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ae=e.unref(Ie.cloneDeep)(e.unref(R.showItems)))==null?void 0:ae.filter(V=>V.comp!=="FormTop"),(V,ge)=>{var we;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:ge},[((we=V==null?void 0:V.comp)==null?void 0:we.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",Do,e.toDisplayString(V.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R.getComponents)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:(V==null?void 0:V.id)??ge,onChange:e.unref(R.onChange),index:(V==null?void 0:V.id)??ge,onContentChange:e.unref(R.onContentChange),onPageChange:e.unref(R.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),s.value?(e.openBlock(),e.createElementBlock("div",Ro,[l.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:Je,loading:r.value,modelValue:"预览"},null,8,["loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:p[3]||(p[3]=V=>se()),loading:n.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:z,loading:_.value},null,8,["loading"])])):e.createCommentVNode("",!0)])]}),_:1})]),_:1},8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1,class:"client-router"},{default:e.withCtx(()=>[e.createElementVNode("div",Fo,[e.createVNode(oe,{width:"300px"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),e.createElementVNode("div",Lo,[e.createVNode(de)])]),_:1}))]),_:1})]),_:3})),[[be,e.unref(b)]])}}}),jo=Pe._export_sfc(Oo,[["__scopeId","data-v-c30c56d4"]]),Uo={class:"system-wrap"},zo={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},showButton:{type:Boolean,default:!0},content:String,jsonContents:Array},setup(i){const t=a.useModelComp(xe.pinia),o=a.useUnit(xe.pinia),n=N.useMenuState();e.ref(!1);const c=e.ref(!0),s=i,l=e.computed(()=>{switch(s==null?void 0:s.platform){case"browser":return nt.browserThemeConfig;case"client":return nt.clientThemeConfig}}),r=d=>{const C=document.documentElement;d==null||d.forEach(A=>{C.style.setProperty(A.name,A.value)})};return e.watch(()=>s.platform,(d,C)=>{d&&r(l.value)},{immediate:!0}),e.watch(()=>[s==null?void 0:s.content,s==null?void 0:s.jsonContents],async()=>{var A,J,X,Q;if(((A=s==null?void 0:s.jsonContents)==null?void 0:A.length)>0){t.setOriginalData(s==null?void 0:s.jsonContents);return}if(!(s!=null&&s.content)||((J=s==null?void 0:s.content)==null?void 0:J.length)===0)return;c.value=!0,n.setImportLoading(!0);let d=[],C=[];o.setSelectTitle([]),o.setSelectIndex(""),o.setSelectMenu(""),(Q=(X=s==null?void 0:s.content)==null?void 0:X.filter(H=>H!==""))==null||Q.forEach(H=>{Fe.isExpandStringToJson(H)?C.push(Fe.expandStringToJson(H)):Fe.expandNewStringToJson(H)?C.push(Fe.expandNewStringToJson(H)):Fe.expandContentStringToJson(H)?C.push(Fe.expandContentStringToJson(H)):C.push(R.expandToNewContents(H))}),d=C==null?void 0:C[0],await R.savePageDataAsync(d),await a.loadingSystemType(),t.setOriginalData(d),n.setImportLoading(!1)},{deep:!0,immediate:!0}),(d,C)=>(e.openBlock(),e.createElementBlock("div",Uo,[i.platform==="browser"?(e.openBlock(),e.createBlock(bo,{key:0,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},8,["showButton"])):(e.openBlock(),e.createBlock(jo,{key:1,windowConfig:i.windowConfig,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig","showButton"]))]))}},Io=Pe._export_sfc(zo,[["__scopeId","data-v-63e718b2"]]),$o={class:"add-model-content"},Yo={key:0,class:"model-operate"},Ho={class:"model-select"},Ko={class:"model-fill"},Zo={key:1,class:"model-view"},qo={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},pathContent:{type:String,default:""}},emits:["change","contentChange"],setup(i,{emit:t}){const o=i,n=t,c=e.ref([]),s=e.ref(0),l=e.ref([]),r=e.ref([]),d=e.ref(0),C=a.useModelComp(xe.pinia),A=N.useMenuState(xe.pinia),{itemData:J,originalData:X}=N.storeToRefs(C),{activeMenuPath:Q,platform:H}=N.storeToRefs(A),F=e.ref(null),u=e.ref(0),y=e.ref([]);e.ref("");const h=e.ref(0);e.watch(()=>o==null?void 0:o.pathContent,()=>{(o==null?void 0:o.pathContent)!==""&&C.setSystemPath(o==null?void 0:o.pathContent)},{deep:!0,immediate:!0});const E=v=>{n("contentChange",v)},f=v=>{var U;const L=(U=Ie.cloneDeep(v==null?void 0:v.wholeValue))==null?void 0:U.map(z=>{var ce;return(z==null?void 0:z.comp)==="Form"&&(z.compData=(ce=z.compData)==null?void 0:ce.map(se=>((se==null?void 0:se.key)==="formContent"&&(se.contents=Fe.arrayToNumberArray(se==null?void 0:se.contents)),se))),z});n("change",{originalContents:X.value,currentContents:v==null?void 0:v.wholeValue,editContent:v==null?void 0:v.editValue,arrayToContents:L})};e.watch(()=>l.value,()=>{h.value===l.value.length&&l.value.length!==0&&(c.value=l.value)},{deep:!0,immediate:!0});const _=()=>{console.log(232,F.value),F.value!==null&&F.value.click()},b=async v=>{const L=v.target.files;if(!L)return;new FileReader,c.value=[],l.value=[],h.value=L.length;const U=Array.from(L).map(async z=>await new Promise(ce=>{const se=new FileReader;se.onload=me=>{try{l.value.push(me.target.result),u.value++}catch(T){console.error("解析失败:",T);return}},se.onerror=()=>ce(`读取 ${z.name} 失败`),se.readAsText(z),v.target.value="",F.value=null,s.value++}));await Promise.all(U)};return e.watch(()=>[o==null?void 0:o.content,o==null?void 0:o.jsonContents],async()=>{await a.loadingSystemType(),c.value=o.content,r.value=o==null?void 0:o.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>u.value,()=>{var v;((v=y.value)==null?void 0:v.length)!==0&&(C.setOriginalData(y.value),C.setItemData(y.value))},{deep:!0,immediate:!0}),(v,L)=>{const U=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$o,[(o==null?void 0:o.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",Yo,[e.createElementVNode("div",Ho,[e.createVNode(Ne.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:d.value},[e.createVNode(Ne.modelShow)])),e.createElementVNode("div",Ko,[e.createVNode(Ne.modelFill)])])):e.createCommentVNode("",!0),(o==null?void 0:o.mode)==="view"?(e.openBlock(),e.createElementBlock("div",Zo,[(e.openBlock(),e.createBlock(Io,{showButton:i.showButton,platform:e.unref(H),content:c.value,onChange:f,jsonContents:r.value,onContentChange:E,key:d.value},{default:e.withCtx(()=>{var ce;return[((ce=o==null?void 0:o.jsonContents)==null?void 0:ce.length)===0&&(o!=null&&o.showButton)?(e.openBlock(),e.createBlock(z,{key:0,id:"transparentBgButton",onClick:_},{icon:e.withCtx(()=>[e.createVNode(U,{name:"import"})]),default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("input",{type:"file",key:s.value,ref_key:"fileInput",ref:F,accept:".txt, .inm",onChange:b,style:{display:"none"},multiple:""},null,32)),L[0]||(L[0]=e.createTextVNode(" 导入模型 "))]),_:1,__:[0]})):e.createCommentVNode("",!0)]}),_:1},8,["showButton","platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Xo=Pe._export_sfc(qo,[["__scopeId","data-v-23015cb0"]]);exports.default=Xo;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Ne=require("./index-CFOUGn9U.cjs"),We=require("./index-D9bPG3j0.cjs"),R=require("./index.vue_vue_type_style_index_0_scoped_23015cb0_lang-Db_d3OS1.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),N=require("./menu-Da5Ht5hG.cjs"),st=require("./login-CDUTeSY_.cjs"),Te=require("./index-BpPyaNFa.cjs"),a=require("./index-zvArGV4H.cjs"),xe=require("./index-Bwgh1tDh.cjs"),$e=require("./index-B7Wi5BZf.cjs"),lt=require("./index-kxN4kJ1s.cjs"),Ie=require("./cloneDeep-CYcGhlzG.cjs"),ut=require("./index-BDDKdGJX.cjs"),ot=require("./index-OCvy-QIo.cjs"),Fe=require("./array-Cs_qeJ2m.cjs"),nt=require("./index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-i5FsC2rm.cjs"),ht={class:"tree-container"},pt=e.defineComponent({__name:"index",props:{treeData:Array,expand:{type:Boolean,default:!1}},emits:["nodeClick"],setup(i,{emit:t}){const o=t,n=i,c={children:"children",label:"label"},s=l=>{o("nodeClick",l)};return(l,r)=>{const d=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(d,{data:n==null?void 0:n.treeData,props:c,"default-expand-all":i.expand,onNodeClick:s},null,8,["data","default-expand-all"])])}}}),mt=Pe._export_sfc(pt,[["__scopeId","data-v-b4bd4658"]]),ft={class:"client-robot-side"},_t=e.defineComponent({__name:"robotMenu",props:{model:Object},setup(i){const t=i,o=e.ref(0),n=e.ref([]),c=l=>{let r=[];return Array.isArray(l)&&(l==null?void 0:l.length)>0&&(o.value++,l.forEach(d=>{!(d!=null&&d.isMesh)&&((d==null?void 0:d.type)==="URDFJoint"||(d==null?void 0:d.type)==="URDFLink")&&r.push({name:d==null?void 0:d.name,label:d==null?void 0:d.name,show:!0,level:o.value,isPenultimate:!1,type:d==null?void 0:d.type,id:d==null?void 0:d.id,limit:(d==null?void 0:d.limit)??"",children:c(d==null?void 0:d.children),path:d==null?void 0:d.name})})),r},s=l=>{let r=[];return o.value++,r.push({name:l==null?void 0:l.name,label:l==null?void 0:l.name,show:!0,level:o.value,isPenultimate:!1,type:l==null?void 0:l.type,id:l==null?void 0:l.id,limit:(l==null?void 0:l.limit)??"",children:c(l==null?void 0:l.children),path:l==null?void 0:l.name}),r};return e.watch(()=>t==null?void 0:t.model,()=>{t!=null&&t.model&&(n.value=s(t==null?void 0:t.model))},{deep:!0,immediate:!0}),(l,r)=>(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(mt,{treeData:n.value,expand:!0},null,8,["treeData"])]))}}),gt=Pe._export_sfc(_t,[["__scopeId","data-v-0411c59a"]]),at={type:"change"},tt={type:"start"},rt={type:"end"},Xe=new a.Ray,it=new a.Plane,yt=Math.cos(70*a.MathUtils.DEG2RAD),re=new a.Vector3,Ce=2*Math.PI,$={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},et=1e-6;class wt extends a.Controls{constructor(t,o=null){super(t,o),this.state=$.NONE,this.target=new a.Vector3,this.cursor=new a.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN},this.touches={ONE:a.TOUCH.ROTATE,TWO:a.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new a.Vector3,this._lastQuaternion=new a.Quaternion,this._lastTargetPosition=new a.Vector3,this._quat=new a.Quaternion().setFromUnitVectors(t.up,new a.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new a.Spherical,this._sphericalDelta=new a.Spherical,this._scale=1,this._panOffset=new a.Vector3,this._rotateStart=new a.Vector2,this._rotateEnd=new a.Vector2,this._rotateDelta=new a.Vector2,this._panStart=new a.Vector2,this._panEnd=new a.Vector2,this._panDelta=new a.Vector2,this._dollyStart=new a.Vector2,this._dollyEnd=new a.Vector2,this._dollyDelta=new a.Vector2,this._dollyDirection=new a.Vector3,this._mouse=new a.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=vt.bind(this),this._onPointerDown=Ct.bind(this),this._onPointerUp=bt.bind(this),this._onContextMenu=Nt.bind(this),this._onMouseWheel=Et.bind(this),this._onKeyDown=Tt.bind(this),this._onTouchStart=Vt.bind(this),this._onTouchMove=Bt.bind(this),this._onMouseDown=kt.bind(this),this._onMouseMove=xt.bind(this),this._interceptControlDown=Pt.bind(this),this._interceptControlUp=St.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(at),this.update(),this.state=$.NONE}update(t=null){const o=this.object.position;re.copy(o).sub(this.target),re.applyQuaternion(this._quat),this._spherical.setFromVector3(re),this.autoRotate&&this.state===$.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,c=this.maxAzimuthAngle;isFinite(n)&&isFinite(c)&&(n<-Math.PI?n+=Ce:n>Math.PI&&(n-=Ce),c<-Math.PI?c+=Ce:c>Math.PI&&(c-=Ce),n<=c?this._spherical.theta=Math.max(n,Math.min(c,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+c)/2?Math.max(n,this._spherical.theta):Math.min(c,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const l=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=l!=this._spherical.radius}if(re.setFromSpherical(this._spherical),re.applyQuaternion(this._quatInverse),o.copy(this.target).add(re),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let l=null;if(this.object.isPerspectiveCamera){const r=re.length();l=this._clampDistance(r*this._scale);const d=r-l;this.object.position.addScaledVector(this._dollyDirection,d),this.object.updateMatrixWorld(),s=!!d}else if(this.object.isOrthographicCamera){const r=new a.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const d=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=d!==this.object.zoom;const C=new a.Vector3(this._mouse.x,this._mouse.y,0);C.unproject(this.object),this.object.position.sub(C).add(r),this.object.updateMatrixWorld(),l=re.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;l!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(l).add(this.object.position):(Xe.origin.copy(this.object.position),Xe.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(Xe.direction))<yt?this.object.lookAt(this.target):(it.setFromNormalAndCoplanarPoint(this.object.up,this.target),Xe.intersectPlane(it,this.target))))}else if(this.object.isOrthographicCamera){const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),l!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>et||8*(1-this._lastQuaternion.dot(this.object.quaternion))>et||this._lastTargetPosition.distanceToSquared(this.target)>et?(this.dispatchEvent(at),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?Ce/60*this.autoRotateSpeed*t:Ce/60/60*this.autoRotateSpeed}_getZoomScale(t){const o=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*o)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,o){re.setFromMatrixColumn(o,0),re.multiplyScalar(-t),this._panOffset.add(re)}_panUp(t,o){this.screenSpacePanning===!0?re.setFromMatrixColumn(o,1):(re.setFromMatrixColumn(o,0),re.crossVectors(this.object.up,re)),re.multiplyScalar(t),this._panOffset.add(re)}_pan(t,o){const n=this.domElement;if(this.object.isPerspectiveCamera){const c=this.object.position;re.copy(c).sub(this.target);let s=re.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*s/n.clientHeight,this.object.matrix),this._panUp(2*o*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(o*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,o){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),c=t-n.left,s=o-n.top,l=n.width,r=n.height;this._mouse.x=c/l*2-1,this._mouse.y=-(s/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(Ce*this._rotateDelta.x/o.clientHeight),this._rotateUp(Ce*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let o=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),o=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),o=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),o=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-Ce*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),o=!0;break}o&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._rotateStart.set(n,c)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._panStart.set(n,c)}}_handleTouchStartDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,c=t.pageY-o.y,s=Math.sqrt(n*n+c*c);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const n=this._getSecondPointerPosition(t),c=.5*(t.pageX+n.x),s=.5*(t.pageY+n.y);this._rotateEnd.set(c,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(Ce*this._rotateDelta.x/o.clientHeight),this._rotateUp(Ce*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),c=.5*(t.pageY+o.y);this._panEnd.set(n,c)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,c=t.pageY-o.y,s=Math.sqrt(n*n+c*c);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const l=(t.pageX+o.x)*.5,r=(t.pageY+o.y)*.5;this._updateZoomParameters(l,r)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId){this._pointers.splice(o,1);return}}_isTrackingPointer(t){for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId)return!0;return!1}_trackPointer(t){let o=this._pointerPositions[t.pointerId];o===void 0&&(o=new a.Vector2,this._pointerPositions[t.pointerId]=o),o.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const o=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[o]}_customWheelEvent(t){const o=t.deltaMode,n={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(o){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function Ct(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function vt(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function bt(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(rt),this.state=$.NONE;break;case 1:const t=this._pointers[0],o=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:o.x,pageY:o.y});break}}function kt(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case a.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=$.DOLLY;break;case a.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=$.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=$.ROTATE}break;case a.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=$.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=$.PAN}break;default:this.state=$.NONE}this.state!==$.NONE&&this.dispatchEvent(tt)}function xt(i){switch(this.state){case $.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case $.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case $.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function Et(i){this.enabled===!1||this.enableZoom===!1||this.state!==$.NONE||(i.preventDefault(),this.dispatchEvent(tt),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(rt))}function Tt(i){this.enabled!==!1&&this._handleKeyDown(i)}function Vt(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case a.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=$.TOUCH_ROTATE;break;case a.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=$.TOUCH_PAN;break;default:this.state=$.NONE}break;case 2:switch(this.touches.TWO){case a.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=$.TOUCH_DOLLY_PAN;break;case a.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=$.TOUCH_DOLLY_ROTATE;break;default:this.state=$.NONE}break;default:this.state=$.NONE}this.state!==$.NONE&&this.dispatchEvent(tt)}function Bt(i){switch(this._trackPointer(i),this.state){case $.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case $.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case $.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case $.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=$.NONE}}function Nt(i){this.enabled!==!1&&i.preventDefault()}function Pt(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function St(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Mt(i){let t=null,o=null,n=null,c=null,s=null,l=null;const r=e.ref([]),d=e.ref(new a.Vector3),C=e.ref(new a.Vector3),A=()=>{if(!i.value)return;t=new a.Scene,t.background=new a.Color(15790320);const f=i.value;o=new a.PerspectiveCamera(75,f.clientWidth/f.clientHeight,.1,1e4),n=new a.WebGLRenderer({antialias:!0,alpha:!0}),n.setSize(f.clientWidth,f.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=a.PCFSoftShadowMap,n.toneMapping=a.ACESFilmicToneMapping,n.toneMappingExposure=1,n.outputColorSpace=a.SRGBColorSpace,f.appendChild(n.domElement),c=new wt(o,n.domElement),c.enableDamping=!0,c.dampingFactor=.05,s=new a.Xe(o,n,{container:f,type:"cube",placement:"bottom-left",offset:{left:350,bottom:22},background:{color:"#D1D1D1"}}),s.attachControls(c),J(),X()},J=()=>{const f=new a.AmbientLight(4210752,.6);t.add(f);const _=new a.DirectionalLight(16777215,2);_.position.set(10,10,8),_.castShadow=!0,_.shadow.mapSize.width=2048,_.shadow.mapSize.height=2048,_.shadow.camera.near=.5,_.shadow.camera.far=50,t.add(_);const b=new a.DirectionalLight(16777215,.8);b.position.set(-8,-8,6),t.add(b);const v=new a.DirectionalLight(16777215,.6);v.position.set(0,-15,2),t.add(v);const L=new a.HemisphereLight(16777215,4473924,.8);t.add(L);const U=new a.PointLight(16777215,1,50);U.position.set(15,15,15),t.add(U);const z=new a.PointLight(16777215,.5,50);z.position.set(-15,-15,15),t.add(z)},X=()=>{l=requestAnimationFrame(X),c&&c.update(),n&&t&&o&&n.render(t,o),s&&s.render()},Q=f=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(b=>{f[b]&&f[b].dispose&&f[b].dispose()}),f.dispose&&f.dispose()},H=f=>{f.traverse(_=>{_.geometry&&_.geometry.dispose(),_.material&&(Array.isArray(_.material)?_.material.forEach(b=>{Q(b)}):Q(_.material))})};return{currentModels:r,initialCameraPosition:d,initialTargetPosition:C,initThreeJS:A,handleResize:()=>{if(!i.value||!o||!n||!s)return;const f=i.value,_=f.clientWidth,b=f.clientHeight;o.aspect=_/b,o.updateProjectionMatrix(),n.setSize(_,b),s.update()},fitCameraToAllModels:()=>{if(!o||!c||r.value.length===0)return;const f=new a.Box3;r.value.forEach(ce=>{f.expandByObject(ce)});const _=f.getSize(new a.Vector3),b=f.getCenter(new a.Vector3),L=Math.max(_.x,_.y,_.z)*.8,U=new a.Vector3(b.x+L,b.y+L,b.z+L),z=b.clone();o.position.copy(U),o.lookAt(z),c.target.copy(z),c.update(),d.value.copy(U),C.value.copy(z)},getThreeJSObjects:()=>({scene:t,camera:o,renderer:n,controls:c,gizmo:s}),clearAllModels:()=>{if(!t)return;r.value.forEach(_=>{t.remove(_),H(_)});const f=[];t.children.forEach(_=>{!_.isLight&&!_.isCamera&&f.push(_)}),f.forEach(_=>{t.remove(_),H(_)}),r.value=[]},cleanup:()=>{l&&cancelAnimationFrame(l),n&&n.dispose(),c&&c.dispose(),s&&s.dispose()}}}function Dt(i,t){const o=e.ref(!1);let n=null,c=12700,s=new a.Vector3,l=new a.Vector3,r=new a.Vector3,d=0,C=null;const A=u=>u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2,J=u=>{const y=new a.Vector3,h=d*1.2,E=new a.Vector3(r.x+h,r.y,r.z),f=new a.Vector3(r.x,r.y+h,r.z),_=new a.Vector3(r.x,r.y-h,r.z);if(u<=.567){const v=u/.567*Math.PI*2;y.x=r.x+Math.cos(v)*h,y.z=r.z+Math.sin(v)*h,y.y=r.y}else if(u<=.724){const b=(u-.567)/.157,v=A(b);y.lerpVectors(E,f,v)}else if(u<=.881){const b=(u-.724)/.157,L=A(b)*Math.PI;y.x=r.x+Math.sin(L)*h,y.y=r.y+Math.cos(L)*h,y.z=r.z}else{const b=(u-.881)/.119,v=A(b);y.lerpVectors(_,s,v)}return y},X=()=>{const{camera:u,controls:y}=i();if(!u||!y)return;n||(n=Date.now());const h=Date.now()-n,E=Math.min(h/c,1);if(E>=1){H();return}const f=J(E);u.position.copy(f),u.lookAt(r),y.target.copy(r),C=requestAnimationFrame(X)},Q=()=>{if(t.value.length===0)return;const{camera:u,controls:y}=i();if(!u||!y)return;s.copy(u.position),l.copy(y.target);const h=new a.Box3;t.value.forEach(U=>{h.expandByObject(U)});const E=h.getSize(new a.Vector3);r=h.getCenter(new a.Vector3),d=Math.max(E.x,E.y,E.z)*1.2;const f=new a.Vector3(r.x+d*1.2,r.y,r.z);y.enabled=!1;const _=u.position.clone(),b=1e3,v=Date.now(),L=()=>{const U=Date.now()-v,z=Math.min(U/b,1),ce=A(z);u.position.lerpVectors(_,f,ce),u.lookAt(r),y.target.copy(r),z<1?requestAnimationFrame(L):(o.value=!0,n=null,X())};L()},H=()=>{o.value=!1,n=null,C&&(cancelAnimationFrame(C),C=null);const{controls:u}=i();u&&(u.enabled=!0,u.target.copy(l))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,n=null,C&&(cancelAnimationFrame(C),C=null);const{camera:u,controls:y}=i();if(!u||!y)return;y.enabled=!0;const h=u.position.clone(),E=y.target.clone(),f=1500,_=Date.now(),b=()=>{const v=Date.now()-_,L=Math.min(v/f,1),U=A(L);u.position.lerpVectors(h,s,U),y.target.lerpVectors(E,l,U),L<1&&requestAnimationFrame(b)};b()}else Q()},startAnimation:Q,stopAnimation:H}}function Rt(i,t){const o=e.ref(!1),n=e.ref("none");let c=[],s=[],l=new a.Box3,r=new a.Vector3;const d=()=>{c=[new a.Plane(new a.Vector3(1,0,0),0),new a.Plane(new a.Vector3(0,1,0),0),new a.Plane(new a.Vector3(0,0,1),0)]},C=()=>{l.makeEmpty(),t.value.forEach(F=>{l.expandByObject(F)}),r=l.getCenter(new a.Vector3)},A=F=>{const u=l.getSize(new a.Vector3);let y,h,E;F==="x"?(y=new a.PlaneGeometry(u.z*1.2,u.y*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,Math.PI/2,0)):F==="y"?(y=new a.PlaneGeometry(u.x*1.2,u.z*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(Math.PI/2,0,0)):F==="z"&&(y=new a.PlaneGeometry(u.x*1.2,u.y*1.2),h=new a.Vector3(r.x,r.y,r.z),E=new a.Euler(0,0,0));const f=new a.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:a.DoubleSide,depthWrite:!1}),_=new a.Mesh(y,f);return _.position.copy(h),_.rotation.copy(E),_},J=()=>{if(X(),Q(),n.value==="none")return;C();let F=null;if(n.value==="x"?(c[0].constant=-r.x,F=c[0]):n.value==="y"?(c[1].constant=-r.y,F=c[1]):n.value==="z"&&(c[2].constant=-r.z,F=c[2]),F){t.value.forEach(y=>{y.traverse(h=>{h.isMesh&&h.material&&(Array.isArray(h.material)?h.material.forEach(E=>{E.clippingPlanes=[F]}):h.material.clippingPlanes=[F])})});const{scene:u}=i();if(u){const y=A(n.value);u.add(y),s.push(y)}}},X=()=>{t.value.forEach(F=>{F.traverse(u=>{u.isMesh&&u.material&&(Array.isArray(u.material)?u.material.forEach(y=>{y.clippingPlanes=[]}):u.material.clippingPlanes=[])})})},Q=()=>{const{scene:F}=i();F&&s.forEach(u=>{F.remove(u),u.geometry.dispose(),u.material.dispose()}),s=[]};return{isClipping:o,activeClippingAxis:n,toggleClipping:()=>{o.value=!o.value,o.value?(d(),t.value.length>0&&C()):(n.value="none",X(),Q())},updateClippingPlanes:J,clearClippingPlanes:X,clearClippingMeshes:Q}}const At={class:"obj-viewer-container"},Ft={class:"floating-controls"},Lt=["disabled"],Ot=["disabled","title"],jt={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ut={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},zt=["disabled"],It=["title"],$t={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Yt={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ht={key:1,class:"clipping-panel"},Kt={class:"panel-content"},Zt={class:"radio-group"},qt={class:"radio-label"},Xt={class:"radio-label"},Wt={class:"radio-label"},Gt={class:"radio-label"},Jt={key:2,class:"loading-overlay"},Qt={__name:"threeModel",setup(i,{expose:t}){const o=e.ref(null),n=e.ref(!1),c=e.ref(""),s=e.ref(!1),l=e.ref(!1),{currentModels:r,initialCameraPosition:d,initialTargetPosition:C,initThreeJS:A,handleResize:J,fitCameraToAllModels:X,getThreeJSObjects:Q,clearAllModels:H,cleanup:F}=Mt(o),{isAnimating:u,toggleAnimation:y,stopAnimation:h}=Dt(Q,r),{isClipping:E,activeClippingAxis:f,toggleClipping:_,updateClippingPlanes:b}=Rt(Q,r),{addModelsFromUrls:v,loadModelByDefaultPath:L,urdfModel:U}=a.useModelLoader(Q,r,n,c,H),z=()=>{if(l.value||r.value.length===0)return;l.value=!0,u.value&&h();const{camera:q,controls:w}=Q();if(!q||!w)return;w.enabled=!0;const I=k=>k<.5?4*k*k*k:1-Math.pow(-2*k+2,3)/2,Ge=q.position.clone(),Ye=w.target.clone(),Je=1500,m=Date.now(),p=()=>{const k=Date.now()-m,j=Math.min(k/Je,1),B=I(j);q.position.lerpVectors(Ge,d.value,B),w.target.lerpVectors(Ye,C.value,B),j<1?requestAnimationFrame(p):l.value=!1};p()},ce=()=>{document.fullscreenElement?document.exitFullscreen().then(()=>{s.value=!1,e.nextTick(()=>{J()})}).catch(q=>{console.error("无法退出全屏:",q)}):o.value.requestFullscreen().then(()=>{s.value=!0,e.nextTick(()=>{J()})}).catch(q=>{console.error("无法进入全屏:",q)})},se=()=>{s.value=!!document.fullscreenElement,s.value||e.nextTick(()=>{J()})},me=async(q,w)=>{try{u.value&&h(),E.value&&_();const I=await w(q);return X(),I}catch(I){throw console.error("加载模型失败:",I),I}},T=async q=>me(q,v),ve=async q=>me(q,L);return e.onMounted(async()=>{await e.nextTick(),A(),window.addEventListener("resize",J),document.addEventListener("fullscreenchange",se)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",J),document.removeEventListener("fullscreenchange",se),u.value&&h(),F()}),t({addModelsFromUrls:T,loadModelByDefaultPath:ve}),(q,w)=>(e.openBlock(),e.createElementBlock("div",At,[e.unref(U)?(e.openBlock(),e.createBlock(gt,{key:0,class:"client-robot-side",model:e.unref(U)},null,8,["model"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),e.createElementVNode("div",Ft,[e.createElementVNode("button",{onClick:z,class:e.normalizeClass(["control-btn","reset-btn"]),disabled:n.value||e.unref(r).length===0||l.value,title:"重置"},w[10]||(w[10]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),e.createElementVNode("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)]),8,Lt),e.createElementVNode("button",{onClick:w[0]||(w[0]=(...I)=>e.unref(y)&&e.unref(y)(...I)),class:e.normalizeClass(["control-btn","animation-btn",{active:e.unref(u)}]),disabled:n.value||e.unref(r).length===0,title:e.unref(u)?"停止动画":"动画视图"},[e.unref(u)?(e.openBlock(),e.createElementBlock("svg",Ut,w[12]||(w[12]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("rect",{x:"9.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1),e.createElementVNode("rect",{x:"12.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",jt,w[11]||(w[11]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("polygon",{points:"10,8 16,12 10,16",fill:"currentColor"},null,-1)])))],10,Ot),e.createElementVNode("button",{onClick:w[1]||(w[1]=(...I)=>e.unref(_)&&e.unref(_)(...I)),class:e.normalizeClass(["control-btn","clipping-btn",{active:e.unref(E)}]),disabled:n.value||e.unref(r).length===0,title:"剖面视图"},w[13]||(w[13]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"3",y:"3",width:"18",height:"18"}),e.createElementVNode("line",{x1:"-14",y1:"12",x2:"30",y2:"12","stroke-dasharray":"4,2"})],-1)]),10,zt),e.createElementVNode("button",{onClick:ce,class:e.normalizeClass(["control-btn","fullscreen-btn"]),title:s.value?"退出全屏":"全屏"},[s.value?(e.openBlock(),e.createElementBlock("svg",Yt,w[15]||(w[15]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",$t,w[14]||(w[14]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])))],8,It)]),e.unref(E)?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",Kt,[e.createElementVNode("div",Zt,[e.createElementVNode("label",qt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":w[2]||(w[2]=I=>e.isRef(f)?f.value=I:null),onChange:w[3]||(w[3]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[16]||(w[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Xt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":w[4]||(w[4]=I=>e.isRef(f)?f.value=I:null),onChange:w[5]||(w[5]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[17]||(w[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":w[6]||(w[6]=I=>e.isRef(f)?f.value=I:null),onChange:w[7]||(w[7]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[18]||(w[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":w[8]||(w[8]=I=>e.isRef(f)?f.value=I:null),onChange:w[9]||(w[9]=(...I)=>e.unref(b)&&e.unref(b)(...I))},null,544),[[e.vModelRadio,e.unref(f)]]),w[19]||(w[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",Jt,[w[20]||(w[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(c.value),1)])):e.createCommentVNode("",!0)]))}},eo=Pe._export_sfc(Qt,[["__scopeId","data-v-0595ce23"]]);function to(i,t,o,n,c,s){const l=e.resolveComponent("svg-icon"),r=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(r,{mode:i.mode,menuList:i.renderMenuList,onClickMenu:i.clickMenu,onOpenMenu:i.openMenu,onCloseMenu:i.closeMenu},{title:e.withCtx(({menu:d})=>[e.createVNode(l,{name:d.icon??"Fold",style:{width:"clamp(16px, 1.25rem, 20px)",height:"clamp(16px, 1.25rem, 20px)","margin-right":"8px"}},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(d.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const ct=Pe._export_sfc(R._sfc_main,[["render",to],["__scopeId","data-v-5c2d7ed2"]]),oo={class:"bread-content"},no=["onClick"],ao={key:0,class:"split-title"},io={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(i,{emit:t}){const o=i,n=e.ref([]),c=t;e.onMounted(()=>{n.value=o==null?void 0:o.breadArray}),e.watch(()=>o==null?void 0:o.breadArray,()=>{n.value=o==null?void 0:o.breadArray},{deep:!0,immediate:!0});const s=l=>{c("click",l)};return(l,r)=>(e.openBlock(),e.createElementBlock("div",oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(d,C)=>{var A;return e.openBlock(),e.createElementBlock("div",{key:C,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:J=>s(d),style:e.normalizeStyle({opacity:((A=n.value)==null?void 0:A.length)-1===C?"0.7":"1"})},e.toDisplayString(d.value),13,no),C!==n.value.length-1&&Array.isArray(n.value)?(e.openBlock(),e.createElementBlock("div",ao,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},dt=Pe._export_sfc(io,[["__scopeId","data-v-ded7e2bd"]]),so={class:"structure-buttons"},lo={class:"structure-paths"},ro={class:"client-header-user"},co={class:"model-select"},uo={class:"model-show"},ho={class:"model-fill"},po={class:"client-header-logo"},mo={class:"client-header-menu"},fo={class:"client-header-user"},_o={class:"client-main-operate"},go={key:0,class:"item-view-group"},yo={key:0,class:"calculator"},wo={key:1,class:"calculator"},Co={class:"client-main-operate"},vo=e.defineComponent({__name:"index2",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(xe.pinia),o=e.ref(!1),{selectTitle:n}=N.storeToRefs(t),c=e.ref(!1),s=e.ref(!1),l=e.ref(!1),r=e.ref(!1),d=st.useLoginState(),{loginUserInfo:C}=N.storeToRefs(d),A=a.useModelComp(xe.pinia),{isEdit:J}=N.storeToRefs(A),X=N.useMenuState(xe.pinia),Q=e.ref(!1),{importLoading:H,platName:F}=N.storeToRefs(X),u=e.ref("");return(y,h)=>{const E=e.resolveComponent("el-button"),f=e.resolveComponent("el-avatar"),_=e.resolveComponent("el-header"),b=e.resolveComponent("el-container"),v=e.resolveComponent("el-icon"),L=e.resolveComponent("el-input"),U=e.resolveComponent("el-aside"),z=e.resolveComponent("el-main"),ce=e.resolveComponent("router-view"),se=e.resolveDirective("loading");return e.unref(J)==="edit"?(e.openBlock(),e.createBlock(b,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(_,{class:"client-structure-header"},{default:e.withCtx(()=>{var me;return[e.createElementVNode("div",so,[e.createVNode(E,{id:"transparentBgButton",onClick:e.unref(R.onBack)},{default:e.withCtx(()=>h[3]||(h[3]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[3]},8,["onClick"]),e.createVNode(E,{id:"transparentBgButton",onClick:h[0]||(h[0]=T=>{var ve,q;return e.unref(R.clickSavePage)((q=(ve=e.unref(n))==null?void 0:ve.map(w=>w.value))==null?void 0:q.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[h[4]||(h[4]=e.createTextVNode(" 保存页面 "))]),_:1,__:[4]})]),e.createElementVNode("div",lo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(n),breadArray:e.unref(n),onClick:e.unref(R.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",ro,[e.renderSlot(y.$slots,"default",{},void 0,!0),e.createVNode(f,{size:35,src:(me=e.unref(C))==null?void 0:me.avatarUrl},{default:e.withCtx(()=>{var T;return[e.createTextVNode(e.toDisplayString(((T=e.unref(C))==null?void 0:T.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(J)==="edit"?(e.openBlock(),e.createBlock(b,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",co,[e.createVNode(Ne.modelSelect)]),e.createElementVNode("div",uo,[e.createVNode(Ne.modelShow)]),e.createElementVNode("div",ho,[e.createVNode(Ne.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(b,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(_,{class:"client-header"},{default:e.withCtx(()=>{var me;return[e.createElementVNode("div",po,[e.createVNode(Te.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),h[5]||(h[5]=e.createTextVNode(" ISIP "))]),e.createElementVNode("div",mo,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",fo,[e.createVNode(L,{modelValue:u.value,"onUpdate:modelValue":h[1]||(h[1]=T=>u.value=T),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(v,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(E,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[h[6]||(h[6]=e.createTextVNode(" 生成APP "))]),_:1,__:[6]})):e.createCommentVNode("",!0),i.showButton&&e.unref(J)==="view"?(e.openBlock(),e.createBlock(E,{key:1,id:"transparentBgButton",onClick:e.unref(R.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[h[7]||(h[7]=e.createTextVNode(" 修改布局 "))]),_:1,__:[7]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"default",{},void 0,!0),e.createVNode(f,{size:35,src:(me=e.unref(C))==null?void 0:me.avatarUrl},{default:e.withCtx(()=>{var T;return[e.createTextVNode(e.toDisplayString(((T=e.unref(C))==null?void 0:T.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(b,{class:"client-body"},{default:e.withCtx(()=>[y.$route.path==="/"?(e.openBlock(),e.createBlock(z,{key:0,class:"client-main"},{default:e.withCtx(()=>{var me;return[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",_o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((me=e.unref(Ie.cloneDeep)(e.unref(R.showItems)))==null?void 0:me.filter(T=>T.comp!=="FormTop"),(T,ve)=>{var q;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:ve},[((q=T==null?void 0:T.comp)==null?void 0:q.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",go,e.toDisplayString(T.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R.getComponents)(T.comp)),{compName:T.name,itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:(T==null?void 0:T.id)??ve,onChange:e.unref(R.onChange),index:(T==null?void 0:T.id)??ve,onContentChange:e.unref(R.onContentChange),onPageChange:e.unref(R.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),c.value?(e.openBlock(),e.createElementBlock("div",yo,[s.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:y.clickPreview,loading:l.value,modelValue:"预览"},null,8,["onClickTrigger","loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:h[2]||(h[2]=T=>y.showThreeContent()),loading:o.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:y.clickExecute,loading:Q.value},null,8,["onClickTrigger","loading"])])):e.createCommentVNode("",!0)])]}),_:1})):(e.openBlock(),e.createBlock(z,{key:1,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(U,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",Co,[e.createVNode(ce)])]),_:1}))]),_:1})]),_:3})),[[se,e.unref(H)]])}}}),bo=Pe._export_sfc(vo,[["__scopeId","data-v-1f0f879a"]]),M=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],ze=[{key:"型线生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"},{key:"曲面生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"},{key:"叶片生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"},{key:"轨迹规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"},{key:"加工规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"},{key:"产品检测",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/source.pcd,http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/target.pcd"},{key:"参数筛选训练方法",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"}],ko={class:"structure-buttons"},xo={class:"structure-paths"},Eo={class:"client-header-user"},To={class:"model-select"},Vo={class:"model-show"},Bo={class:"model-fill"},No={class:"client-header-logo"},Po={class:"client-header-menu"},So={class:"client-header-user"},Mo={class:"client-main-content"},Do={key:0,class:"item-view-group"},Ro={key:0,class:"calculator"},Ao={key:1,class:"calculator"},Fo={class:"router-aside"},Lo={class:"router-main"},Oo=e.defineComponent({__name:"index",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(xe.pinia),o=e.ref(0),n=e.ref(!1),{selectTitle:c}=N.storeToRefs(t),s=e.ref(!1),l=e.ref(!1),r=e.ref(!1),d=a.useTableComp(xe.pinia),C=e.ref(!1),{tableShowThree:A}=N.storeToRefs(d),J=st.useLoginState(),{loginUserInfo:X}=N.storeToRefs(J),Q=a.useModelComp(xe.pinia),{isEdit:H}=N.storeToRefs(Q),F=N.useMenuState(xe.pinia),u=ut.useFormComp(xe.pinia),{objUrl:y,blobUrls:h}=N.storeToRefs(u),E=e.ref(null),f=e.ref(!0),_=e.ref(!1),{importLoading:b,activeMenuPath:v,platName:L}=N.storeToRefs(F),U=e.ref(!1);e.watch(()=>v.value,async m=>{m&&(U.value=!0),ze!=null&&ze.find(p=>{var k;return(p==null?void 0:p.key)===((k=m==null?void 0:m.split("/"))==null?void 0:k[(m==null?void 0:m.split("/").length)-1])})?C.value=!0:C.value=!1},{immediate:!0});const z=async()=>{var P,g,ee,oe,x;_.value=!0;const m=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");let p=((ee=(g=(P=ze==null?void 0:ze.find(ne=>{var fe,de,be;return(ne==null?void 0:ne.key)===((be=(fe=v.value)==null?void 0:fe.split("/"))==null?void 0:be[((de=v.value)==null?void 0:de.split("/").length)-1])}))==null?void 0:P.value)==null?void 0:g.split(","))==null?void 0:ee[0])??"";const k=await N.axios.post(p,null,{responseType:"blob",headers:{Authorization:m,"Content-Type":"application/json"}}),j=new Blob([k.data],{type:"application/octet-stream;charset=UTF-8"});let B={suffix:"."+((x=p==null?void 0:p.split("."))==null?void 0:x[((oe=p==null?void 0:p.split("."))==null?void 0:oe.length)-1]),blob:j,mtlBlobs:[]};_.value=!1,E.value.loadModelByDefaultPath([B])},ce=async m=>{var j,B,P,g,ee,oe,x;const p=(j=m==null?void 0:m.split("/"))==null?void 0:j[0],k=await N.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:p}});return((B=k==null?void 0:k.data)==null?void 0:B.type)==="success"?((x=(oe=(ee=(g=(P=k==null?void 0:k.data)==null?void 0:P.result)==null?void 0:g[0])==null?void 0:ee.value)==null?void 0:oe.tableData)==null?void 0:x.隐藏三维显示)!==!0:!0};e.watch(()=>R.showItems.value,()=>{var m,p,k,j,B;if(((m=R.showItems.value)==null?void 0:m.length)===2&&((p=R.showItems.value)!=null&&p.find(P=>(P==null?void 0:P.name)==="输入"))&&((k=R.showItems.value)!=null&&k.find(P=>(P==null?void 0:P.name)==="输出"))){const P=(j=R.showItems.value)==null?void 0:j.find(g=>(g==null?void 0:g.name)==="输出");l.value=((B=P==null?void 0:P.comp)==null?void 0:B.toUpperCase())==="FORM",s.value=!0}else s.value=!1,l.value=!1},{deep:!0,immediate:!0}),e.watch(()=>v.value,async()=>{v.value&&(f.value=await ce(v.value))},{deep:!0,immediate:!0}),e.watch(()=>[y.value,E.value],()=>{var m;((m=y.value)==null?void 0:m.length)>0&&E.value&&E.value.addModelsFromUrls(y.value)},{immediate:!0,deep:!0}),e.watch(()=>h==null?void 0:h.value,async()=>{var m,p,k,j;if(h!=null&&h.value&&((m=h==null?void 0:h.value)==null?void 0:m.length)>0&&!C.value&&!((p=R.showItems.value)!=null&&p.find(B=>(B==null?void 0:B.name)==="输入")&&((k=R.showItems.value)!=null&&k.find(B=>(B==null?void 0:B.name)==="输出")))){let B=[];const P=await((j=Ie.cloneDeep(h==null?void 0:h.value))==null?void 0:j.map(async g=>{var fe,de,be,ae,V,ge,we,Ve,Se,Me;let ee,oe;const x=(de=(fe=g==null?void 0:g.blob)==null?void 0:fe.split("undefined,"))==null?void 0:de[1];let ne=x==null?void 0:x.split(",");if((ne==null?void 0:ne.length)>1){let ke=await(ne==null?void 0:ne.map(async W=>{var K,He,Ee,ue,D,ye;ee=await N.axios.get(W,{responseType:"blob",headers:{"Content-Type":"application/json"}});let ie=[];if(((K=g==null?void 0:g.mtlBlobs)==null?void 0:K.length)>0){let Le=await((He=g==null?void 0:g.mtlBlobs)==null?void 0:He.map(async G=>{let De=await N.axios.get(G,{responseType:"blob",headers:{"Content-Type":"application/json"}});return ie.push(new Blob([De.data],{type:"application/octet-stream;charset=UTF-8"})),De}));await Promise.all(Le)}return((ue=W==null?void 0:W.split("."))==null?void 0:ue[((Ee=W==null?void 0:W.split("."))==null?void 0:Ee.length)-1])!=="undefined"&&B.push({suffix:"."+((ye=W==null?void 0:W.split("."))==null?void 0:ye[((D=W==null?void 0:W.split("."))==null?void 0:D.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ie}),ee}));await Promise.all(ke)}else if(!(x!=null&&x.includes("https://"))&&!(x!=null&&x.includes("http://"))){ee=await ot.downloadAvatarApi({url:x});let ke=[];if(((be=g==null?void 0:g.mtlBlobs)==null?void 0:be.length)>0){let W=await((ae=g==null?void 0:g.mtlBlobs)==null?void 0:ae.map(async ie=>{let K=await ot.downloadAvatarApi({url:ie});return ke.push(new Blob([K.data],{type:"application/octet-stream;charset=UTF-8"})),K}));await Promise.all(W)}oe={suffix:"."+((ge=x==null?void 0:x.split("."))==null?void 0:ge[((V=x==null?void 0:x.split("."))==null?void 0:V.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ke}}else{ee=await N.axios.get(x,{responseType:"blob",headers:{"Content-Type":"application/json"}});let ke=[];if(((we=g==null?void 0:g.mtlBlobs)==null?void 0:we.length)>0){let W=await((Ve=g==null?void 0:g.mtlBlobs)==null?void 0:Ve.map(async ie=>{let K=await N.axios.get(ie,{responseType:"blob",headers:{"Content-Type":"application/json"}});return ke.push(new Blob([K.data],{type:"application/octet-stream;charset=UTF-8"})),K}));await Promise.all(W)}oe={suffix:"."+((Me=x==null?void 0:x.split("."))==null?void 0:Me[((Se=x==null?void 0:x.split("."))==null?void 0:Se.length)-1]),blob:new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:ke}}oe&&B.push(oe)}));await Promise.all(P),E.value.loadModelByDefaultPath(B)}},{immediate:!0,deep:!0}),e.watch(()=>A.value,async()=>{var p,k,j,B;if(A.value!==""&&A.value){let P=(p=v.value)==null?void 0:p.split("/"),g=P[(P==null?void 0:P.length)-2];const oe=(((k=M==null?void 0:M.find(de=>(de==null?void 0:de.key)===g))==null?void 0:k.download)??"")+"/"+A.value,x=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),ne=await N.axios.post(oe,null,{responseType:"blob",headers:{Authorization:x,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var m=new Blob([ne.data],{type:"application/octet-stream;charset=UTF-8"});const fe=[{suffix:"."+((B=(j=A.value)==null?void 0:j.split("."))==null?void 0:B[1]),blob:m,mtlBlobs:[]}];E.value.loadModelByDefaultPath(fe)}},{deep:!0,immediate:!0});const se=async()=>{var ee,oe,x,ne,fe,de,be,ae,V,ge,we,Ve,Se,Me,ke,W,ie;n.value=!0;let m=(ee=v.value)==null?void 0:ee.split("/"),p=m[(m==null?void 0:m.length)-2];const k=((oe=M==null?void 0:M.find(K=>(K==null?void 0:K.key)===p))==null?void 0:oe.value)??"";let j="";const B=await N.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});((x=B==null?void 0:B.data)==null?void 0:x.code)===200&&(j=`Bearer ${(fe=(ne=B.data)==null?void 0:ne.result)==null?void 0:fe.accessToken}`,sessionStorage.setItem("magicToken",j));const P=j===""?"123456":j,g=await N.axios.post(k,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((de=g==null?void 0:g.data)==null?void 0:de.type)==="success"&&a.IsJson((ae=(be=g==null?void 0:g.data)==null?void 0:be.result)==null?void 0:ae.result)){const K=(Se=(Ve=(we=JSON.parse((ge=(V=g==null?void 0:g.data)==null?void 0:V.result)==null?void 0:ge.result))==null?void 0:we.lines_file_paths)==null?void 0:Ve[0])==null?void 0:Se.split("\\"),Ee=(((Me=M==null?void 0:M.find(D=>(D==null?void 0:D.key)===p))==null?void 0:Me.resources)??"")+"/"+(((K==null?void 0:K[(K==null?void 0:K.length)-2])==="inputResources"?"outputResources":K==null?void 0:K[(K==null?void 0:K.length)-2])??"outputResources"),ue=await N.axios.post(Ee,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ke=ue==null?void 0:ue.data)==null?void 0:ke.type)==="success"){const D=(W=ue==null?void 0:ue.data)==null?void 0:W.result,ye=R.showItems.value,Le=await((ie=Ie.cloneDeep(ye))==null?void 0:ie.map(async G=>{var De,Ke,Ze,he,Y,Be;if((G==null?void 0:G.name)==="输出"){if((G==null?void 0:G.comp)==="Table")G.compData=(De=G==null?void 0:G.compData)==null?void 0:De.map(S=>{var Z,_e;return(S==null?void 0:S.key)==="tableContents"&&(S.contents=(_e=(Z=S==null?void 0:S.contents)==null?void 0:Z.map(te=>(te=te==null?void 0:te.map((O,pe)=>{var le,Re,Oe;return typeof O=="string"&&pe>1?((le=S==null?void 0:S.contents)==null?void 0:le.length)>1?O=((Re=D==null?void 0:D[pe-1])!=null&&Re.includes("input")?O:D==null?void 0:D[pe-1])??O:O=D==null?void 0:D[0]:O=((Oe=D==null?void 0:D[pe-1])!=null&&Oe.includes("input")?O:D==null?void 0:D[pe-1])??O,O}),te)))==null?void 0:_e.filter((te,O)=>O<=(D==null?void 0:D.length)-1)),S});else if((G==null?void 0:G.comp)==="Form"){let S="";if(D==null||D.forEach(Z=>{S=S===""?S+Z:S+","+Z}),G.compData=(Ke=G==null?void 0:G.compData)==null?void 0:Ke.map(Z=>{var _e;return(Z==null?void 0:Z.key)==="formContent"&&(Z.contents=(_e=Z.contents)==null?void 0:_e.map(te=>(te.value=S,te))),Z}),(Ze=S==null?void 0:S.split(","))!=null&&Ze.find(Z=>Z.includes(".obj"))){let Z={};Z.suffix=".obj";const _e=[];let te=await((Y=(he=S==null?void 0:S.split(","))==null?void 0:he.filter(O=>O.includes(".obj")||O.includes(".mtl")))==null?void 0:Y.map(async O=>{var le,Re;if(O.includes(".obj")){const qe=(((le=M==null?void 0:M.find(Ae=>(Ae==null?void 0:Ae.key)===p))==null?void 0:le.download)??"")+"/"+O,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await N.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var pe=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});Z.blob=pe}else if(O.includes(".mtl")){const qe=(((Re=M==null?void 0:M.find(Qe=>(Qe==null?void 0:Qe.key)===p))==null?void 0:Re.download)??"")+"/"+O,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await N.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var pe=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});_e.push(pe)}}));await Promise.all(te),Z.mtlBlobs=_e,E.value.loadModelByDefaultPath([Z])}else{const Z=[];let _e=await((Be=S==null?void 0:S.split(","))==null?void 0:Be.map(async te=>{var je,Ue;let O={};O.suffix="."+((je=te==null?void 0:te.split("."))==null?void 0:je[1]);const le=(((Ue=M==null?void 0:M.find(Ae=>(Ae==null?void 0:Ae.key)===p))==null?void 0:Ue.download)??"")+"/"+te,Re=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Oe=await N.axios.post(le,null,{responseType:"blob",headers:{Authorization:Re,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var qe=new Blob([Oe.data],{type:"application/octet-stream;charset=UTF-8"});O.blob=qe,Z.push(O)}));await Promise.all(_e),E.value.loadModelByDefaultPath(Z)}}}return G}));R.showItems.value=await Promise.all(Le)}}o.value++,n.value=!1},me=e.ref(""),T=e.ref("open"),ve=e.ref("open"),q=e.ref(!1),w=()=>{const m=document.getElementById("menuCollapse");T.value==="open"?(m.style.width="18.75rem",m.style.height="96%",m.style.overflow="auto"):(m.style.width="50px",m.style.height="50px",m.style.overflow="hidden")},I=()=>{const m=document.getElementById("operateCollapse");ve.value==="open"?(m.style.width="25rem",m.style.height="96%",m.style.overflow="auto"):(m.style.width="50px",m.style.height="50px",m.style.overflow="hidden")},Ge=()=>{q.value=!q.value;const m=document.getElementById("operateCollapse"),p=document.getElementById("menuCollapse");q.value?(p.style.width="18.75rem",m.style.width="calc(100% - 24rem)"):m.style.width="400px"},Ye=m=>{const p=URL.createObjectURL(m),k=document.createElement("a");k.href=p,k.download="file.txt",document.body.appendChild(k),k.click(),document.body.removeChild(k),URL.revokeObjectURL(p),r.value=!1},Je=async()=>{var ee,oe,x,ne,fe,de,be,ae,V,ge,we,Ve,Se,Me,ke,W;r.value=!0;let m=(ee=v.value)==null?void 0:ee.split("/"),p=m[(m==null?void 0:m.length)-2];const k=((oe=M==null?void 0:M.find(ie=>(ie==null?void 0:ie.key)===p))==null?void 0:oe.value)??"";let j="";const B=await N.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});if(((x=B==null?void 0:B.data)==null?void 0:x.code)===200)j=`Bearer ${(fe=(ne=B.data)==null?void 0:ne.result)==null?void 0:fe.accessToken}`,sessionStorage.setItem("magicToken",j);else throw N.ElMessage.error("响应出错了"),new Error("响应出错了");const P=j===""?"123456":j,g=await N.axios.post(k,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((de=g==null?void 0:g.data)==null?void 0:de.code)===200){if(a.IsJson((ae=(be=g==null?void 0:g.data)==null?void 0:be.result)==null?void 0:ae.result)){const ie=(Se=(Ve=(we=JSON.parse((ge=(V=g==null?void 0:g.data)==null?void 0:V.result)==null?void 0:ge.result))==null?void 0:we.lines_file_paths)==null?void 0:Ve[0])==null?void 0:Se.split("\\"),He=(((Me=M==null?void 0:M.find(ue=>(ue==null?void 0:ue.key)===p))==null?void 0:Me.resources)??"")+"/"+((ie==null?void 0:ie[(ie==null?void 0:ie.length)-2])??"outputResources"),Ee=await N.axios.post(He,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ke=Ee==null?void 0:Ee.data)==null?void 0:ke.code)===200){const ue=(W=Ee==null?void 0:Ee.data)==null?void 0:W.result,D=Ie.cloneDeep(R.showItems.value);D==null||D.map(async ye=>{var Le,G,De,Ke,Ze;if((ye==null?void 0:ye.name)==="输出"&&(ye==null?void 0:ye.comp)==="Form"){let he="";ue==null||ue.forEach(Y=>{he=he===""?he+Y:he+","+Y}),ye.compData=(Le=ye==null?void 0:ye.compData)==null?void 0:Le.map(Y=>{var Be;return(Y==null?void 0:Y.key)==="formContent"&&(Y.contents=(Be=Y.contents)==null?void 0:Be.map(S=>(S.value=he,S))),Y}),(G=he==null?void 0:he.split(","))!=null&&G.find(Y=>Y.includes(".obj"))?(Ke=(De=he==null?void 0:he.split(","))==null?void 0:De.filter(Y=>Y.includes(".obj")||Y.includes(".mtl")))==null||Ke.map(async Y=>{var Be,S;if(Y.includes(".obj")){const _e=(((Be=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:Be.download)??"")+"/"+Y,te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),O=await N.axios.post(_e,null,{responseType:"blob",headers:{Authorization:te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let pe=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"});Ye(pe)}else if(Y.includes(".mtl")){const _e=(((S=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:S.download)??"")+"/"+Y,te=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),O=await N.axios.post(_e,null,{responseType:"blob",headers:{Authorization:te,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let pe=new Blob([O.data],{type:"application/octet-stream;charset=UTF-8"});Ye(pe)}}):(Ze=he==null?void 0:he.split(","))==null||Ze.map(async Y=>{var O,pe;""+((O=Y==null?void 0:Y.split("."))==null?void 0:O[1]);const S=(((pe=M==null?void 0:M.find(le=>(le==null?void 0:le.key)===p))==null?void 0:pe.download)??"")+"/"+Y,Z=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),_e=await N.axios.post(S,null,{responseType:"blob",headers:{Authorization:Z,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let te=new Blob([_e.data],{type:"application/octet-stream;charset=UTF-8"});Ye(te)})}})}else throw N.ElMessage.error("响应出错了"),new Error("响应出错了")}}else throw N.ElMessage.error("响应出错了"),new Error("响应出错了")};return(m,p)=>{const k=e.resolveComponent("el-button"),j=e.resolveComponent("el-avatar"),B=e.resolveComponent("el-header"),P=e.resolveComponent("el-container"),g=e.resolveComponent("el-icon"),ee=e.resolveComponent("el-input"),oe=e.resolveComponent("el-aside"),x=e.resolveComponent("el-collapse-item"),ne=e.resolveComponent("el-collapse"),fe=e.resolveComponent("el-main"),de=e.resolveComponent("router-view"),be=e.resolveDirective("loading");return e.unref(H)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(B,{class:"client-structure-header"},{default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",ko,[e.createVNode(k,{id:"transparentBgButton",onClick:e.unref(R.onBack)},{default:e.withCtx(()=>p[5]||(p[5]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[5]},8,["onClick"]),e.createVNode(k,{id:"transparentBgButton",onClick:p[0]||(p[0]=V=>{var ge,we;return e.unref(R.clickSavePage)((we=(ge=e.unref(c))==null?void 0:ge.map(Ve=>Ve.value))==null?void 0:we.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[p[6]||(p[6]=e.createTextVNode(" 保存页面 "))]),_:1,__:[6]})]),e.createElementVNode("div",xo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(c),breadArray:e.unref(c),onClick:e.unref(R.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",Eo,[e.renderSlot(m.$slots,"default",{},void 0,!0),e.createVNode(j,{size:35,src:(ae=e.unref(X))==null?void 0:ae.avatarUrl},{default:e.withCtx(()=>{var V;return[e.createTextVNode(e.toDisplayString(((V=e.unref(X))==null?void 0:V.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(H)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",To,[e.createVNode(Ne.modelSelect)]),e.createElementVNode("div",Vo,[e.createVNode(Ne.modelShow)]),e.createElementVNode("div",Bo,[e.createVNode(Ne.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(P,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(B,{class:"client-header"},{default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",No,[e.createVNode(Te.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),e.createTextVNode(" "+e.toDisplayString(e.unref(L)===""?"CPMPIP":e.unref(L)),1)]),e.createElementVNode("div",Po,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",So,[e.createVNode(ee,{modelValue:me.value,"onUpdate:modelValue":p[1]||(p[1]=V=>me.value=V),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(g,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(k,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[p[7]||(p[7]=e.createTextVNode(" 生成APP "))]),_:1,__:[7]})):e.createCommentVNode("",!0),i.showButton&&e.unref(H)==="view"?(e.openBlock(),e.createBlock(k,{key:1,id:"transparentBgButton",onClick:e.unref(R.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[p[8]||(p[8]=e.createTextVNode(" 修改布局 "))]),_:1,__:[8]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default",{},void 0,!0),e.createVNode(j,{size:35,src:(ae=e.unref(X))==null?void 0:ae.avatarUrl},{default:e.withCtx(()=>{var V;return[e.createTextVNode(e.toDisplayString(((V=e.unref(X))==null?void 0:V.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(P,{class:"client-body"},{default:e.withCtx(()=>[m.$route.path==="/"?(e.openBlock(),e.createBlock(fe,{key:0,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(ne,{modelValue:T.value,"onUpdate:modelValue":p[2]||(p[2]=ae=>T.value=ae),accordion:"",class:"client-aside",id:"menuCollapse",onChange:w},{default:e.withCtx(()=>[e.createVNode(x,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:T.value===""?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>[e.createVNode(oe,{style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",Mo,[e.createVNode(eo,{isShow:U.value,windowConfig:i.windowConfig,ref_key:"threeModelRef",ref:E},null,8,["isShow","windowConfig"])]),e.createVNode(ne,{modelValue:ve.value,"onUpdate:modelValue":p[4]||(p[4]=ae=>ve.value=ae),accordion:"",class:"client-main-operate",id:"operateCollapse",onChange:I},{default:e.withCtx(()=>[e.createVNode(x,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Te.SvgIcon,{name:ve.value==="open"?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>{var ae;return[e.createElementVNode("div",null,[e.createVNode(Te.SvgIcon,{class:"fold-icon",name:q.value?"Right":"Left",onClick:Ge},null,8,["name"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ae=e.unref(Ie.cloneDeep)(e.unref(R.showItems)))==null?void 0:ae.filter(V=>V.comp!=="FormTop"),(V,ge)=>{var we;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:ge},[((we=V==null?void 0:V.comp)==null?void 0:we.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",Do,e.toDisplayString(V.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(R.getComponents)(V.comp)),{compName:V.name,itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:(V==null?void 0:V.id)??ge,onChange:e.unref(R.onChange),index:(V==null?void 0:V.id)??ge,onContentChange:e.unref(R.onContentChange),onPageChange:e.unref(R.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),s.value?(e.openBlock(),e.createElementBlock("div",Ro,[l.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:Je,loading:r.value,modelValue:"预览"},null,8,["loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:p[3]||(p[3]=V=>se()),loading:n.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:z,loading:_.value},null,8,["loading"])])):e.createCommentVNode("",!0)])]}),_:1})]),_:1},8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(fe,{key:1,class:"client-router"},{default:e.withCtx(()=>[e.createElementVNode("div",Fo,[e.createVNode(oe,{width:"300px"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),e.createElementVNode("div",Lo,[e.createVNode(de)])]),_:1}))]),_:1})]),_:3})),[[be,e.unref(b)]])}}}),jo=Pe._export_sfc(Oo,[["__scopeId","data-v-43eddef1"]]),Uo={class:"system-wrap"},zo={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},showButton:{type:Boolean,default:!0},content:String,jsonContents:Array},setup(i){const t=a.useModelComp(xe.pinia),o=a.useUnit(xe.pinia),n=N.useMenuState();e.ref(!1);const c=e.ref(!0),s=i,l=e.computed(()=>{switch(s==null?void 0:s.platform){case"browser":return nt.browserThemeConfig;case"client":return nt.clientThemeConfig}}),r=d=>{const C=document.documentElement;d==null||d.forEach(A=>{C.style.setProperty(A.name,A.value)})};return e.watch(()=>s.platform,(d,C)=>{d&&r(l.value)},{immediate:!0}),e.watch(()=>[s==null?void 0:s.content,s==null?void 0:s.jsonContents],async()=>{var A,J,X,Q;if(((A=s==null?void 0:s.jsonContents)==null?void 0:A.length)>0){t.setOriginalData(s==null?void 0:s.jsonContents);return}if(!(s!=null&&s.content)||((J=s==null?void 0:s.content)==null?void 0:J.length)===0)return;c.value=!0,n.setImportLoading(!0);let d=[],C=[];o.setSelectTitle([]),o.setSelectIndex(""),o.setSelectMenu(""),(Q=(X=s==null?void 0:s.content)==null?void 0:X.filter(H=>H!==""))==null||Q.forEach(H=>{Fe.isExpandStringToJson(H)?C.push(Fe.expandStringToJson(H)):Fe.expandNewStringToJson(H)?C.push(Fe.expandNewStringToJson(H)):Fe.expandContentStringToJson(H)?C.push(Fe.expandContentStringToJson(H)):C.push(R.expandToNewContents(H))}),d=C==null?void 0:C[0],await R.savePageDataAsync(d),await a.loadingSystemType(),t.setOriginalData(d),n.setImportLoading(!1)},{deep:!0,immediate:!0}),(d,C)=>(e.openBlock(),e.createElementBlock("div",Uo,[i.platform==="browser"?(e.openBlock(),e.createBlock(bo,{key:0,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},8,["showButton"])):(e.openBlock(),e.createBlock(jo,{key:1,windowConfig:i.windowConfig,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig","showButton"]))]))}},Io=Pe._export_sfc(zo,[["__scopeId","data-v-63e718b2"]]),$o={class:"add-model-content"},Yo={key:0,class:"model-operate"},Ho={class:"model-select"},Ko={class:"model-fill"},Zo={key:1,class:"model-view"},qo={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},pathContent:{type:String,default:""}},emits:["change","contentChange"],setup(i,{emit:t}){const o=i,n=t,c=e.ref([]),s=e.ref(0),l=e.ref([]),r=e.ref([]),d=e.ref(0),C=a.useModelComp(xe.pinia),A=N.useMenuState(xe.pinia),{itemData:J,originalData:X}=N.storeToRefs(C),{activeMenuPath:Q,platform:H}=N.storeToRefs(A),F=e.ref(null),u=e.ref(0),y=e.ref([]);e.ref("");const h=e.ref(0);e.watch(()=>o==null?void 0:o.pathContent,()=>{(o==null?void 0:o.pathContent)!==""&&C.setSystemPath(o==null?void 0:o.pathContent)},{deep:!0,immediate:!0});const E=v=>{n("contentChange",v)},f=v=>{var U;const L=(U=Ie.cloneDeep(v==null?void 0:v.wholeValue))==null?void 0:U.map(z=>{var ce;return(z==null?void 0:z.comp)==="Form"&&(z.compData=(ce=z.compData)==null?void 0:ce.map(se=>((se==null?void 0:se.key)==="formContent"&&(se.contents=Fe.arrayToNumberArray(se==null?void 0:se.contents)),se))),z});n("change",{originalContents:X.value,currentContents:v==null?void 0:v.wholeValue,editContent:v==null?void 0:v.editValue,arrayToContents:L})};e.watch(()=>l.value,()=>{h.value===l.value.length&&l.value.length!==0&&(c.value=l.value)},{deep:!0,immediate:!0});const _=()=>{console.log(232,F.value),F.value!==null&&F.value.click()},b=async v=>{const L=v.target.files;if(!L)return;new FileReader,c.value=[],l.value=[],h.value=L.length;const U=Array.from(L).map(async z=>await new Promise(ce=>{const se=new FileReader;se.onload=me=>{try{l.value.push(me.target.result),u.value++}catch(T){console.error("解析失败:",T);return}},se.onerror=()=>ce(`读取 ${z.name} 失败`),se.readAsText(z),v.target.value="",F.value=null,s.value++}));await Promise.all(U)};return e.watch(()=>[o==null?void 0:o.content,o==null?void 0:o.jsonContents],async()=>{await a.loadingSystemType(),c.value=o.content,r.value=o==null?void 0:o.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>u.value,()=>{var v;((v=y.value)==null?void 0:v.length)!==0&&(C.setOriginalData(y.value),C.setItemData(y.value))},{deep:!0,immediate:!0}),(v,L)=>{const U=e.resolveComponent("svg-icon"),z=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$o,[(o==null?void 0:o.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",Yo,[e.createElementVNode("div",Ho,[e.createVNode(Ne.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:d.value},[e.createVNode(Ne.modelShow)])),e.createElementVNode("div",Ko,[e.createVNode(Ne.modelFill)])])):e.createCommentVNode("",!0),(o==null?void 0:o.mode)==="view"?(e.openBlock(),e.createElementBlock("div",Zo,[(e.openBlock(),e.createBlock(Io,{showButton:i.showButton,platform:e.unref(H),content:c.value,onChange:f,jsonContents:r.value,onContentChange:E,key:d.value},{default:e.withCtx(()=>{var ce;return[((ce=o==null?void 0:o.jsonContents)==null?void 0:ce.length)===0&&(o!=null&&o.showButton)?(e.openBlock(),e.createBlock(z,{key:0,id:"transparentBgButton",onClick:_},{icon:e.withCtx(()=>[e.createVNode(U,{name:"import"})]),default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("input",{type:"file",key:s.value,ref_key:"fileInput",ref:F,accept:".txt, .inm",onChange:b,style:{display:"none"},multiple:""},null,32)),L[0]||(L[0]=e.createTextVNode(" 导入模型 "))]),_:1,__:[0]})):e.createCommentVNode("",!0)]}),_:1},8,["showButton","platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Xo=Pe._export_sfc(qo,[["__scopeId","data-v-23015cb0"]]);exports.default=Xo;
@@ -1,4 +1,4 @@
1
- import { a as e } from "./menu-eau-OVSc.js";
1
+ import { a as e } from "./menu-D_3gHkG4.js";
2
2
  function r(t) {
3
3
  const o = sessionStorage.getItem("loginToken") ?? "123456";
4
4
  return e({
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("vue"),l=require("./index-Xd0gl2O5.cjs"),Nt=require("./typescript-PERVJsDy.cjs"),_=require("./cloneDeep-BPCav0OY.cjs"),it=require("./index.vue_vue_type_script_setup_true_lang-CEx7p4se.cjs");function It(e){return e}function xt(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var Mt=800,At=16,Vt=Date.now;function Rt(e){var n=0,o=0;return function(){var r=Vt(),a=At-(r-o);if(o=r,a>0){if(++n>=Mt)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Lt(e){return function(){return e}}var zt=_.defineProperty?function(e,n){return _.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:Lt(n),writable:!0})}:It,Ot=Rt(zt),$e=Math.max;function Pt(e,n,o){return n=$e(n===void 0?e.length-1:n,0),function(){for(var r=arguments,a=-1,s=$e(r.length-n,0),i=Array(s);++a<s;)i[a]=r[n+a];a=-1;for(var u=Array(n+1);++a<n;)u[a]=r[a];return u[n]=o(i),xt(e,this,u)}}var Ue=l.Symbol?l.Symbol.isConcatSpreadable:void 0;function Ft(e){return l.isArray(e)||_.isArguments(e)||!!(Ue&&e&&e[Ue])}function _t(e,n,o,r,a){var s=-1,i=e.length;for(o||(o=Ft),a||(a=[]);++s<i;){var u=e[s];o(u)?_.arrayPush(a,u):a[a.length]=u}return a}function Ht(e){var n=e==null?0:e.length;return n?_t(e):[]}function Dt(e){return Ot(Pt(e,void 0,Ht),e+"")}function $t(e,n){return e!=null&&n in Object(e)}function Ut(e,n,o){n=l.castPath(n,e);for(var r=-1,a=n.length,s=!1;++r<a;){var i=l.toKey(n[r]);if(!(s=e!=null&&o(e,i)))break;e=e[i]}return s||++r!=a?s:(a=e==null?0:e.length,!!a&&_.isLength(a)&&_.isIndex(i,a)&&(l.isArray(e)||_.isArguments(e)))}function Kt(e,n){return e!=null&&Ut(e,n,$t)}function Wt(e,n,o,r){if(!l.isObject(e))return e;n=l.castPath(n,e);for(var a=-1,s=n.length,i=s-1,u=e;u!=null&&++a<s;){var p=l.toKey(n[a]),d=o;if(p==="__proto__"||p==="constructor"||p==="prototype")return e;if(a!=i){var g=u[p];d=void 0,d===void 0&&(d=l.isObject(g)?g:_.isIndex(n[a+1])?[]:{})}_.assignValue(u,p,d),u=u[p]}return e}function Yt(e,n,o){for(var r=-1,a=n.length,s={};++r<a;){var i=n[r],u=l.baseGet(e,i);o(u,i)&&Wt(s,l.castPath(i,e),u)}return s}function Gt(e,n){return Yt(e,n,function(o,r){return Kt(e,r)})}var jt=Dt(function(e,n){return e==null?{}:Gt(e,n)});const Ce="update:modelValue",Ke="change",We="input";let re;const qt=e=>{var n;if(!l.isClient)return 0;if(re!==void 0)return re;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",o.appendChild(a);const s=a.offsetWidth;return(n=o.parentNode)==null||n.removeChild(o),re=r-s,re},Xt=()=>l.isClient&&/firefox/i.test(window.navigator.userAgent);let M;const Jt={height:"0",visibility:"hidden",overflow:Xt()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Zt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Qt(e){const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),a=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:Zt.map(i=>[i,n.getPropertyValue(i)]),paddingSize:r,borderSize:a,boxSizing:o}}function Ye(e,n=1,o){var r;M||(M=document.createElement("textarea"),document.body.appendChild(M));const{paddingSize:a,borderSize:s,boxSizing:i,contextStyle:u}=Qt(e);u.forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S)),Object.entries(Jt).forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S,"important")),M.value=e.value||e.placeholder||"";let p=M.scrollHeight;const d={};i==="border-box"?p=p+s:i==="content-box"&&(p=p-a),M.value="";const g=M.scrollHeight-a;if(l.isNumber(n)){let m=g*n;i==="border-box"&&(m=m+a+s),p=Math.max(m,p),d.minHeight=`${m}px`}if(l.isNumber(o)){let m=g*o;i==="border-box"&&(m=m+a+s),p=Math.min(m,p)}return d.height=`${p}px`,(r=M.parentNode)==null||r.removeChild(M),M=void 0,d}const en=l.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),tn=e=>jt(en,e),nn=l.buildProps({id:{type:String,default:void 0},size:l.useSizeProp,disabled:Boolean,modelValue:{type:l.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:l.definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:l.iconPropType},prefixIcon:{type:l.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:l.definePropType([Object,Array,String]),default:()=>Nt.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...tn(["ariaLabel"])}),on={[Ce]:e=>l.isString(e),input:e=>l.isString(e),change:e=>l.isString(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},rn=["class","style"],an=/^on[A-Z]/,sn=(e={})=>{const{excludeListeners:n=!1,excludeKeys:o}=e,r=t.computed(()=>((o==null?void 0:o.value)||[]).concat(rn)),a=t.getCurrentInstance();return a?t.computed(()=>{var s;return l.fromPairs(Object.entries((s=a.proxy)==null?void 0:s.$attrs).filter(([i])=>!r.value.includes(i)&&!(n&&an.test(i))))}):(l.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),t.computed(()=>({})))},we={prefix:Math.floor(Math.random()*1e4),current:0},ln=Symbol("elIdInjection"),un=()=>t.getCurrentInstance()?t.inject(ln,we):we,Se=e=>{const n=un();!l.isClient&&n===we&&l.debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
1
+ "use strict";const t=require("vue"),l=require("./index-kxN4kJ1s.cjs"),Nt=require("./typescript-PERVJsDy.cjs"),_=require("./cloneDeep-CYcGhlzG.cjs"),it=require("./index.vue_vue_type_script_setup_true_lang-CfJGn5rz.cjs");function It(e){return e}function xt(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var Mt=800,At=16,Vt=Date.now;function Rt(e){var n=0,o=0;return function(){var r=Vt(),a=At-(r-o);if(o=r,a>0){if(++n>=Mt)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}function Lt(e){return function(){return e}}var zt=_.defineProperty?function(e,n){return _.defineProperty(e,"toString",{configurable:!0,enumerable:!1,value:Lt(n),writable:!0})}:It,Ot=Rt(zt),$e=Math.max;function Pt(e,n,o){return n=$e(n===void 0?e.length-1:n,0),function(){for(var r=arguments,a=-1,s=$e(r.length-n,0),i=Array(s);++a<s;)i[a]=r[n+a];a=-1;for(var u=Array(n+1);++a<n;)u[a]=r[a];return u[n]=o(i),xt(e,this,u)}}var Ue=l.Symbol?l.Symbol.isConcatSpreadable:void 0;function Ft(e){return l.isArray(e)||_.isArguments(e)||!!(Ue&&e&&e[Ue])}function _t(e,n,o,r,a){var s=-1,i=e.length;for(o||(o=Ft),a||(a=[]);++s<i;){var u=e[s];o(u)?_.arrayPush(a,u):a[a.length]=u}return a}function Ht(e){var n=e==null?0:e.length;return n?_t(e):[]}function Dt(e){return Ot(Pt(e,void 0,Ht),e+"")}function $t(e,n){return e!=null&&n in Object(e)}function Ut(e,n,o){n=l.castPath(n,e);for(var r=-1,a=n.length,s=!1;++r<a;){var i=l.toKey(n[r]);if(!(s=e!=null&&o(e,i)))break;e=e[i]}return s||++r!=a?s:(a=e==null?0:e.length,!!a&&_.isLength(a)&&_.isIndex(i,a)&&(l.isArray(e)||_.isArguments(e)))}function Kt(e,n){return e!=null&&Ut(e,n,$t)}function Wt(e,n,o,r){if(!l.isObject(e))return e;n=l.castPath(n,e);for(var a=-1,s=n.length,i=s-1,u=e;u!=null&&++a<s;){var p=l.toKey(n[a]),d=o;if(p==="__proto__"||p==="constructor"||p==="prototype")return e;if(a!=i){var g=u[p];d=void 0,d===void 0&&(d=l.isObject(g)?g:_.isIndex(n[a+1])?[]:{})}_.assignValue(u,p,d),u=u[p]}return e}function Yt(e,n,o){for(var r=-1,a=n.length,s={};++r<a;){var i=n[r],u=l.baseGet(e,i);o(u,i)&&Wt(s,l.castPath(i,e),u)}return s}function Gt(e,n){return Yt(e,n,function(o,r){return Kt(e,r)})}var jt=Dt(function(e,n){return e==null?{}:Gt(e,n)});const Ce="update:modelValue",Ke="change",We="input";let re;const qt=e=>{var n;if(!l.isClient)return 0;if(re!==void 0)return re;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const r=o.offsetWidth;o.style.overflow="scroll";const a=document.createElement("div");a.style.width="100%",o.appendChild(a);const s=a.offsetWidth;return(n=o.parentNode)==null||n.removeChild(o),re=r-s,re},Xt=()=>l.isClient&&/firefox/i.test(window.navigator.userAgent);let M;const Jt={height:"0",visibility:"hidden",overflow:Xt()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Zt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function Qt(e){const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),a=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:Zt.map(i=>[i,n.getPropertyValue(i)]),paddingSize:r,borderSize:a,boxSizing:o}}function Ye(e,n=1,o){var r;M||(M=document.createElement("textarea"),document.body.appendChild(M));const{paddingSize:a,borderSize:s,boxSizing:i,contextStyle:u}=Qt(e);u.forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S)),Object.entries(Jt).forEach(([m,S])=>M==null?void 0:M.style.setProperty(m,S,"important")),M.value=e.value||e.placeholder||"";let p=M.scrollHeight;const d={};i==="border-box"?p=p+s:i==="content-box"&&(p=p-a),M.value="";const g=M.scrollHeight-a;if(l.isNumber(n)){let m=g*n;i==="border-box"&&(m=m+a+s),p=Math.max(m,p),d.minHeight=`${m}px`}if(l.isNumber(o)){let m=g*o;i==="border-box"&&(m=m+a+s),p=Math.min(m,p)}return d.height=`${p}px`,(r=M.parentNode)==null||r.removeChild(M),M=void 0,d}const en=l.buildProps({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),tn=e=>jt(en,e),nn=l.buildProps({id:{type:String,default:void 0},size:l.useSizeProp,disabled:Boolean,modelValue:{type:l.definePropType([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:l.definePropType([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:l.iconPropType},prefixIcon:{type:l.iconPropType},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:l.definePropType([Object,Array,String]),default:()=>Nt.mutable({})},autofocus:Boolean,rows:{type:Number,default:2},...tn(["ariaLabel"])}),on={[Ce]:e=>l.isString(e),input:e=>l.isString(e),change:e=>l.isString(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},rn=["class","style"],an=/^on[A-Z]/,sn=(e={})=>{const{excludeListeners:n=!1,excludeKeys:o}=e,r=t.computed(()=>((o==null?void 0:o.value)||[]).concat(rn)),a=t.getCurrentInstance();return a?t.computed(()=>{var s;return l.fromPairs(Object.entries((s=a.proxy)==null?void 0:s.$attrs).filter(([i])=>!r.value.includes(i)&&!(n&&an.test(i))))}):(l.debugWarn("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),t.computed(()=>({})))},we={prefix:Math.floor(Math.random()*1e4),current:0},ln=Symbol("elIdInjection"),un=()=>t.getCurrentInstance()?t.inject(ln,we):we,Se=e=>{const n=un();!l.isClient&&n===we&&l.debugWarn("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
2
2
  usage: app.provide(ID_INJECTION_KEY, {
3
3
  prefix: number,
4
4
  current: number,