ss-component-new 1.3.39 → 1.3.40
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-2i72y41c.js → MTLLoader-CBRDqlja.js} +24 -24
- package/dist/{MTLLoader-DXzoNrir.cjs → MTLLoader-YtHulNzU.cjs} +1 -1
- package/dist/{OrbitControls-25f9O6FX.cjs → OrbitControls-Bwzpfq8_.cjs} +1 -1
- package/dist/{OrbitControls-DLMbmcAk.js → OrbitControls-CKR1ruPg.js} +1 -1
- package/dist/{URDFLoader-C9bE_XzP.js → URDFLoader-D-0fnLWu.js} +189 -189
- package/dist/{URDFLoader-Cr4cwEF8.cjs → URDFLoader-DIvTWPgk.cjs} +1 -1
- package/dist/{animationData-0idWk1St.js → animationData-BBVNOO1d.js} +19 -19
- package/dist/{animationData-Bq1xWpzh.cjs → animationData-krmt7b15.cjs} +1 -1
- package/dist/{array-D7ZpHOUW.js → array-B7hKAHMR.js} +46 -46
- package/dist/{array-BcZ8wZJh.cjs → array-BMhRsnRu.cjs} +1 -1
- package/dist/{iconfont-D_lKvP4A.js → iconfont-CSj9Ypb0.js} +29 -29
- package/dist/{iconfont-C8smb8wH.cjs → iconfont-CUPzGSlt.cjs} +1 -1
- package/dist/index-BDzsGCjm.cjs +11 -0
- package/dist/{index-CuwDFx38.cjs → index-BFKUrR1o.cjs} +1 -1
- package/dist/{index-Dl-Z36zZ.cjs → index-BG3-boe7.cjs} +1 -1
- package/dist/index-BJ8XP3Y-.cjs +1 -0
- package/dist/{index-BJPBBWWH.cjs → index-BLxE_tkf.cjs} +1 -1
- package/dist/{index-Ddoq7kRQ.js → index-BT6DSXQW.js} +9 -9
- package/dist/{index-BFqQiTF3.cjs → index-BUsoO5VT.cjs} +1 -1
- package/dist/{index-U0xNmCVP.cjs → index-BVgS3Nd5.cjs} +1 -1
- package/dist/{index-BJ4dYIP9.js → index-Bcrscjdm.js} +2 -2
- package/dist/{index-2cLYbH8L.js → index-BgUChdje.js} +8 -8
- package/dist/index-BteE57Nz.js +103 -0
- package/dist/{index-mMYvuatu.js → index-C75tqiG_.js} +41 -41
- package/dist/{index-C09fhtZ7.js → index-C7WQ1ky5.js} +2 -2
- package/dist/index-C8FzkPpO.cjs +1 -0
- package/dist/{index-DRTxe12U.cjs → index-C8fMwErX.cjs} +13 -13
- package/dist/{index-BeF439qb.js → index-CCsW4SQb.js} +7 -7
- package/dist/{index-nr6V1FzX.js → index-CEq2QX9L.js} +7 -7
- package/dist/{index-CXiOVgoz.js → index-CEzEaG0d.js} +1 -1
- package/dist/{index-BjVhxFhd.js → index-CGm9oYu2.js} +5 -5
- package/dist/{index-Cjqg29ul.cjs → index-CIrXKpNl.cjs} +1 -1
- package/dist/{index-CXF4fGBx.cjs → index-CQozkDNK.cjs} +1 -1
- package/dist/{index-C-_cejgk.js → index-CTE81JBY.js} +3 -3
- package/dist/{index-BSzis22W.cjs → index-CliK2V0E.cjs} +1 -1
- package/dist/{index-CYttSa5h.js → index-CppJQDiT.js} +3 -3
- package/dist/{index-DM30Ja8n.cjs → index-Cul6hC7f.cjs} +1 -1
- package/dist/{index-CMro3YG1.cjs → index-CuvQZsbE.cjs} +1 -1
- package/dist/{index-DU9e5EhS.cjs → index-Cw4Pm2PQ.cjs} +1 -1
- package/dist/{index-BmPlus3L.cjs → index-CwMhzp9R.cjs} +1 -1
- package/dist/{index-DdKUuRez.js → index-D39AtL48.js} +1 -1
- package/dist/{index-DQeVX7pl.js → index-D9lVn2ja.js} +5 -5
- package/dist/{index-CyiMl_77.js → index-DABBYx7H.js} +1 -1
- package/dist/{index-CvwIVk4C.js → index-DDQZOo-o.js} +3 -3
- package/dist/{index-Bmjp4oN2.cjs → index-DDsoPHBA.cjs} +1 -1
- package/dist/{index-CZZ8Ifs9.js → index-DFjh1qWr.js} +2 -2
- package/dist/{index-Va8AOLWi.js → index-DGRL8SEt.js} +1 -1
- package/dist/index-DGeMVYJU.js +12544 -0
- package/dist/{index-HWbROorb.js → index-DLyb9Q5L.js} +2 -2
- package/dist/{index-BFkiAoiG.cjs → index-DN2waPoj.cjs} +1 -1
- package/dist/{index-Dhu1H8ka.js → index-DWfxnemZ.js} +2 -2
- package/dist/{index-BAu0NK04.cjs → index-DdNJrN4I.cjs} +1 -1
- package/dist/{index-BC4zbL4W.cjs → index-Dm-5UkTK.cjs} +1 -1
- package/dist/{index-DkCH5VtE.js → index-Dq8v_eJA.js} +6 -6
- package/dist/{index-OaeHF7Y4.cjs → index-Du0eSoIx.cjs} +1 -1
- package/dist/{index-C0hS-bj5.js → index-DxVKhVHR.js} +7 -7
- package/dist/{index-BeqcmxG1.js → index-OYiyhWAy.js} +7 -7
- package/dist/{index-DPmCVTf0.cjs → index-OZTa9Fl3.cjs} +1 -1
- package/dist/{index-CqvnJnTM.cjs → index-d6tZBTSp.cjs} +1 -1
- package/dist/{index-CEcgrss3.cjs → index-euZWOilV.cjs} +1 -1
- package/dist/{index-SG3iZ1zi.cjs → index-lDcFCgsk.cjs} +1 -1
- package/dist/{index-CldRoanF.js → index-rZKPYWM6.js} +2 -2
- package/dist/{index-COQpDVsv.js → index-sMsCzNtW.js} +1535 -1570
- package/dist/{index-BWCv7zxy.cjs → index-vCTVD7cV.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs} +382 -392
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js} +28120 -28781
- package/dist/{index.vue_vue_type_style_index_1_lang-BIBuo_6N.cjs → index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-M5fbenhC.js → index.vue_vue_type_style_index_1_lang-q8rMzh6x.js} +75 -75
- package/dist/{main-CZBz_zjr.js → main-CbBG4x5W.js} +4 -4
- package/dist/{main-pPT0wg-M.cjs → main-D7LZI3yR.cjs} +1 -1
- package/dist/{menuIndex-D52EAwtb.cjs → menuIndex-8RF_0N_y.cjs} +1 -1
- package/dist/{menuIndex-DYaogp2R.js → menuIndex-BwWrdu20.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-BObCDF1v.js → threeModel-CiTIBkkk.js} +45 -45
- package/dist/{threeModel-hIc2ofR5.cjs → threeModel-Dd-cfGXr.cjs} +1 -1
- package/dist/{threePreview-Dm8s6ZzZ.cjs → threePreview-CBFQtSls.cjs} +1 -1
- package/dist/{threePreview-STh6e4ji.js → threePreview-XQG7sQy9.js} +125 -125
- package/dist/{threeSceneView-BrPJwJe5.js → threeSceneView-CdZFIImJ.js} +38 -38
- package/dist/{threeSceneView-DsimUKrC.cjs → threeSceneView-D97Sc8hd.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-C5cYg_nz.cjs → threeSceneViewForCPMPIP-4Cjv1ZS4.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-BjnGQodx.js → threeSceneViewForCPMPIP-DH__ogKh.js} +8 -8
- package/dist/{threeTrackPathView-BQYAP4DB.js → threeTrackPathView-BFQXaw-a.js} +78 -78
- package/dist/{threeTrackPathView-CJsgvwfM.cjs → threeTrackPathView-s17KavQX.cjs} +1 -1
- package/dist/{threeViewerHost-Sk5pSWMo.js → threeViewerHost-BgPjA_94.js} +11 -11
- package/dist/{threeViewerHost-B9_P3rIV.cjs → threeViewerHost-C39tiQj-.cjs} +1 -1
- package/dist/{urdfTree-B1eVnyil.js → urdfTree-DM6uTeXj.js} +10 -10
- package/dist/{urdfTree-DoHqwX6e.cjs → urdfTree-HdeBG5se.cjs} +1 -1
- package/dist/{workpieceTreePanel-DKNEmjW7.cjs → workpieceTreePanel-BKOHDm85.cjs} +1 -1
- package/dist/{workpieceTreePanel-CZA2q-tk.js → workpieceTreePanel-C5qUdbmi.js} +63 -63
- package/package.json +1 -1
- package/dist/index-Ccqg6q19.cjs +0 -1
- package/dist/index-CpbBe_mV.cjs +0 -1
- package/dist/index-DIWralYr.js +0 -67
- package/dist/index-De99NYNm.cjs +0 -1
- package/dist/index-O6tv0Wzx.js +0 -11883
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";const xa=require("./index-DdNJrN4I.cjs"),e=require("vue"),D=require("./index-C8fMwErX.cjs"),It=require("./index-BG3-boe7.cjs"),rt=require("./index-C5pQXH0_.cjs"),Ve=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs"),Jt=require("./index-DN2waPoj.cjs"),To=require("./threeViewerHost-C39tiQj-.cjs");require("./index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs");const Ft=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Cdf6R00a.cjs"),Io=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),No=require("./index-lDcFCgsk.cjs"),gl=require("./index-BVaHwt5f.cjs"),Kr=require("./index-CuvQZsbE.cjs"),Pn=require("./index-C8FzkPpO.cjs"),Wr=require("./index-BpPyaNFa.cjs"),Hr=require("vue-router"),ka=require("./index-9hspBVrQ.cjs"),qr=require("./menuIndex-8RF_0N_y.cjs");var Xr=/\s/;function Gr(a){for(var r=a.length;r--&&Xr.test(a.charAt(r)););return r}var Yr=/^\s+/;function Jr(a){return a&&a.slice(0,Gr(a)+1).replace(Yr,"")}var Ao=NaN,Zr=/^[-+]0x[0-9a-f]+$/i,Qr=/^0b[01]+$/i,ei=/^0o[0-7]+$/i,ti=parseInt;function Vo(a){if(typeof a=="number")return a;if(rt.isSymbol(a))return Ao;if(rt.isObject(a)){var r=typeof a.valueOf=="function"?a.valueOf():a;a=rt.isObject(r)?r+"":r}if(typeof a!="string")return a===0?a:+a;a=Jr(a);var i=Qr.test(a);return i||ei.test(a)?ti(a.slice(2),i?2:8):Zr.test(a)?Ao:+a}var no=function(){return rt.root.Date.now()},ni="Expected a function",ai=Math.max,oi=Math.min;function ml(a,r,i){var l,u,s,k,v,p,y=0,_=!1,O=!1,P=!0;if(typeof a!="function")throw new TypeError(ni);r=Vo(r)||0,rt.isObject(i)&&(_=!!i.leading,O="maxWait"in i,s=O?ai(Vo(i.maxWait)||0,r):s,P="trailing"in i?!!i.trailing:P);function H(E){var g=l,te=u;return l=u=void 0,y=E,k=a.apply(te,g),k}function I(E){return y=E,v=setTimeout(F,r),_?H(E):k}function ee(E){var g=E-p,te=E-y,Te=r-g;return O?oi(Te,s-te):Te}function $(E){var g=E-p,te=E-y;return p===void 0||g>=r||g<0||O&&te>=s}function F(){var E=no();if($(E))return L(E);v=setTimeout(F,ee(E))}function L(E){return v=void 0,P&&l?H(E):(l=u=void 0,k)}function m(){v!==void 0&&clearTimeout(v),y=0,l=p=u=v=void 0}function C(){return v===void 0?k:L(no())}function h(){var E=no(),g=$(E);if(l=arguments,u=this,p=E,g){if(v===void 0)return I(p);if(O)return clearTimeout(v),v=setTimeout(F,r),H(p)}return v===void 0&&(v=setTimeout(F,r)),k}return h.cancel=m,h.flush=C,h}var li="[object Boolean]";function yl(a){return a===!0||a===!1||rt.isObjectLike(a)&&rt.baseGetTag(a)==li}function ri(a){return a===void 0}const ii={class:"statistics-cards-container"},si={class:"statistics-label"},ci={class:"statistics-value"},ui=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(a){return(r,i)=>(e.openBlock(),e.createElementBlock("div",ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:u},[e.createElementVNode("div",si,e.toDisplayString(l==null?void 0:l.label),1),e.createElementVNode("div",ci,e.toDisplayString((l==null?void 0:l.value)??0),1)]))),128))]))}}),di=Ft._export_sfc(ui,[["__scopeId","data-v-d399b1f3"]]),pi={class:"form-content"},fi={title:"选择标签"},hi={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},vi={class:"col-operate-wrap"},gi={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},mi={__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(a,{emit:r}){const i=()=>{k.value=!1,v.value=!1,p.value=[]},l=a;e.computed(()=>{var U;const A=(U=M.value)==null?void 0:U.split("/");return(A==null?void 0:A.some(q=>(q==null?void 0:q.includes("updateLoading"))||(q==null?void 0:q.includes("loading"))))?!1:z.value==="view"});const u=r,s=e.ref([]),k=e.ref(!1),v=e.ref(!1),p=e.ref([]),{getFileExtension:y}=To.useThreeSystem(),_=e.ref(),O=e.ref(!1),P=e.ref(!1),H=Ve.useUnit(D.pinia),{chooseTitle:I}=D.storeToRefs(H),ee=e.ref([]),$=e.ref(),F=e.ref(!1),L=e.ref([]),m=xa.useFormToTableComp(D.pinia),C=xa.useFormComp(D.pinia),h=e.ref(!1),E=e.ref(),g=D.useLoginState(D.pinia),{loginUserInfo:te}=D.storeToRefs(g),Te=e.ref(),Qe=e.ref(!0),de=D.useModelComp(D.pinia),{tableViewContents:Be,itemData:Oe,isEdit:z,routeToChildPath:re,lockingPage:le}=D.storeToRefs(de),fe=e.ref(null),$e=e.ref(!1),tt=e.ref(!1),X=D.useMenuState(),{activeMenuPath:M}=D.storeToRefs(X),ie=Ve.useOriginalState(D.pinia),{originalPath:J}=D.storeToRefs(ie),ve=e.ref([]),we=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ee=async A=>{tt.value=A,await ce("disabled",null,A,!0)},ne=async A=>{await ce("operable",null,A,!0)};e.watch(()=>M.value,async()=>{s.value=[],p.value=[]},{deep:!0,immediate:!0});const ke=()=>{e.nextTick(()=>{Ae()})},T=A=>{var oe;s.value=(oe=s.value)==null?void 0:oe.map(U=>({...U,isFormColHidden:!(A!=null&&A.includes(U.label))}))};e.onUnmounted(()=>{fe.value=null});const Ge=A=>{u("clickTrigger",A)},Ye=async A=>{var oe,U,q,Se,ue,G;if(A===""){let Q="";(oe=s.value)==null||oe.forEach(xe=>{xe!=null&&xe.isMain&&(Q=xe==null?void 0:xe.value)});let he=await Ve.getItemData(re.value,sessionStorage.getItem("systemKey"),"");Q=((G=(ue=(Se=(q=(U=he==null?void 0:he[0])==null?void 0:U.compData)==null?void 0:q.find(xe=>(xe==null?void 0:xe.key)==="mainRouters"))==null?void 0:Se.contents)==null?void 0:ue[0])==null?void 0:G.routerContent)+J.value+Q;let _e=await Ve.getItemData(Q,sessionStorage.getItem("systemKey"),"");F.value=!0,L.value=_e==null?void 0:_e.filter(xe=>(xe==null?void 0:xe.comp)!=="methodButton"),u("routeUrl",L.value)}},Ae=()=>{var oe;const A=(oe=fe.value)==null?void 0:oe.$el;A&&Ve.Sortable.create(A,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:U=>{const{oldIndex:q,newIndex:Se}=U;if(q===Se)return;const ue=s.value.splice(q,1)[0];s.value.splice(Se,0,ue)}})},ce=async(A,oe,U,q=!1)=>{try{de.setRefreshCurStructure(!1)}catch{rt.ElMessage.error("编辑处理失败")}},ae=async(A,oe)=>{await ce()},pe=async(A,oe)=>{A&&await ce()},Ce=async(A,oe,U)=>{await ce(oe,U,A,!1)},qe=(A,oe)=>{Te.value===oe?Qe.value=!1:Qe.value=!0,Te.value=oe==null?void 0:oe.changeProp},dt=async A=>{var U,q,Se,ue,G,Q,he,ye,_e,xe,K,Re,be,Ke,ot;let oe=[];if((U=A==null?void 0:A.toString())!=null&&U.includes(".urdf")){if(A.includes(",")){rt.ElMessage.error("当前版本仅允许单个urdf预览!");return}p.value=[{url:A,extension:y(A)}],v.value=!0,k.value=!0;return}if((q=A==null?void 0:A.toString())!=null&&q.includes(".stl")||(Se=A==null?void 0:A.toString())!=null&&Se.includes(".STL")||(ue=A==null?void 0:A.toString())!=null&&ue.includes(".obj")||(G=A==null?void 0:A.toString())!=null&&G.includes(".mtl")){const at=((Q=A==null?void 0:A.toString())==null?void 0:Q.split(",")).map(Ne=>({url:Ne,extension:y(Ne)}));p.value=at,v.value=!1,k.value=!0;return}if((he=A==null?void 0:A.toString())!=null&&he.includes(".stl")||(ye=A==null?void 0:A.toString())!=null&&ye.includes(".STL")||(_e=A==null?void 0:A.toString())!=null&&_e.includes(".obj")||(xe=A==null?void 0:A.toString())!=null&&xe.includes(".mtl")){let je,at=[],Ne={};if(Array.isArray(A)?je=A:je=A==null?void 0:A.split(","),je==null||je.forEach(gt=>{gt.includes(".mtl")?at.push(gt):Ne.blob=Ne.blob?Ne.blob+","+gt:gt}),(at==null?void 0:at.length)>0&&(Ne.mtlBlobs=at),(Re=(K=Object.values(Ne))==null?void 0:K[0])!=null&&Re.includes("http:"))oe.push(Ne);else{const gt=new Blob([Ne.blob],{type:"application/octet-stream;charset=UTF-8"});let et=URL.createObjectURL(gt),ze="";(be=A==null?void 0:A.split("/"))==null||be.forEach((it,mt)=>{var Je;mt===((Je=A==null?void 0:A.split("/"))==null?void 0:Je.length)-1&&(ze=it)}),(Ke=Ne.blob)!=null&&Ke.includes(".stl")&&(ze=(ze==null?void 0:ze.replaceAll(">",""))+".urdf"),$.value=[{name:ze,blobUrl:et}],P.value=!0}}else{const je=It.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),at=await rt.axios.get(A,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{je.close()}),Ne=new Blob([at.data],{type:"application/octet-stream;charset=UTF-8"});let gt=URL.createObjectURL(Ne),et="";(ot=A==null?void 0:A.split("/"))==null||ot.forEach((ze,it)=>{var mt;it===((mt=A==null?void 0:A.split("/"))==null?void 0:mt.length)-1&&(et=ze)}),$.value=[{name:et,blobUrl:gt}],P.value=!0}(oe==null?void 0:oe.length)>0&&C.setBlobUrls(oe)},b=()=>{P.value=!1},N=A=>{var ue,G,Q,he;const oe=(G=(ue=D.cloneDeep(l.itemData))==null?void 0:ue.find(ye=>(ye==null?void 0:ye.key)==="formContent"))==null?void 0:G.contents,U=D.cloneDeep(A.content);let q={};U&&((Q=Object.values(U))==null?void 0:Q.length)>0&&((he=Object.values(U))==null||he.forEach((ye,_e)=>{q[oe[_e].key]=ye}));const Se={content:q,index:l==null?void 0:l.index,buttonName:A==null?void 0:A.buttonName};u("change",Se)},W=e.computed(()=>"http://222.92.178.198:62001"),Z=async A=>{var K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt,Je,Ue,Nt;if(!A)return;(Re=(K=l==null?void 0:l.itemData)==null?void 0:K.find(Ie=>(Ie==null?void 0:Ie.key)==="parentFormPath"))==null||Re.contents;let oe=Be.value;(oe==null?void 0:oe.length)>0&&(oe=oe==null?void 0:oe.map(Ie=>{var Fe,Ze,B,ge;let Xe=(Fe=Ie==null?void 0:Ie.key)==null?void 0:Fe.split("/");return(l==null?void 0:l.compName)===(Xe==null?void 0:Xe[0])&&(Ze=s.value)!=null&&Ze.find(We=>(We==null?void 0:We.prop)===(Xe==null?void 0:Xe[1]))&&(Ie.value=(ge=(B=s.value)==null?void 0:B.find(We=>(We==null?void 0:We.prop)===(Xe==null?void 0:Xe[1])))==null?void 0:ge.value),Ie}),de.setTableViewContents(oe));const U=D.cloneDeep(l.itemData);let q=U==null?void 0:U.map(Ie=>{var Xe;return(Ie==null?void 0:Ie.key)==="formContent"&&((Xe=Ie.contents)==null||Xe.map((Fe,Ze)=>{var B,ge,We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut,vt,zt,$t,Kt,qt,Qt;return Fe.type=(ge=(B=s.value)==null?void 0:B.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:ge.type,Fe.options=Fe!=null&&Fe.options?Fe.options:((ut=(me=(We=Fe==null?void 0:Fe.key)==null?void 0:We.split("$"))==null?void 0:me[1])==null?void 0:ut.length)>0?(ct=(pt=xa.formGetOptions((xt=(st=Fe==null?void 0:Fe.key)==null?void 0:st.split("$"))==null?void 0:xt[1]))==null?void 0:pt.split(","))==null?void 0:ct.map(Lt=>({label:Lt,value:Lt})):[],(ft=Fe==null?void 0:Fe.key)!=null&&ft.includes("$")&&(Fe.key=(Tt=(wt=Fe==null?void 0:Fe.key)==null?void 0:wt.split("$"))==null?void 0:Tt[0]),Fe.signature=(vt=(Ut=s.value)==null?void 0:Ut.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:vt.signature,Fe.isLoginUser=($t=(zt=s.value)==null?void 0:zt.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:$t.isLoginUser,Fe.value=(Kt=Object.values(A))==null?void 0:Kt[Ze],Fe.isFormColHidden=(Qt=(qt=s.value)==null?void 0:qt.find(Lt=>(Lt==null?void 0:Lt.prop)===(Fe==null?void 0:Fe.prop)))==null?void 0:Qt.isFormColHidden,Fe})),Ie}),Se=s.value,ue=(Ke=(be=D.cloneDeep(q))==null?void 0:be.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Ke.contents;if(Se=Se==null?void 0:Se.map(Ie=>{var Xe;return Ie.value=(Xe=ue==null?void 0:ue.find((Fe,Ze)=>((Fe==null?void 0:Fe.id)??Ze)===(Ie==null?void 0:Ie.id)))==null?void 0:Xe.value,Ie}),!Qe.value){u("contentChange",{contents:q,index:l.index});return}let G="",Q=(at=(je=(ot=D.cloneDeep(q))==null?void 0:ot.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:je.contents)==null?void 0:at.find((Ie,Xe)=>{var Fe,Ze,B;return(Ie==null?void 0:Ie.label)===Te.value||Xe.toString()===((B=(Ze=(Fe=Te.value)==null?void 0:Fe.split("t"))==null?void 0:Ze[1])==null?void 0:B.toString())}),he=(Ne=Q==null?void 0:Q.optionUrl)==null?void 0:Ne.menuSelect,ye=!0;if((ze=(et=(gt=D.cloneDeep(q))==null?void 0:gt.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:et.contents)==null||ze.forEach(Ie=>{var Xe,Fe,Ze,B,ge,We;ye&&((Ze=(Fe=(Xe=Ie==null?void 0:Ie.optionUrl)==null?void 0:Xe.groupSelect)==null?void 0:Fe[1])!=null&&Ze.includes("["))&&(G=(ge=(B=Ie==null?void 0:Ie.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1],JSON.stringify(he)===JSON.stringify((We=Ie==null?void 0:Ie.optionUrl)==null?void 0:We.menuSelect)&&(ye=!1))}),(it=Q==null?void 0:Q.optionUrl)!=null&&it.menuSelect&&Qe.value){let Ie=await xa.getSelectRow(Q),Xe,Fe=(mt=Q==null?void 0:Q.optionUrl)==null?void 0:mt.menuSelect;if(Ie==null||Ie.forEach(Ze=>{var B,ge,We,me,ut,st,xt,pt,ct,ft;G===((ge=(B=Q==null?void 0:Q.optionUrl)==null?void 0:B.groupSelect)==null?void 0:ge[1])&&((ut=(me=(We=Q==null?void 0:Q.optionUrl)==null?void 0:We.groupSelect)==null?void 0:me[1])!=null&&ut.includes("["))&&((ft=D.cloneDeep(Ze))==null?void 0:ft[(ct=(pt=(xt=(st=Q==null?void 0:Q.optionUrl)==null?void 0:st.groupSelect)==null?void 0:xt[1])==null?void 0:pt.replaceAll("[",""))==null?void 0:ct.replaceAll("]","")])===(Q==null?void 0:Q.value)&&(Xe=Ze)}),Xe){let Ze=D.cloneDeep(Se);Ze=Ze==null?void 0:Ze.map(ge=>{var We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut;return(Xe!=null&&Xe[ge==null?void 0:ge.label]||Xe!=null&&Xe[(st=(ut=(me=(We=ge==null?void 0:ge.optionUrl)==null?void 0:We.groupSelect)==null?void 0:me[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])&&((ct=(pt=(xt=ge==null?void 0:ge.optionUrl)==null?void 0:xt.groupSelect)==null?void 0:pt[1])!=null&&ct.includes("["))&&Fe!=null&&Fe.every(vt=>{var zt,$t;return($t=(zt=ge==null?void 0:ge.optionUrl)==null?void 0:zt.menuSelect)==null?void 0:$t.includes(vt)})&&(ge.value=(Xe==null?void 0:Xe[ge==null?void 0:ge.label])||(Xe==null?void 0:Xe[(Ut=(Tt=(wt=(ft=ge==null?void 0:ge.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:wt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:Ut.replaceAll("]","")]),Array.isArray(ge.value)&&ge.value.every(vt=>(vt==null?void 0:vt.url)&&(vt==null?void 0:vt.name))&&(ge.type="Upload")),ge}),Ze=Ze==null?void 0:Ze.map(ge=>{var We,me,ut;return(We=ge==null?void 0:ge.optionUrl)!=null&&We.oldMenuSelect&&(ge.optionUrl.menuSelect=(ut=(me=D.cloneDeep(ge))==null?void 0:me.optionUrl)==null?void 0:ut.oldMenuSelect),ge}),s.value=D.cloneDeep(Ze);let B=D.cloneDeep(Ze);B=B==null?void 0:B.map(ge=>{var We,me,ut,st,xt,pt;return(me=(We=ge==null?void 0:ge.optionUrl)==null?void 0:We.menuSelect)!=null&&me.some(ct=>ct==null?void 0:ct.includes("["))&&(ge.optionUrl.oldMenuSelect=(st=(ut=D.cloneDeep(ge))==null?void 0:ut.optionUrl)==null?void 0:st.menuSelect,ge.optionUrl.menuSelect=(pt=(xt=ge==null?void 0:ge.optionUrl)==null?void 0:xt.menuSelect)==null?void 0:pt.map(ct=>{var ft,wt,Tt,Ut;if(ct!=null&&ct.includes("[")){let vt=(wt=(ft=ct==null?void 0:ct.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:wt[1];ct=(Ut=(Tt=D.cloneDeep(Ze))==null?void 0:Tt.find(zt=>(zt==null?void 0:zt.label)===vt))==null?void 0:Ut.value}return ct})),ge}),s.value=B}else s.value=Se;q=q==null?void 0:q.map(Ze=>{var B;return(Ze==null?void 0:Ze.key)==="formContent"&&(Ze.contents=(B=Ze.contents)==null?void 0:B.map(ge=>{var We,me,ut,st;return ge.value=((me=(We=s.value)==null?void 0:We.find(xt=>(xt==null?void 0:xt.label)===(ge==null?void 0:ge.key)))==null?void 0:me.value)??(ge==null?void 0:ge.value),ge.type=((st=(ut=s.value)==null?void 0:ut.find(xt=>(xt==null?void 0:xt.prop)===(ge==null?void 0:ge.key)))==null?void 0:st.type)??(ge==null?void 0:ge.type),ge})),Ze})}Qe.value=!1,u("contentChange",{contents:q,index:l.index});let _e=[],xe=[];if((Ue=D.cloneDeep((Je=q==null?void 0:q.find(Ie=>(Ie==null?void 0:Ie.key)==="formContent"))==null?void 0:Je.contents))==null||Ue.forEach(Ie=>{var Xe;Array.isArray(Ie==null?void 0:Ie.value)&&((Xe=Ie==null?void 0:Ie.value)!=null&&Xe.find(Fe=>{var Ze;return(Ze=Fe==null?void 0:Fe.url)==null?void 0:Ze.includes(".obj")}))&&(xe=Ie==null?void 0:Ie.value)}),(xe==null?void 0:xe.length)>0){const Ie=(Nt=D.cloneDeep(xe))==null?void 0:Nt.filter(Xe=>{var Fe;return(Fe=Xe==null?void 0:Xe.url)==null?void 0:Fe.includes(".obj")});Ie==null||Ie.forEach(Xe=>{var Ze,B,ge,We;const Fe=(Ze=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Xe==null?void 0:Xe.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:Ze.map(me=>me==null?void 0:me.url);_e.push({objUrl:Xe==null?void 0:Xe.url,mtlUrls:((B=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Xe==null?void 0:Xe.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:B.length)===1?(We=(ge=xe==null?void 0:xe.filter(me=>{var ut;return(me==null?void 0:me.name)===(Xe==null?void 0:Xe.name)&&((ut=me==null?void 0:me.url)==null?void 0:ut.includes(".mtl"))}))==null?void 0:ge[0])==null?void 0:We.url:Fe})}),C.setObjUrl(_e)}},S=A=>{if(!A)return;const oe=[];let U="";for(let q of A)(q.includes("[")||U.includes("["))&&(U+=q.trim(),D.cloneDeep(U).split("【").length-1===D.cloneDeep(U).split("】").length-1&&D.cloneDeep(U).split("[").length-1===D.cloneDeep(U).split("]").length-1&&(oe.push(U.replace(/\/\*[\s\S]*?\*\//g,"")),U=""));return oe},se=(A,oe,U)=>{let q="";const Se=oe==null?void 0:oe.map(ue=>{var G;return(G=ue==null?void 0:ue.value)==null?void 0:G.pageData});return Se==null||Se.forEach(ue=>{var G;(ue==null?void 0:ue.name)===(A==null?void 0:A[0])&&((G=ue==null?void 0:ue.compData)==null||G.forEach(Q=>{var he;(Q==null?void 0:Q.key)==="formContent"&&((he=Q==null?void 0:Q.contents)==null||he.forEach(ye=>{var _e;(ye==null?void 0:ye.prop)===(A==null?void 0:A[1])&&(q=(ye==null?void 0:ye.value)===""?Ve.judgeContents((_e=D.cloneDeep(ye))==null?void 0:_e.optionUrl,U):ye==null?void 0:ye.value)}))}))}),q},Me=(A,oe,U,q)=>{var Q,he;let Se="",ue="";(Q=D.cloneDeep(oe))==null||Q.forEach((ye,_e)=>{ye!=null&&ye.includes("[")?ue=ue+J.value+A[_e]:ue=ue===""?ue+ye:ue+"/"+ye});let G=(he=q[ue])==null?void 0:he.map(ye=>{var _e;return(_e=ye==null?void 0:ye.value)==null?void 0:_e.pageData});return G==null||G.forEach(ye=>{var _e;(ye==null?void 0:ye.name)===(U==null?void 0:U[0])&&((_e=ye==null?void 0:ye.compData)==null||_e.forEach(xe=>{var K;(xe==null?void 0:xe.key)==="formContent"&&((K=xe==null?void 0:xe.contents)==null||K.forEach(Re=>{(Re==null?void 0:Re.prop)===(U==null?void 0:U[1])&&(Se=Re==null?void 0:Re.value)}))}))}),Se};return e.watch(()=>l.itemData,async()=>{var G,Q,he,ye,_e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt;const A=(G=l.itemData)==null?void 0:G.find(Je=>(Je==null?void 0:Je.key)==="formContent"),oe=(Q=D.cloneDeep(l.itemData))==null?void 0:Q.find(Je=>(Je==null?void 0:Je.key)==="formButton"),U=(he=D.cloneDeep(l.itemData))==null?void 0:he.find(Je=>(Je==null?void 0:Je.key)==="formFlex"),q=(ye=D.cloneDeep(l.itemData))==null?void 0:ye.find(Je=>(Je==null?void 0:Je.key)==="formWrap"),Se=(_e=D.cloneDeep(l.itemData))==null?void 0:_e.find(Je=>(Je==null?void 0:Je.key)==="enableWrap");if((q==null?void 0:q.contents)==="纵向"?O.value=!1:O.value=!0,h.value=(Se==null?void 0:Se.contents)===void 0?!1:Se==null?void 0:Se.contents,E.value=typeof(U==null?void 0:U.contents)!="boolean"?!(!(U!=null&&U.contents)===""||((xe=U==null?void 0:U.contents)==null?void 0:xe.toUpperCase())==="VERTICAL"):U==null?void 0:U.contents,((K=A==null?void 0:A.contents)==null?void 0:K.length)>0&&Array.isArray(A==null?void 0:A.contents)){let Je=l.allMapContents;const Ue=(be=(Re=D.cloneDeep(A))==null?void 0:Re.contents)==null?void 0:be.map((B,ge)=>{var vt,zt,$t,Kt,qt,Qt,Lt,Tn,Fn,kn,Ln,xn,$n,jn,Un,Kn,Wn,Bn,mn,dn,wn,yn,on,hn,Hn,In,Nn,Dn,qn,Xn,An,Gn,Yn;let We=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",me=(B==null?void 0:B.type)??"",ut=(B==null?void 0:B.options)??[];if((vt=B==null?void 0:B.key)!=null&&vt.includes("$")&&(We=(zt=D.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:zt[0],((Kt=($t=D.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:$t[1])==null?void 0:Kt.length)>0)){const[Et,Zt]=(Qt=(qt=D.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:qt[1])==null?void 0:Qt.split(/[()]/);me=((Lt=Ve.FormType.find(yt=>(yt==null?void 0:yt.key)===Et))==null?void 0:Lt.value)??"",((Tn=Zt==null?void 0:Zt.split(","))==null?void 0:Tn.length)>0&&(ut=(Fn=Zt==null?void 0:Zt.split(","))==null?void 0:Fn.map(yt=>({label:yt,value:yt})))}let st=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(st=(Ln=(kn=B==null?void 0:B.contents)==null?void 0:kn.split(","))==null?void 0:Ln.map(Et=>({label:Et,value:Et}))),((xn=B==null?void 0:B.optionUrl)==null?void 0:xn.selectRelateType)==="自定义绑定"&&(st=(jn=($n=B==null?void 0:B.optionUrl)==null?void 0:$n.defaultSelect)==null?void 0:jn.map(Et=>({label:Et,value:Et})));let xt=!1,pt=(B==null?void 0:B.isFormColHidden)??!1,ct=Ve.judgeContents((Un=D.cloneDeep(B))==null?void 0:Un.optionUrl,Je),ft=ct!==void 0&&ct!==""?ct:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(ut==null?void 0:ut.length)>0?(Kn=ut==null?void 0:ut[0])==null?void 0:Kn.value:(B==null?void 0:B.value)??"",wt=!1,Tt=ct!==void 0||me===""?"Input":me;if((Array.isArray(ct)&&(ct!=null&&ct.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(Et=>(Et==null?void 0:Et.name)&&(Et==null?void 0:Et.url))))&&(Tt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||B!=null&&B.isLoginUser)xt=!0,ft=((Wn=te.value)==null?void 0:Wn.姓名)||((Bn=te.value)==null?void 0:Bn.account)||((mn=te.value)==null?void 0:mn.账号)||((dn=te.value)==null?void 0:dn.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(wt=!0,(B==null?void 0:B.isShow)==="originalSignature")Tt="image",ft=W.value+"/"+((wn=te.value)==null?void 0:wn.signature);else{let Et=[...new Set(S(B.isShow))].map(bt=>{var _t,Dt,Rt,Ot;return{key:(Ot=(Rt=(Dt=(_t=bt==null?void 0:bt.split("["))==null?void 0:_t[1])==null?void 0:Dt.split("]"))==null?void 0:Rt[0])==null?void 0:Ot.split(":"),value:""}});(yn=Oe.value)==null||yn.forEach(bt=>{Et==null||Et.forEach((Wt,_t)=>{var Rt;let Dt=Wt==null?void 0:Wt.key;(bt==null?void 0:bt.name)===(Dt==null?void 0:Dt[0].replaceAll("'",""))&&((Rt=bt==null?void 0:bt.compData)==null||Rt.forEach(Ot=>{var Pt;(Ot==null?void 0:Ot.key)==="formContent"&&((Pt=Ot==null?void 0:Ot.contents)==null||Pt.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(bt=>{var Wt;return bt.key="["+((Wt=bt.key)==null?void 0:Wt.join(":"))+"]",bt}),yt=B==null?void 0:B.isShow;Zt==null||Zt.forEach(bt=>{bt!=null&&bt.value?yt=yt.replaceAll(bt==null?void 0:bt.key,"'"+(bt==null?void 0:bt.value)+"'"):yt=yt.replaceAll(bt==null?void 0:bt.key,"undefined")}),yt!=null&&yt.includes("(")||(yt!=null&&yt.includes("==")?yt=((on=yt==null?void 0:yt.split("==="))==null?void 0:on[0])+"==='"+((hn=yt==null?void 0:yt.split("==="))==null?void 0:hn[1])+"'":yt=((Hn=yt==null?void 0:yt.split("="))==null?void 0:Hn[0])+"='"+((In=yt==null?void 0:yt.split("="))==null?void 0:In[1])+"'"),yt!=null&&yt.includes("=")&&!(yt!=null&&yt.includes("=="))&&!(yt!=null&&yt.includes("==="))&&(yt=yt==null?void 0:yt.replaceAll("=","==")),new Function(`if (${yt}) { return true } else { return false }`)()?(pt=!1,Tt="image",ft=W.value+"/"+((Nn=te.value)==null?void 0:Nn.signature)):ft=""}return Array.isArray(ft)&&ft.every(Et=>(Et==null?void 0:Et.url)&&(Et==null?void 0:Et.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Tt="Url"),{label:We??"",name:"t"+ge,prop:D.cloneDeep(B==null?void 0:B.key),type:Tt,value:B!=null&&B.isSync?((qn=(Dn=I.value)==null?void 0:Dn[0])==null?void 0:qn.value)??((Yn=(Xn=M==null?void 0:M.value)==null?void 0:Xn.split("/"))==null?void 0:Yn[((Gn=(An=M==null?void 0:M.value)==null?void 0:An.split("/"))==null?void 0:Gn.length)-1]):B!=null&&B.isNewDate&&ft===""?new Date:ft,id:(B==null?void 0:B.id)??ge,contents:(st==null?void 0:st.length)>0?st:ut??[],width:(B==null?void 0:B.width)??1,isLoginUser:xt,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:pt,signature:wt,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1,isSync:B==null?void 0:B.isSync}}),Nt=Ue==null?void 0:Ue.map(B=>B==null?void 0:B.value);let Ie="";Nt==null||Nt.forEach(B=>{B!==""&&B!==void 0&&(Ie=Ie===""?B:Ie+"/"+B)}),m.setSelectArray(Nt),m.setSelectString(Ie);let Xe=(Ke=D.cloneDeep(Ue))==null?void 0:Ke.map(B=>(B!=null&&B.value&&Ve.IsJson(B==null?void 0:B.value)&&Array.isArray(JSON.parse(B==null?void 0:B.value))&&(B.value=JSON.parse(B.value)),B));Xe=Xe==null?void 0:Xe.map(B=>{var ge,We,me,ut,st,xt,pt,ct;if((We=(ge=B==null?void 0:B.optionUrl)==null?void 0:ge.menuSelect)!=null&&We.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";B.optionUrl.oldMenuSelect=(ut=(me=D.cloneDeep(B))==null?void 0:me.optionUrl)==null?void 0:ut.menuSelect,B.optionUrl.menuSelect=(xt=(st=B==null?void 0:B.optionUrl)==null?void 0:st.menuSelect)==null?void 0:xt.map(wt=>{var Tt,Ut,vt,zt,$t,Kt;if(wt!=null&&wt.includes("[")){let qt=(Ut=(Tt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:Ut[1];ft=se((vt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"),Je==null?void 0:Je[M.value],Je),wt=(($t=(zt=D.cloneDeep(Xe))==null?void 0:zt.find(Qt=>(Qt==null?void 0:Qt.label)===qt))==null?void 0:$t.value)||se((Kt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Kt.split(":"),Je==null?void 0:Je[M.value],Je)}return wt}),ft!==""&&B.value===""&&(B.value=Me(B.optionUrl.menuSelect,B.optionUrl.oldMenuSelect,(pt=B==null?void 0:B.optionUrl)==null?void 0:pt.groupSelect,Je),Array.isArray(B.value)&&((ct=B.value)!=null&&ct.every(wt=>wt==null?void 0:wt.url))&&(B.type="UPLOAD"))}return B}),s.value=Xe,tt.value=((ot=s.value)==null?void 0:ot.every(B=>B==null?void 0:B.disabled))||le.value===M.value,$e.value=(je=s.value)==null?void 0:je.every(B=>B==null?void 0:B.operable),ve.value=(at=s.value)==null?void 0:at.map(B=>B==null?void 0:B.label);let Fe=[],Ze=[];if((Ne=D.cloneDeep(s.value))==null||Ne.forEach(B=>{var ge;Array.isArray(B==null?void 0:B.value)&&((ge=B==null?void 0:B.value)!=null&&ge.find(We=>{var me;return(me=We==null?void 0:We.url)==null?void 0:me.includes(".obj")}))&&(Ze=B==null?void 0:B.value)}),(Ze==null?void 0:Ze.length)>0){const B=(gt=D.cloneDeep(Ze))==null?void 0:gt.filter(ge=>{var We;return(We=ge==null?void 0:ge.url)==null?void 0:We.includes(".obj")});B==null||B.forEach(ge=>{var me,ut,st,xt;const We=(me=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(ge==null?void 0:ge.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:me.map(pt=>pt==null?void 0:pt.url);Fe.push({objUrl:ge==null?void 0:ge.url,mtlUrls:((ut=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(ge==null?void 0:ge.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:ut.length)===1?(xt=(st=Ze==null?void 0:Ze.filter(pt=>{var ct;return(pt==null?void 0:pt.name)===(ge==null?void 0:ge.name)&&((ct=pt==null?void 0:pt.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:st[0])==null?void 0:xt.url:We})}),C.setObjUrl(Fe)}(et=D.cloneDeep(s.value))==null||et.forEach(B=>{var ge,We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut,vt;if((We=(ge=B==null?void 0:B.value)==null?void 0:ge.toString())!=null&&We.includes(".stl")||(ut=(me=B==null?void 0:B.value)==null?void 0:me.toString())!=null&&ut.includes(".STL")||(xt=(st=B==null?void 0:B.value)==null?void 0:st.toString())!=null&&xt.includes(".obj")||(ct=(pt=B==null?void 0:B.value)==null?void 0:pt.toString())!=null&&ct.includes(".mtl")||(wt=(ft=B==null?void 0:B.value)==null?void 0:ft.toString())!=null&&wt.includes(".urdf")){let zt={},$t=[],Kt;Array.isArray(B==null?void 0:B.value)?Kt=B==null?void 0:B.value:Kt=(Tt=B==null?void 0:B.value)==null?void 0:Tt.split(","),Kt==null||Kt.forEach(qt=>{qt.includes(".mtl")?$t.push(qt):zt.blob=zt.blob==="undefined"?qt:zt.blob+","+qt}),($t==null?void 0:$t.length)>0&&(zt.mtlBlobs=$t),(vt=(Ut=Object.values(zt))==null?void 0:Ut[0])!=null&&vt.includes("http:")}})}else s.value=[];let ue=Be.value;if((ue==null?void 0:ue.length)>0&&(ue=ue==null?void 0:ue.map(Je=>{var Nt,Ie,Xe,Fe;let Ue=(Nt=Je==null?void 0:Je.key)==null?void 0:Nt.split("/");return(l==null?void 0:l.compName)===(Ue==null?void 0:Ue[0])&&(Ie=s.value)!=null&&Ie.find(Ze=>(Ze==null?void 0:Ze.prop)===(Ue==null?void 0:Ue[1]))&&(Je.value=(Fe=(Xe=s.value)==null?void 0:Xe.find(Ze=>(Ze==null?void 0:Ze.prop)===(Ue==null?void 0:Ue[1])))==null?void 0:Fe.value),Je}),de.setTableViewContents(ue)),l!=null&&l.formRules)_.value=l==null?void 0:l.formRules;else{let Je={};(ze=D.cloneDeep(s).value)==null||ze.forEach(Ue=>{(Ue==null?void 0:Ue.isMain)===!0&&(Je[(Ue==null?void 0:Ue.prop)??(Ue==null?void 0:Ue.name)]=[{required:!0,message:`${(Ue==null?void 0:Ue.prop)||(Ue==null?void 0:Ue.name)}不能为空`}])}),_.value=Je}if(((it=oe==null?void 0:oe.contents)==null?void 0:it.length)>0){const Je=[];(mt=oe==null?void 0:oe.contents)==null||mt.forEach((Ue,Nt)=>{(Ue==null?void 0:Ue.label)!==""&&Je.push({label:(Ue==null?void 0:Ue.label)??"",id:(Ue==null?void 0:Ue.id)??Nt,type:(Ue==null?void 0:Ue.type)??"",background:Ue==null?void 0:Ue.background})}),ee.value=Je}else ee.value=[]},{deep:!0,immediate:!0}),e.watch(()=>le.value,A=>{tt.value=A===M.value},{immediate:!0}),(A,oe)=>{var Q,he;const U=e.resolveComponent("svg-icon"),q=e.resolveComponent("el-switch"),Se=e.resolveComponent("el-checkbox"),ue=e.resolveComponent("el-popover"),G=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",pi,[h.value===!1?(e.openBlock(),e.createBlock(di,{key:0,items:(he=(Q=s.value)==null?void 0:Q.filter(ye=>!(ye!=null&&ye.isFormColHidden)))==null?void 0:he.map(ye=>({label:ye==null?void 0:ye.label,value:ye==null?void 0:ye.value}))},null,8,["items"])):(e.openBlock(),e.createBlock(It.ssForm,{key:1,rowContents:s.value,formRules:_.value,buttonValue:ee.value,isRowFlex:!1,isEnableWrap:h.value,onOnButtonClick:N,onChange:Z,formDisabled:tt.value,formLabelsOperable:$e.value,isButtonRow:O.value,onPreview:dt,onBlurChange:qe,onHandleColEditChange:ae,onHandleColTypeChange:pe,onRouteUrl:Ye,onClickTrigger:Ge},{operateCol:e.withCtx(({renderColumns:ye,formDisabled:_e,formLabelsOperable:xe})=>[e.createVNode(ue,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ke},{reference:e.withCtx(()=>[e.createElementVNode("span",fi,[e.createVNode(U,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",hi,[oe[1]||(oe[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(q,{"model-value":_e,"active-text":"禁用","inactive-text":"",onChange:Ee,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(q,{"model-value":xe,"active-text":"编辑所有标签","inactive-text":"",onChange:ne},null,8,["model-value"]),oe[2]||(oe[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(G,{modelValue:ve.value,"onUpdate:modelValue":oe[0]||(oe[0]=K=>ve.value=K),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:fe,onChange:T},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye,K=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:K.label},[e.createVNode(Se,{value:K.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(K.label),1)]),_:2},1032,["value"]),e.createVNode(ue,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(U,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Re;return[e.createElementVNode("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Re=Object.keys(K))==null?void 0:Re.filter(be=>{var Ke;return(Ke=we.value)==null?void 0:Ke.find(ot=>(ot==null?void 0:ot.value)===be)}),be=>{var Ke,ot;return e.openBlock(),e.createElementBlock("div",{key:be},[e.createVNode(It._sfc_main$1,{value:K==null?void 0:K[be],"active-text":(ot=(Ke=we.value)==null?void 0:Ke.find(je=>(je==null?void 0:je.value)===be))==null?void 0:ot.label,inactiveText:"",onChange:je=>Ce(je,be,K)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",gi,[e.createVNode(U,{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"])),P.value?(e.openBlock(),e.createBlock(It.ssFilePreview,{key:2,fileDataList:$.value,onDestroy:b},null,8,["fileDataList"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock(Jt.ssDialog,{key:3,visible:k.value,onBeforeDestroy:i,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(To.ThreeViewerHost,{files:p.value,onGetAnimationData:A.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Oo=Ft._export_sfc(mi,[["__scopeId","data-v-8040f4ad"]]),$a=e.ref(0),bl=a=>{var r;return!a||(a==null?void 0:a.length)===0?[]:(r=D.cloneDeep(a))==null?void 0:r.map(l=>($a.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??$a.value,children:bl(l==null?void 0:l.children)},l))},yi=a=>{var i;return(i=D.cloneDeep(a))==null?void 0:i.map(l=>($a.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??$a.value,children:bl(l==null?void 0:l.children)},l))},kl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===r)?(i=D.cloneDeep(a))==null?void 0:i.filter(u=>(u==null?void 0:u.id)!==r):(a=a==null?void 0:a.map(l=>(l.children=kl(l==null?void 0:l.children,r),l)),a)},xl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=D.cloneDeep(a))==null?void 0:i.map(u=>((u==null?void 0:u.id)===(r==null?void 0:r.id)&&(u=r),u)):(a=a==null?void 0:a.map(l=>(l.children=xl(l==null?void 0:l.children,r),l)),a)},wl=(a,r)=>{var i;return a!=null&&a.find(l=>{var u;return(l==null?void 0:l.id)===((u=r==null?void 0:r.contents)==null?void 0:u.id)})?(i=D.cloneDeep(a))==null?void 0:i.map(u=>{var s;return(u==null?void 0:u.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)&&(u=r==null?void 0:r.contents),u}):(a=a==null?void 0:a.map(l=>(l.children=wl(l==null?void 0:l.children,r),l)),a)},Dl=(a,r)=>{var i;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(r==null?void 0:r.id))?(i=D.cloneDeep(a))==null?void 0:i.map(u=>((u==null?void 0:u.id)===(r==null?void 0:r.id)&&(u!=null&&u.children||(u.children=[]),u.children.push(r.contents)),u)):(a=a==null?void 0:a.map(l=>(l.children=Dl(l==null?void 0:l.children,r),l)),a)},Vt=[{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"}],bi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ki=[{label:"新增",value:"add"}],En=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ki},{key:"background",label:"按钮背景色",type:"Color"}],Cn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:bi},{key:"textColor",label:"按钮颜色",type:"Color"}],xi={class:"table-header-child"},wi={class:"table-header-child-main"},Di={class:"table-header-child-content"},_i={class:"table-header-child-content-item"},Ei={class:"fix-button"},Ci={key:0},Si={class:"form-content"},Ti={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(!1),s=e.ref(""),k=Ve.useTableComp(D.pinia),{tableIndex:v}=D.storeToRefs(k);e.ref(0);const p=e.ref(""),y=e.ref([]),_=e.ref([]),O=m=>{var h;u.value=!0;let C=[];Vt==null||Vt.forEach(E=>{let g=D.cloneDeep(v.value)+1;k.setTableIndex(g),C.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:m[E.key],id:v.value,contents:E==null?void 0:E.options})}),m!=null&&m.children&&((h=m==null?void 0:m.children)==null?void 0:h.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,y.value=C,_.value=C},P=m=>{l("fixChange",D.cloneDeep(m))},H=m=>{l("deleteChange",D.cloneDeep(m))},I=m=>{u.value=!0;let C=[];Vt==null||Vt.forEach(h=>{let E=D.cloneDeep(v.value)+1;k.setTableIndex(E),C.push({label:h==null?void 0:h.label,name:h==null?void 0:h.label,type:h.type,value:"",id:v.value,contents:h==null?void 0:h.options})}),s.value=m==null?void 0:m.id,y.value=C,_.value=C},ee=m=>{let C=D.cloneDeep(_.value);C=C==null?void 0:C.map(h=>(h.children||(h.value=m==null?void 0:m[h.name]),h)),_.value=C},$=()=>{var C,h;y.value=_.value;let m={};if(p.value!=="")m.id=p.value,(C=y.value)==null||C.forEach(E=>{const g=Vt==null?void 0:Vt.find(te=>(te==null?void 0:te.label)===(E==null?void 0:E.label));g?m[g.key]=E.value:E!=null&&E.children&&E.children.length>0&&(m.children=E.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"fix"});else{let E=D.cloneDeep(v.value)+1;k.setTableIndex(E),m.id="id"+v.value,(h=y.value)==null||h.forEach(g=>{const te=Vt==null?void 0:Vt.find(Te=>(Te==null?void 0:Te.label)===(g==null?void 0:g.label));te?m[te.key]=g.value:g!=null&&g.children&&g.children.length>0&&(m.children=g.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"add"})}p.value="",y.value=[],_.value=[]},F=()=>{u.value=!1,p.value="",s.value="",y.value=[],_.value=[]},L=m=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(m,C)=>{const h=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",xi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(E,g)=>(e.openBlock(),e.createElementBlock("div",wi,[e.createElementVNode("div",Di,[e.createElementVNode("div",_i,e.toDisplayString(E.label),1),e.createElementVNode("div",Ei,[e.createVNode(h,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>I(E)},null,8,["onClick"]),e.createVNode(h,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>O(E)},null,8,["onClick"]),e.createVNode(h,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>L(E)},null,8,["onClick"])])]),E!=null&&E.children&&E.children.length>0?(e.openBlock(),e.createElementBlock("div",Ci,[e.createVNode(_l,{tableChildContents:E==null?void 0:E.children,onDeleteChange:H,onFixChange:P},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Si,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:F,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:$},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Bi=Ft._export_sfc(Ti,[["__scopeId","data-v-e0fef72d"]]),Ii={class:"table-header-child"},Ni={class:"table-header-child-main"},Ai={class:"table-header-child-content"},Vi={class:"table-header-child-content-item"},Oi={class:"fix-button"},Mi={key:0},zi={class:"form-content"},Ri={class:"dialog-footer"},Pi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(!1),s=e.ref(""),k=Ve.useTableComp(D.pinia),{tableIndex:v}=D.storeToRefs(k),p=e.ref(""),y=e.ref([]),_=e.ref([]),O=m=>{l("fixChange",D.cloneDeep(m))},P=m=>{var h;u.value=!0;let C=[];Vt==null||Vt.forEach(E=>{let g=D.cloneDeep(v.value)+1;k.setTableIndex(g),C.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:m[E.key],id:v.value,contents:E==null?void 0:E.options})}),m!=null&&m.children&&((h=m==null?void 0:m.children)==null?void 0:h.length)>0&&C.push({children:m==null?void 0:m.children,isFormColHidden:!0}),p.value=m==null?void 0:m.id,y.value=C,_.value=C},H=m=>{u.value=!0;let C=[];Vt==null||Vt.forEach(h=>{let E=D.cloneDeep(v.value)+1;k.setTableIndex(E),C.push({label:h==null?void 0:h.label,name:h==null?void 0:h.label,type:h.type,value:"",id:v.value,contents:h==null?void 0:h.options})}),s.value=m==null?void 0:m.id,y.value=C,_.value=C},I=m=>{let C=D.cloneDeep(_.value);C=C==null?void 0:C.map(h=>(h.children||(h.value=m==null?void 0:m[h.name]),h)),_.value=C},ee=()=>{var C,h;y.value=_.value;let m={};if(p.value!=="")m.id=p.value,(C=y.value)==null||C.forEach(E=>{const g=Vt==null?void 0:Vt.find(te=>(te==null?void 0:te.label)===(E==null?void 0:E.label));g?m[g.key]=E.value:E!=null&&E.children&&E.children.length>0&&(m.children=E.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"fix"});else{let E=D.cloneDeep(v.value)+1;k.setTableIndex(E),m.id="idChild"+v.value,(h=y.value)==null||h.forEach(g=>{const te=Vt==null?void 0:Vt.find(Te=>(Te==null?void 0:Te.label)===(g==null?void 0:g.label));te?m[te.key]=g.value:g!=null&&g.children&&g.children.length>0&&(m.children=g.children)}),u.value=!1,l("fixChange",{contents:D.cloneDeep(m),id:s.value,type:"add"})}p.value="",y.value=[],_.value=[]},$=()=>{u.value=!1,p.value="",s.value="",y.value=[],_.value=[]},F=m=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",m),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=m=>{l("deleteChange",m)};return(m,C)=>{const h=e.resolveComponent("svg-icon"),E=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i==null?void 0:i.tableChildContents,(g,te)=>(e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("div",Ai,[e.createElementVNode("div",Vi,e.toDisplayString(g.label),1),e.createElementVNode("div",Oi,[e.createVNode(h,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Te=>H(g)},null,8,["onClick"]),e.createVNode(h,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Te=>P(g)},null,8,["onClick"]),e.createVNode(h,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Te=>F(g)},null,8,["onClick"])])]),g!=null&&g.children&&g.children.length>0?(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(Bi,{tableChildContents:g==null?void 0:g.children,onDeleteChange:L,onFixChange:O},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:$,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zi,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ri,[e.createVNode(E,{onClick:$,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>C[0]||(C[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(E,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>C[1]||(C[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},_l=Ft._export_sfc(Pi,[["__scopeId","data-v-ebd68fa1"]]),Fi={class:"table-operate-content"},Li={class:"table-operate-item"},$i={class:"operate-title"},ji={class:"operate-content"},Ui={class:"fix-content"},Ki={class:"fix-content-label"},Wi={class:"fix-button"},Hi={key:0},qi={class:"operate-title"},Xi={class:"operate-content"},Gi={class:"fix-content"},Yi={class:"fix-content-label"},Ji={class:"fix-button"},Zi={class:"operate-title"},Qi={class:"operate-content"},es={class:"fix-content"},ts={class:"fix-content-label"},ns={class:"fix-button"},as={class:"operate-title"},os={class:"operate-content"},ls={class:"fix-content"},rs={class:"fix-content-label"},is={class:"fix-button"},ss={class:"operate-content"},cs={style:{display:"flex","justify-content":"space-between"}},us={class:"form-content"},ds={class:"dialog-footer"},ps={class:"form-content"},fs={class:"dialog-footer"},hs={class:"form-content"},vs={class:"dialog-footer"},gs={class:"form-content"},ms={class:"dialog-footer"},ys={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref([]),s=e.ref(!1),k=e.ref(!1),v=e.ref([]),p=e.ref(!1),y=e.ref([]),_=e.ref(!1),O=e.ref([]),P=e.ref(""),H=e.ref(""),I=e.ref([]),ee=e.ref([]),$=e.ref([]),F=e.ref([]),L=e.ref(!1),m=e.ref([]),C=e.ref([]),h=e.ref(0),E=e.ref([]),g=e.ref([]),te=e.ref([]),Te=()=>{L.value=!0;let b=[];En==null||En.forEach(N=>{h.value++,b.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:(N==null?void 0:N.key)==="background"?"var(--ssComponent-primary-color)":"",id:h.value,contents:N==null?void 0:N.options})}),m.value=b,C.value=b},Qe=()=>{var N,W,Z;k.value=!0;let b=[];(Z=(W=(N=Ve.FormContent)==null?void 0:N.find(S=>(S==null?void 0:S.key)==="Input"))==null?void 0:W.value)==null||Z.forEach(S=>{h.value++,b.push({label:S==null?void 0:S.label,name:(S==null?void 0:S.name)||(S==null?void 0:S.label),type:S.type,value:(S==null?void 0:S.label)==="类型"?"Input":"",id:h.value,contents:S==null?void 0:S.options})}),E.value=b,g.value=b},de=b=>{b||(E.value=g.value)},Be=async b=>{var N,W,Z,S,se,Me,A,oe,U,q,Se,ue;if((b==null?void 0:b.类型)!==((W=(N=g.value)==null?void 0:N.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:W.value)){let G=[],Q=await((se=(S=(Z=Ve.FormContent)==null?void 0:Z.find(he=>(he==null?void 0:he.key)===((b==null?void 0:b.类型)===""?"Input":b==null?void 0:b.类型)))==null?void 0:S.value)==null?void 0:se.value)?await((q=(U=(oe=Ve.FormContent)==null?void 0:oe.find(he=>(he==null?void 0:he.key)===((b==null?void 0:b.类型)===""?"Input":b==null?void 0:b.类型)))==null?void 0:U.value)==null?void 0:q.value):(A=(Me=Ve.FormContent)==null?void 0:Me.find(he=>(he==null?void 0:he.key)===((b==null?void 0:b.类型)===""?"Input":b==null?void 0:b.类型)))==null?void 0:A.value;if(Q==null||Q.forEach(he=>{h.value++,G.push({label:he==null?void 0:he.label,name:(he==null?void 0:he.name)||(he==null?void 0:he.label),type:he.type,value:he!=null&&he.属性名?(b==null?void 0:b.prop)||(b==null?void 0:b.name)||(b==null?void 0:b.label):(b==null?void 0:b[he.label])??"",id:h.value,contents:he==null?void 0:he.options,prop:(he==null?void 0:he.prop)||(he==null?void 0:he.name)||(he==null?void 0:he.label)})}),b!=null&&b.菜单选项&&((Se=b==null?void 0:b.菜单选项)==null?void 0:Se.length)>0){const he=await Ve.menuToContentType(b==null?void 0:b.菜单选项);G=G==null?void 0:G.map(ye=>((ye==null?void 0:ye.name)==="组信息选项"&&(ye.contents=he),ye))}g.value=await Ve.selectToBase(D.cloneDeep(G)),E.value=await Ve.selectToBase(D.cloneDeep(G))}else{let G=D.cloneDeep(E.value);if(G=G==null?void 0:G.map(Q=>(Q.value=b==null?void 0:b[Q.name],Q)),b!=null&&b.菜单选项&&((ue=b==null?void 0:b.菜单选项)==null?void 0:ue.length)>0){const Q=await Ve.menuToContentType(b==null?void 0:b.菜单选项);G=G==null?void 0:G.map(he=>((he==null?void 0:he.name)==="组信息选项"&&(he.contents=Q),he))}G=Ve.formToOptionsContents(G),g.value=await Ve.selectToBase(D.cloneDeep(G))}},Oe=async b=>{await Be(b),E.value=g.value},z=(b,N)=>{if((N==null?void 0:N.type)=="Select"&&(b==null?void 0:b.key)==="selectRelateType"){const W=N==null?void 0:N.optionUrl;return(W==null?void 0:W.selectRelateType)||N[b.key]}if((N==null?void 0:N.type)=="Select"&&(b==null?void 0:b.key)==="menuSelect"){const W=N==null?void 0:N.optionUrl;return(W==null?void 0:W.menuSelect)||N[b.key]}if((N==null?void 0:N.type)=="Select"&&(b==null?void 0:b.key)==="groupSelect"){const W=N==null?void 0:N.optionUrl;return(W==null?void 0:W.groupSelect)||N[b.key]}if((N==null?void 0:N.type)=="Select"&&(b==null?void 0:b.key)==="originalContent")return(N==null?void 0:N.value)||N[b.key];if((N==null?void 0:N.type)=="Select"&&(b==null?void 0:b.key)==="multiple"){const W=N[b.key];return yl(W)?W:b.default}return(b==null?void 0:b.label)==="类型"&&N[b.key]===""?"Input":(b==null?void 0:b.key)==="isFormColHidden"&&!N[b.key]?!1:N[b.key]},re=async b=>{var Z,S,se,Me,A,oe,U,q,Se;k.value=!0;let N=[];const W=await((se=(S=(Z=Ve.FormContent)==null?void 0:Z.find(ue=>(ue==null?void 0:ue.key)===((b==null?void 0:b.type)===""?"Input":b==null?void 0:b.type)))==null?void 0:S.value)==null?void 0:se.value)?await((q=(U=(oe=Ve.FormContent)==null?void 0:oe.find(ue=>(ue==null?void 0:ue.key)===((b==null?void 0:b.type)===""?"Input":b==null?void 0:b.type)))==null?void 0:U.value)==null?void 0:q.value):(A=(Me=Ve.FormContent)==null?void 0:Me.find(ue=>(ue==null?void 0:ue.key)===((b==null?void 0:b.type)===""?"Input":b==null?void 0:b.type)))==null?void 0:A.value;if(W==null||W.forEach(ue=>{h.value++,N.push({label:ue==null?void 0:ue.label,name:(ue==null?void 0:ue.name)||(ue==null?void 0:ue.label),type:ue.type,value:(ue==null?void 0:ue.label)==="属性名"?(b==null?void 0:b.prop)||(b==null?void 0:b.name)||(b==null?void 0:b.label):z(ue,b),id:h.value,contents:ue==null?void 0:ue.options})}),b!=null&&b.menuSelect&&((Se=b==null?void 0:b.menuSelect)==null?void 0:Se.length)>0){const ue=await Ve.menuToContentType(b==null?void 0:b.menuSelect);N=N==null?void 0:N.map(G=>((G==null?void 0:G.name)==="组信息选项"&&(G.contents=ue),G))}P.value=b==null?void 0:b.id,E.value=await Ve.selectToBase(Ve.formToOptionsContents(N)),g.value=await Ve.selectToBase(Ve.formToOptionsContents(N))},le=b=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,W;te.value=(N=D.cloneDeep(te.value))==null?void 0:N.filter(Z=>(Z==null?void 0:Z.id)!==(b==null?void 0:b.id)),l("change",(W=D.cloneDeep(i.originalItemContents))==null?void 0:W.map(Z=>((Z==null?void 0:Z.key)==="tableToForm"&&(Z.contents=te.value),Z))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},fe=()=>{k.value=!1,E.value=[],P.value=""},$e=async()=>{var Z,S,se,Me,A,oe,U,q,Se,ue;E.value=g.value;let b={};P.value!==""?b.id=P.value:(h.value++,b.id="id"+h.value);let N=await((se=(S=(Z=Ve.FormContent)==null?void 0:Z.find(G=>{var Q,he;return(G==null?void 0:G.key)===(((he=(Q=E.value)==null?void 0:Q.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:he.value)??"label")}))==null?void 0:S.value)==null?void 0:se.value)??((A=(Me=Ve.FormContent)==null?void 0:Me.find(G=>{var Q,he;return(G==null?void 0:G.key)===(((he=(Q=E.value)==null?void 0:Q.find(ye=>(ye==null?void 0:ye.label)==="类型"))==null?void 0:he.value)??"label")}))==null?void 0:A.value);if((oe=E.value)==null||oe.forEach(G=>{const Q=N==null?void 0:N.find(he=>(he==null?void 0:he.label)===(G==null?void 0:G.label));Q&&(b[Q.key]=G.value)}),b.name=b.label,(U=te.value)!=null&&U.find(G=>G.id===b.id))te.value=(q=te.value)==null?void 0:q.map(G=>(G.id===b.id&&(G=b),G));else{let G=D.cloneDeep(te.value);te.value||(te.value=[]),G.push(b),te.value=G}te.value=te.value.map(({id:G,...Q})=>Q),k.value=!1,P.value="";let W=D.cloneDeep(i.originalItemContents);(Se=D.cloneDeep(i.originalItemContents))!=null&&Se.find(G=>(G==null?void 0:G.key)==="tableToForm")?W=(ue=D.cloneDeep(i.originalItemContents))==null?void 0:ue.map(G=>((G==null?void 0:G.key)==="tableToForm"&&(G.contents=te.value),G)):W.push({key:"tableToForm",contents:te.value}),l("change",W)},tt=b=>{L.value=!0;let N=[];En==null||En.forEach(W=>{h.value++,N.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:b[W.key],id:h.value,contents:W==null?void 0:W.options})}),P.value=b==null?void 0:b.id,m.value=N,C.value=N};e.watch(()=>_.value,()=>{var N,W;let b=D.cloneDeep(i.originalItemContents);(N=D.cloneDeep(i.originalItemContents))!=null&&N.find(Z=>(Z==null?void 0:Z.key)==="page")?b=(W=D.cloneDeep(i.originalItemContents))==null?void 0:W.map(Z=>((Z==null?void 0:Z.key)==="page"&&(Z.contents=_.value),Z)):b.push({key:"page",contents:_.value}),l("change",b)},{deep:!0});const X=b=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,W;ee.value=(N=D.cloneDeep(ee.value))==null?void 0:N.filter(Z=>(Z==null?void 0:Z.id)!==(b==null?void 0:b.id)),l("change",(W=D.cloneDeep(i.originalItemContents))==null?void 0:W.map(Z=>((Z==null?void 0:Z.key)==="extraButton"&&(Z.contents=ee.value),Z))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var W,Z,S,se,Me;m.value=C.value;let b={};if(P.value!==""?b.id=P.value:(h.value++,b.id="id"+h.value),(W=m.value)==null||W.forEach(A=>{const oe=En==null?void 0:En.find(U=>(U==null?void 0:U.label)===(A==null?void 0:A.label));oe?b[oe.key]=A.value:A!=null&&A.children&&A.children.length>0&&(b.children=A.children)}),(Z=ee.value)!=null&&Z.find(A=>A.id===b.id))ee.value=(S=ee.value)==null?void 0:S.map(A=>(A.id===b.id&&(A=b),A));else{let A=D.cloneDeep(ee.value)??[];A.push(b),ee.value=A}L.value=!1,P.value="";let N=D.cloneDeep(i.originalItemContents);(se=D.cloneDeep(i.originalItemContents))!=null&&se.find(A=>(A==null?void 0:A.key)==="extraButton")?N=(Me=D.cloneDeep(i.originalItemContents))==null?void 0:Me.map(A=>((A==null?void 0:A.key)==="extraButton"&&(A.contents=ee.value),A)):N.push({key:"extraButton",contents:ee.value}),l("change",N)},ie=b=>{let N=D.cloneDeep(C.value);N=N==null?void 0:N.map(W=>(W.children||(W.value=b==null?void 0:b[W.name]),W)),C.value=N},J=()=>{L.value=!1,m.value=[],P.value=""},ve=b=>{p.value=!0;let N=[];Cn==null||Cn.forEach(W=>{h.value++,N.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:b[W.key],id:h.value,contents:W==null?void 0:W.options})}),P.value=b==null?void 0:b.id,$.value=N,F.value=N},we=b=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,W;I.value=(N=D.cloneDeep(I.value))==null?void 0:N.filter(Z=>(Z==null?void 0:Z.id)!==(b==null?void 0:b.id)),l("change",(W=D.cloneDeep(i.originalItemContents))==null?void 0:W.map(Z=>((Z==null?void 0:Z.key)==="rowButton"&&(Z.contents=I.value),Z))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ee=()=>{s.value=!0;let b=[];Vt==null||Vt.forEach(N=>{h.value++,b.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:"",id:h.value,contents:N==null?void 0:N.options})}),y.value=b,O.value=b},ne=()=>{p.value=!0;let b=[];Cn==null||Cn.forEach(N=>{h.value++,b.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:"",id:h.value,contents:N==null?void 0:N.options})}),$.value=b,F.value=b},ke=b=>{let N=D.cloneDeep(F.value);N=N==null?void 0:N.map(W=>(W.children||(W.value=b==null?void 0:b[W.name]),W)),F.value=N},T=()=>{var W,Z,S,se,Me;$.value=F.value;let b={};if(P.value!==""?b.id=P.value:(h.value++,b.id="id"+h.value),(W=$.value)==null||W.forEach(A=>{const oe=Cn==null?void 0:Cn.find(U=>(U==null?void 0:U.label)===(A==null?void 0:A.label));oe?b[oe.key]=A.value:A!=null&&A.children&&A.children.length>0&&(b.children=A.children)}),(Z=I.value)!=null&&Z.find(A=>A.id===b.id))I.value=(S=I.value)==null?void 0:S.map(A=>(A.id===b.id&&(A=b),A));else{let A=D.cloneDeep(I.value);A.push(b),I.value=A}p.value=!1,P.value="";let N=D.cloneDeep(i.originalItemContents);(se=D.cloneDeep(i.originalItemContents))!=null&&se.find(A=>(A==null?void 0:A.key)==="rowButton")?N=(Me=D.cloneDeep(i.originalItemContents))==null?void 0:Me.map(A=>((A==null?void 0:A.key)==="rowButton"&&(A.contents=I.value),A)):N.push({key:"rowButton",contents:I.value}),l("change",N)},Ge=()=>{p.value=!1,P.value="",F.value=[],$.value=[]},Ye=b=>{s.value=!0;let N=[];Vt==null||Vt.forEach(W=>{h.value++,N.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:"",id:h.value,contents:W==null?void 0:W.options})}),y.value=N,H.value=b==null?void 0:b.id,O.value=N},Ae=b=>{var N;v.value=kl(D.cloneDeep(v.value),b==null?void 0:b.id),l("change",(N=D.cloneDeep(i.originalItemContents))==null?void 0:N.map(W=>{var Z;return(W==null?void 0:W.key)==="header"&&(W.contents=(Z=v.value)!=null&&Z.some(S=>S==null?void 0:S.children)?[v.value]:v.value),W}))},ce=b=>{var W,Z,S;b.type==="fix"?b.id!==""?v.value=wl(v.value,b):v.value=xl(v.value,b==null?void 0:b.contents):v.value=Dl(v.value,b),v.value=(W=v.value)!=null&&W.some(se=>se==null?void 0:se.children)?[v.value]:v.value,P.value="";let N=D.cloneDeep(i.originalItemContents);(Z=D.cloneDeep(i.originalItemContents))!=null&&Z.find(se=>(se==null?void 0:se.key)==="header")?N=(S=D.cloneDeep(i.originalItemContents))==null?void 0:S.map(se=>((se==null?void 0:se.key)==="header"&&(se.contents=v.value),se)):N.push({key:"header",contents:v.value}),l("change",N)},ae=b=>{var W;s.value=!0;let N=[];Vt==null||Vt.forEach(Z=>{h.value++,N.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:b[Z.key],id:h.value,contents:Z==null?void 0:Z.options})}),b!=null&&b.children&&((W=b==null?void 0:b.children)==null?void 0:W.length)>0&&N.push({children:b==null?void 0:b.children,isFormColHidden:!0}),P.value=b==null?void 0:b.id,H.value="",y.value=N,O.value=N},pe=b=>{let N=D.cloneDeep(O.value);N=N==null?void 0:N.map(W=>(W.children||(W.value=b==null?void 0:b[W.name]),W)),O.value=N},Ce=()=>{s.value=!1,P.value="",H.value="",O.value=[]},qe=()=>{var W,Z,S,se,Me,A;y.value=O.value;let b={};if(P.value!==""?b.id=P.value:(h.value++,b.id="id"+h.value),(W=y.value)==null||W.forEach(oe=>{const U=Vt==null?void 0:Vt.find(q=>(q==null?void 0:q.label)===(oe==null?void 0:oe.label));U?b[U.key]=oe.value:oe!=null&&oe.children&&oe.children.length>0&&(b.children=oe.children)}),(Z=v.value)!=null&&Z.find(oe=>oe.id===b.id))v.value=(S=v.value)==null?void 0:S.map(oe=>(oe.id===b.id&&(oe=b),oe));else{let oe=D.cloneDeep(v.value)??[];H.value===""?oe.push(b):oe=oe==null?void 0:oe.map(U=>(U.id===H.value&&(U.children||(U.children=[]),U.children.push(b)),U)),v.value=oe}v.value=(se=v.value)!=null&&se.some(oe=>oe==null?void 0:oe.children)?[v.value]:v.value,s.value=!1,P.value="",H.value="";let N=D.cloneDeep(i.originalItemContents);(Me=D.cloneDeep(i.originalItemContents))!=null&&Me.find(oe=>(oe==null?void 0:oe.key)==="header")?N=(A=D.cloneDeep(i.originalItemContents))==null?void 0:A.map(oe=>((oe==null?void 0:oe.key)==="header"&&(oe.contents=v.value),oe)):N.push({key:"header",contents:v.value}),l("change",N)},dt=b=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,W;v.value=(N=D.cloneDeep(v.value))==null?void 0:N.filter(Z=>(Z==null?void 0:Z.id)!==(b==null?void 0:b.id)),l("change",(W=D.cloneDeep(i.originalItemContents))==null?void 0:W.map(Z=>{var S;return(Z==null?void 0:Z.key)==="header"&&(Z.contents=(S=v.value)!=null&&S.some(se=>se==null?void 0:se.children)?[v.value]:v.value),Z})),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>i.originalItemContents,()=>{var b,N,W,Z,S,se,Me,A,oe,U,q,Se,ue,G,Q,he,ye,_e,xe;if(!(!i.originalItemContents||i.originalItemContents.length===0))if(u.value=D.cloneDeep(i.originalItemContents),v.value=(N=(b=u.value)==null?void 0:b.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:N.contents,I.value=(Z=(W=u.value)==null?void 0:W.find(K=>(K==null?void 0:K.key)==="rowButton"))==null?void 0:Z.contents,ee.value=(se=(S=u.value)==null?void 0:S.find(K=>(K==null?void 0:K.key)==="extraButton"))==null?void 0:se.contents,_.value=(A=(Me=u.value)==null?void 0:Me.find(K=>(K==null?void 0:K.key)==="page"))!=null&&A.contents?!!((U=(oe=u.value)==null?void 0:oe.find(K=>(K==null?void 0:K.key)==="page"))!=null&&U.contents):!1,te.value=(Se=(q=u.value)==null?void 0:q.find(K=>(K==null?void 0:K.key)==="tableToForm"))==null?void 0:Se.contents,v.value=(ue=v.value)==null?void 0:ue.map((K,Re)=>(Array.isArray(K)?K=yi(K):K={label:(K==null?void 0:K.label)??"",prop:(K==null?void 0:K.label)==="操作"?"operate":K==null?void 0:K.prop,width:K!=null&&K.width?parseInt(K.width):"",fixed:(K==null?void 0:K.fixed)??void 0,sortable:(K==null?void 0:K.sortable)??!1,align:(K==null?void 0:K.align)??"left",showOverflowTooltip:(K==null?void 0:K.showOverflowTooltip)??!0,isNotDrag:(K==null?void 0:K.isNotDrag)??!1,isEditCol:(K==null?void 0:K.isEditCol)??!1,isOperate:(K==null?void 0:K.isOperate)??!1,id:(K==null?void 0:K.id)??Re,formMenuSelect:(K==null?void 0:K.formMenuSelect)??void 0,groupSelect:(K==null?void 0:K.groupSelect)??void 0},K)),v.value=(G=v.value)!=null&&G.every(K=>Array.isArray(K))?(Q=v.value)==null?void 0:Q[0]:v.value,I.value=(he=I.value)==null?void 0:he.map((K,Re)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",textColor:(K==null?void 0:K.textColor)??"#000000",id:(K==null?void 0:K.id)??Re}),ee.value=(ye=ee.value)==null?void 0:ye.map((K,Re)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",background:(K==null?void 0:K.background)??"var(--ssComponent-primary-color)",id:(K==null?void 0:K.id)??Re}),te.value)te.value=(xe=te.value)==null?void 0:xe.map(K=>{h.value++;let Re=K;return Re.id=h.value,Re});else{let K=[];const Re=(_e=Ve.getColumnChild(D.cloneDeep(v.value)))==null?void 0:_e.filter(be=>(be==null?void 0:be.prop)!=="operate");Re==null||Re.forEach(be=>{var Ke;h.value++,K.push({label:be==null?void 0:be.label,name:(be==null?void 0:be.prop)||(be==null?void 0:be.label),type:be!=null&&be.groupSelect?"Select":"Input",value:"",id:h.value,contents:be==null?void 0:be.options,menuSelect:be==null?void 0:be.formMenuSelect,groupSelect:(Ke=be==null?void 0:be.groupSelect)==null?void 0:Ke.split(":"),selectRelateType:"关联绑定列"})}),te.value=K}},{deep:!0,immediate:!0}),(b,N)=>{const W=e.resolveComponent("svg-icon"),Z=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Fi,[e.createElementVNode("div",Li,[e.createElementVNode("div",$i,[N[2]||(N[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(Z,{class:"icon-content",onClick:Ee,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[N[1]||(N[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",Ui,[e.createElementVNode("div",Ki,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",Wi,[e.createVNode(W,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>Ye(S)},null,8,["onClick"]),e.createVNode(W,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>ae(S)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>dt(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",Hi,[e.createVNode(_l,{tableChildContents:S==null?void 0:S.children,onDeleteChange:Ae,onFixChange:ce},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",qi,[N[4]||(N[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(Z,{class:"icon-content",id:"themeButton",onClick:ne},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[N[3]||(N[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Xi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",Gi,[e.createElementVNode("div",Yi,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",Ji,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>ve(S)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>we(S)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Zi,[N[6]||(N[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(Z,{class:"icon-content",id:"themeButton",onClick:Te},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[N[5]||(N[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Qi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ee.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",es,[e.createElementVNode("div",ts,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",ns,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>tt(S)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>X(S)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",as,[N[8]||(N[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(Z,{class:"icon-content",id:"themeButton",onClick:Qe},{icon:e.withCtx(()=>[e.createVNode(W,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[N[7]||(N[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",os,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(S,se)=>(e.openBlock(),e.createElementBlock("div",{key:se},[e.createElementVNode("div",ls,[e.createElementVNode("div",rs,e.toDisplayString(S==null?void 0:S.label),1),e.createElementVNode("div",is,[e.createVNode(W,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Me=>re(S)},null,8,["onClick"]),e.createVNode(W,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Me=>le(S)},null,8,["onClick"])])])]))),128))]),N[10]||(N[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",ss,[e.createElementVNode("div",cs,[N[9]||(N[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(It._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":N[0]||(N[0]=S=>_.value=S)},null,8,["modelValue"])])])]),e.createVNode(Jt.ssDialog,{visible:s.value,onBeforeDestroy:Ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",us,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:y.value,key:y.value,isEnableWrap:!0,onChange:pe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ds,[e.createVNode(Z,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>N[11]||(N[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Z,{class:"ok-button button",onClick:qe,id:"themeButton"},{default:e.withCtx(()=>N[12]||(N[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:p.value,onBeforeDestroy:Ge,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ps,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:$.value,key:$.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",fs,[e.createVNode(Z,{onClick:Ge,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>N[13]||(N[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Z,{class:"ok-button button",onClick:T,id:"themeButton"},{default:e.withCtx(()=>N[14]||(N[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:L.value,onBeforeDestroy:J,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",hs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",vs,[e.createVNode(Z,{onClick:J,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>N[15]||(N[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(Z,{class:"ok-button button",onClick:M,id:"themeButton"},{default:e.withCtx(()=>N[16]||(N[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:k.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",gs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:E.value,key:E.value,isEnableWrap:!0,onChange:Be,onChangeVisible:de,onBlurChange:Oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ms,[e.createVNode(Z,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>N[17]||(N[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(Z,{class:"ok-button button",onClick:$e,id:"themeButton"},{default:e.withCtx(()=>N[18]||(N[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},bs=Ft._export_sfc(ys,[["__scopeId","data-v-7a6b87b5"]]),ks=D.useModelComp(D.pinia),{pageMapState:xs}=D.storeToRefs(ks),ws=D.useMenuState(D.pinia),{activeMenuPath:Ds}=D.storeToRefs(ws),_s=e.ref(24),Es=e.ref(6),Cs=e.ref(70),Ss=e.ref(.18),Ts=e.ref(45),Bs=(a,r,i,l)=>{var u,s,k,v,p,y,_,O,P,H,I,ee,$,F,L,m;return{x:((s=(u=a==null?void 0:a.value)==null?void 0:u.tableData)==null?void 0:s.x)||r%2*12,y:((v=(k=a==null?void 0:a.value)==null?void 0:k.tableData)==null?void 0:v.y)||r,w:((y=(p=a==null?void 0:a.value)==null?void 0:p.tableData)==null?void 0:y.w)||_s.value,h:((O=(_=a==null?void 0:a.value)==null?void 0:_.tableData)==null?void 0:O.h)||i,minW:((H=(P=a==null?void 0:a.value)==null?void 0:P.tableData)==null?void 0:H.minW)||Es.value,minH:((ee=(I=a==null?void 0:a.value)==null?void 0:I.tableData)==null?void 0:ee.minH)||Ss.value,maxH:((F=($=a==null?void 0:a.value)==null?void 0:$.tableData)==null?void 0:F.maxH)||Ts.value,i:((m=(L=a==null?void 0:a.value)==null?void 0:L.tableData)==null?void 0:m.i)||r,id:(a==null?void 0:a.id)||r+"",component:l}},Is=(a,r)=>{var l,u,s,k,v,p,y,_;let i=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((k=(s=(u=a==null?void 0:a.compData)==null?void 0:u.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:k.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(i=((_=(y=(p=a==null?void 0:a.compData)==null?void 0:p.find(P=>(P==null?void 0:P.key)==="formContent"))==null?void 0:y.contents)==null?void 0:_.length)/5);return i*2},El=(a,r,i)=>{var k,v;const l=(v=(k=xs.value)==null?void 0:k[Ds.value])==null?void 0:v.filter(p=>{var y;return((y=p==null?void 0:p.key)==null?void 0:y.type)==="gridLayout"}),u=l==null?void 0:l.find(p=>{var y,_,O;return((O=(_=(y=p==null?void 0:p.value)==null?void 0:y.tableData)==null?void 0:_.component)==null?void 0:O.id)===a.id}),s=Is(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((p,y)=>El(p,y))),{...Bs(u,r,s,a)}},Ns=(a,r)=>{if((a==null?void 0:a.length)===0)return[];const i=D.cloneDeep(a);return Array.isArray(a)?i==null?void 0:i.map((l,u)=>El(l,u)):[]},As=a=>({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}]}]}}),Vs=(a,r)=>a==null?void 0:a.map(i=>{for(const l in r)if(l===(i==null?void 0:i.prop))return{...i,value:r[l]};return i}),Os=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref([]);e.watch(()=>i.compType,v=>{var _;const p=As(i==null?void 0:i.optionItems),y=v?(_=p[v==null?void 0:v.toUpperCase()])==null?void 0:_[i==null?void 0:i.target]:[];u.value=y==null?void 0:y.map(O=>{for(const[P,H]of Object.entries((i==null?void 0:i.comp)||{}))if((O==null?void 0:O.prop)===P)return{...O,value:H};return O})},{immediate:!0});const s=v=>It.getComponent(v),k=v=>{var p,y;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?u.value=(p=u.value)==null?void 0:p.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(P=>({...P,disabled:!0}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!0}:_}):u.value=(y=u.value)==null?void 0:y.map(_=>{var O;return(_==null?void 0:_.prop)==="isStepLayout"?{..._,options:(O=_==null?void 0:_.options)==null?void 0:O.map(P=>({...P,disabled:!1}))}:(_==null?void 0:_.prop)==="isGridLayout"?{..._,disabled:!1}:_}),l("change",{target:i==null?void 0:i.target,styleConfigs:u.value,prop:v==null?void 0:v.prop})};return(v,p)=>{const y=e.resolveComponent("el-col"),_=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,O=>(e.openBlock(),e.createBlock(_,{class:"style-row",key:O==null?void 0:O.prop},{default:e.withCtx(()=>[e.createVNode(y,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O==null?void 0:O.label)+":",1)]),_:2},1024),e.createVNode(y,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(O.type)),{modelValue:O.value,"onUpdate:modelValue":P=>O.value=P,content:O==null?void 0:O.options,optionUrl:O==null?void 0:O.optionUrl,disabled:O==null?void 0:O.disabled,activeText:O==null?void 0:O.activeText,inactiveText:O==null?void 0:O.inactiveText,onChange:P=>k(O)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ms=Ft._export_sfc(Os,[["__scopeId","data-v-6c233914"]]),zs=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(a,{emit:r}){const i=a,l=r,u=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),k=F=>F==null?void 0:F.reduce((L,m)=>(L[m==null?void 0:m.prop]=m==null?void 0:m.rule,L),{}),v=e.computed(()=>({formRules:k(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),p=e.ref([]),y=e.ref(""),_=(F,L,m)=>{var E;let C=[];(i==null?void 0:i.activeTabName)==="任务配置"?(C=[{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:F},{label:"按钮名称",value:"按钮名称",children:L}]},{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:"暂停"}]}],s.value=[{prop:"任务名称",rule:u},{prop:"任务关键词",rule:u},{prop:"执行任务",rule:u},{prop:"执行动作",rule:u},{prop:"执行交互",rule:u}]):(i==null?void 0:i.activeTabName)==="任务关联"&&(C=[{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:(E=i==null?void 0:i.relatedData)==null?void 0:E.map(g=>({label:g==null?void 0:g.任务名称,value:g==null?void 0:g.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:u},{prop:"关联状态",rule:u},{prop:"关联形式",rule:u},{prop:"关联任务集合",rule:u}]);let h;return m&&(m==null?void 0:m.length)>0?h=[...C,...O(F,L,m)]:h=C,h},O=(F,L,m)=>{const C=[{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 m?C==null?void 0:C.filter(h=>m==null?void 0:m.includes(h==null?void 0:h.prop)):C},P=(F,L)=>{var g,te,Te,Qe,de,Be,Oe,z,re;const m=((de=(Qe=(Te=(te=(g=i==null?void 0:i.comp)==null?void 0:g.compData)==null?void 0:te.find(le=>(le==null?void 0:le.key)==="header"))==null?void 0:Te.contents)==null?void 0:Qe.filter(le=>(le==null?void 0:le.label)!=="操作"))==null?void 0:de.map(le=>({value:le==null?void 0:le.prop,label:le.label})))||[],C=/button/i,h=((re=(z=(Oe=(Be=i==null?void 0:i.comp)==null?void 0:Be.compData)==null?void 0:Oe.filter(le=>C.test(le==null?void 0:le.key)))==null?void 0:z.flatMap(le=>le==null?void 0:le.contents))==null?void 0:re.map(le=>({value:le==null?void 0:le.label,label:le.label})))||[],E=_(m,h,F);p.value=L?Vs(E,L):E,F&&(F==null?void 0:F.length)>0&&s.value.push(...F==null?void 0:F.map(le=>({prop:le,rule:u})))};e.onMounted(()=>{P(null,i==null?void 0:i.extendItem)});const H=F=>{const L=F==null?void 0:F[y.value];if(y.value==="执行任务"){if(!(L!=null&&L.join("/")))return;const m=L==null?void 0:L.join("/");P(m==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:m==="进度设置/进度条"?["进度关键词"]:null,F)}},I=F=>{l("change",{target:i==null?void 0:i.target,extendConfigs:F})},ee=(F,L)=>{y.value=L==null?void 0:L.changeProp,H(F)},$=F=>{l("onButtonClick",F)};return(F,L)=>(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:I,onBlurChange:ee,onOnButtonClick:$},null,8,["rowContents","formRules","buttonValue"]))}}),Rs=Ft._export_sfc(zs,[["__scopeId","data-v-7c660c1f"]]),Ps={};function Fs(a,r){return null}const Ls=Ft._export_sfc(Ps,[["render",Fs]]),$s={class:"form-operate-content"},js={class:"form-operate-item"},Us={class:"operate-title"},Ks={class:"operate-content"},Ws={class:"fix-content"},Hs={class:"fix-button"},qs={class:"operate-title"},Xs={class:"operate-content"},Gs={class:"fix-content"},Ys={class:"fix-button"},Js={style:{display:"flex","justify-content":"space-between"}},Zs={class:"form-content"},Qs={class:"dialog-footer"},ec={class:"form-content"},tc={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(!1),s=e.ref([]),k=e.ref([]),v=e.ref(!1),p=e.ref([]),y=e.ref([]),_=e.ref(""),O=e.ref(!1),P=e.ref(0),H=e.ref([]),I=e.ref([]),ee=(z,re)=>{if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="selectRelateType"){const le=re==null?void 0:re.optionUrl;return(le==null?void 0:le.selectRelateType)||re[z.key]}if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="menuSelect"){const le=re==null?void 0:re.optionUrl;return(le==null?void 0:le.menuSelect)||re[z.key]}if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="groupSelect"){const le=re==null?void 0:re.optionUrl;return(le==null?void 0:le.groupSelect)||re[z.key]}if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="originalContent")return(re==null?void 0:re.value)||re[z.key];if((re==null?void 0:re.type)=="Select"&&(z==null?void 0:z.key)==="multiple"){const le=re[z.key];return yl(le)?le:z.default}return(z==null?void 0:z.label)==="类型"&&re[z.key]===""?"Input":(z==null?void 0:z.key)==="isFormColHidden"&&!re[z.key]?!1:re[z.key]},$=async z=>{var fe,$e,tt,X,M,ie;u.value=!0;let re=[];const le=await((tt=($e=(fe=Ve.FormContent)==null?void 0:fe.find(J=>(J==null?void 0:J.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:$e.value)==null?void 0:tt.value)??((M=(X=Ve.FormContent)==null?void 0:X.find(J=>(J==null?void 0:J.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:M.value);if(le==null||le.forEach(J=>{P.value++,re.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,prop:J==null?void 0:J.prop,value:ee(J,z),id:P.value,contents:J==null?void 0:J.options,width:(z==null?void 0:z.width)??1})}),z!=null&&z.menuSelect&&((ie=z==null?void 0:z.menuSelect)==null?void 0:ie.length)>0){const J=await Ve.menuToContentType(z==null?void 0:z.menuSelect);re=re==null?void 0:re.map(ve=>((ve==null?void 0:ve.name)==="组信息选项"&&(ve.contents=J),ve))}_.value=z==null?void 0:z.id,s.value=await Ve.selectToBase(Ve.formToOptionsContents(re)),k.value=await Ve.selectToBase(Ve.formToOptionsContents(re))},F=z=>{var le;v.value=!0;let re=[];(le=Ve.FormButton)==null||le.forEach(fe=>{P.value++,re.push({label:fe==null?void 0:fe.label,name:fe==null?void 0:fe.label,type:fe.type,value:(fe==null?void 0:fe.label)==="类型"&&z[fe.key]===""?"normal":z[fe.key],id:P.value,contents:fe==null?void 0:fe.options})}),H.value=re,I.value=re,_.value=z==null?void 0:z.id};e.watch(()=>O.value,()=>{var re,le;let z=D.cloneDeep(i.originalItemContents);(re=D.cloneDeep(i.originalItemContents))!=null&&re.find(fe=>(fe==null?void 0:fe.key)==="enableWrap")?z=(le=D.cloneDeep(i.originalItemContents))==null?void 0:le.map(fe=>((fe==null?void 0:fe.key)==="enableWrap"&&(fe.contents=!O.value),fe)):z.push({key:"enableWrap",contents:!O.value}),l("change",z)},{deep:!0});const L=()=>{var le,fe,$e,tt,X;H.value=I.value;let z={};if(_.value!==""?z.id=_.value:(P.value++,z.id="id"+P.value),(le=H.value)==null||le.forEach(M=>{var J;const ie=(J=Ve.FormButton)==null?void 0:J.find(ve=>(ve==null?void 0:ve.label)===(M==null?void 0:M.label));ie&&(z[ie.key]=M.value)}),(fe=p.value)!=null&&fe.find(M=>M.id===z.id))p.value=($e=p.value)==null?void 0:$e.map(M=>(M.id===z.id&&(M=z),M));else{let M=D.cloneDeep(p.value);p.value||(p.value=[]),M.push(z),p.value=M}v.value=!1,_.value="";let re=D.cloneDeep(i.originalItemContents);(tt=D.cloneDeep(i.originalItemContents))!=null&&tt.find(M=>(M==null?void 0:M.key)==="formButton")?re=(X=D.cloneDeep(i.originalItemContents))==null?void 0:X.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=p.value),M)):re.push({key:"formButton",contents:p.value}),l("change",re)},m=z=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,le;y.value=(re=D.cloneDeep(y.value))==null?void 0:re.filter(fe=>(fe==null?void 0:fe.id)!==(z==null?void 0:z.id)),l("change",(le=D.cloneDeep(i.originalItemContents))==null?void 0:le.map(fe=>((fe==null?void 0:fe.key)==="formContent"&&(fe.contents=y.value),fe))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},C=z=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var re,le;p.value=(re=D.cloneDeep(p.value))==null?void 0:re.filter(fe=>(fe==null?void 0:fe.id)!==(z==null?void 0:z.id)),l("change",(le=D.cloneDeep(i.originalItemContents))==null?void 0:le.map(fe=>((fe==null?void 0:fe.key)==="formButton"&&(fe.contents=p.value),fe))),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},h=()=>{var re;v.value=!0;let z=[];(re=Ve.FormButton)==null||re.forEach(le=>{P.value++,z.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:(le==null?void 0:le.label)==="类型"?"normal":"",id:P.value,contents:le==null?void 0:le.options})}),H.value=z,I.value=z},E=()=>{var re,le,fe;u.value=!0;let z=[];(fe=(le=(re=Ve.FormContent)==null?void 0:re.find($e=>($e==null?void 0:$e.key)==="Input"))==null?void 0:le.value)==null||fe.forEach($e=>{P.value++,z.push({label:$e==null?void 0:$e.label,name:$e==null?void 0:$e.label,type:$e.type,value:($e==null?void 0:$e.label)==="类型"?"Input":"",id:P.value,contents:$e==null?void 0:$e.options})}),s.value=z,k.value=z},g=z=>{let re=D.cloneDeep(I.value);re=re==null?void 0:re.map(le=>(le.value=z==null?void 0:z[le.name],le)),I.value=re},te=z=>{const re=z.find($e=>($e==null?void 0:$e.name)==="类型");if((re==null?void 0:re.value)!="Select")return;const le=z.find($e=>($e==null?void 0:$e.name)==="多选"),fe=z.find($e=>($e==null?void 0:$e.name)==="初始值");le!=null&&le.value&&Bo.isString(fe.value)&&(fe.value=[fe.value]),!(le!=null&&le.value)&&!Bo.isString(fe.value)&&(fe.value="")},Te=async z=>{var re,le,fe,$e,tt,X,M,ie,J,ve,we,Ee;if((z==null?void 0:z.类型)!==((le=(re=k.value)==null?void 0:re.find(ne=>(ne==null?void 0:ne.label)==="类型"))==null?void 0:le.value)){let ne=[];const ke=await((tt=($e=(fe=Ve.FormContent)==null?void 0:fe.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:$e.value)==null?void 0:tt.value)?await((ve=(J=(ie=Ve.FormContent)==null?void 0:ie.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:J.value)==null?void 0:ve.value):(M=(X=Ve.FormContent)==null?void 0:X.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:M.value;if(ke==null||ke.forEach(T=>{var Ye,Ae;P.value++;const Ge=ri(T==null?void 0:T.default)?(z==null?void 0:z[T.label])??T.value??"":T==null?void 0:T.default;ne.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:Ge,prop:T==null?void 0:T.prop,id:P.value,contents:T==null?void 0:T.options,width:((Ae=(Ye=k.value)==null?void 0:Ye[0])==null?void 0:Ae.width)??1})}),z!=null&&z.菜单选项&&((we=z==null?void 0:z.菜单选项)==null?void 0:we.length)>0){const T=await Ve.menuToContentType(z==null?void 0:z.菜单选项);ne=ne==null?void 0:ne.map(Ge=>((Ge==null?void 0:Ge.name)==="组信息选项"&&(Ge.contents=T),Ge))}te(ne),k.value=await Ve.selectToBase(D.cloneDeep(ne)),s.value=await Ve.selectToBase(D.cloneDeep(ne))}else{let ne=D.cloneDeep(k.value);if(ne=ne==null?void 0:ne.map(ke=>(ke.value=z==null?void 0:z[ke.name],ke)),z!=null&&z.菜单选项&&((Ee=z==null?void 0:z.菜单选项)==null?void 0:Ee.length)>0){const ke=await Ve.menuToContentType(z==null?void 0:z.菜单选项);ne=ne==null?void 0:ne.map(T=>((T==null?void 0:T.name)==="组信息选项"&&(T.contents=ke),T))}ne=Ve.formToOptionsContents(ne),te(ne),k.value=await Ve.selectToBase(D.cloneDeep(ne))}},Qe=z=>{z||(s.value=k.value)},de=async z=>{await Te(z),s.value=k.value},Be=ml(async()=>{var fe,$e,tt,X,M,ie,J,ve,we,Ee,ne,ke;s.value=k.value;let z={};z.width=(($e=(fe=s.value)==null?void 0:fe[0])==null?void 0:$e.width)??1,_.value!==""?z.id=_.value:(P.value++,z.id="id"+P.value);let re=await((M=(X=(tt=Ve.FormContent)==null?void 0:tt.find(T=>{var Ge,Ye;return(T==null?void 0:T.key)===(((Ye=(Ge=s.value)==null?void 0:Ge.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:X.value)==null?void 0:M.value)??((J=(ie=Ve.FormContent)==null?void 0:ie.find(T=>{var Ge,Ye;return(T==null?void 0:T.key)===(((Ye=(Ge=s.value)==null?void 0:Ge.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:J.value);if((ve=s.value)==null||ve.forEach(T=>{const Ge=re==null?void 0:re.find(Ye=>(Ye==null?void 0:Ye.label)===(T==null?void 0:T.label));Ge&&(z[Ge.key]=T.value)}),z.width=z.width?z.width:1,z.key=z==null?void 0:z.label,z.isFormColHidden=z==null?void 0:z.isFormColHidden,(we=y.value)!=null&&we.find(T=>T.id===z.id))y.value=(Ee=y.value)==null?void 0:Ee.map(T=>(T.id===z.id&&(T=z),T));else{let T=D.cloneDeep(y.value);T.push(z),y.value=T}y.value=y.value.map(({id:T,...Ge})=>Ge),u.value=!1,_.value="";let le=D.cloneDeep(i.originalItemContents);(ne=D.cloneDeep(i.originalItemContents))!=null&&ne.find(T=>(T==null?void 0:T.key)==="formContent")?le=(ke=D.cloneDeep(i.originalItemContents))==null?void 0:ke.map(T=>((T==null?void 0:T.key)==="formContent"&&(T.contents=y.value),T)):le.push({key:"formContent",contents:y.value}),l("change",le)},300),Oe=()=>{u.value=!1,v.value=!1,_.value="",k.value=[],I.value=[]};return e.watch(()=>i.originalItemContents,()=>{var re,le,fe,$e,tt,X;if(!i.originalItemContents||i.originalItemContents.length===0)return;const z=D.cloneDeep(i.originalItemContents);y.value=((re=z==null?void 0:z.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:re.contents)??[],p.value=((le=z==null?void 0:z.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:le.contents)??[],O.value=(fe=z==null?void 0:z.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&fe.contents?!(($e=z==null?void 0:z.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&$e.contents):!0,y.value=(tt=D.cloneDeep(y.value))==null?void 0:tt.map((M,ie)=>{var ve;let J=M;return J.id=(M==null?void 0:M.id)??ie,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((ve=M==null?void 0:M.options)==null?void 0:ve.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,J}),y.value=Ve.formToOptionsContents(y.value),p.value=(X=p.value)==null?void 0:X.map((M,ie)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:ie})},{deep:!0,immediate:!0}),(z,re)=>{const le=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$s,[e.createElementVNode("div",js,[e.createElementVNode("div",Us,[re[2]||(re[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:E},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[1]||(re[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ks,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,($e,tt)=>(e.openBlock(),e.createElementBlock("div",{key:tt},[e.createElementVNode("div",Ws,[e.createElementVNode("div",null,e.toDisplayString($e.label),1),e.createElementVNode("div",Hs,[e.createVNode(le,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>$($e)},null,8,["onClick"]),e.createVNode(le,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>m($e)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",qs,[re[4]||(re[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:h},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[re[3]||(re[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Xs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,($e,tt)=>(e.openBlock(),e.createElementBlock("div",{key:tt},[e.createElementVNode("div",Gs,[e.createElementVNode("div",null,e.toDisplayString($e.label),1),e.createElementVNode("div",Ys,[e.createVNode(le,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>F($e)},null,8,["onClick"]),e.createVNode(le,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>C($e)},null,8,["onClick"])])])]))),128))]),re[6]||(re[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Js,[re[5]||(re[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(It._sfc_main$1,{modelValue:O.value,"onUpdate:modelValue":re[0]||(re[0]=$e=>O.value=$e)},null,8,["modelValue"])])]),e.createVNode(Jt.ssDialog,{visible:u.value,onBeforeDestroy:Oe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:Te,onChangeVisible:Qe,onBlurChange:de},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qs,[e.createVNode(fe,{onClick:Oe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>re[7]||(re[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(fe,{class:"ok-button button",onClick:e.unref(Be),id:"themeButton"},{default:e.withCtx(()=>re[8]||(re[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Jt.ssDialog,{visible:v.value,onBeforeDestroy:Oe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ec,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Oe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:L},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Mo=Ft._export_sfc(tc,[["__scopeId","data-v-20850524"]]),nc={class:"step-module content"},ac={class:"module-data"},oc={class:"step-module layout"},lc={class:"form-content"},rc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=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}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),k=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),p=e.ref("create"),y=e.ref({}),_=e.ref([]),O=$=>{var F;y.value=$,l("change",(F=I())==null?void 0:F.compData)},P=($,F)=>{var L,m;switch($){case"create":(L=s.value)==null||L.forEach(C=>{C.value=""}),p.value="create",v.visible=!0;break;case"update":(m=s.value)==null||m.forEach(C=>{C.value=F[C==null?void 0:C.prop]}),p.value="update",v.visible=!0;break;case"delete":_.value.splice(F,1),p.value="delete";break}},H=$=>{var F,L,m;if(($==null?void 0:$.buttonName)==="确认"){const C=D.cloneDeep($==null?void 0:$.content);switch(Object.keys(C).forEach(h=>{C[h]===""&&delete C[h]}),p.value){case"create":_.value.push({...C,index:((F=_.value)==null?void 0:F.length)+1});break;case"update":_.value=(L=_.value)==null?void 0:L.map(h=>h.index===(C==null?void 0:C.index)?{...h,title:C==null?void 0:C.title,description:C==null?void 0:C.description}:h);break}l("change",(m=I())==null?void 0:m.compData),v.visible=!1}else v.visible=!1},I=()=>({comp:"Step",compData:[{key:"stepList",contents:_.value},{key:"stepConfig",contents:y.value}]}),ee=()=>{v.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,$=>{var F,L;$&&(y.value=((F=$==null?void 0:$.find(m=>m.key==="stepConfig"))==null?void 0:F.contents)??{},_.value=((L=$==null?void 0:$.find(m=>m.key==="stepList"))==null?void 0:L.contents)??[])},{immediate:!0}),($,F)=>{const L=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",nc,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=C=>P("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(C,h)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:h},[e.createElementVNode("span",null,e.toDisplayString(C==null?void 0:C.title),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:E=>P("update",{...C,index:h+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:E=>P("delete",h)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",oc,[F[5]||(F[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(It.ssForm,{rowContents:u.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:ee,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",lc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ic=Ft._export_sfc(rc,[["__scopeId","data-v-7dbd17f2"]]),sc={class:"step-module content"},cc={class:"module-data"},uc={class:"step-module layout"},dc={class:"form-content"},pc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref("create"),s=e.ref({}),k=e.ref([]),v=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}]),p=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),y=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),_=e.reactive({visible:!1,width:"40%",title:"时间线"}),O=$=>{var F;s.value=$,l("change",(F=I())==null?void 0:F.compData)},P=($,F)=>{var L,m;switch($){case"create":(L=p.value)==null||L.forEach(C=>{C.value=""}),u.value="create",_.visible=!0;break;case"update":(m=p.value)==null||m.forEach(C=>{C.value=F[C==null?void 0:C.prop]}),u.value="update",_.visible=!0;break;case"delete":k.value.splice(F,1),u.value="delete";break}},H=$=>{var F,L,m,C;if(($==null?void 0:$.buttonName)==="确认"){const h=D.cloneDeep($==null?void 0:$.content);switch(Object.keys(h).forEach(E=>{h[E]===""&&delete h[E]}),u.value){case"create":(L=k.value)==null||L.push({...h,index:((F=k.value)==null?void 0:F.length)+1});break;case"update":k.value=(m=k.value)==null?void 0:m.map(E=>E.index===(h==null?void 0:h.index)?{...E,content:h==null?void 0:h.content,timestamp:h==null?void 0:h.timestamp}:E);break}l("change",(C=I())==null?void 0:C.compData),_.visible=!1}else _.visible=!1},I=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:k.value},{key:"timeLineConfig",contents:s.value}]}),ee=()=>{_.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,$=>{var F,L;$&&(s.value=((F=$==null?void 0:$.find(m=>m.key==="timeLineConfig"))==null?void 0:F.contents)??{},k.value=((L=$==null?void 0:$.find(m=>m.key==="timeLineList"))==null?void 0:L.contents)??[])},{immediate:!0}),($,F)=>{const L=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",sc,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=C=>P("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(C,h)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:h},[e.createElementVNode("span",null,e.toDisplayString(C==null?void 0:C.content),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:E=>P("update",{...C,index:h+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:E=>P("delete",h)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",uc,[F[5]||(F[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(It.ssForm,{rowContents:v.value,onChange:O},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:ee,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",dc,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:y.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),fc=Ft._export_sfc(pc,[["__scopeId","data-v-39ffc861"]]),hc={};function vc(a,r){return e.openBlock(),e.createElementBlock("div")}const gc=Ft._export_sfc(hc,[["render",vc]]),mc={class:"extra-content"},yc={key:0},bc={key:1},kc={class:"dialog-footer"},xc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:r}){const i=a,l=e.ref(0),u=e.ref(),s=e.ref(),k=r,v=e.ref(!1),p=e.ref({}),y=e.ref({}),_=e.ref();e.watch(()=>[i.itemData],()=>{var C;const m=D.cloneDeep(i.itemData);u.value=(C=D.cloneDeep(m))==null?void 0:C.map(h=>{var E;if(h.key==="extra"){let g=[];(E=h.value)==null||E.forEach(te=>{var Te;g.push((Te=Object.values(te))==null?void 0:Te[0])}),h.value=g}return h})},{deep:!0,immediate:!0});const O=(m,C,h,E)=>{var te;let g={};((te=m==null?void 0:m[0])==null?void 0:te.contents)==="详情"&&(v.value=!0,g[C]=m,s.value=m==null?void 0:m.filter(Te=>(Te==null?void 0:Te.key)!=="tableContentName"),p.value=g,y.value=h,_.value=E.id)},P=m=>{var Te,Qe,de,Be;const C=(Qe=(Te=Object.values(D.cloneDeep(p.value)))==null?void 0:Te[0])==null?void 0:Qe.filter(Oe=>(Oe==null?void 0:Oe.key)==="tableContentName"),h=(Be=(de=Object.values(D.cloneDeep(p.value)))==null?void 0:de[0])==null?void 0:Be.filter(Oe=>(Oe==null?void 0:Oe.key)!=="tableContentName"),E=h==null?void 0:h.map((Oe,z)=>{var re;return z===m.index&&(Oe==null?void 0:Oe.comp)==="Table"&&(Oe.compData=(re=Oe.compData)==null?void 0:re.map(le=>{var fe,$e;return(le==null?void 0:le.key)==="tableContents"&&(le.contents=($e=(fe=m.content)==null?void 0:fe.map(tt=>{let X={};for(let M in tt)M!=="id"&&(X[M]=tt[M]);return X}))==null?void 0:$e.map(tt=>Object.values(tt))),le})),Oe});E.unshift(C==null?void 0:C[0]);let g=D.cloneDeep(p.value),te={};for(let Oe in g)te[Oe]=E;p.value=te},H=()=>{v.value=!1,p.value={},y.value={},_.value=void 0,l.value++},I=m=>{var Te,Qe,de,Be;const C=(Qe=(Te=Object.values(D.cloneDeep(p.value)))==null?void 0:Te[0])==null?void 0:Qe.filter(Oe=>(Oe==null?void 0:Oe.key)==="tableContentName"),h=(Be=(de=Object.values(D.cloneDeep(p.value)))==null?void 0:de[0])==null?void 0:Be.filter(Oe=>(Oe==null?void 0:Oe.key)!=="tableContentName"),E=h==null?void 0:h.map((Oe,z)=>(z===m.index&&(Oe.compData=m.contents),Oe));E.unshift(C==null?void 0:C[0]);let g=D.cloneDeep(p.value),te={};for(let Oe in g)te[Oe]=E;p.value=te},ee=()=>{var C,h;let m={};for(let E in y.value)E===((C=Object.keys(p.value))==null?void 0:C[0])?m[E]=(h=Object.values(p.value))==null?void 0:h[0]:m[E]=y.value[E];k("change",{buttonName:"编辑",index:_.value,singleContent:m},"methodData"),v.value=!1,p.value={},y.value={},_.value=void 0},$=()=>{v.value=!1,p.value={},y.value={},_.value=void 0},F=m=>{k("change",m,"methodData")},L=m=>ra(m);return(m,C)=>{const h=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(E,g)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(E==null?void 0:E.key)==="extra"?(e.openBlock(),e.createElementBlock("div",yc)):(e.openBlock(),e.createElementBlock("div",bc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(E.comp)),{itemData:E==null?void 0:E.compData,childItemData:E==null?void 0:E.itemChildData,key:g,index:(E==null?void 0:E.id)??g,onContentClick:O,onChange:F},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Jt.ssDialog,{visible:v.value,onBeforeDestroy:$},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(E,g)=>(e.openBlock(),e.createElementBlock("div",{key:g,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(E.comp)),{itemData:E==null?void 0:E.compData,onChange:P,childItemData:E==null?void 0:E.itemChildData,key:g,onContentChange:I,index:(E==null?void 0:E.id)??g,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",kc,[e.createVNode(h,{class:"cancel-button footer-button",onClick:H,id:"themeBorderButton"},{default:e.withCtx(()=>C[0]||(C[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(h,{class:"confirm-button footer-button",onClick:ee,id:"themeButton"},{default:e.withCtx(()=>C[1]||(C[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},wc=Ft._export_sfc(xc,[["__scopeId","data-v-2d9c5ab2"]]),Dc={key:0,class:"method-content"},_c={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const r=e.ref([]),i=Ve.useOriginalState(D.pinia),{originalPath:l}=D.storeToRefs(i),u=a,s=e.ref(!1),k=e.ref(),v=Ve.useTableComp(D.pinia),{multipleTableConst:p}=D.storeToRefs(v),y=D.useModelComp(D.pinia),_=e.ref(!1),O=D.useMenuState(D.pinia),P=D.useLoginState(D.pinia),{itemData:H,isEdit:I,routeToChildPath:ee,tableViewContents:$,lockingPage:F,payloadTypes:L}=D.storeToRefs(y),{activeMenuPath:m,platform:C,childMenu:h}=D.storeToRefs(O),{loginUserInfo:E}=D.storeToRefs(P),g=e.ref(!1),te=async()=>{var X,M;(X=r.value)!=null&&X.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")&&await le((M=r.value)==null?void 0:M.find(ie=>(ie==null?void 0:ie.buttonName)==="保存")),await Ve.onSaveBack()};e.watch(()=>H.value,async()=>{I.value==="view"&&!g.value&&await tt(D.cloneDeep(u.itemData)),g.value=!1},{deep:!0});const Te=()=>{s.value=!1,k.value=void 0},Qe=X=>X.map(M=>{const ie={};for(const J in M){const ve=M[J];if(J.includes(p.value)){const we=J.split(p.value);let Ee=ie;we.forEach((ne,ke)=>{ke===we.length-1?Ee[ne]=ve:(Ee[ne]||(Ee[ne]={}),Ee=Ee[ne])})}else ie[J]=ve}return ie}),de=async(X,M,ie=[])=>{var ve,we,Ee,ne,ke,T,Ge,Ye,Ae,ce,ae,pe,Ce,qe,dt;let J=(ve=D.cloneDeep(M))==null?void 0:ve.filter(b=>(b==null?void 0:b.comp)!=="methodButton");if(X!=null&&X.includes("[")){let b=(T=(ke=(ne=(Ee=(we=D.cloneDeep(X))==null?void 0:we.split("["))==null?void 0:Ee[1])==null?void 0:ne.split("]"))==null?void 0:ke[0])==null?void 0:T.split(":"),N="";if(b!=null&&b[0]){let W=(Ge=J==null?void 0:J.find(Z=>(Z==null?void 0:Z.name)===(b==null?void 0:b[0])))==null?void 0:Ge.compData;if(!W){let Z=(Ye=X==null?void 0:X.split("["))==null?void 0:Ye[0],S=await Ve.getItemData(Z,sessionStorage.getItem("systemKey"),"",!1,"","",ie);W=(Ae=S==null?void 0:S.find(se=>(se==null?void 0:se.name)===(b==null?void 0:b[0])))==null?void 0:Ae.compData}W==null||W.forEach(Z=>{var S,se,Me,A,oe,U;if((Z==null?void 0:Z.key)==="formContent")(S=Z==null?void 0:Z.contents)==null||S.forEach(q=>{var Se;(q==null?void 0:q.key)===(b==null?void 0:b[1])&&(Array.isArray(q==null?void 0:q.value)?N=q==null?void 0:q.value:N=(Se=q==null?void 0:q.value)==null?void 0:Se.toString())});else if((Z==null?void 0:Z.key)==="tableContents"){let q=[],Se=(se=W==null?void 0:W.find(G=>(G==null?void 0:G.key)==="header"))==null?void 0:se.contents,ue=(b==null?void 0:b[1])??"";if(Se!=null&&Se.every(G=>Array.isArray(G))){let G=Ve.getColumnChild((oe=Se==null?void 0:Se[0])==null?void 0:oe.filter(Q=>(Q==null?void 0:Q.label)!=="操作"));(U=Z.contents)==null||U.forEach(Q=>{let he={};Q=Q==null?void 0:Q.filter(ye=>!(ye!=null&&ye.id)),G==null||G.forEach((ye,_e)=>{let xe=Q[_e];typeof Q[_e]=="number"&&(xe=Q[_e].toString()),(ue===""||ue===ye.prop)&&(he[ye.prop]=xe)}),q.push(he)}),q=Qe(q)}else{let G=(Me=Se==null?void 0:Se.map(Q=>Q==null?void 0:Q.label))==null?void 0:Me.filter(Q=>Q!=="操作");(A=Z.contents)==null||A.forEach(Q=>{let he={};Q=Q==null?void 0:Q.filter(ye=>!(ye!=null&&ye.id)),G==null||G.forEach((ye,_e)=>{let xe=Q[_e];typeof Q[_e]=="number"&&(xe=Q[_e].toString()),(ue===""||ue===ye)&&(he[ye]=xe)}),q.push(he)})}N=q}})}return N}else if(X!=null&&X.includes("/")){let b={};return(ce=D.cloneDeep(J))==null||ce.forEach((N,W)=>{var Z,S,se,Me,A,oe,U,q,Se,ue,G,Q,he,ye,_e,xe,K,Re,be;if((N==null?void 0:N.comp)==="Table"){let Ke=Array.isArray((se=(S=(Z=N==null?void 0:N.compData)==null?void 0:Z.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:S.contents)==null?void 0:se[0])?(U=(oe=(A=(Me=N==null?void 0:N.compData)==null?void 0:Me.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:A.contents)==null?void 0:oe[0])==null?void 0:U.some(Ne=>Ne==null?void 0:Ne.children):[],ot=(ue=(Se=(q=N==null?void 0:N.compData)==null?void 0:q.find(Ne=>(Ne==null?void 0:Ne.key)==="tableContents"))==null?void 0:Se.contents)==null?void 0:ue.map(Ne=>(Ne!=null&&Ne.find(gt=>gt==null?void 0:gt.id)&&(Ne=Ne.slice(1)),Ne)),je=(_e=(ye=(he=(Q=(G=N==null?void 0:N.compData)==null?void 0:G.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:Q.contents)==null?void 0:he[0])==null?void 0:ye[0])==null?void 0:_e.label,at=(K=(xe=N==null?void 0:N.compData)==null?void 0:xe.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:K.contents;if(Ke)(Ke==null?void 0:Ke.length)===0?b[N.name]=b!=null&&b[N.name]?b[N.name]:Ve.tableToForm(ot,at):b[je]=Ve.tableToForm(ot,at);else{const Ne=[];at=at.slice(1,at.length-1),at==null||at.forEach((gt,et)=>{ot==null||ot.forEach(ze=>{Ne.push({key:gt.label+ze[0],value:ze[et+1]})})}),b["form"+W]=Ne}}else{const Ke=(be=(Re=N.compData)==null?void 0:Re.find(je=>(je==null?void 0:je.key)==="formContent"))==null?void 0:be.contents;b!=null&&b.form||(b.form=[]);const ot=[];Ke==null||Ke.forEach(je=>{je.key!==""&&(je={key:(je==null?void 0:je.key)??(je==null?void 0:je.label),value:je==null?void 0:je.value},ot.push(je))}),b.form=[...ot,...D.cloneDeep(b==null?void 0:b.form)]}}),b}else{if(X==="createInsofDataApi"){let b=(ae=D.cloneDeep(M))==null?void 0:ae[0];return b={comp:(pe=D.cloneDeep(b))==null?void 0:pe.comp,compData:(Ce=D.cloneDeep(b))==null?void 0:Ce.compData,name:(qe=D.cloneDeep(b))==null?void 0:qe.name,isShow:(dt=D.cloneDeep(b))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:m.value},value:{pageData:b}}}return X}},Be=async(X,M,ie)=>{var we,Ee,ne;let J=await Ve.getItemData(M,sessionStorage.getItem("systemKey"),""),ve=J==null?void 0:J.find(ke=>(ke==null?void 0:ke.name)===(ie==null?void 0:ie[0]));if(ve){if((ve==null?void 0:ve.comp)==="Table"){let ke={};for(let pe in D.cloneDeep(X))D.cloneDeep(X)[pe]!=="loginUser"?ke[pe]=D.cloneDeep(X)[pe]:ke[pe]=((we=E.value)==null?void 0:we.account)||((Ee=E.value)==null?void 0:Ee.账号);let T=[],Ge=ke;Array.isArray(X)||(Ge=[ke]),Ge==null||Ge.forEach(pe=>{T.push({[pe[ie[1]]]:pe})});let Ye=[],Ae=T==null?void 0:T.map(pe=>{var Ce;return(Ce=Object.keys(pe))==null?void 0:Ce[0]});J==null||J.forEach(pe=>{var Ce;(pe==null?void 0:pe.name)===(ie==null?void 0:ie[0])&&((Ce=pe==null?void 0:pe.compData)==null||Ce.forEach(qe=>{var dt;(qe==null?void 0:qe.key)==="tableContents"&&((dt=qe==null?void 0:qe.contents)==null||dt.forEach(b=>{b!=null&&b.some(N=>Ae.includes(N))&&Ye.push({[b.find(N=>N.id).id]:b.find(N=>Ae.includes(N))})}))}))});let ce=Ye==null?void 0:Ye.map(pe=>{var Ce;return(Ce=Object.keys(pe))==null?void 0:Ce[0]}),ae=[];if(ce==null||ce.forEach(pe=>{var dt;let Ce=(dt=Ye==null?void 0:Ye.find(b=>{var N;return((N=Object.keys(b))==null?void 0:N[0].toString())===pe.toString()}))==null?void 0:dt[pe],qe=T==null?void 0:T.find(b=>{var N;return((N=Object.keys(b))==null?void 0:N[0])===Ce});ae.push({id:parseInt(pe),value:{tableData:qe[Ce]}})}),(ae==null?void 0:ae.length)>0)return ae}else if((ve==null?void 0:ve.comp)==="Form"){let ke=D.cloneDeep(ve);ke.compData=(ne=ke.compData)==null?void 0:ne.map(Ye=>{var Ae;return(Ye==null?void 0:Ye.key)==="formContent"&&(Ye.contents=(Ae=Ye.contents)==null?void 0:Ae.map(ce=>((ce==null?void 0:ce.key)===(ie==null?void 0:ie[1])&&(ce.value=(X==null?void 0:X[ce==null?void 0:ce.prop])||X),ce))),Ye});let T={};for(let Ye in ke)Ye!=="id"&&(T[Ye]=ke[Ye]);let Ge=[];if(Ge.push({id:ve==null?void 0:ve.id,keyType:ie==null?void 0:ie[1],value:{pageData:T}}),(Ge==null?void 0:Ge.length)>0)return Ge}}},Oe=async(X,M,ie)=>{var we,Ee,ne,ke,T,Ge,Ye,Ae,ce,ae;let J=await Ve.getItemData(M,sessionStorage.getItem("systemKey"),""),ve=J==null?void 0:J.find(pe=>(pe==null?void 0:pe.name)===(ie==null?void 0:ie[0]));if(ve){if((ve==null?void 0:ve.comp)==="Table"){let pe={};for(let Ce in D.cloneDeep(X))D.cloneDeep(X)[Ce]!=="loginUser"?pe[Ce]=D.cloneDeep(X)[Ce]:pe[Ce]=((we=E.value)==null?void 0:we.account)||((Ee=E.value)==null?void 0:Ee.账号);await rt.createInsofDataApi({key:{type:"data",pageKey:M,tableId:ve==null?void 0:ve.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})}else if((ve==null?void 0:ve.comp)==="Form"){let pe=D.cloneDeep(ve),Ce=Object.keys(X),qe="";(ke=(ne=D.cloneDeep(pe))==null?void 0:ne.compData)==null||ke.forEach(S=>{var se,Me;(S==null?void 0:S.key)==="formContent"&&((Me=(se=D.cloneDeep(S))==null?void 0:se.contents)==null||Me.forEach(A=>{var oe;Ce.includes(A==null?void 0:A.key)&&(A==null?void 0:A.value)===((oe=E.value)==null?void 0:oe.姓名)&&(qe=A==null?void 0:A.key)}))});let dt=[];(T=Object.values(X[qe]))==null||T.forEach(S=>{S!=null&&S.includes("(")&&dt.push(S)}),dt=[...new Set(dt)];const b=dt==null?void 0:dt.map(async S=>{var U,q,Se,ue,G,Q,he,ye,_e,xe,K,Re;let se="";(Q=(G=(ue=(Se=(q=(U=D.cloneDeep(S))==null?void 0:U.split("("))==null?void 0:q[1])==null?void 0:Se.split(")"))==null?void 0:ue[0])==null?void 0:G.split(":"))==null||Q.forEach(be=>{se=se===""?se+be.replaceAll("'",""):se+"/"+be.replaceAll("'","")});let Me=[];(Re=(K=(xe=(_e=(ye=(he=D.cloneDeep(S))==null?void 0:he.split("<"))==null?void 0:ye[1])==null?void 0:_e.split(">"))==null?void 0:xe[0])==null?void 0:K.split(":"))==null||Re.forEach(be=>{Me.push(be.replaceAll("'",""))});const A=await Ve.getItemData(se,sessionStorage.getItem("systemKey"),"");let oe="";return A==null||A.forEach(be=>{var Ke;be.name===(Me==null?void 0:Me[0])&&((Ke=be==null?void 0:be.compData)==null||Ke.forEach(ot=>{var je;(ot==null?void 0:ot.key)==="formContent"&&((je=ot.contents)==null||je.forEach(at=>{(at==null?void 0:at.key)===(Me==null?void 0:Me[1])&&(oe=at==null?void 0:at.value)}))}))}),{[S]:oe}}),N=await Promise.all(b);pe.compData=(Ye=(Ge=D.cloneDeep(pe))==null?void 0:Ge.compData)==null?void 0:Ye.map(S=>{var se,Me;return(S==null?void 0:S.key)==="formContent"&&(S.contents=(Me=(se=D.cloneDeep(S))==null?void 0:se.contents)==null?void 0:Me.map(A=>{var oe,U,q,Se;return(oe=X[qe])!=null&&oe[A==null?void 0:A.key]&&(X[qe][A==null?void 0:A.key].includes("(")?A.value=(U=N==null?void 0:N.find(ue=>{var G;return((G=Object.keys(ue))==null?void 0:G[0])===X[qe][A==null?void 0:A.key]}))==null?void 0:U[X[qe][A==null?void 0:A.key]]:A.value=(Se=(q=D.cloneDeep(X))==null?void 0:q[qe])==null?void 0:Se[A==null?void 0:A.key]),A})),S});const W=await rt.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Z="";((Ae=W==null?void 0:W.data)==null?void 0:Ae.type)==="success"&&((ae=(ce=W==null?void 0:W.data)==null?void 0:ce.result)==null||ae.forEach(S=>{var se,Me;((Me=(se=S==null?void 0:S.value)==null?void 0:se.pageData)==null?void 0:Me.name)===(ie==null?void 0:ie[0])&&(Z=S.id)}),await rt.updateInsofDataApi({id:Z,value:{pageData:pe}}))}}},z=(X,M="",ie={})=>{for(const[J,ve]of Object.entries(X)){const we=M?`${M}.${J}`:J;ve!==null&&typeof ve=="object"&&!Array.isArray(ve)&&Object.prototype.toString.call(ve)!=="[object Date]"?z(ve,we,ie):ie[we]=ve}return ie},re=async(X,M,ie,J)=>{var Ee,ne,ke,T,Ge,Ye,Ae,ce,ae,pe,Ce,qe,dt,b,N,W,Z,S,se,Me,A,oe,U,q,Se;let ve=await Ve.getItemData(M,sessionStorage.getItem("systemKey"),""),we=ve==null?void 0:ve.find(ue=>(ue==null?void 0:ue.name)===(ie==null?void 0:ie[0]));if(we){if(!(ie!=null&&ie[1])&&(we==null?void 0:we.comp)==="Table"){let ue={},G=[],Q=(ne=(Ee=we==null?void 0:we.compData)==null?void 0:Ee.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:ne.contents;Q!=null&&Q.every(_e=>Array.isArray(_e))?G=(T=Ve.getColumnChild((ke=Q==null?void 0:Q[0])==null?void 0:ke.filter(_e=>(_e==null?void 0:_e.label)!=="操作")))==null?void 0:T.map(_e=>_e==null?void 0:_e.prop):G=Q==null?void 0:Q.map(_e=>_e==null?void 0:_e.label);for(let _e in D.cloneDeep(X))if(D.cloneDeep(X)[_e]!=="loginUser"){let xe=z(D.cloneDeep(X)[_e]),K={};for(let Re in xe)if(G!=null&&G.find(be=>be===Re))K[Re]=xe[Re];else if(G!=null&&G.find(be=>(be==null?void 0:be.toUpperCase())===(Re==null?void 0:Re.toUpperCase()))){let be=G==null?void 0:G.find(Ke=>(Ke==null?void 0:Ke.toUpperCase())===(Re==null?void 0:Re.toUpperCase()));K[be]=xe[Re]}ue[_e]=K}else ue[_e]=((Ge=E.value)==null?void 0:Ge.account)||((Ye=E.value)==null?void 0:Ye.账号);let he=await rt.getInsofDataApi({keyLikes:{tableId:we==null?void 0:we.id}});if(((ce=(Ae=he==null?void 0:he.data)==null?void 0:Ae.result)==null?void 0:ce.length)>0){let _e=(pe=(ae=he==null?void 0:he.data)==null?void 0:ae.result)==null?void 0:pe.map(xe=>xe==null?void 0:xe.id);(_e==null?void 0:_e.length)>0&&await rt.batchDeleteInsofDataApi({ids:_e})}let ye=[];if((Ce=we==null?void 0:we.compData)!=null&&Ce.find(_e=>(_e==null?void 0:_e.key)==="pageColumn")&&((b=(dt=(qe=we==null?void 0:we.compData)==null?void 0:qe.find(_e=>(_e==null?void 0:_e.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&b.includes("["))){const _e=await rt.getInsofDataApi({id:we==null?void 0:we.tableId});let xe=((S=(Z=(W=(N=_e==null?void 0:_e.data)==null?void 0:N.result)==null?void 0:W[0])==null?void 0:Z.key)==null?void 0:S.pageKey)??"";(se=Object.values(ue))==null||se.forEach(K=>{ye.push({key:{type:"data",pageKey:xe,tableId:we==null?void 0:we.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:K}})})}else(Me=Object.values(ue))==null||Me.forEach(_e=>{ye.push({key:{type:"data",pageKey:M,tableId:we==null?void 0:we.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:_e}})});(ye==null?void 0:ye.length)>0&&await rt.batchAddInsofDataApi({dataList:ye})}else if(!(ie!=null&&ie[1])&&(we==null?void 0:we.comp)==="Form"){let ue=D.cloneDeep(we);ue.compData=(oe=(A=D.cloneDeep(ue))==null?void 0:A.compData)==null?void 0:oe.map(he=>{var ye,_e;return(he==null?void 0:he.key)==="formContent"&&(he.contents=(_e=(ye=D.cloneDeep(he))==null?void 0:ye.contents)==null?void 0:_e.map(xe=>{var K,Re;return(K=D.cloneDeep(X))!=null&&K[xe==null?void 0:xe.key]&&(xe.value=(Re=D.cloneDeep(X))==null?void 0:Re[xe==null?void 0:xe.key]),xe})),he});const G=await rt.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Q="";((U=G==null?void 0:G.data)==null?void 0:U.type)==="success"&&((Se=(q=G==null?void 0:G.data)==null?void 0:q.result)==null||Se.forEach(he=>{var ye,_e;((_e=(ye=he==null?void 0:he.value)==null?void 0:ye.pageData)==null?void 0:_e.name)===(ie==null?void 0:ie[0])&&(Q=he.id)}),await rt.updateInsofDataApi({id:Q,value:{pageData:ue}}))}}},le=async X=>{var M,ie,J,ve,we,Ee,ne,ke,T,Ge,Ye,Ae,ce,ae,pe,Ce;O.setImportLoading(!0);try{if(X.api){let qe=new WeakMap;(ie=(M=(await rt.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:L.value})).data.result)==null?void 0:M.filter(U=>{var q,Se;return((q=U==null?void 0:U.key)==null?void 0:q.pageKey)!=="menu"&&((Se=U==null?void 0:U.key)==null?void 0:Se.pageKey)!=="secret"}))==null||ie.forEach(U=>{qe[U.key.pageKey]?qe[U.key.pageKey]=[...qe[U.key.pageKey],U]:qe[U.key.pageKey]=[U]});let b=await Ve.getItemData((h==null?void 0:h.value)===""?m.value:h==null?void 0:h.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe),N="";if(b=b==null?void 0:b.map(U=>{var q,Se,ue,G,Q,he,ye,_e,xe,K,Re,be;if((U==null?void 0:U.comp)==="Form")U.compData=(q=U.compData)==null?void 0:q.map(Ke=>{var ot;return(Ke==null?void 0:Ke.key)==="formContent"&&(Ke.contents=(ot=Ke.contents)==null?void 0:ot.map(je=>{var at;if((je==null?void 0:je.value)===""&&(je==null?void 0:je.type)==="Select"){let Ne=Ve.judgeContents((at=D.cloneDeep(je))==null?void 0:at.optionUrl,qe);je.value=je.value||Ne}return je})),Ke});else if((U==null?void 0:U.comp)==="Table"&&(Se=U.compData)!=null&&Se.find(Ke=>(Ke==null?void 0:Ke.key)==="pageColumn")){let Ke=(G=(ue=U.compData)==null?void 0:ue.find(Ne=>(Ne==null?void 0:Ne.key)==="pageColumn"))==null?void 0:G.contents,ot=((he=(Q=U.compData)==null?void 0:Q.find(Ne=>(Ne==null?void 0:Ne.key)==="pageGroup"))==null?void 0:he.contents)??"",je=(xe=(_e=(ye=Ke==null?void 0:Ke.split("["))==null?void 0:ye[1])==null?void 0:_e.split("]"))==null?void 0:xe[0];N=((K=Ke==null?void 0:Ke.split("["))==null?void 0:K[0])+((be=(Re=$.value)==null?void 0:Re.find(Ne=>(Ne==null?void 0:Ne.key)===je))==null?void 0:be.value)}return U}),!(N===""||N==="")){const U=await Ve.getItemData(N,sessionStorage.getItem("systemKey"),"",!1,"","",qe);b=b==null?void 0:b.map(q=>{var Se,ue,G,Q,he,ye,_e,xe,K,Re,be,Ke,ot;if((q==null?void 0:q.comp)==="Table"&&(Se=q.compData)!=null&&Se.find(je=>(je==null?void 0:je.key)==="pageColumn")){let je=(G=(ue=q.compData)==null?void 0:ue.find(ze=>(ze==null?void 0:ze.key)==="pageColumn"))==null?void 0:G.contents,at=((he=(Q=q.compData)==null?void 0:Q.find(ze=>(ze==null?void 0:ze.key)==="pageGroup"))==null?void 0:he.contents)??"",Ne=(xe=(_e=(ye=je==null?void 0:je.split("["))==null?void 0:ye[1])==null?void 0:_e.split("]"))==null?void 0:xe[0],gt=((K=je==null?void 0:je.split("["))==null?void 0:K[0])+((be=(Re=$.value)==null?void 0:Re.find(ze=>(ze==null?void 0:ze.key)===Ne))==null?void 0:be.value),et=(Ke=U==null?void 0:U.find(ze=>(ze==null?void 0:ze.name)===(at===""?u==null?void 0:u.compName:at)))==null?void 0:Ke.compData;q.compData=(ot=q.compData)==null?void 0:ot.map(ze=>{var it;return(ze==null?void 0:ze.key)==="tableContents"&&(ze.contents=(it=et==null?void 0:et.find(mt=>(mt==null?void 0:mt.key)==="tableContents"))==null?void 0:it.contents),ze})}return q})}let W={};if(((ve=(J=X==null?void 0:X.extraValues)==null?void 0:J.input)==null?void 0:ve.length)>0){const U=(Ee=(we=X==null?void 0:X.extraValues)==null?void 0:we.input)==null?void 0:Ee.map(async q=>{var Se;fe!=null&&fe.find(ue=>ue===q)?W=await de(q,b):W[Object.keys(q)[0]]=await de((Se=Object.values(q))==null?void 0:Se[0],b,qe)});await Promise.all(U)}else W=await de("/",b);let Z=!1;(ke=(ne=X==null?void 0:X.extraValues)==null?void 0:ne.output)==null||ke.forEach(U=>{var q,Se;(Se=(q=Object.values(U))==null?void 0:q[0])!=null&&Se.includes(".doc")&&(Z=!0)});let S;if(Z){const U=It.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});S=await rt.axios.post(X.api,W,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{U.close()})}else S=await rt.axios.post(X.api,W,{headers:{"Content-Type":"application/json"}});let se=(Ae=(Ye=(Ge=(T=D.cloneDeep(X))==null?void 0:T.extraValues)==null?void 0:Ge.output)==null?void 0:Ye.map(U=>{var q,Se,ue,G,Q,he,ye,_e,xe,K,Re,be,Ke,ot,je,at;if(!((Se=(q=Object.values(U))==null?void 0:q[0])!=null&&Se.includes(".doc"))){let Ne=(K=(xe=(_e=(G=D.cloneDeep((ue=Object.values(U))==null?void 0:ue[0]))==null?void 0:G.split("["))==null?void 0:_e[((ye=(he=D.cloneDeep((Q=Object.values(U))==null?void 0:Q[0]))==null?void 0:he.split("["))==null?void 0:ye.length)-1])==null?void 0:xe.split("]"))==null?void 0:K[0],gt=Ne==null?void 0:Ne.split(":"),et=(Ke=D.cloneDeep((Re=Object.values(U))==null?void 0:Re[0]))==null?void 0:Ke.substring(0,D.cloneDeep((be=Object.values(U))==null?void 0:be[0]).lastIndexOf("["));if(et=(je=D.cloneDeep(et))==null?void 0:je.slice(0,((ot=D.cloneDeep(et))==null?void 0:ot.length)-1),et!=null&&et.includes("[")){let ze="";if((at=Ve.contentTransArrayToAll(et,"/"))==null||at.forEach(it=>{var mt,Je,Ue,Nt,Ie,Xe,Fe;if(!(it!=null&&it.includes("[")))ze=ze===""?ze+it.replaceAll("/",""):ze+"/"+it.replaceAll("/","");else{let Ze=D.cloneDeep(it).slice(1,((mt=D.cloneDeep(it))==null?void 0:mt.length)-1),B=(Xe=(Ie=(Nt=(Ue=(Je=D.cloneDeep(Ze))==null?void 0:Je.split("["))==null?void 0:Ue[1])==null?void 0:Nt.split("]"))==null?void 0:Ie[0])==null?void 0:Xe.split(":"),ge="",We=(Fe=b==null?void 0:b.find(me=>(me==null?void 0:me.name)===(B==null?void 0:B[0])))==null?void 0:Fe.compData;We==null||We.forEach(me=>{var ut;(me==null?void 0:me.key)==="formContent"&&((ut=me==null?void 0:me.contents)==null||ut.forEach(st=>{(st==null?void 0:st.key)===(B==null?void 0:B[1])&&(ge=st==null?void 0:st.value)}))}),ze=ze===""?ze+ge.replaceAll("/",""):ze+"/"+ge.replaceAll("/","")}}),et=ze,et[(et==null?void 0:et.length)-1]!=="/")return et}}}))==null?void 0:Ae.filter(U=>U);se=[...new Set(D.cloneDeep(se))];let Me=se==null?void 0:se.map(async U=>{let q=await Ve.getItemData(U,sessionStorage.getItem("systemKey"),"",!1,"","",qe);if((q==null?void 0:q.length)===0)return await Ve.getParentContents(U)});await Promise.all(Me);let A=[],oe=(pe=(ae=(ce=D.cloneDeep(X))==null?void 0:ce.extraValues)==null?void 0:ae.output)==null?void 0:pe.map(async U=>{var _e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt,Je,Ue,Nt,Ie,Xe,Fe,Ze,B,ge,We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut,vt,zt,$t,Kt,qt,Qt,Lt,Tn,Fn,kn,Ln,xn,$n,jn,Un,Kn,Wn,Bn,mn,dn,wn,yn,on,hn,Hn,In,Nn,Dn,qn,Xn,An,Gn,Yn,Et,Zt;if((xe=(_e=Object.values(U))==null?void 0:_e[0])!=null&&xe.includes(".doc")){var q=new Blob([S.data],{type:"application/octet-stream;charset=UTF-8"}),Se=S.headers["content-disposition"],ue=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),G=ue.exec(Se),Q=G==null?void 0:G[1],he=document.createElement("a"),ye=window.URL.createObjectURL(q);k.value=[{name:Q,blobUrl:ye}],s.value=!0}else{let yt=(Ne=(at=(je=(Re=D.cloneDeep((K=Object.values(U))==null?void 0:K[0]))==null?void 0:Re.split("["))==null?void 0:je[((ot=(Ke=D.cloneDeep((be=Object.values(U))==null?void 0:be[0]))==null?void 0:Ke.split("["))==null?void 0:ot.length)-1])==null?void 0:at.split("]"))==null?void 0:Ne[0],Mt=yt==null?void 0:yt.split(":"),bt=(ze=D.cloneDeep((gt=Object.values(U))==null?void 0:gt[0]))==null?void 0:ze.substring(0,D.cloneDeep((et=Object.values(U))==null?void 0:et[0]).lastIndexOf("["));if(bt!=null&&bt.includes("[")?bt=(mt=D.cloneDeep(bt))==null?void 0:mt.slice(0,((it=D.cloneDeep(bt))==null?void 0:it.length)-1):bt===""&&(bt=m.value),bt=bt.replaceAll("<","[").replaceAll(">","]"),bt!=null&&bt.includes("[")){let _t="";(Je=Ve.contentTransArrayToAll(bt,"/"))==null||Je.forEach((Dt,Rt)=>{var Ot,Pt,Xt,ln,Vn,Jn,On,Zn,Ta,ia,ga;if(!(Dt!=null&&Dt.includes("[")))_t=_t===""?_t+Dt.replaceAll("/",""):_t+"/"+Dt.replaceAll("/","");else{let sa="",pn="";(Ot=D.cloneDeep(Dt))!=null&&Ot.includes("]")?(sa=D.cloneDeep(Dt).slice(1,((Pt=D.cloneDeep(Dt))==null?void 0:Pt.length)-1),pn=(On=(Jn=(Vn=(ln=(Xt=D.cloneDeep(sa))==null?void 0:Xt.split("["))==null?void 0:ln[1])==null?void 0:Vn.split("]"))==null?void 0:Jn[0])==null?void 0:On.split(":")):(sa=D.cloneDeep(Dt).slice(1,(Zn=D.cloneDeep(Dt))==null?void 0:Zn.length),pn=(Ta=D.cloneDeep(sa))==null?void 0:Ta.split("/"));let Qn="",ca=(ia=b==null?void 0:b.find(rn=>(rn==null?void 0:rn.name)===(pn==null?void 0:pn[0])))==null?void 0:ia.compData;ca==null||ca.forEach(rn=>{var Ba;(rn==null?void 0:rn.key)==="formContent"&&((Ba=rn==null?void 0:rn.contents)==null||Ba.forEach(Mn=>{(Mn==null?void 0:Mn.key)===(pn==null?void 0:pn[1])&&(Qn=Mn==null?void 0:Mn.value)}))}),((ga=Ve.contentTransArrayToAll(bt,"/"))==null?void 0:ga.length)-1!==Rt?_t=_t===""?_t+Qn.replaceAll("/",""):_t+"/"+Qn.replaceAll("/",""):_t=_t+l.value+Qn.replaceAll("/","")}}),(Ue=m.value)!=null&&Ue.includes(_t)?bt=m.value:bt=_t}let Wt=D.cloneDeep((Nt=Object.keys(U))==null?void 0:Nt[0]);if(((Ie=S==null?void 0:S.data)==null?void 0:Ie.statusCode)===200||((Xe=S==null?void 0:S.data)==null?void 0:Xe.code)===200){if(((Ze=(Fe=S==null?void 0:S.data)==null?void 0:Fe.data)!=null&&Ze[Wt]||(ge=(B=S==null?void 0:S.data)==null?void 0:B.result)!=null&&ge[Wt])&&(Mt==null?void 0:Mt.length)===1)return await re(((me=(We=S==null?void 0:S.data)==null?void 0:We.data)==null?void 0:me[Wt])||((st=(ut=S==null?void 0:S.data)==null?void 0:ut.result)==null?void 0:st[Wt]),D.cloneDeep(bt),Mt,N);if((pt=(xt=S==null?void 0:S.data)==null?void 0:xt.data)!=null&&pt[Wt]||(ft=(ct=S==null?void 0:S.data)==null?void 0:ct.result)!=null&&ft[Wt]){let _t=await Be(((Tt=(wt=S==null?void 0:S.data)==null?void 0:wt.data)==null?void 0:Tt[Wt])||((vt=(Ut=S==null?void 0:S.data)==null?void 0:Ut.result)==null?void 0:vt[Wt]),D.cloneDeep(bt),Mt);return _t&&(A=[...A,..._t]),_t}else{if(!((zt=S==null?void 0:S.data)!=null&&zt.data)){let _t=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,"","",qe);_t=_t==null?void 0:_t.map(Rt=>{var Ot;return(Rt==null?void 0:Rt.name)===(Mt==null?void 0:Mt[0])&&(Rt.compData=(Ot=Rt.compData)==null?void 0:Ot.map(Pt=>{var Xt;return(Pt==null?void 0:Pt.key)==="formContent"&&(Pt.contents=(Xt=Pt.contents)==null?void 0:Xt.map(ln=>{var Vn,Jn;return(ln==null?void 0:ln.key)===(Mt==null?void 0:Mt[1])&&(ln.value=(Jn=(Vn=S==null?void 0:S.data)==null?void 0:Vn.result)==null?void 0:Jn[Wt==null?void 0:Wt.replaceAll(":","")]),ln})),Pt})),Rt});let Dt=[];($t=_t==null?void 0:_t.filter(Rt=>(Rt==null?void 0:Rt.comp)==="Form"))==null||$t.forEach(async Rt=>{let Ot={};for(let Pt in Rt)Pt!=="id"&&(Ot[Pt]=Rt[Pt]);Dt.push({id:Rt==null?void 0:Rt.id,value:{pageData:Ot}})}),(Dt==null?void 0:Dt.length)>0&&await rt.batchUpdateInsofDataApi({dataList:Dt});return}if((Mt==null?void 0:Mt.length)===1){const _t=(Qt=(qt=(Kt=S==null?void 0:S.data)==null?void 0:Kt.data)==null?void 0:qt.path)==null?void 0:Qt.path;let Dt="";(Ln=(kn=(Fn=(Tn=(Lt=_t==null?void 0:_t.split("("))==null?void 0:Lt[1])==null?void 0:Tn.split(")"))==null?void 0:Fn[0])==null?void 0:kn.split(":"))==null||Ln.forEach(Pt=>{var Xt,ln;Dt=Dt===""?Dt+((Xt=Pt==null?void 0:Pt.replaceAll("'",""))==null?void 0:Xt.trim()):Dt+"/"+((ln=Pt==null?void 0:Pt.replaceAll("'",""))==null?void 0:ln.trim())});let Rt=[(Kn=(Un=(jn=($n=(xn=_t==null?void 0:_t.split("<"))==null?void 0:xn[1])==null?void 0:$n.split(">"))==null?void 0:jn[0])==null?void 0:Un.replaceAll("'",""))==null?void 0:Kn.trim()],Ot;return(mn=(Bn=(Wn=S==null?void 0:S.data)==null?void 0:Wn.data)==null?void 0:Bn.data)!=null&&mn[Mt==null?void 0:Mt[0]]?Ot=await re((yn=(wn=(dn=S==null?void 0:S.data)==null?void 0:dn.data)==null?void 0:wn.data)==null?void 0:yn[Mt==null?void 0:Mt[0]],Dt,Mt,N):Ot=await Oe((hn=(on=S==null?void 0:S.data)==null?void 0:on.data)==null?void 0:hn.data,Dt,Rt,qe),Ot}else{const _t=(Nn=(In=(Hn=S==null?void 0:S.data)==null?void 0:Hn.data)==null?void 0:In.path)==null?void 0:Nn.path;let Dt="";return(Gn=(An=(Xn=(qn=(Dn=_t==null?void 0:_t.split("("))==null?void 0:Dn[1])==null?void 0:qn.split(")"))==null?void 0:Xn[0])==null?void 0:An.split(":"))==null||Gn.forEach(Ot=>{var Pt,Xt;Dt=Dt===""?Dt+((Pt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Pt.trim()):Dt+"/"+((Xt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Xt.trim())}),await Be((Zt=(Et=(Yn=S==null?void 0:S.data)==null?void 0:Yn.data)==null?void 0:Et.data)==null?void 0:Zt[Mt==null?void 0:Mt[0]],Dt,Mt)}}}}});if(await Promise.all(oe),(A==null?void 0:A.length)>0){let U=[];A==null||A.forEach(ue=>{U!=null&&U.find(G=>{var Q,he,ye,_e;return((he=(Q=G==null?void 0:G.value)==null?void 0:Q.pageData)==null?void 0:he.name)===((_e=(ye=ue==null?void 0:ue.value)==null?void 0:ye.pageData)==null?void 0:_e.name)})||U.push(ue)});let q=[];U==null||U.forEach(ue=>{var he,ye,_e,xe;let G=D.cloneDeep(ue);G.value.pageData.compData=(he=G.value.pageData.compData)==null?void 0:he.map(K=>{var Re;return(K==null?void 0:K.key)==="formContent"&&(K.contents=(Re=K.contents)==null?void 0:Re.map(be=>{var ot,je,at,Ne;let Ke=(ot=D.cloneDeep(A))==null?void 0:ot.find(gt=>(gt==null?void 0:gt.keyType)===(be==null?void 0:be.key));if(Ke){let gt=(Ne=(at=(je=Ke.value.pageData.compData)==null?void 0:je.find(et=>(et==null?void 0:et.key)==="formContent"))==null?void 0:at.contents)==null?void 0:Ne.find(et=>(et==null?void 0:et.key)===(be==null?void 0:be.key));be.value=gt==null?void 0:gt.value}return be})),K}),q.push({id:G==null?void 0:G.id,value:G==null?void 0:G.value});let Q=[];(xe=(_e=(ye=G==null?void 0:G.value)==null?void 0:ye.pageData)==null?void 0:_e.compData)==null||xe.forEach(K=>{var Re;(K==null?void 0:K.key)==="formContent"&&((Re=K==null?void 0:K.contents)==null||Re.forEach(be=>{var Ke,ot,je,at,Ne,gt;if((ot=(Ke=be==null?void 0:be.optionUrl)==null?void 0:Ke.menuSelect)!=null&&ot.find(et=>et==null?void 0:et.includes("[")))if(Q!=null&&Q.find(et=>{var ze,it,mt;return((ze=et==null?void 0:et.key)==null?void 0:ze.join(","))===((mt=(it=be==null?void 0:be.optionUrl)==null?void 0:it.menuSelect)==null?void 0:mt.join(","))})){let et=(je=Q==null?void 0:Q.find(ze=>{var it,mt,Je;return((it=ze==null?void 0:ze.key)==null?void 0:it.join(","))===((Je=(mt=be==null?void 0:be.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:Je.join(","))}))==null?void 0:je.value;et.push({key:be==null?void 0:be.prop,groups:(at=be==null?void 0:be.optionUrl)==null?void 0:at.groupSelect,value:be==null?void 0:be.value}),Q=Q==null?void 0:Q.map(ze=>{var it,mt,Je;return((it=ze==null?void 0:ze.key)==null?void 0:it.join(","))===((Je=(mt=be==null?void 0:be.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:Je.join(","))&&(ze.value=et),ze})}else Q.push({key:(Ne=be==null?void 0:be.optionUrl)==null?void 0:Ne.menuSelect,value:[{key:be==null?void 0:be.prop,groups:(gt=be==null?void 0:be.optionUrl)==null?void 0:gt.groupSelect,value:be==null?void 0:be.value}]})}))}),(Q==null?void 0:Q.length)>0&&(Q=Q==null?void 0:Q.map(K=>{var be;let Re="";return(be=K==null?void 0:K.key)==null||be.forEach(Ke=>{var ot;if(!(Ke!=null&&Ke.includes("[")))Re=Re===""?Re+Ke:Re+"/"+Ke;else{let je="",at=(ot=Ke==null?void 0:Ke.replaceAll("[","").replaceAll("]",""))==null?void 0:ot.split(":");b==null||b.forEach(Ne=>{var gt;(Ne==null?void 0:Ne.name)===(at==null?void 0:at[0])&&((gt=Ne==null?void 0:Ne.compData)==null||gt.forEach(et=>{var ze;(et==null?void 0:et.key)==="formContent"&&((ze=et==null?void 0:et.contents)==null||ze.forEach(it=>{(it==null?void 0:it.prop)===(at==null?void 0:at[1])&&(je=it==null?void 0:it.value)}))}))}),Re=Re+l.value+je}}),K.key=Re,K})),Q==null||Q.forEach(K=>{var ot,je,at;let Re=(ot=qe[K.key])==null?void 0:ot.find(Ne=>{var gt,et,ze,it,mt,Je,Ue;return((et=(gt=Ne==null?void 0:Ne.value)==null?void 0:gt.pageData)==null?void 0:et.name)===((mt=(it=(ze=K==null?void 0:K.value)==null?void 0:ze[0])==null?void 0:it.groups)==null?void 0:mt[0])&&((Ue=(Je=Ne==null?void 0:Ne.value)==null?void 0:Je.pageData)==null?void 0:Ue.name)!==void 0}),be=Re==null?void 0:Re.id,Ke=(je=Re==null?void 0:Re.value)==null?void 0:je.pageData;Ke.compData=(at=Ke.compData)==null?void 0:at.map(Ne=>{var gt;return(Ne==null?void 0:Ne.key)==="formContent"&&(Ne.contents=(gt=Ne.contents)==null?void 0:gt.map(et=>{var it;let ze=(it=K.value)==null?void 0:it.find(mt=>(mt==null?void 0:mt.key)===(et==null?void 0:et.prop));return ze&&(et.value=ze.value),et})),Ne}),q.push({id:be,value:{pageData:Ke}})})});let Se=(Ce=D.cloneDeep(A))==null?void 0:Ce[0];(q==null?void 0:q.length)>0&&await rt.batchUpdateInsofDataApi({dataList:q})}y.setFreshContent(!0)}O.setImportLoading(!1)}catch{rt.ElMessage.error("方法执行错误,请查看方法!"),O.setImportLoading(!1)}g.value=!0},fe=["createInsofDataApi"],$e=ml(async X=>{le(X)},100),tt=async X=>{var ne,ke,T,Ge,Ye;const M=D.cloneDeep(X);let ie,J=new WeakMap,ve=await rt.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:L.value});(ke=(ne=ve.data.result)==null?void 0:ne.filter(Ae=>{var ce,ae;return((ce=Ae==null?void 0:Ae.key)==null?void 0:ce.pageKey)!=="menu"&&((ae=Ae==null?void 0:Ae.key)==null?void 0:ae.pageKey)!=="secret"}))==null||ke.forEach(Ae=>{J[Ae.key.pageKey]?J[Ae.key.pageKey]=[...J[Ae.key.pageKey],Ae]:J[Ae.key.pageKey]=[Ae]}),X!=null&&X[0].path&&(ie=await(M==null?void 0:M.map(async(Ae,ce)=>{var W,Z,S,se,Me,A,oe,U,q,Se,ue,G,Q,he,ye,_e;const pe=(W=J[Ae==null?void 0:Ae.path])==null?void 0:W.filter(xe=>{var K;return((K=xe==null?void 0:xe.key)==null?void 0:K.type)==="data"});let Ce="";const qe=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,J);pe==null||pe.forEach(xe=>{var K,Re,be,Ke,ot;((Re=(K=xe==null?void 0:xe.value)==null?void 0:K.tableData)==null?void 0:Re.算法名称)===((be=M==null?void 0:M[ce])==null?void 0:be.method)&&(Ce=(ot=(Ke=xe==null?void 0:xe.value)==null?void 0:Ke.tableData)==null?void 0:ot.算法体)});const dt=await Ve.getItemData(Ae==null?void 0:Ae.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,J);let b="",N=(Me=(se=(S=(Z=dt==null?void 0:dt[0])==null?void 0:Z.compData)==null?void 0:S.find(xe=>(xe==null?void 0:xe.key)==="header"))==null?void 0:se.contents)==null?void 0:Me.findIndex(xe=>(xe==null?void 0:xe.prop)==="算法体");return(oe=(A=dt==null?void 0:dt[0])==null?void 0:A.compData)==null||oe.forEach(xe=>{var K;(xe==null?void 0:xe.key)==="tableContents"&&((K=xe==null?void 0:xe.contents)==null||K.forEach(Re=>{Re!=null&&Re.find(be=>be===(Ae==null?void 0:Ae.method))&&(b=Re[N])}))}),{buttonName:((U=M==null?void 0:M[ce])==null?void 0:U.method)||((ue=(Se=(q=pe==null?void 0:pe[0])==null?void 0:q.value)==null?void 0:Se.tableData)==null?void 0:ue.算法名称),api:(Ce===""?(he=(Q=(G=pe==null?void 0:pe[0])==null?void 0:G.value)==null?void 0:Q.tableData)==null?void 0:he.算法体:Ce)||b,content:qe==null?void 0:qe.filter(xe=>xe.comp!=="methodButton"),extraContent:(ye=D.cloneDeep(Ae.value))==null?void 0:ye.slice(1),methodName:(Ae==null?void 0:Ae.path)??"",extraValues:(_e=M==null?void 0:M[ce])==null?void 0:_e.data}})));const we=M==null?void 0:M.map(async Ae=>{var dt,b,N,W,Z,S;const ce=(dt=ve.data.result)==null?void 0:dt.filter(se=>{var Me,A,oe;return((Me=se==null?void 0:se.key)==null?void 0:Me.parentTable)===""&&((A=se==null?void 0:se.key)==null?void 0:A.type)==="method"&&((oe=se==null?void 0:se.key)==null?void 0:oe.methodName)===se.method}),ae=ce==null?void 0:ce[0],pe=(b=ve.data.result)==null?void 0:b.filter(se=>{var Me,A;return((Me=se==null?void 0:se.key)==null?void 0:Me.type)==="methodData"&&((A=se==null?void 0:se.key)==null?void 0:A.tableId)===(ae==null?void 0:ae.id)}),Ce=await Ve.getItemData(m.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,J),qe=pe==null?void 0:pe[0];return{buttonName:(N=ae==null?void 0:ae.key)==null?void 0:N.methodKey,api:(Z=(W=qe==null?void 0:qe.value)==null?void 0:W.tableData)==null?void 0:Z[0],content:Ce==null?void 0:Ce.filter(se=>se.comp!=="methodButton"),extraContent:(S=D.cloneDeep(Ae.value))==null?void 0:S.slice(1),methodName:(Ae==null?void 0:Ae.method)??""}}),Ee=(T=X==null?void 0:X[0])!=null&&T.path&&((Ge=X==null?void 0:X[0])==null?void 0:Ge.path)!==""?await Promise.all(ie):await Promise.all(we);r.value=Ee==null?void 0:Ee.filter(Ae=>Ae==null?void 0:Ae.extraContent),(Ye=r.value)==null||Ye.forEach(Ae=>{var ce;Ae.api===""&&((ce=Ae.content)==null||ce.forEach(ae=>{var pe;ae.comp=="Table"&&y.setExtraContents(Ve.methodTableToContent(ae.compData,(pe=Ae.extraContent)==null?void 0:pe[0]))}))})};return e.watch(()=>u.itemData,async()=>{I.value=="view"&&!g.value&&await tt(D.cloneDeep(u.itemData)),g.value=!1},{immediate:!0,deep:!0}),(X,M)=>{var ie,J,ve;return e.unref(I)!=="edit"?(e.openBlock(),e.createElementBlock("div",Dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ie=r.value)==null?void 0:ie.filter(we=>(we==null?void 0:we.buttonName)!=="保存"),we=>{var Ee;return e.openBlock(),e.createElementBlock("div",null,[we.api!==""?(e.openBlock(),e.createBlock(e.unref(Io._sfc_main),{key:0,disabled:e.unref(F)===e.unref(m)&&!((Ee=we==null?void 0:we.buttonName)!=null&&Ee.includes("预览")),class:"calculator-content",modelValue:we.buttonName,onClickTrigger:ne=>e.unref($e)(we),loading:_.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ee)!==""&&((ve=e.unref(m))==null?void 0:ve[((J=e.unref(m))==null?void 0:J.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Io._sfc_main),{key:0,class:"calculator-content",onClickTrigger:te,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(It.ssFilePreview,{key:0,fileDataList:k.value,onDestroy:Te},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Ec=Ft._export_sfc(_c,[["__scopeId","data-v-11fca7e0"]]),Cc={};function Sc(a,r){return" 567 "}const Tc=Ft._export_sfc(Cc,[["render",Sc]]),Bc={class:"module content"},Ic={class:"module data"},Nc={class:"module layout"},Ac={class:"form-content"},Vc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),k=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=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}]),p=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:""}]),y=e.ref({}),_=e.ref([]),O=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:_.value},{key:"signConfig",contents:y.value}]}),P=$=>{var F;y.value=D.cloneDeep($),l("change",(F=O())==null?void 0:F.compData)},H=$=>{var F,L;if(($==null?void 0:$.buttonName)==="确认"){const m=D.cloneDeep($==null?void 0:$.content);switch(s.value){case"create":_.value.push({...m,index:((F=_.value)==null?void 0:F.length)+1});break}l("change",(L=O())==null?void 0:L.compData),u.visible=!1}else u.visible=!1},I=($,F)=>{var L,m;switch($){case"create":(L=p.value)==null||L.forEach(C=>{C.value=""}),s.value="create",u.visible=!0;break;case"update":(m=p.value)==null||m.forEach(C=>{C.value=F[C==null?void 0:C.prop]}),s.value="update",u.visible=!0;break;case"delete":_.value.splice(F,1),s.value="delete";break}},ee=()=>{u.visible=!1};return e.watch(()=>i==null?void 0:i.itemContents,$=>{var F,L;$&&(y.value=((F=$==null?void 0:$.find(m=>m.key==="signConfig"))==null?void 0:F.contents)??{},_.value=((L=$==null?void 0:$.find(m=>m.key==="signTypeList"))==null?void 0:L.contents)??[])},{immediate:!0}),($,F)=>{const L=e.resolveComponent("svg-icon"),m=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Bc,[F[2]||(F[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(m,{class:"module-icon",id:"themeButton",onClick:F[0]||(F[0]=C=>I("create"))},{icon:e.withCtx(()=>[e.createVNode(L,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[F[1]||(F[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ic,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(C,h)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:h},[e.createElementVNode("span",null,e.toDisplayString(C==null?void 0:C.label),1),e.createElementVNode("div",null,[e.createVNode(m,{type:"primary",size:"small",onClick:E=>I("update",{...C,index:h+1})},{default:e.withCtx(()=>F[3]||(F[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(m,{type:"danger",size:"small",onClick:E=>I("delete",h)},{default:e.withCtx(()=>F[4]||(F[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Nc,[e.createVNode(It.ssForm,{rowContents:v.value,onChange:P},null,8,["rowContents"])])]),e.createVNode(Jt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:ee,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ac,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:p.value,key:p.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:H},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Oc=Ft._export_sfc(Vc,[["__scopeId","data-v-487e0536"]]),Mc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:r}){const i=a,l=r,u=e.ref(1),s=e.computed(()=>{var O,P;return(O=i==null?void 0:i.stepConfig)!=null&&O.allowTrigger?u.value:(P=i==null?void 0:i.stepConfig)==null?void 0:P.active}),k=(O,P)=>{u.value=P,l("clickStep",O,P)},v=O=>It.getComponent(O),p=()=>{var P;const O=(P=i==null?void 0:i.stepList)==null?void 0:P.find((H,I)=>I+1===s.value);return console.log("findStep",O),O?O==null?void 0:O.children:[]},y=O=>{l("clickTrigger",O)},_=O=>{l("changeTrigger",O)};return(O,P)=>{var ee,$,F,L,m;const H=e.resolveComponent("el-step"),I=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(I,{direction:(ee=a.stepConfig)==null?void 0:ee.direction,active:s.value,"finish-status":"success",simple:($=a.stepConfig)==null?void 0:$.simple,"align-center":((F=a.stepConfig)==null?void 0:F.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(C,h)=>(e.openBlock(),e.createBlock(H,{key:h,class:"step-item",onClick:E=>k(C,h+1)},{title:e.withCtx(()=>[e.renderSlot(O.$slots,"title",{title:C==null?void 0:C.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(O.$slots,"description",{description:C==null?void 0:C.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(L=a.stepConfig)!=null&&L.allowTrigger&&((m=a.stepConfig)!=null&&m.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(p(),(C,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(C==null?void 0:C.type)),{modelValue:C.value,"onUpdate:modelValue":E=>C.value=E,onClickTrigger:y,onChangeTrigger:_,content:C==null?void 0:C.content},e.createSlots({_:2},[e.renderList(O.$slots,(E,g)=>({name:g,fn:e.withCtx(te=>[e.renderSlot(O.$slots,g,e.mergeProps({ref_for:!0},te||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),zc=Ft._export_sfc(Mc,[["__scopeId","data-v-d7c99969"]]),Rc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:r}){const i=a,l=r,u=e.ref({}),s=e.ref([]),k=(v,p)=>{l("clickStep",v,p)};return e.watch(()=>i==null?void 0:i.itemData,v=>{var p,y;s.value=(p=v==null?void 0:v.find(_=>(_==null?void 0:_.key)==="stepList"))==null?void 0:p.contents,u.value=(y=v==null?void 0:v.find(_=>(_==null?void 0:_.key)==="stepConfig"))==null?void 0:y.contents},{immediate:!0,deep:!0}),(v,p)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(zc,{stepConfig:u.value,stepList:s.value,onClickStep:k},{icon:e.withCtx(()=>[e.createVNode(y,{name:"import"})]),title:e.withCtx(({title:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),description:e.withCtx(({description:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["stepConfig","stepList"])}}}),Pc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(r,i)=>{const l=e.resolveComponent("el-timeline-item"),u=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.activities,(s,k)=>(e.openBlock(),e.createBlock(l,{key:k,timestamp:s.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Fc=Ft._export_sfc(Pc,[["__scopeId","data-v-4172a886"]]),Lc={class:"line-content"},$c={class:"line-time"},jc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const r=a,i=e.ref({}),l=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,u=>{var s,k;l.value=(s=u==null?void 0:u.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:s.contents,i.value=(k=u==null?void 0:u.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:k.contents},{immediate:!0}),(u,s)=>(e.openBlock(),e.createBlock(Fc,{activities:l.value,timeLineConfig:i.value},{content:e.withCtx(({content:k,timestamp:v})=>[e.createElementVNode("span",Lc,e.toDisplayString(k),1),e.createElementVNode("span",$c,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),Uc=Ft._export_sfc(jc,[["__scopeId","data-v-b4d9deed"]]),Kc={class:"tabs-content"},Wc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const r=a,i=e.ref([]);return e.watch(()=>r==null?void 0:r.itemData,l=>{const u=l.find(s=>(s==null?void 0:s.key)=="stepList");u?i.value=u.contents.map(s=>({value:s.value||s.title,label:s.label||s.title,children:s.children||[]})):i.value=r==null?void 0:r.tabsData},{immediate:!0,deep:!0}),(l,u)=>(e.openBlock(),e.createElementBlock("div",Kc,[e.createVNode(It.ssTab,{tabsContents:i.value},null,8,["tabsContents"])]))}},Hc=Ft._export_sfc(Wc,[["__scopeId","data-v-40865f68"]]),Ya=D.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),qc={class:"type-select"},Xc=["onClick"],Gc={class:"list-icon"},Yc={__name:"modelSelect",setup(a){const r=Ya(D.pinia),{itemData:i}=D.storeToRefs(r),l=u=>{const s=D.cloneDeep(i.value);s.push({comp:u.comp,name:u.name,compData:[]}),r.setItemData(s)};return(u,s)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",qc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(dr),(v,p)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:p},[e.createElementVNode("div",{class:"list-content",onClick:y=>l(v)},[e.createElementVNode("div",Gc,[e.createVNode(k,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,Xc)]))),128))])}}},Jc=Ft._export_sfc(Yc,[["__scopeId","data-v-91799bf8"]]),Zc={class:"fill-content"},Qc={class:"operate-content"},eu={class:"collapse-title-content"},tu={class:"collapse-title-item"},nu={key:1},au=["onClick"],ou={class:"icon-content"},lu={key:0,class:"edit-content"},ru=["onClick"],iu={class:"comp-child"},su={__name:"modelFill",setup(a){const r=Ya(D.pinia),{itemData:i,originalData:l}=D.storeToRefs(r),u=e.ref([]);e.ref([]);const s=e.ref([]),k=e.ref([]),v=H=>{var ee;let I=(ee=D.cloneDeep(k.value))==null?void 0:ee.map(($,F)=>(H===F&&($.content=!0),$));k.value=I},p=H=>{var ee;let I=(ee=D.cloneDeep(k.value))==null?void 0:ee.map(($,F)=>(H===F&&($.content=!1),$));k.value=I,u.value=D.cloneDeep(i.value)},y=(H,I)=>{var L;let ee=(L=D.cloneDeep(k.value))==null?void 0:L.map((m,C)=>(H===C&&(m.content=!1),m));k.value=ee;const $=D.cloneDeep(i.value),F=$==null?void 0:$.filter((m,C)=>(C===H&&(m.name=I),m));r.setOriginalData(F),r.setItemData(F)};e.watch(()=>i.value,()=>{var H,I,ee;!i.value||((H=i.value)==null?void 0:H.length)===0?u.value=[]:u.value=(I=D.cloneDeep(i.value))==null?void 0:I.filter($=>($==null?void 0:$.comp)!=="methodButton"),s.value=u.value,k.value=(ee=D.cloneDeep(s.value))==null?void 0:ee.map(($,F)=>({id:F,content:!1}))},{deep:!0,immediate:!0});const _=H=>ra(H),O=(H,I,ee)=>{var F,L;if(!H)return;let $=D.cloneDeep(i.value);$=(F=$==null?void 0:$.map((m,C)=>(C===ee&&(m.compData=H),m)))==null?void 0:F.filter(m=>(m==null?void 0:m.comp)!=="methodButton"),k.value=(L=D.cloneDeep($))==null?void 0:L.map((m,C)=>({id:C,content:!1})),r.setOriginalData($),r.setItemData($)},P=H=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const I=D.cloneDeep(i.value),ee=I==null?void 0:I.filter(($,F)=>F!==H);r.setOriginalData(ee),r.setItemData(ee),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(H,I)=>{const ee=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Zc,[I[1]||(I[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Qc,[e.createVNode(gl.default,{class:"collapse-content",collapseContents:u.value},{title:e.withCtx(({item:$,index:F})=>{var L,m,C,h,E,g,te,Te,Qe,de;return[e.createElementVNode("div",eu,[e.createElementVNode("div",tu,[(m=(L=k.value)==null?void 0:L.find(Be=>Be.id===F))!=null&&m.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:$.name&&$.name!==""?"8px":"0px"})},e.toDisplayString($.name),5)),(h=(C=k.value)==null?void 0:C.find(Be=>Be.id===F))!=null&&h.content?(e.openBlock(),e.createElementBlock("div",nu,[e.createVNode(It._sfc_main$2,{modelValue:$.name,"onUpdate:modelValue":Be=>$.name=Be,onClick:I[0]||(I[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(g=(E=k.value)==null?void 0:E.find(Be=>Be.id===F))!=null&&g.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Be=>v(F),["stop"]),class:"icon-content"},[e.createVNode(ee,{name:"Edit",style:{width:"16px",height:"16px"}})],8,au))]),e.createElementVNode("div",ou,[(Te=(te=k.value)==null?void 0:te.find(Be=>Be.id===F))!=null&&Te.content?(e.openBlock(),e.createElementBlock("div",lu,[e.createVNode(ee,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Be=>p(F),["stop"])},null,8,["onClick"]),e.createVNode(ee,{name:"Save",onClick:e.withModifiers(Be=>y(F,$.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(de=(Qe=k.value)==null?void 0:Qe.find(Be=>Be.id===F))!=null&&de.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Be=>P(F),["stop"]),class:"icon-content"},[e.createVNode(ee,{name:"Delete",style:{width:"16px",height:"16px"}})],8,ru))])])]}),content:e.withCtx(({item:$,index:F})=>{var L,m;return[e.createElementVNode("div",iu,[e.createTextVNode(e.toDisplayString(_($.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(_($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:(m=(L=s.value)==null?void 0:L.find((C,h)=>h===F))==null?void 0:m.compData,onChange:C=>O(C,$,F)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},cu=Ft._export_sfc(su,[["__scopeId","data-v-a46a44b9"]]),uu={key:0,class:"show-content"},du={style:{display:"flex"}},pu={__name:"modelShow",setup(a){const r=Ya(D.pinia),{itemData:i}=D.storeToRefs(r),l=e.ref([]);e.watch(()=>i.value,()=>{var s;!i.value||((s=i.value)==null?void 0:s.length)===0?l.value=[]:l.value=D.cloneDeep(i.value)},{deep:!0,immediate:!0});const u=s=>ra(s);return(s,k)=>{var v;return((v=l.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",uu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(p,y)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:y},[e.createElementVNode("div",du,e.toDisplayString(p.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(p.comp)),{itemData:p==null?void 0:p.compData,childItemData:p==null?void 0:p.itemChildData,key:y},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},fu=Ft._export_sfc(pu,[["__scopeId","data-v-3f3e863e"]]),hu={class:"tabs-header"},vu={class:"tabs-list"},gu={class:"tab-name"},mu={class:"tab-actions"},yu=["onClick"],bu=["onClick"],ku=["onClick"],xu={class:"model-operate"},wu={class:"model-select",style:{display:"unset"}},Du={class:"existing-components"},_u={class:"component-list"},Eu=["onClick"],Cu={class:"component-info"},Su={class:"component-type"},Tu={class:"component-name"},Bu={class:"model-fill"},Iu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.ref([]),s=e.ref(!1),k=e.ref(""),v=e.ref({title:""}),p=e.ref(-1),y=e.ref(!1),_=e.ref(-1),O=e.ref(new WeakMap),P=e.ref(null),H=Ya(D.pinia),{itemData:I}=D.storeToRefs(H),ee=()=>{k.value="新增标签页",v.value.title="",p.value=-1,s.value=!0},$=X=>{k.value="修改标签页",v.value.title=u.value[X].title,p.value=X,s.value=!0},F=X=>{const M=C(X);O.value.delete(M),u.value.splice(X,1),tt()},L=()=>{if(v.value.title.trim()){if(p.value===-1){const X={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:m()};u.value.push(X)}else u.value[p.value].title=v.value.title,u.value[p.value].value=v.value.title,u.value[p.value].label=v.value.title;s.value=!1,tt()}},m=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,C=X=>{const M=u.value[X];return M.id||(M.id=m()),M.id},h=X=>{var J;_.value=X;const M=C(X);P.value=D.cloneDeep(I.value);let ie=O.value.get(M);!ie&&((J=u.value[X].children)==null?void 0:J.length)>0&&(ie=Te(u.value[X].children)),ie?H.setItemData(D.cloneDeep(ie)):H.setItemData([]),y.value=!0},E=e.computed(()=>{const X=D.useModelComp(D.pinia),M=D.storeToRefs(X).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(ie=>{var J;if(ie.comp==="Tabs"&&_.value>=0){const ve=C(_.value);if((J=ie.compData)==null?void 0:J.some(Ee=>{var ne;return Ee.key==="stepList"&&((ne=Ee.contents)==null?void 0:ne.some(ke=>ke.id===ve))}))return!1}return!0})}),g=X=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[X]||X,te=X=>{var M;try{const ie=D.cloneDeep(X);ie.id=Date.now()+Math.random(),ie.comp==="Tabs"&&((M=ie.compData)==null||M.forEach(ve=>{ve.key==="stepList"&&ve.contents&&ve.contents.forEach(we=>{we.id=m()})}));const J=D.cloneDeep(I.value);J.push(ie),H.setItemData(J)}catch(ie){console.error("添加组件失败:",ie)}},Te=X=>X.map(M=>{var ie;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:Qe(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:de(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((ie=M.content)==null?void 0:ie.originalData)||[]}}}),Qe=X=>{if(!X)return[];const M=[];return X.rowContents&&M.push({key:"formContent",contents:X.rowContents}),X.buttonValue&&M.push({key:"formButton",contents:X.buttonValue}),typeof X.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:X.isEnableWrap}),M},de=X=>[],Be=()=>{if(_.value>=0&&_.value<u.value.length){const X=C(_.value);O.value.set(X,D.cloneDeep(I.value)),u.value[_.value].children=re(I.value),console.log("保存后的数据",re(I.value))}y.value=!1,_.value=-1,P.value=null,tt()},Oe=()=>{P.value&&H.setItemData(D.cloneDeep(P.value)),y.value=!1,_.value=-1,P.value=null},z=()=>{y.value&&Oe()},re=X=>{if(!Array.isArray(X))throw new Error("sourceData must be an array");return X.map((M,ie)=>{if(!M||typeof M!="object")return M;const{comp:J,name:ve,compData:we}=M;switch(J){case"Form":return{type:"form",content:le(we||[]),value:"表单"};case"Table":return{type:"table",content:fe(we||[]),value:"表格"};default:return{type:"xxx",content:$e(we||[]),value:""}}})},le=X=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ie={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return X.forEach((J,ve)=>{if(!J||typeof J!="object"){console.warn(`Invalid config at index ${ve}:`,J);return}const{key:we,contents:Ee}=J,ne=ie[we];if(!ne){console.warn(`Unknown Form config key: ${we}`);return}we==="enableWrap"?M[ne]=!!Ee:M[ne]=Array.isArray(Ee)?Ee:[]}),M},fe=X=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ie={header:"columns",tableContents:"tableData"};return X.forEach((J,ve)=>{if(!J||typeof J!="object"){console.warn(`Invalid config at index ${ve}:`,J);return}const{key:we,contents:Ee}=J,ne=ie[we];if(!ne){console.warn(`Unknown Table config key: ${we}`);return}M[ne]=Array.isArray(Ee)?Ee:[]}),M},$e=X=>(console.log("Default conversion logic - to be implemented"),{originalData:X,processed:!1,componentType:"unknown"}),tt=()=>{const X=[{key:"stepList",contents:u.value}];l("change",X)};return e.watch(()=>i.itemContents,X=>{if(X&&X.length>0){const M=X.find(ie=>ie.key==="stepList");M&&M.contents&&(u.value=M.contents.map(ie=>({title:ie.title||"",value:ie.value||ie.title||"",label:ie.label||ie.title||"",children:ie.children||[],id:ie.id||m()})))}},{immediate:!0,deep:!0}),(X,M)=>{const ie=e.resolveComponent("svg-icon"),J=e.resolveComponent("el-input"),ve=e.resolveComponent("el-form-item"),we=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",hu,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ee},[e.createVNode(ie,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(Ee,ne)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ne},[e.createElementVNode("span",gu,e.toDisplayString(Ee.title),1),e.createElementVNode("div",mu,[e.createElementVNode("button",{onClick:ke=>$(ne)},"修改标题",8,yu),e.createElementVNode("button",{onClick:ke=>h(ne)},"布局调整",8,bu),e.createElementVNode("button",{onClick:ke=>F(ne)},"删除",8,ku)])]))),128))]),e.createVNode(Jt.ssDialog,{modelValue:s.value,"onUpdate:modelValue":M[2]||(M[2]=Ee=>s.value=Ee),title:k.value,onBeforeDestroy:M[3]||(M[3]=Ee=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=Ee=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:L},"确定")]),default:e.withCtx(()=>[e.createVNode(we,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(ve,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:v.value.title,"onUpdate:modelValue":M[0]||(M[0]=Ee=>v.value.title=Ee),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Jt.ssDialog,{modelValue:y.value,"onUpdate:modelValue":M[4]||(M[4]=Ee=>y.value=Ee),title:"布局调整",fullScreen:"",onBeforeDestroy:z},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Oe},"取消"),e.createElementVNode("button",{onClick:Be},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",xu,[e.createElementVNode("div",wu,[e.createVNode(Jc),e.createElementVNode("div",Du,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",_u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,Ee=>(e.openBlock(),e.createElementBlock("div",{key:Ee.id,class:"component-item",onClick:ne=>te(Ee)},[e.createElementVNode("div",Cu,[e.createElementVNode("span",Su,e.toDisplayString(g(Ee.comp)),1),e.createElementVNode("span",Tu,e.toDisplayString(Ee.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Eu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:X.innerWidth},[e.createVNode(fu)])),e.createElementVNode("div",Bu,[e.createVNode(cu)])])]),_:1},8,["modelValue"])])}}},Nu=Ft._export_sfc(Iu,[["__scopeId","data-v-9096ed0d"]]);function Au(){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 Vu(a){return{type:"line",...a}}function Ou(){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 Mu(a){return{type:"bar",barWidth:"60%",...a}}function zu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Ru(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Sn={line:{initBaseoptions:Au,initSeries:Vu},bar:{initBaseoptions:Ou,initSeries:Mu},pie:{initBaseoptions:zu,initSeries:Ru}},zo=D.useMenuState(D.pinia),Cl=(a,r)=>{var _;const i=[],l=[],{group:u,nameCol:s,valueCol:k}=r||{},v=a==null?void 0:a.find(O=>{const{name:P}=O;return P===u});if(!v)return{names:i,values:l};const p=(_=v==null?void 0:v.compData)==null?void 0:_.find(O=>{const{key:P}=O;return P==="tableContents"});return((p==null?void 0:p.contents)||[]).forEach(O=>{const P=O==null?void 0:O[0];let H=!1;rt.isObject(P)&&(P!=null&&P.id)&&(H=!0);let I=s,ee=k;H&&(I=I+1,ee=ee+1);const $=O==null?void 0:O[I],F=O==null?void 0:O[ee];i.push($),l.push(F)}),{names:i,values:l}},Pu=async a=>{const{menu:r,mainKey:i,detailGroup:l,detailNameCol:u,detailValueCol:s,isSelfDetail:k}=a||{};let v=null;const p=sessionStorage.getItem("systemKey");if(k&&zo.activeMenuPath&&(v=await Ve.getItemData(`${zo.activeMenuPath}`,p,"")),!k){const y=r==null?void 0:r.join("/");v=await Ve.getItemData(`${y}^${i}`,p,"")}return Cl(v,{group:l,nameCol:u,valueCol:s})},Fu=async a=>{const{menu:r,group:i,nameCol:l,valueCol:u}=a||{},s=r==null?void 0:r.join("/"),k=sessionStorage.getItem("systemKey"),v=await Ve.getItemData(s,k,"");return Cl(v,{group:i,nameCol:l,valueCol:u})},yo=async(a,r)=>{const i={names:[],values:[]},{menu:l,group:u,nameCol:s,valueCol:k}=a||{};if(!l.length||!u)return i;const{mainKey:v,group:p,nameCol:y,valueCol:_,isSelfDetail:O}=r||{};return v&&p&&It.isNumber(y)&&It.isNumber(_)?await Pu({menu:l,mainKey:v,detailGroup:p,detailNameCol:y,detailValueCol:_,isSelfDetail:O}):It.isNumber(s)&&It.isNumber(k)?await Fu({menu:l,group:u,nameCol:s,valueCol:k}):i},Lu=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=a||{},s=Sn==null?void 0:Sn[l];if(!s)return;const{initBaseoptions:k,initSeries:v}=s,p=k();p.title.text=u??"";const{names:y,values:_}=await yo(r,i);if(!y||!_)return p;p.xAxis.data=y;const O=v({data:_});return p.series.push(O),p},$u=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=a||{},s=Sn==null?void 0:Sn[l];if(!s)return;const{initBaseoptions:k,initSeries:v}=s,p=k();p.title.text=u??"";const{names:y,values:_}=await yo(r,i);if(!y||!_)return p;p.xAxis.data=y;const O=v({data:_});return p.series.push(O),p},ju=async({chartBaseConfig:a,chartDataConfig:r,chartDetailConfig:i})=>{const{type:l,title:u}=a||{},s=Sn==null?void 0:Sn[l];if(!s)return;const{initBaseoptions:k,initSeries:v}=s,p=k();p.title.text=u??"";const{names:y,values:_}=await yo(r,i);if(!y||!_)return p;const O=[];for(let H=0;H<y.length;H++){const I=y[H],ee=_[H];O.push({name:I,value:ee})}const P=v({data:O});return p.series.push(P),p},Uu=async(a=[])=>{var k,v,p;const r=((k=a==null?void 0:a.find(y=>y.key==="chartBaseConfig"))==null?void 0:k.contents)??{},i=((v=a==null?void 0:a.find(y=>y.key==="chartDataConfig"))==null?void 0:v.contents)??{},l=((p=a==null?void 0:a.find(y=>y.key==="chartDetailConfig"))==null?void 0:p.contents)??{},{type:u}=r;let s={};return u==="line"&&(s=await Lu({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="bar"&&(s=await $u({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),u==="pie"&&(s=await ju({chartBaseConfig:r,chartDataConfig:i,chartDetailConfig:l})),s},Ku=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const r=a,i=e.ref({});e.onMounted(async()=>{const u=r==null?void 0:r.itemData;i.value=await Uu(u)});const l=e.computed(()=>(r==null?void 0:r.height)||"300px");return(u,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Kr.ssChart,{optionContents:i.value},null,8,["optionContents"])],4))}}),Wu=Ft._export_sfc(Ku,[["__scopeId","data-v-d4c081e8"]]),Hu={class:"chart-module layout"},qu={class:"chart-module content"},Xu={class:"chart-module content"},Gu={class:"form-content"},Yu={class:"dialog-footer"},Ju={class:"form-content"},Zu={class:"dialog-footer"},Qu={class:"form-content"},ed={class:"dialog-footer"},td=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r,u=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),k=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],v=e.ref({}),p=()=>{var ce;s.value=k(),(ce=s.value)==null||ce.forEach(ae=>{var Ce;const pe=ae==null?void 0:ae.prop;ae.value=(Ce=v==null?void 0:v.value)==null?void 0:Ce[pe]}),u.visible=!0},y=ce=>{v.value=ce},_=()=>{var ce;u.visible=!1,l("change",(ce=Ye())==null?void 0:ce.compData)},O=e.reactive({visible:!1,width:"840",title:"数据配置"}),P=e.ref([]),H=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],I=e.ref({}),ee=()=>{const ce=P.value,ae=D.cloneDeep(ce);return ae==null||ae.forEach(pe=>{var qe;const Ce=pe==null?void 0:pe.prop;pe.value=(qe=I.value)==null?void 0:qe[Ce]}),ae},$=ce=>{var pe;I.value=ce;const ae=ee();P.value=ae,l("change",(pe=Ye())==null?void 0:pe.compData)},F=async()=>{const ce=await Ve.getMenusContent(),ae=ee();ae==null||ae.forEach(pe=>{(pe==null?void 0:pe.prop)==="menu"&&(pe.contents=ce)}),P.value=ae,O.visible=!0,await Ee(I.value.menu),await T(I.value.group)},L=e.reactive({visible:!1,width:"840",title:"详情页配置"}),m=e.ref([]),C=()=>[{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:[]}],h=e.ref({}),E=()=>{const ce=m.value,ae=D.cloneDeep(ce);return ae==null||ae.forEach(pe=>{var qe;const Ce=pe==null?void 0:pe.prop;pe.value=(qe=h.value)==null?void 0:qe[Ce]}),ae},g=ce=>{var pe;h.value=ce;const ae=E();m.value=ae,l("change",(pe=Ye())==null?void 0:pe.compData)},te=async()=>{await z();const ce=D.cloneDeep(Te.value),ae=E();ae==null||ae.forEach(pe=>{var qe;const Ce=pe==null?void 0:pe.prop;pe.value=(qe=h==null?void 0:h.value)==null?void 0:qe[Ce],Ce==="mainKey"&&(pe.contents=ce)}),m.value=ae,L.visible=!0},Te=e.ref([]),Qe=e.ref([]),de=e.ref({}),Be=e.ref({}),Oe=()=>{const{compData:ce}=J.value||{},ae=ce==null?void 0:ce.find(W=>{const{key:Z}=W;return Z==="header"}),pe=(ae==null?void 0:ae.contents)||[],Ce=pe==null?void 0:pe.filter((W,Z)=>{const{label:S}=W;return S!=="操作"}),qe=Ce==null?void 0:Ce.findIndex((W,Z)=>{const{isMainKey:S}=W;return S});if(qe<0)return[];const dt=ce==null?void 0:ce.find(W=>{const{key:Z}=W;return Z==="tableContents"}),b=(dt==null?void 0:dt.contents)||[];return b==null?void 0:b.map(W=>{const Z=W==null?void 0:W[0];let S=qe;rt.isObject(Z)&&(Z!=null&&Z.id)&&(S=S+1);const se=W==null?void 0:W[S];return{label:se,value:se}})},z=async()=>{const ce=await Oe();Te.value=ce},re=async ce=>{const ae=sessionStorage.getItem("systemKey");return await Ve.getItemData(ce,ae,"")},le=async ce=>{const ae=ce;Qe.value=ae==null?void 0:ae.map(pe=>{const{name:Ce}=pe;return de.value[Ce]=pe,{label:Ce,value:Ce}})},fe=ce=>{const{comp:ae,compData:pe}=Be.value||{};if(ae==="Table"){let Ce=E();Ce=Ce.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),ne(Ce,pe),m.value=Ce}},$e=async()=>{var pe,Ce;const ce=(pe=h==null?void 0:h.value)==null?void 0:pe.mainKey,ae=(Ce=I==null?void 0:I.value)==null?void 0:Ce.menu;if(ce){const dt=`${ae==null?void 0:ae.join("/")}^${ce}`,b=await re(dt);await le(b);const N=E();N==null||N.forEach(W=>{(W==null?void 0:W.prop)==="group"&&(W.contents=Qe.value)}),m.value=N}};e.watch(()=>{var ce;return(ce=h==null?void 0:h.value)==null?void 0:ce.mainKey},async(ce,ae)=>{ce!=ae&&ce&&await $e()});const tt=async ce=>{const ae=de.value[ce];Be.value=ae,await fe()};e.watch(()=>{var ce;return(ce=h==null?void 0:h.value)==null?void 0:ce.group},async(ce,ae)=>{ce!=ae&&ce&&tt(ce)});const X=async()=>{var ae;await $e();const ce=(ae=h.value)==null?void 0:ae.group;await tt(ce)},M=e.ref([]),ie=e.ref({}),J=e.ref({}),ve=async ce=>{const ae=ce==null?void 0:ce.join("/"),pe=sessionStorage.getItem("systemKey");return await Ve.getItemData(ae,pe,"")},we=async ce=>{const ae=await ve(ce);M.value=ae==null?void 0:ae.map(pe=>{const{name:Ce}=pe;return ie.value[Ce]=pe,{label:Ce,value:Ce}})},Ee=async(ce,ae)=>{await we(ce);const pe=ee();pe==null||pe.forEach(Ce=>{(Ce==null?void 0:Ce.prop)==="group"&&(Ce.contents=M.value)}),P.value=pe};e.watch(()=>{var ce;return(ce=I==null?void 0:I.value)==null?void 0:ce.menu},async(ce,ae)=>{const pe=ce==null?void 0:ce.join("/"),Ce=ae==null?void 0:ae.join("/");pe!=Ce&&await Ee(ce)});const ne=(ce,ae)=>{const pe=ae==null?void 0:ae.find(b=>{const{key:N}=b;return N==="header"}),Ce=(pe==null?void 0:pe.contents)||[],qe=Ce==null?void 0:Ce.filter((b,N)=>{const{label:W}=b;return W!=="操作"}),dt=qe==null?void 0:qe.map((b,N)=>{const{label:W}=b;return{label:W,value:N}});ce==null||ce.forEach(b=>{const N=b==null?void 0:b.prop;(N==="nameCol"||N==="valueCol")&&(b.contents=dt)})},ke=ce=>{const{comp:ae,compData:pe}=J.value||{};if(ae==="Table"){I.value.formItems=[];let Ce=ee();Ce=Ce.filter(qe=>{const{prop:dt}=qe;return dt!=="formItems"}),ne(Ce,pe),P.value=Ce}},T=async ce=>{const ae=ie.value[ce];J.value=ae,await ke()};e.watch(()=>{var ce;return(ce=I==null?void 0:I.value)==null?void 0:ce.group},async(ce,ae)=>{ce!=ae&&T(ce)});const Ge=async()=>{var pe,Ce;const ce=(pe=I.value)==null?void 0:pe.menu;await Ee(ce);const ae=(Ce=I.value)==null?void 0:Ce.group;await T(ae)},Ye=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:I.value},{key:"chartDetailConfig",contents:h.value}]}),Ae=()=>{u.visible=!1,O.visible=!1,L.visible=!1};return e.onMounted(async()=>{var ae,pe,Ce;P.value=H(),m.value=C();const ce=i==null?void 0:i.itemContents;v.value=((ae=ce==null?void 0:ce.find(qe=>qe.key==="chartBaseConfig"))==null?void 0:ae.contents)??{},I.value=((pe=ce==null?void 0:ce.find(qe=>qe.key==="chartDataConfig"))==null?void 0:pe.contents)??{},await Ge(),h.value=((Ce=ce==null?void 0:ce.find(qe=>qe.key==="chartDetailConfig"))==null?void 0:Ce.contents)??{},await X()}),(ce,ae)=>{const pe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Hu,[ae[4]||(ae[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:ae[0]||(ae[0]=Ce=>p())},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",qu,[ae[6]||(ae[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:ae[1]||(ae[1]=Ce=>F())},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Xu,[ae[8]||(ae[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:ae[2]||(ae[2]=Ce=>te())},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Jt.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:Ae,width:u.width},{default:e.withCtx(()=>[e.createElementVNode("div",Gu,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yu,[e.createVNode(pe,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>ae[9]||(ae[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(pe,{class:"ok-button button",onClick:_,id:"themeButton"},{default:e.withCtx(()=>ae[10]||(ae[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:O.visible,title:O.title,onBeforeDestroy:Ae,width:O.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ju,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:P.value,key:P.value,isEnableWrap:!0,onChange:$},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(pe,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>ae[11]||(ae[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(pe,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>ae[12]||(ae[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Jt.ssDialog,{visible:L.visible,title:L.title,onBeforeDestroy:Ae,width:L.width},{default:e.withCtx(()=>[e.createElementVNode("div",Qu,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ed,[e.createVNode(pe,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>ae[13]||(ae[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(pe,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>ae[14]||(ae[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),nd=Ft._export_sfc(td,[["__scopeId","data-v-fe119645"]]),ad=(a,r)=>{let i;a.replaceAll(" ",`\r
|
|
2
|
+
`).replaceAll(`
|
|
3
|
+
`,`\r
|
|
4
|
+
`).includes(`\r
|
|
5
|
+
`)?i=a.replaceAll(`
|
|
6
|
+
`,`\r
|
|
7
|
+
`).replaceAll(" ",`\r
|
|
8
|
+
`).split(`\r
|
|
9
|
+
`).filter(s=>s.trim()!==""):i=a.replaceAll(" ",`\r
|
|
10
|
+
`).split(`
|
|
11
|
+
`).filter(s=>s.trim()!==""),i=i==null?void 0:i.map(s=>(s=s==null?void 0:s.replaceAll("\r",""),s));const l=[];let u="";for(const s of i)s.includes("{")||u.includes("{")||s.includes("[")||u.includes("[")||s.includes("【")||u.includes("【")||s.includes("(")||u.includes("(")||s.includes("(")||u.includes("(")||s.includes("/*")||u.includes("/*")?(u+=s.trim(),u.split("{").length-1===u.split("}").length-1&&u.split("【").length-1===u.split("】").length-1&&u.split("[").length-1===u.split("]").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("/*").length-1===u.split("*/").length-1&&!(r!=null&&r.find(k=>k===u[u.length-1]))?(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""):u!=null&&u.includes("*/")&&(u=u.replace(/\/\*[\s\S]*?\*\//g,""))):r!=null&&r.find(k=>k===s[s.length-1])?u+=s.trim():l.push(s.trim().replace(/\/\*[\s\S]*?\*\//g,""));return l},Ht=(a,r)=>{let i=a;const l=[];let u="",s=0;for(const k of i)s++,k.includes("{")||u.includes("{")||k.includes("[")||u.includes("[")||k.includes("【")||u.includes("【")||k.includes("(")||u.includes("(")||k.includes("(")||u.includes("(")||k.includes("/*")||u.includes("/*")?(u+=k.trim(),u.split("{").length-1===u.split("}").length-1&&u.split("【").length-1===u.split("】").length-1&&u.split("[").length-1===u.split("]").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("(").length-1===u.split(")").length-1&&u.split("/*").length-1===u.split("*/").length-1&&u[u.length-1]===r?(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""):s===(a==null?void 0:a.length)&&(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u="")):(u+=k.trim(),(u==null?void 0:u[(u==null?void 0:u.length)-1])===r&&(l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),u=""));return(u==null?void 0:u.length)!==0&&l.push(u.replace(/\/\*[\s\S]*?\*\//g,"")),l},od=(a,r)=>a===r||a.length===r.length&&a.every((i,l)=>i===r[l]),ld=a=>a.reduce((r,i)=>{var u;const l=(((u=r.at(-1))==null?void 0:u.total)??0)+i;return r.push({key:i,total:l}),r},[]),rd=a=>{for(let r=a.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a},id=a=>{let r=a;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1))};let Bt="$R",sd="[Any]";const cd=a=>{var k,v;let r={},i=a==null?void 0:a[0],l=(v=(k=i==null?void 0:i.replace("{",Bt))==null?void 0:k.split(Bt))==null?void 0:v[0];(l==null?void 0:l[0])==="*"&&(l=l==null?void 0:l.slice(1,l==null?void 0:l.length)),l=l==null?void 0:l.split(":"),r.group=l;let u=a==null?void 0:a[1],s=u==null?void 0:u.replaceAll(sd,"");return(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),r.filter=s,r},ud=a=>{var y,_,O,P,H,I,ee,$,F;let r=[],i=[],l=a==null?void 0:a.map(L=>{var C;let m=(C=Ht(L,"@"))==null?void 0:C[0];return(m==null?void 0:m[(m==null?void 0:m.length)-1])==="@"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),m}),u=Ht(l==null?void 0:l[0],":");i=(y=u==null?void 0:u.filter(L=>!(L!=null&&L.includes("{"))&&!(L!=null&&L.includes("["))))==null?void 0:y.join(""),(i==null?void 0:i[(i==null?void 0:i.length)-1])===":"&&(i=i==null?void 0:i.slice(0,(i==null?void 0:i.length)-1)),(i==null?void 0:i[0])==="*"&&(i=i==null?void 0:i.slice(1,i==null?void 0:i.length)),i=i==null?void 0:i.split(":");let s=u==null?void 0:u.filter(L=>(L==null?void 0:L.includes("{"))||(L==null?void 0:L.includes("["))),k=(O=s==null?void 0:s[0])==null?void 0:O.slice(1,((_=s==null?void 0:s[0])==null?void 0:_.length)-1);k=(P=Ht(k,","))==null?void 0:P.map(L=>((L==null?void 0:L[(L==null?void 0:L.length)-1])===","&&(L=L==null?void 0:L.slice(0,(L==null?void 0:L.length)-1)),L));let v="@"+((ee=(I=(H=a==null?void 0:a[0])==null?void 0:H.replace("@",Bt))==null?void 0:I.split(Bt))==null?void 0:ee[1]);(($=Ht(v,":"))==null?void 0:$.length)>1&&(r=Ja((F=Ht(v,":"))==null?void 0:F[1]),r=[r]);let p=k==null?void 0:k.map((L,m)=>{var Te,Qe,de,Be,Oe,z,re,le,fe,$e,tt,X;let C=(Te=L==null?void 0:L.split("=="))==null?void 0:Te[0],h=(Qe=L==null?void 0:L.split("=="))==null?void 0:Qe[1],E=[],g=[],te=[];return(h==null?void 0:h[0])==="$"&&(h=h==null?void 0:h.slice(1,h==null?void 0:h.length),E=(Be=(de=h==null?void 0:h.split("*"))==null?void 0:de[0])==null?void 0:Be.split(":"),g=($e=(fe=(le=(re=(z=(Oe=h==null?void 0:h.split("*"))==null?void 0:Oe[1])==null?void 0:z.replace("{",Bt))==null?void 0:re.split(Bt))==null?void 0:le[0])==null?void 0:fe.split(":"))==null?void 0:$e.filter(M=>M!==""),te=(X=(tt=h==null?void 0:h.replace("{",Bt))==null?void 0:tt.split(Bt))==null?void 0:X[1],te=te==null?void 0:te.replaceAll("}",""),te=te==null?void 0:te.split(":")),{prop:C,label:C,value:"",menuPath:E,groups:g,columns:te,width:k==null?void 0:k.length}});return{groupName:i,formContents:p,contents:r}},Ja=a=>{var l,u;let r=[],i=a.slice(1,(a==null?void 0:a.length)-1);if((i==null?void 0:i[0])!=="[")(l=Ht(i,","))==null||l.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),r.push(s??"")});else{let s=[];(u=Ht(i,","))==null||u.forEach(k=>{(k==null?void 0:k[(k==null?void 0:k.length)-1])===","&&(k=k==null?void 0:k.slice(0,(k==null?void 0:k.length)-1)),s.push(Ja(k))}),r=s}return r},Sl=(a,r)=>{var _,O,P,H,I,ee,$,F,L,m,C,h,E,g,te,Te,Qe,de,Be,Oe,z,re,le,fe,$e,tt,X;let i,l=[],u=[],s=[],k=[],v=[],p=[],y="Input";if(a!=null&&a.includes("(@")||a!=null&&a.includes("==")||a!=null&&a.includes("="))if(a!=null&&a.includes("(@")&&!(a!=null&&a.includes("=")))i=(O=(_=a==null?void 0:a.replace("(@",Bt))==null?void 0:_.split(Bt))==null?void 0:O[0];else{if(i=(P=a==null?void 0:a.split("=="))==null?void 0:P[0],a!=null&&a.includes("=")&&!(a!=null&&a.includes("==")))i=(H=a==null?void 0:a.split("="))==null?void 0:H[0],l=($=(ee=(I=a==null?void 0:a.split("="))==null?void 0:I[1])==null?void 0:ee.split("/"))==null?void 0:$.map(M=>({label:M,value:M}));else if((L=(F=a==null?void 0:a.split("=="))==null?void 0:F[1])!=null&&L.includes("||")){let M=[];(h=(C=(m=a==null?void 0:a.split("=="))==null?void 0:m[1])==null?void 0:C.split("||"))==null||h.forEach(ie=>{var J,ve,we;u.push((ve=(J=ie==null?void 0:ie.split("@Filter"))==null?void 0:J[0])==null?void 0:ve.split("/")),M.push((we=ie==null?void 0:ie.split("@Filter"))==null?void 0:we[1])}),s=M==null?void 0:M.map(ie=>(ie=ie==null?void 0:ie.slice(1,(ie==null?void 0:ie.length)-1),ie))}else{let M=(g=a==null?void 0:a.split("=="))==null?void 0:g[((E=a==null?void 0:a.split("=="))==null?void 0:E.length)-1];if(!(M!=null&&M.includes("&"))){let ie=(te=M==null?void 0:M.replace("*",Bt))==null?void 0:te.split(Bt),J=(ie==null?void 0:ie[0])===""?r==null?void 0:r.value:ie==null?void 0:ie[0];J=J==null?void 0:J.replaceAll("[Any]",""),(J==null?void 0:J[0])==="$"&&(J=(Te=J==null?void 0:J.slice(1,J==null?void 0:J.length))==null?void 0:Te.replaceAll(":","/")),k=J==null?void 0:J.split("/");let ve=(de=(Qe=ie==null?void 0:ie[1])==null?void 0:Qe.replace("[",Bt))==null?void 0:de.split(Bt),we=ve==null?void 0:ve[0];(we==null?void 0:we[(we==null?void 0:we.length)-1])===":"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),v=we==null?void 0:we.split(":"),p=(re=(z=(Oe=(Be=ve==null?void 0:ve[1])==null?void 0:Be.replace("]",Bt))==null?void 0:Oe.split(Bt))==null?void 0:z[0])==null?void 0:re.split(":");let Ee=($e=(fe=(le=ve==null?void 0:ve[1])==null?void 0:le.replace("]",Bt))==null?void 0:fe.split(Bt))==null?void 0:$e[1];Ee!==""&&id(Ee)}}y="Select"}else i=a;return i!=null&&i.includes("(@")&&(i=(X=(tt=a==null?void 0:a.replace("(@",Bt))==null?void 0:tt.split(Bt))==null?void 0:X[0]),{label:i,prop:i,options:l,allContents:u,filterContents:s,menus:k,groups:v,words:p,align:"center",formType:y}},Tl=(a,r)=>{var l,u,s,k,v,p,y,_,O,P,H,I,ee,$,F,L,m;let i=[];if((a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&!((k=(s=(u=(l=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1))==null?void 0:l.replace(":",Bt))==null?void 0:u.split(Bt))==null?void 0:s[0])!=null&&k.includes(","))){let C=a==null?void 0:a.slice(1,(a==null?void 0:a.length)-1),h=(v=C==null?void 0:C.replace(":",Bt))==null?void 0:v.split(Bt);if(((p=Ht(h==null?void 0:h[1],"="))==null?void 0:p.length)===1){let E=h==null?void 0:h[0];i==null||i.push({label:E,prop:E,children:Tl((_=h==null?void 0:h[1])==null?void 0:_.slice(1,((y=h==null?void 0:h[1])==null?void 0:y.length)-1),r),align:"center"})}else(F=($=(ee=(I=(H=(P=(O=C==null?void 0:C.replace("{",Bt))==null?void 0:O.split(Bt))==null?void 0:P[1])==null?void 0:H.replace("}",Bt))==null?void 0:I.split(Bt))==null?void 0:ee[0])==null?void 0:$.split(","))==null||F.forEach(E=>{i==null||i.push({label:E,prop:E,align:"center"})})}else if((a==null?void 0:a[0])==="{")(L=Ht(a,","))==null||L.forEach(C=>{var h,E,g;if((C==null?void 0:C[(C==null?void 0:C.length)-1])===","&&(C=C==null?void 0:C.slice(0,(C==null?void 0:C.length)-1)),(C==null?void 0:C[0])==="{"){let te=Ht(C,"="),Te=(E=te==null?void 0:te[0])==null?void 0:E.slice(1,((h=te==null?void 0:te[0])==null?void 0:h.length)-2);(g=Te==null?void 0:Te.split(","))==null||g.forEach(Qe=>{i.push({label:Qe,prop:Qe,align:"center"})})}else i.push({label:C,prop:C,align:"center"})});else{let C=(m=Ht(a,","))==null?void 0:m.map(h=>((h==null?void 0:h[(h==null?void 0:h.length)-1])===","&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),h));C==null||C.forEach(h=>{i.push(Sl(h,r))})}return i},dd=(a,r)=>{var u;let i=a;if(!a)return;(a==null?void 0:a[0])==="{"&&(a==null?void 0:a[(a==null?void 0:a.length)-1])==="}"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1));let l=[];return i=(u=Ht(i,","))==null?void 0:u.forEach(s=>{var k;(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),(s==null?void 0:s[0])==="{"?(k=Tl(s,r))==null||k.forEach(v=>{l.push(v)}):l.push(Sl(s,r))}),l},Ro=a=>{var r,i,l;if(a!=null&&a.includes("@Filter"))return a;{let u=(i=(r=a==null?void 0:a.replace("(",Bt))==null?void 0:r.split(Bt))==null?void 0:i[1];return u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1),u=(l=Ht(u,","))==null?void 0:l.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),"@"+s)),u=u==null?void 0:u.join(","),a!=null&&a.includes("@Quote")&&(u!=null&&u.includes("@Type")||(u=u===""?u+"@Type:Manual":u+",@Type:Manual"),u!=null&&u.includes("@SonSync")||(u=u===""?u+"@SonSync:No":u+",@SonSync:No"),u!=null&&u.includes("@FatherSync")||(u=u===""?u+"@FatherSync:Yes":u+",@FatherSync:Yes")),u}},pd=(a,r,i="")=>{var O,P,H,I,ee,$,F,L,m,C,h,E,g,te,Te,Qe;let l=[];if(((O=a==null?void 0:a[0])==null?void 0:O[0])!=="*"&&((P=a==null?void 0:a[0])==null?void 0:P[0])!=="$")return;let u=Ht(a==null?void 0:a[0],":");l=(H=u==null?void 0:u.filter(de=>!(de!=null&&de.includes("{"))&&!(de!=null&&de.includes("["))))==null?void 0:H.join("");let s="";(l==null?void 0:l[(l==null?void 0:l.length)-1])===":"&&(l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1)),(l==null?void 0:l[0])==="*"?(l=l==null?void 0:l.slice(1,l==null?void 0:l.length),l=l==null?void 0:l.split(":")):(s=D.cloneDeep(l)+":",l=[]);let k=u==null?void 0:u.filter(de=>!(!(de!=null&&de.includes("{"))&&!(de!=null&&de.includes("["))));s=s+((k==null?void 0:k[0])??"");let v=k==null?void 0:k[1];(s==null?void 0:s[0])==="["&&(v=D.cloneDeep(s)+(v??""),s="");let p=v?Ja(v):[];!(p!=null&&p.every(de=>Array.isArray(de)))&&(p==null?void 0:p.length)>0&&(p=[p]);let y=(I=Ht(s,"@"))!=null&&I[1]?"@"+((ee=Ht(s,"@"))==null?void 0:ee[1]):"";if(s=($=Ht(s,"@"))==null?void 0:$[0],(s==null?void 0:s[0])==="$"&&(y=D.cloneDeep(s)+(y??""),s=""),i!==""&&(y=i),y!==""){(y==null?void 0:y[0])==="$"&&(y=y==null?void 0:y.slice(1,y==null?void 0:y.length)),(y==null?void 0:y[(y==null?void 0:y.length)-1])===":"&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1));let de="";if(y!=null&&y.includes("(@")){de=(L=(F=y==null?void 0:y.replace("(@",Bt))==null?void 0:F.split(Bt))==null?void 0:L[0];let Be=(C=(m=y==null?void 0:y.replace("(@",Bt))==null?void 0:m.split(Bt))==null?void 0:C[1];Be="@"+(Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1));let Oe=(h=Ht(Be,","))==null?void 0:h.map(z=>((z==null?void 0:z[(z==null?void 0:z.length)-1])===","&&(z=z==null?void 0:z.slice(0,(z==null?void 0:z.length)-1)),Ro(z)));y=de+"("+(Oe==null?void 0:Oe.join(","))+")"}else{de=(g=(E=y==null?void 0:y.replace("@",Bt))==null?void 0:E.split(Bt))==null?void 0:g[0];let Be=(Te=(te=y==null?void 0:y.replace("@",Bt))==null?void 0:te.split(Bt))==null?void 0:Te[1];if(Be){Be="@"+Be;let Oe=(Qe=Ht(Be,","))==null?void 0:Qe.map(z=>Ro(z));y=de+"("+(Oe==null?void 0:Oe.join(","))+")"}else y=de}}(s==null?void 0:s[(s==null?void 0:s.length)-1])==="@"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),(s==null?void 0:s[(s==null?void 0:s.length)-1])===":"&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1));let _=s===""?[]:dd(s,r)??[];return _!=null&&_.some(de=>{var Be;return Array.isArray(de==null?void 0:de.children)&&((Be=de==null?void 0:de.children)==null?void 0:Be.length)>0})&&(_=[_]),{groupName:l,tableColumns:_,tableFilter:y,tableContents:p}};let Gt="$R";const fd=Ve.useUnit(D.pinia),{chooseTitle:ua}=D.storeToRefs(fd),fa=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@ProButton",value:"onButtonContents",order:1},{key:"@PamButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1}],hd=a=>{var i;return(a==null?void 0:a.filter.toUpperCase())==="ALL"||(a==null?void 0:a.filter.toUpperCase())==="NONE"?a==null?void 0:a.contents:(i=a==null?void 0:a.contents)==null?void 0:i.map(l=>{var u;return(l==null?void 0:l.key)==="tableContents"&&(l.contents=(u=l.contents)==null?void 0:u.slice(0,parseInt(a==null?void 0:a.filter))),l})},vd=a=>{var r;return(a==null?void 0:a.filter)==="Random"?(r=a==null?void 0:a.contents)==null?void 0:r.map(l=>((l==null?void 0:l.key)==="tableContents"&&(l.contents=rd(l.contents)),l)):((a==null?void 0:a.filter)==="Ordin"&&(a==null?void 0:a.contents).push({key:"enableWrap",contents:!0}),a==null?void 0:a.contents)},gd=a=>{var l,u,s,k;let r=(s=(u=(l=a==null?void 0:a.filter)==null?void 0:l.replace("*",""))==null?void 0:u.replaceAll("{",""))==null?void 0:s.replaceAll("}","");if((r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return a==null?void 0:a.contents;let i=Ve.calculatorAndToOr(r);if((i==null?void 0:i.length)>0){let v=[];return i==null||i.forEach(y=>{let _={};for(let O in y){let P=O;P!=null&&P.includes("[")||(_[P]=y[O])}v.push(_)}),(k=a==null?void 0:a.contents)==null?void 0:k.map(y=>{var O,P,H;let _=(P=(O=a==null?void 0:a.contents)==null?void 0:O.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:P.contents;if(_=(H=Ve.getEqualChild(_))==null?void 0:H.filter(I=>(I==null?void 0:I.label)!=="操作"),(y==null?void 0:y.key)==="tableContents"){let ee=Ve.tableToForm(y==null?void 0:y.contents,_);v==null||v.forEach($=>{var F,L;for(let m in $)!((F=ee==null?void 0:ee[0])!=null&&F.find(C=>{var h;return(C==null?void 0:C.key)===m||((h=C==null?void 0:C.key)==null?void 0:h.includes(m))}))&&!(ee!=null&&ee.find(C=>{var h;return(C==null?void 0:C.key)===m||((h=C==null?void 0:C.key)==null?void 0:h.includes(m))}))||(((L=$[m])==null?void 0:L[0])!=="!"?ee=ee==null?void 0:ee.filter(C=>{var h,E;return((h=C==null?void 0:C.find(g=>{var te;return(g==null?void 0:g.key)===m||((te=g==null?void 0:g.key)==null?void 0:te.includes(m))}))==null?void 0:h.value)===$[m]&&!Array.isArray($==null?void 0:$[m])||Array.isArray($==null?void 0:$[m])&&((E=$==null?void 0:$[m])==null?void 0:E.find(g=>{var te;return((te=C==null?void 0:C.find(Te=>{var Qe;return(Te==null?void 0:Te.key)===m||((Qe=Te==null?void 0:Te.key)==null?void 0:Qe.includes(m))}))==null?void 0:te.value)===g}))}):ee=ee==null?void 0:ee.filter(C=>{var h;return((h=C==null?void 0:C.find(E=>{var g;return(E==null?void 0:E.key)===m||((g=E==null?void 0:E.key)==null?void 0:g.includes(m))}))==null?void 0:h.value)!==$[m]}))}),(ee==null?void 0:ee.length)===0?y.contents=[]:y.contents=ee==null?void 0:ee.map($=>{let F={};return $==null||$.forEach(L=>{F[L==null?void 0:L.key]=L==null?void 0:L.value}),F})}return y})}return a==null?void 0:a.contents},md=a=>a==null?void 0:a.contents,yd=a=>a==null?void 0:a.contents,bd=a=>a==null?void 0:a.contents,kd=a=>a==null?void 0:a.contents,xd=a=>a==null?void 0:a.contents,wd=a=>a==null?void 0:a.contents,Dd=a=>{var r,i,l,u;if(((r=a==null?void 0:a.filter)==null?void 0:r[0])!=="[")return(i=a==null?void 0:a.contents)==null?void 0:i.map(k=>{var v;return(k==null?void 0:k.key)==="formContent"&&(k.contents=(v=k.contents)==null?void 0:v.map(p=>(p.width=parseInt(a==null?void 0:a.filter),p))),k});if(((l=a==null?void 0:a.filter)==null?void 0:l[0])==="["){let s=Ja(a==null?void 0:a.filter),k=s==null?void 0:s.map(p=>parseInt(p));return k=ld(k),(u=a==null?void 0:a.contents)==null?void 0:u.map((p,y)=>{var _;return(p==null?void 0:p.key)==="formContent"&&(p.contents=(_=p.contents)==null?void 0:_.map(O=>{var P;return O.width=(P=k==null?void 0:k.find(H=>(H==null?void 0:H.total)>y+1))==null?void 0:P.key,O})),p})}return a==null?void 0:a.contents},_d=a=>{var r;if((a==null?void 0:a.filter)!==""){let i=a==null?void 0:a.filter;return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i=i==null?void 0:i.split(","),(r=a==null?void 0:a.contents)==null?void 0:r.map(u=>{var s,k,v;return(u==null?void 0:u.key)==="header"&&(Array.isArray((s=u==null?void 0:u.contents)==null?void 0:s[0])?u.contents[0]=(v=u.contents[0])==null?void 0:v.map(p=>(i!=null&&i.find(y=>y===(p==null?void 0:p.prop))&&(p.fixed="left"),p)):u.contents=(k=u.contents)==null?void 0:k.map(p=>(i!=null&&i.find(y=>y===(p==null?void 0:p.prop))&&(p.fixed="left"),p))),u})}return a==null?void 0:a.contents},Ed=async a=>{var r,i,l,u,s,k,v,p,y,_,O;if((a==null?void 0:a.filter)==="true"){let P=await Za((i=(r=ua==null?void 0:ua.value)==null?void 0:r[0])==null?void 0:i.parentContent,!1),H=(u=(l=ua==null?void 0:ua.value)==null?void 0:l[0])==null?void 0:u.value;P=(s=P==null?void 0:P[0])==null?void 0:s.compData;let I=(k=P==null?void 0:P.find(F=>(F==null?void 0:F.key)==="header"))==null?void 0:k.contents;I=((v=I==null?void 0:I.find(F=>F==null?void 0:F.isMainKey))==null?void 0:v.prop)??((p=I==null?void 0:I[0])==null?void 0:p.prop);let ee=(_=(y=P==null?void 0:P.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:y.contents)==null?void 0:_.find(F=>(F==null?void 0:F[I])===H);return(O=a==null?void 0:a.contents)==null?void 0:O.map(F=>{var L;return(F==null?void 0:F.key)==="formContent"&&(F.contents=(L=F.contents)==null?void 0:L.map(m=>(m.value=ee==null?void 0:ee[m==null?void 0:m.prop],m))),F})}return a==null?void 0:a.contents},Bl={onNumSlice:hd,onRandomContents:vd,onConditionContents:gd,onFatherPaceContents:md,onPaceContents:yd,onMainTagContents:bd,onButtonContents:kd,onPamButtonContents:xd,onRowButtonContents:wd,onRelated:Ed,onRowNum:Dd,onFixRow:_d},Cd=async a=>{var u,s,k,v,p,y,_,O,P,H,I,ee,$,F,L,m,C,h,E;let r="";if(((u=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:u.contents)!==""&&(r=(s=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:s.contents),r===""||!r)return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(v=(k=r==null?void 0:r.replace("(",Gt))==null?void 0:k.split(Gt))==null?void 0:v[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ht(r,","))==null?void 0:p.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g!=null&&g.includes("(")||(g=g==null?void 0:g.replaceAll(":","=")),g)),l=a;for(let g in i){let te,Te="";(y=i==null?void 0:i[g])!=null&&y.includes("(")?(te=(P=(O=(_=i==null?void 0:i[g])==null?void 0:_.replace("(",Gt))==null?void 0:O.split(Gt))==null?void 0:P[0],Te="("+((ee=(I=(H=i==null?void 0:i[g])==null?void 0:H.replace("(",Gt))==null?void 0:I.split(Gt))==null?void 0:ee[1])):(te=(L=(F=($=i==null?void 0:i[g])==null?void 0:$.replace("=",Gt))==null?void 0:F.split(Gt))==null?void 0:L[0],Te=(h=(C=(m=i==null?void 0:i[g])==null?void 0:m.replace("=",Gt))==null?void 0:C.split(Gt))==null?void 0:h[1]);let Qe=(E=fa==null?void 0:fa.find(de=>(de==null?void 0:de.key)===te))==null?void 0:E.value;if(Qe){const de=Bl[Qe];await new Function("return ")(),l=de({contents:l,filter:Te})}}return l},Sd=async a=>{var u,s,k,v,p,y,_,O,P,H,I,ee,$,F,L,m,C,h,E;let r="";if(((u=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:u.contents)!==""&&(r=(s=a==null?void 0:a.find(g=>(g==null?void 0:g.key)==="filter"))==null?void 0:s.contents),r==="")return a;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(v=(k=r==null?void 0:r.replace("(",Gt))==null?void 0:k.split(Gt))==null?void 0:v[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let i=(p=Ht(r,","))==null?void 0:p.map(g=>((g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g!=null&&g.includes("(")||(g=g==null?void 0:g.replaceAll(":","=")),g)),l=a;for(let g in i){let te,Te="";(y=i==null?void 0:i[g])!=null&&y.includes("(")?(te=(P=(O=(_=i==null?void 0:i[g])==null?void 0:_.replace("(",Gt))==null?void 0:O.split(Gt))==null?void 0:P[0],Te="("+((ee=(I=(H=i==null?void 0:i[g])==null?void 0:H.replace("(",Gt))==null?void 0:I.split(Gt))==null?void 0:ee[1])):(te=(L=(F=($=i==null?void 0:i[g])==null?void 0:$.replace("=",Gt))==null?void 0:F.split(Gt))==null?void 0:L[0],Te=(h=(C=(m=i==null?void 0:i[g])==null?void 0:m.replace("=",Gt))==null?void 0:C.split(Gt))==null?void 0:h[1]);let Qe=(E=fa==null?void 0:fa.find(de=>(de==null?void 0:de.key)===te))==null?void 0:E.value;if(Qe){const de=Bl[Qe];await new Function("return ")(),l=de({contents:l,filter:Te})}}return l},Td=D.useLoginState(D.pinia),{loginUserInfo:fn}=D.storeToRefs(Td),Bd=D.useMenuState(D.pinia),{activeMenuPath:Po}=D.storeToRefs(Bd),po=Ve.useUnit(D.pinia),{selectTitle:ao}=D.storeToRefs(po);let oo=["新增","导入","导出"],lo=["查看","编辑","复制新增","删除"];const Id=async(a,r)=>{var k,v,p,y,_,O,P,H,I,ee,$,F,L;let i=Po.value,l="",u=((k=ao==null?void 0:ao.value)==null?void 0:k.find(m=>(m==null?void 0:m.condition)==="child"))??void 0;po.setSelectTitle([]),(a==null?void 0:a.length)===0||(i=r?i:(v=a==null?void 0:a[0])==null?void 0:v.object_name,l=(p=a==null?void 0:a[0])==null?void 0:p.father_name);let s=[];if(l!==""){let m=l;(m==null?void 0:m[(m==null?void 0:m.length)-1])==="/"&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1));let C=await Za(m,!1);C=(y=C==null?void 0:C[0])==null?void 0:y.compData;let h=(_=C==null?void 0:C.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:_.contents;h=((O=h==null?void 0:h.find(g=>g==null?void 0:g.isMainKey))==null?void 0:O.prop)??((P=h==null?void 0:h[0])==null?void 0:P.prop);let E=(I=(H=C==null?void 0:C.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:H.contents)==null?void 0:I.map(g=>({label:g==null?void 0:g[h],value:g==null?void 0:g[h]}));s=(ee=l==null?void 0:l.split("/"))==null?void 0:ee.map(g=>(g===""?u?(u.isShow=!0,g=u):g={value:g,condition:"child",options:E,parentContent:(l==null?void 0:l[(l==null?void 0:l.length)-1])==="/"?l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1):l,isShow:!0}:g={condition:"parent",value:g.trim(),isShow:!0},g))}if(i!==""){let m=($=i==null?void 0:i.split("/"))==null?void 0:$.map(C=>(C={condition:"normal",value:C.trim(),isShow:!0},C));((F=m==null?void 0:m[0])==null?void 0:F.value)===((L=s==null?void 0:s[0])==null?void 0:L.value)&&(m=m==null?void 0:m.filter((C,h)=>h!==0)),s=[...s,...m??[]]}l===""&&u&&((u==null?void 0:u.parentContent)!==Po.value&&(u.isShow=!1),(u==null?void 0:u.value)!==""&&s.push(u)),po.setSelectTitle(s)},Fo=async a=>{let r=[],i=a==null?void 0:a.map(async l=>{var p,y,_,O,P,H,I,ee,$,F,L,m,C,h,E,g,te,Te,Qe,de,Be,Oe,z,re,le,fe,$e,tt,X,M,ie;let u=(O=(_=(y=(p=l==null?void 0:l.contents)==null?void 0:p.find(J=>{var ve;return(ve=J==null?void 0:J.key)==null?void 0:ve.includes("struct")}))==null?void 0:y.value)==null?void 0:_[0])==null?void 0:O.类型,s=Object.values(l==null?void 0:l.name);s=s==null?void 0:s.reverse();let k=(P=l==null?void 0:l.contents)==null?void 0:P.map(J=>J==null?void 0:J.key),v={comp:u,isShow:!0,name:s==null?void 0:s[0],id:l==null?void 0:l.object_id,relatedTables:k};for(let J in s)parseInt(J)>=1&&(v[`name${parseInt(J)-1}`]=s[J]);if(u==="Table"){let J=(H=l==null?void 0:l.contents)==null?void 0:H.find(ke=>{var T;return(T=ke==null?void 0:ke.key)==null?void 0:T.includes("content")}),ve=[];J.value=(I=J==null?void 0:J.value)==null?void 0:I.sort((ke,T)=>parseInt(ke)-parseInt(T)),ve.push({key:"tableContents",contents:J==null?void 0:J.value});let we=(m=(L=(F=($=(ee=l==null?void 0:l.contents)==null?void 0:ee.find(ke=>{var T;return(T=ke==null?void 0:ke.key)==null?void 0:T.includes("struct")}))==null?void 0:$.value)==null?void 0:F[0])==null?void 0:L.结构)==null?void 0:m.contents;ve.push({key:"header",contents:we}),ve.push({key:"filter",contents:(te=(g=(E=(h=(C=l==null?void 0:l.contents)==null?void 0:C.find(ke=>{var T;return(T=ke==null?void 0:ke.key)==null?void 0:T.includes("struct")}))==null?void 0:h.value)==null?void 0:E[0])==null?void 0:g.引用)==null?void 0:te.contents});let Ee=oo==null?void 0:oo.map(ke=>({label:ke})),ne=lo==null?void 0:lo.map(ke=>({label:ke}));ve.push({key:"extraButton",contents:Ee}),ve.push({key:"rowButton",contents:ne}),v.compData=await Sd(ve)}else if(u==="Form"){let J=[],ve=(de=(Qe=(Te=l==null?void 0:l.contents)==null?void 0:Te.find(Ee=>{var ne;return(ne=Ee==null?void 0:Ee.key)==null?void 0:ne.includes("content")}))==null?void 0:Qe.value)==null?void 0:de[0],we=(fe=(le=(re=(z=(Oe=(Be=l==null?void 0:l.contents)==null?void 0:Be.find(Ee=>{var ne;return(ne=Ee==null?void 0:Ee.key)==null?void 0:ne.includes("struct")}))==null?void 0:Oe.value)==null?void 0:z[0])==null?void 0:re.结构)==null?void 0:le.contents)==null?void 0:fe.map(Ee=>(Ee.value=ve==null?void 0:ve[Ee==null?void 0:Ee.prop],Ee));J.push({key:"filter",contents:(ie=(M=(X=(tt=($e=l==null?void 0:l.contents)==null?void 0:$e.find(Ee=>{var ne;return(ne=Ee==null?void 0:Ee.key)==null?void 0:ne.includes("struct")}))==null?void 0:tt.value)==null?void 0:X[0])==null?void 0:M.引用)==null?void 0:ie.contents}),J.push({key:"formContent",contents:we}),v.compData=await Cd(J)}return v});return r=await Promise.all(i),r},Za=async(a,r,i={})=>{var k,v,p,y,_,O,P,H,I,ee,$,F;let l=await Pn.getPageDataApi({platId:parseInt((k=fn==null?void 0:fn.value)==null?void 0:k.plat_id),pageName:a}),u=(v=l==null?void 0:l.data)==null?void 0:v.result;if((u==null?void 0:u.length)===0&&(i!=null&&i.originPath)&&(i==null?void 0:i.originPath)!==a){let L=await Pn.getPageDataApi({platId:parseInt((p=fn==null?void 0:fn.value)==null?void 0:p.plat_id),pageName:i==null?void 0:i.originPath});if(((_=(y=L==null?void 0:L.data)==null?void 0:y.result)==null?void 0:_.length)>0){let m=await Fo((O=L==null?void 0:L.data)==null?void 0:O.result);m=m==null?void 0:m.map(E=>{var Te,Qe,de,Be,Oe,z,re,le,fe,$e,tt,X,M,ie,J;let g=[],te=(Te=Object.keys(E))==null?void 0:Te.filter(ve=>ve==null?void 0:ve.includes("name"));for(let ve in E)te!=null&&te.find(we=>we===ve)&&g.push(E==null?void 0:E[ve]);if(g=g.reverse(),(E==null?void 0:E.comp)==="Table")E={filter:(de=(Qe=E==null?void 0:E.compData)==null?void 0:Qe.find(ve=>(ve==null?void 0:ve.key)==="filter"))==null?void 0:de.contents,key:E==null?void 0:E.comp,name:g,tableColumns:(Oe=(Be=E==null?void 0:E.compData)==null?void 0:Be.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:Oe.contents,tableContents:(re=(z=E==null?void 0:E.compData)==null?void 0:z.find(ve=>(ve==null?void 0:ve.key)==="tableContents"))==null?void 0:re.contents};else{let ve=($e=(fe=(le=E==null?void 0:E.compData)==null?void 0:le.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:fe.contents)==null?void 0:$e.map(Ee=>(Ee==null?void 0:Ee.value)??"");ve=[ve];let we=(M=(X=(tt=E==null?void 0:E.compData)==null?void 0:tt.find(Ee=>(Ee==null?void 0:Ee.key)==="formContent"))==null?void 0:X.contents)==null?void 0:M.map(Ee=>(Ee.value="",Ee));E={contents:ve,filter:(J=(ie=E==null?void 0:E.compData)==null?void 0:ie.find(Ee=>(Ee==null?void 0:Ee.key)==="filter"))==null?void 0:J.contents,key:E==null?void 0:E.comp,name:g,value:we}}return E});let C=[{key:"menuPath",contents:[{path:a,fatherPath:(I=(H=(P=L==null?void 0:L.data)==null?void 0:P.result)==null?void 0:H[0])==null?void 0:I.father_name,isShow:!1}]},{key:a,contents:m}];await Pn.createPlatFormDataApi({platId:parseInt((ee=fn==null?void 0:fn.value)==null?void 0:ee.plat_id),changeData:C});let h=await Pn.getPageDataApi({platId:parseInt(($=fn==null?void 0:fn.value)==null?void 0:$.plat_id),pageName:a});u=(F=h==null?void 0:h.data)==null?void 0:F.result}}return r&&await Id(u,!!(i!=null&&i.originPath)),await Fo(u)};var Pa={exports:{}},Nd=Pa.exports,Lo;function Ad(){return Lo||(Lo=1,function(a,r){(function(i,l){l()})(Nd,function(){function i(y,_){return typeof _>"u"?_={autoBom:!1}:typeof _!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),_={autoBom:!_}),_.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(y.type)?new Blob(["\uFEFF",y],{type:y.type}):y}function l(y,_,O){var P=new XMLHttpRequest;P.open("GET",y),P.responseType="blob",P.onload=function(){p(P.response,_,O)},P.onerror=function(){console.error("could not download file")},P.send()}function u(y){var _=new XMLHttpRequest;_.open("HEAD",y,!1);try{_.send()}catch{}return 200<=_.status&&299>=_.status}function s(y){try{y.dispatchEvent(new MouseEvent("click"))}catch{var _=document.createEvent("MouseEvents");_.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),y.dispatchEvent(_)}}var k=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ve.commonjsGlobal=="object"&&Ve.commonjsGlobal.global===Ve.commonjsGlobal?Ve.commonjsGlobal:void 0,v=k.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),p=k.saveAs||(typeof window!="object"||window!==k?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(y,_,O){var P=k.URL||k.webkitURL,H=document.createElement("a");_=_||y.name||"download",H.download=_,H.rel="noopener",typeof y=="string"?(H.href=y,H.origin===location.origin?s(H):u(H.href)?l(y,_,O):s(H,H.target="_blank")):(H.href=P.createObjectURL(y),setTimeout(function(){P.revokeObjectURL(H.href)},4e4),setTimeout(function(){s(H)},0))}:"msSaveOrOpenBlob"in navigator?function(y,_,O){if(_=_||y.name||"download",typeof y!="string")navigator.msSaveOrOpenBlob(i(y,O),_);else if(u(y))l(y,_,O);else{var P=document.createElement("a");P.href=y,P.target="_blank",setTimeout(function(){s(P)})}}:function(y,_,O,P){if(P=P||open("","_blank"),P&&(P.document.title=P.document.body.innerText="downloading..."),typeof y=="string")return l(y,_,O);var H=y.type==="application/octet-stream",I=/constructor/i.test(k.HTMLElement)||k.safari,ee=/CriOS\/[\d]+/.test(navigator.userAgent);if((ee||H&&I||v)&&typeof FileReader<"u"){var $=new FileReader;$.onloadend=function(){var m=$.result;m=ee?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),P?P.location.href=m:location=m,P=null},$.readAsDataURL(y)}else{var F=k.URL||k.webkitURL,L=F.createObjectURL(y);P?P.location=L:location.href=L,P=null,setTimeout(function(){F.revokeObjectURL(L)},4e4)}});k.saveAs=p.saveAs=p,a.exports=p})}(Pa)),Pa.exports}Ad();const ja=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BG3-boe7.cjs")).then(a=>a.index));ja.install=a=>{a.component("ssMenu",ja)};const Il={__name:"index",props:{name:String},setup(a){const r=a,i=e.computed(()=>rt.ElIcons[r.name]);return e.onMounted(()=>{}),(l,u)=>{const s=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.value)))]),_:1})}}},Nl=(a,r,i=0)=>{let l=a;return l!=null&&l.every(u=>Array.isArray(u))&&(l!=null&&l.every(u=>Array.isArray(u)&&u.length===1)?l=l==null?void 0:l.filter(u=>(u==null?void 0:u[0])!==(r==null?void 0:r[i])):l=l==null?void 0:l.map(u=>{if(u!=null&&u.find(s=>s===(r==null?void 0:r[i]))&&(r==null?void 0:r.length)!==1){let s=D.cloneDeep(r),k=u==null?void 0:u.filter(_=>_!==(s==null?void 0:s[i])),v=i+1,p=Nl(k,s,v),y=[];y.push(u==null?void 0:u[0]),p==null||p.forEach(_=>{y.push(_)}),u=y}return u})),l},Al=(a,r,i,l=0)=>{let u=a;return u!=null&&u.every(s=>Array.isArray(s))&&(u!=null&&u.every(s=>Array.isArray(s)&&s.length===1)?u.push([i]):u=u==null?void 0:u.map(s=>{if(s!=null&&s.find(k=>k===(r==null?void 0:r[l]))&&(r==null?void 0:r.length)!==1){let k=D.cloneDeep(r),v=s==null?void 0:s.filter(O=>O!==(k==null?void 0:k[l])),p=l+1,y=Al(v,k,i,p),_=[];_.push(s==null?void 0:s[0]),y==null||y.forEach(O=>{_.push(O)}),s=_}return s})),u},Vl=(a,r,i,l,u=0)=>{let s=a;return s!=null&&s.every(k=>Array.isArray(k))&&(s!=null&&s.every(k=>Array.isArray(k)&&k.length===1)?s=s==null?void 0:s.map(k=>((k==null?void 0:k[0])===i&&(k=[l]),k)):s=s==null?void 0:s.map(k=>{if(k!=null&&k.find(v=>v===(r==null?void 0:r[u]))&&(r==null?void 0:r.length)!==1){let v=D.cloneDeep(r),p=k==null?void 0:k.filter(P=>P!==(v==null?void 0:v[u])),y=u+1,_=Vl(p,v,i,l,y),O=[];O.push(k==null?void 0:k[0]),_==null||_.forEach(P=>{O.push(P)}),k=O}return k})),s};function Ol(a="menu"){return{name:a,components:{SvgIcon:Wr.SvgIcon,ssMenu:ja,DynamicIcon:Il,ssDialog:Jt.ssDialog,ssInput:It._sfc_main$2},setup(r,{emit:i}){const l=e.defineProps({mode:{type:String,default:"vertical"}}),u=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=D.useMenuState(),k=D.useModelComp(D.pinia),v=D.useLoginState(D.pinia),{loginUserInfo:p}=D.storeToRefs(v),y=e.ref(0),_=Hr.useRouter(),O=e.ref(),{asideMenus:P,menuTriggerType:H,platform:I}=D.storeToRefs(s),{fixMenuStatus:ee}=D.storeToRefs(k),$=e.computed(()=>l==null?void 0:l.mode),F=ne=>ne==null?void 0:ne.map(T=>{var Ge,Ye;return!(T!=null&&T.children)||((Ge=T==null?void 0:T.children)==null?void 0:Ge.length)===0?T.config=u.value:T!=null&&T.children&&((Ye=T==null?void 0:T.children)==null?void 0:Ye.length)>0&&(T.children=F(T.children)),T}),L=e.computed(()=>{let ne=[...P.value];if((ne==null?void 0:ne.length)===0)return _.push("/"),[];const ke=te(ne,g.value);return ke.isFlag||(ne=ke==null?void 0:ke.data),ne=ne==null?void 0:ne.map(T=>{var Ge,Ye;return!(T!=null&&T.children)||((Ge=T==null?void 0:T.children)==null?void 0:Ge.length)===0?T.config=u.value:T!=null&&T.children&&((Ye=T==null?void 0:T.children)==null?void 0:Ye.length)>0&&(T.children=F(T.children)),T}),ne}),m=async(ne,ke)=>{k.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(ne==null?void 0:ne.path),s.setActiveAsideMenu(ne),ne.isRouter?_.push(ne.path):_.push("/"),i("node-click",ne,ke)},C=async ne=>{const ke=qr.findNodeByPropInTree(L.value,"path",ne);s.setActiveAsideMenu(ke),k.setRouteToChildPath(""),ee.value?k.setFixMenuStatus(!1):(we.value&&(H.value="open"),H.value==="click"?y.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(ne):we.value||(s.setMenuTriggerType("click"),s.setActiveMenuPath(ne))),ne!=null&&ne.startsWith("/")?_.push(ne):_.push("/"),y.value++},h=ne=>{we.value||s.setActiveMenuPath(ne)},E=ne=>{const ke=document.documentElement;ne==null||ne.forEach(T=>{ke.style.setProperty(T.name,T.value)})};e.onMounted(()=>{y.value=1});const g=e.computed(()=>{const ne=sessionStorage.getItem("authority");return ne?JSON.parse(ne):[]});e.watch(()=>I.value,ne=>{ne==="browser"?E(ka.browserVerticalMenuClasses):ne==="client"?(E(ka.clientHorizontalMenuClasses),E(ka.clientVerticalMenuClasses)):ne==="three"&&(E(ka.threeHorizontalMenuClasses),E(ka.threeVerticalMenuClasses))},{immediate:!0});const te=(ne,ke)=>({isFlag:!0}),Te=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Qe=ne=>ra(ne),de=e.ref({}),Be=e.ref([]),Oe=e.ref({}),z=e.ref({}),re=ne=>{switch(ne){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},le=e.ref({}),fe=ne=>{s.setCacheInputMenu({type:Te.type,data:ne}),s.setIsRefreshMenus(!0)},$e=async(ne,ke,T)=>{var Ge,Ye,Ae,ce,ae,pe,Ce,qe,dt,b,N,W,Z,S,se,Me,A,oe,U,q,Se,ue,G,Q,he,ye,_e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et,ze,it,mt,Je;if(ke==="create"){let Ue=(T==null?void 0:T.title)+"(1)",Nt=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ie=(Ye=(Ge=Nt==null?void 0:Nt.data)==null?void 0:Ge.result)==null?void 0:Ye[0],Xe=(Ae=Ie==null?void 0:Ie.value)==null?void 0:Ae.pageData;Xe.compData=(ce=Xe.compData)==null?void 0:ce.map(B=>{var ge;return(B==null?void 0:B.key)==="menuContents"&&(B.contents=Al(B.contents,(ge=T==null?void 0:T.path)==null?void 0:ge.split("/"),Ue)),B}),await rt.updateInsofDataApi({id:Ie==null?void 0:Ie.id,value:{pageData:Xe}});let Fe=(pe=(ae=T==null?void 0:T.path)==null?void 0:ae.split("/"))==null?void 0:pe.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}),Ze=await Ve.getItemData((dt=(qe=(Ce=T==null?void 0:T.path)==null?void 0:Ce.split("/"))==null?void 0:qe.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Fe.push(Ue),Fe=Fe==null?void 0:Fe.join("/"),(Ze==null?void 0:Ze.length)>0){let B=Ze==null?void 0:Ze[0],ge=(N=(b=B==null?void 0:B.compData)==null?void 0:b.find(We=>(We==null?void 0:We.key)==="header"))==null?void 0:N.contents;if(((W=ge==null?void 0:ge[0])==null?void 0:W.directiveLabel)==="#isMain"){let We=(Z=ge==null?void 0:ge[0])==null?void 0:Z.prop,me=(se=(S=B==null?void 0:B.compData)==null?void 0:S.find(st=>(st==null?void 0:st.key)==="tableContents"))==null?void 0:se.contents,ut;me==null||me.forEach(st=>{var xt,pt;if(st.length===1)((xt=st==null?void 0:st[0])==null?void 0:xt[We])===(T==null?void 0:T.title)&&(ut=st==null?void 0:st[0],ut[We]=Ue);else{let ct=(pt=ge==null?void 0:ge.filter(Tt=>Tt!=="操作"))==null?void 0:pt.map(Tt=>Tt==null?void 0:Tt.prop),ft=st==null?void 0:st.filter(Tt=>!(Tt!=null&&Tt.id)),wt=Ve.getValueToObjectValue(ft,ct);wt[We]=Ue,ut=wt}}),await rt.createInsofDataApi({key:{type:"data",pageKey:(oe=(A=(Me=T==null?void 0:T.path)==null?void 0:Me.split("/"))==null?void 0:A.filter((st,xt)=>{var pt,ct;return xt!==((ct=(pt=T==null?void 0:T.path)==null?void 0:pt.split("/"))==null?void 0:ct.length)-1}))==null?void 0:oe.join("/"),tableId:B==null?void 0:B.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(U=p.value)==null?void 0:U.id,createUserLayer:((q=p.value)==null?void 0:q.dept)||((Se=p.value)==null?void 0:Se.部门名称)},value:{tableData:ut}})}}await Ve.newLoadingConstruct(T==null?void 0:T.path,Fe),s.setUpdateMenuStatus(!1),await Pn.verifyStructureDataToStore(),s.setActiveMenuPath((Q=(G=(ue=T==null?void 0:T.path)==null?void 0:ue.split("/"))==null?void 0:G.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:Q.join("/")),s.setActiveTopMenuPath((ye=(he=T==null?void 0:T.path)==null?void 0:he.split("/"))==null?void 0:ye[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(ke==="update")O.value=T;else if(ke==="delete"){let Ue=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:T==null?void 0:T.path}}),Nt=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ie=(xe=(_e=Nt==null?void 0:Nt.data)==null?void 0:_e.result)==null?void 0:xe[0],Xe=(K=Ie==null?void 0:Ie.value)==null?void 0:K.pageData;if(Xe.compData=(Re=Xe.compData)==null?void 0:Re.map(B=>{var ge;return(B==null?void 0:B.key)==="menuContents"&&(B.contents=Nl(B.contents,(ge=T==null?void 0:T.path)==null?void 0:ge.split("/"))),B}),await rt.updateInsofDataApi({id:Ie==null?void 0:Ie.id,value:{pageData:Xe}}),((Ke=(be=Ue==null?void 0:Ue.data)==null?void 0:be.result)==null?void 0:Ke.length)>0){let B=(je=(ot=Ue==null?void 0:Ue.data)==null?void 0:ot.result)==null?void 0:je.map(ge=>ge==null?void 0:ge.id);(B==null?void 0:B.length)>0&&await rt.batchDeleteInsofDataApi({ids:B})}let Fe=await Ve.getItemData((gt=(Ne=(at=T==null?void 0:T.path)==null?void 0:at.split("/"))==null?void 0:Ne.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:gt.join("/"),sessionStorage.getItem("systemKey"),""),Ze=[];(Fe==null?void 0:Fe.length)>0&&(Fe==null||Fe.forEach(B=>{var We,me,ut,st,xt,pt,ct,ft,wt,Tt,Ut;let ge=(st=(ut=(me=(We=B==null?void 0:B.compData)==null?void 0:We.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:me.contents)==null?void 0:ut[0])==null?void 0:st.prop;((ft=(ct=(pt=(xt=B==null?void 0:B.compData)==null?void 0:xt.find(vt=>(vt==null?void 0:vt.key)==="header"))==null?void 0:pt.contents)==null?void 0:ct[0])==null?void 0:ft.directiveLabel)==="#isMain"&&((Ut=(Tt=(wt=B==null?void 0:B.compData)==null?void 0:wt.find(vt=>(vt==null?void 0:vt.key)==="tableContents"))==null?void 0:Tt.contents)==null||Ut.forEach(vt=>{var zt,$t,Kt;(vt==null?void 0:vt.length)>1?(vt==null?void 0:vt[1])===(T==null?void 0:T.title)&&Ze.push((zt=vt==null?void 0:vt[0])==null?void 0:zt.id):(($t=vt==null?void 0:vt[0])==null?void 0:$t[ge])===(T==null?void 0:T.title)&&Ze.push((Kt=vt==null?void 0:vt[0])==null?void 0:Kt.id)}))})),(Ze==null?void 0:Ze.length)>0&&await rt.batchDeleteInsofDataApi({ids:Ze}),s.setUpdateMenuStatus(!1),await Pn.verifyStructureDataToStore(),s.setActiveMenuPath((it=(ze=(et=T==null?void 0:T.path)==null?void 0:et.split("/"))==null?void 0:ze.filter((B,ge)=>{var We,me;return ge!==((me=(We=T==null?void 0:T.path)==null?void 0:We.split("/"))==null?void 0:me.length)-1}))==null?void 0:it.join("/")),s.setActiveTopMenuPath((Je=(mt=T==null?void 0:T.path)==null?void 0:mt.split("/"))==null?void 0:Je[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},tt=async(ne,ke)=>{var qe,dt,b,N,W,Z,S,se,Me,A,oe,U,q,Se,ue,G,Q,he,ye,_e,xe,K,Re,be,Ke,ot,je,at,Ne,gt,et;let T=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Ge=(dt=(qe=T==null?void 0:T.data)==null?void 0:qe.result)==null?void 0:dt[0],Ye=(b=Ge==null?void 0:Ge.value)==null?void 0:b.pageData;Ye.compData=(N=Ye.compData)==null?void 0:N.map(ze=>{var it,mt;return(ze==null?void 0:ze.key)==="menuContents"&&(ze.contents=Vl(ze.contents,(it=ke==null?void 0:ke.path)==null?void 0:it.split("/"),ke==null?void 0:ke.title,(mt=ne==null?void 0:ne.target)==null?void 0:mt.value)),ze}),Ge!=null&&Ge.id&&await rt.updateInsofDataApi({id:Ge==null?void 0:Ge.id,value:{pageData:Ye}});let Ae=(Z=(W=ke==null?void 0:ke.path)==null?void 0:W.split("/"))==null?void 0:Z.filter((ze,it)=>{var mt,Je;return it!==((Je=(mt=ke==null?void 0:ke.path)==null?void 0:mt.split("/"))==null?void 0:Je.length)-1}),ce=Ae==null?void 0:Ae.join("/");Ae.push((S=ne==null?void 0:ne.target)==null?void 0:S.value),Ae=Ae==null?void 0:Ae.join("/");let ae=await Ve.getItemData(ce,sessionStorage.getItem("systemKey"),"");if(((U=(oe=(A=(Me=(se=ae==null?void 0:ae[0])==null?void 0:se.compData)==null?void 0:Me.find(ze=>(ze==null?void 0:ze.key)==="header"))==null?void 0:A.contents)==null?void 0:oe[0])==null?void 0:U.directiveLabel)==="#isMain"){let ze=(Q=(G=(ue=(Se=(q=ae==null?void 0:ae[0])==null?void 0:q.compData)==null?void 0:Se.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:ue.contents)==null?void 0:G[0])==null?void 0:Q.prop,it=(_e=(ye=(he=ae==null?void 0:ae[0])==null?void 0:he.compData)==null?void 0:ye.find(Ue=>(Ue==null?void 0:Ue.key)==="tableContents"))==null?void 0:_e.contents,mt=(be=(Re=(K=(xe=ae==null?void 0:ae[0])==null?void 0:xe.compData)==null?void 0:K.find(Ue=>(Ue==null?void 0:Ue.key)==="header"))==null?void 0:Re.contents)==null?void 0:be.map(Ue=>Ue==null?void 0:Ue.prop),Je;if(it==null||it.forEach(Ue=>{var Ie;let Nt=Ve.getValueToObjectValue(Ue,mt);(Nt==null?void 0:Nt[ze])===ke.title&&(Je=Nt,Je[ze]=(Ie=ne==null?void 0:ne.target)==null?void 0:Ie.value)}),Je){let Ue={};for(let Ie in Je)Ie!=="id"&&(Ue[Ie]=Je==null?void 0:Je[Ie]);let Nt=[{id:Je==null?void 0:Je.id,value:{tableData:Ue}}];await rt.batchUpdateInsofDataApi({dataList:Nt})}}let pe=await rt.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ke==null?void 0:ke.path}}),Ce=(ot=(Ke=pe==null?void 0:pe.data)==null?void 0:Ke.result)==null?void 0:ot.map(ze=>({id:ze==null?void 0:ze.id,key:ze==null?void 0:ze.key}));Ce=Ce==null?void 0:Ce.map(ze=>(ze.key.pageKey=Ae,ze)),(Ce==null?void 0:Ce.length)>0&&await rt.batchUpdateInsofDataApi({dataList:Ce}),s.setUpdateMenuStatus(!1),await Pn.verifyStructureDataToStore(),s.setActiveMenuPath((Ne=(at=(je=ke==null?void 0:ke.path)==null?void 0:je.split("/"))==null?void 0:at.filter((ze,it)=>{var mt,Je;return it!==((Je=(mt=ke==null?void 0:ke.path)==null?void 0:mt.split("/"))==null?void 0:Je.length)-1}))==null?void 0:Ne.join("/")),s.setActiveTopMenuPath((et=(gt=ke==null?void 0:ke.path)==null?void 0:gt.split("/"))==null?void 0:et[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),O.value=void 0},X=async(ne,ke)=>{Te.type=re(ke==null?void 0:ke.operateType),await $e(ke,Te.type,ne),z.value=ne,le.value=ke},M=()=>{Te.show=!1},ie=ne=>ne==null?void 0:ne.filter(ke=>ke.allowInherit),J=()=>{var T,Ge,Ye,Ae,ce;let ne;Te.type==="create"&&(ne=((T=z.value)==null?void 0:T.path)+"/"+Oe.value[(Ge=Oe.value)==null?void 0:Ge.prop]),Te.type==="update"&&(ne=(Ye=z.value)==null?void 0:Ye.path);const ke={...z.value,config:ie((Ae=z.value)==null?void 0:Ae.config),children:[],childMenus:[],title:Oe.value[(ce=Oe.value)==null?void 0:ce.prop],path:ne};console.log("clickSubmitForm",le.value,z.value,ke),fe(ke),Te.show=!1},ve=ne=>{var T,Ge;const ke=(T=ne==null?void 0:ne.contents)==null?void 0:T.find(Ye=>Ye.key==="formContent");ke&&(Oe.value=(Ge=ke==null?void 0:ke.contents)==null?void 0:Ge.reduce((Ye,Ae)=>(Ye[Ae.key]=Ae.value,Ye.prop=Ae.key,Ye),{}))},we=e.ref(!1);return{isCollapse:we,handleMenuCollapse:()=>{we.value=!we.value},handleCompChange:ve,dialogForm:de,dialogRenderComps:Be,getComponents:Qe,clickSubmitForm:J,dialogInfo:Te,beforeDialogDestroy:M,clickMenuIcon:X,mode:$,renderMenuList:L,clickMenu:m,openMenu:C,closeMenu:h,changeMenuStyle:E,fixElement:O,onBlur:tt}}}}e.defineComponent(Ol());const Vd=D.useLoginState(),{loginUserInfo:ro}=D.storeToRefs(Vd),an=D.useModelComp(D.pinia),Od=e.ref(!1),{itemData:Md,itemGridData:ta,curStructureCompIds:$o,isSubmitCurStructure:zd,isRefreshCurStructure:Rd,routeToChildPath:Pd,pageMapState:fo,itemExtendData:Oa}=D.storeToRefs(an),un=D.useMenuState(D.pinia),{activeTopMenuPath:Fd,activeMenuPath:gn,platform:_f,activeAsideMenu:Ef,buttonTriggerType:Ld,menus:Cf}=D.storeToRefs(un),oa=Ve.useUnit(D.pinia),{selectTitle:Ml,chooseTitle:jo}=D.storeToRefs(oa),$d=Ve.useOriginalState(D.pinia),{originalPath:Sf}=D.storeToRefs($d);e.ref();D.useAuthorityState(D.pinia);const Ua=e.ref(!0),va=e.ref(0),ho=e.ref([]);e.ref(!1);const jd=()=>{an.setItemGridData([]),an.setIsEdit("edit"),an.setSubmitCurStructure(gn.value!=="/平台管理/菜单管理")},Ud=()=>{an.setIsEdit("view"),an.setRefreshCurStructure(!0)},Kd=async a=>{const r=sessionStorage.getItem("systemKey"),i=await Ve.getItemData(a,r,"");return i&&i.length>0},Wd=async a=>{var v,p,y;let r=Ml.value,i=r==null?void 0:r.findIndex(_=>(_==null?void 0:_.value)===(a==null?void 0:a.value)),l=(v=r==null?void 0:r.filter(_=>(_==null?void 0:_.condition)==="parent"))==null?void 0:v.map(_=>_==null?void 0:_.value),u=l==null?void 0:l[0],s=(y=(p=r==null?void 0:r.filter((_,O)=>!(_!=null&&_.condition)&&O<=i))==null?void 0:p.map(_=>_.value))==null?void 0:y.join("/");u?(s==null?void 0:s.length)>0?u=u+"/"+s:u=l==null?void 0:l.join("/"):(s==null?void 0:s.length)>0&&(u=s,r=r==null?void 0:r.filter(_=>(_==null?void 0:_.condition)!=="child"),oa.setSelectTitle(r),oa.setChooseTitle([])),await Kd(u)&&un.setActiveMenuPath(u)},io=async(a,r,i,l="contentConfig")=>{var u;try{if(!Array.isArray(a))return;let s,k;r==="create"?(s={dataList:a==null?void 0:a.map(p=>{var y;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i!=null&&i.startsWith("/")?i==null?void 0:i.substring(1):i,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...p,compData:(y=p==null?void 0:p.compData)==null?void 0:y.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},k=rt.batchAddInsofDataApi):r==="update"?(s={dataList:a==null?void 0:a.map(p=>{var y;return{id:p==null?void 0:p.id,value:{pageData:{...p,compData:(y=p==null?void 0:p.compData)==null?void 0:y.filter(_=>(_==null?void 0:_.key)!=="tableContents")}}}})},k=rt.batchUpdateInsofDataApi):r==="delete"&&(s={ids:a},k=rt.batchDeleteInsofDataApi);const v=await k(s);if(((u=v==null?void 0:v.data)==null?void 0:u.code)===200)return v.data.result;throw rt.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{rt.ElMessage.error("保存响应失败")}},Uo=async(a,r,i,l)=>{var u,s,k,v,p,y,_,O,P,H,I;try{const ee=(s=(u=a==null?void 0:a.results)==null?void 0:u.filter(h=>!(h!=null&&h.id)||typeof(h==null?void 0:h.id)=="string"))==null?void 0:s.map(h=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:i},value:{tableData:h}})),$=(v=(k=a==null?void 0:a.results)==null?void 0:k.filter(h=>(h==null?void 0:h.id)&&typeof(h==null?void 0:h.id)=="number"))==null?void 0:v.map(h=>({id:h==null?void 0:h.id,value:{tableData:h}})),F=JSON.parse(D.cloneDeep(JSON.stringify(a))),L=(p=F==null?void 0:F.results)==null?void 0:p.map(h=>h.id);let m;i?m=(O=(_=(y=fo.value)==null?void 0:y[gn.value])==null?void 0:_.filter(h=>{var E,g,te;return((E=h==null?void 0:h.key)==null?void 0:E.type)===r&&((te=(g=h==null?void 0:h.key)==null?void 0:g.relatedInfo)==null?void 0:te.target)===l}))==null?void 0:O.map(h=>h==null?void 0:h.id):m=(I=(H=(P=fo.value)==null?void 0:P[gn.value])==null?void 0:H.filter(h=>{var E;return((E=h==null?void 0:h.key)==null?void 0:E.type)===r}))==null?void 0:I.map(h=>h==null?void 0:h.id);const C=m==null?void 0:m.filter(h=>!(L!=null&&L.includes(h))&&typeof h=="number");(ee==null?void 0:ee.length)>0&&await rt.batchAddInsofDataApi({dataList:ee}),($==null?void 0:$.length)>0&&await rt.batchUpdateInsofDataApi({dataList:$}),(C==null?void 0:C.length)>0&&await rt.batchDeleteInsofDataApi({ids:C})}catch(ee){throw new Error(ee)}},Hd=async a=>{var y,_,O,P,H,I,ee,$,F,L;un.setContentLoading(!0);const r=JSON.parse(D.cloneDeep(JSON.stringify(Md.value)));if(!zd.value)return un.setCacheStructures({key:Ld.value,data:r}),rt.ElMessage.success("已暂存");const i=r==null?void 0:r.map(m=>m.id),l=i.filter(m=>{var C;return!((C=$o.value)!=null&&C.includes(m))}),u=(y=$o.value)==null?void 0:y.filter(m=>!i.includes(m)),s=[...l,...u].filter(m=>typeof m!==null&&typeof m<"u"),k=r==null?void 0:r.filter(m=>!m.id),v=r==null?void 0:r.filter(m=>m.id);let p=[];if(s&&(s==null?void 0:s.length)>0&&p.push(io(s,"delete",a)),k&&(k==null?void 0:k.length)>0&&p.push(io(k,"create",a)),v&&(v==null?void 0:v.length)>0&&p.push(io(v,"update",a)),ta.value&&((_=ta.value)!=null&&_.isDelete&&((P=(O=ta.value)==null?void 0:O.results)==null?void 0:P.length)>0&&((I=(H=ta.value)==null?void 0:H.results)!=null&&I.every(m=>typeof m=="number"))?await rt.batchDeleteInsofDataApi({ids:(ee=ta.value)==null?void 0:ee.results}):(console.log("itemGridData.value",ta.value),p.push(await Uo(ta.value,"gridLayout")))),Oa.value)for(const m in Oa.value)p.push(await Uo(($=Oa.value)==null?void 0:$[m],"extend",{target:m,compId:(L=(F=Oa.value)==null?void 0:F[m])==null?void 0:L.compId},m));await Promise.all(p).then(()=>{rt.ElMessage.success("保存成功"),an.setRefreshCurStructure(!0)}).catch(m=>{rt.ElMessage.success(m)}),un.setContentLoading(!1)},Ka=a=>ra(a),Yt=e.ref([]),qd=e.computed(()=>{var a;return(a=Yt.value)==null?void 0:a.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),zl=e.computed(()=>{var a;return(a=Yt.value)==null?void 0:a.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),Rl=e.ref(0),Pl=e.ref(null),Wa=async(a,r="data",i)=>{var l,u;if((a==null?void 0:a.buttonName)==="新增"){let s=[{tableName:(l=a==null?void 0:a.relatedContents)==null?void 0:l.find(k=>k==null?void 0:k.includes("content")),tableContents:a==null?void 0:a.fixContent}];await Pn.pageBatchAddApi({platId:parseInt((u=ro==null?void 0:ro.value)==null?void 0:u.plat_id),changeContents:s})}an.setRefreshCurStructure(!0)},Ha=async(a,r)=>{},qa=async a=>{Yt.value=await Ve.getDeepDiffItems(a),an.setItemData(Yt.value),an.setOriginalData(Yt.value)};e.ref();const wa=e.ref(null),Xd=()=>{var a,r;console.log("倒计时结束时"),D.ElMessageBox.alert(`超时未提交,【${(r=(a=gn.value)==null?void 0:a.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=e.ref([]),Gd=e.computed(()=>{var a,r;return(r=(a=fo.value)==null?void 0:a[gn.value])==null?void 0:r.filter(i=>{var l;return((l=i==null?void 0:i.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Fd.value],()=>{oa.setSelectTitle([]),oa.setChooseTitle([])},{deep:!0});e.watch(()=>[jo.value],async()=>{var r,i;let a=(r=jo.value)==null?void 0:r.filter(l=>(l==null?void 0:l.condition)==="child"&&(l==null?void 0:l.value)!==""&&(l==null?void 0:l.parentContent)!==gn.value);if((a==null?void 0:a.length)>0){un.setContentLoading(!0);let l=gn.value+"/"+((i=a==null?void 0:a[0])==null?void 0:i.value),u=await Za(l,!0,{originPath:gn.value});Yt.value=await Ve.getDeepDiffItems(u),un.setContentLoading(!1)}});e.watch(()=>[gn.value,Rd.value],async a=>{var k,v,p;if(!gn.value)return;an.setLockingPage(""),Yt.value=[];let r=e.getCurrentInstance();(k=r==null?void 0:r.scope)==null||k.stop(),r=null,Ua.value=!1,un.setContentLoading(!0),Od.value=!0;let i=a==null?void 0:a[0],l=i,u=(v=Ml.value)==null?void 0:v.filter(y=>(y==null?void 0:y.condition)==="child"&&(y==null?void 0:y.value)!==""&&(y==null?void 0:y.parentContent)!==gn.value);(u==null?void 0:u.length)>0&&(i=i+"/"+((p=u==null?void 0:u[0])==null?void 0:p.value));let s=await Za(i,!0,{originPath:l});Yt.value=await Ve.getDeepDiffItems(s),un.setContentLoading(!1),an.setExtraContents([]),oa.setSelectIndex(""),oa.setSelectMenu(""),an.setItemData(Yt.value),an.setOriginalData(Yt.value),e.nextTick(()=>{va.value=va.value++,Ua.value=!0})},{immediate:!0});const Yd=async()=>{un.setLinkMenuInfo(null),un.setActiveMenuPath(Pd.value),Yt.value=null,an.setRouteToChildPath(""),un.setChildMenu("")},Jd=a=>new RegExp("button","i").test(a),Zd=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),Ll=a=>{if(Zd(a)){const r=a==null?void 0:a.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&un.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},$l=a=>{var r;wa.value&&(wa.value={...wa.value,mainKeyPropValue:a==null?void 0:a[(r=wa.value)==null?void 0:r.mainKeyProp]})},Qd=a=>{Rl.value=a},pa=e.reactive({index:0,comp:null}),ep=e.computed(()=>{var a;return(a=Yt.value)==null?void 0:a.map((r,i)=>({id:r.id,name:r.name,status:tp(r,i)}))}),jl=(a,r)=>{var p,y,_,O,P;const i=r?a:a-2,l=(p=Yt.value)==null?void 0:p[i],u=(_=(y=l==null?void 0:l.compData)==null?void 0:y.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:_.contents,s=u==null?void 0:u.findIndex(H=>(H==null?void 0:H.isMainKey)&&(H==null?void 0:H.label)!=="操作"),k=s===-1?0:s,v=(P=(O=l==null?void 0:l.compData)==null?void 0:O.find(H=>(H==null?void 0:H.key)==="tableContents"))==null?void 0:P.contents;return{valid:v==null?void 0:v.every(H=>H==null?void 0:H[k+1]),length:(v==null?void 0:v.length)||0}},tp=(a,r)=>{var l;let i="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:u,length:s}=jl(r,!0);pa.index===r?i="process":s===0?i="wait":i=u?"success":"error"}return i},Ul=a=>{var i,l,u,s,k;const r=a+1;if(r>1&&((u=(l=(i=Yt.value)==null?void 0:i[a])==null?void 0:l.comp)==null?void 0:u.toUpperCase())==="TABLE"){const{valid:v}=jl(r);v?(pa.index=r,pa.comp=(s=Yt.value)==null?void 0:s[a]):rt.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else pa.index=r,pa.comp=(k=Yt.value)==null?void 0:k[a]},Kl=e.computed(()=>{var a,r;return(r=(a=zl.value)==null?void 0:a[0])==null?void 0:r.isStepLayout});e.watch(()=>Kl.value,a=>{a&&Ul(0)},{immediate:!0});const np={class:"layout"},ap=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:r}){const i=r,l=a;e.onMounted(async()=>{});const u=e.computed(()=>D.cloneDeep(l==null?void 0:l.itemData)||[]),s=e.computed(()=>{var _;const y=(_=u==null?void 0:u.value)==null?void 0:_.find(O=>{const{key:P}=O;return P==="baseConfig"});return y==null?void 0:y.contents}),k=e.computed(()=>{var _;const y=(_=u==null?void 0:u.value)==null?void 0:_.find(O=>{const{key:P}=O;return P==="children"});return y==null?void 0:y.contents}),v=e.computed(()=>{let y=D.cloneDeep(k.value)||[];const _=y.length;let O=0;const P=[];if(y=y.map(H=>{const I=H.span;return I?(H.span=Number(I),O=O+H.span):P.push(H),H}),O<24){const H=Math.floor((24-O)/_);P.forEach(I=>{I.span=H})}return y}),p=y=>{i("rowClick",y)};return(y,_)=>{var H;const O=e.resolveComponent("el-col"),P=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",np,[e.createVNode(P,{style:e.normalizeStyle({height:(H=s.value)==null?void 0:H.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(I,ee)=>(e.openBlock(),e.createBlock(O,{span:I==null?void 0:I.span},{default:e.withCtx(()=>{var $;return[e.unref(Ua)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)(I.comp)),{key:e.unref(va),compName:I.name,index:(I==null?void 0:I.id)??ee,height:($=s.value)==null?void 0:$.height,itemData:I==null?void 0:I.compData,childItemData:I==null?void 0:I.itemChildData,onChange:e.unref(Wa),onContentChange:e.unref(Ha),onPageChange:e.unref(qa),onRowClick:p},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),op=Ft._export_sfc(ap,[["__scopeId","data-v-ab9a36ed"]]),lp={class:"layout-operate"},rp={class:"layout-module"},ip={class:"collapse-title-item"},sp={class:"collapse-title"},cp={class:"icon-content"},up=["onClick"],dp={class:"comp-child"},pp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:r}){const i=a,l=r;e.onMounted(()=>{ee()});const u=e.ref({}),s=e.ref({}),k=e.ref([]),v=h=>[{label:"高度",prop:"height",type:"input",value:h==null?void 0:h.height}],p=h=>{s.value=h,l("change",C(),!0)},y=e.ref([]),_=e.ref([]),O=h=>[{label:"占比",prop:"span",type:"input",value:h==null?void 0:h.span}],P=e.computed(()=>{const h=i==null?void 0:i.itemContents;return D.cloneDeep(h)}),H=e.computed(()=>{const h=P==null?void 0:P.value,E=h==null?void 0:h.find(g=>{const{key:te}=g;return te==="baseConfig"});return E==null?void 0:E.contents}),I=e.computed(()=>{const h=P==null?void 0:P.value,E=h==null?void 0:h.find(g=>{const{key:te}=g;return te==="children"});return E==null?void 0:E.contents}),ee=()=>{var h;u.value=P.value||{},y.value=(I==null?void 0:I.value)||[],k.value=v(),k.value=(h=k.value)==null?void 0:h.map(E=>{var te;const{prop:g}=E;return E.value=(te=H.value)==null?void 0:te[g],E})};e.watch(()=>{var h;return(h=I==null?void 0:I.value)==null?void 0:h.length},()=>{var h;y.value=(I==null?void 0:I.value)||[],_.value=(h=I.value)==null?void 0:h.map(E=>O(E))},{immediate:!0});const $=(h,E)=>{const g=D.cloneDeep(I==null?void 0:I.value);g[E].span=h.span,y.value=g,l("change",C(),!0)},F=h=>ra(h),L=(h,E,g)=>{if(!h)return;const te=D.cloneDeep(I==null?void 0:I.value);te[g]&&(te[g].compData=h,y.value=te,l("change",C(),!0))},m=h=>{D.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let E=D.cloneDeep(I==null?void 0:I.value);E=E==null?void 0:E.filter((g,te)=>h!==te),y.value=E,l("change",C(),!0),rt.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},C=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:y==null?void 0:y.value}]});return(h,E)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",lp,[e.createElementVNode("div",rp,[E[1]||(E[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(It.ssForm,{rowContents:k.value,isEnableWrap:!0,onChange:E[0]||(E[0]=te=>p(te))},null,8,["rowContents"])])]),e.createVNode(gl.default,{class:"collapse-content",collapseContents:I.value},{title:e.withCtx(({item:te,index:Te})=>[e.createElementVNode("div",ip,[e.createElementVNode("div",sp,e.toDisplayString(te.name),1),e.createElementVNode("div",cp,[e.createElementVNode("div",{onClick:e.withModifiers(Qe=>m(Te),["stop"]),class:"icon-content"},[e.createVNode(g,{name:"Delete",style:{width:"16px",height:"16px"}})],8,up)])])]),content:e.withCtx(({item:te,index:Te})=>[e.createElementVNode("div",dp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(It.ssForm,{rowContents:_.value[Te],key:Te,isEnableWrap:!0,onChange:Qe=>$(Qe,Te)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(F(te.comp+"Operate")),{itemContents:te==null?void 0:te.compData,originalItemContents:te.compData,onChange:Qe=>L(Qe,te,Te)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),fp=Ft._export_sfc(pp,[["__scopeId","data-v-ba05456e"]]),hp=typeof window<"u";var Ko;hp&&((Ko=window==null?void 0:window.navigator)!=null&&Ko.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cn(a){return a==null}function Wl(){}const vp=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(vp)));function gp(){const a=new Map;return{on(r,i){const l=a.get(r);l!=null&&l.add(i)||a.set(r,new Set([i]))},off(r,i){const l=a.get(r);l&&l.delete(i)},clear(r){const i=a.get(r);i&&i.clear()},clearAll(){a.clear()},emit(r,...i){const l=a.get(r);l&&l.forEach(u=>{u(...i)})}}}function Wo(a,r=16){if(typeof a!="function")return Wl;const i=(...s)=>{a(...s)};if(r<=0)return Hl(i);let l=0,u;return function(...s){const k=Date.now(),v=k-l;clearTimeout(u),v>=r?(l=k,i(...s)):u=setTimeout(()=>{l=Date.now(),i(...s)},Math.max(0,r-v))}}function mp(a,r=100){if(typeof a!="function")return Wl;const i=(...u)=>{a(...u)};if(r<=0)return Hl(i);let l;return function(...u){clearTimeout(l),l=setTimeout(()=>{i(...u)},r)}}function Hl(a){if(typeof a!="function")return a;let r=!1,i,l;return function(...u){return i=u,r||(r=!0,l=Promise.resolve().then(()=>(r=!1,l=void 0,a(...i)))),l}}const _a=new Set,ql=new WeakMap;function yp(){_a.forEach(a=>{a(...ql.get(a))}),_a.clear()}function nn(a,...r){if(typeof a!="function")return a;ql.set(a,r),!_a.has(a)&&(_a.add(a),_a.size===1&&Promise.resolve().then(yp))}const Xl=Symbol("LAYOUT_KEY"),Gl=Symbol("EMITTER_KEY");function bp(a){let r=0,i;for(let l=0,u=a.length;l<u;l++)i=a[l].y+a[l].h,i>r&&(r=i);return r}function vo(a){const r=Array(a.length);for(let i=0,l=a.length;i<l;i++)r[i]=kp(a[i]);return r}function kp(a){return{...a}}function Yl(a,r){return!(a===r||a.x+a.w<=r.x||a.x>=r.x+r.w||a.y+a.h<=r.y||a.y>=r.y+r.h)}function da(a,r,i){const l=Zl(a),u=Ql(a),s=Array(a.length);for(let k=0,v=u.length;k<v;k++){let p=u[k];p.static||(p=xp(l,p,r,i),l.push(p)),s[a.findIndex(y=>y.i===p.i)]=p,p.moved=!1}return s}function xp(a,r,i,l){if(i)for(;r.y>0&&!Ea(a,r);)r.y--;else if(l){const s=l[r.i].y;for(;r.y>s&&!Ea(a,r);)r.y--}let u;for(;u=Ea(a,r);)r.y=u.y+u.h;return r}function wp(a,r){const i=Zl(a);for(let l=0,u=a.length;l<u;l++){const s=a[l];if(s.x+s.w>r.cols&&(s.x=r.cols-s.w),s.x<0&&(s.x=0,s.w=r.cols),!s.static)i.push(s);else for(;Ea(i,s);)s.y++}return a}function Ho(a,r){for(let i=0,l=a.length;i<l;i++)if(a[i].i===r)return a[i]}function Ea(a,r){for(let i=0,l=a.length;i<l;i++)if(Yl(a[i],r))return a[i]}function Jl(a,r){return a.filter(i=>Yl(i,r))}function Zl(a){return a.filter(r=>r.static)}function go(a,r,i,l,u=!1,s=!1){if(r.static)return a;const k=r.x,v=r.y,p=l&&r.y>l;typeof i=="number"&&(r.x=i),typeof l=="number"&&(r.y=l),r.moved=!0;let y=Ql(a);p&&(y=y.reverse());const _=Jl(y,r);if(s&&_.length)return r.x=k,r.y=v,r.moved=!1,a;for(let O=0,P=_.length;O<P;O++){const H=_[O];H.moved||r.y>H.y&&r.y-H.y>H.h/4||(H.static?a=qo(a,H,r,u):a=qo(a,r,H,u))}return a}function qo(a,r,i,l){if(l){const u={x:i.x,y:i.y,w:i.w,h:i.h};if(u.y=Math.max(r.y-i.h,0),!Ea(a,u))return go(a,i,void 0,u.y,!1)}return go(a,i,void 0,i.y+1,!1)}function Dp(a,r,i,l){const u="translate3d("+r+"px,"+a+"px, 0)";return{transform:u,WebkitTransform:u,MozTransform:u,msTransform:u,OTransform:u,width:i+"px",height:l+"px",position:"absolute"}}function _p(a,r,i,l){const u="translate3d("+r*-1+"px,"+a+"px, 0)";return{transform:u,WebkitTransform:u,MozTransform:u,msTransform:u,OTransform:u,width:i+"px",height:l+"px",position:"absolute"}}function Ep(a,r,i,l){return{top:a+"px",left:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function Cp(a,r,i,l){return{top:a+"px",right:r+"px",width:i+"px",height:l+"px",position:"absolute"}}function Ql(a){return Array.from(a).sort(function(r,i){return r.y===i.y&&r.x===i.x?0:r.y>i.y||r.y===i.y&&r.x>i.x?1:-1})}function Sp(a,r){r=r||"Layout";const i=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(r+" must be an array!");for(let u=0,s=a.length;u<s;u++){const k=a[u];for(let v=0;v<i.length;v++)if(typeof k[i[v]]!="number")throw new Error("VueGridLayout: "+r+"["+u+"]."+i[v]+" must be a number!");if(k.i===void 0||k.i===null)throw new Error("VueGridLayout: "+r+"["+u+"].i cannot be null!");if(typeof k.i!="number"&&typeof k.i!="string")throw new Error("VueGridLayout: "+r+"["+u+"].i must be a string or number!");if(l.indexOf(k.i)>=0)throw new Error("VueGridLayout: "+r+"["+u+"].i must be unique!");if(l.push(k.i),k.static!==void 0&&typeof k.static!="boolean")throw new Error("VueGridLayout: "+r+"["+u+"].static must be a boolean!")}}function Tp(a,r="vgl"){const i=()=>`${r}-${a}`;return{b:i,be:l=>`${i()}__${l}`,bm:l=>`${i()}--${l}`,bem:(l,u)=>`${i()}__${l}--${u}`}}function Xo(a){return Bp(a)}function Bp(a){var r;const i=((r=a.target)==null?void 0:r.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:i.getBoundingClientRect(),u=a.clientX+i.scrollLeft-l.left,s=a.clientY+i.scrollTop-l.top;return{x:u,y:s}}function Go(a,r,i,l){return Ip(a)?{deltaX:i-a,deltaY:l-r,lastX:a,lastY:r,x:i,y:l}:{deltaX:0,deltaY:0,lastX:i,lastY:l,x:i,y:l}}function Ip(a){return typeof a=="number"&&!Number.isNaN(a)}function Np(a,r){const i=tr(a);let l=i[0];for(let u=1,s=i.length;u<s;u++){const k=i[u];r>a[k]&&(l=k)}return l}function er(a,r){if(!r[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return r[a]}function Ap(a,r,i,l,u,s,k){if(r[l])return vo(r[l]);let v=a;const p=tr(i),y=p.slice(p.indexOf(l));for(let _=0,O=y.length;_<O;_++){const P=y[_];if(r[P]){v=r[P];break}}return v=vo(v||[]),da(wp(v,{cols:s}),k)}function tr(a){return Object.keys(a).sort((r,i)=>a[r]-a[i])}let Vp="auto";function Op(){return typeof document<"u"}function Yo(){return Op()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Vp}var Da={exports:{}},Mp=Da.exports,Jo;function zp(){return Jo||(Jo=1,function(a,r){(function(i,l){a.exports=l()})(Mp,function(){function i(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(n);t&&(c=c.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),o.push.apply(o,c)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?i(Object(o),!0).forEach(function(c){p(n,c,o[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(c){Object.defineProperty(n,c,Object.getOwnPropertyDescriptor(o,c))})}return n}function u(n){return u=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},u(n)}function s(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function k(n,t){for(var o=0;o<t.length;o++){var c=t[o];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(n,ee(c.key),c)}}function v(n,t,o){return t&&k(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function p(n,t,o){return(t=ee(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function y(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&O(n,t)}function _(n){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_(n)}function O(n,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},O(n,t)}function P(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function H(n){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,c=_(n);if(t){var d=_(this).constructor;o=Reflect.construct(c,arguments,d)}else o=c.apply(this,arguments);return function(f,x){if(x&&(typeof x=="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P(f)}(this,o)}}function I(){return I=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var c=function(f,x){for(;!Object.prototype.hasOwnProperty.call(f,x)&&(f=_(f))!==null;);return f}(n,t);if(c){var d=Object.getOwnPropertyDescriptor(c,t);return d.get?d.get.call(arguments.length<3?n:o):d.value}},I.apply(this,arguments)}function ee(n){var t=function(o,c){if(typeof o!="object"||o===null)return o;var d=o[Symbol.toPrimitive];if(d!==void 0){var f=d.call(o,c);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var $=function(n){return!(!n||!n.Window)&&n instanceof n.Window},F=void 0,L=void 0;function m(n){F=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),L=n}function C(n){return $(n)?n:(n.ownerDocument||n).defaultView||L.window}typeof window<"u"&&window&&m(window);var h=function(n){return!!n&&u(n)==="object"},E=function(n){return typeof n=="function"},g={window:function(n){return n===L||$(n)},docFrag:function(n){return h(n)&&n.nodeType===11},object:h,func:E,number:function(n){return typeof n=="number"},bool:function(n){return typeof n=="boolean"},string:function(n){return typeof n=="string"},element:function(n){if(!n||u(n)!=="object")return!1;var t=C(n)||L;return/object|function/.test(typeof Element>"u"?"undefined":u(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return h(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return h(n)&&n.length!==void 0&&E(n.splice)}};function te(n){var t=n.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 Te(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var c=o.prepared.axis;if(c==="x"||c==="y"){var d=c==="x"?"y":"x";t.page[d]=o.coords.start.page[d],t.client[d]=o.coords.start.client[d],t.delta[d]=0}}}var Qe={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,c=n.defaults;o.prototype.draggable=Qe.draggable,t.map.drag=Qe,t.methodDict.drag="draggable",c.actions.drag=Qe.defaults},listeners:{"interactions:before-action-move":te,"interactions:action-resume":te,"interactions:action-move":Te,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,c=n.buttons,d=o.options.drag;if(d&&d.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(c&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:d.lockAxis==="start"?d.startAxis:d.lockAxis},!1}},draggable:function(n){return g.object(n)?(this.options.drag.enabled=n.enabled!==!1,this.setPerAction("drag",n),this.setOnEvents("drag",n),/^(xy|x|y|start)$/.test(n.lockAxis)&&(this.options.drag.lockAxis=n.lockAxis),/^(xy|x|y)$/.test(n.startAxis)&&(this.options.drag.startAxis=n.startAxis),this):g.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:te,move:Te,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},de=Qe,Be={init:function(n){var t=n;Be.document=t.document,Be.DocumentFragment=t.DocumentFragment||Oe,Be.SVGElement=t.SVGElement||Oe,Be.SVGSVGElement=t.SVGSVGElement||Oe,Be.SVGElementInstance=t.SVGElementInstance||Oe,Be.Element=t.Element||Oe,Be.HTMLElement=t.HTMLElement||Be.Element,Be.Event=t.Event,Be.Touch=t.Touch||Oe,Be.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 Oe(){}var z=Be,re={init:function(n){var t=z.Element,o=n.navigator||{};re.supportsTouch="ontouchstart"in n||g.func(n.DocumentTouch)&&z.document instanceof n.DocumentTouch,re.supportsPointerEvent=o.pointerEnabled!==!1&&!!z.PointerEvent,re.isIOS=/iP(hone|od|ad)/.test(o.platform),re.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),re.isIe9=/MSIE 9/.test(o.userAgent),re.isOperaMobile=o.appName==="Opera"&&re.supportsTouch&&/Presto/.test(o.userAgent),re.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",re.pEventTypes=re.supportsPointerEvent?z.PointerEvent===n.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,re.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},le=re;function fe(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function $e(n,t){for(;g.element(n);){if(X(n,t))return n;n=tt(n)}return null}function tt(n){var t=n.parentNode;if(g.docFrag(t)){for(;(t=t.host)&&g.docFrag(t););return t}return t}function X(n,t){return L!==F&&(t=t.replace(/\/deep\//g," ")),n[le.prefixedMatchesSelector](t)}var M=function(n){return n.parentNode||n.host};function ie(n,t){for(var o,c=[],d=n;(o=M(d))&&d!==t&&o!==d.ownerDocument;)c.unshift(d),d=o;return c}function J(n,t,o){for(;g.element(n);){if(X(n,t))return!0;if((n=tt(n))===o)return X(n,t)}return!1}function ve(n){return n.correspondingUseElement||n}function we(n){var t=n instanceof z.SVGElement?n.getBoundingClientRect():n.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 Ee(n){var t,o=we(n);if(!le.isIOS7&&o){var c={x:(t=(t=C(n))||L).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=c.x,o.right+=c.x,o.top+=c.y,o.bottom+=c.y}return o}function ne(n){for(var t=[];n;)t.push(n),n=tt(n);return t}function ke(n){return!!g.string(n)&&(z.document.querySelector(n),!0)}function T(n,t){for(var o in t)n[o]=t[o];return n}function Ge(n,t,o){return n==="parent"?tt(o):n==="self"?t.getRect(o):$e(o,n)}function Ye(n,t,o,c){var d=n;return g.string(d)?d=Ge(d,t,o):g.func(d)&&(d=d.apply(void 0,c)),g.element(d)&&(d=Ee(d)),d}function Ae(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ce(n){return!n||"x"in n&&"y"in n||((n=T({},n)).x=n.left||0,n.y=n.top||0,n.width=n.width||(n.right||0)-n.x,n.height=n.height||(n.bottom||0)-n.y),n}function ae(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function pe(n,t,o){var c=o&&n.options[o];return Ae(Ye(c&&c.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Ce(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(V){return!0},c=arguments.length>3?arguments[3]:void 0;if(c=c||{},g.string(n)&&n.search(" ")!==-1&&(n=qe(n)),g.array(n))return n.forEach(function(V){return Ce(V,t,o,c)}),c;if(g.object(n)&&(t=n,n=""),g.func(t)&&o(n))c[n]=c[n]||[],c[n].push(t);else if(g.array(t))for(var d=0,f=t;d<f.length;d++){var x=f[d];Ce(n,x,o,c)}else if(g.object(t))for(var w in t)Ce(qe(w).map(function(V){return"".concat(n).concat(V)}),t[w],o,c);return c}function qe(n){return n.trim().split(/ +/)}var dt=function(n,t){return Math.sqrt(n*n+t*t)},b=["webkit","moz"];function N(n,t){n.__set||(n.__set={});var o=function(d){if(b.some(function(f){return d.indexOf(f)===0}))return 1;typeof n[d]!="function"&&d!=="__set"&&Object.defineProperty(n,d,{get:function(){return d in n.__set?n.__set[d]:n.__set[d]=t[d]},set:function(f){n.__set[d]=f},configurable:!0})};for(var c in t)o(c);return n}function W(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function Z(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function S(n){return n instanceof z.Event||n instanceof z.Touch}function se(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function Me(n,t){return t=t||{x:0,y:0},le.isOperaMobile&&S(n)?(se("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):se("page",n,t),t}function A(n){return g.number(n.pointerId)?n.pointerId:n.identifier}function oe(n,t,o){var c=t.length>1?q(t):t[0];Me(c,n.page),function(d,f){f=f||{},le.isOperaMobile&&S(d)?se("screen",d,f):se("client",d,f)}(c,n.client),n.timeStamp=o}function U(n){var t=[];return g.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function q(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var c=n[o];for(var d in t)t[d]+=c[d]}for(var f in t)t[f]/=n.length;return t}function Se(n){if(!n.length)return null;var t=U(n),o=Math.min(t[0].pageX,t[1].pageX),c=Math.min(t[0].pageY,t[1].pageY),d=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:c,left:o,top:c,right:d,bottom:f,width:d-o,height:f-c}}function ue(n,t){var o=t+"X",c=t+"Y",d=U(n),f=d[0][o]-d[1][o],x=d[0][c]-d[1][c];return dt(f,x)}function G(n,t){var o=t+"X",c=t+"Y",d=U(n),f=d[1][o]-d[0][o],x=d[1][c]-d[0][c];return 180*Math.atan2(x,f)/Math.PI}function Q(n){return g.string(n.pointerType)?n.pointerType:g.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof z.Touch?"touch":"mouse"}function he(n){var t=g.func(n.composedPath)?n.composedPath():n.path;return[ve(t?t[0]:n.target),ve(n.currentTarget)]}var ye=function(){function n(t){s(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(ye.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var _e=function(n,t){for(var o=0;o<t.length;o++){var c=t[o];n.push(c)}return n},xe=function(n){return _e([],n)},K=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},Re=function(n,t){return n[K(n,t)]},be=function(n){y(o,n);var t=H(o);function o(c,d,f){var x;s(this,o),(x=t.call(this,d._interaction)).dropzone=void 0,x.dragEvent=void 0,x.relatedTarget=void 0,x.draggable=void 0,x.propagationStopped=!1,x.immediatePropagationStopped=!1;var w=f==="dragleave"?c.prev:c.cur,V=w.element,j=w.dropzone;return x.type=f,x.target=V,x.currentTarget=V,x.dropzone=j,x.dragEvent=d,x.relatedTarget=d.target,x.draggable=d.interactable,x.timeStamp=d.timeStamp,x}return v(o,[{key:"reject",value:function(){var c=this,d=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&d.cur.dropzone===this.dropzone&&d.cur.element===this.target)if(d.prev.dropzone=this.dropzone,d.prev.element=this.target,d.rejected=!0,d.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=d.activeDrops,x=K(f,function(V){var j=V.dropzone,R=V.element;return j===c.dropzone&&R===c.target});d.activeDrops.splice(x,1);var w=new o(d,this.dragEvent,"dropdeactivate");w.dropzone=this.dropzone,w.target=this.target,this.dropzone.fire(w)}else this.dropzone.fire(new o(d,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(ye);function Ke(n,t){for(var o=0,c=n.slice();o<c.length;o++){var d=c[o],f=d.dropzone,x=d.element;t.dropzone=f,t.target=x,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function ot(n,t){for(var o=function(f,x){for(var w=[],V=0,j=f.interactables.list;V<j.length;V++){var R=j[V];if(R.options.drop.enabled){var Y=R.options.drop.accept;if(!(g.element(Y)&&Y!==x||g.string(Y)&&!X(x,Y)||g.func(Y)&&!Y({dropzone:R,draggableElement:x})))for(var De=0,Le=R.getAllElements();De<Le.length;De++){var Pe=Le[De];Pe!==x&&w.push({dropzone:R,element:Pe,rect:R.getRect(Pe)})}}}return w}(n,t),c=0;c<o.length;c++){var d=o[c];d.rect=d.dropzone.getRect(d.element)}return o}function je(n,t,o){for(var c=n.dropState,d=n.interactable,f=n.element,x=[],w=0,V=c.activeDrops;w<V.length;w++){var j=V[w],R=j.dropzone,Y=j.element,De=j.rect,Le=R.dropCheck(t,o,d,f,Y,De);x.push(Le?Y:null)}var Pe=function(He){for(var lt,nt,ht,Ct=[],At=0;At<He.length;At++){var kt=He[At],St=He[lt];if(kt&&At!==lt)if(St){var tn=M(kt),jt=M(St);if(tn!==kt.ownerDocument)if(jt!==kt.ownerDocument)if(tn!==jt){Ct=Ct.length?Ct:ie(St);var sn=void 0;if(St instanceof z.HTMLElement&&kt instanceof z.SVGElement&&!(kt instanceof z.SVGSVGElement)){if(kt===jt)continue;sn=kt.ownerSVGElement}else sn=kt;for(var vn=ie(sn,St.ownerDocument),_n=0;vn[_n]&&vn[_n]===Ct[_n];)_n++;var Va=[vn[_n-1],vn[_n],Ct[_n]];if(Va[0])for(var ba=Va[0].lastChild;ba;){if(ba===Va[1]){lt=At,Ct=vn;break}if(ba===Va[2])break;ba=ba.previousSibling}}else ht=St,(parseInt(C(nt=kt).getComputedStyle(nt).zIndex,10)||0)>=(parseInt(C(ht).getComputedStyle(ht).zIndex,10)||0)&&(lt=At);else lt=At}else lt=At}return lt}(x);return c.activeDrops[Pe]||null}function at(n,t,o){var c=n.dropState,d={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(d.activate=new be(c,o,"dropactivate"),d.activate.target=null,d.activate.dropzone=null),o.type==="dragend"&&(d.deactivate=new be(c,o,"dropdeactivate"),d.deactivate.target=null,d.deactivate.dropzone=null),c.rejected||(c.cur.element!==c.prev.element&&(c.prev.dropzone&&(d.leave=new be(c,o,"dragleave"),o.dragLeave=d.leave.target=c.prev.element,o.prevDropzone=d.leave.dropzone=c.prev.dropzone),c.cur.dropzone&&(d.enter=new be(c,o,"dragenter"),o.dragEnter=c.cur.element,o.dropzone=c.cur.dropzone)),o.type==="dragend"&&c.cur.dropzone&&(d.drop=new be(c,o,"drop"),o.dropzone=c.cur.dropzone,o.relatedTarget=c.cur.element),o.type==="dragmove"&&c.cur.dropzone&&(d.move=new be(c,o,"dropmove"),o.dropzone=c.cur.dropzone)),d}function Ne(n,t){var o=n.dropState,c=o.activeDrops,d=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&d.dropzone.fire(t.enter),t.move&&d.dropzone.fire(t.move),t.drop&&d.dropzone.fire(t.drop),t.deactivate&&Ke(c,t.deactivate),o.prev.dropzone=d.dropzone,o.prev.element=d.element}function gt(n,t){var o=n.interaction,c=n.iEvent,d=n.event;if(c.type==="dragmove"||c.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=ot(t,o.element));var x=c,w=je(o,x,d);f.rejected=f.rejected&&!!w&&w.dropzone===f.cur.dropzone&&w.element===f.cur.element,f.cur.dropzone=w&&w.dropzone,f.cur.element=w&&w.element,f.events=at(o,0,x)}}var et={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,c=n.Interactable,d=n.defaults;n.usePlugin(de),c.prototype.dropzone=function(f){return function(x,w){if(g.object(w)){if(x.options.drop.enabled=w.enabled!==!1,w.listeners){var V=Ce(w.listeners),j=Object.keys(V).reduce(function(Y,De){return Y[/^(enter|leave)/.test(De)?"drag".concat(De):/^(activate|deactivate|move)/.test(De)?"drop".concat(De):De]=V[De],Y},{}),R=x.options.drop.listeners;R&&x.off(R),x.on(j),x.options.drop.listeners=j}return g.func(w.ondrop)&&x.on("drop",w.ondrop),g.func(w.ondropactivate)&&x.on("dropactivate",w.ondropactivate),g.func(w.ondropdeactivate)&&x.on("dropdeactivate",w.ondropdeactivate),g.func(w.ondragenter)&&x.on("dragenter",w.ondragenter),g.func(w.ondragleave)&&x.on("dragleave",w.ondragleave),g.func(w.ondropmove)&&x.on("dropmove",w.ondropmove),/^(pointer|center)$/.test(w.overlap)?x.options.drop.overlap=w.overlap:g.number(w.overlap)&&(x.options.drop.overlap=Math.max(Math.min(1,w.overlap),0)),"accept"in w&&(x.options.drop.accept=w.accept),"checker"in w&&(x.options.drop.checker=w.checker),x}return g.bool(w)?(x.options.drop.enabled=w,x):x.options.drop}(this,f)},c.prototype.dropCheck=function(f,x,w,V,j,R){return function(Y,De,Le,Pe,He,lt,nt){var ht=!1;if(!(nt=nt||Y.getRect(lt)))return!!Y.options.drop.checker&&Y.options.drop.checker(De,Le,ht,Y,lt,Pe,He);var Ct=Y.options.drop.overlap;if(Ct==="pointer"){var At=pe(Pe,He,"drag"),kt=Me(De);kt.x+=At.x,kt.y+=At.y;var St=kt.x>nt.left&&kt.x<nt.right,tn=kt.y>nt.top&&kt.y<nt.bottom;ht=St&&tn}var jt=Pe.getRect(He);if(jt&&Ct==="center"){var sn=jt.left+jt.width/2,vn=jt.top+jt.height/2;ht=sn>=nt.left&&sn<=nt.right&&vn>=nt.top&&vn<=nt.bottom}return jt&&g.number(Ct)&&(ht=Math.max(0,Math.min(nt.right,jt.right)-Math.max(nt.left,jt.left))*Math.max(0,Math.min(nt.bottom,jt.bottom)-Math.max(nt.top,jt.top))/(jt.width*jt.height)>=Ct),Y.options.drop.checker&&(ht=Y.options.drop.checker(De,Le,ht,Y,lt,Pe,He)),ht}(this,f,x,w,V,j,R)},o.dynamicDrop=function(f){return g.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},T(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,d.actions.drop=et.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.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(n,t){var o=n.interaction,c=(n.event,n.iEvent);if(o.prepared.name==="drag"){var d=o.dropState;d.activeDrops=[],d.events={},d.activeDrops=ot(t,o.element),d.events=at(o,0,c),d.events.activate&&(Ke(d.activeDrops,d.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:c}))}},"interactions:action-move":gt,"interactions:after-action-move":function(n,t){var o=n.interaction,c=n.iEvent;if(o.prepared.name==="drag"){var d=o.dropState;Ne(o,d.events),t.fire("actions/drop:move",{interaction:o,dragEvent:c}),d.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,c=n.iEvent;gt(n,t),Ne(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:c})}},"interactions:stop":function(n){var t=n.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:ot,getDrop:je,getDropEvents:at,fireDropEvents:Ne,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ze=et;function it(n){var t=n.interaction,o=n.iEvent,c=n.phase;if(t.prepared.name==="gesture"){var d=t.pointers.map(function(j){return j.pointer}),f=c==="start",x=c==="end",w=t.interactable.options.deltaSource;if(o.touches=[d[0],d[1]],f)o.distance=ue(d,w),o.box=Se(d),o.scale=1,o.ds=0,o.angle=G(d,w),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(x||t.pointers.length<2){var V=t.prevEvent;o.distance=V.distance,o.box=V.box,o.scale=V.scale,o.ds=0,o.angle=V.angle,o.da=0}else o.distance=ue(d,w),o.box=Se(d),o.scale=o.distance/t.gesture.startDistance,o.angle=G(d,w),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,g.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var mt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,c=n.defaults;o.prototype.gesturable=function(d){return g.object(d)?(this.options.gesture.enabled=d.enabled!==!1,this.setPerAction("gesture",d),this.setOnEvents("gesture",d),this):g.bool(d)?(this.options.gesture.enabled=d,this):this.options.gesture},t.map.gesture=mt,t.methodDict.gesture="gesturable",c.actions.gesture=mt.defaults},listeners:{"interactions:action-start":it,"interactions:action-move":it,"interactions:action-end":it,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},Je=mt;function Ue(n,t,o,c,d,f,x){if(!t)return!1;if(t===!0){var w=g.number(f.width)?f.width:f.right-f.left,V=g.number(f.height)?f.height:f.bottom-f.top;if(x=Math.min(x,Math.abs((n==="left"||n==="right"?w:V)/2)),w<0&&(n==="left"?n="right":n==="right"&&(n="left")),V<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var j=w>=0?f.left:f.right;return o.x<j+x}if(n==="top"){var R=V>=0?f.top:f.bottom;return o.y<R+x}if(n==="right")return o.x>(w>=0?f.right:f.left)-x;if(n==="bottom")return o.y>(V>=0?f.bottom:f.top)-x}return!!g.element(c)&&(g.element(t)?t===c:J(c,t,d))}function Nt(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var c=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?c.delta.x=c.delta.y:c.delta.y=c.delta.x,c.axes="xy"):(c.axes=o.resizeAxes,o.resizeAxes==="x"?c.delta.y=0:o.resizeAxes==="y"&&(c.delta.x=0))}}var Ie,Xe,Fe={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,c=n.Interactable,d=n.defaults;Fe.cursors=function(f){return f.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),Fe.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,c.prototype.resizable=function(f){return function(x,w,V){return g.object(w)?(x.options.resize.enabled=w.enabled!==!1,x.setPerAction("resize",w),x.setOnEvents("resize",w),g.string(w.axis)&&/^x$|^y$|^xy$/.test(w.axis)?x.options.resize.axis=w.axis:w.axis===null&&(x.options.resize.axis=V.defaults.actions.resize.axis),g.bool(w.preserveAspectRatio)?x.options.resize.preserveAspectRatio=w.preserveAspectRatio:g.bool(w.square)&&(x.options.resize.square=w.square),x):g.bool(w)?(x.options.resize.enabled=w,x):x.options.resize}(this,f,n)},t.map.resize=Fe,t.methodDict.resize="resizable",d.actions.resize=Fe.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,c=t.interaction;if(c.prepared.name==="resize"&&c.prepared.edges){var d=o,f=c.rect;c._rects={start:T({},f),corrected:T({},f),previous:T({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},d.edges=c.prepared.edges,d.rect=c._rects.corrected,d.deltaRect=c._rects.delta}})(n),Nt(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,c=t.interaction;if(c.prepared.name==="resize"&&c.prepared.edges){var d=o,f=c.interactable.options.resize.invert,x=f==="reposition"||f==="negate",w=c.rect,V=c._rects,j=V.start,R=V.corrected,Y=V.delta,De=V.previous;if(T(De,R),x){if(T(R,w),f==="reposition"){if(R.top>R.bottom){var Le=R.top;R.top=R.bottom,R.bottom=Le}if(R.left>R.right){var Pe=R.left;R.left=R.right,R.right=Pe}}}else R.top=Math.min(w.top,j.bottom),R.bottom=Math.max(w.bottom,j.top),R.left=Math.min(w.left,j.right),R.right=Math.max(w.right,j.left);for(var He in R.width=R.right-R.left,R.height=R.bottom-R.top,R)Y[He]=R[He]-De[He];d.edges=c.prepared.edges,d.rect=R,d.deltaRect=Y}})(n),Nt(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var c=t;c.edges=o.prepared.edges,c.rect=o._rects.corrected,c.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,c=n.element,d=n.rect,f=n.buttons;if(d){var x=T({},t.coords.cur.page),w=o.options.resize;if(w&&w.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&w.mouseButtons)!=0)){if(g.object(w.edges)){var V={left:!1,right:!1,top:!1,bottom:!1};for(var j in V)V[j]=Ue(j,w.edges[j],x,t._latestPointer.eventTarget,c,d,w.margin||Fe.defaultMargin);V.left=V.left&&!V.right,V.top=V.top&&!V.bottom,(V.left||V.right||V.top||V.bottom)&&(n.action={name:"resize",edges:V})}else{var R=w.axis!=="y"&&x.x>d.right-Fe.defaultMargin,Y=w.axis!=="x"&&x.y>d.bottom-Fe.defaultMargin;(R||Y)&&(n.action={name:"resize",axes:(R?"x":"")+(Y?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,c=n.name,d=Fe.cursors,f=null;if(o)f=d[c+o];else if(t){for(var x="",w=0,V=["top","bottom","left","right"];w<V.length;w++){var j=V[w];t[j]&&(x+=j)}f=d[x]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Ze=Fe,B={id:"actions",install:function(n){n.usePlugin(Je),n.usePlugin(Ze),n.usePlugin(de),n.usePlugin(ze)}},ge=0,We={request:function(n){return Ie(n)},cancel:function(n){return Xe(n)},init:function(n){if(Ie=n.requestAnimationFrame,Xe=n.cancelAnimationFrame,!Ie)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var c=t[o];Ie=n["".concat(c,"RequestAnimationFrame")],Xe=n["".concat(c,"CancelAnimationFrame")]||n["".concat(c,"CancelRequestAnimationFrame")]}Ie=Ie&&Ie.bind(n),Xe=Xe&&Xe.bind(n),Ie||(Ie=function(d){var f=Date.now(),x=Math.max(0,16-(f-ge)),w=n.setTimeout(function(){d(f+x)},x);return ge=f+x,w},Xe=function(d){return clearTimeout(d)})}},me={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(n){me.isScrolling=!0,We.cancel(me.i),n.autoScroll=me,me.interaction=n,me.prevTime=me.now(),me.i=We.request(me.scroll)},stop:function(){me.isScrolling=!1,me.interaction&&(me.interaction.autoScroll=null),We.cancel(me.i)},scroll:function(){var n=me.interaction,t=n.interactable,o=n.element,c=n.prepared.name,d=t.options[c].autoScroll,f=ut(d.container,t,o),x=me.now(),w=(x-me.prevTime)/1e3,V=d.speed*w;if(V>=1){var j={x:me.x*V,y:me.y*V};if(j.x||j.y){var R=st(f);g.window(f)?f.scrollBy(j.x,j.y):f&&(f.scrollLeft+=j.x,f.scrollTop+=j.y);var Y=st(f),De={x:Y.x-R.x,y:Y.y-R.y};(De.x||De.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:De,interaction:n,container:f})}me.prevTime=x}me.isScrolling&&(We.cancel(me.i),me.i=We.request(me.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&me.check(t.interactable,t.prepared.name))if(t.simulation)me.x=me.y=0;else{var c,d,f,x,w=t.interactable,V=t.element,j=t.prepared.name,R=w.options[j].autoScroll,Y=ut(R.container,w,V);if(g.window(Y))x=o.clientX<me.margin,c=o.clientY<me.margin,d=o.clientX>Y.innerWidth-me.margin,f=o.clientY>Y.innerHeight-me.margin;else{var De=we(Y);x=o.clientX<De.left+me.margin,c=o.clientY<De.top+me.margin,d=o.clientX>De.right-me.margin,f=o.clientY>De.bottom-me.margin}me.x=d?1:x?-1:0,me.y=f?1:c?-1:0,me.isScrolling||(me.margin=R.margin,me.speed=R.speed,me.start(t))}}};function ut(n,t,o){return(g.string(n)?Ge(n,t,o):n)||C(o)}function st(n){return g.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var xt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=me,me.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=me.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,me.stop(),me.interaction&&(me.interaction=null)},"interactions:stop":me.stop,"interactions:action-move":function(n){return me.onInteractionMove(n)}}},pt=xt;function ct(n,t){var o=!1;return function(){return o||(L.console.warn(t),o=!0),n.apply(this,arguments)}}function ft(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function wt(n){return g.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Tt(n){return g.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ut={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,c,d,f){var x=function(w,V,j,R,Y){var De=w.getRect(R),Le=V.buttons||{0:1,1:4,3:8,4:16}[V.button],Pe={action:null,interactable:w,interaction:j,element:R,rect:De,buttons:Le};return Y.fire("auto-start:check",Pe),Pe.action}(this,c,d,f,n);return this.options.actionChecker?this.options.actionChecker(o,c,x,this,f,d):x},t.prototype.ignoreFrom=ct(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=ct(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Tt,t.prototype.styleCursor=wt}};function vt(n,t,o,c,d){return t.testIgnoreAllow(t.options[n.name],o,c)&&t.options[n.name].enabled&&qt(t,o,n,d)?n:null}function zt(n,t,o,c,d,f,x){for(var w=0,V=c.length;w<V;w++){var j=c[w],R=d[w],Y=j.getAction(t,o,n,R);if(Y){var De=vt(Y,j,R,f,x);if(De)return{action:De,interactable:j,element:R}}}return{action:null,interactable:null,element:null}}function $t(n,t,o,c,d){var f=[],x=[],w=c;function V(R){f.push(R),x.push(w)}for(;g.element(w);){f=[],x=[],d.interactables.forEachMatch(w,V);var j=zt(n,t,o,f,x,c,d);if(j.action&&!j.interactable.options[j.action.name].manualStart)return j;w=tt(w)}return{action:null,interactable:null,element:null}}function Kt(n,t,o){var c=t.action,d=t.interactable,f=t.element;c=c||{name:null},n.interactable=d,n.element=f,ft(n.prepared,c),n.rect=d&&c.name?d.getRect(f):null,Tn(n,o),o.fire("autoStart:prepared",{interaction:n})}function qt(n,t,o,c){var d=n.options,f=d[o.name].max,x=d[o.name].maxPerElement,w=c.autoStart.maxInteractions,V=0,j=0,R=0;if(!(f&&x&&w))return!1;for(var Y=0,De=c.interactions.list;Y<De.length;Y++){var Le=De[Y],Pe=Le.prepared.name;if(Le.interacting()&&(++V>=w||Le.interactable===n&&((j+=Pe===o.name?1:0)>=f||Le.element===t&&(R++,Pe===o.name&&R>=x))))return!1}return w>0}function Qt(n,t){return g.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function Lt(n,t,o){var c=o.autoStart.cursorElement;c&&c!==n&&(c.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function Tn(n,t){var o=n.interactable,c=n.element,d=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(d.name){var x=o.options[d.name].cursorChecker;f=g.func(x)?x(d,o,c,n._interacting):t.actions.map[d.name].getCursor(d)}Lt(n.element,f||"",t)}else t.autoStart.cursorElement&&Lt(t.autoStart.cursorElement,"",t)}var Fn={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(Ut),o.base.actionChecker=null,o.base.styleCursor=!0,T(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(c){return Qt(c,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,c=n.pointer,d=n.event,f=n.eventTarget;o.interacting()||Kt(o,$t(o,c,d,f,t),t)},"interactions:move":function(n,t){(function(o,c){var d=o.interaction,f=o.pointer,x=o.event,w=o.eventTarget;d.pointerType!=="mouse"||d.pointerIsDown||d.interacting()||Kt(d,$t(d,f,x,w,c),c)})(n,t),function(o,c){var d=o.interaction;if(d.pointerIsDown&&!d.interacting()&&d.pointerWasMoved&&d.prepared.name){c.fire("autoStart:before-start",o);var f=d.interactable,x=d.prepared.name;x&&f&&(f.options[x].manualStart||!qt(f,d.element,d.prepared,c)?d.stop():(d.start(d.prepared,f,d.element),Tn(d,c)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,c=o.interactable;c&&c.options.styleCursor&&Lt(o.element,"",t)}},maxInteractions:Qt,withinInteractionLimit:qt,validateAction:vt},kn=Fn,Ln={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,c=n.eventTarget,d=n.dx,f=n.dy;if(o.prepared.name==="drag"){var x=Math.abs(d),w=Math.abs(f),V=o.interactable.options.drag,j=V.startAxis,R=x>w?"x":x<w?"y":"xy";if(o.prepared.axis=V.lockAxis==="start"?R[0]:V.lockAxis,R!=="xy"&&j!=="xy"&&j!==R){o.prepared.name=null;for(var Y=c,De=function(Pe){if(Pe!==o.interactable){var He=o.interactable.options.drag;if(!He.manualStart&&Pe.testIgnoreAllow(He,Y,c)){var lt=Pe.getAction(o.downPointer,o.downEvent,o,Y);if(lt&<.name==="drag"&&function(nt,ht){if(!ht)return!1;var Ct=ht.options.drag.startAxis;return nt==="xy"||Ct==="xy"||Ct===nt}(R,Pe)&&kn.validateAction(lt,Pe,Y,c,t))return Pe}}};g.element(Y);){var Le=t.interactables.forEachMatch(Y,De);if(Le){o.prepared.name="drag",o.interactable=Le,o.element=Y;break}Y=tt(Y)}}}}}};function xn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var $n={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(kn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=xn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;xn(t)>0&&(t.prepared.name=null)}},getHoldDuration:xn},jn=$n,Un={id:"auto-start",install:function(n){n.usePlugin(kn),n.usePlugin(jn),n.usePlugin(Ln)}},Kn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):g.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Wn(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Bn={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Kn,t.prototype.checkAndPreventDefault=function(o){return function(c,d,f){var x=c.options.preventDefault;if(x!=="never")if(x!=="always"){if(d.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var w=C(f.target).document,V=d.getDocOptions(w);if(!V||!V.events||V.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||g.element(f.target)&&X(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var c=0,d=n.interactions.list;c<d.length;c++){var f=d[c];if(f.element&&(f.element===o.target||fe(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Wn,n},{})};function mn(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function dn(n){var t={};for(var o in n){var c=n[o];g.plainObject(c)?t[o]=dn(c):g.array(c)?t[o]=xe(c):t[o]=c}return t}var wn=function(){function n(t){s(this,n),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=yn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var c,d,f=t.phase,x=this.interaction,w=function(j){var R=j.interactable.options[j.prepared.name],Y=R.modifiers;return Y&&Y.length?Y:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(De){var Le=R[De];return Le&&Le.enabled&&{options:Le,methods:Le._methods}}).filter(function(De){return!!De})}(x);this.prepareStates(w),this.startEdges=T({},x.edges),this.edges=T({},this.startEdges),this.startOffset=(c=x.rect,d=o,c?{left:d.x-c.left,top:d.y-c.top,right:c.right-d.x,bottom:c.bottom-d.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var V=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=yn(),this.startAll(V),this.result=this.setAll(V)}},{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,c=this.states;o<c.length;o++){var d=c[o];d.methods.start&&(t.state=d,d.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,c=t.preEnd,d=t.skipModifiers,f=t.rect,x=t.edges;t.coords=T({},t.pageCoords),t.rect=T({},f),t.edges=T({},x);for(var w=d?this.states.slice(d):this.states,V=yn(t.coords,t.rect),j=0;j<w.length;j++){var R,Y=w[j],De=Y.options,Le=T({},t.coords),Pe=null;(R=Y.methods)!=null&&R.set&&this.shouldDo(De,c,o)&&(t.state=Y,Pe=Y.methods.set(t),ae(t.edges,t.rect,{x:t.coords.x-Le.x,y:t.coords.y-Le.y})),V.eventProps.push(Pe)}T(this.edges,t.edges),V.delta.x=t.coords.x-t.pageCoords.x,V.delta.y=t.coords.y-t.pageCoords.y,V.rectDelta.left=t.rect.left-f.left,V.rectDelta.right=t.rect.right-f.right,V.rectDelta.top=t.rect.top-f.top,V.rectDelta.bottom=t.rect.bottom-f.bottom;var He=this.result.coords,lt=this.result.rect;if(He&<){var nt=V.rect.left!==lt.left||V.rect.right!==lt.right||V.rect.top!==lt.top||V.rect.bottom!==lt.bottom;V.changed=nt||He.x!==V.coords.x||He.y!==V.coords.y}return V}},{key:"applyToInteraction",value:function(t){var o=this.interaction,c=t.phase,d=o.coords.cur,f=o.coords.start,x=this.result,w=this.startDelta,V=x.delta;c==="start"&&T(this.startDelta,x.delta);for(var j=0,R=[[f,w],[d,V]];j<R.length;j++){var Y=R[j],De=Y[0],Le=Y[1];De.page.x+=Le.x,De.page.y+=Le.y,De.client.x+=Le.x,De.client.y+=Le.y}var Pe=this.result.rectDelta,He=t.rect||o.rect;He.left+=Pe.left,He.right+=Pe.right,He.top+=Pe.top,He.bottom+=Pe.bottom,He.width=He.right-He.left,He.height=He.bottom-He.top}},{key:"setAndApply",value:function(t){var o=this.interaction,c=t.phase,d=t.preEnd,f=t.skipModifiers,x=this.setAll(this.fillArg({preEnd:d,phase:c,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=x,!x.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var w=o.coords.cur.page,V={x:t.modifiedCoords.x-w.x,y:t.modifiedCoords.y-w.y};x.coords.x+=V.x,x.coords.y+=V.y,x.delta.x+=V.x,x.delta.y+=V.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,c=t.event,d=this.states;if(d&&d.length){for(var f=!1,x=0;x<d.length;x++){var w=d[x];t.state=w;var V=w.options,j=w.methods,R=j.beforeEnd&&j.beforeEnd(t);if(R)return this.endResult=R,!1;f=f||!f&&this.shouldDo(V,!0,t.phase,!0)}f&&o.move({event:c,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var c=T({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(c);for(var d=0,f=this.states;d<f.length;d++){var x=f[d];c.state=x,x.methods.stop&&x.methods.stop(c)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var c=t[o],d=c.options,f=c.methods,x=c.name;this.states.push({options:d,methods:f,index:o,name:x})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,c=o.coords,d=o.rect,f=o.modification;if(f.result){for(var x=f.startDelta,w=f.result,V=w.delta,j=w.rectDelta,R=0,Y=[[c.start,x],[c.cur,V]];R<Y.length;R++){var De=Y[R],Le=De[0],Pe=De[1];Le.page.x-=Pe.x,Le.page.y-=Pe.y,Le.client.x-=Pe.x,Le.client.y-=Pe.y}d.left-=j.left,d.right-=j.right,d.top-=j.top,d.bottom-=j.bottom}}},{key:"shouldDo",value:function(t,o,c,d){return!(!t||t.enabled===!1||d&&!t.endOnly||t.endOnly&&!o||c==="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 dn(o)}),this.result=yn(T({},t.result.coords),T({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function yn(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function on(n,t){var o=n.defaults,c={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},d=function(f){var x=f||{};for(var w in x.enabled=x.enabled!==!1,o)w in x||(x[w]=o[w]);var V={options:x,methods:c,name:t,enable:function(){return x.enabled=!0,V},disable:function(){return x.enabled=!1,V}};return V};return t&&typeof t=="string"&&(d._defaults=o,d._methods=c),d}function hn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Hn={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new wn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,c=o.setAndApply(n);return t.edges=o.edges,c},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,c=o.beforeEnd(n);return t.edges=o.startEdges,c},"interactions:action-start":hn,"interactions:action-move":hn,"interactions:action-end":hn,"interactions:after-action-start":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-move":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:stop":function(n){return n.interaction.modification.stop(n)}}},In=Hn,Nn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Dn=function(n){y(o,n);var t=H(o);function o(c,d,f,x,w,V,j){var R;s(this,o),(R=t.call(this,c)).relatedTarget=null,R.screenX=void 0,R.screenY=void 0,R.button=void 0,R.buttons=void 0,R.ctrlKey=void 0,R.shiftKey=void 0,R.altKey=void 0,R.metaKey=void 0,R.page=void 0,R.client=void 0,R.delta=void 0,R.rect=void 0,R.x0=void 0,R.y0=void 0,R.t0=void 0,R.dt=void 0,R.duration=void 0,R.clientX0=void 0,R.clientY0=void 0,R.velocity=void 0,R.speed=void 0,R.swipe=void 0,R.axes=void 0,R.preEnd=void 0,w=w||c.element;var Y=c.interactable,De=(Y&&Y.options||Nn).deltaSource,Le=pe(Y,w,f),Pe=x==="start",He=x==="end",lt=Pe?P(R):c.prevEvent,nt=Pe?c.coords.start:He?{page:lt.page,client:lt.client,timeStamp:c.coords.cur.timeStamp}:c.coords.cur;return R.page=T({},nt.page),R.client=T({},nt.client),R.rect=T({},c.rect),R.timeStamp=nt.timeStamp,He||(R.page.x-=Le.x,R.page.y-=Le.y,R.client.x-=Le.x,R.client.y-=Le.y),R.ctrlKey=d.ctrlKey,R.altKey=d.altKey,R.shiftKey=d.shiftKey,R.metaKey=d.metaKey,R.button=d.button,R.buttons=d.buttons,R.target=w,R.currentTarget=w,R.preEnd=V,R.type=j||f+(x||""),R.interactable=Y,R.t0=Pe?c.pointers[c.pointers.length-1].downTime:lt.t0,R.x0=c.coords.start.page.x-Le.x,R.y0=c.coords.start.page.y-Le.y,R.clientX0=c.coords.start.client.x-Le.x,R.clientY0=c.coords.start.client.y-Le.y,R.delta=Pe||He?{x:0,y:0}:{x:R[De].x-lt[De].x,y:R[De].y-lt[De].y},R.dt=c.coords.delta.timeStamp,R.duration=R.timeStamp-R.t0,R.velocity=T({},c.coords.velocity[De]),R.speed=dt(R.velocity.x,R.velocity.y),R.swipe=He||x==="inertiastart"?R.getSwipe():null,R}return v(o,[{key:"getSwipe",value:function(){var c=this._interaction;if(c.prevEvent.speed<600||this.timeStamp-c.prevEvent.timeStamp>150)return null;var d=180*Math.atan2(c.prevEvent.velocityY,c.prevEvent.velocityX)/Math.PI;d<0&&(d+=360);var f=112.5<=d&&d<247.5,x=202.5<=d&&d<337.5;return{up:x,down:!x&&22.5<=d&&d<157.5,left:f,right:!f&&(292.5<=d||d<67.5),angle:d,speed:c.prevEvent.speed,velocity:{x:c.prevEvent.velocityX,y:c.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(ye);Object.defineProperties(Dn.prototype,{pageX:{get:function(){return this.page.x},set:function(n){this.page.x=n}},pageY:{get:function(){return this.page.y},set:function(n){this.page.y=n}},clientX:{get:function(){return this.client.x},set:function(n){this.client.x=n}},clientY:{get:function(){return this.client.y},set:function(n){this.client.y=n}},dx:{get:function(){return this.delta.x},set:function(n){this.delta.x=n}},dy:{get:function(){return this.delta.y},set:function(n){this.delta.y=n}},velocityX:{get:function(){return this.velocity.x},set:function(n){this.velocity.x=n}},velocityY:{get:function(){return this.velocity.y},set:function(n){this.velocity.y=n}}});var qn=v(function n(t,o,c,d,f){s(this,n),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=c,this.downTime=d,this.downTarget=f}),Xn=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),An=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Gn=0,Yn=function(){function n(t){var o=this,c=t.pointerType,d=t.scopeFire;s(this,n),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=ct(function(R){this.move(R)},"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=Gn++,this._scopeFire=d,this.pointerType=c;var f=this;this._proxy={};var x=function(R){Object.defineProperty(o._proxy,R,{get:function(){return f[R]}})};for(var w in Xn)x(w);var V=function(R){Object.defineProperty(o._proxy,R,{value:function(){return f[R].apply(f,arguments)}})};for(var j in An)V(j);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,c){var d=this.updatePointer(t,o,c,!0),f=this.pointers[d];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:c,pointerIndex:d,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,c){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=c,this.rect=o.getRect(c),this.edges=this.prepared.edges?T({},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,c){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,c,!1);var d,f,x=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&&(d=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(d,f)>this.pointerMoveTolerance);var w,V,j,R=this.getPointerIndex(t),Y={pointer:t,pointerIndex:R,pointerInfo:this.pointers[R],event:o,type:"move",eventTarget:c,dx:d,dy:f,duplicate:x,interaction:this};x||(w=this.coords.velocity,V=this.coords.delta,j=Math.max(V.timeStamp/1e3,.001),w.page.x=V.page.x/j,w.page.y=V.page.y/j,w.client.x=V.client.x/j,w.client.y=V.client.y/j,w.timeStamp=j),this._scopeFire("interactions:move",Y),x||this.simulation||(this.interacting()&&(Y.type=null,this.move(Y)),this.pointerWasMoved&&W(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||Z(this.coords.delta),(t=T({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,c,d){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,c,!1));var x=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(x),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:c,type:x,curEventTarget:d,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=A(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:K(this.pointers,function(c){return c.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,c,d){var f,x,w,V=A(t),j=this.getPointerIndex(t),R=this.pointers[j];return d=d!==!1&&(d||/(down|start)$/i.test(o.type)),R?R.pointer=t:(R=new qn(V,t,o,null,null),j=this.pointers.length,this.pointers.push(R)),oe(this.coords.cur,this.pointers.map(function(Y){return Y.pointer}),this._now()),f=this.coords.delta,x=this.coords.prev,w=this.coords.cur,f.page.x=w.page.x-x.page.x,f.page.y=w.page.y-x.page.y,f.client.x=w.client.x-x.client.x,f.client.y=w.client.y-x.client.y,f.timeStamp=w.timeStamp-x.timeStamp,d&&(this.pointerIsDown=!0,R.downTime=this.coords.cur.timeStamp,R.downTarget=c,N(this.downPointer,t),this.interacting()||(W(this.coords.start,this.coords.cur),W(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,c),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:c,down:d,pointerInfo:R,pointerIndex:j,interaction:this}),j}},{key:"removePointer",value:function(t,o){var c=this.getPointerIndex(t);if(c!==-1){var d=this.pointers[c];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:c,pointerInfo:d,interaction:this}),this.pointers.splice(c,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,c){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=c}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,c,d){return new Dn(this,t,this.prepared.name,o,this.element,c,d)}},{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,c=t.phase,d=t.preEnd,f=t.type,x=this.rect;if(x&&c==="move"&&(ae(this.edges,x,this.coords.delta[this.interactable.options.deltaSource]),x.width=x.right-x.left,x.height=x.bottom-x.top),this._scopeFire("interactions:before-action-".concat(c),t)===!1)return!1;var w=t.iEvent=this._createPreparedEvent(o,c,d,f);return this._scopeFire("interactions:action-".concat(c),t),c==="start"&&(this.prevEvent=w),this._fireEvent(w),this._scopeFire("interactions:after-action-".concat(c),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Et(n){Zt(n.interaction)}function Zt(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Mt(n.coords.cur,t),Mt(n.coords.delta,t),ae(n.edges,n.rect,t),t.x=0,t.y=0,!0}function yt(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function Mt(n,t){var o=n.page,c=n.client,d=t.x,f=t.y;o.x+=d,o.y+=f,c.x+=d,c.y+=f}An.offsetBy="";var bt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=yt},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(Mt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Et,"interactions:before-action-move":Et,"interactions:before-action-end":function(n){var t=n.interaction;if(Zt(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},Wt=bt,_t=function(){function n(t){s(this,n),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 v(n,[{key:"start",value:function(t){var o=this.interaction,c=Dt(o);if(!c||!c.enabled)return!1;var d=o.coords.velocity.client,f=dt(d.x,d.y),x=this.modification||(this.modification=new wn(o));if(x.copyFrom(o.modification),this.t0=o._now(),this.allowResume=c.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=x.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>c.minSpeed&&f>c.endSpeed)this.startInertia();else{if(x.result=x.setAll(this.modifierArg),!x.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,c=Dt(this.interaction),d=c.resistance,f=-Math.log(c.endSpeed/this.v0)/d;this.targetOffset={x:(o.x-f)/d,y:(o.y-f)/d},this.te=f,this.lambda_v0=d/this.v0,this.one_ve_v0=1-c.endSpeed/this.v0;var x=this.modification,w=this.modifierArg;w.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},x.result=x.setAll(w),x.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+x.result.delta.x,y:this.targetOffset.y+x.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,c,d,f,x,w,V=this,j=this.interaction,R=Dt(j).resistance,Y=(j._now()-this.t0)/1e3;if(Y<this.te){var De,Le=1-(Math.exp(-R*Y)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,c=this.targetOffset.x,d=this.targetOffset.y,f=this.modifiedOffset.x,x=this.modifiedOffset.y,De={x:Ot(w=Le,t,c,f),y:Ot(w,o,d,x)}):De={x:this.targetOffset.x*Le,y:this.targetOffset.y*Le};var Pe={x:De.x-this.currentOffset.x,y:De.y-this.currentOffset.y};this.currentOffset.x+=Pe.x,this.currentOffset.y+=Pe.y,j.offsetBy(Pe),j.move(),this.onNextFrame(function(){return V.inertiaTick()})}else j.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,c=o._now()-this.t0,d=Dt(o).smoothEndDuration;if(c<d){var f={x:Pt(c,0,this.targetOffset.x,d),y:Pt(c,0,this.targetOffset.y,d)},x={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=x.x,this.currentOffset.y+=x.y,o.offsetBy(x),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,c=t.event,d=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,c,d,!0),f._doPhase({interaction:f,event:c,phase:"resume"}),W(f.coords.prev,f.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)}}]),n}();function Dt(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Rt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(Wt),n.usePlugin(In),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new _t(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,c=t.inertia;if(c.active)for(var d=o;g.element(d);){if(d===t.element){c.resume(n);break}d=tt(d)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":hn,"interactions:action-inertiastart":hn,"interactions:after-action-inertiastart":function(n){return n.interaction.modification.restoreInteractionCoords(n)},"interactions:after-action-resume":function(n){return n.interaction.modification.restoreInteractionCoords(n)}}};function Ot(n,t,o,c){var d=1-n;return d*d*t+2*d*n*o+n*n*c}function Pt(n,t,o,c){return-o*(n/=c)*(n-2)+t}var Xt=Rt;function ln(n,t){for(var o=0;o<t.length;o++){var c=t[o];if(n.immediatePropagationStopped)break;c(n)}}var Vn=function(){function n(t){s(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=T({},t||{})}return v(n,[{key:"fire",value:function(t){var o,c=this.global;(o=this.types[t.type])&&ln(t,o),!t.propagationStopped&&c&&(o=c[t.type])&&ln(t,o)}},{key:"on",value:function(t,o){var c=Ce(t,o);for(t in c)this.types[t]=_e(this.types[t]||[],c[t])}},{key:"off",value:function(t,o){var c=Ce(t,o);for(t in c){var d=this.types[t];if(d&&d.length)for(var f=0,x=c[t];f<x.length;f++){var w=x[f],V=d.indexOf(w);V!==-1&&d.splice(V,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Jn=function(){function n(t){s(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,N(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function On(n){return g.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Zn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Ta={id:"events",install:function(n){var t,o=[],c={},d=[],f={add:x,remove:w,addDelegate:function(R,Y,De,Le,Pe){var He=On(Pe);if(!c[De]){c[De]=[];for(var lt=0;lt<d.length;lt++){var nt=d[lt];x(nt,De,V),x(nt,De,j,!0)}}var ht=c[De],Ct=Re(ht,function(At){return At.selector===R&&At.context===Y});Ct||(Ct={selector:R,context:Y,listeners:[]},ht.push(Ct)),Ct.listeners.push({func:Le,options:He})},removeDelegate:function(R,Y,De,Le,Pe){var He,lt=On(Pe),nt=c[De],ht=!1;if(nt)for(He=nt.length-1;He>=0;He--){var Ct=nt[He];if(Ct.selector===R&&Ct.context===Y){for(var At=Ct.listeners,kt=At.length-1;kt>=0;kt--){var St=At[kt];if(St.func===Le&&Zn(St.options,lt)){At.splice(kt,1),At.length||(nt.splice(He,1),w(Y,De,V),w(Y,De,j,!0)),ht=!0;break}}if(ht)break}}},delegateListener:V,delegateUseCapture:j,delegatedEvents:c,documents:d,targets:o,supportsOptions:!1,supportsPassive:!1};function x(R,Y,De,Le){if(R.addEventListener){var Pe=On(Le),He=Re(o,function(lt){return lt.eventTarget===R});He||(He={eventTarget:R,events:{}},o.push(He)),He.events[Y]||(He.events[Y]=[]),Re(He.events[Y],function(lt){return lt.func===De&&Zn(lt.options,Pe)})||(R.addEventListener(Y,De,f.supportsOptions?Pe:Pe.capture),He.events[Y].push({func:De,options:Pe}))}}function w(R,Y,De,Le){if(R.addEventListener&&R.removeEventListener){var Pe=K(o,function(tn){return tn.eventTarget===R}),He=o[Pe];if(He&&He.events)if(Y!=="all"){var lt=!1,nt=He.events[Y];if(nt){if(De==="all"){for(var ht=nt.length-1;ht>=0;ht--){var Ct=nt[ht];w(R,Y,Ct.func,Ct.options)}return}for(var At=On(Le),kt=0;kt<nt.length;kt++){var St=nt[kt];if(St.func===De&&Zn(St.options,At)){R.removeEventListener(Y,De,f.supportsOptions?At:At.capture),nt.splice(kt,1),nt.length===0&&(delete He.events[Y],lt=!0);break}}}lt&&!Object.keys(He.events).length&&o.splice(Pe,1)}else for(Y in He.events)He.events.hasOwnProperty(Y)&&w(R,Y,"all")}}function V(R,Y){for(var De=On(Y),Le=new Jn(R),Pe=c[R.type],He=he(R)[0],lt=He;g.element(lt);){for(var nt=0;nt<Pe.length;nt++){var ht=Pe[nt],Ct=ht.selector,At=ht.context;if(X(lt,Ct)&&fe(At,He)&&fe(At,lt)){var kt=ht.listeners;Le.currentTarget=lt;for(var St=0;St<kt.length;St++){var tn=kt[St];Zn(tn.options,De)&&tn.func(Le)}}}lt=tt(lt)}}function j(R){return V(R,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},ia={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=ia.methodOrder;t<o.length;t++){var c=o[t],d=ia[c](n);if(d)return d}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,c=n.eventTarget,d=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,x=d.interactions.list;f<x.length;f++){var w=x[f],V=c;if(w.simulation&&w.simulation.allowResume&&w.pointerType===t)for(;V;){if(V===w.element)return w;V=tt(V)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,c=n.pointerType,d=n.eventType,f=n.scope;if(c!=="mouse"&&c!=="pen")return null;for(var x=0,w=f.interactions.list;x<w.length;x++){var V=w[x];if(V.pointerType===c){if(V.simulation&&!ga(V,o))continue;if(V.interacting())return V;t||(t=V)}}if(t)return t;for(var j=0,R=f.interactions.list;j<R.length;j++){var Y=R[j];if(!(Y.pointerType!==c||/down/i.test(d)&&Y.simulation))return Y}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,c=n.scope.interactions.list;o<c.length;o++){var d=c[o];if(ga(d,t))return d}return null},idle:function(n){for(var t=n.pointerType,o=0,c=n.scope.interactions.list;o<c.length;o++){var d=c[o];if(d.pointers.length===1){var f=d.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(d.pointers.length>=2)continue;if(!d.interacting()&&t===d.pointerType)return d}return null}};function ga(n,t){return n.pointers.some(function(o){return o.id===t})}var sa=ia,pn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Qn(n,t){return function(o){var c=t.interactions.list,d=Q(o),f=he(o),x=f[0],w=f[1],V=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var j=0,R=o.changedTouches;j<R.length;j++){var Y=R[j],De={pointer:Y,pointerId:A(Y),pointerType:d,eventType:o.type,eventTarget:x,curEventTarget:w,scope:t},Le=ca(De);V.push([De.pointer,De.eventTarget,De.curEventTarget,Le])}}else{var Pe=!1;if(!le.supportsPointerEvent&&/mouse/.test(o.type)){for(var He=0;He<c.length&&!Pe;He++)Pe=c[He].pointerType!=="mouse"&&c[He].pointerIsDown;Pe=Pe||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Pe){var lt={pointer:o,pointerId:A(o),pointerType:d,eventType:o.type,curEventTarget:w,eventTarget:x,scope:t},nt=ca(lt);V.push([lt.pointer,lt.eventTarget,lt.curEventTarget,nt])}}for(var ht=0;ht<V.length;ht++){var Ct=V[ht],At=Ct[0],kt=Ct[1],St=Ct[2];Ct[3][n](At,o,kt,St)}}}function ca(n){var t=n.pointerType,o=n.scope,c={interaction:sa.search(n),searchDetails:n};return o.fire("interactions:find",c),c.interaction||o.interactions.new({pointerType:t})}function rn(n,t){var o=n.doc,c=n.scope,d=n.options,f=c.interactions.docEvents,x=c.events,w=x[t];for(var V in c.browser.isIOS&&!d.events&&(d.events={passive:!1}),x.delegatedEvents)w(o,V,x.delegateListener),w(o,V,x.delegateUseCapture,!0);for(var j=d&&d.events,R=0;R<f.length;R++){var Y=f[R];w(o,Y.type,Y.listener,j)}}var Ba={id:"core/interactions",install:function(n){for(var t={},o=0;o<pn.length;o++){var c=pn[o];t[c]=Qn(c,n)}var d,f=le.pEventTypes;function x(){for(var w=0,V=n.interactions.list;w<V.length;w++){var j=V[w];if(j.pointerIsDown&&j.pointerType==="touch"&&!j._interacting)for(var R=function(){var Le=De[Y];n.documents.some(function(Pe){return fe(Pe.doc,Le.downTarget)})||j.removePointer(Le.pointer,Le.event)},Y=0,De=j.pointers;Y<De.length;Y++)R()}}(d=z.PointerEvent?[{type:f.down,listener:x},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:x},{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(w){for(var V=0,j=n.interactions.list;V<j.length;V++)j[V].documentBlur(w)}}),n.prevTouchTime=0,n.Interaction=function(w){y(j,w);var V=H(j);function j(){return s(this,j),V.apply(this,arguments)}return v(j,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(R){n.interactions.pointerMoveTolerance=R}},{key:"_now",value:function(){return n.now()}}]),j}(Yn),n.interactions={list:[],new:function(w){w.scopeFire=function(j,R){return n.fire(j,R)};var V=new n.Interaction(w);return n.interactions.list.push(V),V},listeners:t,docEvents:d,pointerMoveTolerance:1},n.usePlugin(Bn)},listeners:{"scope:add-document":function(n){return rn(n,"add")},"scope:remove-document":function(n){return rn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,c=t.interactions.list.length-1;c>=0;c--){var d=t.interactions.list[c];d.interactable===o&&(d.stop(),t.fire("interactions:destroy",{interaction:d}),d.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(c,1))}}},onDocSignal:rn,doOnInteractions:Qn,methodNames:pn},Mn=Ba,zn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(zn||{}),pr=function(){function n(t,o,c,d){s(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Vn,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||c,this._win=C(ke(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=d,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return g.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),g.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),g.func(o.onend)&&this.on("".concat(t,"end"),o.onend),g.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,c){var d,f=this,x=(d=this._actions.map[t])==null?void 0:d.filterEventType,w=function(V){return(x==null||x(V))&&mn(V,f._actions)};(g.array(o)||g.object(o))&&this._onOff(zn.Off,t,o,void 0,w),(g.array(c)||g.object(c))&&this._onOff(zn.On,t,c,void 0,w)}},{key:"setPerAction",value:function(t,o){var c=this._defaults;for(var d in o){var f=d,x=this.options[t],w=o[f];f==="listeners"&&this.updatePerActionListeners(t,x.listeners,w),g.array(w)?x[f]=xe(w):g.plainObject(w)?(x[f]=T(x[f]||{},dn(w)),g.object(c.perAction[f])&&"enabled"in c.perAction[f]&&(x[f].enabled=w.enabled!==!1)):g.bool(w)&&g.object(c.perAction[f])?x[f].enabled=w:x[f]=w}}},{key:"getRect",value:function(t){return t=t||(g.element(this.target)?this.target:null),g.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ee(t)}},{key:"rectChecker",value:function(t){var o=this;return g.func(t)?(this.getRect=function(c){var d=T({},t.apply(o,c));return"width"in d||(d.width=d.right-d.left,d.height=d.bottom-d.top),d},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(ke(o)||g.object(o)){for(var c in this.options[t]=o,this._actions.map)this.options[c][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 g.string(t)?Array.from(this._context.querySelectorAll(t)):g.func(t)&&t.getAllElements?t.getAllElements():g.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||fe(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,c){return!this.testIgnore(t.ignoreFrom,o,c)&&this.testAllow(t.allowFrom,o,c)}},{key:"testAllow",value:function(t,o,c){return!t||!!g.element(c)&&(g.string(t)?J(c,t,o):!!g.element(t)&&fe(t,c))}},{key:"testIgnore",value:function(t,o,c){return!(!t||!g.element(c))&&(g.string(t)?J(c,t,o):!!g.element(t)&&fe(t,c))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,c,d,f){g.object(o)&&!g.array(o)&&(d=c,c=null);var x=Ce(o,c,f);for(var w in x){w==="wheel"&&(w=le.wheelEvent);for(var V=0,j=x[w];V<j.length;V++){var R=j[V];mn(w,this._actions)?this.events[t===zn.On?"on":"off"](w,R):g.string(this.target)?this._scopeEvents[t===zn.On?"addDelegate":"removeDelegate"](this.target,this._context,w,R,d):this._scopeEvents[t===zn.On?"add":"remove"](this.target,w,R,d)}}return this}},{key:"on",value:function(t,o,c){return this._onOff(zn.On,t,o,c)}},{key:"off",value:function(t,o,c){return this._onOff(zn.Off,t,o,c)}},{key:"set",value:function(t){var o=this._defaults;for(var c in g.object(t)||(t={}),this.options=dn(o.base),this._actions.methodDict){var d=c,f=this._actions.methodDict[d];this.options[d]={},this.setPerAction(d,T(T({},o.perAction),o.actions[d])),this[f](t[d])}for(var x in t)x!=="getRect"?g.func(this[x])&&this[x](t[x]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(g.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],c=o.length-1;c>=0;c--){var d=o[c],f=d.selector,x=d.context,w=d.listeners;f===this.target&&x===this._context&&o.splice(c,1);for(var V=w.length-1;V>=0;V--)this._scopeEvents.removeDelegate(this.target,this._context,t,w[V][0],w[V][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),fr=function(){function n(t){var o=this;s(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(c){var d=c.interactable,f=d.target,x=g.string(f)?o.selectorMap[f]:f[o.scope.id],w=K(x,function(V){return V===d});x.splice(w,1)}})}return v(n,[{key:"new",value:function(t,o){o=T(o||{},{actions:this.scope.actions});var c=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(c._doc),this.list.push(c),g.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(c)):(c.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(c)),this.scope.fire("interactable:new",{target:t,options:o,interactable:c,win:this.scope._win}),c}},{key:"getExisting",value:function(t,o){var c=o&&o.context||this.scope.document,d=g.string(t),f=d?this.selectorMap[t]:t[this.scope.id];if(f)return Re(f,function(x){return x._context===c&&(d||x.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var c=0,d=this.list;c<d.length;c++){var f=d[c],x=void 0;if((g.string(f.target)?g.element(t)&&X(t,f.target):t===f.target)&&f.inContext(t)&&(x=o(f)),x!==void 0)return x}}}]),n}(),hr=function(){function n(){var t=this;s(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=le,this.defaults=dn(Nn),this.Eventable=Vn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(c){var d=function f(x,w){var V=c.interactables.getExisting(x,w);return V||((V=c.interactables.new(x,w)).events.global=f.globalEvents),V};return d.getPointerAverage=q,d.getTouchBBox=Se,d.getTouchDistance=ue,d.getTouchAngle=G,d.getElementRect=Ee,d.getElementClientRect=we,d.matchesSelector=X,d.closest=$e,d.globalEvents={},d.version="1.10.27",d.scope=c,d.use=function(f,x){return this.scope.usePlugin(f,x),this},d.isSet=function(f,x){return!!this.scope.interactables.get(f,x&&x.context)},d.on=ct(function(f,x,w){if(g.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),g.array(f)){for(var V=0,j=f;V<j.length;V++){var R=j[V];this.on(R,x,w)}return this}if(g.object(f)){for(var Y in f)this.on(Y,f[Y],x);return this}return mn(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(x):this.globalEvents[f]=[x]:this.scope.events.add(this.scope.document,f,x,{options:w}),this},"The interact.on() method is being deprecated"),d.off=ct(function(f,x,w){if(g.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),g.array(f)){for(var V=0,j=f;V<j.length;V++){var R=j[V];this.off(R,x,w)}return this}if(g.object(f)){for(var Y in f)this.off(Y,f[Y],x);return this}var De;return mn(f,this.scope.actions)?f in this.globalEvents&&(De=this.globalEvents[f].indexOf(x))!==-1&&this.globalEvents[f].splice(De,1):this.scope.events.remove(this.scope.document,f,x,w),this},"The interact.off() method is being deprecated"),d.debug=function(){return this.scope},d.supportsTouch=function(){return le.supportsTouch},d.supportsPointerEvent=function(){return le.supportsPointerEvent},d.stop=function(){for(var f=0,x=this.scope.interactions.list;f<x.length;f++)x[f].stop();return this},d.pointerMoveTolerance=function(f){return g.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},d.addDocument=function(f,x){this.scope.addDocument(f,x)},d.removeDocument=function(f){this.scope.removeDocument(f)},d}(this),this.InteractEvent=Dn,this.Interactable=void 0,this.interactables=new fr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(c){return t.removeDocument(c.target)};var o=this;this.Interactable=function(c){y(f,c);var d=H(f);function f(){return s(this,f),d.apply(this,arguments)}return v(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(x){return I(_(f.prototype),"set",this).call(this,x),o.fire("interactable:set",{options:x,interactable:this}),this}},{key:"unset",value:function(){I(_(f.prototype),"unset",this).call(this);var x=o.interactables.list.indexOf(this);x<0||(o.interactables.list.splice(x,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(pr)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var c=0,d=this.listenerMaps;c<d.length;c++){var f=d[c].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,c){return o.isInitialized=!0,g.window(c)&&m(c),z.init(c),le.init(c),We.init(c),o.window=c,o.document=c.document,o.usePlugin(Mn),o.usePlugin(Ta),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 c=0,d=this.listenerMaps.length,f=t.before.reduce(function(w,V){return w[V]=!0,w[ko(V)]=!0,w},{});c<d;c++){var x=this.listenerMaps[c].id;if(x&&(f[x]||f[ko(x)]))break}this.listenerMaps.splice(c,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 c=C(t);o=o?T({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(c,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:c,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),c=C(t),d=this.documents[o].options;this.events.remove(c,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:c,scope:this,options:d})}},{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()}}]),n}();function ko(n){return n&&n.replace(/\/.*$/,"")}var xo=new hr,en=xo.interactStatic,vr=typeof globalThis<"u"?globalThis:window;xo.init(vr);var gr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(c){var d=c[0],f=c[1];return d in n||f in n}),o=function(c,d){for(var f=n.range,x=n.limits,w=x===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:x,V=n.offset,j=V===void 0?{x:0,y:0}:V,R={range:f,grid:n,x:null,y:null},Y=0;Y<t.length;Y++){var De=t[Y],Le=De[0],Pe=De[1],He=Math.round((c-j.x)/n[Le]),lt=Math.round((d-j.y)/n[Pe]);R[Le]=Math.max(w.left,Math.min(w.right,He*n[Le]+j.x)),R[Pe]=Math.max(w.top,Math.min(w.bottom,lt*n[Pe]+j.y))}return R};return o.grid=n,o.coordFields=t,o}}),mr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=T(t.snappers||{},gr),t.createSnapGrid=t.snappers.grid}},yr=mr,br={start:function(n){var t=n.state,o=n.rect,c=n.edges,d=n.pageCoords,f=t.options,x=f.ratio,w=f.enabled,V=t.options,j=V.equalDelta,R=V.modifiers;x==="preserve"&&(x=o.width/o.height),t.startCoords=T({},d),t.startRect=T({},o),t.ratio=x,t.equalDelta=j;var Y=t.linkedEdges={top:c.top||c.left&&!c.bottom,left:c.left||c.top&&!c.right,bottom:c.bottom||c.right&&!c.top,right:c.right||c.bottom&&!c.left};if(t.xIsPrimaryAxis=!(!c.left&&!c.right),t.equalDelta){var De=(Y.left?1:-1)*(Y.top?1:-1);t.edgeSign={x:De,y:De}}else t.edgeSign={x:Y.left?-1:1,y:Y.top?-1:1};if(w!==!1&&T(c,Y),R!=null&&R.length){var Le=new wn(n.interaction);Le.copyFrom(n.interaction.modification),Le.prepareStates(R),t.subModification=Le,Le.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,c=n.coords,d=t.linkedEdges,f=T({},c),x=t.equalDelta?kr:xr;if(T(n.edges,d),x(t,t.xIsPrimaryAxis,c,o),!t.subModification)return null;var w=T({},o);ae(d,w,{x:c.x-f.x,y:c.y-f.y});var V=t.subModification.setAll(l(l({},n),{},{rect:w,edges:d,pageCoords:c,prevCoords:c,prevRect:w})),j=V.delta;return V.changed&&(x(t,Math.abs(j.x)>Math.abs(j.y),V.coords,V.rect),T(c,V.coords)),V.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function kr(n,t,o){var c=n.startCoords,d=n.edgeSign;t?o.y=c.y+(o.x-c.x)*d.y:o.x=c.x+(o.y-c.y)*d.x}function xr(n,t,o,c){var d=n.startRect,f=n.startCoords,x=n.ratio,w=n.edgeSign;if(t){var V=c.width/x;o.y=f.y+(V-d.height)*w.y}else{var j=c.height*x;o.x=f.x+(j-d.width)*w.x}}var wr=on(br,"aspectRatio"),wo=function(){};wo._defaults={};var Ia=wo;function ea(n,t,o){return g.func(n)?Ye(n,t.interactable,t.element,[o.x,o.y,t]):Ye(n,t.interactable,t.element)}var Na={start:function(n){var t=n.rect,o=n.startOffset,c=n.state,d=n.interaction,f=n.pageCoords,x=c.options,w=x.elementRect,V=T({left:0,top:0,right:0,bottom:0},x.offset||{});if(t&&w){var j=ea(x.restriction,d,f);if(j){var R=j.right-j.left-t.width,Y=j.bottom-j.top-t.height;R<0&&(V.left+=R,V.right+=R),Y<0&&(V.top+=Y,V.bottom+=Y)}V.left+=o.left-t.width*w.left,V.top+=o.top-t.height*w.top,V.right+=o.right-t.width*(1-w.right),V.bottom+=o.bottom-t.height*(1-w.bottom)}c.offset=V},set:function(n){var t=n.coords,o=n.interaction,c=n.state,d=c.options,f=c.offset,x=ea(d.restriction,o,t);if(x){var w=function(V){return!V||"left"in V&&"top"in V||((V=T({},V)).left=V.x||0,V.top=V.y||0,V.right=V.right||V.left+V.width,V.bottom=V.bottom||V.top+V.height),V}(x);t.x=Math.max(Math.min(w.right-f.right,t.x),w.left+f.left),t.y=Math.max(Math.min(w.bottom-f.bottom,t.y),w.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Dr=on(Na,"restrict"),Do={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(n,t){for(var o=0,c=["top","left","bottom","right"];o<c.length;o++){var d=c[o];d in n||(n[d]=t[d])}return n}var ma={noInner:Do,noOuter:_o,start:function(n){var t,o=n.interaction,c=n.startOffset,d=n.state,f=d.options;f&&(t=Ae(ea(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},d.offset={top:t.y+c.top,left:t.x+c.left,bottom:t.y-c.bottom,right:t.x-c.right}},set:function(n){var t=n.coords,o=n.edges,c=n.interaction,d=n.state,f=d.offset,x=d.options;if(o){var w=T({},t),V=ea(x.inner,c,w)||{},j=ea(x.outer,c,w)||{};Eo(V,Do),Eo(j,_o),o.top?t.y=Math.min(Math.max(j.top+f.top,w.y),V.top+f.top):o.bottom&&(t.y=Math.max(Math.min(j.bottom+f.bottom,w.y),V.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(j.left+f.left,w.x),V.left+f.left):o.right&&(t.x=Math.max(Math.min(j.right+f.right,w.x),V.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},_r=on(ma,"restrictEdges"),Er=T({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Na.defaults),Cr=on({start:Na.start,set:Na.set,defaults:Er},"restrictRect"),Sr={width:-1/0,height:-1/0},Tr={width:1/0,height:1/0},Br=on({start:function(n){return ma.start(n)},set:function(n){var t=n.interaction,o=n.state,c=n.rect,d=n.edges,f=o.options;if(d){var x=ce(ea(f.min,t,n.coords))||Sr,w=ce(ea(f.max,t,n.coords))||Tr;o.options={endOnly:f.endOnly,inner:T({},ma.noInner),outer:T({},ma.noOuter)},d.top?(o.options.inner.top=c.bottom-x.height,o.options.outer.top=c.bottom-w.height):d.bottom&&(o.options.inner.bottom=c.top+x.height,o.options.outer.bottom=c.top+w.height),d.left?(o.options.inner.left=c.right-x.width,o.options.outer.left=c.right-w.width):d.right&&(o.options.inner.right=c.left+x.width,o.options.outer.right=c.left+w.width),ma.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Qa={start:function(n){var t,o=n.interaction,c=n.interactable,d=n.element,f=n.rect,x=n.state,w=n.startOffset,V=x.options,j=V.offsetWithOrigin?function(De){var Le=De.interaction.element,Pe=Ae(Ye(De.state.options.origin,null,null,[Le])),He=Pe||pe(De.interactable,Le,De.interaction.prepared.name);return He}(n):{x:0,y:0};if(V.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var R=Ye(V.offset,c,d,[o]);(t=Ae(R)||{x:0,y:0}).x+=j.x,t.y+=j.y}var Y=V.relativePoints;x.offsets=f&&Y&&Y.length?Y.map(function(De,Le){return{index:Le,relativePoint:De,x:w.left-f.width*De.x+t.x,y:w.top-f.height*De.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,c=n.state,d=c.options,f=c.offsets,x=pe(t.interactable,t.element,t.prepared.name),w=T({},o),V=[];d.offsetWithOrigin||(w.x-=x.x,w.y-=x.y);for(var j=0,R=f;j<R.length;j++)for(var Y=R[j],De=w.x-Y.x,Le=w.y-Y.y,Pe=0,He=d.targets.length;Pe<He;Pe++){var lt=d.targets[Pe],nt=void 0;(nt=g.func(lt)?lt(De,Le,t._proxy,Y,Pe):lt)&&V.push({x:(g.number(nt.x)?nt.x:De)+Y.x,y:(g.number(nt.y)?nt.y:Le)+Y.y,range:g.number(nt.range)?nt.range:d.range,source:lt,index:Pe,offset:Y})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ct=0;Ct<V.length;Ct++){var At=V[Ct],kt=At.range,St=At.x-w.x,tn=At.y-w.y,jt=dt(St,tn),sn=jt<=kt;kt===1/0&&ht.inRange&&ht.range!==1/0&&(sn=!1),ht.target&&!(sn?ht.inRange&&kt!==1/0?jt/kt<ht.distance/ht.range:kt===1/0&&ht.range!==1/0||jt<ht.distance:!ht.inRange&&jt<ht.distance)||(ht.target=At,ht.distance=jt,ht.range=kt,ht.inRange=sn,ht.delta.x=St,ht.delta.y=tn)}return ht.inRange&&(o.x=ht.target.x,o.y=ht.target.y),c.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ir=on(Qa,"snap"),Aa={start:function(n){var t=n.state,o=n.edges,c=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:c.offset||"self",origin:{x:0,y:0},range:c.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Qa.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,c=n.coords,d=o.options,f=o.offsets,x={x:c.x-f[0].x,y:c.y-f[0].y};o.options=T({},d),o.options.targets=[];for(var w=0,V=d.targets||[];w<V.length;w++){var j=V[w],R=void 0;if(R=g.func(j)?j(x.x,x.y,t):j){for(var Y=0,De=o.targetFields;Y<De.length;Y++){var Le=De[Y],Pe=Le[0],He=Le[1];if(Pe in R||He in R){R.x=R[Pe],R.y=R[He];break}}o.options.targets.push(R)}}var lt=Qa.set(n);return o.options=d,lt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Nr=on(Aa,"snapSize"),eo={aspectRatio:wr,restrictEdges:_r,restrict:Dr,restrictRect:Cr,restrictSize:Br,snapEdges:on({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Aa.start(n)):null},set:Aa.set,defaults:T(dn(Aa.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ir,snapSize:Nr,spring:Ia,avoid:Ia,transform:Ia,rubberband:Ia},Ar={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(In),n.usePlugin(yr),t.modifiers=eo,eo){var c=eo[o],d=c._defaults,f=c._methods;d._methods=f,n.defaults.perAction[o]=d}}},Vr=Ar,Co=function(n){y(o,n);var t=H(o);function o(c,d,f,x,w,V){var j;if(s(this,o),N(P(j=t.call(this,w)),f),f!==d&&N(P(j),d),j.timeStamp=V,j.originalEvent=f,j.type=c,j.pointerId=A(d),j.pointerType=Q(d),j.target=x,j.currentTarget=null,c==="tap"){var R=w.getPointerIndex(d);j.dt=j.timeStamp-w.pointers[R].downTime;var Y=j.timeStamp-w.tapTime;j.double=!!w.prevTap&&w.prevTap.type!=="doubletap"&&w.prevTap.target===j.target&&Y<500}else c==="doubletap"&&(j.dt=d.timeStamp-w.tapTime,j.double=!0);return j}return v(o,[{key:"_subtractOrigin",value:function(c){var d=c.x,f=c.y;return this.pageX-=d,this.pageY-=f,this.clientX-=d,this.clientY-=f,this}},{key:"_addOrigin",value:function(c){var d=c.x,f=c.y;return this.pageX+=d,this.pageY+=f,this.clientX+=d,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(ye),ya={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ya,n.defaults.actions.pointerEvents=ya.defaults,T(n.actions.phaselessTypes,ya.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,c=n.pointer,d=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&to(n),Rn({interaction:o,pointer:c,event:d,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,c){for(var d=o.interaction,f=o.pointer,x=o.event,w=o.eventTarget,V=o.pointerIndex,j=d.pointers[V].hold,R=ne(w),Y={interaction:d,pointer:f,event:x,eventTarget:w,type:"hold",targets:[],path:R,node:null},De=0;De<R.length;De++){var Le=R[De];Y.node=Le,c.fire("pointerEvents:collect-targets",Y)}if(Y.targets.length){for(var Pe=1/0,He=0,lt=Y.targets;He<lt.length;He++){var nt=lt[He].eventable.options.holdDuration;nt<Pe&&(Pe=nt)}j.duration=Pe,j.timeout=setTimeout(function(){Rn({interaction:d,eventTarget:w,pointer:f,event:x,type:"hold"},c)},Pe)}})(n,t),Rn(n,t)},"interactions:up":function(n,t){to(n),Rn(n,t),function(o,c){var d=o.interaction,f=o.pointer,x=o.event,w=o.eventTarget;d.pointerWasMoved||Rn({interaction:d,eventTarget:w,pointer:f,event:x,type:"tap"},c)}(n,t)},"interactions:cancel":function(n,t){to(n),Rn(n,t)}},PointerEvent:Co,fire:Rn,collectEventTargets:So,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 Rn(n,t){var o=n.interaction,c=n.pointer,d=n.event,f=n.eventTarget,x=n.type,w=n.targets,V=w===void 0?So(n,t):w,j=new Co(x,c,d,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:j});for(var R={interaction:o,pointer:c,event:d,eventTarget:f,targets:V,type:x,pointerEvent:j},Y=0;Y<V.length;Y++){var De=V[Y];for(var Le in De.props||{})j[Le]=De.props[Le];var Pe=pe(De.eventable,De.node);if(j._subtractOrigin(Pe),j.eventable=De.eventable,j.currentTarget=De.node,De.eventable.fire(j),j._addOrigin(Pe),j.immediatePropagationStopped||j.propagationStopped&&Y+1<V.length&&V[Y+1].node!==j.currentTarget)break}if(t.fire("pointerEvents:fired",R),x==="tap"){var He=j.double?Rn({interaction:o,pointer:c,event:d,eventTarget:f,type:"doubletap"},t):j;o.prevTap=He,o.tapTime=He.timeStamp}return j}function So(n,t){var o=n.interaction,c=n.pointer,d=n.event,f=n.eventTarget,x=n.type,w=o.getPointerIndex(c),V=o.pointers[w];if(x==="tap"&&(o.pointerWasMoved||!V||V.downTarget!==f))return[];for(var j=ne(f),R={interaction:o,pointer:c,event:d,eventTarget:f,type:x,path:j,targets:[],node:null},Y=0;Y<j.length;Y++){var De=j[Y];R.node=De,t.fire("pointerEvents:collect-targets",R)}return x==="hold"&&(R.targets=R.targets.filter(function(Le){var Pe,He;return Le.eventable.options.holdDuration===((Pe=o.pointers[w])==null||(He=Pe.hold)==null?void 0:He.duration)})),R.targets}function to(n){var t=n.interaction,o=n.pointerIndex,c=t.pointers[o].hold;c&&c.timeout&&(clearTimeout(c.timeout),c.timeout=null)}var Or=Object.freeze({__proto__:null,default:ya});function Mr(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var zr={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ya);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Mr,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,c=n.pointerEvent,d=n.eventTarget,f=n.targets;if(c.type==="hold"&&f.length){var x=f[0].eventable.options.holdRepeatInterval;x<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:d,type:"hold",pointer:c,event:c},t)},x))}}})},Rr=zr,Pr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(c){return T(this.events.options,c),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(c,d){var f=o.call(this,c,d);return f===this&&(this.events.options[c]=d),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,c=n.node,d=n.type,f=n.eventTarget;t.interactables.forEachMatch(c,function(x){var w=x.events,V=w.options;w.types[d]&&w.types[d].length&&x.testIgnoreAllow(V,c,f)&&o.push({node:c,eventable:w,props:{interactable:x}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,c=n.options;T(o.events.options,t.pointerEvents.defaults),T(o.events.options,c.pointerEvents||{})}}},Fr=Pr,Lr={id:"pointer-events",install:function(n){n.usePlugin(Or),n.usePlugin(Rr),n.usePlugin(Fr)}},$r=Lr,jr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(c,d,f){for(var x=c.getAllElements(),w=f.window.Promise,V=w?[]:null,j=function(){var Y=x[R],De=c.getRect(Y);if(!De)return 1;var Le,Pe=Re(f.interactions.list,function(nt){return nt.interacting()&&nt.interactable===c&&nt.element===Y&&nt.prepared.name===d.name});if(Pe)Pe.move(),V&&(Le=Pe._reflowPromise||new w(function(nt){Pe._reflowResolve=nt}));else{var He=ce(De),lt=function(nt){return{coords:nt,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:f.now()});Le=function(nt,ht,Ct,At,kt){var St=nt.interactions.new({pointerType:"reflow"}),tn={interaction:St,event:kt,pointer:kt,eventTarget:Ct,phase:"reflow"};St.interactable=ht,St.element=Ct,St.prevEvent=kt,St.updatePointer(kt,kt,Ct,!0),Z(St.coords.delta),ft(St.prepared,At),St._doPhase(tn);var jt=nt.window,sn=jt.Promise,vn=sn?new sn(function(_n){St._reflowResolve=_n}):void 0;return St._reflowPromise=vn,St.start(At,ht,Ct),St._interacting?(St.move(tn),St.end(kt)):(St.stop(),St._reflowResolve()),St.removePointer(kt,kt),vn}(f,c,Y,d,lt)}V&&V.push(Le)},R=0;R<x.length&&!j();R++);return V&&w.all(V).then(function(){return c})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(c,d){c.splice(c.indexOf(d),1)}(t.interactions.list,o))}}},Ur=jr;if(en.use(Bn),en.use(Wt),en.use($r),en.use(Xt),en.use(Vr),en.use(Un),en.use(B),en.use(pt),en.use(Ur),en.default=en,u(a)==="object"&&a)try{a.exports=en}catch{}return en.default=en,en})}(Da,Da.exports)),Da.exports}var Rp=zp();const Zo=Ve.getDefaultExportFromCjs(Rp),Xa=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(a,{expose:r,emit:i}){const l=a,u=i,s=e.inject(Xl),k=e.inject(Gl);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),p=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 y=!1,_=!1,O=NaN,P=NaN,H=NaN,I=NaN,ee=-1,$=-1,F=-1,L=-1,m=l.x,C=l.y,h=l.w,E=l.h;const g=e.ref(),te=e.reactive({i:e.toRef(l,"i"),state:p,wrapper:g,calcXY:Ye});function Te(S){Ce(S)}function Qe(){qe()}function de(S){cn(l.isDraggable)&&(p.draggable=S)}function Be(S){cn(l.isResizable)&&(p.resizable=S)}function Oe(S){cn(l.isBounded)&&(p.bounded=S)}function z(S){p.transformScale=S}function re(S){p.rowHeight=S}function le(S){p.maxRows=S}function fe(){p.rtl=Yo()==="rtl",qe()}function $e(S){p.cols=Math.floor(S)}s.increaseItem(te),e.onBeforeMount(()=>{p.rtl=Yo()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?p.cols=er(s.lastBreakpoint,s.cols):p.cols=s.colNum,p.rowHeight=s.rowHeight,p.containerWidth=s.width!==null?s.width:100,p.margin=s.margin!==void 0?s.margin.map(Number):[10,10],p.maxRows=s.maxRows,cn(l.isDraggable)?p.draggable=s.isDraggable:p.draggable=l.isDraggable,cn(l.isResizable)?p.resizable=s.isResizable:p.resizable=l.isResizable,cn(l.isBounded)?p.bounded=s.isBounded:p.bounded=l.isBounded,p.transformScale=s.transformScale,p.useCssTransforms=s.useCssTransforms,p.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{m=l.x,C=l.y,E=l.h,h=l.w,nn(Ee)}),k.on("updateWidth",Te),k.on("compact",Qe),k.on("setDraggable",de),k.on("setResizable",Be),k.on("setBounded",Oe),k.on("setTransformScale",z),k.on("setRowHeight",re),k.on("setMaxRows",le),k.on("directionchange",fe),k.on("setColNum",$e)}),e.onBeforeUnmount(()=>{k.off("updateWidth",Te),k.off("compact",Qe),k.off("setDraggable",de),k.off("setResizable",Be),k.off("setBounded",Oe),k.off("setTransformScale",z),k.off("setRowHeight",re),k.off("setMaxRows",le),k.off("directionchange",fe),k.off("setColNum",$e),v.value&&(v.value.unset(),v.value=null),s.decreaseItem(te)}),r({state:p,wrapper:g});const tt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,X=e.computed(()=>p.resizable&&!l.static),M=e.computed(()=>s.isMirrored?!p.rtl:p.rtl),ie=e.computed(()=>(p.draggable||p.resizable)&&!l.static),J=Tp("item"),ve=e.computed(()=>({[J.b()]:!0,[J.bm("resizable")]:X.value,[J.bm("static")]:l.static,[J.bm("resizing")]:p.isResizing,[J.bm("dragging")]:p.isDragging,[J.bm("transform")]:p.useCssTransforms,[J.bm("rtl")]:M.value,[J.bm("no-touch")]:tt&&ie.value})),we=e.computed(()=>[J.be("resizer"),M.value&&J.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,S=>{p.draggable=S}),e.watch(()=>l.static,()=>{nn(N),nn(Z)}),e.watch(()=>p.draggable,()=>{nn(N)}),e.watch(()=>l.isResizable,S=>{p.resizable=S}),e.watch(()=>l.isBounded,S=>{p.bounded=S}),e.watch(()=>p.resizable,()=>{nn(Z)}),e.watch(()=>p.rowHeight,()=>{nn(Ee),nn(ne)}),e.watch([()=>p.cols,()=>p.containerWidth],()=>{nn(Z),nn(Ee),nn(ne)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{nn(Z)}),e.watch(M,()=>{nn(Z),nn(Ee)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const S=s.margin;!S||S[0]===p.margin[0]&&S[1]===p.margin[1]||(p.margin=S.map(Number),nn(Ee),nn(ne))});function Ee(){l.x+l.w>p.cols?(m=0,h=l.w>p.cols?p.cols:l.w):(m=l.x,h=l.w);const S=Ge(m,C,h,E);p.isDragging&&(S.top=p.dragging.top,M.value?S.right=p.dragging.left:S.left=p.dragging.left),p.isResizing&&(S.width=p.resizing.width,S.height=p.resizing.height);let se;p.useCssTransforms?M.value?se=_p(S.top,S.right,S.width,S.height):se=Dp(S.top,S.left,S.width,S.height):M.value?se=Cp(S.top,S.right,S.width,S.height):se=Ep(S.top,S.left,S.width,S.height),p.style=se}function ne(){const S={};for(const se of["width","height"]){const Me=p.style[se].match(/^(\d+)px$/);if(!Me)return;S[se]=Me[1]}u("container-resized",l.i,l.h,l.w,S.height,S.width)}function ke(S){if(l.static)return;const se=S.type;if(se==="resizestart"&&p.isResizing||se!=="resizestart"&&!p.isResizing)return;const Me=Xo(S);if(cn(Me))return;const{x:A,y:oe}=Me,U={width:0,height:0};let q;switch(se){case"resizestart":{Z(),ee=h,$=E,q=Ge(m,C,h,E),U.width=q.width,U.height=q.height,p.resizing=U,p.isResizing=!0;break}case"resizemove":{!S.edges.right&&!S.edges.left&&(H=A),!S.edges.top&&!S.edges.bottom&&(I=oe);const Se=Go(H,I,A,oe);M.value?U.width=p.resizing.width-Se.deltaX/p.transformScale:U.width=p.resizing.width+Se.deltaX/p.transformScale,U.height=p.resizing.height+Se.deltaY/p.transformScale,p.resizing=U;break}case"resizeend":{q=Ge(m,C,h,E),U.width=q.width,U.height=q.height,p.resizing={width:-1,height:-1},p.isResizing=!1;break}}q=pe(U.height,U.width),q.w<l.minW&&(q.w=l.minW),q.w>l.maxW&&(q.w=l.maxW),q.h<l.minH&&(q.h=l.minH),q.h>l.maxH&&(q.h=l.maxH),q.h<1&&(q.h=1),q.w<1&&(q.w=1),H=A,I=oe,(h!==q.w||E!==q.h)&&u("resize",l.i,q.h,q.w,U.height,U.width),S.type==="resizeend"&&(ee!==h||$!==E)&&u("resized",l.i,q.h,q.w,U.height,U.width),k.emit("resizeEvent",S.type,l.i,m,C,q.h,q.w)}function T(S){if(l.static||p.isResizing)return;const se=S.type;if(se==="dragstart"&&p.isDragging||se!=="dragstart"&&!p.isDragging)return;const Me=Xo(S);if(cn(Me))return;const{x:A,y:oe}=Me,U=S.target;if(!U.offsetParent)return;const q={top:0,left:0};switch(se){case"dragstart":{F=m,L=C;const ue=U.offsetParent.getBoundingClientRect(),G=U.getBoundingClientRect(),Q=G.left/p.transformScale,he=ue.left/p.transformScale,ye=G.right/p.transformScale,_e=ue.right/p.transformScale,xe=G.top/p.transformScale,K=ue.top/p.transformScale;M.value?q.left=(ye-_e)*-1:q.left=Q-he,q.top=xe-K,p.dragging=q,p.isDragging=!0;break}case"dragmove":{const ue=Go(O,P,A,oe);if(M.value?q.left=p.dragging.left-ue.deltaX/p.transformScale:q.left=p.dragging.left+ue.deltaX/p.transformScale,q.top=p.dragging.top+ue.deltaY/p.transformScale,p.bounded){const G=U.offsetParent.clientHeight-ce(l.h,p.rowHeight,p.margin[1]);q.top=ae(q.top,0,G);const Q=Ae(),he=p.containerWidth-ce(l.w,Q,p.margin[0]);q.left=ae(q.left,0,he)}p.dragging=q;break}case"dragend":{const ue=U.offsetParent.getBoundingClientRect(),G=U.getBoundingClientRect(),Q=G.left/p.transformScale,he=ue.left/p.transformScale,ye=G.right/p.transformScale,_e=ue.right/p.transformScale,xe=G.top/p.transformScale,K=ue.top/p.transformScale;M.value?q.left=(ye-_e)*-1:q.left=Q-he,q.top=xe-K,p.dragging={top:-1,left:-1},p.isDragging=!1;break}}let Se;M.value,Se=Ye(q.top,q.left),O=A,P=oe,(m!==Se.x||C!==Se.y)&&u("move",l.i,Se.x,Se.y),S.type==="dragend"&&(F!==m||L!==C)&&u("moved",l.i,Se.x,Se.y),k.emit("dragEvent",S.type,l.i,Se.x,Se.y,E,h)}function Ge(S,se,Me,A){const oe=Ae();let U;return M.value?U={right:Math.round(oe*S+(S+1)*p.margin[0]),top:Math.round(p.rowHeight*se+(se+1)*p.margin[1]),width:Me===1/0?Me:Math.round(oe*Me+Math.max(0,Me-1)*p.margin[0]),height:A===1/0?A:Math.round(p.rowHeight*A+Math.max(0,A-1)*p.margin[1])}:U={left:Math.round(oe*S+(S+1)*p.margin[0]),top:Math.round(p.rowHeight*se+(se+1)*p.margin[1]),width:Me===1/0?Me:Math.round(oe*Me+Math.max(0,Me-1)*p.margin[0]),height:A===1/0?A:Math.round(p.rowHeight*A+Math.max(0,A-1)*p.margin[1])},U}function Ye(S,se){const Me=Ae();let A=Math.round((se-p.margin[0])/(Me+p.margin[0])),oe=Math.round((S-p.margin[1])/(p.rowHeight+p.margin[1]));return A=Math.max(Math.min(A,p.cols-h),0),oe=Math.max(Math.min(oe,p.maxRows-E),0),{x:A,y:oe}}function Ae(){return(p.containerWidth-p.margin[0]*(p.cols+1))/p.cols}function ce(S,se,Me){return Number.isFinite(S)?Math.round(se*S+Math.max(0,S-1)*Me):S}function ae(S,se,Me){return Math.max(Math.min(S,Me),se)}function pe(S,se,Me=!1){const A=Ae();let oe=Math.round((se+p.margin[0])/(A+p.margin[0])),U=0;return Me?U=Math.ceil((S+p.margin[1])/(p.rowHeight+p.margin[1])):U=Math.round((S+p.margin[1])/(p.rowHeight+p.margin[1])),oe=Math.max(Math.min(oe,p.cols-m),0),U=Math.max(Math.min(U,p.maxRows-C),0),{w:oe,h:U}}function Ce(S,se){p.containerWidth=S}function qe(){Ee()}function dt(){!v.value&&g.value&&(v.value=Zo(g.value),p.useStyleCursor||v.value.styleCursor(!1))}const b=Wo(T);function N(){if(dt(),!!v.value)if(p.draggable&&!l.static){const S={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};v.value.draggable(S),y||(y=!0,v.value.on("dragstart dragmove dragend",se=>{se.type==="dragmove"?b(se):T(se)}))}else v.value.draggable({enabled:!1})}const W=Wo(ke);function Z(){if(dt(),!!v.value)if(p.resizable&&!l.static){const S=Ge(0,0,l.maxW,l.maxH),se=Ge(0,0,l.minW,l.minH),Me={edges:{left:M.value?`.${we.value[0]}`:!1,right:M.value?!1:`.${we.value[0]}`,bottom:`.${we.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:se.height*p.transformScale,width:se.width*p.transformScale},max:{height:S.height*p.transformScale,width:S.width*p.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(Me.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(Me),_||(_=!0,v.value.on("resizestart resizemove resizeend",A=>{A.type==="resizemove"?W(A):ke(A)}))}else v.value.resizable({enabled:!1})}return(S,se)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:g,class:e.normalizeClass(ve.value),style:e.normalizeStyle(p.style)},[e.renderSlot(S.$slots,"default"),X.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(we.value)},null,2)):e.createCommentVNode("",!0)],6))}}),la=typeof window<"u";var Qo;la&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function el(a){return a!=null}function tl(){}const Pp=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(Pp)));const Fp=la&&("ontouchstart"in window||$p()>0),Lp=Fp?"pointerdown":"click";function $p(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function jp(a,r,i=window.Event){const{type:l,bubbles:u=!1,cancelable:s=!1,...k}=r;if(!el(l)||l==="")return!1;let v;return el(i)?v=new i(l,{bubbles:u,cancelable:s}):(v=document.createEvent("HTMLEvents"),v.initEvent(l,u,s)),Object.assign(v,k),a.dispatchEvent(v)}const Up="clickoutside",Kp=new Set;la&&document.addEventListener(Lp,a=>{const r=a.target,i=a.composedPath&&a.composedPath();Kp.forEach(l=>{l!==r&&(i?!i.includes(l):!l.contains(r))&&(!l.__transferElement||l.__transferElement!==r&&!l.__transferElement.contains(r))&&jp(l,{type:Up})})},!0);const Wp=[["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 Fa;if(la){for(const a of Wp)if(a[1]in document){Fa=a;break}}e.computed(()=>!1);const Hp=new Set,qp=new WeakMap;if(la&&Fa){const a=Fa[2],r=Fa[4];document.addEventListener(r,()=>{if(Hp.forEach(i=>{i.value=!1}),document[a]){const i=qp.get(document[a]);i&&(i.value=!0)}},!1)}const nr=new Map;nr.set("x",0);nr.set("y",0);var na=[],Xp=function(){return na.some(function(a){return a.activeTargets.length>0})},Gp=function(){return na.some(function(a){return a.skippedTargets.length>0})},nl="ResizeObserver loop completed with undelivered notifications.",Yp=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:nl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=nl),window.dispatchEvent(a)},Sa;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Sa||(Sa={}));var aa=function(a){return Object.freeze(a)},Jp=function(){function a(r,i){this.inlineSize=r,this.blockSize=i,aa(this)}return a}(),ar=function(){function a(r,i,l,u){return this.x=r,this.y=i,this.width=l,this.height=u,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,aa(this)}return a.prototype.toJSON=function(){var r=this,i=r.x,l=r.y,u=r.top,s=r.right,k=r.bottom,v=r.left,p=r.width,y=r.height;return{x:i,y:l,top:u,right:s,bottom:k,left:v,width:p,height:y}},a.fromRect=function(r){return new a(r.x,r.y,r.width,r.height)},a}(),bo=function(a){return a instanceof SVGElement&&"getBBox"in a},or=function(a){if(bo(a)){var r=a.getBBox(),i=r.width,l=r.height;return!i&&!l}var u=a,s=u.offsetWidth,k=u.offsetHeight;return!(s||k||a.getClientRects().length)},al=function(a){var r;if(a instanceof Element)return!0;var i=(r=a==null?void 0:a.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(i&&a instanceof i.Element)},Zp=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ca=typeof window<"u"?window:{},Ma=new WeakMap,ol=/auto|scroll/,Qp=/^tb|vertical/,ef=/msie|trident/i.test(Ca.navigator&&Ca.navigator.userAgent),bn=function(a){return parseFloat(a||"0")},ha=function(a,r,i){return a===void 0&&(a=0),r===void 0&&(r=0),i===void 0&&(i=!1),new Jp((i?r:a)||0,(i?a:r)||0)},ll=aa({devicePixelContentBoxSize:ha(),borderBoxSize:ha(),contentBoxSize:ha(),contentRect:new ar(0,0,0,0)}),lr=function(a,r){if(r===void 0&&(r=!1),Ma.has(a)&&!r)return Ma.get(a);if(or(a))return Ma.set(a,ll),ll;var i=getComputedStyle(a),l=bo(a)&&a.ownerSVGElement&&a.getBBox(),u=!ef&&i.boxSizing==="border-box",s=Qp.test(i.writingMode||""),k=!l&&ol.test(i.overflowY||""),v=!l&&ol.test(i.overflowX||""),p=l?0:bn(i.paddingTop),y=l?0:bn(i.paddingRight),_=l?0:bn(i.paddingBottom),O=l?0:bn(i.paddingLeft),P=l?0:bn(i.borderTopWidth),H=l?0:bn(i.borderRightWidth),I=l?0:bn(i.borderBottomWidth),ee=l?0:bn(i.borderLeftWidth),$=O+y,F=p+_,L=ee+H,m=P+I,C=v?a.offsetHeight-m-a.clientHeight:0,h=k?a.offsetWidth-L-a.clientWidth:0,E=u?$+L:0,g=u?F+m:0,te=l?l.width:bn(i.width)-E-h,Te=l?l.height:bn(i.height)-g-C,Qe=te+$+h+L,de=Te+F+C+m,Be=aa({devicePixelContentBoxSize:ha(Math.round(te*devicePixelRatio),Math.round(Te*devicePixelRatio),s),borderBoxSize:ha(Qe,de,s),contentBoxSize:ha(te,Te,s),contentRect:new ar(O,p,te,Te)});return Ma.set(a,Be),Be},rr=function(a,r,i){var l=lr(a,i),u=l.borderBoxSize,s=l.contentBoxSize,k=l.devicePixelContentBoxSize;switch(r){case Sa.DEVICE_PIXEL_CONTENT_BOX:return k;case Sa.BORDER_BOX:return u;default:return s}},tf=function(){function a(r){var i=lr(r);this.target=r,this.contentRect=i.contentRect,this.borderBoxSize=aa([i.borderBoxSize]),this.contentBoxSize=aa([i.contentBoxSize]),this.devicePixelContentBoxSize=aa([i.devicePixelContentBoxSize])}return a}(),ir=function(a){if(or(a))return 1/0;for(var r=0,i=a.parentNode;i;)r+=1,i=i.parentNode;return r},nf=function(){var a=1/0,r=[];na.forEach(function(s){if(s.activeTargets.length!==0){var k=[];s.activeTargets.forEach(function(v){var p=new tf(v.target),y=ir(v.target);k.push(p),v.lastReportedSize=rr(v.target,v.observedBox),y<a&&(a=y)}),r.push(function(){s.callback.call(s.observer,k,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var i=0,l=r;i<l.length;i++){var u=l[i];u()}return a},rl=function(a){na.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(i){i.isActive()&&(ir(i.target)>a?r.activeTargets.push(i):r.skippedTargets.push(i))})})},af=function(){var a=0;for(rl(a);Xp();)a=nf(),rl(a);return Gp()&&Yp(),a>0},so,sr=[],of=function(){return sr.splice(0).forEach(function(a){return a()})},lf=function(a){if(!so){var r=0,i=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return of()}).observe(i,l),so=function(){i.textContent="".concat(r?r--:r++)}}sr.push(a),so()},rf=function(a){lf(function(){requestAnimationFrame(a)})},La=0,sf=function(){return!!La},cf=250,uf={attributes:!0,characterData:!0,childList:!0,subtree:!0},il=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sl=function(a){return a===void 0&&(a=0),Date.now()+a},co=!1,df=function(){function a(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return a.prototype.run=function(r){var i=this;if(r===void 0&&(r=cf),!co){co=!0;var l=sl(r);rf(function(){var u=!1;try{u=af()}finally{if(co=!1,r=l-sl(),!sf())return;u?i.run(1e3):r>0?i.run(r):i.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var r=this,i=function(){return r.observer&&r.observer.observe(document.body,uf)};document.body?i():Ca.addEventListener("DOMContentLoaded",i)},a.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),il.forEach(function(i){return Ca.addEventListener(i,r.listener,!0)}))},a.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),il.forEach(function(i){return Ca.removeEventListener(i,r.listener,!0)}),this.stopped=!0)},a}(),mo=new df,cl=function(a){!La&&a>0&&mo.start(),La+=a,!La&&mo.stop()},pf=function(a){return!bo(a)&&!Zp(a)&&getComputedStyle(a).display==="inline"},ff=function(){function a(r,i){this.target=r,this.observedBox=i||Sa.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var r=rr(this.target,this.observedBox,!0);return pf(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},a}(),hf=function(){function a(r,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=i}return a}(),za=new WeakMap,ul=function(a,r){for(var i=0;i<a.length;i+=1)if(a[i].target===r)return i;return-1},Ra=function(){function a(){}return a.connect=function(r,i){var l=new hf(r,i);za.set(r,l)},a.observe=function(r,i,l){var u=za.get(r),s=u.observationTargets.length===0;ul(u.observationTargets,i)<0&&(s&&na.push(u),u.observationTargets.push(new ff(i,l&&l.box)),cl(1),mo.schedule())},a.unobserve=function(r,i){var l=za.get(r),u=ul(l.observationTargets,i),s=l.observationTargets.length===1;u>=0&&(s&&na.splice(na.indexOf(l),1),l.observationTargets.splice(u,1),cl(-1))},a.disconnect=function(r){var i=this,l=za.get(r);l.observationTargets.slice().forEach(function(u){return i.unobserve(r,u.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),vf=function(){function a(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ra.connect(this,r)}return a.prototype.observe=function(r,i){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ra.observe(this,r,i)},a.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!al(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ra.unobserve(this,r)},a.prototype.disconnect=function(){Ra.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const Ga=new WeakMap;function gf(a){var r;for(let i=0,l=a.length;i<l;++i){const u=a[i],s=Ga.get(u.target);if(typeof s=="function"){const{inlineSize:k,blockSize:v}=((r=u.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:p,offsetHeight:y}=u.target;s(Object.assign(u,{offsetWidth:p,offsetHeight:y,width:k??p,height:v??y}))}}}const cr=new(la&&window.ResizeObserver||vf)(gf);function dl(a,r){Ga.set(a,r),cr.observe(a)}function pl(a){Ga.has(a)&&(cr.unobserve(a),Ga.delete(a))}function mf(a={}){let r=tl;const i=e.watch(()=>e.unref(a.target),u=>{r(),!(!u||typeof a.onResize!="function")&&(dl(u,a.onResize),r=()=>{pl(u),r=tl})},{immediate:!0}),l=()=>{i(),r()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:dl,unobserveResize:pl,unobserve:l}}const yf=e.ref(!1);e.computed(()=>yf.value);const fl="__theme_style__",uo="__theme_observer__",hl=e.reactive(new Map),vl=new Map;e.watch(hl,()=>{if(!la)return;vl.clear();const a=document.head.querySelector(`#${fl}`);a&&document.head.removeChild(a);const r=document.createElement("style");let i=`.${uo} { width: 1px }`,l=1;for(const[u,[s,k]]of hl.entries())i+=` html.${s} .${uo}, .${k} .${uo} { width: ${++l}px }`,vl.set(l,u);r.textContent=i,r.id=fl,document.head.appendChild(r)});const ur=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(a,{expose:r,emit:i}){const l=a,u=i,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),k=new Map,v=e.ref(l.layout),p=e.ref(),{observeResize:y,unobserveResize:_}=mf(),O=gp();O.on("resizeEvent",P),O.on("dragEvent",H),e.onBeforeMount(()=>{u("layout-before-mount",v.value)}),e.onMounted(()=>{u("layout-mounted",v.value),e.nextTick(()=>{Sp(v.value),s.originalLayout=v.value,e.nextTick(()=>{Te(),p.value&&y(p.value,mp(m,16)),da(v.value,l.verticalCompact),u("layout-updated",v.value),L(),m()})})}),e.onBeforeUnmount(()=>{O.clearAll(),p.value&&_(p.value)});function P(de,Be,Oe,z,re,le){g(de,Be,Oe,z,re,le)}function H(de,Be,Oe,z,re,le){E(de,Be,Oe,z,re,le)}e.watch(()=>s.width,(de,Be)=>{e.nextTick(()=>{O.emit("updateWidth",de),Be===-1&&e.nextTick(()=>{u("layout-ready",v.value)}),L()})}),e.watch(()=>[l.layout,l.layout.length],()=>{v.value=l.layout,F()}),e.watch(()=>l.colNum,de=>{O.emit("setColNum",de)}),e.watch(()=>l.rowHeight,de=>{O.emit("setRowHeight",de)}),e.watch(()=>l.isDraggable,de=>{O.emit("setDraggable",de)}),e.watch(()=>l.isResizable,de=>{O.emit("setResizable",de)}),e.watch(()=>l.isBounded,de=>{O.emit("setBounded",de)}),e.watch(()=>l.transformScale,de=>{O.emit("setTransformScale",de)}),e.watch(()=>l.responsive,de=>{de||(u("update:layout",s.originalLayout),O.emit("setColNum",l.colNum)),m()}),e.watch(()=>l.maxRows,de=>{O.emit("setMaxRows",de)}),e.watch([()=>l.margin,()=>l.margin[1]],L),e.provide(Xl,e.reactive({...e.toRefs(l),...e.toRefs(s),increaseItem:I,decreaseItem:ee})),e.provide(Gl,O),r({state:s,getItem:$,resizeEvent:g,dragEvent:E,layoutUpdate:F});function I(de){k.set(de.i,de)}function ee(de){k.delete(de.i)}function $(de){return k.get(de)}function F(){if(!cn(v.value)&&!cn(s.originalLayout)){if(v.value.length!==s.originalLayout.length){const de=Qe(v.value,s.originalLayout);if(de.length>0)if(v.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(de);else{const Be=new Set(de.map(Oe=>Oe.i));s.originalLayout=s.originalLayout.filter(Oe=>!Be.has(Oe.i))}s.lastLayoutLength=v.value.length,Te()}da(v.value,l.verticalCompact),O.emit("updateWidth",s.width),L(),u("layout-updated",v.value)}}function L(){s.mergedStyle={height:C()}}function m(){p.value&&(s.width=p.value.offsetWidth),O.emit("resizeEvent")}function C(){if(!l.autoSize)return;const de=parseFloat(l.margin[1]);return bp(v.value)*(l.rowHeight+de)+de+"px"}let h;function E(de,Be,Oe,z,re,le){let fe=Ho(v.value,Be);cn(fe)&&(fe={h:0,w:0,x:0,y:0,i:""}),de==="dragstart"&&!l.verticalCompact&&(h=v.value.reduce(($e,{i:tt,x:X,y:M})=>({...$e,[tt]:{x:X,y:M}}),{})),de==="dragmove"||de==="dragstart"?(s.placeholder.i=Be,s.placeholder.x=fe.x,s.placeholder.y=fe.y,s.placeholder.w=le,s.placeholder.h=re,e.nextTick(()=>{s.isDragging=!0}),O.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),v.value=go(v.value,fe,Oe,z,!0,l.preventCollision),l.restoreOnDrag?(fe.static=!0,da(v.value,l.verticalCompact,h),fe.static=!1):da(v.value,l.verticalCompact),O.emit("compact"),L(),de==="dragend"&&(h=void 0,u("layout-updated",v.value))}function g(de,Be,Oe,z,re,le){let fe=Ho(v.value,Be);cn(fe)&&(fe={h:0,w:0,x:0,y:0,i:""});let $e;if(l.preventCollision){const tt=Jl(v.value,{...fe,w:le,h:re}).filter(X=>X.i!==fe.i);if($e=tt.length>0,$e){let X=1/0,M=1/0;tt.forEach(ie=>{ie.x>fe.x&&(X=Math.min(X,ie.x)),ie.y>fe.y&&(M=Math.min(M,ie.y))}),Number.isFinite(X)&&(fe.w=X-fe.x),Number.isFinite(M)&&(fe.h=M-fe.y)}}$e||(fe.w=le,fe.h=re),de==="resizestart"||de==="resizemove"?(s.placeholder.i=Be,s.placeholder.x=Oe,s.placeholder.y=z,s.placeholder.w=fe.w,s.placeholder.h=fe.h,e.nextTick(()=>{s.isDragging=!0}),O.emit("updateWidth",s.width)):de&&e.nextTick(()=>{s.isDragging=!1}),l.responsive&&te(),da(v.value,l.verticalCompact),O.emit("compact"),L(),de==="resizeend"&&u("layout-updated",v.value)}function te(){const de=Np(l.breakpoints,s.width);if(de===s.lastBreakpoint)return;const Be=er(de,l.cols);!cn(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=vo(v.value));const Oe=Ap(s.originalLayout,s.layouts,l.breakpoints,de,s.lastBreakpoint,Be,l.verticalCompact);s.layouts[de]=Oe,s.lastBreakpoint!==de&&u("breakpoint-changed",de,Oe),v.value=Oe,u("update:layout",Oe),s.lastBreakpoint=de,O.emit("setColNum",Be)}function Te(){s.layouts=Object.assign({},l.responsiveLayouts)}function Qe(de,Be){const Oe=new Set(Be.map(fe=>fe.i)),z=new Set(de.map(fe=>fe.i)),re=de.filter(fe=>!Oe.has(fe.i)),le=Be.filter(fe=>!z.has(fe.i));return re.concat(le)}return(de,Be)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:p,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[de.$slots.default?e.renderSlot(de.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,Oe=>(e.openBlock(),e.createBlock(Xa,e.mergeProps({key:Oe.i,ref_for:!0},Oe),{default:e.withCtx(()=>[e.renderSlot(de.$slots,"item",{item:Oe})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Xa,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.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(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const bf={key:0,class:"item-view-group"},kf={key:0,class:"item-view-group"},xf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:r}){const i=D.useModelComp(D.pinia),{isEdit:l}=D.storeToRefs(i),u=r,s=a,k=e.computed(()=>s==null?void 0:s.children),v=e.computed(()=>{var P,H,I,ee;return((P=s==null?void 0:s.children)==null?void 0:P.length)>0&&((H=s==null?void 0:s.children)!=null&&H.every($=>$==null?void 0:$.layout))?(ee=(I=s==null?void 0:s.children)==null?void 0:I[0])==null?void 0:ee.layout:"vertical"}),p=e.computed(()=>{var P,H;return((H=(P=s==null?void 0:s.children)==null?void 0:P[0])==null?void 0:H.isGridLayout)||!1}),y=e.ref((s==null?void 0:s.level)+1),_=P=>{u("rowClick",P)},O=(P,H)=>{u("routeUrl",P,H)};return(P,H)=>p.value?(e.openBlock(),e.createBlock(e.unref(ur),{key:0,layout:k.value,"onUpdate:layout":H[0]||(H[0]=I=>k.value=I),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(I,ee)=>(e.openBlock(),e.createBlock(e.unref(Xa),{key:I.i,x:I.x,y:I.y,"min-h":I.minH,"max-h":I.maxH,"min-w":I.minW,w:I.w,h:I.h,i:I.i},{default:e.withCtx(()=>{var $,F,L,m,C,h,E,g,te,Te,Qe,de,Be;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ee===(($=s==null?void 0:s.children)==null?void 0:$.length)-1?"0px":"24px"})},[((L=(F=I==null?void 0:I.component)==null?void 0:F.comp)==null?void 0:L.toUpperCase())!=="TABLE"&&((m=I==null?void 0:I.component)!=null&&m.name)?(e.openBlock(),e.createElementBlock("div",bf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(y.value.toString())-1)*12+"px",fontWeight:600-(y.value-1)*100>=400?600-(y.value-1)*100:400,fontSize:17-y.value>=14?17-y.value+"px":"14px"})},e.toDisplayString((C=I==null?void 0:I.component)==null?void 0:C.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)((h=I==null?void 0:I.component)==null?void 0:h.comp)),{pageLayout:v.value,config:{showIndex:(E=e.unref(Yt)[ee])==null?void 0:E.showIndex,allowMove:(g=e.unref(Yt)[ee])==null?void 0:g.allowMove,viewport:(te=e.unref(Yt)[ee])==null?void 0:te.viewport},related:I==null?void 0:I.relatedTables,compName:I==null?void 0:I.component.name,compNames:e.unref(Fl),itemData:(Te=I==null?void 0:I.component)==null?void 0:Te.compData,childItemData:(Qe=I==null?void 0:I.component)==null?void 0:Qe.itemChildData,key:e.unref(va),cacheNewData:e.unref(Pl),onChange:e.unref(Wa),index:(I==null?void 0:I.id)??ee,onContentChange:e.unref(Ha),onPageChange:e.unref(qa),parentTableId:(de=I==null?void 0:I.component)==null?void 0:de.tableId,allMapContents:e.unref(ho),children:(Be=I==null?void 0:I.component)==null?void 0:Be.children,level:y.value,onRowClick:_,onRouteUrl:O,onClickTrigger:e.unref(Ll),onClickMainKey:e.unref($l)},null,40,["pageLayout","config","related","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(s==null?void 0:s.children,(I,ee)=>{var $,F;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(I==null?void 0:I.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ee)===(($=s==null?void 0:s.children)==null?void 0:$.length)-1?"0px":"24px"})},[((F=I==null?void 0:I.comp)==null?void 0:F.toUpperCase())!=="TABLE"&&I.name?(e.openBlock(),e.createElementBlock("div",kf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(y.value.toString())>1?"12px":"0px",fontWeight:600-(y.value-1)*100>=400?600-(y.value-1)*100:400,fontSize:17-y.value>=14?17-y.value+"px":"14px"})},e.toDisplayString(I.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Ka)(I.comp)),{compName:I.name,itemData:I==null?void 0:I.compData,related:I==null?void 0:I.relatedTables,childItemData:I==null?void 0:I.itemChildData,key:e.unref(va),onChange:e.unref(Wa),index:(I==null?void 0:I.id)??ee,onContentChange:e.unref(Ha),onPageChange:e.unref(qa),parentTableId:I==null?void 0:I.tableId,allMapContents:e.unref(ho),children:I==null?void 0:I.children,level:y.value,onRowClick:_,onRouteUrl:O},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),wf=Ft._export_sfc(xf,[["__scopeId","data-v-a00427c1"]]),dr=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"}]),Df={TABLE:xa.ssTable,FORM:Oo,TABLEOPERATE:bs,TABLESTYLE:Ms,TABLEEXTEND:Rs,TABLEINTERACTION:Ls,FORMOPERATE:Mo,FOLD:gc,CALCULATOR:wc,METHODBUTTON:Ec,AVATARUPLOAD:No.ssAvatar,SIGNATURE:No.ssSignature,FORMTOP:Oo,STEP:Rc,STEPOPERATE:ic,TIMELINE:Uc,TIMELINEOPERATE:fc,FORMTOPOPERATE:Mo,SIGNATUREOPERATE:Oc,AVATARUPLOADOPERATE:Tc,TABS:Hc,TABSOPERATE:Nu,CHART:Wu,CHARTOPERATE:nd,LAYOUT:op,LAYOUTOPERATE:fp,PARENTITEM:wf};function ra(a){return Df[a==null?void 0:a.toUpperCase()]||null}exports.De=ur;exports._sfc_main=Il;exports.activeStepInfo=pa;exports.affixItems=qd;exports.allMapContents=ho;exports.analyzeForm=ud;exports.analyzeQuoteForm=cd;exports.analyzeSplitToContent=Ht;exports.analyzeTable=pd;exports.analyzerStringToArray=ad;exports.cacheNewData=Pl;exports.clickMainKey=$l;exports.clickSavePage=Hd;exports.clickStep=Ul;exports.clickTrigger=Ll;exports.compId=va;exports.compNames=Fl;exports.compShow=Ua;exports.existLayouts=Gd;exports.generateLayouts=Ns;exports.getComponent=ra;exports.getComponents=Ka;exports.getSliceContLength=Qd;exports.gridRowHeight=Cs;exports.isStepLayout=Kl;exports.onBack=Ud;exports.onChange=Wa;exports.onClick=Wd;exports.onContentChange=Ha;exports.onExtendTaskEnd=Xd;exports.onPageBack=Yd;exports.onPageChange=qa;exports.onSelectFixContent=jd;exports.renderShowItems=zl;exports.same=od;exports.setComponent=Ol;exports.showItems=Yt;exports.sliceTableLength=Rl;exports.slotContent=dr;exports.ssMenu=ja;exports.st=Xa;exports.stepItems=ep;exports.toolBar=wa;exports.verifyButton=Jd;
|