ss-component-new 1.1.509 → 1.1.511
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.
- package/dist/{array-BTjyzwbz.js → array-6rfRfZoy.js} +1 -1
- package/dist/{array-T-glopHk.cjs → array-BKzrrmWD.cjs} +2 -2
- package/dist/{index-BqlWuQ7F.cjs → index-3GfpOmBm.cjs} +1 -1
- package/dist/index-9keTbNci.js +1490 -0
- package/dist/{index-BPe56KwL.js → index-B72kja43.js} +12 -13
- package/dist/{index-B3sFb3ED.js → index-BBFJJ4tl.js} +5 -5
- package/dist/index-BBQKck4p.cjs +1 -0
- package/dist/index-BBQrfTQg.cjs +1 -0
- package/dist/index-BDmXVjP1.cjs +1 -0
- package/dist/{index-BC6o_HwA.js → index-BPQ17KYZ.js} +1 -1
- package/dist/{index-OUNz_X1-.js → index-BSC7EQfO.js} +15 -15
- package/dist/{index-B6WyqdEq.js → index-BY-71neG.js} +27 -28
- package/dist/{index-pWCRQCtH.cjs → index-BdCeB39f.cjs} +1 -1
- package/dist/{index-0Aj-6Pfy.cjs → index-Bk9CevKt.cjs} +3 -3
- package/dist/{index-WupiV34P.js → index-Bsluws3x.js} +1 -1
- package/dist/{index-D-3H8d48.js → index-Btfqm3Aj.js} +16 -17
- package/dist/index-Bw7fhgWa.js +186 -0
- package/dist/{index-BrZj-udo.js → index-Bz3SW9qv.js} +6 -6
- package/dist/{index--d0-FcKi.js → index-C-RVIq7e.js} +3 -3
- package/dist/{index-BcRfxlOl.cjs → index-C3G2rcyE.cjs} +1 -1
- package/dist/{index-18OPgy7M.js → index-C3Lo66u2.js} +4 -4
- package/dist/index-C8zdykvt.cjs +1 -0
- package/dist/{index-D9fT9K4k.js → index-COMGfNcR.js} +3 -3
- package/dist/index-CRSpuXYg.cjs +1 -0
- package/dist/index-CT9N59g0.cjs +1 -0
- package/dist/{index-cyR-UE9m.cjs → index-CbWlMlxi.cjs} +1 -1
- package/dist/{index-DXv077SA.cjs → index-Cd0szVvZ.cjs} +1 -1
- package/dist/{index-C17_NPz0.cjs → index-Ci1hpo3R.cjs} +1 -1
- package/dist/{index-JqG9oXli.js → index-CmUqS1hN.js} +1 -1
- package/dist/{index-MDG-_61i.js → index-CqmGUncB.js} +3 -3
- package/dist/index-D42emtHS.cjs +1 -0
- package/dist/{index-qlszF_bh.js → index-D5AYFKTM.js} +2 -2
- package/dist/{index-B-3rJW5B.cjs → index-D8QyJVl9.cjs} +1 -1
- package/dist/{index-Dx6aORao.cjs → index-D9ZIJbHw.cjs} +12 -12
- package/dist/{index-DpBfp4fC.js → index-DF8AKNJv.js} +16 -17
- package/dist/index-DGHLPooK.js +457 -0
- package/dist/{index-BeUJWi0x.js → index-DLfWd1qr.js} +5 -5
- package/dist/index-DQxqAo5T.cjs +1 -0
- package/dist/index-DRXd1T3-.cjs +1 -0
- package/dist/{index-TnYimoKI.cjs → index-DgsMW7lK.cjs} +1 -1
- package/dist/{index-B35jXtRb.js → index-DnGhhxPP.js} +5 -5
- package/dist/{index-pxmLD5OC.cjs → index-Dw520ieR.cjs} +1 -1
- package/dist/{index-uN3j6KsS.cjs → index-Dy4AlOOz.cjs} +1 -1
- package/dist/{index-DNQe9fKA.js → index-DzjXzyVN.js} +1 -1
- package/dist/{index-OYYGU2YE.js → index-LCDlyiVS.js} +4 -4
- package/dist/index-NJKX8un9.js +3995 -0
- package/dist/{index-DYRVEBa9.js → index-NkBocgtR.js} +111 -112
- package/dist/{index-55yBsyRr.cjs → index-Oixs__9V.cjs} +1 -1
- package/dist/{index-Dh39r6dj.cjs → index-XKC9uwi7.cjs} +1 -1
- package/dist/{index-DtUmPH3r.cjs → index-YT4yRM1k.cjs} +1 -1
- package/dist/{index-CRkYxnL4.cjs → index-lZj2FVM-.cjs} +1 -1
- package/dist/{index-DwMyURBu.js → index-t25R8oz_.js} +9 -9
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dzi9C_6v.js → index.vue_vue_type_script_setup_true_lang-D0IUrek5.js} +40 -40
- package/dist/{index.vue_vue_type_script_setup_true_lang-CGZnYRAf.cjs → index.vue_vue_type_script_setup_true_lang-DWwRe3NO.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0_XMLvd.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-0GZj6SDy.js} +9343 -9713
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BruAa-uD.cjs} +86 -86
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-9V0_8cmZ.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang--3mE_B9B.js} +15 -15
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B-GFoPJ9.cjs → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B2bfU2M4.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BFaKxxEb.cjs +56 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BSG1ySNA.js → index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-BZQSdupd.js} +9759 -9781
- package/dist/{login-CW3Tv6wk.cjs → login-BHMBhU8d.cjs} +1 -1
- package/dist/{login-Bb_Ovfvl.js → login-CROQ1_RU.js} +4 -4
- package/dist/{main-DeaRuNYD.js → main-1yb7Pay5.js} +7 -8
- package/dist/main-DkeO8sGR.cjs +1 -0
- package/dist/{menu-jWcM5fkr.js → menu-BPLW-L8U.js} +3946 -3581
- package/dist/menu-CQ3_ZXwC.cjs +21 -0
- package/dist/menuIndex-BJdEj1Et.cjs +1 -0
- package/dist/menuIndex-BsKyxgvr.js +60 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-AKBKLvxK.js → threeModel-CFiMikXU.js} +322 -321
- package/dist/{threeModel-CEMnXOw2.cjs → threeModel-Cz-eN53p.cjs} +1 -1
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-BOOCIUn8.js → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-DZ9BnDSy.js} +2 -2
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-C1EygWi0.cjs → threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-MfXPrK37.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index--3QjFI9W.cjs +0 -1
- package/dist/index-BkKYXjJ0.cjs +0 -1
- package/dist/index-Bpt6Hcq2.cjs +0 -1
- package/dist/index-CI__ZdC-.cjs +0 -1
- package/dist/index-CPfseYEB.cjs +0 -1
- package/dist/index-CZN1K7bK.js +0 -408
- package/dist/index-Cdxp_a8K.js +0 -185
- package/dist/index-CxS1YyFs.cjs +0 -1
- package/dist/index-DXIV-OAV.cjs +0 -1
- package/dist/index-DY4cro4C.js +0 -3995
- package/dist/index-DtsLJPQK.js +0 -1493
- package/dist/index-jVYlDMIh.cjs +0 -1
- package/dist/index-qHbYDYso.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-Cek8Ghpc.cjs +0 -56
- package/dist/main-BrbcMu5X.cjs +0 -1
- package/dist/menu-BXTfsfTB.cjs +0 -21
- package/dist/menuIndex-BWim3TlH.js +0 -33
- package/dist/menuIndex-Cg6xI-jR.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-C1EygWi0.cjs"),W=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae={type:"change"},oe={type:"start"},re={type:"end"},q=new i.Ray,le=new i.Plane,pe=Math.cos(70*i.MathUtils.DEG2RAD),z=new i.Vector3,F=2*Math.PI,x={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ee=1e-6;class me extends i.Controls{constructor(t,o=null){super(t,o),this.state=x.NONE,this.target=new i.Vector3,this.cursor=new i.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:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.DOLLY,RIGHT:i.MOUSE.PAN},this.touches={ONE:i.TOUCH.ROTATE,TWO:i.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 i.Vector3,this._lastQuaternion=new i.Quaternion,this._lastTargetPosition=new i.Vector3,this._quat=new i.Quaternion().setFromUnitVectors(t.up,new i.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new i.Spherical,this._sphericalDelta=new i.Spherical,this._scale=1,this._panOffset=new i.Vector3,this._rotateStart=new i.Vector2,this._rotateEnd=new i.Vector2,this._rotateDelta=new i.Vector2,this._panStart=new i.Vector2,this._panEnd=new i.Vector2,this._panDelta=new i.Vector2,this._dollyStart=new i.Vector2,this._dollyEnd=new i.Vector2,this._dollyDelta=new i.Vector2,this._dollyDirection=new i.Vector3,this._mouse=new i.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=_e.bind(this),this._onPointerDown=fe.bind(this),this._onPointerUp=ge.bind(this),this._onContextMenu=Me.bind(this),this._onMouseWheel=be.bind(this),this._onKeyDown=Ee.bind(this),this._onTouchStart=we.bind(this),this._onTouchMove=Pe.bind(this),this._onMouseDown=ye.bind(this),this._onMouseMove=ve.bind(this),this._interceptControlDown=xe.bind(this),this._interceptControlUp=De.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(ae),this.update(),this.state=x.NONE}update(t=null){const o=this.object.position;z.copy(o).sub(this.target),z.applyQuaternion(this._quat),this._spherical.setFromVector3(z),this.autoRotate&&this.state===x.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,l=this.maxAzimuthAngle;isFinite(n)&&isFinite(l)&&(n<-Math.PI?n+=F:n>Math.PI&&(n-=F),l<-Math.PI?l+=F:l>Math.PI&&(l-=F),n<=l?this._spherical.theta=Math.max(n,Math.min(l,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+l)/2?Math.max(n,this._spherical.theta):Math.min(l,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 p=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const g=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),p=g!=this._spherical.radius}if(z.setFromSpherical(this._spherical),z.applyQuaternion(this._quatInverse),o.copy(this.target).add(z),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 g=null;if(this.object.isPerspectiveCamera){const r=z.length();g=this._clampDistance(r*this._scale);const b=r-g;this.object.position.addScaledVector(this._dollyDirection,b),this.object.updateMatrixWorld(),p=!!b}else if(this.object.isOrthographicCamera){const r=new i.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const b=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),p=b!==this.object.zoom;const E=new i.Vector3(this._mouse.x,this._mouse.y,0);E.unproject(this.object),this.object.position.sub(E).add(r),this.object.updateMatrixWorld(),g=z.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;g!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(g).add(this.object.position):(q.origin.copy(this.object.position),q.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(q.direction))<pe?this.object.lookAt(this.target):(le.setFromNormalAndCoplanarPoint(this.object.up,this.target),q.intersectPlane(le,this.target))))}else if(this.object.isOrthographicCamera){const g=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),g!==this.object.zoom&&(this.object.updateProjectionMatrix(),p=!0)}return this._scale=1,this._performCursorZoom=!1,p||this._lastPosition.distanceToSquared(this.object.position)>ee||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ee||this._lastTargetPosition.distanceToSquared(this.target)>ee?(this.dispatchEvent(ae),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?F/60*this.autoRotateSpeed*t:F/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){z.setFromMatrixColumn(o,0),z.multiplyScalar(-t),this._panOffset.add(z)}_panUp(t,o){this.screenSpacePanning===!0?z.setFromMatrixColumn(o,1):(z.setFromMatrixColumn(o,0),z.crossVectors(this.object.up,z)),z.multiplyScalar(t),this._panOffset.add(z)}_pan(t,o){const n=this.domElement;if(this.object.isPerspectiveCamera){const l=this.object.position;z.copy(l).sub(this.target);let p=z.length();p*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*p/n.clientHeight,this.object.matrix),this._panUp(2*o*p/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(),l=t-n.left,p=o-n.top,g=n.width,r=n.height;this._mouse.x=l/g*2-1,this._mouse.y=-(p/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(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*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(F*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(-F*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(F*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(-F*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),l=.5*(t.pageY+o.y);this._rotateStart.set(n,l)}}_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),l=.5*(t.pageY+o.y);this._panStart.set(n,l)}}_handleTouchStartDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,l=t.pageY-o.y,p=Math.sqrt(n*n+l*l);this._dollyStart.set(0,p)}_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),l=.5*(t.pageX+n.x),p=.5*(t.pageY+n.y);this._rotateEnd.set(l,p)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*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),l=.5*(t.pageY+o.y);this._panEnd.set(n,l)}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,l=t.pageY-o.y,p=Math.sqrt(n*n+l*l);this._dollyEnd.set(0,p),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 g=(t.pageX+o.x)*.5,r=(t.pageY+o.y)*.5;this._updateZoomParameters(g,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 i.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 fe(a){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(a.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(a)&&(this._addPointer(a),a.pointerType==="touch"?this._onTouchStart(a):this._onMouseDown(a)))}function _e(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function ge(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(re),this.state=x.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 ye(a){let t;switch(a.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 i.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=x.DOLLY;break;case i.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=x.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=x.ROTATE}break;case i.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=x.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=x.PAN}break;default:this.state=x.NONE}this.state!==x.NONE&&this.dispatchEvent(oe)}function ve(a){switch(this.state){case x.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case x.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case x.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function be(a){this.enabled===!1||this.enableZoom===!1||this.state!==x.NONE||(a.preventDefault(),this.dispatchEvent(oe),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(re))}function Ee(a){this.enabled!==!1&&this._handleKeyDown(a)}function we(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case i.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=x.TOUCH_ROTATE;break;case i.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=x.TOUCH_PAN;break;default:this.state=x.NONE}break;case 2:switch(this.touches.TWO){case i.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=x.TOUCH_DOLLY_PAN;break;case i.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=x.TOUCH_DOLLY_ROTATE;break;default:this.state=x.NONE}break;default:this.state=x.NONE}this.state!==x.NONE&&this.dispatchEvent(oe)}function Pe(a){switch(this._trackPointer(a),this.state){case x.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case x.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case x.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case x.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=x.NONE}}function Me(a){this.enabled!==!1&&a.preventDefault()}function xe(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function De(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Se(a){let t=null,o=null,n=null,l=null,p=null,g=null,r=null,b=null;const E=e.ref([]),D=e.ref(new i.Vector3),O=e.ref(new i.Vector3),A=()=>{if(!a.value)return;t=new i.Scene,t.background=new i.Color(15790320);const m=a.value;o=new i.PerspectiveCamera(75,m.clientWidth/m.clientHeight,.1,1e4),o.position.set(8,-8,6),o.up.set(0,0,1),o.lookAt(0,0,0),n=new i.WebGLRenderer({antialias:!0,alpha:!0}),n.setSize(m.clientWidth,m.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=i.PCFSoftShadowMap,n.toneMapping=i.ACESFilmicToneMapping,n.toneMappingExposure=1,n.outputColorSpace=i.SRGBColorSpace,m.appendChild(n.domElement),l=new me(o,n.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.PAN,RIGHT:null},l.panSpeed=.7,p=new i.Xe(o,n,{container:m,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),p.attachControls(l),y(),s()},u=(m,d)=>{r&&(t.remove(r),r.dispose()),b&&(t.remove(b),b.geometry.dispose(),b.material.dispose());const P=Math.min(Math.max(Math.floor(m/20),30),40);r=new i.GridHelper(m,P,13421772,14540253),r.rotateX(Math.PI/2),r.position.copy(d),t.add(r);const U=new i.PlaneGeometry(m,m),c=new i.ShadowMaterial({opacity:.3,color:0});b=new i.Mesh(U,c),b.position.copy(d),b.position.z-=.01,b.receiveShadow=!0,t.add(b)},S=()=>{if(E.value.length===0)return;const m=new i.Box3;E.value.forEach(h=>{m.expandByObject(h)});const d=m.getSize(new i.Vector3),P=m.getCenter(new i.Vector3),U=Math.max(d.x,d.y,d.z),c=Math.max(U*8,50),w=new i.Vector3(P.x,P.y,m.min.z);u(c,w)},y=()=>{const m=new i.AmbientLight(4210752,.6);t.add(m);const d=new i.DirectionalLight(16777215,2);d.position.set(10,10,8),d.castShadow=!0,d.shadow.mapSize.width=4096,d.shadow.mapSize.height=4096,d.shadow.camera.near=.5,d.shadow.camera.far=50,d.shadow.camera.left=-50,d.shadow.camera.right=50,d.shadow.camera.top=50,d.shadow.camera.bottom=-50,t.add(d);const P=new i.DirectionalLight(16777215,.8);P.position.set(-8,-8,6),t.add(P);const U=new i.DirectionalLight(16777215,.6);U.position.set(0,-15,2),t.add(U);const c=new i.HemisphereLight(16777215,4473924,.8);t.add(c);const w=new i.PointLight(16777215,1,50);w.position.set(15,15,15),t.add(w);const h=new i.PointLight(16777215,.5,50);h.position.set(-15,-15,15),t.add(h)},s=()=>{g=requestAnimationFrame(s),l&&l.update(),n&&t&&o&&n.render(t,o),p&&p.render()},f=m=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(P=>{m[P]&&m[P].dispose&&m[P].dispose()}),m.dispose&&m.dispose()},v=m=>{m==null||m.traverse(d=>{d.geometry&&d.geometry.dispose(),d.material&&(Array.isArray(d.material)?d.material.forEach(P=>{f(P)}):f(d.material))})};return{currentModels:E,initialCameraPosition:D,initialTargetPosition:O,initThreeJS:A,handleResize:()=>{if(!a.value||!o||!n||!p)return;const m=a.value,d=m.clientWidth,P=m.clientHeight;o.aspect=d/P,o.updateProjectionMatrix(),n.setSize(d,P),p.update()},fitCameraToAllModels:()=>{if(!o||!l||E.value.length===0)return;const m=new i.Box3;E.value.forEach(h=>{m.expandByObject(h)});const d=m.getSize(new i.Vector3),P=m.getCenter(new i.Vector3),c=Math.max(d.x,d.y,d.z)*.8,w=new i.Vector3(P.x+c,P.y-c,P.z+c);o.position.copy(w),o.lookAt(P),l.target.copy(P),l.update(),D.value.copy(w),O.value.copy(P),S()},getThreeJSObjects:()=>({scene:t,camera:o,renderer:n,controls:l,gizmo:p}),clearAllModels:()=>{if(!t)return;E.value.forEach(d=>{t.remove(d),v(d)});const m=[];t.children.forEach(d=>{!d.isLight&&!d.isCamera&&d.type!=="GridHelper"&&d!==b&&m.push(d)}),m.forEach(d=>{t.remove(d),v(d)}),E.value=[],S()},cleanup:()=>{g&&cancelAnimationFrame(g),r&&r.dispose(),b&&(b.geometry.dispose(),b.material.dispose()),n&&n.dispose(),l&&l.dispose(),p&&p.dispose()},updateGridForModels:S}}function Ve(a,t){const o=e.ref(!1);let n=null,l=12700,p=new i.Vector3,g=new i.Vector3,r=new i.Vector3,b=0,E=null;const D=s=>s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2,O=s=>{const f=new i.Vector3,v=b*1.2,T=new i.Vector3(r.x+v,r.y,r.z),I=new i.Vector3(r.x,r.y+v,r.z),N=new i.Vector3(r.x,r.y-v,r.z);if(s<=.567){const j=s/.567*Math.PI*2;f.x=r.x+Math.cos(j)*v,f.z=r.z+Math.sin(j)*v,f.y=r.y}else if(s<=.724){const L=(s-.567)/.157,j=D(L);f.lerpVectors(T,I,j)}else if(s<=.881){const L=(s-.724)/.157,m=D(L)*Math.PI;f.x=r.x+Math.sin(m)*v,f.y=r.y+Math.cos(m)*v,f.z=r.z}else{const L=(s-.881)/.119,j=D(L);f.lerpVectors(N,p,j)}return f},A=()=>{const{camera:s,controls:f}=a();if(!s||!f)return;n||(n=Date.now());const v=Date.now()-n,T=Math.min(v/l,1);if(T>=1){S();return}const I=O(T);s.position.copy(I),s.lookAt(r),f.target.copy(r),E=requestAnimationFrame(A)},u=()=>{if(t.value.length===0)return;const{camera:s,controls:f}=a();if(!s||!f)return;p.copy(s.position),g.copy(f.target);const v=new i.Box3;t.value.forEach(d=>{v.expandByObject(d)});const T=v.getSize(new i.Vector3);r=v.getCenter(new i.Vector3),b=Math.max(T.x,T.y,T.z)*1.2;const I=new i.Vector3(r.x+b*1.2,r.y,r.z);f.enabled=!1;const N=s.position.clone(),L=1e3,j=Date.now(),m=()=>{const d=Date.now()-j,P=Math.min(d/L,1),U=D(P);s.position.lerpVectors(N,I,U),s.lookAt(r),f.target.copy(r),P<1?requestAnimationFrame(m):(o.value=!0,n=null,A())};m()},S=()=>{o.value=!1,n=null,E&&(cancelAnimationFrame(E),E=null);const{controls:s}=a();s&&(s.enabled=!0,s.target.copy(g))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,n=null,E&&(cancelAnimationFrame(E),E=null);const{camera:s,controls:f}=a();if(!s||!f)return;f.enabled=!0;const v=s.position.clone(),T=f.target.clone(),I=1500,N=Date.now(),L=()=>{const j=Date.now()-N,m=Math.min(j/I,1),d=D(m);s.position.lerpVectors(v,p,d),f.target.lerpVectors(T,g,d),m<1&&requestAnimationFrame(L)};L()}else u()},startAnimation:u,stopAnimation:S}}function ke(a,t){const o=e.ref(!1),n=e.ref("none");let l=[],p=[],g=new i.Box3,r=new i.Vector3;const b=()=>{l=[new i.Plane(new i.Vector3(1,0,0),0),new i.Plane(new i.Vector3(0,1,0),0),new i.Plane(new i.Vector3(0,0,1),0)]},E=()=>{g.makeEmpty(),t.value.forEach(y=>{g.expandByObject(y)}),r=g.getCenter(new i.Vector3)},D=y=>{const s=g.getSize(new i.Vector3);let f,v,T;y==="x"?(f=new i.PlaneGeometry(s.z*1.2,s.y*1.2),v=new i.Vector3(r.x,r.y,r.z),T=new i.Euler(0,Math.PI/2,0)):y==="y"?(f=new i.PlaneGeometry(s.x*1.2,s.z*1.2),v=new i.Vector3(r.x,r.y,r.z),T=new i.Euler(Math.PI/2,0,0)):y==="z"&&(f=new i.PlaneGeometry(s.x*1.2,s.y*1.2),v=new i.Vector3(r.x,r.y,r.z),T=new i.Euler(0,0,0));const I=new i.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:i.DoubleSide,depthWrite:!1}),N=new i.Mesh(f,I);return N.position.copy(v),N.rotation.copy(T),N},O=()=>{if(A(),u(),n.value==="none")return;E();let y=null;if(n.value==="x"?(l[0].constant=-r.x,y=l[0]):n.value==="y"?(l[1].constant=-r.y,y=l[1]):n.value==="z"&&(l[2].constant=-r.z,y=l[2]),y){t.value.forEach(f=>{f.traverse(v=>{v.isMesh&&v.material&&(Array.isArray(v.material)?v.material.forEach(T=>{T.clippingPlanes=[y]}):v.material.clippingPlanes=[y])})});const{scene:s}=a();if(s){const f=D(n.value);s.add(f),p.push(f)}}},A=()=>{t.value.forEach(y=>{y.traverse(s=>{s.isMesh&&s.material&&(Array.isArray(s.material)?s.material.forEach(f=>{f.clippingPlanes=[]}):s.material.clippingPlanes=[])})})},u=()=>{const{scene:y}=a();y&&p.forEach(s=>{y.remove(s),s.geometry.dispose(),s.material.dispose()}),p=[]};return{isClipping:o,activeClippingAxis:n,toggleClipping:()=>{o.value=!o.value,o.value?(b(),t.value.length>0&&E()):(n.value="none",A(),u())},updateClippingPlanes:O,clearClippingPlanes:A,clearClippingMeshes:u}}const Te={class:"panel-content"},Ce="id",Ae={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:a=>["breadth","firstLevel"].includes(a)}},emits:["nodeClick"],setup(a,{emit:t}){const o=a,n=t,l=e.ref([]),p={children:"children",label:"label"},g=u=>{n("nodeClick",u)},r=(u,S=0)=>{const y=[];return Array.isArray(u)&&(u==null?void 0:u.length)>0&&u.forEach(s=>{if(!(s!=null&&s.isMesh)&&((s==null?void 0:s.type)==="URDFJoint"||(s==null?void 0:s.type)==="URDFLink")){const f={name:s==null?void 0:s.name,label:s==null?void 0:s.name,show:!0,level:S+1,isPenultimate:!1,type:s==null?void 0:s.type,id:s==null?void 0:s.id,limit:(s==null?void 0:s.limit)??"",children:r(s==null?void 0:s.children,S+1),path:s==null?void 0:s.name};y.push(f)}}),y},b=u=>u?[{name:u==null?void 0:u.name,label:u==null?void 0:u.name,show:!0,level:1,isPenultimate:!1,type:u==null?void 0:u.type,id:u==null?void 0:u.id,limit:(u==null?void 0:u.limit)??"",children:r(u==null?void 0:u.children,1),path:u==null?void 0:u.name}]:[],E=(u,S)=>{const y=[],s=[...u];for(;s.length>0&&y.length<S;){const f=s.shift();f.children&&f.children.length>0&&(y.push(f.id),s.push(...f.children))}return y},D=(u,S)=>{const y=[];return u.forEach(s=>{if(s.children&&s.children.length>0){y.push(s.id);const f=s.children.filter(v=>v.children&&v.children.length>0).slice(0,S).map(v=>v.id);y.push(...f)}}),y.slice(0,S+1)},O=e.computed(()=>!l.value||l.value.length===0?[]:o.expandStrategy==="firstLevel"?D(l.value,o.maxExpandCount):E(l.value,o.maxExpandCount)),A=e.computed(()=>o!=null&&o.model?b(o.model):[]);return e.watch(A,u=>{l.value=JSON.parse(JSON.stringify(u))},{immediate:!0}),(u,S)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(y,{data:l.value,props:p,"default-expanded-keys":O.value,"node-key":Ce,onNodeClick:g},null,8,["data","default-expanded-keys"])])}}},Ne=W._export_sfc(Ae,[["__scopeId","data-v-290ff4e1"]]),ze={class:"panel-content"},Oe={key:0,class:"joints-list"},Re={class:"joint-info-row"},Le={class:"joint-left"},je={class:"joint-name"},Ie={class:"joint-range"},Ue={class:"joint-type"},Fe={key:0,class:"joint-control-row"},Be={class:"slider-container"},Ye=["min","max","value","onInput","disabled"],He={class:"value-display"},Ke={class:"joint-value"},Ze={class:"unit"},$e={key:1,class:"empty-state"},Xe=1e3,te=60,Ge={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Array},setup(a,{expose:t}){const o=a;e.ref(!0);const n=e.ref([]),l=e.ref(null),p=e.ref(!1),g=e.ref(!1),r=e.ref(0),b=e.ref(0),E=e.ref(null),D=e.ref(1),O=()=>Xe/te/D.value,A=[];e.watch(()=>o.animationData,c=>{c&&c.length>0&&(A=c)},{deep:!0});const u=(c,w=!1)=>c==="revolute"?w?Math.PI:-Math.PI:c==="prismatic"?w?1:-1:0,S=c=>{if(!c||!c.joints)return console.warn("URDF模型没有关节信息"),[];const w=[];return Object.keys(c.joints).forEach(h=>{const M=c.joints[h];if(M._jointType==="fixed")return;const R=M.limit?{lower:M.limit.lower??u(M._jointType,!1),upper:M.limit.upper??u(M._jointType,!0)}:{lower:u(M._jointType,!1),upper:u(M._jointType,!0)};w.push({name:h,type:M._jointType||"unknown",limit:R,currentValue:M.angle||0,urdfJoint:M})}),w.sort((h,M)=>h.name.localeCompare(M.name))},y=(c,w)=>{const h=n.value.find(R=>R.name===c);if(!h)return;const M=parseFloat(w);if(h.limit){const R=Math.max(h.limit.lower,Math.min(h.limit.upper,M));h.currentValue=R}else h.currentValue=M;o.model&&o.model.setJointValue?o.model.setJointValue(c,h.currentValue):h.urdfJoint&&h.urdfJoint.setJointValue(h.currentValue)},s=c=>{c&&Object.keys(c).forEach(w=>{const h=c[w],M=n.value.find(R=>R.name===w);M&&(M.currentValue=h,o.model&&o.model.setJointValue?o.model.setJointValue(w,h):M.urdfJoint&&M.urdfJoint.setJointValue(h))})},f=(c,w,h)=>c+(w-c)*h,v=(c,w,h)=>{if(!c||!w)return c||w;const M={};return Object.keys(c).forEach(R=>{const Y=c[R],K=w[R];M[R]=f(Y,K||Y,h)}),M},T=()=>{if(A.length===0){console.warn("没有动画数据");return}p.value=!0,g.value=!1;const c=()=>{if(!p.value||g.value)return;const w=b.value/te,h=A[r.value],M=A[r.value+1];if(M){const R=v(h,M,w);s(R)}else s(h);if(b.value++,b.value>=te&&(b.value=0,r.value++,r.value>=A.length-1)){N();return}E.value=setTimeout(c,O())};c()},I=()=>{g.value=!0,E.value&&(clearTimeout(E.value),E.value=null)},N=()=>{p.value=!1,g.value=!1,D.value=1,E.value&&(clearTimeout(E.value),E.value=null)};t({startAnimation:T,pauseAnimation:I,stopAnimation:N,resetAll:()=>{N(),r.value=0,b.value=0,n.value.forEach(c=>{(c.type==="revolute"||c.type==="prismatic")&&y(c.name,0)})},fastForward:()=>{D.value<4&&(D.value=Math.min(4,D.value*2))},fastBackward:()=>{D.value>.25&&(D.value=Math.max(.25,D.value/2))}}),e.watch(()=>o.model,c=>{c?n.value=S(c):n.value=[]},{immediate:!0});const d=()=>{!o.model||p.value&&!g.value||n.value.forEach(c=>{c.urdfJoint&&c.urdfJoint.angle!==void 0&&(c.currentValue=c.urdfJoint.angle)})},P=()=>{const c=()=>{d(),l.value=requestAnimationFrame(c)};c()},U=()=>{l.value&&(cancelAnimationFrame(l.value),l.value=null)};return e.onMounted(()=>{P()}),e.onUnmounted(()=>{U(),N()}),(c,w)=>(e.openBlock(),e.createElementBlock("div",ze,[n.value.length>0?(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,h=>{var M,R,Y,K;return e.openBlock(),e.createElementBlock("div",{key:h.name,class:"joint-item"},[e.createElementVNode("div",Re,[e.createElementVNode("div",Le,[e.createElementVNode("span",je,e.toDisplayString(h.name),1),e.createElementVNode("span",Ie," ["+e.toDisplayString(((M=h.limit)==null?void 0:M.lower.toFixed(2))??(h.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((R=h.limit)==null?void 0:R.upper.toFixed(2))??(h.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Ue,e.toDisplayString(h.type),1)]),h.type==="revolute"||h.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",Fe,[e.createElementVNode("div",Be,[e.createElementVNode("input",{type:"range",min:((Y=h.limit)==null?void 0:Y.lower)??(h.type==="revolute"?-Math.PI:-1),max:((K=h.limit)==null?void 0:K.upper)??(h.type==="revolute"?Math.PI:1),step:.01,value:h.currentValue,onInput:Q=>y(h.name,Q.target.value),class:"joint-slider",disabled:p.value&&!g.value},null,40,Ye)]),e.createElementVNode("div",He,[e.createElementVNode("span",Ke,e.toDisplayString(h.currentValue.toFixed(3)),1),e.createElementVNode("span",Ze,e.toDisplayString(h.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",$e,w[0]||(w[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Je=W._export_sfc(Ge,[["__scopeId","data-v-658b74b5"]]),qe=["xlink:href"],We=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(a){const t=a,o=e.computed(()=>({backgroundColor:t.backgroundColor})),n=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>{const{size:p}=t;let g=`${p}`;return g=`${g.replace("px","")}px`,{width:g,height:g}});return(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:p.active}]),style:e.normalizeStyle(o.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[p.$attrs.class,p.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(l.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":n.value},null,8,qe)],6))],6))}}),k=W._export_sfc(We,[["__scopeId","data-v-3150a90b"]]),Qe={class:"obj-viewer-container"},et={class:"buttonGroup-top"},tt={class:"buttonGroup-topLeft"},ot={class:"buttonGroup-left"},it={class:"buttonGroup-right"},st={class:"buttonGroup-bottom"},nt={class:"left-panel"},at={class:"panel-header"},lt={key:1,class:"clipping-content"},rt={class:"radio-group"},ct={class:"radio-label"},ht={class:"radio-label"},ut={class:"radio-label"},dt={class:"radio-label"},pt={class:"right-panel"},mt={class:"panel-header"},ft={key:0,class:"loading-overlay"},_t={__name:"threeModel",props:{animationData:{type:Array,default:[]}},emits:["getAnimationData"],setup(a,{expose:t,emit:o}){const n=o;let l=null,p=!1;const g=e.ref(null),r=e.ref(!1),b=e.ref("");e.ref(!1);const E=e.ref(!1),D=e.ref(!1),O=e.ref(""),A=e.ref(!1),u=e.ref(""),S=e.ref(),{currentModels:y,initialCameraPosition:s,initialTargetPosition:f,initThreeJS:v,handleResize:T,fitCameraToAllModels:I,getThreeJSObjects:N,clearAllModels:L,cleanup:j}=Se(g),{isAnimating:m,toggleAnimation:d,stopAnimation:P}=Ve(N,y),{isClipping:U,activeClippingAxis:c,toggleClipping:w,updateClippingPlanes:h}=ke(N,y),{addModelsFromUrls:M,loadModelByDefaultPath:R,urdfModel:Y}=i.useModelLoader(N,y,r,b,L),K=()=>{if(E.value||y.value.length===0)return;E.value=!0,m.value&&P();const{camera:C,controls:_}=N();if(!C||!_)return;_.enabled=!0;const B=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,$=C.position.clone(),X=_.target.clone(),G=1500,J=Date.now(),V=()=>{const H=Date.now()-J,se=Math.min(H/G,1),ne=B(se);C.position.lerpVectors($,s.value,ne),_.target.lerpVectors(X,f.value,ne),se<1?requestAnimationFrame(V):E.value=!1};V()},Q=async()=>p?Promise.resolve():new Promise(C=>{const _=()=>{p?C():requestAnimationFrame(_)};_()}),ie=async(C,_)=>{try{await Q(),m.value&&P(),U.value&&w();const B=await _(C);return I(),B}catch(B){throw console.error("加载模型失败:",B),B}},ce=async C=>ie(C,M),he=async C=>ie(C,R),Z=C=>{D.value=!0,O.value=C,C==="剖面视图"&&!U.value&&w()},ue=C=>{A.value=!0,u.value=C},de=()=>{n("getAnimationData"),e.nextTick(()=>{var C;(C=S.value)==null||C.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{v(),l=N().scene,p=!0,window.addEventListener("resize",T)}catch(C){console.error("Three.js初始化失败:",C)}}),e.onBeforeUnmount(()=>{p=!1,O.value="",u.value="",window.removeEventListener("resize",T),m.value&&P(),j()}),t({addModelsFromUrls:ce,loadModelByDefaultPath:he}),(C,_)=>{var $,X,G,J;const B=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Qe,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:g,class:"threejs-container"},null,512),e.createElementVNode("div",et,[e.createVNode(k,{name:"guanjianjiexi",size:"34"}),e.createVNode(k,{name:"guanjiekongzhi",size:"34"}),e.createVNode(k,{name:"gongyishengcheng",size:"34"}),e.createVNode(k,{name:"buchangshezhi",size:"34"}),e.createVNode(k,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",tt,[e.createVNode(k,{name:"viewReset",size:"24",onClick:K,title:"重置"}),e.createVNode(k,{name:"fangda",size:"24",title:"放大"}),e.createVNode(k,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(k,{name:"lookAround",size:"24",onClick:e.unref(d),title:e.unref(m)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",ot,[e.createVNode(k,{name:"jiegoushu",size:"24",onClick:_[0]||(_[0]=V=>Z("场景树")),active:D.value&&O.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(k,{name:"clipping",size:"24",onClick:_[1]||(_[1]=V=>Z("剖面视图")),active:D.value&&O.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(k,{name:"donghuafangzhen",size:"24",onClick:_[2]||(_[2]=V=>Z("场景树3"))}),e.createVNode(k,{name:"donghuafangzhen",size:"24",onClick:_[3]||(_[3]=V=>Z("场景4"))})]),e.createElementVNode("div",it,[e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"guanjiekongzhi",size:"24",onClick:_[4]||(_[4]=V=>ue("关节控制")),active:A.value&&u.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",st,[e.createVNode(k,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:($=S.value)==null?void 0:$.fastBackward},null,8,["onClick"]),e.createVNode(k,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:de}),e.createVNode(k,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(X=S.value)==null?void 0:X.fastForward},null,8,["onClick"]),e.createVNode(k,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(G=S.value)==null?void 0:G.pauseAnimation},null,8,["onClick"]),e.createVNode(k,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(J=S.value)==null?void 0:J.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",nt,[e.createElementVNode("div",at,[e.createElementVNode("span",null,e.toDisplayString(O.value),1),e.createElementVNode("span",{class:"close",onClick:_[5]||(_[5]=V=>D.value=!1)}," X ")]),e.createVNode(B,{"max-height":"650px"},{default:e.withCtx(()=>[O.value==="场景树"?(e.openBlock(),e.createBlock(Ne,{key:0,model:e.unref(Y)},null,8,["model"])):e.createCommentVNode("",!0),O.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",lt,[e.createElementVNode("div",rt,[e.createElementVNode("label",ct,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":_[6]||(_[6]=V=>e.isRef(c)?c.value=V:null),onChange:_[7]||(_[7]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[15]||(_[15]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",ht,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":_[8]||(_[8]=V=>e.isRef(c)?c.value=V:null),onChange:_[9]||(_[9]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[16]||(_[16]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",ut,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":_[10]||(_[10]=V=>e.isRef(c)?c.value=V:null),onChange:_[11]||(_[11]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[17]||(_[17]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",dt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":_[12]||(_[12]=V=>e.isRef(c)?c.value=V:null),onChange:_[13]||(_[13]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[18]||(_[18]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("span",null,e.toDisplayString(u.value),1),e.createElementVNode("span",{class:"close",onClick:_[14]||(_[14]=V=>A.value=!1)}," X ")]),e.createVNode(B,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Je,{ref_key:"jointRef",ref:S,model:e.unref(Y),scene:e.unref(l)},null,8,["model","scene"]),[[e.vShow,u.value==="关节控制"]])]),_:1})],512),[[e.vShow,A.value]]),r.value?(e.openBlock(),e.createElementBlock("div",ft,[_[19]||(_[19]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(b.value),1)])):e.createCommentVNode("",!0)])}}},gt=W._export_sfc(_t,[["__scopeId","data-v-4a248817"]]);exports.default=gt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-MfXPrK37.cjs"),W=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae={type:"change"},oe={type:"start"},re={type:"end"},q=new i.Ray,le=new i.Plane,pe=Math.cos(70*i.MathUtils.DEG2RAD),z=new i.Vector3,F=2*Math.PI,x={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ee=1e-6;class me extends i.Controls{constructor(t,o=null){super(t,o),this.state=x.NONE,this.target=new i.Vector3,this.cursor=new i.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:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.DOLLY,RIGHT:i.MOUSE.PAN},this.touches={ONE:i.TOUCH.ROTATE,TWO:i.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 i.Vector3,this._lastQuaternion=new i.Quaternion,this._lastTargetPosition=new i.Vector3,this._quat=new i.Quaternion().setFromUnitVectors(t.up,new i.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new i.Spherical,this._sphericalDelta=new i.Spherical,this._scale=1,this._panOffset=new i.Vector3,this._rotateStart=new i.Vector2,this._rotateEnd=new i.Vector2,this._rotateDelta=new i.Vector2,this._panStart=new i.Vector2,this._panEnd=new i.Vector2,this._panDelta=new i.Vector2,this._dollyStart=new i.Vector2,this._dollyEnd=new i.Vector2,this._dollyDelta=new i.Vector2,this._dollyDirection=new i.Vector3,this._mouse=new i.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=_e.bind(this),this._onPointerDown=fe.bind(this),this._onPointerUp=ge.bind(this),this._onContextMenu=Me.bind(this),this._onMouseWheel=be.bind(this),this._onKeyDown=Ee.bind(this),this._onTouchStart=we.bind(this),this._onTouchMove=Pe.bind(this),this._onMouseDown=ye.bind(this),this._onMouseMove=ve.bind(this),this._interceptControlDown=xe.bind(this),this._interceptControlUp=De.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(ae),this.update(),this.state=x.NONE}update(t=null){const o=this.object.position;z.copy(o).sub(this.target),z.applyQuaternion(this._quat),this._spherical.setFromVector3(z),this.autoRotate&&this.state===x.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,l=this.maxAzimuthAngle;isFinite(n)&&isFinite(l)&&(n<-Math.PI?n+=F:n>Math.PI&&(n-=F),l<-Math.PI?l+=F:l>Math.PI&&(l-=F),n<=l?this._spherical.theta=Math.max(n,Math.min(l,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+l)/2?Math.max(n,this._spherical.theta):Math.min(l,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 p=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const g=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),p=g!=this._spherical.radius}if(z.setFromSpherical(this._spherical),z.applyQuaternion(this._quatInverse),o.copy(this.target).add(z),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 g=null;if(this.object.isPerspectiveCamera){const r=z.length();g=this._clampDistance(r*this._scale);const b=r-g;this.object.position.addScaledVector(this._dollyDirection,b),this.object.updateMatrixWorld(),p=!!b}else if(this.object.isOrthographicCamera){const r=new i.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const b=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),p=b!==this.object.zoom;const E=new i.Vector3(this._mouse.x,this._mouse.y,0);E.unproject(this.object),this.object.position.sub(E).add(r),this.object.updateMatrixWorld(),g=z.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;g!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(g).add(this.object.position):(q.origin.copy(this.object.position),q.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(q.direction))<pe?this.object.lookAt(this.target):(le.setFromNormalAndCoplanarPoint(this.object.up,this.target),q.intersectPlane(le,this.target))))}else if(this.object.isOrthographicCamera){const g=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),g!==this.object.zoom&&(this.object.updateProjectionMatrix(),p=!0)}return this._scale=1,this._performCursorZoom=!1,p||this._lastPosition.distanceToSquared(this.object.position)>ee||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ee||this._lastTargetPosition.distanceToSquared(this.target)>ee?(this.dispatchEvent(ae),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?F/60*this.autoRotateSpeed*t:F/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){z.setFromMatrixColumn(o,0),z.multiplyScalar(-t),this._panOffset.add(z)}_panUp(t,o){this.screenSpacePanning===!0?z.setFromMatrixColumn(o,1):(z.setFromMatrixColumn(o,0),z.crossVectors(this.object.up,z)),z.multiplyScalar(t),this._panOffset.add(z)}_pan(t,o){const n=this.domElement;if(this.object.isPerspectiveCamera){const l=this.object.position;z.copy(l).sub(this.target);let p=z.length();p*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*p/n.clientHeight,this.object.matrix),this._panUp(2*o*p/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(),l=t-n.left,p=o-n.top,g=n.width,r=n.height;this._mouse.x=l/g*2-1,this._mouse.y=-(p/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(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*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(F*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(-F*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(F*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(-F*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),l=.5*(t.pageY+o.y);this._rotateStart.set(n,l)}}_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),l=.5*(t.pageY+o.y);this._panStart.set(n,l)}}_handleTouchStartDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,l=t.pageY-o.y,p=Math.sqrt(n*n+l*l);this._dollyStart.set(0,p)}_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),l=.5*(t.pageX+n.x),p=.5*(t.pageY+n.y);this._rotateEnd.set(l,p)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*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),l=.5*(t.pageY+o.y);this._panEnd.set(n,l)}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,l=t.pageY-o.y,p=Math.sqrt(n*n+l*l);this._dollyEnd.set(0,p),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 g=(t.pageX+o.x)*.5,r=(t.pageY+o.y)*.5;this._updateZoomParameters(g,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 i.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 fe(a){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(a.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(a)&&(this._addPointer(a),a.pointerType==="touch"?this._onTouchStart(a):this._onMouseDown(a)))}function _e(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function ge(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(re),this.state=x.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 ye(a){let t;switch(a.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 i.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=x.DOLLY;break;case i.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=x.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=x.ROTATE}break;case i.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=x.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=x.PAN}break;default:this.state=x.NONE}this.state!==x.NONE&&this.dispatchEvent(oe)}function ve(a){switch(this.state){case x.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case x.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case x.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function be(a){this.enabled===!1||this.enableZoom===!1||this.state!==x.NONE||(a.preventDefault(),this.dispatchEvent(oe),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(re))}function Ee(a){this.enabled!==!1&&this._handleKeyDown(a)}function we(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case i.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=x.TOUCH_ROTATE;break;case i.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=x.TOUCH_PAN;break;default:this.state=x.NONE}break;case 2:switch(this.touches.TWO){case i.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=x.TOUCH_DOLLY_PAN;break;case i.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=x.TOUCH_DOLLY_ROTATE;break;default:this.state=x.NONE}break;default:this.state=x.NONE}this.state!==x.NONE&&this.dispatchEvent(oe)}function Pe(a){switch(this._trackPointer(a),this.state){case x.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case x.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case x.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case x.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=x.NONE}}function Me(a){this.enabled!==!1&&a.preventDefault()}function xe(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function De(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Se(a){let t=null,o=null,n=null,l=null,p=null,g=null,r=null,b=null;const E=e.ref([]),D=e.ref(new i.Vector3),O=e.ref(new i.Vector3),A=()=>{if(!a.value)return;t=new i.Scene,t.background=new i.Color(15790320);const m=a.value;o=new i.PerspectiveCamera(75,m.clientWidth/m.clientHeight,.1,1e4),o.position.set(8,-8,6),o.up.set(0,0,1),o.lookAt(0,0,0),n=new i.WebGLRenderer({antialias:!0,alpha:!0}),n.setSize(m.clientWidth,m.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=i.PCFSoftShadowMap,n.toneMapping=i.ACESFilmicToneMapping,n.toneMappingExposure=1,n.outputColorSpace=i.SRGBColorSpace,m.appendChild(n.domElement),l=new me(o,n.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.PAN,RIGHT:null},l.panSpeed=.7,p=new i.Xe(o,n,{container:m,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),p.attachControls(l),y(),s()},u=(m,d)=>{r&&(t.remove(r),r.dispose()),b&&(t.remove(b),b.geometry.dispose(),b.material.dispose());const P=Math.min(Math.max(Math.floor(m/20),30),40);r=new i.GridHelper(m,P,13421772,14540253),r.rotateX(Math.PI/2),r.position.copy(d),t.add(r);const U=new i.PlaneGeometry(m,m),c=new i.ShadowMaterial({opacity:.3,color:0});b=new i.Mesh(U,c),b.position.copy(d),b.position.z-=.01,b.receiveShadow=!0,t.add(b)},S=()=>{if(E.value.length===0)return;const m=new i.Box3;E.value.forEach(h=>{m.expandByObject(h)});const d=m.getSize(new i.Vector3),P=m.getCenter(new i.Vector3),U=Math.max(d.x,d.y,d.z),c=Math.max(U*8,50),w=new i.Vector3(P.x,P.y,m.min.z);u(c,w)},y=()=>{const m=new i.AmbientLight(4210752,.6);t.add(m);const d=new i.DirectionalLight(16777215,2);d.position.set(10,10,8),d.castShadow=!0,d.shadow.mapSize.width=4096,d.shadow.mapSize.height=4096,d.shadow.camera.near=.5,d.shadow.camera.far=50,d.shadow.camera.left=-50,d.shadow.camera.right=50,d.shadow.camera.top=50,d.shadow.camera.bottom=-50,t.add(d);const P=new i.DirectionalLight(16777215,.8);P.position.set(-8,-8,6),t.add(P);const U=new i.DirectionalLight(16777215,.6);U.position.set(0,-15,2),t.add(U);const c=new i.HemisphereLight(16777215,4473924,.8);t.add(c);const w=new i.PointLight(16777215,1,50);w.position.set(15,15,15),t.add(w);const h=new i.PointLight(16777215,.5,50);h.position.set(-15,-15,15),t.add(h)},s=()=>{g=requestAnimationFrame(s),l&&l.update(),n&&t&&o&&n.render(t,o),p&&p.render()},f=m=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(P=>{m[P]&&m[P].dispose&&m[P].dispose()}),m.dispose&&m.dispose()},v=m=>{m==null||m.traverse(d=>{d.geometry&&d.geometry.dispose(),d.material&&(Array.isArray(d.material)?d.material.forEach(P=>{f(P)}):f(d.material))})};return{currentModels:E,initialCameraPosition:D,initialTargetPosition:O,initThreeJS:A,handleResize:()=>{if(!a.value||!o||!n||!p)return;const m=a.value,d=m.clientWidth,P=m.clientHeight;o.aspect=d/P,o.updateProjectionMatrix(),n.setSize(d,P),p.update()},fitCameraToAllModels:()=>{if(!o||!l||E.value.length===0)return;const m=new i.Box3;E.value.forEach(h=>{m.expandByObject(h)});const d=m.getSize(new i.Vector3),P=m.getCenter(new i.Vector3),c=Math.max(d.x,d.y,d.z)*.8,w=new i.Vector3(P.x+c,P.y-c,P.z+c);o.position.copy(w),o.lookAt(P),l.target.copy(P),l.update(),D.value.copy(w),O.value.copy(P),S()},getThreeJSObjects:()=>({scene:t,camera:o,renderer:n,controls:l,gizmo:p}),clearAllModels:()=>{if(!t)return;E.value.forEach(d=>{t.remove(d),v(d)});const m=[];t.children.forEach(d=>{!d.isLight&&!d.isCamera&&d.type!=="GridHelper"&&d!==b&&m.push(d)}),m.forEach(d=>{t.remove(d),v(d)}),E.value=[],S()},cleanup:()=>{g&&cancelAnimationFrame(g),r&&r.dispose(),b&&(b.geometry.dispose(),b.material.dispose()),n&&n.dispose(),l&&l.dispose(),p&&p.dispose()},updateGridForModels:S}}function Ve(a,t){const o=e.ref(!1);let n=null,l=12700,p=new i.Vector3,g=new i.Vector3,r=new i.Vector3,b=0,E=null;const D=s=>s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2,O=s=>{const f=new i.Vector3,v=b*1.2,T=new i.Vector3(r.x+v,r.y,r.z),I=new i.Vector3(r.x,r.y+v,r.z),N=new i.Vector3(r.x,r.y-v,r.z);if(s<=.567){const j=s/.567*Math.PI*2;f.x=r.x+Math.cos(j)*v,f.z=r.z+Math.sin(j)*v,f.y=r.y}else if(s<=.724){const L=(s-.567)/.157,j=D(L);f.lerpVectors(T,I,j)}else if(s<=.881){const L=(s-.724)/.157,m=D(L)*Math.PI;f.x=r.x+Math.sin(m)*v,f.y=r.y+Math.cos(m)*v,f.z=r.z}else{const L=(s-.881)/.119,j=D(L);f.lerpVectors(N,p,j)}return f},A=()=>{const{camera:s,controls:f}=a();if(!s||!f)return;n||(n=Date.now());const v=Date.now()-n,T=Math.min(v/l,1);if(T>=1){S();return}const I=O(T);s.position.copy(I),s.lookAt(r),f.target.copy(r),E=requestAnimationFrame(A)},u=()=>{if(t.value.length===0)return;const{camera:s,controls:f}=a();if(!s||!f)return;p.copy(s.position),g.copy(f.target);const v=new i.Box3;t.value.forEach(d=>{v.expandByObject(d)});const T=v.getSize(new i.Vector3);r=v.getCenter(new i.Vector3),b=Math.max(T.x,T.y,T.z)*1.2;const I=new i.Vector3(r.x+b*1.2,r.y,r.z);f.enabled=!1;const N=s.position.clone(),L=1e3,j=Date.now(),m=()=>{const d=Date.now()-j,P=Math.min(d/L,1),U=D(P);s.position.lerpVectors(N,I,U),s.lookAt(r),f.target.copy(r),P<1?requestAnimationFrame(m):(o.value=!0,n=null,A())};m()},S=()=>{o.value=!1,n=null,E&&(cancelAnimationFrame(E),E=null);const{controls:s}=a();s&&(s.enabled=!0,s.target.copy(g))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,n=null,E&&(cancelAnimationFrame(E),E=null);const{camera:s,controls:f}=a();if(!s||!f)return;f.enabled=!0;const v=s.position.clone(),T=f.target.clone(),I=1500,N=Date.now(),L=()=>{const j=Date.now()-N,m=Math.min(j/I,1),d=D(m);s.position.lerpVectors(v,p,d),f.target.lerpVectors(T,g,d),m<1&&requestAnimationFrame(L)};L()}else u()},startAnimation:u,stopAnimation:S}}function ke(a,t){const o=e.ref(!1),n=e.ref("none");let l=[],p=[],g=new i.Box3,r=new i.Vector3;const b=()=>{l=[new i.Plane(new i.Vector3(1,0,0),0),new i.Plane(new i.Vector3(0,1,0),0),new i.Plane(new i.Vector3(0,0,1),0)]},E=()=>{g.makeEmpty(),t.value.forEach(y=>{g.expandByObject(y)}),r=g.getCenter(new i.Vector3)},D=y=>{const s=g.getSize(new i.Vector3);let f,v,T;y==="x"?(f=new i.PlaneGeometry(s.z*1.2,s.y*1.2),v=new i.Vector3(r.x,r.y,r.z),T=new i.Euler(0,Math.PI/2,0)):y==="y"?(f=new i.PlaneGeometry(s.x*1.2,s.z*1.2),v=new i.Vector3(r.x,r.y,r.z),T=new i.Euler(Math.PI/2,0,0)):y==="z"&&(f=new i.PlaneGeometry(s.x*1.2,s.y*1.2),v=new i.Vector3(r.x,r.y,r.z),T=new i.Euler(0,0,0));const I=new i.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:i.DoubleSide,depthWrite:!1}),N=new i.Mesh(f,I);return N.position.copy(v),N.rotation.copy(T),N},O=()=>{if(A(),u(),n.value==="none")return;E();let y=null;if(n.value==="x"?(l[0].constant=-r.x,y=l[0]):n.value==="y"?(l[1].constant=-r.y,y=l[1]):n.value==="z"&&(l[2].constant=-r.z,y=l[2]),y){t.value.forEach(f=>{f.traverse(v=>{v.isMesh&&v.material&&(Array.isArray(v.material)?v.material.forEach(T=>{T.clippingPlanes=[y]}):v.material.clippingPlanes=[y])})});const{scene:s}=a();if(s){const f=D(n.value);s.add(f),p.push(f)}}},A=()=>{t.value.forEach(y=>{y.traverse(s=>{s.isMesh&&s.material&&(Array.isArray(s.material)?s.material.forEach(f=>{f.clippingPlanes=[]}):s.material.clippingPlanes=[])})})},u=()=>{const{scene:y}=a();y&&p.forEach(s=>{y.remove(s),s.geometry.dispose(),s.material.dispose()}),p=[]};return{isClipping:o,activeClippingAxis:n,toggleClipping:()=>{o.value=!o.value,o.value?(b(),t.value.length>0&&E()):(n.value="none",A(),u())},updateClippingPlanes:O,clearClippingPlanes:A,clearClippingMeshes:u}}const Te={class:"panel-content"},Ce="id",Ae={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:a=>["breadth","firstLevel"].includes(a)}},emits:["nodeClick"],setup(a,{emit:t}){const o=a,n=t,l=e.ref([]),p={children:"children",label:"label"},g=u=>{n("nodeClick",u)},r=(u,S=0)=>{const y=[];return Array.isArray(u)&&(u==null?void 0:u.length)>0&&u.forEach(s=>{if(!(s!=null&&s.isMesh)&&((s==null?void 0:s.type)==="URDFJoint"||(s==null?void 0:s.type)==="URDFLink")){const f={name:s==null?void 0:s.name,label:s==null?void 0:s.name,show:!0,level:S+1,isPenultimate:!1,type:s==null?void 0:s.type,id:s==null?void 0:s.id,limit:(s==null?void 0:s.limit)??"",children:r(s==null?void 0:s.children,S+1),path:s==null?void 0:s.name};y.push(f)}}),y},b=u=>u?[{name:u==null?void 0:u.name,label:u==null?void 0:u.name,show:!0,level:1,isPenultimate:!1,type:u==null?void 0:u.type,id:u==null?void 0:u.id,limit:(u==null?void 0:u.limit)??"",children:r(u==null?void 0:u.children,1),path:u==null?void 0:u.name}]:[],E=(u,S)=>{const y=[],s=[...u];for(;s.length>0&&y.length<S;){const f=s.shift();f.children&&f.children.length>0&&(y.push(f.id),s.push(...f.children))}return y},D=(u,S)=>{const y=[];return u.forEach(s=>{if(s.children&&s.children.length>0){y.push(s.id);const f=s.children.filter(v=>v.children&&v.children.length>0).slice(0,S).map(v=>v.id);y.push(...f)}}),y.slice(0,S+1)},O=e.computed(()=>!l.value||l.value.length===0?[]:o.expandStrategy==="firstLevel"?D(l.value,o.maxExpandCount):E(l.value,o.maxExpandCount)),A=e.computed(()=>o!=null&&o.model?b(o.model):[]);return e.watch(A,u=>{l.value=JSON.parse(JSON.stringify(u))},{immediate:!0}),(u,S)=>{const y=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",Te,[e.createVNode(y,{data:l.value,props:p,"default-expanded-keys":O.value,"node-key":Ce,onNodeClick:g},null,8,["data","default-expanded-keys"])])}}},Ne=W._export_sfc(Ae,[["__scopeId","data-v-290ff4e1"]]),ze={class:"panel-content"},Oe={key:0,class:"joints-list"},Re={class:"joint-info-row"},Le={class:"joint-left"},je={class:"joint-name"},Ie={class:"joint-range"},Ue={class:"joint-type"},Fe={key:0,class:"joint-control-row"},Be={class:"slider-container"},Ye=["min","max","value","onInput","disabled"],He={class:"value-display"},Ke={class:"joint-value"},Ze={class:"unit"},$e={key:1,class:"empty-state"},Xe=1e3,te=60,Ge={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Array},setup(a,{expose:t}){const o=a;e.ref(!0);const n=e.ref([]),l=e.ref(null),p=e.ref(!1),g=e.ref(!1),r=e.ref(0),b=e.ref(0),E=e.ref(null),D=e.ref(1),O=()=>Xe/te/D.value;let A=[];e.watch(()=>o.animationData,c=>{c&&c.length>0&&(A=c)},{deep:!0});const u=(c,w=!1)=>c==="revolute"?w?Math.PI:-Math.PI:c==="prismatic"?w?1:-1:0,S=c=>{if(!c||!c.joints)return console.warn("URDF模型没有关节信息"),[];const w=[];return Object.keys(c.joints).forEach(h=>{const M=c.joints[h];if(M._jointType==="fixed")return;const R=M.limit?{lower:M.limit.lower??u(M._jointType,!1),upper:M.limit.upper??u(M._jointType,!0)}:{lower:u(M._jointType,!1),upper:u(M._jointType,!0)};w.push({name:h,type:M._jointType||"unknown",limit:R,currentValue:M.angle||0,urdfJoint:M})}),w.sort((h,M)=>h.name.localeCompare(M.name))},y=(c,w)=>{const h=n.value.find(R=>R.name===c);if(!h)return;const M=parseFloat(w);if(h.limit){const R=Math.max(h.limit.lower,Math.min(h.limit.upper,M));h.currentValue=R}else h.currentValue=M;o.model&&o.model.setJointValue?o.model.setJointValue(c,h.currentValue):h.urdfJoint&&h.urdfJoint.setJointValue(h.currentValue)},s=c=>{c&&Object.keys(c).forEach(w=>{const h=c[w],M=n.value.find(R=>R.name===w);M&&(M.currentValue=h,o.model&&o.model.setJointValue?o.model.setJointValue(w,h):M.urdfJoint&&M.urdfJoint.setJointValue(h))})},f=(c,w,h)=>c+(w-c)*h,v=(c,w,h)=>{if(!c||!w)return c||w;const M={};return Object.keys(c).forEach(R=>{const Y=c[R],K=w[R];M[R]=f(Y,K||Y,h)}),M},T=()=>{if(A.length===0){console.warn("没有动画数据");return}p.value=!0,g.value=!1;const c=()=>{if(!p.value||g.value)return;const w=b.value/te,h=A[r.value],M=A[r.value+1];if(M){const R=v(h,M,w);s(R)}else s(h);if(b.value++,b.value>=te&&(b.value=0,r.value++,r.value>=A.length-1)){N();return}E.value=setTimeout(c,O())};c()},I=()=>{g.value=!0,E.value&&(clearTimeout(E.value),E.value=null)},N=()=>{p.value=!1,g.value=!1,D.value=1,E.value&&(clearTimeout(E.value),E.value=null)};t({startAnimation:T,pauseAnimation:I,stopAnimation:N,resetAll:()=>{N(),r.value=0,b.value=0,n.value.forEach(c=>{(c.type==="revolute"||c.type==="prismatic")&&y(c.name,0)})},fastForward:()=>{D.value<4&&(D.value=Math.min(4,D.value*2))},fastBackward:()=>{D.value>.25&&(D.value=Math.max(.25,D.value/2))}}),e.watch(()=>o.model,c=>{c?n.value=S(c):n.value=[]},{immediate:!0});const d=()=>{!o.model||p.value&&!g.value||n.value.forEach(c=>{c.urdfJoint&&c.urdfJoint.angle!==void 0&&(c.currentValue=c.urdfJoint.angle)})},P=()=>{const c=()=>{d(),l.value=requestAnimationFrame(c)};c()},U=()=>{l.value&&(cancelAnimationFrame(l.value),l.value=null)};return e.onMounted(()=>{P()}),e.onUnmounted(()=>{U(),N()}),(c,w)=>(e.openBlock(),e.createElementBlock("div",ze,[n.value.length>0?(e.openBlock(),e.createElementBlock("div",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,h=>{var M,R,Y,K;return e.openBlock(),e.createElementBlock("div",{key:h.name,class:"joint-item"},[e.createElementVNode("div",Re,[e.createElementVNode("div",Le,[e.createElementVNode("span",je,e.toDisplayString(h.name),1),e.createElementVNode("span",Ie," ["+e.toDisplayString(((M=h.limit)==null?void 0:M.lower.toFixed(2))??(h.type==="revolute"?"-3.14":"-1.00"))+", "+e.toDisplayString(((R=h.limit)==null?void 0:R.upper.toFixed(2))??(h.type==="revolute"?"3.14":"1.00"))+"] ",1)]),e.createElementVNode("span",Ue,e.toDisplayString(h.type),1)]),h.type==="revolute"||h.type==="prismatic"?(e.openBlock(),e.createElementBlock("div",Fe,[e.createElementVNode("div",Be,[e.createElementVNode("input",{type:"range",min:((Y=h.limit)==null?void 0:Y.lower)??(h.type==="revolute"?-Math.PI:-1),max:((K=h.limit)==null?void 0:K.upper)??(h.type==="revolute"?Math.PI:1),step:.01,value:h.currentValue,onInput:Q=>y(h.name,Q.target.value),class:"joint-slider",disabled:p.value&&!g.value},null,40,Ye)]),e.createElementVNode("div",He,[e.createElementVNode("span",Ke,e.toDisplayString(h.currentValue.toFixed(3)),1),e.createElementVNode("span",Ze,e.toDisplayString(h.type==="revolute"?"rad":"m"),1)])])):e.createCommentVNode("",!0)])}),128))])):(e.openBlock(),e.createElementBlock("div",$e,w[0]||(w[0]=[e.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},Je=W._export_sfc(Ge,[["__scopeId","data-v-5155d15e"]]),qe=["xlink:href"],We=e.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(a){const t=a,o=e.computed(()=>({backgroundColor:t.backgroundColor})),n=e.computed(()=>`#${t.prefix}-${t.name}`),l=e.computed(()=>{const{size:p}=t;let g=`${p}`;return g=`${g.replace("px","")}px`,{width:g,height:g}});return(p,g)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["container",{active:p.active}]),style:e.normalizeStyle(o.value)},[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["svg-icon",[p.$attrs.class,p.spin&&"svg-icon-spin"]]),style:e.normalizeStyle(l.value),"aria-hidden":"true"},[e.createElementVNode("use",{"xlink:href":n.value},null,8,qe)],6))],6))}}),k=W._export_sfc(We,[["__scopeId","data-v-3150a90b"]]),Qe={class:"obj-viewer-container"},et={class:"buttonGroup-top"},tt={class:"buttonGroup-topLeft"},ot={class:"buttonGroup-left"},it={class:"buttonGroup-right"},st={class:"buttonGroup-bottom"},nt={class:"left-panel"},at={class:"panel-header"},lt={key:1,class:"clipping-content"},rt={class:"radio-group"},ct={class:"radio-label"},ht={class:"radio-label"},ut={class:"radio-label"},dt={class:"radio-label"},pt={class:"right-panel"},mt={class:"panel-header"},ft={key:0,class:"loading-overlay"},_t={__name:"threeModel",props:{animationData:{type:Array,default:[]}},emits:["getAnimationData"],setup(a,{expose:t,emit:o}){const n=o;let l=null,p=!1;const g=e.ref(null),r=e.ref(!1),b=e.ref("");e.ref(!1);const E=e.ref(!1),D=e.ref(!1),O=e.ref(""),A=e.ref(!1),u=e.ref(""),S=e.ref(),{currentModels:y,initialCameraPosition:s,initialTargetPosition:f,initThreeJS:v,handleResize:T,fitCameraToAllModels:I,getThreeJSObjects:N,clearAllModels:L,cleanup:j}=Se(g),{isAnimating:m,toggleAnimation:d,stopAnimation:P}=Ve(N,y),{isClipping:U,activeClippingAxis:c,toggleClipping:w,updateClippingPlanes:h}=ke(N,y),{addModelsFromUrls:M,loadModelByDefaultPath:R,urdfModel:Y}=i.useModelLoader(N,y,r,b,L),K=()=>{if(E.value||y.value.length===0)return;E.value=!0,m.value&&P();const{camera:C,controls:_}=N();if(!C||!_)return;_.enabled=!0;const B=H=>H<.5?4*H*H*H:1-Math.pow(-2*H+2,3)/2,$=C.position.clone(),X=_.target.clone(),G=1500,J=Date.now(),V=()=>{const H=Date.now()-J,se=Math.min(H/G,1),ne=B(se);C.position.lerpVectors($,s.value,ne),_.target.lerpVectors(X,f.value,ne),se<1?requestAnimationFrame(V):E.value=!1};V()},Q=async()=>p?Promise.resolve():new Promise(C=>{const _=()=>{p?C():requestAnimationFrame(_)};_()}),ie=async(C,_)=>{try{await Q(),m.value&&P(),U.value&&w();const B=await _(C);return I(),B}catch(B){throw console.error("加载模型失败:",B),B}},ce=async C=>ie(C,M),he=async C=>ie(C,R),Z=C=>{D.value=!0,O.value=C,C==="剖面视图"&&!U.value&&w()},ue=C=>{A.value=!0,u.value=C},de=()=>{n("getAnimationData"),e.nextTick(()=>{var C;(C=S.value)==null||C.startAnimation()})};return e.onMounted(async()=>{await e.nextTick();try{v(),l=N().scene,p=!0,window.addEventListener("resize",T)}catch(C){console.error("Three.js初始化失败:",C)}}),e.onBeforeUnmount(()=>{p=!1,O.value="",u.value="",window.removeEventListener("resize",T),m.value&&P(),j()}),t({addModelsFromUrls:ce,loadModelByDefaultPath:he}),(C,_)=>{var $,X,G,J;const B=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",Qe,[e.createElementVNode("div",{ref_key:"threejsContainer",ref:g,class:"threejs-container"},null,512),e.createElementVNode("div",et,[e.createVNode(k,{name:"guanjianjiexi",size:"34"}),e.createVNode(k,{name:"guanjiekongzhi",size:"34"}),e.createVNode(k,{name:"gongyishengcheng",size:"34"}),e.createVNode(k,{name:"buchangshezhi",size:"34"}),e.createVNode(k,{name:"shuchujiagongchengxu",size:"34"})]),e.createElementVNode("div",tt,[e.createVNode(k,{name:"viewReset",size:"24",onClick:K,title:"重置"}),e.createVNode(k,{name:"fangda",size:"24",title:"放大"}),e.createVNode(k,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(k,{name:"lookAround",size:"24",onClick:e.unref(d),title:e.unref(m)?"停止动画":"动画视图"},null,8,["onClick","title"])]),e.createElementVNode("div",ot,[e.createVNode(k,{name:"jiegoushu",size:"24",onClick:_[0]||(_[0]=V=>Z("场景树")),active:D.value&&O.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(k,{name:"clipping",size:"24",onClick:_[1]||(_[1]=V=>Z("剖面视图")),active:D.value&&O.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(k,{name:"donghuafangzhen",size:"24",onClick:_[2]||(_[2]=V=>Z("场景树3"))}),e.createVNode(k,{name:"donghuafangzhen",size:"24",onClick:_[3]||(_[3]=V=>Z("场景4"))})]),e.createElementVNode("div",it,[e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"guanjiekongzhi",size:"24",onClick:_[4]||(_[4]=V=>ue("关节控制")),active:A.value&&u.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"}),e.createVNode(k,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",st,[e.createVNode(k,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:($=S.value)==null?void 0:$.fastBackward},null,8,["onClick"]),e.createVNode(k,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:de}),e.createVNode(k,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(X=S.value)==null?void 0:X.fastForward},null,8,["onClick"]),e.createVNode(k,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(G=S.value)==null?void 0:G.pauseAnimation},null,8,["onClick"]),e.createVNode(k,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(J=S.value)==null?void 0:J.resetAll},null,8,["onClick"])]),e.withDirectives(e.createElementVNode("div",nt,[e.createElementVNode("div",at,[e.createElementVNode("span",null,e.toDisplayString(O.value),1),e.createElementVNode("span",{class:"close",onClick:_[5]||(_[5]=V=>D.value=!1)}," X ")]),e.createVNode(B,{"max-height":"650px"},{default:e.withCtx(()=>[O.value==="场景树"?(e.openBlock(),e.createBlock(Ne,{key:0,model:e.unref(Y)},null,8,["model"])):e.createCommentVNode("",!0),O.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",lt,[e.createElementVNode("div",rt,[e.createElementVNode("label",ct,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":_[6]||(_[6]=V=>e.isRef(c)?c.value=V:null),onChange:_[7]||(_[7]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[15]||(_[15]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",ht,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":_[8]||(_[8]=V=>e.isRef(c)?c.value=V:null),onChange:_[9]||(_[9]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[16]||(_[16]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",ut,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":_[10]||(_[10]=V=>e.isRef(c)?c.value=V:null),onChange:_[11]||(_[11]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[17]||(_[17]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",dt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":_[12]||(_[12]=V=>e.isRef(c)?c.value=V:null),onChange:_[13]||(_[13]=(...V)=>e.unref(h)&&e.unref(h)(...V))},null,544),[[e.vModelRadio,e.unref(c)]]),_[18]||(_[18]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0)]),_:1})],512),[[e.vShow,D.value]]),e.withDirectives(e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("span",null,e.toDisplayString(u.value),1),e.createElementVNode("span",{class:"close",onClick:_[14]||(_[14]=V=>A.value=!1)}," X ")]),e.createVNode(B,{"max-height":"650px"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Je,{ref_key:"jointRef",ref:S,model:e.unref(Y),scene:e.unref(l)},null,8,["model","scene"]),[[e.vShow,u.value==="关节控制"]])]),_:1})],512),[[e.vShow,A.value]]),r.value?(e.openBlock(),e.createElementBlock("div",ft,[_[19]||(_[19]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(b.value),1)])):e.createCommentVNode("",!0)])}}},gt=W._export_sfc(_t,[["__scopeId","data-v-4a248817"]]);exports.default=gt;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as uu } from "./index-
|
|
2
|
-
import {
|
|
1
|
+
import { d as uu } from "./index-DzjXzyVN.js";
|
|
2
|
+
import { bR as du, d as _a, s as fu, p as pu } from "./menu-BPLW-L8U.js";
|
|
3
3
|
import { ref as mu } from "vue";
|
|
4
4
|
const gu = du("modelComp", {
|
|
5
5
|
state: () => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const vu=require("./index-
|
|
1
|
+
"use strict";const vu=require("./index-YT4yRM1k.cjs"),ss=require("./menu-CQ3_ZXwC.cjs"),xu=require("vue"),Ah=ss.defineStore("modelComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],systemPath:"",freshContent:!1,routeToChildPath:""}),actions:{setItemData(s){this.itemData=s},setFreshContent(s){this.freshContent=s},setRouteToChildPath(s){this.routeToChildPath=s},setSubmitCurStructure(s){this.isSubmitCurStructure=s},setCurStructureCompIds(s){this.curStructureCompIds=s},setRefreshCurStructure(s){this.isRefreshCurStructure=s},setOriginalData(s){this.originalData=s},setExtraContents(s){this.extraContents=s},setNodeDev(s){this.nodeDev=s},setIsEdit(s){this.isEdit=s},setSystemPath(s){this.systemPath=s}}});/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2010-2025 Three.js Authors
|
|
4
4
|
* SPDX-License-Identifier: MIT
|
package/package.json
CHANGED
package/dist/index--3QjFI9W.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const De=require("./index-DXIV-OAV.cjs"),e=require("vue"),oe=require("./menu-BXTfsfTB.cjs"),ce=require("./index-Dx6aORao.cjs"),r=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs"),he=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ne=require("./index-0Aj-6Pfy.cjs"),Re=require("./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-C1EygWi0.cjs"),Ae=require("./index-C17_NPz0.cjs"),Je=require("./index-C31XRLFj.cjs"),Ge=k=>k.match(/\((.*)\)/)[1],Me=oe.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(k){this.objUrl=k},setBlobUrls(k){this.blobUrls=k}}}),He={class:"form-content"},Qe={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(k,{emit:$}){const v=k,t=$,h=e.ref([]),w=e.ref(!1),M=e.ref([]),y=De.useFormToTableComp(oe.pinia),V=Me(oe.pinia),F=e.ref(!1),N=e.ref(),Q=q=>{var A,n,c,s;const P=(n=(A=r.cloneDeep(v.itemData))==null?void 0:A.find(i=>(i==null?void 0:i.key)==="formContent"))==null?void 0:n.contents,g=r.cloneDeep(q.content);let p={};g&&((c=Object.values(g))==null?void 0:c.length)>0&&((s=Object.values(g))==null||s.forEach((i,m)=>{p[P[m].key]=i}));const d={content:p,index:v==null?void 0:v.index,buttonName:q==null?void 0:q.buttonName};t("change",d)},K=q=>{var A,n,c;if(!q)return;const P=r.cloneDeep(v.itemData),g=P==null?void 0:P.map(s=>{var i;return(s==null?void 0:s.key)==="formContent"&&((i=s.contents)==null||i.map((m,W)=>{var H,te,ie,o,b,j,_,L,ee,ae,C,S,l,T,I,Z,E;return m.type=m!=null&&m.type?m.type:(o=(ie=(te=(H=m==null?void 0:m.key)==null?void 0:H.split("$"))==null?void 0:te[1])==null?void 0:ie.split("("))!=null&&o[0]?(j=(b=r.FormType)==null?void 0:b.find(z=>{var U,J,ne,ye;return(z==null?void 0:z.key)===((ye=(ne=(J=(U=m==null?void 0:m.key)==null?void 0:U.split("$"))==null?void 0:J[1])==null?void 0:ne.split("("))==null?void 0:ye[0])}))==null?void 0:j.value:"Input",m.options=m!=null&&m.options?m.options:((ee=(L=(_=m==null?void 0:m.key)==null?void 0:_.split("$"))==null?void 0:L[1])==null?void 0:ee.length)>0?(l=(S=Ge((C=(ae=m==null?void 0:m.key)==null?void 0:ae.split("$"))==null?void 0:C[1]))==null?void 0:S.split(","))==null?void 0:l.map(z=>({label:z,value:z})):[],(T=m==null?void 0:m.key)!=null&&T.includes("$")&&(m.key=(Z=(I=m==null?void 0:m.key)==null?void 0:I.split("$"))==null?void 0:Z[0]),m.value=(E=Object.values(q))==null?void 0:E[W],m})),s});let p=[],d=[];if((n=r.cloneDeep((A=g==null?void 0:g.find(s=>(s==null?void 0:s.key)==="formContent"))==null?void 0:A.contents))==null||n.forEach(s=>{var i;Array.isArray(s==null?void 0:s.value)&&((i=s==null?void 0:s.value)!=null&&i.find(m=>{var W;return(W=m==null?void 0:m.url)==null?void 0:W.includes(".obj")}))&&(d=s==null?void 0:s.value)}),(d==null?void 0:d.length)>0){const s=(c=r.cloneDeep(d))==null?void 0:c.filter(i=>{var m;return(m=i==null?void 0:i.url)==null?void 0:m.includes(".obj")});s==null||s.forEach(i=>{var W,H,te,ie;const m=(W=d==null?void 0:d.filter(o=>{var b;return(o==null?void 0:o.name)===(i==null?void 0:i.name)&&((b=o==null?void 0:o.url)==null?void 0:b.includes(".mtl"))}))==null?void 0:W.map(o=>o==null?void 0:o.url);p.push({objUrl:i==null?void 0:i.url,mtlUrls:((H=d==null?void 0:d.filter(o=>{var b;return(o==null?void 0:o.name)===(i==null?void 0:i.name)&&((b=o==null?void 0:o.url)==null?void 0:b.includes(".mtl"))}))==null?void 0:H.length)===1?(ie=(te=d==null?void 0:d.filter(o=>{var b;return(o==null?void 0:o.name)===(i==null?void 0:i.name)&&((b=o==null?void 0:o.url)==null?void 0:b.includes(".mtl"))}))==null?void 0:te[0])==null?void 0:ie.url:m})}),V.setObjUrl(p)}t("contentChange",{contents:g,index:v.index})};return e.watch(()=>v.itemData,async()=>{var A,n,c,s,i,m,W,H,te,ie,o,b,j;const q=(A=v.itemData)==null?void 0:A.find(_=>(_==null?void 0:_.key)==="formContent"),P=(n=r.cloneDeep(v.itemData))==null?void 0:n.find(_=>(_==null?void 0:_.key)==="formButton"),g=(c=r.cloneDeep(v.itemData))==null?void 0:c.find(_=>(_==null?void 0:_.key)==="formFlex"),p=(s=r.cloneDeep(v.itemData))==null?void 0:s.find(_=>(_==null?void 0:_.key)==="formWrap"),d=(i=r.cloneDeep(v.itemData))==null?void 0:i.find(_=>(_==null?void 0:_.key)==="enableWrap");if((p==null?void 0:p.contents)==="纵向"?w.value=!1:w.value=!0,F.value=(d==null?void 0:d.contents)===void 0?!1:d==null?void 0:d.contents,N.value=typeof(g==null?void 0:g.contents)!="boolean"?!(!(g!=null&&g.contents)===""||((m=g==null?void 0:g.contents)==null?void 0:m.toUpperCase())==="VERTICAL"):g==null?void 0:g.contents,((W=q==null?void 0:q.contents)==null?void 0:W.length)>0&&Array.isArray(q==null?void 0:q.contents)){const _=[];await((H=q==null?void 0:q.contents)==null?void 0:H.forEach(async(l,T)=>{var I,Z,E,z,U,J,ne,ye,ge,be,fe,ke;if((l==null?void 0:l.label)!==""){let me=(l==null?void 0:l.label)??(l==null?void 0:l.key)??"",ve=(l==null?void 0:l.type)??"",pe=(l==null?void 0:l.options)??[];if((I=l==null?void 0:l.key)!=null&&I.includes("$")&&(me=(Z=r.cloneDeep(l==null?void 0:l.key).split("$"))==null?void 0:Z[0],((z=(E=r.cloneDeep(l==null?void 0:l.key).split("$"))==null?void 0:E[1])==null?void 0:z.length)>0)){const[u,f]=(J=(U=r.cloneDeep(l==null?void 0:l.key).split("$"))==null?void 0:U[1])==null?void 0:J.split(/[()]/);ve=((ne=r.FormType.find(D=>(D==null?void 0:D.key)===u))==null?void 0:ne.value)??"",((ye=f==null?void 0:f.split(","))==null?void 0:ye.length)>0&&(pe=(ge=f==null?void 0:f.split(","))==null?void 0:ge.map(D=>({label:D,value:D})))}let a=[];l!=null&&l.contents&&!Array.isArray(l==null?void 0:l.contents)&&(a=(fe=(be=l==null?void 0:l.contents)==null?void 0:be.split(","))==null?void 0:fe.map(u=>({label:u,value:u}))),_.push({label:me??"",name:"t"+T,type:ve===""?"Input":ve,value:l!=null&&l.originalContent&&(l==null?void 0:l.originalContent)!==""?l.originalContent:l!=null&&l.value?l.value:(pe==null?void 0:pe.length)>0?(ke=pe==null?void 0:pe[0])==null?void 0:ke.value:(l==null?void 0:l.value)??"",id:(l==null?void 0:l.id)??T,contents:(a==null?void 0:a.length)>0?a:pe??[],width:(l==null?void 0:l.width)??1,config:l==null?void 0:l.config,optionUrl:(l==null?void 0:l.optionUrl)??l})}}));const L=_==null?void 0:_.map(l=>l.value);let ee="";L==null||L.forEach(l=>{l!==""&&l!==void 0&&(ee=ee===""?l:ee+"/"+l)}),y.setSelectArray(L),y.setSelectString(ee),h.value=_;let ae=[],C=[];if((te=r.cloneDeep(h.value))==null||te.forEach(l=>{var T;Array.isArray(l==null?void 0:l.value)&&((T=l==null?void 0:l.value)!=null&&T.find(I=>{var Z;return(Z=I==null?void 0:I.url)==null?void 0:Z.includes(".obj")}))&&(C=l==null?void 0:l.value)}),(C==null?void 0:C.length)>0){const l=(ie=r.cloneDeep(C))==null?void 0:ie.filter(T=>{var I;return(I=T==null?void 0:T.url)==null?void 0:I.includes(".obj")});l==null||l.forEach(T=>{var Z,E,z,U;const I=(Z=C==null?void 0:C.filter(J=>{var ne;return(J==null?void 0:J.name)===(T==null?void 0:T.name)&&((ne=J==null?void 0:J.url)==null?void 0:ne.includes(".mtl"))}))==null?void 0:Z.map(J=>J==null?void 0:J.url);ae.push({objUrl:T==null?void 0:T.url,mtlUrls:((E=C==null?void 0:C.filter(J=>{var ne;return(J==null?void 0:J.name)===(T==null?void 0:T.name)&&((ne=J==null?void 0:J.url)==null?void 0:ne.includes(".mtl"))}))==null?void 0:E.length)===1?(U=(z=C==null?void 0:C.filter(J=>{var ne;return(J==null?void 0:J.name)===(T==null?void 0:T.name)&&((ne=J==null?void 0:J.url)==null?void 0:ne.includes(".mtl"))}))==null?void 0:z[0])==null?void 0:U.url:I})}),V.setObjUrl(ae)}let S=[];(o=r.cloneDeep(h.value))==null||o.forEach(l=>{var T,I,Z,E,z,U,J,ne,ye,ge,be,fe,ke;if((I=(T=l==null?void 0:l.value)==null?void 0:T.toString())!=null&&I.includes(".stl")||(E=(Z=l==null?void 0:l.value)==null?void 0:Z.toString())!=null&&E.includes(".STL")||(U=(z=l==null?void 0:l.value)==null?void 0:z.toString())!=null&&U.includes(".obj")||(ne=(J=l==null?void 0:l.value)==null?void 0:J.toString())!=null&&ne.includes(".mtl")||(ge=(ye=l==null?void 0:l.value)==null?void 0:ye.toString())!=null&&ge.includes(".urdf")){let me={},ve=[],pe;Array.isArray(l==null?void 0:l.value)?pe=l==null?void 0:l.value:pe=(be=l==null?void 0:l.value)==null?void 0:be.split(","),pe==null||pe.forEach(a=>{a.includes(".mtl")?ve.push(a):me.blob=me.blob==="undefined"?a:me.blob+","+a}),(ve==null?void 0:ve.length)>0&&(me.mtlBlobs=ve),(ke=(fe=Object.values(me))==null?void 0:fe[0])!=null&&ke.includes("http:")&&S.push(me)}}),(S==null?void 0:S.length)>0&&V.setBlobUrls(S)}else h.value=[];if(((b=P==null?void 0:P.contents)==null?void 0:b.length)>0){const _=[];(j=P==null?void 0:P.contents)==null||j.forEach((L,ee)=>{(L==null?void 0:L.label)!==""&&_.push({label:(L==null?void 0:L.label)??"",id:(L==null?void 0:L.id)??ee,type:(L==null?void 0:L.type)??"",background:L==null?void 0:L.background})}),M.value=_}else M.value=[]},{deep:!0,immediate:!0}),(q,P)=>(e.openBlock(),e.createElementBlock("div",He,[e.createVNode(ce.ssForm,{rowContents:h.value,formRules:k.formRules,buttonValue:M.value,isRowFlex:!1,isEnableWrap:F.value,onOnButtonClick:Q,onChange:K,isButtonRow:w.value},null,8,["rowContents","formRules","buttonValue","isEnableWrap","isButtonRow"])]))}},Le=he._export_sfc(Qe,[["__scopeId","data-v-a7f671b4"]]),Te=e.ref(0),Pe=k=>{var $;return!k||(k==null?void 0:k.length)===0?[]:($=r.cloneDeep(k))==null?void 0:$.map(t=>(Te.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"center",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??Te.value,children:Pe(t==null?void 0:t.children)},t))},Xe=k=>{var v;return(v=r.cloneDeep(k))==null?void 0:v.map(t=>(Te.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"center",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??Te.value,children:Pe(t==null?void 0:t.children)},t))},Ue=(k,$)=>{var v;return k!=null&&k.find(t=>(t==null?void 0:t.id)===$)?(v=r.cloneDeep(k))==null?void 0:v.filter(h=>(h==null?void 0:h.id)!==$):(k=k==null?void 0:k.map(t=>(t.children=Ue(t==null?void 0:t.children,$),t)),k)},je=(k,$)=>{var v;return k!=null&&k.find(t=>(t==null?void 0:t.id)===($==null?void 0:$.id))?(v=r.cloneDeep(k))==null?void 0:v.map(h=>((h==null?void 0:h.id)===($==null?void 0:$.id)&&(h=$),h)):(k=k==null?void 0:k.map(t=>(t.children=je(t==null?void 0:t.children,$),t)),k)},We=(k,$)=>{var v;return k!=null&&k.find(t=>{var h;return(t==null?void 0:t.id)===((h=$==null?void 0:$.contents)==null?void 0:h.id)})?(v=r.cloneDeep(k))==null?void 0:v.map(h=>{var w;return(h==null?void 0:h.id)===((w=$==null?void 0:$.contents)==null?void 0:w.id)&&(h=$==null?void 0:$.contents),h}):(k=k==null?void 0:k.map(t=>(t.children=We(t==null?void 0:t.children,$),t)),k)},ze=(k,$)=>{var v;return k!=null&&k.find(t=>(t==null?void 0:t.id)===($==null?void 0:$.id))?(v=r.cloneDeep(k))==null?void 0:v.map(h=>((h==null?void 0:h.id)===($==null?void 0:$.id)&&(h!=null&&h.children||(h.children=[]),h.children.push($.contents)),h)):(k=k==null?void 0:k.map(t=>(t.children=ze(t==null?void 0:t.children,$),t)),k)},re=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],Ye=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Ze=[{label:"新增",value:"add"}],Be=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ze},{key:"background",label:"按钮背景色",type:"Color"}],Ve=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ye},{key:"textColor",label:"按钮颜色",type:"Color"}],el={class:"table-header-child"},ll={class:"table-header-child-main"},al={class:"table-header-child-content"},ol={class:"table-header-child-content-item"},nl={class:"fix-button"},tl={key:0},sl={class:"form-content"},il={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(k,{emit:$}){const v=k,t=$,h=e.ref(!1),w=e.ref(""),M=De.useTableComp(oe.pinia),{tableIndex:y}=oe.storeToRefs(M);e.ref(0);const V=e.ref(""),F=e.ref([]),N=e.ref([]),Q=n=>{var s;h.value=!0;let c=[];re==null||re.forEach(i=>{let m=r.cloneDeep(y.value)+1;M.setTableIndex(m),c.push({label:i==null?void 0:i.label,name:i==null?void 0:i.label,type:i.type,value:n[i.key],id:y.value,contents:i==null?void 0:i.options})}),n!=null&&n.children&&((s=n==null?void 0:n.children)==null?void 0:s.length)>0&&c.push({children:n==null?void 0:n.children,isFormColHidden:!0}),V.value=n==null?void 0:n.id,F.value=c,N.value=c},K=n=>{t("fixChange",r.cloneDeep(n))},q=n=>{t("deleteChange",r.cloneDeep(n))},P=n=>{h.value=!0;let c=[];re==null||re.forEach(s=>{let i=r.cloneDeep(y.value)+1;M.setTableIndex(i),c.push({label:s==null?void 0:s.label,name:s==null?void 0:s.label,type:s.type,value:"",id:y.value,contents:s==null?void 0:s.options})}),w.value=n==null?void 0:n.id,F.value=c,N.value=c},g=n=>{let c=r.cloneDeep(N.value);c=c==null?void 0:c.map(s=>(s.children||(s.value=n==null?void 0:n[s.name]),s)),N.value=c},p=()=>{var c,s;F.value=N.value;let n={};if(V.value!=="")n.id=V.value,(c=F.value)==null||c.forEach(i=>{const m=re==null?void 0:re.find(W=>(W==null?void 0:W.label)===(i==null?void 0:i.label));m?n[m.key]=i.value:i!=null&&i.children&&i.children.length>0&&(n.children=i.children)}),h.value=!1,t("fixChange",{contents:r.cloneDeep(n),id:w.value,type:"fix"});else{let i=r.cloneDeep(y.value)+1;M.setTableIndex(i),n.id="id"+y.value,(s=F.value)==null||s.forEach(m=>{const W=re==null?void 0:re.find(H=>(H==null?void 0:H.label)===(m==null?void 0:m.label));W?n[W.key]=m.value:m!=null&&m.children&&m.children.length>0&&(n.children=m.children)}),h.value=!1,t("fixChange",{contents:r.cloneDeep(n),id:w.value,type:"add"})}V.value="",F.value=[],N.value=[]},d=()=>{h.value=!1,V.value="",w.value="",F.value=[],N.value=[]},A=n=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",n),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(n,c)=>{const s=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",el,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v==null?void 0:v.tableChildContents,(i,m)=>(e.openBlock(),e.createElementBlock("div",ll,[e.createElementVNode("div",al,[e.createElementVNode("div",ol,e.toDisplayString(i.label),1),e.createElementVNode("div",nl,[e.createVNode(s,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:W=>P(i)},null,8,["onClick"]),e.createVNode(s,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:W=>Q(i)},null,8,["onClick"]),e.createVNode(s,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:W=>A(i)},null,8,["onClick"])])]),i!=null&&i.children&&i.children.length>0?(e.openBlock(),e.createElementBlock("div",tl,[e.createVNode(Ke,{tableChildContents:i==null?void 0:i.children,onDeleteChange:q,onFixChange:K},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(ce.ssDialog,{visible:h.value,onBeforeDestroy:d,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",sl,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:d,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:p},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},rl=he._export_sfc(il,[["__scopeId","data-v-e0fef72d"]]),cl={class:"table-header-child"},ul={class:"table-header-child-main"},dl={class:"table-header-child-content"},pl={class:"table-header-child-content-item"},ml={class:"fix-button"},fl={key:0},vl={class:"form-content"},hl={class:"dialog-footer"},yl={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(k,{emit:$}){const v=k,t=$,h=e.ref(!1),w=e.ref(""),M=De.useTableComp(oe.pinia),{tableIndex:y}=oe.storeToRefs(M),V=e.ref(""),F=e.ref([]),N=e.ref([]),Q=n=>{t("fixChange",r.cloneDeep(n))},K=n=>{var s;h.value=!0;let c=[];re==null||re.forEach(i=>{let m=r.cloneDeep(y.value)+1;M.setTableIndex(m),c.push({label:i==null?void 0:i.label,name:i==null?void 0:i.label,type:i.type,value:n[i.key],id:y.value,contents:i==null?void 0:i.options})}),n!=null&&n.children&&((s=n==null?void 0:n.children)==null?void 0:s.length)>0&&c.push({children:n==null?void 0:n.children,isFormColHidden:!0}),V.value=n==null?void 0:n.id,F.value=c,N.value=c},q=n=>{h.value=!0;let c=[];re==null||re.forEach(s=>{let i=r.cloneDeep(y.value)+1;M.setTableIndex(i),c.push({label:s==null?void 0:s.label,name:s==null?void 0:s.label,type:s.type,value:"",id:y.value,contents:s==null?void 0:s.options})}),w.value=n==null?void 0:n.id,F.value=c,N.value=c},P=n=>{let c=r.cloneDeep(N.value);c=c==null?void 0:c.map(s=>(s.children||(s.value=n==null?void 0:n[s.name]),s)),N.value=c},g=()=>{var c,s;F.value=N.value;let n={};if(V.value!=="")n.id=V.value,(c=F.value)==null||c.forEach(i=>{const m=re==null?void 0:re.find(W=>(W==null?void 0:W.label)===(i==null?void 0:i.label));m?n[m.key]=i.value:i!=null&&i.children&&i.children.length>0&&(n.children=i.children)}),h.value=!1,t("fixChange",{contents:r.cloneDeep(n),id:w.value,type:"fix"});else{let i=r.cloneDeep(y.value)+1;M.setTableIndex(i),n.id="idChild"+y.value,(s=F.value)==null||s.forEach(m=>{const W=re==null?void 0:re.find(H=>(H==null?void 0:H.label)===(m==null?void 0:m.label));W?n[W.key]=m.value:m!=null&&m.children&&m.children.length>0&&(n.children=m.children)}),h.value=!1,t("fixChange",{contents:r.cloneDeep(n),id:w.value,type:"add"})}V.value="",F.value=[],N.value=[]},p=()=>{h.value=!1,V.value="",w.value="",F.value=[],N.value=[]},d=n=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",n),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},A=n=>{t("deleteChange",n)};return(n,c)=>{const s=e.resolveComponent("svg-icon"),i=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v==null?void 0:v.tableChildContents,(m,W)=>(e.openBlock(),e.createElementBlock("div",ul,[e.createElementVNode("div",dl,[e.createElementVNode("div",pl,e.toDisplayString(m.label),1),e.createElementVNode("div",ml,[e.createVNode(s,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>q(m)},null,8,["onClick"]),e.createVNode(s,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>K(m)},null,8,["onClick"]),e.createVNode(s,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:H=>d(m)},null,8,["onClick"])])]),m!=null&&m.children&&m.children.length>0?(e.openBlock(),e.createElementBlock("div",fl,[e.createVNode(rl,{tableChildContents:m==null?void 0:m.children,onDeleteChange:A,onFixChange:Q},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(ce.ssDialog,{visible:h.value,onBeforeDestroy:p,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vl,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:P},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",hl,[e.createVNode(i,{onClick:p,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>c[0]||(c[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(i,{class:"ok-button button",onClick:g,id:"themeButton"},{default:e.withCtx(()=>c[1]||(c[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Ke=he._export_sfc(yl,[["__scopeId","data-v-ebd68fa1"]]),Cl={class:"table-operate-content"},gl={class:"table-operate-item"},bl={class:"operate-title"},kl={class:"operate-content"},_l={class:"fix-content"},Dl={class:"fix-content-label"},xl={class:"fix-button"},El={key:0},wl={class:"operate-title"},Bl={class:"operate-content"},Vl={class:"fix-content"},Nl={class:"fix-content-label"},Tl={class:"fix-button"},Il={class:"operate-title"},$l={class:"operate-content"},Fl={class:"fix-content"},Sl={class:"fix-content-label"},Al={class:"fix-button"},Ll={class:"operate-title"},Ol={class:"operate-content"},Rl={class:"fix-content"},Ml={class:"fix-content-label"},Pl={class:"fix-button"},Ul={class:"operate-content"},jl={style:{display:"flex","justify-content":"space-between"}},Wl={class:"form-content"},zl={class:"dialog-footer"},Kl={class:"form-content"},ql={class:"dialog-footer"},Jl={class:"form-content"},Gl={class:"dialog-footer"},Hl={class:"form-content"},Ql={class:"dialog-footer"},Xl={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(k,{emit:$}){const v=k,t=$,h=e.ref([]),w=e.ref(!1),M=e.ref(!1),y=e.ref([]),V=e.ref(!1),F=e.ref([]),N=e.ref(!1),Q=e.ref([]),K=e.ref(""),q=e.ref(""),P=e.ref([]),g=e.ref([]),p=e.ref([]),d=e.ref([]),A=e.ref(!1),n=e.ref([]),c=e.ref([]),s=e.ref(0),i=e.ref([]),m=e.ref([]),W=e.ref([]),H=()=>{A.value=!0;let a=[];Be==null||Be.forEach(u=>{s.value++,a.push({label:u==null?void 0:u.label,name:u==null?void 0:u.label,type:u.type,value:(u==null?void 0:u.key)==="background"?"var(--ssComponent-primary-color)":"",id:s.value,contents:u==null?void 0:u.options})}),n.value=a,c.value=a},te=()=>{var u,f,D;M.value=!0;let a=[];(D=(f=(u=r.FormContent)==null?void 0:u.find(x=>(x==null?void 0:x.key)==="Input"))==null?void 0:f.value)==null||D.forEach(x=>{s.value++,a.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:(x==null?void 0:x.label)==="类型"?"Input":"",id:s.value,contents:x==null?void 0:x.options})}),i.value=a,m.value=a},ie=a=>{a||(i.value=m.value)},o=async a=>{var u,f,D,x,X,Y,R,O,ue,Ce,xe,se;if((a==null?void 0:a.类型)!==((f=(u=m.value)==null?void 0:u.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:f.value)){let G=[],de=await((X=(x=(D=r.FormContent)==null?void 0:D.find(le=>(le==null?void 0:le.key)===((a==null?void 0:a.类型)===""?"Input":a==null?void 0:a.类型)))==null?void 0:x.value)==null?void 0:X.value)?await((Ce=(ue=(O=r.FormContent)==null?void 0:O.find(le=>(le==null?void 0:le.key)===((a==null?void 0:a.类型)===""?"Input":a==null?void 0:a.类型)))==null?void 0:ue.value)==null?void 0:Ce.value):(R=(Y=r.FormContent)==null?void 0:Y.find(le=>(le==null?void 0:le.key)===((a==null?void 0:a.类型)===""?"Input":a==null?void 0:a.类型)))==null?void 0:R.value;if(de==null||de.forEach(le=>{s.value++,G.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:(a==null?void 0:a[le.label])??"",id:s.value,contents:le==null?void 0:le.options})}),a!=null&&a.菜单选项&&((xe=a==null?void 0:a.菜单选项)==null?void 0:xe.length)>0){const le=await r.menuToContentType(a==null?void 0:a.菜单选项);G=G==null?void 0:G.map(_e=>((_e==null?void 0:_e.name)==="组信息选项"&&(_e.contents=le),_e))}m.value=await r.selectToBase(r.cloneDeep(G)),i.value=await r.selectToBase(r.cloneDeep(G))}else{let G=r.cloneDeep(i.value);if(G=G==null?void 0:G.map(de=>(de.value=a==null?void 0:a[de.name],de)),a!=null&&a.菜单选项&&((se=a==null?void 0:a.菜单选项)==null?void 0:se.length)>0){const de=await r.menuToContentType(a==null?void 0:a.菜单选项);G=G==null?void 0:G.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=de),le))}G=r.formToOptionsContents(G),m.value=await r.selectToBase(r.cloneDeep(G))}},b=async a=>{await o(a),i.value=m.value},j=async a=>{var D,x,X,Y,R,O,ue,Ce,xe;M.value=!0;let u=[];const f=await((X=(x=(D=r.FormContent)==null?void 0:D.find(se=>(se==null?void 0:se.key)===((a==null?void 0:a.type)===""?"Input":a==null?void 0:a.type)))==null?void 0:x.value)==null?void 0:X.value)?await((Ce=(ue=(O=r.FormContent)==null?void 0:O.find(se=>(se==null?void 0:se.key)===((a==null?void 0:a.type)===""?"Input":a==null?void 0:a.type)))==null?void 0:ue.value)==null?void 0:Ce.value):(R=(Y=r.FormContent)==null?void 0:Y.find(se=>(se==null?void 0:se.key)===((a==null?void 0:a.type)===""?"Input":a==null?void 0:a.type)))==null?void 0:R.value;if(f==null||f.forEach(se=>{s.value++,u.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"&&a[se.key]===""?"Input":a[se.key],id:s.value,contents:se==null?void 0:se.options})}),a!=null&&a.menuSelect&&((xe=a==null?void 0:a.menuSelect)==null?void 0:xe.length)>0){const se=await r.menuToContentType(a==null?void 0:a.menuSelect);u=u==null?void 0:u.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=se),G))}K.value=a==null?void 0:a.id,i.value=await r.selectToBase(r.formToOptionsContents(u)),m.value=await r.selectToBase(r.formToOptionsContents(u))},_=a=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var u,f;W.value=(u=r.cloneDeep(W.value))==null?void 0:u.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)),t("change",(f=r.cloneDeep(v.originalItemContents))==null?void 0:f.map(D=>((D==null?void 0:D.key)==="tableToForm"&&(D.contents=W.value),D))),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>{M.value=!1,i.value=[],K.value=""},ee=async()=>{var D,x,X,Y,R,O,ue,Ce,xe,se;i.value=m.value;let a={};K.value!==""?a.id=K.value:(s.value++,a.id="id"+s.value);let u=await((X=(x=(D=r.FormContent)==null?void 0:D.find(G=>{var de,le;return(G==null?void 0:G.key)===(((le=(de=i.value)==null?void 0:de.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:x.value)==null?void 0:X.value)??((R=(Y=r.FormContent)==null?void 0:Y.find(G=>{var de,le;return(G==null?void 0:G.key)===(((le=(de=i.value)==null?void 0:de.find(_e=>(_e==null?void 0:_e.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:R.value);if((O=i.value)==null||O.forEach(G=>{const de=u==null?void 0:u.find(le=>(le==null?void 0:le.label)===(G==null?void 0:G.label));de&&(a[de.key]=G.value)}),a.name=a.label,(ue=W.value)!=null&&ue.find(G=>G.id===a.id))W.value=(Ce=W.value)==null?void 0:Ce.map(G=>(G.id===a.id&&(G=a),G));else{let G=r.cloneDeep(W.value);W.value||(W.value=[]),G.push(a),W.value=G}W.value=W.value.map(({id:G,...de})=>de),M.value=!1,K.value="";let f=r.cloneDeep(v.originalItemContents);(xe=r.cloneDeep(v.originalItemContents))!=null&&xe.find(G=>(G==null?void 0:G.key)==="tableToForm")?f=(se=r.cloneDeep(v.originalItemContents))==null?void 0:se.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=W.value),G)):f.push({key:"tableToForm",contents:W.value}),t("change",f)},ae=a=>{A.value=!0;let u=[];Be==null||Be.forEach(f=>{s.value++,u.push({label:f==null?void 0:f.label,name:f==null?void 0:f.label,type:f.type,value:a[f.key],id:s.value,contents:f==null?void 0:f.options})}),K.value=a==null?void 0:a.id,n.value=u,c.value=u};e.watch(()=>N.value,()=>{var u,f;let a=r.cloneDeep(v.originalItemContents);(u=r.cloneDeep(v.originalItemContents))!=null&&u.find(D=>(D==null?void 0:D.key)==="page")?a=(f=r.cloneDeep(v.originalItemContents))==null?void 0:f.map(D=>((D==null?void 0:D.key)==="page"&&(D.contents=N.value),D)):a.push({key:"page",contents:N.value}),t("change",a)},{deep:!0});const C=a=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var u,f;g.value=(u=r.cloneDeep(g.value))==null?void 0:u.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)),t("change",(f=r.cloneDeep(v.originalItemContents))==null?void 0:f.map(D=>((D==null?void 0:D.key)==="extraButton"&&(D.contents=g.value),D))),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},S=()=>{var f,D,x,X,Y;n.value=c.value;let a={};if(K.value!==""?a.id=K.value:(s.value++,a.id="id"+s.value),(f=n.value)==null||f.forEach(R=>{const O=Be==null?void 0:Be.find(ue=>(ue==null?void 0:ue.label)===(R==null?void 0:R.label));O?a[O.key]=R.value:R!=null&&R.children&&R.children.length>0&&(a.children=R.children)}),(D=g.value)!=null&&D.find(R=>R.id===a.id))g.value=(x=g.value)==null?void 0:x.map(R=>(R.id===a.id&&(R=a),R));else{let R=r.cloneDeep(g.value)??[];R.push(a),g.value=R}A.value=!1,K.value="";let u=r.cloneDeep(v.originalItemContents);(X=r.cloneDeep(v.originalItemContents))!=null&&X.find(R=>(R==null?void 0:R.key)==="extraButton")?u=(Y=r.cloneDeep(v.originalItemContents))==null?void 0:Y.map(R=>((R==null?void 0:R.key)==="extraButton"&&(R.contents=g.value),R)):u.push({key:"extraButton",contents:g.value}),t("change",u)},l=a=>{let u=r.cloneDeep(c.value);u=u==null?void 0:u.map(f=>(f.children||(f.value=a==null?void 0:a[f.name]),f)),c.value=u},T=()=>{A.value=!1,n.value=[],K.value=""},I=a=>{V.value=!0;let u=[];Ve==null||Ve.forEach(f=>{s.value++,u.push({label:f==null?void 0:f.label,name:f==null?void 0:f.label,type:f.type,value:a[f.key],id:s.value,contents:f==null?void 0:f.options})}),K.value=a==null?void 0:a.id,p.value=u,d.value=u},Z=a=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var u,f;P.value=(u=r.cloneDeep(P.value))==null?void 0:u.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)),t("change",(f=r.cloneDeep(v.originalItemContents))==null?void 0:f.map(D=>((D==null?void 0:D.key)==="rowButton"&&(D.contents=P.value),D))),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=()=>{w.value=!0;let a=[];re==null||re.forEach(u=>{s.value++,a.push({label:u==null?void 0:u.label,name:u==null?void 0:u.label,type:u.type,value:"",id:s.value,contents:u==null?void 0:u.options})}),F.value=a,Q.value=a},z=()=>{V.value=!0;let a=[];Ve==null||Ve.forEach(u=>{s.value++,a.push({label:u==null?void 0:u.label,name:u==null?void 0:u.label,type:u.type,value:"",id:s.value,contents:u==null?void 0:u.options})}),p.value=a,d.value=a},U=a=>{let u=r.cloneDeep(d.value);u=u==null?void 0:u.map(f=>(f.children||(f.value=a==null?void 0:a[f.name]),f)),d.value=u},J=()=>{var f,D,x,X,Y;p.value=d.value;let a={};if(K.value!==""?a.id=K.value:(s.value++,a.id="id"+s.value),(f=p.value)==null||f.forEach(R=>{const O=Ve==null?void 0:Ve.find(ue=>(ue==null?void 0:ue.label)===(R==null?void 0:R.label));O?a[O.key]=R.value:R!=null&&R.children&&R.children.length>0&&(a.children=R.children)}),(D=P.value)!=null&&D.find(R=>R.id===a.id))P.value=(x=P.value)==null?void 0:x.map(R=>(R.id===a.id&&(R=a),R));else{let R=r.cloneDeep(P.value);R.push(a),P.value=R}V.value=!1,K.value="";let u=r.cloneDeep(v.originalItemContents);(X=r.cloneDeep(v.originalItemContents))!=null&&X.find(R=>(R==null?void 0:R.key)==="rowButton")?u=(Y=r.cloneDeep(v.originalItemContents))==null?void 0:Y.map(R=>((R==null?void 0:R.key)==="rowButton"&&(R.contents=P.value),R)):u.push({key:"rowButton",contents:P.value}),t("change",u)},ne=()=>{V.value=!1,K.value="",d.value=[],p.value=[]},ye=a=>{w.value=!0;let u=[];re==null||re.forEach(f=>{s.value++,u.push({label:f==null?void 0:f.label,name:f==null?void 0:f.label,type:f.type,value:"",id:s.value,contents:f==null?void 0:f.options})}),F.value=u,q.value=a==null?void 0:a.id,Q.value=u},ge=a=>{var u;y.value=Ue(r.cloneDeep(y.value),a==null?void 0:a.id),t("change",(u=r.cloneDeep(v.originalItemContents))==null?void 0:u.map(f=>{var D;return(f==null?void 0:f.key)==="header"&&(f.contents=(D=y.value)!=null&&D.some(x=>x==null?void 0:x.children)?[y.value]:y.value),f}))},be=a=>{var f,D,x;a.type==="fix"?a.id!==""?y.value=We(y.value,a):y.value=je(y.value,a==null?void 0:a.contents):y.value=ze(y.value,a),y.value=(f=y.value)!=null&&f.some(X=>X==null?void 0:X.children)?[y.value]:y.value,K.value="";let u=r.cloneDeep(v.originalItemContents);(D=r.cloneDeep(v.originalItemContents))!=null&&D.find(X=>(X==null?void 0:X.key)==="header")?u=(x=r.cloneDeep(v.originalItemContents))==null?void 0:x.map(X=>((X==null?void 0:X.key)==="header"&&(X.contents=y.value),X)):u.push({key:"header",contents:y.value}),t("change",u)},fe=a=>{var f;w.value=!0;let u=[];re==null||re.forEach(D=>{s.value++,u.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:a[D.key],id:s.value,contents:D==null?void 0:D.options})}),a!=null&&a.children&&((f=a==null?void 0:a.children)==null?void 0:f.length)>0&&u.push({children:a==null?void 0:a.children,isFormColHidden:!0}),K.value=a==null?void 0:a.id,q.value="",F.value=u,Q.value=u},ke=a=>{let u=r.cloneDeep(Q.value);u=u==null?void 0:u.map(f=>(f.children||(f.value=a==null?void 0:a[f.name]),f)),Q.value=u},me=()=>{w.value=!1,K.value="",q.value="",Q.value=[]},ve=()=>{var f,D,x,X,Y,R;F.value=Q.value;let a={};if(K.value!==""?a.id=K.value:(s.value++,a.id="id"+s.value),(f=F.value)==null||f.forEach(O=>{const ue=re==null?void 0:re.find(Ce=>(Ce==null?void 0:Ce.label)===(O==null?void 0:O.label));ue?a[ue.key]=O.value:O!=null&&O.children&&O.children.length>0&&(a.children=O.children)}),(D=y.value)!=null&&D.find(O=>O.id===a.id))y.value=(x=y.value)==null?void 0:x.map(O=>(O.id===a.id&&(O=a),O));else{let O=r.cloneDeep(y.value)??[];q.value===""?O.push(a):O=O==null?void 0:O.map(ue=>(ue.id===q.value&&(ue.children||(ue.children=[]),ue.children.push(a)),ue)),y.value=O}y.value=(X=y.value)!=null&&X.some(O=>O==null?void 0:O.children)?[y.value]:y.value,w.value=!1,K.value="",q.value="";let u=r.cloneDeep(v.originalItemContents);(Y=r.cloneDeep(v.originalItemContents))!=null&&Y.find(O=>(O==null?void 0:O.key)==="header")?u=(R=r.cloneDeep(v.originalItemContents))==null?void 0:R.map(O=>((O==null?void 0:O.key)==="header"&&(O.contents=y.value),O)):u.push({key:"header",contents:y.value}),t("change",u)},pe=a=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var u,f;y.value=(u=r.cloneDeep(y.value))==null?void 0:u.filter(D=>(D==null?void 0:D.id)!==(a==null?void 0:a.id)),t("change",(f=r.cloneDeep(v.originalItemContents))==null?void 0:f.map(D=>{var x;return(D==null?void 0:D.key)==="header"&&(D.contents=(x=y.value)!=null&&x.some(X=>X==null?void 0:X.children)?[y.value]:y.value),D})),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>v.originalItemContents,()=>{var a,u,f,D,x,X,Y,R,O,ue,Ce,xe,se,G,de,le,_e,Fe,Se;if(!(!v.originalItemContents||v.originalItemContents.length===0))if(h.value=r.cloneDeep(v.originalItemContents),y.value=(u=(a=h.value)==null?void 0:a.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:u.contents,P.value=(D=(f=h.value)==null?void 0:f.find(B=>(B==null?void 0:B.key)==="rowButton"))==null?void 0:D.contents,g.value=(X=(x=h.value)==null?void 0:x.find(B=>(B==null?void 0:B.key)==="extraButton"))==null?void 0:X.contents,N.value=(R=(Y=h.value)==null?void 0:Y.find(B=>(B==null?void 0:B.key)==="page"))!=null&&R.contents?!!((ue=(O=h.value)==null?void 0:O.find(B=>(B==null?void 0:B.key)==="page"))!=null&&ue.contents):!1,W.value=(xe=(Ce=h.value)==null?void 0:Ce.find(B=>(B==null?void 0:B.key)==="tableToForm"))==null?void 0:xe.contents,y.value=(se=y.value)==null?void 0:se.map((B,we)=>(Array.isArray(B)?B=Xe(B):B={label:(B==null?void 0:B.label)??"",prop:(B==null?void 0:B.label)==="操作"?"operate":B==null?void 0:B.prop,width:B!=null&&B.width?parseInt(B.width):"",fixed:(B==null?void 0:B.fixed)??void 0,sortable:(B==null?void 0:B.sortable)??!1,align:(B==null?void 0:B.align)??"center",showOverflowTooltip:(B==null?void 0:B.showOverflowTooltip)??!0,isNotDrag:(B==null?void 0:B.isNotDrag)??!1,isEditCol:(B==null?void 0:B.isEditCol)??!1,isOperate:(B==null?void 0:B.isOperate)??!1,id:(B==null?void 0:B.id)??we},B)),y.value=(G=y.value)!=null&&G.every(B=>Array.isArray(B))?(de=y.value)==null?void 0:de[0]:y.value,P.value=(le=P.value)==null?void 0:le.map((B,we)=>B={label:(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",textColor:(B==null?void 0:B.textColor)??"#000000",id:(B==null?void 0:B.id)??we}),g.value=(_e=g.value)==null?void 0:_e.map((B,we)=>B={label:(B==null?void 0:B.label)??"",type:(B==null?void 0:B.type)??"",background:(B==null?void 0:B.background)??"var(--ssComponent-primary-color)",id:(B==null?void 0:B.id)??we}),W.value)W.value=(Se=W.value)==null?void 0:Se.map(B=>{s.value++;let we=B;return we.id=s.value,we});else{let B=[];const we=(Fe=r.getColumnChild(r.cloneDeep(y.value)))==null?void 0:Fe.filter(Ee=>(Ee==null?void 0:Ee.prop)!=="operate");we==null||we.forEach(Ee=>{s.value++,B.push({label:Ee==null?void 0:Ee.label,name:Ee==null?void 0:Ee.label,type:"Input",value:"",id:s.value,contents:Ee==null?void 0:Ee.options})}),W.value=B}},{deep:!0,immediate:!0}),(a,u)=>{const f=e.resolveComponent("svg-icon"),D=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Cl,[e.createElementVNode("div",gl,[e.createElementVNode("div",bl,[u[2]||(u[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(D,{class:"icon-content",onClick:E,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(f,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[u[1]||(u[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",kl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(x,X)=>(e.openBlock(),e.createElementBlock("div",{key:X},[e.createElementVNode("div",_l,[e.createElementVNode("div",Dl,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",xl,[e.createVNode(f,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Y=>ye(x)},null,8,["onClick"]),e.createVNode(f,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Y=>fe(x)},null,8,["onClick"]),e.createVNode(f,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Y=>pe(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",El,[e.createVNode(Ke,{tableChildContents:x==null?void 0:x.children,onDeleteChange:ge,onFixChange:be},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",wl,[u[4]||(u[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(D,{class:"icon-content",id:"themeButton",onClick:z},{icon:e.withCtx(()=>[e.createVNode(f,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[u[3]||(u[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Bl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(x,X)=>(e.openBlock(),e.createElementBlock("div",{key:X},[e.createElementVNode("div",Vl,[e.createElementVNode("div",Nl,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Tl,[e.createVNode(f,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Y=>I(x)},null,8,["onClick"]),e.createVNode(f,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Y=>Z(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Il,[u[6]||(u[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(D,{class:"icon-content",id:"themeButton",onClick:H},{icon:e.withCtx(()=>[e.createVNode(f,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[u[5]||(u[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",$l,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(x,X)=>(e.openBlock(),e.createElementBlock("div",{key:X},[e.createElementVNode("div",Fl,[e.createElementVNode("div",Sl,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Al,[e.createVNode(f,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Y=>ae(x)},null,8,["onClick"]),e.createVNode(f,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Y=>C(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ll,[u[8]||(u[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(D,{class:"icon-content",id:"themeButton",onClick:te},{icon:e.withCtx(()=>[e.createVNode(f,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[u[7]||(u[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(x,X)=>(e.openBlock(),e.createElementBlock("div",{key:X},[e.createElementVNode("div",Rl,[e.createElementVNode("div",Ml,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Pl,[e.createVNode(f,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Y=>j(x)},null,8,["onClick"]),e.createVNode(f,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Y=>_(x)},null,8,["onClick"])])])]))),128))]),u[10]||(u[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Ul,[e.createElementVNode("div",jl,[u[9]||(u[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(ce._sfc_main$3,{modelValue:N.value,"onUpdate:modelValue":u[0]||(u[0]=x=>N.value=x)},null,8,["modelValue"])])])]),e.createVNode(ce.ssDialog,{visible:w.value,onBeforeDestroy:me,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wl,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zl,[e.createVNode(D,{onClick:me,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>u[11]||(u[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(D,{class:"ok-button button",onClick:ve,id:"themeButton"},{default:e.withCtx(()=>u[12]||(u[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(ce.ssDialog,{visible:V.value,onBeforeDestroy:ne,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Kl,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!0,onChange:U},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ql,[e.createVNode(D,{onClick:ne,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>u[13]||(u[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(D,{class:"ok-button button",onClick:J,id:"themeButton"},{default:e.withCtx(()=>u[14]||(u[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(ce.ssDialog,{visible:A.value,onBeforeDestroy:T,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Jl,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:n.value,key:n.value,isEnableWrap:!0,onChange:l},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gl,[e.createVNode(D,{onClick:T,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>u[15]||(u[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(D,{class:"ok-button button",onClick:S,id:"themeButton"},{default:e.withCtx(()=>u[16]||(u[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(ce.ssDialog,{visible:M.value,onBeforeDestroy:L,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hl,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:i.value,key:i.value,isEnableWrap:!0,onChange:o,onChangeVisible:ie,onBlurChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ql,[e.createVNode(D,{onClick:L,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>u[17]||(u[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(D,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>u[18]||(u[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Yl=he._export_sfc(Xl,[["__scopeId","data-v-cd274ba4"]]),Zl={class:"form-operate-content"},ea={class:"form-operate-item"},la={class:"operate-title"},aa={class:"operate-content"},oa={class:"fix-content"},na={class:"fix-button"},ta={class:"operate-title"},sa={class:"operate-content"},ia={class:"fix-content"},ra={class:"fix-button"},ca={style:{display:"flex","justify-content":"space-between"}},ua={class:"form-content"},da={class:"dialog-footer"},pa={class:"form-content"},ma={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(k,{emit:$}){const v=k,t=$,h=e.ref(!1),w=e.ref([]),M=e.ref([]),y=e.ref(!1),V=e.ref([]),F=e.ref([]),N=e.ref(""),Q=e.ref(!1),K=e.ref(0),q=e.ref([]),P=e.ref([]),g=async o=>{var _,L,ee,ae,C,S;h.value=!0;let b=[];const j=await((ee=(L=(_=r.FormContent)==null?void 0:_.find(l=>(l==null?void 0:l.key)===((o==null?void 0:o.type)===""?"Input":o==null?void 0:o.type)))==null?void 0:L.value)==null?void 0:ee.value)??((C=(ae=r.FormContent)==null?void 0:ae.find(l=>(l==null?void 0:l.key)===((o==null?void 0:o.type)===""?"Input":o==null?void 0:o.type)))==null?void 0:C.value);if(j==null||j.forEach(l=>{K.value++,b.push({label:l==null?void 0:l.label,name:l==null?void 0:l.label,type:l.type,value:(l==null?void 0:l.label)==="类型"&&o[l.key]===""?"Input":o[l.key],id:K.value,contents:l==null?void 0:l.options})}),o!=null&&o.menuSelect&&((S=o==null?void 0:o.menuSelect)==null?void 0:S.length)>0){const l=await r.menuToContentType(o==null?void 0:o.menuSelect);b=b==null?void 0:b.map(T=>((T==null?void 0:T.name)==="组信息选项"&&(T.contents=l),T))}N.value=o==null?void 0:o.id,w.value=await r.selectToBase(r.formToOptionsContents(b)),M.value=await r.selectToBase(r.formToOptionsContents(b))},p=o=>{var j;y.value=!0;let b=[];(j=r.FormButton)==null||j.forEach(_=>{K.value++,b.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:(_==null?void 0:_.label)==="类型"&&o[_.key]===""?"normal":o[_.key],id:K.value,contents:_==null?void 0:_.options})}),q.value=b,P.value=b,N.value=o==null?void 0:o.id};e.watch(()=>Q.value,()=>{var b,j;let o=r.cloneDeep(v.originalItemContents);(b=r.cloneDeep(v.originalItemContents))!=null&&b.find(_=>(_==null?void 0:_.key)==="enableWrap")?o=(j=r.cloneDeep(v.originalItemContents))==null?void 0:j.map(_=>((_==null?void 0:_.key)==="enableWrap"&&(_.contents=!Q.value),_)):o.push({key:"enableWrap",contents:!Q.value}),t("change",o)},{deep:!0});const d=()=>{var j,_,L,ee,ae;q.value=P.value;let o={};if(N.value!==""?o.id=N.value:(K.value++,o.id="id"+K.value),(j=q.value)==null||j.forEach(C=>{var l;const S=(l=r.FormButton)==null?void 0:l.find(T=>(T==null?void 0:T.label)===(C==null?void 0:C.label));S&&(o[S.key]=C.value)}),(_=V.value)!=null&&_.find(C=>C.id===o.id))V.value=(L=V.value)==null?void 0:L.map(C=>(C.id===o.id&&(C=o),C));else{let C=r.cloneDeep(V.value);V.value||(V.value=[]),C.push(o),V.value=C}y.value=!1,N.value="";let b=r.cloneDeep(v.originalItemContents);(ee=r.cloneDeep(v.originalItemContents))!=null&&ee.find(C=>(C==null?void 0:C.key)==="formButton")?b=(ae=r.cloneDeep(v.originalItemContents))==null?void 0:ae.map(C=>((C==null?void 0:C.key)==="formButton"&&(C.contents=V.value),C)):b.push({key:"formButton",contents:V.value}),t("change",b)},A=o=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var b,j;F.value=(b=r.cloneDeep(F.value))==null?void 0:b.filter(_=>(_==null?void 0:_.id)!==(o==null?void 0:o.id)),t("change",(j=r.cloneDeep(v.originalItemContents))==null?void 0:j.map(_=>((_==null?void 0:_.key)==="formContent"&&(_.contents=F.value),_))),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},n=o=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var b,j;V.value=(b=r.cloneDeep(V.value))==null?void 0:b.filter(_=>(_==null?void 0:_.id)!==(o==null?void 0:o.id)),t("change",(j=r.cloneDeep(v.originalItemContents))==null?void 0:j.map(_=>((_==null?void 0:_.key)==="formButton"&&(_.contents=V.value),_))),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},c=()=>{var b;y.value=!0;let o=[];(b=r.FormButton)==null||b.forEach(j=>{K.value++,o.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:(j==null?void 0:j.label)==="类型"?"normal":"",id:K.value,contents:j==null?void 0:j.options})}),q.value=o,P.value=o},s=()=>{var b,j,_;h.value=!0;let o=[];(_=(j=(b=r.FormContent)==null?void 0:b.find(L=>(L==null?void 0:L.key)==="Input"))==null?void 0:j.value)==null||_.forEach(L=>{K.value++,o.push({label:L==null?void 0:L.label,name:L==null?void 0:L.label,type:L.type,value:(L==null?void 0:L.label)==="类型"?"Input":"",id:K.value,contents:L==null?void 0:L.options})}),w.value=o,M.value=o},i=o=>{let b=r.cloneDeep(P.value);b=b==null?void 0:b.map(j=>(j.value=o==null?void 0:o[j.name],j)),P.value=b},m=async o=>{var b,j,_,L,ee,ae,C,S,l,T,I,Z;if((o==null?void 0:o.类型)!==((j=(b=M.value)==null?void 0:b.find(E=>(E==null?void 0:E.label)==="类型"))==null?void 0:j.value)){let E=[];const z=await((ee=(L=(_=r.FormContent)==null?void 0:_.find(U=>(U==null?void 0:U.key)===((o==null?void 0:o.类型)===""?"Input":o==null?void 0:o.类型)))==null?void 0:L.value)==null?void 0:ee.value)?await((T=(l=(S=r.FormContent)==null?void 0:S.find(U=>(U==null?void 0:U.key)===((o==null?void 0:o.类型)===""?"Input":o==null?void 0:o.类型)))==null?void 0:l.value)==null?void 0:T.value):(C=(ae=r.FormContent)==null?void 0:ae.find(U=>(U==null?void 0:U.key)===((o==null?void 0:o.类型)===""?"Input":o==null?void 0:o.类型)))==null?void 0:C.value;if(z==null||z.forEach(U=>{K.value++,E.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:(o==null?void 0:o[U.label])??"",id:K.value,contents:U==null?void 0:U.options})}),o!=null&&o.菜单选项&&((I=o==null?void 0:o.菜单选项)==null?void 0:I.length)>0){const U=await r.menuToContentType(o==null?void 0:o.菜单选项);E=E==null?void 0:E.map(J=>((J==null?void 0:J.name)==="组信息选项"&&(J.contents=U),J))}M.value=await r.selectToBase(r.cloneDeep(E)),w.value=await r.selectToBase(r.cloneDeep(E))}else{let E=r.cloneDeep(M.value);if(E=E==null?void 0:E.map(z=>(z.value=o==null?void 0:o[z.name],z)),o!=null&&o.菜单选项&&((Z=o==null?void 0:o.菜单选项)==null?void 0:Z.length)>0){const z=await r.menuToContentType(o==null?void 0:o.菜单选项);E=E==null?void 0:E.map(U=>((U==null?void 0:U.name)==="组信息选项"&&(U.contents=z),U))}E=r.formToOptionsContents(E),M.value=await r.selectToBase(r.cloneDeep(E))}},W=o=>{o||(w.value=M.value)},H=async o=>{await m(o),w.value=M.value},te=async()=>{var _,L,ee,ae,C,S,l,T,I,Z;w.value=M.value;let o={};N.value!==""?o.id=N.value:(K.value++,o.id="id"+K.value);let b=await((ee=(L=(_=r.FormContent)==null?void 0:_.find(E=>{var z,U;return(E==null?void 0:E.key)===(((U=(z=w.value)==null?void 0:z.find(J=>(J==null?void 0:J.label)==="类型"))==null?void 0:U.value)??"label")}))==null?void 0:L.value)==null?void 0:ee.value)??((C=(ae=r.FormContent)==null?void 0:ae.find(E=>{var z,U;return(E==null?void 0:E.key)===(((U=(z=w.value)==null?void 0:z.find(J=>(J==null?void 0:J.label)==="类型"))==null?void 0:U.value)??"label")}))==null?void 0:C.value);if((S=w.value)==null||S.forEach(E=>{const z=b==null?void 0:b.find(U=>(U==null?void 0:U.label)===(E==null?void 0:E.label));z&&(o[z.key]=E.value)}),o.width=1,o.key=o==null?void 0:o.label,(l=F.value)!=null&&l.find(E=>E.id===o.id))F.value=(T=F.value)==null?void 0:T.map(E=>(E.id===o.id&&(E=o),E));else{let E=r.cloneDeep(F.value);E.push(o),F.value=E}F.value=F.value.map(({id:E,...z})=>z),h.value=!1,N.value="";let j=r.cloneDeep(v.originalItemContents);(I=r.cloneDeep(v.originalItemContents))!=null&&I.find(E=>(E==null?void 0:E.key)==="formContent")?j=(Z=r.cloneDeep(v.originalItemContents))==null?void 0:Z.map(E=>((E==null?void 0:E.key)==="formContent"&&(E.contents=F.value),E)):j.push({key:"formContent",contents:F.value}),t("change",j)},ie=()=>{h.value=!1,y.value=!1,N.value="",M.value=[],P.value=[]};return e.watch(()=>v.originalItemContents,()=>{var b,j,_,L,ee,ae;if(!v.originalItemContents||v.originalItemContents.length===0)return;const o=r.cloneDeep(v.originalItemContents);F.value=((b=o==null?void 0:o.find(C=>(C==null?void 0:C.key)==="formContent"))==null?void 0:b.contents)??[],V.value=((j=o==null?void 0:o.find(C=>(C==null?void 0:C.key)==="formButton"))==null?void 0:j.contents)??[],Q.value=(_=o==null?void 0:o.find(C=>(C==null?void 0:C.key)==="enableWrap"))!=null&&_.contents?!((L=o==null?void 0:o.find(C=>(C==null?void 0:C.key)==="enableWrap"))!=null&&L.contents):!0,F.value=(ee=r.cloneDeep(F.value))==null?void 0:ee.map((C,S)=>{var T;let l=C;return l.id=(C==null?void 0:C.id)??S,C!=null&&C.label||(C.label=(C==null?void 0:C.key)??(C==null?void 0:C.label)??""),C!=null&&C.type||(C.type=(C==null?void 0:C.type)??""),C.contents=((T=C==null?void 0:C.options)==null?void 0:T.length)===0?(C==null?void 0:C.contents)??"":C==null?void 0:C.options,l}),F.value=r.formToOptionsContents(F.value),V.value=(ae=V.value)==null?void 0:ae.map((C,S)=>C={label:(C==null?void 0:C.label)??"",type:(C==null?void 0:C.type)??"",background:(C==null?void 0:C.background)??"var(--ssComponent-primary-color)",id:S})},{deep:!0,immediate:!0}),(o,b)=>{const j=e.resolveComponent("svg-icon"),_=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Zl,[e.createElementVNode("div",ea,[e.createElementVNode("div",la,[b[2]||(b[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(_,{class:"icon-content",id:"themeButton",onClick:s},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[b[1]||(b[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",aa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(L,ee)=>(e.openBlock(),e.createElementBlock("div",{key:ee},[e.createElementVNode("div",oa,[e.createElementVNode("div",null,e.toDisplayString(L.label),1),e.createElementVNode("div",na,[e.createVNode(j,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>g(L)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>A(L)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ta,[b[4]||(b[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(_,{class:"icon-content",id:"themeButton",onClick:c},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[b[3]||(b[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",sa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(L,ee)=>(e.openBlock(),e.createElementBlock("div",{key:ee},[e.createElementVNode("div",ia,[e.createElementVNode("div",null,e.toDisplayString(L.label),1),e.createElementVNode("div",ra,[e.createVNode(j,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>p(L)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ae=>n(L)},null,8,["onClick"])])])]))),128))]),b[6]||(b[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",ca,[b[5]||(b[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(ce._sfc_main$3,{modelValue:Q.value,"onUpdate:modelValue":b[0]||(b[0]=L=>Q.value=L)},null,8,["modelValue"])])]),e.createVNode(ce.ssDialog,{visible:h.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ua,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:m,onChangeVisible:W,onBlurChange:H},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",da,[e.createVNode(_,{onClick:ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>b[7]||(b[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(_,{class:"ok-button button",onClick:te,id:"themeButton"},{default:e.withCtx(()=>b[8]||(b[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]})])]),_:1},8,["visible"]),e.createVNode(ce.ssDialog,{visible:y.value,onBeforeDestroy:ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",pa,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:q.value,key:q.value,isEnableWrap:!0,onChange:i},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:ie,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:d},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Oe=he._export_sfc(ma,[["__scopeId","data-v-0bdc7014"]]),fa={class:"step-module content"},va={class:"module-data"},ha={class:"step-module layout"},ya={class:"form-content"},Ca=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(k,{emit:$}){const v=k,t=$,h=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),w=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),M=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),y=e.reactive({visible:!1,width:"40%",title:"步骤条"}),V=e.ref("create"),F=e.ref({}),N=e.ref([]),Q=p=>{var d;F.value=p,t("change",(d=P())==null?void 0:d.compData)},K=(p,d)=>{var A,n;switch(p){case"create":(A=w.value)==null||A.forEach(c=>{c.value=""}),V.value="create",y.visible=!0;break;case"update":(n=w.value)==null||n.forEach(c=>{c.value=d[c==null?void 0:c.prop]}),V.value="update",y.visible=!0;break;case"delete":N.value.splice(d,1),V.value="delete";break}},q=p=>{var d,A,n;if((p==null?void 0:p.buttonName)==="确认"){const c=r.cloneDeep(p==null?void 0:p.content);switch(Object.keys(c).forEach(s=>{c[s]===""&&delete c[s]}),V.value){case"create":N.value.push({...c,index:((d=N.value)==null?void 0:d.length)+1});break;case"update":N.value=(A=N.value)==null?void 0:A.map(s=>s.index===(c==null?void 0:c.index)?{...s,title:c==null?void 0:c.title,description:c==null?void 0:c.description}:s);break}t("change",(n=P())==null?void 0:n.compData),y.visible=!1}else y.visible=!1},P=()=>({comp:"Step",compData:[{key:"stepList",contents:N.value},{key:"stepConfig",contents:F.value}]}),g=()=>{y.visible=!1};return e.watch(()=>v==null?void 0:v.itemContents,p=>{var d,A;p&&(F.value=((d=p==null?void 0:p.find(n=>n.key==="stepConfig"))==null?void 0:d.contents)??{},N.value=((A=p==null?void 0:p.find(n=>n.key==="stepList"))==null?void 0:A.contents)??[])},{immediate:!0}),(p,d)=>{const A=e.resolveComponent("svg-icon"),n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",fa,[d[2]||(d[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(n,{class:"module-icon",id:"themeButton",onClick:d[0]||(d[0]=c=>K("create"))},{icon:e.withCtx(()=>[e.createVNode(A,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[d[1]||(d[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",va,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:s},[e.createElementVNode("span",null,e.toDisplayString(c==null?void 0:c.title),1),e.createElementVNode("div",null,[e.createVNode(n,{type:"primary",size:"small",onClick:i=>K("update",{...c,index:s+1})},{default:e.withCtx(()=>d[3]||(d[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(n,{type:"danger",size:"small",onClick:i=>K("delete",s)},{default:e.withCtx(()=>d[4]||(d[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",ha,[d[5]||(d[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ce.ssForm,{rowContents:h.value,onChange:Q},null,8,["rowContents"])])]),e.createVNode(ce.ssDialog,{visible:y.visible,title:y.title,onBeforeDestroy:g,width:y.width},{default:e.withCtx(()=>[e.createElementVNode("div",ya,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:M.value,onOnButtonClick:q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ga=he._export_sfc(Ca,[["__scopeId","data-v-7dbd17f2"]]),ba={class:"step-module content"},ka={class:"module-data"},_a={class:"step-module layout"},Da={class:"form-content"},xa=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(k,{emit:$}){const v=k,t=$,h=e.ref("create"),w=e.ref({}),M=e.ref([]),y=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),V=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),F=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),N=e.reactive({visible:!1,width:"40%",title:"时间线"}),Q=p=>{var d;w.value=p,console.log(1212,p),t("change",(d=P())==null?void 0:d.compData)},K=(p,d)=>{var A,n;switch(p){case"create":(A=V.value)==null||A.forEach(c=>{c.value=""}),h.value="create",N.visible=!0;break;case"update":(n=V.value)==null||n.forEach(c=>{c.value=d[c==null?void 0:c.prop]}),h.value="update",N.visible=!0;break;case"delete":M.value.splice(d,1),h.value="delete";break}},q=p=>{var d,A,n,c;if((p==null?void 0:p.buttonName)==="确认"){const s=r.cloneDeep(p==null?void 0:p.content);switch(Object.keys(s).forEach(i=>{s[i]===""&&delete s[i]}),h.value){case"create":console.log(1335,M.value,s),(A=M.value)==null||A.push({...s,index:((d=M.value)==null?void 0:d.length)+1});break;case"update":M.value=(n=M.value)==null?void 0:n.map(i=>i.index===(s==null?void 0:s.index)?{...i,content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp}:i);break}t("change",(c=P())==null?void 0:c.compData),N.visible=!1}else N.visible=!1},P=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:M.value},{key:"timeLineConfig",contents:w.value}]}),g=()=>{N.visible=!1};return e.watch(()=>v==null?void 0:v.itemContents,p=>{var d,A;p&&(w.value=((d=p==null?void 0:p.find(n=>n.key==="timeLineConfig"))==null?void 0:d.contents)??{},M.value=((A=p==null?void 0:p.find(n=>n.key==="timeLineList"))==null?void 0:A.contents)??[])},{immediate:!0}),(p,d)=>{const A=e.resolveComponent("svg-icon"),n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",ba,[d[2]||(d[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(n,{class:"module-icon",id:"themeButton",onClick:d[0]||(d[0]=c=>K("create"))},{icon:e.withCtx(()=>[e.createVNode(A,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[d[1]||(d[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",ka,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:s},[e.createElementVNode("span",null,e.toDisplayString(c==null?void 0:c.content),1),e.createElementVNode("div",null,[e.createVNode(n,{type:"primary",size:"small",onClick:i=>K("update",{...c,index:s+1})},{default:e.withCtx(()=>d[3]||(d[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(n,{type:"danger",size:"small",onClick:i=>K("delete",s)},{default:e.withCtx(()=>d[4]||(d[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",_a,[d[5]||(d[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(ce.ssForm,{rowContents:y.value,onChange:Q},null,8,["rowContents"])])]),e.createVNode(ce.ssDialog,{visible:N.visible,title:N.title,onBeforeDestroy:g,width:N.width},{default:e.withCtx(()=>[e.createElementVNode("div",Da,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:F.value,onOnButtonClick:q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Ea=he._export_sfc(xa,[["__scopeId","data-v-f6b5d4fc"]]),wa={};function Ba(k,$){return e.openBlock(),e.createElementBlock("div")}const Va=he._export_sfc(wa,[["render",Ba]]),Na={class:"extra-content"},Ta={key:0},Ia={key:1},$a={class:"dialog-footer"},Fa={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(k,{emit:$}){const v=k,t=e.ref(0),h=e.ref(),w=e.ref(),M=$,y=e.ref(!1),V=e.ref({}),F=e.ref({}),N=e.ref();e.watch(()=>[v.itemData],()=>{var c;const n=r.cloneDeep(v.itemData);h.value=(c=r.cloneDeep(n))==null?void 0:c.map(s=>{var i;if(s.key==="extra"){let m=[];(i=s.value)==null||i.forEach(W=>{var H;m.push((H=Object.values(W))==null?void 0:H[0])}),s.value=m}return s})},{deep:!0,immediate:!0});const Q=(n,c,s,i)=>{var W;let m={};((W=n==null?void 0:n[0])==null?void 0:W.contents)==="详情"&&(y.value=!0,m[c]=n,w.value=n==null?void 0:n.filter(H=>(H==null?void 0:H.key)!=="tableContentName"),V.value=m,F.value=s,N.value=i.id)},K=n=>{var H,te,ie,o;const c=(te=(H=Object.values(r.cloneDeep(V.value)))==null?void 0:H[0])==null?void 0:te.filter(b=>(b==null?void 0:b.key)==="tableContentName"),s=(o=(ie=Object.values(r.cloneDeep(V.value)))==null?void 0:ie[0])==null?void 0:o.filter(b=>(b==null?void 0:b.key)!=="tableContentName"),i=s==null?void 0:s.map((b,j)=>{var _;return j===n.index&&(b==null?void 0:b.comp)==="Table"&&(b.compData=(_=b.compData)==null?void 0:_.map(L=>{var ee,ae;return(L==null?void 0:L.key)==="tableContents"&&(L.contents=(ae=(ee=n.content)==null?void 0:ee.map(C=>{let S={};for(let l in C)l!=="id"&&(S[l]=C[l]);return S}))==null?void 0:ae.map(C=>Object.values(C))),L})),b});i.unshift(c==null?void 0:c[0]);let m=r.cloneDeep(V.value),W={};for(let b in m)W[b]=i;V.value=W},q=()=>{y.value=!1,V.value={},F.value={},N.value=void 0,t.value++},P=n=>{var H,te,ie,o;const c=(te=(H=Object.values(r.cloneDeep(V.value)))==null?void 0:H[0])==null?void 0:te.filter(b=>(b==null?void 0:b.key)==="tableContentName"),s=(o=(ie=Object.values(r.cloneDeep(V.value)))==null?void 0:ie[0])==null?void 0:o.filter(b=>(b==null?void 0:b.key)!=="tableContentName"),i=s==null?void 0:s.map((b,j)=>(j===n.index&&(b.compData=n.contents),b));i.unshift(c==null?void 0:c[0]);let m=r.cloneDeep(V.value),W={};for(let b in m)W[b]=i;V.value=W},g=()=>{var c,s;let n={};for(let i in F.value)i===((c=Object.keys(V.value))==null?void 0:c[0])?n[i]=(s=Object.values(V.value))==null?void 0:s[0]:n[i]=F.value[i];M("change",{buttonName:"编辑",index:N.value,singleContent:n},"methodData"),y.value=!1,V.value={},F.value={},N.value=void 0},p=()=>{y.value=!1,V.value={},F.value={},N.value=void 0},d=n=>{M("change",n,"methodData")},A=n=>$e(n);return(n,c)=>{const s=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Na,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(i,m)=>(e.openBlock(),e.createElementBlock("div",{key:t.value},[(i==null?void 0:i.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Ta)):(e.openBlock(),e.createElementBlock("div",Ia,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:m,index:(i==null?void 0:i.id)??m,onContentClick:Q,onChange:d},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(ce.ssDialog,{visible:y.value,onBeforeDestroy:p},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(i,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(A(i.comp)),{itemData:i==null?void 0:i.compData,onChange:K,childItemData:i==null?void 0:i.itemChildData,key:m,onContentChange:P,index:(i==null?void 0:i.id)??m,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",$a,[e.createVNode(s,{class:"cancel-button footer-button",onClick:q,id:"themeBorderButton"},{default:e.withCtx(()=>c[0]||(c[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(s,{class:"confirm-button footer-button",onClick:g,id:"themeButton"},{default:e.withCtx(()=>c[1]||(c[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Sa=he._export_sfc(Fa,[["__scopeId","data-v-2d9c5ab2"]]),Aa={class:"method-content"},La={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(k){const $=e.ref([]),v=k,t=Re.useModelComp(oe.pinia),h=e.ref(!1),w=oe.useMenuState(oe.pinia),{itemData:M,isEdit:y}=oe.storeToRefs(t),{activeMenuPath:V,platform:F}=oe.storeToRefs(w),N=e.ref(!1),Q=(g,p)=>{const d=p;return g==null?void 0:g.map(A=>{var n;return A=(n=A==null?void 0:A.map((c,s)=>{var i;return{key:(i=d[s])==null?void 0:i.label,value:c}}))==null?void 0:n.filter(c=>c.key!=="操作"),A})};e.watch(()=>M.value,async()=>{y.value==="view"&&!N.value&&await P(r.cloneDeep(v.itemData)),N.value=!1},{deep:!0});const K=async(g,p)=>{var d;if(De.getFormToContent(g==null?void 0:g.name,p)){let A=De.getFormToContent(g==null?void 0:g.name,p);g==null||g.id,g.compData=await Promise.all((d=r.cloneDeep(g.compData))==null?void 0:d.map(async n=>((n==null?void 0:n.key)==="tableContents"&&(n.extra=await De.getFixExtraContent(r.cloneDeep(n.contents)),n.contents=De.getNewTableContents(r.cloneDeep(A))),n)))}else g=De.getFormToData(g,p);return g},q=async g=>{var H,te,ie,o,b,j,_,L,ee,ae,C,S;let p={};if(F.value!=="browser"){const l=[];p.form={},(H=r.cloneDeep(g.content))==null||H.forEach((I,Z)=>{var E,z,U,J,ne,ye,ge,be,fe,ke,me,ve,pe,a;if((I==null?void 0:I.comp)==="Table"){(z=(E=I==null?void 0:I.compData)==null?void 0:E.find(x=>(x==null?void 0:x.key)==="header"))==null||z.contents;let u=(ne=(J=(U=I==null?void 0:I.compData)==null?void 0:U.find(x=>(x==null?void 0:x.key)==="tableContents"))==null?void 0:J.contents)==null?void 0:ne.map(x=>x.slice(1));(ke=(fe=(be=(ge=(ye=I==null?void 0:I.compData)==null?void 0:ye.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:ge.contents)==null?void 0:be[0])==null?void 0:fe[0])==null||ke.label;let f=(ve=(me=I==null?void 0:I.compData)==null?void 0:me.find(x=>(x==null?void 0:x.key)==="header"))==null?void 0:ve.contents,D=[];u==null||u.forEach(x=>{let X=[];x==null||x.forEach((Y,R)=>{var ue;let O={};((ue=f[R])==null?void 0:ue.label)!=="操作"&&(O[f[R].label]=Y,X.push(O))}),D.push(X)}),p[I.name]=D}else{const u=(a=(pe=I.compData)==null?void 0:pe.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:a.contents;u==null||u.forEach(f=>{f.key!==""&&(f={key:(f==null?void 0:f.key)??(f==null?void 0:f.label),value:f==null?void 0:f.value},l.push(f))})}}),p.form=De.getFormContents(l);let T=p.form;for(let I in p)I!=="form"&&(T[I]=De.getTableToContent(p[I]));if(g.api){try{h.value=!0;const I=await oe.axios.post(g.api,T,{headers:{"Content-Type":"application/json"}});if(((te=I==null?void 0:I.data)==null?void 0:te.code)===200){let Z=await((ie=I==null?void 0:I.data)==null?void 0:ie.data);const E=(o=r.cloneDeep(M.value))==null?void 0:o.filter(ne=>(ne==null?void 0:ne.comp)!=="methodButton"),z=await Promise.all(E.map(ne=>K(ne,Z)));await Promise.all(z);const U=(b=r.cloneDeep(M.value))==null?void 0:b.filter(ne=>(ne==null?void 0:ne.comp)==="methodButton");let J=[...z,...U];await De.getProjectContent(J),h.value=!1}else oe.ElMessage.error("方法调用失败:"+((j=I==null?void 0:I.data)==null?void 0:j.errors)),h.value=!1}catch{oe.ElMessage.error("方法调用失败"),h.value=!1}t.setFreshContent(!0)}}else if((_=r.cloneDeep(g.content))==null||_.forEach((l,T)=>{var I,Z,E,z,U,J,ne,ye,ge,be,fe,ke,me,ve,pe,a,u,f,D;if((l==null?void 0:l.comp)==="Table"){let x=Array.isArray((E=(Z=(I=l==null?void 0:l.compData)==null?void 0:I.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:Z.contents)==null?void 0:E[0])?(ne=(J=(U=(z=l==null?void 0:l.compData)==null?void 0:z.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:U.contents)==null?void 0:J[0])==null?void 0:ne.some(O=>O==null?void 0:O.children):[],X=(be=(ge=(ye=l==null?void 0:l.compData)==null?void 0:ye.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:ge.contents)==null?void 0:be.map(O=>O.slice(1)),Y=(pe=(ve=(me=(ke=(fe=l==null?void 0:l.compData)==null?void 0:fe.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:ke.contents)==null?void 0:me[0])==null?void 0:ve[0])==null?void 0:pe.label,R=(u=(a=l==null?void 0:l.compData)==null?void 0:a.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:u.contents;if(x)(x==null?void 0:x.length)===0?p[l.name]=Q(X,R):p[Y]=Q(X,R);else{const O=[];R=R.slice(1,R.length-1),R==null||R.forEach((ue,Ce)=>{X==null||X.forEach(xe=>{O.push({key:ue.label+xe[0],value:xe[Ce+1]})})}),p["form"+T]=O}}else{const x=(D=(f=l.compData)==null?void 0:f.find(Y=>(Y==null?void 0:Y.key)==="formContent"))==null?void 0:D.contents;p.form={};const X=[];x==null||x.forEach(Y=>{Y.key!==""&&(Y={key:(Y==null?void 0:Y.key)??(Y==null?void 0:Y.label),value:Y==null?void 0:Y.value},X.push(Y))}),p.form=X}}),g.api){let l={};(L=g==null?void 0:g.extraValues)==null||L.forEach(I=>{var Z,E;((Z=Object.keys(I))==null?void 0:Z[0])!=="data"?l[Object.keys(I)[0]]=(E=Object.values(I))==null?void 0:E[0]:l[Object.keys(I)[0]]=p});const T=await oe.axios.post(g.api,l,{responseType:"blob",headers:{"Content-Type":"application/json"}});var d=new Blob([T.data],{type:"application/octet-stream;charset=UTF-8"}),A=T.headers["content-disposition"],n=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),c=n.exec(A),s=((C=(ae=(ee=g==null?void 0:g.extraContent)==null?void 0:ee[0])==null?void 0:ae.split("."))==null?void 0:C[0])+"."+((S=c[1].split("."))==null?void 0:S[1]),i=document.createElement("a"),m=window.URL.createObjectURL(d),W=/^["](.*)["]$/g;i.style.display="none",i.href=m,i.download=decodeURI(s.replace(W,"$1")),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(m)}N.value=!0},P=async g=>{var c,s,i;const p=r.cloneDeep(g);let d;g!=null&&g[0].path&&(d=await(p==null?void 0:p.map(async m=>{var b,j,_,L,ee,ae,C,S,l,T,I,Z;const H=(j=(await oe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:(b=g==null?void 0:g[0])==null?void 0:b.path}})).data.result)==null?void 0:j[0],te=await oe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"structure",pageKey:((_=g==null?void 0:g[0])==null?void 0:_.path)+"/"+(m==null?void 0:m.method)+"/算例1"}});let ie=[];((ee=(L=te==null?void 0:te.data)==null?void 0:L.result)==null?void 0:ee.length)>0&&((C=(ae=te==null?void 0:te.data)==null?void 0:ae.result)==null||C.forEach(E=>{var z,U,J,ne,ye,ge,be;((U=(z=E==null?void 0:E.value)==null?void 0:z.pageData)==null?void 0:U.name)==="输入"&&((ne=(J=E==null?void 0:E.value)==null?void 0:J.pageData)==null?void 0:ne.comp)==="Form"&&((be=(ge=(ye=E==null?void 0:E.value)==null?void 0:ye.pageData)==null?void 0:ge.compData)==null||be.forEach(fe=>{var ke;(fe==null?void 0:fe.key)==="formContent"&&((ke=fe==null?void 0:fe.contents)==null||ke.forEach(me=>{let ve={};ve[me.key]=me.value,ie.push(ve)}))}))}));const o=await De.getItemData(V.value,sessionStorage.getItem("systemKey"),"");return{buttonName:(l=(S=H==null?void 0:H.value)==null?void 0:S.tableData)==null?void 0:l.算法名称,api:(I=(T=H==null?void 0:H.value)==null?void 0:T.tableData)==null?void 0:I.算法体,content:o==null?void 0:o.filter(E=>E.comp!=="methodButton"),extraContent:(Z=r.cloneDeep(m.value))==null?void 0:Z.slice(1),methodName:(m==null?void 0:m.path)??"",extraValues:ie}})));const A=p==null?void 0:p.map(async m=>{var b,j,_,L,ee,ae;const H=(b=(await oe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:m.method}})).data.result)==null?void 0:b[0],te=await oe.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:H==null?void 0:H.id}}),ie=await De.getItemData(V.value,sessionStorage.getItem("systemKey"),""),o=(j=te.data.result)==null?void 0:j[0];return{buttonName:(_=H==null?void 0:H.key)==null?void 0:_.methodKey,api:(ee=(L=o==null?void 0:o.value)==null?void 0:L.tableData)==null?void 0:ee[0],content:ie==null?void 0:ie.filter(C=>C.comp!=="methodButton"),extraContent:(ae=r.cloneDeep(m.value))==null?void 0:ae.slice(1),methodName:(m==null?void 0:m.method)??""}}),n=(c=g==null?void 0:g[0])!=null&&c.path&&((s=g==null?void 0:g[0])==null?void 0:s.path)!==""?await Promise.all(d):await Promise.all(A);$.value=n==null?void 0:n.filter(m=>m==null?void 0:m.extraContent),(i=$.value)==null||i.forEach(m=>{var W;m.api===""&&((W=m.content)==null||W.forEach(H=>{var te;H.comp=="Table"&&t.setExtraContents(De.methodTableToContent(H.compData,(te=m.extraContent)==null?void 0:te[0]))}))})};return e.watch(()=>v.itemData,async()=>{y.value=="view"&&!N.value&&await P(r.cloneDeep(v.itemData)),N.value=!1},{immediate:!0,deep:!0}),(g,p)=>(e.openBlock(),e.createElementBlock("div",Aa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,d=>(e.openBlock(),e.createElementBlock("div",null,[d.api!==""?(e.openBlock(),e.createBlock(e.unref(ce._sfc_main),{key:0,class:"calculator-content",modelValue:d.buttonName,onClickTrigger:A=>q(d),loading:h.value},null,8,["modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)]))),256))]))}},Oa=he._export_sfc(La,[["__scopeId","data-v-0a4b9d4d"]]),Ra={};function Ma(k,$){return" 567 "}const Pa=he._export_sfc(Ra,[["render",Ma]]),Ua={class:"module content"},ja={class:"module data"},Wa={class:"module layout"},za={class:"form-content"},Ka=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(k,{emit:$}){const v=k,t=$,h=e.reactive({visible:!1,width:"40%",title:"签名配置"}),w=e.ref("create"),M=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),y=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),V=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),F=e.ref({}),N=e.ref([]),Q=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:N.value},{key:"signConfig",contents:F.value}]}),K=p=>{var d;F.value=r.cloneDeep(p),t("change",(d=Q())==null?void 0:d.compData)},q=p=>{var d,A;if((p==null?void 0:p.buttonName)==="确认"){const n=r.cloneDeep(p==null?void 0:p.content);switch(w.value){case"create":N.value.push({...n,index:((d=N.value)==null?void 0:d.length)+1});break}t("change",(A=Q())==null?void 0:A.compData),h.visible=!1}else h.visible=!1},P=(p,d)=>{var A,n;switch(p){case"create":(A=V.value)==null||A.forEach(c=>{c.value=""}),w.value="create",h.visible=!0;break;case"update":(n=V.value)==null||n.forEach(c=>{c.value=d[c==null?void 0:c.prop]}),w.value="update",h.visible=!0;break;case"delete":N.value.splice(d,1),w.value="delete";break}},g=()=>{h.visible=!1};return e.watch(()=>v==null?void 0:v.itemContents,p=>{var d,A;p&&(F.value=((d=p==null?void 0:p.find(n=>n.key==="signConfig"))==null?void 0:d.contents)??{},N.value=((A=p==null?void 0:p.find(n=>n.key==="signTypeList"))==null?void 0:A.contents)??[])},{immediate:!0}),(p,d)=>{const A=e.resolveComponent("svg-icon"),n=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ua,[d[2]||(d[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(n,{class:"module-icon",id:"themeButton",onClick:d[0]||(d[0]=c=>P("create"))},{icon:e.withCtx(()=>[e.createVNode(A,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[d[1]||(d[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",ja,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:s},[e.createElementVNode("span",null,e.toDisplayString(c==null?void 0:c.label),1),e.createElementVNode("div",null,[e.createVNode(n,{type:"primary",size:"small",onClick:i=>P("update",{...c,index:s+1})},{default:e.withCtx(()=>d[3]||(d[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(n,{type:"danger",size:"small",onClick:i=>P("delete",s)},{default:e.withCtx(()=>d[4]||(d[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Wa,[e.createVNode(ce.ssForm,{rowContents:y.value,onChange:K},null,8,["rowContents"])])]),e.createVNode(ce.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:g,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",za,[(e.openBlock(),e.createBlock(ce.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:M.value,onOnButtonClick:q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),qa=he._export_sfc(Ka,[["__scopeId","data-v-487e0536"]]),Ja=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(k,{emit:$}){const v=k,t=$,h=e.ref(1),w=e.computed(()=>{var Q,K;return(Q=v==null?void 0:v.stepConfig)!=null&&Q.allowTrigger?h.value:(K=v==null?void 0:v.stepConfig)==null?void 0:K.active}),M=(Q,K)=>{h.value=K,t("clickStep",Q,K)},y=Q=>ce.getComponent(Q),V=()=>{var K;const Q=(K=v==null?void 0:v.stepList)==null?void 0:K.find((q,P)=>P+1===w.value);return console.log("findStep",Q),Q?Q==null?void 0:Q.children:[]},F=Q=>{t("clickTrigger",Q)},N=Q=>{t("changeTrigger",Q)};return(Q,K)=>{var g,p,d,A,n;const q=e.resolveComponent("el-step"),P=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(P,{direction:(g=k.stepConfig)==null?void 0:g.direction,active:w.value,"finish-status":"success",simple:(p=k.stepConfig)==null?void 0:p.simple,"align-center":((d=k.stepConfig)==null?void 0:d.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.stepList,(c,s)=>(e.openBlock(),e.createBlock(q,{key:s,class:"step-item",onClick:i=>M(c,s+1)},{title:e.withCtx(()=>[e.renderSlot(Q.$slots,"title",{title:c==null?void 0:c.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(Q.$slots,"description",{description:c==null?void 0:c.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(A=k.stepConfig)!=null&&A.allowTrigger&&((n=k.stepConfig)!=null&&n.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(V(),(c,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y(c==null?void 0:c.type)),{modelValue:c.value,"onUpdate:modelValue":i=>c.value=i,onClickTrigger:F,onChangeTrigger:N,content:c==null?void 0:c.content},e.createSlots({_:2},[e.renderList(Q.$slots,(i,m)=>({name:m,fn:e.withCtx(W=>[e.renderSlot(Q.$slots,m,e.mergeProps({ref_for:!0},W||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Ga=he._export_sfc(Ja,[["__scopeId","data-v-d7c99969"]]),Ha=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(k,{emit:$}){const v=k,t=$,h=e.ref({}),w=e.ref([]),M=(y,V)=>{t("clickStep",y,V)};return e.watch(()=>v==null?void 0:v.itemData,y=>{var V,F;w.value=(V=y==null?void 0:y.find(N=>(N==null?void 0:N.key)==="stepList"))==null?void 0:V.contents,h.value=(F=y==null?void 0:y.find(N=>(N==null?void 0:N.key)==="stepConfig"))==null?void 0:F.contents},{immediate:!0}),(y,V)=>{const F=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Ga,{stepConfig:h.value,stepList:w.value,onClickStep:M},{icon:e.withCtx(()=>[e.createVNode(F,{name:"import"})]),title:e.withCtx(({title:N})=>[e.createTextVNode(e.toDisplayString(N),1)]),description:e.withCtx(({description:N})=>[e.createTextVNode(e.toDisplayString(N),1)]),_:1},8,["stepConfig","stepList"])}}}),Qa=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(k){return($,v)=>{const t=e.resolveComponent("el-timeline-item"),h=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(h,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.activities,(w,M)=>(e.openBlock(),e.createBlock(t,{key:M,timestamp:w.timestamp,placement:k.timeLineConfig.placement,center:k.timeLineConfig.isCenter,"hide-timestamp":!0,type:k.timeLineConfig.type,color:k.timeLineConfig.color,size:k.timeLineConfig.size,icon:k.timeLineConfig.icon,hollow:k.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot($.$slots,"content",{content:w==null?void 0:w.content,timestamp:w==null?void 0:w.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Xa=he._export_sfc(Qa,[["__scopeId","data-v-4172a886"]]),Ya={class:"line-content"},Za={class:"line-time"},eo=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(k){const $=k,v=e.ref({}),t=e.ref([]);return e.watch(()=>$==null?void 0:$.itemData,h=>{var w,M;t.value=(w=h==null?void 0:h.find(y=>(y==null?void 0:y.key)==="timeLineList"))==null?void 0:w.contents,v.value=(M=h==null?void 0:h.find(y=>(y==null?void 0:y.key)==="timeLineConfig"))==null?void 0:M.contents},{immediate:!0}),(h,w)=>(e.openBlock(),e.createBlock(Xa,{activities:t.value,timeLineConfig:v.value},{content:e.withCtx(({content:M,timestamp:y})=>[e.createElementVNode("span",Ya,e.toDisplayString(M),1),e.createElementVNode("span",Za,e.toDisplayString(y),1)]),_:1},8,["activities","timeLineConfig"]))}}),lo=he._export_sfc(eo,[["__scopeId","data-v-b4d9deed"]]),ao={class:"tabs-content"},oo={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(k){const $=k,v=e.ref([]);return e.watch(()=>$==null?void 0:$.itemData,t=>{const h=t.find(w=>(w==null?void 0:w.key)=="stepList");h&&(v.value=h.contents.map(w=>({value:w.value||w.title,label:w.label||w.title,children:w.children||[]})))},{immediate:!0,deep:!0}),(t,h)=>(e.openBlock(),e.createElementBlock("div",ao,[e.createVNode(ce.ssTab,{tabsContents:v.value},null,8,["tabsContents"])]))}},no=he._export_sfc(oo,[["__scopeId","data-v-d3bb10b7"]]),Ie=oe.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(k){this.itemData=k},setCurStructureCompIds(k){this.curStructureCompIds=k},setRefreshCurStructure(k){this.isRefreshCurStructure=k},setOriginalData(k){this.originalData=k},setExtraContents(k){this.extraContents=k},setNodeDev(k){this.nodeDev=k},setIsEdit(k){this.isEdit=k}}}),to={class:"type-select"},so=["onClick"],io={class:"list-icon"},ro={__name:"modelSelect",setup(k){const $=Ie(oe.pinia),{itemData:v}=oe.storeToRefs($),t=h=>{const w=r.cloneDeep(v.value);w.push({comp:h.comp,name:h.name,compData:[]}),$.setItemData(w)};return(h,w)=>{const M=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",to,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(qe),(y,V)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:V},[e.createElementVNode("div",{class:"list-content",onClick:F=>t(y)},[e.createElementVNode("div",io,[e.createVNode(M,{name:y.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(y.name),1)],8,so)]))),128))])}}},co=he._export_sfc(ro,[["__scopeId","data-v-91799bf8"]]),uo={class:"fill-content"},po={class:"operate-content"},mo={class:"collapse-title-content"},fo={class:"collapse-title-item"},vo={key:1},ho=["onClick"],yo={class:"icon-content"},Co={key:0,class:"edit-content"},go=["onClick"],bo={class:"comp-child"},ko={__name:"modelFill",setup(k){const $=Ie(oe.pinia),{itemData:v,originalData:t}=oe.storeToRefs($),h=e.ref([]);e.ref([]);const w=e.ref([]),M=e.ref([]),y=q=>{var g;let P=(g=r.cloneDeep(M.value))==null?void 0:g.map((p,d)=>(q===d&&(p.content=!0),p));M.value=P},V=q=>{var g;let P=(g=r.cloneDeep(M.value))==null?void 0:g.map((p,d)=>(q===d&&(p.content=!1),p));M.value=P,h.value=r.cloneDeep(v.value)},F=(q,P)=>{var A;let g=(A=r.cloneDeep(M.value))==null?void 0:A.map((n,c)=>(q===c&&(n.content=!1),n));M.value=g;const p=r.cloneDeep(v.value),d=p==null?void 0:p.filter((n,c)=>(c===q&&(n.name=P),n));$.setOriginalData(d),$.setItemData(d)};e.watch(()=>v.value,()=>{var q,P,g;!v.value||((q=v.value)==null?void 0:q.length)===0?h.value=[]:h.value=(P=r.cloneDeep(v.value))==null?void 0:P.filter(p=>(p==null?void 0:p.comp)!=="methodButton"),w.value=h.value,M.value=(g=r.cloneDeep(w.value))==null?void 0:g.map((p,d)=>({id:d,content:!1}))},{deep:!0,immediate:!0});const N=q=>$e(q),Q=(q,P,g)=>{var d,A;if(!q)return;let p=r.cloneDeep(v.value);p=(d=p==null?void 0:p.map((n,c)=>(c===g&&(n.compData=q),n)))==null?void 0:d.filter(n=>(n==null?void 0:n.comp)!=="methodButton"),M.value=(A=r.cloneDeep(p))==null?void 0:A.map((n,c)=>({id:c,content:!1})),$.setOriginalData(p),$.setItemData(p)},K=q=>{Ne.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const P=r.cloneDeep(v.value),g=P==null?void 0:P.filter((p,d)=>d!==q);$.setOriginalData(g),$.setItemData(g),oe.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(q,P)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",uo,[P[1]||(P[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",po,[e.createVNode(Je.default,{class:"collapse-content",collapseContents:h.value},{title:e.withCtx(({item:p,index:d})=>{var A,n,c,s,i,m,W,H,te,ie;return[e.createElementVNode("div",mo,[e.createElementVNode("div",fo,[(n=(A=M.value)==null?void 0:A.find(o=>o.id===d))!=null&&n.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:p.name&&p.name!==""?"8px":"0px"})},e.toDisplayString(p.name),5)),(s=(c=M.value)==null?void 0:c.find(o=>o.id===d))!=null&&s.content?(e.openBlock(),e.createElementBlock("div",vo,[e.createVNode(ce._sfc_main$1,{modelValue:p.name,"onUpdate:modelValue":o=>p.name=o,onClick:P[0]||(P[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(m=(i=M.value)==null?void 0:i.find(o=>o.id===d))!=null&&m.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(o=>y(d),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Edit",style:{width:"16px",height:"16px"}})],8,ho))]),e.createElementVNode("div",yo,[(H=(W=M.value)==null?void 0:W.find(o=>o.id===d))!=null&&H.content?(e.openBlock(),e.createElementBlock("div",Co,[e.createVNode(g,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(o=>V(d),["stop"])},null,8,["onClick"]),e.createVNode(g,{name:"Save",onClick:e.withModifiers(o=>F(d,p.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ie=(te=M.value)==null?void 0:te.find(o=>o.id===d))!=null&&ie.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(o=>K(d),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,go))])])]}),content:e.withCtx(({item:p,index:d})=>{var A,n;return[e.createElementVNode("div",bo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(p.comp+"Operate")),{itemContents:p==null?void 0:p.compData,originalItemContents:(n=(A=w.value)==null?void 0:A.find((c,s)=>s===d))==null?void 0:n.compData,onChange:c=>Q(c,p,d)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},_o=he._export_sfc(ko,[["__scopeId","data-v-78d7fc46"]]),Do={key:0,class:"show-content"},xo={style:{display:"flex"}},Eo={__name:"modelShow",setup(k){const $=Ie(oe.pinia),{itemData:v}=oe.storeToRefs($),t=e.ref([]);e.watch(()=>v.value,()=>{var w;!v.value||((w=v.value)==null?void 0:w.length)===0?t.value=[]:t.value=r.cloneDeep(v.value)},{deep:!0,immediate:!0});const h=w=>$e(w);return(w,M)=>{var y;return((y=t.value)==null?void 0:y.length)>0?(e.openBlock(),e.createElementBlock("div",Do,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(V,F)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:F},[e.createElementVNode("div",xo,e.toDisplayString(V.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(V.comp)),{itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:F},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},wo=he._export_sfc(Eo,[["__scopeId","data-v-3f3e863e"]]),Bo={class:"tabs-header"},Vo={class:"tabs-list"},No={class:"tab-name"},To={class:"tab-actions"},Io=["onClick"],$o=["onClick"],Fo=["onClick"],So={class:"model-operate"},Ao={class:"model-select",style:{display:"unset"}},Lo={class:"existing-components"},Oo={class:"component-list"},Ro=["onClick"],Mo={class:"component-info"},Po={class:"component-type"},Uo={class:"component-name"},jo={class:"model-fill"},Wo={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(k,{emit:$}){const v=k,t=$,h=e.ref([]),w=e.ref(!1),M=e.ref(""),y=e.ref({title:""}),V=e.ref(-1),F=e.ref(!1),N=e.ref(-1),Q=e.ref(new Map),K=e.ref(null),q=Ie(oe.pinia),{itemData:P}=oe.storeToRefs(q),g=()=>{M.value="新增标签页",y.value.title="",V.value=-1,w.value=!0},p=S=>{M.value="修改标签页",y.value.title=h.value[S].title,V.value=S,w.value=!0},d=S=>{const l=c(S);Q.value.delete(l),h.value.splice(S,1),C()},A=()=>{if(y.value.title.trim()){if(V.value===-1){const S={title:y.value.title,value:y.value.title,label:y.value.title,children:[],id:n()};h.value.push(S)}else h.value[V.value].title=y.value.title,h.value[V.value].value=y.value.title,h.value[V.value].label=y.value.title;w.value=!1,C()}},n=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,c=S=>{const l=h.value[S];return l.id||(l.id=n()),l.id},s=S=>{var I;N.value=S;const l=c(S);K.value=r.cloneDeep(P.value);let T=Q.value.get(l);!T&&((I=h.value[S].children)==null?void 0:I.length)>0&&(T=H(h.value[S].children)),T?q.setItemData(r.cloneDeep(T)):q.setItemData([]),F.value=!0},i=e.computed(()=>{const S=Re.useModelComp(oe.pinia),l=oe.storeToRefs(S).itemData.value;return console.log("可用组件数据",l),!l||!Array.isArray(l)?[]:l.filter(T=>{var I;if(T.comp==="Tabs"&&N.value>=0){const Z=c(N.value);if((I=T.compData)==null?void 0:I.some(z=>{var U;return z.key==="stepList"&&((U=z.contents)==null?void 0:U.some(J=>J.id===Z))}))return!1}return!0})}),m=S=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[S]||S,W=S=>{var l;try{const T=r.cloneDeep(S);T.id=Date.now()+Math.random(),T.comp==="Tabs"&&((l=T.compData)==null||l.forEach(Z=>{Z.key==="stepList"&&Z.contents&&Z.contents.forEach(E=>{E.id=n()})}));const I=r.cloneDeep(P.value);I.push(T),q.setItemData(I)}catch(T){console.error("添加组件失败:",T)}},H=S=>S.map(l=>{var T;switch(l.type){case"form":return{comp:"Form",name:l.value||"表单",compData:te(l.content)};case"table":return{comp:"Table",name:l.value||"表格",compData:ie(l.content)};default:return{comp:"Unknown",name:l.value||"",compData:((T=l.content)==null?void 0:T.originalData)||[]}}}),te=S=>{if(!S)return[];const l=[];return S.rowContents&&l.push({key:"formContent",contents:S.rowContents}),S.buttonValue&&l.push({key:"formButton",contents:S.buttonValue}),typeof S.isEnableWrap<"u"&&l.push({key:"enableWrap",contents:S.isEnableWrap}),l},ie=S=>[],o=()=>{if(N.value>=0&&N.value<h.value.length){const S=c(N.value);Q.value.set(S,r.cloneDeep(P.value)),h.value[N.value].children=_(P.value),console.log("保存后的数据",_(P.value))}F.value=!1,N.value=-1,K.value=null,C()},b=()=>{K.value&&q.setItemData(r.cloneDeep(K.value)),F.value=!1,N.value=-1,K.value=null},j=()=>{F.value&&b()},_=S=>{if(!Array.isArray(S))throw new Error("sourceData must be an array");return S.map((l,T)=>{if(!l||typeof l!="object")return l;const{comp:I,name:Z,compData:E}=l;switch(I){case"Form":return{type:"form",content:L(E||[]),value:"表单"};case"Table":return{type:"table",content:ee(E||[]),value:"表格"};default:return{type:"xxx",content:ae(E||[]),value:""}}})},L=S=>{const l={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},T={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return S.forEach((I,Z)=>{if(!I||typeof I!="object"){console.warn(`Invalid config at index ${Z}:`,I);return}const{key:E,contents:z}=I,U=T[E];if(!U){console.warn(`Unknown Form config key: ${E}`);return}E==="enableWrap"?l[U]=!!z:l[U]=Array.isArray(z)?z:[]}),l},ee=S=>{const l={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},T={header:"columns",tableContents:"tableData"};return S.forEach((I,Z)=>{if(!I||typeof I!="object"){console.warn(`Invalid config at index ${Z}:`,I);return}const{key:E,contents:z}=I,U=T[E];if(!U){console.warn(`Unknown Table config key: ${E}`);return}l[U]=Array.isArray(z)?z:[]}),l},ae=S=>(console.log("Default conversion logic - to be implemented"),{originalData:S,processed:!1,componentType:"unknown"}),C=()=>{const S=[{key:"stepList",contents:h.value}];t("change",S)};return e.watch(()=>v.itemContents,S=>{if(S&&S.length>0){const l=S.find(T=>T.key==="stepList");l&&l.contents&&(h.value=l.contents.map(T=>({title:T.title||"",value:T.value||T.title||"",label:T.label||T.title||"",children:T.children||[],id:T.id||n()})))}},{immediate:!0,deep:!0}),(S,l)=>{const T=e.resolveComponent("svg-icon"),I=e.resolveComponent("el-input"),Z=e.resolveComponent("el-form-item"),E=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Bo,[l[6]||(l[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:g},[e.createVNode(T,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),l[5]||(l[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",Vo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(z,U)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:U},[e.createElementVNode("span",No,e.toDisplayString(z.title),1),e.createElementVNode("div",To,[e.createElementVNode("button",{onClick:J=>p(U)},"修改标题",8,Io),e.createElementVNode("button",{onClick:J=>s(U)},"布局调整",8,$o),e.createElementVNode("button",{onClick:J=>d(U)},"删除",8,Fo)])]))),128))]),e.createVNode(ce.ssDialog,{modelValue:w.value,"onUpdate:modelValue":l[2]||(l[2]=z=>w.value=z),title:M.value,onBeforeDestroy:l[3]||(l[3]=z=>w.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:l[1]||(l[1]=z=>w.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:A},"确定")]),default:e.withCtx(()=>[e.createVNode(E,{model:y.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Z,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(I,{modelValue:y.value.title,"onUpdate:modelValue":l[0]||(l[0]=z=>y.value.title=z),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(ce.ssDialog,{modelValue:F.value,"onUpdate:modelValue":l[4]||(l[4]=z=>F.value=z),title:"布局调整",fullScreen:"",onBeforeDestroy:j},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:b},"取消"),e.createElementVNode("button",{onClick:o},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",So,[e.createElementVNode("div",Ao,[e.createVNode(co),e.createElementVNode("div",Lo,[l[8]||(l[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,z=>(e.openBlock(),e.createElementBlock("div",{key:z.id,class:"component-item",onClick:U=>W(z)},[e.createElementVNode("div",Mo,[e.createElementVNode("span",Po,e.toDisplayString(m(z.comp)),1),e.createElementVNode("span",Uo,e.toDisplayString(z.name),1)]),l[7]||(l[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Ro))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:S.innerWidth},[e.createVNode(wo)])),e.createElementVNode("div",jo,[e.createVNode(_o)])])]),_:1},8,["modelValue"])])}}},zo=he._export_sfc(Wo,[["__scopeId","data-v-151936e8"]]),qe=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"}]),Ko={TABLE:De.ssTable,FORM:Le,TABLEOPERATE:Yl,FORMOPERATE:Oe,FOLD:Va,CALCULATOR:Sa,METHODBUTTON:Oa,AVATARUPLOAD:Ae.ssAvatar,SIGNATURE:Ae.ssSignature,FORMTOP:Le,STEP:Ha,STEPOPERATE:ga,TIMELINE:lo,TIMELINEOPERATE:Ea,FORMTOPOPERATE:Oe,SIGNATUREOPERATE:qa,AVATARUPLOADOPERATE:Pa,TABS:no,TABSOPERATE:zo};function $e(k){return Ko[k==null?void 0:k.toUpperCase()]||null}exports.getComponent=$e;exports.slotContent=qe;exports.useFormComp=Me;
|
package/dist/index-BkKYXjJ0.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),u=require("./menu-BXTfsfTB.cjs"),g=require("./index-DXIV-OAV.cjs"),f=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs"),v=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C=a=>{const s={};for(let l in a)l!=="id"&&(s[l]=a[l]);const r=s==null?void 0:s.主菜单名称;u.createInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:r},value:{tableData:s}})},D=a=>{u.deleteInsofDataApi({id:a==null?void 0:a.id})},h=a=>{const s={};for(let l in a)l!=="id"&&(s[l]=a[l]);const r=s==null?void 0:s.主菜单名称;u.updateInsofDataApi({id:a==null?void 0:a.id,key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:r},value:{tableData:s}})},x={class:"menu-content"},k=o.defineComponent({__name:"index",setup(a){const s=u.useMenuState(u.pinia),{menus:r}=u.storeToRefs(s),l=o.ref([]),_=async()=>{var m,n,p,t;const e=await u.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey")}});if(((m=e==null?void 0:e.data)==null?void 0:m.type)==="success"){let d=(p=(n=e==null?void 0:e.data)==null?void 0:n.result)==null?void 0:p.map(i=>i);return d=(t=f.cloneDeep(d))==null?void 0:t.map(i=>{var b;const y=Object.values((b=i==null?void 0:i.value)==null?void 0:b.tableData);return y.unshift({id:i==null?void 0:i.id}),y}),d}else return[]};o.onMounted(async()=>{var p;const e=await _(),n=[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:(p=f.cloneDeep(r.value))==null?void 0:p.map(t=>({label:t==null?void 0:t.title,value:t==null?void 0:t.title})),prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}];n.push({key:"tableContents",contents:e}),l.value=n});const c=e=>{(e==null?void 0:e.buttonName)==="新增"?C(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="删除"?D(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="编辑"&&h(e==null?void 0:e.singleContent)};return(e,m)=>(o.openBlock(),o.createElementBlock("div",x,[o.createVNode(g.ssTable,{itemData:l.value,class:"table-content",onChange:c},null,8,["itemData"])]))}}),q=v._export_sfc(k,[["__scopeId","data-v-26f5cadc"]]);exports.default=q;
|
package/dist/index-Bpt6Hcq2.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const y=require("vue"),r=require("./menu-BXTfsfTB.cjs"),C=require("./index-CxS1YyFs.cjs"),i=require("./crypto-CRbcEKIz.cjs"),B=require("./login-CW3Tv6wk.cjs"),E=require("./index-0Aj-6Pfy.cjs"),x=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs"),M=B.useLoginState(r.pinia),{superAdminInfo:D,cryptoInfo:l}=r.storeToRefs(M),P=r.useMenuState(r.pinia),{activeMenuPath:o}=r.storeToRefs(P),f="123456",I=C.useAuthorityState(r.pinia),{routerPageStructures:U}=r.storeToRefs(I),b=y.ref(0),L=y.ref([{label:"用户名称",value:"",name:"userName"}]),g=y.computed(()=>{const s=sessionStorage.getItem("isSuperAdmin");return s?JSON.parse(s):!1}),N=s=>{console.log("handleQueryChange",s)},d=y.computed(()=>{var a,u;const s=(a=U.value)==null?void 0:a.find(e=>{var n;return((n=e==null?void 0:e.comp)==null?void 0:n.toUpperCase())==="TABLE"});return s?(u=s==null?void 0:s.compData)==null?void 0:u.map(e=>{if((e==null?void 0:e.key)==="rowButton"){const n=[...e==null?void 0:e.contents,{label:"重置密码"}];return{...e,contents:n}}return e}):[]}),O=s=>{p(s.singleContent,s.buttonName,b.value)},v=y.ref(),j=s=>{console.log("onDoubleClick",s)},z=(s,a)=>{s==="重置密码"&&E.ElMessageBox.confirm(`该操作将会重置【${a==null?void 0:a.account}】的密码,确认重置?`,"警告",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{v.value={...a,password:f},p(v.value,s,b.value)}).catch(()=>{r.ElMessage.info("取消重置")})},q=()=>{h(o.value).then(s=>{var u;const a=Array.isArray(s)&&(s==null?void 0:s.filter(e=>(e==null?void 0:e.account)!==D.value.account));d.value=(u=d.value)==null?void 0:u.map(e=>e.key==="tableContents"?{...e,contents:a==null?void 0:a.map(n=>{var t;return{...n,password:i.decryptData(n==null?void 0:n.password,(t=l==null?void 0:l.value)==null?void 0:t.privateKey)}})}:e)})},c=async(s,a,u)=>{var e,n;try{const t=await s(a);return((e=t==null?void 0:t.data)==null?void 0:e.code)===200?(u!=="查询"&&await M.setLogRecordAsync({type:u,data:a},o.value),t.data.result||((n=t==null?void 0:t.data)==null?void 0:n.code)===200):null}catch(t){r.ElMessage.error(t)}},p=(s,a,u)=>{var n,t,A,S,_,K;const e=x.cloneDeep(s);e!=null&&e.id&&delete e.id,i.isEncryptAvailable()&&e&&(!e.password&&g.value?e.password=i.encryptData(f,(n=l==null?void 0:l.value)==null?void 0:n.publicKey):e.password&&g.value&&(e.password=i.encryptData(e==null?void 0:e.password,(t=l==null?void 0:l.value)==null?void 0:t.publicKey))),a==="新增"?c(r.createInsofDataApi,{key:{type:"data",layer:e==null?void 0:e.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(A=o.value)!=null&&A.startsWith("/")?(S=o.value)==null?void 0:S.substring(1):o.value,tableId:u},value:{tableData:e}},a).then(k=>{var T;v.value={...s,newId:k,password:g.value?i.decryptData((s==null?void 0:s.password)??f,(T=l==null?void 0:l.value)==null?void 0:T.privateKey):s==null?void 0:s.password},a&&k&&r.ElMessage.success(a+"成功")}):a==="编辑"||a==="重置密码"?c(r.updateInsofDataApi,{id:s.id,key:{type:"data",layer:e==null?void 0:e.layer,systemKey:sessionStorage.getItem("systemKey"),pageKey:(_=o.value)!=null&&_.startsWith("/")?(K=o.value)==null?void 0:K.substring(1):o.value,tableId:u},value:{tableData:e}},a).then(()=>{a==="重置密码"&&q(),a&&r.ElMessage.success(a+"成功"),C.authorizeDialog.show=!1}):a==="删除"&&c(r.deleteInsofDataApi,{id:s.id},a).then(()=>{a&&r.ElMessage.success(a+"成功")})},h=async s=>{const a=await c(r.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:s}},"查询"),u=a==null?void 0:a.map(e=>{var n,t;return{id:e.id,layer:(n=e.key)==null?void 0:n.layer,tableData:(t=e==null?void 0:e.value)==null?void 0:t.tableData}});return u==null?void 0:u.map(e=>{var n;if(!Array.isArray(e==null?void 0:e.tableData))return{...e.tableData,layer:(n=e.key)==null?void 0:n.layer,id:e.id}})},Q={comp:"Group",name:"/系统管理/用户管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:d.value,name:""}]}]},V=Object.freeze(Object.defineProperty({__proto__:null,changedRow:v,clickRowButton:z,getPageDataAsync:h,handleItemDataChange:O,handleQueryChange:N,handleSubmitAsync:c,loginUserIsSuper:g,onDoubleClick:j,pageData:d,queryFormData:L,refreshUserTableData:q,structureId:b,submitTableAsyncByVerify:p,tempUserPageData:Q},Symbol.toStringTag,{value:"Module"}));exports.State=V;exports.getPageDataAsync=h;exports.handleSubmitAsync=c;exports.submitTableAsyncByVerify=p;
|
package/dist/index-CI__ZdC-.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),B=require("./index--3QjFI9W.cjs"),k=require("./menu-BXTfsfTB.cjs"),y=require("./threeModel.vue_vue_type_style_index_0_scoped_4a248817_lang-C1EygWi0.cjs");require("./array-T-glopHk.cjs");const V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B40u7Mx6.cjs"),F=require("./index-C31XRLFj.cjs"),O=require("./index-Dx6aORao.cjs"),R=require("./index-0Aj-6Pfy.cjs"),b={class:"type-select"},L=["onClick"],U={class:"list-icon"},z={__name:"index",setup(E){const m=y.useModelComp(k.pinia),{itemData:i}=k.storeToRefs(m),C=v=>{const d=_.cloneDeep(i.value);d.push({comp:v.comp,name:v.name,compData:[]}),m.setItemData(d)};return(v,d)=>{const s=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(B.slotContent),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:u},[e.createElementVNode("div",{class:"list-content",onClick:g=>C(f)},[e.createElementVNode("div",U,[e.createVNode(s,{name:f.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(f.name),1)],8,L)]))),128))])}}},H=V._export_sfc(z,[["__scopeId","data-v-1f87163f"]]),j={class:"fill-content"},A={class:"operate-content"},G={class:"collapse-title-content"},J={class:"collapse-title-item"},K={key:1},P=["onClick"],Q={class:"icon-content"},W={key:0,class:"edit-content"},X=["onClick"],Y={class:"comp-child"},Z={__name:"index",setup(E){const m=y.useModelComp(k.pinia),{itemData:i,originalData:C}=k.storeToRefs(m),v=e.ref([]);e.ref([]);const d=e.ref([]),s=e.ref([]),f=a=>{var n;let c=(n=_.cloneDeep(s.value))==null?void 0:n.map((t,o)=>(a===o&&(t.content=!0),t));s.value=c},u=a=>{var n;let c=(n=_.cloneDeep(s.value))==null?void 0:n.map((t,o)=>(a===o&&(t.content=!1),t));s.value=c,v.value=_.cloneDeep(i.value)},g=(a,c)=>{var h;let n=(h=_.cloneDeep(s.value))==null?void 0:h.map((l,p)=>(a===p&&(l.content=!1),l));s.value=n;const t=_.cloneDeep(i.value),o=t==null?void 0:t.filter((l,p)=>(p===a&&(l.name=c),l));m.setOriginalData(o),m.setItemData(o)};e.watch(()=>i.value,()=>{var a,c,n;!i.value||((a=i.value)==null?void 0:a.length)===0?v.value=[]:v.value=(c=_.cloneDeep(i.value))==null?void 0:c.filter(t=>(t==null?void 0:t.comp)!=="methodButton"),d.value=v.value,s.value=(n=_.cloneDeep(d.value))==null?void 0:n.map((t,o)=>({id:o,content:!1}))},{deep:!0,immediate:!0});const S=a=>B.getComponent(a),q=(a,c,n)=>{var o,h;if(!a)return;let t=_.cloneDeep(i.value);t=(o=t==null?void 0:t.map((l,p)=>(p===n&&(l.compData=a),l)))==null?void 0:o.filter(l=>(l==null?void 0:l.comp)!=="methodButton"),s.value=(h=_.cloneDeep(t))==null?void 0:h.map((l,p)=>({id:p,content:!1})),m.setOriginalData(t),m.setItemData(t)},T=a=>{R.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const c=_.cloneDeep(i.value),n=c==null?void 0:c.filter((t,o)=>o!==a);m.setOriginalData(n),m.setItemData(n),k.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(a,c)=>{const n=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",j,[c[1]||(c[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",A,[e.createVNode(F.default,{class:"collapse-content",collapseContents:v.value},{title:e.withCtx(({item:t,index:o})=>{var h,l,p,D,N,x,w,$,I,M;return[e.createElementVNode("div",G,[e.createElementVNode("div",J,[(l=(h=s.value)==null?void 0:h.find(r=>r.id===o))!=null&&l.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:t.name&&t.name!==""?"8px":"0px"})},e.toDisplayString(t.name),5)),(D=(p=s.value)==null?void 0:p.find(r=>r.id===o))!=null&&D.content?(e.openBlock(),e.createElementBlock("div",K,[e.createVNode(O._sfc_main$1,{modelValue:t.name,"onUpdate:modelValue":r=>t.name=r,onClick:c[0]||(c[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(x=(N=s.value)==null?void 0:N.find(r=>r.id===o))!=null&&x.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(r=>f(o),["stop"]),class:"icon-content"},[e.createVNode(n,{name:"Edit",style:{width:"16px",height:"16px"}})],8,P))]),e.createElementVNode("div",Q,[($=(w=s.value)==null?void 0:w.find(r=>r.id===o))!=null&&$.content?(e.openBlock(),e.createElementBlock("div",W,[e.createVNode(n,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(r=>u(o),["stop"])},null,8,["onClick"]),e.createVNode(n,{name:"Save",onClick:e.withModifiers(r=>g(o,t.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(M=(I=s.value)==null?void 0:I.find(r=>r.id===o))!=null&&M.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(r=>T(o),["stop"]),class:"icon-content"},[e.createVNode(n,{name:"Delete",style:{width:"16px",height:"16px"}})],8,X))])])]}),content:e.withCtx(({item:t,index:o})=>{var h,l;return[e.createElementVNode("div",Y,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S(t.comp+"Operate")),{itemContents:t==null?void 0:t.compData,originalItemContents:(l=(h=d.value)==null?void 0:h.find((p,D)=>D===o))==null?void 0:l.compData,onChange:p=>q(p,t,o)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},ee=V._export_sfc(Z,[["__scopeId","data-v-27bd1564"]]),te={key:0,class:"show-content"},oe={style:{display:"flex"}},ne={__name:"index",setup(E){const m=y.useModelComp(k.pinia),{itemData:i}=k.storeToRefs(m),C=e.ref([]);e.watch(()=>i.value,()=>{var d;!i.value||((d=i.value)==null?void 0:d.length)===0?C.value=[]:C.value=_.cloneDeep(i.value)},{deep:!0,immediate:!0});const v=d=>B.getComponent(d);return(d,s)=>{var f;return((f=C.value)==null?void 0:f.length)>0?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:g},[e.createElementVNode("div",oe,e.toDisplayString(u.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(u.comp)),{itemData:u==null?void 0:u.compData,childItemData:u==null?void 0:u.itemChildData,key:g},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},le=V._export_sfc(ne,[["__scopeId","data-v-bfa22d29"]]);exports.modelFill=ee;exports.modelSelect=H;exports.modelShow=le;
|