ss-component-new 1.2.320 → 1.2.321
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/{MTLLoader-CDSTkv2r.js → MTLLoader-DPOghquc.js} +44 -44
- package/dist/{MTLLoader-CzQIVnkW.cjs → MTLLoader-WtlM9u4_.cjs} +1 -1
- package/dist/{OrbitControls-D-H9X2Xc.cjs → OrbitControls-B4WKzU1G.cjs} +1 -1
- package/dist/{OrbitControls-DcmX9nvA.js → OrbitControls-D-nkCRIf.js} +1 -1
- package/dist/{URDFLoader-B_kf63rV.cjs → URDFLoader-BCALUmPB.cjs} +1 -1
- package/dist/{URDFLoader-CdN4_DgF.js → URDFLoader-CWlOHauP.js} +95 -95
- package/dist/{animationData-Clpy-I6C.cjs → animationData-C0UguIKQ.cjs} +1 -1
- package/dist/{animationData-CEhF6uNe.js → animationData-Dzdp9nas.js} +22 -22
- package/dist/{array-hFAdDlKV.cjs → array-CK9adN1S.cjs} +1 -1
- package/dist/{array-BnbdEheX.js → array-DsXvI7kM.js} +36 -36
- package/dist/{iconfont-D0jIkQMM.js → iconfont-BnHV6N2N.js} +21 -21
- package/dist/{iconfont-CdKkdWWU.cjs → iconfont-lNXhZpFp.cjs} +1 -1
- package/dist/{index-acHXwlR5.cjs → index--86Gn2ru.cjs} +1 -1
- package/dist/{index-DMzQ5VfV.cjs → index-0mdQIssU.cjs} +1 -1
- package/dist/index-1Owg_Mf-.cjs +1 -0
- package/dist/{index-BN6O_Eek.js → index-9UoNKztf.js} +1 -1
- package/dist/{index-DGWdVqDd.cjs → index-A_jMsoyr.cjs} +1 -1
- package/dist/{index-Hsb03y-r.js → index-B1H0LkPE.js} +1 -1
- package/dist/{index-Dtm1Qjht.js → index-BBclOeFM.js} +1 -1
- package/dist/{index-B63s-JlF.js → index-BGMypXCK.js} +4 -4
- package/dist/{index-ChY5FLQd.js → index-BSgP28TB.js} +2 -2
- package/dist/{index-CsYuwsiy.cjs → index-B_ocki10.cjs} +1 -1
- package/dist/{index-CZmHTDer.cjs → index-BcDHAiO3.cjs} +1 -1
- package/dist/{index-B9biCv6N.js → index-BsIOE41E.js} +1 -1
- package/dist/{index-BUgBjm_0.cjs → index-BykHr1Eg.cjs} +1 -1
- package/dist/{index-BULVh0UT.js → index-C7bPptTr.js} +1 -1
- package/dist/{index-BbLk-2Gd.js → index-CZ6fkXHY.js} +5 -5
- package/dist/index-CZXiiKiM.cjs +11 -0
- package/dist/index-CigkH2AZ.js +12465 -0
- package/dist/{index-CuaMF-D0.js → index-Cxsfl10z.js} +3 -3
- package/dist/{index-BMobTVwt.cjs → index-D0xh6m7C.cjs} +1 -1
- package/dist/{index-CKJP2psW.cjs → index-D2lip588.cjs} +1 -1
- package/dist/{index-BBYRL3BD.js → index-D7Gyeuk1.js} +4 -4
- package/dist/{index-CmYzo1h5.cjs → index-DCYH5zL4.cjs} +1 -1
- package/dist/{index-CIWoZH8M.cjs → index-DN4tn4Q1.cjs} +1 -1
- package/dist/{index-DhORf5Ca.cjs → index-DRTEyrqM.cjs} +1 -1
- package/dist/{index-C_mznIEq.js → index-DTAyw_rT.js} +5 -5
- package/dist/{index-ChkaCKRr.js → index-DWpSqmnH.js} +2150 -2152
- package/dist/{index-WhfGtq5k.js → index-DeINnO1a.js} +1 -1
- package/dist/{index-CDxSv4Fm.cjs → index-DlRKKRIJ.cjs} +1 -1
- package/dist/{index-2pT_YeoR.cjs → index-DmUZr5rN.cjs} +1 -1
- package/dist/{index-Dcvmiima.js → index-DuAd7WnG.js} +1 -1
- package/dist/{index-gII2yOS-.js → index-Dz0Yy_aU.js} +3 -3
- package/dist/{index-DsWNgreC.js → index-EEdSZ0XK.js} +1 -1
- package/dist/{index-D-EuGZq6.cjs → index-HIz3WqB6.cjs} +1 -1
- package/dist/{index-an4li1M5.cjs → index-HZa2fjvR.cjs} +1 -1
- package/dist/{index-auR6PIXZ.js → index-McjYxFmy.js} +4 -4
- package/dist/{index-B2NXMUwG.cjs → index-NT3-shBq.cjs} +1 -1
- package/dist/{index-BkR1ZyW0.cjs → index-Y-aMAtUz.cjs} +1 -1
- package/dist/{index-q3TzHC9c.cjs → index-ZDxZcfNU.cjs} +1 -1
- package/dist/{index-B--dkiC3.js → index-r0hSh3Ho.js} +1 -1
- package/dist/{index-Cz3X-nTr.js → index-seLSz6FS.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bo3GWmfl.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-B-jMTZLT.cjs} +107 -107
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C7EqnG9z.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-gYZo9wwL.js} +152 -151
- package/dist/{index.vue_vue_type_style_index_1_lang-CCAvftWy.js → index.vue_vue_type_style_index_1_lang-BlEiaBVX.js} +182 -182
- package/dist/{index.vue_vue_type_style_index_1_lang-C82aG_1o.cjs → index.vue_vue_type_style_index_1_lang-Dl0UrVqn.cjs} +1 -1
- package/dist/{main-TVcRSKDf.cjs → main-D9dcB2l7.cjs} +1 -1
- package/dist/{main-CGEK-Lu3.js → main-DrHv50I2.js} +3 -3
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +8 -8
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-BWNBsSte.cjs → threeModel-CU32ZPcV.cjs} +1 -1
- package/dist/{threeModel-DiqA6QHp.js → threeModel-D99aHX_f.js} +24 -24
- package/dist/{threePreview-_Y77vG5u.js → threePreview-Br0EE4Ud.js} +114 -114
- package/dist/{threePreview-Ceu1jsHj.cjs → threePreview-DVU8LB-6.cjs} +1 -1
- package/dist/{threeSceneView-KzaY14zK.js → threeSceneView-COmqJFJG.js} +8 -8
- package/dist/{threeSceneView-CQIft8NI.cjs → threeSceneView-DqdT1Ddr.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Cb79-tDO.js → threeSceneViewForCPMPIP-B51x6Ync.js} +7 -7
- package/dist/{threeSceneViewForCPMPIP-B77HstZi.cjs → threeSceneViewForCPMPIP-ra01ZlH4.cjs} +1 -1
- package/dist/{threeTrackPathView-CmZ0-vAj.js → threeTrackPathView-C22dVYEt.js} +88 -88
- package/dist/{threeTrackPathView-Bb5aCZ93.cjs → threeTrackPathView-DAoYI7KH.cjs} +1 -1
- package/dist/{threeViewerHost-C7xRsvtB.js → threeViewerHost-CxfATzg5.js} +15 -15
- package/dist/{threeViewerHost-9ZQ5PlEH.cjs → threeViewerHost-dB3mMvbG.cjs} +1 -1
- package/dist/{urdfTree-BIfrcTrZ.js → urdfTree-B7vFAieq.js} +4 -4
- package/dist/{urdfTree-Cf82F-ZA.cjs → urdfTree-Un6KDIVy.cjs} +1 -1
- package/dist/{workpieceTreePanel-CoG2RuKE.js → workpieceTreePanel-CgNiyUrm.js} +27 -27
- package/dist/{workpieceTreePanel-BjrztNlC.cjs → workpieceTreePanel-D6QEaOh8.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-CbJ7Fc-s.js +0 -12271
- package/dist/index-GVffFAZv.cjs +0 -1
- package/dist/index-J-1vJ4iC.cjs +0 -11
package/dist/index-GVffFAZv.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const gn=require("./index-BUgBjm_0.cjs"),e=require("vue"),ee=require("./index-B5Iw9Udy.cjs"),Bt=require("./index-2pT_YeoR.cjs"),Me=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bo3GWmfl.cjs"),Jt=require("./index-DhORf5Ca.cjs"),Do=require("./threeViewerHost-9ZQ5PlEH.cjs"),I=require("./index-BJR7UdIU.cjs"),Pt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),_o=require("./isString-C9Flprgd.cjs"),Eo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),So=require("./index-an4li1M5.cjs"),cr=require("./index-BVaHwt5f.cjs"),Bi=require("./index-CIWoZH8M.cjs"),sn=require("./index-DjozbkuL.cjs"),Ni=require("./index-BpPyaNFa.cjs"),Ai=require("vue-router"),vn=require("./index-9hspBVrQ.cjs"),Vi=require("./menuIndex-Ca9TKlgf.cjs");var Oi=/\s/;function Mi(n){for(var l=n.length;l--&&Oi.test(n.charAt(l)););return l}var zi=/^\s+/;function Fi(n){return n&&n.slice(0,Mi(n)+1).replace(zi,"")}var To=NaN,Ri=/^[-+]0x[0-9a-f]+$/i,Li=/^0b[01]+$/i,Pi=/^0o[0-7]+$/i,$i=parseInt;function Io(n){if(typeof n=="number")return n;if(ee.isSymbol(n))return To;if(ee.isObject(n)){var l=typeof n.valueOf=="function"?n.valueOf():n;n=ee.isObject(l)?l+"":l}if(typeof n!="string")return n===0?n:+n;n=Fi(n);var c=Li.test(n);return c||Pi.test(n)?$i(n.slice(2),c?2:8):Ri.test(n)?To:+n}var Jn=function(){return ee.root.Date.now()},ji="Expected a function",Ui=Math.max,Ki=Math.min;function ur(n,l,c){var r,p,u,y,h,f,w=0,C=!1,V=!1,F=!0;if(typeof n!="function")throw new TypeError(ji);l=Io(l)||0,ee.isObject(c)&&(C=!!c.leading,V="maxWait"in c,u=V?Ui(Io(c.maxWait)||0,l):u,F="trailing"in c?!!c.trailing:F);function G(A){var B=r,pe=p;return r=p=void 0,w=A,y=n.apply(pe,B),y}function M(A){return w=A,h=setTimeout(U,l),C?G(A):y}function Ce(A){var B=A-f,pe=A-w,Ue=l-B;return V?Ki(Ue,u-pe):Ue}function H(A){var B=A-f,pe=A-w;return f===void 0||B>=l||B<0||V&&pe>=u}function U(){var A=Jn();if(H(A))return ue(A);h=setTimeout(U,Ce(A))}function ue(A){return h=void 0,F&&r?G(A):(r=p=void 0,y)}function x(){h!==void 0&&clearTimeout(h),w=0,r=f=p=h=void 0}function R(){return h===void 0?y:ue(Jn())}function b(){var A=Jn(),B=H(A);if(r=arguments,p=this,f=A,B){if(h===void 0)return M(f);if(V)return clearTimeout(h),h=setTimeout(U,l),G(f)}return h===void 0&&(h=setTimeout(U,l)),y}return b.cancel=x,b.flush=R,b}var Wi="[object Boolean]";function dr(n){return n===!0||n===!1||ee.isObjectLike(n)&&ee.baseGetTag(n)==Wi}function Hi(n){return n===void 0}const qi={class:"form-content"},Gi={title:"选择标签"},Xi={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Yi={class:"col-operate-wrap"},Ji={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Zi={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:l}){const c=()=>{y.value=!1,h.value=!1,f.value=[]},r=n;e.computed(()=>{var L;const E=(L=O.value)==null?void 0:L.split("/");return(E==null?void 0:E.some(K=>(K==null?void 0:K.includes("updateLoading"))||(K==null?void 0:K.includes("loading"))))?!1:z.value==="view"});const p=l,u=e.ref([]),y=e.ref(!1),h=e.ref(!1),f=e.ref([]),{getFileExtension:w}=Do.useThreeSystem(),C=e.ref(),V=e.ref(!1),F=e.ref(!1),G=Me.useUnit(ee.pinia),{chooseTitle:M}=ee.storeToRefs(G),Ce=e.ref([]),H=e.ref(),U=e.ref(!1),ue=e.ref([]),x=gn.useFormToTableComp(ee.pinia),R=gn.useFormComp(ee.pinia),b=e.ref(!1),A=e.ref(),B=I.useLoginState(ee.pinia),{loginUserInfo:pe}=ee.storeToRefs(B),Ue=e.ref(),pt=e.ref(!0),Ne=I.useModelComp(ee.pinia),{tableViewContents:Ke,itemData:qe,isEdit:z,routeToChildPath:se,lockingPage:ie}=ee.storeToRefs(Ne),he=e.ref(null),et=e.ref(!1),lt=e.ref(!1),q=I.useMenuState(),{activeMenuPath:O}=ee.storeToRefs(q),ke=Me.useOriginalState(ee.pinia),{originalPath:we}=ee.storeToRefs(ke),Le=e.ref([]),Fe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),tt=async E=>{lt.value=E,await oe("disabled",null,E,!0)},ae=async E=>{await oe("operable",null,E,!0)};e.watch(()=>O.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const Ee=()=>{e.nextTick(()=>{Ve()})},S=E=>{var J;u.value=(J=u.value)==null?void 0:J.map(L=>({...L,isFormColHidden:!(E!=null&&E.includes(L.label))}))};e.onUnmounted(()=>{he.value=null});const Je=E=>{p("clickTrigger",E)},Ze=async E=>{var J,L,K,De,te,W;if(E===""){let X="";(J=u.value)==null||J.forEach(ye=>{ye!=null&&ye.isMain&&(X=ye==null?void 0:ye.value)});let ce=await Me.getItemData(se.value,sessionStorage.getItem("systemKey"),"");X=((W=(te=(De=(K=(L=ce==null?void 0:ce[0])==null?void 0:L.compData)==null?void 0:K.find(ye=>(ye==null?void 0:ye.key)==="mainRouters"))==null?void 0:De.contents)==null?void 0:te[0])==null?void 0:W.routerContent)+we.value+X;let me=await Me.getItemData(X,sessionStorage.getItem("systemKey"),"");U.value=!0,ue.value=me==null?void 0:me.filter(ye=>(ye==null?void 0:ye.comp)!=="methodButton"),p("routeUrl",ue.value)}},Ve=()=>{var J;const E=(J=he.value)==null?void 0:J.$el;E&&Me.Sortable.create(E,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:L=>{const{oldIndex:K,newIndex:De}=L;if(K===De)return;const te=u.value.splice(K,1)[0];u.value.splice(De,0,te)}})},oe=async(E,J,L,K=!1)=>{var De,te,W,X,ce,be,me,ye;try{Ne.setRefreshCurStructure(!1);const P=await ee.getInsofDataApi({id:r==null?void 0:r.index});if(((De=P==null?void 0:P.data)==null?void 0:De.code)===200){let Te=(ce=(X=(W=(te=P==null?void 0:P.data)==null?void 0:te.result)==null?void 0:W[0])==null?void 0:X.value)==null?void 0:ce.pageData;K?Te={...Te,compData:(me=Te==null?void 0:Te.compData)==null?void 0:me.map(Oe=>{var rt;return(Oe==null?void 0:Oe.key)==="formContent"?{...Oe,contents:(rt=Oe==null?void 0:Oe.contents)==null?void 0:rt.map(Pe=>({...Pe,[E]:L}))}:Oe})}:Te={...Te,compData:(be=Te==null?void 0:Te.compData)==null?void 0:be.map(Oe=>{var rt;return(Oe==null?void 0:Oe.key)==="formContent"?{...Oe,contents:(rt=Oe==null?void 0:Oe.contents)==null?void 0:rt.map(Pe=>(Pe==null?void 0:Pe.prop)===(J==null?void 0:J.prop)?{...Pe,[E]:L}:Pe)}:Oe})};const de=await ee.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Te}});((ye=de==null?void 0:de.data)==null?void 0:ye.code)===200?(ee.ElMessage.success("编辑成功"),Ne.setRefreshCurStructure(!0)):ee.ElMessage.error("编辑响应失败")}}catch{ee.ElMessage.error("编辑处理失败")}},Q=async(E,J)=>{await oe("label",J,E)},re=async(E,J)=>{E&&await oe("type",J,E)},Se=async(E,J,L)=>{await oe(J,L,E,!1)},Ge=(E,J)=>{Ue.value===J?pt.value=!1:pt.value=!0,Ue.value=J==null?void 0:J.changeProp},st=async E=>{var L,K,De,te,W,X,ce,be,me,ye,P,Te,de,Oe,rt;let J=[];if((L=E==null?void 0:E.toString())!=null&&L.includes(".urdf")){if(E.includes(",")){ee.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:E,extension:w(E)}],h.value=!0,y.value=!0;return}if((K=E==null?void 0:E.toString())!=null&&K.includes(".stl")||(De=E==null?void 0:E.toString())!=null&&De.includes(".STL")||(te=E==null?void 0:E.toString())!=null&&te.includes(".obj")||(W=E==null?void 0:E.toString())!=null&&W.includes(".mtl")){const nt=((X=E==null?void 0:E.toString())==null?void 0:X.split(",")).map(Ae=>({url:Ae,extension:w(Ae)}));f.value=nt,h.value=!1,y.value=!0;return}if((ce=E==null?void 0:E.toString())!=null&&ce.includes(".stl")||(be=E==null?void 0:E.toString())!=null&&be.includes(".STL")||(me=E==null?void 0:E.toString())!=null&&me.includes(".obj")||(ye=E==null?void 0:E.toString())!=null&&ye.includes(".mtl")){let Pe,nt=[],Ae={};if(Array.isArray(E)?Pe=E:Pe=E==null?void 0:E.split(","),Pe==null||Pe.forEach(vt=>{vt.includes(".mtl")?nt.push(vt):Ae.blob=Ae.blob?Ae.blob+","+vt:vt}),(nt==null?void 0:nt.length)>0&&(Ae.mtlBlobs=nt),(Te=(P=Object.values(Ae))==null?void 0:P[0])!=null&&Te.includes("http:"))J.push(Ae);else{const vt=new Blob([Ae.blob],{type:"application/octet-stream;charset=UTF-8"});let at=URL.createObjectURL(vt),ve="";(de=E==null?void 0:E.split("/"))==null||de.forEach((Xe,Qe)=>{var $e;Qe===(($e=E==null?void 0:E.split("/"))==null?void 0:$e.length)-1&&(ve=Xe)}),(Oe=Ae.blob)!=null&&Oe.includes(".stl")&&(ve=(ve==null?void 0:ve.replaceAll(">",""))+".urdf"),H.value=[{name:ve,blobUrl:at}],F.value=!0}}else{const Pe=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),nt=await ee.axios.get(E,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Pe.close()}),Ae=new Blob([nt.data],{type:"application/octet-stream;charset=UTF-8"});let vt=URL.createObjectURL(Ae),at="";(rt=E==null?void 0:E.split("/"))==null||rt.forEach((ve,Xe)=>{var Qe;Xe===((Qe=E==null?void 0:E.split("/"))==null?void 0:Qe.length)-1&&(at=ve)}),H.value=[{name:at,blobUrl:vt}],F.value=!0}(J==null?void 0:J.length)>0&&R.setBlobUrls(J)},v=()=>{F.value=!1},_=E=>{var te,W,X,ce;const J=(W=(te=I.cloneDeep(r.itemData))==null?void 0:te.find(be=>(be==null?void 0:be.key)==="formContent"))==null?void 0:W.contents,L=I.cloneDeep(E.content);let K={};L&&((X=Object.values(L))==null?void 0:X.length)>0&&((ce=Object.values(L))==null||ce.forEach((be,me)=>{K[J[me].key]=be}));const De={content:K,index:r==null?void 0:r.index,buttonName:E==null?void 0:E.buttonName};p("change",De)},j=e.computed(()=>"http://222.92.178.198:62001"),Y=async E=>{var P,Te,de,Oe,rt,Pe,nt,Ae,vt,at,ve,Xe,Qe,$e,_e,ft;if(!E)return;(Te=(P=r==null?void 0:r.itemData)==null?void 0:P.find(le=>(le==null?void 0:le.key)==="parentFormPath"))==null||Te.contents;let J=Ke.value;(J==null?void 0:J.length)>0&&(J=J==null?void 0:J.map(le=>{var Ie,Ye,D,fe;let Be=(Ie=le==null?void 0:le.key)==null?void 0:Ie.split("/");return(r==null?void 0:r.compName)===(Be==null?void 0:Be[0])&&(Ye=u.value)!=null&&Ye.find(We=>(We==null?void 0:We.prop)===(Be==null?void 0:Be[1]))&&(le.value=(fe=(D=u.value)==null?void 0:D.find(We=>(We==null?void 0:We.prop)===(Be==null?void 0:Be[1])))==null?void 0:fe.value),le}),Ne.setTableViewContents(J));const L=I.cloneDeep(r.itemData);let K=L==null?void 0:L.map(le=>{var Be;return(le==null?void 0:le.key)==="formContent"&&((Be=le.contents)==null||Be.map((Ie,Ye)=>{var D,fe,We,ge,dt,ct,wt,ht,ut,gt,Ct,It,Wt,yt,Mt,$t,Ht,Gt,Qt;return Ie.type=(fe=(D=u.value)==null?void 0:D.find(Rt=>(Rt==null?void 0:Rt.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:fe.type,Ie.options=Ie!=null&&Ie.options?Ie.options:((dt=(ge=(We=Ie==null?void 0:Ie.key)==null?void 0:We.split("$"))==null?void 0:ge[1])==null?void 0:dt.length)>0?(ut=(ht=gn.formGetOptions((wt=(ct=Ie==null?void 0:Ie.key)==null?void 0:ct.split("$"))==null?void 0:wt[1]))==null?void 0:ht.split(","))==null?void 0:ut.map(Rt=>({label:Rt,value:Rt})):[],(gt=Ie==null?void 0:Ie.key)!=null&>.includes("$")&&(Ie.key=(It=(Ct=Ie==null?void 0:Ie.key)==null?void 0:Ct.split("$"))==null?void 0:It[0]),Ie.signature=(yt=(Wt=u.value)==null?void 0:Wt.find(Rt=>(Rt==null?void 0:Rt.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:yt.signature,Ie.isLoginUser=($t=(Mt=u.value)==null?void 0:Mt.find(Rt=>(Rt==null?void 0:Rt.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:$t.isLoginUser,Ie.value=(Ht=Object.values(E))==null?void 0:Ht[Ye],Ie.isFormColHidden=(Qt=(Gt=u.value)==null?void 0:Gt.find(Rt=>(Rt==null?void 0:Rt.prop)===(Ie==null?void 0:Ie.prop)))==null?void 0:Qt.isFormColHidden,Ie})),le}),De=u.value,te=(Oe=(de=I.cloneDeep(K))==null?void 0:de.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:Oe.contents;if(De=De==null?void 0:De.map(le=>{var Be;return le.value=(Be=te==null?void 0:te.find((Ie,Ye)=>((Ie==null?void 0:Ie.id)??Ye)===(le==null?void 0:le.id)))==null?void 0:Be.value,le}),!pt.value){p("contentChange",{contents:K,index:r.index});return}let W="",X=(nt=(Pe=(rt=I.cloneDeep(K))==null?void 0:rt.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:Pe.contents)==null?void 0:nt.find((le,Be)=>{var Ie,Ye,D;return(le==null?void 0:le.label)===Ue.value||Be.toString()===((D=(Ye=(Ie=Ue.value)==null?void 0:Ie.split("t"))==null?void 0:Ye[1])==null?void 0:D.toString())}),ce=(Ae=X==null?void 0:X.optionUrl)==null?void 0:Ae.menuSelect,be=!0;if((ve=(at=(vt=I.cloneDeep(K))==null?void 0:vt.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:at.contents)==null||ve.forEach(le=>{var Be,Ie,Ye,D,fe,We;be&&((Ye=(Ie=(Be=le==null?void 0:le.optionUrl)==null?void 0:Be.groupSelect)==null?void 0:Ie[1])!=null&&Ye.includes("["))&&(W=(fe=(D=le==null?void 0:le.optionUrl)==null?void 0:D.groupSelect)==null?void 0:fe[1],JSON.stringify(ce)===JSON.stringify((We=le==null?void 0:le.optionUrl)==null?void 0:We.menuSelect)&&(be=!1))}),(Xe=X==null?void 0:X.optionUrl)!=null&&Xe.menuSelect&&pt.value){let le=await gn.getSelectRow(X),Be,Ie=(Qe=X==null?void 0:X.optionUrl)==null?void 0:Qe.menuSelect;if(le==null||le.forEach(Ye=>{var D,fe,We,ge,dt,ct,wt,ht,ut,gt;W===((fe=(D=X==null?void 0:X.optionUrl)==null?void 0:D.groupSelect)==null?void 0:fe[1])&&((dt=(ge=(We=X==null?void 0:X.optionUrl)==null?void 0:We.groupSelect)==null?void 0:ge[1])!=null&&dt.includes("["))&&((gt=I.cloneDeep(Ye))==null?void 0:gt[(ut=(ht=(wt=(ct=X==null?void 0:X.optionUrl)==null?void 0:ct.groupSelect)==null?void 0:wt[1])==null?void 0:ht.replaceAll("[",""))==null?void 0:ut.replaceAll("]","")])===(X==null?void 0:X.value)&&(Be=Ye)}),Be){let Ye=I.cloneDeep(De);Ye=Ye==null?void 0:Ye.map(fe=>{var We,ge,dt,ct,wt,ht,ut,gt,Ct,It,Wt;return(Be!=null&&Be[fe==null?void 0:fe.label]||Be!=null&&Be[(ct=(dt=(ge=(We=fe==null?void 0:fe.optionUrl)==null?void 0:We.groupSelect)==null?void 0:ge[1])==null?void 0:dt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])&&((ut=(ht=(wt=fe==null?void 0:fe.optionUrl)==null?void 0:wt.groupSelect)==null?void 0:ht[1])!=null&&ut.includes("["))&&Ie!=null&&Ie.every(yt=>{var Mt,$t;return($t=(Mt=fe==null?void 0:fe.optionUrl)==null?void 0:Mt.menuSelect)==null?void 0:$t.includes(yt)})&&(fe.value=(Be==null?void 0:Be[fe==null?void 0:fe.label])||(Be==null?void 0:Be[(Wt=(It=(Ct=(gt=fe==null?void 0:fe.optionUrl)==null?void 0:gt.groupSelect)==null?void 0:Ct[1])==null?void 0:It.replaceAll("[",""))==null?void 0:Wt.replaceAll("]","")]),Array.isArray(fe.value)&&fe.value.every(yt=>(yt==null?void 0:yt.url)&&(yt==null?void 0:yt.name))&&(fe.type="Upload")),fe}),Ye=Ye==null?void 0:Ye.map(fe=>{var We,ge,dt;return(We=fe==null?void 0:fe.optionUrl)!=null&&We.oldMenuSelect&&(fe.optionUrl.menuSelect=(dt=(ge=I.cloneDeep(fe))==null?void 0:ge.optionUrl)==null?void 0:dt.oldMenuSelect),fe}),u.value=I.cloneDeep(Ye);let D=I.cloneDeep(Ye);D=D==null?void 0:D.map(fe=>{var We,ge,dt,ct,wt,ht;return(ge=(We=fe==null?void 0:fe.optionUrl)==null?void 0:We.menuSelect)!=null&&ge.some(ut=>ut==null?void 0:ut.includes("["))&&(fe.optionUrl.oldMenuSelect=(ct=(dt=I.cloneDeep(fe))==null?void 0:dt.optionUrl)==null?void 0:ct.menuSelect,fe.optionUrl.menuSelect=(ht=(wt=fe==null?void 0:fe.optionUrl)==null?void 0:wt.menuSelect)==null?void 0:ht.map(ut=>{var gt,Ct,It,Wt;if(ut!=null&&ut.includes("[")){let yt=(Ct=(gt=ut==null?void 0:ut.replaceAll("[","").replaceAll("]",""))==null?void 0:gt.split(":"))==null?void 0:Ct[1];ut=(Wt=(It=I.cloneDeep(Ye))==null?void 0:It.find(Mt=>(Mt==null?void 0:Mt.label)===yt))==null?void 0:Wt.value}return ut})),fe}),u.value=D}else u.value=De;K=K==null?void 0:K.map(Ye=>{var D;return(Ye==null?void 0:Ye.key)==="formContent"&&(Ye.contents=(D=Ye.contents)==null?void 0:D.map(fe=>{var We,ge,dt,ct;return fe.value=((ge=(We=u.value)==null?void 0:We.find(wt=>(wt==null?void 0:wt.label)===(fe==null?void 0:fe.key)))==null?void 0:ge.value)??(fe==null?void 0:fe.value),fe.type=((ct=(dt=u.value)==null?void 0:dt.find(wt=>(wt==null?void 0:wt.prop)===(fe==null?void 0:fe.key)))==null?void 0:ct.type)??(fe==null?void 0:fe.type),fe})),Ye})}pt.value=!1,p("contentChange",{contents:K,index:r.index});let me=[],ye=[];if((_e=I.cloneDeep(($e=K==null?void 0:K.find(le=>(le==null?void 0:le.key)==="formContent"))==null?void 0:$e.contents))==null||_e.forEach(le=>{var Be;Array.isArray(le==null?void 0:le.value)&&((Be=le==null?void 0:le.value)!=null&&Be.find(Ie=>{var Ye;return(Ye=Ie==null?void 0:Ie.url)==null?void 0:Ye.includes(".obj")}))&&(ye=le==null?void 0:le.value)}),(ye==null?void 0:ye.length)>0){const le=(ft=I.cloneDeep(ye))==null?void 0:ft.filter(Be=>{var Ie;return(Ie=Be==null?void 0:Be.url)==null?void 0:Ie.includes(".obj")});le==null||le.forEach(Be=>{var Ye,D,fe,We;const Ie=(Ye=ye==null?void 0:ye.filter(ge=>{var dt;return(ge==null?void 0:ge.name)===(Be==null?void 0:Be.name)&&((dt=ge==null?void 0:ge.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:Ye.map(ge=>ge==null?void 0:ge.url);me.push({objUrl:Be==null?void 0:Be.url,mtlUrls:((D=ye==null?void 0:ye.filter(ge=>{var dt;return(ge==null?void 0:ge.name)===(Be==null?void 0:Be.name)&&((dt=ge==null?void 0:ge.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:D.length)===1?(We=(fe=ye==null?void 0:ye.filter(ge=>{var dt;return(ge==null?void 0:ge.name)===(Be==null?void 0:Be.name)&&((dt=ge==null?void 0:ge.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:fe[0])==null?void 0:We.url:Ie})}),R.setObjUrl(me)}},k=E=>{if(!E)return;const J=[];let L="";for(let K of E)(K.includes("[")||L.includes("["))&&(L+=K.trim(),I.cloneDeep(L).split("【").length-1===I.cloneDeep(L).split("】").length-1&&I.cloneDeep(L).split("[").length-1===I.cloneDeep(L).split("]").length-1&&(J.push(L.replace(/\/\*[\s\S]*?\*\//g,"")),L=""));return J},ne=(E,J,L)=>{let K="";const De=J==null?void 0:J.map(te=>{var W;return(W=te==null?void 0:te.value)==null?void 0:W.pageData});return De==null||De.forEach(te=>{var W;(te==null?void 0:te.name)===(E==null?void 0:E[0])&&((W=te==null?void 0:te.compData)==null||W.forEach(X=>{var ce;(X==null?void 0:X.key)==="formContent"&&((ce=X==null?void 0:X.contents)==null||ce.forEach(be=>{var me;(be==null?void 0:be.prop)===(E==null?void 0:E[1])&&(K=(be==null?void 0:be.value)===""?Me.judgeContents((me=I.cloneDeep(be))==null?void 0:me.optionUrl,L):be==null?void 0:be.value)}))}))}),K},ze=(E,J,L,K)=>{var X,ce;let De="",te="";(X=I.cloneDeep(J))==null||X.forEach((be,me)=>{be!=null&&be.includes("[")?te=te+we.value+E[me]:te=te===""?te+be:te+"/"+be});let W=(ce=K[te])==null?void 0:ce.map(be=>{var me;return(me=be==null?void 0:be.value)==null?void 0:me.pageData});return W==null||W.forEach(be=>{var me;(be==null?void 0:be.name)===(L==null?void 0:L[0])&&((me=be==null?void 0:be.compData)==null||me.forEach(ye=>{var P;(ye==null?void 0:ye.key)==="formContent"&&((P=ye==null?void 0:ye.contents)==null||P.forEach(Te=>{(Te==null?void 0:Te.prop)===(L==null?void 0:L[1])&&(De=Te==null?void 0:Te.value)}))}))}),De};return e.watch(()=>r.itemData,async()=>{var W,X,ce,be,me,ye,P,Te,de,Oe,rt,Pe,nt,Ae,vt,at,ve,Xe,Qe;const E=(W=r.itemData)==null?void 0:W.find($e=>($e==null?void 0:$e.key)==="formContent"),J=(X=I.cloneDeep(r.itemData))==null?void 0:X.find($e=>($e==null?void 0:$e.key)==="formButton"),L=(ce=I.cloneDeep(r.itemData))==null?void 0:ce.find($e=>($e==null?void 0:$e.key)==="formFlex"),K=(be=I.cloneDeep(r.itemData))==null?void 0:be.find($e=>($e==null?void 0:$e.key)==="formWrap"),De=(me=I.cloneDeep(r.itemData))==null?void 0:me.find($e=>($e==null?void 0:$e.key)==="enableWrap");if((K==null?void 0:K.contents)==="纵向"?V.value=!1:V.value=!0,b.value=(De==null?void 0:De.contents)===void 0?!1:De==null?void 0:De.contents,A.value=typeof(L==null?void 0:L.contents)!="boolean"?!(!(L!=null&&L.contents)===""||((ye=L==null?void 0:L.contents)==null?void 0:ye.toUpperCase())==="VERTICAL"):L==null?void 0:L.contents,((P=E==null?void 0:E.contents)==null?void 0:P.length)>0&&Array.isArray(E==null?void 0:E.contents)){let $e=r.allMapContents;const _e=(de=(Te=I.cloneDeep(E))==null?void 0:Te.contents)==null?void 0:de.map((D,fe)=>{var yt,Mt,$t,Ht,Gt,Qt,Rt,Ca,Va,va,Oa,ga,Ma,za,Fa,Ra,La,Da,pa,sa,ma,fa,na,ua,Pa,_a,Ea,ya,$a,ja,Sa,Ua,Ka;let We=(D==null?void 0:D.label)??(D==null?void 0:D.key)??"",ge=(D==null?void 0:D.type)??"",dt=(D==null?void 0:D.options)??[];if((yt=D==null?void 0:D.key)!=null&&yt.includes("$")&&(We=(Mt=I.cloneDeep(D==null?void 0:D.key).split("$"))==null?void 0:Mt[0],((Ht=($t=I.cloneDeep(D==null?void 0:D.key).split("$"))==null?void 0:$t[1])==null?void 0:Ht.length)>0)){const[Et,Zt]=(Qt=(Gt=I.cloneDeep(D==null?void 0:D.key).split("$"))==null?void 0:Gt[1])==null?void 0:Qt.split(/[()]/);ge=((Rt=Me.FormType.find(bt=>(bt==null?void 0:bt.key)===Et))==null?void 0:Rt.value)??"",((Ca=Zt==null?void 0:Zt.split(","))==null?void 0:Ca.length)>0&&(dt=(Va=Zt==null?void 0:Zt.split(","))==null?void 0:Va.map(bt=>({label:bt,value:bt})))}let ct=[];D!=null&&D.contents&&!Array.isArray(D==null?void 0:D.contents)&&(ct=(Oa=(va=D==null?void 0:D.contents)==null?void 0:va.split(","))==null?void 0:Oa.map(Et=>({label:Et,value:Et}))),((ga=D==null?void 0:D.optionUrl)==null?void 0:ga.selectRelateType)==="自定义绑定"&&(ct=(za=(Ma=D==null?void 0:D.optionUrl)==null?void 0:Ma.defaultSelect)==null?void 0:za.map(Et=>({label:Et,value:Et})));let wt=!1,ht=(D==null?void 0:D.isFormColHidden)??!1,ut=Me.judgeContents((Fa=I.cloneDeep(D))==null?void 0:Fa.optionUrl,$e),gt=ut!==void 0&&ut!==""?ut:D!=null&&D.originalContent&&(D==null?void 0:D.originalContent)!==""?D.originalContent:D!=null&&D.value?D.value:(dt==null?void 0:dt.length)>0?(Ra=dt==null?void 0:dt[0])==null?void 0:Ra.value:(D==null?void 0:D.value)??"",Ct=!1,It=ut!==void 0||ge===""?"Input":ge;if((Array.isArray(ut)&&(ut!=null&&ut.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url)))||Array.isArray(gt)&&(gt!=null&>.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url))))&&(It="upload"),typeof gt=="string"&&(gt!=null&>.includes("loginUser"))&&!(gt!=null&>.includes("loginUserSign"))||D!=null&&D.isLoginUser)wt=!0,gt=((La=pe.value)==null?void 0:La.姓名)||((Da=pe.value)==null?void 0:Da.account)||((pa=pe.value)==null?void 0:pa.账号)||((sa=pe.value)==null?void 0:sa.userName);else if(typeof gt=="string"&&(gt!=null&>.includes("loginUserSign"))||D!=null&&D.signature||D!=null&&D.isShow)if(Ct=!0,(D==null?void 0:D.isShow)==="originalSignature")It="image",gt=j.value+"/"+((ma=pe.value)==null?void 0:ma.signature);else{let Et=[...new Set(k(D.isShow))].map(kt=>{var _t,Dt,zt,Vt;return{key:(Vt=(zt=(Dt=(_t=kt==null?void 0:kt.split("["))==null?void 0:_t[1])==null?void 0:Dt.split("]"))==null?void 0:zt[0])==null?void 0:Vt.split(":"),value:""}});(fa=qe.value)==null||fa.forEach(kt=>{Et==null||Et.forEach((qt,_t)=>{var zt;let Dt=qt==null?void 0:qt.key;(kt==null?void 0:kt.name)===(Dt==null?void 0:Dt[0].replaceAll("'",""))&&((zt=kt==null?void 0:kt.compData)==null||zt.forEach(Vt=>{var Ft;(Vt==null?void 0:Vt.key)==="formContent"&&((Ft=Vt==null?void 0:Vt.contents)==null||Ft.forEach(Xt=>{(Xt==null?void 0:Xt.prop)===(Dt==null?void 0:Dt[1].replaceAll("'",""))&&(Et[_t].value=Xt==null?void 0:Xt.value)}))}))})});let Zt=Et==null?void 0:Et.map(kt=>{var qt;return kt.key="["+((qt=kt.key)==null?void 0:qt.join(":"))+"]",kt}),bt=D==null?void 0:D.isShow;Zt==null||Zt.forEach(kt=>{kt!=null&&kt.value?bt=bt.replaceAll(kt==null?void 0:kt.key,"'"+(kt==null?void 0:kt.value)+"'"):bt=bt.replaceAll(kt==null?void 0:kt.key,"undefined")}),bt!=null&&bt.includes("(")||(bt!=null&&bt.includes("==")?bt=((na=bt==null?void 0:bt.split("==="))==null?void 0:na[0])+"==='"+((ua=bt==null?void 0:bt.split("==="))==null?void 0:ua[1])+"'":bt=((Pa=bt==null?void 0:bt.split("="))==null?void 0:Pa[0])+"='"+((_a=bt==null?void 0:bt.split("="))==null?void 0:_a[1])+"'"),bt!=null&&bt.includes("=")&&!(bt!=null&&bt.includes("=="))&&!(bt!=null&&bt.includes("==="))&&(bt=bt==null?void 0:bt.replaceAll("=","==")),new Function(`if (${bt}) { return true } else { return false }`)()?(ht=!1,It="image",gt=j.value+"/"+((Ea=pe.value)==null?void 0:Ea.signature)):gt=""}return Array.isArray(gt)&>.every(Et=>(Et==null?void 0:Et.url)&&(Et==null?void 0:Et.name))&&(D.type="Upload"),D!=null&&D.isMainUrl&&(It="Url"),{label:We??"",name:"t"+fe,prop:I.cloneDeep(D==null?void 0:D.key),type:It,value:D!=null&&D.isSync?(($a=(ya=M.value)==null?void 0:ya[0])==null?void 0:$a.value)??((Ka=(ja=O==null?void 0:O.value)==null?void 0:ja.split("/"))==null?void 0:Ka[((Ua=(Sa=O==null?void 0:O.value)==null?void 0:Sa.split("/"))==null?void 0:Ua.length)-1]):D!=null&&D.isNewDate&>===""?new Date:gt,id:(D==null?void 0:D.id)??fe,contents:(ct==null?void 0:ct.length)>0?ct:dt??[],width:(D==null?void 0:D.width)??1,isLoginUser:wt,config:D==null?void 0:D.config,optionUrl:(D==null?void 0:D.optionUrl)??D,isFormColHidden:ht,signature:Ct,isMain:D==null?void 0:D.isMain,isMainUrl:D==null?void 0:D.isMainUrl,operable:(D==null?void 0:D.operable)??!1,disabled:(D==null?void 0:D.disabled)??!1,isSync:D==null?void 0:D.isSync}}),ft=_e==null?void 0:_e.map(D=>D==null?void 0:D.value);let le="";ft==null||ft.forEach(D=>{D!==""&&D!==void 0&&(le=le===""?D:le+"/"+D)}),x.setSelectArray(ft),x.setSelectString(le);let Be=(Oe=I.cloneDeep(_e))==null?void 0:Oe.map(D=>(D!=null&&D.value&&Me.IsJson(D==null?void 0:D.value)&&Array.isArray(JSON.parse(D==null?void 0:D.value))&&(D.value=JSON.parse(D.value)),D));Be=Be==null?void 0:Be.map(D=>{var fe,We,ge,dt,ct,wt,ht,ut;if((We=(fe=D==null?void 0:D.optionUrl)==null?void 0:fe.menuSelect)!=null&&We.some(gt=>gt==null?void 0:gt.includes("["))){let gt="";D.optionUrl.oldMenuSelect=(dt=(ge=I.cloneDeep(D))==null?void 0:ge.optionUrl)==null?void 0:dt.menuSelect,D.optionUrl.menuSelect=(wt=(ct=D==null?void 0:D.optionUrl)==null?void 0:ct.menuSelect)==null?void 0:wt.map(Ct=>{var It,Wt,yt,Mt,$t,Ht;if(Ct!=null&&Ct.includes("[")){let Gt=(Wt=(It=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:It.split(":"))==null?void 0:Wt[1];gt=ne((yt=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:yt.split(":"),$e==null?void 0:$e[O.value],$e),Ct=(($t=(Mt=I.cloneDeep(Be))==null?void 0:Mt.find(Qt=>(Qt==null?void 0:Qt.label)===Gt))==null?void 0:$t.value)||ne((Ht=Ct==null?void 0:Ct.replaceAll("[","").replaceAll("]",""))==null?void 0:Ht.split(":"),$e==null?void 0:$e[O.value],$e)}return Ct}),gt!==""&&D.value===""&&(D.value=ze(D.optionUrl.menuSelect,D.optionUrl.oldMenuSelect,(ht=D==null?void 0:D.optionUrl)==null?void 0:ht.groupSelect,$e),Array.isArray(D.value)&&((ut=D.value)!=null&&ut.every(Ct=>Ct==null?void 0:Ct.url))&&(D.type="UPLOAD"))}return D}),u.value=Be,lt.value=((rt=u.value)==null?void 0:rt.every(D=>D==null?void 0:D.disabled))||ie.value===O.value,et.value=(Pe=u.value)==null?void 0:Pe.every(D=>D==null?void 0:D.operable),Le.value=(nt=u.value)==null?void 0:nt.map(D=>D==null?void 0:D.label);let Ie=[],Ye=[];if((Ae=I.cloneDeep(u.value))==null||Ae.forEach(D=>{var fe;Array.isArray(D==null?void 0:D.value)&&((fe=D==null?void 0:D.value)!=null&&fe.find(We=>{var ge;return(ge=We==null?void 0:We.url)==null?void 0:ge.includes(".obj")}))&&(Ye=D==null?void 0:D.value)}),(Ye==null?void 0:Ye.length)>0){const D=(vt=I.cloneDeep(Ye))==null?void 0:vt.filter(fe=>{var We;return(We=fe==null?void 0:fe.url)==null?void 0:We.includes(".obj")});D==null||D.forEach(fe=>{var ge,dt,ct,wt;const We=(ge=Ye==null?void 0:Ye.filter(ht=>{var ut;return(ht==null?void 0:ht.name)===(fe==null?void 0:fe.name)&&((ut=ht==null?void 0:ht.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:ge.map(ht=>ht==null?void 0:ht.url);Ie.push({objUrl:fe==null?void 0:fe.url,mtlUrls:((dt=Ye==null?void 0:Ye.filter(ht=>{var ut;return(ht==null?void 0:ht.name)===(fe==null?void 0:fe.name)&&((ut=ht==null?void 0:ht.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:dt.length)===1?(wt=(ct=Ye==null?void 0:Ye.filter(ht=>{var ut;return(ht==null?void 0:ht.name)===(fe==null?void 0:fe.name)&&((ut=ht==null?void 0:ht.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:ct[0])==null?void 0:wt.url:We})}),R.setObjUrl(Ie)}(at=I.cloneDeep(u.value))==null||at.forEach(D=>{var fe,We,ge,dt,ct,wt,ht,ut,gt,Ct,It,Wt,yt;if((We=(fe=D==null?void 0:D.value)==null?void 0:fe.toString())!=null&&We.includes(".stl")||(dt=(ge=D==null?void 0:D.value)==null?void 0:ge.toString())!=null&&dt.includes(".STL")||(wt=(ct=D==null?void 0:D.value)==null?void 0:ct.toString())!=null&&wt.includes(".obj")||(ut=(ht=D==null?void 0:D.value)==null?void 0:ht.toString())!=null&&ut.includes(".mtl")||(Ct=(gt=D==null?void 0:D.value)==null?void 0:gt.toString())!=null&&Ct.includes(".urdf")){let Mt={},$t=[],Ht;Array.isArray(D==null?void 0:D.value)?Ht=D==null?void 0:D.value:Ht=(It=D==null?void 0:D.value)==null?void 0:It.split(","),Ht==null||Ht.forEach(Gt=>{Gt.includes(".mtl")?$t.push(Gt):Mt.blob=Mt.blob==="undefined"?Gt:Mt.blob+","+Gt}),($t==null?void 0:$t.length)>0&&(Mt.mtlBlobs=$t),(yt=(Wt=Object.values(Mt))==null?void 0:Wt[0])!=null&&yt.includes("http:")}})}else u.value=[];let te=Ke.value;if((te==null?void 0:te.length)>0&&(te=te==null?void 0:te.map($e=>{var ft,le,Be,Ie;let _e=(ft=$e==null?void 0:$e.key)==null?void 0:ft.split("/");return(r==null?void 0:r.compName)===(_e==null?void 0:_e[0])&&(le=u.value)!=null&&le.find(Ye=>(Ye==null?void 0:Ye.prop)===(_e==null?void 0:_e[1]))&&($e.value=(Ie=(Be=u.value)==null?void 0:Be.find(Ye=>(Ye==null?void 0:Ye.prop)===(_e==null?void 0:_e[1])))==null?void 0:Ie.value),$e}),Ne.setTableViewContents(te)),r!=null&&r.formRules)C.value=r==null?void 0:r.formRules;else{let $e={};(ve=I.cloneDeep(u).value)==null||ve.forEach(_e=>{(_e==null?void 0:_e.isMain)===!0&&($e[(_e==null?void 0:_e.prop)??(_e==null?void 0:_e.name)]=[{required:!0,message:`${(_e==null?void 0:_e.prop)||(_e==null?void 0:_e.name)}不能为空`}])}),C.value=$e}if(((Xe=J==null?void 0:J.contents)==null?void 0:Xe.length)>0){const $e=[];(Qe=J==null?void 0:J.contents)==null||Qe.forEach((_e,ft)=>{(_e==null?void 0:_e.label)!==""&&$e.push({label:(_e==null?void 0:_e.label)??"",id:(_e==null?void 0:_e.id)??ft,type:(_e==null?void 0:_e.type)??"",background:_e==null?void 0:_e.background})}),Ce.value=$e}else Ce.value=[]},{deep:!0,immediate:!0}),e.watch(()=>ie.value,E=>{lt.value=E===O.value},{immediate:!0}),(E,J)=>{const L=e.resolveComponent("svg-icon"),K=e.resolveComponent("el-switch"),De=e.resolveComponent("el-checkbox"),te=e.resolveComponent("el-popover"),W=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",qi,[e.createVNode(Bt.ssForm,{rowContents:u.value,formRules:C.value,buttonValue:Ce.value,isRowFlex:!1,isEnableWrap:b.value,onOnButtonClick:_,onChange:Y,formDisabled:lt.value,formLabelsOperable:et.value,isButtonRow:V.value,onPreview:st,onBlurChange:Ge,onHandleColEditChange:Q,onHandleColTypeChange:re,onRouteUrl:Ze,onClickTrigger:Je},{operateCol:e.withCtx(({renderColumns:X,formDisabled:ce,formLabelsOperable:be})=>[e.createVNode(te,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Ee},{reference:e.withCtx(()=>[e.createElementVNode("span",Gi,[e.createVNode(L,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Xi,[J[1]||(J[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(K,{"model-value":ce,"active-text":"禁用","inactive-text":"",onChange:tt,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(K,{"model-value":be,"active-text":"编辑所有标签","inactive-text":"",onChange:ae},null,8,["model-value"]),J[2]||(J[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(W,{modelValue:Le.value,"onUpdate:modelValue":J[0]||(J[0]=me=>Le.value=me),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:he,onChange:S},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X,me=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:me.label},[e.createVNode(De,{value:me.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(me.label),1)]),_:2},1032,["value"]),e.createVNode(te,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(L,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ye;return[e.createElementVNode("div",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ye=Object.keys(me))==null?void 0:ye.filter(P=>{var Te;return(Te=Fe.value)==null?void 0:Te.find(de=>(de==null?void 0:de.value)===P)}),P=>{var Te,de;return e.openBlock(),e.createElementBlock("div",{key:P},[e.createVNode(Bt._sfc_main$1,{value:me==null?void 0:me[P],"active-text":(de=(Te=Fe.value)==null?void 0:Te.find(Oe=>(Oe==null?void 0:Oe.value)===P))==null?void 0:de.label,inactiveText:"",onChange:Oe=>Se(Oe,P,me)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ji,[e.createVNode(L,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),F.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:H.value,onDestroy:v},null,8,["fileDataList"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(Jt.ssDialog,{key:1,visible:y.value,onBeforeDestroy:c,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Do.ThreeViewerHost,{files:f.value,onGetAnimationData:E.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Bo=Pt._export_sfc(Zi,[["__scopeId","data-v-3d8dbd5b"]]),Rn=e.ref(0),pr=n=>{var l;return!n||(n==null?void 0:n.length)===0?[]:(l=I.cloneDeep(n))==null?void 0:l.map(r=>(Rn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Rn.value,children:pr(r==null?void 0:r.children)},r))},Qi=n=>{var c;return(c=I.cloneDeep(n))==null?void 0:c.map(r=>(Rn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Rn.value,children:pr(r==null?void 0:r.children)},r))},fr=(n,l)=>{var c;return n!=null&&n.find(r=>(r==null?void 0:r.id)===l)?(c=I.cloneDeep(n))==null?void 0:c.filter(p=>(p==null?void 0:p.id)!==l):(n=n==null?void 0:n.map(r=>(r.children=fr(r==null?void 0:r.children,l),r)),n)},hr=(n,l)=>{var c;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(c=I.cloneDeep(n))==null?void 0:c.map(p=>((p==null?void 0:p.id)===(l==null?void 0:l.id)&&(p=l),p)):(n=n==null?void 0:n.map(r=>(r.children=hr(r==null?void 0:r.children,l),r)),n)},vr=(n,l)=>{var c;return n!=null&&n.find(r=>{var p;return(r==null?void 0:r.id)===((p=l==null?void 0:l.contents)==null?void 0:p.id)})?(c=I.cloneDeep(n))==null?void 0:c.map(p=>{var u;return(p==null?void 0:p.id)===((u=l==null?void 0:l.contents)==null?void 0:u.id)&&(p=l==null?void 0:l.contents),p}):(n=n==null?void 0:n.map(r=>(r.children=vr(r==null?void 0:r.children,l),r)),n)},gr=(n,l)=>{var c;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(c=I.cloneDeep(n))==null?void 0:c.map(p=>((p==null?void 0:p.id)===(l==null?void 0:l.id)&&(p!=null&&p.children||(p.children=[]),p.children.push(l.contents)),p)):(n=n==null?void 0:n.map(r=>(r.children=gr(r==null?void 0:r.children,l),r)),n)},At=[{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"}],el=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],tl=[{label:"新增",value:"add"}],ka=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:tl},{key:"background",label:"按钮背景色",type:"Color"}],xa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:el},{key:"textColor",label:"按钮颜色",type:"Color"}],al={class:"table-header-child"},nl={class:"table-header-child-main"},ol={class:"table-header-child-content"},rl={class:"table-header-child-content-item"},il={class:"fix-button"},ll={key:0},sl={class:"form-content"},cl={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:l}){const c=n,r=l,p=e.ref(!1),u=e.ref(""),y=Me.useTableComp(ee.pinia),{tableIndex:h}=ee.storeToRefs(y);e.ref(0);const f=e.ref(""),w=e.ref([]),C=e.ref([]),V=x=>{var b;p.value=!0;let R=[];At==null||At.forEach(A=>{let B=I.cloneDeep(h.value)+1;y.setTableIndex(B),R.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:x[A.key],id:h.value,contents:A==null?void 0:A.options})}),x!=null&&x.children&&((b=x==null?void 0:x.children)==null?void 0:b.length)>0&&R.push({children:x==null?void 0:x.children,isFormColHidden:!0}),f.value=x==null?void 0:x.id,w.value=R,C.value=R},F=x=>{r("fixChange",I.cloneDeep(x))},G=x=>{r("deleteChange",I.cloneDeep(x))},M=x=>{p.value=!0;let R=[];At==null||At.forEach(b=>{let A=I.cloneDeep(h.value)+1;y.setTableIndex(A),R.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:h.value,contents:b==null?void 0:b.options})}),u.value=x==null?void 0:x.id,w.value=R,C.value=R},Ce=x=>{let R=I.cloneDeep(C.value);R=R==null?void 0:R.map(b=>(b.children||(b.value=x==null?void 0:x[b.name]),b)),C.value=R},H=()=>{var R,b;w.value=C.value;let x={};if(f.value!=="")x.id=f.value,(R=w.value)==null||R.forEach(A=>{const B=At==null?void 0:At.find(pe=>(pe==null?void 0:pe.label)===(A==null?void 0:A.label));B?x[B.key]=A.value:A!=null&&A.children&&A.children.length>0&&(x.children=A.children)}),p.value=!1,r("fixChange",{contents:I.cloneDeep(x),id:u.value,type:"fix"});else{let A=I.cloneDeep(h.value)+1;y.setTableIndex(A),x.id="id"+h.value,(b=w.value)==null||b.forEach(B=>{const pe=At==null?void 0:At.find(Ue=>(Ue==null?void 0:Ue.label)===(B==null?void 0:B.label));pe?x[pe.key]=B.value:B!=null&&B.children&&B.children.length>0&&(x.children=B.children)}),p.value=!1,r("fixChange",{contents:I.cloneDeep(x),id:u.value,type:"add"})}f.value="",w.value=[],C.value=[]},U=()=>{p.value=!1,f.value="",u.value="",w.value=[],C.value=[]},ue=x=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",x),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(x,R)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c==null?void 0:c.tableChildContents,(A,B)=>(e.openBlock(),e.createElementBlock("div",nl,[e.createElementVNode("div",ol,[e.createElementVNode("div",rl,e.toDisplayString(A.label),1),e.createElementVNode("div",il,[e.createVNode(b,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:pe=>M(A)},null,8,["onClick"]),e.createVNode(b,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:pe=>V(A)},null,8,["onClick"]),e.createVNode(b,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:pe=>ue(A)},null,8,["onClick"])])]),A!=null&&A.children&&A.children.length>0?(e.openBlock(),e.createElementBlock("div",ll,[e.createVNode(mr,{tableChildContents:A==null?void 0:A.children,onDeleteChange:G,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:p.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",sl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:Ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:U,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:H},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ul=Pt._export_sfc(cl,[["__scopeId","data-v-e0fef72d"]]),dl={class:"table-header-child"},pl={class:"table-header-child-main"},fl={class:"table-header-child-content"},hl={class:"table-header-child-content-item"},vl={class:"fix-button"},gl={key:0},ml={class:"form-content"},yl={class:"dialog-footer"},bl={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:l}){const c=n,r=l,p=e.ref(!1),u=e.ref(""),y=Me.useTableComp(ee.pinia),{tableIndex:h}=ee.storeToRefs(y),f=e.ref(""),w=e.ref([]),C=e.ref([]),V=x=>{r("fixChange",I.cloneDeep(x))},F=x=>{var b;p.value=!0;let R=[];At==null||At.forEach(A=>{let B=I.cloneDeep(h.value)+1;y.setTableIndex(B),R.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:x[A.key],id:h.value,contents:A==null?void 0:A.options})}),x!=null&&x.children&&((b=x==null?void 0:x.children)==null?void 0:b.length)>0&&R.push({children:x==null?void 0:x.children,isFormColHidden:!0}),f.value=x==null?void 0:x.id,w.value=R,C.value=R},G=x=>{p.value=!0;let R=[];At==null||At.forEach(b=>{let A=I.cloneDeep(h.value)+1;y.setTableIndex(A),R.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:h.value,contents:b==null?void 0:b.options})}),u.value=x==null?void 0:x.id,w.value=R,C.value=R},M=x=>{let R=I.cloneDeep(C.value);R=R==null?void 0:R.map(b=>(b.children||(b.value=x==null?void 0:x[b.name]),b)),C.value=R},Ce=()=>{var R,b;w.value=C.value;let x={};if(f.value!=="")x.id=f.value,(R=w.value)==null||R.forEach(A=>{const B=At==null?void 0:At.find(pe=>(pe==null?void 0:pe.label)===(A==null?void 0:A.label));B?x[B.key]=A.value:A!=null&&A.children&&A.children.length>0&&(x.children=A.children)}),p.value=!1,r("fixChange",{contents:I.cloneDeep(x),id:u.value,type:"fix"});else{let A=I.cloneDeep(h.value)+1;y.setTableIndex(A),x.id="idChild"+h.value,(b=w.value)==null||b.forEach(B=>{const pe=At==null?void 0:At.find(Ue=>(Ue==null?void 0:Ue.label)===(B==null?void 0:B.label));pe?x[pe.key]=B.value:B!=null&&B.children&&B.children.length>0&&(x.children=B.children)}),p.value=!1,r("fixChange",{contents:I.cloneDeep(x),id:u.value,type:"add"})}f.value="",w.value=[],C.value=[]},H=()=>{p.value=!1,f.value="",u.value="",w.value=[],C.value=[]},U=x=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",x),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ue=x=>{r("deleteChange",x)};return(x,R)=>{const b=e.resolveComponent("svg-icon"),A=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c==null?void 0:c.tableChildContents,(B,pe)=>(e.openBlock(),e.createElementBlock("div",pl,[e.createElementVNode("div",fl,[e.createElementVNode("div",hl,e.toDisplayString(B.label),1),e.createElementVNode("div",vl,[e.createVNode(b,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ue=>G(B)},null,8,["onClick"]),e.createVNode(b,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ue=>F(B)},null,8,["onClick"]),e.createVNode(b,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ue=>U(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",gl,[e.createVNode(ul,{tableChildContents:B==null?void 0:B.children,onDeleteChange:ue,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:p.value,onBeforeDestroy:H,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ml,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",yl,[e.createVNode(A,{onClick:H,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(A,{class:"ok-button button",onClick:Ce,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},mr=Pt._export_sfc(bl,[["__scopeId","data-v-ebd68fa1"]]),kl={class:"table-operate-content"},xl={class:"table-operate-item"},wl={class:"operate-title"},Cl={class:"operate-content"},Dl={class:"fix-content"},_l={class:"fix-content-label"},El={class:"fix-button"},Sl={key:0},Tl={class:"operate-title"},Il={class:"operate-content"},Bl={class:"fix-content"},Nl={class:"fix-content-label"},Al={class:"fix-button"},Vl={class:"operate-title"},Ol={class:"operate-content"},Ml={class:"fix-content"},zl={class:"fix-content-label"},Fl={class:"fix-button"},Rl={class:"operate-title"},Ll={class:"operate-content"},Pl={class:"fix-content"},$l={class:"fix-content-label"},jl={class:"fix-button"},Ul={class:"operate-content"},Kl={style:{display:"flex","justify-content":"space-between"}},Wl={class:"form-content"},Hl={class:"dialog-footer"},ql={class:"form-content"},Gl={class:"dialog-footer"},Xl={class:"form-content"},Yl={class:"dialog-footer"},Jl={class:"form-content"},Zl={class:"dialog-footer"},Ql={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=e.ref([]),u=e.ref(!1),y=e.ref(!1),h=e.ref([]),f=e.ref(!1),w=e.ref([]),C=e.ref(!1),V=e.ref([]),F=e.ref(""),G=e.ref(""),M=e.ref([]),Ce=e.ref([]),H=e.ref([]),U=e.ref([]),ue=e.ref(!1),x=e.ref([]),R=e.ref([]),b=e.ref(0),A=e.ref([]),B=e.ref([]),pe=e.ref([]),Ue=()=>{ue.value=!0;let v=[];ka==null||ka.forEach(_=>{b.value++,v.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:(_==null?void 0:_.key)==="background"?"var(--ssComponent-primary-color)":"",id:b.value,contents:_==null?void 0:_.options})}),x.value=v,R.value=v},pt=()=>{var _,j,Y;y.value=!0;let v=[];(Y=(j=(_=Me.FormContent)==null?void 0:_.find(k=>(k==null?void 0:k.key)==="Input"))==null?void 0:j.value)==null||Y.forEach(k=>{b.value++,v.push({label:k==null?void 0:k.label,name:(k==null?void 0:k.name)||(k==null?void 0:k.label),type:k.type,value:(k==null?void 0:k.label)==="类型"?"Input":"",id:b.value,contents:k==null?void 0:k.options})}),A.value=v,B.value=v},Ne=v=>{v||(A.value=B.value)},Ke=async v=>{var _,j,Y,k,ne,ze,E,J,L,K,De,te;if((v==null?void 0:v.类型)!==((j=(_=B.value)==null?void 0:_.find(W=>(W==null?void 0:W.label)==="类型"))==null?void 0:j.value)){let W=[],X=await((ne=(k=(Y=Me.FormContent)==null?void 0:Y.find(ce=>(ce==null?void 0:ce.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:k.value)==null?void 0:ne.value)?await((K=(L=(J=Me.FormContent)==null?void 0:J.find(ce=>(ce==null?void 0:ce.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:L.value)==null?void 0:K.value):(E=(ze=Me.FormContent)==null?void 0:ze.find(ce=>(ce==null?void 0:ce.key)===((v==null?void 0:v.类型)===""?"Input":v==null?void 0:v.类型)))==null?void 0:E.value;if(X==null||X.forEach(ce=>{b.value++,W.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:ce!=null&&ce.属性名?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):(v==null?void 0:v[ce.label])??"",id:b.value,contents:ce==null?void 0:ce.options,prop:(ce==null?void 0:ce.prop)||(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label)})}),v!=null&&v.菜单选项&&((De=v==null?void 0:v.菜单选项)==null?void 0:De.length)>0){const ce=await Me.menuToContentType(v==null?void 0:v.菜单选项);W=W==null?void 0:W.map(be=>((be==null?void 0:be.name)==="组信息选项"&&(be.contents=ce),be))}B.value=await Me.selectToBase(I.cloneDeep(W)),A.value=await Me.selectToBase(I.cloneDeep(W))}else{let W=I.cloneDeep(A.value);if(W=W==null?void 0:W.map(X=>(X.value=v==null?void 0:v[X.name],X)),v!=null&&v.菜单选项&&((te=v==null?void 0:v.菜单选项)==null?void 0:te.length)>0){const X=await Me.menuToContentType(v==null?void 0:v.菜单选项);W=W==null?void 0:W.map(ce=>((ce==null?void 0:ce.name)==="组信息选项"&&(ce.contents=X),ce))}W=Me.formToOptionsContents(W),B.value=await Me.selectToBase(I.cloneDeep(W))}},qe=async v=>{await Ke(v),A.value=B.value},z=(v,_)=>{if((_==null?void 0:_.type)=="Select"&&(v==null?void 0:v.key)==="selectRelateType"){const j=_==null?void 0:_.optionUrl;return(j==null?void 0:j.selectRelateType)||_[v.key]}if((_==null?void 0:_.type)=="Select"&&(v==null?void 0:v.key)==="menuSelect"){const j=_==null?void 0:_.optionUrl;return(j==null?void 0:j.menuSelect)||_[v.key]}if((_==null?void 0:_.type)=="Select"&&(v==null?void 0:v.key)==="groupSelect"){const j=_==null?void 0:_.optionUrl;return(j==null?void 0:j.groupSelect)||_[v.key]}if((_==null?void 0:_.type)=="Select"&&(v==null?void 0:v.key)==="originalContent")return(_==null?void 0:_.value)||_[v.key];if((_==null?void 0:_.type)=="Select"&&(v==null?void 0:v.key)==="multiple"){const j=_[v.key];return dr(j)?j:v.default}return(v==null?void 0:v.label)==="类型"&&_[v.key]===""?"Input":(v==null?void 0:v.key)==="isFormColHidden"&&!_[v.key]?!1:_[v.key]},se=async v=>{var Y,k,ne,ze,E,J,L,K,De;y.value=!0;let _=[];const j=await((ne=(k=(Y=Me.FormContent)==null?void 0:Y.find(te=>(te==null?void 0:te.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:k.value)==null?void 0:ne.value)?await((K=(L=(J=Me.FormContent)==null?void 0:J.find(te=>(te==null?void 0:te.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:L.value)==null?void 0:K.value):(E=(ze=Me.FormContent)==null?void 0:ze.find(te=>(te==null?void 0:te.key)===((v==null?void 0:v.type)===""?"Input":v==null?void 0:v.type)))==null?void 0:E.value;if(j==null||j.forEach(te=>{b.value++,_.push({label:te==null?void 0:te.label,name:(te==null?void 0:te.name)||(te==null?void 0:te.label),type:te.type,value:(te==null?void 0:te.label)==="属性名"?(v==null?void 0:v.prop)||(v==null?void 0:v.name)||(v==null?void 0:v.label):z(te,v),id:b.value,contents:te==null?void 0:te.options})}),v!=null&&v.menuSelect&&((De=v==null?void 0:v.menuSelect)==null?void 0:De.length)>0){const te=await Me.menuToContentType(v==null?void 0:v.menuSelect);_=_==null?void 0:_.map(W=>((W==null?void 0:W.name)==="组信息选项"&&(W.contents=te),W))}F.value=v==null?void 0:v.id,A.value=await Me.selectToBase(Me.formToOptionsContents(_)),B.value=await Me.selectToBase(Me.formToOptionsContents(_))},ie=v=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,j;pe.value=(_=I.cloneDeep(pe.value))==null?void 0:_.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(j=I.cloneDeep(c.originalItemContents))==null?void 0:j.map(Y=>((Y==null?void 0:Y.key)==="tableToForm"&&(Y.contents=pe.value),Y))),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{y.value=!1,A.value=[],F.value=""},et=async()=>{var Y,k,ne,ze,E,J,L,K,De,te;A.value=B.value;let v={};F.value!==""?v.id=F.value:(b.value++,v.id="id"+b.value);let _=await((ne=(k=(Y=Me.FormContent)==null?void 0:Y.find(W=>{var X,ce;return(W==null?void 0:W.key)===(((ce=(X=A.value)==null?void 0:X.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:k.value)==null?void 0:ne.value)??((E=(ze=Me.FormContent)==null?void 0:ze.find(W=>{var X,ce;return(W==null?void 0:W.key)===(((ce=(X=A.value)==null?void 0:X.find(be=>(be==null?void 0:be.label)==="类型"))==null?void 0:ce.value)??"label")}))==null?void 0:E.value);if((J=A.value)==null||J.forEach(W=>{const X=_==null?void 0:_.find(ce=>(ce==null?void 0:ce.label)===(W==null?void 0:W.label));X&&(v[X.key]=W.value)}),v.name=v.label,(L=pe.value)!=null&&L.find(W=>W.id===v.id))pe.value=(K=pe.value)==null?void 0:K.map(W=>(W.id===v.id&&(W=v),W));else{let W=I.cloneDeep(pe.value);pe.value||(pe.value=[]),W.push(v),pe.value=W}pe.value=pe.value.map(({id:W,...X})=>X),y.value=!1,F.value="";let j=I.cloneDeep(c.originalItemContents);(De=I.cloneDeep(c.originalItemContents))!=null&&De.find(W=>(W==null?void 0:W.key)==="tableToForm")?j=(te=I.cloneDeep(c.originalItemContents))==null?void 0:te.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=pe.value),W)):j.push({key:"tableToForm",contents:pe.value}),r("change",j)},lt=v=>{ue.value=!0;let _=[];ka==null||ka.forEach(j=>{b.value++,_.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:v[j.key],id:b.value,contents:j==null?void 0:j.options})}),F.value=v==null?void 0:v.id,x.value=_,R.value=_};e.watch(()=>C.value,()=>{var _,j;let v=I.cloneDeep(c.originalItemContents);(_=I.cloneDeep(c.originalItemContents))!=null&&_.find(Y=>(Y==null?void 0:Y.key)==="page")?v=(j=I.cloneDeep(c.originalItemContents))==null?void 0:j.map(Y=>((Y==null?void 0:Y.key)==="page"&&(Y.contents=C.value),Y)):v.push({key:"page",contents:C.value}),r("change",v)},{deep:!0});const q=v=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,j;Ce.value=(_=I.cloneDeep(Ce.value))==null?void 0:_.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(j=I.cloneDeep(c.originalItemContents))==null?void 0:j.map(Y=>((Y==null?void 0:Y.key)==="extraButton"&&(Y.contents=Ce.value),Y))),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},O=()=>{var j,Y,k,ne,ze;x.value=R.value;let v={};if(F.value!==""?v.id=F.value:(b.value++,v.id="id"+b.value),(j=x.value)==null||j.forEach(E=>{const J=ka==null?void 0:ka.find(L=>(L==null?void 0:L.label)===(E==null?void 0:E.label));J?v[J.key]=E.value:E!=null&&E.children&&E.children.length>0&&(v.children=E.children)}),(Y=Ce.value)!=null&&Y.find(E=>E.id===v.id))Ce.value=(k=Ce.value)==null?void 0:k.map(E=>(E.id===v.id&&(E=v),E));else{let E=I.cloneDeep(Ce.value)??[];E.push(v),Ce.value=E}ue.value=!1,F.value="";let _=I.cloneDeep(c.originalItemContents);(ne=I.cloneDeep(c.originalItemContents))!=null&&ne.find(E=>(E==null?void 0:E.key)==="extraButton")?_=(ze=I.cloneDeep(c.originalItemContents))==null?void 0:ze.map(E=>((E==null?void 0:E.key)==="extraButton"&&(E.contents=Ce.value),E)):_.push({key:"extraButton",contents:Ce.value}),r("change",_)},ke=v=>{let _=I.cloneDeep(R.value);_=_==null?void 0:_.map(j=>(j.children||(j.value=v==null?void 0:v[j.name]),j)),R.value=_},we=()=>{ue.value=!1,x.value=[],F.value=""},Le=v=>{f.value=!0;let _=[];xa==null||xa.forEach(j=>{b.value++,_.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:v[j.key],id:b.value,contents:j==null?void 0:j.options})}),F.value=v==null?void 0:v.id,H.value=_,U.value=_},Fe=v=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,j;M.value=(_=I.cloneDeep(M.value))==null?void 0:_.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(j=I.cloneDeep(c.originalItemContents))==null?void 0:j.map(Y=>((Y==null?void 0:Y.key)==="rowButton"&&(Y.contents=M.value),Y))),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},tt=()=>{u.value=!0;let v=[];At==null||At.forEach(_=>{b.value++,v.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:b.value,contents:_==null?void 0:_.options})}),w.value=v,V.value=v},ae=()=>{f.value=!0;let v=[];xa==null||xa.forEach(_=>{b.value++,v.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:b.value,contents:_==null?void 0:_.options})}),H.value=v,U.value=v},Ee=v=>{let _=I.cloneDeep(U.value);_=_==null?void 0:_.map(j=>(j.children||(j.value=v==null?void 0:v[j.name]),j)),U.value=_},S=()=>{var j,Y,k,ne,ze;H.value=U.value;let v={};if(F.value!==""?v.id=F.value:(b.value++,v.id="id"+b.value),(j=H.value)==null||j.forEach(E=>{const J=xa==null?void 0:xa.find(L=>(L==null?void 0:L.label)===(E==null?void 0:E.label));J?v[J.key]=E.value:E!=null&&E.children&&E.children.length>0&&(v.children=E.children)}),(Y=M.value)!=null&&Y.find(E=>E.id===v.id))M.value=(k=M.value)==null?void 0:k.map(E=>(E.id===v.id&&(E=v),E));else{let E=I.cloneDeep(M.value);E.push(v),M.value=E}f.value=!1,F.value="";let _=I.cloneDeep(c.originalItemContents);(ne=I.cloneDeep(c.originalItemContents))!=null&&ne.find(E=>(E==null?void 0:E.key)==="rowButton")?_=(ze=I.cloneDeep(c.originalItemContents))==null?void 0:ze.map(E=>((E==null?void 0:E.key)==="rowButton"&&(E.contents=M.value),E)):_.push({key:"rowButton",contents:M.value}),r("change",_)},Je=()=>{f.value=!1,F.value="",U.value=[],H.value=[]},Ze=v=>{u.value=!0;let _=[];At==null||At.forEach(j=>{b.value++,_.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:"",id:b.value,contents:j==null?void 0:j.options})}),w.value=_,G.value=v==null?void 0:v.id,V.value=_},Ve=v=>{var _;h.value=fr(I.cloneDeep(h.value),v==null?void 0:v.id),r("change",(_=I.cloneDeep(c.originalItemContents))==null?void 0:_.map(j=>{var Y;return(j==null?void 0:j.key)==="header"&&(j.contents=(Y=h.value)!=null&&Y.some(k=>k==null?void 0:k.children)?[h.value]:h.value),j}))},oe=v=>{var j,Y,k;v.type==="fix"?v.id!==""?h.value=vr(h.value,v):h.value=hr(h.value,v==null?void 0:v.contents):h.value=gr(h.value,v),h.value=(j=h.value)!=null&&j.some(ne=>ne==null?void 0:ne.children)?[h.value]:h.value,F.value="";let _=I.cloneDeep(c.originalItemContents);(Y=I.cloneDeep(c.originalItemContents))!=null&&Y.find(ne=>(ne==null?void 0:ne.key)==="header")?_=(k=I.cloneDeep(c.originalItemContents))==null?void 0:k.map(ne=>((ne==null?void 0:ne.key)==="header"&&(ne.contents=h.value),ne)):_.push({key:"header",contents:h.value}),r("change",_)},Q=v=>{var j;u.value=!0;let _=[];At==null||At.forEach(Y=>{b.value++,_.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:v[Y.key],id:b.value,contents:Y==null?void 0:Y.options})}),v!=null&&v.children&&((j=v==null?void 0:v.children)==null?void 0:j.length)>0&&_.push({children:v==null?void 0:v.children,isFormColHidden:!0}),F.value=v==null?void 0:v.id,G.value="",w.value=_,V.value=_},re=v=>{let _=I.cloneDeep(V.value);_=_==null?void 0:_.map(j=>(j.children||(j.value=v==null?void 0:v[j.name]),j)),V.value=_},Se=()=>{u.value=!1,F.value="",G.value="",V.value=[]},Ge=()=>{var j,Y,k,ne,ze,E;w.value=V.value;let v={};if(F.value!==""?v.id=F.value:(b.value++,v.id="id"+b.value),(j=w.value)==null||j.forEach(J=>{const L=At==null?void 0:At.find(K=>(K==null?void 0:K.label)===(J==null?void 0:J.label));L?v[L.key]=J.value:J!=null&&J.children&&J.children.length>0&&(v.children=J.children)}),(Y=h.value)!=null&&Y.find(J=>J.id===v.id))h.value=(k=h.value)==null?void 0:k.map(J=>(J.id===v.id&&(J=v),J));else{let J=I.cloneDeep(h.value)??[];G.value===""?J.push(v):J=J==null?void 0:J.map(L=>(L.id===G.value&&(L.children||(L.children=[]),L.children.push(v)),L)),h.value=J}h.value=(ne=h.value)!=null&&ne.some(J=>J==null?void 0:J.children)?[h.value]:h.value,u.value=!1,F.value="",G.value="";let _=I.cloneDeep(c.originalItemContents);(ze=I.cloneDeep(c.originalItemContents))!=null&&ze.find(J=>(J==null?void 0:J.key)==="header")?_=(E=I.cloneDeep(c.originalItemContents))==null?void 0:E.map(J=>((J==null?void 0:J.key)==="header"&&(J.contents=h.value),J)):_.push({key:"header",contents:h.value}),r("change",_)},st=v=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,j;h.value=(_=I.cloneDeep(h.value))==null?void 0:_.filter(Y=>(Y==null?void 0:Y.id)!==(v==null?void 0:v.id)),r("change",(j=I.cloneDeep(c.originalItemContents))==null?void 0:j.map(Y=>{var k;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(k=h.value)!=null&&k.some(ne=>ne==null?void 0:ne.children)?[h.value]:h.value),Y})),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>c.originalItemContents,()=>{var v,_,j,Y,k,ne,ze,E,J,L,K,De,te,W,X,ce,be,me,ye;if(!(!c.originalItemContents||c.originalItemContents.length===0))if(p.value=I.cloneDeep(c.originalItemContents),h.value=(_=(v=p.value)==null?void 0:v.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:_.contents,M.value=(Y=(j=p.value)==null?void 0:j.find(P=>(P==null?void 0:P.key)==="rowButton"))==null?void 0:Y.contents,Ce.value=(ne=(k=p.value)==null?void 0:k.find(P=>(P==null?void 0:P.key)==="extraButton"))==null?void 0:ne.contents,C.value=(E=(ze=p.value)==null?void 0:ze.find(P=>(P==null?void 0:P.key)==="page"))!=null&&E.contents?!!((L=(J=p.value)==null?void 0:J.find(P=>(P==null?void 0:P.key)==="page"))!=null&&L.contents):!1,pe.value=(De=(K=p.value)==null?void 0:K.find(P=>(P==null?void 0:P.key)==="tableToForm"))==null?void 0:De.contents,h.value=(te=h.value)==null?void 0:te.map((P,Te)=>(Array.isArray(P)?P=Qi(P):P={label:(P==null?void 0:P.label)??"",prop:(P==null?void 0:P.label)==="操作"?"operate":P==null?void 0:P.prop,width:P!=null&&P.width?parseInt(P.width):"",fixed:(P==null?void 0:P.fixed)??void 0,sortable:(P==null?void 0:P.sortable)??!1,align:(P==null?void 0:P.align)??"left",showOverflowTooltip:(P==null?void 0:P.showOverflowTooltip)??!0,isNotDrag:(P==null?void 0:P.isNotDrag)??!1,isEditCol:(P==null?void 0:P.isEditCol)??!1,isOperate:(P==null?void 0:P.isOperate)??!1,id:(P==null?void 0:P.id)??Te,formMenuSelect:(P==null?void 0:P.formMenuSelect)??void 0,groupSelect:(P==null?void 0:P.groupSelect)??void 0},P)),h.value=(W=h.value)!=null&&W.every(P=>Array.isArray(P))?(X=h.value)==null?void 0:X[0]:h.value,M.value=(ce=M.value)==null?void 0:ce.map((P,Te)=>P={label:(P==null?void 0:P.label)??"",type:(P==null?void 0:P.type)??"",textColor:(P==null?void 0:P.textColor)??"#000000",id:(P==null?void 0:P.id)??Te}),Ce.value=(be=Ce.value)==null?void 0:be.map((P,Te)=>P={label:(P==null?void 0:P.label)??"",type:(P==null?void 0:P.type)??"",background:(P==null?void 0:P.background)??"var(--ssComponent-primary-color)",id:(P==null?void 0:P.id)??Te}),pe.value)pe.value=(ye=pe.value)==null?void 0:ye.map(P=>{b.value++;let Te=P;return Te.id=b.value,Te});else{let P=[];const Te=(me=Me.getColumnChild(I.cloneDeep(h.value)))==null?void 0:me.filter(de=>(de==null?void 0:de.prop)!=="operate");Te==null||Te.forEach(de=>{var Oe;b.value++,P.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.prop)||(de==null?void 0:de.label),type:de!=null&&de.groupSelect?"Select":"Input",value:"",id:b.value,contents:de==null?void 0:de.options,menuSelect:de==null?void 0:de.formMenuSelect,groupSelect:(Oe=de==null?void 0:de.groupSelect)==null?void 0:Oe.split(":"),selectRelateType:"关联绑定列"})}),pe.value=P}},{deep:!0,immediate:!0}),(v,_)=>{const j=e.resolveComponent("svg-icon"),Y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",kl,[e.createElementVNode("div",xl,[e.createElementVNode("div",wl,[_[2]||(_[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Y,{class:"icon-content",onClick:tt,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[1]||(_[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(k,ne)=>(e.openBlock(),e.createElementBlock("div",{key:ne},[e.createElementVNode("div",Dl,[e.createElementVNode("div",_l,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",El,[e.createVNode(j,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Ze(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Q(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>st(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(e.openBlock(),e.createElementBlock("div",Sl,[e.createVNode(mr,{tableChildContents:k==null?void 0:k.children,onDeleteChange:Ve,onFixChange:oe},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Tl,[_[4]||(_[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[3]||(_[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(k,ne)=>(e.openBlock(),e.createElementBlock("div",{key:ne},[e.createElementVNode("div",Bl,[e.createElementVNode("div",Nl,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",Al,[e.createVNode(j,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>Le(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>Fe(k)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Vl,[_[6]||(_[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:Ue},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[5]||(_[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,(k,ne)=>(e.openBlock(),e.createElementBlock("div",{key:ne},[e.createElementVNode("div",Ml,[e.createElementVNode("div",zl,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",Fl,[e.createVNode(j,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>lt(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>q(k)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Rl,[_[8]||(_[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Y,{class:"icon-content",id:"themeButton",onClick:pt},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[7]||(_[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,(k,ne)=>(e.openBlock(),e.createElementBlock("div",{key:ne},[e.createElementVNode("div",Pl,[e.createElementVNode("div",$l,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",jl,[e.createVNode(j,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:ze=>se(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ze=>ie(k)},null,8,["onClick"])])])]))),128))]),_[10]||(_[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Ul,[e.createElementVNode("div",Kl,[_[9]||(_[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:C.value,"onUpdate:modelValue":_[0]||(_[0]=k=>C.value=k)},null,8,["modelValue"])])])]),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:Se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:re},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hl,[e.createVNode(Y,{onClick:Se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[11]||(_[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Y,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>_[12]||(_[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:f.value,onBeforeDestroy:Je,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ql,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gl,[e.createVNode(Y,{onClick:Je,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[13]||(_[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Y,{class:"ok-button button",onClick:S,id:"themeButton"},{default:e.withCtx(()=>_[14]||(_[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:ue.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yl,[e.createVNode(Y,{onClick:we,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[15]||(_[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Y,{class:"ok-button button",onClick:O,id:"themeButton"},{default:e.withCtx(()=>_[16]||(_[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:y.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Jl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:Ke,onChangeVisible:Ne,onBlurChange:qe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zl,[e.createVNode(Y,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[17]||(_[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Y,{class:"ok-button button",onClick:et,id:"themeButton"},{default:e.withCtx(()=>_[18]||(_[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},es=Pt._export_sfc(Ql,[["__scopeId","data-v-7a6b87b5"]]),ts=I.useModelComp(ee.pinia),{pageMapState:as}=ee.storeToRefs(ts),ns=I.useMenuState(ee.pinia),{activeMenuPath:os}=ee.storeToRefs(ns),rs=e.ref(24),is=e.ref(6),ls=e.ref(70),ss=e.ref(.18),cs=e.ref(45),us=(n,l,c,r)=>{var p,u,y,h,f,w,C,V,F,G,M,Ce,H,U,ue,x;return{x:((u=(p=n==null?void 0:n.value)==null?void 0:p.tableData)==null?void 0:u.x)||l%2*12,y:((h=(y=n==null?void 0:n.value)==null?void 0:y.tableData)==null?void 0:h.y)||l,w:((w=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:w.w)||rs.value,h:((V=(C=n==null?void 0:n.value)==null?void 0:C.tableData)==null?void 0:V.h)||c,minW:((G=(F=n==null?void 0:n.value)==null?void 0:F.tableData)==null?void 0:G.minW)||is.value,minH:((Ce=(M=n==null?void 0:n.value)==null?void 0:M.tableData)==null?void 0:Ce.minH)||ss.value,maxH:((U=(H=n==null?void 0:n.value)==null?void 0:H.tableData)==null?void 0:U.maxH)||cs.value,i:((x=(ue=n==null?void 0:n.value)==null?void 0:ue.tableData)==null?void 0:x.i)||l,id:(n==null?void 0:n.id)||l+"",component:r}},ds=(n,l)=>{var r,p,u,y,h,f,w,C;let c=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((y=(u=(p=n==null?void 0:n.compData)==null?void 0:p.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:y.length)===0)return 2}else((h=n==null?void 0:n.comp)==null?void 0:h.toUpperCase())==="FORM"&&(c=((C=(w=(f=n==null?void 0:n.compData)==null?void 0:f.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:w.contents)==null?void 0:C.length)/5);return c*2},yr=(n,l,c)=>{var y,h;const r=(h=(y=as.value)==null?void 0:y[os.value])==null?void 0:h.filter(f=>{var w;return((w=f==null?void 0:f.key)==null?void 0:w.type)==="gridLayout"}),p=r==null?void 0:r.find(f=>{var w,C,V;return((V=(C=(w=f==null?void 0:f.value)==null?void 0:w.tableData)==null?void 0:C.component)==null?void 0:V.id)===n.id}),u=ds(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,w)=>yr(f,w))),{...us(p,l,u,n)}},ps=(n,l)=>{if((n==null?void 0:n.length)===0)return[];const c=I.cloneDeep(n);return Array.isArray(n)?c==null?void 0:c.map((r,p)=>yr(r,p)):[]},fs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),hs=(n,l)=>n==null?void 0:n.map(c=>{for(const r in l)if(r===(c==null?void 0:c.prop))return{...c,value:l[r]};return c}),vs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=e.ref([]);e.watch(()=>c.compType,h=>{var C;const f=fs(c==null?void 0:c.optionItems),w=h?(C=f[h==null?void 0:h.toUpperCase()])==null?void 0:C[c==null?void 0:c.target]:[];p.value=w==null?void 0:w.map(V=>{for(const[F,G]of Object.entries((c==null?void 0:c.comp)||{}))if((V==null?void 0:V.prop)===F)return{...V,value:G};return V})},{immediate:!0});const u=h=>Bt.getComponent(h),y=h=>{var f,w;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?p.value=(f=p.value)==null?void 0:f.map(C=>{var V;return(C==null?void 0:C.prop)==="isStepLayout"?{...C,options:(V=C==null?void 0:C.options)==null?void 0:V.map(F=>({...F,disabled:!0}))}:(C==null?void 0:C.prop)==="isGridLayout"?{...C,disabled:!0}:C}):p.value=(w=p.value)==null?void 0:w.map(C=>{var V;return(C==null?void 0:C.prop)==="isStepLayout"?{...C,options:(V=C==null?void 0:C.options)==null?void 0:V.map(F=>({...F,disabled:!1}))}:(C==null?void 0:C.prop)==="isGridLayout"?{...C,disabled:!1}:C}),r("change",{target:c==null?void 0:c.target,styleConfigs:p.value,prop:h==null?void 0:h.prop})};return(h,f)=>{const w=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,V=>(e.openBlock(),e.createBlock(C,{class:"style-row",key:V==null?void 0:V.prop},{default:e.withCtx(()=>[e.createVNode(w,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V==null?void 0:V.label)+":",1)]),_:2},1024),e.createVNode(w,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(V.type)),{modelValue:V.value,"onUpdate:modelValue":F=>V.value=F,content:V==null?void 0:V.options,optionUrl:V==null?void 0:V.optionUrl,disabled:V==null?void 0:V.disabled,activeText:V==null?void 0:V.activeText,inactiveText:V==null?void 0:V.inactiveText,onChange:F=>y(V)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),gs=Pt._export_sfc(vs,[["__scopeId","data-v-6c233914"]]),ms=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:l}){const c=n,r=l,p=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),y=U=>U==null?void 0:U.reduce((ue,x)=>(ue[x==null?void 0:x.prop]=x==null?void 0:x.rule,ue),{}),h=e.computed(()=>({formRules:y(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),w=e.ref(""),C=(U,ue,x)=>{var A;let R=[];(c==null?void 0:c.activeTabName)==="任务配置"?(R=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:U},{label:"按钮名称",value:"按钮名称",children:ue}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:p},{prop:"任务关键词",rule:p},{prop:"执行任务",rule:p},{prop:"执行动作",rule:p},{prop:"执行交互",rule:p}]):(c==null?void 0:c.activeTabName)==="任务关联"&&(R=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(A=c==null?void 0:c.relatedData)==null?void 0:A.map(B=>({label:B==null?void 0:B.任务名称,value:B==null?void 0:B.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:p},{prop:"关联状态",rule:p},{prop:"关联形式",rule:p},{prop:"关联任务集合",rule:p}]);let b;return x&&(x==null?void 0:x.length)>0?b=[...R,...V(U,ue,x)]:b=R,b},V=(U,ue,x)=>{const R=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return x?R==null?void 0:R.filter(b=>x==null?void 0:x.includes(b==null?void 0:b.prop)):R},F=(U,ue)=>{var B,pe,Ue,pt,Ne,Ke,qe,z,se;const x=((Ne=(pt=(Ue=(pe=(B=c==null?void 0:c.comp)==null?void 0:B.compData)==null?void 0:pe.find(ie=>(ie==null?void 0:ie.key)==="header"))==null?void 0:Ue.contents)==null?void 0:pt.filter(ie=>(ie==null?void 0:ie.label)!=="操作"))==null?void 0:Ne.map(ie=>({value:ie==null?void 0:ie.prop,label:ie.label})))||[],R=/button/i,b=((se=(z=(qe=(Ke=c==null?void 0:c.comp)==null?void 0:Ke.compData)==null?void 0:qe.filter(ie=>R.test(ie==null?void 0:ie.key)))==null?void 0:z.flatMap(ie=>ie==null?void 0:ie.contents))==null?void 0:se.map(ie=>({value:ie==null?void 0:ie.label,label:ie.label})))||[],A=C(x,b,U);f.value=ue?hs(A,ue):A,U&&(U==null?void 0:U.length)>0&&u.value.push(...U==null?void 0:U.map(ie=>({prop:ie,rule:p})))};e.onMounted(()=>{F(null,c==null?void 0:c.extendItem)});const G=U=>{const ue=U==null?void 0:U[w.value];if(w.value==="执行任务"){if(!(ue!=null&&ue.join("/")))return;const x=ue==null?void 0:ue.join("/");F(x==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:x==="进度设置/进度条"?["进度关键词"]:null,U)}},M=U=>{r("change",{target:c==null?void 0:c.target,extendConfigs:U})},Ce=(U,ue)=>{w.value=ue==null?void 0:ue.changeProp,G(U)},H=U=>{r("onButtonClick",U)};return(U,ue)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:M,onBlurChange:Ce,onOnButtonClick:H},null,8,["rowContents","formRules","buttonValue"]))}}),ys=Pt._export_sfc(ms,[["__scopeId","data-v-7c660c1f"]]),bs={};function ks(n,l){return null}const xs=Pt._export_sfc(bs,[["render",ks]]),ws={class:"form-operate-content"},Cs={class:"form-operate-item"},Ds={class:"operate-title"},_s={class:"operate-content"},Es={class:"fix-content"},Ss={class:"fix-button"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},Ns={class:"fix-button"},As={style:{display:"flex","justify-content":"space-between"}},Vs={class:"form-content"},Os={class:"dialog-footer"},Ms={class:"form-content"},zs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=e.ref(!1),u=e.ref([]),y=e.ref([]),h=e.ref(!1),f=e.ref([]),w=e.ref([]),C=e.ref(""),V=e.ref(!1),F=e.ref(0),G=e.ref([]),M=e.ref([]),Ce=(z,se)=>{if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="selectRelateType"){const ie=se==null?void 0:se.optionUrl;return(ie==null?void 0:ie.selectRelateType)||se[z.key]}if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="menuSelect"){const ie=se==null?void 0:se.optionUrl;return(ie==null?void 0:ie.menuSelect)||se[z.key]}if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="groupSelect"){const ie=se==null?void 0:se.optionUrl;return(ie==null?void 0:ie.groupSelect)||se[z.key]}if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="originalContent")return(se==null?void 0:se.value)||se[z.key];if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="multiple"){const ie=se[z.key];return dr(ie)?ie:z.default}return(z==null?void 0:z.label)==="类型"&&se[z.key]===""?"Input":(z==null?void 0:z.key)==="isFormColHidden"&&!se[z.key]?!1:se[z.key]},H=async z=>{var he,et,lt,q,O,ke;p.value=!0;let se=[];const ie=await((lt=(et=(he=Me.FormContent)==null?void 0:he.find(we=>(we==null?void 0:we.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:et.value)==null?void 0:lt.value)??((O=(q=Me.FormContent)==null?void 0:q.find(we=>(we==null?void 0:we.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:O.value);if(ie==null||ie.forEach(we=>{F.value++,se.push({label:we==null?void 0:we.label,name:we==null?void 0:we.label,type:we.type,prop:we==null?void 0:we.prop,value:Ce(we,z),id:F.value,contents:we==null?void 0:we.options,width:(z==null?void 0:z.width)??1})}),z!=null&&z.menuSelect&&((ke=z==null?void 0:z.menuSelect)==null?void 0:ke.length)>0){const we=await Me.menuToContentType(z==null?void 0:z.menuSelect);se=se==null?void 0:se.map(Le=>((Le==null?void 0:Le.name)==="组信息选项"&&(Le.contents=we),Le))}C.value=z==null?void 0:z.id,u.value=await Me.selectToBase(Me.formToOptionsContents(se)),y.value=await Me.selectToBase(Me.formToOptionsContents(se))},U=z=>{var ie;h.value=!0;let se=[];(ie=Me.FormButton)==null||ie.forEach(he=>{F.value++,se.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:(he==null?void 0:he.label)==="类型"&&z[he.key]===""?"normal":z[he.key],id:F.value,contents:he==null?void 0:he.options})}),G.value=se,M.value=se,C.value=z==null?void 0:z.id};e.watch(()=>V.value,()=>{var se,ie;let z=I.cloneDeep(c.originalItemContents);(se=I.cloneDeep(c.originalItemContents))!=null&&se.find(he=>(he==null?void 0:he.key)==="enableWrap")?z=(ie=I.cloneDeep(c.originalItemContents))==null?void 0:ie.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!V.value),he)):z.push({key:"enableWrap",contents:!V.value}),r("change",z)},{deep:!0});const ue=()=>{var ie,he,et,lt,q;G.value=M.value;let z={};if(C.value!==""?z.id=C.value:(F.value++,z.id="id"+F.value),(ie=G.value)==null||ie.forEach(O=>{var we;const ke=(we=Me.FormButton)==null?void 0:we.find(Le=>(Le==null?void 0:Le.label)===(O==null?void 0:O.label));ke&&(z[ke.key]=O.value)}),(he=f.value)!=null&&he.find(O=>O.id===z.id))f.value=(et=f.value)==null?void 0:et.map(O=>(O.id===z.id&&(O=z),O));else{let O=I.cloneDeep(f.value);f.value||(f.value=[]),O.push(z),f.value=O}h.value=!1,C.value="";let se=I.cloneDeep(c.originalItemContents);(lt=I.cloneDeep(c.originalItemContents))!=null&<.find(O=>(O==null?void 0:O.key)==="formButton")?se=(q=I.cloneDeep(c.originalItemContents))==null?void 0:q.map(O=>((O==null?void 0:O.key)==="formButton"&&(O.contents=f.value),O)):se.push({key:"formButton",contents:f.value}),r("change",se)},x=z=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,ie;w.value=(se=I.cloneDeep(w.value))==null?void 0:se.filter(he=>(he==null?void 0:he.id)!==(z==null?void 0:z.id)),r("change",(ie=I.cloneDeep(c.originalItemContents))==null?void 0:ie.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=w.value),he))),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=z=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,ie;f.value=(se=I.cloneDeep(f.value))==null?void 0:se.filter(he=>(he==null?void 0:he.id)!==(z==null?void 0:z.id)),r("change",(ie=I.cloneDeep(c.originalItemContents))==null?void 0:ie.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=f.value),he))),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},b=()=>{var se;h.value=!0;let z=[];(se=Me.FormButton)==null||se.forEach(ie=>{F.value++,z.push({label:ie==null?void 0:ie.label,name:ie==null?void 0:ie.label,type:ie.type,value:(ie==null?void 0:ie.label)==="类型"?"normal":"",id:F.value,contents:ie==null?void 0:ie.options})}),G.value=z,M.value=z},A=()=>{var se,ie,he;p.value=!0;let z=[];(he=(ie=(se=Me.FormContent)==null?void 0:se.find(et=>(et==null?void 0:et.key)==="Input"))==null?void 0:ie.value)==null||he.forEach(et=>{F.value++,z.push({label:et==null?void 0:et.label,name:et==null?void 0:et.label,type:et.type,value:(et==null?void 0:et.label)==="类型"?"Input":"",id:F.value,contents:et==null?void 0:et.options})}),u.value=z,y.value=z},B=z=>{let se=I.cloneDeep(M.value);se=se==null?void 0:se.map(ie=>(ie.value=z==null?void 0:z[ie.name],ie)),M.value=se},pe=z=>{const se=z.find(et=>(et==null?void 0:et.name)==="类型");if((se==null?void 0:se.value)!="Select")return;const ie=z.find(et=>(et==null?void 0:et.name)==="多选"),he=z.find(et=>(et==null?void 0:et.name)==="初始值");ie!=null&&ie.value&&_o.isString(he.value)&&(he.value=[he.value]),!(ie!=null&&ie.value)&&!_o.isString(he.value)&&(he.value="")},Ue=async z=>{var se,ie,he,et,lt,q,O,ke,we,Le,Fe,tt;if((z==null?void 0:z.类型)!==((ie=(se=y.value)==null?void 0:se.find(ae=>(ae==null?void 0:ae.label)==="类型"))==null?void 0:ie.value)){let ae=[];const Ee=await((lt=(et=(he=Me.FormContent)==null?void 0:he.find(S=>(S==null?void 0:S.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:et.value)==null?void 0:lt.value)?await((Le=(we=(ke=Me.FormContent)==null?void 0:ke.find(S=>(S==null?void 0:S.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:we.value)==null?void 0:Le.value):(O=(q=Me.FormContent)==null?void 0:q.find(S=>(S==null?void 0:S.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:O.value;if(Ee==null||Ee.forEach(S=>{var Ze,Ve;F.value++;const Je=Hi(S==null?void 0:S.default)?(z==null?void 0:z[S.label])??S.value??"":S==null?void 0:S.default;ae.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:Je,prop:S==null?void 0:S.prop,id:F.value,contents:S==null?void 0:S.options,width:((Ve=(Ze=y.value)==null?void 0:Ze[0])==null?void 0:Ve.width)??1})}),z!=null&&z.菜单选项&&((Fe=z==null?void 0:z.菜单选项)==null?void 0:Fe.length)>0){const S=await Me.menuToContentType(z==null?void 0:z.菜单选项);ae=ae==null?void 0:ae.map(Je=>((Je==null?void 0:Je.name)==="组信息选项"&&(Je.contents=S),Je))}pe(ae),y.value=await Me.selectToBase(I.cloneDeep(ae)),u.value=await Me.selectToBase(I.cloneDeep(ae))}else{let ae=I.cloneDeep(y.value);if(ae=ae==null?void 0:ae.map(Ee=>(Ee.value=z==null?void 0:z[Ee.name],Ee)),z!=null&&z.菜单选项&&((tt=z==null?void 0:z.菜单选项)==null?void 0:tt.length)>0){const Ee=await Me.menuToContentType(z==null?void 0:z.菜单选项);ae=ae==null?void 0:ae.map(S=>((S==null?void 0:S.name)==="组信息选项"&&(S.contents=Ee),S))}ae=Me.formToOptionsContents(ae),pe(ae),y.value=await Me.selectToBase(I.cloneDeep(ae))}},pt=z=>{z||(u.value=y.value)},Ne=async z=>{await Ue(z),u.value=y.value},Ke=ur(async()=>{var he,et,lt,q,O,ke,we,Le,Fe,tt,ae,Ee;u.value=y.value;let z={};z.width=((et=(he=u.value)==null?void 0:he[0])==null?void 0:et.width)??1,C.value!==""?z.id=C.value:(F.value++,z.id="id"+F.value);let se=await((O=(q=(lt=Me.FormContent)==null?void 0:lt.find(S=>{var Je,Ze;return(S==null?void 0:S.key)===(((Ze=(Je=u.value)==null?void 0:Je.find(Ve=>(Ve==null?void 0:Ve.label)==="类型"))==null?void 0:Ze.value)??"label")}))==null?void 0:q.value)==null?void 0:O.value)??((we=(ke=Me.FormContent)==null?void 0:ke.find(S=>{var Je,Ze;return(S==null?void 0:S.key)===(((Ze=(Je=u.value)==null?void 0:Je.find(Ve=>(Ve==null?void 0:Ve.label)==="类型"))==null?void 0:Ze.value)??"label")}))==null?void 0:we.value);if((Le=u.value)==null||Le.forEach(S=>{const Je=se==null?void 0:se.find(Ze=>(Ze==null?void 0:Ze.label)===(S==null?void 0:S.label));Je&&(z[Je.key]=S.value)}),z.width=z.width?z.width:1,z.key=z==null?void 0:z.label,z.isFormColHidden=z==null?void 0:z.isFormColHidden,(Fe=w.value)!=null&&Fe.find(S=>S.id===z.id))w.value=(tt=w.value)==null?void 0:tt.map(S=>(S.id===z.id&&(S=z),S));else{let S=I.cloneDeep(w.value);S.push(z),w.value=S}w.value=w.value.map(({id:S,...Je})=>Je),p.value=!1,C.value="";let ie=I.cloneDeep(c.originalItemContents);(ae=I.cloneDeep(c.originalItemContents))!=null&&ae.find(S=>(S==null?void 0:S.key)==="formContent")?ie=(Ee=I.cloneDeep(c.originalItemContents))==null?void 0:Ee.map(S=>((S==null?void 0:S.key)==="formContent"&&(S.contents=w.value),S)):ie.push({key:"formContent",contents:w.value}),r("change",ie)},300),qe=()=>{p.value=!1,h.value=!1,C.value="",y.value=[],M.value=[]};return e.watch(()=>c.originalItemContents,()=>{var se,ie,he,et,lt,q;if(!c.originalItemContents||c.originalItemContents.length===0)return;const z=I.cloneDeep(c.originalItemContents);w.value=((se=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:se.contents)??[],f.value=((ie=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="formButton"))==null?void 0:ie.contents)??[],V.value=(he=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="enableWrap"))!=null&&he.contents?!((et=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="enableWrap"))!=null&&et.contents):!0,w.value=(lt=I.cloneDeep(w.value))==null?void 0:lt.map((O,ke)=>{var Le;let we=O;return we.id=(O==null?void 0:O.id)??ke,O!=null&&O.label||(O.label=(O==null?void 0:O.key)??(O==null?void 0:O.label)??""),O!=null&&O.type||(O.type=(O==null?void 0:O.type)??""),O.contents=((Le=O==null?void 0:O.options)==null?void 0:Le.length)===0?(O==null?void 0:O.contents)??"":O==null?void 0:O.options,we}),w.value=Me.formToOptionsContents(w.value),f.value=(q=f.value)==null?void 0:q.map((O,ke)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",background:(O==null?void 0:O.background)??"var(--ssComponent-primary-color)",id:ke})},{deep:!0,immediate:!0}),(z,se)=>{const ie=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",ws,[e.createElementVNode("div",Cs,[e.createElementVNode("div",Ds,[se[2]||(se[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:A},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[1]||(se[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",_s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(et,lt)=>(e.openBlock(),e.createElementBlock("div",{key:lt},[e.createElementVNode("div",Es,[e.createElementVNode("div",null,e.toDisplayString(et.label),1),e.createElementVNode("div",Ss,[e.createVNode(ie,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>H(et)},null,8,["onClick"]),e.createVNode(ie,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>x(et)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ts,[se[4]||(se[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(ie,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[3]||(se[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(et,lt)=>(e.openBlock(),e.createElementBlock("div",{key:lt},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(et.label),1),e.createElementVNode("div",Ns,[e.createVNode(ie,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>U(et)},null,8,["onClick"]),e.createVNode(ie,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>R(et)},null,8,["onClick"])])])]))),128))]),se[6]||(se[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",As,[se[5]||(se[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:V.value,"onUpdate:modelValue":se[0]||(se[0]=et=>V.value=et)},null,8,["modelValue"])])]),e.createVNode(Jt.ssDialog,{visible:p.value,onBeforeDestroy:qe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Vs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Ue,onChangeVisible:pt,onBlurChange:Ne},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Os,[e.createVNode(he,{onClick:qe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(Ke),id:"themeButton"},{default:e.withCtx(()=>se[8]||(se[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:h.value,onBeforeDestroy:qe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ms,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:G.value,key:G.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:qe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ue},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},No=Pt._export_sfc(zs,[["__scopeId","data-v-20850524"]]),Fs={class:"step-module content"},Rs={class:"module-data"},Ls={class:"step-module layout"},Ps={class:"form-content"},$s=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=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}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),w=e.ref({}),C=e.ref([]),V=H=>{var U;w.value=H,r("change",(U=M())==null?void 0:U.compData)},F=(H,U)=>{var ue,x;switch(H){case"create":(ue=u.value)==null||ue.forEach(R=>{R.value=""}),f.value="create",h.visible=!0;break;case"update":(x=u.value)==null||x.forEach(R=>{R.value=U[R==null?void 0:R.prop]}),f.value="update",h.visible=!0;break;case"delete":C.value.splice(U,1),f.value="delete";break}},G=H=>{var U,ue,x;if((H==null?void 0:H.buttonName)==="确认"){const R=I.cloneDeep(H==null?void 0:H.content);switch(Object.keys(R).forEach(b=>{R[b]===""&&delete R[b]}),f.value){case"create":C.value.push({...R,index:((U=C.value)==null?void 0:U.length)+1});break;case"update":C.value=(ue=C.value)==null?void 0:ue.map(b=>b.index===(R==null?void 0:R.index)?{...b,title:R==null?void 0:R.title,description:R==null?void 0:R.description}:b);break}r("change",(x=M())==null?void 0:x.compData),h.visible=!1}else h.visible=!1},M=()=>({comp:"Step",compData:[{key:"stepList",contents:C.value},{key:"stepConfig",contents:w.value}]}),Ce=()=>{h.visible=!1};return e.watch(()=>c==null?void 0:c.itemContents,H=>{var U,ue;H&&(w.value=((U=H==null?void 0:H.find(x=>x.key==="stepConfig"))==null?void 0:U.contents)??{},C.value=((ue=H==null?void 0:H.find(x=>x.key==="stepList"))==null?void 0:ue.contents)??[])},{immediate:!0}),(H,U)=>{const ue=e.resolveComponent("svg-icon"),x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Fs,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(x,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(ue,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Rs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(R,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.title),1),e.createElementVNode("div",null,[e.createVNode(x,{type:"primary",size:"small",onClick:A=>F("update",{...R,index:b+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(x,{type:"danger",size:"small",onClick:A=>F("delete",b)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ls,[U[5]||(U[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:p.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:Ce,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ps,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:G},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),js=Pt._export_sfc($s,[["__scopeId","data-v-7dbd17f2"]]),Us={class:"step-module content"},Ks={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=e.ref("create"),u=e.ref({}),y=e.ref([]),h=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}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),w=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),C=e.reactive({visible:!1,width:"40%",title:"时间线"}),V=H=>{var U;u.value=H,r("change",(U=M())==null?void 0:U.compData)},F=(H,U)=>{var ue,x;switch(H){case"create":(ue=f.value)==null||ue.forEach(R=>{R.value=""}),p.value="create",C.visible=!0;break;case"update":(x=f.value)==null||x.forEach(R=>{R.value=U[R==null?void 0:R.prop]}),p.value="update",C.visible=!0;break;case"delete":y.value.splice(U,1),p.value="delete";break}},G=H=>{var U,ue,x,R;if((H==null?void 0:H.buttonName)==="确认"){const b=I.cloneDeep(H==null?void 0:H.content);switch(Object.keys(b).forEach(A=>{b[A]===""&&delete b[A]}),p.value){case"create":(ue=y.value)==null||ue.push({...b,index:((U=y.value)==null?void 0:U.length)+1});break;case"update":y.value=(x=y.value)==null?void 0:x.map(A=>A.index===(b==null?void 0:b.index)?{...A,content:b==null?void 0:b.content,timestamp:b==null?void 0:b.timestamp}:A);break}r("change",(R=M())==null?void 0:R.compData),C.visible=!1}else C.visible=!1},M=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:y.value},{key:"timeLineConfig",contents:u.value}]}),Ce=()=>{C.visible=!1};return e.watch(()=>c==null?void 0:c.itemContents,H=>{var U,ue;H&&(u.value=((U=H==null?void 0:H.find(x=>x.key==="timeLineConfig"))==null?void 0:U.contents)??{},y.value=((ue=H==null?void 0:H.find(x=>x.key==="timeLineList"))==null?void 0:ue.contents)??[])},{immediate:!0}),(H,U)=>{const ue=e.resolveComponent("svg-icon"),x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Us,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(x,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(ue,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(R,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.content),1),e.createElementVNode("div",null,[e.createVNode(x,{type:"primary",size:"small",onClick:A=>F("update",{...R,index:b+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(x,{type:"danger",size:"small",onClick:A=>F("delete",b)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[U[5]||(U[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:h.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:C.visible,title:C.title,onBeforeDestroy:Ce,width:C.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:w.value,onOnButtonClick:G},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=Pt._export_sfc(qs,[["__scopeId","data-v-39ffc861"]]),Xs={};function Ys(n,l){return e.openBlock(),e.createElementBlock("div")}const Js=Pt._export_sfc(Xs,[["render",Ys]]),Zs={class:"extra-content"},Qs={key:0},ec={key:1},tc={class:"dialog-footer"},ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:l}){const c=n,r=e.ref(0),p=e.ref(),u=e.ref(),y=l,h=e.ref(!1),f=e.ref({}),w=e.ref({}),C=e.ref();e.watch(()=>[c.itemData],()=>{var R;const x=I.cloneDeep(c.itemData);p.value=(R=I.cloneDeep(x))==null?void 0:R.map(b=>{var A;if(b.key==="extra"){let B=[];(A=b.value)==null||A.forEach(pe=>{var Ue;B.push((Ue=Object.values(pe))==null?void 0:Ue[0])}),b.value=B}return b})},{deep:!0,immediate:!0});const V=(x,R,b,A)=>{var pe;let B={};((pe=x==null?void 0:x[0])==null?void 0:pe.contents)==="详情"&&(h.value=!0,B[R]=x,u.value=x==null?void 0:x.filter(Ue=>(Ue==null?void 0:Ue.key)!=="tableContentName"),f.value=B,w.value=b,C.value=A.id)},F=x=>{var Ue,pt,Ne,Ke;const R=(pt=(Ue=Object.values(I.cloneDeep(f.value)))==null?void 0:Ue[0])==null?void 0:pt.filter(qe=>(qe==null?void 0:qe.key)==="tableContentName"),b=(Ke=(Ne=Object.values(I.cloneDeep(f.value)))==null?void 0:Ne[0])==null?void 0:Ke.filter(qe=>(qe==null?void 0:qe.key)!=="tableContentName"),A=b==null?void 0:b.map((qe,z)=>{var se;return z===x.index&&(qe==null?void 0:qe.comp)==="Table"&&(qe.compData=(se=qe.compData)==null?void 0:se.map(ie=>{var he,et;return(ie==null?void 0:ie.key)==="tableContents"&&(ie.contents=(et=(he=x.content)==null?void 0:he.map(lt=>{let q={};for(let O in lt)O!=="id"&&(q[O]=lt[O]);return q}))==null?void 0:et.map(lt=>Object.values(lt))),ie})),qe});A.unshift(R==null?void 0:R[0]);let B=I.cloneDeep(f.value),pe={};for(let qe in B)pe[qe]=A;f.value=pe},G=()=>{h.value=!1,f.value={},w.value={},C.value=void 0,r.value++},M=x=>{var Ue,pt,Ne,Ke;const R=(pt=(Ue=Object.values(I.cloneDeep(f.value)))==null?void 0:Ue[0])==null?void 0:pt.filter(qe=>(qe==null?void 0:qe.key)==="tableContentName"),b=(Ke=(Ne=Object.values(I.cloneDeep(f.value)))==null?void 0:Ne[0])==null?void 0:Ke.filter(qe=>(qe==null?void 0:qe.key)!=="tableContentName"),A=b==null?void 0:b.map((qe,z)=>(z===x.index&&(qe.compData=x.contents),qe));A.unshift(R==null?void 0:R[0]);let B=I.cloneDeep(f.value),pe={};for(let qe in B)pe[qe]=A;f.value=pe},Ce=()=>{var R,b;let x={};for(let A in w.value)A===((R=Object.keys(f.value))==null?void 0:R[0])?x[A]=(b=Object.values(f.value))==null?void 0:b[0]:x[A]=w.value[A];y("change",{buttonName:"编辑",index:C.value,singleContent:x},"methodData"),h.value=!1,f.value={},w.value={},C.value=void 0},H=()=>{h.value=!1,f.value={},w.value={},C.value=void 0},U=x=>{y("change",x,"methodData")},ue=x=>tn(x);return(x,R)=>{const b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Zs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(A,B)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(A==null?void 0:A.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Qs)):(e.openBlock(),e.createElementBlock("div",ec,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ue(A.comp)),{itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,key:B,index:(A==null?void 0:A.id)??B,onContentClick:V,onChange:U},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Jt.ssDialog,{visible:h.value,onBeforeDestroy:H},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(A,B)=>(e.openBlock(),e.createElementBlock("div",{key:B,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ue(A.comp)),{itemData:A==null?void 0:A.compData,onChange:F,childItemData:A==null?void 0:A.itemChildData,key:B,onContentChange:M,index:(A==null?void 0:A.id)??B,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",tc,[e.createVNode(b,{class:"cancel-button footer-button",onClick:G,id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"confirm-button footer-button",onClick:Ce,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},nc=Pt._export_sfc(ac,[["__scopeId","data-v-2d9c5ab2"]]),oc={key:0,class:"method-content"},rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const l=e.ref([]),c=Me.useOriginalState(ee.pinia),{originalPath:r}=ee.storeToRefs(c),p=n,u=e.ref(!1),y=e.ref(),h=Me.useTableComp(ee.pinia),{multipleTableConst:f}=ee.storeToRefs(h),w=I.useModelComp(ee.pinia),C=e.ref(!1),V=I.useMenuState(ee.pinia),F=I.useLoginState(ee.pinia),{itemData:G,isEdit:M,routeToChildPath:Ce,tableViewContents:H,lockingPage:U,payloadTypes:ue}=ee.storeToRefs(w),{activeMenuPath:x,platform:R,childMenu:b}=ee.storeToRefs(V),{loginUserInfo:A}=ee.storeToRefs(F),B=e.ref(!1),pe=async()=>{var q,O;(q=l.value)!=null&&q.find(ke=>(ke==null?void 0:ke.buttonName)==="保存")&&await ie((O=l.value)==null?void 0:O.find(ke=>(ke==null?void 0:ke.buttonName)==="保存")),await Me.onSaveBack()};e.watch(()=>G.value,async()=>{M.value==="view"&&!B.value&&await lt(I.cloneDeep(p.itemData)),B.value=!1},{deep:!0});const Ue=()=>{u.value=!1,y.value=void 0},pt=q=>q.map(O=>{const ke={};for(const we in O){const Le=O[we];if(we.includes(f.value)){const Fe=we.split(f.value);let tt=ke;Fe.forEach((ae,Ee)=>{Ee===Fe.length-1?tt[ae]=Le:(tt[ae]||(tt[ae]={}),tt=tt[ae])})}else ke[we]=Le}return ke}),Ne=async(q,O,ke=[])=>{var Le,Fe,tt,ae,Ee,S,Je,Ze,Ve,oe,Q,re,Se,Ge,st;let we=(Le=I.cloneDeep(O))==null?void 0:Le.filter(v=>(v==null?void 0:v.comp)!=="methodButton");if(q!=null&&q.includes("[")){let v=(S=(Ee=(ae=(tt=(Fe=I.cloneDeep(q))==null?void 0:Fe.split("["))==null?void 0:tt[1])==null?void 0:ae.split("]"))==null?void 0:Ee[0])==null?void 0:S.split(":"),_="";if(v!=null&&v[0]){let j=(Je=we==null?void 0:we.find(Y=>(Y==null?void 0:Y.name)===(v==null?void 0:v[0])))==null?void 0:Je.compData;if(!j){let Y=(Ze=q==null?void 0:q.split("["))==null?void 0:Ze[0],k=await Me.getItemData(Y,sessionStorage.getItem("systemKey"),"",!1,"","",ke);j=(Ve=k==null?void 0:k.find(ne=>(ne==null?void 0:ne.name)===(v==null?void 0:v[0])))==null?void 0:Ve.compData}j==null||j.forEach(Y=>{var k,ne,ze,E,J,L;if((Y==null?void 0:Y.key)==="formContent")(k=Y==null?void 0:Y.contents)==null||k.forEach(K=>{var De;(K==null?void 0:K.key)===(v==null?void 0:v[1])&&(Array.isArray(K==null?void 0:K.value)?_=K==null?void 0:K.value:_=(De=K==null?void 0:K.value)==null?void 0:De.toString())});else if((Y==null?void 0:Y.key)==="tableContents"){let K=[],De=(ne=j==null?void 0:j.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:ne.contents,te=(v==null?void 0:v[1])??"";if(De!=null&&De.every(W=>Array.isArray(W))){let W=Me.getColumnChild((J=De==null?void 0:De[0])==null?void 0:J.filter(X=>(X==null?void 0:X.label)!=="操作"));(L=Y.contents)==null||L.forEach(X=>{let ce={};X=X==null?void 0:X.filter(be=>!(be!=null&&be.id)),W==null||W.forEach((be,me)=>{let ye=X[me];typeof X[me]=="number"&&(ye=X[me].toString()),(te===""||te===be.prop)&&(ce[be.prop]=ye)}),K.push(ce)}),K=pt(K)}else{let W=(ze=De==null?void 0:De.map(X=>X==null?void 0:X.label))==null?void 0:ze.filter(X=>X!=="操作");(E=Y.contents)==null||E.forEach(X=>{let ce={};X=X==null?void 0:X.filter(be=>!(be!=null&&be.id)),W==null||W.forEach((be,me)=>{let ye=X[me];typeof X[me]=="number"&&(ye=X[me].toString()),(te===""||te===be)&&(ce[be]=ye)}),K.push(ce)})}_=K}})}return _}else if(q!=null&&q.includes("/")){let v={};return(oe=I.cloneDeep(we))==null||oe.forEach((_,j)=>{var Y,k,ne,ze,E,J,L,K,De,te,W,X,ce,be,me,ye,P,Te,de;if((_==null?void 0:_.comp)==="Table"){let Oe=Array.isArray((ne=(k=(Y=_==null?void 0:_.compData)==null?void 0:Y.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:k.contents)==null?void 0:ne[0])?(L=(J=(E=(ze=_==null?void 0:_.compData)==null?void 0:ze.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:E.contents)==null?void 0:J[0])==null?void 0:L.some(Ae=>Ae==null?void 0:Ae.children):[],rt=(te=(De=(K=_==null?void 0:_.compData)==null?void 0:K.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:De.contents)==null?void 0:te.map(Ae=>(Ae!=null&&Ae.find(vt=>vt==null?void 0:vt.id)&&(Ae=Ae.slice(1)),Ae)),Pe=(me=(be=(ce=(X=(W=_==null?void 0:_.compData)==null?void 0:W.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:X.contents)==null?void 0:ce[0])==null?void 0:be[0])==null?void 0:me.label,nt=(P=(ye=_==null?void 0:_.compData)==null?void 0:ye.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:P.contents;if(Oe)(Oe==null?void 0:Oe.length)===0?v[_.name]=v!=null&&v[_.name]?v[_.name]:Me.tableToForm(rt,nt):v[Pe]=Me.tableToForm(rt,nt);else{const Ae=[];nt=nt.slice(1,nt.length-1),nt==null||nt.forEach((vt,at)=>{rt==null||rt.forEach(ve=>{Ae.push({key:vt.label+ve[0],value:ve[at+1]})})}),v["form"+j]=Ae}}else{const Oe=(de=(Te=_.compData)==null?void 0:Te.find(Pe=>(Pe==null?void 0:Pe.key)==="formContent"))==null?void 0:de.contents;v!=null&&v.form||(v.form=[]);const rt=[];Oe==null||Oe.forEach(Pe=>{Pe.key!==""&&(Pe={key:(Pe==null?void 0:Pe.key)??(Pe==null?void 0:Pe.label),value:Pe==null?void 0:Pe.value},rt.push(Pe))}),v.form=[...rt,...I.cloneDeep(v==null?void 0:v.form)]}}),v}else{if(q==="createInsofDataApi"){let v=(Q=I.cloneDeep(O))==null?void 0:Q[0];return v={comp:(re=I.cloneDeep(v))==null?void 0:re.comp,compData:(Se=I.cloneDeep(v))==null?void 0:Se.compData,name:(Ge=I.cloneDeep(v))==null?void 0:Ge.name,isShow:(st=I.cloneDeep(v))==null?void 0:st.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:x.value},value:{pageData:v}}}return q}},Ke=async(q,O,ke)=>{var Fe,tt,ae;let we=await Me.getItemData(O,sessionStorage.getItem("systemKey"),""),Le=we==null?void 0:we.find(Ee=>(Ee==null?void 0:Ee.name)===(ke==null?void 0:ke[0]));if(Le){if((Le==null?void 0:Le.comp)==="Table"){let Ee={};for(let re in I.cloneDeep(q))I.cloneDeep(q)[re]!=="loginUser"?Ee[re]=I.cloneDeep(q)[re]:Ee[re]=((Fe=A.value)==null?void 0:Fe.account)||((tt=A.value)==null?void 0:tt.账号);let S=[],Je=Ee;Array.isArray(q)||(Je=[Ee]),Je==null||Je.forEach(re=>{S.push({[re[ke[1]]]:re})});let Ze=[],Ve=S==null?void 0:S.map(re=>{var Se;return(Se=Object.keys(re))==null?void 0:Se[0]});we==null||we.forEach(re=>{var Se;(re==null?void 0:re.name)===(ke==null?void 0:ke[0])&&((Se=re==null?void 0:re.compData)==null||Se.forEach(Ge=>{var st;(Ge==null?void 0:Ge.key)==="tableContents"&&((st=Ge==null?void 0:Ge.contents)==null||st.forEach(v=>{v!=null&&v.some(_=>Ve.includes(_))&&Ze.push({[v.find(_=>_.id).id]:v.find(_=>Ve.includes(_))})}))}))});let oe=Ze==null?void 0:Ze.map(re=>{var Se;return(Se=Object.keys(re))==null?void 0:Se[0]}),Q=[];if(oe==null||oe.forEach(re=>{var st;let Se=(st=Ze==null?void 0:Ze.find(v=>{var _;return((_=Object.keys(v))==null?void 0:_[0].toString())===re.toString()}))==null?void 0:st[re],Ge=S==null?void 0:S.find(v=>{var _;return((_=Object.keys(v))==null?void 0:_[0])===Se});Q.push({id:parseInt(re),value:{tableData:Ge[Se]}})}),(Q==null?void 0:Q.length)>0)return Q}else if((Le==null?void 0:Le.comp)==="Form"){let Ee=I.cloneDeep(Le);Ee.compData=(ae=Ee.compData)==null?void 0:ae.map(Ze=>{var Ve;return(Ze==null?void 0:Ze.key)==="formContent"&&(Ze.contents=(Ve=Ze.contents)==null?void 0:Ve.map(oe=>((oe==null?void 0:oe.key)===(ke==null?void 0:ke[1])&&(oe.value=(q==null?void 0:q[oe==null?void 0:oe.prop])||q),oe))),Ze});let S={};for(let Ze in Ee)Ze!=="id"&&(S[Ze]=Ee[Ze]);let Je=[];if(Je.push({id:Le==null?void 0:Le.id,keyType:ke==null?void 0:ke[1],value:{pageData:S}}),(Je==null?void 0:Je.length)>0)return Je}}},qe=async(q,O,ke)=>{var Fe,tt,ae,Ee,S,Je,Ze,Ve,oe,Q;let we=await Me.getItemData(O,sessionStorage.getItem("systemKey"),""),Le=we==null?void 0:we.find(re=>(re==null?void 0:re.name)===(ke==null?void 0:ke[0]));if(Le){if((Le==null?void 0:Le.comp)==="Table"){let re={};for(let Se in I.cloneDeep(q))I.cloneDeep(q)[Se]!=="loginUser"?re[Se]=I.cloneDeep(q)[Se]:re[Se]=((Fe=A.value)==null?void 0:Fe.account)||((tt=A.value)==null?void 0:tt.账号);await ee.createInsofDataApi({key:{type:"data",pageKey:O,tableId:Le==null?void 0:Le.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})}else if((Le==null?void 0:Le.comp)==="Form"){let re=I.cloneDeep(Le),Se=Object.keys(q),Ge="";(Ee=(ae=I.cloneDeep(re))==null?void 0:ae.compData)==null||Ee.forEach(k=>{var ne,ze;(k==null?void 0:k.key)==="formContent"&&((ze=(ne=I.cloneDeep(k))==null?void 0:ne.contents)==null||ze.forEach(E=>{var J;Se.includes(E==null?void 0:E.key)&&(E==null?void 0:E.value)===((J=A.value)==null?void 0:J.姓名)&&(Ge=E==null?void 0:E.key)}))});let st=[];(S=Object.values(q[Ge]))==null||S.forEach(k=>{k!=null&&k.includes("(")&&st.push(k)}),st=[...new Set(st)];const v=st==null?void 0:st.map(async k=>{var L,K,De,te,W,X,ce,be,me,ye,P,Te;let ne="";(X=(W=(te=(De=(K=(L=I.cloneDeep(k))==null?void 0:L.split("("))==null?void 0:K[1])==null?void 0:De.split(")"))==null?void 0:te[0])==null?void 0:W.split(":"))==null||X.forEach(de=>{ne=ne===""?ne+de.replaceAll("'",""):ne+"/"+de.replaceAll("'","")});let ze=[];(Te=(P=(ye=(me=(be=(ce=I.cloneDeep(k))==null?void 0:ce.split("<"))==null?void 0:be[1])==null?void 0:me.split(">"))==null?void 0:ye[0])==null?void 0:P.split(":"))==null||Te.forEach(de=>{ze.push(de.replaceAll("'",""))});const E=await Me.getItemData(ne,sessionStorage.getItem("systemKey"),"");let J="";return E==null||E.forEach(de=>{var Oe;de.name===(ze==null?void 0:ze[0])&&((Oe=de==null?void 0:de.compData)==null||Oe.forEach(rt=>{var Pe;(rt==null?void 0:rt.key)==="formContent"&&((Pe=rt.contents)==null||Pe.forEach(nt=>{(nt==null?void 0:nt.key)===(ze==null?void 0:ze[1])&&(J=nt==null?void 0:nt.value)}))}))}),{[k]:J}}),_=await Promise.all(v);re.compData=(Ze=(Je=I.cloneDeep(re))==null?void 0:Je.compData)==null?void 0:Ze.map(k=>{var ne,ze;return(k==null?void 0:k.key)==="formContent"&&(k.contents=(ze=(ne=I.cloneDeep(k))==null?void 0:ne.contents)==null?void 0:ze.map(E=>{var J,L,K,De;return(J=q[Ge])!=null&&J[E==null?void 0:E.key]&&(q[Ge][E==null?void 0:E.key].includes("(")?E.value=(L=_==null?void 0:_.find(te=>{var W;return((W=Object.keys(te))==null?void 0:W[0])===q[Ge][E==null?void 0:E.key]}))==null?void 0:L[q[Ge][E==null?void 0:E.key]]:E.value=(De=(K=I.cloneDeep(q))==null?void 0:K[Ge])==null?void 0:De[E==null?void 0:E.key]),E})),k});const j=await ee.getInsofDataApi({key:{type:"structure",pageKey:O,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((Ve=j==null?void 0:j.data)==null?void 0:Ve.type)==="success"&&((Q=(oe=j==null?void 0:j.data)==null?void 0:oe.result)==null||Q.forEach(k=>{var ne,ze;((ze=(ne=k==null?void 0:k.value)==null?void 0:ne.pageData)==null?void 0:ze.name)===(ke==null?void 0:ke[0])&&(Y=k.id)}),await ee.updateInsofDataApi({id:Y,value:{pageData:re}}))}}},z=(q,O="",ke={})=>{for(const[we,Le]of Object.entries(q)){const Fe=O?`${O}.${we}`:we;Le!==null&&typeof Le=="object"&&!Array.isArray(Le)&&Object.prototype.toString.call(Le)!=="[object Date]"?z(Le,Fe,ke):ke[Fe]=Le}return ke},se=async(q,O,ke,we)=>{var tt,ae,Ee,S,Je,Ze,Ve,oe,Q,re,Se,Ge,st,v,_,j,Y,k,ne,ze,E,J,L,K,De;let Le=await Me.getItemData(O,sessionStorage.getItem("systemKey"),""),Fe=Le==null?void 0:Le.find(te=>(te==null?void 0:te.name)===(ke==null?void 0:ke[0]));if(Fe){if(!(ke!=null&&ke[1])&&(Fe==null?void 0:Fe.comp)==="Table"){let te={},W=[],X=(ae=(tt=Fe==null?void 0:Fe.compData)==null?void 0:tt.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:ae.contents;X!=null&&X.every(me=>Array.isArray(me))?W=(S=Me.getColumnChild((Ee=X==null?void 0:X[0])==null?void 0:Ee.filter(me=>(me==null?void 0:me.label)!=="操作")))==null?void 0:S.map(me=>me==null?void 0:me.prop):W=X==null?void 0:X.map(me=>me==null?void 0:me.label);for(let me in I.cloneDeep(q))if(I.cloneDeep(q)[me]!=="loginUser"){let ye=z(I.cloneDeep(q)[me]),P={};for(let Te in ye)if(W!=null&&W.find(de=>de===Te))P[Te]=ye[Te];else if(W!=null&&W.find(de=>(de==null?void 0:de.toUpperCase())===(Te==null?void 0:Te.toUpperCase()))){let de=W==null?void 0:W.find(Oe=>(Oe==null?void 0:Oe.toUpperCase())===(Te==null?void 0:Te.toUpperCase()));P[de]=ye[Te]}te[me]=P}else te[me]=((Je=A.value)==null?void 0:Je.account)||((Ze=A.value)==null?void 0:Ze.账号);let ce=await ee.getInsofDataApi({keyLikes:{tableId:Fe==null?void 0:Fe.id}});if(((oe=(Ve=ce==null?void 0:ce.data)==null?void 0:Ve.result)==null?void 0:oe.length)>0){let me=(re=(Q=ce==null?void 0:ce.data)==null?void 0:Q.result)==null?void 0:re.map(ye=>ye==null?void 0:ye.id);(me==null?void 0:me.length)>0&&await ee.batchDeleteInsofDataApi({ids:me})}let be=[];if((Se=Fe==null?void 0:Fe.compData)!=null&&Se.find(me=>(me==null?void 0:me.key)==="pageColumn")&&((v=(st=(Ge=Fe==null?void 0:Fe.compData)==null?void 0:Ge.find(me=>(me==null?void 0:me.key)==="pageColumn"))==null?void 0:st.contents)!=null&&v.includes("["))){const me=await ee.getInsofDataApi({id:Fe==null?void 0:Fe.tableId});let ye=((k=(Y=(j=(_=me==null?void 0:me.data)==null?void 0:_.result)==null?void 0:j[0])==null?void 0:Y.key)==null?void 0:k.pageKey)??"";(ne=Object.values(te))==null||ne.forEach(P=>{be.push({key:{type:"data",pageKey:ye,tableId:Fe==null?void 0:Fe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:P}})})}else(ze=Object.values(te))==null||ze.forEach(me=>{be.push({key:{type:"data",pageKey:O,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:me}})});(be==null?void 0:be.length)>0&&await ee.batchAddInsofDataApi({dataList:be})}else if(!(ke!=null&&ke[1])&&(Fe==null?void 0:Fe.comp)==="Form"){let te=I.cloneDeep(Fe);te.compData=(J=(E=I.cloneDeep(te))==null?void 0:E.compData)==null?void 0:J.map(ce=>{var be,me;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(me=(be=I.cloneDeep(ce))==null?void 0:be.contents)==null?void 0:me.map(ye=>{var P,Te;return(P=I.cloneDeep(q))!=null&&P[ye==null?void 0:ye.key]&&(ye.value=(Te=I.cloneDeep(q))==null?void 0:Te[ye==null?void 0:ye.key]),ye})),ce});const W=await ee.getInsofDataApi({key:{type:"structure",pageKey:O,systemKey:sessionStorage.getItem("systemKey")}});let X="";((L=W==null?void 0:W.data)==null?void 0:L.type)==="success"&&((De=(K=W==null?void 0:W.data)==null?void 0:K.result)==null||De.forEach(ce=>{var be,me;((me=(be=ce==null?void 0:ce.value)==null?void 0:be.pageData)==null?void 0:me.name)===(ke==null?void 0:ke[0])&&(X=ce.id)}),await ee.updateInsofDataApi({id:X,value:{pageData:te}}))}}},ie=async q=>{var O,ke,we,Le,Fe,tt,ae,Ee,S,Je,Ze,Ve,oe,Q,re,Se;V.setImportLoading(!0);try{if(q.api){let Ge=new WeakMap;(ke=(O=(await ee.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ue.value})).data.result)==null?void 0:O.filter(L=>{var K,De;return((K=L==null?void 0:L.key)==null?void 0:K.pageKey)!=="menu"&&((De=L==null?void 0:L.key)==null?void 0:De.pageKey)!=="secret"}))==null||ke.forEach(L=>{Ge[L.key.pageKey]?Ge[L.key.pageKey]=[...Ge[L.key.pageKey],L]:Ge[L.key.pageKey]=[L]});let v=await Me.getItemData((b==null?void 0:b.value)===""?x.value:b==null?void 0:b.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge),_="";if(v=v==null?void 0:v.map(L=>{var K,De,te,W,X,ce,be,me,ye,P,Te,de;if((L==null?void 0:L.comp)==="Form")L.compData=(K=L.compData)==null?void 0:K.map(Oe=>{var rt;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(rt=Oe.contents)==null?void 0:rt.map(Pe=>{var nt;if((Pe==null?void 0:Pe.value)===""&&(Pe==null?void 0:Pe.type)==="Select"){let Ae=Me.judgeContents((nt=I.cloneDeep(Pe))==null?void 0:nt.optionUrl,Ge);Pe.value=Pe.value||Ae}return Pe})),Oe});else if((L==null?void 0:L.comp)==="Table"&&(De=L.compData)!=null&&De.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn")){let Oe=(W=(te=L.compData)==null?void 0:te.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn"))==null?void 0:W.contents,rt=((ce=(X=L.compData)==null?void 0:X.find(Ae=>(Ae==null?void 0:Ae.key)==="pageGroup"))==null?void 0:ce.contents)??"",Pe=(ye=(me=(be=Oe==null?void 0:Oe.split("["))==null?void 0:be[1])==null?void 0:me.split("]"))==null?void 0:ye[0];_=((P=Oe==null?void 0:Oe.split("["))==null?void 0:P[0])+((de=(Te=H.value)==null?void 0:Te.find(Ae=>(Ae==null?void 0:Ae.key)===Pe))==null?void 0:de.value)}return L}),!(_===""||_==="")){const L=await Me.getItemData(_,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);v=v==null?void 0:v.map(K=>{var De,te,W,X,ce,be,me,ye,P,Te,de,Oe,rt;if((K==null?void 0:K.comp)==="Table"&&(De=K.compData)!=null&&De.find(Pe=>(Pe==null?void 0:Pe.key)==="pageColumn")){let Pe=(W=(te=K.compData)==null?void 0:te.find(ve=>(ve==null?void 0:ve.key)==="pageColumn"))==null?void 0:W.contents,nt=((ce=(X=K.compData)==null?void 0:X.find(ve=>(ve==null?void 0:ve.key)==="pageGroup"))==null?void 0:ce.contents)??"",Ae=(ye=(me=(be=Pe==null?void 0:Pe.split("["))==null?void 0:be[1])==null?void 0:me.split("]"))==null?void 0:ye[0],vt=((P=Pe==null?void 0:Pe.split("["))==null?void 0:P[0])+((de=(Te=H.value)==null?void 0:Te.find(ve=>(ve==null?void 0:ve.key)===Ae))==null?void 0:de.value),at=(Oe=L==null?void 0:L.find(ve=>(ve==null?void 0:ve.name)===(nt===""?p==null?void 0:p.compName:nt)))==null?void 0:Oe.compData;K.compData=(rt=K.compData)==null?void 0:rt.map(ve=>{var Xe;return(ve==null?void 0:ve.key)==="tableContents"&&(ve.contents=(Xe=at==null?void 0:at.find(Qe=>(Qe==null?void 0:Qe.key)==="tableContents"))==null?void 0:Xe.contents),ve})}return K})}let j={};if(((Le=(we=q==null?void 0:q.extraValues)==null?void 0:we.input)==null?void 0:Le.length)>0){const L=(tt=(Fe=q==null?void 0:q.extraValues)==null?void 0:Fe.input)==null?void 0:tt.map(async K=>{var De;he!=null&&he.find(te=>te===K)?j=await Ne(K,v):j[Object.keys(K)[0]]=await Ne((De=Object.values(K))==null?void 0:De[0],v,Ge)});await Promise.all(L)}else j=await Ne("/",v);let Y=!1;(Ee=(ae=q==null?void 0:q.extraValues)==null?void 0:ae.output)==null||Ee.forEach(L=>{var K,De;(De=(K=Object.values(L))==null?void 0:K[0])!=null&&De.includes(".doc")&&(Y=!0)});let k;if(Y){const L=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});k=await ee.axios.post(q.api,j,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{L.close()})}else k=await ee.axios.post(q.api,j,{headers:{"Content-Type":"application/json"}});let ne=(Ve=(Ze=(Je=(S=I.cloneDeep(q))==null?void 0:S.extraValues)==null?void 0:Je.output)==null?void 0:Ze.map(L=>{var K,De,te,W,X,ce,be,me,ye,P,Te,de,Oe,rt,Pe,nt;if(!((De=(K=Object.values(L))==null?void 0:K[0])!=null&&De.includes(".doc"))){let Ae=(P=(ye=(me=(W=I.cloneDeep((te=Object.values(L))==null?void 0:te[0]))==null?void 0:W.split("["))==null?void 0:me[((be=(ce=I.cloneDeep((X=Object.values(L))==null?void 0:X[0]))==null?void 0:ce.split("["))==null?void 0:be.length)-1])==null?void 0:ye.split("]"))==null?void 0:P[0],vt=Ae==null?void 0:Ae.split(":"),at=(Oe=I.cloneDeep((Te=Object.values(L))==null?void 0:Te[0]))==null?void 0:Oe.substring(0,I.cloneDeep((de=Object.values(L))==null?void 0:de[0]).lastIndexOf("["));if(at=(Pe=I.cloneDeep(at))==null?void 0:Pe.slice(0,((rt=I.cloneDeep(at))==null?void 0:rt.length)-1),at!=null&&at.includes("[")){let ve="";if((nt=Me.contentTransArrayToAll(at,"/"))==null||nt.forEach(Xe=>{var Qe,$e,_e,ft,le,Be,Ie;if(!(Xe!=null&&Xe.includes("[")))ve=ve===""?ve+Xe.replaceAll("/",""):ve+"/"+Xe.replaceAll("/","");else{let Ye=I.cloneDeep(Xe).slice(1,((Qe=I.cloneDeep(Xe))==null?void 0:Qe.length)-1),D=(Be=(le=(ft=(_e=($e=I.cloneDeep(Ye))==null?void 0:$e.split("["))==null?void 0:_e[1])==null?void 0:ft.split("]"))==null?void 0:le[0])==null?void 0:Be.split(":"),fe="",We=(Ie=v==null?void 0:v.find(ge=>(ge==null?void 0:ge.name)===(D==null?void 0:D[0])))==null?void 0:Ie.compData;We==null||We.forEach(ge=>{var dt;(ge==null?void 0:ge.key)==="formContent"&&((dt=ge==null?void 0:ge.contents)==null||dt.forEach(ct=>{(ct==null?void 0:ct.key)===(D==null?void 0:D[1])&&(fe=ct==null?void 0:ct.value)}))}),ve=ve===""?ve+fe.replaceAll("/",""):ve+"/"+fe.replaceAll("/","")}}),at=ve,at[(at==null?void 0:at.length)-1]!=="/")return at}}}))==null?void 0:Ve.filter(L=>L);ne=[...new Set(I.cloneDeep(ne))];let ze=ne==null?void 0:ne.map(async L=>{let K=await Me.getItemData(L,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);if((K==null?void 0:K.length)===0)return await Me.getParentContents(L)});await Promise.all(ze);let E=[],J=(re=(Q=(oe=I.cloneDeep(q))==null?void 0:oe.extraValues)==null?void 0:Q.output)==null?void 0:re.map(async L=>{var me,ye,P,Te,de,Oe,rt,Pe,nt,Ae,vt,at,ve,Xe,Qe,$e,_e,ft,le,Be,Ie,Ye,D,fe,We,ge,dt,ct,wt,ht,ut,gt,Ct,It,Wt,yt,Mt,$t,Ht,Gt,Qt,Rt,Ca,Va,va,Oa,ga,Ma,za,Fa,Ra,La,Da,pa,sa,ma,fa,na,ua,Pa,_a,Ea,ya,$a,ja,Sa,Ua,Ka,Et,Zt;if((ye=(me=Object.values(L))==null?void 0:me[0])!=null&&ye.includes(".doc")){var K=new Blob([k.data],{type:"application/octet-stream;charset=UTF-8"}),De=k.headers["content-disposition"],te=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),W=te.exec(De),X=W==null?void 0:W[1],ce=document.createElement("a"),be=window.URL.createObjectURL(K);y.value=[{name:X,blobUrl:be}],u.value=!0}else{let bt=(Ae=(nt=(Pe=(Te=I.cloneDeep((P=Object.values(L))==null?void 0:P[0]))==null?void 0:Te.split("["))==null?void 0:Pe[((rt=(Oe=I.cloneDeep((de=Object.values(L))==null?void 0:de[0]))==null?void 0:Oe.split("["))==null?void 0:rt.length)-1])==null?void 0:nt.split("]"))==null?void 0:Ae[0],Ot=bt==null?void 0:bt.split(":"),kt=(ve=I.cloneDeep((vt=Object.values(L))==null?void 0:vt[0]))==null?void 0:ve.substring(0,I.cloneDeep((at=Object.values(L))==null?void 0:at[0]).lastIndexOf("["));if(kt!=null&&kt.includes("[")?kt=(Qe=I.cloneDeep(kt))==null?void 0:Qe.slice(0,((Xe=I.cloneDeep(kt))==null?void 0:Xe.length)-1):kt===""&&(kt=x.value),kt=kt.replaceAll("<","[").replaceAll(">","]"),kt!=null&&kt.includes("[")){let _t="";($e=Me.contentTransArrayToAll(kt,"/"))==null||$e.forEach((Dt,zt)=>{var Vt,Ft,Xt,oa,Ta,Wa,Ia,Ha,Dn,an,dn;if(!(Dt!=null&&Dt.includes("[")))_t=_t===""?_t+Dt.replaceAll("/",""):_t+"/"+Dt.replaceAll("/","");else{let nn="",ca="";(Vt=I.cloneDeep(Dt))!=null&&Vt.includes("]")?(nn=I.cloneDeep(Dt).slice(1,((Ft=I.cloneDeep(Dt))==null?void 0:Ft.length)-1),ca=(Ia=(Wa=(Ta=(oa=(Xt=I.cloneDeep(nn))==null?void 0:Xt.split("["))==null?void 0:oa[1])==null?void 0:Ta.split("]"))==null?void 0:Wa[0])==null?void 0:Ia.split(":")):(nn=I.cloneDeep(Dt).slice(1,(Ha=I.cloneDeep(Dt))==null?void 0:Ha.length),ca=(Dn=I.cloneDeep(nn))==null?void 0:Dn.split("/"));let qa="",on=(an=v==null?void 0:v.find(ra=>(ra==null?void 0:ra.name)===(ca==null?void 0:ca[0])))==null?void 0:an.compData;on==null||on.forEach(ra=>{var _n;(ra==null?void 0:ra.key)==="formContent"&&((_n=ra==null?void 0:ra.contents)==null||_n.forEach(Ba=>{(Ba==null?void 0:Ba.key)===(ca==null?void 0:ca[1])&&(qa=Ba==null?void 0:Ba.value)}))}),((dn=Me.contentTransArrayToAll(kt,"/"))==null?void 0:dn.length)-1!==zt?_t=_t===""?_t+qa.replaceAll("/",""):_t+"/"+qa.replaceAll("/",""):_t=_t+r.value+qa.replaceAll("/","")}}),(_e=x.value)!=null&&_e.includes(_t)?kt=x.value:kt=_t}let qt=I.cloneDeep((ft=Object.keys(L))==null?void 0:ft[0]);if(((le=k==null?void 0:k.data)==null?void 0:le.statusCode)===200||((Be=k==null?void 0:k.data)==null?void 0:Be.code)===200){if(((Ye=(Ie=k==null?void 0:k.data)==null?void 0:Ie.data)!=null&&Ye[qt]||(fe=(D=k==null?void 0:k.data)==null?void 0:D.result)!=null&&fe[qt])&&(Ot==null?void 0:Ot.length)===1)return await se(((ge=(We=k==null?void 0:k.data)==null?void 0:We.data)==null?void 0:ge[qt])||((ct=(dt=k==null?void 0:k.data)==null?void 0:dt.result)==null?void 0:ct[qt]),I.cloneDeep(kt),Ot,_);if((ht=(wt=k==null?void 0:k.data)==null?void 0:wt.data)!=null&&ht[qt]||(gt=(ut=k==null?void 0:k.data)==null?void 0:ut.result)!=null&>[qt]){let _t=await Ke(((It=(Ct=k==null?void 0:k.data)==null?void 0:Ct.data)==null?void 0:It[qt])||((yt=(Wt=k==null?void 0:k.data)==null?void 0:Wt.result)==null?void 0:yt[qt]),I.cloneDeep(kt),Ot);return _t&&(E=[...E,..._t]),_t}else{if(!((Mt=k==null?void 0:k.data)!=null&&Mt.data)){let _t=await Me.getItemData(x.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);_t=_t==null?void 0:_t.map(zt=>{var Vt;return(zt==null?void 0:zt.name)===(Ot==null?void 0:Ot[0])&&(zt.compData=(Vt=zt.compData)==null?void 0:Vt.map(Ft=>{var Xt;return(Ft==null?void 0:Ft.key)==="formContent"&&(Ft.contents=(Xt=Ft.contents)==null?void 0:Xt.map(oa=>{var Ta,Wa;return(oa==null?void 0:oa.key)===(Ot==null?void 0:Ot[1])&&(oa.value=(Wa=(Ta=k==null?void 0:k.data)==null?void 0:Ta.result)==null?void 0:Wa[qt==null?void 0:qt.replaceAll(":","")]),oa})),Ft})),zt});let Dt=[];($t=_t==null?void 0:_t.filter(zt=>(zt==null?void 0:zt.comp)==="Form"))==null||$t.forEach(async zt=>{let Vt={};for(let Ft in zt)Ft!=="id"&&(Vt[Ft]=zt[Ft]);Dt.push({id:zt==null?void 0:zt.id,value:{pageData:Vt}})}),(Dt==null?void 0:Dt.length)>0&&await ee.batchUpdateInsofDataApi({dataList:Dt});return}if((Ot==null?void 0:Ot.length)===1){const _t=(Qt=(Gt=(Ht=k==null?void 0:k.data)==null?void 0:Ht.data)==null?void 0:Gt.path)==null?void 0:Qt.path;let Dt="";(Oa=(va=(Va=(Ca=(Rt=_t==null?void 0:_t.split("("))==null?void 0:Rt[1])==null?void 0:Ca.split(")"))==null?void 0:Va[0])==null?void 0:va.split(":"))==null||Oa.forEach(Ft=>{var Xt,oa;Dt=Dt===""?Dt+((Xt=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:Xt.trim()):Dt+"/"+((oa=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:oa.trim())});let zt=[(Ra=(Fa=(za=(Ma=(ga=_t==null?void 0:_t.split("<"))==null?void 0:ga[1])==null?void 0:Ma.split(">"))==null?void 0:za[0])==null?void 0:Fa.replaceAll("'",""))==null?void 0:Ra.trim()],Vt;return(pa=(Da=(La=k==null?void 0:k.data)==null?void 0:La.data)==null?void 0:Da.data)!=null&&pa[Ot==null?void 0:Ot[0]]?Vt=await se((fa=(ma=(sa=k==null?void 0:k.data)==null?void 0:sa.data)==null?void 0:ma.data)==null?void 0:fa[Ot==null?void 0:Ot[0]],Dt,Ot,_):Vt=await qe((ua=(na=k==null?void 0:k.data)==null?void 0:na.data)==null?void 0:ua.data,Dt,zt,Ge),Vt}else{const _t=(Ea=(_a=(Pa=k==null?void 0:k.data)==null?void 0:Pa.data)==null?void 0:_a.path)==null?void 0:Ea.path;let Dt="";return(Ua=(Sa=(ja=($a=(ya=_t==null?void 0:_t.split("("))==null?void 0:ya[1])==null?void 0:$a.split(")"))==null?void 0:ja[0])==null?void 0:Sa.split(":"))==null||Ua.forEach(Vt=>{var Ft,Xt;Dt=Dt===""?Dt+((Ft=Vt==null?void 0:Vt.replaceAll("'",""))==null?void 0:Ft.trim()):Dt+"/"+((Xt=Vt==null?void 0:Vt.replaceAll("'",""))==null?void 0:Xt.trim())}),await Ke((Zt=(Et=(Ka=k==null?void 0:k.data)==null?void 0:Ka.data)==null?void 0:Et.data)==null?void 0:Zt[Ot==null?void 0:Ot[0]],Dt,Ot)}}}}});if(await Promise.all(J),(E==null?void 0:E.length)>0){let L=[];E==null||E.forEach(te=>{L!=null&&L.find(W=>{var X,ce,be,me;return((ce=(X=W==null?void 0:W.value)==null?void 0:X.pageData)==null?void 0:ce.name)===((me=(be=te==null?void 0:te.value)==null?void 0:be.pageData)==null?void 0:me.name)})||L.push(te)});let K=[];L==null||L.forEach(te=>{var ce,be,me,ye;let W=I.cloneDeep(te);W.value.pageData.compData=(ce=W.value.pageData.compData)==null?void 0:ce.map(P=>{var Te;return(P==null?void 0:P.key)==="formContent"&&(P.contents=(Te=P.contents)==null?void 0:Te.map(de=>{var rt,Pe,nt,Ae;let Oe=(rt=I.cloneDeep(E))==null?void 0:rt.find(vt=>(vt==null?void 0:vt.keyType)===(de==null?void 0:de.key));if(Oe){let vt=(Ae=(nt=(Pe=Oe.value.pageData.compData)==null?void 0:Pe.find(at=>(at==null?void 0:at.key)==="formContent"))==null?void 0:nt.contents)==null?void 0:Ae.find(at=>(at==null?void 0:at.key)===(de==null?void 0:de.key));de.value=vt==null?void 0:vt.value}return de})),P}),K.push({id:W==null?void 0:W.id,value:W==null?void 0:W.value});let X=[];(ye=(me=(be=W==null?void 0:W.value)==null?void 0:be.pageData)==null?void 0:me.compData)==null||ye.forEach(P=>{var Te;(P==null?void 0:P.key)==="formContent"&&((Te=P==null?void 0:P.contents)==null||Te.forEach(de=>{var Oe,rt,Pe,nt,Ae,vt;if((rt=(Oe=de==null?void 0:de.optionUrl)==null?void 0:Oe.menuSelect)!=null&&rt.find(at=>at==null?void 0:at.includes("[")))if(X!=null&&X.find(at=>{var ve,Xe,Qe;return((ve=at==null?void 0:at.key)==null?void 0:ve.join(","))===((Qe=(Xe=de==null?void 0:de.optionUrl)==null?void 0:Xe.menuSelect)==null?void 0:Qe.join(","))})){let at=(Pe=X==null?void 0:X.find(ve=>{var Xe,Qe,$e;return((Xe=ve==null?void 0:ve.key)==null?void 0:Xe.join(","))===(($e=(Qe=de==null?void 0:de.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:$e.join(","))}))==null?void 0:Pe.value;at.push({key:de==null?void 0:de.prop,groups:(nt=de==null?void 0:de.optionUrl)==null?void 0:nt.groupSelect,value:de==null?void 0:de.value}),X=X==null?void 0:X.map(ve=>{var Xe,Qe,$e;return((Xe=ve==null?void 0:ve.key)==null?void 0:Xe.join(","))===(($e=(Qe=de==null?void 0:de.optionUrl)==null?void 0:Qe.menuSelect)==null?void 0:$e.join(","))&&(ve.value=at),ve})}else X.push({key:(Ae=de==null?void 0:de.optionUrl)==null?void 0:Ae.menuSelect,value:[{key:de==null?void 0:de.prop,groups:(vt=de==null?void 0:de.optionUrl)==null?void 0:vt.groupSelect,value:de==null?void 0:de.value}]})}))}),(X==null?void 0:X.length)>0&&(X=X==null?void 0:X.map(P=>{var de;let Te="";return(de=P==null?void 0:P.key)==null||de.forEach(Oe=>{var rt;if(!(Oe!=null&&Oe.includes("[")))Te=Te===""?Te+Oe:Te+"/"+Oe;else{let Pe="",nt=(rt=Oe==null?void 0:Oe.replaceAll("[","").replaceAll("]",""))==null?void 0:rt.split(":");v==null||v.forEach(Ae=>{var vt;(Ae==null?void 0:Ae.name)===(nt==null?void 0:nt[0])&&((vt=Ae==null?void 0:Ae.compData)==null||vt.forEach(at=>{var ve;(at==null?void 0:at.key)==="formContent"&&((ve=at==null?void 0:at.contents)==null||ve.forEach(Xe=>{(Xe==null?void 0:Xe.prop)===(nt==null?void 0:nt[1])&&(Pe=Xe==null?void 0:Xe.value)}))}))}),Te=Te+r.value+Pe}}),P.key=Te,P})),X==null||X.forEach(P=>{var rt,Pe,nt;let Te=(rt=Ge[P.key])==null?void 0:rt.find(Ae=>{var vt,at,ve,Xe,Qe,$e,_e;return((at=(vt=Ae==null?void 0:Ae.value)==null?void 0:vt.pageData)==null?void 0:at.name)===((Qe=(Xe=(ve=P==null?void 0:P.value)==null?void 0:ve[0])==null?void 0:Xe.groups)==null?void 0:Qe[0])&&((_e=($e=Ae==null?void 0:Ae.value)==null?void 0:$e.pageData)==null?void 0:_e.name)!==void 0}),de=Te==null?void 0:Te.id,Oe=(Pe=Te==null?void 0:Te.value)==null?void 0:Pe.pageData;Oe.compData=(nt=Oe.compData)==null?void 0:nt.map(Ae=>{var vt;return(Ae==null?void 0:Ae.key)==="formContent"&&(Ae.contents=(vt=Ae.contents)==null?void 0:vt.map(at=>{var Xe;let ve=(Xe=P.value)==null?void 0:Xe.find(Qe=>(Qe==null?void 0:Qe.key)===(at==null?void 0:at.prop));return ve&&(at.value=ve.value),at})),Ae}),K.push({id:de,value:{pageData:Oe}})})});let De=(Se=I.cloneDeep(E))==null?void 0:Se[0];(K==null?void 0:K.length)>0&&await ee.batchUpdateInsofDataApi({dataList:K})}w.setFreshContent(!0)}V.setImportLoading(!1)}catch{ee.ElMessage.error("方法执行错误,请查看方法!"),V.setImportLoading(!1)}B.value=!0},he=["createInsofDataApi"],et=ur(async q=>{ie(q)},100),lt=async q=>{var ae,Ee,S,Je,Ze;const O=I.cloneDeep(q);let ke,we=new WeakMap,Le=await ee.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ue.value});(Ee=(ae=Le.data.result)==null?void 0:ae.filter(Ve=>{var oe,Q;return((oe=Ve==null?void 0:Ve.key)==null?void 0:oe.pageKey)!=="menu"&&((Q=Ve==null?void 0:Ve.key)==null?void 0:Q.pageKey)!=="secret"}))==null||Ee.forEach(Ve=>{we[Ve.key.pageKey]?we[Ve.key.pageKey]=[...we[Ve.key.pageKey],Ve]:we[Ve.key.pageKey]=[Ve]}),q!=null&&q[0].path&&(ke=await(O==null?void 0:O.map(async(Ve,oe)=>{var j,Y,k,ne,ze,E,J,L,K,De,te,W,X,ce,be,me;const re=(j=we[Ve==null?void 0:Ve.path])==null?void 0:j.filter(ye=>{var P;return((P=ye==null?void 0:ye.key)==null?void 0:P.type)==="data"});let Se="";const Ge=await Me.getItemData(x.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,we);re==null||re.forEach(ye=>{var P,Te,de,Oe,rt;((Te=(P=ye==null?void 0:ye.value)==null?void 0:P.tableData)==null?void 0:Te.算法名称)===((de=O==null?void 0:O[oe])==null?void 0:de.method)&&(Se=(rt=(Oe=ye==null?void 0:ye.value)==null?void 0:Oe.tableData)==null?void 0:rt.算法体)});const st=await Me.getItemData(Ve==null?void 0:Ve.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,we);let v="",_=(ze=(ne=(k=(Y=st==null?void 0:st[0])==null?void 0:Y.compData)==null?void 0:k.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:ne.contents)==null?void 0:ze.findIndex(ye=>(ye==null?void 0:ye.prop)==="算法体");return(J=(E=st==null?void 0:st[0])==null?void 0:E.compData)==null||J.forEach(ye=>{var P;(ye==null?void 0:ye.key)==="tableContents"&&((P=ye==null?void 0:ye.contents)==null||P.forEach(Te=>{Te!=null&&Te.find(de=>de===(Ve==null?void 0:Ve.method))&&(v=Te[_])}))}),{buttonName:((L=O==null?void 0:O[oe])==null?void 0:L.method)||((te=(De=(K=re==null?void 0:re[0])==null?void 0:K.value)==null?void 0:De.tableData)==null?void 0:te.算法名称),api:(Se===""?(ce=(X=(W=re==null?void 0:re[0])==null?void 0:W.value)==null?void 0:X.tableData)==null?void 0:ce.算法体:Se)||v,content:Ge==null?void 0:Ge.filter(ye=>ye.comp!=="methodButton"),extraContent:(be=I.cloneDeep(Ve.value))==null?void 0:be.slice(1),methodName:(Ve==null?void 0:Ve.path)??"",extraValues:(me=O==null?void 0:O[oe])==null?void 0:me.data}})));const Fe=O==null?void 0:O.map(async Ve=>{var st,v,_,j,Y,k;const oe=(st=Le.data.result)==null?void 0:st.filter(ne=>{var ze,E,J;return((ze=ne==null?void 0:ne.key)==null?void 0:ze.parentTable)===""&&((E=ne==null?void 0:ne.key)==null?void 0:E.type)==="method"&&((J=ne==null?void 0:ne.key)==null?void 0:J.methodName)===ne.method}),Q=oe==null?void 0:oe[0],re=(v=Le.data.result)==null?void 0:v.filter(ne=>{var ze,E;return((ze=ne==null?void 0:ne.key)==null?void 0:ze.type)==="methodData"&&((E=ne==null?void 0:ne.key)==null?void 0:E.tableId)===(Q==null?void 0:Q.id)}),Se=await Me.getItemData(x.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,we),Ge=re==null?void 0:re[0];return{buttonName:(_=Q==null?void 0:Q.key)==null?void 0:_.methodKey,api:(Y=(j=Ge==null?void 0:Ge.value)==null?void 0:j.tableData)==null?void 0:Y[0],content:Se==null?void 0:Se.filter(ne=>ne.comp!=="methodButton"),extraContent:(k=I.cloneDeep(Ve.value))==null?void 0:k.slice(1),methodName:(Ve==null?void 0:Ve.method)??""}}),tt=(S=q==null?void 0:q[0])!=null&&S.path&&((Je=q==null?void 0:q[0])==null?void 0:Je.path)!==""?await Promise.all(ke):await Promise.all(Fe);l.value=tt==null?void 0:tt.filter(Ve=>Ve==null?void 0:Ve.extraContent),(Ze=l.value)==null||Ze.forEach(Ve=>{var oe;Ve.api===""&&((oe=Ve.content)==null||oe.forEach(Q=>{var re;Q.comp=="Table"&&w.setExtraContents(Me.methodTableToContent(Q.compData,(re=Ve.extraContent)==null?void 0:re[0]))}))})};return e.watch(()=>p.itemData,async()=>{M.value=="view"&&!B.value&&await lt(I.cloneDeep(p.itemData)),B.value=!1},{immediate:!0,deep:!0}),(q,O)=>{var ke,we,Le;return e.unref(M)!=="edit"?(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ke=l.value)==null?void 0:ke.filter(Fe=>(Fe==null?void 0:Fe.buttonName)!=="保存"),Fe=>{var tt;return e.openBlock(),e.createElementBlock("div",null,[Fe.api!==""?(e.openBlock(),e.createBlock(e.unref(Eo._sfc_main),{key:0,disabled:e.unref(U)===e.unref(x)&&!((tt=Fe==null?void 0:Fe.buttonName)!=null&&tt.includes("预览")),class:"calculator-content",modelValue:Fe.buttonName,onClickTrigger:ae=>e.unref(et)(Fe),loading:C.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(Ce)!==""&&((Le=e.unref(x))==null?void 0:Le[((we=e.unref(x))==null?void 0:we.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(Eo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:pe,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:y.value,onDestroy:Ue},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},ic=Pt._export_sfc(rc,[["__scopeId","data-v-11fca7e0"]]),lc={};function sc(n,l){return" 567 "}const cc=Pt._export_sfc(lc,[["render",sc]]),uc={class:"module content"},dc={class:"module data"},pc={class:"module layout"},fc={class:"form-content"},hc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=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}]),f=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:""}]),w=e.ref({}),C=e.ref([]),V=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:C.value},{key:"signConfig",contents:w.value}]}),F=H=>{var U;w.value=I.cloneDeep(H),r("change",(U=V())==null?void 0:U.compData)},G=H=>{var U,ue;if((H==null?void 0:H.buttonName)==="确认"){const x=I.cloneDeep(H==null?void 0:H.content);switch(u.value){case"create":C.value.push({...x,index:((U=C.value)==null?void 0:U.length)+1});break}r("change",(ue=V())==null?void 0:ue.compData),p.visible=!1}else p.visible=!1},M=(H,U)=>{var ue,x;switch(H){case"create":(ue=f.value)==null||ue.forEach(R=>{R.value=""}),u.value="create",p.visible=!0;break;case"update":(x=f.value)==null||x.forEach(R=>{R.value=U[R==null?void 0:R.prop]}),u.value="update",p.visible=!0;break;case"delete":C.value.splice(U,1),u.value="delete";break}},Ce=()=>{p.visible=!1};return e.watch(()=>c==null?void 0:c.itemContents,H=>{var U,ue;H&&(w.value=((U=H==null?void 0:H.find(x=>x.key==="signConfig"))==null?void 0:U.contents)??{},C.value=((ue=H==null?void 0:H.find(x=>x.key==="signTypeList"))==null?void 0:ue.contents)??[])},{immediate:!0}),(H,U)=>{const ue=e.resolveComponent("svg-icon"),x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",uc,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(x,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=R=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(ue,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(R,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.label),1),e.createElementVNode("div",null,[e.createVNode(x,{type:"primary",size:"small",onClick:A=>M("update",{...R,index:b+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(x,{type:"danger",size:"small",onClick:A=>M("delete",b)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",pc,[e.createVNode(Bt.ssForm,{rowContents:h.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:Ce,width:p.width},{default:e.withCtx(()=>[e.createElementVNode("div",fc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:G},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),vc=Pt._export_sfc(hc,[["__scopeId","data-v-487e0536"]]),gc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:l}){const c=n,r=l,p=e.ref(1),u=e.computed(()=>{var V,F;return(V=c==null?void 0:c.stepConfig)!=null&&V.allowTrigger?p.value:(F=c==null?void 0:c.stepConfig)==null?void 0:F.active}),y=(V,F)=>{p.value=F,r("clickStep",V,F)},h=V=>Bt.getComponent(V),f=()=>{var F;const V=(F=c==null?void 0:c.stepList)==null?void 0:F.find((G,M)=>M+1===u.value);return console.log("findStep",V),V?V==null?void 0:V.children:[]},w=V=>{r("clickTrigger",V)},C=V=>{r("changeTrigger",V)};return(V,F)=>{var Ce,H,U,ue,x;const G=e.resolveComponent("el-step"),M=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M,{direction:(Ce=n.stepConfig)==null?void 0:Ce.direction,active:u.value,"finish-status":"success",simple:(H=n.stepConfig)==null?void 0:H.simple,"align-center":((U=n.stepConfig)==null?void 0:U.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,(R,b)=>(e.openBlock(),e.createBlock(G,{key:b,class:"step-item",onClick:A=>y(R,b+1)},{title:e.withCtx(()=>[e.renderSlot(V.$slots,"title",{title:R==null?void 0:R.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(V.$slots,"description",{description:R==null?void 0:R.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(ue=n.stepConfig)!=null&&ue.allowTrigger&&((x=n.stepConfig)!=null&&x.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(R,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h(R==null?void 0:R.type)),{modelValue:R.value,"onUpdate:modelValue":A=>R.value=A,onClickTrigger:w,onChangeTrigger:C,content:R==null?void 0:R.content},e.createSlots({_:2},[e.renderList(V.$slots,(A,B)=>({name:B,fn:e.withCtx(pe=>[e.renderSlot(V.$slots,B,e.mergeProps({ref_for:!0},pe||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),mc=Pt._export_sfc(gc,[["__scopeId","data-v-d7c99969"]]),yc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:l}){const c=n,r=l,p=e.ref({}),u=e.ref([]),y=(h,f)=>{r("clickStep",h,f)};return e.watch(()=>c==null?void 0:c.itemData,h=>{var f,w;u.value=(f=h==null?void 0:h.find(C=>(C==null?void 0:C.key)==="stepList"))==null?void 0:f.contents,p.value=(w=h==null?void 0:h.find(C=>(C==null?void 0:C.key)==="stepConfig"))==null?void 0:w.contents},{immediate:!0,deep:!0}),(h,f)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(mc,{stepConfig:p.value,stepList:u.value,onClickStep:y},{icon:e.withCtx(()=>[e.createVNode(w,{name:"import"})]),title:e.withCtx(({title:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),description:e.withCtx(({description:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),_:1},8,["stepConfig","stepList"])}}}),bc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(l,c)=>{const r=e.resolveComponent("el-timeline-item"),p=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(p,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,y)=>(e.openBlock(),e.createBlock(r,{key:y,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),kc=Pt._export_sfc(bc,[["__scopeId","data-v-4172a886"]]),xc={class:"line-content"},wc={class:"line-time"},Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const l=n,c=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,p=>{var u,y;r.value=(u=p==null?void 0:p.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:u.contents,c.value=(y=p==null?void 0:p.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:y.contents},{immediate:!0}),(p,u)=>(e.openBlock(),e.createBlock(kc,{activities:r.value,timeLineConfig:c.value},{content:e.withCtx(({content:y,timestamp:h})=>[e.createElementVNode("span",xc,e.toDisplayString(y),1),e.createElementVNode("span",wc,e.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),Dc=Pt._export_sfc(Cc,[["__scopeId","data-v-b4d9deed"]]),_c={class:"tabs-content"},Ec={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const l=n,c=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,r=>{const p=r.find(u=>(u==null?void 0:u.key)=="stepList");p?c.value=p.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):c.value=l==null?void 0:l.tabsData},{immediate:!0,deep:!0}),(r,p)=>(e.openBlock(),e.createElementBlock("div",_c,[e.createVNode(Bt.ssTab,{tabsContents:c.value},null,8,["tabsContents"])]))}},Sc=Pt._export_sfc(Ec,[["__scopeId","data-v-40865f68"]]),qn=ee.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Tc={class:"type-select"},Ic=["onClick"],Bc={class:"list-icon"},Nc={__name:"modelSelect",setup(n){const l=qn(ee.pinia),{itemData:c}=ee.storeToRefs(l),r=p=>{const u=I.cloneDeep(c.value);u.push({comp:p.comp,name:p.name,compData:[]}),l.setItemData(u)};return(p,u)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Jr),(h,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:w=>r(h)},[e.createElementVNode("div",Bc,[e.createVNode(y,{name:h.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(h.name),1)],8,Ic)]))),128))])}}},Ac=Pt._export_sfc(Nc,[["__scopeId","data-v-91799bf8"]]),Vc={class:"fill-content"},Oc={class:"operate-content"},Mc={class:"collapse-title-content"},zc={class:"collapse-title-item"},Fc={key:1},Rc=["onClick"],Lc={class:"icon-content"},Pc={key:0,class:"edit-content"},$c=["onClick"],jc={class:"comp-child"},Uc={__name:"modelFill",setup(n){const l=qn(ee.pinia),{itemData:c,originalData:r}=ee.storeToRefs(l),p=e.ref([]);e.ref([]);const u=e.ref([]),y=e.ref([]),h=G=>{var Ce;let M=(Ce=I.cloneDeep(y.value))==null?void 0:Ce.map((H,U)=>(G===U&&(H.content=!0),H));y.value=M},f=G=>{var Ce;let M=(Ce=I.cloneDeep(y.value))==null?void 0:Ce.map((H,U)=>(G===U&&(H.content=!1),H));y.value=M,p.value=I.cloneDeep(c.value)},w=(G,M)=>{var ue;let Ce=(ue=I.cloneDeep(y.value))==null?void 0:ue.map((x,R)=>(G===R&&(x.content=!1),x));y.value=Ce;const H=I.cloneDeep(c.value),U=H==null?void 0:H.filter((x,R)=>(R===G&&(x.name=M),x));l.setOriginalData(U),l.setItemData(U)};e.watch(()=>c.value,()=>{var G,M,Ce;!c.value||((G=c.value)==null?void 0:G.length)===0?p.value=[]:p.value=(M=I.cloneDeep(c.value))==null?void 0:M.filter(H=>(H==null?void 0:H.comp)!=="methodButton"),u.value=p.value,y.value=(Ce=I.cloneDeep(u.value))==null?void 0:Ce.map((H,U)=>({id:U,content:!1}))},{deep:!0,immediate:!0});const C=G=>tn(G),V=(G,M,Ce)=>{var U,ue;if(!G)return;let H=I.cloneDeep(c.value);H=(U=H==null?void 0:H.map((x,R)=>(R===Ce&&(x.compData=G),x)))==null?void 0:U.filter(x=>(x==null?void 0:x.comp)!=="methodButton"),y.value=(ue=I.cloneDeep(H))==null?void 0:ue.map((x,R)=>({id:R,content:!1})),l.setOriginalData(H),l.setItemData(H)},F=G=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const M=I.cloneDeep(c.value),Ce=M==null?void 0:M.filter((H,U)=>U!==G);l.setOriginalData(Ce),l.setItemData(Ce),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(G,M)=>{const Ce=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Vc,[M[1]||(M[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Oc,[e.createVNode(cr.default,{class:"collapse-content",collapseContents:p.value},{title:e.withCtx(({item:H,index:U})=>{var ue,x,R,b,A,B,pe,Ue,pt,Ne;return[e.createElementVNode("div",Mc,[e.createElementVNode("div",zc,[(x=(ue=y.value)==null?void 0:ue.find(Ke=>Ke.id===U))!=null&&x.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:H.name&&H.name!==""?"8px":"0px"})},e.toDisplayString(H.name),5)),(b=(R=y.value)==null?void 0:R.find(Ke=>Ke.id===U))!=null&&b.content?(e.openBlock(),e.createElementBlock("div",Fc,[e.createVNode(Bt._sfc_main$2,{modelValue:H.name,"onUpdate:modelValue":Ke=>H.name=Ke,onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(B=(A=y.value)==null?void 0:A.find(Ke=>Ke.id===U))!=null&&B.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ke=>h(U),["stop"]),class:"icon-content"},[e.createVNode(Ce,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Rc))]),e.createElementVNode("div",Lc,[(Ue=(pe=y.value)==null?void 0:pe.find(Ke=>Ke.id===U))!=null&&Ue.content?(e.openBlock(),e.createElementBlock("div",Pc,[e.createVNode(Ce,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ke=>f(U),["stop"])},null,8,["onClick"]),e.createVNode(Ce,{name:"Save",onClick:e.withModifiers(Ke=>w(U,H.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ne=(pt=y.value)==null?void 0:pt.find(Ke=>Ke.id===U))!=null&&Ne.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ke=>F(U),["stop"]),class:"icon-content"},[e.createVNode(Ce,{name:"Delete",style:{width:"16px",height:"16px"}})],8,$c))])])]}),content:e.withCtx(({item:H,index:U})=>{var ue,x;return[e.createElementVNode("div",jc,[e.createTextVNode(e.toDisplayString(C(H.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C(H.comp+"Operate")),{itemContents:H==null?void 0:H.compData,originalItemContents:(x=(ue=u.value)==null?void 0:ue.find((R,b)=>b===U))==null?void 0:x.compData,onChange:R=>V(R,H,U)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Kc=Pt._export_sfc(Uc,[["__scopeId","data-v-a46a44b9"]]),Wc={key:0,class:"show-content"},Hc={style:{display:"flex"}},qc={__name:"modelShow",setup(n){const l=qn(ee.pinia),{itemData:c}=ee.storeToRefs(l),r=e.ref([]);e.watch(()=>c.value,()=>{var u;!c.value||((u=c.value)==null?void 0:u.length)===0?r.value=[]:r.value=I.cloneDeep(c.value)},{deep:!0,immediate:!0});const p=u=>tn(u);return(u,y)=>{var h;return((h=r.value)==null?void 0:h.length)>0?(e.openBlock(),e.createElementBlock("div",Wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,w)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:w},[e.createElementVNode("div",Hc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:w},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},Gc=Pt._export_sfc(qc,[["__scopeId","data-v-3f3e863e"]]),Xc={class:"tabs-header"},Yc={class:"tabs-list"},Jc={class:"tab-name"},Zc={class:"tab-actions"},Qc=["onClick"],eu=["onClick"],tu=["onClick"],au={class:"model-operate"},nu={class:"model-select",style:{display:"unset"}},ou={class:"existing-components"},ru={class:"component-list"},iu=["onClick"],lu={class:"component-info"},su={class:"component-type"},cu={class:"component-name"},uu={class:"model-fill"},du={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=e.ref([]),u=e.ref(!1),y=e.ref(""),h=e.ref({title:""}),f=e.ref(-1),w=e.ref(!1),C=e.ref(-1),V=e.ref(new WeakMap),F=e.ref(null),G=qn(ee.pinia),{itemData:M}=ee.storeToRefs(G),Ce=()=>{y.value="新增标签页",h.value.title="",f.value=-1,u.value=!0},H=q=>{y.value="修改标签页",h.value.title=p.value[q].title,f.value=q,u.value=!0},U=q=>{const O=R(q);V.value.delete(O),p.value.splice(q,1),lt()},ue=()=>{if(h.value.title.trim()){if(f.value===-1){const q={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:x()};p.value.push(q)}else p.value[f.value].title=h.value.title,p.value[f.value].value=h.value.title,p.value[f.value].label=h.value.title;u.value=!1,lt()}},x=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,R=q=>{const O=p.value[q];return O.id||(O.id=x()),O.id},b=q=>{var we;C.value=q;const O=R(q);F.value=I.cloneDeep(M.value);let ke=V.value.get(O);!ke&&((we=p.value[q].children)==null?void 0:we.length)>0&&(ke=Ue(p.value[q].children)),ke?G.setItemData(I.cloneDeep(ke)):G.setItemData([]),w.value=!0},A=e.computed(()=>{const q=I.useModelComp(ee.pinia),O=ee.storeToRefs(q).itemData.value;return console.log("可用组件数据",O),!O||!Array.isArray(O)?[]:O.filter(ke=>{var we;if(ke.comp==="Tabs"&&C.value>=0){const Le=R(C.value);if((we=ke.compData)==null?void 0:we.some(tt=>{var ae;return tt.key==="stepList"&&((ae=tt.contents)==null?void 0:ae.some(Ee=>Ee.id===Le))}))return!1}return!0})}),B=q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[q]||q,pe=q=>{var O;try{const ke=I.cloneDeep(q);ke.id=Date.now()+Math.random(),ke.comp==="Tabs"&&((O=ke.compData)==null||O.forEach(Le=>{Le.key==="stepList"&&Le.contents&&Le.contents.forEach(Fe=>{Fe.id=x()})}));const we=I.cloneDeep(M.value);we.push(ke),G.setItemData(we)}catch(ke){console.error("添加组件失败:",ke)}},Ue=q=>q.map(O=>{var ke;switch(O.type){case"form":return{comp:"Form",name:O.value||"表单",compData:pt(O.content)};case"table":return{comp:"Table",name:O.value||"表格",compData:Ne(O.content)};default:return{comp:"Unknown",name:O.value||"",compData:((ke=O.content)==null?void 0:ke.originalData)||[]}}}),pt=q=>{if(!q)return[];const O=[];return q.rowContents&&O.push({key:"formContent",contents:q.rowContents}),q.buttonValue&&O.push({key:"formButton",contents:q.buttonValue}),typeof q.isEnableWrap<"u"&&O.push({key:"enableWrap",contents:q.isEnableWrap}),O},Ne=q=>[],Ke=()=>{if(C.value>=0&&C.value<p.value.length){const q=R(C.value);V.value.set(q,I.cloneDeep(M.value)),p.value[C.value].children=se(M.value),console.log("保存后的数据",se(M.value))}w.value=!1,C.value=-1,F.value=null,lt()},qe=()=>{F.value&&G.setItemData(I.cloneDeep(F.value)),w.value=!1,C.value=-1,F.value=null},z=()=>{w.value&&qe()},se=q=>{if(!Array.isArray(q))throw new Error("sourceData must be an array");return q.map((O,ke)=>{if(!O||typeof O!="object")return O;const{comp:we,name:Le,compData:Fe}=O;switch(we){case"Form":return{type:"form",content:ie(Fe||[]),value:"表单"};case"Table":return{type:"table",content:he(Fe||[]),value:"表格"};default:return{type:"xxx",content:et(Fe||[]),value:""}}})},ie=q=>{const O={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ke={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return q.forEach((we,Le)=>{if(!we||typeof we!="object"){console.warn(`Invalid config at index ${Le}:`,we);return}const{key:Fe,contents:tt}=we,ae=ke[Fe];if(!ae){console.warn(`Unknown Form config key: ${Fe}`);return}Fe==="enableWrap"?O[ae]=!!tt:O[ae]=Array.isArray(tt)?tt:[]}),O},he=q=>{const O={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ke={header:"columns",tableContents:"tableData"};return q.forEach((we,Le)=>{if(!we||typeof we!="object"){console.warn(`Invalid config at index ${Le}:`,we);return}const{key:Fe,contents:tt}=we,ae=ke[Fe];if(!ae){console.warn(`Unknown Table config key: ${Fe}`);return}O[ae]=Array.isArray(tt)?tt:[]}),O},et=q=>(console.log("Default conversion logic - to be implemented"),{originalData:q,processed:!1,componentType:"unknown"}),lt=()=>{const q=[{key:"stepList",contents:p.value}];r("change",q)};return e.watch(()=>c.itemContents,q=>{if(q&&q.length>0){const O=q.find(ke=>ke.key==="stepList");O&&O.contents&&(p.value=O.contents.map(ke=>({title:ke.title||"",value:ke.value||ke.title||"",label:ke.label||ke.title||"",children:ke.children||[],id:ke.id||x()})))}},{immediate:!0,deep:!0}),(q,O)=>{const ke=e.resolveComponent("svg-icon"),we=e.resolveComponent("el-input"),Le=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Xc,[O[6]||(O[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Ce},[e.createVNode(ke,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),O[5]||(O[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(tt,ae)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ae},[e.createElementVNode("span",Jc,e.toDisplayString(tt.title),1),e.createElementVNode("div",Zc,[e.createElementVNode("button",{onClick:Ee=>H(ae)},"修改标题",8,Qc),e.createElementVNode("button",{onClick:Ee=>b(ae)},"布局调整",8,eu),e.createElementVNode("button",{onClick:Ee=>U(ae)},"删除",8,tu)])]))),128))]),e.createVNode(Jt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":O[2]||(O[2]=tt=>u.value=tt),title:y.value,onBeforeDestroy:O[3]||(O[3]=tt=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:O[1]||(O[1]=tt=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:ue},"确定")]),default:e.withCtx(()=>[e.createVNode(Fe,{model:h.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Le,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(we,{modelValue:h.value.title,"onUpdate:modelValue":O[0]||(O[0]=tt=>h.value.title=tt),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Jt.ssDialog,{modelValue:w.value,"onUpdate:modelValue":O[4]||(O[4]=tt=>w.value=tt),title:"布局调整",fullScreen:"",onBeforeDestroy:z},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:qe},"取消"),e.createElementVNode("button",{onClick:Ke},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",au,[e.createElementVNode("div",nu,[e.createVNode(Ac),e.createElementVNode("div",ou,[O[8]||(O[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",ru,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,tt=>(e.openBlock(),e.createElementBlock("div",{key:tt.id,class:"component-item",onClick:ae=>pe(tt)},[e.createElementVNode("div",lu,[e.createElementVNode("span",su,e.toDisplayString(B(tt.comp)),1),e.createElementVNode("span",cu,e.toDisplayString(tt.name),1)]),O[7]||(O[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,iu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:q.innerWidth},[e.createVNode(Gc)])),e.createElementVNode("div",uu,[e.createVNode(Kc)])])]),_:1},8,["modelValue"])])}}},pu=Pt._export_sfc(du,[["__scopeId","data-v-9096ed0d"]]);function fu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function hu(n){return{type:"line",...n}}function vu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:[{type:"value"}],series:[]}}function gu(n){return{type:"bar",barWidth:"60%",...n}}function mu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function yu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const wa={line:{initBaseoptions:fu,initSeries:hu},bar:{initBaseoptions:vu,initSeries:gu},pie:{initBaseoptions:mu,initSeries:yu}},Ao=I.useMenuState(ee.pinia),br=(n,l)=>{var C;const c=[],r=[],{group:p,nameCol:u,valueCol:y}=l||{},h=n==null?void 0:n.find(V=>{const{name:F}=V;return F===p});if(!h)return{names:c,values:r};const f=(C=h==null?void 0:h.compData)==null?void 0:C.find(V=>{const{key:F}=V;return F==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(V=>{const F=V==null?void 0:V[0];let G=!1;ee.isObject(F)&&(F!=null&&F.id)&&(G=!0);let M=u,Ce=y;G&&(M=M+1,Ce=Ce+1);const H=V==null?void 0:V[M],U=V==null?void 0:V[Ce];c.push(H),r.push(U)}),{names:c,values:r}},bu=async n=>{const{menu:l,mainKey:c,detailGroup:r,detailNameCol:p,detailValueCol:u,isSelfDetail:y}=n||{};let h=null;const f=sessionStorage.getItem("systemKey");if(y&&Ao.activeMenuPath&&(h=await Me.getItemData(`${Ao.activeMenuPath}`,f,"")),!y){const w=l==null?void 0:l.join("/");h=await Me.getItemData(`${w}^${c}`,f,"")}return br(h,{group:r,nameCol:p,valueCol:u})},ku=async n=>{const{menu:l,group:c,nameCol:r,valueCol:p}=n||{},u=l==null?void 0:l.join("/"),y=sessionStorage.getItem("systemKey"),h=await Me.getItemData(u,y,"");return br(h,{group:c,nameCol:r,valueCol:p})},co=async(n,l)=>{const c={names:[],values:[]},{menu:r,group:p,nameCol:u,valueCol:y}=n||{};if(!r.length||!p)return c;const{mainKey:h,group:f,nameCol:w,valueCol:C,isSelfDetail:V}=l||{};return h&&f&&Bt.isNumber(w)&&Bt.isNumber(C)?await bu({menu:r,mainKey:h,detailGroup:f,detailNameCol:w,detailValueCol:C,isSelfDetail:V}):Bt.isNumber(u)&&Bt.isNumber(y)?await ku({menu:r,group:p,nameCol:u,valueCol:y}):c},xu=async({chartBaseConfig:n,chartDataConfig:l,chartDetailConfig:c})=>{const{type:r,title:p}=n||{},u=wa==null?void 0:wa[r];if(!u)return;const{initBaseoptions:y,initSeries:h}=u,f=y();f.title.text=p??"";const{names:w,values:C}=await co(l,c);if(!w||!C)return f;f.xAxis.data=w;const V=h({data:C});return f.series.push(V),f},wu=async({chartBaseConfig:n,chartDataConfig:l,chartDetailConfig:c})=>{const{type:r,title:p}=n||{},u=wa==null?void 0:wa[r];if(!u)return;const{initBaseoptions:y,initSeries:h}=u,f=y();f.title.text=p??"";const{names:w,values:C}=await co(l,c);if(!w||!C)return f;f.xAxis.data=w;const V=h({data:C});return f.series.push(V),f},Cu=async({chartBaseConfig:n,chartDataConfig:l,chartDetailConfig:c})=>{const{type:r,title:p}=n||{},u=wa==null?void 0:wa[r];if(!u)return;const{initBaseoptions:y,initSeries:h}=u,f=y();f.title.text=p??"";const{names:w,values:C}=await co(l,c);if(!w||!C)return f;const V=[];for(let G=0;G<w.length;G++){const M=w[G],Ce=C[G];V.push({name:M,value:Ce})}const F=h({data:V});return f.series.push(F),f},Du=async(n=[])=>{var y,h,f;const l=((y=n==null?void 0:n.find(w=>w.key==="chartBaseConfig"))==null?void 0:y.contents)??{},c=((h=n==null?void 0:n.find(w=>w.key==="chartDataConfig"))==null?void 0:h.contents)??{},r=((f=n==null?void 0:n.find(w=>w.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:p}=l;let u={};return p==="line"&&(u=await xu({chartBaseConfig:l,chartDataConfig:c,chartDetailConfig:r})),p==="bar"&&(u=await wu({chartBaseConfig:l,chartDataConfig:c,chartDetailConfig:r})),p==="pie"&&(u=await Cu({chartBaseConfig:l,chartDataConfig:c,chartDetailConfig:r})),u},_u=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const l=n,c=e.ref({});e.onMounted(async()=>{const p=l==null?void 0:l.itemData;c.value=await Du(p)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(p,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Bi.ssChart,{optionContents:c.value},null,8,["optionContents"])],4))}}),Eu=Pt._export_sfc(_u,[["__scopeId","data-v-d4c081e8"]]),Su={class:"chart-module layout"},Tu={class:"chart-module content"},Iu={class:"chart-module content"},Bu={class:"form-content"},Nu={class:"dialog-footer"},Au={class:"form-content"},Vu={class:"dialog-footer"},Ou={class:"form-content"},Mu={class:"dialog-footer"},zu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l,p=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),y=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],h=e.ref({}),f=()=>{var oe;u.value=y(),(oe=u.value)==null||oe.forEach(Q=>{var Se;const re=Q==null?void 0:Q.prop;Q.value=(Se=h==null?void 0:h.value)==null?void 0:Se[re]}),p.visible=!0},w=oe=>{h.value=oe},C=()=>{var oe;p.visible=!1,r("change",(oe=Ze())==null?void 0:oe.compData)},V=e.reactive({visible:!1,width:"840",title:"数据配置"}),F=e.ref([]),G=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],M=e.ref({}),Ce=()=>{const oe=F.value,Q=I.cloneDeep(oe);return Q==null||Q.forEach(re=>{var Ge;const Se=re==null?void 0:re.prop;re.value=(Ge=M.value)==null?void 0:Ge[Se]}),Q},H=oe=>{var re;M.value=oe;const Q=Ce();F.value=Q,r("change",(re=Ze())==null?void 0:re.compData)},U=async()=>{const oe=await Me.getMenusContent(),Q=Ce();Q==null||Q.forEach(re=>{(re==null?void 0:re.prop)==="menu"&&(re.contents=oe)}),F.value=Q,V.visible=!0,await tt(M.value.menu),await S(M.value.group)},ue=e.reactive({visible:!1,width:"840",title:"详情页配置"}),x=e.ref([]),R=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],b=e.ref({}),A=()=>{const oe=x.value,Q=I.cloneDeep(oe);return Q==null||Q.forEach(re=>{var Ge;const Se=re==null?void 0:re.prop;re.value=(Ge=b.value)==null?void 0:Ge[Se]}),Q},B=oe=>{var re;b.value=oe;const Q=A();x.value=Q,r("change",(re=Ze())==null?void 0:re.compData)},pe=async()=>{await z();const oe=I.cloneDeep(Ue.value),Q=A();Q==null||Q.forEach(re=>{var Ge;const Se=re==null?void 0:re.prop;re.value=(Ge=b==null?void 0:b.value)==null?void 0:Ge[Se],Se==="mainKey"&&(re.contents=oe)}),x.value=Q,ue.visible=!0},Ue=e.ref([]),pt=e.ref([]),Ne=e.ref({}),Ke=e.ref({}),qe=()=>{const{compData:oe}=we.value||{},Q=oe==null?void 0:oe.find(j=>{const{key:Y}=j;return Y==="header"}),re=(Q==null?void 0:Q.contents)||[],Se=re==null?void 0:re.filter((j,Y)=>{const{label:k}=j;return k!=="操作"}),Ge=Se==null?void 0:Se.findIndex((j,Y)=>{const{isMainKey:k}=j;return k});if(Ge<0)return[];const st=oe==null?void 0:oe.find(j=>{const{key:Y}=j;return Y==="tableContents"}),v=(st==null?void 0:st.contents)||[];return v==null?void 0:v.map(j=>{const Y=j==null?void 0:j[0];let k=Ge;ee.isObject(Y)&&(Y!=null&&Y.id)&&(k=k+1);const ne=j==null?void 0:j[k];return{label:ne,value:ne}})},z=async()=>{const oe=await qe();Ue.value=oe},se=async oe=>{const Q=sessionStorage.getItem("systemKey");return await Me.getItemData(oe,Q,"")},ie=async oe=>{const Q=oe;pt.value=Q==null?void 0:Q.map(re=>{const{name:Se}=re;return Ne.value[Se]=re,{label:Se,value:Se}})},he=oe=>{const{comp:Q,compData:re}=Ke.value||{};if(Q==="Table"){let Se=A();Se=Se.filter(Ge=>{const{prop:st}=Ge;return st!=="formItems"}),ae(Se,re),x.value=Se}},et=async()=>{var re,Se;const oe=(re=b==null?void 0:b.value)==null?void 0:re.mainKey,Q=(Se=M==null?void 0:M.value)==null?void 0:Se.menu;if(oe){const st=`${Q==null?void 0:Q.join("/")}^${oe}`,v=await se(st);await ie(v);const _=A();_==null||_.forEach(j=>{(j==null?void 0:j.prop)==="group"&&(j.contents=pt.value)}),x.value=_}};e.watch(()=>{var oe;return(oe=b==null?void 0:b.value)==null?void 0:oe.mainKey},async(oe,Q)=>{oe!=Q&&oe&&await et()});const lt=async oe=>{const Q=Ne.value[oe];Ke.value=Q,await he()};e.watch(()=>{var oe;return(oe=b==null?void 0:b.value)==null?void 0:oe.group},async(oe,Q)=>{oe!=Q&&oe&<(oe)});const q=async()=>{var Q;await et();const oe=(Q=b.value)==null?void 0:Q.group;await lt(oe)},O=e.ref([]),ke=e.ref({}),we=e.ref({}),Le=async oe=>{const Q=oe==null?void 0:oe.join("/"),re=sessionStorage.getItem("systemKey");return await Me.getItemData(Q,re,"")},Fe=async oe=>{const Q=await Le(oe);O.value=Q==null?void 0:Q.map(re=>{const{name:Se}=re;return ke.value[Se]=re,{label:Se,value:Se}})},tt=async(oe,Q)=>{await Fe(oe);const re=Ce();re==null||re.forEach(Se=>{(Se==null?void 0:Se.prop)==="group"&&(Se.contents=O.value)}),F.value=re};e.watch(()=>{var oe;return(oe=M==null?void 0:M.value)==null?void 0:oe.menu},async(oe,Q)=>{const re=oe==null?void 0:oe.join("/"),Se=Q==null?void 0:Q.join("/");re!=Se&&await tt(oe)});const ae=(oe,Q)=>{const re=Q==null?void 0:Q.find(v=>{const{key:_}=v;return _==="header"}),Se=(re==null?void 0:re.contents)||[],Ge=Se==null?void 0:Se.filter((v,_)=>{const{label:j}=v;return j!=="操作"}),st=Ge==null?void 0:Ge.map((v,_)=>{const{label:j}=v;return{label:j,value:_}});oe==null||oe.forEach(v=>{const _=v==null?void 0:v.prop;(_==="nameCol"||_==="valueCol")&&(v.contents=st)})},Ee=oe=>{const{comp:Q,compData:re}=we.value||{};if(Q==="Table"){M.value.formItems=[];let Se=Ce();Se=Se.filter(Ge=>{const{prop:st}=Ge;return st!=="formItems"}),ae(Se,re),F.value=Se}},S=async oe=>{const Q=ke.value[oe];we.value=Q,await Ee()};e.watch(()=>{var oe;return(oe=M==null?void 0:M.value)==null?void 0:oe.group},async(oe,Q)=>{oe!=Q&&S(oe)});const Je=async()=>{var re,Se;const oe=(re=M.value)==null?void 0:re.menu;await tt(oe);const Q=(Se=M.value)==null?void 0:Se.group;await S(Q)},Ze=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:M.value},{key:"chartDetailConfig",contents:b.value}]}),Ve=()=>{p.visible=!1,V.visible=!1,ue.visible=!1};return e.onMounted(async()=>{var Q,re,Se;F.value=G(),x.value=R();const oe=c==null?void 0:c.itemContents;h.value=((Q=oe==null?void 0:oe.find(Ge=>Ge.key==="chartBaseConfig"))==null?void 0:Q.contents)??{},M.value=((re=oe==null?void 0:oe.find(Ge=>Ge.key==="chartDataConfig"))==null?void 0:re.contents)??{},await Je(),b.value=((Se=oe==null?void 0:oe.find(Ge=>Ge.key==="chartDetailConfig"))==null?void 0:Se.contents)??{},await q()}),(oe,Q)=>{const re=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Su,[Q[4]||(Q[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(re,{id:"themeButton",onClick:Q[0]||(Q[0]=Se=>f())},{default:e.withCtx(()=>Q[3]||(Q[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Tu,[Q[6]||(Q[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:Q[1]||(Q[1]=Se=>U())},{default:e.withCtx(()=>Q[5]||(Q[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Iu,[Q[8]||(Q[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(re,{id:"themeButton",onClick:Q[2]||(Q[2]=Se=>pe())},{default:e.withCtx(()=>Q[7]||(Q[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Jt.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:Ve,width:p.width},{default:e.withCtx(()=>[e.createElementVNode("div",Bu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Nu,[e.createVNode(re,{class:"cancel-button button",onClick:Ve,id:"themeBorderButton"},{default:e.withCtx(()=>Q[9]||(Q[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(re,{class:"ok-button button",onClick:C,id:"themeButton"},{default:e.withCtx(()=>Q[10]||(Q[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:V.visible,title:V.title,onBeforeDestroy:Ve,width:V.width},{default:e.withCtx(()=>[e.createElementVNode("div",Au,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:H},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Vu,[e.createVNode(re,{class:"cancel-button button",onClick:Ve,id:"themeBorderButton"},{default:e.withCtx(()=>Q[11]||(Q[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(re,{class:"ok-button button",onClick:Ve,id:"themeButton"},{default:e.withCtx(()=>Q[12]||(Q[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:ue.visible,title:ue.title,onBeforeDestroy:Ve,width:ue.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ou,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:B},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Mu,[e.createVNode(re,{class:"cancel-button button",onClick:Ve,id:"themeBorderButton"},{default:e.withCtx(()=>Q[13]||(Q[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(re,{class:"ok-button button",onClick:Ve,id:"themeButton"},{default:e.withCtx(()=>Q[14]||(Q[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Fu=Pt._export_sfc(zu,[["__scopeId","data-v-fe119645"]]),Ru=I.useLoginState(ee.pinia),{loginUserInfo:Zn}=ee.storeToRefs(Ru),Lu=async n=>{var p,u;let l=await sn.getPageDataApi({platId:parseInt((p=Zn==null?void 0:Zn.value)==null?void 0:p.plat_id),pageName:n}),c=(u=l==null?void 0:l.data)==null?void 0:u.result,r=[];return c==null||c.forEach(y=>{var w,C,V,F,G,M,Ce,H,U,ue,x,R,b,A,B;let h=(F=(V=(C=(w=y==null?void 0:y.contents)==null?void 0:w.find(pe=>{var Ue;return(Ue=pe==null?void 0:pe.key)==null?void 0:Ue.includes("struct")}))==null?void 0:C.value)==null?void 0:V[0])==null?void 0:F.类型,f={comp:h,isShow:!0,name:y==null?void 0:y.table_name,id:y==null?void 0:y.page_id};for(let pe in Object.values(y==null?void 0:y.name))parseInt(pe)>=1&&(f[`name${parseInt(pe)-1}`]=Object.values(y==null?void 0:y.name)[pe]);if(h==="Table"){let pe=(G=y==null?void 0:y.contents)==null?void 0:G.find(Ne=>{var Ke;return(Ke=Ne==null?void 0:Ne.key)==null?void 0:Ke.includes("content")}),Ue=[];Ue.push({key:"tableContents",contents:pe==null?void 0:pe.value});let pt=(ue=(U=(H=(Ce=(M=y==null?void 0:y.contents)==null?void 0:M.find(Ne=>{var Ke;return(Ke=Ne==null?void 0:Ne.key)==null?void 0:Ke.includes("struct")}))==null?void 0:Ce.value)==null?void 0:H[0])==null?void 0:U.结构)==null?void 0:ue.contents;Ue.push({key:"header",contents:pt}),f.compData=Ue}else if(h==="Form"){let pe=[],Ue=(B=(A=(b=(R=(x=y==null?void 0:y.contents)==null?void 0:x.find(pt=>{var Ne;return(Ne=pt==null?void 0:pt.key)==null?void 0:Ne.includes("struct")}))==null?void 0:R.value)==null?void 0:b[0])==null?void 0:A.结构)==null?void 0:B.contents;pe.push({key:"formContent",contents:Ue}),f.compData=pe}r.push(f)}),r};var Mn={exports:{}},Pu=Mn.exports,Vo;function $u(){return Vo||(Vo=1,function(n,l){(function(c,r){r()})(Pu,function(){function c(w,C){return typeof C>"u"?C={autoBom:!1}:typeof C!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),C={autoBom:!C}),C.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(w.type)?new Blob(["\uFEFF",w],{type:w.type}):w}function r(w,C,V){var F=new XMLHttpRequest;F.open("GET",w),F.responseType="blob",F.onload=function(){f(F.response,C,V)},F.onerror=function(){console.error("could not download file")},F.send()}function p(w){var C=new XMLHttpRequest;C.open("HEAD",w,!1);try{C.send()}catch{}return 200<=C.status&&299>=C.status}function u(w){try{w.dispatchEvent(new MouseEvent("click"))}catch{var C=document.createEvent("MouseEvents");C.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),w.dispatchEvent(C)}}var y=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Me.commonjsGlobal=="object"&&Me.commonjsGlobal.global===Me.commonjsGlobal?Me.commonjsGlobal:void 0,h=y.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=y.saveAs||(typeof window!="object"||window!==y?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(w,C,V){var F=y.URL||y.webkitURL,G=document.createElement("a");C=C||w.name||"download",G.download=C,G.rel="noopener",typeof w=="string"?(G.href=w,G.origin===location.origin?u(G):p(G.href)?r(w,C,V):u(G,G.target="_blank")):(G.href=F.createObjectURL(w),setTimeout(function(){F.revokeObjectURL(G.href)},4e4),setTimeout(function(){u(G)},0))}:"msSaveOrOpenBlob"in navigator?function(w,C,V){if(C=C||w.name||"download",typeof w!="string")navigator.msSaveOrOpenBlob(c(w,V),C);else if(p(w))r(w,C,V);else{var F=document.createElement("a");F.href=w,F.target="_blank",setTimeout(function(){u(F)})}}:function(w,C,V,F){if(F=F||open("","_blank"),F&&(F.document.title=F.document.body.innerText="downloading..."),typeof w=="string")return r(w,C,V);var G=w.type==="application/octet-stream",M=/constructor/i.test(y.HTMLElement)||y.safari,Ce=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ce||G&&M||h)&&typeof FileReader<"u"){var H=new FileReader;H.onloadend=function(){var x=H.result;x=Ce?x:x.replace(/^data:[^;]*;/,"data:attachment/file;"),F?F.location.href=x:location=x,F=null},H.readAsDataURL(w)}else{var U=y.URL||y.webkitURL,ue=U.createObjectURL(w);F?F.location=ue:location.href=ue,F=null,setTimeout(function(){U.revokeObjectURL(ue)},4e4)}});y.saveAs=f.saveAs=f,n.exports=f})}(Mn)),Mn.exports}$u();const Ln=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-2pT_YeoR.cjs")).then(n=>n.index));Ln.install=n=>{n.component("ssMenu",Ln)};const kr={__name:"index",props:{name:String},setup(n){const l=n,c=e.computed(()=>ee.ElIcons[l.name]);return e.onMounted(()=>{}),(r,p)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value)))]),_:1})}}},xr=(n,l,c=0)=>{let r=n;return r!=null&&r.every(p=>Array.isArray(p))&&(r!=null&&r.every(p=>Array.isArray(p)&&p.length===1)?r=r==null?void 0:r.filter(p=>(p==null?void 0:p[0])!==(l==null?void 0:l[c])):r=r==null?void 0:r.map(p=>{if(p!=null&&p.find(u=>u===(l==null?void 0:l[c]))&&(l==null?void 0:l.length)!==1){let u=I.cloneDeep(l),y=p==null?void 0:p.filter(C=>C!==(u==null?void 0:u[c])),h=c+1,f=xr(y,u,h),w=[];w.push(p==null?void 0:p[0]),f==null||f.forEach(C=>{w.push(C)}),p=w}return p})),r},uo=(n,l,c,r=0)=>{let p=n;return p!=null&&p.every(u=>Array.isArray(u))&&(p!=null&&p.every(u=>Array.isArray(u)&&u.length===1)?p.push([c]):p=p==null?void 0:p.map(u=>{if(u!=null&&u.find(y=>y===(l==null?void 0:l[r]))&&(l==null?void 0:l.length)!==1){let y=I.cloneDeep(l),h=u==null?void 0:u.filter(V=>V!==(y==null?void 0:y[r])),f=r+1,w=uo(h,y,c,f),C=[];C.push(u==null?void 0:u[0]),w==null||w.forEach(V=>{C.push(V)}),u=C}return u})),p},po=(n,l,c,r,p=0)=>{let u=n;return u!=null&&u.every(y=>Array.isArray(y))&&(u!=null&&u.every(y=>Array.isArray(y)&&y.length===1)?u=u==null?void 0:u.map(y=>((y==null?void 0:y[0])===c&&(y=[r]),y)):u=u==null?void 0:u.map(y=>{if(y!=null&&y.find(h=>h===(l==null?void 0:l[p]))&&(l==null?void 0:l.length)!==1){let h=I.cloneDeep(l),f=y==null?void 0:y.filter(F=>F!==(h==null?void 0:h[p])),w=p+1,C=po(f,h,c,r,w),V=[];V.push(y==null?void 0:y[0]),C==null||C.forEach(F=>{V.push(F)}),y=V}return y})),u};function wr(n="menu"){return{name:n,components:{SvgIcon:Ni.SvgIcon,ssMenu:Ln,DynamicIcon:kr,ssDialog:Jt.ssDialog,ssInput:Bt._sfc_main$2},setup(l,{emit:c}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),p=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=I.useMenuState(),y=I.useModelComp(ee.pinia),h=I.useLoginState(ee.pinia),{loginUserInfo:f}=ee.storeToRefs(h),w=e.ref(0),C=Ai.useRouter(),V=e.ref(),{asideMenus:F,menuTriggerType:G,platform:M}=ee.storeToRefs(u),{fixMenuStatus:Ce}=ee.storeToRefs(y),H=e.computed(()=>r==null?void 0:r.mode),U=ae=>ae==null?void 0:ae.map(S=>{var Je,Ze;return!(S!=null&&S.children)||((Je=S==null?void 0:S.children)==null?void 0:Je.length)===0?S.config=p.value:S!=null&&S.children&&((Ze=S==null?void 0:S.children)==null?void 0:Ze.length)>0&&(S.children=U(S.children)),S}),ue=e.computed(()=>{let ae=[...F.value];if((ae==null?void 0:ae.length)===0)return C.push("/"),[];const Ee=pe(ae,B.value);return Ee.isFlag||(ae=Ee==null?void 0:Ee.data),ae=ae==null?void 0:ae.map(S=>{var Je,Ze;return!(S!=null&&S.children)||((Je=S==null?void 0:S.children)==null?void 0:Je.length)===0?S.config=p.value:S!=null&&S.children&&((Ze=S==null?void 0:S.children)==null?void 0:Ze.length)>0&&(S.children=U(S.children)),S}),ae}),x=async(ae,Ee)=>{y.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(ae==null?void 0:ae.path),u.setActiveAsideMenu(ae),ae.isRouter?C.push(ae.path):C.push("/"),c("node-click",ae,Ee)},R=async ae=>{const Ee=Vi.findNodeByPropInTree(ue.value,"path",ae);u.setActiveAsideMenu(Ee),y.setRouteToChildPath(""),Ce.value?y.setFixMenuStatus(!1):(Fe.value&&(G.value="open"),G.value==="click"?w.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(ae):Fe.value||(u.setMenuTriggerType("click"),u.setActiveMenuPath(ae))),ae!=null&&ae.startsWith("/")?C.push(ae):C.push("/"),w.value++},b=ae=>{Fe.value||u.setActiveMenuPath(ae)},A=ae=>{const Ee=document.documentElement;ae==null||ae.forEach(S=>{Ee.style.setProperty(S.name,S.value)})};e.onMounted(()=>{w.value=1});const B=e.computed(()=>{const ae=sessionStorage.getItem("authority");return ae?JSON.parse(ae):[]});e.watch(()=>M.value,ae=>{ae==="browser"?A(vn.browserVerticalMenuClasses):ae==="client"?(A(vn.clientHorizontalMenuClasses),A(vn.clientVerticalMenuClasses)):ae==="three"&&(A(vn.threeHorizontalMenuClasses),A(vn.threeVerticalMenuClasses))},{immediate:!0});const pe=(ae,Ee)=>({isFlag:!0}),Ue=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),pt=ae=>tn(ae),Ne=e.ref({}),Ke=e.ref([]),qe=e.ref({}),z=e.ref({}),se=ae=>{switch(ae){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},ie=e.ref({}),he=ae=>{u.setCacheInputMenu({type:Ue.type,data:ae}),u.setIsRefreshMenus(!0)},et=async(ae,Ee,S)=>{var Je,Ze,Ve,oe,Q,re,Se,Ge,st,v,_,j,Y,k,ne,ze,E,J,L,K,De,te,W,X,ce,be,me,ye,P,Te,de,Oe,rt,Pe,nt,Ae,vt,at,ve,Xe,Qe,$e;if(Ee==="create"){let _e=(S==null?void 0:S.title)+"(1)",ft=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),le=(Ze=(Je=ft==null?void 0:ft.data)==null?void 0:Je.result)==null?void 0:Ze[0],Be=(Ve=le==null?void 0:le.value)==null?void 0:Ve.pageData;Be.compData=(oe=Be.compData)==null?void 0:oe.map(D=>{var fe;return(D==null?void 0:D.key)==="menuContents"&&(D.contents=uo(D.contents,(fe=S==null?void 0:S.path)==null?void 0:fe.split("/"),_e)),D}),await ee.updateInsofDataApi({id:le==null?void 0:le.id,value:{pageData:Be}});let Ie=(re=(Q=S==null?void 0:S.path)==null?void 0:Q.split("/"))==null?void 0:re.filter((D,fe)=>{var We,ge;return fe!==((ge=(We=S==null?void 0:S.path)==null?void 0:We.split("/"))==null?void 0:ge.length)-1}),Ye=await Me.getItemData((st=(Ge=(Se=S==null?void 0:S.path)==null?void 0:Se.split("/"))==null?void 0:Ge.filter((D,fe)=>{var We,ge;return fe!==((ge=(We=S==null?void 0:S.path)==null?void 0:We.split("/"))==null?void 0:ge.length)-1}))==null?void 0:st.join("/"),sessionStorage.getItem("systemKey"),"");if(Ie.push(_e),Ie=Ie==null?void 0:Ie.join("/"),(Ye==null?void 0:Ye.length)>0){let D=Ye==null?void 0:Ye[0],fe=(_=(v=D==null?void 0:D.compData)==null?void 0:v.find(We=>(We==null?void 0:We.key)==="header"))==null?void 0:_.contents;if(((j=fe==null?void 0:fe[0])==null?void 0:j.directiveLabel)==="#isMain"){let We=(Y=fe==null?void 0:fe[0])==null?void 0:Y.prop,ge=(ne=(k=D==null?void 0:D.compData)==null?void 0:k.find(ct=>(ct==null?void 0:ct.key)==="tableContents"))==null?void 0:ne.contents,dt;ge==null||ge.forEach(ct=>{var wt,ht;if(ct.length===1)((wt=ct==null?void 0:ct[0])==null?void 0:wt[We])===(S==null?void 0:S.title)&&(dt=ct==null?void 0:ct[0],dt[We]=_e);else{let ut=(ht=fe==null?void 0:fe.filter(It=>It!=="操作"))==null?void 0:ht.map(It=>It==null?void 0:It.prop),gt=ct==null?void 0:ct.filter(It=>!(It!=null&&It.id)),Ct=Me.getValueToObjectValue(gt,ut);Ct[We]=_e,dt=Ct}}),await ee.createInsofDataApi({key:{type:"data",pageKey:(J=(E=(ze=S==null?void 0:S.path)==null?void 0:ze.split("/"))==null?void 0:E.filter((ct,wt)=>{var ht,ut;return wt!==((ut=(ht=S==null?void 0:S.path)==null?void 0:ht.split("/"))==null?void 0:ut.length)-1}))==null?void 0:J.join("/"),tableId:D==null?void 0:D.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(L=f.value)==null?void 0:L.id,createUserLayer:((K=f.value)==null?void 0:K.dept)||((De=f.value)==null?void 0:De.部门名称)},value:{tableData:dt}})}}await Me.newLoadingConstruct(S==null?void 0:S.path,Ie),u.setUpdateMenuStatus(!1),await sn.verifyStructureDataToStore(),u.setActiveMenuPath((X=(W=(te=S==null?void 0:S.path)==null?void 0:te.split("/"))==null?void 0:W.filter((D,fe)=>{var We,ge;return fe!==((ge=(We=S==null?void 0:S.path)==null?void 0:We.split("/"))==null?void 0:ge.length)-1}))==null?void 0:X.join("/")),u.setActiveTopMenuPath((be=(ce=S==null?void 0:S.path)==null?void 0:ce.split("/"))==null?void 0:be[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(Ee==="update")V.value=S;else if(Ee==="delete"){let _e=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:S==null?void 0:S.path}}),ft=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),le=(ye=(me=ft==null?void 0:ft.data)==null?void 0:me.result)==null?void 0:ye[0],Be=(P=le==null?void 0:le.value)==null?void 0:P.pageData;if(Be.compData=(Te=Be.compData)==null?void 0:Te.map(D=>{var fe;return(D==null?void 0:D.key)==="menuContents"&&(D.contents=xr(D.contents,(fe=S==null?void 0:S.path)==null?void 0:fe.split("/"))),D}),await ee.updateInsofDataApi({id:le==null?void 0:le.id,value:{pageData:Be}}),((Oe=(de=_e==null?void 0:_e.data)==null?void 0:de.result)==null?void 0:Oe.length)>0){let D=(Pe=(rt=_e==null?void 0:_e.data)==null?void 0:rt.result)==null?void 0:Pe.map(fe=>fe==null?void 0:fe.id);(D==null?void 0:D.length)>0&&await ee.batchDeleteInsofDataApi({ids:D})}let Ie=await Me.getItemData((vt=(Ae=(nt=S==null?void 0:S.path)==null?void 0:nt.split("/"))==null?void 0:Ae.filter((D,fe)=>{var We,ge;return fe!==((ge=(We=S==null?void 0:S.path)==null?void 0:We.split("/"))==null?void 0:ge.length)-1}))==null?void 0:vt.join("/"),sessionStorage.getItem("systemKey"),""),Ye=[];(Ie==null?void 0:Ie.length)>0&&(Ie==null||Ie.forEach(D=>{var We,ge,dt,ct,wt,ht,ut,gt,Ct,It,Wt;let fe=(ct=(dt=(ge=(We=D==null?void 0:D.compData)==null?void 0:We.find(yt=>(yt==null?void 0:yt.key)==="header"))==null?void 0:ge.contents)==null?void 0:dt[0])==null?void 0:ct.prop;((gt=(ut=(ht=(wt=D==null?void 0:D.compData)==null?void 0:wt.find(yt=>(yt==null?void 0:yt.key)==="header"))==null?void 0:ht.contents)==null?void 0:ut[0])==null?void 0:gt.directiveLabel)==="#isMain"&&((Wt=(It=(Ct=D==null?void 0:D.compData)==null?void 0:Ct.find(yt=>(yt==null?void 0:yt.key)==="tableContents"))==null?void 0:It.contents)==null||Wt.forEach(yt=>{var Mt,$t,Ht;(yt==null?void 0:yt.length)>1?(yt==null?void 0:yt[1])===(S==null?void 0:S.title)&&Ye.push((Mt=yt==null?void 0:yt[0])==null?void 0:Mt.id):(($t=yt==null?void 0:yt[0])==null?void 0:$t[fe])===(S==null?void 0:S.title)&&Ye.push((Ht=yt==null?void 0:yt[0])==null?void 0:Ht.id)}))})),(Ye==null?void 0:Ye.length)>0&&await ee.batchDeleteInsofDataApi({ids:Ye}),u.setUpdateMenuStatus(!1),await sn.verifyStructureDataToStore(),u.setActiveMenuPath((Xe=(ve=(at=S==null?void 0:S.path)==null?void 0:at.split("/"))==null?void 0:ve.filter((D,fe)=>{var We,ge;return fe!==((ge=(We=S==null?void 0:S.path)==null?void 0:We.split("/"))==null?void 0:ge.length)-1}))==null?void 0:Xe.join("/")),u.setActiveTopMenuPath(($e=(Qe=S==null?void 0:S.path)==null?void 0:Qe.split("/"))==null?void 0:$e[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},lt=async(ae,Ee)=>{var Ge,st,v,_,j,Y,k,ne,ze,E,J,L,K,De,te,W,X,ce,be,me,ye,P,Te,de,Oe,rt,Pe,nt,Ae,vt,at;let S=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Je=(st=(Ge=S==null?void 0:S.data)==null?void 0:Ge.result)==null?void 0:st[0],Ze=(v=Je==null?void 0:Je.value)==null?void 0:v.pageData;Ze.compData=(_=Ze.compData)==null?void 0:_.map(ve=>{var Xe,Qe;return(ve==null?void 0:ve.key)==="menuContents"&&(ve.contents=po(ve.contents,(Xe=Ee==null?void 0:Ee.path)==null?void 0:Xe.split("/"),Ee==null?void 0:Ee.title,(Qe=ae==null?void 0:ae.target)==null?void 0:Qe.value)),ve}),Je!=null&&Je.id&&await ee.updateInsofDataApi({id:Je==null?void 0:Je.id,value:{pageData:Ze}});let Ve=(Y=(j=Ee==null?void 0:Ee.path)==null?void 0:j.split("/"))==null?void 0:Y.filter((ve,Xe)=>{var Qe,$e;return Xe!==(($e=(Qe=Ee==null?void 0:Ee.path)==null?void 0:Qe.split("/"))==null?void 0:$e.length)-1}),oe=Ve==null?void 0:Ve.join("/");Ve.push((k=ae==null?void 0:ae.target)==null?void 0:k.value),Ve=Ve==null?void 0:Ve.join("/");let Q=await Me.getItemData(oe,sessionStorage.getItem("systemKey"),"");if(((L=(J=(E=(ze=(ne=Q==null?void 0:Q[0])==null?void 0:ne.compData)==null?void 0:ze.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:E.contents)==null?void 0:J[0])==null?void 0:L.directiveLabel)==="#isMain"){let ve=(X=(W=(te=(De=(K=Q==null?void 0:Q[0])==null?void 0:K.compData)==null?void 0:De.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:te.contents)==null?void 0:W[0])==null?void 0:X.prop,Xe=(me=(be=(ce=Q==null?void 0:Q[0])==null?void 0:ce.compData)==null?void 0:be.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:me.contents,Qe=(de=(Te=(P=(ye=Q==null?void 0:Q[0])==null?void 0:ye.compData)==null?void 0:P.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:Te.contents)==null?void 0:de.map(_e=>_e==null?void 0:_e.prop),$e;if(Xe==null||Xe.forEach(_e=>{var le;let ft=Me.getValueToObjectValue(_e,Qe);(ft==null?void 0:ft[ve])===Ee.title&&($e=ft,$e[ve]=(le=ae==null?void 0:ae.target)==null?void 0:le.value)}),$e){let _e={};for(let le in $e)le!=="id"&&(_e[le]=$e==null?void 0:$e[le]);let ft=[{id:$e==null?void 0:$e.id,value:{tableData:_e}}];await ee.batchUpdateInsofDataApi({dataList:ft})}}let re=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:Ee==null?void 0:Ee.path}}),Se=(rt=(Oe=re==null?void 0:re.data)==null?void 0:Oe.result)==null?void 0:rt.map(ve=>({id:ve==null?void 0:ve.id,key:ve==null?void 0:ve.key}));Se=Se==null?void 0:Se.map(ve=>(ve.key.pageKey=Ve,ve)),(Se==null?void 0:Se.length)>0&&await ee.batchUpdateInsofDataApi({dataList:Se}),u.setUpdateMenuStatus(!1),await sn.verifyStructureDataToStore(),u.setActiveMenuPath((Ae=(nt=(Pe=Ee==null?void 0:Ee.path)==null?void 0:Pe.split("/"))==null?void 0:nt.filter((ve,Xe)=>{var Qe,$e;return Xe!==(($e=(Qe=Ee==null?void 0:Ee.path)==null?void 0:Qe.split("/"))==null?void 0:$e.length)-1}))==null?void 0:Ae.join("/")),u.setActiveTopMenuPath((at=(vt=Ee==null?void 0:Ee.path)==null?void 0:vt.split("/"))==null?void 0:at[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),V.value=void 0},q=async(ae,Ee)=>{Ue.type=se(Ee==null?void 0:Ee.operateType),await et(Ee,Ue.type,ae),z.value=ae,ie.value=Ee},O=()=>{Ue.show=!1},ke=ae=>ae==null?void 0:ae.filter(Ee=>Ee.allowInherit),we=()=>{var S,Je,Ze,Ve,oe;let ae;Ue.type==="create"&&(ae=((S=z.value)==null?void 0:S.path)+"/"+qe.value[(Je=qe.value)==null?void 0:Je.prop]),Ue.type==="update"&&(ae=(Ze=z.value)==null?void 0:Ze.path);const Ee={...z.value,config:ke((Ve=z.value)==null?void 0:Ve.config),children:[],childMenus:[],title:qe.value[(oe=qe.value)==null?void 0:oe.prop],path:ae};console.log("clickSubmitForm",ie.value,z.value,Ee),he(Ee),Ue.show=!1},Le=ae=>{var S,Je;const Ee=(S=ae==null?void 0:ae.contents)==null?void 0:S.find(Ze=>Ze.key==="formContent");Ee&&(qe.value=(Je=Ee==null?void 0:Ee.contents)==null?void 0:Je.reduce((Ze,Ve)=>(Ze[Ve.key]=Ve.value,Ze.prop=Ve.key,Ze),{}))},Fe=e.ref(!1);return{isCollapse:Fe,handleMenuCollapse:()=>{Fe.value=!Fe.value},handleCompChange:Le,dialogForm:Ne,dialogRenderComps:Ke,getComponents:pt,clickSubmitForm:we,dialogInfo:Ue,beforeDialogDestroy:O,clickMenuIcon:q,mode:H,renderMenuList:ue,clickMenu:x,openMenu:R,closeMenu:b,changeMenuStyle:A,fixElement:V,onBlur:lt}}}}e.defineComponent(wr());const Ya=I.useLoginState(),{loginUserInfo:Bn}=ee.storeToRefs(Ya),Kt=I.useModelComp(ee.pinia),Cr=e.ref(!1),{itemData:ju,itemGridData:Xa,curStructureCompIds:Oo,isSubmitCurStructure:Uu,isRefreshCurStructure:Ku,freshContent:Fp,routeToChildPath:Wu,payloadTypes:Rp,pageMapState:no,itemExtendData:Nn}=ee.storeToRefs(Kt),Yt=I.useMenuState(ee.pinia),{activeTopMenuPath:Hu,activeMenuPath:Lt,platform:Lp,activeAsideMenu:Pp,buttonTriggerType:qu,menus:$p}=ee.storeToRefs(Yt),Qa=Me.useUnit(ee.pinia),{selectTitle:Gu,chooseTitle:Xu}=ee.storeToRefs(Qa),Yu=Me.useOriginalState(ee.pinia),{originalPath:fo}=ee.storeToRefs(Yu),oo=e.ref();I.useAuthorityState(ee.pinia);const Pn=e.ref(!0),un=e.ref(0),ro=e.ref([]);e.ref(!1);const Ju=e.computed(async()=>{var l,c;const n=(l=Lt.value)!=null&&l.startsWith("/")?(c=Lt.value)==null?void 0:c.substring(1):Lt.value;return(n==null?void 0:n.includes(fo.value))||await ld(n)}),Zu=()=>{Kt.setItemGridData([]),Kt.setIsEdit("edit"),Kt.setSubmitCurStructure(Lt.value!=="/平台管理/菜单管理")},Qu=()=>{Kt.setIsEdit("view"),Kt.setRefreshCurStructure(!0)},ed=async n=>{const l=sessionStorage.getItem("systemKey"),c=await Me.getItemData(n,l,"");return c&&c.length>0},td=async n=>{var h,f,w;let l=Gu.value,c=l==null?void 0:l.findIndex(C=>(C==null?void 0:C.value)===(n==null?void 0:n.value)),r=(h=l==null?void 0:l.filter(C=>(C==null?void 0:C.condition)==="parent"))==null?void 0:h.map(C=>C==null?void 0:C.value),p=r==null?void 0:r[0],u=(w=(f=l==null?void 0:l.filter((C,V)=>!(C!=null&&C.condition)&&V<=c))==null?void 0:f.map(C=>C.value))==null?void 0:w.join("/");p?(u==null?void 0:u.length)>0?p=p+"/"+u:p=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(p=u,l=l==null?void 0:l.filter(C=>(C==null?void 0:C.condition)!=="child"),Qa.setSelectTitle(l),Qa.setChooseTitle([])),await ed(p)&&Yt.setActiveMenuPath(p)},Qn=async(n,l,c,r="contentConfig")=>{var p;try{if(!Array.isArray(n))return;let u,y;l==="create"?(u={dataList:n==null?void 0:n.map(f=>{var w;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:c!=null&&c.startsWith("/")?c==null?void 0:c.substring(1):c,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(w=f==null?void 0:f.compData)==null?void 0:w.filter(C=>(C==null?void 0:C.key)!=="tableContents")}}}})},y=ee.batchAddInsofDataApi):l==="update"?(u={dataList:n==null?void 0:n.map(f=>{var w;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(w=f==null?void 0:f.compData)==null?void 0:w.filter(C=>(C==null?void 0:C.key)!=="tableContents")}}}})},y=ee.batchUpdateInsofDataApi):l==="delete"&&(u={ids:n},y=ee.batchDeleteInsofDataApi);const h=await y(u);if(((p=h==null?void 0:h.data)==null?void 0:p.code)===200)return h.data.result;throw ee.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{ee.ElMessage.error("保存响应失败")}},Mo=async(n,l,c,r)=>{var p,u,y,h,f,w,C,V,F,G,M;try{const Ce=(u=(p=n==null?void 0:n.results)==null?void 0:p.filter(b=>!(b!=null&&b.id)||typeof(b==null?void 0:b.id)=="string"))==null?void 0:u.map(b=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:c},value:{tableData:b}})),H=(h=(y=n==null?void 0:n.results)==null?void 0:y.filter(b=>(b==null?void 0:b.id)&&typeof(b==null?void 0:b.id)=="number"))==null?void 0:h.map(b=>({id:b==null?void 0:b.id,value:{tableData:b}})),U=JSON.parse(I.cloneDeep(JSON.stringify(n))),ue=(f=U==null?void 0:U.results)==null?void 0:f.map(b=>b.id);let x;c?x=(V=(C=(w=no.value)==null?void 0:w[Lt.value])==null?void 0:C.filter(b=>{var A,B,pe;return((A=b==null?void 0:b.key)==null?void 0:A.type)===l&&((pe=(B=b==null?void 0:b.key)==null?void 0:B.relatedInfo)==null?void 0:pe.target)===r}))==null?void 0:V.map(b=>b==null?void 0:b.id):x=(M=(G=(F=no.value)==null?void 0:F[Lt.value])==null?void 0:G.filter(b=>{var A;return((A=b==null?void 0:b.key)==null?void 0:A.type)===l}))==null?void 0:M.map(b=>b==null?void 0:b.id);const R=x==null?void 0:x.filter(b=>!(ue!=null&&ue.includes(b))&&typeof b=="number");(Ce==null?void 0:Ce.length)>0&&await ee.batchAddInsofDataApi({dataList:Ce}),(H==null?void 0:H.length)>0&&await ee.batchUpdateInsofDataApi({dataList:H}),(R==null?void 0:R.length)>0&&await ee.batchDeleteInsofDataApi({ids:R})}catch(Ce){throw new Error(Ce)}},ad=async n=>{var w,C,V,F,G,M,Ce,H,U,ue;Yt.setContentLoading(!0);const l=JSON.parse(I.cloneDeep(JSON.stringify(ju.value)));if(!Uu.value)return Yt.setCacheStructures({key:qu.value,data:l}),ee.ElMessage.success("已暂存");const c=l==null?void 0:l.map(x=>x.id),r=c.filter(x=>{var R;return!((R=Oo.value)!=null&&R.includes(x))}),p=(w=Oo.value)==null?void 0:w.filter(x=>!c.includes(x)),u=[...r,...p].filter(x=>typeof x!==null&&typeof x<"u"),y=l==null?void 0:l.filter(x=>!x.id),h=l==null?void 0:l.filter(x=>x.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(Qn(u,"delete",n)),y&&(y==null?void 0:y.length)>0&&f.push(Qn(y,"create",n)),h&&(h==null?void 0:h.length)>0&&f.push(Qn(h,"update",n)),Xa.value&&((C=Xa.value)!=null&&C.isDelete&&((F=(V=Xa.value)==null?void 0:V.results)==null?void 0:F.length)>0&&((M=(G=Xa.value)==null?void 0:G.results)!=null&&M.every(x=>typeof x=="number"))?await ee.batchDeleteInsofDataApi({ids:(Ce=Xa.value)==null?void 0:Ce.results}):(console.log("itemGridData.value",Xa.value),f.push(await Mo(Xa.value,"gridLayout")))),Nn.value)for(const x in Nn.value)f.push(await Mo((H=Nn.value)==null?void 0:H[x],"extend",{target:x,compId:(ue=(U=Nn.value)==null?void 0:U[x])==null?void 0:ue.compId},x));await Promise.all(f).then(()=>{ee.ElMessage.success("保存成功"),Kt.setRefreshCurStructure(!0)}).catch(x=>{ee.ElMessage.success(x)}),Yt.setContentLoading(!1)},$n=n=>tn(n),jt=e.ref([]),nd=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),Dr=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.filter(l=>!(l!=null&&l.affix)||(l==null?void 0:l.affix)==="default")}),od=async n=>{var r,p,u,y,h,f;let l=I.cloneDeep(Lt).value;l=l+fo.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const c=await ee.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l}});if(((u=(p=c==null?void 0:c.data)==null?void 0:p.result)==null?void 0:u.length)>0){const w=(h=(y=c==null?void 0:c.data)==null?void 0:y.result)==null?void 0:h.map(V=>V==null?void 0:V.id),C=await ee.batchDeleteInsofDataApi({ids:w});((f=C==null?void 0:C.data)==null?void 0:f.code)===200?(ee.ElMessage.success("删除成功"),await Ya.setLogRecordAsync({type:"删除",data:n},l)):ee.ElMessage.error("删除响应失败"),Kt.setTableLoading(!1)}},zo=async n=>{var l,c;try{let r=I.cloneDeep(Lt).value,p=[];if(Array.isArray(n)){n==null||n.forEach(y=>{var h;p.push(ee.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+fo.value+((h=Object.values(y==null?void 0:y.singleContent))==null?void 0:h[0])}}))});const u=await Promise.all(p);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(y=>{var h;return((h=y==null?void 0:y.data)==null?void 0:h.code)===200}))){const y=Array.from(new Set((l=u==null?void 0:u.flatMap(f=>{var w;return(w=f==null?void 0:f.data)==null?void 0:w.result}))==null?void 0:l.map(f=>f==null?void 0:f.id))),h=await ee.batchDeleteInsofDataApi({ids:y});((c=h==null?void 0:h.data)==null?void 0:c.code)===200?(ee.ElMessage.success("删除成功"),await Ya.setLogRecordAsync({type:"删除",data:n},r)):ee.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await od(n)}catch{ee.ElMessage.error("删除数据时处理失败")}finally{Kt.setTableLoading(!1)}},rd=async n=>{var l,c;try{if(!n||!(n!=null&&n.data))return;const{id:r,...p}=I.cloneDeep(n==null?void 0:n.data),u=await ee.createInsofDataApi({key:{type:"data",pageKey:Lt.value,tableId:(l=n==null?void 0:n.to)==null?void 0:l.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:p}});if(!((c=n==null?void 0:n.data)!=null&&c.id))return;const y=await Promise.all([u]);(y==null?void 0:y.every(f=>{var w;return((w=f==null?void 0:f.data)==null?void 0:w.code)===200}))?ee.ElMessage.success("迁移成功"):ee.ElMessage.error("迁移响应失败")}catch(r){throw ee.ElMessage.error(r),new Error(r)}},_r=e.ref(0),bn=e.ref(null),jn=async(n,l="data",c)=>{var p,u,y,h,f,w,C,V,F,G,M,Ce,H,U,ue,x,R,b,A,B,pe,Ue,pt,Ne,Ke,qe,z,se,ie,he,et,lt,q,O,ke,we,Le,Fe,tt,ae,Ee,S,Je,Ze,Ve,oe,Q,re,Se,Ge,st,v,_,j,Y,k,ne,ze,E,J,L,K,De,te,W,X,ce,be,me,ye,P,Te,de,Oe,rt,Pe,nt,Ae,vt,at;bn.value=null;let r=Lt.value;if((p=oo.value)!=null&&p.compData&&((u=oo.value)==null?void 0:u.compData)!==Lt.value&&(r=r+"/"+((h=(y=Xu.value)==null?void 0:y[0])==null?void 0:h.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await zo(n):await Me.deleteTableContents((w=n==null?void 0:n.singleContent)==null?void 0:w.id,n),await Ya.setLogRecordAsync({type:"删除",data:n},Lt.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((C=n==null?void 0:n.selectItems)!=null&&C.every(ve=>typeof(ve==null?void 0:ve.id)=="string")){const ve=(V=n==null?void 0:n.selectItems)==null?void 0:V.map(Xe=>({content:n==null?void 0:n.content,singleContent:Xe,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await zo(ve)}else{const ve=(F=n==null?void 0:n.selectItems)==null?void 0:F.map(Xe=>Xe==null?void 0:Xe.id);await ee.batchDeleteInsofDataApi({ids:ve}),await Ya.setLogRecordAsync({type:"删除",data:ve},Lt.value)}else if((n==null?void 0:n.buttonName)==="OCR批量新增"){if(Array.isArray(n==null?void 0:n.ocrRows)&&((G=n==null?void 0:n.ocrRows)==null?void 0:G.length)>0){Kt.setTableLoading(n==null?void 0:n.index);const ve=sessionStorage.getItem("systemKey"),Xe=[],Qe=[];let $e=r,_e=n==null?void 0:n.index;if(n!=null&&n.parentTableId&&(n==null?void 0:n.parentTableId)!==0){const ft=await ee.getInsofDataApi({id:n==null?void 0:n.parentTableId}),le=(Ce=(M=ft==null?void 0:ft.data)==null?void 0:M.result)==null?void 0:Ce[0];(H=le==null?void 0:le.key)!=null&&H.pageKey&&($e=le.key.pageKey),_e=n==null?void 0:n.parentTableId}for(const ft of n.ocrRows){const le={};for(const Be in ft)Be!=="id"&&Be!=="index"&&!(typeof Be=="string"&&Be.startsWith("_"))&&(le[Be]=ft[Be]);try{const Be=await ee.createInsofDataApi({key:{type:l,pageKey:$e,tableId:_e,systemKey:ve},value:{tableData:le}});if(((U=Be==null?void 0:Be.data)==null?void 0:U.code)===200){const Ie=(ue=Be==null?void 0:Be.data)==null?void 0:ue.result;Xe.push({resId:Ie,compId:n==null?void 0:n.index,data:ft}),Qe.push(Ie)}}catch(Be){console.error("OCR数据保存失败:",Be)}}bn.value=Xe,sessionStorage.setItem("ocr_last_saved_ids",JSON.stringify(Qe)),sessionStorage.setItem("ocr_last_saved_table",JSON.stringify({pageKey:$e,tableId:_e,parentTableId:n==null?void 0:n.parentTableId,compIndex:n==null?void 0:n.index})),Qe.length>0?ee.ElMessage.success(`成功保存 ${Qe.length} 条OCR识别数据`):ee.ElMessage.warning("OCR数据保存失败,请重试"),await Ya.setLogRecordAsync({type:"新增",data:n==null?void 0:n.ocrRows},Lt.value)}Kt.setCacheUpdatingData(null),Kt.setTableLoading(!1),Kt.setRefreshCurStructure(!0);return}else if((n==null?void 0:n.buttonName)==="新增"){let ve={};for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(ve[Qe]=n==null?void 0:n.singleContent[Qe]);const Xe=await Me.addTableContents(l,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(ve),n==null?void 0:n.column,n,{param:c});if(bn.value={resId:Xe,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((R=(x=n==null?void 0:n.column)==null?void 0:x[0])==null?void 0:R.directiveLabel)==="#isMain"&&((A=(b=n==null?void 0:n.column)==null?void 0:b[0])==null?void 0:A.directiveColor)!==!0){let Qe=(Ue=n==null?void 0:n.singleContent)==null?void 0:Ue[(pe=(B=n==null?void 0:n.column)==null?void 0:B[0])==null?void 0:pe.prop],$e=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),_e=Lt.value+"/"+(Qe==null?void 0:Qe.slice(0,(Qe==null?void 0:Qe.length)-3)),ft=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:_e}}),le=(Ne=(pt=$e==null?void 0:$e.data)==null?void 0:pt.result)==null?void 0:Ne[0],Be=(Ke=le==null?void 0:le.value)==null?void 0:Ke.pageData;if(Be.compData=(qe=Be.compData)==null?void 0:qe.map(Ie=>((Ie==null?void 0:Ie.key)==="menuContents"&&(Ie.contents=uo(Ie.contents,_e==null?void 0:_e.split("/"),Qe)),Ie)),await ee.updateInsofDataApi({id:le==null?void 0:le.id,value:{pageData:Be}}),((se=(z=ft==null?void 0:ft.data)==null?void 0:z.result)==null?void 0:se.length)>0)await Me.newLoadingConstruct(_e,Lt.value+"/"+Qe);else{let Ie=await ee.getInsofDataApi({key:{pageKey:Lt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((he=(ie=Ie==null?void 0:Ie.data)==null?void 0:ie.result)==null?void 0:he.length)>=1?await Me.newLoadingCutFirstConstruct(Lt.value+"/",Lt.value+"/"+Qe):await Me.newLoadingCutFirstConstruct(Lt.value,Lt.value+"/"+Qe)}Yt.setUpdateMenuStatus(!1),await sn.verifyStructureDataToStore(),Yt.setIsRefreshMenus(!1),Yt.setIsRefreshMenus(!0),Yt.setActiveMenuPath((lt=(et=_e==null?void 0:_e.split("/"))==null?void 0:et.filter((Ie,Ye)=>{var D;return Ye!==((D=_e==null?void 0:_e.split("/"))==null?void 0:D.length)-1}))==null?void 0:lt.join("/"))}Kt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((O=(q=n==null?void 0:n.column)==null?void 0:q[0])==null?void 0:O.directiveLabel)==="#isMain"&&((we=(ke=n==null?void 0:n.column)==null?void 0:ke[0])==null?void 0:we.directiveColor)!==!0){let ve=(tt=n==null?void 0:n.singleContent)==null?void 0:tt[(Fe=(Le=n==null?void 0:n.column)==null?void 0:Le[0])==null?void 0:Fe.prop];if(Bt.isNumber((ae=n==null?void 0:n.singleContent)==null?void 0:ae.id)){let Xe=await ee.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Qe=await ee.getInsofDataApi({id:(Ee=n==null?void 0:n.singleContent)==null?void 0:Ee.id}),$e=(re=(Ve=(Ze=(Je=(S=Qe==null?void 0:Qe.data)==null?void 0:S.result)==null?void 0:Je[0])==null?void 0:Ze.value)==null?void 0:Ve.tableData)==null?void 0:re[(Q=(oe=n==null?void 0:n.column)==null?void 0:oe[0])==null?void 0:Q.prop],_e=Lt.value+"/"+$e,ft=(Ge=(Se=Xe==null?void 0:Xe.data)==null?void 0:Se.result)==null?void 0:Ge[0],le=(st=ft==null?void 0:ft.value)==null?void 0:st.pageData;le.compData=(v=le.compData)==null?void 0:v.map(Be=>((Be==null?void 0:Be.key)==="menuContents"&&(Be.contents=po(Be.contents,_e==null?void 0:_e.split("/"),$e,ve)),Be)),await ee.updateInsofDataApi({id:ft==null?void 0:ft.id,value:{pageData:le}}),Yt.setUpdateMenuStatus(!1),await sn.verifyStructureDataToStore(),Yt.setIsRefreshMenus(!1),Yt.setIsRefreshMenus(!0),Yt.setActiveMenuPath((j=(_=_e==null?void 0:_e.split("/"))==null?void 0:_.filter((Be,Ie)=>{var Ye;return Ie!==((Ye=_e==null?void 0:_e.split("/"))==null?void 0:Ye.length)-1}))==null?void 0:j.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let ve=[],Xe=[],Qe=((k=(Y=n==null?void 0:n.content)==null?void 0:Y[0])==null?void 0:k.id)??"",$e=c==null?void 0:c.url,_e="",ft="";if((n==null?void 0:n.parentTableId)!==void 0&&(n==null?void 0:n.parentTableId)!==null&&(n==null?void 0:n.parentTableId)!==0){const le=await ee.getInsofDataApi({id:n==null?void 0:n.parentTableId});_e=((J=(E=(ze=(ne=le==null?void 0:le.data)==null?void 0:ne.result)==null?void 0:ze[0])==null?void 0:E.key)==null?void 0:J.tableId)??(n==null?void 0:n.parentTableId),ft=((te=(De=(K=(L=le==null?void 0:le.data)==null?void 0:L.result)==null?void 0:K[0])==null?void 0:De.key)==null?void 0:te.pageKey)??""}else if(Qe!==""&&((W=n==null?void 0:n.content)==null?void 0:W.length)>1&&typeof((ce=(X=n==null?void 0:n.content)==null?void 0:X[0])==null?void 0:ce.id)!="string"){const le=await ee.getInsofDataApi({id:Qe});_e=((P=(ye=(me=(be=le==null?void 0:le.data)==null?void 0:be.result)==null?void 0:me[0])==null?void 0:ye.key)==null?void 0:P.tableId)??"",ft=((rt=(Oe=(de=(Te=le==null?void 0:le.data)==null?void 0:Te.result)==null?void 0:de[0])==null?void 0:Oe.key)==null?void 0:rt.pageKey)??""}(Pe=n==null?void 0:n.singleContent)==null||Pe.forEach(le=>{let Be={};for(let Ie in le)Ie!=="id"&&Ie!=="index"&&(Be[Ie]=le[Ie]);typeof(le==null?void 0:le.id)=="number"?ve.push({id:le==null?void 0:le.id,value:{tableData:Be}}):Xe.push({key:{type:l,pageKey:$e||ft||Lt.value,tableId:_e||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Be}})}),(Xe==null?void 0:Xe.length)>0&&await ee.batchAddInsofDataApi({dataList:Xe}),(ve==null?void 0:ve.length)>0&&await ee.batchUpdateInsofDataApi({dataList:ve})}else{let ve={},Xe=(nt=n==null?void 0:n.singleContent)==null?void 0:nt.id;for(let Qe in n==null?void 0:n.singleContent)Qe!=="id"&&Qe!=="index"&&(ve[Qe]=n==null?void 0:n.singleContent[Qe]);await Me.fixTableContents(l,r,n==null?void 0:n.index,Xe,sessionStorage.getItem("systemKey"),Object.values(ve),n==null?void 0:n.column,n)}Kt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await rd(n==null?void 0:n.value);Kt.setTableLoading(!1),(Ae=n==null?void 0:n.column)!=null&&Ae.some(ve=>ve==null?void 0:ve.isMainKey),jt.value=await Me.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await Ju.value),jt.value=(vt=jt.value)==null?void 0:vt.filter(ve=>{var Xe;return((Xe=ve==null?void 0:ve.compData)==null?void 0:Xe.length)>0}),jt.value=(at=jt.value)==null?void 0:at.filter(ve=>(ve==null?void 0:ve.comp)!==""),jt.value=await Me.getDeepDiffItems(jt.value),ho.value&&(n==null?void 0:n.buttonName)!=="删除"&&Kt.setRefreshCurStructure(!0)},id=async n=>{var c,r,p;const l=await ee.getInsofDataApi({id:n});return(p=(r=(c=l==null?void 0:l.data)==null?void 0:c.result)==null?void 0:r[0])==null?void 0:p.value},Un=async(n,l)=>{var p,u,y;if(Cr.value||typeof(n==null?void 0:n.index)=="string")return;const c=await id(n==null?void 0:n.index),r=(p=c==null?void 0:c.pageData)==null?void 0:p.name;await Me.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=I.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(h=>h.contents),name:r,isShow:(y=c==null?void 0:c.pageData)==null?void 0:y.isShow}),l&&(Yt.setActiveMenuPath(null),Yt.setActiveMenuPath(l))},Kn=async n=>{jt.value=await Me.getDeepDiffItems(n),Kt.setItemData(jt.value),Kt.setOriginalData(jt.value)},ld=async n=>{var u,y,h,f,w,C;let l="",c="";(u=n==null?void 0:n.split("/"))==null||u.forEach((V,F)=>{var G;((G=n==null?void 0:n.split("/"))==null?void 0:G.length)-2>F&&(l=l===""?l+V:l+"/"+V)}),(y=n==null?void 0:n.split("/"))==null||y.forEach((V,F)=>{var G;((G=n==null?void 0:n.split("/"))==null?void 0:G.length)-1>F&&(c=c===""?c+V:c+"/"+V)}),l=l+"/",c=c+"/";let r=await ee.getInsofDataApi({key:{pageKey:l,systemKey:sessionStorage.getItem("systemKey")}}),p=await ee.getInsofDataApi({key:{pageKey:c,systemKey:sessionStorage.getItem("systemKey")}});return((f=(h=r==null?void 0:r.data)==null?void 0:h.result)==null?void 0:f.length)>0||((C=(w=p==null?void 0:p.data)==null?void 0:w.result)==null?void 0:C.length)>0};e.ref();const mn=e.ref(null),sd=()=>{var n,l;console.log("倒计时结束时"),I.ElMessageBox.alert(`超时未提交,【${(l=(n=Lt.value)==null?void 0:n.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Er=e.ref([]),cd=e.computed(()=>{var n,l;return(l=(n=no.value)==null?void 0:n[Lt.value])==null?void 0:l.filter(c=>{var r;return((r=c==null?void 0:c.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Hu.value],()=>{Qa.setSelectTitle([]),Qa.setChooseTitle([])},{deep:!0});e.watch(()=>[Lt.value,Ku.value],async n=>{var p;if(!Lt.value)return;Kt.setLockingPage(""),jt.value=[];let l=e.getCurrentInstance();(p=l==null?void 0:l.scope)==null||p.stop(),l=null,Pn.value=!1,Cr.value=!0;let c=n==null?void 0:n[0],r=await Lu(c);jt.value=await Me.getDeepDiffItems(r),Kt.setExtraContents([]),Qa.setSelectIndex(""),Qa.setSelectMenu(""),Kt.setItemData(jt.value),Kt.setOriginalData(jt.value),e.nextTick(()=>{un.value=un.value++,Pn.value=!0})},{immediate:!0});const ud=async()=>{var p,u,y,h,f,w,C,V;Yt.setLinkMenuInfo(null);const n=await ee.getInsofDataApi({keyLikes:{pageKey:`loading${((p=Bn.value)==null?void 0:p.account)||((u=Bn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),l=await ee.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((y=Bn.value)==null?void 0:y.account)||((h=Bn.value)==null?void 0:h.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let c=(w=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:w.map(F=>F==null?void 0:F.id);const r=(V=(C=l==null?void 0:l.data)==null?void 0:C.result)==null?void 0:V.map(F=>F==null?void 0:F.id);c=[...I.cloneDeep(c),...r],(c==null?void 0:c.length)>0&&(c!=null&&c.every(F=>F!==null&&F))&&(await ee.batchDeleteInsofDataApi({ids:c}),await Ya.setLogRecordAsync({type:"删除",data:c},Lt.value)),Yt.setActiveMenuPath(Wu.value),jt.value=null,Kt.setRouteToChildPath(""),Yt.setChildMenu("")},dd=n=>new RegExp("button","i").test(n),pd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Sr=n=>{if(pd(n)){const l=n==null?void 0:n.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&Yt.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Tr=n=>{var l;mn.value&&(mn.value={...mn.value,mainKeyPropValue:n==null?void 0:n[(l=mn.value)==null?void 0:l.mainKeyProp]})},fd=n=>{_r.value=n},ln=e.reactive({index:0,comp:null}),hd=e.computed(()=>{var n;return(n=jt.value)==null?void 0:n.map((l,c)=>({id:l.id,name:l.name,status:vd(l,c)}))}),Ir=(n,l)=>{var f,w,C,V,F;const c=l?n:n-2,r=(f=jt.value)==null?void 0:f[c],p=(C=(w=r==null?void 0:r.compData)==null?void 0:w.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:C.contents,u=p==null?void 0:p.findIndex(G=>(G==null?void 0:G.isMainKey)&&(G==null?void 0:G.label)!=="操作"),y=u===-1?0:u,h=(F=(V=r==null?void 0:r.compData)==null?void 0:V.find(G=>(G==null?void 0:G.key)==="tableContents"))==null?void 0:F.contents;return{valid:h==null?void 0:h.every(G=>G==null?void 0:G[y+1]),length:(h==null?void 0:h.length)||0}},vd=(n,l)=>{var r;let c="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:p,length:u}=Ir(l,!0);ln.index===l?c="process":u===0?c="wait":c=p?"success":"error"}return c},Br=n=>{var c,r,p,u,y;const l=n+1;if(l>1&&((p=(r=(c=jt.value)==null?void 0:c[n])==null?void 0:r.comp)==null?void 0:p.toUpperCase())==="TABLE"){const{valid:h}=Ir(l);h?(ln.index=l,ln.comp=(u=jt.value)==null?void 0:u[n]):ee.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ln.index=l,ln.comp=(y=jt.value)==null?void 0:y[n]},ho=e.computed(()=>{var n,l;return(l=(n=Dr.value)==null?void 0:n[0])==null?void 0:l.isStepLayout});e.watch(()=>ho.value,n=>{n&&Br(0)},{immediate:!0});const gd={class:"layout"},md=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:l}){const c=l,r=n;e.onMounted(async()=>{});const p=e.computed(()=>I.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var C;const w=(C=p==null?void 0:p.value)==null?void 0:C.find(V=>{const{key:F}=V;return F==="baseConfig"});return w==null?void 0:w.contents}),y=e.computed(()=>{var C;const w=(C=p==null?void 0:p.value)==null?void 0:C.find(V=>{const{key:F}=V;return F==="children"});return w==null?void 0:w.contents}),h=e.computed(()=>{let w=I.cloneDeep(y.value)||[];const C=w.length;let V=0;const F=[];if(w=w.map(G=>{const M=G.span;return M?(G.span=Number(M),V=V+G.span):F.push(G),G}),V<24){const G=Math.floor((24-V)/C);F.forEach(M=>{M.span=G})}return w}),f=w=>{c("rowClick",w)};return(w,C)=>{var G;const V=e.resolveComponent("el-col"),F=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",gd,[e.createVNode(F,{style:e.normalizeStyle({height:(G=u.value)==null?void 0:G.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(M,Ce)=>(e.openBlock(),e.createBlock(V,{span:M==null?void 0:M.span},{default:e.withCtx(()=>{var H;return[e.unref(Pn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref($n)(M.comp)),{key:e.unref(un),compName:M.name,index:(M==null?void 0:M.id)??Ce,height:(H=u.value)==null?void 0:H.height,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,onChange:e.unref(jn),onContentChange:e.unref(Un),onPageChange:e.unref(Kn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),yd=Pt._export_sfc(md,[["__scopeId","data-v-ab9a36ed"]]),bd={class:"layout-operate"},kd={class:"layout-module"},xd={class:"collapse-title-item"},wd={class:"collapse-title"},Cd={class:"icon-content"},Dd=["onClick"],_d={class:"comp-child"},Ed=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:l}){const c=n,r=l;e.onMounted(()=>{Ce()});const p=e.ref({}),u=e.ref({}),y=e.ref([]),h=b=>[{label:"高度",prop:"height",type:"input",value:b==null?void 0:b.height}],f=b=>{u.value=b,r("change",R(),!0)},w=e.ref([]),C=e.ref([]),V=b=>[{label:"占比",prop:"span",type:"input",value:b==null?void 0:b.span}],F=e.computed(()=>{const b=c==null?void 0:c.itemContents;return I.cloneDeep(b)}),G=e.computed(()=>{const b=F==null?void 0:F.value,A=b==null?void 0:b.find(B=>{const{key:pe}=B;return pe==="baseConfig"});return A==null?void 0:A.contents}),M=e.computed(()=>{const b=F==null?void 0:F.value,A=b==null?void 0:b.find(B=>{const{key:pe}=B;return pe==="children"});return A==null?void 0:A.contents}),Ce=()=>{var b;p.value=F.value||{},w.value=(M==null?void 0:M.value)||[],y.value=h(),y.value=(b=y.value)==null?void 0:b.map(A=>{var pe;const{prop:B}=A;return A.value=(pe=G.value)==null?void 0:pe[B],A})};e.watch(()=>{var b;return(b=M==null?void 0:M.value)==null?void 0:b.length},()=>{var b;w.value=(M==null?void 0:M.value)||[],C.value=(b=M.value)==null?void 0:b.map(A=>V(A))},{immediate:!0});const H=(b,A)=>{const B=I.cloneDeep(M==null?void 0:M.value);B[A].span=b.span,w.value=B,r("change",R(),!0)},U=b=>tn(b),ue=(b,A,B)=>{if(!b)return;const pe=I.cloneDeep(M==null?void 0:M.value);pe[B]&&(pe[B].compData=b,w.value=pe,r("change",R(),!0))},x=b=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let A=I.cloneDeep(M==null?void 0:M.value);A=A==null?void 0:A.filter((B,pe)=>b!==pe),w.value=A,r("change",R(),!0),ee.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:w==null?void 0:w.value}]});return(b,A)=>{const B=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",bd,[e.createElementVNode("div",kd,[A[1]||(A[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:y.value,isEnableWrap:!0,onChange:A[0]||(A[0]=pe=>f(pe))},null,8,["rowContents"])])]),e.createVNode(cr.default,{class:"collapse-content",collapseContents:M.value},{title:e.withCtx(({item:pe,index:Ue})=>[e.createElementVNode("div",xd,[e.createElementVNode("div",wd,e.toDisplayString(pe.name),1),e.createElementVNode("div",Cd,[e.createElementVNode("div",{onClick:e.withModifiers(pt=>x(Ue),["stop"]),class:"icon-content"},[e.createVNode(B,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Dd)])])]),content:e.withCtx(({item:pe,index:Ue})=>[e.createElementVNode("div",_d,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value[Ue],key:Ue,isEnableWrap:!0,onChange:pt=>H(pt,Ue)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(U(pe.comp+"Operate")),{itemContents:pe==null?void 0:pe.compData,originalItemContents:pe.compData,onChange:pt=>ue(pt,pe,Ue)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Sd=Pt._export_sfc(Ed,[["__scopeId","data-v-ba05456e"]]),Td=typeof window<"u";var Fo;Td&&((Fo=window==null?void 0:window.navigator)!=null&&Fo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function la(n){return n==null}function Nr(){}const Id=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Id)));function Bd(){const n=new Map;return{on(l,c){const r=n.get(l);r!=null&&r.add(c)||n.set(l,new Set([c]))},off(l,c){const r=n.get(l);r&&r.delete(c)},clear(l){const c=n.get(l);c&&c.clear()},clearAll(){n.clear()},emit(l,...c){const r=n.get(l);r&&r.forEach(p=>{p(...c)})}}}function Ro(n,l=16){if(typeof n!="function")return Nr;const c=(...u)=>{n(...u)};if(l<=0)return Ar(c);let r=0,p;return function(...u){const y=Date.now(),h=y-r;clearTimeout(p),h>=l?(r=y,c(...u)):p=setTimeout(()=>{r=Date.now(),c(...u)},Math.max(0,l-h))}}function Nd(n,l=100){if(typeof n!="function")return Nr;const c=(...p)=>{n(...p)};if(l<=0)return Ar(c);let r;return function(...p){clearTimeout(r),r=setTimeout(()=>{c(...p)},l)}}function Ar(n){if(typeof n!="function")return n;let l=!1,c,r;return function(...p){return c=p,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,n(...c)))),r}}const kn=new Set,Vr=new WeakMap;function Ad(){kn.forEach(n=>{n(...Vr.get(n))}),kn.clear()}function aa(n,...l){if(typeof n!="function")return n;Vr.set(n,l),!kn.has(n)&&(kn.add(n),kn.size===1&&Promise.resolve().then(Ad))}const Or=Symbol("LAYOUT_KEY"),Mr=Symbol("EMITTER_KEY");function Vd(n){let l=0,c;for(let r=0,p=n.length;r<p;r++)c=n[r].y+n[r].h,c>l&&(l=c);return l}function io(n){const l=Array(n.length);for(let c=0,r=n.length;c<r;c++)l[c]=Od(n[c]);return l}function Od(n){return{...n}}function zr(n,l){return!(n===l||n.x+n.w<=l.x||n.x>=l.x+l.w||n.y+n.h<=l.y||n.y>=l.y+l.h)}function rn(n,l,c){const r=Rr(n),p=Lr(n),u=Array(n.length);for(let y=0,h=p.length;y<h;y++){let f=p[y];f.static||(f=Md(r,f,l,c),r.push(f)),u[n.findIndex(w=>w.i===f.i)]=f,f.moved=!1}return u}function Md(n,l,c,r){if(c)for(;l.y>0&&!xn(n,l);)l.y--;else if(r){const u=r[l.i].y;for(;l.y>u&&!xn(n,l);)l.y--}let p;for(;p=xn(n,l);)l.y=p.y+p.h;return l}function zd(n,l){const c=Rr(n);for(let r=0,p=n.length;r<p;r++){const u=n[r];if(u.x+u.w>l.cols&&(u.x=l.cols-u.w),u.x<0&&(u.x=0,u.w=l.cols),!u.static)c.push(u);else for(;xn(c,u);)u.y++}return n}function Lo(n,l){for(let c=0,r=n.length;c<r;c++)if(n[c].i===l)return n[c]}function xn(n,l){for(let c=0,r=n.length;c<r;c++)if(zr(n[c],l))return n[c]}function Fr(n,l){return n.filter(c=>zr(c,l))}function Rr(n){return n.filter(l=>l.static)}function lo(n,l,c,r,p=!1,u=!1){if(l.static)return n;const y=l.x,h=l.y,f=r&&l.y>r;typeof c=="number"&&(l.x=c),typeof r=="number"&&(l.y=r),l.moved=!0;let w=Lr(n);f&&(w=w.reverse());const C=Fr(w,l);if(u&&C.length)return l.x=y,l.y=h,l.moved=!1,n;for(let V=0,F=C.length;V<F;V++){const G=C[V];G.moved||l.y>G.y&&l.y-G.y>G.h/4||(G.static?n=Po(n,G,l,p):n=Po(n,l,G,p))}return n}function Po(n,l,c,r){if(r){const p={x:c.x,y:c.y,w:c.w,h:c.h};if(p.y=Math.max(l.y-c.h,0),!xn(n,p))return lo(n,c,void 0,p.y,!1)}return lo(n,c,void 0,c.y+1,!1)}function Fd(n,l,c,r){const p="translate3d("+l+"px,"+n+"px, 0)";return{transform:p,WebkitTransform:p,MozTransform:p,msTransform:p,OTransform:p,width:c+"px",height:r+"px",position:"absolute"}}function Rd(n,l,c,r){const p="translate3d("+l*-1+"px,"+n+"px, 0)";return{transform:p,WebkitTransform:p,MozTransform:p,msTransform:p,OTransform:p,width:c+"px",height:r+"px",position:"absolute"}}function Ld(n,l,c,r){return{top:n+"px",left:l+"px",width:c+"px",height:r+"px",position:"absolute"}}function Pd(n,l,c,r){return{top:n+"px",right:l+"px",width:c+"px",height:r+"px",position:"absolute"}}function Lr(n){return Array.from(n).sort(function(l,c){return l.y===c.y&&l.x===c.x?0:l.y>c.y||l.y===c.y&&l.x>c.x?1:-1})}function $d(n,l){l=l||"Layout";const c=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(l+" must be an array!");for(let p=0,u=n.length;p<u;p++){const y=n[p];for(let h=0;h<c.length;h++)if(typeof y[c[h]]!="number")throw new Error("VueGridLayout: "+l+"["+p+"]."+c[h]+" must be a number!");if(y.i===void 0||y.i===null)throw new Error("VueGridLayout: "+l+"["+p+"].i cannot be null!");if(typeof y.i!="number"&&typeof y.i!="string")throw new Error("VueGridLayout: "+l+"["+p+"].i must be a string or number!");if(r.indexOf(y.i)>=0)throw new Error("VueGridLayout: "+l+"["+p+"].i must be unique!");if(r.push(y.i),y.static!==void 0&&typeof y.static!="boolean")throw new Error("VueGridLayout: "+l+"["+p+"].static must be a boolean!")}}function jd(n,l="vgl"){const c=()=>`${l}-${n}`;return{b:c,be:r=>`${c()}__${r}`,bm:r=>`${c()}--${r}`,bem:(r,p)=>`${c()}__${r}--${p}`}}function $o(n){return Ud(n)}function Ud(n){var l;const c=((l=n.target)==null?void 0:l.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:c.getBoundingClientRect(),p=n.clientX+c.scrollLeft-r.left,u=n.clientY+c.scrollTop-r.top;return{x:p,y:u}}function jo(n,l,c,r){return Kd(n)?{deltaX:c-n,deltaY:r-l,lastX:n,lastY:l,x:c,y:r}:{deltaX:0,deltaY:0,lastX:c,lastY:r,x:c,y:r}}function Kd(n){return typeof n=="number"&&!Number.isNaN(n)}function Wd(n,l){const c=$r(n);let r=c[0];for(let p=1,u=c.length;p<u;p++){const y=c[p];l>n[y]&&(r=y)}return r}function Pr(n,l){if(!l[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return l[n]}function Hd(n,l,c,r,p,u,y){if(l[r])return io(l[r]);let h=n;const f=$r(c),w=f.slice(f.indexOf(r));for(let C=0,V=w.length;C<V;C++){const F=w[C];if(l[F]){h=l[F];break}}return h=io(h||[]),rn(zd(h,{cols:u}),y)}function $r(n){return Object.keys(n).sort((l,c)=>n[l]-n[c])}let qd="auto";function Gd(){return typeof document<"u"}function Uo(){return Gd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):qd}var yn={exports:{}},Xd=yn.exports,Ko;function Yd(){return Ko||(Ko=1,function(n,l){(function(c,r){n.exports=r()})(Xd,function(){function c(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(a);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable})),o.push.apply(o,i)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?c(Object(o),!0).forEach(function(i){f(a,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):c(Object(o)).forEach(function(i){Object.defineProperty(a,i,Object.getOwnPropertyDescriptor(o,i))})}return a}function p(a){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function y(a,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,Ce(i.key),i)}}function h(a,t,o){return t&&y(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=Ce(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function w(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&V(a,t)}function C(a){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(a)}function V(a,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},V(a,t)}function F(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function G(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,i=C(a);if(t){var s=C(this).constructor;o=Reflect.construct(i,arguments,s)}else o=i.apply(this,arguments);return function(d,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(d)}(this,o)}}function M(){return M=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var i=function(d,g){for(;!Object.prototype.hasOwnProperty.call(d,g)&&(d=C(d))!==null;);return d}(a,t);if(i){var s=Object.getOwnPropertyDescriptor(i,t);return s.get?s.get.call(arguments.length<3?a:o):s.value}},M.apply(this,arguments)}function Ce(a){var t=function(o,i){if(typeof o!="object"||o===null)return o;var s=o[Symbol.toPrimitive];if(s!==void 0){var d=s.call(o,i);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var H=function(a){return!(!a||!a.Window)&&a instanceof a.Window},U=void 0,ue=void 0;function x(a){U=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),ue=a}function R(a){return H(a)?a:(a.ownerDocument||a).defaultView||ue.window}typeof window<"u"&&window&&x(window);var b=function(a){return!!a&&p(a)==="object"},A=function(a){return typeof a=="function"},B={window:function(a){return a===ue||H(a)},docFrag:function(a){return b(a)&&a.nodeType===11},object:b,func:A,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||p(a)!=="object")return!1;var t=R(a)||ue;return/object|function/.test(typeof Element>"u"?"undefined":p(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return b(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return b(a)&&a.length!==void 0&&A(a.splice)}};function pe(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Ue(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var i=o.prepared.axis;if(i==="x"||i==="y"){var s=i==="x"?"y":"x";t.page[s]=o.coords.start.page[s],t.client[s]=o.coords.start.client[s],t.delta[s]=0}}}var pt={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,i=a.defaults;o.prototype.draggable=pt.draggable,t.map.drag=pt,t.methodDict.drag="draggable",i.actions.drag=pt.defaults},listeners:{"interactions:before-action-move":pe,"interactions:action-resume":pe,"interactions:action-move":Ue,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,i=a.buttons,s=o.options.drag;if(s&&s.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(i&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:s.lockAxis==="start"?s.startAxis:s.lockAxis},!1}},draggable:function(a){return B.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):B.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:pe,move:Ue,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Ne=pt,Ke={init:function(a){var t=a;Ke.document=t.document,Ke.DocumentFragment=t.DocumentFragment||qe,Ke.SVGElement=t.SVGElement||qe,Ke.SVGSVGElement=t.SVGSVGElement||qe,Ke.SVGElementInstance=t.SVGElementInstance||qe,Ke.Element=t.Element||qe,Ke.HTMLElement=t.HTMLElement||Ke.Element,Ke.Event=t.Event,Ke.Touch=t.Touch||qe,Ke.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function qe(){}var z=Ke,se={init:function(a){var t=z.Element,o=a.navigator||{};se.supportsTouch="ontouchstart"in a||B.func(a.DocumentTouch)&&z.document instanceof a.DocumentTouch,se.supportsPointerEvent=o.pointerEnabled!==!1&&!!z.PointerEvent,se.isIOS=/iP(hone|od|ad)/.test(o.platform),se.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),se.isIe9=/MSIE 9/.test(o.userAgent),se.isOperaMobile=o.appName==="Opera"&&se.supportsTouch&&/Presto/.test(o.userAgent),se.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",se.pEventTypes=se.supportsPointerEvent?z.PointerEvent===a.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,se.wheelEvent=z.document&&"onmousewheel"in z.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ie=se;function he(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function et(a,t){for(;B.element(a);){if(q(a,t))return a;a=lt(a)}return null}function lt(a){var t=a.parentNode;if(B.docFrag(t)){for(;(t=t.host)&&B.docFrag(t););return t}return t}function q(a,t){return ue!==U&&(t=t.replace(/\/deep\//g," ")),a[ie.prefixedMatchesSelector](t)}var O=function(a){return a.parentNode||a.host};function ke(a,t){for(var o,i=[],s=a;(o=O(s))&&s!==t&&o!==s.ownerDocument;)i.unshift(s),s=o;return i}function we(a,t,o){for(;B.element(a);){if(q(a,t))return!0;if((a=lt(a))===o)return q(a,t)}return!1}function Le(a){return a.correspondingUseElement||a}function Fe(a){var t=a instanceof z.SVGElement?a.getBoundingClientRect():a.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function tt(a){var t,o=Fe(a);if(!ie.isIOS7&&o){var i={x:(t=(t=R(a))||ue).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=i.x,o.right+=i.x,o.top+=i.y,o.bottom+=i.y}return o}function ae(a){for(var t=[];a;)t.push(a),a=lt(a);return t}function Ee(a){return!!B.string(a)&&(z.document.querySelector(a),!0)}function S(a,t){for(var o in t)a[o]=t[o];return a}function Je(a,t,o){return a==="parent"?lt(o):a==="self"?t.getRect(o):et(o,a)}function Ze(a,t,o,i){var s=a;return B.string(s)?s=Je(s,t,o):B.func(s)&&(s=s.apply(void 0,i)),B.element(s)&&(s=tt(s)),s}function Ve(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function oe(a){return!a||"x"in a&&"y"in a||((a=S({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function Q(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function re(a,t,o){var i=o&&a.options[o];return Ve(Ze(i&&i.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function Se(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},B.string(a)&&a.search(" ")!==-1&&(a=Ge(a)),B.array(a))return a.forEach(function(T){return Se(T,t,o,i)}),i;if(B.object(a)&&(t=a,a=""),B.func(t)&&o(a))i[a]=i[a]||[],i[a].push(t);else if(B.array(t))for(var s=0,d=t;s<d.length;s++){var g=d[s];Se(a,g,o,i)}else if(B.object(t))for(var m in t)Se(Ge(m).map(function(T){return"".concat(a).concat(T)}),t[m],o,i);return i}function Ge(a){return a.trim().split(/ +/)}var st=function(a,t){return Math.sqrt(a*a+t*t)},v=["webkit","moz"];function _(a,t){a.__set||(a.__set={});var o=function(s){if(v.some(function(d){return s.indexOf(d)===0}))return 1;typeof a[s]!="function"&&s!=="__set"&&Object.defineProperty(a,s,{get:function(){return s in a.__set?a.__set[s]:a.__set[s]=t[s]},set:function(d){a.__set[s]=d},configurable:!0})};for(var i in t)o(i);return a}function j(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function Y(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function k(a){return a instanceof z.Event||a instanceof z.Touch}function ne(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function ze(a,t){return t=t||{x:0,y:0},ie.isOperaMobile&&k(a)?(ne("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):ne("page",a,t),t}function E(a){return B.number(a.pointerId)?a.pointerId:a.identifier}function J(a,t,o){var i=t.length>1?K(t):t[0];ze(i,a.page),function(s,d){d=d||{},ie.isOperaMobile&&k(s)?ne("screen",s,d):ne("client",s,d)}(i,a.client),a.timeStamp=o}function L(a){var t=[];return B.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function K(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var i=a[o];for(var s in t)t[s]+=i[s]}for(var d in t)t[d]/=a.length;return t}function De(a){if(!a.length)return null;var t=L(a),o=Math.min(t[0].pageX,t[1].pageX),i=Math.min(t[0].pageY,t[1].pageY),s=Math.max(t[0].pageX,t[1].pageX),d=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:i,left:o,top:i,right:s,bottom:d,width:s-o,height:d-i}}function te(a,t){var o=t+"X",i=t+"Y",s=L(a),d=s[0][o]-s[1][o],g=s[0][i]-s[1][i];return st(d,g)}function W(a,t){var o=t+"X",i=t+"Y",s=L(a),d=s[1][o]-s[0][o],g=s[1][i]-s[0][i];return 180*Math.atan2(g,d)/Math.PI}function X(a){return B.string(a.pointerType)?a.pointerType:B.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof z.Touch?"touch":"mouse"}function ce(a){var t=B.func(a.composedPath)?a.composedPath():a.path;return[Le(t?t[0]:a.target),Le(a.currentTarget)]}var be=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return h(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(be.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var me=function(a,t){for(var o=0;o<t.length;o++){var i=t[o];a.push(i)}return a},ye=function(a){return me([],a)},P=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Te=function(a,t){return a[P(a,t)]},de=function(a){w(o,a);var t=G(o);function o(i,s,d){var g;u(this,o),(g=t.call(this,s._interaction)).dropzone=void 0,g.dragEvent=void 0,g.relatedTarget=void 0,g.draggable=void 0,g.propagationStopped=!1,g.immediatePropagationStopped=!1;var m=d==="dragleave"?i.prev:i.cur,T=m.element,$=m.dropzone;return g.type=d,g.target=T,g.currentTarget=T,g.dropzone=$,g.dragEvent=s,g.relatedTarget=s.target,g.draggable=s.interactable,g.timeStamp=s.timeStamp,g}return h(o,[{key:"reject",value:function(){var i=this,s=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&s.cur.dropzone===this.dropzone&&s.cur.element===this.target)if(s.prev.dropzone=this.dropzone,s.prev.element=this.target,s.rejected=!0,s.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var d=s.activeDrops,g=P(d,function(T){var $=T.dropzone,N=T.element;return $===i.dropzone&&N===i.target});s.activeDrops.splice(g,1);var m=new o(s,this.dragEvent,"dropdeactivate");m.dropzone=this.dropzone,m.target=this.target,this.dropzone.fire(m)}else this.dropzone.fire(new o(s,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(be);function Oe(a,t){for(var o=0,i=a.slice();o<i.length;o++){var s=i[o],d=s.dropzone,g=s.element;t.dropzone=d,t.target=g,d.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function rt(a,t){for(var o=function(d,g){for(var m=[],T=0,$=d.interactables.list;T<$.length;T++){var N=$[T];if(N.options.drop.enabled){var Z=N.options.drop.accept;if(!(B.element(Z)&&Z!==g||B.string(Z)&&!q(g,Z)||B.func(Z)&&!Z({dropzone:N,draggableElement:g})))for(var xe=0,je=N.getAllElements();xe<je.length;xe++){var Re=je[xe];Re!==g&&m.push({dropzone:N,element:Re,rect:N.getRect(Re)})}}}return m}(a,t),i=0;i<o.length;i++){var s=o[i];s.rect=s.dropzone.getRect(s.element)}return o}function Pe(a,t,o){for(var i=a.dropState,s=a.interactable,d=a.element,g=[],m=0,T=i.activeDrops;m<T.length;m++){var $=T[m],N=$.dropzone,Z=$.element,xe=$.rect,je=N.dropCheck(t,o,s,d,Z,xe);g.push(je?Z:null)}var Re=function(He){for(var it,ot,mt,St=[],Nt=0;Nt<He.length;Nt++){var xt=He[Nt],Tt=He[it];if(xt&&Nt!==it)if(Tt){var ta=O(xt),Ut=O(Tt);if(ta!==xt.ownerDocument)if(Ut!==xt.ownerDocument)if(ta!==Ut){St=St.length?St:ke(Tt);var ia=void 0;if(Tt instanceof z.HTMLElement&&xt instanceof z.SVGElement&&!(xt instanceof z.SVGSVGElement)){if(xt===Ut)continue;ia=xt.ownerSVGElement}else ia=xt;for(var da=ke(ia,Tt.ownerDocument),ba=0;da[ba]&&da[ba]===St[ba];)ba++;var In=[da[ba-1],da[ba],St[ba]];if(In[0])for(var hn=In[0].lastChild;hn;){if(hn===In[1]){it=Nt,St=da;break}if(hn===In[2])break;hn=hn.previousSibling}}else mt=Tt,(parseInt(R(ot=xt).getComputedStyle(ot).zIndex,10)||0)>=(parseInt(R(mt).getComputedStyle(mt).zIndex,10)||0)&&(it=Nt);else it=Nt}else it=Nt}return it}(g);return i.activeDrops[Re]||null}function nt(a,t,o){var i=a.dropState,s={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(s.activate=new de(i,o,"dropactivate"),s.activate.target=null,s.activate.dropzone=null),o.type==="dragend"&&(s.deactivate=new de(i,o,"dropdeactivate"),s.deactivate.target=null,s.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(s.leave=new de(i,o,"dragleave"),o.dragLeave=s.leave.target=i.prev.element,o.prevDropzone=s.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(s.enter=new de(i,o,"dragenter"),o.dragEnter=i.cur.element,o.dropzone=i.cur.dropzone)),o.type==="dragend"&&i.cur.dropzone&&(s.drop=new de(i,o,"drop"),o.dropzone=i.cur.dropzone,o.relatedTarget=i.cur.element),o.type==="dragmove"&&i.cur.dropzone&&(s.move=new de(i,o,"dropmove"),o.dropzone=i.cur.dropzone)),s}function Ae(a,t){var o=a.dropState,i=o.activeDrops,s=o.cur,d=o.prev;t.leave&&d.dropzone.fire(t.leave),t.enter&&s.dropzone.fire(t.enter),t.move&&s.dropzone.fire(t.move),t.drop&&s.dropzone.fire(t.drop),t.deactivate&&Oe(i,t.deactivate),o.prev.dropzone=s.dropzone,o.prev.element=s.element}function vt(a,t){var o=a.interaction,i=a.iEvent,s=a.event;if(i.type==="dragmove"||i.type==="dragend"){var d=o.dropState;t.dynamicDrop&&(d.activeDrops=rt(t,o.element));var g=i,m=Pe(o,g,s);d.rejected=d.rejected&&!!m&&m.dropzone===d.cur.dropzone&&m.element===d.cur.element,d.cur.dropzone=m&&m.dropzone,d.cur.element=m&&m.element,d.events=nt(o,0,g)}}var at={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,i=a.Interactable,s=a.defaults;a.usePlugin(Ne),i.prototype.dropzone=function(d){return function(g,m){if(B.object(m)){if(g.options.drop.enabled=m.enabled!==!1,m.listeners){var T=Se(m.listeners),$=Object.keys(T).reduce(function(Z,xe){return Z[/^(enter|leave)/.test(xe)?"drag".concat(xe):/^(activate|deactivate|move)/.test(xe)?"drop".concat(xe):xe]=T[xe],Z},{}),N=g.options.drop.listeners;N&&g.off(N),g.on($),g.options.drop.listeners=$}return B.func(m.ondrop)&&g.on("drop",m.ondrop),B.func(m.ondropactivate)&&g.on("dropactivate",m.ondropactivate),B.func(m.ondropdeactivate)&&g.on("dropdeactivate",m.ondropdeactivate),B.func(m.ondragenter)&&g.on("dragenter",m.ondragenter),B.func(m.ondragleave)&&g.on("dragleave",m.ondragleave),B.func(m.ondropmove)&&g.on("dropmove",m.ondropmove),/^(pointer|center)$/.test(m.overlap)?g.options.drop.overlap=m.overlap:B.number(m.overlap)&&(g.options.drop.overlap=Math.max(Math.min(1,m.overlap),0)),"accept"in m&&(g.options.drop.accept=m.accept),"checker"in m&&(g.options.drop.checker=m.checker),g}return B.bool(m)?(g.options.drop.enabled=m,g):g.options.drop}(this,d)},i.prototype.dropCheck=function(d,g,m,T,$,N){return function(Z,xe,je,Re,He,it,ot){var mt=!1;if(!(ot=ot||Z.getRect(it)))return!!Z.options.drop.checker&&Z.options.drop.checker(xe,je,mt,Z,it,Re,He);var St=Z.options.drop.overlap;if(St==="pointer"){var Nt=re(Re,He,"drag"),xt=ze(xe);xt.x+=Nt.x,xt.y+=Nt.y;var Tt=xt.x>ot.left&&xt.x<ot.right,ta=xt.y>ot.top&&xt.y<ot.bottom;mt=Tt&&ta}var Ut=Re.getRect(He);if(Ut&&St==="center"){var ia=Ut.left+Ut.width/2,da=Ut.top+Ut.height/2;mt=ia>=ot.left&&ia<=ot.right&&da>=ot.top&&da<=ot.bottom}return Ut&&B.number(St)&&(mt=Math.max(0,Math.min(ot.right,Ut.right)-Math.max(ot.left,Ut.left))*Math.max(0,Math.min(ot.bottom,Ut.bottom)-Math.max(ot.top,Ut.top))/(Ut.width*Ut.height)>=St),Z.options.drop.checker&&(mt=Z.options.drop.checker(xe,je,mt,Z,it,Re,He)),mt}(this,d,g,m,T,$,N)},o.dynamicDrop=function(d){return B.bool(d)?(a.dynamicDrop=d,o):a.dynamicDrop},S(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,s.actions.drop=at.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(a,t){var o=a.interaction,i=(a.event,a.iEvent);if(o.prepared.name==="drag"){var s=o.dropState;s.activeDrops=[],s.events={},s.activeDrops=rt(t,o.element),s.events=nt(o,0,i),s.events.activate&&(Oe(s.activeDrops,s.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:i}))}},"interactions:action-move":vt,"interactions:after-action-move":function(a,t){var o=a.interaction,i=a.iEvent;if(o.prepared.name==="drag"){var s=o.dropState;Ae(o,s.events),t.fire("actions/drop:move",{interaction:o,dragEvent:i}),s.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,i=a.iEvent;vt(a,t),Ae(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:i})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:rt,getDrop:Pe,getDropEvents:nt,fireDropEvents:Ae,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ve=at;function Xe(a){var t=a.interaction,o=a.iEvent,i=a.phase;if(t.prepared.name==="gesture"){var s=t.pointers.map(function($){return $.pointer}),d=i==="start",g=i==="end",m=t.interactable.options.deltaSource;if(o.touches=[s[0],s[1]],d)o.distance=te(s,m),o.box=De(s),o.scale=1,o.ds=0,o.angle=W(s,m),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(g||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=te(s,m),o.box=De(s),o.scale=o.distance/t.gesture.startDistance,o.angle=W(s,m),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,B.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var Qe={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,i=a.defaults;o.prototype.gesturable=function(s){return B.object(s)?(this.options.gesture.enabled=s.enabled!==!1,this.setPerAction("gesture",s),this.setOnEvents("gesture",s),this):B.bool(s)?(this.options.gesture.enabled=s,this):this.options.gesture},t.map.gesture=Qe,t.methodDict.gesture="gesturable",i.actions.gesture=Qe.defaults},listeners:{"interactions:action-start":Xe,"interactions:action-move":Xe,"interactions:action-end":Xe,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},$e=Qe;function _e(a,t,o,i,s,d,g){if(!t)return!1;if(t===!0){var m=B.number(d.width)?d.width:d.right-d.left,T=B.number(d.height)?d.height:d.bottom-d.top;if(g=Math.min(g,Math.abs((a==="left"||a==="right"?m:T)/2)),m<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var $=m>=0?d.left:d.right;return o.x<$+g}if(a==="top"){var N=T>=0?d.top:d.bottom;return o.y<N+g}if(a==="right")return o.x>(m>=0?d.right:d.left)-g;if(a==="bottom")return o.y>(T>=0?d.bottom:d.top)-g}return!!B.element(i)&&(B.element(t)?t===i:we(i,t,s))}function ft(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var i=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?i.delta.x=i.delta.y:i.delta.y=i.delta.x,i.axes="xy"):(i.axes=o.resizeAxes,o.resizeAxes==="x"?i.delta.y=0:o.resizeAxes==="y"&&(i.delta.x=0))}}var le,Be,Ie={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,i=a.Interactable,s=a.defaults;Ie.cursors=function(d){return d.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ie.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,i.prototype.resizable=function(d){return function(g,m,T){return B.object(m)?(g.options.resize.enabled=m.enabled!==!1,g.setPerAction("resize",m),g.setOnEvents("resize",m),B.string(m.axis)&&/^x$|^y$|^xy$/.test(m.axis)?g.options.resize.axis=m.axis:m.axis===null&&(g.options.resize.axis=T.defaults.actions.resize.axis),B.bool(m.preserveAspectRatio)?g.options.resize.preserveAspectRatio=m.preserveAspectRatio:B.bool(m.square)&&(g.options.resize.square=m.square),g):B.bool(m)?(g.options.resize.enabled=m,g):g.options.resize}(this,d,a)},t.map.resize=Ie,t.methodDict.resize="resizable",s.actions.resize=Ie.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=o,d=i.rect;i._rects={start:S({},d),corrected:S({},d),previous:S({},d),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},s.edges=i.prepared.edges,s.rect=i._rects.corrected,s.deltaRect=i._rects.delta}})(a),ft(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=o,d=i.interactable.options.resize.invert,g=d==="reposition"||d==="negate",m=i.rect,T=i._rects,$=T.start,N=T.corrected,Z=T.delta,xe=T.previous;if(S(xe,N),g){if(S(N,m),d==="reposition"){if(N.top>N.bottom){var je=N.top;N.top=N.bottom,N.bottom=je}if(N.left>N.right){var Re=N.left;N.left=N.right,N.right=Re}}}else N.top=Math.min(m.top,$.bottom),N.bottom=Math.max(m.bottom,$.top),N.left=Math.min(m.left,$.right),N.right=Math.max(m.right,$.left);for(var He in N.width=N.right-N.left,N.height=N.bottom-N.top,N)Z[He]=N[He]-xe[He];s.edges=i.prepared.edges,s.rect=N,s.deltaRect=Z}})(a),ft(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var i=t;i.edges=o.prepared.edges,i.rect=o._rects.corrected,i.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,i=a.element,s=a.rect,d=a.buttons;if(s){var g=S({},t.coords.cur.page),m=o.options.resize;if(m&&m.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(d&m.mouseButtons)!=0)){if(B.object(m.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var $ in T)T[$]=_e($,m.edges[$],g,t._latestPointer.eventTarget,i,s,m.margin||Ie.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var N=m.axis!=="y"&&g.x>s.right-Ie.defaultMargin,Z=m.axis!=="x"&&g.y>s.bottom-Ie.defaultMargin;(N||Z)&&(a.action={name:"resize",axes:(N?"x":"")+(Z?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,i=a.name,s=Ie.cursors,d=null;if(o)d=s[i+o];else if(t){for(var g="",m=0,T=["top","bottom","left","right"];m<T.length;m++){var $=T[m];t[$]&&(g+=$)}d=s[g]}return d},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Ye=Ie,D={id:"actions",install:function(a){a.usePlugin($e),a.usePlugin(Ye),a.usePlugin(Ne),a.usePlugin(ve)}},fe=0,We={request:function(a){return le(a)},cancel:function(a){return Be(a)},init:function(a){if(le=a.requestAnimationFrame,Be=a.cancelAnimationFrame,!le)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var i=t[o];le=a["".concat(i,"RequestAnimationFrame")],Be=a["".concat(i,"CancelAnimationFrame")]||a["".concat(i,"CancelRequestAnimationFrame")]}le=le&&le.bind(a),Be=Be&&Be.bind(a),le||(le=function(s){var d=Date.now(),g=Math.max(0,16-(d-fe)),m=a.setTimeout(function(){s(d+g)},g);return fe=d+g,m},Be=function(s){return clearTimeout(s)})}},ge={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){ge.isScrolling=!0,We.cancel(ge.i),a.autoScroll=ge,ge.interaction=a,ge.prevTime=ge.now(),ge.i=We.request(ge.scroll)},stop:function(){ge.isScrolling=!1,ge.interaction&&(ge.interaction.autoScroll=null),We.cancel(ge.i)},scroll:function(){var a=ge.interaction,t=a.interactable,o=a.element,i=a.prepared.name,s=t.options[i].autoScroll,d=dt(s.container,t,o),g=ge.now(),m=(g-ge.prevTime)/1e3,T=s.speed*m;if(T>=1){var $={x:ge.x*T,y:ge.y*T};if($.x||$.y){var N=ct(d);B.window(d)?d.scrollBy($.x,$.y):d&&(d.scrollLeft+=$.x,d.scrollTop+=$.y);var Z=ct(d),xe={x:Z.x-N.x,y:Z.y-N.y};(xe.x||xe.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:xe,interaction:a,container:d})}ge.prevTime=g}ge.isScrolling&&(We.cancel(ge.i),ge.i=We.request(ge.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&ge.check(t.interactable,t.prepared.name))if(t.simulation)ge.x=ge.y=0;else{var i,s,d,g,m=t.interactable,T=t.element,$=t.prepared.name,N=m.options[$].autoScroll,Z=dt(N.container,m,T);if(B.window(Z))g=o.clientX<ge.margin,i=o.clientY<ge.margin,s=o.clientX>Z.innerWidth-ge.margin,d=o.clientY>Z.innerHeight-ge.margin;else{var xe=Fe(Z);g=o.clientX<xe.left+ge.margin,i=o.clientY<xe.top+ge.margin,s=o.clientX>xe.right-ge.margin,d=o.clientY>xe.bottom-ge.margin}ge.x=s?1:g?-1:0,ge.y=d?1:i?-1:0,ge.isScrolling||(ge.margin=N.margin,ge.speed=N.speed,ge.start(t))}}};function dt(a,t,o){return(B.string(a)?Je(a,t,o):a)||R(o)}function ct(a){return B.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var wt={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=ge,ge.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=ge.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,ge.stop(),ge.interaction&&(ge.interaction=null)},"interactions:stop":ge.stop,"interactions:action-move":function(a){return ge.onInteractionMove(a)}}},ht=wt;function ut(a,t){var o=!1;return function(){return o||(ue.console.warn(t),o=!0),a.apply(this,arguments)}}function gt(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function Ct(a){return B.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function It(a){return B.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Wt={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,i,s,d){var g=function(m,T,$,N,Z){var xe=m.getRect(N),je=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Re={action:null,interactable:m,interaction:$,element:N,rect:xe,buttons:je};return Z.fire("auto-start:check",Re),Re.action}(this,i,s,d,a);return this.options.actionChecker?this.options.actionChecker(o,i,g,this,d,s):g},t.prototype.ignoreFrom=ut(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ut(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=It,t.prototype.styleCursor=Ct}};function yt(a,t,o,i,s){return t.testIgnoreAllow(t.options[a.name],o,i)&&t.options[a.name].enabled&&Gt(t,o,a,s)?a:null}function Mt(a,t,o,i,s,d,g){for(var m=0,T=i.length;m<T;m++){var $=i[m],N=s[m],Z=$.getAction(t,o,a,N);if(Z){var xe=yt(Z,$,N,d,g);if(xe)return{action:xe,interactable:$,element:N}}}return{action:null,interactable:null,element:null}}function $t(a,t,o,i,s){var d=[],g=[],m=i;function T(N){d.push(N),g.push(m)}for(;B.element(m);){d=[],g=[],s.interactables.forEachMatch(m,T);var $=Mt(a,t,o,d,g,i,s);if($.action&&!$.interactable.options[$.action.name].manualStart)return $;m=lt(m)}return{action:null,interactable:null,element:null}}function Ht(a,t,o){var i=t.action,s=t.interactable,d=t.element;i=i||{name:null},a.interactable=s,a.element=d,gt(a.prepared,i),a.rect=s&&i.name?s.getRect(d):null,Ca(a,o),o.fire("autoStart:prepared",{interaction:a})}function Gt(a,t,o,i){var s=a.options,d=s[o.name].max,g=s[o.name].maxPerElement,m=i.autoStart.maxInteractions,T=0,$=0,N=0;if(!(d&&g&&m))return!1;for(var Z=0,xe=i.interactions.list;Z<xe.length;Z++){var je=xe[Z],Re=je.prepared.name;if(je.interacting()&&(++T>=m||je.interactable===a&&(($+=Re===o.name?1:0)>=d||je.element===t&&(N++,Re===o.name&&N>=g))))return!1}return m>0}function Qt(a,t){return B.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function Rt(a,t,o){var i=o.autoStart.cursorElement;i&&i!==a&&(i.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Ca(a,t){var o=a.interactable,i=a.element,s=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var d="";if(s.name){var g=o.options[s.name].cursorChecker;d=B.func(g)?g(s,o,i,a._interacting):t.actions.map[s.name].getCursor(s)}Rt(a.element,d||"",t)}else t.autoStart.cursorElement&&Rt(t.autoStart.cursorElement,"",t)}var Va={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(Wt),o.base.actionChecker=null,o.base.styleCursor=!0,S(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(i){return Qt(i,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Gt,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,i=a.pointer,s=a.event,d=a.eventTarget;o.interacting()||Ht(o,$t(o,i,s,d,t),t)},"interactions:move":function(a,t){(function(o,i){var s=o.interaction,d=o.pointer,g=o.event,m=o.eventTarget;s.pointerType!=="mouse"||s.pointerIsDown||s.interacting()||Ht(s,$t(s,d,g,m,i),i)})(a,t),function(o,i){var s=o.interaction;if(s.pointerIsDown&&!s.interacting()&&s.pointerWasMoved&&s.prepared.name){i.fire("autoStart:before-start",o);var d=s.interactable,g=s.prepared.name;g&&d&&(d.options[g].manualStart||!Gt(d,s.element,s.prepared,i)?s.stop():(s.start(s.prepared,d,s.element),Ca(s,i)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,i=o.interactable;i&&i.options.styleCursor&&Rt(o.element,"",t)}},maxInteractions:Qt,withinInteractionLimit:Gt,validateAction:yt},va=Va,Oa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,i=a.eventTarget,s=a.dx,d=a.dy;if(o.prepared.name==="drag"){var g=Math.abs(s),m=Math.abs(d),T=o.interactable.options.drag,$=T.startAxis,N=g>m?"x":g<m?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&$!=="xy"&&$!==N){o.prepared.name=null;for(var Z=i,xe=function(Re){if(Re!==o.interactable){var He=o.interactable.options.drag;if(!He.manualStart&&Re.testIgnoreAllow(He,Z,i)){var it=Re.getAction(o.downPointer,o.downEvent,o,Z);if(it&&it.name==="drag"&&function(ot,mt){if(!mt)return!1;var St=mt.options.drag.startAxis;return ot==="xy"||St==="xy"||St===ot}(N,Re)&&va.validateAction(it,Re,Z,i,t))return Re}}};B.element(Z);){var je=t.interactables.forEachMatch(Z,xe);if(je){o.prepared.name="drag",o.interactable=je,o.element=Z;break}Z=lt(Z)}}}}}};function ga(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var Ma={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(va),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=ga(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;ga(t)>0&&(t.prepared.name=null)}},getHoldDuration:ga},za=Ma,Fa={id:"auto-start",install:function(a){a.usePlugin(va),a.usePlugin(za),a.usePlugin(Oa)}},Ra=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):B.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function La(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Da={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=Ra,t.prototype.checkAndPreventDefault=function(o){return function(i,s,d){var g=i.options.preventDefault;if(g!=="never")if(g!=="always"){if(s.events.supportsPassive&&/^touch(start|move)$/.test(d.type)){var m=R(d.target).document,T=s.getDocOptions(m);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(d.type)||B.element(d.target)&&q(d.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||d.preventDefault()}else d.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var i=0,s=a.interactions.list;i<s.length;i++){var d=s[i];if(d.element&&(d.element===o.target||he(d.element,o.target)))return void d.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=La,a},{})};function pa(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function sa(a){var t={};for(var o in a){var i=a[o];B.plainObject(i)?t[o]=sa(i):B.array(i)?t[o]=ye(i):t[o]=i}return t}var ma=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=fa(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(a,[{key:"start",value:function(t,o){var i,s,d=t.phase,g=this.interaction,m=function($){var N=$.interactable.options[$.prepared.name],Z=N.modifiers;return Z&&Z.length?Z:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(xe){var je=N[xe];return je&&je.enabled&&{options:je,methods:je._methods}}).filter(function(xe){return!!xe})}(g);this.prepareStates(m),this.startEdges=S({},g.edges),this.edges=S({},this.startEdges),this.startOffset=(i=g.rect,s=o,i?{left:s.x-i.left,top:s.y-i.top,right:i.right-s.x,bottom:i.bottom-s.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:d,pageCoords:o,preEnd:!1});return this.result=fa(),this.startAll(T),this.result=this.setAll(T)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,i=this.states;o<i.length;o++){var s=i[o];s.methods.start&&(t.state=s,s.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,i=t.preEnd,s=t.skipModifiers,d=t.rect,g=t.edges;t.coords=S({},t.pageCoords),t.rect=S({},d),t.edges=S({},g);for(var m=s?this.states.slice(s):this.states,T=fa(t.coords,t.rect),$=0;$<m.length;$++){var N,Z=m[$],xe=Z.options,je=S({},t.coords),Re=null;(N=Z.methods)!=null&&N.set&&this.shouldDo(xe,i,o)&&(t.state=Z,Re=Z.methods.set(t),Q(t.edges,t.rect,{x:t.coords.x-je.x,y:t.coords.y-je.y})),T.eventProps.push(Re)}S(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-d.left,T.rectDelta.right=t.rect.right-d.right,T.rectDelta.top=t.rect.top-d.top,T.rectDelta.bottom=t.rect.bottom-d.bottom;var He=this.result.coords,it=this.result.rect;if(He&&it){var ot=T.rect.left!==it.left||T.rect.right!==it.right||T.rect.top!==it.top||T.rect.bottom!==it.bottom;T.changed=ot||He.x!==T.coords.x||He.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,i=t.phase,s=o.coords.cur,d=o.coords.start,g=this.result,m=this.startDelta,T=g.delta;i==="start"&&S(this.startDelta,g.delta);for(var $=0,N=[[d,m],[s,T]];$<N.length;$++){var Z=N[$],xe=Z[0],je=Z[1];xe.page.x+=je.x,xe.page.y+=je.y,xe.client.x+=je.x,xe.client.y+=je.y}var Re=this.result.rectDelta,He=t.rect||o.rect;He.left+=Re.left,He.right+=Re.right,He.top+=Re.top,He.bottom+=Re.bottom,He.width=He.right-He.left,He.height=He.bottom-He.top}},{key:"setAndApply",value:function(t){var o=this.interaction,i=t.phase,s=t.preEnd,d=t.skipModifiers,g=this.setAll(this.fillArg({preEnd:s,phase:i,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=g,!g.changed&&(!d||d<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var m=o.coords.cur.page,T={x:t.modifiedCoords.x-m.x,y:t.modifiedCoords.y-m.y};g.coords.x+=T.x,g.coords.y+=T.y,g.delta.x+=T.x,g.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,i=t.event,s=this.states;if(s&&s.length){for(var d=!1,g=0;g<s.length;g++){var m=s[g];t.state=m;var T=m.options,$=m.methods,N=$.beforeEnd&&$.beforeEnd(t);if(N)return this.endResult=N,!1;d=d||!d&&this.shouldDo(T,!0,t.phase,!0)}d&&o.move({event:i,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var i=S({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(i);for(var s=0,d=this.states;s<d.length;s++){var g=d[s];i.state=g,g.methods.stop&&g.methods.stop(i)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var i=t[o],s=i.options,d=i.methods,g=i.name;this.states.push({options:s,methods:d,index:o,name:g})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,i=o.coords,s=o.rect,d=o.modification;if(d.result){for(var g=d.startDelta,m=d.result,T=m.delta,$=m.rectDelta,N=0,Z=[[i.start,g],[i.cur,T]];N<Z.length;N++){var xe=Z[N],je=xe[0],Re=xe[1];je.page.x-=Re.x,je.page.y-=Re.y,je.client.x-=Re.x,je.client.y-=Re.y}s.left-=$.left,s.right-=$.right,s.top-=$.top,s.bottom-=$.bottom}}},{key:"shouldDo",value:function(t,o,i,s){return!(!t||t.enabled===!1||s&&!t.endOnly||t.endOnly&&!o||i==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return sa(o)}),this.result=fa(S({},t.result.coords),S({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function fa(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function na(a,t){var o=a.defaults,i={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},s=function(d){var g=d||{};for(var m in g.enabled=g.enabled!==!1,o)m in g||(g[m]=o[m]);var T={options:g,methods:i,name:t,enable:function(){return g.enabled=!0,T},disable:function(){return g.enabled=!1,T}};return T};return t&&typeof t=="string"&&(s._defaults=o,s._methods=i),s}function ua(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Pa={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new ma(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,i=o.setAndApply(a);return t.edges=o.edges,i},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,i=o.beforeEnd(a);return t.edges=o.startEdges,i},"interactions:action-start":ua,"interactions:action-move":ua,"interactions:action-end":ua,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},_a=Pa,Ea={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},ya=function(a){w(o,a);var t=G(o);function o(i,s,d,g,m,T,$){var N;u(this,o),(N=t.call(this,i)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,m=m||i.element;var Z=i.interactable,xe=(Z&&Z.options||Ea).deltaSource,je=re(Z,m,d),Re=g==="start",He=g==="end",it=Re?F(N):i.prevEvent,ot=Re?i.coords.start:He?{page:it.page,client:it.client,timeStamp:i.coords.cur.timeStamp}:i.coords.cur;return N.page=S({},ot.page),N.client=S({},ot.client),N.rect=S({},i.rect),N.timeStamp=ot.timeStamp,He||(N.page.x-=je.x,N.page.y-=je.y,N.client.x-=je.x,N.client.y-=je.y),N.ctrlKey=s.ctrlKey,N.altKey=s.altKey,N.shiftKey=s.shiftKey,N.metaKey=s.metaKey,N.button=s.button,N.buttons=s.buttons,N.target=m,N.currentTarget=m,N.preEnd=T,N.type=$||d+(g||""),N.interactable=Z,N.t0=Re?i.pointers[i.pointers.length-1].downTime:it.t0,N.x0=i.coords.start.page.x-je.x,N.y0=i.coords.start.page.y-je.y,N.clientX0=i.coords.start.client.x-je.x,N.clientY0=i.coords.start.client.y-je.y,N.delta=Re||He?{x:0,y:0}:{x:N[xe].x-it[xe].x,y:N[xe].y-it[xe].y},N.dt=i.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=S({},i.coords.velocity[xe]),N.speed=st(N.velocity.x,N.velocity.y),N.swipe=He||g==="inertiastart"?N.getSwipe():null,N}return h(o,[{key:"getSwipe",value:function(){var i=this._interaction;if(i.prevEvent.speed<600||this.timeStamp-i.prevEvent.timeStamp>150)return null;var s=180*Math.atan2(i.prevEvent.velocityY,i.prevEvent.velocityX)/Math.PI;s<0&&(s+=360);var d=112.5<=s&&s<247.5,g=202.5<=s&&s<337.5;return{up:g,down:!g&&22.5<=s&&s<157.5,left:d,right:!d&&(292.5<=s||s<67.5),angle:s,speed:i.prevEvent.speed,velocity:{x:i.prevEvent.velocityX,y:i.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(be);Object.defineProperties(ya.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var $a=h(function a(t,o,i,s,d){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=i,this.downTime=s,this.downTarget=d}),ja=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),Sa=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Ua=0,Ka=function(){function a(t){var o=this,i=t.pointerType,s=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ut(function(N){this.move(N)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ua++,this._scopeFire=s,this.pointerType=i;var d=this;this._proxy={};var g=function(N){Object.defineProperty(o._proxy,N,{get:function(){return d[N]}})};for(var m in ja)g(m);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return d[N].apply(d,arguments)}})};for(var $ in Sa)T($);this._scopeFire("interactions:new",{interaction:this})}return h(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,i){var s=this.updatePointer(t,o,i,!0),d=this.pointers[s];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:i,pointerIndex:s,pointerInfo:d,type:"down",interaction:this})}},{key:"start",value:function(t,o,i){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(gt(this.prepared,t),this.interactable=o,this.element=i,this.rect=o.getRect(i),this.edges=this.prepared.edges?S({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,i){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,i,!1);var s,d,g=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(s=this.coords.cur.client.x-this.coords.start.client.x,d=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=st(s,d)>this.pointerMoveTolerance);var m,T,$,N=this.getPointerIndex(t),Z={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:i,dx:s,dy:d,duplicate:g,interaction:this};g||(m=this.coords.velocity,T=this.coords.delta,$=Math.max(T.timeStamp/1e3,.001),m.page.x=T.page.x/$,m.page.y=T.page.y/$,m.client.x=T.client.x/$,m.client.y=T.client.y/$,m.timeStamp=$),this._scopeFire("interactions:move",Z),g||this.simulation||(this.interacting()&&(Z.type=null,this.move(Z)),this.pointerWasMoved&&j(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Y(this.coords.delta),(t=S({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,i,s){var d=this.getPointerIndex(t);d===-1&&(d=this.updatePointer(t,o,i,!1));var g=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:t,pointerIndex:d,pointerInfo:this.pointers[d],event:o,eventTarget:i,type:g,curEventTarget:s,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=E(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:P(this.pointers,function(i){return i.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,i,s){var d,g,m,T=E(t),$=this.getPointerIndex(t),N=this.pointers[$];return s=s!==!1&&(s||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new $a(T,t,o,null,null),$=this.pointers.length,this.pointers.push(N)),J(this.coords.cur,this.pointers.map(function(Z){return Z.pointer}),this._now()),d=this.coords.delta,g=this.coords.prev,m=this.coords.cur,d.page.x=m.page.x-g.page.x,d.page.y=m.page.y-g.page.y,d.client.x=m.client.x-g.client.x,d.client.y=m.client.y-g.client.y,d.timeStamp=m.timeStamp-g.timeStamp,s&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=i,_(this.downPointer,t),this.interacting()||(j(this.coords.start,this.coords.cur),j(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,i),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:i,down:s,pointerInfo:N,pointerIndex:$,interaction:this}),$}},{key:"removePointer",value:function(t,o){var i=this.getPointerIndex(t);if(i!==-1){var s=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:i,pointerInfo:s,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,i){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=i}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,i,s){return new ya(this,t,this.prepared.name,o,this.element,i,s)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,i=t.phase,s=t.preEnd,d=t.type,g=this.rect;if(g&&i==="move"&&(Q(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(i),t)===!1)return!1;var m=t.iEvent=this._createPreparedEvent(o,i,s,d);return this._scopeFire("interactions:action-".concat(i),t),i==="start"&&(this.prevEvent=m),this._fireEvent(m),this._scopeFire("interactions:after-action-".concat(i),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function Et(a){Zt(a.interaction)}function Zt(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return Ot(a.coords.cur,t),Ot(a.coords.delta,t),Q(a.edges,a.rect,t),t.x=0,t.y=0,!0}function bt(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Ot(a,t){var o=a.page,i=a.client,s=t.x,d=t.y;o.x+=s,o.y+=d,i.x+=s,i.y+=d}Sa.offsetBy="";var kt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=bt},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(Ot(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":Et,"interactions:before-action-move":Et,"interactions:before-action-end":function(a){var t=a.interaction;if(Zt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},qt=kt,_t=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return h(a,[{key:"start",value:function(t){var o=this.interaction,i=Dt(o);if(!i||!i.enabled)return!1;var s=o.coords.velocity.client,d=st(s.x,s.y),g=this.modification||(this.modification=new ma(o));if(g.copyFrom(o.modification),this.t0=o._now(),this.allowResume=i.allowResume,this.v0=d,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=g.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&d>i.minSpeed&&d>i.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,i=Dt(this.interaction),s=i.resistance,d=-Math.log(i.endSpeed/this.v0)/s;this.targetOffset={x:(o.x-d)/s,y:(o.y-d)/s},this.te=d,this.lambda_v0=s/this.v0,this.one_ve_v0=1-i.endSpeed/this.v0;var g=this.modification,m=this.modifierArg;m.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(m),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=We.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,i,s,d,g,m,T=this,$=this.interaction,N=Dt($).resistance,Z=($._now()-this.t0)/1e3;if(Z<this.te){var xe,je=1-(Math.exp(-N*Z)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,i=this.targetOffset.x,s=this.targetOffset.y,d=this.modifiedOffset.x,g=this.modifiedOffset.y,xe={x:Vt(m=je,t,i,d),y:Vt(m,o,s,g)}):xe={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var Re={x:xe.x-this.currentOffset.x,y:xe.y-this.currentOffset.y};this.currentOffset.x+=Re.x,this.currentOffset.y+=Re.y,$.offsetBy(Re),$.move(),this.onNextFrame(function(){return T.inertiaTick()})}else $.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,i=o._now()-this.t0,s=Dt(o).smoothEndDuration;if(i<s){var d={x:Ft(i,0,this.targetOffset.x,s),y:Ft(i,0,this.targetOffset.y,s)},g={x:d.x-this.currentOffset.x,y:d.y-this.currentOffset.y};this.currentOffset.x+=g.x,this.currentOffset.y+=g.y,o.offsetBy(g),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,i=t.event,s=t.eventTarget,d=this.interaction;d.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),d.updatePointer(o,i,s,!0),d._doPhase({interaction:d,event:i,phase:"resume"}),j(d.coords.prev,d.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,We.cancel(this.timeout)}}]),a}();function Dt(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var zt={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(qt),a.usePlugin(_a),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new _t(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,i=t.inertia;if(i.active)for(var s=o;B.element(s);){if(s===t.element){i.resume(a);break}s=lt(s)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":ua,"interactions:action-inertiastart":ua,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Vt(a,t,o,i){var s=1-a;return s*s*t+2*s*a*o+a*a*i}function Ft(a,t,o,i){return-o*(a/=i)*(a-2)+t}var Xt=zt;function oa(a,t){for(var o=0;o<t.length;o++){var i=t[o];if(a.immediatePropagationStopped)break;i(a)}}var Ta=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=S({},t||{})}return h(a,[{key:"fire",value:function(t){var o,i=this.global;(o=this.types[t.type])&&oa(t,o),!t.propagationStopped&&i&&(o=i[t.type])&&oa(t,o)}},{key:"on",value:function(t,o){var i=Se(t,o);for(t in i)this.types[t]=me(this.types[t]||[],i[t])}},{key:"off",value:function(t,o){var i=Se(t,o);for(t in i){var s=this.types[t];if(s&&s.length)for(var d=0,g=i[t];d<g.length;d++){var m=g[d],T=s.indexOf(m);T!==-1&&s.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Wa=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,_(this,t)}return h(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Ia(a){return B.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Ha(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var Dn={id:"events",install:function(a){var t,o=[],i={},s=[],d={add:g,remove:m,addDelegate:function(N,Z,xe,je,Re){var He=Ia(Re);if(!i[xe]){i[xe]=[];for(var it=0;it<s.length;it++){var ot=s[it];g(ot,xe,T),g(ot,xe,$,!0)}}var mt=i[xe],St=Te(mt,function(Nt){return Nt.selector===N&&Nt.context===Z});St||(St={selector:N,context:Z,listeners:[]},mt.push(St)),St.listeners.push({func:je,options:He})},removeDelegate:function(N,Z,xe,je,Re){var He,it=Ia(Re),ot=i[xe],mt=!1;if(ot)for(He=ot.length-1;He>=0;He--){var St=ot[He];if(St.selector===N&&St.context===Z){for(var Nt=St.listeners,xt=Nt.length-1;xt>=0;xt--){var Tt=Nt[xt];if(Tt.func===je&&Ha(Tt.options,it)){Nt.splice(xt,1),Nt.length||(ot.splice(He,1),m(Z,xe,T),m(Z,xe,$,!0)),mt=!0;break}}if(mt)break}}},delegateListener:T,delegateUseCapture:$,delegatedEvents:i,documents:s,targets:o,supportsOptions:!1,supportsPassive:!1};function g(N,Z,xe,je){if(N.addEventListener){var Re=Ia(je),He=Te(o,function(it){return it.eventTarget===N});He||(He={eventTarget:N,events:{}},o.push(He)),He.events[Z]||(He.events[Z]=[]),Te(He.events[Z],function(it){return it.func===xe&&Ha(it.options,Re)})||(N.addEventListener(Z,xe,d.supportsOptions?Re:Re.capture),He.events[Z].push({func:xe,options:Re}))}}function m(N,Z,xe,je){if(N.addEventListener&&N.removeEventListener){var Re=P(o,function(ta){return ta.eventTarget===N}),He=o[Re];if(He&&He.events)if(Z!=="all"){var it=!1,ot=He.events[Z];if(ot){if(xe==="all"){for(var mt=ot.length-1;mt>=0;mt--){var St=ot[mt];m(N,Z,St.func,St.options)}return}for(var Nt=Ia(je),xt=0;xt<ot.length;xt++){var Tt=ot[xt];if(Tt.func===xe&&Ha(Tt.options,Nt)){N.removeEventListener(Z,xe,d.supportsOptions?Nt:Nt.capture),ot.splice(xt,1),ot.length===0&&(delete He.events[Z],it=!0);break}}}it&&!Object.keys(He.events).length&&o.splice(Re,1)}else for(Z in He.events)He.events.hasOwnProperty(Z)&&m(N,Z,"all")}}function T(N,Z){for(var xe=Ia(Z),je=new Wa(N),Re=i[N.type],He=ce(N)[0],it=He;B.element(it);){for(var ot=0;ot<Re.length;ot++){var mt=Re[ot],St=mt.selector,Nt=mt.context;if(q(it,St)&&he(Nt,He)&&he(Nt,it)){var xt=mt.listeners;je.currentTarget=it;for(var Tt=0;Tt<xt.length;Tt++){var ta=xt[Tt];Ha(ta.options,xe)&&ta.func(je)}}}it=lt(it)}}function $(N){return T(N,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return d.supportsOptions=!0},get passive(){return d.supportsPassive=!0}}),a.events=d,d}},an={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=an.methodOrder;t<o.length;t++){var i=o[t],s=an[i](a);if(s)return s}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,i=a.eventTarget,s=a.scope;if(!/down|start/i.test(o))return null;for(var d=0,g=s.interactions.list;d<g.length;d++){var m=g[d],T=i;if(m.simulation&&m.simulation.allowResume&&m.pointerType===t)for(;T;){if(T===m.element)return m;T=lt(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,i=a.pointerType,s=a.eventType,d=a.scope;if(i!=="mouse"&&i!=="pen")return null;for(var g=0,m=d.interactions.list;g<m.length;g++){var T=m[g];if(T.pointerType===i){if(T.simulation&&!dn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var $=0,N=d.interactions.list;$<N.length;$++){var Z=N[$];if(!(Z.pointerType!==i||/down/i.test(s)&&Z.simulation))return Z}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,i=a.scope.interactions.list;o<i.length;o++){var s=i[o];if(dn(s,t))return s}return null},idle:function(a){for(var t=a.pointerType,o=0,i=a.scope.interactions.list;o<i.length;o++){var s=i[o];if(s.pointers.length===1){var d=s.interactable;if(d&&(!d.options.gesture||!d.options.gesture.enabled))continue}else if(s.pointers.length>=2)continue;if(!s.interacting()&&t===s.pointerType)return s}return null}};function dn(a,t){return a.pointers.some(function(o){return o.id===t})}var nn=an,ca=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function qa(a,t){return function(o){var i=t.interactions.list,s=X(o),d=ce(o),g=d[0],m=d[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var $=0,N=o.changedTouches;$<N.length;$++){var Z=N[$],xe={pointer:Z,pointerId:E(Z),pointerType:s,eventType:o.type,eventTarget:g,curEventTarget:m,scope:t},je=on(xe);T.push([xe.pointer,xe.eventTarget,xe.curEventTarget,je])}}else{var Re=!1;if(!ie.supportsPointerEvent&&/mouse/.test(o.type)){for(var He=0;He<i.length&&!Re;He++)Re=i[He].pointerType!=="mouse"&&i[He].pointerIsDown;Re=Re||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Re){var it={pointer:o,pointerId:E(o),pointerType:s,eventType:o.type,curEventTarget:m,eventTarget:g,scope:t},ot=on(it);T.push([it.pointer,it.eventTarget,it.curEventTarget,ot])}}for(var mt=0;mt<T.length;mt++){var St=T[mt],Nt=St[0],xt=St[1],Tt=St[2];St[3][a](Nt,o,xt,Tt)}}}function on(a){var t=a.pointerType,o=a.scope,i={interaction:nn.search(a),searchDetails:a};return o.fire("interactions:find",i),i.interaction||o.interactions.new({pointerType:t})}function ra(a,t){var o=a.doc,i=a.scope,s=a.options,d=i.interactions.docEvents,g=i.events,m=g[t];for(var T in i.browser.isIOS&&!s.events&&(s.events={passive:!1}),g.delegatedEvents)m(o,T,g.delegateListener),m(o,T,g.delegateUseCapture,!0);for(var $=s&&s.events,N=0;N<d.length;N++){var Z=d[N];m(o,Z.type,Z.listener,$)}}var _n={id:"core/interactions",install:function(a){for(var t={},o=0;o<ca.length;o++){var i=ca[o];t[i]=qa(i,a)}var s,d=ie.pEventTypes;function g(){for(var m=0,T=a.interactions.list;m<T.length;m++){var $=T[m];if($.pointerIsDown&&$.pointerType==="touch"&&!$._interacting)for(var N=function(){var je=xe[Z];a.documents.some(function(Re){return he(Re.doc,je.downTarget)})||$.removePointer(je.pointer,je.event)},Z=0,xe=$.pointers;Z<xe.length;Z++)N()}}(s=z.PointerEvent?[{type:d.down,listener:g},{type:d.down,listener:t.pointerDown},{type:d.move,listener:t.pointerMove},{type:d.up,listener:t.pointerUp},{type:d.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:g},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(m){for(var T=0,$=a.interactions.list;T<$.length;T++)$[T].documentBlur(m)}}),a.prevTouchTime=0,a.Interaction=function(m){w($,m);var T=G($);function $(){return u(this,$),T.apply(this,arguments)}return h($,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(N){a.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return a.now()}}]),$}(Ka),a.interactions={list:[],new:function(m){m.scopeFire=function($,N){return a.fire($,N)};var T=new a.Interaction(m);return a.interactions.list.push(T),T},listeners:t,docEvents:s,pointerMoveTolerance:1},a.usePlugin(Da)},listeners:{"scope:add-document":function(a){return ra(a,"add")},"scope:remove-document":function(a){return ra(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,i=t.interactions.list.length-1;i>=0;i--){var s=t.interactions.list[i];s.interactable===o&&(s.stop(),t.fire("interactions:destroy",{interaction:s}),s.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(i,1))}}},onDocSignal:ra,doOnInteractions:qa,methodNames:ca},Ba=_n,Na=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(Na||{}),Zr=function(){function a(t,o,i,s){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Ta,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||i,this._win=R(Ee(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=s,this.set(o)}return h(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return B.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),B.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),B.func(o.onend)&&this.on("".concat(t,"end"),o.onend),B.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,i){var s,d=this,g=(s=this._actions.map[t])==null?void 0:s.filterEventType,m=function(T){return(g==null||g(T))&&pa(T,d._actions)};(B.array(o)||B.object(o))&&this._onOff(Na.Off,t,o,void 0,m),(B.array(i)||B.object(i))&&this._onOff(Na.On,t,i,void 0,m)}},{key:"setPerAction",value:function(t,o){var i=this._defaults;for(var s in o){var d=s,g=this.options[t],m=o[d];d==="listeners"&&this.updatePerActionListeners(t,g.listeners,m),B.array(m)?g[d]=ye(m):B.plainObject(m)?(g[d]=S(g[d]||{},sa(m)),B.object(i.perAction[d])&&"enabled"in i.perAction[d]&&(g[d].enabled=m.enabled!==!1)):B.bool(m)&&B.object(i.perAction[d])?g[d].enabled=m:g[d]=m}}},{key:"getRect",value:function(t){return t=t||(B.element(this.target)?this.target:null),B.string(this.target)&&(t=t||this._context.querySelector(this.target)),tt(t)}},{key:"rectChecker",value:function(t){var o=this;return B.func(t)?(this.getRect=function(i){var s=S({},t.apply(o,i));return"width"in s||(s.width=s.right-s.left,s.height=s.bottom-s.top),s},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(Ee(o)||B.object(o)){for(var i in this.options[t]=o,this._actions.map)this.options[i][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return B.string(t)?Array.from(this._context.querySelectorAll(t)):B.func(t)&&t.getAllElements?t.getAllElements():B.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||he(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,i){return!this.testIgnore(t.ignoreFrom,o,i)&&this.testAllow(t.allowFrom,o,i)}},{key:"testAllow",value:function(t,o,i){return!t||!!B.element(i)&&(B.string(t)?we(i,t,o):!!B.element(t)&&he(t,i))}},{key:"testIgnore",value:function(t,o,i){return!(!t||!B.element(i))&&(B.string(t)?we(i,t,o):!!B.element(t)&&he(t,i))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,i,s,d){B.object(o)&&!B.array(o)&&(s=i,i=null);var g=Se(o,i,d);for(var m in g){m==="wheel"&&(m=ie.wheelEvent);for(var T=0,$=g[m];T<$.length;T++){var N=$[T];pa(m,this._actions)?this.events[t===Na.On?"on":"off"](m,N):B.string(this.target)?this._scopeEvents[t===Na.On?"addDelegate":"removeDelegate"](this.target,this._context,m,N,s):this._scopeEvents[t===Na.On?"add":"remove"](this.target,m,N,s)}}return this}},{key:"on",value:function(t,o,i){return this._onOff(Na.On,t,o,i)}},{key:"off",value:function(t,o,i){return this._onOff(Na.Off,t,o,i)}},{key:"set",value:function(t){var o=this._defaults;for(var i in B.object(t)||(t={}),this.options=sa(o.base),this._actions.methodDict){var s=i,d=this._actions.methodDict[s];this.options[s]={},this.setPerAction(s,S(S({},o.perAction),o.actions[s])),this[d](t[s])}for(var g in t)g!=="getRect"?B.func(this[g])&&this[g](t[g]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(B.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],i=o.length-1;i>=0;i--){var s=o[i],d=s.selector,g=s.context,m=s.listeners;d===this.target&&g===this._context&&o.splice(i,1);for(var T=m.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,m[T][0],m[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),Qr=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(i){var s=i.interactable,d=s.target,g=B.string(d)?o.selectorMap[d]:d[o.scope.id],m=P(g,function(T){return T===s});g.splice(m,1)}})}return h(a,[{key:"new",value:function(t,o){o=S(o||{},{actions:this.scope.actions});var i=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),B.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(i)):(i.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:t,options:o,interactable:i,win:this.scope._win}),i}},{key:"getExisting",value:function(t,o){var i=o&&o.context||this.scope.document,s=B.string(t),d=s?this.selectorMap[t]:t[this.scope.id];if(d)return Te(d,function(g){return g._context===i&&(s||g.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var i=0,s=this.list;i<s.length;i++){var d=s[i],g=void 0;if((B.string(d.target)?B.element(t)&&q(t,d.target):t===d.target)&&d.inContext(t)&&(g=o(d)),g!==void 0)return g}}}]),a}(),ei=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ie,this.defaults=sa(Ea),this.Eventable=Ta,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(i){var s=function d(g,m){var T=i.interactables.getExisting(g,m);return T||((T=i.interactables.new(g,m)).events.global=d.globalEvents),T};return s.getPointerAverage=K,s.getTouchBBox=De,s.getTouchDistance=te,s.getTouchAngle=W,s.getElementRect=tt,s.getElementClientRect=Fe,s.matchesSelector=q,s.closest=et,s.globalEvents={},s.version="1.10.27",s.scope=i,s.use=function(d,g){return this.scope.usePlugin(d,g),this},s.isSet=function(d,g){return!!this.scope.interactables.get(d,g&&g.context)},s.on=ut(function(d,g,m){if(B.string(d)&&d.search(" ")!==-1&&(d=d.trim().split(/ +/)),B.array(d)){for(var T=0,$=d;T<$.length;T++){var N=$[T];this.on(N,g,m)}return this}if(B.object(d)){for(var Z in d)this.on(Z,d[Z],g);return this}return pa(d,this.scope.actions)?this.globalEvents[d]?this.globalEvents[d].push(g):this.globalEvents[d]=[g]:this.scope.events.add(this.scope.document,d,g,{options:m}),this},"The interact.on() method is being deprecated"),s.off=ut(function(d,g,m){if(B.string(d)&&d.search(" ")!==-1&&(d=d.trim().split(/ +/)),B.array(d)){for(var T=0,$=d;T<$.length;T++){var N=$[T];this.off(N,g,m)}return this}if(B.object(d)){for(var Z in d)this.off(Z,d[Z],g);return this}var xe;return pa(d,this.scope.actions)?d in this.globalEvents&&(xe=this.globalEvents[d].indexOf(g))!==-1&&this.globalEvents[d].splice(xe,1):this.scope.events.remove(this.scope.document,d,g,m),this},"The interact.off() method is being deprecated"),s.debug=function(){return this.scope},s.supportsTouch=function(){return ie.supportsTouch},s.supportsPointerEvent=function(){return ie.supportsPointerEvent},s.stop=function(){for(var d=0,g=this.scope.interactions.list;d<g.length;d++)g[d].stop();return this},s.pointerMoveTolerance=function(d){return B.number(d)?(this.scope.interactions.pointerMoveTolerance=d,this):this.scope.interactions.pointerMoveTolerance},s.addDocument=function(d,g){this.scope.addDocument(d,g)},s.removeDocument=function(d){this.scope.removeDocument(d)},s}(this),this.InteractEvent=ya,this.Interactable=void 0,this.interactables=new Qr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(i){return t.removeDocument(i.target)};var o=this;this.Interactable=function(i){w(d,i);var s=G(d);function d(){return u(this,d),s.apply(this,arguments)}return h(d,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(g){return M(C(d.prototype),"set",this).call(this,g),o.fire("interactable:set",{options:g,interactable:this}),this}},{key:"unset",value:function(){M(C(d.prototype),"unset",this).call(this);var g=o.interactables.list.indexOf(this);g<0||(o.interactables.list.splice(g,1),o.fire("interactable:unset",{interactable:this}))}}]),d}(Zr)}return h(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var i=0,s=this.listenerMaps;i<s.length;i++){var d=s[i].map[t];if(d&&d(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,i){return o.isInitialized=!0,B.window(i)&&x(i),z.init(i),ie.init(i),We.init(i),o.window=i,o.document=i.document,o.usePlugin(Ba),o.usePlugin(Dn),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var i=0,s=this.listenerMaps.length,d=t.before.reduce(function(m,T){return m[T]=!0,m[go(T)]=!0,m},{});i<s;i++){var g=this.listenerMaps[i].id;if(g&&(d[g]||d[go(g)]))break}this.listenerMaps.splice(i,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var i=R(t);o=o?S({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:i,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),i=R(t),s=this.documents[o].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:i,scope:this,options:s})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function go(a){return a&&a.replace(/\/.*$/,"")}var mo=new ei,ea=mo.interactStatic,ti=typeof globalThis<"u"?globalThis:window;mo.init(ti);var ai=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(i){var s=i[0],d=i[1];return s in a||d in a}),o=function(i,s){for(var d=a.range,g=a.limits,m=g===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:g,T=a.offset,$=T===void 0?{x:0,y:0}:T,N={range:d,grid:a,x:null,y:null},Z=0;Z<t.length;Z++){var xe=t[Z],je=xe[0],Re=xe[1],He=Math.round((i-$.x)/a[je]),it=Math.round((s-$.y)/a[Re]);N[je]=Math.max(m.left,Math.min(m.right,He*a[je]+$.x)),N[Re]=Math.max(m.top,Math.min(m.bottom,it*a[Re]+$.y))}return N};return o.grid=a,o.coordFields=t,o}}),ni={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=S(t.snappers||{},ai),t.createSnapGrid=t.snappers.grid}},oi=ni,ri={start:function(a){var t=a.state,o=a.rect,i=a.edges,s=a.pageCoords,d=t.options,g=d.ratio,m=d.enabled,T=t.options,$=T.equalDelta,N=T.modifiers;g==="preserve"&&(g=o.width/o.height),t.startCoords=S({},s),t.startRect=S({},o),t.ratio=g,t.equalDelta=$;var Z=t.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(t.xIsPrimaryAxis=!(!i.left&&!i.right),t.equalDelta){var xe=(Z.left?1:-1)*(Z.top?1:-1);t.edgeSign={x:xe,y:xe}}else t.edgeSign={x:Z.left?-1:1,y:Z.top?-1:1};if(m!==!1&&S(i,Z),N!=null&&N.length){var je=new ma(a.interaction);je.copyFrom(a.interaction.modification),je.prepareStates(N),t.subModification=je,je.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,i=a.coords,s=t.linkedEdges,d=S({},i),g=t.equalDelta?ii:li;if(S(a.edges,s),g(t,t.xIsPrimaryAxis,i,o),!t.subModification)return null;var m=S({},o);Q(s,m,{x:i.x-d.x,y:i.y-d.y});var T=t.subModification.setAll(r(r({},a),{},{rect:m,edges:s,pageCoords:i,prevCoords:i,prevRect:m})),$=T.delta;return T.changed&&(g(t,Math.abs($.x)>Math.abs($.y),T.coords,T.rect),S(i,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ii(a,t,o){var i=a.startCoords,s=a.edgeSign;t?o.y=i.y+(o.x-i.x)*s.y:o.x=i.x+(o.y-i.y)*s.x}function li(a,t,o,i){var s=a.startRect,d=a.startCoords,g=a.ratio,m=a.edgeSign;if(t){var T=i.width/g;o.y=d.y+(T-s.height)*m.y}else{var $=i.height*g;o.x=d.x+($-s.width)*m.x}}var si=na(ri,"aspectRatio"),yo=function(){};yo._defaults={};var En=yo;function Ga(a,t,o){return B.func(a)?Ze(a,t.interactable,t.element,[o.x,o.y,t]):Ze(a,t.interactable,t.element)}var Sn={start:function(a){var t=a.rect,o=a.startOffset,i=a.state,s=a.interaction,d=a.pageCoords,g=i.options,m=g.elementRect,T=S({left:0,top:0,right:0,bottom:0},g.offset||{});if(t&&m){var $=Ga(g.restriction,s,d);if($){var N=$.right-$.left-t.width,Z=$.bottom-$.top-t.height;N<0&&(T.left+=N,T.right+=N),Z<0&&(T.top+=Z,T.bottom+=Z)}T.left+=o.left-t.width*m.left,T.top+=o.top-t.height*m.top,T.right+=o.right-t.width*(1-m.right),T.bottom+=o.bottom-t.height*(1-m.bottom)}i.offset=T},set:function(a){var t=a.coords,o=a.interaction,i=a.state,s=i.options,d=i.offset,g=Ga(s.restriction,o,t);if(g){var m=function(T){return!T||"left"in T&&"top"in T||((T=S({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(g);t.x=Math.max(Math.min(m.right-d.right,t.x),m.left+d.left),t.y=Math.max(Math.min(m.bottom-d.bottom,t.y),m.top+d.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ci=na(Sn,"restrict"),bo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},ko={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function xo(a,t){for(var o=0,i=["top","left","bottom","right"];o<i.length;o++){var s=i[o];s in a||(a[s]=t[s])}return a}var pn={noInner:bo,noOuter:ko,start:function(a){var t,o=a.interaction,i=a.startOffset,s=a.state,d=s.options;d&&(t=Ve(Ga(d.offset,o,o.coords.start.page))),t=t||{x:0,y:0},s.offset={top:t.y+i.top,left:t.x+i.left,bottom:t.y-i.bottom,right:t.x-i.right}},set:function(a){var t=a.coords,o=a.edges,i=a.interaction,s=a.state,d=s.offset,g=s.options;if(o){var m=S({},t),T=Ga(g.inner,i,m)||{},$=Ga(g.outer,i,m)||{};xo(T,bo),xo($,ko),o.top?t.y=Math.min(Math.max($.top+d.top,m.y),T.top+d.top):o.bottom&&(t.y=Math.max(Math.min($.bottom+d.bottom,m.y),T.bottom+d.bottom)),o.left?t.x=Math.min(Math.max($.left+d.left,m.x),T.left+d.left):o.right&&(t.x=Math.max(Math.min($.right+d.right,m.x),T.right+d.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ui=na(pn,"restrictEdges"),di=S({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Sn.defaults),pi=na({start:Sn.start,set:Sn.set,defaults:di},"restrictRect"),fi={width:-1/0,height:-1/0},hi={width:1/0,height:1/0},vi=na({start:function(a){return pn.start(a)},set:function(a){var t=a.interaction,o=a.state,i=a.rect,s=a.edges,d=o.options;if(s){var g=oe(Ga(d.min,t,a.coords))||fi,m=oe(Ga(d.max,t,a.coords))||hi;o.options={endOnly:d.endOnly,inner:S({},pn.noInner),outer:S({},pn.noOuter)},s.top?(o.options.inner.top=i.bottom-g.height,o.options.outer.top=i.bottom-m.height):s.bottom&&(o.options.inner.bottom=i.top+g.height,o.options.outer.bottom=i.top+m.height),s.left?(o.options.inner.left=i.right-g.width,o.options.outer.left=i.right-m.width):s.right&&(o.options.inner.right=i.left+g.width,o.options.outer.right=i.left+m.width),pn.set(a),o.options=d}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Gn={start:function(a){var t,o=a.interaction,i=a.interactable,s=a.element,d=a.rect,g=a.state,m=a.startOffset,T=g.options,$=T.offsetWithOrigin?function(xe){var je=xe.interaction.element,Re=Ve(Ze(xe.state.options.origin,null,null,[je])),He=Re||re(xe.interactable,je,xe.interaction.prepared.name);return He}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=Ze(T.offset,i,s,[o]);(t=Ve(N)||{x:0,y:0}).x+=$.x,t.y+=$.y}var Z=T.relativePoints;g.offsets=d&&Z&&Z.length?Z.map(function(xe,je){return{index:je,relativePoint:xe,x:m.left-d.width*xe.x+t.x,y:m.top-d.height*xe.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,i=a.state,s=i.options,d=i.offsets,g=re(t.interactable,t.element,t.prepared.name),m=S({},o),T=[];s.offsetWithOrigin||(m.x-=g.x,m.y-=g.y);for(var $=0,N=d;$<N.length;$++)for(var Z=N[$],xe=m.x-Z.x,je=m.y-Z.y,Re=0,He=s.targets.length;Re<He;Re++){var it=s.targets[Re],ot=void 0;(ot=B.func(it)?it(xe,je,t._proxy,Z,Re):it)&&T.push({x:(B.number(ot.x)?ot.x:xe)+Z.x,y:(B.number(ot.y)?ot.y:je)+Z.y,range:B.number(ot.range)?ot.range:s.range,source:it,index:Re,offset:Z})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},St=0;St<T.length;St++){var Nt=T[St],xt=Nt.range,Tt=Nt.x-m.x,ta=Nt.y-m.y,Ut=st(Tt,ta),ia=Ut<=xt;xt===1/0&&mt.inRange&&mt.range!==1/0&&(ia=!1),mt.target&&!(ia?mt.inRange&&xt!==1/0?Ut/xt<mt.distance/mt.range:xt===1/0&&mt.range!==1/0||Ut<mt.distance:!mt.inRange&&Ut<mt.distance)||(mt.target=Nt,mt.distance=Ut,mt.range=xt,mt.inRange=ia,mt.delta.x=Tt,mt.delta.y=ta)}return mt.inRange&&(o.x=mt.target.x,o.y=mt.target.y),i.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},gi=na(Gn,"snap"),Tn={start:function(a){var t=a.state,o=a.edges,i=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Gn.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,i=a.coords,s=o.options,d=o.offsets,g={x:i.x-d[0].x,y:i.y-d[0].y};o.options=S({},s),o.options.targets=[];for(var m=0,T=s.targets||[];m<T.length;m++){var $=T[m],N=void 0;if(N=B.func($)?$(g.x,g.y,t):$){for(var Z=0,xe=o.targetFields;Z<xe.length;Z++){var je=xe[Z],Re=je[0],He=je[1];if(Re in N||He in N){N.x=N[Re],N.y=N[He];break}}o.options.targets.push(N)}}var it=Gn.set(a);return o.options=s,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},mi=na(Tn,"snapSize"),Xn={aspectRatio:si,restrictEdges:ui,restrict:ci,restrictRect:pi,restrictSize:vi,snapEdges:na({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Tn.start(a)):null},set:Tn.set,defaults:S(sa(Tn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:gi,snapSize:mi,spring:En,avoid:En,transform:En,rubberband:En},yi={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(_a),a.usePlugin(oi),t.modifiers=Xn,Xn){var i=Xn[o],s=i._defaults,d=i._methods;s._methods=d,a.defaults.perAction[o]=s}}},bi=yi,wo=function(a){w(o,a);var t=G(o);function o(i,s,d,g,m,T){var $;if(u(this,o),_(F($=t.call(this,m)),d),d!==s&&_(F($),s),$.timeStamp=T,$.originalEvent=d,$.type=i,$.pointerId=E(s),$.pointerType=X(s),$.target=g,$.currentTarget=null,i==="tap"){var N=m.getPointerIndex(s);$.dt=$.timeStamp-m.pointers[N].downTime;var Z=$.timeStamp-m.tapTime;$.double=!!m.prevTap&&m.prevTap.type!=="doubletap"&&m.prevTap.target===$.target&&Z<500}else i==="doubletap"&&($.dt=s.timeStamp-m.tapTime,$.double=!0);return $}return h(o,[{key:"_subtractOrigin",value:function(i){var s=i.x,d=i.y;return this.pageX-=s,this.pageY-=d,this.clientX-=s,this.clientY-=d,this}},{key:"_addOrigin",value:function(i){var s=i.x,d=i.y;return this.pageX+=s,this.pageY+=d,this.clientX+=s,this.clientY+=d,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(be),fn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=fn,a.defaults.actions.pointerEvents=fn.defaults,S(a.actions.phaselessTypes,fn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,i=a.pointer,s=a.event,d=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&Yn(a),Aa({interaction:o,pointer:i,event:s,eventTarget:d,type:"move"},t))},"interactions:down":function(a,t){(function(o,i){for(var s=o.interaction,d=o.pointer,g=o.event,m=o.eventTarget,T=o.pointerIndex,$=s.pointers[T].hold,N=ae(m),Z={interaction:s,pointer:d,event:g,eventTarget:m,type:"hold",targets:[],path:N,node:null},xe=0;xe<N.length;xe++){var je=N[xe];Z.node=je,i.fire("pointerEvents:collect-targets",Z)}if(Z.targets.length){for(var Re=1/0,He=0,it=Z.targets;He<it.length;He++){var ot=it[He].eventable.options.holdDuration;ot<Re&&(Re=ot)}$.duration=Re,$.timeout=setTimeout(function(){Aa({interaction:s,eventTarget:m,pointer:d,event:g,type:"hold"},i)},Re)}})(a,t),Aa(a,t)},"interactions:up":function(a,t){Yn(a),Aa(a,t),function(o,i){var s=o.interaction,d=o.pointer,g=o.event,m=o.eventTarget;s.pointerWasMoved||Aa({interaction:s,eventTarget:m,pointer:d,event:g,type:"tap"},i)}(a,t)},"interactions:cancel":function(a,t){Yn(a),Aa(a,t)}},PointerEvent:wo,fire:Aa,collectEventTargets:Co,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function Aa(a,t){var o=a.interaction,i=a.pointer,s=a.event,d=a.eventTarget,g=a.type,m=a.targets,T=m===void 0?Co(a,t):m,$=new wo(g,i,s,d,o,t.now());t.fire("pointerEvents:new",{pointerEvent:$});for(var N={interaction:o,pointer:i,event:s,eventTarget:d,targets:T,type:g,pointerEvent:$},Z=0;Z<T.length;Z++){var xe=T[Z];for(var je in xe.props||{})$[je]=xe.props[je];var Re=re(xe.eventable,xe.node);if($._subtractOrigin(Re),$.eventable=xe.eventable,$.currentTarget=xe.node,xe.eventable.fire($),$._addOrigin(Re),$.immediatePropagationStopped||$.propagationStopped&&Z+1<T.length&&T[Z+1].node!==$.currentTarget)break}if(t.fire("pointerEvents:fired",N),g==="tap"){var He=$.double?Aa({interaction:o,pointer:i,event:s,eventTarget:d,type:"doubletap"},t):$;o.prevTap=He,o.tapTime=He.timeStamp}return $}function Co(a,t){var o=a.interaction,i=a.pointer,s=a.event,d=a.eventTarget,g=a.type,m=o.getPointerIndex(i),T=o.pointers[m];if(g==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==d))return[];for(var $=ae(d),N={interaction:o,pointer:i,event:s,eventTarget:d,type:g,path:$,targets:[],node:null},Z=0;Z<$.length;Z++){var xe=$[Z];N.node=xe,t.fire("pointerEvents:collect-targets",N)}return g==="hold"&&(N.targets=N.targets.filter(function(je){var Re,He;return je.eventable.options.holdDuration===((Re=o.pointers[m])==null||(He=Re.hold)==null?void 0:He.duration)})),N.targets}function Yn(a){var t=a.interaction,o=a.pointerIndex,i=t.pointers[o].hold;i&&i.timeout&&(clearTimeout(i.timeout),i.timeout=null)}var ki=Object.freeze({__proto__:null,default:fn});function xi(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var wi={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(fn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=xi,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,i=a.pointerEvent,s=a.eventTarget,d=a.targets;if(i.type==="hold"&&d.length){var g=d[0].eventable.options.holdRepeatInterval;g<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:s,type:"hold",pointer:i,event:i},t)},g))}}})},Ci=wi,Di={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(i){return S(this.events.options,i),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(i,s){var d=o.call(this,i,s);return d===this&&(this.events.options[i]=s),d}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,i=a.node,s=a.type,d=a.eventTarget;t.interactables.forEachMatch(i,function(g){var m=g.events,T=m.options;m.types[s]&&m.types[s].length&&g.testIgnoreAllow(T,i,d)&&o.push({node:i,eventable:m,props:{interactable:g}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,i=a.options;S(o.events.options,t.pointerEvents.defaults),S(o.events.options,i.pointerEvents||{})}}},_i=Di,Ei={id:"pointer-events",install:function(a){a.usePlugin(ki),a.usePlugin(Ci),a.usePlugin(_i)}},Si=Ei,Ti={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(i,s,d){for(var g=i.getAllElements(),m=d.window.Promise,T=m?[]:null,$=function(){var Z=g[N],xe=i.getRect(Z);if(!xe)return 1;var je,Re=Te(d.interactions.list,function(ot){return ot.interacting()&&ot.interactable===i&&ot.element===Z&&ot.prepared.name===s.name});if(Re)Re.move(),T&&(je=Re._reflowPromise||new m(function(ot){Re._reflowResolve=ot}));else{var He=oe(xe),it=function(ot){return{coords:ot,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:He.x,y:He.y},client:{x:He.x,y:He.y},timeStamp:d.now()});je=function(ot,mt,St,Nt,xt){var Tt=ot.interactions.new({pointerType:"reflow"}),ta={interaction:Tt,event:xt,pointer:xt,eventTarget:St,phase:"reflow"};Tt.interactable=mt,Tt.element=St,Tt.prevEvent=xt,Tt.updatePointer(xt,xt,St,!0),Y(Tt.coords.delta),gt(Tt.prepared,Nt),Tt._doPhase(ta);var Ut=ot.window,ia=Ut.Promise,da=ia?new ia(function(ba){Tt._reflowResolve=ba}):void 0;return Tt._reflowPromise=da,Tt.start(Nt,mt,St),Tt._interacting?(Tt.move(ta),Tt.end(xt)):(Tt.stop(),Tt._reflowResolve()),Tt.removePointer(xt,xt),da}(d,i,Z,s,it)}T&&T.push(je)},N=0;N<g.length&&!$();N++);return T&&m.all(T).then(function(){return i})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(i,s){i.splice(i.indexOf(s),1)}(t.interactions.list,o))}}},Ii=Ti;if(ea.use(Da),ea.use(qt),ea.use(Si),ea.use(Xt),ea.use(bi),ea.use(Fa),ea.use(D),ea.use(ht),ea.use(Ii),ea.default=ea,p(n)==="object"&&n)try{n.exports=ea}catch{}return ea.default=ea,ea})}(yn,yn.exports)),yn.exports}var Jd=Yd();const Wo=Me.getDefaultExportFromCjs(Jd),Wn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(n,{expose:l,emit:c}){const r=n,p=c,u=e.inject(Or),y=e.inject(Mr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let w=!1,C=!1,V=NaN,F=NaN,G=NaN,M=NaN,Ce=-1,H=-1,U=-1,ue=-1,x=r.x,R=r.y,b=r.w,A=r.h;const B=e.ref(),pe=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:B,calcXY:Ze});function Ue(k){Se(k)}function pt(){Ge()}function Ne(k){la(r.isDraggable)&&(f.draggable=k)}function Ke(k){la(r.isResizable)&&(f.resizable=k)}function qe(k){la(r.isBounded)&&(f.bounded=k)}function z(k){f.transformScale=k}function se(k){f.rowHeight=k}function ie(k){f.maxRows=k}function he(){f.rtl=Uo()==="rtl",Ge()}function et(k){f.cols=Math.floor(k)}u.increaseItem(pe),e.onBeforeMount(()=>{f.rtl=Uo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Pr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,la(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,la(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,la(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{x=r.x,R=r.y,A=r.h,b=r.w,aa(tt)}),y.on("updateWidth",Ue),y.on("compact",pt),y.on("setDraggable",Ne),y.on("setResizable",Ke),y.on("setBounded",qe),y.on("setTransformScale",z),y.on("setRowHeight",se),y.on("setMaxRows",ie),y.on("directionchange",he),y.on("setColNum",et)}),e.onBeforeUnmount(()=>{y.off("updateWidth",Ue),y.off("compact",pt),y.off("setDraggable",Ne),y.off("setResizable",Ke),y.off("setBounded",qe),y.off("setTransformScale",z),y.off("setRowHeight",se),y.off("setMaxRows",ie),y.off("directionchange",he),y.off("setColNum",et),h.value&&(h.value.unset(),h.value=null),u.decreaseItem(pe)}),l({state:f,wrapper:B});const lt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,q=e.computed(()=>f.resizable&&!r.static),O=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),ke=e.computed(()=>(f.draggable||f.resizable)&&!r.static),we=jd("item"),Le=e.computed(()=>({[we.b()]:!0,[we.bm("resizable")]:q.value,[we.bm("static")]:r.static,[we.bm("resizing")]:f.isResizing,[we.bm("dragging")]:f.isDragging,[we.bm("transform")]:f.useCssTransforms,[we.bm("rtl")]:O.value,[we.bm("no-touch")]:lt&&ke.value})),Fe=e.computed(()=>[we.be("resizer"),O.value&&we.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,k=>{f.draggable=k}),e.watch(()=>r.static,()=>{aa(_),aa(Y)}),e.watch(()=>f.draggable,()=>{aa(_)}),e.watch(()=>r.isResizable,k=>{f.resizable=k}),e.watch(()=>r.isBounded,k=>{f.bounded=k}),e.watch(()=>f.resizable,()=>{aa(Y)}),e.watch(()=>f.rowHeight,()=>{aa(tt),aa(ae)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{aa(Y),aa(tt),aa(ae)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{aa(Y)}),e.watch(O,()=>{aa(Y),aa(tt)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const k=u.margin;!k||k[0]===f.margin[0]&&k[1]===f.margin[1]||(f.margin=k.map(Number),aa(tt),aa(ae))});function tt(){r.x+r.w>f.cols?(x=0,b=r.w>f.cols?f.cols:r.w):(x=r.x,b=r.w);const k=Je(x,R,b,A);f.isDragging&&(k.top=f.dragging.top,O.value?k.right=f.dragging.left:k.left=f.dragging.left),f.isResizing&&(k.width=f.resizing.width,k.height=f.resizing.height);let ne;f.useCssTransforms?O.value?ne=Rd(k.top,k.right,k.width,k.height):ne=Fd(k.top,k.left,k.width,k.height):O.value?ne=Pd(k.top,k.right,k.width,k.height):ne=Ld(k.top,k.left,k.width,k.height),f.style=ne}function ae(){const k={};for(const ne of["width","height"]){const ze=f.style[ne].match(/^(\d+)px$/);if(!ze)return;k[ne]=ze[1]}p("container-resized",r.i,r.h,r.w,k.height,k.width)}function Ee(k){if(r.static)return;const ne=k.type;if(ne==="resizestart"&&f.isResizing||ne!=="resizestart"&&!f.isResizing)return;const ze=$o(k);if(la(ze))return;const{x:E,y:J}=ze,L={width:0,height:0};let K;switch(ne){case"resizestart":{Y(),Ce=b,H=A,K=Je(x,R,b,A),L.width=K.width,L.height=K.height,f.resizing=L,f.isResizing=!0;break}case"resizemove":{!k.edges.right&&!k.edges.left&&(G=E),!k.edges.top&&!k.edges.bottom&&(M=J);const De=jo(G,M,E,J);O.value?L.width=f.resizing.width-De.deltaX/f.transformScale:L.width=f.resizing.width+De.deltaX/f.transformScale,L.height=f.resizing.height+De.deltaY/f.transformScale,f.resizing=L;break}case"resizeend":{K=Je(x,R,b,A),L.width=K.width,L.height=K.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}K=re(L.height,L.width),K.w<r.minW&&(K.w=r.minW),K.w>r.maxW&&(K.w=r.maxW),K.h<r.minH&&(K.h=r.minH),K.h>r.maxH&&(K.h=r.maxH),K.h<1&&(K.h=1),K.w<1&&(K.w=1),G=E,M=J,(b!==K.w||A!==K.h)&&p("resize",r.i,K.h,K.w,L.height,L.width),k.type==="resizeend"&&(Ce!==b||H!==A)&&p("resized",r.i,K.h,K.w,L.height,L.width),y.emit("resizeEvent",k.type,r.i,x,R,K.h,K.w)}function S(k){if(r.static||f.isResizing)return;const ne=k.type;if(ne==="dragstart"&&f.isDragging||ne!=="dragstart"&&!f.isDragging)return;const ze=$o(k);if(la(ze))return;const{x:E,y:J}=ze,L=k.target;if(!L.offsetParent)return;const K={top:0,left:0};switch(ne){case"dragstart":{U=x,ue=R;const te=L.offsetParent.getBoundingClientRect(),W=L.getBoundingClientRect(),X=W.left/f.transformScale,ce=te.left/f.transformScale,be=W.right/f.transformScale,me=te.right/f.transformScale,ye=W.top/f.transformScale,P=te.top/f.transformScale;O.value?K.left=(be-me)*-1:K.left=X-ce,K.top=ye-P,f.dragging=K,f.isDragging=!0;break}case"dragmove":{const te=jo(V,F,E,J);if(O.value?K.left=f.dragging.left-te.deltaX/f.transformScale:K.left=f.dragging.left+te.deltaX/f.transformScale,K.top=f.dragging.top+te.deltaY/f.transformScale,f.bounded){const W=L.offsetParent.clientHeight-oe(r.h,f.rowHeight,f.margin[1]);K.top=Q(K.top,0,W);const X=Ve(),ce=f.containerWidth-oe(r.w,X,f.margin[0]);K.left=Q(K.left,0,ce)}f.dragging=K;break}case"dragend":{const te=L.offsetParent.getBoundingClientRect(),W=L.getBoundingClientRect(),X=W.left/f.transformScale,ce=te.left/f.transformScale,be=W.right/f.transformScale,me=te.right/f.transformScale,ye=W.top/f.transformScale,P=te.top/f.transformScale;O.value?K.left=(be-me)*-1:K.left=X-ce,K.top=ye-P,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let De;O.value,De=Ze(K.top,K.left),V=E,F=J,(x!==De.x||R!==De.y)&&p("move",r.i,De.x,De.y),k.type==="dragend"&&(U!==x||ue!==R)&&p("moved",r.i,De.x,De.y),y.emit("dragEvent",k.type,r.i,De.x,De.y,A,b)}function Je(k,ne,ze,E){const J=Ve();let L;return O.value?L={right:Math.round(J*k+(k+1)*f.margin[0]),top:Math.round(f.rowHeight*ne+(ne+1)*f.margin[1]),width:ze===1/0?ze:Math.round(J*ze+Math.max(0,ze-1)*f.margin[0]),height:E===1/0?E:Math.round(f.rowHeight*E+Math.max(0,E-1)*f.margin[1])}:L={left:Math.round(J*k+(k+1)*f.margin[0]),top:Math.round(f.rowHeight*ne+(ne+1)*f.margin[1]),width:ze===1/0?ze:Math.round(J*ze+Math.max(0,ze-1)*f.margin[0]),height:E===1/0?E:Math.round(f.rowHeight*E+Math.max(0,E-1)*f.margin[1])},L}function Ze(k,ne){const ze=Ve();let E=Math.round((ne-f.margin[0])/(ze+f.margin[0])),J=Math.round((k-f.margin[1])/(f.rowHeight+f.margin[1]));return E=Math.max(Math.min(E,f.cols-b),0),J=Math.max(Math.min(J,f.maxRows-A),0),{x:E,y:J}}function Ve(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function oe(k,ne,ze){return Number.isFinite(k)?Math.round(ne*k+Math.max(0,k-1)*ze):k}function Q(k,ne,ze){return Math.max(Math.min(k,ze),ne)}function re(k,ne,ze=!1){const E=Ve();let J=Math.round((ne+f.margin[0])/(E+f.margin[0])),L=0;return ze?L=Math.ceil((k+f.margin[1])/(f.rowHeight+f.margin[1])):L=Math.round((k+f.margin[1])/(f.rowHeight+f.margin[1])),J=Math.max(Math.min(J,f.cols-x),0),L=Math.max(Math.min(L,f.maxRows-R),0),{w:J,h:L}}function Se(k,ne){f.containerWidth=k}function Ge(){tt()}function st(){!h.value&&B.value&&(h.value=Wo(B.value),f.useStyleCursor||h.value.styleCursor(!1))}const v=Ro(S);function _(){if(st(),!!h.value)if(f.draggable&&!r.static){const k={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};h.value.draggable(k),w||(w=!0,h.value.on("dragstart dragmove dragend",ne=>{ne.type==="dragmove"?v(ne):S(ne)}))}else h.value.draggable({enabled:!1})}const j=Ro(Ee);function Y(){if(st(),!!h.value)if(f.resizable&&!r.static){const k=Je(0,0,r.maxW,r.maxH),ne=Je(0,0,r.minW,r.minH),ze={edges:{left:O.value?`.${Fe.value[0]}`:!1,right:O.value?!1:`.${Fe.value[0]}`,bottom:`.${Fe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:ne.height*f.transformScale,width:ne.width*f.transformScale},max:{height:k.height*f.transformScale,width:k.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(ze.modifiers=[Wo.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(ze),C||(C=!0,h.value.on("resizestart resizemove resizeend",E=>{E.type==="resizemove"?j(E):Ee(E)}))}else h.value.resizable({enabled:!1})}return(k,ne)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:B,class:e.normalizeClass(Le.value),style:e.normalizeStyle(f.style)},[e.renderSlot(k.$slots,"default"),q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Fe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),en=typeof window<"u";var Ho;en&&(Ho=window==null?void 0:window.navigator)!=null&&Ho.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function qo(n){return n!=null}function Go(){}const Zd=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(Zd)));const Qd=en&&("ontouchstart"in window||tp()>0),ep=Qd?"pointerdown":"click";function tp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function ap(n,l,c=window.Event){const{type:r,bubbles:p=!1,cancelable:u=!1,...y}=l;if(!qo(r)||r==="")return!1;let h;return qo(c)?h=new c(r,{bubbles:p,cancelable:u}):(h=document.createEvent("HTMLEvents"),h.initEvent(r,p,u)),Object.assign(h,y),n.dispatchEvent(h)}const np="clickoutside",op=new Set;en&&document.addEventListener(ep,n=>{const l=n.target,c=n.composedPath&&n.composedPath();op.forEach(r=>{r!==l&&(c?!c.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&ap(r,{type:np})})},!0);const rp=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];let zn;if(en){for(const n of rp)if(n[1]in document){zn=n;break}}e.computed(()=>!1);const ip=new Set,lp=new WeakMap;if(en&&zn){const n=zn[2],l=zn[4];document.addEventListener(l,()=>{if(ip.forEach(c=>{c.value=!1}),document[n]){const c=lp.get(document[n]);c&&(c.value=!0)}},!1)}const jr=new Map;jr.set("x",0);jr.set("y",0);var Ja=[],sp=function(){return Ja.some(function(n){return n.activeTargets.length>0})},cp=function(){return Ja.some(function(n){return n.skippedTargets.length>0})},Xo="ResizeObserver loop completed with undelivered notifications.",up=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:Xo}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=Xo),window.dispatchEvent(n)},Cn;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Cn||(Cn={}));var Za=function(n){return Object.freeze(n)},dp=function(){function n(l,c){this.inlineSize=l,this.blockSize=c,Za(this)}return n}(),Ur=function(){function n(l,c,r,p){return this.x=l,this.y=c,this.width=r,this.height=p,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Za(this)}return n.prototype.toJSON=function(){var l=this,c=l.x,r=l.y,p=l.top,u=l.right,y=l.bottom,h=l.left,f=l.width,w=l.height;return{x:c,y:r,top:p,right:u,bottom:y,left:h,width:f,height:w}},n.fromRect=function(l){return new n(l.x,l.y,l.width,l.height)},n}(),vo=function(n){return n instanceof SVGElement&&"getBBox"in n},Kr=function(n){if(vo(n)){var l=n.getBBox(),c=l.width,r=l.height;return!c&&!r}var p=n,u=p.offsetWidth,y=p.offsetHeight;return!(u||y||n.getClientRects().length)},Yo=function(n){var l;if(n instanceof Element)return!0;var c=(l=n==null?void 0:n.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(c&&n instanceof c.Element)},pp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},wn=typeof window<"u"?window:{},An=new WeakMap,Jo=/auto|scroll/,fp=/^tb|vertical/,hp=/msie|trident/i.test(wn.navigator&&wn.navigator.userAgent),ha=function(n){return parseFloat(n||"0")},cn=function(n,l,c){return n===void 0&&(n=0),l===void 0&&(l=0),c===void 0&&(c=!1),new dp((c?l:n)||0,(c?n:l)||0)},Zo=Za({devicePixelContentBoxSize:cn(),borderBoxSize:cn(),contentBoxSize:cn(),contentRect:new Ur(0,0,0,0)}),Wr=function(n,l){if(l===void 0&&(l=!1),An.has(n)&&!l)return An.get(n);if(Kr(n))return An.set(n,Zo),Zo;var c=getComputedStyle(n),r=vo(n)&&n.ownerSVGElement&&n.getBBox(),p=!hp&&c.boxSizing==="border-box",u=fp.test(c.writingMode||""),y=!r&&Jo.test(c.overflowY||""),h=!r&&Jo.test(c.overflowX||""),f=r?0:ha(c.paddingTop),w=r?0:ha(c.paddingRight),C=r?0:ha(c.paddingBottom),V=r?0:ha(c.paddingLeft),F=r?0:ha(c.borderTopWidth),G=r?0:ha(c.borderRightWidth),M=r?0:ha(c.borderBottomWidth),Ce=r?0:ha(c.borderLeftWidth),H=V+w,U=f+C,ue=Ce+G,x=F+M,R=h?n.offsetHeight-x-n.clientHeight:0,b=y?n.offsetWidth-ue-n.clientWidth:0,A=p?H+ue:0,B=p?U+x:0,pe=r?r.width:ha(c.width)-A-b,Ue=r?r.height:ha(c.height)-B-R,pt=pe+H+b+ue,Ne=Ue+U+R+x,Ke=Za({devicePixelContentBoxSize:cn(Math.round(pe*devicePixelRatio),Math.round(Ue*devicePixelRatio),u),borderBoxSize:cn(pt,Ne,u),contentBoxSize:cn(pe,Ue,u),contentRect:new Ur(V,f,pe,Ue)});return An.set(n,Ke),Ke},Hr=function(n,l,c){var r=Wr(n,c),p=r.borderBoxSize,u=r.contentBoxSize,y=r.devicePixelContentBoxSize;switch(l){case Cn.DEVICE_PIXEL_CONTENT_BOX:return y;case Cn.BORDER_BOX:return p;default:return u}},vp=function(){function n(l){var c=Wr(l);this.target=l,this.contentRect=c.contentRect,this.borderBoxSize=Za([c.borderBoxSize]),this.contentBoxSize=Za([c.contentBoxSize]),this.devicePixelContentBoxSize=Za([c.devicePixelContentBoxSize])}return n}(),qr=function(n){if(Kr(n))return 1/0;for(var l=0,c=n.parentNode;c;)l+=1,c=c.parentNode;return l},gp=function(){var n=1/0,l=[];Ja.forEach(function(u){if(u.activeTargets.length!==0){var y=[];u.activeTargets.forEach(function(h){var f=new vp(h.target),w=qr(h.target);y.push(f),h.lastReportedSize=Hr(h.target,h.observedBox),w<n&&(n=w)}),l.push(function(){u.callback.call(u.observer,y,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var c=0,r=l;c<r.length;c++){var p=r[c];p()}return n},Qo=function(n){Ja.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(c){c.isActive()&&(qr(c.target)>n?l.activeTargets.push(c):l.skippedTargets.push(c))})})},mp=function(){var n=0;for(Qo(n);sp();)n=gp(),Qo(n);return cp()&&up(),n>0},eo,Gr=[],yp=function(){return Gr.splice(0).forEach(function(n){return n()})},bp=function(n){if(!eo){var l=0,c=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return yp()}).observe(c,r),eo=function(){c.textContent="".concat(l?l--:l++)}}Gr.push(n),eo()},kp=function(n){bp(function(){requestAnimationFrame(n)})},Fn=0,xp=function(){return!!Fn},wp=250,Cp={attributes:!0,characterData:!0,childList:!0,subtree:!0},er=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],tr=function(n){return n===void 0&&(n=0),Date.now()+n},to=!1,Dp=function(){function n(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return n.prototype.run=function(l){var c=this;if(l===void 0&&(l=wp),!to){to=!0;var r=tr(l);kp(function(){var p=!1;try{p=mp()}finally{if(to=!1,l=r-tr(),!xp())return;p?c.run(1e3):l>0?c.run(l):c.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var l=this,c=function(){return l.observer&&l.observer.observe(document.body,Cp)};document.body?c():wn.addEventListener("DOMContentLoaded",c)},n.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),er.forEach(function(c){return wn.addEventListener(c,l.listener,!0)}))},n.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),er.forEach(function(c){return wn.removeEventListener(c,l.listener,!0)}),this.stopped=!0)},n}(),so=new Dp,ar=function(n){!Fn&&n>0&&so.start(),Fn+=n,!Fn&&so.stop()},_p=function(n){return!vo(n)&&!pp(n)&&getComputedStyle(n).display==="inline"},Ep=function(){function n(l,c){this.target=l,this.observedBox=c||Cn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var l=Hr(this.target,this.observedBox,!0);return _p(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},n}(),Sp=function(){function n(l,c){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=c}return n}(),Vn=new WeakMap,nr=function(n,l){for(var c=0;c<n.length;c+=1)if(n[c].target===l)return c;return-1},On=function(){function n(){}return n.connect=function(l,c){var r=new Sp(l,c);Vn.set(l,r)},n.observe=function(l,c,r){var p=Vn.get(l),u=p.observationTargets.length===0;nr(p.observationTargets,c)<0&&(u&&Ja.push(p),p.observationTargets.push(new Ep(c,r&&r.box)),ar(1),so.schedule())},n.unobserve=function(l,c){var r=Vn.get(l),p=nr(r.observationTargets,c),u=r.observationTargets.length===1;p>=0&&(u&&Ja.splice(Ja.indexOf(r),1),r.observationTargets.splice(p,1),ar(-1))},n.disconnect=function(l){var c=this,r=Vn.get(l);r.observationTargets.slice().forEach(function(p){return c.unobserve(l,p.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Tp=function(){function n(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");On.connect(this,l)}return n.prototype.observe=function(l,c){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Yo(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");On.observe(this,l,c)},n.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Yo(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");On.unobserve(this,l)},n.prototype.disconnect=function(){On.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Hn=new WeakMap;function Ip(n){var l;for(let c=0,r=n.length;c<r;++c){const p=n[c],u=Hn.get(p.target);if(typeof u=="function"){const{inlineSize:y,blockSize:h}=((l=p.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:f,offsetHeight:w}=p.target;u(Object.assign(p,{offsetWidth:f,offsetHeight:w,width:y??f,height:h??w}))}}}const Xr=new(en&&window.ResizeObserver||Tp)(Ip);function or(n,l){Hn.set(n,l),Xr.observe(n)}function rr(n){Hn.has(n)&&(Xr.unobserve(n),Hn.delete(n))}function Bp(n={}){let l=Go;const c=e.watch(()=>e.unref(n.target),p=>{l(),!(!p||typeof n.onResize!="function")&&(or(p,n.onResize),l=()=>{rr(p),l=Go})},{immediate:!0}),r=()=>{c(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:or,unobserveResize:rr,unobserve:r}}const Np=e.ref(!1);e.computed(()=>Np.value);const ir="__theme_style__",ao="__theme_observer__",lr=e.reactive(new Map),sr=new Map;e.watch(lr,()=>{if(!en)return;sr.clear();const n=document.head.querySelector(`#${ir}`);n&&document.head.removeChild(n);const l=document.createElement("style");let c=`.${ao} { width: 1px }`,r=1;for(const[p,[u,y]]of lr.entries())c+=` html.${u} .${ao}, .${y} .${ao} { width: ${++r}px }`,sr.set(r,p);l.textContent=c,l.id=ir,document.head.appendChild(l)});const Yr=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(n,{expose:l,emit:c}){const r=n,p=c,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),y=new Map,h=e.ref(r.layout),f=e.ref(),{observeResize:w,unobserveResize:C}=Bp(),V=Bd();V.on("resizeEvent",F),V.on("dragEvent",G),e.onBeforeMount(()=>{p("layout-before-mount",h.value)}),e.onMounted(()=>{p("layout-mounted",h.value),e.nextTick(()=>{$d(h.value),u.originalLayout=h.value,e.nextTick(()=>{Ue(),f.value&&w(f.value,Nd(x,16)),rn(h.value,r.verticalCompact),p("layout-updated",h.value),ue(),x()})})}),e.onBeforeUnmount(()=>{V.clearAll(),f.value&&C(f.value)});function F(Ne,Ke,qe,z,se,ie){B(Ne,Ke,qe,z,se,ie)}function G(Ne,Ke,qe,z,se,ie){A(Ne,Ke,qe,z,se,ie)}e.watch(()=>u.width,(Ne,Ke)=>{e.nextTick(()=>{V.emit("updateWidth",Ne),Ke===-1&&e.nextTick(()=>{p("layout-ready",h.value)}),ue()})}),e.watch(()=>[r.layout,r.layout.length],()=>{h.value=r.layout,U()}),e.watch(()=>r.colNum,Ne=>{V.emit("setColNum",Ne)}),e.watch(()=>r.rowHeight,Ne=>{V.emit("setRowHeight",Ne)}),e.watch(()=>r.isDraggable,Ne=>{V.emit("setDraggable",Ne)}),e.watch(()=>r.isResizable,Ne=>{V.emit("setResizable",Ne)}),e.watch(()=>r.isBounded,Ne=>{V.emit("setBounded",Ne)}),e.watch(()=>r.transformScale,Ne=>{V.emit("setTransformScale",Ne)}),e.watch(()=>r.responsive,Ne=>{Ne||(p("update:layout",u.originalLayout),V.emit("setColNum",r.colNum)),x()}),e.watch(()=>r.maxRows,Ne=>{V.emit("setMaxRows",Ne)}),e.watch([()=>r.margin,()=>r.margin[1]],ue),e.provide(Or,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:M,decreaseItem:Ce})),e.provide(Mr,V),l({state:u,getItem:H,resizeEvent:B,dragEvent:A,layoutUpdate:U});function M(Ne){y.set(Ne.i,Ne)}function Ce(Ne){y.delete(Ne.i)}function H(Ne){return y.get(Ne)}function U(){if(!la(h.value)&&!la(u.originalLayout)){if(h.value.length!==u.originalLayout.length){const Ne=pt(h.value,u.originalLayout);if(Ne.length>0)if(h.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Ne);else{const Ke=new Set(Ne.map(qe=>qe.i));u.originalLayout=u.originalLayout.filter(qe=>!Ke.has(qe.i))}u.lastLayoutLength=h.value.length,Ue()}rn(h.value,r.verticalCompact),V.emit("updateWidth",u.width),ue(),p("layout-updated",h.value)}}function ue(){u.mergedStyle={height:R()}}function x(){f.value&&(u.width=f.value.offsetWidth),V.emit("resizeEvent")}function R(){if(!r.autoSize)return;const Ne=parseFloat(r.margin[1]);return Vd(h.value)*(r.rowHeight+Ne)+Ne+"px"}let b;function A(Ne,Ke,qe,z,se,ie){let he=Lo(h.value,Ke);la(he)&&(he={h:0,w:0,x:0,y:0,i:""}),Ne==="dragstart"&&!r.verticalCompact&&(b=h.value.reduce((et,{i:lt,x:q,y:O})=>({...et,[lt]:{x:q,y:O}}),{})),Ne==="dragmove"||Ne==="dragstart"?(u.placeholder.i=Ke,u.placeholder.x=he.x,u.placeholder.y=he.y,u.placeholder.w=ie,u.placeholder.h=se,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),h.value=lo(h.value,he,qe,z,!0,r.preventCollision),r.restoreOnDrag?(he.static=!0,rn(h.value,r.verticalCompact,b),he.static=!1):rn(h.value,r.verticalCompact),V.emit("compact"),ue(),Ne==="dragend"&&(b=void 0,p("layout-updated",h.value))}function B(Ne,Ke,qe,z,se,ie){let he=Lo(h.value,Ke);la(he)&&(he={h:0,w:0,x:0,y:0,i:""});let et;if(r.preventCollision){const lt=Fr(h.value,{...he,w:ie,h:se}).filter(q=>q.i!==he.i);if(et=lt.length>0,et){let q=1/0,O=1/0;lt.forEach(ke=>{ke.x>he.x&&(q=Math.min(q,ke.x)),ke.y>he.y&&(O=Math.min(O,ke.y))}),Number.isFinite(q)&&(he.w=q-he.x),Number.isFinite(O)&&(he.h=O-he.y)}}et||(he.w=ie,he.h=se),Ne==="resizestart"||Ne==="resizemove"?(u.placeholder.i=Ke,u.placeholder.x=qe,u.placeholder.y=z,u.placeholder.w=he.w,u.placeholder.h=he.h,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):Ne&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&pe(),rn(h.value,r.verticalCompact),V.emit("compact"),ue(),Ne==="resizeend"&&p("layout-updated",h.value)}function pe(){const Ne=Wd(r.breakpoints,u.width);if(Ne===u.lastBreakpoint)return;const Ke=Pr(Ne,r.cols);!la(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=io(h.value));const qe=Hd(u.originalLayout,u.layouts,r.breakpoints,Ne,u.lastBreakpoint,Ke,r.verticalCompact);u.layouts[Ne]=qe,u.lastBreakpoint!==Ne&&p("breakpoint-changed",Ne,qe),h.value=qe,p("update:layout",qe),u.lastBreakpoint=Ne,V.emit("setColNum",Ke)}function Ue(){u.layouts=Object.assign({},r.responsiveLayouts)}function pt(Ne,Ke){const qe=new Set(Ke.map(he=>he.i)),z=new Set(Ne.map(he=>he.i)),se=Ne.filter(he=>!qe.has(he.i)),ie=Ke.filter(he=>!z.has(he.i));return se.concat(ie)}return(Ne,Ke)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Ne.$slots.default?e.renderSlot(Ne.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(h.value,qe=>(e.openBlock(),e.createBlock(Wn,e.mergeProps({key:qe.i,ref_for:!0},qe),{default:e.withCtx(()=>[e.renderSlot(Ne.$slots,"item",{item:qe})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Wn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const Ap={key:0,class:"item-view-group"},Vp={key:0,class:"item-view-group"},Op=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:l}){const c=I.useModelComp(ee.pinia),{isEdit:r}=ee.storeToRefs(c),p=l,u=n,y=e.computed(()=>u==null?void 0:u.children),h=e.computed(()=>{var F,G,M,Ce;return((F=u==null?void 0:u.children)==null?void 0:F.length)>0&&((G=u==null?void 0:u.children)!=null&&G.every(H=>H==null?void 0:H.layout))?(Ce=(M=u==null?void 0:u.children)==null?void 0:M[0])==null?void 0:Ce.layout:"vertical"}),f=e.computed(()=>{var F,G;return((G=(F=u==null?void 0:u.children)==null?void 0:F[0])==null?void 0:G.isGridLayout)||!1}),w=e.ref((u==null?void 0:u.level)+1),C=F=>{p("rowClick",F)},V=(F,G)=>{p("routeUrl",F,G)};return(F,G)=>f.value?(e.openBlock(),e.createBlock(e.unref(Yr),{key:0,layout:y.value,"onUpdate:layout":G[0]||(G[0]=M=>y.value=M),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(M,Ce)=>(e.openBlock(),e.createBlock(e.unref(Wn),{key:M.i,x:M.x,y:M.y,"min-h":M.minH,"max-h":M.maxH,"min-w":M.minW,w:M.w,h:M.h,i:M.i},{default:e.withCtx(()=>{var H,U,ue,x,R,b,A,B,pe,Ue,pt,Ne,Ke;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:Ce===((H=u==null?void 0:u.children)==null?void 0:H.length)-1?"0px":"24px"})},[((ue=(U=M==null?void 0:M.component)==null?void 0:U.comp)==null?void 0:ue.toUpperCase())!=="TABLE"&&((x=M==null?void 0:M.component)!=null&&x.name)?(e.openBlock(),e.createElementBlock("div",Ap,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(w.value.toString())-1)*12+"px",fontWeight:600-(w.value-1)*100>=400?600-(w.value-1)*100:400,fontSize:17-w.value>=14?17-w.value+"px":"14px"})},e.toDisplayString((R=M==null?void 0:M.component)==null?void 0:R.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref($n)((b=M==null?void 0:M.component)==null?void 0:b.comp)),{pageLayout:h.value,config:{showIndex:(A=e.unref(jt)[Ce])==null?void 0:A.showIndex,allowMove:(B=e.unref(jt)[Ce])==null?void 0:B.allowMove,viewport:(pe=e.unref(jt)[Ce])==null?void 0:pe.viewport},compName:M==null?void 0:M.component.name,compNames:e.unref(Er),itemData:(Ue=M==null?void 0:M.component)==null?void 0:Ue.compData,childItemData:(pt=M==null?void 0:M.component)==null?void 0:pt.itemChildData,key:e.unref(un),cacheNewData:e.unref(bn),onChange:e.unref(jn),index:(M==null?void 0:M.id)??Ce,onContentChange:e.unref(Un),onPageChange:e.unref(Kn),parentTableId:(Ne=M==null?void 0:M.component)==null?void 0:Ne.tableId,allMapContents:e.unref(ro),children:(Ke=M==null?void 0:M.component)==null?void 0:Ke.children,level:w.value,onRowClick:C,onRouteUrl:V,onClickTrigger:e.unref(Sr),onClickMainKey:e.unref(Tr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(M,Ce)=>{var H,U;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(M==null?void 0:M.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(Ce)===((H=u==null?void 0:u.children)==null?void 0:H.length)-1?"0px":"24px"})},[((U=M==null?void 0:M.comp)==null?void 0:U.toUpperCase())!=="TABLE"&&M.name?(e.openBlock(),e.createElementBlock("div",Vp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(w.value.toString())>1?"12px":"0px",fontWeight:600-(w.value-1)*100>=400?600-(w.value-1)*100:400,fontSize:17-w.value>=14?17-w.value+"px":"14px"})},e.toDisplayString(M.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref($n)(M.comp)),{compName:M.name,itemData:M==null?void 0:M.compData,childItemData:M==null?void 0:M.itemChildData,key:e.unref(un),onChange:e.unref(jn),index:(M==null?void 0:M.id)??Ce,onContentChange:e.unref(Un),onPageChange:e.unref(Kn),parentTableId:M==null?void 0:M.tableId,allMapContents:e.unref(ro),children:M==null?void 0:M.children,level:w.value,onRowClick:C,onRouteUrl:V},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Mp=Pt._export_sfc(Op,[["__scopeId","data-v-e672653d"]]),Jr=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"},{name:"图表",type:"chart",comp:"Chart",icon:"chart-new"},{name:"行内布局",type:"layout",comp:"Layout",icon:"ai13"}]),zp={TABLE:gn.ssTable,FORM:Bo,TABLEOPERATE:es,TABLESTYLE:gs,TABLEEXTEND:ys,TABLEINTERACTION:xs,FORMOPERATE:No,FOLD:Js,CALCULATOR:nc,METHODBUTTON:ic,AVATARUPLOAD:So.ssAvatar,SIGNATURE:So.ssSignature,FORMTOP:Bo,STEP:yc,STEPOPERATE:js,TIMELINE:Dc,TIMELINEOPERATE:Gs,FORMTOPOPERATE:No,SIGNATUREOPERATE:vc,AVATARUPLOADOPERATE:cc,TABS:Sc,TABSOPERATE:pu,CHART:Eu,CHARTOPERATE:Fu,LAYOUT:yd,LAYOUTOPERATE:Sd,PARENTITEM:Mp};function tn(n){return zp[n==null?void 0:n.toUpperCase()]||null}exports.De=Yr;exports._sfc_main=kr;exports.activeStepInfo=ln;exports.affixItems=nd;exports.allMapContents=ro;exports.cacheNewData=bn;exports.clickMainKey=Tr;exports.clickSavePage=ad;exports.clickStep=Br;exports.clickTrigger=Sr;exports.compId=un;exports.compNames=Er;exports.compShow=Pn;exports.existLayouts=cd;exports.generateLayouts=ps;exports.getComponent=tn;exports.getComponents=$n;exports.getSliceContLength=fd;exports.gridRowHeight=ls;exports.isStepLayout=ho;exports.onBack=Qu;exports.onChange=jn;exports.onClick=td;exports.onContentChange=Un;exports.onExtendTaskEnd=sd;exports.onPageBack=ud;exports.onPageChange=Kn;exports.onSelectFixContent=Zu;exports.renderShowItems=Dr;exports.selectFilterItem=oo;exports.setComponent=wr;exports.showItems=jt;exports.sliceTableLength=_r;exports.slotContent=Jr;exports.ssMenu=Ln;exports.st=Wn;exports.stepItems=hd;exports.toolBar=mn;exports.verifyButton=dd;
|