ss-component-new 1.3.21 → 1.3.23
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-YtHulNzU.cjs → MTLLoader-C_XCtjSi.cjs} +1 -1
- package/dist/{MTLLoader-CBRDqlja.js → MTLLoader-YR-bfx1D.js} +24 -24
- package/dist/{OrbitControls-CKR1ruPg.js → OrbitControls-BGsXD_A7.js} +1 -1
- package/dist/{OrbitControls-Bwzpfq8_.cjs → OrbitControls-CktvE4iE.cjs} +1 -1
- package/dist/{URDFLoader-DIvTWPgk.cjs → URDFLoader-10oVp_KW.cjs} +1 -1
- package/dist/{URDFLoader-D-0fnLWu.js → URDFLoader-m1gMdnSQ.js} +189 -189
- package/dist/{animationData-BBVNOO1d.js → animationData-CpK8d_Vm.js} +19 -19
- package/dist/{animationData-krmt7b15.cjs → animationData-Cr2ra7rm.cjs} +1 -1
- package/dist/{array-AvrqnNoJ.js → array-BmfCVZvi.js} +46 -46
- package/dist/{array-CMW4ey7w.cjs → array-COho2hZW.cjs} +1 -1
- package/dist/{iconfont-CSj9Ypb0.js → iconfont-0yJB130V.js} +29 -29
- package/dist/{iconfont-CUPzGSlt.cjs → iconfont-DsF7kuG5.cjs} +1 -1
- package/dist/{index-VF71yUkZ.js → index-5YbplPvi.js} +2 -2
- package/dist/{index-I09e-7nF.js → index-76YbJdM8.js} +2 -2
- package/dist/{index-BWb8IVmh.js → index-98Ogvz1v.js} +7 -7
- package/dist/{index-B7VKjUP4.cjs → index-B4LIBl-a.cjs} +1 -1
- package/dist/{index-NB4ig2Zg.js → index-B52TVCSg.js} +8 -8
- package/dist/{index-B1Zztqcr.cjs → index-BEBJWYp0.cjs} +1 -1
- package/dist/{index-Dx5UzB8t.js → index-BHjvJiFA.js} +5 -5
- package/dist/{index-BLxE_tkf.cjs → index-BJPBBWWH.cjs} +1 -1
- package/dist/{index-DEF8zy07.js → index-BLcFvu4u.js} +3 -3
- package/dist/{index-BPstNH4r.cjs → index-BPlHuTxE.cjs} +4 -4
- package/dist/index-BPu9kWR3.js +11883 -0
- package/dist/{index-snyYrfwK.cjs → index-BRJ1_Tfi.cjs} +1 -1
- package/dist/{index-vCTVD7cV.cjs → index-BWCv7zxy.cjs} +1 -1
- package/dist/{index-DWfxnemZ.js → index-BXUByyre.js} +2 -2
- package/dist/{index-DUt_5IeJ.js → index-Bnp6YMyE.js} +1461 -1455
- package/dist/{index-CGrJyKvT.cjs → index-BxMPyw-Y.cjs} +1 -1
- package/dist/{index-DWm4nu2G.cjs → index-CBqGrYej.cjs} +1 -1
- package/dist/{index-Dm67w52u.cjs → index-CC9drriV.cjs} +1 -1
- package/dist/{index-sMsCzNtW.js → index-COQpDVsv.js} +1570 -1535
- package/dist/{index-C4Ohl9vT.js → index-CRbfwrdV.js} +41 -41
- package/dist/{index-CuvQZsbE.cjs → index-CVXrjDFh.cjs} +1 -1
- package/dist/{index-CEzEaG0d.js → index-CXiOVgoz.js} +1 -1
- package/dist/{index-BzGHYxs2.cjs → index-CbBY3TG6.cjs} +1 -1
- package/dist/{index-DuGfBNM6.cjs → index-CgFSiyRX.cjs} +1 -1
- package/dist/{index-Cu-8pzHm.js → index-Chxt6xBv.js} +5 -5
- package/dist/{index-CIrXKpNl.cjs → index-Cjqg29ul.cjs} +1 -1
- package/dist/index-CpbBe_mV.cjs +1 -0
- package/dist/index-CuAHwR97.cjs +1 -0
- package/dist/{index-DHrb-D39.js → index-D-kqGA71.js} +7 -7
- package/dist/{index-euZWOilV.cjs → index-D3ixok8t.cjs} +1 -1
- package/dist/{index-D39AtL48.js → index-D8HD14bz.js} +1 -1
- package/dist/{index-DABBYx7H.js → index-DBh5Z73C.js} +1 -1
- package/dist/index-DIWralYr.js +67 -0
- package/dist/{index-C8fMwErX.cjs → index-DRTxe12U.cjs} +13 -13
- package/dist/{index-BFKUrR1o.cjs → index-DS-YTop9.cjs} +1 -1
- package/dist/{index-Cw4Pm2PQ.cjs → index-DU9e5EhS.cjs} +1 -1
- package/dist/{index-DN2waPoj.cjs → index-D_Yhv_HV.cjs} +1 -1
- package/dist/{index-d6tZBTSp.cjs → index-DaIE9uY1.cjs} +1 -1
- package/dist/{index-BT6DSXQW.js → index-Ddoq7kRQ.js} +9 -9
- package/dist/{index-CZKslfuq.js → index-Du1HuKYs.js} +2 -2
- package/dist/{index-Cxl9cpua.js → index-HgbCIoqo.js} +2 -2
- package/dist/index-MK7NdOmS.cjs +1 -0
- package/dist/{index-C7WQ1ky5.js → index-NaWMtdUV.js} +2 -2
- package/dist/{index-DTttfGgm.js → index-OX4hSXv6.js} +7 -7
- package/dist/{index-DXiGkaWi.cjs → index-TMUwtzAm.cjs} +1 -1
- package/dist/{index-DGRL8SEt.js → index-Va8AOLWi.js} +1 -1
- package/dist/{index-Bjsm8c8q.cjs → index-c4SVf22I.cjs} +1 -1
- package/dist/{index-CppJQDiT.js → index-gfdgTjvQ.js} +3 -3
- package/dist/{index-CEq2QX9L.js → index-nr6V1FzX.js} +7 -7
- package/dist/{index-ovqPs7X7.cjs → index-oMihgN5x.cjs} +1 -1
- package/dist/{index-DTuVgYze.cjs → index-r6HP72OA.cjs} +1 -1
- package/dist/{index-CBtxzh-u.js → index-tVVurbFz.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-1pEFQ04s.js} +29074 -28413
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-ZMwIbmlN.cjs} +392 -382
- package/dist/{index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs → index.vue_vue_type_style_index_1_lang--4T7j9qz.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-q8rMzh6x.js → index.vue_vue_type_style_index_1_lang-CNh42_ZH.js} +75 -75
- package/dist/{main-CmrBxQsF.cjs → main-BH4e9Of0.cjs} +1 -1
- package/dist/{main-ZLB6NnLd.js → main-DU0KTY9Z.js} +4 -4
- package/dist/{menuIndex-8RF_0N_y.cjs → menuIndex-D52EAwtb.cjs} +1 -1
- package/dist/{menuIndex-BwWrdu20.js → menuIndex-DYaogp2R.js} +1 -1
- package/dist/ss-component.cjs +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-DpvPVwlN.js → threeModel-AsOY6mTs.js} +45 -45
- package/dist/{threeModel-D5UnPmV3.cjs → threeModel-rcCyHi_m.cjs} +1 -1
- package/dist/{threePreview-XQG7sQy9.js → threePreview-CkKl3frr.js} +125 -125
- package/dist/{threePreview-CBFQtSls.cjs → threePreview-DOD9HOZn.cjs} +1 -1
- package/dist/{threeSceneView-D97Sc8hd.cjs → threeSceneView-DZvOLWv6.cjs} +1 -1
- package/dist/{threeSceneView-CdZFIImJ.js → threeSceneView-DlL9pZlj.js} +38 -38
- package/dist/{threeSceneViewForCPMPIP-4Cjv1ZS4.cjs → threeSceneViewForCPMPIP-CZvKvfDx.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DH__ogKh.js → threeSceneViewForCPMPIP-DB0Eczbs.js} +8 -8
- package/dist/{threeTrackPathView-s17KavQX.cjs → threeTrackPathView-DgyAEYfV.cjs} +1 -1
- package/dist/{threeTrackPathView-BFQXaw-a.js → threeTrackPathView-Eb1bvUXJ.js} +78 -78
- package/dist/{threeViewerHost-C39tiQj-.cjs → threeViewerHost-BMU1tg9c.cjs} +1 -1
- package/dist/{threeViewerHost-BgPjA_94.js → threeViewerHost-Bdzv9iPb.js} +11 -11
- package/dist/{urdfTree-HdeBG5se.cjs → urdfTree-CoK2r17Y.cjs} +1 -1
- package/dist/{urdfTree-DM6uTeXj.js → urdfTree-hLtm0aFY.js} +10 -10
- package/dist/{workpieceTreePanel-C5qUdbmi.js → workpieceTreePanel-Ne_ACq86.js} +63 -63
- package/dist/{workpieceTreePanel-BKOHDm85.cjs → workpieceTreePanel-mWvCQyyw.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BteE57Nz.js +0 -103
- package/dist/index-C8FzkPpO.cjs +0 -1
- package/dist/index-CmctAnWR.cjs +0 -11
- package/dist/index-CsbDyIb2.cjs +0 -1
- package/dist/index-DdXtt1dh.js +0 -12544
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const ha=require("./index-CBqGrYej.cjs"),e=require("vue"),y=require("./index-DRTxe12U.cjs"),Bt=require("./index-BPlHuTxE.cjs"),ot=require("./index-C5pQXH0_.cjs"),Ie=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-ZMwIbmlN.cjs"),Gt=require("./index-D_Yhv_HV.cjs"),go=require("./threeViewerHost-BMU1tg9c.cjs");require("./index.vue_vue_type_style_index_1_lang--4T7j9qz.cjs");const Rt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),mo=require("./isString-Cdf6R00a.cjs"),yo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),bo=require("./index-c4SVf22I.cjs"),tr=require("./index-BVaHwt5f.cjs"),Ei=require("./index-CVXrjDFh.cjs"),Si=require("./index-BpPyaNFa.cjs"),Ti=require("vue-router"),fa=require("./index-9hspBVrQ.cjs"),Bi=require("./menuIndex-D52EAwtb.cjs"),qa=require("./index-CpbBe_mV.cjs");var Ii=/\s/;function Ni(o){for(var l=o.length;l--&&Ii.test(o.charAt(l)););return l}var Vi=/^\s+/;function Ai(o){return o&&o.slice(0,Ni(o)+1).replace(Vi,"")}var ko=NaN,Oi=/^[-+]0x[0-9a-f]+$/i,zi=/^0b[01]+$/i,Mi=/^0o[0-7]+$/i,Fi=parseInt;function xo(o){if(typeof o=="number")return o;if(ot.isSymbol(o))return ko;if(ot.isObject(o)){var l=typeof o.valueOf=="function"?o.valueOf():o;o=ot.isObject(l)?l+"":l}if(typeof o!="string")return o===0?o:+o;o=Ai(o);var c=zi.test(o);return c||Mi.test(o)?Fi(o.slice(2),c?2:8):Oi.test(o)?ko:+o}var Ga=function(){return ot.root.Date.now()},Ri="Expected a function",Pi=Math.max,Li=Math.min;function nr(o,l,c){var r,p,u,E,g,f,C=0,S=!1,M=!1,R=!0;if(typeof o!="function")throw new TypeError(Ri);l=xo(l)||0,ot.isObject(c)&&(S=!!c.leading,M="maxWait"in c,u=M?Pi(xo(c.maxWait)||0,l):u,R="trailing"in c?!!c.trailing:R);function Q(V){var N=r,be=p;return r=p=void 0,C=V,E=o.apply(be,N),E}function O(V){return C=V,g=setTimeout(U,l),S?Q(V):E}function ke(V){var N=V-f,be=V-C,Je=l-N;return M?Li(Je,u-be):Je}function H(V){var N=V-f,be=V-C;return f===void 0||N>=l||N<0||M&&be>=u}function U(){var V=Ga();if(H(V))return se(V);g=setTimeout(U,ke(V))}function se(V){return g=void 0,R&&r?Q(V):(r=p=void 0,E)}function x(){g!==void 0&&clearTimeout(g),C=0,r=f=p=g=void 0}function F(){return g===void 0?E:se(Ga())}function b(){var V=Ga(),N=H(V);if(r=arguments,p=this,f=V,N){if(g===void 0)return O(f);if(M)return clearTimeout(g),g=setTimeout(U,l),Q(f)}return g===void 0&&(g=setTimeout(U,l)),E}return b.cancel=x,b.flush=F,b}var $i="[object Boolean]";function ar(o){return o===!0||o===!1||ot.isObjectLike(o)&&ot.baseGetTag(o)==$i}function ji(o){return o===void 0}const Ui={class:"statistics-cards-container"},Ki={class:"statistics-label"},Wi={class:"statistics-value"},Hi=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(o){return(l,c)=>(e.openBlock(),e.createElementBlock("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.items,(r,p)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:p},[e.createElementVNode("div",Ki,e.toDisplayString(r==null?void 0:r.label),1),e.createElementVNode("div",Wi,e.toDisplayString((r==null?void 0:r.value)??0),1)]))),128))]))}}),qi=Rt._export_sfc(Hi,[["__scopeId","data-v-d399b1f3"]]),Gi={class:"form-content"},Xi={title:"选择标签"},Yi={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},Ji={class:"col-operate-wrap"},Zi={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Qi={__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(o,{emit:l}){const c=()=>{E.value=!1,g.value=!1,f.value=[]},r=o;e.computed(()=>{var L;const _=(L=A.value)==null?void 0:L.split("/");return(_==null?void 0:_.some(K=>(K==null?void 0:K.includes("updateLoading"))||(K==null?void 0:K.includes("loading"))))?!1:z.value==="view"});const p=l,u=e.ref([]),E=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:C}=go.useThreeSystem(),S=e.ref(),M=e.ref(!1),R=e.ref(!1),Q=Ie.useUnit(y.pinia),{chooseTitle:O}=y.storeToRefs(Q),ke=e.ref([]),H=e.ref(),U=e.ref(!1),se=e.ref([]),x=ha.useFormToTableComp(y.pinia),F=ha.useFormComp(y.pinia),b=e.ref(!1),V=e.ref(),N=y.useLoginState(y.pinia),{loginUserInfo:be}=y.storeToRefs(N),Je=e.ref(),yt=e.ref(!0),Ve=y.useModelComp(y.pinia),{tableViewContents:We,itemData:je,isEdit:z,routeToChildPath:ie,lockingPage:re}=y.storeToRefs(Ve),fe=e.ref(null),Ye=e.ref(!1),it=e.ref(!1),q=y.useMenuState(),{activeMenuPath:A}=y.storeToRefs(q),ge=Ie.useOriginalState(y.pinia),{originalPath:me}=y.storeToRefs(ge),Me=e.ref([]),Te=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Ze=async _=>{it.value=_,await ne("disabled",null,_,!0)},ee=async _=>{await ne("operable",null,_,!0)};e.watch(()=>A.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const xe=()=>{e.nextTick(()=>{Ee()})},T=_=>{var Z;u.value=(Z=u.value)==null?void 0:Z.map(L=>({...L,isFormColHidden:!(_!=null&&_.includes(L.label))}))};e.onUnmounted(()=>{fe.value=null});const He=_=>{p("clickTrigger",_)},qe=async _=>{var Z,L,K,Ce,ae,W;if(_===""){let Y="";(Z=u.value)==null||Z.forEach(he=>{he!=null&&he.isMain&&(Y=he==null?void 0:he.value)});let le=await Ie.getItemData(ie.value,sessionStorage.getItem("systemKey"),"");Y=((W=(ae=(Ce=(K=(L=le==null?void 0:le[0])==null?void 0:L.compData)==null?void 0:K.find(he=>(he==null?void 0:he.key)==="mainRouters"))==null?void 0:Ce.contents)==null?void 0:ae[0])==null?void 0:W.routerContent)+me.value+Y;let ye=await Ie.getItemData(Y,sessionStorage.getItem("systemKey"),"");U.value=!0,se.value=ye==null?void 0:ye.filter(he=>(he==null?void 0:he.comp)!=="methodButton"),p("routeUrl",se.value)}},Ee=()=>{var Z;const _=(Z=fe.value)==null?void 0:Z.$el;_&&Ie.Sortable.create(_,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:L=>{const{oldIndex:K,newIndex:Ce}=L;if(K===Ce)return;const ae=u.value.splice(K,1)[0];u.value.splice(Ce,0,ae)}})},ne=async(_,Z,L,K=!1)=>{try{Ve.setRefreshCurStructure(!1)}catch{ot.ElMessage.error("编辑处理失败")}},J=async(_,Z)=>{await ne()},oe=async(_,Z)=>{_&&await ne()},we=async(_,Z,L)=>{await ne(Z,L,_,!1)},Ue=(_,Z)=>{Je.value===Z?yt.value=!1:yt.value=!0,Je.value=Z==null?void 0:Z.changeProp},ut=async _=>{var L,K,Ce,ae,W,Y,le,de,ye,he,$,Ne,pe,Pe,nt;let Z=[];if((L=_==null?void 0:_.toString())!=null&&L.includes(".urdf")){if(_.includes(",")){ot.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:_,extension:C(_)}],g.value=!0,E.value=!0;return}if((K=_==null?void 0:_.toString())!=null&&K.includes(".stl")||(Ce=_==null?void 0:_.toString())!=null&&Ce.includes(".STL")||(ae=_==null?void 0:_.toString())!=null&&ae.includes(".obj")||(W=_==null?void 0:_.toString())!=null&&W.includes(".mtl")){const tt=((Y=_==null?void 0:_.toString())==null?void 0:Y.split(",")).map(_e=>({url:_e,extension:C(_e)}));f.value=tt,g.value=!1,E.value=!0;return}if((le=_==null?void 0:_.toString())!=null&&le.includes(".stl")||(de=_==null?void 0:_.toString())!=null&&de.includes(".STL")||(ye=_==null?void 0:_.toString())!=null&&ye.includes(".obj")||(he=_==null?void 0:_.toString())!=null&&he.includes(".mtl")){let Fe,tt=[],_e={};if(Array.isArray(_)?Fe=_:Fe=_==null?void 0:_.split(","),Fe==null||Fe.forEach(vt=>{vt.includes(".mtl")?tt.push(vt):_e.blob=_e.blob?_e.blob+","+vt:vt}),(tt==null?void 0:tt.length)>0&&(_e.mtlBlobs=tt),(Ne=($=Object.values(_e))==null?void 0:$[0])!=null&&Ne.includes("http:"))Z.push(_e);else{const vt=new Blob([_e.blob],{type:"application/octet-stream;charset=UTF-8"});let Qe=URL.createObjectURL(vt),Be="";(pe=_==null?void 0:_.split("/"))==null||pe.forEach((rt,gt)=>{var Ge;gt===((Ge=_==null?void 0:_.split("/"))==null?void 0:Ge.length)-1&&(Be=rt)}),(Pe=_e.blob)!=null&&Pe.includes(".stl")&&(Be=(Be==null?void 0:Be.replaceAll(">",""))+".urdf"),H.value=[{name:Be,blobUrl:Qe}],R.value=!0}}else{const Fe=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),tt=await ot.axios.get(_,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Fe.close()}),_e=new Blob([tt.data],{type:"application/octet-stream;charset=UTF-8"});let vt=URL.createObjectURL(_e),Qe="";(nt=_==null?void 0:_.split("/"))==null||nt.forEach((Be,rt)=>{var gt;rt===((gt=_==null?void 0:_.split("/"))==null?void 0:gt.length)-1&&(Qe=Be)}),H.value=[{name:Qe,blobUrl:vt}],R.value=!0}(Z==null?void 0:Z.length)>0&&F.setBlobUrls(Z)},h=()=>{R.value=!1},D=_=>{var ae,W,Y,le;const Z=(W=(ae=y.cloneDeep(r.itemData))==null?void 0:ae.find(de=>(de==null?void 0:de.key)==="formContent"))==null?void 0:W.contents,L=y.cloneDeep(_.content);let K={};L&&((Y=Object.values(L))==null?void 0:Y.length)>0&&((le=Object.values(L))==null||le.forEach((de,ye)=>{K[Z[ye].key]=de}));const Ce={content:K,index:r==null?void 0:r.index,buttonName:_==null?void 0:_.buttonName};p("change",Ce)},j=e.computed(()=>"http://222.92.178.198:62001"),X=async _=>{var $,Ne,pe,Pe,nt,Fe,tt,_e,vt,Qe,Be,rt,gt,Ge,Re,It;if(!_)return;(Ne=($=r==null?void 0:r.itemData)==null?void 0:$.find(De=>(De==null?void 0:De.key)==="parentFormPath"))==null||Ne.contents;let Z=We.value;(Z==null?void 0:Z.length)>0&&(Z=Z==null?void 0:Z.map(De=>{var Oe,Xe,w,ce;let Ke=(Oe=De==null?void 0:De.key)==null?void 0:Oe.split("/");return(r==null?void 0:r.compName)===(Ke==null?void 0:Ke[0])&&(Xe=u.value)!=null&&Xe.find(Le=>(Le==null?void 0:Le.prop)===(Ke==null?void 0:Ke[1]))&&(De.value=(ce=(w=u.value)==null?void 0:w.find(Le=>(Le==null?void 0:Le.prop)===(Ke==null?void 0:Ke[1])))==null?void 0:ce.value),De}),Ve.setTableViewContents(Z));const L=y.cloneDeep(r.itemData);let K=L==null?void 0:L.map(De=>{var Ke;return(De==null?void 0:De.key)==="formContent"&&((Ke=De.contents)==null||Ke.map((Oe,Xe)=>{var w,ce,Le,ue,ct,lt,xt,dt,st,pt,wt,Tt,jt,ht,zt,Lt,Ut,Wt,Yt;return Oe.type=(ce=(w=u.value)==null?void 0:w.find(Pt=>(Pt==null?void 0:Pt.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:ce.type,Oe.options=Oe!=null&&Oe.options?Oe.options:((ct=(ue=(Le=Oe==null?void 0:Oe.key)==null?void 0:Le.split("$"))==null?void 0:ue[1])==null?void 0:ct.length)>0?(st=(dt=ha.formGetOptions((xt=(lt=Oe==null?void 0:Oe.key)==null?void 0:lt.split("$"))==null?void 0:xt[1]))==null?void 0:dt.split(","))==null?void 0:st.map(Pt=>({label:Pt,value:Pt})):[],(pt=Oe==null?void 0:Oe.key)!=null&&pt.includes("$")&&(Oe.key=(Tt=(wt=Oe==null?void 0:Oe.key)==null?void 0:wt.split("$"))==null?void 0:Tt[0]),Oe.signature=(ht=(jt=u.value)==null?void 0:jt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:ht.signature,Oe.isLoginUser=(Lt=(zt=u.value)==null?void 0:zt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Lt.isLoginUser,Oe.value=(Ut=Object.values(_))==null?void 0:Ut[Xe],Oe.isFormColHidden=(Yt=(Wt=u.value)==null?void 0:Wt.find(Pt=>(Pt==null?void 0:Pt.prop)===(Oe==null?void 0:Oe.prop)))==null?void 0:Yt.isFormColHidden,Oe})),De}),Ce=u.value,ae=(Pe=(pe=y.cloneDeep(K))==null?void 0:pe.find(De=>(De==null?void 0:De.key)==="formContent"))==null?void 0:Pe.contents;if(Ce=Ce==null?void 0:Ce.map(De=>{var Ke;return De.value=(Ke=ae==null?void 0:ae.find((Oe,Xe)=>((Oe==null?void 0:Oe.id)??Xe)===(De==null?void 0:De.id)))==null?void 0:Ke.value,De}),!yt.value){p("contentChange",{contents:K,index:r.index});return}let W="",Y=(tt=(Fe=(nt=y.cloneDeep(K))==null?void 0:nt.find(De=>(De==null?void 0:De.key)==="formContent"))==null?void 0:Fe.contents)==null?void 0:tt.find((De,Ke)=>{var Oe,Xe,w;return(De==null?void 0:De.label)===Je.value||Ke.toString()===((w=(Xe=(Oe=Je.value)==null?void 0:Oe.split("t"))==null?void 0:Xe[1])==null?void 0:w.toString())}),le=(_e=Y==null?void 0:Y.optionUrl)==null?void 0:_e.menuSelect,de=!0;if((Be=(Qe=(vt=y.cloneDeep(K))==null?void 0:vt.find(De=>(De==null?void 0:De.key)==="formContent"))==null?void 0:Qe.contents)==null||Be.forEach(De=>{var Ke,Oe,Xe,w,ce,Le;de&&((Xe=(Oe=(Ke=De==null?void 0:De.optionUrl)==null?void 0:Ke.groupSelect)==null?void 0:Oe[1])!=null&&Xe.includes("["))&&(W=(ce=(w=De==null?void 0:De.optionUrl)==null?void 0:w.groupSelect)==null?void 0:ce[1],JSON.stringify(le)===JSON.stringify((Le=De==null?void 0:De.optionUrl)==null?void 0:Le.menuSelect)&&(de=!1))}),(rt=Y==null?void 0:Y.optionUrl)!=null&&rt.menuSelect&&yt.value){let De=await ha.getSelectRow(Y),Ke,Oe=(gt=Y==null?void 0:Y.optionUrl)==null?void 0:gt.menuSelect;if(De==null||De.forEach(Xe=>{var w,ce,Le,ue,ct,lt,xt,dt,st,pt;W===((ce=(w=Y==null?void 0:Y.optionUrl)==null?void 0:w.groupSelect)==null?void 0:ce[1])&&((ct=(ue=(Le=Y==null?void 0:Y.optionUrl)==null?void 0:Le.groupSelect)==null?void 0:ue[1])!=null&&ct.includes("["))&&((pt=y.cloneDeep(Xe))==null?void 0:pt[(st=(dt=(xt=(lt=Y==null?void 0:Y.optionUrl)==null?void 0:lt.groupSelect)==null?void 0:xt[1])==null?void 0:dt.replaceAll("[",""))==null?void 0:st.replaceAll("]","")])===(Y==null?void 0:Y.value)&&(Ke=Xe)}),Ke){let Xe=y.cloneDeep(Ce);Xe=Xe==null?void 0:Xe.map(ce=>{var Le,ue,ct,lt,xt,dt,st,pt,wt,Tt,jt;return(Ke!=null&&Ke[ce==null?void 0:ce.label]||Ke!=null&&Ke[(lt=(ct=(ue=(Le=ce==null?void 0:ce.optionUrl)==null?void 0:Le.groupSelect)==null?void 0:ue[1])==null?void 0:ct.replaceAll("[",""))==null?void 0:lt.replaceAll("]","")])&&((st=(dt=(xt=ce==null?void 0:ce.optionUrl)==null?void 0:xt.groupSelect)==null?void 0:dt[1])!=null&&st.includes("["))&&Oe!=null&&Oe.every(ht=>{var zt,Lt;return(Lt=(zt=ce==null?void 0:ce.optionUrl)==null?void 0:zt.menuSelect)==null?void 0:Lt.includes(ht)})&&(ce.value=(Ke==null?void 0:Ke[ce==null?void 0:ce.label])||(Ke==null?void 0:Ke[(jt=(Tt=(wt=(pt=ce==null?void 0:ce.optionUrl)==null?void 0:pt.groupSelect)==null?void 0:wt[1])==null?void 0:Tt.replaceAll("[",""))==null?void 0:jt.replaceAll("]","")]),Array.isArray(ce.value)&&ce.value.every(ht=>(ht==null?void 0:ht.url)&&(ht==null?void 0:ht.name))&&(ce.type="Upload")),ce}),Xe=Xe==null?void 0:Xe.map(ce=>{var Le,ue,ct;return(Le=ce==null?void 0:ce.optionUrl)!=null&&Le.oldMenuSelect&&(ce.optionUrl.menuSelect=(ct=(ue=y.cloneDeep(ce))==null?void 0:ue.optionUrl)==null?void 0:ct.oldMenuSelect),ce}),u.value=y.cloneDeep(Xe);let w=y.cloneDeep(Xe);w=w==null?void 0:w.map(ce=>{var Le,ue,ct,lt,xt,dt;return(ue=(Le=ce==null?void 0:ce.optionUrl)==null?void 0:Le.menuSelect)!=null&&ue.some(st=>st==null?void 0:st.includes("["))&&(ce.optionUrl.oldMenuSelect=(lt=(ct=y.cloneDeep(ce))==null?void 0:ct.optionUrl)==null?void 0:lt.menuSelect,ce.optionUrl.menuSelect=(dt=(xt=ce==null?void 0:ce.optionUrl)==null?void 0:xt.menuSelect)==null?void 0:dt.map(st=>{var pt,wt,Tt,jt;if(st!=null&&st.includes("[")){let ht=(wt=(pt=st==null?void 0:st.replaceAll("[","").replaceAll("]",""))==null?void 0:pt.split(":"))==null?void 0:wt[1];st=(jt=(Tt=y.cloneDeep(Xe))==null?void 0:Tt.find(zt=>(zt==null?void 0:zt.label)===ht))==null?void 0:jt.value}return st})),ce}),u.value=w}else u.value=Ce;K=K==null?void 0:K.map(Xe=>{var w;return(Xe==null?void 0:Xe.key)==="formContent"&&(Xe.contents=(w=Xe.contents)==null?void 0:w.map(ce=>{var Le,ue,ct,lt;return ce.value=((ue=(Le=u.value)==null?void 0:Le.find(xt=>(xt==null?void 0:xt.label)===(ce==null?void 0:ce.key)))==null?void 0:ue.value)??(ce==null?void 0:ce.value),ce.type=((lt=(ct=u.value)==null?void 0:ct.find(xt=>(xt==null?void 0:xt.prop)===(ce==null?void 0:ce.key)))==null?void 0:lt.type)??(ce==null?void 0:ce.type),ce})),Xe})}yt.value=!1,p("contentChange",{contents:K,index:r.index});let ye=[],he=[];if((Re=y.cloneDeep((Ge=K==null?void 0:K.find(De=>(De==null?void 0:De.key)==="formContent"))==null?void 0:Ge.contents))==null||Re.forEach(De=>{var Ke;Array.isArray(De==null?void 0:De.value)&&((Ke=De==null?void 0:De.value)!=null&&Ke.find(Oe=>{var Xe;return(Xe=Oe==null?void 0:Oe.url)==null?void 0:Xe.includes(".obj")}))&&(he=De==null?void 0:De.value)}),(he==null?void 0:he.length)>0){const De=(It=y.cloneDeep(he))==null?void 0:It.filter(Ke=>{var Oe;return(Oe=Ke==null?void 0:Ke.url)==null?void 0:Oe.includes(".obj")});De==null||De.forEach(Ke=>{var Xe,w,ce,Le;const Oe=(Xe=he==null?void 0:he.filter(ue=>{var ct;return(ue==null?void 0:ue.name)===(Ke==null?void 0:Ke.name)&&((ct=ue==null?void 0:ue.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:Xe.map(ue=>ue==null?void 0:ue.url);ye.push({objUrl:Ke==null?void 0:Ke.url,mtlUrls:((w=he==null?void 0:he.filter(ue=>{var ct;return(ue==null?void 0:ue.name)===(Ke==null?void 0:Ke.name)&&((ct=ue==null?void 0:ue.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:w.length)===1?(Le=(ce=he==null?void 0:he.filter(ue=>{var ct;return(ue==null?void 0:ue.name)===(Ke==null?void 0:Ke.name)&&((ct=ue==null?void 0:ue.url)==null?void 0:ct.includes(".mtl"))}))==null?void 0:ce[0])==null?void 0:Le.url:Oe})}),F.setObjUrl(ye)}},k=_=>{if(!_)return;const Z=[];let L="";for(let K of _)(K.includes("[")||L.includes("["))&&(L+=K.trim(),y.cloneDeep(L).split("【").length-1===y.cloneDeep(L).split("】").length-1&&y.cloneDeep(L).split("[").length-1===y.cloneDeep(L).split("]").length-1&&(Z.push(L.replace(/\/\*[\s\S]*?\*\//g,"")),L=""));return Z},te=(_,Z,L)=>{let K="";const Ce=Z==null?void 0:Z.map(ae=>{var W;return(W=ae==null?void 0:ae.value)==null?void 0:W.pageData});return Ce==null||Ce.forEach(ae=>{var W;(ae==null?void 0:ae.name)===(_==null?void 0:_[0])&&((W=ae==null?void 0:ae.compData)==null||W.forEach(Y=>{var le;(Y==null?void 0:Y.key)==="formContent"&&((le=Y==null?void 0:Y.contents)==null||le.forEach(de=>{var ye;(de==null?void 0:de.prop)===(_==null?void 0:_[1])&&(K=(de==null?void 0:de.value)===""?Ie.judgeContents((ye=y.cloneDeep(de))==null?void 0:ye.optionUrl,L):de==null?void 0:de.value)}))}))}),K},Se=(_,Z,L,K)=>{var Y,le;let Ce="",ae="";(Y=y.cloneDeep(Z))==null||Y.forEach((de,ye)=>{de!=null&&de.includes("[")?ae=ae+me.value+_[ye]:ae=ae===""?ae+de:ae+"/"+de});let W=(le=K[ae])==null?void 0:le.map(de=>{var ye;return(ye=de==null?void 0:de.value)==null?void 0:ye.pageData});return W==null||W.forEach(de=>{var ye;(de==null?void 0:de.name)===(L==null?void 0:L[0])&&((ye=de==null?void 0:de.compData)==null||ye.forEach(he=>{var $;(he==null?void 0:he.key)==="formContent"&&(($=he==null?void 0:he.contents)==null||$.forEach(Ne=>{(Ne==null?void 0:Ne.prop)===(L==null?void 0:L[1])&&(Ce=Ne==null?void 0:Ne.value)}))}))}),Ce};return e.watch(()=>r.itemData,async()=>{var W,Y,le,de,ye,he,$,Ne,pe,Pe,nt,Fe,tt,_e,vt,Qe,Be,rt,gt;const _=(W=r.itemData)==null?void 0:W.find(Ge=>(Ge==null?void 0:Ge.key)==="formContent"),Z=(Y=y.cloneDeep(r.itemData))==null?void 0:Y.find(Ge=>(Ge==null?void 0:Ge.key)==="formButton"),L=(le=y.cloneDeep(r.itemData))==null?void 0:le.find(Ge=>(Ge==null?void 0:Ge.key)==="formFlex"),K=(de=y.cloneDeep(r.itemData))==null?void 0:de.find(Ge=>(Ge==null?void 0:Ge.key)==="formWrap"),Ce=(ye=y.cloneDeep(r.itemData))==null?void 0:ye.find(Ge=>(Ge==null?void 0:Ge.key)==="enableWrap");if((K==null?void 0:K.contents)==="纵向"?M.value=!1:M.value=!0,b.value=(Ce==null?void 0:Ce.contents)===void 0?!1:Ce==null?void 0:Ce.contents,V.value=typeof(L==null?void 0:L.contents)!="boolean"?!(!(L!=null&&L.contents)===""||((he=L==null?void 0:L.contents)==null?void 0:he.toUpperCase())==="VERTICAL"):L==null?void 0:L.contents,(($=_==null?void 0:_.contents)==null?void 0:$.length)>0&&Array.isArray(_==null?void 0:_.contents)){let Ge=r.allMapContents;const Re=(pe=(Ne=y.cloneDeep(_))==null?void 0:Ne.contents)==null?void 0:pe.map((w,ce)=>{var ht,zt,Lt,Ut,Wt,Yt,Pt,Dn,On,gn,zn,mn,Mn,Fn,Rn,Pn,Ln,_n,fn,sn,yn,hn,tn,un,$n,En,Sn,bn,jn,Un,Tn,Kn,Wn;let Le=(w==null?void 0:w.label)??(w==null?void 0:w.key)??"",ue=(w==null?void 0:w.type)??"",ct=(w==null?void 0:w.options)??[];if((ht=w==null?void 0:w.key)!=null&&ht.includes("$")&&(Le=(zt=y.cloneDeep(w==null?void 0:w.key).split("$"))==null?void 0:zt[0],((Ut=(Lt=y.cloneDeep(w==null?void 0:w.key).split("$"))==null?void 0:Lt[1])==null?void 0:Ut.length)>0)){const[_t,Xt]=(Yt=(Wt=y.cloneDeep(w==null?void 0:w.key).split("$"))==null?void 0:Wt[1])==null?void 0:Yt.split(/[()]/);ue=((Pt=Ie.FormType.find(mt=>(mt==null?void 0:mt.key)===_t))==null?void 0:Pt.value)??"",((Dn=Xt==null?void 0:Xt.split(","))==null?void 0:Dn.length)>0&&(ct=(On=Xt==null?void 0:Xt.split(","))==null?void 0:On.map(mt=>({label:mt,value:mt})))}let lt=[];w!=null&&w.contents&&!Array.isArray(w==null?void 0:w.contents)&&(lt=(zn=(gn=w==null?void 0:w.contents)==null?void 0:gn.split(","))==null?void 0:zn.map(_t=>({label:_t,value:_t}))),((mn=w==null?void 0:w.optionUrl)==null?void 0:mn.selectRelateType)==="自定义绑定"&&(lt=(Fn=(Mn=w==null?void 0:w.optionUrl)==null?void 0:Mn.defaultSelect)==null?void 0:Fn.map(_t=>({label:_t,value:_t})));let xt=!1,dt=(w==null?void 0:w.isFormColHidden)??!1,st=Ie.judgeContents((Rn=y.cloneDeep(w))==null?void 0:Rn.optionUrl,Ge),pt=st!==void 0&&st!==""?st:w!=null&&w.originalContent&&(w==null?void 0:w.originalContent)!==""?w.originalContent:w!=null&&w.value?w.value:(ct==null?void 0:ct.length)>0?(Pn=ct==null?void 0:ct[0])==null?void 0:Pn.value:(w==null?void 0:w.value)??"",wt=!1,Tt=st!==void 0||ue===""?"Input":ue;if((Array.isArray(st)&&(st!=null&&st.every(_t=>(_t==null?void 0:_t.name)&&(_t==null?void 0:_t.url)))||Array.isArray(pt)&&(pt!=null&&pt.every(_t=>(_t==null?void 0:_t.name)&&(_t==null?void 0:_t.url))))&&(Tt="upload"),typeof pt=="string"&&(pt!=null&&pt.includes("loginUser"))&&!(pt!=null&&pt.includes("loginUserSign"))||w!=null&&w.isLoginUser)xt=!0,pt=((Ln=be.value)==null?void 0:Ln.姓名)||((_n=be.value)==null?void 0:_n.account)||((fn=be.value)==null?void 0:fn.账号)||((sn=be.value)==null?void 0:sn.userName);else if(typeof pt=="string"&&(pt!=null&&pt.includes("loginUserSign"))||w!=null&&w.signature||w!=null&&w.isShow)if(wt=!0,(w==null?void 0:w.isShow)==="originalSignature")Tt="image",pt=j.value+"/"+((yn=be.value)==null?void 0:yn.signature);else{let _t=[...new Set(k(w.isShow))].map(bt=>{var Dt,Ct,Mt,At;return{key:(At=(Mt=(Ct=(Dt=bt==null?void 0:bt.split("["))==null?void 0:Dt[1])==null?void 0:Ct.split("]"))==null?void 0:Mt[0])==null?void 0:At.split(":"),value:""}});(hn=je.value)==null||hn.forEach(bt=>{_t==null||_t.forEach((Kt,Dt)=>{var Mt;let Ct=Kt==null?void 0:Kt.key;(bt==null?void 0:bt.name)===(Ct==null?void 0:Ct[0].replaceAll("'",""))&&((Mt=bt==null?void 0:bt.compData)==null||Mt.forEach(At=>{var Ft;(At==null?void 0:At.key)==="formContent"&&((Ft=At==null?void 0:At.contents)==null||Ft.forEach(Ht=>{(Ht==null?void 0:Ht.prop)===(Ct==null?void 0:Ct[1].replaceAll("'",""))&&(_t[Dt].value=Ht==null?void 0:Ht.value)}))}))})});let Xt=_t==null?void 0:_t.map(bt=>{var Kt;return bt.key="["+((Kt=bt.key)==null?void 0:Kt.join(":"))+"]",bt}),mt=w==null?void 0:w.isShow;Xt==null||Xt.forEach(bt=>{bt!=null&&bt.value?mt=mt.replaceAll(bt==null?void 0:bt.key,"'"+(bt==null?void 0:bt.value)+"'"):mt=mt.replaceAll(bt==null?void 0:bt.key,"undefined")}),mt!=null&&mt.includes("(")||(mt!=null&&mt.includes("==")?mt=((tn=mt==null?void 0:mt.split("==="))==null?void 0:tn[0])+"==='"+((un=mt==null?void 0:mt.split("==="))==null?void 0:un[1])+"'":mt=(($n=mt==null?void 0:mt.split("="))==null?void 0:$n[0])+"='"+((En=mt==null?void 0:mt.split("="))==null?void 0:En[1])+"'"),mt!=null&&mt.includes("=")&&!(mt!=null&&mt.includes("=="))&&!(mt!=null&&mt.includes("==="))&&(mt=mt==null?void 0:mt.replaceAll("=","==")),new Function(`if (${mt}) { return true } else { return false }`)()?(dt=!1,Tt="image",pt=j.value+"/"+((Sn=be.value)==null?void 0:Sn.signature)):pt=""}return Array.isArray(pt)&&pt.every(_t=>(_t==null?void 0:_t.url)&&(_t==null?void 0:_t.name))&&(w.type="Upload"),w!=null&&w.isMainUrl&&(Tt="Url"),{label:Le??"",name:"t"+ce,prop:y.cloneDeep(w==null?void 0:w.key),type:Tt,value:w!=null&&w.isSync?((jn=(bn=O.value)==null?void 0:bn[0])==null?void 0:jn.value)??((Wn=(Un=A==null?void 0:A.value)==null?void 0:Un.split("/"))==null?void 0:Wn[((Kn=(Tn=A==null?void 0:A.value)==null?void 0:Tn.split("/"))==null?void 0:Kn.length)-1]):w!=null&&w.isNewDate&&pt===""?new Date:pt,id:(w==null?void 0:w.id)??ce,contents:(lt==null?void 0:lt.length)>0?lt:ct??[],width:(w==null?void 0:w.width)??1,isLoginUser:xt,config:w==null?void 0:w.config,optionUrl:(w==null?void 0:w.optionUrl)??w,isFormColHidden:dt,signature:wt,isMain:w==null?void 0:w.isMain,isMainUrl:w==null?void 0:w.isMainUrl,operable:(w==null?void 0:w.operable)??!1,disabled:(w==null?void 0:w.disabled)??!1,isSync:w==null?void 0:w.isSync}}),It=Re==null?void 0:Re.map(w=>w==null?void 0:w.value);let De="";It==null||It.forEach(w=>{w!==""&&w!==void 0&&(De=De===""?w:De+"/"+w)}),x.setSelectArray(It),x.setSelectString(De);let Ke=(Pe=y.cloneDeep(Re))==null?void 0:Pe.map(w=>(w!=null&&w.value&&Ie.IsJson(w==null?void 0:w.value)&&Array.isArray(JSON.parse(w==null?void 0:w.value))&&(w.value=JSON.parse(w.value)),w));Ke=Ke==null?void 0:Ke.map(w=>{var ce,Le,ue,ct,lt,xt,dt,st;if((Le=(ce=w==null?void 0:w.optionUrl)==null?void 0:ce.menuSelect)!=null&&Le.some(pt=>pt==null?void 0:pt.includes("["))){let pt="";w.optionUrl.oldMenuSelect=(ct=(ue=y.cloneDeep(w))==null?void 0:ue.optionUrl)==null?void 0:ct.menuSelect,w.optionUrl.menuSelect=(xt=(lt=w==null?void 0:w.optionUrl)==null?void 0:lt.menuSelect)==null?void 0:xt.map(wt=>{var Tt,jt,ht,zt,Lt,Ut;if(wt!=null&&wt.includes("[")){let Wt=(jt=(Tt=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Tt.split(":"))==null?void 0:jt[1];pt=te((ht=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:ht.split(":"),Ge==null?void 0:Ge[A.value],Ge),wt=((Lt=(zt=y.cloneDeep(Ke))==null?void 0:zt.find(Yt=>(Yt==null?void 0:Yt.label)===Wt))==null?void 0:Lt.value)||te((Ut=wt==null?void 0:wt.replaceAll("[","").replaceAll("]",""))==null?void 0:Ut.split(":"),Ge==null?void 0:Ge[A.value],Ge)}return wt}),pt!==""&&w.value===""&&(w.value=Se(w.optionUrl.menuSelect,w.optionUrl.oldMenuSelect,(dt=w==null?void 0:w.optionUrl)==null?void 0:dt.groupSelect,Ge),Array.isArray(w.value)&&((st=w.value)!=null&&st.every(wt=>wt==null?void 0:wt.url))&&(w.type="UPLOAD"))}return w}),u.value=Ke,it.value=((nt=u.value)==null?void 0:nt.every(w=>w==null?void 0:w.disabled))||re.value===A.value,Ye.value=(Fe=u.value)==null?void 0:Fe.every(w=>w==null?void 0:w.operable),Me.value=(tt=u.value)==null?void 0:tt.map(w=>w==null?void 0:w.label);let Oe=[],Xe=[];if((_e=y.cloneDeep(u.value))==null||_e.forEach(w=>{var ce;Array.isArray(w==null?void 0:w.value)&&((ce=w==null?void 0:w.value)!=null&&ce.find(Le=>{var ue;return(ue=Le==null?void 0:Le.url)==null?void 0:ue.includes(".obj")}))&&(Xe=w==null?void 0:w.value)}),(Xe==null?void 0:Xe.length)>0){const w=(vt=y.cloneDeep(Xe))==null?void 0:vt.filter(ce=>{var Le;return(Le=ce==null?void 0:ce.url)==null?void 0:Le.includes(".obj")});w==null||w.forEach(ce=>{var ue,ct,lt,xt;const Le=(ue=Xe==null?void 0:Xe.filter(dt=>{var st;return(dt==null?void 0:dt.name)===(ce==null?void 0:ce.name)&&((st=dt==null?void 0:dt.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:ue.map(dt=>dt==null?void 0:dt.url);Oe.push({objUrl:ce==null?void 0:ce.url,mtlUrls:((ct=Xe==null?void 0:Xe.filter(dt=>{var st;return(dt==null?void 0:dt.name)===(ce==null?void 0:ce.name)&&((st=dt==null?void 0:dt.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:ct.length)===1?(xt=(lt=Xe==null?void 0:Xe.filter(dt=>{var st;return(dt==null?void 0:dt.name)===(ce==null?void 0:ce.name)&&((st=dt==null?void 0:dt.url)==null?void 0:st.includes(".mtl"))}))==null?void 0:lt[0])==null?void 0:xt.url:Le})}),F.setObjUrl(Oe)}(Qe=y.cloneDeep(u.value))==null||Qe.forEach(w=>{var ce,Le,ue,ct,lt,xt,dt,st,pt,wt,Tt,jt,ht;if((Le=(ce=w==null?void 0:w.value)==null?void 0:ce.toString())!=null&&Le.includes(".stl")||(ct=(ue=w==null?void 0:w.value)==null?void 0:ue.toString())!=null&&ct.includes(".STL")||(xt=(lt=w==null?void 0:w.value)==null?void 0:lt.toString())!=null&&xt.includes(".obj")||(st=(dt=w==null?void 0:w.value)==null?void 0:dt.toString())!=null&&st.includes(".mtl")||(wt=(pt=w==null?void 0:w.value)==null?void 0:pt.toString())!=null&&wt.includes(".urdf")){let zt={},Lt=[],Ut;Array.isArray(w==null?void 0:w.value)?Ut=w==null?void 0:w.value:Ut=(Tt=w==null?void 0:w.value)==null?void 0:Tt.split(","),Ut==null||Ut.forEach(Wt=>{Wt.includes(".mtl")?Lt.push(Wt):zt.blob=zt.blob==="undefined"?Wt:zt.blob+","+Wt}),(Lt==null?void 0:Lt.length)>0&&(zt.mtlBlobs=Lt),(ht=(jt=Object.values(zt))==null?void 0:jt[0])!=null&&ht.includes("http:")}})}else u.value=[];let ae=We.value;if((ae==null?void 0:ae.length)>0&&(ae=ae==null?void 0:ae.map(Ge=>{var It,De,Ke,Oe;let Re=(It=Ge==null?void 0:Ge.key)==null?void 0:It.split("/");return(r==null?void 0:r.compName)===(Re==null?void 0:Re[0])&&(De=u.value)!=null&&De.find(Xe=>(Xe==null?void 0:Xe.prop)===(Re==null?void 0:Re[1]))&&(Ge.value=(Oe=(Ke=u.value)==null?void 0:Ke.find(Xe=>(Xe==null?void 0:Xe.prop)===(Re==null?void 0:Re[1])))==null?void 0:Oe.value),Ge}),Ve.setTableViewContents(ae)),r!=null&&r.formRules)S.value=r==null?void 0:r.formRules;else{let Ge={};(Be=y.cloneDeep(u).value)==null||Be.forEach(Re=>{(Re==null?void 0:Re.isMain)===!0&&(Ge[(Re==null?void 0:Re.prop)??(Re==null?void 0:Re.name)]=[{required:!0,message:`${(Re==null?void 0:Re.prop)||(Re==null?void 0:Re.name)}不能为空`}])}),S.value=Ge}if(((rt=Z==null?void 0:Z.contents)==null?void 0:rt.length)>0){const Ge=[];(gt=Z==null?void 0:Z.contents)==null||gt.forEach((Re,It)=>{(Re==null?void 0:Re.label)!==""&&Ge.push({label:(Re==null?void 0:Re.label)??"",id:(Re==null?void 0:Re.id)??It,type:(Re==null?void 0:Re.type)??"",background:Re==null?void 0:Re.background})}),ke.value=Ge}else ke.value=[]},{deep:!0,immediate:!0}),e.watch(()=>re.value,_=>{it.value=_===A.value},{immediate:!0}),(_,Z)=>{var Y,le;const L=e.resolveComponent("svg-icon"),K=e.resolveComponent("el-switch"),Ce=e.resolveComponent("el-checkbox"),ae=e.resolveComponent("el-popover"),W=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Gi,[b.value===!1?(e.openBlock(),e.createBlock(qi,{key:0,items:(le=(Y=u.value)==null?void 0:Y.filter(de=>!(de!=null&&de.isFormColHidden)))==null?void 0:le.map(de=>({label:de==null?void 0:de.label,value:de==null?void 0:de.value}))},null,8,["items"])):(e.openBlock(),e.createBlock(Bt.ssForm,{key:1,rowContents:u.value,formRules:S.value,buttonValue:ke.value,isRowFlex:!1,isEnableWrap:b.value,onOnButtonClick:D,onChange:X,formDisabled:it.value,formLabelsOperable:Ye.value,isButtonRow:M.value,onPreview:ut,onBlurChange:Ue,onHandleColEditChange:J,onHandleColTypeChange:oe,onRouteUrl:qe,onClickTrigger:He},{operateCol:e.withCtx(({renderColumns:de,formDisabled:ye,formLabelsOperable:he})=>[e.createVNode(ae,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:xe},{reference:e.withCtx(()=>[e.createElementVNode("span",Xi,[e.createVNode(L,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Yi,[Z[1]||(Z[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(K,{"model-value":ye,"active-text":"禁用","inactive-text":"",onChange:Ze,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(K,{"model-value":he,"active-text":"编辑所有标签","inactive-text":"",onChange:ee},null,8,["model-value"]),Z[2]||(Z[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(W,{modelValue:Me.value,"onUpdate:modelValue":Z[0]||(Z[0]=$=>Me.value=$),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:fe,onChange:T},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(de,$=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:$.label},[e.createVNode(Ce,{value:$.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString($.label),1)]),_:2},1032,["value"]),e.createVNode(ae,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(L,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var Ne;return[e.createElementVNode("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ne=Object.keys($))==null?void 0:Ne.filter(pe=>{var Pe;return(Pe=Te.value)==null?void 0:Pe.find(nt=>(nt==null?void 0:nt.value)===pe)}),pe=>{var Pe,nt;return e.openBlock(),e.createElementBlock("div",{key:pe},[e.createVNode(Bt._sfc_main$1,{value:$==null?void 0:$[pe],"active-text":(nt=(Pe=Te.value)==null?void 0:Pe.find(Fe=>(Fe==null?void 0:Fe.value)===pe))==null?void 0:nt.label,inactiveText:"",onChange:Fe=>we(Fe,pe,$)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Zi,[e.createVNode(L,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"])),R.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:2,fileDataList:H.value,onDestroy:h},null,8,["fileDataList"])):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:3,visible:E.value,onBeforeDestroy:c,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(go.ThreeViewerHost,{files:f.value,onGetAnimationData:_.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},wo=Rt._export_sfc(Qi,[["__scopeId","data-v-8040f4ad"]]),Oa=e.ref(0),or=o=>{var l;return!o||(o==null?void 0:o.length)===0?[]:(l=y.cloneDeep(o))==null?void 0:l.map(r=>(Oa.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Oa.value,children:or(r==null?void 0:r.children)},r))},el=o=>{var c;return(c=y.cloneDeep(o))==null?void 0:c.map(r=>(Oa.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Oa.value,children:or(r==null?void 0:r.children)},r))},rr=(o,l)=>{var c;return o!=null&&o.find(r=>(r==null?void 0:r.id)===l)?(c=y.cloneDeep(o))==null?void 0:c.filter(p=>(p==null?void 0:p.id)!==l):(o=o==null?void 0:o.map(r=>(r.children=rr(r==null?void 0:r.children,l),r)),o)},ir=(o,l)=>{var c;return o!=null&&o.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(c=y.cloneDeep(o))==null?void 0:c.map(p=>((p==null?void 0:p.id)===(l==null?void 0:l.id)&&(p=l),p)):(o=o==null?void 0:o.map(r=>(r.children=ir(r==null?void 0:r.children,l),r)),o)},lr=(o,l)=>{var c;return o!=null&&o.find(r=>{var p;return(r==null?void 0:r.id)===((p=l==null?void 0:l.contents)==null?void 0:p.id)})?(c=y.cloneDeep(o))==null?void 0:c.map(p=>{var u;return(p==null?void 0:p.id)===((u=l==null?void 0:l.contents)==null?void 0:u.id)&&(p=l==null?void 0:l.contents),p}):(o=o==null?void 0:o.map(r=>(r.children=lr(r==null?void 0:r.children,l),r)),o)},sr=(o,l)=>{var c;return o!=null&&o.find(r=>(r==null?void 0:r.id)===(l==null?void 0:l.id))?(c=y.cloneDeep(o))==null?void 0:c.map(p=>((p==null?void 0:p.id)===(l==null?void 0:l.id)&&(p!=null&&p.children||(p.children=[]),p.children.push(l.contents)),p)):(o=o==null?void 0:o.map(r=>(r.children=sr(r==null?void 0:r.children,l),r)),o)},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"}],tl=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],nl=[{label:"新增",value:"add"}],xn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:nl},{key:"background",label:"按钮背景色",type:"Color"}],wn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:tl},{key:"textColor",label:"按钮颜色",type:"Color"}],al={class:"table-header-child"},ol={class:"table-header-child-main"},rl={class:"table-header-child-content"},il={class:"table-header-child-content-item"},ll={class:"fix-button"},sl={key:0},cl={class:"form-content"},ul={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:l}){const c=o,r=l,p=e.ref(!1),u=e.ref(""),E=Ie.useTableComp(y.pinia),{tableIndex:g}=y.storeToRefs(E);e.ref(0);const f=e.ref(""),C=e.ref([]),S=e.ref([]),M=x=>{var b;p.value=!0;let F=[];Vt==null||Vt.forEach(V=>{let N=y.cloneDeep(g.value)+1;E.setTableIndex(N),F.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:x[V.key],id:g.value,contents:V==null?void 0:V.options})}),x!=null&&x.children&&((b=x==null?void 0:x.children)==null?void 0:b.length)>0&&F.push({children:x==null?void 0:x.children,isFormColHidden:!0}),f.value=x==null?void 0:x.id,C.value=F,S.value=F},R=x=>{r("fixChange",y.cloneDeep(x))},Q=x=>{r("deleteChange",y.cloneDeep(x))},O=x=>{p.value=!0;let F=[];Vt==null||Vt.forEach(b=>{let V=y.cloneDeep(g.value)+1;E.setTableIndex(V),F.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:g.value,contents:b==null?void 0:b.options})}),u.value=x==null?void 0:x.id,C.value=F,S.value=F},ke=x=>{let F=y.cloneDeep(S.value);F=F==null?void 0:F.map(b=>(b.children||(b.value=x==null?void 0:x[b.name]),b)),S.value=F},H=()=>{var F,b;C.value=S.value;let x={};if(f.value!=="")x.id=f.value,(F=C.value)==null||F.forEach(V=>{const N=Vt==null?void 0:Vt.find(be=>(be==null?void 0:be.label)===(V==null?void 0:V.label));N?x[N.key]=V.value:V!=null&&V.children&&V.children.length>0&&(x.children=V.children)}),p.value=!1,r("fixChange",{contents:y.cloneDeep(x),id:u.value,type:"fix"});else{let V=y.cloneDeep(g.value)+1;E.setTableIndex(V),x.id="id"+g.value,(b=C.value)==null||b.forEach(N=>{const be=Vt==null?void 0:Vt.find(Je=>(Je==null?void 0:Je.label)===(N==null?void 0:N.label));be?x[be.key]=N.value:N!=null&&N.children&&N.children.length>0&&(x.children=N.children)}),p.value=!1,r("fixChange",{contents:y.cloneDeep(x),id:u.value,type:"add"})}f.value="",C.value=[],S.value=[]},U=()=>{p.value=!1,f.value="",u.value="",C.value=[],S.value=[]},se=x=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",x),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(x,F)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c==null?void 0:c.tableChildContents,(V,N)=>(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("div",rl,[e.createElementVNode("div",il,e.toDisplayString(V.label),1),e.createElementVNode("div",ll,[e.createVNode(b,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:be=>O(V)},null,8,["onClick"]),e.createVNode(b,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:be=>M(V)},null,8,["onClick"]),e.createVNode(b,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:be=>se(V)},null,8,["onClick"])])]),V!=null&&V.children&&V.children.length>0?(e.openBlock(),e.createElementBlock("div",sl,[e.createVNode(cr,{tableChildContents:V==null?void 0:V.children,onDeleteChange:Q,onFixChange:R},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",cl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:ke},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:U,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:H},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},dl=Rt._export_sfc(ul,[["__scopeId","data-v-e0fef72d"]]),pl={class:"table-header-child"},fl={class:"table-header-child-main"},hl={class:"table-header-child-content"},vl={class:"table-header-child-content-item"},gl={class:"fix-button"},ml={key:0},yl={class:"form-content"},bl={class:"dialog-footer"},kl={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:l}){const c=o,r=l,p=e.ref(!1),u=e.ref(""),E=Ie.useTableComp(y.pinia),{tableIndex:g}=y.storeToRefs(E),f=e.ref(""),C=e.ref([]),S=e.ref([]),M=x=>{r("fixChange",y.cloneDeep(x))},R=x=>{var b;p.value=!0;let F=[];Vt==null||Vt.forEach(V=>{let N=y.cloneDeep(g.value)+1;E.setTableIndex(N),F.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:x[V.key],id:g.value,contents:V==null?void 0:V.options})}),x!=null&&x.children&&((b=x==null?void 0:x.children)==null?void 0:b.length)>0&&F.push({children:x==null?void 0:x.children,isFormColHidden:!0}),f.value=x==null?void 0:x.id,C.value=F,S.value=F},Q=x=>{p.value=!0;let F=[];Vt==null||Vt.forEach(b=>{let V=y.cloneDeep(g.value)+1;E.setTableIndex(V),F.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:g.value,contents:b==null?void 0:b.options})}),u.value=x==null?void 0:x.id,C.value=F,S.value=F},O=x=>{let F=y.cloneDeep(S.value);F=F==null?void 0:F.map(b=>(b.children||(b.value=x==null?void 0:x[b.name]),b)),S.value=F},ke=()=>{var F,b;C.value=S.value;let x={};if(f.value!=="")x.id=f.value,(F=C.value)==null||F.forEach(V=>{const N=Vt==null?void 0:Vt.find(be=>(be==null?void 0:be.label)===(V==null?void 0:V.label));N?x[N.key]=V.value:V!=null&&V.children&&V.children.length>0&&(x.children=V.children)}),p.value=!1,r("fixChange",{contents:y.cloneDeep(x),id:u.value,type:"fix"});else{let V=y.cloneDeep(g.value)+1;E.setTableIndex(V),x.id="idChild"+g.value,(b=C.value)==null||b.forEach(N=>{const be=Vt==null?void 0:Vt.find(Je=>(Je==null?void 0:Je.label)===(N==null?void 0:N.label));be?x[be.key]=N.value:N!=null&&N.children&&N.children.length>0&&(x.children=N.children)}),p.value=!1,r("fixChange",{contents:y.cloneDeep(x),id:u.value,type:"add"})}f.value="",C.value=[],S.value=[]},H=()=>{p.value=!1,f.value="",u.value="",C.value=[],S.value=[]},U=x=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",x),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},se=x=>{r("deleteChange",x)};return(x,F)=>{const b=e.resolveComponent("svg-icon"),V=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c==null?void 0:c.tableChildContents,(N,be)=>(e.openBlock(),e.createElementBlock("div",fl,[e.createElementVNode("div",hl,[e.createElementVNode("div",vl,e.toDisplayString(N.label),1),e.createElementVNode("div",gl,[e.createVNode(b,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Je=>Q(N)},null,8,["onClick"]),e.createVNode(b,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Je=>R(N)},null,8,["onClick"]),e.createVNode(b,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Je=>U(N)},null,8,["onClick"])])]),N!=null&&N.children&&N.children.length>0?(e.openBlock(),e.createElementBlock("div",ml,[e.createVNode(dl,{tableChildContents:N==null?void 0:N.children,onDeleteChange:se,onFixChange:M},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:H,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",yl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:O},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",bl,[e.createVNode(V,{onClick:H,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>F[0]||(F[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(V,{class:"ok-button button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>F[1]||(F[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cr=Rt._export_sfc(kl,[["__scopeId","data-v-ebd68fa1"]]),xl={class:"table-operate-content"},wl={class:"table-operate-item"},Cl={class:"operate-title"},Dl={class:"operate-content"},_l={class:"fix-content"},El={class:"fix-content-label"},Sl={class:"fix-button"},Tl={key:0},Bl={class:"operate-title"},Il={class:"operate-content"},Nl={class:"fix-content"},Vl={class:"fix-content-label"},Al={class:"fix-button"},Ol={class:"operate-title"},zl={class:"operate-content"},Ml={class:"fix-content"},Fl={class:"fix-content-label"},Rl={class:"fix-button"},Pl={class:"operate-title"},Ll={class:"operate-content"},$l={class:"fix-content"},jl={class:"fix-content-label"},Ul={class:"fix-button"},Kl={class:"operate-content"},Wl={style:{display:"flex","justify-content":"space-between"}},Hl={class:"form-content"},ql={class:"dialog-footer"},Gl={class:"form-content"},Xl={class:"dialog-footer"},Yl={class:"form-content"},Jl={class:"dialog-footer"},Zl={class:"form-content"},Ql={class:"dialog-footer"},es={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.ref([]),u=e.ref(!1),E=e.ref(!1),g=e.ref([]),f=e.ref(!1),C=e.ref([]),S=e.ref(!1),M=e.ref([]),R=e.ref(""),Q=e.ref(""),O=e.ref([]),ke=e.ref([]),H=e.ref([]),U=e.ref([]),se=e.ref(!1),x=e.ref([]),F=e.ref([]),b=e.ref(0),V=e.ref([]),N=e.ref([]),be=e.ref([]),Je=()=>{se.value=!0;let h=[];xn==null||xn.forEach(D=>{b.value++,h.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:(D==null?void 0:D.key)==="background"?"var(--ssComponent-primary-color)":"",id:b.value,contents:D==null?void 0:D.options})}),x.value=h,F.value=h},yt=()=>{var D,j,X;E.value=!0;let h=[];(X=(j=(D=Ie.FormContent)==null?void 0:D.find(k=>(k==null?void 0:k.key)==="Input"))==null?void 0:j.value)==null||X.forEach(k=>{b.value++,h.push({label:k==null?void 0:k.label,name:(k==null?void 0:k.name)||(k==null?void 0:k.label),type:k.type,value:(k==null?void 0:k.label)==="类型"?"Input":"",id:b.value,contents:k==null?void 0:k.options})}),V.value=h,N.value=h},Ve=h=>{h||(V.value=N.value)},We=async h=>{var D,j,X,k,te,Se,_,Z,L,K,Ce,ae;if((h==null?void 0:h.类型)!==((j=(D=N.value)==null?void 0:D.find(W=>(W==null?void 0:W.label)==="类型"))==null?void 0:j.value)){let W=[],Y=await((te=(k=(X=Ie.FormContent)==null?void 0:X.find(le=>(le==null?void 0:le.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:k.value)==null?void 0:te.value)?await((K=(L=(Z=Ie.FormContent)==null?void 0:Z.find(le=>(le==null?void 0:le.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:L.value)==null?void 0:K.value):(_=(Se=Ie.FormContent)==null?void 0:Se.find(le=>(le==null?void 0:le.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:_.value;if(Y==null||Y.forEach(le=>{b.value++,W.push({label:le==null?void 0:le.label,name:(le==null?void 0:le.name)||(le==null?void 0:le.label),type:le.type,value:le!=null&&le.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[le.label])??"",id:b.value,contents:le==null?void 0:le.options,prop:(le==null?void 0:le.prop)||(le==null?void 0:le.name)||(le==null?void 0:le.label)})}),h!=null&&h.菜单选项&&((Ce=h==null?void 0:h.菜单选项)==null?void 0:Ce.length)>0){const le=await Ie.menuToContentType(h==null?void 0:h.菜单选项);W=W==null?void 0:W.map(de=>((de==null?void 0:de.name)==="组信息选项"&&(de.contents=le),de))}N.value=await Ie.selectToBase(y.cloneDeep(W)),V.value=await Ie.selectToBase(y.cloneDeep(W))}else{let W=y.cloneDeep(V.value);if(W=W==null?void 0:W.map(Y=>(Y.value=h==null?void 0:h[Y.name],Y)),h!=null&&h.菜单选项&&((ae=h==null?void 0:h.菜单选项)==null?void 0:ae.length)>0){const Y=await Ie.menuToContentType(h==null?void 0:h.菜单选项);W=W==null?void 0:W.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=Y),le))}W=Ie.formToOptionsContents(W),N.value=await Ie.selectToBase(y.cloneDeep(W))}},je=async h=>{await We(h),V.value=N.value},z=(h,D)=>{if((D==null?void 0:D.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const j=D==null?void 0:D.optionUrl;return(j==null?void 0:j.selectRelateType)||D[h.key]}if((D==null?void 0:D.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const j=D==null?void 0:D.optionUrl;return(j==null?void 0:j.menuSelect)||D[h.key]}if((D==null?void 0:D.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const j=D==null?void 0:D.optionUrl;return(j==null?void 0:j.groupSelect)||D[h.key]}if((D==null?void 0:D.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(D==null?void 0:D.value)||D[h.key];if((D==null?void 0:D.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const j=D[h.key];return ar(j)?j:h.default}return(h==null?void 0:h.label)==="类型"&&D[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!D[h.key]?!1:D[h.key]},ie=async h=>{var X,k,te,Se,_,Z,L,K,Ce;E.value=!0;let D=[];const j=await((te=(k=(X=Ie.FormContent)==null?void 0:X.find(ae=>(ae==null?void 0:ae.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:k.value)==null?void 0:te.value)?await((K=(L=(Z=Ie.FormContent)==null?void 0:Z.find(ae=>(ae==null?void 0:ae.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:L.value)==null?void 0:K.value):(_=(Se=Ie.FormContent)==null?void 0:Se.find(ae=>(ae==null?void 0:ae.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:_.value;if(j==null||j.forEach(ae=>{b.value++,D.push({label:ae==null?void 0:ae.label,name:(ae==null?void 0:ae.name)||(ae==null?void 0:ae.label),type:ae.type,value:(ae==null?void 0:ae.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):z(ae,h),id:b.value,contents:ae==null?void 0:ae.options})}),h!=null&&h.menuSelect&&((Ce=h==null?void 0:h.menuSelect)==null?void 0:Ce.length)>0){const ae=await Ie.menuToContentType(h==null?void 0:h.menuSelect);D=D==null?void 0:D.map(W=>((W==null?void 0:W.name)==="组信息选项"&&(W.contents=ae),W))}R.value=h==null?void 0:h.id,V.value=await Ie.selectToBase(Ie.formToOptionsContents(D)),N.value=await Ie.selectToBase(Ie.formToOptionsContents(D))},re=h=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,j;be.value=(D=y.cloneDeep(be.value))==null?void 0:D.filter(X=>(X==null?void 0:X.id)!==(h==null?void 0:h.id)),r("change",(j=y.cloneDeep(c.originalItemContents))==null?void 0:j.map(X=>((X==null?void 0:X.key)==="tableToForm"&&(X.contents=be.value),X))),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},fe=()=>{E.value=!1,V.value=[],R.value=""},Ye=async()=>{var X,k,te,Se,_,Z,L,K,Ce,ae;V.value=N.value;let h={};R.value!==""?h.id=R.value:(b.value++,h.id="id"+b.value);let D=await((te=(k=(X=Ie.FormContent)==null?void 0:X.find(W=>{var Y,le;return(W==null?void 0:W.key)===(((le=(Y=V.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:k.value)==null?void 0:te.value)??((_=(Se=Ie.FormContent)==null?void 0:Se.find(W=>{var Y,le;return(W==null?void 0:W.key)===(((le=(Y=V.value)==null?void 0:Y.find(de=>(de==null?void 0:de.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:_.value);if((Z=V.value)==null||Z.forEach(W=>{const Y=D==null?void 0:D.find(le=>(le==null?void 0:le.label)===(W==null?void 0:W.label));Y&&(h[Y.key]=W.value)}),h.name=h.label,(L=be.value)!=null&&L.find(W=>W.id===h.id))be.value=(K=be.value)==null?void 0:K.map(W=>(W.id===h.id&&(W=h),W));else{let W=y.cloneDeep(be.value);be.value||(be.value=[]),W.push(h),be.value=W}be.value=be.value.map(({id:W,...Y})=>Y),E.value=!1,R.value="";let j=y.cloneDeep(c.originalItemContents);(Ce=y.cloneDeep(c.originalItemContents))!=null&&Ce.find(W=>(W==null?void 0:W.key)==="tableToForm")?j=(ae=y.cloneDeep(c.originalItemContents))==null?void 0:ae.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=be.value),W)):j.push({key:"tableToForm",contents:be.value}),r("change",j)},it=h=>{se.value=!0;let D=[];xn==null||xn.forEach(j=>{b.value++,D.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:h[j.key],id:b.value,contents:j==null?void 0:j.options})}),R.value=h==null?void 0:h.id,x.value=D,F.value=D};e.watch(()=>S.value,()=>{var D,j;let h=y.cloneDeep(c.originalItemContents);(D=y.cloneDeep(c.originalItemContents))!=null&&D.find(X=>(X==null?void 0:X.key)==="page")?h=(j=y.cloneDeep(c.originalItemContents))==null?void 0:j.map(X=>((X==null?void 0:X.key)==="page"&&(X.contents=S.value),X)):h.push({key:"page",contents:S.value}),r("change",h)},{deep:!0});const q=h=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,j;ke.value=(D=y.cloneDeep(ke.value))==null?void 0:D.filter(X=>(X==null?void 0:X.id)!==(h==null?void 0:h.id)),r("change",(j=y.cloneDeep(c.originalItemContents))==null?void 0:j.map(X=>((X==null?void 0:X.key)==="extraButton"&&(X.contents=ke.value),X))),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},A=()=>{var j,X,k,te,Se;x.value=F.value;let h={};if(R.value!==""?h.id=R.value:(b.value++,h.id="id"+b.value),(j=x.value)==null||j.forEach(_=>{const Z=xn==null?void 0:xn.find(L=>(L==null?void 0:L.label)===(_==null?void 0:_.label));Z?h[Z.key]=_.value:_!=null&&_.children&&_.children.length>0&&(h.children=_.children)}),(X=ke.value)!=null&&X.find(_=>_.id===h.id))ke.value=(k=ke.value)==null?void 0:k.map(_=>(_.id===h.id&&(_=h),_));else{let _=y.cloneDeep(ke.value)??[];_.push(h),ke.value=_}se.value=!1,R.value="";let D=y.cloneDeep(c.originalItemContents);(te=y.cloneDeep(c.originalItemContents))!=null&&te.find(_=>(_==null?void 0:_.key)==="extraButton")?D=(Se=y.cloneDeep(c.originalItemContents))==null?void 0:Se.map(_=>((_==null?void 0:_.key)==="extraButton"&&(_.contents=ke.value),_)):D.push({key:"extraButton",contents:ke.value}),r("change",D)},ge=h=>{let D=y.cloneDeep(F.value);D=D==null?void 0:D.map(j=>(j.children||(j.value=h==null?void 0:h[j.name]),j)),F.value=D},me=()=>{se.value=!1,x.value=[],R.value=""},Me=h=>{f.value=!0;let D=[];wn==null||wn.forEach(j=>{b.value++,D.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:h[j.key],id:b.value,contents:j==null?void 0:j.options})}),R.value=h==null?void 0:h.id,H.value=D,U.value=D},Te=h=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,j;O.value=(D=y.cloneDeep(O.value))==null?void 0:D.filter(X=>(X==null?void 0:X.id)!==(h==null?void 0:h.id)),r("change",(j=y.cloneDeep(c.originalItemContents))==null?void 0:j.map(X=>((X==null?void 0:X.key)==="rowButton"&&(X.contents=O.value),X))),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ze=()=>{u.value=!0;let h=[];Vt==null||Vt.forEach(D=>{b.value++,h.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:"",id:b.value,contents:D==null?void 0:D.options})}),C.value=h,M.value=h},ee=()=>{f.value=!0;let h=[];wn==null||wn.forEach(D=>{b.value++,h.push({label:D==null?void 0:D.label,name:D==null?void 0:D.label,type:D.type,value:"",id:b.value,contents:D==null?void 0:D.options})}),H.value=h,U.value=h},xe=h=>{let D=y.cloneDeep(U.value);D=D==null?void 0:D.map(j=>(j.children||(j.value=h==null?void 0:h[j.name]),j)),U.value=D},T=()=>{var j,X,k,te,Se;H.value=U.value;let h={};if(R.value!==""?h.id=R.value:(b.value++,h.id="id"+b.value),(j=H.value)==null||j.forEach(_=>{const Z=wn==null?void 0:wn.find(L=>(L==null?void 0:L.label)===(_==null?void 0:_.label));Z?h[Z.key]=_.value:_!=null&&_.children&&_.children.length>0&&(h.children=_.children)}),(X=O.value)!=null&&X.find(_=>_.id===h.id))O.value=(k=O.value)==null?void 0:k.map(_=>(_.id===h.id&&(_=h),_));else{let _=y.cloneDeep(O.value);_.push(h),O.value=_}f.value=!1,R.value="";let D=y.cloneDeep(c.originalItemContents);(te=y.cloneDeep(c.originalItemContents))!=null&&te.find(_=>(_==null?void 0:_.key)==="rowButton")?D=(Se=y.cloneDeep(c.originalItemContents))==null?void 0:Se.map(_=>((_==null?void 0:_.key)==="rowButton"&&(_.contents=O.value),_)):D.push({key:"rowButton",contents:O.value}),r("change",D)},He=()=>{f.value=!1,R.value="",U.value=[],H.value=[]},qe=h=>{u.value=!0;let D=[];Vt==null||Vt.forEach(j=>{b.value++,D.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:"",id:b.value,contents:j==null?void 0:j.options})}),C.value=D,Q.value=h==null?void 0:h.id,M.value=D},Ee=h=>{var D;g.value=rr(y.cloneDeep(g.value),h==null?void 0:h.id),r("change",(D=y.cloneDeep(c.originalItemContents))==null?void 0:D.map(j=>{var X;return(j==null?void 0:j.key)==="header"&&(j.contents=(X=g.value)!=null&&X.some(k=>k==null?void 0:k.children)?[g.value]:g.value),j}))},ne=h=>{var j,X,k;h.type==="fix"?h.id!==""?g.value=lr(g.value,h):g.value=ir(g.value,h==null?void 0:h.contents):g.value=sr(g.value,h),g.value=(j=g.value)!=null&&j.some(te=>te==null?void 0:te.children)?[g.value]:g.value,R.value="";let D=y.cloneDeep(c.originalItemContents);(X=y.cloneDeep(c.originalItemContents))!=null&&X.find(te=>(te==null?void 0:te.key)==="header")?D=(k=y.cloneDeep(c.originalItemContents))==null?void 0:k.map(te=>((te==null?void 0:te.key)==="header"&&(te.contents=g.value),te)):D.push({key:"header",contents:g.value}),r("change",D)},J=h=>{var j;u.value=!0;let D=[];Vt==null||Vt.forEach(X=>{b.value++,D.push({label:X==null?void 0:X.label,name:X==null?void 0:X.label,type:X.type,value:h[X.key],id:b.value,contents:X==null?void 0:X.options})}),h!=null&&h.children&&((j=h==null?void 0:h.children)==null?void 0:j.length)>0&&D.push({children:h==null?void 0:h.children,isFormColHidden:!0}),R.value=h==null?void 0:h.id,Q.value="",C.value=D,M.value=D},oe=h=>{let D=y.cloneDeep(M.value);D=D==null?void 0:D.map(j=>(j.children||(j.value=h==null?void 0:h[j.name]),j)),M.value=D},we=()=>{u.value=!1,R.value="",Q.value="",M.value=[]},Ue=()=>{var j,X,k,te,Se,_;C.value=M.value;let h={};if(R.value!==""?h.id=R.value:(b.value++,h.id="id"+b.value),(j=C.value)==null||j.forEach(Z=>{const L=Vt==null?void 0:Vt.find(K=>(K==null?void 0:K.label)===(Z==null?void 0:Z.label));L?h[L.key]=Z.value:Z!=null&&Z.children&&Z.children.length>0&&(h.children=Z.children)}),(X=g.value)!=null&&X.find(Z=>Z.id===h.id))g.value=(k=g.value)==null?void 0:k.map(Z=>(Z.id===h.id&&(Z=h),Z));else{let Z=y.cloneDeep(g.value)??[];Q.value===""?Z.push(h):Z=Z==null?void 0:Z.map(L=>(L.id===Q.value&&(L.children||(L.children=[]),L.children.push(h)),L)),g.value=Z}g.value=(te=g.value)!=null&&te.some(Z=>Z==null?void 0:Z.children)?[g.value]:g.value,u.value=!1,R.value="",Q.value="";let D=y.cloneDeep(c.originalItemContents);(Se=y.cloneDeep(c.originalItemContents))!=null&&Se.find(Z=>(Z==null?void 0:Z.key)==="header")?D=(_=y.cloneDeep(c.originalItemContents))==null?void 0:_.map(Z=>((Z==null?void 0:Z.key)==="header"&&(Z.contents=g.value),Z)):D.push({key:"header",contents:g.value}),r("change",D)},ut=h=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var D,j;g.value=(D=y.cloneDeep(g.value))==null?void 0:D.filter(X=>(X==null?void 0:X.id)!==(h==null?void 0:h.id)),r("change",(j=y.cloneDeep(c.originalItemContents))==null?void 0:j.map(X=>{var k;return(X==null?void 0:X.key)==="header"&&(X.contents=(k=g.value)!=null&&k.some(te=>te==null?void 0:te.children)?[g.value]:g.value),X})),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>c.originalItemContents,()=>{var h,D,j,X,k,te,Se,_,Z,L,K,Ce,ae,W,Y,le,de,ye,he;if(!(!c.originalItemContents||c.originalItemContents.length===0))if(p.value=y.cloneDeep(c.originalItemContents),g.value=(D=(h=p.value)==null?void 0:h.find($=>($==null?void 0:$.key)==="header"))==null?void 0:D.contents,O.value=(X=(j=p.value)==null?void 0:j.find($=>($==null?void 0:$.key)==="rowButton"))==null?void 0:X.contents,ke.value=(te=(k=p.value)==null?void 0:k.find($=>($==null?void 0:$.key)==="extraButton"))==null?void 0:te.contents,S.value=(_=(Se=p.value)==null?void 0:Se.find($=>($==null?void 0:$.key)==="page"))!=null&&_.contents?!!((L=(Z=p.value)==null?void 0:Z.find($=>($==null?void 0:$.key)==="page"))!=null&&L.contents):!1,be.value=(Ce=(K=p.value)==null?void 0:K.find($=>($==null?void 0:$.key)==="tableToForm"))==null?void 0:Ce.contents,g.value=(ae=g.value)==null?void 0:ae.map(($,Ne)=>(Array.isArray($)?$=el($):$={label:($==null?void 0:$.label)??"",prop:($==null?void 0:$.label)==="操作"?"operate":$==null?void 0:$.prop,width:$!=null&&$.width?parseInt($.width):"",fixed:($==null?void 0:$.fixed)??void 0,sortable:($==null?void 0:$.sortable)??!1,align:($==null?void 0:$.align)??"left",showOverflowTooltip:($==null?void 0:$.showOverflowTooltip)??!0,isNotDrag:($==null?void 0:$.isNotDrag)??!1,isEditCol:($==null?void 0:$.isEditCol)??!1,isOperate:($==null?void 0:$.isOperate)??!1,id:($==null?void 0:$.id)??Ne,formMenuSelect:($==null?void 0:$.formMenuSelect)??void 0,groupSelect:($==null?void 0:$.groupSelect)??void 0},$)),g.value=(W=g.value)!=null&&W.every($=>Array.isArray($))?(Y=g.value)==null?void 0:Y[0]:g.value,O.value=(le=O.value)==null?void 0:le.map(($,Ne)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",textColor:($==null?void 0:$.textColor)??"#000000",id:($==null?void 0:$.id)??Ne}),ke.value=(de=ke.value)==null?void 0:de.map(($,Ne)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",background:($==null?void 0:$.background)??"var(--ssComponent-primary-color)",id:($==null?void 0:$.id)??Ne}),be.value)be.value=(he=be.value)==null?void 0:he.map($=>{b.value++;let Ne=$;return Ne.id=b.value,Ne});else{let $=[];const Ne=(ye=Ie.getColumnChild(y.cloneDeep(g.value)))==null?void 0:ye.filter(pe=>(pe==null?void 0:pe.prop)!=="operate");Ne==null||Ne.forEach(pe=>{var Pe;b.value++,$.push({label:pe==null?void 0:pe.label,name:(pe==null?void 0:pe.prop)||(pe==null?void 0:pe.label),type:pe!=null&&pe.groupSelect?"Select":"Input",value:"",id:b.value,contents:pe==null?void 0:pe.options,menuSelect:pe==null?void 0:pe.formMenuSelect,groupSelect:(Pe=pe==null?void 0:pe.groupSelect)==null?void 0:Pe.split(":"),selectRelateType:"关联绑定列"})}),be.value=$}},{deep:!0,immediate:!0}),(h,D)=>{const j=e.resolveComponent("svg-icon"),X=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",xl,[e.createElementVNode("div",wl,[e.createElementVNode("div",Cl,[D[2]||(D[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(X,{class:"icon-content",onClick:Ze,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[1]||(D[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(k,te)=>(e.openBlock(),e.createElementBlock("div",{key:te},[e.createElementVNode("div",_l,[e.createElementVNode("div",El,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",Sl,[e.createVNode(j,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Se=>qe(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Se=>J(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Se=>ut(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(e.openBlock(),e.createElementBlock("div",Tl,[e.createVNode(cr,{tableChildContents:k==null?void 0:k.children,onDeleteChange:Ee,onFixChange:ne},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Bl,[D[4]||(D[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(X,{class:"icon-content",id:"themeButton",onClick:ee},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[3]||(D[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O.value,(k,te)=>(e.openBlock(),e.createElementBlock("div",{key:te},[e.createElementVNode("div",Nl,[e.createElementVNode("div",Vl,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",Al,[e.createVNode(j,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Se=>Me(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Se=>Te(k)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ol,[D[6]||(D[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(X,{class:"icon-content",id:"themeButton",onClick:Je},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[5]||(D[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(k,te)=>(e.openBlock(),e.createElementBlock("div",{key:te},[e.createElementVNode("div",Ml,[e.createElementVNode("div",Fl,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",Rl,[e.createVNode(j,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Se=>it(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Se=>q(k)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Pl,[D[8]||(D[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(X,{class:"icon-content",id:"themeButton",onClick:yt},{icon:e.withCtx(()=>[e.createVNode(j,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[D[7]||(D[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ll,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(be.value,(k,te)=>(e.openBlock(),e.createElementBlock("div",{key:te},[e.createElementVNode("div",$l,[e.createElementVNode("div",jl,e.toDisplayString(k==null?void 0:k.label),1),e.createElementVNode("div",Ul,[e.createVNode(j,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Se=>ie(k)},null,8,["onClick"]),e.createVNode(j,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Se=>re(k)},null,8,["onClick"])])])]))),128))]),D[10]||(D[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Kl,[e.createElementVNode("div",Wl,[D[9]||(D[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:S.value,"onUpdate:modelValue":D[0]||(D[0]=k=>S.value=k)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:u.value,onBeforeDestroy:we,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ql,[e.createVNode(X,{onClick:we,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[11]||(D[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(X,{class:"ok-button button",onClick:Ue,id:"themeButton"},{default:e.withCtx(()=>D[12]||(D[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:f.value,onBeforeDestroy:He,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Gl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:H.value,key:H.value,isEnableWrap:!0,onChange:xe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Xl,[e.createVNode(X,{onClick:He,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[13]||(D[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(X,{class:"ok-button button",onClick:T,id:"themeButton"},{default:e.withCtx(()=>D[14]||(D[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:se.value,onBeforeDestroy:me,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Yl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ge},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Jl,[e.createVNode(X,{onClick:me,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[15]||(D[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(X,{class:"ok-button button",onClick:A,id:"themeButton"},{default:e.withCtx(()=>D[16]||(D[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:E.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zl,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:V.value,key:V.value,isEnableWrap:!0,onChange:We,onChangeVisible:Ve,onBlurChange:je},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ql,[e.createVNode(X,{onClick:fe,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>D[17]||(D[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(X,{class:"ok-button button",onClick:Ye,id:"themeButton"},{default:e.withCtx(()=>D[18]||(D[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ts=Rt._export_sfc(es,[["__scopeId","data-v-7a6b87b5"]]),ns=y.useModelComp(y.pinia),{pageMapState:as}=y.storeToRefs(ns),os=y.useMenuState(y.pinia),{activeMenuPath:rs}=y.storeToRefs(os),is=e.ref(24),ls=e.ref(6),ss=e.ref(70),cs=e.ref(.18),us=e.ref(45),ds=(o,l,c,r)=>{var p,u,E,g,f,C,S,M,R,Q,O,ke,H,U,se,x;return{x:((u=(p=o==null?void 0:o.value)==null?void 0:p.tableData)==null?void 0:u.x)||l%2*12,y:((g=(E=o==null?void 0:o.value)==null?void 0:E.tableData)==null?void 0:g.y)||l,w:((C=(f=o==null?void 0:o.value)==null?void 0:f.tableData)==null?void 0:C.w)||is.value,h:((M=(S=o==null?void 0:o.value)==null?void 0:S.tableData)==null?void 0:M.h)||c,minW:((Q=(R=o==null?void 0:o.value)==null?void 0:R.tableData)==null?void 0:Q.minW)||ls.value,minH:((ke=(O=o==null?void 0:o.value)==null?void 0:O.tableData)==null?void 0:ke.minH)||cs.value,maxH:((U=(H=o==null?void 0:o.value)==null?void 0:H.tableData)==null?void 0:U.maxH)||us.value,i:((x=(se=o==null?void 0:o.value)==null?void 0:se.tableData)==null?void 0:x.i)||l,id:(o==null?void 0:o.id)||l+"",component:r}},ps=(o,l)=>{var r,p,u,E,g,f,C,S;let c=1;if(o!=null&&o.compData&&Array.isArray(o==null?void 0:o.compData))if(((r=o==null?void 0:o.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((E=(u=(p=o==null?void 0:o.compData)==null?void 0:p.find(R=>(R==null?void 0:R.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:E.length)===0)return 2}else((g=o==null?void 0:o.comp)==null?void 0:g.toUpperCase())==="FORM"&&(c=((S=(C=(f=o==null?void 0:o.compData)==null?void 0:f.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:C.contents)==null?void 0:S.length)/5);return c*2},ur=(o,l,c)=>{var E,g;const r=(g=(E=as.value)==null?void 0:E[rs.value])==null?void 0:g.filter(f=>{var C;return((C=f==null?void 0:f.key)==null?void 0:C.type)==="gridLayout"}),p=r==null?void 0:r.find(f=>{var C,S,M;return((M=(S=(C=f==null?void 0:f.value)==null?void 0:C.tableData)==null?void 0:S.component)==null?void 0:M.id)===o.id}),u=ps(o);return o!=null&&o.children&&(o==null?void 0:o.children.length)>0&&(o.children=o.children.map((f,C)=>ur(f,C))),{...ds(p,l,u,o)}},fs=(o,l)=>{if((o==null?void 0:o.length)===0)return[];const c=y.cloneDeep(o);return Array.isArray(o)?c==null?void 0:c.map((r,p)=>ur(r,p)):[]},hs=o=>({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=(o,l)=>o==null?void 0:o.map(c=>{for(const r in l)if(r===(c==null?void 0:c.prop))return{...c,value:l[r]};return c}),gs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.ref([]);e.watch(()=>c.compType,g=>{var S;const f=hs(c==null?void 0:c.optionItems),C=g?(S=f[g==null?void 0:g.toUpperCase()])==null?void 0:S[c==null?void 0:c.target]:[];p.value=C==null?void 0:C.map(M=>{for(const[R,Q]of Object.entries((c==null?void 0:c.comp)||{}))if((M==null?void 0:M.prop)===R)return{...M,value:Q};return M})},{immediate:!0});const u=g=>Bt.getComponent(g),E=g=>{var f,C;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?p.value=(f=p.value)==null?void 0:f.map(S=>{var M;return(S==null?void 0:S.prop)==="isStepLayout"?{...S,options:(M=S==null?void 0:S.options)==null?void 0:M.map(R=>({...R,disabled:!0}))}:(S==null?void 0:S.prop)==="isGridLayout"?{...S,disabled:!0}:S}):p.value=(C=p.value)==null?void 0:C.map(S=>{var M;return(S==null?void 0:S.prop)==="isStepLayout"?{...S,options:(M=S==null?void 0:S.options)==null?void 0:M.map(R=>({...R,disabled:!1}))}:(S==null?void 0:S.prop)==="isGridLayout"?{...S,disabled:!1}:S}),r("change",{target:c==null?void 0:c.target,styleConfigs:p.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const C=e.resolveComponent("el-col"),S=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,M=>(e.openBlock(),e.createBlock(S,{class:"style-row",key:M==null?void 0:M.prop},{default:e.withCtx(()=>[e.createVNode(C,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(M==null?void 0:M.label)+":",1)]),_:2},1024),e.createVNode(C,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(M.type)),{modelValue:M.value,"onUpdate:modelValue":R=>M.value=R,content:M==null?void 0:M.options,optionUrl:M==null?void 0:M.optionUrl,disabled:M==null?void 0:M.disabled,activeText:M==null?void 0:M.activeText,inactiveText:M==null?void 0:M.inactiveText,onChange:R=>E(M)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ms=Rt._export_sfc(gs,[["__scopeId","data-v-6c233914"]]),ys=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(o,{emit:l}){const c=o,r=l,p=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),E=U=>U==null?void 0:U.reduce((se,x)=>(se[x==null?void 0:x.prop]=x==null?void 0:x.rule,se),{}),g=e.computed(()=>({formRules:E(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),C=e.ref(""),S=(U,se,x)=>{var V;let F=[];(c==null?void 0:c.activeTabName)==="任务配置"?(F=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:U},{label:"按钮名称",value:"按钮名称",children:se}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:p},{prop:"任务关键词",rule:p},{prop:"执行任务",rule:p},{prop:"执行动作",rule:p},{prop:"执行交互",rule:p}]):(c==null?void 0:c.activeTabName)==="任务关联"&&(F=[{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:(V=c==null?void 0:c.relatedData)==null?void 0:V.map(N=>({label:N==null?void 0:N.任务名称,value:N==null?void 0:N.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:p},{prop:"关联状态",rule:p},{prop:"关联形式",rule:p},{prop:"关联任务集合",rule:p}]);let b;return x&&(x==null?void 0:x.length)>0?b=[...F,...M(U,se,x)]:b=F,b},M=(U,se,x)=>{const F=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return x?F==null?void 0:F.filter(b=>x==null?void 0:x.includes(b==null?void 0:b.prop)):F},R=(U,se)=>{var N,be,Je,yt,Ve,We,je,z,ie;const x=((Ve=(yt=(Je=(be=(N=c==null?void 0:c.comp)==null?void 0:N.compData)==null?void 0:be.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:Je.contents)==null?void 0:yt.filter(re=>(re==null?void 0:re.label)!=="操作"))==null?void 0:Ve.map(re=>({value:re==null?void 0:re.prop,label:re.label})))||[],F=/button/i,b=((ie=(z=(je=(We=c==null?void 0:c.comp)==null?void 0:We.compData)==null?void 0:je.filter(re=>F.test(re==null?void 0:re.key)))==null?void 0:z.flatMap(re=>re==null?void 0:re.contents))==null?void 0:ie.map(re=>({value:re==null?void 0:re.label,label:re.label})))||[],V=S(x,b,U);f.value=se?vs(V,se):V,U&&(U==null?void 0:U.length)>0&&u.value.push(...U==null?void 0:U.map(re=>({prop:re,rule:p})))};e.onMounted(()=>{R(null,c==null?void 0:c.extendItem)});const Q=U=>{const se=U==null?void 0:U[C.value];if(C.value==="执行任务"){if(!(se!=null&&se.join("/")))return;const x=se==null?void 0:se.join("/");R(x==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:x==="进度设置/进度条"?["进度关键词"]:null,U)}},O=U=>{r("change",{target:c==null?void 0:c.target,extendConfigs:U})},ke=(U,se)=>{C.value=se==null?void 0:se.changeProp,Q(U)},H=U=>{r("onButtonClick",U)};return(U,se)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:O,onBlurChange:ke,onOnButtonClick:H},null,8,["rowContents","formRules","buttonValue"]))}}),bs=Rt._export_sfc(ys,[["__scopeId","data-v-7c660c1f"]]),ks={};function xs(o,l){return null}const ws=Rt._export_sfc(ks,[["render",xs]]),Cs={class:"form-operate-content"},Ds={class:"form-operate-item"},_s={class:"operate-title"},Es={class:"operate-content"},Ss={class:"fix-content"},Ts={class:"fix-button"},Bs={class:"operate-title"},Is={class:"operate-content"},Ns={class:"fix-content"},Vs={class:"fix-button"},As={style:{display:"flex","justify-content":"space-between"}},Os={class:"form-content"},zs={class:"dialog-footer"},Ms={class:"form-content"},Fs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.ref(!1),u=e.ref([]),E=e.ref([]),g=e.ref(!1),f=e.ref([]),C=e.ref([]),S=e.ref(""),M=e.ref(!1),R=e.ref(0),Q=e.ref([]),O=e.ref([]),ke=(z,ie)=>{if((ie==null?void 0:ie.type)=="Select"&&(z==null?void 0:z.key)==="selectRelateType"){const re=ie==null?void 0:ie.optionUrl;return(re==null?void 0:re.selectRelateType)||ie[z.key]}if((ie==null?void 0:ie.type)=="Select"&&(z==null?void 0:z.key)==="menuSelect"){const re=ie==null?void 0:ie.optionUrl;return(re==null?void 0:re.menuSelect)||ie[z.key]}if((ie==null?void 0:ie.type)=="Select"&&(z==null?void 0:z.key)==="groupSelect"){const re=ie==null?void 0:ie.optionUrl;return(re==null?void 0:re.groupSelect)||ie[z.key]}if((ie==null?void 0:ie.type)=="Select"&&(z==null?void 0:z.key)==="originalContent")return(ie==null?void 0:ie.value)||ie[z.key];if((ie==null?void 0:ie.type)=="Select"&&(z==null?void 0:z.key)==="multiple"){const re=ie[z.key];return ar(re)?re:z.default}return(z==null?void 0:z.label)==="类型"&&ie[z.key]===""?"Input":(z==null?void 0:z.key)==="isFormColHidden"&&!ie[z.key]?!1:ie[z.key]},H=async z=>{var fe,Ye,it,q,A,ge;p.value=!0;let ie=[];const re=await((it=(Ye=(fe=Ie.FormContent)==null?void 0:fe.find(me=>(me==null?void 0:me.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:Ye.value)==null?void 0:it.value)??((A=(q=Ie.FormContent)==null?void 0:q.find(me=>(me==null?void 0:me.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:A.value);if(re==null||re.forEach(me=>{R.value++,ie.push({label:me==null?void 0:me.label,name:me==null?void 0:me.label,type:me.type,prop:me==null?void 0:me.prop,value:ke(me,z),id:R.value,contents:me==null?void 0:me.options,width:(z==null?void 0:z.width)??1})}),z!=null&&z.menuSelect&&((ge=z==null?void 0:z.menuSelect)==null?void 0:ge.length)>0){const me=await Ie.menuToContentType(z==null?void 0:z.menuSelect);ie=ie==null?void 0:ie.map(Me=>((Me==null?void 0:Me.name)==="组信息选项"&&(Me.contents=me),Me))}S.value=z==null?void 0:z.id,u.value=await Ie.selectToBase(Ie.formToOptionsContents(ie)),E.value=await Ie.selectToBase(Ie.formToOptionsContents(ie))},U=z=>{var re;g.value=!0;let ie=[];(re=Ie.FormButton)==null||re.forEach(fe=>{R.value++,ie.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:R.value,contents:fe==null?void 0:fe.options})}),Q.value=ie,O.value=ie,S.value=z==null?void 0:z.id};e.watch(()=>M.value,()=>{var ie,re;let z=y.cloneDeep(c.originalItemContents);(ie=y.cloneDeep(c.originalItemContents))!=null&&ie.find(fe=>(fe==null?void 0:fe.key)==="enableWrap")?z=(re=y.cloneDeep(c.originalItemContents))==null?void 0:re.map(fe=>((fe==null?void 0:fe.key)==="enableWrap"&&(fe.contents=!M.value),fe)):z.push({key:"enableWrap",contents:!M.value}),r("change",z)},{deep:!0});const se=()=>{var re,fe,Ye,it,q;Q.value=O.value;let z={};if(S.value!==""?z.id=S.value:(R.value++,z.id="id"+R.value),(re=Q.value)==null||re.forEach(A=>{var me;const ge=(me=Ie.FormButton)==null?void 0:me.find(Me=>(Me==null?void 0:Me.label)===(A==null?void 0:A.label));ge&&(z[ge.key]=A.value)}),(fe=f.value)!=null&&fe.find(A=>A.id===z.id))f.value=(Ye=f.value)==null?void 0:Ye.map(A=>(A.id===z.id&&(A=z),A));else{let A=y.cloneDeep(f.value);f.value||(f.value=[]),A.push(z),f.value=A}g.value=!1,S.value="";let ie=y.cloneDeep(c.originalItemContents);(it=y.cloneDeep(c.originalItemContents))!=null&&it.find(A=>(A==null?void 0:A.key)==="formButton")?ie=(q=y.cloneDeep(c.originalItemContents))==null?void 0:q.map(A=>((A==null?void 0:A.key)==="formButton"&&(A.contents=f.value),A)):ie.push({key:"formButton",contents:f.value}),r("change",ie)},x=z=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ie,re;C.value=(ie=y.cloneDeep(C.value))==null?void 0:ie.filter(fe=>(fe==null?void 0:fe.id)!==(z==null?void 0:z.id)),r("change",(re=y.cloneDeep(c.originalItemContents))==null?void 0:re.map(fe=>((fe==null?void 0:fe.key)==="formContent"&&(fe.contents=C.value),fe))),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},F=z=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ie,re;f.value=(ie=y.cloneDeep(f.value))==null?void 0:ie.filter(fe=>(fe==null?void 0:fe.id)!==(z==null?void 0:z.id)),r("change",(re=y.cloneDeep(c.originalItemContents))==null?void 0:re.map(fe=>((fe==null?void 0:fe.key)==="formButton"&&(fe.contents=f.value),fe))),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},b=()=>{var ie;g.value=!0;let z=[];(ie=Ie.FormButton)==null||ie.forEach(re=>{R.value++,z.push({label:re==null?void 0:re.label,name:re==null?void 0:re.label,type:re.type,value:(re==null?void 0:re.label)==="类型"?"normal":"",id:R.value,contents:re==null?void 0:re.options})}),Q.value=z,O.value=z},V=()=>{var ie,re,fe;p.value=!0;let z=[];(fe=(re=(ie=Ie.FormContent)==null?void 0:ie.find(Ye=>(Ye==null?void 0:Ye.key)==="Input"))==null?void 0:re.value)==null||fe.forEach(Ye=>{R.value++,z.push({label:Ye==null?void 0:Ye.label,name:Ye==null?void 0:Ye.label,type:Ye.type,value:(Ye==null?void 0:Ye.label)==="类型"?"Input":"",id:R.value,contents:Ye==null?void 0:Ye.options})}),u.value=z,E.value=z},N=z=>{let ie=y.cloneDeep(O.value);ie=ie==null?void 0:ie.map(re=>(re.value=z==null?void 0:z[re.name],re)),O.value=ie},be=z=>{const ie=z.find(Ye=>(Ye==null?void 0:Ye.name)==="类型");if((ie==null?void 0:ie.value)!="Select")return;const re=z.find(Ye=>(Ye==null?void 0:Ye.name)==="多选"),fe=z.find(Ye=>(Ye==null?void 0:Ye.name)==="初始值");re!=null&&re.value&&mo.isString(fe.value)&&(fe.value=[fe.value]),!(re!=null&&re.value)&&!mo.isString(fe.value)&&(fe.value="")},Je=async z=>{var ie,re,fe,Ye,it,q,A,ge,me,Me,Te,Ze;if((z==null?void 0:z.类型)!==((re=(ie=E.value)==null?void 0:ie.find(ee=>(ee==null?void 0:ee.label)==="类型"))==null?void 0:re.value)){let ee=[];const xe=await((it=(Ye=(fe=Ie.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:Ye.value)==null?void 0:it.value)?await((Me=(me=(ge=Ie.FormContent)==null?void 0:ge.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:me.value)==null?void 0:Me.value):(A=(q=Ie.FormContent)==null?void 0:q.find(T=>(T==null?void 0:T.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:A.value;if(xe==null||xe.forEach(T=>{var qe,Ee;R.value++;const He=ji(T==null?void 0:T.default)?(z==null?void 0:z[T.label])??T.value??"":T==null?void 0:T.default;ee.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:He,prop:T==null?void 0:T.prop,id:R.value,contents:T==null?void 0:T.options,width:((Ee=(qe=E.value)==null?void 0:qe[0])==null?void 0:Ee.width)??1})}),z!=null&&z.菜单选项&&((Te=z==null?void 0:z.菜单选项)==null?void 0:Te.length)>0){const T=await Ie.menuToContentType(z==null?void 0:z.菜单选项);ee=ee==null?void 0:ee.map(He=>((He==null?void 0:He.name)==="组信息选项"&&(He.contents=T),He))}be(ee),E.value=await Ie.selectToBase(y.cloneDeep(ee)),u.value=await Ie.selectToBase(y.cloneDeep(ee))}else{let ee=y.cloneDeep(E.value);if(ee=ee==null?void 0:ee.map(xe=>(xe.value=z==null?void 0:z[xe.name],xe)),z!=null&&z.菜单选项&&((Ze=z==null?void 0:z.菜单选项)==null?void 0:Ze.length)>0){const xe=await Ie.menuToContentType(z==null?void 0:z.菜单选项);ee=ee==null?void 0:ee.map(T=>((T==null?void 0:T.name)==="组信息选项"&&(T.contents=xe),T))}ee=Ie.formToOptionsContents(ee),be(ee),E.value=await Ie.selectToBase(y.cloneDeep(ee))}},yt=z=>{z||(u.value=E.value)},Ve=async z=>{await Je(z),u.value=E.value},We=nr(async()=>{var fe,Ye,it,q,A,ge,me,Me,Te,Ze,ee,xe;u.value=E.value;let z={};z.width=((Ye=(fe=u.value)==null?void 0:fe[0])==null?void 0:Ye.width)??1,S.value!==""?z.id=S.value:(R.value++,z.id="id"+R.value);let ie=await((A=(q=(it=Ie.FormContent)==null?void 0:it.find(T=>{var He,qe;return(T==null?void 0:T.key)===(((qe=(He=u.value)==null?void 0:He.find(Ee=>(Ee==null?void 0:Ee.label)==="类型"))==null?void 0:qe.value)??"label")}))==null?void 0:q.value)==null?void 0:A.value)??((me=(ge=Ie.FormContent)==null?void 0:ge.find(T=>{var He,qe;return(T==null?void 0:T.key)===(((qe=(He=u.value)==null?void 0:He.find(Ee=>(Ee==null?void 0:Ee.label)==="类型"))==null?void 0:qe.value)??"label")}))==null?void 0:me.value);if((Me=u.value)==null||Me.forEach(T=>{const He=ie==null?void 0:ie.find(qe=>(qe==null?void 0:qe.label)===(T==null?void 0:T.label));He&&(z[He.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,(Te=C.value)!=null&&Te.find(T=>T.id===z.id))C.value=(Ze=C.value)==null?void 0:Ze.map(T=>(T.id===z.id&&(T=z),T));else{let T=y.cloneDeep(C.value);T.push(z),C.value=T}C.value=C.value.map(({id:T,...He})=>He),p.value=!1,S.value="";let re=y.cloneDeep(c.originalItemContents);(ee=y.cloneDeep(c.originalItemContents))!=null&&ee.find(T=>(T==null?void 0:T.key)==="formContent")?re=(xe=y.cloneDeep(c.originalItemContents))==null?void 0:xe.map(T=>((T==null?void 0:T.key)==="formContent"&&(T.contents=C.value),T)):re.push({key:"formContent",contents:C.value}),r("change",re)},300),je=()=>{p.value=!1,g.value=!1,S.value="",E.value=[],O.value=[]};return e.watch(()=>c.originalItemContents,()=>{var ie,re,fe,Ye,it,q;if(!c.originalItemContents||c.originalItemContents.length===0)return;const z=y.cloneDeep(c.originalItemContents);C.value=((ie=z==null?void 0:z.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:ie.contents)??[],f.value=((re=z==null?void 0:z.find(A=>(A==null?void 0:A.key)==="formButton"))==null?void 0:re.contents)??[],M.value=(fe=z==null?void 0:z.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&fe.contents?!((Ye=z==null?void 0:z.find(A=>(A==null?void 0:A.key)==="enableWrap"))!=null&&Ye.contents):!0,C.value=(it=y.cloneDeep(C.value))==null?void 0:it.map((A,ge)=>{var Me;let me=A;return me.id=(A==null?void 0:A.id)??ge,A!=null&&A.label||(A.label=(A==null?void 0:A.key)??(A==null?void 0:A.label)??""),A!=null&&A.type||(A.type=(A==null?void 0:A.type)??""),A.contents=((Me=A==null?void 0:A.options)==null?void 0:Me.length)===0?(A==null?void 0:A.contents)??"":A==null?void 0:A.options,me}),C.value=Ie.formToOptionsContents(C.value),f.value=(q=f.value)==null?void 0:q.map((A,ge)=>A={label:(A==null?void 0:A.label)??"",type:(A==null?void 0:A.type)??"",background:(A==null?void 0:A.background)??"var(--ssComponent-primary-color)",id:ge})},{deep:!0,immediate:!0}),(z,ie)=>{const re=e.resolveComponent("svg-icon"),fe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Cs,[e.createElementVNode("div",Ds,[e.createElementVNode("div",_s,[ie[2]||(ie[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:V},{icon:e.withCtx(()=>[e.createVNode(re,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ie[1]||(ie[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Es,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(Ye,it)=>(e.openBlock(),e.createElementBlock("div",{key:it},[e.createElementVNode("div",Ss,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Ts,[e.createVNode(re,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>H(Ye)},null,8,["onClick"]),e.createVNode(re,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>x(Ye)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Bs,[ie[4]||(ie[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(fe,{class:"icon-content",id:"themeButton",onClick:b},{icon:e.withCtx(()=>[e.createVNode(re,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ie[3]||(ie[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ye,it)=>(e.openBlock(),e.createElementBlock("div",{key:it},[e.createElementVNode("div",Ns,[e.createElementVNode("div",null,e.toDisplayString(Ye.label),1),e.createElementVNode("div",Vs,[e.createVNode(re,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>U(Ye)},null,8,["onClick"]),e.createVNode(re,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>F(Ye)},null,8,["onClick"])])])]))),128))]),ie[6]||(ie[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",As,[ie[5]||(ie[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:M.value,"onUpdate:modelValue":ie[0]||(ie[0]=Ye=>M.value=Ye)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:je,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Os,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Je,onChangeVisible:yt,onBlurChange:Ve},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zs,[e.createVNode(fe,{onClick:je,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ie[7]||(ie[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(fe,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>ie[8]||(ie[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:g.value,onBeforeDestroy:je,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ms,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:Q.value,key:Q.value,isEnableWrap:!0,onChange:N},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:je,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:se},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Co=Rt._export_sfc(Fs,[["__scopeId","data-v-20850524"]]),Rs={class:"step-module content"},Ps={class:"module-data"},Ls={class:"step-module layout"},$s={class:"form-content"},js=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),E=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),C=e.ref({}),S=e.ref([]),M=H=>{var U;C.value=H,r("change",(U=O())==null?void 0:U.compData)},R=(H,U)=>{var se,x;switch(H){case"create":(se=u.value)==null||se.forEach(F=>{F.value=""}),f.value="create",g.visible=!0;break;case"update":(x=u.value)==null||x.forEach(F=>{F.value=U[F==null?void 0:F.prop]}),f.value="update",g.visible=!0;break;case"delete":S.value.splice(U,1),f.value="delete";break}},Q=H=>{var U,se,x;if((H==null?void 0:H.buttonName)==="确认"){const F=y.cloneDeep(H==null?void 0:H.content);switch(Object.keys(F).forEach(b=>{F[b]===""&&delete F[b]}),f.value){case"create":S.value.push({...F,index:((U=S.value)==null?void 0:U.length)+1});break;case"update":S.value=(se=S.value)==null?void 0:se.map(b=>b.index===(F==null?void 0:F.index)?{...b,title:F==null?void 0:F.title,description:F==null?void 0:F.description}:b);break}r("change",(x=O())==null?void 0:x.compData),g.visible=!1}else g.visible=!1},O=()=>({comp:"Step",compData:[{key:"stepList",contents:S.value},{key:"stepConfig",contents:C.value}]}),ke=()=>{g.visible=!1};return e.watch(()=>c==null?void 0:c.itemContents,H=>{var U,se;H&&(C.value=((U=H==null?void 0:H.find(x=>x.key==="stepConfig"))==null?void 0:U.contents)??{},S.value=((se=H==null?void 0:H.find(x=>x.key==="stepList"))==null?void 0:se.contents)??[])},{immediate:!0}),(H,U)=>{const se=e.resolveComponent("svg-icon"),x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Rs,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(x,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=F=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ps,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(F,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(F==null?void 0:F.title),1),e.createElementVNode("div",null,[e.createVNode(x,{type:"primary",size:"small",onClick:V=>R("update",{...F,index:b+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(x,{type:"danger",size:"small",onClick:V=>R("delete",b)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ls,[U[5]||(U[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:p.value,onChange:M},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:ke,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:E.value,onOnButtonClick:Q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Us=Rt._export_sfc(js,[["__scopeId","data-v-7dbd17f2"]]),Ks={class:"step-module content"},Ws={class:"module-data"},Hs={class:"step-module layout"},qs={class:"form-content"},Gs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.ref("create"),u=e.ref({}),E=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),C=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),S=e.reactive({visible:!1,width:"40%",title:"时间线"}),M=H=>{var U;u.value=H,r("change",(U=O())==null?void 0:U.compData)},R=(H,U)=>{var se,x;switch(H){case"create":(se=f.value)==null||se.forEach(F=>{F.value=""}),p.value="create",S.visible=!0;break;case"update":(x=f.value)==null||x.forEach(F=>{F.value=U[F==null?void 0:F.prop]}),p.value="update",S.visible=!0;break;case"delete":E.value.splice(U,1),p.value="delete";break}},Q=H=>{var U,se,x,F;if((H==null?void 0:H.buttonName)==="确认"){const b=y.cloneDeep(H==null?void 0:H.content);switch(Object.keys(b).forEach(V=>{b[V]===""&&delete b[V]}),p.value){case"create":(se=E.value)==null||se.push({...b,index:((U=E.value)==null?void 0:U.length)+1});break;case"update":E.value=(x=E.value)==null?void 0:x.map(V=>V.index===(b==null?void 0:b.index)?{...V,content:b==null?void 0:b.content,timestamp:b==null?void 0:b.timestamp}:V);break}r("change",(F=O())==null?void 0:F.compData),S.visible=!1}else S.visible=!1},O=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:E.value},{key:"timeLineConfig",contents:u.value}]}),ke=()=>{S.visible=!1};return e.watch(()=>c==null?void 0:c.itemContents,H=>{var U,se;H&&(u.value=((U=H==null?void 0:H.find(x=>x.key==="timeLineConfig"))==null?void 0:U.contents)??{},E.value=((se=H==null?void 0:H.find(x=>x.key==="timeLineList"))==null?void 0:se.contents)??[])},{immediate:!0}),(H,U)=>{const se=e.resolveComponent("svg-icon"),x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ks,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(x,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=F=>R("create"))},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ws,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(F,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(F==null?void 0:F.content),1),e.createElementVNode("div",null,[e.createVNode(x,{type:"primary",size:"small",onClick:V=>R("update",{...F,index:b+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(x,{type:"danger",size:"small",onClick:V=>R("delete",b)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Hs,[U[5]||(U[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:g.value,onChange:M},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:S.visible,title:S.title,onBeforeDestroy:ke,width:S.width},{default:e.withCtx(()=>[e.createElementVNode("div",qs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:C.value,onOnButtonClick:Q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Xs=Rt._export_sfc(Gs,[["__scopeId","data-v-39ffc861"]]),Ys={};function Js(o,l){return e.openBlock(),e.createElementBlock("div")}const Zs=Rt._export_sfc(Ys,[["render",Js]]),Qs={class:"extra-content"},ec={key:0},tc={key:1},nc={class:"dialog-footer"},ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(o,{emit:l}){const c=o,r=e.ref(0),p=e.ref(),u=e.ref(),E=l,g=e.ref(!1),f=e.ref({}),C=e.ref({}),S=e.ref();e.watch(()=>[c.itemData],()=>{var F;const x=y.cloneDeep(c.itemData);p.value=(F=y.cloneDeep(x))==null?void 0:F.map(b=>{var V;if(b.key==="extra"){let N=[];(V=b.value)==null||V.forEach(be=>{var Je;N.push((Je=Object.values(be))==null?void 0:Je[0])}),b.value=N}return b})},{deep:!0,immediate:!0});const M=(x,F,b,V)=>{var be;let N={};((be=x==null?void 0:x[0])==null?void 0:be.contents)==="详情"&&(g.value=!0,N[F]=x,u.value=x==null?void 0:x.filter(Je=>(Je==null?void 0:Je.key)!=="tableContentName"),f.value=N,C.value=b,S.value=V.id)},R=x=>{var Je,yt,Ve,We;const F=(yt=(Je=Object.values(y.cloneDeep(f.value)))==null?void 0:Je[0])==null?void 0:yt.filter(je=>(je==null?void 0:je.key)==="tableContentName"),b=(We=(Ve=Object.values(y.cloneDeep(f.value)))==null?void 0:Ve[0])==null?void 0:We.filter(je=>(je==null?void 0:je.key)!=="tableContentName"),V=b==null?void 0:b.map((je,z)=>{var ie;return z===x.index&&(je==null?void 0:je.comp)==="Table"&&(je.compData=(ie=je.compData)==null?void 0:ie.map(re=>{var fe,Ye;return(re==null?void 0:re.key)==="tableContents"&&(re.contents=(Ye=(fe=x.content)==null?void 0:fe.map(it=>{let q={};for(let A in it)A!=="id"&&(q[A]=it[A]);return q}))==null?void 0:Ye.map(it=>Object.values(it))),re})),je});V.unshift(F==null?void 0:F[0]);let N=y.cloneDeep(f.value),be={};for(let je in N)be[je]=V;f.value=be},Q=()=>{g.value=!1,f.value={},C.value={},S.value=void 0,r.value++},O=x=>{var Je,yt,Ve,We;const F=(yt=(Je=Object.values(y.cloneDeep(f.value)))==null?void 0:Je[0])==null?void 0:yt.filter(je=>(je==null?void 0:je.key)==="tableContentName"),b=(We=(Ve=Object.values(y.cloneDeep(f.value)))==null?void 0:Ve[0])==null?void 0:We.filter(je=>(je==null?void 0:je.key)!=="tableContentName"),V=b==null?void 0:b.map((je,z)=>(z===x.index&&(je.compData=x.contents),je));V.unshift(F==null?void 0:F[0]);let N=y.cloneDeep(f.value),be={};for(let je in N)be[je]=V;f.value=be},ke=()=>{var F,b;let x={};for(let V in C.value)V===((F=Object.keys(f.value))==null?void 0:F[0])?x[V]=(b=Object.values(f.value))==null?void 0:b[0]:x[V]=C.value[V];E("change",{buttonName:"编辑",index:S.value,singleContent:x},"methodData"),g.value=!1,f.value={},C.value={},S.value=void 0},H=()=>{g.value=!1,f.value={},C.value={},S.value=void 0},U=x=>{E("change",x,"methodData")},se=x=>ta(x);return(x,F)=>{const b=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(V,N)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(V==null?void 0:V.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ec)):(e.openBlock(),e.createElementBlock("div",tc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(se(V.comp)),{itemData:V==null?void 0:V.compData,childItemData:V==null?void 0:V.itemChildData,key:N,index:(V==null?void 0:V.id)??N,onContentClick:M,onChange:U},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:g.value,onBeforeDestroy:H},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(V,N)=>(e.openBlock(),e.createElementBlock("div",{key:N,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(se(V.comp)),{itemData:V==null?void 0:V.compData,onChange:R,childItemData:V==null?void 0:V.itemChildData,key:N,onContentChange:O,index:(V==null?void 0:V.id)??N,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",nc,[e.createVNode(b,{class:"cancel-button footer-button",onClick:Q,id:"themeBorderButton"},{default:e.withCtx(()=>F[0]||(F[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(b,{class:"confirm-button footer-button",onClick:ke,id:"themeButton"},{default:e.withCtx(()=>F[1]||(F[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},oc=Rt._export_sfc(ac,[["__scopeId","data-v-2d9c5ab2"]]),rc={key:0,class:"method-content"},ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(o){const l=e.ref([]),c=Ie.useOriginalState(y.pinia),{originalPath:r}=y.storeToRefs(c),p=o,u=e.ref(!1),E=e.ref(),g=Ie.useTableComp(y.pinia),{multipleTableConst:f}=y.storeToRefs(g),C=y.useModelComp(y.pinia),S=e.ref(!1),M=y.useMenuState(y.pinia),R=y.useLoginState(y.pinia),{itemData:Q,isEdit:O,routeToChildPath:ke,tableViewContents:H,lockingPage:U,payloadTypes:se}=y.storeToRefs(C),{activeMenuPath:x,platform:F,childMenu:b}=y.storeToRefs(M),{loginUserInfo:V}=y.storeToRefs(R),N=e.ref(!1),be=async()=>{var q,A;(q=l.value)!=null&&q.find(ge=>(ge==null?void 0:ge.buttonName)==="保存")&&await re((A=l.value)==null?void 0:A.find(ge=>(ge==null?void 0:ge.buttonName)==="保存")),await Ie.onSaveBack()};e.watch(()=>Q.value,async()=>{O.value==="view"&&!N.value&&await it(y.cloneDeep(p.itemData)),N.value=!1},{deep:!0});const Je=()=>{u.value=!1,E.value=void 0},yt=q=>q.map(A=>{const ge={};for(const me in A){const Me=A[me];if(me.includes(f.value)){const Te=me.split(f.value);let Ze=ge;Te.forEach((ee,xe)=>{xe===Te.length-1?Ze[ee]=Me:(Ze[ee]||(Ze[ee]={}),Ze=Ze[ee])})}else ge[me]=Me}return ge}),Ve=async(q,A,ge=[])=>{var Me,Te,Ze,ee,xe,T,He,qe,Ee,ne,J,oe,we,Ue,ut;let me=(Me=y.cloneDeep(A))==null?void 0:Me.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(q!=null&&q.includes("[")){let h=(T=(xe=(ee=(Ze=(Te=y.cloneDeep(q))==null?void 0:Te.split("["))==null?void 0:Ze[1])==null?void 0:ee.split("]"))==null?void 0:xe[0])==null?void 0:T.split(":"),D="";if(h!=null&&h[0]){let j=(He=me==null?void 0:me.find(X=>(X==null?void 0:X.name)===(h==null?void 0:h[0])))==null?void 0:He.compData;if(!j){let X=(qe=q==null?void 0:q.split("["))==null?void 0:qe[0],k=await Ie.getItemData(X,sessionStorage.getItem("systemKey"),"",!1,"","",ge);j=(Ee=k==null?void 0:k.find(te=>(te==null?void 0:te.name)===(h==null?void 0:h[0])))==null?void 0:Ee.compData}j==null||j.forEach(X=>{var k,te,Se,_,Z,L;if((X==null?void 0:X.key)==="formContent")(k=X==null?void 0:X.contents)==null||k.forEach(K=>{var Ce;(K==null?void 0:K.key)===(h==null?void 0:h[1])&&(Array.isArray(K==null?void 0:K.value)?D=K==null?void 0:K.value:D=(Ce=K==null?void 0:K.value)==null?void 0:Ce.toString())});else if((X==null?void 0:X.key)==="tableContents"){let K=[],Ce=(te=j==null?void 0:j.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:te.contents,ae=(h==null?void 0:h[1])??"";if(Ce!=null&&Ce.every(W=>Array.isArray(W))){let W=Ie.getColumnChild((Z=Ce==null?void 0:Ce[0])==null?void 0:Z.filter(Y=>(Y==null?void 0:Y.label)!=="操作"));(L=X.contents)==null||L.forEach(Y=>{let le={};Y=Y==null?void 0:Y.filter(de=>!(de!=null&&de.id)),W==null||W.forEach((de,ye)=>{let he=Y[ye];typeof Y[ye]=="number"&&(he=Y[ye].toString()),(ae===""||ae===de.prop)&&(le[de.prop]=he)}),K.push(le)}),K=yt(K)}else{let W=(Se=Ce==null?void 0:Ce.map(Y=>Y==null?void 0:Y.label))==null?void 0:Se.filter(Y=>Y!=="操作");(_=X.contents)==null||_.forEach(Y=>{let le={};Y=Y==null?void 0:Y.filter(de=>!(de!=null&&de.id)),W==null||W.forEach((de,ye)=>{let he=Y[ye];typeof Y[ye]=="number"&&(he=Y[ye].toString()),(ae===""||ae===de)&&(le[de]=he)}),K.push(le)})}D=K}})}return D}else if(q!=null&&q.includes("/")){let h={};return(ne=y.cloneDeep(me))==null||ne.forEach((D,j)=>{var X,k,te,Se,_,Z,L,K,Ce,ae,W,Y,le,de,ye,he,$,Ne,pe;if((D==null?void 0:D.comp)==="Table"){let Pe=Array.isArray((te=(k=(X=D==null?void 0:D.compData)==null?void 0:X.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:k.contents)==null?void 0:te[0])?(L=(Z=(_=(Se=D==null?void 0:D.compData)==null?void 0:Se.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:_.contents)==null?void 0:Z[0])==null?void 0:L.some(_e=>_e==null?void 0:_e.children):[],nt=(ae=(Ce=(K=D==null?void 0:D.compData)==null?void 0:K.find(_e=>(_e==null?void 0:_e.key)==="tableContents"))==null?void 0:Ce.contents)==null?void 0:ae.map(_e=>(_e!=null&&_e.find(vt=>vt==null?void 0:vt.id)&&(_e=_e.slice(1)),_e)),Fe=(ye=(de=(le=(Y=(W=D==null?void 0:D.compData)==null?void 0:W.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:Y.contents)==null?void 0:le[0])==null?void 0:de[0])==null?void 0:ye.label,tt=($=(he=D==null?void 0:D.compData)==null?void 0:he.find(_e=>(_e==null?void 0:_e.key)==="header"))==null?void 0:$.contents;if(Pe)(Pe==null?void 0:Pe.length)===0?h[D.name]=h!=null&&h[D.name]?h[D.name]:Ie.tableToForm(nt,tt):h[Fe]=Ie.tableToForm(nt,tt);else{const _e=[];tt=tt.slice(1,tt.length-1),tt==null||tt.forEach((vt,Qe)=>{nt==null||nt.forEach(Be=>{_e.push({key:vt.label+Be[0],value:Be[Qe+1]})})}),h["form"+j]=_e}}else{const Pe=(pe=(Ne=D.compData)==null?void 0:Ne.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:pe.contents;h!=null&&h.form||(h.form=[]);const nt=[];Pe==null||Pe.forEach(Fe=>{Fe.key!==""&&(Fe={key:(Fe==null?void 0:Fe.key)??(Fe==null?void 0:Fe.label),value:Fe==null?void 0:Fe.value},nt.push(Fe))}),h.form=[...nt,...y.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(q==="createInsofDataApi"){let h=(J=y.cloneDeep(A))==null?void 0:J[0];return h={comp:(oe=y.cloneDeep(h))==null?void 0:oe.comp,compData:(we=y.cloneDeep(h))==null?void 0:we.compData,name:(Ue=y.cloneDeep(h))==null?void 0:Ue.name,isShow:(ut=y.cloneDeep(h))==null?void 0:ut.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:x.value},value:{pageData:h}}}return q}},We=async(q,A,ge)=>{var Te,Ze,ee;let me=await Ie.getItemData(A,sessionStorage.getItem("systemKey"),""),Me=me==null?void 0:me.find(xe=>(xe==null?void 0:xe.name)===(ge==null?void 0:ge[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let xe={};for(let oe in y.cloneDeep(q))y.cloneDeep(q)[oe]!=="loginUser"?xe[oe]=y.cloneDeep(q)[oe]:xe[oe]=((Te=V.value)==null?void 0:Te.account)||((Ze=V.value)==null?void 0:Ze.账号);let T=[],He=xe;Array.isArray(q)||(He=[xe]),He==null||He.forEach(oe=>{T.push({[oe[ge[1]]]:oe})});let qe=[],Ee=T==null?void 0:T.map(oe=>{var we;return(we=Object.keys(oe))==null?void 0:we[0]});me==null||me.forEach(oe=>{var we;(oe==null?void 0:oe.name)===(ge==null?void 0:ge[0])&&((we=oe==null?void 0:oe.compData)==null||we.forEach(Ue=>{var ut;(Ue==null?void 0:Ue.key)==="tableContents"&&((ut=Ue==null?void 0:Ue.contents)==null||ut.forEach(h=>{h!=null&&h.some(D=>Ee.includes(D))&&qe.push({[h.find(D=>D.id).id]:h.find(D=>Ee.includes(D))})}))}))});let ne=qe==null?void 0:qe.map(oe=>{var we;return(we=Object.keys(oe))==null?void 0:we[0]}),J=[];if(ne==null||ne.forEach(oe=>{var ut;let we=(ut=qe==null?void 0:qe.find(h=>{var D;return((D=Object.keys(h))==null?void 0:D[0].toString())===oe.toString()}))==null?void 0:ut[oe],Ue=T==null?void 0:T.find(h=>{var D;return((D=Object.keys(h))==null?void 0:D[0])===we});J.push({id:parseInt(oe),value:{tableData:Ue[we]}})}),(J==null?void 0:J.length)>0)return J}else if((Me==null?void 0:Me.comp)==="Form"){let xe=y.cloneDeep(Me);xe.compData=(ee=xe.compData)==null?void 0:ee.map(qe=>{var Ee;return(qe==null?void 0:qe.key)==="formContent"&&(qe.contents=(Ee=qe.contents)==null?void 0:Ee.map(ne=>((ne==null?void 0:ne.key)===(ge==null?void 0:ge[1])&&(ne.value=(q==null?void 0:q[ne==null?void 0:ne.prop])||q),ne))),qe});let T={};for(let qe in xe)qe!=="id"&&(T[qe]=xe[qe]);let He=[];if(He.push({id:Me==null?void 0:Me.id,keyType:ge==null?void 0:ge[1],value:{pageData:T}}),(He==null?void 0:He.length)>0)return He}}},je=async(q,A,ge)=>{var Te,Ze,ee,xe,T,He,qe,Ee,ne,J;let me=await Ie.getItemData(A,sessionStorage.getItem("systemKey"),""),Me=me==null?void 0:me.find(oe=>(oe==null?void 0:oe.name)===(ge==null?void 0:ge[0]));if(Me){if((Me==null?void 0:Me.comp)==="Table"){let oe={};for(let we in y.cloneDeep(q))y.cloneDeep(q)[we]!=="loginUser"?oe[we]=y.cloneDeep(q)[we]:oe[we]=((Te=V.value)==null?void 0:Te.account)||((Ze=V.value)==null?void 0:Ze.账号);await ot.createInsofDataApi({key:{type:"data",pageKey:A,tableId:Me==null?void 0:Me.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:oe}})}else if((Me==null?void 0:Me.comp)==="Form"){let oe=y.cloneDeep(Me),we=Object.keys(q),Ue="";(xe=(ee=y.cloneDeep(oe))==null?void 0:ee.compData)==null||xe.forEach(k=>{var te,Se;(k==null?void 0:k.key)==="formContent"&&((Se=(te=y.cloneDeep(k))==null?void 0:te.contents)==null||Se.forEach(_=>{var Z;we.includes(_==null?void 0:_.key)&&(_==null?void 0:_.value)===((Z=V.value)==null?void 0:Z.姓名)&&(Ue=_==null?void 0:_.key)}))});let ut=[];(T=Object.values(q[Ue]))==null||T.forEach(k=>{k!=null&&k.includes("(")&&ut.push(k)}),ut=[...new Set(ut)];const h=ut==null?void 0:ut.map(async k=>{var L,K,Ce,ae,W,Y,le,de,ye,he,$,Ne;let te="";(Y=(W=(ae=(Ce=(K=(L=y.cloneDeep(k))==null?void 0:L.split("("))==null?void 0:K[1])==null?void 0:Ce.split(")"))==null?void 0:ae[0])==null?void 0:W.split(":"))==null||Y.forEach(pe=>{te=te===""?te+pe.replaceAll("'",""):te+"/"+pe.replaceAll("'","")});let Se=[];(Ne=($=(he=(ye=(de=(le=y.cloneDeep(k))==null?void 0:le.split("<"))==null?void 0:de[1])==null?void 0:ye.split(">"))==null?void 0:he[0])==null?void 0:$.split(":"))==null||Ne.forEach(pe=>{Se.push(pe.replaceAll("'",""))});const _=await Ie.getItemData(te,sessionStorage.getItem("systemKey"),"");let Z="";return _==null||_.forEach(pe=>{var Pe;pe.name===(Se==null?void 0:Se[0])&&((Pe=pe==null?void 0:pe.compData)==null||Pe.forEach(nt=>{var Fe;(nt==null?void 0:nt.key)==="formContent"&&((Fe=nt.contents)==null||Fe.forEach(tt=>{(tt==null?void 0:tt.key)===(Se==null?void 0:Se[1])&&(Z=tt==null?void 0:tt.value)}))}))}),{[k]:Z}}),D=await Promise.all(h);oe.compData=(qe=(He=y.cloneDeep(oe))==null?void 0:He.compData)==null?void 0:qe.map(k=>{var te,Se;return(k==null?void 0:k.key)==="formContent"&&(k.contents=(Se=(te=y.cloneDeep(k))==null?void 0:te.contents)==null?void 0:Se.map(_=>{var Z,L,K,Ce;return(Z=q[Ue])!=null&&Z[_==null?void 0:_.key]&&(q[Ue][_==null?void 0:_.key].includes("(")?_.value=(L=D==null?void 0:D.find(ae=>{var W;return((W=Object.keys(ae))==null?void 0:W[0])===q[Ue][_==null?void 0:_.key]}))==null?void 0:L[q[Ue][_==null?void 0:_.key]]:_.value=(Ce=(K=y.cloneDeep(q))==null?void 0:K[Ue])==null?void 0:Ce[_==null?void 0:_.key]),_})),k});const j=await ot.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let X="";((Ee=j==null?void 0:j.data)==null?void 0:Ee.type)==="success"&&((J=(ne=j==null?void 0:j.data)==null?void 0:ne.result)==null||J.forEach(k=>{var te,Se;((Se=(te=k==null?void 0:k.value)==null?void 0:te.pageData)==null?void 0:Se.name)===(ge==null?void 0:ge[0])&&(X=k.id)}),await ot.updateInsofDataApi({id:X,value:{pageData:oe}}))}}},z=(q,A="",ge={})=>{for(const[me,Me]of Object.entries(q)){const Te=A?`${A}.${me}`:me;Me!==null&&typeof Me=="object"&&!Array.isArray(Me)&&Object.prototype.toString.call(Me)!=="[object Date]"?z(Me,Te,ge):ge[Te]=Me}return ge},ie=async(q,A,ge,me)=>{var Ze,ee,xe,T,He,qe,Ee,ne,J,oe,we,Ue,ut,h,D,j,X,k,te,Se,_,Z,L,K,Ce;let Me=await Ie.getItemData(A,sessionStorage.getItem("systemKey"),""),Te=Me==null?void 0:Me.find(ae=>(ae==null?void 0:ae.name)===(ge==null?void 0:ge[0]));if(Te){if(!(ge!=null&&ge[1])&&(Te==null?void 0:Te.comp)==="Table"){let ae={},W=[],Y=(ee=(Ze=Te==null?void 0:Te.compData)==null?void 0:Ze.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:ee.contents;Y!=null&&Y.every(ye=>Array.isArray(ye))?W=(T=Ie.getColumnChild((xe=Y==null?void 0:Y[0])==null?void 0:xe.filter(ye=>(ye==null?void 0:ye.label)!=="操作")))==null?void 0:T.map(ye=>ye==null?void 0:ye.prop):W=Y==null?void 0:Y.map(ye=>ye==null?void 0:ye.label);for(let ye in y.cloneDeep(q))if(y.cloneDeep(q)[ye]!=="loginUser"){let he=z(y.cloneDeep(q)[ye]),$={};for(let Ne in he)if(W!=null&&W.find(pe=>pe===Ne))$[Ne]=he[Ne];else if(W!=null&&W.find(pe=>(pe==null?void 0:pe.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()))){let pe=W==null?void 0:W.find(Pe=>(Pe==null?void 0:Pe.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()));$[pe]=he[Ne]}ae[ye]=$}else ae[ye]=((He=V.value)==null?void 0:He.account)||((qe=V.value)==null?void 0:qe.账号);let le=await ot.getInsofDataApi({keyLikes:{tableId:Te==null?void 0:Te.id}});if(((ne=(Ee=le==null?void 0:le.data)==null?void 0:Ee.result)==null?void 0:ne.length)>0){let ye=(oe=(J=le==null?void 0:le.data)==null?void 0:J.result)==null?void 0:oe.map(he=>he==null?void 0:he.id);(ye==null?void 0:ye.length)>0&&await ot.batchDeleteInsofDataApi({ids:ye})}let de=[];if((we=Te==null?void 0:Te.compData)!=null&&we.find(ye=>(ye==null?void 0:ye.key)==="pageColumn")&&((h=(ut=(Ue=Te==null?void 0:Te.compData)==null?void 0:Ue.find(ye=>(ye==null?void 0:ye.key)==="pageColumn"))==null?void 0:ut.contents)!=null&&h.includes("["))){const ye=await ot.getInsofDataApi({id:Te==null?void 0:Te.tableId});let he=((k=(X=(j=(D=ye==null?void 0:ye.data)==null?void 0:D.result)==null?void 0:j[0])==null?void 0:X.key)==null?void 0:k.pageKey)??"";(te=Object.values(ae))==null||te.forEach($=>{de.push({key:{type:"data",pageKey:he,tableId:Te==null?void 0:Te.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:$}})})}else(Se=Object.values(ae))==null||Se.forEach(ye=>{de.push({key:{type:"data",pageKey:A,tableId:Te==null?void 0:Te.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:ye}})});(de==null?void 0:de.length)>0&&await ot.batchAddInsofDataApi({dataList:de})}else if(!(ge!=null&&ge[1])&&(Te==null?void 0:Te.comp)==="Form"){let ae=y.cloneDeep(Te);ae.compData=(Z=(_=y.cloneDeep(ae))==null?void 0:_.compData)==null?void 0:Z.map(le=>{var de,ye;return(le==null?void 0:le.key)==="formContent"&&(le.contents=(ye=(de=y.cloneDeep(le))==null?void 0:de.contents)==null?void 0:ye.map(he=>{var $,Ne;return($=y.cloneDeep(q))!=null&&$[he==null?void 0:he.key]&&(he.value=(Ne=y.cloneDeep(q))==null?void 0:Ne[he==null?void 0:he.key]),he})),le});const W=await ot.getInsofDataApi({key:{type:"structure",pageKey:A,systemKey:sessionStorage.getItem("systemKey")}});let Y="";((L=W==null?void 0:W.data)==null?void 0:L.type)==="success"&&((Ce=(K=W==null?void 0:W.data)==null?void 0:K.result)==null||Ce.forEach(le=>{var de,ye;((ye=(de=le==null?void 0:le.value)==null?void 0:de.pageData)==null?void 0:ye.name)===(ge==null?void 0:ge[0])&&(Y=le.id)}),await ot.updateInsofDataApi({id:Y,value:{pageData:ae}}))}}},re=async q=>{var A,ge,me,Me,Te,Ze,ee,xe,T,He,qe,Ee,ne,J,oe,we;M.setImportLoading(!0);try{if(q.api){let Ue=new WeakMap;(ge=(A=(await ot.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:se.value})).data.result)==null?void 0:A.filter(L=>{var K,Ce;return((K=L==null?void 0:L.key)==null?void 0:K.pageKey)!=="menu"&&((Ce=L==null?void 0:L.key)==null?void 0:Ce.pageKey)!=="secret"}))==null||ge.forEach(L=>{Ue[L.key.pageKey]?Ue[L.key.pageKey]=[...Ue[L.key.pageKey],L]:Ue[L.key.pageKey]=[L]});let h=await Ie.getItemData((b==null?void 0:b.value)===""?x.value:b==null?void 0:b.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ue),D="";if(h=h==null?void 0:h.map(L=>{var K,Ce,ae,W,Y,le,de,ye,he,$,Ne,pe;if((L==null?void 0:L.comp)==="Form")L.compData=(K=L.compData)==null?void 0:K.map(Pe=>{var nt;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(nt=Pe.contents)==null?void 0:nt.map(Fe=>{var tt;if((Fe==null?void 0:Fe.value)===""&&(Fe==null?void 0:Fe.type)==="Select"){let _e=Ie.judgeContents((tt=y.cloneDeep(Fe))==null?void 0:tt.optionUrl,Ue);Fe.value=Fe.value||_e}return Fe})),Pe});else if((L==null?void 0:L.comp)==="Table"&&(Ce=L.compData)!=null&&Ce.find(Pe=>(Pe==null?void 0:Pe.key)==="pageColumn")){let Pe=(W=(ae=L.compData)==null?void 0:ae.find(_e=>(_e==null?void 0:_e.key)==="pageColumn"))==null?void 0:W.contents,nt=((le=(Y=L.compData)==null?void 0:Y.find(_e=>(_e==null?void 0:_e.key)==="pageGroup"))==null?void 0:le.contents)??"",Fe=(he=(ye=(de=Pe==null?void 0:Pe.split("["))==null?void 0:de[1])==null?void 0:ye.split("]"))==null?void 0:he[0];D=(($=Pe==null?void 0:Pe.split("["))==null?void 0:$[0])+((pe=(Ne=H.value)==null?void 0:Ne.find(_e=>(_e==null?void 0:_e.key)===Fe))==null?void 0:pe.value)}return L}),!(D===""||D==="")){const L=await Ie.getItemData(D,sessionStorage.getItem("systemKey"),"",!1,"","",Ue);h=h==null?void 0:h.map(K=>{var Ce,ae,W,Y,le,de,ye,he,$,Ne,pe,Pe,nt;if((K==null?void 0:K.comp)==="Table"&&(Ce=K.compData)!=null&&Ce.find(Fe=>(Fe==null?void 0:Fe.key)==="pageColumn")){let Fe=(W=(ae=K.compData)==null?void 0:ae.find(Be=>(Be==null?void 0:Be.key)==="pageColumn"))==null?void 0:W.contents,tt=((le=(Y=K.compData)==null?void 0:Y.find(Be=>(Be==null?void 0:Be.key)==="pageGroup"))==null?void 0:le.contents)??"",_e=(he=(ye=(de=Fe==null?void 0:Fe.split("["))==null?void 0:de[1])==null?void 0:ye.split("]"))==null?void 0:he[0],vt=(($=Fe==null?void 0:Fe.split("["))==null?void 0:$[0])+((pe=(Ne=H.value)==null?void 0:Ne.find(Be=>(Be==null?void 0:Be.key)===_e))==null?void 0:pe.value),Qe=(Pe=L==null?void 0:L.find(Be=>(Be==null?void 0:Be.name)===(tt===""?p==null?void 0:p.compName:tt)))==null?void 0:Pe.compData;K.compData=(nt=K.compData)==null?void 0:nt.map(Be=>{var rt;return(Be==null?void 0:Be.key)==="tableContents"&&(Be.contents=(rt=Qe==null?void 0:Qe.find(gt=>(gt==null?void 0:gt.key)==="tableContents"))==null?void 0:rt.contents),Be})}return K})}let j={};if(((Me=(me=q==null?void 0:q.extraValues)==null?void 0:me.input)==null?void 0:Me.length)>0){const L=(Ze=(Te=q==null?void 0:q.extraValues)==null?void 0:Te.input)==null?void 0:Ze.map(async K=>{var Ce;fe!=null&&fe.find(ae=>ae===K)?j=await Ve(K,h):j[Object.keys(K)[0]]=await Ve((Ce=Object.values(K))==null?void 0:Ce[0],h,Ue)});await Promise.all(L)}else j=await Ve("/",h);let X=!1;(xe=(ee=q==null?void 0:q.extraValues)==null?void 0:ee.output)==null||xe.forEach(L=>{var K,Ce;(Ce=(K=Object.values(L))==null?void 0:K[0])!=null&&Ce.includes(".doc")&&(X=!0)});let k;if(X){const L=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});k=await ot.axios.post(q.api,j,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{L.close()})}else k=await ot.axios.post(q.api,j,{headers:{"Content-Type":"application/json"}});let te=(Ee=(qe=(He=(T=y.cloneDeep(q))==null?void 0:T.extraValues)==null?void 0:He.output)==null?void 0:qe.map(L=>{var K,Ce,ae,W,Y,le,de,ye,he,$,Ne,pe,Pe,nt,Fe,tt;if(!((Ce=(K=Object.values(L))==null?void 0:K[0])!=null&&Ce.includes(".doc"))){let _e=($=(he=(ye=(W=y.cloneDeep((ae=Object.values(L))==null?void 0:ae[0]))==null?void 0:W.split("["))==null?void 0:ye[((de=(le=y.cloneDeep((Y=Object.values(L))==null?void 0:Y[0]))==null?void 0:le.split("["))==null?void 0:de.length)-1])==null?void 0:he.split("]"))==null?void 0:$[0],vt=_e==null?void 0:_e.split(":"),Qe=(Pe=y.cloneDeep((Ne=Object.values(L))==null?void 0:Ne[0]))==null?void 0:Pe.substring(0,y.cloneDeep((pe=Object.values(L))==null?void 0:pe[0]).lastIndexOf("["));if(Qe=(Fe=y.cloneDeep(Qe))==null?void 0:Fe.slice(0,((nt=y.cloneDeep(Qe))==null?void 0:nt.length)-1),Qe!=null&&Qe.includes("[")){let Be="";if((tt=Ie.contentTransArrayToAll(Qe,"/"))==null||tt.forEach(rt=>{var gt,Ge,Re,It,De,Ke,Oe;if(!(rt!=null&&rt.includes("[")))Be=Be===""?Be+rt.replaceAll("/",""):Be+"/"+rt.replaceAll("/","");else{let Xe=y.cloneDeep(rt).slice(1,((gt=y.cloneDeep(rt))==null?void 0:gt.length)-1),w=(Ke=(De=(It=(Re=(Ge=y.cloneDeep(Xe))==null?void 0:Ge.split("["))==null?void 0:Re[1])==null?void 0:It.split("]"))==null?void 0:De[0])==null?void 0:Ke.split(":"),ce="",Le=(Oe=h==null?void 0:h.find(ue=>(ue==null?void 0:ue.name)===(w==null?void 0:w[0])))==null?void 0:Oe.compData;Le==null||Le.forEach(ue=>{var ct;(ue==null?void 0:ue.key)==="formContent"&&((ct=ue==null?void 0:ue.contents)==null||ct.forEach(lt=>{(lt==null?void 0:lt.key)===(w==null?void 0:w[1])&&(ce=lt==null?void 0:lt.value)}))}),Be=Be===""?Be+ce.replaceAll("/",""):Be+"/"+ce.replaceAll("/","")}}),Qe=Be,Qe[(Qe==null?void 0:Qe.length)-1]!=="/")return Qe}}}))==null?void 0:Ee.filter(L=>L);te=[...new Set(y.cloneDeep(te))];let Se=te==null?void 0:te.map(async L=>{let K=await Ie.getItemData(L,sessionStorage.getItem("systemKey"),"",!1,"","",Ue);if((K==null?void 0:K.length)===0)return await Ie.getParentContents(L)});await Promise.all(Se);let _=[],Z=(oe=(J=(ne=y.cloneDeep(q))==null?void 0:ne.extraValues)==null?void 0:J.output)==null?void 0:oe.map(async L=>{var ye,he,$,Ne,pe,Pe,nt,Fe,tt,_e,vt,Qe,Be,rt,gt,Ge,Re,It,De,Ke,Oe,Xe,w,ce,Le,ue,ct,lt,xt,dt,st,pt,wt,Tt,jt,ht,zt,Lt,Ut,Wt,Yt,Pt,Dn,On,gn,zn,mn,Mn,Fn,Rn,Pn,Ln,_n,fn,sn,yn,hn,tn,un,$n,En,Sn,bn,jn,Un,Tn,Kn,Wn,_t,Xt;if((he=(ye=Object.values(L))==null?void 0:ye[0])!=null&&he.includes(".doc")){var K=new Blob([k.data],{type:"application/octet-stream;charset=UTF-8"}),Ce=k.headers["content-disposition"],ae=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),W=ae.exec(Ce),Y=W==null?void 0:W[1],le=document.createElement("a"),de=window.URL.createObjectURL(K);E.value=[{name:Y,blobUrl:de}],u.value=!0}else{let mt=(_e=(tt=(Fe=(Ne=y.cloneDeep(($=Object.values(L))==null?void 0:$[0]))==null?void 0:Ne.split("["))==null?void 0:Fe[((nt=(Pe=y.cloneDeep((pe=Object.values(L))==null?void 0:pe[0]))==null?void 0:Pe.split("["))==null?void 0:nt.length)-1])==null?void 0:tt.split("]"))==null?void 0:_e[0],Ot=mt==null?void 0:mt.split(":"),bt=(Be=y.cloneDeep((vt=Object.values(L))==null?void 0:vt[0]))==null?void 0:Be.substring(0,y.cloneDeep((Qe=Object.values(L))==null?void 0:Qe[0]).lastIndexOf("["));if(bt!=null&&bt.includes("[")?bt=(gt=y.cloneDeep(bt))==null?void 0:gt.slice(0,((rt=y.cloneDeep(bt))==null?void 0:rt.length)-1):bt===""&&(bt=x.value),bt=bt.replaceAll("<","[").replaceAll(">","]"),bt!=null&&bt.includes("[")){let Dt="";(Ge=Ie.contentTransArrayToAll(bt,"/"))==null||Ge.forEach((Ct,Mt)=>{var At,Ft,Ht,nn,Bn,Hn,In,qn,xa,na,ca;if(!(Ct!=null&&Ct.includes("[")))Dt=Dt===""?Dt+Ct.replaceAll("/",""):Dt+"/"+Ct.replaceAll("/","");else{let aa="",cn="";(At=y.cloneDeep(Ct))!=null&&At.includes("]")?(aa=y.cloneDeep(Ct).slice(1,((Ft=y.cloneDeep(Ct))==null?void 0:Ft.length)-1),cn=(In=(Hn=(Bn=(nn=(Ht=y.cloneDeep(aa))==null?void 0:Ht.split("["))==null?void 0:nn[1])==null?void 0:Bn.split("]"))==null?void 0:Hn[0])==null?void 0:In.split(":")):(aa=y.cloneDeep(Ct).slice(1,(qn=y.cloneDeep(Ct))==null?void 0:qn.length),cn=(xa=y.cloneDeep(aa))==null?void 0:xa.split("/"));let Gn="",oa=(na=h==null?void 0:h.find(an=>(an==null?void 0:an.name)===(cn==null?void 0:cn[0])))==null?void 0:na.compData;oa==null||oa.forEach(an=>{var wa;(an==null?void 0:an.key)==="formContent"&&((wa=an==null?void 0:an.contents)==null||wa.forEach(Nn=>{(Nn==null?void 0:Nn.key)===(cn==null?void 0:cn[1])&&(Gn=Nn==null?void 0:Nn.value)}))}),((ca=Ie.contentTransArrayToAll(bt,"/"))==null?void 0:ca.length)-1!==Mt?Dt=Dt===""?Dt+Gn.replaceAll("/",""):Dt+"/"+Gn.replaceAll("/",""):Dt=Dt+r.value+Gn.replaceAll("/","")}}),(Re=x.value)!=null&&Re.includes(Dt)?bt=x.value:bt=Dt}let Kt=y.cloneDeep((It=Object.keys(L))==null?void 0:It[0]);if(((De=k==null?void 0:k.data)==null?void 0:De.statusCode)===200||((Ke=k==null?void 0:k.data)==null?void 0:Ke.code)===200){if(((Xe=(Oe=k==null?void 0:k.data)==null?void 0:Oe.data)!=null&&Xe[Kt]||(ce=(w=k==null?void 0:k.data)==null?void 0:w.result)!=null&&ce[Kt])&&(Ot==null?void 0:Ot.length)===1)return await ie(((ue=(Le=k==null?void 0:k.data)==null?void 0:Le.data)==null?void 0:ue[Kt])||((lt=(ct=k==null?void 0:k.data)==null?void 0:ct.result)==null?void 0:lt[Kt]),y.cloneDeep(bt),Ot,D);if((dt=(xt=k==null?void 0:k.data)==null?void 0:xt.data)!=null&&dt[Kt]||(pt=(st=k==null?void 0:k.data)==null?void 0:st.result)!=null&&pt[Kt]){let Dt=await We(((Tt=(wt=k==null?void 0:k.data)==null?void 0:wt.data)==null?void 0:Tt[Kt])||((ht=(jt=k==null?void 0:k.data)==null?void 0:jt.result)==null?void 0:ht[Kt]),y.cloneDeep(bt),Ot);return Dt&&(_=[..._,...Dt]),Dt}else{if(!((zt=k==null?void 0:k.data)!=null&&zt.data)){let Dt=await Ie.getItemData(x.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ue);Dt=Dt==null?void 0:Dt.map(Mt=>{var At;return(Mt==null?void 0:Mt.name)===(Ot==null?void 0:Ot[0])&&(Mt.compData=(At=Mt.compData)==null?void 0:At.map(Ft=>{var Ht;return(Ft==null?void 0:Ft.key)==="formContent"&&(Ft.contents=(Ht=Ft.contents)==null?void 0:Ht.map(nn=>{var Bn,Hn;return(nn==null?void 0:nn.key)===(Ot==null?void 0:Ot[1])&&(nn.value=(Hn=(Bn=k==null?void 0:k.data)==null?void 0:Bn.result)==null?void 0:Hn[Kt==null?void 0:Kt.replaceAll(":","")]),nn})),Ft})),Mt});let Ct=[];(Lt=Dt==null?void 0:Dt.filter(Mt=>(Mt==null?void 0:Mt.comp)==="Form"))==null||Lt.forEach(async Mt=>{let At={};for(let Ft in Mt)Ft!=="id"&&(At[Ft]=Mt[Ft]);Ct.push({id:Mt==null?void 0:Mt.id,value:{pageData:At}})}),(Ct==null?void 0:Ct.length)>0&&await ot.batchUpdateInsofDataApi({dataList:Ct});return}if((Ot==null?void 0:Ot.length)===1){const Dt=(Yt=(Wt=(Ut=k==null?void 0:k.data)==null?void 0:Ut.data)==null?void 0:Wt.path)==null?void 0:Yt.path;let Ct="";(zn=(gn=(On=(Dn=(Pt=Dt==null?void 0:Dt.split("("))==null?void 0:Pt[1])==null?void 0:Dn.split(")"))==null?void 0:On[0])==null?void 0:gn.split(":"))==null||zn.forEach(Ft=>{var Ht,nn;Ct=Ct===""?Ct+((Ht=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:Ht.trim()):Ct+"/"+((nn=Ft==null?void 0:Ft.replaceAll("'",""))==null?void 0:nn.trim())});let Mt=[(Pn=(Rn=(Fn=(Mn=(mn=Dt==null?void 0:Dt.split("<"))==null?void 0:mn[1])==null?void 0:Mn.split(">"))==null?void 0:Fn[0])==null?void 0:Rn.replaceAll("'",""))==null?void 0:Pn.trim()],At;return(fn=(_n=(Ln=k==null?void 0:k.data)==null?void 0:Ln.data)==null?void 0:_n.data)!=null&&fn[Ot==null?void 0:Ot[0]]?At=await ie((hn=(yn=(sn=k==null?void 0:k.data)==null?void 0:sn.data)==null?void 0:yn.data)==null?void 0:hn[Ot==null?void 0:Ot[0]],Ct,Ot,D):At=await je((un=(tn=k==null?void 0:k.data)==null?void 0:tn.data)==null?void 0:un.data,Ct,Mt,Ue),At}else{const Dt=(Sn=(En=($n=k==null?void 0:k.data)==null?void 0:$n.data)==null?void 0:En.path)==null?void 0:Sn.path;let Ct="";return(Kn=(Tn=(Un=(jn=(bn=Dt==null?void 0:Dt.split("("))==null?void 0:bn[1])==null?void 0:jn.split(")"))==null?void 0:Un[0])==null?void 0:Tn.split(":"))==null||Kn.forEach(At=>{var Ft,Ht;Ct=Ct===""?Ct+((Ft=At==null?void 0:At.replaceAll("'",""))==null?void 0:Ft.trim()):Ct+"/"+((Ht=At==null?void 0:At.replaceAll("'",""))==null?void 0:Ht.trim())}),await We((Xt=(_t=(Wn=k==null?void 0:k.data)==null?void 0:Wn.data)==null?void 0:_t.data)==null?void 0:Xt[Ot==null?void 0:Ot[0]],Ct,Ot)}}}}});if(await Promise.all(Z),(_==null?void 0:_.length)>0){let L=[];_==null||_.forEach(ae=>{L!=null&&L.find(W=>{var Y,le,de,ye;return((le=(Y=W==null?void 0:W.value)==null?void 0:Y.pageData)==null?void 0:le.name)===((ye=(de=ae==null?void 0:ae.value)==null?void 0:de.pageData)==null?void 0:ye.name)})||L.push(ae)});let K=[];L==null||L.forEach(ae=>{var le,de,ye,he;let W=y.cloneDeep(ae);W.value.pageData.compData=(le=W.value.pageData.compData)==null?void 0:le.map($=>{var Ne;return($==null?void 0:$.key)==="formContent"&&($.contents=(Ne=$.contents)==null?void 0:Ne.map(pe=>{var nt,Fe,tt,_e;let Pe=(nt=y.cloneDeep(_))==null?void 0:nt.find(vt=>(vt==null?void 0:vt.keyType)===(pe==null?void 0:pe.key));if(Pe){let vt=(_e=(tt=(Fe=Pe.value.pageData.compData)==null?void 0:Fe.find(Qe=>(Qe==null?void 0:Qe.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:_e.find(Qe=>(Qe==null?void 0:Qe.key)===(pe==null?void 0:pe.key));pe.value=vt==null?void 0:vt.value}return pe})),$}),K.push({id:W==null?void 0:W.id,value:W==null?void 0:W.value});let Y=[];(he=(ye=(de=W==null?void 0:W.value)==null?void 0:de.pageData)==null?void 0:ye.compData)==null||he.forEach($=>{var Ne;($==null?void 0:$.key)==="formContent"&&((Ne=$==null?void 0:$.contents)==null||Ne.forEach(pe=>{var Pe,nt,Fe,tt,_e,vt;if((nt=(Pe=pe==null?void 0:pe.optionUrl)==null?void 0:Pe.menuSelect)!=null&&nt.find(Qe=>Qe==null?void 0:Qe.includes("[")))if(Y!=null&&Y.find(Qe=>{var Be,rt,gt;return((Be=Qe==null?void 0:Qe.key)==null?void 0:Be.join(","))===((gt=(rt=pe==null?void 0:pe.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:gt.join(","))})){let Qe=(Fe=Y==null?void 0:Y.find(Be=>{var rt,gt,Ge;return((rt=Be==null?void 0:Be.key)==null?void 0:rt.join(","))===((Ge=(gt=pe==null?void 0:pe.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Ge.join(","))}))==null?void 0:Fe.value;Qe.push({key:pe==null?void 0:pe.prop,groups:(tt=pe==null?void 0:pe.optionUrl)==null?void 0:tt.groupSelect,value:pe==null?void 0:pe.value}),Y=Y==null?void 0:Y.map(Be=>{var rt,gt,Ge;return((rt=Be==null?void 0:Be.key)==null?void 0:rt.join(","))===((Ge=(gt=pe==null?void 0:pe.optionUrl)==null?void 0:gt.menuSelect)==null?void 0:Ge.join(","))&&(Be.value=Qe),Be})}else Y.push({key:(_e=pe==null?void 0:pe.optionUrl)==null?void 0:_e.menuSelect,value:[{key:pe==null?void 0:pe.prop,groups:(vt=pe==null?void 0:pe.optionUrl)==null?void 0:vt.groupSelect,value:pe==null?void 0:pe.value}]})}))}),(Y==null?void 0:Y.length)>0&&(Y=Y==null?void 0:Y.map($=>{var pe;let Ne="";return(pe=$==null?void 0:$.key)==null||pe.forEach(Pe=>{var nt;if(!(Pe!=null&&Pe.includes("[")))Ne=Ne===""?Ne+Pe:Ne+"/"+Pe;else{let Fe="",tt=(nt=Pe==null?void 0:Pe.replaceAll("[","").replaceAll("]",""))==null?void 0:nt.split(":");h==null||h.forEach(_e=>{var vt;(_e==null?void 0:_e.name)===(tt==null?void 0:tt[0])&&((vt=_e==null?void 0:_e.compData)==null||vt.forEach(Qe=>{var Be;(Qe==null?void 0:Qe.key)==="formContent"&&((Be=Qe==null?void 0:Qe.contents)==null||Be.forEach(rt=>{(rt==null?void 0:rt.prop)===(tt==null?void 0:tt[1])&&(Fe=rt==null?void 0:rt.value)}))}))}),Ne=Ne+r.value+Fe}}),$.key=Ne,$})),Y==null||Y.forEach($=>{var nt,Fe,tt;let Ne=(nt=Ue[$.key])==null?void 0:nt.find(_e=>{var vt,Qe,Be,rt,gt,Ge,Re;return((Qe=(vt=_e==null?void 0:_e.value)==null?void 0:vt.pageData)==null?void 0:Qe.name)===((gt=(rt=(Be=$==null?void 0:$.value)==null?void 0:Be[0])==null?void 0:rt.groups)==null?void 0:gt[0])&&((Re=(Ge=_e==null?void 0:_e.value)==null?void 0:Ge.pageData)==null?void 0:Re.name)!==void 0}),pe=Ne==null?void 0:Ne.id,Pe=(Fe=Ne==null?void 0:Ne.value)==null?void 0:Fe.pageData;Pe.compData=(tt=Pe.compData)==null?void 0:tt.map(_e=>{var vt;return(_e==null?void 0:_e.key)==="formContent"&&(_e.contents=(vt=_e.contents)==null?void 0:vt.map(Qe=>{var rt;let Be=(rt=$.value)==null?void 0:rt.find(gt=>(gt==null?void 0:gt.key)===(Qe==null?void 0:Qe.prop));return Be&&(Qe.value=Be.value),Qe})),_e}),K.push({id:pe,value:{pageData:Pe}})})});let Ce=(we=y.cloneDeep(_))==null?void 0:we[0];(K==null?void 0:K.length)>0&&await ot.batchUpdateInsofDataApi({dataList:K})}C.setFreshContent(!0)}M.setImportLoading(!1)}catch{ot.ElMessage.error("方法执行错误,请查看方法!"),M.setImportLoading(!1)}N.value=!0},fe=["createInsofDataApi"],Ye=nr(async q=>{re(q)},100),it=async q=>{var ee,xe,T,He,qe;const A=y.cloneDeep(q);let ge,me=new WeakMap,Me=await ot.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:se.value});(xe=(ee=Me.data.result)==null?void 0:ee.filter(Ee=>{var ne,J;return((ne=Ee==null?void 0:Ee.key)==null?void 0:ne.pageKey)!=="menu"&&((J=Ee==null?void 0:Ee.key)==null?void 0:J.pageKey)!=="secret"}))==null||xe.forEach(Ee=>{me[Ee.key.pageKey]?me[Ee.key.pageKey]=[...me[Ee.key.pageKey],Ee]:me[Ee.key.pageKey]=[Ee]}),q!=null&&q[0].path&&(ge=await(A==null?void 0:A.map(async(Ee,ne)=>{var j,X,k,te,Se,_,Z,L,K,Ce,ae,W,Y,le,de,ye;const oe=(j=me[Ee==null?void 0:Ee.path])==null?void 0:j.filter(he=>{var $;return(($=he==null?void 0:he.key)==null?void 0:$.type)==="data"});let we="";const Ue=await Ie.getItemData(x.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,me);oe==null||oe.forEach(he=>{var $,Ne,pe,Pe,nt;((Ne=($=he==null?void 0:he.value)==null?void 0:$.tableData)==null?void 0:Ne.算法名称)===((pe=A==null?void 0:A[ne])==null?void 0:pe.method)&&(we=(nt=(Pe=he==null?void 0:he.value)==null?void 0:Pe.tableData)==null?void 0:nt.算法体)});const ut=await Ie.getItemData(Ee==null?void 0:Ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,me);let h="",D=(Se=(te=(k=(X=ut==null?void 0:ut[0])==null?void 0:X.compData)==null?void 0:k.find(he=>(he==null?void 0:he.key)==="header"))==null?void 0:te.contents)==null?void 0:Se.findIndex(he=>(he==null?void 0:he.prop)==="算法体");return(Z=(_=ut==null?void 0:ut[0])==null?void 0:_.compData)==null||Z.forEach(he=>{var $;(he==null?void 0:he.key)==="tableContents"&&(($=he==null?void 0:he.contents)==null||$.forEach(Ne=>{Ne!=null&&Ne.find(pe=>pe===(Ee==null?void 0:Ee.method))&&(h=Ne[D])}))}),{buttonName:((L=A==null?void 0:A[ne])==null?void 0:L.method)||((ae=(Ce=(K=oe==null?void 0:oe[0])==null?void 0:K.value)==null?void 0:Ce.tableData)==null?void 0:ae.算法名称),api:(we===""?(le=(Y=(W=oe==null?void 0:oe[0])==null?void 0:W.value)==null?void 0:Y.tableData)==null?void 0:le.算法体:we)||h,content:Ue==null?void 0:Ue.filter(he=>he.comp!=="methodButton"),extraContent:(de=y.cloneDeep(Ee.value))==null?void 0:de.slice(1),methodName:(Ee==null?void 0:Ee.path)??"",extraValues:(ye=A==null?void 0:A[ne])==null?void 0:ye.data}})));const Te=A==null?void 0:A.map(async Ee=>{var ut,h,D,j,X,k;const ne=(ut=Me.data.result)==null?void 0:ut.filter(te=>{var Se,_,Z;return((Se=te==null?void 0:te.key)==null?void 0:Se.parentTable)===""&&((_=te==null?void 0:te.key)==null?void 0:_.type)==="method"&&((Z=te==null?void 0:te.key)==null?void 0:Z.methodName)===te.method}),J=ne==null?void 0:ne[0],oe=(h=Me.data.result)==null?void 0:h.filter(te=>{var Se,_;return((Se=te==null?void 0:te.key)==null?void 0:Se.type)==="methodData"&&((_=te==null?void 0:te.key)==null?void 0:_.tableId)===(J==null?void 0:J.id)}),we=await Ie.getItemData(x.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,me),Ue=oe==null?void 0:oe[0];return{buttonName:(D=J==null?void 0:J.key)==null?void 0:D.methodKey,api:(X=(j=Ue==null?void 0:Ue.value)==null?void 0:j.tableData)==null?void 0:X[0],content:we==null?void 0:we.filter(te=>te.comp!=="methodButton"),extraContent:(k=y.cloneDeep(Ee.value))==null?void 0:k.slice(1),methodName:(Ee==null?void 0:Ee.method)??""}}),Ze=(T=q==null?void 0:q[0])!=null&&T.path&&((He=q==null?void 0:q[0])==null?void 0:He.path)!==""?await Promise.all(ge):await Promise.all(Te);l.value=Ze==null?void 0:Ze.filter(Ee=>Ee==null?void 0:Ee.extraContent),(qe=l.value)==null||qe.forEach(Ee=>{var ne;Ee.api===""&&((ne=Ee.content)==null||ne.forEach(J=>{var oe;J.comp=="Table"&&C.setExtraContents(Ie.methodTableToContent(J.compData,(oe=Ee.extraContent)==null?void 0:oe[0]))}))})};return e.watch(()=>p.itemData,async()=>{O.value=="view"&&!N.value&&await it(y.cloneDeep(p.itemData)),N.value=!1},{immediate:!0,deep:!0}),(q,A)=>{var ge,me,Me;return e.unref(O)!=="edit"?(e.openBlock(),e.createElementBlock("div",rc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ge=l.value)==null?void 0:ge.filter(Te=>(Te==null?void 0:Te.buttonName)!=="保存"),Te=>{var Ze;return e.openBlock(),e.createElementBlock("div",null,[Te.api!==""?(e.openBlock(),e.createBlock(e.unref(yo._sfc_main),{key:0,disabled:e.unref(U)===e.unref(x)&&!((Ze=Te==null?void 0:Te.buttonName)!=null&&Ze.includes("预览")),class:"calculator-content",modelValue:Te.buttonName,onClickTrigger:ee=>e.unref(Ye)(Te),loading:S.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(ke)!==""&&((Me=e.unref(x))==null?void 0:Me[((me=e.unref(x))==null?void 0:me.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(yo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:be,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:E.value,onDestroy:Je},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},lc=Rt._export_sfc(ic,[["__scopeId","data-v-11fca7e0"]]),sc={};function cc(o,l){return" 567 "}const uc=Rt._export_sfc(sc,[["render",cc]]),dc={class:"module content"},pc={class:"module data"},fc={class:"module layout"},hc={class:"form-content"},vc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),E=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),C=e.ref({}),S=e.ref([]),M=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:S.value},{key:"signConfig",contents:C.value}]}),R=H=>{var U;C.value=y.cloneDeep(H),r("change",(U=M())==null?void 0:U.compData)},Q=H=>{var U,se;if((H==null?void 0:H.buttonName)==="确认"){const x=y.cloneDeep(H==null?void 0:H.content);switch(u.value){case"create":S.value.push({...x,index:((U=S.value)==null?void 0:U.length)+1});break}r("change",(se=M())==null?void 0:se.compData),p.visible=!1}else p.visible=!1},O=(H,U)=>{var se,x;switch(H){case"create":(se=f.value)==null||se.forEach(F=>{F.value=""}),u.value="create",p.visible=!0;break;case"update":(x=f.value)==null||x.forEach(F=>{F.value=U[F==null?void 0:F.prop]}),u.value="update",p.visible=!0;break;case"delete":S.value.splice(U,1),u.value="delete";break}},ke=()=>{p.visible=!1};return e.watch(()=>c==null?void 0:c.itemContents,H=>{var U,se;H&&(C.value=((U=H==null?void 0:H.find(x=>x.key==="signConfig"))==null?void 0:U.contents)??{},S.value=((se=H==null?void 0:H.find(x=>x.key==="signTypeList"))==null?void 0:se.contents)??[])},{immediate:!0}),(H,U)=>{const se=e.resolveComponent("svg-icon"),x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",dc,[U[2]||(U[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(x,{class:"module-icon",id:"themeButton",onClick:U[0]||(U[0]=F=>O("create"))},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[U[1]||(U[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",pc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(F,b)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:b},[e.createElementVNode("span",null,e.toDisplayString(F==null?void 0:F.label),1),e.createElementVNode("div",null,[e.createVNode(x,{type:"primary",size:"small",onClick:V=>O("update",{...F,index:b+1})},{default:e.withCtx(()=>U[3]||(U[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(x,{type:"danger",size:"small",onClick:V=>O("delete",b)},{default:e.withCtx(()=>U[4]||(U[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",fc,[e.createVNode(Bt.ssForm,{rowContents:g.value,onChange:R},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:ke,width:p.width},{default:e.withCtx(()=>[e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:E.value,onOnButtonClick:Q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),gc=Rt._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(o,{emit:l}){const c=o,r=l,p=e.ref(1),u=e.computed(()=>{var M,R;return(M=c==null?void 0:c.stepConfig)!=null&&M.allowTrigger?p.value:(R=c==null?void 0:c.stepConfig)==null?void 0:R.active}),E=(M,R)=>{p.value=R,r("clickStep",M,R)},g=M=>Bt.getComponent(M),f=()=>{var R;const M=(R=c==null?void 0:c.stepList)==null?void 0:R.find((Q,O)=>O+1===u.value);return console.log("findStep",M),M?M==null?void 0:M.children:[]},C=M=>{r("clickTrigger",M)},S=M=>{r("changeTrigger",M)};return(M,R)=>{var ke,H,U,se,x;const Q=e.resolveComponent("el-step"),O=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(O,{direction:(ke=o.stepConfig)==null?void 0:ke.direction,active:u.value,"finish-status":"success",simple:(H=o.stepConfig)==null?void 0:H.simple,"align-center":((U=o.stepConfig)==null?void 0:U.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.stepList,(F,b)=>(e.openBlock(),e.createBlock(Q,{key:b,class:"step-item",onClick:V=>E(F,b+1)},{title:e.withCtx(()=>[e.renderSlot(M.$slots,"title",{title:F==null?void 0:F.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(M.$slots,"description",{description:F==null?void 0:F.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(se=o.stepConfig)!=null&&se.allowTrigger&&((x=o.stepConfig)!=null&&x.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(F,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(F==null?void 0:F.type)),{modelValue:F.value,"onUpdate:modelValue":V=>F.value=V,onClickTrigger:C,onChangeTrigger:S,content:F==null?void 0:F.content},e.createSlots({_:2},[e.renderList(M.$slots,(V,N)=>({name:N,fn:e.withCtx(be=>[e.renderSlot(M.$slots,N,e.mergeProps({ref_for:!0},be||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),yc=Rt._export_sfc(mc,[["__scopeId","data-v-d7c99969"]]),bc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(o,{emit:l}){const c=o,r=l,p=e.ref({}),u=e.ref([]),E=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>c==null?void 0:c.itemData,g=>{var f,C;u.value=(f=g==null?void 0:g.find(S=>(S==null?void 0:S.key)==="stepList"))==null?void 0:f.contents,p.value=(C=g==null?void 0:g.find(S=>(S==null?void 0:S.key)==="stepConfig"))==null?void 0:C.contents},{immediate:!0,deep:!0}),(g,f)=>{const C=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(yc,{stepConfig:p.value,stepList:u.value,onClickStep:E},{icon:e.withCtx(()=>[e.createVNode(C,{name:"import"})]),title:e.withCtx(({title:S})=>[e.createTextVNode(e.toDisplayString(S),1)]),description:e.withCtx(({description:S})=>[e.createTextVNode(e.toDisplayString(S),1)]),_:1},8,["stepConfig","stepList"])}}}),kc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(o){return(l,c)=>{const r=e.resolveComponent("el-timeline-item"),p=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(p,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.activities,(u,E)=>(e.openBlock(),e.createBlock(r,{key:E,timestamp:u.timestamp,placement:o.timeLineConfig.placement,center:o.timeLineConfig.isCenter,"hide-timestamp":!0,type:o.timeLineConfig.type,color:o.timeLineConfig.color,size:o.timeLineConfig.size,icon:o.timeLineConfig.icon,hollow:o.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),xc=Rt._export_sfc(kc,[["__scopeId","data-v-4172a886"]]),wc={class:"line-content"},Cc={class:"line-time"},Dc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(o){const l=o,c=e.ref({}),r=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,p=>{var u,E;r.value=(u=p==null?void 0:p.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,c.value=(E=p==null?void 0:p.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:E.contents},{immediate:!0}),(p,u)=>(e.openBlock(),e.createBlock(xc,{activities:r.value,timeLineConfig:c.value},{content:e.withCtx(({content:E,timestamp:g})=>[e.createElementVNode("span",wc,e.toDisplayString(E),1),e.createElementVNode("span",Cc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),_c=Rt._export_sfc(Dc,[["__scopeId","data-v-b4d9deed"]]),Ec={class:"tabs-content"},Sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(o){const l=o,c=e.ref([]);return e.watch(()=>l==null?void 0:l.itemData,r=>{const p=r.find(u=>(u==null?void 0:u.key)=="stepList");p?c.value=p.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):c.value=l==null?void 0:l.tabsData},{immediate:!0,deep:!0}),(r,p)=>(e.openBlock(),e.createElementBlock("div",Ec,[e.createVNode(Bt.ssTab,{tabsContents:c.value},null,8,["tabsContents"])]))}},Tc=Rt._export_sfc(Sc,[["__scopeId","data-v-40865f68"]]),Ua=y.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(o){this.itemData=o},setCurStructureCompIds(o){this.curStructureCompIds=o},setRefreshCurStructure(o){this.isRefreshCurStructure=o},setOriginalData(o){this.originalData=o},setExtraContents(o){this.extraContents=o},setNodeDev(o){this.nodeDev=o},setIsEdit(o){this.isEdit=o}}}),Bc={class:"type-select"},Ic=["onClick"],Nc={class:"list-icon"},Vc={__name:"modelSelect",setup(o){const l=Ua(y.pinia),{itemData:c}=y.storeToRefs(l),r=p=>{const u=y.cloneDeep(c.value);u.push({comp:p.comp,name:p.name,compData:[]}),l.setItemData(u)};return(p,u)=>{const E=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Bc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(qr),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:C=>r(g)},[e.createElementVNode("div",Nc,[e.createVNode(E,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Ic)]))),128))])}}},Ac=Rt._export_sfc(Vc,[["__scopeId","data-v-91799bf8"]]),Oc={class:"fill-content"},zc={class:"operate-content"},Mc={class:"collapse-title-content"},Fc={class:"collapse-title-item"},Rc={key:1},Pc=["onClick"],Lc={class:"icon-content"},$c={key:0,class:"edit-content"},jc=["onClick"],Uc={class:"comp-child"},Kc={__name:"modelFill",setup(o){const l=Ua(y.pinia),{itemData:c,originalData:r}=y.storeToRefs(l),p=e.ref([]);e.ref([]);const u=e.ref([]),E=e.ref([]),g=Q=>{var ke;let O=(ke=y.cloneDeep(E.value))==null?void 0:ke.map((H,U)=>(Q===U&&(H.content=!0),H));E.value=O},f=Q=>{var ke;let O=(ke=y.cloneDeep(E.value))==null?void 0:ke.map((H,U)=>(Q===U&&(H.content=!1),H));E.value=O,p.value=y.cloneDeep(c.value)},C=(Q,O)=>{var se;let ke=(se=y.cloneDeep(E.value))==null?void 0:se.map((x,F)=>(Q===F&&(x.content=!1),x));E.value=ke;const H=y.cloneDeep(c.value),U=H==null?void 0:H.filter((x,F)=>(F===Q&&(x.name=O),x));l.setOriginalData(U),l.setItemData(U)};e.watch(()=>c.value,()=>{var Q,O,ke;!c.value||((Q=c.value)==null?void 0:Q.length)===0?p.value=[]:p.value=(O=y.cloneDeep(c.value))==null?void 0:O.filter(H=>(H==null?void 0:H.comp)!=="methodButton"),u.value=p.value,E.value=(ke=y.cloneDeep(u.value))==null?void 0:ke.map((H,U)=>({id:U,content:!1}))},{deep:!0,immediate:!0});const S=Q=>ta(Q),M=(Q,O,ke)=>{var U,se;if(!Q)return;let H=y.cloneDeep(c.value);H=(U=H==null?void 0:H.map((x,F)=>(F===ke&&(x.compData=Q),x)))==null?void 0:U.filter(x=>(x==null?void 0:x.comp)!=="methodButton"),E.value=(se=y.cloneDeep(H))==null?void 0:se.map((x,F)=>({id:F,content:!1})),l.setOriginalData(H),l.setItemData(H)},R=Q=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const O=y.cloneDeep(c.value),ke=O==null?void 0:O.filter((H,U)=>U!==Q);l.setOriginalData(ke),l.setItemData(ke),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(Q,O)=>{const ke=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[O[1]||(O[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",zc,[e.createVNode(tr.default,{class:"collapse-content",collapseContents:p.value},{title:e.withCtx(({item:H,index:U})=>{var se,x,F,b,V,N,be,Je,yt,Ve;return[e.createElementVNode("div",Mc,[e.createElementVNode("div",Fc,[(x=(se=E.value)==null?void 0:se.find(We=>We.id===U))!=null&&x.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:H.name&&H.name!==""?"8px":"0px"})},e.toDisplayString(H.name),5)),(b=(F=E.value)==null?void 0:F.find(We=>We.id===U))!=null&&b.content?(e.openBlock(),e.createElementBlock("div",Rc,[e.createVNode(Bt._sfc_main$2,{modelValue:H.name,"onUpdate:modelValue":We=>H.name=We,onClick:O[0]||(O[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(N=(V=E.value)==null?void 0:V.find(We=>We.id===U))!=null&&N.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>g(U),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Pc))]),e.createElementVNode("div",Lc,[(Je=(be=E.value)==null?void 0:be.find(We=>We.id===U))!=null&&Je.content?(e.openBlock(),e.createElementBlock("div",$c,[e.createVNode(ke,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>f(U),["stop"])},null,8,["onClick"]),e.createVNode(ke,{name:"Save",onClick:e.withModifiers(We=>C(U,H.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ve=(yt=E.value)==null?void 0:yt.find(We=>We.id===U))!=null&&Ve.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>R(U),["stop"]),class:"icon-content"},[e.createVNode(ke,{name:"Delete",style:{width:"16px",height:"16px"}})],8,jc))])])]}),content:e.withCtx(({item:H,index:U})=>{var se,x;return[e.createElementVNode("div",Uc,[e.createTextVNode(e.toDisplayString(S(H.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(S(H.comp+"Operate")),{itemContents:H==null?void 0:H.compData,originalItemContents:(x=(se=u.value)==null?void 0:se.find((F,b)=>b===U))==null?void 0:x.compData,onChange:F=>M(F,H,U)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Wc=Rt._export_sfc(Kc,[["__scopeId","data-v-a46a44b9"]]),Hc={key:0,class:"show-content"},qc={style:{display:"flex"}},Gc={__name:"modelShow",setup(o){const l=Ua(y.pinia),{itemData:c}=y.storeToRefs(l),r=e.ref([]);e.watch(()=>c.value,()=>{var u;!c.value||((u=c.value)==null?void 0:u.length)===0?r.value=[]:r.value=y.cloneDeep(c.value)},{deep:!0,immediate:!0});const p=u=>ta(u);return(u,E)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Hc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,C)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:C},[e.createElementVNode("div",qc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:C},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},Xc=Rt._export_sfc(Gc,[["__scopeId","data-v-3f3e863e"]]),Yc={class:"tabs-header"},Jc={class:"tabs-list"},Zc={class:"tab-name"},Qc={class:"tab-actions"},eu=["onClick"],tu=["onClick"],nu=["onClick"],au={class:"model-operate"},ou={class:"model-select",style:{display:"unset"}},ru={class:"existing-components"},iu={class:"component-list"},lu=["onClick"],su={class:"component-info"},cu={class:"component-type"},uu={class:"component-name"},du={class:"model-fill"},pu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.ref([]),u=e.ref(!1),E=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),C=e.ref(!1),S=e.ref(-1),M=e.ref(new WeakMap),R=e.ref(null),Q=Ua(y.pinia),{itemData:O}=y.storeToRefs(Q),ke=()=>{E.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},H=q=>{E.value="修改标签页",g.value.title=p.value[q].title,f.value=q,u.value=!0},U=q=>{const A=F(q);M.value.delete(A),p.value.splice(q,1),it()},se=()=>{if(g.value.title.trim()){if(f.value===-1){const q={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:x()};p.value.push(q)}else p.value[f.value].title=g.value.title,p.value[f.value].value=g.value.title,p.value[f.value].label=g.value.title;u.value=!1,it()}},x=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,F=q=>{const A=p.value[q];return A.id||(A.id=x()),A.id},b=q=>{var me;S.value=q;const A=F(q);R.value=y.cloneDeep(O.value);let ge=M.value.get(A);!ge&&((me=p.value[q].children)==null?void 0:me.length)>0&&(ge=Je(p.value[q].children)),ge?Q.setItemData(y.cloneDeep(ge)):Q.setItemData([]),C.value=!0},V=e.computed(()=>{const q=y.useModelComp(y.pinia),A=y.storeToRefs(q).itemData.value;return console.log("可用组件数据",A),!A||!Array.isArray(A)?[]:A.filter(ge=>{var me;if(ge.comp==="Tabs"&&S.value>=0){const Me=F(S.value);if((me=ge.compData)==null?void 0:me.some(Ze=>{var ee;return Ze.key==="stepList"&&((ee=Ze.contents)==null?void 0:ee.some(xe=>xe.id===Me))}))return!1}return!0})}),N=q=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[q]||q,be=q=>{var A;try{const ge=y.cloneDeep(q);ge.id=Date.now()+Math.random(),ge.comp==="Tabs"&&((A=ge.compData)==null||A.forEach(Me=>{Me.key==="stepList"&&Me.contents&&Me.contents.forEach(Te=>{Te.id=x()})}));const me=y.cloneDeep(O.value);me.push(ge),Q.setItemData(me)}catch(ge){console.error("添加组件失败:",ge)}},Je=q=>q.map(A=>{var ge;switch(A.type){case"form":return{comp:"Form",name:A.value||"表单",compData:yt(A.content)};case"table":return{comp:"Table",name:A.value||"表格",compData:Ve(A.content)};default:return{comp:"Unknown",name:A.value||"",compData:((ge=A.content)==null?void 0:ge.originalData)||[]}}}),yt=q=>{if(!q)return[];const A=[];return q.rowContents&&A.push({key:"formContent",contents:q.rowContents}),q.buttonValue&&A.push({key:"formButton",contents:q.buttonValue}),typeof q.isEnableWrap<"u"&&A.push({key:"enableWrap",contents:q.isEnableWrap}),A},Ve=q=>[],We=()=>{if(S.value>=0&&S.value<p.value.length){const q=F(S.value);M.value.set(q,y.cloneDeep(O.value)),p.value[S.value].children=ie(O.value),console.log("保存后的数据",ie(O.value))}C.value=!1,S.value=-1,R.value=null,it()},je=()=>{R.value&&Q.setItemData(y.cloneDeep(R.value)),C.value=!1,S.value=-1,R.value=null},z=()=>{C.value&&je()},ie=q=>{if(!Array.isArray(q))throw new Error("sourceData must be an array");return q.map((A,ge)=>{if(!A||typeof A!="object")return A;const{comp:me,name:Me,compData:Te}=A;switch(me){case"Form":return{type:"form",content:re(Te||[]),value:"表单"};case"Table":return{type:"table",content:fe(Te||[]),value:"表格"};default:return{type:"xxx",content:Ye(Te||[]),value:""}}})},re=q=>{const A={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},ge={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return q.forEach((me,Me)=>{if(!me||typeof me!="object"){console.warn(`Invalid config at index ${Me}:`,me);return}const{key:Te,contents:Ze}=me,ee=ge[Te];if(!ee){console.warn(`Unknown Form config key: ${Te}`);return}Te==="enableWrap"?A[ee]=!!Ze:A[ee]=Array.isArray(Ze)?Ze:[]}),A},fe=q=>{const A={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},ge={header:"columns",tableContents:"tableData"};return q.forEach((me,Me)=>{if(!me||typeof me!="object"){console.warn(`Invalid config at index ${Me}:`,me);return}const{key:Te,contents:Ze}=me,ee=ge[Te];if(!ee){console.warn(`Unknown Table config key: ${Te}`);return}A[ee]=Array.isArray(Ze)?Ze:[]}),A},Ye=q=>(console.log("Default conversion logic - to be implemented"),{originalData:q,processed:!1,componentType:"unknown"}),it=()=>{const q=[{key:"stepList",contents:p.value}];r("change",q)};return e.watch(()=>c.itemContents,q=>{if(q&&q.length>0){const A=q.find(ge=>ge.key==="stepList");A&&A.contents&&(p.value=A.contents.map(ge=>({title:ge.title||"",value:ge.value||ge.title||"",label:ge.label||ge.title||"",children:ge.children||[],id:ge.id||x()})))}},{immediate:!0,deep:!0}),(q,A)=>{const ge=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-input"),Me=e.resolveComponent("el-form-item"),Te=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Yc,[A[6]||(A[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:ke},[e.createVNode(ge,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),A[5]||(A[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(Ze,ee)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ee},[e.createElementVNode("span",Zc,e.toDisplayString(Ze.title),1),e.createElementVNode("div",Qc,[e.createElementVNode("button",{onClick:xe=>H(ee)},"修改标题",8,eu),e.createElementVNode("button",{onClick:xe=>b(ee)},"布局调整",8,tu),e.createElementVNode("button",{onClick:xe=>U(ee)},"删除",8,nu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":A[2]||(A[2]=Ze=>u.value=Ze),title:E.value,onBeforeDestroy:A[3]||(A[3]=Ze=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:A[1]||(A[1]=Ze=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:se},"确定")]),default:e.withCtx(()=>[e.createVNode(Te,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Me,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(me,{modelValue:g.value.title,"onUpdate:modelValue":A[0]||(A[0]=Ze=>g.value.title=Ze),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:C.value,"onUpdate:modelValue":A[4]||(A[4]=Ze=>C.value=Ze),title:"布局调整",fullScreen:"",onBeforeDestroy:z},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:je},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",au,[e.createElementVNode("div",ou,[e.createVNode(Ac),e.createElementVNode("div",ru,[A[8]||(A[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",iu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,Ze=>(e.openBlock(),e.createElementBlock("div",{key:Ze.id,class:"component-item",onClick:ee=>be(Ze)},[e.createElementVNode("div",su,[e.createElementVNode("span",cu,e.toDisplayString(N(Ze.comp)),1),e.createElementVNode("span",uu,e.toDisplayString(Ze.name),1)]),A[7]||(A[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,lu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:q.innerWidth},[e.createVNode(Xc)])),e.createElementVNode("div",du,[e.createVNode(Wc)])])]),_:1},8,["modelValue"])])}}},fu=Rt._export_sfc(pu,[["__scopeId","data-v-9096ed0d"]]);function hu(){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(o){return{type:"line",...o}}function gu(){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(o){return{type:"bar",barWidth:"60%",...o}}function yu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function bu(o){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...o}}const Cn={line:{initBaseoptions:hu,initSeries:vu},bar:{initBaseoptions:gu,initSeries:mu},pie:{initBaseoptions:yu,initSeries:bu}},Do=y.useMenuState(y.pinia),dr=(o,l)=>{var S;const c=[],r=[],{group:p,nameCol:u,valueCol:E}=l||{},g=o==null?void 0:o.find(M=>{const{name:R}=M;return R===p});if(!g)return{names:c,values:r};const f=(S=g==null?void 0:g.compData)==null?void 0:S.find(M=>{const{key:R}=M;return R==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(M=>{const R=M==null?void 0:M[0];let Q=!1;ot.isObject(R)&&(R!=null&&R.id)&&(Q=!0);let O=u,ke=E;Q&&(O=O+1,ke=ke+1);const H=M==null?void 0:M[O],U=M==null?void 0:M[ke];c.push(H),r.push(U)}),{names:c,values:r}},ku=async o=>{const{menu:l,mainKey:c,detailGroup:r,detailNameCol:p,detailValueCol:u,isSelfDetail:E}=o||{};let g=null;const f=sessionStorage.getItem("systemKey");if(E&&Do.activeMenuPath&&(g=await Ie.getItemData(`${Do.activeMenuPath}`,f,"")),!E){const C=l==null?void 0:l.join("/");g=await Ie.getItemData(`${C}^${c}`,f,"")}return dr(g,{group:r,nameCol:p,valueCol:u})},xu=async o=>{const{menu:l,group:c,nameCol:r,valueCol:p}=o||{},u=l==null?void 0:l.join("/"),E=sessionStorage.getItem("systemKey"),g=await Ie.getItemData(u,E,"");return dr(g,{group:c,nameCol:r,valueCol:p})},ro=async(o,l)=>{const c={names:[],values:[]},{menu:r,group:p,nameCol:u,valueCol:E}=o||{};if(!r.length||!p)return c;const{mainKey:g,group:f,nameCol:C,valueCol:S,isSelfDetail:M}=l||{};return g&&f&&Bt.isNumber(C)&&Bt.isNumber(S)?await ku({menu:r,mainKey:g,detailGroup:f,detailNameCol:C,detailValueCol:S,isSelfDetail:M}):Bt.isNumber(u)&&Bt.isNumber(E)?await xu({menu:r,group:p,nameCol:u,valueCol:E}):c},wu=async({chartBaseConfig:o,chartDataConfig:l,chartDetailConfig:c})=>{const{type:r,title:p}=o||{},u=Cn==null?void 0:Cn[r];if(!u)return;const{initBaseoptions:E,initSeries:g}=u,f=E();f.title.text=p??"";const{names:C,values:S}=await ro(l,c);if(!C||!S)return f;f.xAxis.data=C;const M=g({data:S});return f.series.push(M),f},Cu=async({chartBaseConfig:o,chartDataConfig:l,chartDetailConfig:c})=>{const{type:r,title:p}=o||{},u=Cn==null?void 0:Cn[r];if(!u)return;const{initBaseoptions:E,initSeries:g}=u,f=E();f.title.text=p??"";const{names:C,values:S}=await ro(l,c);if(!C||!S)return f;f.xAxis.data=C;const M=g({data:S});return f.series.push(M),f},Du=async({chartBaseConfig:o,chartDataConfig:l,chartDetailConfig:c})=>{const{type:r,title:p}=o||{},u=Cn==null?void 0:Cn[r];if(!u)return;const{initBaseoptions:E,initSeries:g}=u,f=E();f.title.text=p??"";const{names:C,values:S}=await ro(l,c);if(!C||!S)return f;const M=[];for(let Q=0;Q<C.length;Q++){const O=C[Q],ke=S[Q];M.push({name:O,value:ke})}const R=g({data:M});return f.series.push(R),f},_u=async(o=[])=>{var E,g,f;const l=((E=o==null?void 0:o.find(C=>C.key==="chartBaseConfig"))==null?void 0:E.contents)??{},c=((g=o==null?void 0:o.find(C=>C.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=o==null?void 0:o.find(C=>C.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:p}=l;let u={};return p==="line"&&(u=await wu({chartBaseConfig:l,chartDataConfig:c,chartDetailConfig:r})),p==="bar"&&(u=await Cu({chartBaseConfig:l,chartDataConfig:c,chartDetailConfig:r})),p==="pie"&&(u=await Du({chartBaseConfig:l,chartDataConfig:c,chartDetailConfig:r})),u},Eu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(o){const l=o,c=e.ref({});e.onMounted(async()=>{const p=l==null?void 0:l.itemData;c.value=await _u(p)});const r=e.computed(()=>(l==null?void 0:l.height)||"300px");return(p,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Ei.ssChart,{optionContents:c.value},null,8,["optionContents"])],4))}}),Su=Rt._export_sfc(Eu,[["__scopeId","data-v-d4c081e8"]]),Tu={class:"chart-module layout"},Bu={class:"chart-module content"},Iu={class:"chart-module content"},Nu={class:"form-content"},Vu={class:"dialog-footer"},Au={class:"form-content"},Ou={class:"dialog-footer"},zu={class:"form-content"},Mu={class:"dialog-footer"},Fu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l,p=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),E=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var ne;u.value=E(),(ne=u.value)==null||ne.forEach(J=>{var we;const oe=J==null?void 0:J.prop;J.value=(we=g==null?void 0:g.value)==null?void 0:we[oe]}),p.visible=!0},C=ne=>{g.value=ne},S=()=>{var ne;p.visible=!1,r("change",(ne=qe())==null?void 0:ne.compData)},M=e.reactive({visible:!1,width:"840",title:"数据配置"}),R=e.ref([]),Q=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],O=e.ref({}),ke=()=>{const ne=R.value,J=y.cloneDeep(ne);return J==null||J.forEach(oe=>{var Ue;const we=oe==null?void 0:oe.prop;oe.value=(Ue=O.value)==null?void 0:Ue[we]}),J},H=ne=>{var oe;O.value=ne;const J=ke();R.value=J,r("change",(oe=qe())==null?void 0:oe.compData)},U=async()=>{const ne=await Ie.getMenusContent(),J=ke();J==null||J.forEach(oe=>{(oe==null?void 0:oe.prop)==="menu"&&(oe.contents=ne)}),R.value=J,M.visible=!0,await Ze(O.value.menu),await T(O.value.group)},se=e.reactive({visible:!1,width:"840",title:"详情页配置"}),x=e.ref([]),F=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],b=e.ref({}),V=()=>{const ne=x.value,J=y.cloneDeep(ne);return J==null||J.forEach(oe=>{var Ue;const we=oe==null?void 0:oe.prop;oe.value=(Ue=b.value)==null?void 0:Ue[we]}),J},N=ne=>{var oe;b.value=ne;const J=V();x.value=J,r("change",(oe=qe())==null?void 0:oe.compData)},be=async()=>{await z();const ne=y.cloneDeep(Je.value),J=V();J==null||J.forEach(oe=>{var Ue;const we=oe==null?void 0:oe.prop;oe.value=(Ue=b==null?void 0:b.value)==null?void 0:Ue[we],we==="mainKey"&&(oe.contents=ne)}),x.value=J,se.visible=!0},Je=e.ref([]),yt=e.ref([]),Ve=e.ref({}),We=e.ref({}),je=()=>{const{compData:ne}=me.value||{},J=ne==null?void 0:ne.find(j=>{const{key:X}=j;return X==="header"}),oe=(J==null?void 0:J.contents)||[],we=oe==null?void 0:oe.filter((j,X)=>{const{label:k}=j;return k!=="操作"}),Ue=we==null?void 0:we.findIndex((j,X)=>{const{isMainKey:k}=j;return k});if(Ue<0)return[];const ut=ne==null?void 0:ne.find(j=>{const{key:X}=j;return X==="tableContents"}),h=(ut==null?void 0:ut.contents)||[];return h==null?void 0:h.map(j=>{const X=j==null?void 0:j[0];let k=Ue;ot.isObject(X)&&(X!=null&&X.id)&&(k=k+1);const te=j==null?void 0:j[k];return{label:te,value:te}})},z=async()=>{const ne=await je();Je.value=ne},ie=async ne=>{const J=sessionStorage.getItem("systemKey");return await Ie.getItemData(ne,J,"")},re=async ne=>{const J=ne;yt.value=J==null?void 0:J.map(oe=>{const{name:we}=oe;return Ve.value[we]=oe,{label:we,value:we}})},fe=ne=>{const{comp:J,compData:oe}=We.value||{};if(J==="Table"){let we=V();we=we.filter(Ue=>{const{prop:ut}=Ue;return ut!=="formItems"}),ee(we,oe),x.value=we}},Ye=async()=>{var oe,we;const ne=(oe=b==null?void 0:b.value)==null?void 0:oe.mainKey,J=(we=O==null?void 0:O.value)==null?void 0:we.menu;if(ne){const ut=`${J==null?void 0:J.join("/")}^${ne}`,h=await ie(ut);await re(h);const D=V();D==null||D.forEach(j=>{(j==null?void 0:j.prop)==="group"&&(j.contents=yt.value)}),x.value=D}};e.watch(()=>{var ne;return(ne=b==null?void 0:b.value)==null?void 0:ne.mainKey},async(ne,J)=>{ne!=J&&ne&&await Ye()});const it=async ne=>{const J=Ve.value[ne];We.value=J,await fe()};e.watch(()=>{var ne;return(ne=b==null?void 0:b.value)==null?void 0:ne.group},async(ne,J)=>{ne!=J&&ne&&it(ne)});const q=async()=>{var J;await Ye();const ne=(J=b.value)==null?void 0:J.group;await it(ne)},A=e.ref([]),ge=e.ref({}),me=e.ref({}),Me=async ne=>{const J=ne==null?void 0:ne.join("/"),oe=sessionStorage.getItem("systemKey");return await Ie.getItemData(J,oe,"")},Te=async ne=>{const J=await Me(ne);A.value=J==null?void 0:J.map(oe=>{const{name:we}=oe;return ge.value[we]=oe,{label:we,value:we}})},Ze=async(ne,J)=>{await Te(ne);const oe=ke();oe==null||oe.forEach(we=>{(we==null?void 0:we.prop)==="group"&&(we.contents=A.value)}),R.value=oe};e.watch(()=>{var ne;return(ne=O==null?void 0:O.value)==null?void 0:ne.menu},async(ne,J)=>{const oe=ne==null?void 0:ne.join("/"),we=J==null?void 0:J.join("/");oe!=we&&await Ze(ne)});const ee=(ne,J)=>{const oe=J==null?void 0:J.find(h=>{const{key:D}=h;return D==="header"}),we=(oe==null?void 0:oe.contents)||[],Ue=we==null?void 0:we.filter((h,D)=>{const{label:j}=h;return j!=="操作"}),ut=Ue==null?void 0:Ue.map((h,D)=>{const{label:j}=h;return{label:j,value:D}});ne==null||ne.forEach(h=>{const D=h==null?void 0:h.prop;(D==="nameCol"||D==="valueCol")&&(h.contents=ut)})},xe=ne=>{const{comp:J,compData:oe}=me.value||{};if(J==="Table"){O.value.formItems=[];let we=ke();we=we.filter(Ue=>{const{prop:ut}=Ue;return ut!=="formItems"}),ee(we,oe),R.value=we}},T=async ne=>{const J=ge.value[ne];me.value=J,await xe()};e.watch(()=>{var ne;return(ne=O==null?void 0:O.value)==null?void 0:ne.group},async(ne,J)=>{ne!=J&&T(ne)});const He=async()=>{var oe,we;const ne=(oe=O.value)==null?void 0:oe.menu;await Ze(ne);const J=(we=O.value)==null?void 0:we.group;await T(J)},qe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:O.value},{key:"chartDetailConfig",contents:b.value}]}),Ee=()=>{p.visible=!1,M.visible=!1,se.visible=!1};return e.onMounted(async()=>{var J,oe,we;R.value=Q(),x.value=F();const ne=c==null?void 0:c.itemContents;g.value=((J=ne==null?void 0:ne.find(Ue=>Ue.key==="chartBaseConfig"))==null?void 0:J.contents)??{},O.value=((oe=ne==null?void 0:ne.find(Ue=>Ue.key==="chartDataConfig"))==null?void 0:oe.contents)??{},await He(),b.value=((we=ne==null?void 0:ne.find(Ue=>Ue.key==="chartDetailConfig"))==null?void 0:we.contents)??{},await q()}),(ne,J)=>{const oe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Tu,[J[4]||(J[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(oe,{id:"themeButton",onClick:J[0]||(J[0]=we=>f())},{default:e.withCtx(()=>J[3]||(J[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Bu,[J[6]||(J[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(oe,{id:"themeButton",onClick:J[1]||(J[1]=we=>U())},{default:e.withCtx(()=>J[5]||(J[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Iu,[J[8]||(J[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(oe,{id:"themeButton",onClick:J[2]||(J[2]=we=>be())},{default:e.withCtx(()=>J[7]||(J[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:Ee,width:p.width},{default:e.withCtx(()=>[e.createElementVNode("div",Nu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:C},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Vu,[e.createVNode(oe,{class:"cancel-button button",onClick:Ee,id:"themeBorderButton"},{default:e.withCtx(()=>J[9]||(J[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(oe,{class:"ok-button button",onClick:S,id:"themeButton"},{default:e.withCtx(()=>J[10]||(J[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:M.visible,title:M.title,onBeforeDestroy:Ee,width:M.width},{default:e.withCtx(()=>[e.createElementVNode("div",Au,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:R.value,key:R.value,isEnableWrap:!0,onChange:H},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ou,[e.createVNode(oe,{class:"cancel-button button",onClick:Ee,id:"themeBorderButton"},{default:e.withCtx(()=>J[11]||(J[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(oe,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>J[12]||(J[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:se.visible,title:se.title,onBeforeDestroy:Ee,width:se.width},{default:e.withCtx(()=>[e.createElementVNode("div",zu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:N},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Mu,[e.createVNode(oe,{class:"cancel-button button",onClick:Ee,id:"themeBorderButton"},{default:e.withCtx(()=>J[13]||(J[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(oe,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>J[14]||(J[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),Ru=Rt._export_sfc(Fu,[["__scopeId","data-v-fe119645"]]);var Na={exports:{}},Pu=Na.exports,_o;function Lu(){return _o||(_o=1,function(o,l){(function(c,r){r()})(Pu,function(){function c(C,S){return typeof S>"u"?S={autoBom:!1}:typeof S!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),S={autoBom:!S}),S.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(C.type)?new Blob(["\uFEFF",C],{type:C.type}):C}function r(C,S,M){var R=new XMLHttpRequest;R.open("GET",C),R.responseType="blob",R.onload=function(){f(R.response,S,M)},R.onerror=function(){console.error("could not download file")},R.send()}function p(C){var S=new XMLHttpRequest;S.open("HEAD",C,!1);try{S.send()}catch{}return 200<=S.status&&299>=S.status}function u(C){try{C.dispatchEvent(new MouseEvent("click"))}catch{var S=document.createEvent("MouseEvents");S.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),C.dispatchEvent(S)}}var E=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Ie.commonjsGlobal=="object"&&Ie.commonjsGlobal.global===Ie.commonjsGlobal?Ie.commonjsGlobal:void 0,g=E.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=E.saveAs||(typeof window!="object"||window!==E?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(C,S,M){var R=E.URL||E.webkitURL,Q=document.createElement("a");S=S||C.name||"download",Q.download=S,Q.rel="noopener",typeof C=="string"?(Q.href=C,Q.origin===location.origin?u(Q):p(Q.href)?r(C,S,M):u(Q,Q.target="_blank")):(Q.href=R.createObjectURL(C),setTimeout(function(){R.revokeObjectURL(Q.href)},4e4),setTimeout(function(){u(Q)},0))}:"msSaveOrOpenBlob"in navigator?function(C,S,M){if(S=S||C.name||"download",typeof C!="string")navigator.msSaveOrOpenBlob(c(C,M),S);else if(p(C))r(C,S,M);else{var R=document.createElement("a");R.href=C,R.target="_blank",setTimeout(function(){u(R)})}}:function(C,S,M,R){if(R=R||open("","_blank"),R&&(R.document.title=R.document.body.innerText="downloading..."),typeof C=="string")return r(C,S,M);var Q=C.type==="application/octet-stream",O=/constructor/i.test(E.HTMLElement)||E.safari,ke=/CriOS\/[\d]+/.test(navigator.userAgent);if((ke||Q&&O||g)&&typeof FileReader<"u"){var H=new FileReader;H.onloadend=function(){var x=H.result;x=ke?x:x.replace(/^data:[^;]*;/,"data:attachment/file;"),R?R.location.href=x:location=x,R=null},H.readAsDataURL(C)}else{var U=E.URL||E.webkitURL,se=U.createObjectURL(C);R?R.location=se:location.href=se,R=null,setTimeout(function(){U.revokeObjectURL(se)},4e4)}});E.saveAs=f.saveAs=f,o.exports=f})}(Na)),Na.exports}Lu();const za=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BPlHuTxE.cjs")).then(o=>o.index));za.install=o=>{o.component("ssMenu",za)};const pr={__name:"index",props:{name:String},setup(o){const l=o,c=e.computed(()=>ot.ElIcons[l.name]);return e.onMounted(()=>{}),(r,p)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value)))]),_:1})}}},fr=(o,l,c=0)=>{let r=o;return r!=null&&r.every(p=>Array.isArray(p))&&(r!=null&&r.every(p=>Array.isArray(p)&&p.length===1)?r=r==null?void 0:r.filter(p=>(p==null?void 0:p[0])!==(l==null?void 0:l[c])):r=r==null?void 0:r.map(p=>{if(p!=null&&p.find(u=>u===(l==null?void 0:l[c]))&&(l==null?void 0:l.length)!==1){let u=y.cloneDeep(l),E=p==null?void 0:p.filter(S=>S!==(u==null?void 0:u[c])),g=c+1,f=fr(E,u,g),C=[];C.push(p==null?void 0:p[0]),f==null||f.forEach(S=>{C.push(S)}),p=C}return p})),r},hr=(o,l,c,r=0)=>{let p=o;return p!=null&&p.every(u=>Array.isArray(u))&&(p!=null&&p.every(u=>Array.isArray(u)&&u.length===1)?p.push([c]):p=p==null?void 0:p.map(u=>{if(u!=null&&u.find(E=>E===(l==null?void 0:l[r]))&&(l==null?void 0:l.length)!==1){let E=y.cloneDeep(l),g=u==null?void 0:u.filter(M=>M!==(E==null?void 0:E[r])),f=r+1,C=hr(g,E,c,f),S=[];S.push(u==null?void 0:u[0]),C==null||C.forEach(M=>{S.push(M)}),u=S}return u})),p},vr=(o,l,c,r,p=0)=>{let u=o;return u!=null&&u.every(E=>Array.isArray(E))&&(u!=null&&u.every(E=>Array.isArray(E)&&E.length===1)?u=u==null?void 0:u.map(E=>((E==null?void 0:E[0])===c&&(E=[r]),E)):u=u==null?void 0:u.map(E=>{if(E!=null&&E.find(g=>g===(l==null?void 0:l[p]))&&(l==null?void 0:l.length)!==1){let g=y.cloneDeep(l),f=E==null?void 0:E.filter(R=>R!==(g==null?void 0:g[p])),C=p+1,S=vr(f,g,c,r,C),M=[];M.push(E==null?void 0:E[0]),S==null||S.forEach(R=>{M.push(R)}),E=M}return E})),u};function gr(o="menu"){return{name:o,components:{SvgIcon:Si.SvgIcon,ssMenu:za,DynamicIcon:pr,ssDialog:Gt.ssDialog,ssInput:Bt._sfc_main$2},setup(l,{emit:c}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),p=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=y.useMenuState(),E=y.useModelComp(y.pinia),g=y.useLoginState(y.pinia),{loginUserInfo:f}=y.storeToRefs(g),C=e.ref(0),S=Ti.useRouter(),M=e.ref(),{asideMenus:R,menuTriggerType:Q,platform:O}=y.storeToRefs(u),{fixMenuStatus:ke}=y.storeToRefs(E),H=e.computed(()=>r==null?void 0:r.mode),U=ee=>ee==null?void 0:ee.map(T=>{var He,qe;return!(T!=null&&T.children)||((He=T==null?void 0:T.children)==null?void 0:He.length)===0?T.config=p.value:T!=null&&T.children&&((qe=T==null?void 0:T.children)==null?void 0:qe.length)>0&&(T.children=U(T.children)),T}),se=e.computed(()=>{let ee=[...R.value];if((ee==null?void 0:ee.length)===0)return S.push("/"),[];const xe=be(ee,N.value);return xe.isFlag||(ee=xe==null?void 0:xe.data),ee=ee==null?void 0:ee.map(T=>{var He,qe;return!(T!=null&&T.children)||((He=T==null?void 0:T.children)==null?void 0:He.length)===0?T.config=p.value:T!=null&&T.children&&((qe=T==null?void 0:T.children)==null?void 0:qe.length)>0&&(T.children=U(T.children)),T}),ee}),x=async(ee,xe)=>{E.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(ee==null?void 0:ee.path),u.setActiveAsideMenu(ee),ee.isRouter?S.push(ee.path):S.push("/"),c("node-click",ee,xe)},F=async ee=>{const xe=Bi.findNodeByPropInTree(se.value,"path",ee);u.setActiveAsideMenu(xe),E.setRouteToChildPath(""),ke.value?E.setFixMenuStatus(!1):(Te.value&&(Q.value="open"),Q.value==="click"?C.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(ee):Te.value||(u.setMenuTriggerType("click"),u.setActiveMenuPath(ee))),ee!=null&&ee.startsWith("/")?S.push(ee):S.push("/"),C.value++},b=ee=>{Te.value||u.setActiveMenuPath(ee)},V=ee=>{const xe=document.documentElement;ee==null||ee.forEach(T=>{xe.style.setProperty(T.name,T.value)})};e.onMounted(()=>{C.value=1});const N=e.computed(()=>{const ee=sessionStorage.getItem("authority");return ee?JSON.parse(ee):[]});e.watch(()=>O.value,ee=>{ee==="browser"?V(fa.browserVerticalMenuClasses):ee==="client"?(V(fa.clientHorizontalMenuClasses),V(fa.clientVerticalMenuClasses)):ee==="three"&&(V(fa.threeHorizontalMenuClasses),V(fa.threeVerticalMenuClasses))},{immediate:!0});const be=(ee,xe)=>({isFlag:!0}),Je=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),yt=ee=>ta(ee),Ve=e.ref({}),We=e.ref([]),je=e.ref({}),z=e.ref({}),ie=ee=>{switch(ee){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},re=e.ref({}),fe=ee=>{u.setCacheInputMenu({type:Je.type,data:ee}),u.setIsRefreshMenus(!0)},Ye=async(ee,xe,T)=>{var He,qe,Ee,ne,J,oe,we,Ue,ut,h,D,j,X,k,te,Se,_,Z,L,K,Ce,ae,W,Y,le,de,ye,he,$,Ne,pe,Pe,nt,Fe,tt,_e,vt,Qe,Be,rt,gt,Ge;if(xe==="create"){let Re=(T==null?void 0:T.title)+"(1)",It=await ot.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),De=(qe=(He=It==null?void 0:It.data)==null?void 0:He.result)==null?void 0:qe[0],Ke=(Ee=De==null?void 0:De.value)==null?void 0:Ee.pageData;Ke.compData=(ne=Ke.compData)==null?void 0:ne.map(w=>{var ce;return(w==null?void 0:w.key)==="menuContents"&&(w.contents=hr(w.contents,(ce=T==null?void 0:T.path)==null?void 0:ce.split("/"),Re)),w}),await ot.updateInsofDataApi({id:De==null?void 0:De.id,value:{pageData:Ke}});let Oe=(oe=(J=T==null?void 0:T.path)==null?void 0:J.split("/"))==null?void 0:oe.filter((w,ce)=>{var Le,ue;return ce!==((ue=(Le=T==null?void 0:T.path)==null?void 0:Le.split("/"))==null?void 0:ue.length)-1}),Xe=await Ie.getItemData((ut=(Ue=(we=T==null?void 0:T.path)==null?void 0:we.split("/"))==null?void 0:Ue.filter((w,ce)=>{var Le,ue;return ce!==((ue=(Le=T==null?void 0:T.path)==null?void 0:Le.split("/"))==null?void 0:ue.length)-1}))==null?void 0:ut.join("/"),sessionStorage.getItem("systemKey"),"");if(Oe.push(Re),Oe=Oe==null?void 0:Oe.join("/"),(Xe==null?void 0:Xe.length)>0){let w=Xe==null?void 0:Xe[0],ce=(D=(h=w==null?void 0:w.compData)==null?void 0:h.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:D.contents;if(((j=ce==null?void 0:ce[0])==null?void 0:j.directiveLabel)==="#isMain"){let Le=(X=ce==null?void 0:ce[0])==null?void 0:X.prop,ue=(te=(k=w==null?void 0:w.compData)==null?void 0:k.find(lt=>(lt==null?void 0:lt.key)==="tableContents"))==null?void 0:te.contents,ct;ue==null||ue.forEach(lt=>{var xt,dt;if(lt.length===1)((xt=lt==null?void 0:lt[0])==null?void 0:xt[Le])===(T==null?void 0:T.title)&&(ct=lt==null?void 0:lt[0],ct[Le]=Re);else{let st=(dt=ce==null?void 0:ce.filter(Tt=>Tt!=="操作"))==null?void 0:dt.map(Tt=>Tt==null?void 0:Tt.prop),pt=lt==null?void 0:lt.filter(Tt=>!(Tt!=null&&Tt.id)),wt=Ie.getValueToObjectValue(pt,st);wt[Le]=Re,ct=wt}}),await ot.createInsofDataApi({key:{type:"data",pageKey:(Z=(_=(Se=T==null?void 0:T.path)==null?void 0:Se.split("/"))==null?void 0:_.filter((lt,xt)=>{var dt,st;return xt!==((st=(dt=T==null?void 0:T.path)==null?void 0:dt.split("/"))==null?void 0:st.length)-1}))==null?void 0:Z.join("/"),tableId:w==null?void 0:w.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(L=f.value)==null?void 0:L.id,createUserLayer:((K=f.value)==null?void 0:K.dept)||((Ce=f.value)==null?void 0:Ce.部门名称)},value:{tableData:ct}})}}await Ie.newLoadingConstruct(T==null?void 0:T.path,Oe),u.setUpdateMenuStatus(!1),await qa.verifyStructureDataToStore(),u.setActiveMenuPath((Y=(W=(ae=T==null?void 0:T.path)==null?void 0:ae.split("/"))==null?void 0:W.filter((w,ce)=>{var Le,ue;return ce!==((ue=(Le=T==null?void 0:T.path)==null?void 0:Le.split("/"))==null?void 0:ue.length)-1}))==null?void 0:Y.join("/")),u.setActiveTopMenuPath((de=(le=T==null?void 0:T.path)==null?void 0:le.split("/"))==null?void 0:de[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(xe==="update")M.value=T;else if(xe==="delete"){let Re=await ot.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:T==null?void 0:T.path}}),It=await ot.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),De=(he=(ye=It==null?void 0:It.data)==null?void 0:ye.result)==null?void 0:he[0],Ke=($=De==null?void 0:De.value)==null?void 0:$.pageData;if(Ke.compData=(Ne=Ke.compData)==null?void 0:Ne.map(w=>{var ce;return(w==null?void 0:w.key)==="menuContents"&&(w.contents=fr(w.contents,(ce=T==null?void 0:T.path)==null?void 0:ce.split("/"))),w}),await ot.updateInsofDataApi({id:De==null?void 0:De.id,value:{pageData:Ke}}),((Pe=(pe=Re==null?void 0:Re.data)==null?void 0:pe.result)==null?void 0:Pe.length)>0){let w=(Fe=(nt=Re==null?void 0:Re.data)==null?void 0:nt.result)==null?void 0:Fe.map(ce=>ce==null?void 0:ce.id);(w==null?void 0:w.length)>0&&await ot.batchDeleteInsofDataApi({ids:w})}let Oe=await Ie.getItemData((vt=(_e=(tt=T==null?void 0:T.path)==null?void 0:tt.split("/"))==null?void 0:_e.filter((w,ce)=>{var Le,ue;return ce!==((ue=(Le=T==null?void 0:T.path)==null?void 0:Le.split("/"))==null?void 0:ue.length)-1}))==null?void 0:vt.join("/"),sessionStorage.getItem("systemKey"),""),Xe=[];(Oe==null?void 0:Oe.length)>0&&(Oe==null||Oe.forEach(w=>{var Le,ue,ct,lt,xt,dt,st,pt,wt,Tt,jt;let ce=(lt=(ct=(ue=(Le=w==null?void 0:w.compData)==null?void 0:Le.find(ht=>(ht==null?void 0:ht.key)==="header"))==null?void 0:ue.contents)==null?void 0:ct[0])==null?void 0:lt.prop;((pt=(st=(dt=(xt=w==null?void 0:w.compData)==null?void 0:xt.find(ht=>(ht==null?void 0:ht.key)==="header"))==null?void 0:dt.contents)==null?void 0:st[0])==null?void 0:pt.directiveLabel)==="#isMain"&&((jt=(Tt=(wt=w==null?void 0:w.compData)==null?void 0:wt.find(ht=>(ht==null?void 0:ht.key)==="tableContents"))==null?void 0:Tt.contents)==null||jt.forEach(ht=>{var zt,Lt,Ut;(ht==null?void 0:ht.length)>1?(ht==null?void 0:ht[1])===(T==null?void 0:T.title)&&Xe.push((zt=ht==null?void 0:ht[0])==null?void 0:zt.id):((Lt=ht==null?void 0:ht[0])==null?void 0:Lt[ce])===(T==null?void 0:T.title)&&Xe.push((Ut=ht==null?void 0:ht[0])==null?void 0:Ut.id)}))})),(Xe==null?void 0:Xe.length)>0&&await ot.batchDeleteInsofDataApi({ids:Xe}),u.setUpdateMenuStatus(!1),await qa.verifyStructureDataToStore(),u.setActiveMenuPath((rt=(Be=(Qe=T==null?void 0:T.path)==null?void 0:Qe.split("/"))==null?void 0:Be.filter((w,ce)=>{var Le,ue;return ce!==((ue=(Le=T==null?void 0:T.path)==null?void 0:Le.split("/"))==null?void 0:ue.length)-1}))==null?void 0:rt.join("/")),u.setActiveTopMenuPath((Ge=(gt=T==null?void 0:T.path)==null?void 0:gt.split("/"))==null?void 0:Ge[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},it=async(ee,xe)=>{var Ue,ut,h,D,j,X,k,te,Se,_,Z,L,K,Ce,ae,W,Y,le,de,ye,he,$,Ne,pe,Pe,nt,Fe,tt,_e,vt,Qe;let T=await ot.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),He=(ut=(Ue=T==null?void 0:T.data)==null?void 0:Ue.result)==null?void 0:ut[0],qe=(h=He==null?void 0:He.value)==null?void 0:h.pageData;qe.compData=(D=qe.compData)==null?void 0:D.map(Be=>{var rt,gt;return(Be==null?void 0:Be.key)==="menuContents"&&(Be.contents=vr(Be.contents,(rt=xe==null?void 0:xe.path)==null?void 0:rt.split("/"),xe==null?void 0:xe.title,(gt=ee==null?void 0:ee.target)==null?void 0:gt.value)),Be}),He!=null&&He.id&&await ot.updateInsofDataApi({id:He==null?void 0:He.id,value:{pageData:qe}});let Ee=(X=(j=xe==null?void 0:xe.path)==null?void 0:j.split("/"))==null?void 0:X.filter((Be,rt)=>{var gt,Ge;return rt!==((Ge=(gt=xe==null?void 0:xe.path)==null?void 0:gt.split("/"))==null?void 0:Ge.length)-1}),ne=Ee==null?void 0:Ee.join("/");Ee.push((k=ee==null?void 0:ee.target)==null?void 0:k.value),Ee=Ee==null?void 0:Ee.join("/");let J=await Ie.getItemData(ne,sessionStorage.getItem("systemKey"),"");if(((L=(Z=(_=(Se=(te=J==null?void 0:J[0])==null?void 0:te.compData)==null?void 0:Se.find(Be=>(Be==null?void 0:Be.key)==="header"))==null?void 0:_.contents)==null?void 0:Z[0])==null?void 0:L.directiveLabel)==="#isMain"){let Be=(Y=(W=(ae=(Ce=(K=J==null?void 0:J[0])==null?void 0:K.compData)==null?void 0:Ce.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:ae.contents)==null?void 0:W[0])==null?void 0:Y.prop,rt=(ye=(de=(le=J==null?void 0:J[0])==null?void 0:le.compData)==null?void 0:de.find(Re=>(Re==null?void 0:Re.key)==="tableContents"))==null?void 0:ye.contents,gt=(pe=(Ne=($=(he=J==null?void 0:J[0])==null?void 0:he.compData)==null?void 0:$.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:Ne.contents)==null?void 0:pe.map(Re=>Re==null?void 0:Re.prop),Ge;if(rt==null||rt.forEach(Re=>{var De;let It=Ie.getValueToObjectValue(Re,gt);(It==null?void 0:It[Be])===xe.title&&(Ge=It,Ge[Be]=(De=ee==null?void 0:ee.target)==null?void 0:De.value)}),Ge){let Re={};for(let De in Ge)De!=="id"&&(Re[De]=Ge==null?void 0:Ge[De]);let It=[{id:Ge==null?void 0:Ge.id,value:{tableData:Re}}];await ot.batchUpdateInsofDataApi({dataList:It})}}let oe=await ot.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:xe==null?void 0:xe.path}}),we=(nt=(Pe=oe==null?void 0:oe.data)==null?void 0:Pe.result)==null?void 0:nt.map(Be=>({id:Be==null?void 0:Be.id,key:Be==null?void 0:Be.key}));we=we==null?void 0:we.map(Be=>(Be.key.pageKey=Ee,Be)),(we==null?void 0:we.length)>0&&await ot.batchUpdateInsofDataApi({dataList:we}),u.setUpdateMenuStatus(!1),await qa.verifyStructureDataToStore(),u.setActiveMenuPath((_e=(tt=(Fe=xe==null?void 0:xe.path)==null?void 0:Fe.split("/"))==null?void 0:tt.filter((Be,rt)=>{var gt,Ge;return rt!==((Ge=(gt=xe==null?void 0:xe.path)==null?void 0:gt.split("/"))==null?void 0:Ge.length)-1}))==null?void 0:_e.join("/")),u.setActiveTopMenuPath((Qe=(vt=xe==null?void 0:xe.path)==null?void 0:vt.split("/"))==null?void 0:Qe[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),M.value=void 0},q=async(ee,xe)=>{Je.type=ie(xe==null?void 0:xe.operateType),await Ye(xe,Je.type,ee),z.value=ee,re.value=xe},A=()=>{Je.show=!1},ge=ee=>ee==null?void 0:ee.filter(xe=>xe.allowInherit),me=()=>{var T,He,qe,Ee,ne;let ee;Je.type==="create"&&(ee=((T=z.value)==null?void 0:T.path)+"/"+je.value[(He=je.value)==null?void 0:He.prop]),Je.type==="update"&&(ee=(qe=z.value)==null?void 0:qe.path);const xe={...z.value,config:ge((Ee=z.value)==null?void 0:Ee.config),children:[],childMenus:[],title:je.value[(ne=je.value)==null?void 0:ne.prop],path:ee};console.log("clickSubmitForm",re.value,z.value,xe),fe(xe),Je.show=!1},Me=ee=>{var T,He;const xe=(T=ee==null?void 0:ee.contents)==null?void 0:T.find(qe=>qe.key==="formContent");xe&&(je.value=(He=xe==null?void 0:xe.contents)==null?void 0:He.reduce((qe,Ee)=>(qe[Ee.key]=Ee.value,qe.prop=Ee.key,qe),{}))},Te=e.ref(!1);return{isCollapse:Te,handleMenuCollapse:()=>{Te.value=!Te.value},handleCompChange:Me,dialogForm:Ve,dialogRenderComps:We,getComponents:yt,clickSubmitForm:me,dialogInfo:Je,beforeDialogDestroy:A,clickMenuIcon:q,mode:H,renderMenuList:se,clickMenu:x,openMenu:F,closeMenu:b,changeMenuStyle:V,fixElement:M,onBlur:it}}}}e.defineComponent(gr());const $u=y.useLoginState(),{loginUserInfo:Xa}=y.storeToRefs($u),en=y.useModelComp(y.pinia),ju=e.ref(!1),{itemData:Uu,itemGridData:Yn,curStructureCompIds:Eo,isSubmitCurStructure:Ku,isRefreshCurStructure:Wu,routeToChildPath:Hu,pageMapState:eo,itemExtendData:Sa}=y.storeToRefs(en),ln=y.useMenuState(y.pinia),{activeTopMenuPath:qu,activeMenuPath:pn,platform:Np,activeAsideMenu:Vp,buttonTriggerType:Gu,menus:Ap}=y.storeToRefs(ln),Qn=Ie.useUnit(y.pinia),{selectTitle:mr,chooseTitle:So}=y.storeToRefs(Qn),Xu=Ie.useOriginalState(y.pinia),{originalPath:Op}=y.storeToRefs(Xu);e.ref();y.useAuthorityState(y.pinia);const Ma=e.ref(!0),sa=e.ref(0),to=e.ref([]);e.ref(!1);const Yu=()=>{en.setItemGridData([]),en.setIsEdit("edit"),en.setSubmitCurStructure(pn.value!=="/平台管理/菜单管理")},Ju=()=>{en.setIsEdit("view"),en.setRefreshCurStructure(!0)},Zu=async o=>{const l=sessionStorage.getItem("systemKey"),c=await Ie.getItemData(o,l,"");return c&&c.length>0},Qu=async o=>{var g,f,C;let l=mr.value,c=l==null?void 0:l.findIndex(S=>(S==null?void 0:S.value)===(o==null?void 0:o.value)),r=(g=l==null?void 0:l.filter(S=>(S==null?void 0:S.condition)==="parent"))==null?void 0:g.map(S=>S==null?void 0:S.value),p=r==null?void 0:r[0],u=(C=(f=l==null?void 0:l.filter((S,M)=>!(S!=null&&S.condition)&&M<=c))==null?void 0:f.map(S=>S.value))==null?void 0:C.join("/");p?(u==null?void 0:u.length)>0?p=p+"/"+u:p=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(p=u,l=l==null?void 0:l.filter(S=>(S==null?void 0:S.condition)!=="child"),Qn.setSelectTitle(l),Qn.setChooseTitle([])),await Zu(p)&&ln.setActiveMenuPath(p)},Ya=async(o,l,c,r="contentConfig")=>{var p;try{if(!Array.isArray(o))return;let u,E;l==="create"?(u={dataList:o==null?void 0:o.map(f=>{var C;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:c!=null&&c.startsWith("/")?c==null?void 0:c.substring(1):c,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(C=f==null?void 0:f.compData)==null?void 0:C.filter(S=>(S==null?void 0:S.key)!=="tableContents")}}}})},E=ot.batchAddInsofDataApi):l==="update"?(u={dataList:o==null?void 0:o.map(f=>{var C;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(C=f==null?void 0:f.compData)==null?void 0:C.filter(S=>(S==null?void 0:S.key)!=="tableContents")}}}})},E=ot.batchUpdateInsofDataApi):l==="delete"&&(u={ids:o},E=ot.batchDeleteInsofDataApi);const g=await E(u);if(((p=g==null?void 0:g.data)==null?void 0:p.code)===200)return g.data.result;throw ot.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{ot.ElMessage.error("保存响应失败")}},To=async(o,l,c,r)=>{var p,u,E,g,f,C,S,M,R,Q,O;try{const ke=(u=(p=o==null?void 0:o.results)==null?void 0:p.filter(b=>!(b!=null&&b.id)||typeof(b==null?void 0:b.id)=="string"))==null?void 0:u.map(b=>({key:{pageKey:o==null?void 0:o.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:l,relatedInfo:c},value:{tableData:b}})),H=(g=(E=o==null?void 0:o.results)==null?void 0:E.filter(b=>(b==null?void 0:b.id)&&typeof(b==null?void 0:b.id)=="number"))==null?void 0:g.map(b=>({id:b==null?void 0:b.id,value:{tableData:b}})),U=JSON.parse(y.cloneDeep(JSON.stringify(o))),se=(f=U==null?void 0:U.results)==null?void 0:f.map(b=>b.id);let x;c?x=(M=(S=(C=eo.value)==null?void 0:C[pn.value])==null?void 0:S.filter(b=>{var V,N,be;return((V=b==null?void 0:b.key)==null?void 0:V.type)===l&&((be=(N=b==null?void 0:b.key)==null?void 0:N.relatedInfo)==null?void 0:be.target)===r}))==null?void 0:M.map(b=>b==null?void 0:b.id):x=(O=(Q=(R=eo.value)==null?void 0:R[pn.value])==null?void 0:Q.filter(b=>{var V;return((V=b==null?void 0:b.key)==null?void 0:V.type)===l}))==null?void 0:O.map(b=>b==null?void 0:b.id);const F=x==null?void 0:x.filter(b=>!(se!=null&&se.includes(b))&&typeof b=="number");(ke==null?void 0:ke.length)>0&&await ot.batchAddInsofDataApi({dataList:ke}),(H==null?void 0:H.length)>0&&await ot.batchUpdateInsofDataApi({dataList:H}),(F==null?void 0:F.length)>0&&await ot.batchDeleteInsofDataApi({ids:F})}catch(ke){throw new Error(ke)}},ed=async o=>{var C,S,M,R,Q,O,ke,H,U,se;ln.setContentLoading(!0);const l=JSON.parse(y.cloneDeep(JSON.stringify(Uu.value)));if(!Ku.value)return ln.setCacheStructures({key:Gu.value,data:l}),ot.ElMessage.success("已暂存");const c=l==null?void 0:l.map(x=>x.id),r=c.filter(x=>{var F;return!((F=Eo.value)!=null&&F.includes(x))}),p=(C=Eo.value)==null?void 0:C.filter(x=>!c.includes(x)),u=[...r,...p].filter(x=>typeof x!==null&&typeof x<"u"),E=l==null?void 0:l.filter(x=>!x.id),g=l==null?void 0:l.filter(x=>x.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(Ya(u,"delete",o)),E&&(E==null?void 0:E.length)>0&&f.push(Ya(E,"create",o)),g&&(g==null?void 0:g.length)>0&&f.push(Ya(g,"update",o)),Yn.value&&((S=Yn.value)!=null&&S.isDelete&&((R=(M=Yn.value)==null?void 0:M.results)==null?void 0:R.length)>0&&((O=(Q=Yn.value)==null?void 0:Q.results)!=null&&O.every(x=>typeof x=="number"))?await ot.batchDeleteInsofDataApi({ids:(ke=Yn.value)==null?void 0:ke.results}):(console.log("itemGridData.value",Yn.value),f.push(await To(Yn.value,"gridLayout")))),Sa.value)for(const x in Sa.value)f.push(await To((H=Sa.value)==null?void 0:H[x],"extend",{target:x,compId:(se=(U=Sa.value)==null?void 0:U[x])==null?void 0:se.compId},x));await Promise.all(f).then(()=>{ot.ElMessage.success("保存成功"),en.setRefreshCurStructure(!0)}).catch(x=>{ot.ElMessage.success(x)}),ln.setContentLoading(!1)},Fa=o=>ta(o),qt=e.ref([]),td=e.computed(()=>{var o;return(o=qt.value)==null?void 0:o.filter(l=>(l==null?void 0:l.affix)&&(l==null?void 0:l.affix)!=="default")}),yr=e.computed(()=>{var o;return(o=qt.value)==null?void 0:o.filter(l=>!(l!=null&&l.affix)||(l==null?void 0:l.affix)==="default")}),br=e.ref(0),kr=e.ref(null),Ra=async(o,l="data",c)=>{var r,p;if((o==null?void 0:o.buttonName)==="新增"){let u=[{tableName:(r=o==null?void 0:o.relatedContents)==null?void 0:r.find(E=>E==null?void 0:E.includes("content")),tableContents:o==null?void 0:o.fixContent}];await y.pageBatchAddApi({platId:parseInt((p=Xa==null?void 0:Xa.value)==null?void 0:p.plat_id),changeContents:u})}en.setRefreshCurStructure(!0)},Pa=async(o,l)=>{},La=async o=>{qt.value=await Ie.getDeepDiffItems(o),en.setItemData(qt.value),en.setOriginalData(qt.value)};e.ref();const va=e.ref(null),nd=()=>{var o,l;console.log("倒计时结束时"),y.ElMessageBox.alert(`超时未提交,【${(l=(o=pn.value)==null?void 0:o.split("/"))==null?void 0:l[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},xr=e.ref([]),ad=e.computed(()=>{var o,l;return(l=(o=eo.value)==null?void 0:o[pn.value])==null?void 0:l.filter(c=>{var r;return((r=c==null?void 0:c.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[qu.value],()=>{Qn.setSelectTitle([]),Qn.setChooseTitle([])},{deep:!0});e.watch(()=>[So.value],async()=>{var l,c;let o=(l=So.value)==null?void 0:l.filter(r=>(r==null?void 0:r.condition)==="child"&&(r==null?void 0:r.value)!==""&&(r==null?void 0:r.parentContent)!==pn.value);if((o==null?void 0:o.length)>0){ln.setContentLoading(!0);let r=pn.value+"/"+((c=o==null?void 0:o[0])==null?void 0:c.value),p=await Ie.getPageData(r,!0,{originPath:pn.value});qt.value=await Ie.getDeepDiffItems(p),ln.setContentLoading(!1)}});e.watch(()=>[pn.value,Wu.value],async o=>{var E,g,f;if(!pn.value)return;en.setLockingPage(""),qt.value=[];let l=e.getCurrentInstance();(E=l==null?void 0:l.scope)==null||E.stop(),l=null,Ma.value=!1,ln.setContentLoading(!0),ju.value=!0;let c=o==null?void 0:o[0],r=c,p=(g=mr.value)==null?void 0:g.filter(C=>(C==null?void 0:C.condition)==="child"&&(C==null?void 0:C.value)!==""&&(C==null?void 0:C.parentContent)!==pn.value);(p==null?void 0:p.length)>0&&(c=c+"/"+((f=p==null?void 0:p[0])==null?void 0:f.value));let u=await Ie.getPageData(c,!0,{originPath:r});qt.value=await Ie.getDeepDiffItems(u),ln.setContentLoading(!1),en.setExtraContents([]),Qn.setSelectIndex(""),Qn.setSelectMenu(""),en.setItemData(qt.value),en.setOriginalData(qt.value),e.nextTick(()=>{sa.value=sa.value++,Ma.value=!0})},{immediate:!0});const od=async()=>{ln.setLinkMenuInfo(null),ln.setActiveMenuPath(Hu.value),qt.value=null,en.setRouteToChildPath(""),ln.setChildMenu("")},rd=o=>new RegExp("button","i").test(o),id=o=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(o),wr=o=>{if(id(o)){const l=o==null?void 0:o.split("^");(l==null?void 0:l.length)>0&&(l!=null&&l[0])&&ln.setLinkMenuInfo({path:l==null?void 0:l[0],data:l==null?void 0:l[1]})}},Cr=o=>{var l;va.value&&(va.value={...va.value,mainKeyPropValue:o==null?void 0:o[(l=va.value)==null?void 0:l.mainKeyProp]})},ld=o=>{br.value=o},ia=e.reactive({index:0,comp:null}),sd=e.computed(()=>{var o;return(o=qt.value)==null?void 0:o.map((l,c)=>({id:l.id,name:l.name,status:cd(l,c)}))}),Dr=(o,l)=>{var f,C,S,M,R;const c=l?o:o-2,r=(f=qt.value)==null?void 0:f[c],p=(S=(C=r==null?void 0:r.compData)==null?void 0:C.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:S.contents,u=p==null?void 0:p.findIndex(Q=>(Q==null?void 0:Q.isMainKey)&&(Q==null?void 0:Q.label)!=="操作"),E=u===-1?0:u,g=(R=(M=r==null?void 0:r.compData)==null?void 0:M.find(Q=>(Q==null?void 0:Q.key)==="tableContents"))==null?void 0:R.contents;return{valid:g==null?void 0:g.every(Q=>Q==null?void 0:Q[E+1]),length:(g==null?void 0:g.length)||0}},cd=(o,l)=>{var r;let c="process";if(((r=o==null?void 0:o.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:p,length:u}=Dr(l,!0);ia.index===l?c="process":u===0?c="wait":c=p?"success":"error"}return c},_r=o=>{var c,r,p,u,E;const l=o+1;if(l>1&&((p=(r=(c=qt.value)==null?void 0:c[o])==null?void 0:r.comp)==null?void 0:p.toUpperCase())==="TABLE"){const{valid:g}=Dr(l);g?(ia.index=l,ia.comp=(u=qt.value)==null?void 0:u[o]):ot.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ia.index=l,ia.comp=(E=qt.value)==null?void 0:E[o]},Er=e.computed(()=>{var o,l;return(l=(o=yr.value)==null?void 0:o[0])==null?void 0:l.isStepLayout});e.watch(()=>Er.value,o=>{o&&_r(0)},{immediate:!0});const ud={class:"layout"},dd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(o,{emit:l}){const c=l,r=o;e.onMounted(async()=>{});const p=e.computed(()=>y.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var S;const C=(S=p==null?void 0:p.value)==null?void 0:S.find(M=>{const{key:R}=M;return R==="baseConfig"});return C==null?void 0:C.contents}),E=e.computed(()=>{var S;const C=(S=p==null?void 0:p.value)==null?void 0:S.find(M=>{const{key:R}=M;return R==="children"});return C==null?void 0:C.contents}),g=e.computed(()=>{let C=y.cloneDeep(E.value)||[];const S=C.length;let M=0;const R=[];if(C=C.map(Q=>{const O=Q.span;return O?(Q.span=Number(O),M=M+Q.span):R.push(Q),Q}),M<24){const Q=Math.floor((24-M)/S);R.forEach(O=>{O.span=Q})}return C}),f=C=>{c("rowClick",C)};return(C,S)=>{var Q;const M=e.resolveComponent("el-col"),R=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",ud,[e.createVNode(R,{style:e.normalizeStyle({height:(Q=u.value)==null?void 0:Q.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(O,ke)=>(e.openBlock(),e.createBlock(M,{span:O==null?void 0:O.span},{default:e.withCtx(()=>{var H;return[e.unref(Ma)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Fa)(O.comp)),{key:e.unref(sa),compName:O.name,index:(O==null?void 0:O.id)??ke,height:(H=u.value)==null?void 0:H.height,itemData:O==null?void 0:O.compData,childItemData:O==null?void 0:O.itemChildData,onChange:e.unref(Ra),onContentChange:e.unref(Pa),onPageChange:e.unref(La),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),pd=Rt._export_sfc(dd,[["__scopeId","data-v-ab9a36ed"]]),fd={class:"layout-operate"},hd={class:"layout-module"},vd={class:"collapse-title-item"},gd={class:"collapse-title"},md={class:"icon-content"},yd=["onClick"],bd={class:"comp-child"},kd=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:l}){const c=o,r=l;e.onMounted(()=>{ke()});const p=e.ref({}),u=e.ref({}),E=e.ref([]),g=b=>[{label:"高度",prop:"height",type:"input",value:b==null?void 0:b.height}],f=b=>{u.value=b,r("change",F(),!0)},C=e.ref([]),S=e.ref([]),M=b=>[{label:"占比",prop:"span",type:"input",value:b==null?void 0:b.span}],R=e.computed(()=>{const b=c==null?void 0:c.itemContents;return y.cloneDeep(b)}),Q=e.computed(()=>{const b=R==null?void 0:R.value,V=b==null?void 0:b.find(N=>{const{key:be}=N;return be==="baseConfig"});return V==null?void 0:V.contents}),O=e.computed(()=>{const b=R==null?void 0:R.value,V=b==null?void 0:b.find(N=>{const{key:be}=N;return be==="children"});return V==null?void 0:V.contents}),ke=()=>{var b;p.value=R.value||{},C.value=(O==null?void 0:O.value)||[],E.value=g(),E.value=(b=E.value)==null?void 0:b.map(V=>{var be;const{prop:N}=V;return V.value=(be=Q.value)==null?void 0:be[N],V})};e.watch(()=>{var b;return(b=O==null?void 0:O.value)==null?void 0:b.length},()=>{var b;C.value=(O==null?void 0:O.value)||[],S.value=(b=O.value)==null?void 0:b.map(V=>M(V))},{immediate:!0});const H=(b,V)=>{const N=y.cloneDeep(O==null?void 0:O.value);N[V].span=b.span,C.value=N,r("change",F(),!0)},U=b=>ta(b),se=(b,V,N)=>{if(!b)return;const be=y.cloneDeep(O==null?void 0:O.value);be[N]&&(be[N].compData=b,C.value=be,r("change",F(),!0))},x=b=>{y.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let V=y.cloneDeep(O==null?void 0:O.value);V=V==null?void 0:V.filter((N,be)=>b!==be),C.value=V,r("change",F(),!0),ot.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},F=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:C==null?void 0:C.value}]});return(b,V)=>{const N=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",fd,[e.createElementVNode("div",hd,[V[1]||(V[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:E.value,isEnableWrap:!0,onChange:V[0]||(V[0]=be=>f(be))},null,8,["rowContents"])])]),e.createVNode(tr.default,{class:"collapse-content",collapseContents:O.value},{title:e.withCtx(({item:be,index:Je})=>[e.createElementVNode("div",vd,[e.createElementVNode("div",gd,e.toDisplayString(be.name),1),e.createElementVNode("div",md,[e.createElementVNode("div",{onClick:e.withModifiers(yt=>x(Je),["stop"]),class:"icon-content"},[e.createVNode(N,{name:"Delete",style:{width:"16px",height:"16px"}})],8,yd)])])]),content:e.withCtx(({item:be,index:Je})=>[e.createElementVNode("div",bd,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:S.value[Je],key:Je,isEnableWrap:!0,onChange:yt=>H(yt,Je)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(U(be.comp+"Operate")),{itemContents:be==null?void 0:be.compData,originalItemContents:be.compData,onChange:yt=>se(yt,be,Je)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),xd=Rt._export_sfc(kd,[["__scopeId","data-v-ba05456e"]]),wd=typeof window<"u";var Bo;wd&&((Bo=window==null?void 0:window.navigator)!=null&&Bo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function rn(o){return o==null}function Sr(){}const Cd=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(Cd)));function Dd(){const o=new Map;return{on(l,c){const r=o.get(l);r!=null&&r.add(c)||o.set(l,new Set([c]))},off(l,c){const r=o.get(l);r&&r.delete(c)},clear(l){const c=o.get(l);c&&c.clear()},clearAll(){o.clear()},emit(l,...c){const r=o.get(l);r&&r.forEach(p=>{p(...c)})}}}function Io(o,l=16){if(typeof o!="function")return Sr;const c=(...u)=>{o(...u)};if(l<=0)return Tr(c);let r=0,p;return function(...u){const E=Date.now(),g=E-r;clearTimeout(p),g>=l?(r=E,c(...u)):p=setTimeout(()=>{r=Date.now(),c(...u)},Math.max(0,l-g))}}function _d(o,l=100){if(typeof o!="function")return Sr;const c=(...p)=>{o(...p)};if(l<=0)return Tr(c);let r;return function(...p){clearTimeout(r),r=setTimeout(()=>{c(...p)},l)}}function Tr(o){if(typeof o!="function")return o;let l=!1,c,r;return function(...p){return c=p,l||(l=!0,r=Promise.resolve().then(()=>(l=!1,r=void 0,o(...c)))),r}}const ma=new Set,Br=new WeakMap;function Ed(){ma.forEach(o=>{o(...Br.get(o))}),ma.clear()}function Qt(o,...l){if(typeof o!="function")return o;Br.set(o,l),!ma.has(o)&&(ma.add(o),ma.size===1&&Promise.resolve().then(Ed))}const Ir=Symbol("LAYOUT_KEY"),Nr=Symbol("EMITTER_KEY");function Sd(o){let l=0,c;for(let r=0,p=o.length;r<p;r++)c=o[r].y+o[r].h,c>l&&(l=c);return l}function no(o){const l=Array(o.length);for(let c=0,r=o.length;c<r;c++)l[c]=Td(o[c]);return l}function Td(o){return{...o}}function Vr(o,l){return!(o===l||o.x+o.w<=l.x||o.x>=l.x+l.w||o.y+o.h<=l.y||o.y>=l.y+l.h)}function ra(o,l,c){const r=Or(o),p=zr(o),u=Array(o.length);for(let E=0,g=p.length;E<g;E++){let f=p[E];f.static||(f=Bd(r,f,l,c),r.push(f)),u[o.findIndex(C=>C.i===f.i)]=f,f.moved=!1}return u}function Bd(o,l,c,r){if(c)for(;l.y>0&&!ya(o,l);)l.y--;else if(r){const u=r[l.i].y;for(;l.y>u&&!ya(o,l);)l.y--}let p;for(;p=ya(o,l);)l.y=p.y+p.h;return l}function Id(o,l){const c=Or(o);for(let r=0,p=o.length;r<p;r++){const u=o[r];if(u.x+u.w>l.cols&&(u.x=l.cols-u.w),u.x<0&&(u.x=0,u.w=l.cols),!u.static)c.push(u);else for(;ya(c,u);)u.y++}return o}function No(o,l){for(let c=0,r=o.length;c<r;c++)if(o[c].i===l)return o[c]}function ya(o,l){for(let c=0,r=o.length;c<r;c++)if(Vr(o[c],l))return o[c]}function Ar(o,l){return o.filter(c=>Vr(c,l))}function Or(o){return o.filter(l=>l.static)}function ao(o,l,c,r,p=!1,u=!1){if(l.static)return o;const E=l.x,g=l.y,f=r&&l.y>r;typeof c=="number"&&(l.x=c),typeof r=="number"&&(l.y=r),l.moved=!0;let C=zr(o);f&&(C=C.reverse());const S=Ar(C,l);if(u&&S.length)return l.x=E,l.y=g,l.moved=!1,o;for(let M=0,R=S.length;M<R;M++){const Q=S[M];Q.moved||l.y>Q.y&&l.y-Q.y>Q.h/4||(Q.static?o=Vo(o,Q,l,p):o=Vo(o,l,Q,p))}return o}function Vo(o,l,c,r){if(r){const p={x:c.x,y:c.y,w:c.w,h:c.h};if(p.y=Math.max(l.y-c.h,0),!ya(o,p))return ao(o,c,void 0,p.y,!1)}return ao(o,c,void 0,c.y+1,!1)}function Nd(o,l,c,r){const p="translate3d("+l+"px,"+o+"px, 0)";return{transform:p,WebkitTransform:p,MozTransform:p,msTransform:p,OTransform:p,width:c+"px",height:r+"px",position:"absolute"}}function Vd(o,l,c,r){const p="translate3d("+l*-1+"px,"+o+"px, 0)";return{transform:p,WebkitTransform:p,MozTransform:p,msTransform:p,OTransform:p,width:c+"px",height:r+"px",position:"absolute"}}function Ad(o,l,c,r){return{top:o+"px",left:l+"px",width:c+"px",height:r+"px",position:"absolute"}}function Od(o,l,c,r){return{top:o+"px",right:l+"px",width:c+"px",height:r+"px",position:"absolute"}}function zr(o){return Array.from(o).sort(function(l,c){return l.y===c.y&&l.x===c.x?0:l.y>c.y||l.y===c.y&&l.x>c.x?1:-1})}function zd(o,l){l=l||"Layout";const c=["x","y","w","h"],r=[];if(!Array.isArray(o))throw new Error(l+" must be an array!");for(let p=0,u=o.length;p<u;p++){const E=o[p];for(let g=0;g<c.length;g++)if(typeof E[c[g]]!="number")throw new Error("VueGridLayout: "+l+"["+p+"]."+c[g]+" must be a number!");if(E.i===void 0||E.i===null)throw new Error("VueGridLayout: "+l+"["+p+"].i cannot be null!");if(typeof E.i!="number"&&typeof E.i!="string")throw new Error("VueGridLayout: "+l+"["+p+"].i must be a string or number!");if(r.indexOf(E.i)>=0)throw new Error("VueGridLayout: "+l+"["+p+"].i must be unique!");if(r.push(E.i),E.static!==void 0&&typeof E.static!="boolean")throw new Error("VueGridLayout: "+l+"["+p+"].static must be a boolean!")}}function Md(o,l="vgl"){const c=()=>`${l}-${o}`;return{b:c,be:r=>`${c()}__${r}`,bm:r=>`${c()}--${r}`,bem:(r,p)=>`${c()}__${r}--${p}`}}function Ao(o){return Fd(o)}function Fd(o){var l;const c=((l=o.target)==null?void 0:l.offsetParent)||document.body,r=o.offsetParent===document.body?{left:0,top:0}:c.getBoundingClientRect(),p=o.clientX+c.scrollLeft-r.left,u=o.clientY+c.scrollTop-r.top;return{x:p,y:u}}function Oo(o,l,c,r){return Rd(o)?{deltaX:c-o,deltaY:r-l,lastX:o,lastY:l,x:c,y:r}:{deltaX:0,deltaY:0,lastX:c,lastY:r,x:c,y:r}}function Rd(o){return typeof o=="number"&&!Number.isNaN(o)}function Pd(o,l){const c=Fr(o);let r=c[0];for(let p=1,u=c.length;p<u;p++){const E=c[p];l>o[E]&&(r=E)}return r}function Mr(o,l){if(!l[o])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+o+" is missing!");return l[o]}function Ld(o,l,c,r,p,u,E){if(l[r])return no(l[r]);let g=o;const f=Fr(c),C=f.slice(f.indexOf(r));for(let S=0,M=C.length;S<M;S++){const R=C[S];if(l[R]){g=l[R];break}}return g=no(g||[]),ra(Id(g,{cols:u}),E)}function Fr(o){return Object.keys(o).sort((l,c)=>o[l]-o[c])}let $d="auto";function jd(){return typeof document<"u"}function zo(){return jd()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):$d}var ga={exports:{}},Ud=ga.exports,Mo;function Kd(){return Mo||(Mo=1,function(o,l){(function(c,r){o.exports=r()})(Ud,function(){function c(n,t){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),a.push.apply(a,i)}return a}function r(n){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?c(Object(a),!0).forEach(function(i){f(n,i,a[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):c(Object(a)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(a,i))})}return n}function p(n){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(n)}function u(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function E(n,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,ke(i.key),i)}}function g(n,t,a){return t&&E(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function f(n,t,a){return(t=ke(t))in n?Object.defineProperty(n,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[t]=a,n}function C(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&&M(n,t)}function S(n){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(n)}function M(n,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,i){return a.__proto__=i,a},M(n,t)}function R(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Q(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 a,i=S(n);if(t){var s=S(this).constructor;a=Reflect.construct(i,arguments,s)}else a=i.apply(this,arguments);return function(d,v){if(v&&(typeof v=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(d)}(this,a)}}function O(){return O=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,a){var i=function(d,v){for(;!Object.prototype.hasOwnProperty.call(d,v)&&(d=S(d))!==null;);return d}(n,t);if(i){var s=Object.getOwnPropertyDescriptor(i,t);return s.get?s.get.call(arguments.length<3?n:a):s.value}},O.apply(this,arguments)}function ke(n){var t=function(a,i){if(typeof a!="object"||a===null)return a;var s=a[Symbol.toPrimitive];if(s!==void 0){var d=s.call(a,i);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)}(n,"string");return typeof t=="symbol"?t:t+""}var H=function(n){return!(!n||!n.Window)&&n instanceof n.Window},U=void 0,se=void 0;function x(n){U=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),se=n}function F(n){return H(n)?n:(n.ownerDocument||n).defaultView||se.window}typeof window<"u"&&window&&x(window);var b=function(n){return!!n&&p(n)==="object"},V=function(n){return typeof n=="function"},N={window:function(n){return n===se||H(n)},docFrag:function(n){return b(n)&&n.nodeType===11},object:b,func:V,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||p(n)!=="object")return!1;var t=F(n)||se;return/object|function/.test(typeof Element>"u"?"undefined":p(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return b(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return b(n)&&n.length!==void 0&&V(n.splice)}};function be(n){var t=n.interaction;if(t.prepared.name==="drag"){var a=t.prepared.axis;a==="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):a==="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 Je(n){var t=n.iEvent,a=n.interaction;if(a.prepared.name==="drag"){var i=a.prepared.axis;if(i==="x"||i==="y"){var s=i==="x"?"y":"x";t.page[s]=a.coords.start.page[s],t.client[s]=a.coords.start.client[s],t.delta[s]=0}}}var yt={id:"actions/drag",install:function(n){var t=n.actions,a=n.Interactable,i=n.defaults;a.prototype.draggable=yt.draggable,t.map.drag=yt,t.methodDict.drag="draggable",i.actions.drag=yt.defaults},listeners:{"interactions:before-action-move":be,"interactions:action-resume":be,"interactions:action-move":Je,"auto-start:check":function(n){var t=n.interaction,a=n.interactable,i=n.buttons,s=a.options.drag;if(s&&s.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(i&a.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:s.lockAxis==="start"?s.startAxis:s.lockAxis},!1}},draggable:function(n){return N.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):N.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:be,move:Je,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ve=yt,We={init:function(n){var t=n;We.document=t.document,We.DocumentFragment=t.DocumentFragment||je,We.SVGElement=t.SVGElement||je,We.SVGSVGElement=t.SVGSVGElement||je,We.SVGElementInstance=t.SVGElementInstance||je,We.Element=t.Element||je,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||je,We.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 je(){}var z=We,ie={init:function(n){var t=z.Element,a=n.navigator||{};ie.supportsTouch="ontouchstart"in n||N.func(n.DocumentTouch)&&z.document instanceof n.DocumentTouch,ie.supportsPointerEvent=a.pointerEnabled!==!1&&!!z.PointerEvent,ie.isIOS=/iP(hone|od|ad)/.test(a.platform),ie.isIOS7=/iP(hone|od|ad)/.test(a.platform)&&/OS 7[^\d]/.test(a.appVersion),ie.isIe9=/MSIE 9/.test(a.userAgent),ie.isOperaMobile=a.appName==="Opera"&&ie.supportsTouch&&/Presto/.test(a.userAgent),ie.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ie.pEventTypes=ie.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,ie.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},re=ie;function fe(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Ye(n,t){for(;N.element(n);){if(q(n,t))return n;n=it(n)}return null}function it(n){var t=n.parentNode;if(N.docFrag(t)){for(;(t=t.host)&&N.docFrag(t););return t}return t}function q(n,t){return se!==U&&(t=t.replace(/\/deep\//g," ")),n[re.prefixedMatchesSelector](t)}var A=function(n){return n.parentNode||n.host};function ge(n,t){for(var a,i=[],s=n;(a=A(s))&&s!==t&&a!==s.ownerDocument;)i.unshift(s),s=a;return i}function me(n,t,a){for(;N.element(n);){if(q(n,t))return!0;if((n=it(n))===a)return q(n,t)}return!1}function Me(n){return n.correspondingUseElement||n}function Te(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 Ze(n){var t,a=Te(n);if(!re.isIOS7&&a){var i={x:(t=(t=F(n))||se).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};a.left+=i.x,a.right+=i.x,a.top+=i.y,a.bottom+=i.y}return a}function ee(n){for(var t=[];n;)t.push(n),n=it(n);return t}function xe(n){return!!N.string(n)&&(z.document.querySelector(n),!0)}function T(n,t){for(var a in t)n[a]=t[a];return n}function He(n,t,a){return n==="parent"?it(a):n==="self"?t.getRect(a):Ye(a,n)}function qe(n,t,a,i){var s=n;return N.string(s)?s=He(s,t,a):N.func(s)&&(s=s.apply(void 0,i)),N.element(s)&&(s=Ze(s)),s}function Ee(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function ne(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 J(n,t,a){n.left&&(t.left+=a.x),n.right&&(t.right+=a.x),n.top&&(t.top+=a.y),n.bottom&&(t.bottom+=a.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function oe(n,t,a){var i=a&&n.options[a];return Ee(qe(i&&i.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function we(n,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(B){return!0},i=arguments.length>3?arguments[3]:void 0;if(i=i||{},N.string(n)&&n.search(" ")!==-1&&(n=Ue(n)),N.array(n))return n.forEach(function(B){return we(B,t,a,i)}),i;if(N.object(n)&&(t=n,n=""),N.func(t)&&a(n))i[n]=i[n]||[],i[n].push(t);else if(N.array(t))for(var s=0,d=t;s<d.length;s++){var v=d[s];we(n,v,a,i)}else if(N.object(t))for(var m in t)we(Ue(m).map(function(B){return"".concat(n).concat(B)}),t[m],a,i);return i}function Ue(n){return n.trim().split(/ +/)}var ut=function(n,t){return Math.sqrt(n*n+t*t)},h=["webkit","moz"];function D(n,t){n.__set||(n.__set={});var a=function(s){if(h.some(function(d){return s.indexOf(d)===0}))return 1;typeof n[s]!="function"&&s!=="__set"&&Object.defineProperty(n,s,{get:function(){return s in n.__set?n.__set[s]:n.__set[s]=t[s]},set:function(d){n.__set[s]=d},configurable:!0})};for(var i in t)a(i);return n}function j(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 X(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function k(n){return n instanceof z.Event||n instanceof z.Touch}function te(n,t,a){return n=n||"page",(a=a||{}).x=t[n+"X"],a.y=t[n+"Y"],a}function Se(n,t){return t=t||{x:0,y:0},re.isOperaMobile&&k(n)?(te("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):te("page",n,t),t}function _(n){return N.number(n.pointerId)?n.pointerId:n.identifier}function Z(n,t,a){var i=t.length>1?K(t):t[0];Se(i,n.page),function(s,d){d=d||{},re.isOperaMobile&&k(s)?te("screen",s,d):te("client",s,d)}(i,n.client),n.timeStamp=a}function L(n){var t=[];return N.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 K(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},a=0;a<n.length;a++){var i=n[a];for(var s in t)t[s]+=i[s]}for(var d in t)t[d]/=n.length;return t}function Ce(n){if(!n.length)return null;var t=L(n),a=Math.min(t[0].pageX,t[1].pageX),i=Math.min(t[0].pageY,t[1].pageY),s=Math.max(t[0].pageX,t[1].pageX),d=Math.max(t[0].pageY,t[1].pageY);return{x:a,y:i,left:a,top:i,right:s,bottom:d,width:s-a,height:d-i}}function ae(n,t){var a=t+"X",i=t+"Y",s=L(n),d=s[0][a]-s[1][a],v=s[0][i]-s[1][i];return ut(d,v)}function W(n,t){var a=t+"X",i=t+"Y",s=L(n),d=s[1][a]-s[0][a],v=s[1][i]-s[0][i];return 180*Math.atan2(v,d)/Math.PI}function Y(n){return N.string(n.pointerType)?n.pointerType:N.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof z.Touch?"touch":"mouse"}function le(n){var t=N.func(n.composedPath)?n.composedPath():n.path;return[Me(t?t[0]:n.target),Me(n.currentTarget)]}var de=function(){function n(t){u(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(de.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var ye=function(n,t){for(var a=0;a<t.length;a++){var i=t[a];n.push(i)}return n},he=function(n){return ye([],n)},$=function(n,t){for(var a=0;a<n.length;a++)if(t(n[a],a,n))return a;return-1},Ne=function(n,t){return n[$(n,t)]},pe=function(n){C(a,n);var t=Q(a);function a(i,s,d){var v;u(this,a),(v=t.call(this,s._interaction)).dropzone=void 0,v.dragEvent=void 0,v.relatedTarget=void 0,v.draggable=void 0,v.propagationStopped=!1,v.immediatePropagationStopped=!1;var m=d==="dragleave"?i.prev:i.cur,B=m.element,P=m.dropzone;return v.type=d,v.target=B,v.currentTarget=B,v.dropzone=P,v.dragEvent=s,v.relatedTarget=s.target,v.draggable=s.interactable,v.timeStamp=s.timeStamp,v}return g(a,[{key:"reject",value:function(){var i=this,s=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&s.cur.dropzone===this.dropzone&&s.cur.element===this.target)if(s.prev.dropzone=this.dropzone,s.prev.element=this.target,s.rejected=!0,s.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var d=s.activeDrops,v=$(d,function(B){var P=B.dropzone,I=B.element;return P===i.dropzone&&I===i.target});s.activeDrops.splice(v,1);var m=new a(s,this.dragEvent,"dropdeactivate");m.dropzone=this.dropzone,m.target=this.target,this.dropzone.fire(m)}else this.dropzone.fire(new a(s,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}(de);function Pe(n,t){for(var a=0,i=n.slice();a<i.length;a++){var s=i[a],d=s.dropzone,v=s.element;t.dropzone=d,t.target=v,d.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function nt(n,t){for(var a=function(d,v){for(var m=[],B=0,P=d.interactables.list;B<P.length;B++){var I=P[B];if(I.options.drop.enabled){var G=I.options.drop.accept;if(!(N.element(G)&&G!==v||N.string(G)&&!q(v,G)||N.func(G)&&!G({dropzone:I,draggableElement:v})))for(var ve=0,ze=I.getAllElements();ve<ze.length;ve++){var Ae=ze[ve];Ae!==v&&m.push({dropzone:I,element:Ae,rect:I.getRect(Ae)})}}}return m}(n,t),i=0;i<a.length;i++){var s=a[i];s.rect=s.dropzone.getRect(s.element)}return a}function Fe(n,t,a){for(var i=n.dropState,s=n.interactable,d=n.element,v=[],m=0,B=i.activeDrops;m<B.length;m++){var P=B[m],I=P.dropzone,G=P.element,ve=P.rect,ze=I.dropCheck(t,a,s,d,G,ve);v.push(ze?G:null)}var Ae=function($e){for(var at,et,ft,Et=[],Nt=0;Nt<$e.length;Nt++){var kt=$e[Nt],St=$e[at];if(kt&&Nt!==at)if(St){var Zt=A(kt),$t=A(St);if(Zt!==kt.ownerDocument)if($t!==kt.ownerDocument)if(Zt!==$t){Et=Et.length?Et:ge(St);var on=void 0;if(St instanceof z.HTMLElement&&kt instanceof z.SVGElement&&!(kt instanceof z.SVGSVGElement)){if(kt===$t)continue;on=kt.ownerSVGElement}else on=kt;for(var dn=ge(on,St.ownerDocument),kn=0;dn[kn]&&dn[kn]===Et[kn];)kn++;var Ea=[dn[kn-1],dn[kn],Et[kn]];if(Ea[0])for(var pa=Ea[0].lastChild;pa;){if(pa===Ea[1]){at=Nt,Et=dn;break}if(pa===Ea[2])break;pa=pa.previousSibling}}else ft=St,(parseInt(F(et=kt).getComputedStyle(et).zIndex,10)||0)>=(parseInt(F(ft).getComputedStyle(ft).zIndex,10)||0)&&(at=Nt);else at=Nt}else at=Nt}return at}(v);return i.activeDrops[Ae]||null}function tt(n,t,a){var i=n.dropState,s={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return a.type==="dragstart"&&(s.activate=new pe(i,a,"dropactivate"),s.activate.target=null,s.activate.dropzone=null),a.type==="dragend"&&(s.deactivate=new pe(i,a,"dropdeactivate"),s.deactivate.target=null,s.deactivate.dropzone=null),i.rejected||(i.cur.element!==i.prev.element&&(i.prev.dropzone&&(s.leave=new pe(i,a,"dragleave"),a.dragLeave=s.leave.target=i.prev.element,a.prevDropzone=s.leave.dropzone=i.prev.dropzone),i.cur.dropzone&&(s.enter=new pe(i,a,"dragenter"),a.dragEnter=i.cur.element,a.dropzone=i.cur.dropzone)),a.type==="dragend"&&i.cur.dropzone&&(s.drop=new pe(i,a,"drop"),a.dropzone=i.cur.dropzone,a.relatedTarget=i.cur.element),a.type==="dragmove"&&i.cur.dropzone&&(s.move=new pe(i,a,"dropmove"),a.dropzone=i.cur.dropzone)),s}function _e(n,t){var a=n.dropState,i=a.activeDrops,s=a.cur,d=a.prev;t.leave&&d.dropzone.fire(t.leave),t.enter&&s.dropzone.fire(t.enter),t.move&&s.dropzone.fire(t.move),t.drop&&s.dropzone.fire(t.drop),t.deactivate&&Pe(i,t.deactivate),a.prev.dropzone=s.dropzone,a.prev.element=s.element}function vt(n,t){var a=n.interaction,i=n.iEvent,s=n.event;if(i.type==="dragmove"||i.type==="dragend"){var d=a.dropState;t.dynamicDrop&&(d.activeDrops=nt(t,a.element));var v=i,m=Fe(a,v,s);d.rejected=d.rejected&&!!m&&m.dropzone===d.cur.dropzone&&m.element===d.cur.element,d.cur.dropzone=m&&m.dropzone,d.cur.element=m&&m.element,d.events=tt(a,0,v)}}var Qe={id:"actions/drop",install:function(n){var t=n.actions,a=n.interactStatic,i=n.Interactable,s=n.defaults;n.usePlugin(Ve),i.prototype.dropzone=function(d){return function(v,m){if(N.object(m)){if(v.options.drop.enabled=m.enabled!==!1,m.listeners){var B=we(m.listeners),P=Object.keys(B).reduce(function(G,ve){return G[/^(enter|leave)/.test(ve)?"drag".concat(ve):/^(activate|deactivate|move)/.test(ve)?"drop".concat(ve):ve]=B[ve],G},{}),I=v.options.drop.listeners;I&&v.off(I),v.on(P),v.options.drop.listeners=P}return N.func(m.ondrop)&&v.on("drop",m.ondrop),N.func(m.ondropactivate)&&v.on("dropactivate",m.ondropactivate),N.func(m.ondropdeactivate)&&v.on("dropdeactivate",m.ondropdeactivate),N.func(m.ondragenter)&&v.on("dragenter",m.ondragenter),N.func(m.ondragleave)&&v.on("dragleave",m.ondragleave),N.func(m.ondropmove)&&v.on("dropmove",m.ondropmove),/^(pointer|center)$/.test(m.overlap)?v.options.drop.overlap=m.overlap:N.number(m.overlap)&&(v.options.drop.overlap=Math.max(Math.min(1,m.overlap),0)),"accept"in m&&(v.options.drop.accept=m.accept),"checker"in m&&(v.options.drop.checker=m.checker),v}return N.bool(m)?(v.options.drop.enabled=m,v):v.options.drop}(this,d)},i.prototype.dropCheck=function(d,v,m,B,P,I){return function(G,ve,ze,Ae,$e,at,et){var ft=!1;if(!(et=et||G.getRect(at)))return!!G.options.drop.checker&&G.options.drop.checker(ve,ze,ft,G,at,Ae,$e);var Et=G.options.drop.overlap;if(Et==="pointer"){var Nt=oe(Ae,$e,"drag"),kt=Se(ve);kt.x+=Nt.x,kt.y+=Nt.y;var St=kt.x>et.left&&kt.x<et.right,Zt=kt.y>et.top&&kt.y<et.bottom;ft=St&&Zt}var $t=Ae.getRect($e);if($t&&Et==="center"){var on=$t.left+$t.width/2,dn=$t.top+$t.height/2;ft=on>=et.left&&on<=et.right&&dn>=et.top&&dn<=et.bottom}return $t&&N.number(Et)&&(ft=Math.max(0,Math.min(et.right,$t.right)-Math.max(et.left,$t.left))*Math.max(0,Math.min(et.bottom,$t.bottom)-Math.max(et.top,$t.top))/($t.width*$t.height)>=Et),G.options.drop.checker&&(ft=G.options.drop.checker(ve,ze,ft,G,at,Ae,$e)),ft}(this,d,v,m,B,P,I)},a.dynamicDrop=function(d){return N.bool(d)?(n.dynamicDrop=d,a):n.dynamicDrop},T(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,s.actions.drop=Qe.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 a=n.interaction,i=(n.event,n.iEvent);if(a.prepared.name==="drag"){var s=a.dropState;s.activeDrops=[],s.events={},s.activeDrops=nt(t,a.element),s.events=tt(a,0,i),s.events.activate&&(Pe(s.activeDrops,s.events.activate),t.fire("actions/drop:start",{interaction:a,dragEvent:i}))}},"interactions:action-move":vt,"interactions:after-action-move":function(n,t){var a=n.interaction,i=n.iEvent;if(a.prepared.name==="drag"){var s=a.dropState;_e(a,s.events),t.fire("actions/drop:move",{interaction:a,dragEvent:i}),s.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var a=n.interaction,i=n.iEvent;vt(n,t),_e(a,a.dropState.events),t.fire("actions/drop:end",{interaction:a,dragEvent:i})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var a=t.dropState;a&&(a.activeDrops=null,a.events=null,a.cur.dropzone=null,a.cur.element=null,a.prev.dropzone=null,a.prev.element=null,a.rejected=!1)}}},getActiveDrops:nt,getDrop:Fe,getDropEvents:tt,fireDropEvents:_e,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Be=Qe;function rt(n){var t=n.interaction,a=n.iEvent,i=n.phase;if(t.prepared.name==="gesture"){var s=t.pointers.map(function(P){return P.pointer}),d=i==="start",v=i==="end",m=t.interactable.options.deltaSource;if(a.touches=[s[0],s[1]],d)a.distance=ae(s,m),a.box=Ce(s),a.scale=1,a.ds=0,a.angle=W(s,m),a.da=0,t.gesture.startDistance=a.distance,t.gesture.startAngle=a.angle;else if(v||t.pointers.length<2){var B=t.prevEvent;a.distance=B.distance,a.box=B.box,a.scale=B.scale,a.ds=0,a.angle=B.angle,a.da=0}else a.distance=ae(s,m),a.box=Ce(s),a.scale=a.distance/t.gesture.startDistance,a.angle=W(s,m),a.ds=a.scale-t.gesture.scale,a.da=a.angle-t.gesture.angle;t.gesture.distance=a.distance,t.gesture.angle=a.angle,N.number(a.scale)&&a.scale!==1/0&&!isNaN(a.scale)&&(t.gesture.scale=a.scale)}}var gt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,a=n.Interactable,i=n.defaults;a.prototype.gesturable=function(s){return N.object(s)?(this.options.gesture.enabled=s.enabled!==!1,this.setPerAction("gesture",s),this.setOnEvents("gesture",s),this):N.bool(s)?(this.options.gesture.enabled=s,this):this.options.gesture},t.map.gesture=gt,t.methodDict.gesture="gesturable",i.actions.gesture=gt.defaults},listeners:{"interactions:action-start":rt,"interactions:action-move":rt,"interactions:action-end":rt,"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}},Ge=gt;function Re(n,t,a,i,s,d,v){if(!t)return!1;if(t===!0){var m=N.number(d.width)?d.width:d.right-d.left,B=N.number(d.height)?d.height:d.bottom-d.top;if(v=Math.min(v,Math.abs((n==="left"||n==="right"?m:B)/2)),m<0&&(n==="left"?n="right":n==="right"&&(n="left")),B<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var P=m>=0?d.left:d.right;return a.x<P+v}if(n==="top"){var I=B>=0?d.top:d.bottom;return a.y<I+v}if(n==="right")return a.x>(m>=0?d.right:d.left)-v;if(n==="bottom")return a.y>(B>=0?d.bottom:d.top)-v}return!!N.element(i)&&(N.element(t)?t===i:me(i,t,s))}function It(n){var t=n.iEvent,a=n.interaction;if(a.prepared.name==="resize"&&a.resizeAxes){var i=t;a.interactable.options.resize.square?(a.resizeAxes==="y"?i.delta.x=i.delta.y:i.delta.y=i.delta.x,i.axes="xy"):(i.axes=a.resizeAxes,a.resizeAxes==="x"?i.delta.y=0:a.resizeAxes==="y"&&(i.delta.x=0))}}var De,Ke,Oe={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,a=n.browser,i=n.Interactable,s=n.defaults;Oe.cursors=function(d){return d.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(a),Oe.defaultMargin=a.supportsTouch||a.supportsPointerEvent?20:10,i.prototype.resizable=function(d){return function(v,m,B){return N.object(m)?(v.options.resize.enabled=m.enabled!==!1,v.setPerAction("resize",m),v.setOnEvents("resize",m),N.string(m.axis)&&/^x$|^y$|^xy$/.test(m.axis)?v.options.resize.axis=m.axis:m.axis===null&&(v.options.resize.axis=B.defaults.actions.resize.axis),N.bool(m.preserveAspectRatio)?v.options.resize.preserveAspectRatio=m.preserveAspectRatio:N.bool(m.square)&&(v.options.resize.square=m.square),v):N.bool(m)?(v.options.resize.enabled=m,v):v.options.resize}(this,d,n)},t.map.resize=Oe,t.methodDict.resize="resizable",s.actions.resize=Oe.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var a=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=a,d=i.rect;i._rects={start:T({},d),corrected:T({},d),previous:T({},d),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},s.edges=i.prepared.edges,s.rect=i._rects.corrected,s.deltaRect=i._rects.delta}})(n),It(n)},"interactions:action-move":function(n){(function(t){var a=t.iEvent,i=t.interaction;if(i.prepared.name==="resize"&&i.prepared.edges){var s=a,d=i.interactable.options.resize.invert,v=d==="reposition"||d==="negate",m=i.rect,B=i._rects,P=B.start,I=B.corrected,G=B.delta,ve=B.previous;if(T(ve,I),v){if(T(I,m),d==="reposition"){if(I.top>I.bottom){var ze=I.top;I.top=I.bottom,I.bottom=ze}if(I.left>I.right){var Ae=I.left;I.left=I.right,I.right=Ae}}}else I.top=Math.min(m.top,P.bottom),I.bottom=Math.max(m.bottom,P.top),I.left=Math.min(m.left,P.right),I.right=Math.max(m.right,P.left);for(var $e in I.width=I.right-I.left,I.height=I.bottom-I.top,I)G[$e]=I[$e]-ve[$e];s.edges=i.prepared.edges,s.rect=I,s.deltaRect=G}})(n),It(n)},"interactions:action-end":function(n){var t=n.iEvent,a=n.interaction;if(a.prepared.name==="resize"&&a.prepared.edges){var i=t;i.edges=a.prepared.edges,i.rect=a._rects.corrected,i.deltaRect=a._rects.delta}},"auto-start:check":function(n){var t=n.interaction,a=n.interactable,i=n.element,s=n.rect,d=n.buttons;if(s){var v=T({},t.coords.cur.page),m=a.options.resize;if(m&&m.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(d&m.mouseButtons)!=0)){if(N.object(m.edges)){var B={left:!1,right:!1,top:!1,bottom:!1};for(var P in B)B[P]=Re(P,m.edges[P],v,t._latestPointer.eventTarget,i,s,m.margin||Oe.defaultMargin);B.left=B.left&&!B.right,B.top=B.top&&!B.bottom,(B.left||B.right||B.top||B.bottom)&&(n.action={name:"resize",edges:B})}else{var I=m.axis!=="y"&&v.x>s.right-Oe.defaultMargin,G=m.axis!=="x"&&v.y>s.bottom-Oe.defaultMargin;(I||G)&&(n.action={name:"resize",axes:(I?"x":"")+(G?"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,a=n.axis,i=n.name,s=Oe.cursors,d=null;if(a)d=s[i+a];else if(t){for(var v="",m=0,B=["top","bottom","left","right"];m<B.length;m++){var P=B[m];t[P]&&(v+=P)}d=s[v]}return d},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Xe=Oe,w={id:"actions",install:function(n){n.usePlugin(Ge),n.usePlugin(Xe),n.usePlugin(Ve),n.usePlugin(Be)}},ce=0,Le={request:function(n){return De(n)},cancel:function(n){return Ke(n)},init:function(n){if(De=n.requestAnimationFrame,Ke=n.cancelAnimationFrame,!De)for(var t=["ms","moz","webkit","o"],a=0;a<t.length;a++){var i=t[a];De=n["".concat(i,"RequestAnimationFrame")],Ke=n["".concat(i,"CancelAnimationFrame")]||n["".concat(i,"CancelRequestAnimationFrame")]}De=De&&De.bind(n),Ke=Ke&&Ke.bind(n),De||(De=function(s){var d=Date.now(),v=Math.max(0,16-(d-ce)),m=n.setTimeout(function(){s(d+v)},v);return ce=d+v,m},Ke=function(s){return clearTimeout(s)})}},ue={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){ue.isScrolling=!0,Le.cancel(ue.i),n.autoScroll=ue,ue.interaction=n,ue.prevTime=ue.now(),ue.i=Le.request(ue.scroll)},stop:function(){ue.isScrolling=!1,ue.interaction&&(ue.interaction.autoScroll=null),Le.cancel(ue.i)},scroll:function(){var n=ue.interaction,t=n.interactable,a=n.element,i=n.prepared.name,s=t.options[i].autoScroll,d=ct(s.container,t,a),v=ue.now(),m=(v-ue.prevTime)/1e3,B=s.speed*m;if(B>=1){var P={x:ue.x*B,y:ue.y*B};if(P.x||P.y){var I=lt(d);N.window(d)?d.scrollBy(P.x,P.y):d&&(d.scrollLeft+=P.x,d.scrollTop+=P.y);var G=lt(d),ve={x:G.x-I.x,y:G.y-I.y};(ve.x||ve.y)&&t.fire({type:"autoscroll",target:a,interactable:t,delta:ve,interaction:n,container:d})}ue.prevTime=v}ue.isScrolling&&(Le.cancel(ue.i),ue.i=Le.request(ue.scroll))},check:function(n,t){var a;return(a=n.options[t].autoScroll)==null?void 0:a.enabled},onInteractionMove:function(n){var t=n.interaction,a=n.pointer;if(t.interacting()&&ue.check(t.interactable,t.prepared.name))if(t.simulation)ue.x=ue.y=0;else{var i,s,d,v,m=t.interactable,B=t.element,P=t.prepared.name,I=m.options[P].autoScroll,G=ct(I.container,m,B);if(N.window(G))v=a.clientX<ue.margin,i=a.clientY<ue.margin,s=a.clientX>G.innerWidth-ue.margin,d=a.clientY>G.innerHeight-ue.margin;else{var ve=Te(G);v=a.clientX<ve.left+ue.margin,i=a.clientY<ve.top+ue.margin,s=a.clientX>ve.right-ue.margin,d=a.clientY>ve.bottom-ue.margin}ue.x=s?1:v?-1:0,ue.y=d?1:i?-1:0,ue.isScrolling||(ue.margin=I.margin,ue.speed=I.speed,ue.start(t))}}};function ct(n,t,a){return(N.string(n)?He(n,t,a):n)||F(a)}function lt(n){return N.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var xt={id:"auto-scroll",install:function(n){var t=n.defaults,a=n.actions;n.autoScroll=ue,ue.now=function(){return n.now()},a.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=ue.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,ue.stop(),ue.interaction&&(ue.interaction=null)},"interactions:stop":ue.stop,"interactions:action-move":function(n){return ue.onInteractionMove(n)}}},dt=xt;function st(n,t){var a=!1;return function(){return a||(se.console.warn(t),a=!0),n.apply(this,arguments)}}function pt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function wt(n){return N.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Tt(n){return N.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var jt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(a,i,s,d){var v=function(m,B,P,I,G){var ve=m.getRect(I),ze=B.buttons||{0:1,1:4,3:8,4:16}[B.button],Ae={action:null,interactable:m,interaction:P,element:I,rect:ve,buttons:ze};return G.fire("auto-start:check",Ae),Ae.action}(this,i,s,d,n);return this.options.actionChecker?this.options.actionChecker(a,i,v,this,d,s):v},t.prototype.ignoreFrom=st(function(a){return this._backCompatOption("ignoreFrom",a)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=st(function(a){return this._backCompatOption("allowFrom",a)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Tt,t.prototype.styleCursor=wt}};function ht(n,t,a,i,s){return t.testIgnoreAllow(t.options[n.name],a,i)&&t.options[n.name].enabled&&Wt(t,a,n,s)?n:null}function zt(n,t,a,i,s,d,v){for(var m=0,B=i.length;m<B;m++){var P=i[m],I=s[m],G=P.getAction(t,a,n,I);if(G){var ve=ht(G,P,I,d,v);if(ve)return{action:ve,interactable:P,element:I}}}return{action:null,interactable:null,element:null}}function Lt(n,t,a,i,s){var d=[],v=[],m=i;function B(I){d.push(I),v.push(m)}for(;N.element(m);){d=[],v=[],s.interactables.forEachMatch(m,B);var P=zt(n,t,a,d,v,i,s);if(P.action&&!P.interactable.options[P.action.name].manualStart)return P;m=it(m)}return{action:null,interactable:null,element:null}}function Ut(n,t,a){var i=t.action,s=t.interactable,d=t.element;i=i||{name:null},n.interactable=s,n.element=d,pt(n.prepared,i),n.rect=s&&i.name?s.getRect(d):null,Dn(n,a),a.fire("autoStart:prepared",{interaction:n})}function Wt(n,t,a,i){var s=n.options,d=s[a.name].max,v=s[a.name].maxPerElement,m=i.autoStart.maxInteractions,B=0,P=0,I=0;if(!(d&&v&&m))return!1;for(var G=0,ve=i.interactions.list;G<ve.length;G++){var ze=ve[G],Ae=ze.prepared.name;if(ze.interacting()&&(++B>=m||ze.interactable===n&&((P+=Ae===a.name?1:0)>=d||ze.element===t&&(I++,Ae===a.name&&I>=v))))return!1}return m>0}function Yt(n,t){return N.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function Pt(n,t,a){var i=a.autoStart.cursorElement;i&&i!==n&&(i.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,a.autoStart.cursorElement=t?n:null}function Dn(n,t){var a=n.interactable,i=n.element,s=n.prepared;if(n.pointerType==="mouse"&&a&&a.options.styleCursor){var d="";if(s.name){var v=a.options[s.name].cursorChecker;d=N.func(v)?v(s,a,i,n._interacting):t.actions.map[s.name].getCursor(s)}Pt(n.element,d||"",t)}else t.autoStart.cursorElement&&Pt(t.autoStart.cursorElement,"",t)}var On={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,a=n.defaults;n.usePlugin(jt),a.base.actionChecker=null,a.base.styleCursor=!0,T(a.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(i){return Yt(i,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Wt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var a=n.interaction,i=n.pointer,s=n.event,d=n.eventTarget;a.interacting()||Ut(a,Lt(a,i,s,d,t),t)},"interactions:move":function(n,t){(function(a,i){var s=a.interaction,d=a.pointer,v=a.event,m=a.eventTarget;s.pointerType!=="mouse"||s.pointerIsDown||s.interacting()||Ut(s,Lt(s,d,v,m,i),i)})(n,t),function(a,i){var s=a.interaction;if(s.pointerIsDown&&!s.interacting()&&s.pointerWasMoved&&s.prepared.name){i.fire("autoStart:before-start",a);var d=s.interactable,v=s.prepared.name;v&&d&&(d.options[v].manualStart||!Wt(d,s.element,s.prepared,i)?s.stop():(s.start(s.prepared,d,s.element),Dn(s,i)))}}(n,t)},"interactions:stop":function(n,t){var a=n.interaction,i=a.interactable;i&&i.options.styleCursor&&Pt(a.element,"",t)}},maxInteractions:Yt,withinInteractionLimit:Wt,validateAction:ht},gn=On,zn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var a=n.interaction,i=n.eventTarget,s=n.dx,d=n.dy;if(a.prepared.name==="drag"){var v=Math.abs(s),m=Math.abs(d),B=a.interactable.options.drag,P=B.startAxis,I=v>m?"x":v<m?"y":"xy";if(a.prepared.axis=B.lockAxis==="start"?I[0]:B.lockAxis,I!=="xy"&&P!=="xy"&&P!==I){a.prepared.name=null;for(var G=i,ve=function(Ae){if(Ae!==a.interactable){var $e=a.interactable.options.drag;if(!$e.manualStart&&Ae.testIgnoreAllow($e,G,i)){var at=Ae.getAction(a.downPointer,a.downEvent,a,G);if(at&&at.name==="drag"&&function(et,ft){if(!ft)return!1;var Et=ft.options.drag.startAxis;return et==="xy"||Et==="xy"||Et===et}(I,Ae)&&gn.validateAction(at,Ae,G,i,t))return Ae}}};N.element(G);){var ze=t.interactables.forEachMatch(G,ve);if(ze){a.prepared.name="drag",a.interactable=ze,a.element=G;break}G=it(G)}}}}}};function mn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var a=n.interactable.options;return a[t].hold||a[t].delay}var Mn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(gn),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,a=mn(t);a>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},a))},"interactions:move":function(n){var t=n.interaction,a=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!a&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;mn(t)>0&&(t.prepared.name=null)}},getHoldDuration:mn},Fn=Mn,Rn={id:"auto-start",install:function(n){n.usePlugin(gn),n.usePlugin(Fn),n.usePlugin(zn)}},Pn=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):N.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function Ln(n){var t=n.interaction,a=n.event;t.interactable&&t.interactable.checkAndPreventDefault(a)}var _n={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=Pn,t.prototype.checkAndPreventDefault=function(a){return function(i,s,d){var v=i.options.preventDefault;if(v!=="never")if(v!=="always"){if(s.events.supportsPassive&&/^touch(start|move)$/.test(d.type)){var m=F(d.target).document,B=s.getDocOptions(m);if(!B||!B.events||B.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(d.type)||N.element(d.target)&&q(d.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||d.preventDefault()}else d.preventDefault()}(this,n,a)},n.interactions.docEvents.push({type:"dragstart",listener:function(a){for(var i=0,s=n.interactions.list;i<s.length;i++){var d=s[i];if(d.element&&(d.element===a.target||fe(d.element,a.target)))return void d.interactable.checkAndPreventDefault(a)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=Ln,n},{})};function fn(n,t){if(t.phaselessTypes[n])return!0;for(var a in t.map)if(n.indexOf(a)===0&&n.substr(a.length)in t.phases)return!0;return!1}function sn(n){var t={};for(var a in n){var i=n[a];N.plainObject(i)?t[a]=sn(i):N.array(i)?t[a]=he(i):t[a]=i}return t}var yn=function(){function n(t){u(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=hn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(n,[{key:"start",value:function(t,a){var i,s,d=t.phase,v=this.interaction,m=function(P){var I=P.interactable.options[P.prepared.name],G=I.modifiers;return G&&G.length?G:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(ve){var ze=I[ve];return ze&&ze.enabled&&{options:ze,methods:ze._methods}}).filter(function(ve){return!!ve})}(v);this.prepareStates(m),this.startEdges=T({},v.edges),this.edges=T({},this.startEdges),this.startOffset=(i=v.rect,s=a,i?{left:s.x-i.left,top:s.y-i.top,right:i.right-s.x,bottom:i.bottom-s.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var B=this.fillArg({phase:d,pageCoords:a,preEnd:!1});return this.result=hn(),this.startAll(B),this.result=this.setAll(B)}},{key:"fillArg",value:function(t){var a=this.interaction;return t.interaction=a,t.interactable=a.interactable,t.element=a.element,t.rect||(t.rect=a.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var a=0,i=this.states;a<i.length;a++){var s=i[a];s.methods.start&&(t.state=s,s.methods.start(t))}}},{key:"setAll",value:function(t){var a=t.phase,i=t.preEnd,s=t.skipModifiers,d=t.rect,v=t.edges;t.coords=T({},t.pageCoords),t.rect=T({},d),t.edges=T({},v);for(var m=s?this.states.slice(s):this.states,B=hn(t.coords,t.rect),P=0;P<m.length;P++){var I,G=m[P],ve=G.options,ze=T({},t.coords),Ae=null;(I=G.methods)!=null&&I.set&&this.shouldDo(ve,i,a)&&(t.state=G,Ae=G.methods.set(t),J(t.edges,t.rect,{x:t.coords.x-ze.x,y:t.coords.y-ze.y})),B.eventProps.push(Ae)}T(this.edges,t.edges),B.delta.x=t.coords.x-t.pageCoords.x,B.delta.y=t.coords.y-t.pageCoords.y,B.rectDelta.left=t.rect.left-d.left,B.rectDelta.right=t.rect.right-d.right,B.rectDelta.top=t.rect.top-d.top,B.rectDelta.bottom=t.rect.bottom-d.bottom;var $e=this.result.coords,at=this.result.rect;if($e&&at){var et=B.rect.left!==at.left||B.rect.right!==at.right||B.rect.top!==at.top||B.rect.bottom!==at.bottom;B.changed=et||$e.x!==B.coords.x||$e.y!==B.coords.y}return B}},{key:"applyToInteraction",value:function(t){var a=this.interaction,i=t.phase,s=a.coords.cur,d=a.coords.start,v=this.result,m=this.startDelta,B=v.delta;i==="start"&&T(this.startDelta,v.delta);for(var P=0,I=[[d,m],[s,B]];P<I.length;P++){var G=I[P],ve=G[0],ze=G[1];ve.page.x+=ze.x,ve.page.y+=ze.y,ve.client.x+=ze.x,ve.client.y+=ze.y}var Ae=this.result.rectDelta,$e=t.rect||a.rect;$e.left+=Ae.left,$e.right+=Ae.right,$e.top+=Ae.top,$e.bottom+=Ae.bottom,$e.width=$e.right-$e.left,$e.height=$e.bottom-$e.top}},{key:"setAndApply",value:function(t){var a=this.interaction,i=t.phase,s=t.preEnd,d=t.skipModifiers,v=this.setAll(this.fillArg({preEnd:s,phase:i,pageCoords:t.modifiedCoords||a.coords.cur.page}));if(this.result=v,!v.changed&&(!d||d<this.states.length)&&a.interacting())return!1;if(t.modifiedCoords){var m=a.coords.cur.page,B={x:t.modifiedCoords.x-m.x,y:t.modifiedCoords.y-m.y};v.coords.x+=B.x,v.coords.y+=B.y,v.delta.x+=B.x,v.delta.y+=B.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var a=t.interaction,i=t.event,s=this.states;if(s&&s.length){for(var d=!1,v=0;v<s.length;v++){var m=s[v];t.state=m;var B=m.options,P=m.methods,I=P.beforeEnd&&P.beforeEnd(t);if(I)return this.endResult=I,!1;d=d||!d&&this.shouldDo(B,!0,t.phase,!0)}d&&a.move({event:i,preEnd:!0})}}},{key:"stop",value:function(t){var a=t.interaction;if(this.states&&this.states.length){var i=T({states:this.states,interactable:a.interactable,element:a.element,rect:null},t);this.fillArg(i);for(var s=0,d=this.states;s<d.length;s++){var v=d[s];i.state=v,v.methods.stop&&v.methods.stop(i)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var a=0;a<t.length;a++){var i=t[a],s=i.options,d=i.methods,v=i.name;this.states.push({options:s,methods:d,index:a,name:v})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var a=t.interaction,i=a.coords,s=a.rect,d=a.modification;if(d.result){for(var v=d.startDelta,m=d.result,B=m.delta,P=m.rectDelta,I=0,G=[[i.start,v],[i.cur,B]];I<G.length;I++){var ve=G[I],ze=ve[0],Ae=ve[1];ze.page.x-=Ae.x,ze.page.y-=Ae.y,ze.client.x-=Ae.x,ze.client.y-=Ae.y}s.left-=P.left,s.right-=P.right,s.top-=P.top,s.bottom-=P.bottom}}},{key:"shouldDo",value:function(t,a,i,s){return!(!t||t.enabled===!1||s&&!t.endOnly||t.endOnly&&!a||i==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(a){return sn(a)}),this.result=hn(T({},t.result.coords),T({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function hn(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 tn(n,t){var a=n.defaults,i={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},s=function(d){var v=d||{};for(var m in v.enabled=v.enabled!==!1,a)m in v||(v[m]=a[m]);var B={options:v,methods:i,name:t,enable:function(){return v.enabled=!0,B},disable:function(){return v.enabled=!1,B}};return B};return t&&typeof t=="string"&&(s._defaults=a,s._methods=i),s}function un(n){var t=n.iEvent,a=n.interaction.modification.result;a&&(t.modifiers=a.eventProps)}var $n={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new yn(t)},"interactions:before-action-start":function(n){var t=n.interaction,a=n.interaction.modification;a.start(n,t.coords.start.page),t.edges=a.edges,a.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,a=t.modification,i=a.setAndApply(n);return t.edges=a.edges,i},"interactions:before-action-end":function(n){var t=n.interaction,a=t.modification,i=a.beforeEnd(n);return t.edges=a.startEdges,i},"interactions:action-start":un,"interactions:action-move":un,"interactions:action-end":un,"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)}}},En=$n,Sn={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},bn=function(n){C(a,n);var t=Q(a);function a(i,s,d,v,m,B,P){var I;u(this,a),(I=t.call(this,i)).relatedTarget=null,I.screenX=void 0,I.screenY=void 0,I.button=void 0,I.buttons=void 0,I.ctrlKey=void 0,I.shiftKey=void 0,I.altKey=void 0,I.metaKey=void 0,I.page=void 0,I.client=void 0,I.delta=void 0,I.rect=void 0,I.x0=void 0,I.y0=void 0,I.t0=void 0,I.dt=void 0,I.duration=void 0,I.clientX0=void 0,I.clientY0=void 0,I.velocity=void 0,I.speed=void 0,I.swipe=void 0,I.axes=void 0,I.preEnd=void 0,m=m||i.element;var G=i.interactable,ve=(G&&G.options||Sn).deltaSource,ze=oe(G,m,d),Ae=v==="start",$e=v==="end",at=Ae?R(I):i.prevEvent,et=Ae?i.coords.start:$e?{page:at.page,client:at.client,timeStamp:i.coords.cur.timeStamp}:i.coords.cur;return I.page=T({},et.page),I.client=T({},et.client),I.rect=T({},i.rect),I.timeStamp=et.timeStamp,$e||(I.page.x-=ze.x,I.page.y-=ze.y,I.client.x-=ze.x,I.client.y-=ze.y),I.ctrlKey=s.ctrlKey,I.altKey=s.altKey,I.shiftKey=s.shiftKey,I.metaKey=s.metaKey,I.button=s.button,I.buttons=s.buttons,I.target=m,I.currentTarget=m,I.preEnd=B,I.type=P||d+(v||""),I.interactable=G,I.t0=Ae?i.pointers[i.pointers.length-1].downTime:at.t0,I.x0=i.coords.start.page.x-ze.x,I.y0=i.coords.start.page.y-ze.y,I.clientX0=i.coords.start.client.x-ze.x,I.clientY0=i.coords.start.client.y-ze.y,I.delta=Ae||$e?{x:0,y:0}:{x:I[ve].x-at[ve].x,y:I[ve].y-at[ve].y},I.dt=i.coords.delta.timeStamp,I.duration=I.timeStamp-I.t0,I.velocity=T({},i.coords.velocity[ve]),I.speed=ut(I.velocity.x,I.velocity.y),I.swipe=$e||v==="inertiastart"?I.getSwipe():null,I}return g(a,[{key:"getSwipe",value:function(){var i=this._interaction;if(i.prevEvent.speed<600||this.timeStamp-i.prevEvent.timeStamp>150)return null;var s=180*Math.atan2(i.prevEvent.velocityY,i.prevEvent.velocityX)/Math.PI;s<0&&(s+=360);var d=112.5<=s&&s<247.5,v=202.5<=s&&s<337.5;return{up:v,down:!v&&22.5<=s&&s<157.5,left:d,right:!d&&(292.5<=s||s<67.5),angle:s,speed:i.prevEvent.speed,velocity:{x:i.prevEvent.velocityX,y:i.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),a}(de);Object.defineProperties(bn.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 jn=g(function n(t,a,i,s,d){u(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=a,this.event=i,this.downTime=s,this.downTarget=d}),Un=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Tn=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Kn=0,Wn=function(){function n(t){var a=this,i=t.pointerType,s=t.scopeFire;u(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=st(function(I){this.move(I)},"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=Kn++,this._scopeFire=s,this.pointerType=i;var d=this;this._proxy={};var v=function(I){Object.defineProperty(a._proxy,I,{get:function(){return d[I]}})};for(var m in Un)v(m);var B=function(I){Object.defineProperty(a._proxy,I,{value:function(){return d[I].apply(d,arguments)}})};for(var P in Tn)B(P);this._scopeFire("interactions:new",{interaction:this})}return g(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,a,i){var s=this.updatePointer(t,a,i,!0),d=this.pointers[s];this._scopeFire("interactions:down",{pointer:t,event:a,eventTarget:i,pointerIndex:s,pointerInfo:d,type:"down",interaction:this})}},{key:"start",value:function(t,a,i){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!a.options[t.name].enabled)&&(pt(this.prepared,t),this.interactable=a,this.element=i,this.rect=a.getRect(i),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,a,i){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,a,i,!1);var s,d,v=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(s=this.coords.cur.client.x-this.coords.start.client.x,d=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ut(s,d)>this.pointerMoveTolerance);var m,B,P,I=this.getPointerIndex(t),G={pointer:t,pointerIndex:I,pointerInfo:this.pointers[I],event:a,type:"move",eventTarget:i,dx:s,dy:d,duplicate:v,interaction:this};v||(m=this.coords.velocity,B=this.coords.delta,P=Math.max(B.timeStamp/1e3,.001),m.page.x=B.page.x/P,m.page.y=B.page.y/P,m.client.x=B.client.x/P,m.client.y=B.client.y/P,m.timeStamp=P),this._scopeFire("interactions:move",G),v||this.simulation||(this.interacting()&&(G.type=null,this.move(G)),this.pointerWasMoved&&j(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||X(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,a,i,s){var d=this.getPointerIndex(t);d===-1&&(d=this.updatePointer(t,a,i,!1));var v=/cancel$/i.test(a.type)?"cancel":"up";this._scopeFire("interactions:".concat(v),{pointer:t,pointerIndex:d,pointerInfo:this.pointers[d],event:a,eventTarget:i,type:v,curEventTarget:s,interaction:this}),this.simulation||this.end(a),this.removePointer(t,a)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var a;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(a=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,a===!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 a=_(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:$(this.pointers,function(i){return i.id===a})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,a,i,s){var d,v,m,B=_(t),P=this.getPointerIndex(t),I=this.pointers[P];return s=s!==!1&&(s||/(down|start)$/i.test(a.type)),I?I.pointer=t:(I=new jn(B,t,a,null,null),P=this.pointers.length,this.pointers.push(I)),Z(this.coords.cur,this.pointers.map(function(G){return G.pointer}),this._now()),d=this.coords.delta,v=this.coords.prev,m=this.coords.cur,d.page.x=m.page.x-v.page.x,d.page.y=m.page.y-v.page.y,d.client.x=m.client.x-v.client.x,d.client.y=m.client.y-v.client.y,d.timeStamp=m.timeStamp-v.timeStamp,s&&(this.pointerIsDown=!0,I.downTime=this.coords.cur.timeStamp,I.downTarget=i,D(this.downPointer,t),this.interacting()||(j(this.coords.start,this.coords.cur),j(this.coords.prev,this.coords.cur),this.downEvent=a,this.pointerWasMoved=!1)),this._updateLatestPointer(t,a,i),this._scopeFire("interactions:update-pointer",{pointer:t,event:a,eventTarget:i,down:s,pointerInfo:I,pointerIndex:P,interaction:this}),P}},{key:"removePointer",value:function(t,a){var i=this.getPointerIndex(t);if(i!==-1){var s=this.pointers[i];this._scopeFire("interactions:remove-pointer",{pointer:t,event:a,eventTarget:null,pointerIndex:i,pointerInfo:s,interaction:this}),this.pointers.splice(i,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,a,i){this._latestPointer.pointer=t,this._latestPointer.event=a,this._latestPointer.eventTarget=i}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,a,i,s){return new bn(this,t,this.prepared.name,a,this.element,i,s)}},{key:"_fireEvent",value:function(t){var a;(a=this.interactable)==null||a.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var a=t.event,i=t.phase,s=t.preEnd,d=t.type,v=this.rect;if(v&&i==="move"&&(J(this.edges,v,this.coords.delta[this.interactable.options.deltaSource]),v.width=v.right-v.left,v.height=v.bottom-v.top),this._scopeFire("interactions:before-action-".concat(i),t)===!1)return!1;var m=t.iEvent=this._createPreparedEvent(a,i,s,d);return this._scopeFire("interactions:action-".concat(i),t),i==="start"&&(this.prevEvent=m),this._fireEvent(m),this._scopeFire("interactions:after-action-".concat(i),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function _t(n){Xt(n.interaction)}function Xt(n){if(!function(a){return!(!a.offset.pending.x&&!a.offset.pending.y)}(n))return!1;var t=n.offset.pending;return Ot(n.coords.cur,t),Ot(n.coords.delta,t),J(n.edges,n.rect,t),t.x=0,t.y=0,!0}function mt(n){var t=n.x,a=n.y;this.offset.pending.x+=t,this.offset.pending.y+=a,this.offset.total.x+=t,this.offset.total.y+=a}function Ot(n,t){var a=n.page,i=n.client,s=t.x,d=t.y;a.x+=s,a.y+=d,i.x+=s,i.y+=d}Tn.offsetBy="";var bt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=mt},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&&(Ot(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":_t,"interactions:before-action-move":_t,"interactions:before-action-end":function(n){var t=n.interaction;if(Xt(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}}},Kt=bt,Dt=function(){function n(t){u(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 g(n,[{key:"start",value:function(t){var a=this.interaction,i=Ct(a);if(!i||!i.enabled)return!1;var s=a.coords.velocity.client,d=ut(s.x,s.y),v=this.modification||(this.modification=new yn(a));if(v.copyFrom(a.modification),this.t0=a._now(),this.allowResume=i.allowResume,this.v0=d,this.currentOffset={x:0,y:0},this.startCoords=a.coords.cur.page,this.modifierArg=v.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-a.coords.cur.timeStamp<50&&d>i.minSpeed&&d>i.endSpeed)this.startInertia();else{if(v.result=v.setAll(this.modifierArg),!v.result.changed)return!1;this.startSmoothEnd()}return a.modification.result.rect=null,a.offsetBy(this.targetOffset),a._doPhase({interaction:a,event:t,phase:"inertiastart"}),a.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),a.modification.result.rect=null,this.active=!0,a.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,a=this.interaction.coords.velocity.client,i=Ct(this.interaction),s=i.resistance,d=-Math.log(i.endSpeed/this.v0)/s;this.targetOffset={x:(a.x-d)/s,y:(a.y-d)/s},this.te=d,this.lambda_v0=s/this.v0,this.one_ve_v0=1-i.endSpeed/this.v0;var v=this.modification,m=this.modifierArg;m.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},v.result=v.setAll(m),v.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+v.result.delta.x,y:this.targetOffset.y+v.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 a=this;this.timeout=Le.request(function(){a.active&&t()})}},{key:"inertiaTick",value:function(){var t,a,i,s,d,v,m,B=this,P=this.interaction,I=Ct(P).resistance,G=(P._now()-this.t0)/1e3;if(G<this.te){var ve,ze=1-(Math.exp(-I*G)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,a=0,i=this.targetOffset.x,s=this.targetOffset.y,d=this.modifiedOffset.x,v=this.modifiedOffset.y,ve={x:At(m=ze,t,i,d),y:At(m,a,s,v)}):ve={x:this.targetOffset.x*ze,y:this.targetOffset.y*ze};var Ae={x:ve.x-this.currentOffset.x,y:ve.y-this.currentOffset.y};this.currentOffset.x+=Ae.x,this.currentOffset.y+=Ae.y,P.offsetBy(Ae),P.move(),this.onNextFrame(function(){return B.inertiaTick()})}else P.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,a=this.interaction,i=a._now()-this.t0,s=Ct(a).smoothEndDuration;if(i<s){var d={x:Ft(i,0,this.targetOffset.x,s),y:Ft(i,0,this.targetOffset.y,s)},v={x:d.x-this.currentOffset.x,y:d.y-this.currentOffset.y};this.currentOffset.x+=v.x,this.currentOffset.y+=v.y,a.offsetBy(v),a.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else a.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var a=t.pointer,i=t.event,s=t.eventTarget,d=this.interaction;d.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),d.updatePointer(a,i,s,!0),d._doPhase({interaction:d,event:i,phase:"resume"}),j(d.coords.prev,d.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Le.cancel(this.timeout)}}]),n}();function Ct(n){var t=n.interactable,a=n.prepared;return t&&t.options&&a.name&&t.options[a.name].inertia}var Mt={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(Kt),n.usePlugin(En),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 Dt(t)},"interactions:before-action-end":function(n){var t=n.interaction,a=n.event;return(!t._interacting||t.simulation||!t.inertia.start(a))&&null},"interactions:down":function(n){var t=n.interaction,a=n.eventTarget,i=t.inertia;if(i.active)for(var s=a;N.element(s);){if(s===t.element){i.resume(n);break}s=it(s)}},"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":un,"interactions:action-inertiastart":un,"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 At(n,t,a,i){var s=1-n;return s*s*t+2*s*n*a+n*n*i}function Ft(n,t,a,i){return-a*(n/=i)*(n-2)+t}var Ht=Mt;function nn(n,t){for(var a=0;a<t.length;a++){var i=t[a];if(n.immediatePropagationStopped)break;i(n)}}var Bn=function(){function n(t){u(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=T({},t||{})}return g(n,[{key:"fire",value:function(t){var a,i=this.global;(a=this.types[t.type])&&nn(t,a),!t.propagationStopped&&i&&(a=i[t.type])&&nn(t,a)}},{key:"on",value:function(t,a){var i=we(t,a);for(t in i)this.types[t]=ye(this.types[t]||[],i[t])}},{key:"off",value:function(t,a){var i=we(t,a);for(t in i){var s=this.types[t];if(s&&s.length)for(var d=0,v=i[t];d<v.length;d++){var m=v[d],B=s.indexOf(m);B!==-1&&s.splice(B,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Hn=function(){function n(t){u(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,D(this,t)}return g(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function In(n){return N.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function qn(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var xa={id:"events",install:function(n){var t,a=[],i={},s=[],d={add:v,remove:m,addDelegate:function(I,G,ve,ze,Ae){var $e=In(Ae);if(!i[ve]){i[ve]=[];for(var at=0;at<s.length;at++){var et=s[at];v(et,ve,B),v(et,ve,P,!0)}}var ft=i[ve],Et=Ne(ft,function(Nt){return Nt.selector===I&&Nt.context===G});Et||(Et={selector:I,context:G,listeners:[]},ft.push(Et)),Et.listeners.push({func:ze,options:$e})},removeDelegate:function(I,G,ve,ze,Ae){var $e,at=In(Ae),et=i[ve],ft=!1;if(et)for($e=et.length-1;$e>=0;$e--){var Et=et[$e];if(Et.selector===I&&Et.context===G){for(var Nt=Et.listeners,kt=Nt.length-1;kt>=0;kt--){var St=Nt[kt];if(St.func===ze&&qn(St.options,at)){Nt.splice(kt,1),Nt.length||(et.splice($e,1),m(G,ve,B),m(G,ve,P,!0)),ft=!0;break}}if(ft)break}}},delegateListener:B,delegateUseCapture:P,delegatedEvents:i,documents:s,targets:a,supportsOptions:!1,supportsPassive:!1};function v(I,G,ve,ze){if(I.addEventListener){var Ae=In(ze),$e=Ne(a,function(at){return at.eventTarget===I});$e||($e={eventTarget:I,events:{}},a.push($e)),$e.events[G]||($e.events[G]=[]),Ne($e.events[G],function(at){return at.func===ve&&qn(at.options,Ae)})||(I.addEventListener(G,ve,d.supportsOptions?Ae:Ae.capture),$e.events[G].push({func:ve,options:Ae}))}}function m(I,G,ve,ze){if(I.addEventListener&&I.removeEventListener){var Ae=$(a,function(Zt){return Zt.eventTarget===I}),$e=a[Ae];if($e&&$e.events)if(G!=="all"){var at=!1,et=$e.events[G];if(et){if(ve==="all"){for(var ft=et.length-1;ft>=0;ft--){var Et=et[ft];m(I,G,Et.func,Et.options)}return}for(var Nt=In(ze),kt=0;kt<et.length;kt++){var St=et[kt];if(St.func===ve&&qn(St.options,Nt)){I.removeEventListener(G,ve,d.supportsOptions?Nt:Nt.capture),et.splice(kt,1),et.length===0&&(delete $e.events[G],at=!0);break}}}at&&!Object.keys($e.events).length&&a.splice(Ae,1)}else for(G in $e.events)$e.events.hasOwnProperty(G)&&m(I,G,"all")}}function B(I,G){for(var ve=In(G),ze=new Hn(I),Ae=i[I.type],$e=le(I)[0],at=$e;N.element(at);){for(var et=0;et<Ae.length;et++){var ft=Ae[et],Et=ft.selector,Nt=ft.context;if(q(at,Et)&&fe(Nt,$e)&&fe(Nt,at)){var kt=ft.listeners;ze.currentTarget=at;for(var St=0;St<kt.length;St++){var Zt=kt[St];qn(Zt.options,ve)&&Zt.func(ze)}}}at=it(at)}}function P(I){return B(I,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return d.supportsOptions=!0},get passive(){return d.supportsPassive=!0}}),n.events=d,d}},na={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,a=na.methodOrder;t<a.length;t++){var i=a[t],s=na[i](n);if(s)return s}return null},simulationResume:function(n){var t=n.pointerType,a=n.eventType,i=n.eventTarget,s=n.scope;if(!/down|start/i.test(a))return null;for(var d=0,v=s.interactions.list;d<v.length;d++){var m=v[d],B=i;if(m.simulation&&m.simulation.allowResume&&m.pointerType===t)for(;B;){if(B===m.element)return m;B=it(B)}}return null},mouseOrPen:function(n){var t,a=n.pointerId,i=n.pointerType,s=n.eventType,d=n.scope;if(i!=="mouse"&&i!=="pen")return null;for(var v=0,m=d.interactions.list;v<m.length;v++){var B=m[v];if(B.pointerType===i){if(B.simulation&&!ca(B,a))continue;if(B.interacting())return B;t||(t=B)}}if(t)return t;for(var P=0,I=d.interactions.list;P<I.length;P++){var G=I[P];if(!(G.pointerType!==i||/down/i.test(s)&&G.simulation))return G}return null},hasPointer:function(n){for(var t=n.pointerId,a=0,i=n.scope.interactions.list;a<i.length;a++){var s=i[a];if(ca(s,t))return s}return null},idle:function(n){for(var t=n.pointerType,a=0,i=n.scope.interactions.list;a<i.length;a++){var s=i[a];if(s.pointers.length===1){var d=s.interactable;if(d&&(!d.options.gesture||!d.options.gesture.enabled))continue}else if(s.pointers.length>=2)continue;if(!s.interacting()&&t===s.pointerType)return s}return null}};function ca(n,t){return n.pointers.some(function(a){return a.id===t})}var aa=na,cn=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Gn(n,t){return function(a){var i=t.interactions.list,s=Y(a),d=le(a),v=d[0],m=d[1],B=[];if(/^touch/.test(a.type)){t.prevTouchTime=t.now();for(var P=0,I=a.changedTouches;P<I.length;P++){var G=I[P],ve={pointer:G,pointerId:_(G),pointerType:s,eventType:a.type,eventTarget:v,curEventTarget:m,scope:t},ze=oa(ve);B.push([ve.pointer,ve.eventTarget,ve.curEventTarget,ze])}}else{var Ae=!1;if(!re.supportsPointerEvent&&/mouse/.test(a.type)){for(var $e=0;$e<i.length&&!Ae;$e++)Ae=i[$e].pointerType!=="mouse"&&i[$e].pointerIsDown;Ae=Ae||t.now()-t.prevTouchTime<500||a.timeStamp===0}if(!Ae){var at={pointer:a,pointerId:_(a),pointerType:s,eventType:a.type,curEventTarget:m,eventTarget:v,scope:t},et=oa(at);B.push([at.pointer,at.eventTarget,at.curEventTarget,et])}}for(var ft=0;ft<B.length;ft++){var Et=B[ft],Nt=Et[0],kt=Et[1],St=Et[2];Et[3][n](Nt,a,kt,St)}}}function oa(n){var t=n.pointerType,a=n.scope,i={interaction:aa.search(n),searchDetails:n};return a.fire("interactions:find",i),i.interaction||a.interactions.new({pointerType:t})}function an(n,t){var a=n.doc,i=n.scope,s=n.options,d=i.interactions.docEvents,v=i.events,m=v[t];for(var B in i.browser.isIOS&&!s.events&&(s.events={passive:!1}),v.delegatedEvents)m(a,B,v.delegateListener),m(a,B,v.delegateUseCapture,!0);for(var P=s&&s.events,I=0;I<d.length;I++){var G=d[I];m(a,G.type,G.listener,P)}}var wa={id:"core/interactions",install:function(n){for(var t={},a=0;a<cn.length;a++){var i=cn[a];t[i]=Gn(i,n)}var s,d=re.pEventTypes;function v(){for(var m=0,B=n.interactions.list;m<B.length;m++){var P=B[m];if(P.pointerIsDown&&P.pointerType==="touch"&&!P._interacting)for(var I=function(){var ze=ve[G];n.documents.some(function(Ae){return fe(Ae.doc,ze.downTarget)})||P.removePointer(ze.pointer,ze.event)},G=0,ve=P.pointers;G<ve.length;G++)I()}}(s=z.PointerEvent?[{type:d.down,listener:v},{type:d.down,listener:t.pointerDown},{type:d.move,listener:t.pointerMove},{type:d.up,listener:t.pointerUp},{type:d.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:v},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(m){for(var B=0,P=n.interactions.list;B<P.length;B++)P[B].documentBlur(m)}}),n.prevTouchTime=0,n.Interaction=function(m){C(P,m);var B=Q(P);function P(){return u(this,P),B.apply(this,arguments)}return g(P,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(I){n.interactions.pointerMoveTolerance=I}},{key:"_now",value:function(){return n.now()}}]),P}(Wn),n.interactions={list:[],new:function(m){m.scopeFire=function(P,I){return n.fire(P,I)};var B=new n.Interaction(m);return n.interactions.list.push(B),B},listeners:t,docEvents:s,pointerMoveTolerance:1},n.usePlugin(_n)},listeners:{"scope:add-document":function(n){return an(n,"add")},"scope:remove-document":function(n){return an(n,"remove")},"interactable:unset":function(n,t){for(var a=n.interactable,i=t.interactions.list.length-1;i>=0;i--){var s=t.interactions.list[i];s.interactable===a&&(s.stop(),t.fire("interactions:destroy",{interaction:s}),s.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(i,1))}}},onDocSignal:an,doOnInteractions:Gn,methodNames:cn},Nn=wa,Vn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(Vn||{}),Gr=function(){function n(t,a,i,s){u(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Bn,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=a.actions,this.target=t,this._context=a.context||i,this._win=F(xe(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=s,this.set(a)}return g(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,a){return N.func(a.onstart)&&this.on("".concat(t,"start"),a.onstart),N.func(a.onmove)&&this.on("".concat(t,"move"),a.onmove),N.func(a.onend)&&this.on("".concat(t,"end"),a.onend),N.func(a.oninertiastart)&&this.on("".concat(t,"inertiastart"),a.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,a,i){var s,d=this,v=(s=this._actions.map[t])==null?void 0:s.filterEventType,m=function(B){return(v==null||v(B))&&fn(B,d._actions)};(N.array(a)||N.object(a))&&this._onOff(Vn.Off,t,a,void 0,m),(N.array(i)||N.object(i))&&this._onOff(Vn.On,t,i,void 0,m)}},{key:"setPerAction",value:function(t,a){var i=this._defaults;for(var s in a){var d=s,v=this.options[t],m=a[d];d==="listeners"&&this.updatePerActionListeners(t,v.listeners,m),N.array(m)?v[d]=he(m):N.plainObject(m)?(v[d]=T(v[d]||{},sn(m)),N.object(i.perAction[d])&&"enabled"in i.perAction[d]&&(v[d].enabled=m.enabled!==!1)):N.bool(m)&&N.object(i.perAction[d])?v[d].enabled=m:v[d]=m}}},{key:"getRect",value:function(t){return t=t||(N.element(this.target)?this.target:null),N.string(this.target)&&(t=t||this._context.querySelector(this.target)),Ze(t)}},{key:"rectChecker",value:function(t){var a=this;return N.func(t)?(this.getRect=function(i){var s=T({},t.apply(a,i));return"width"in s||(s.width=s.right-s.left,s.height=s.bottom-s.top),s},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,a){if(xe(a)||N.object(a)){for(var i in this.options[t]=a,this._actions.map)this.options[i][t]=a;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 N.string(t)?Array.from(this._context.querySelectorAll(t)):N.func(t)&&t.getAllElements?t.getAllElements():N.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,a,i){return!this.testIgnore(t.ignoreFrom,a,i)&&this.testAllow(t.allowFrom,a,i)}},{key:"testAllow",value:function(t,a,i){return!t||!!N.element(i)&&(N.string(t)?me(i,t,a):!!N.element(t)&&fe(t,i))}},{key:"testIgnore",value:function(t,a,i){return!(!t||!N.element(i))&&(N.string(t)?me(i,t,a):!!N.element(t)&&fe(t,i))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,a,i,s,d){N.object(a)&&!N.array(a)&&(s=i,i=null);var v=we(a,i,d);for(var m in v){m==="wheel"&&(m=re.wheelEvent);for(var B=0,P=v[m];B<P.length;B++){var I=P[B];fn(m,this._actions)?this.events[t===Vn.On?"on":"off"](m,I):N.string(this.target)?this._scopeEvents[t===Vn.On?"addDelegate":"removeDelegate"](this.target,this._context,m,I,s):this._scopeEvents[t===Vn.On?"add":"remove"](this.target,m,I,s)}}return this}},{key:"on",value:function(t,a,i){return this._onOff(Vn.On,t,a,i)}},{key:"off",value:function(t,a,i){return this._onOff(Vn.Off,t,a,i)}},{key:"set",value:function(t){var a=this._defaults;for(var i in N.object(t)||(t={}),this.options=sn(a.base),this._actions.methodDict){var s=i,d=this._actions.methodDict[s];this.options[s]={},this.setPerAction(s,T(T({},a.perAction),a.actions[s])),this[d](t[s])}for(var v in t)v!=="getRect"?N.func(this[v])&&this[v](t[v]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(N.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var a=this._scopeEvents.delegatedEvents[t],i=a.length-1;i>=0;i--){var s=a[i],d=s.selector,v=s.context,m=s.listeners;d===this.target&&v===this._context&&a.splice(i,1);for(var B=m.length-1;B>=0;B--)this._scopeEvents.removeDelegate(this.target,this._context,t,m[B][0],m[B][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),Xr=function(){function n(t){var a=this;u(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(i){var s=i.interactable,d=s.target,v=N.string(d)?a.selectorMap[d]:d[a.scope.id],m=$(v,function(B){return B===s});v.splice(m,1)}})}return g(n,[{key:"new",value:function(t,a){a=T(a||{},{actions:this.scope.actions});var i=new this.scope.Interactable(t,a,this.scope.document,this.scope.events);return this.scope.addDocument(i._doc),this.list.push(i),N.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(i)):(i.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(i)),this.scope.fire("interactable:new",{target:t,options:a,interactable:i,win:this.scope._win}),i}},{key:"getExisting",value:function(t,a){var i=a&&a.context||this.scope.document,s=N.string(t),d=s?this.selectorMap[t]:t[this.scope.id];if(d)return Ne(d,function(v){return v._context===i&&(s||v.inContext(t))})}},{key:"forEachMatch",value:function(t,a){for(var i=0,s=this.list;i<s.length;i++){var d=s[i],v=void 0;if((N.string(d.target)?N.element(t)&&q(t,d.target):t===d.target)&&d.inContext(t)&&(v=a(d)),v!==void 0)return v}}}]),n}(),Yr=function(){function n(){var t=this;u(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=re,this.defaults=sn(Sn),this.Eventable=Bn,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(i){var s=function d(v,m){var B=i.interactables.getExisting(v,m);return B||((B=i.interactables.new(v,m)).events.global=d.globalEvents),B};return s.getPointerAverage=K,s.getTouchBBox=Ce,s.getTouchDistance=ae,s.getTouchAngle=W,s.getElementRect=Ze,s.getElementClientRect=Te,s.matchesSelector=q,s.closest=Ye,s.globalEvents={},s.version="1.10.27",s.scope=i,s.use=function(d,v){return this.scope.usePlugin(d,v),this},s.isSet=function(d,v){return!!this.scope.interactables.get(d,v&&v.context)},s.on=st(function(d,v,m){if(N.string(d)&&d.search(" ")!==-1&&(d=d.trim().split(/ +/)),N.array(d)){for(var B=0,P=d;B<P.length;B++){var I=P[B];this.on(I,v,m)}return this}if(N.object(d)){for(var G in d)this.on(G,d[G],v);return this}return fn(d,this.scope.actions)?this.globalEvents[d]?this.globalEvents[d].push(v):this.globalEvents[d]=[v]:this.scope.events.add(this.scope.document,d,v,{options:m}),this},"The interact.on() method is being deprecated"),s.off=st(function(d,v,m){if(N.string(d)&&d.search(" ")!==-1&&(d=d.trim().split(/ +/)),N.array(d)){for(var B=0,P=d;B<P.length;B++){var I=P[B];this.off(I,v,m)}return this}if(N.object(d)){for(var G in d)this.off(G,d[G],v);return this}var ve;return fn(d,this.scope.actions)?d in this.globalEvents&&(ve=this.globalEvents[d].indexOf(v))!==-1&&this.globalEvents[d].splice(ve,1):this.scope.events.remove(this.scope.document,d,v,m),this},"The interact.off() method is being deprecated"),s.debug=function(){return this.scope},s.supportsTouch=function(){return re.supportsTouch},s.supportsPointerEvent=function(){return re.supportsPointerEvent},s.stop=function(){for(var d=0,v=this.scope.interactions.list;d<v.length;d++)v[d].stop();return this},s.pointerMoveTolerance=function(d){return N.number(d)?(this.scope.interactions.pointerMoveTolerance=d,this):this.scope.interactions.pointerMoveTolerance},s.addDocument=function(d,v){this.scope.addDocument(d,v)},s.removeDocument=function(d){this.scope.removeDocument(d)},s}(this),this.InteractEvent=bn,this.Interactable=void 0,this.interactables=new Xr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(i){return t.removeDocument(i.target)};var a=this;this.Interactable=function(i){C(d,i);var s=Q(d);function d(){return u(this,d),s.apply(this,arguments)}return g(d,[{key:"_defaults",get:function(){return a.defaults}},{key:"set",value:function(v){return O(S(d.prototype),"set",this).call(this,v),a.fire("interactable:set",{options:v,interactable:this}),this}},{key:"unset",value:function(){O(S(d.prototype),"unset",this).call(this);var v=a.interactables.list.indexOf(this);v<0||(a.interactables.list.splice(v,1),a.fire("interactable:unset",{interactable:this}))}}]),d}(Gr)}return g(n,[{key:"addListeners",value:function(t,a){this.listenerMaps.push({id:a,map:t})}},{key:"fire",value:function(t,a){for(var i=0,s=this.listenerMaps;i<s.length;i++){var d=s[i].map[t];if(d&&d(a,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(a,i){return a.isInitialized=!0,N.window(i)&&x(i),z.init(i),re.init(i),Le.init(i),a.window=i,a.document=i.document,a.usePlugin(Nn),a.usePlugin(xa),a}(this,t)}},{key:"pluginIsInstalled",value:function(t){var a=t.id;return a?!!this._plugins.map[a]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,a){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,a),t.listeners&&t.before){for(var i=0,s=this.listenerMaps.length,d=t.before.reduce(function(m,B){return m[B]=!0,m[lo(B)]=!0,m},{});i<s;i++){var v=this.listenerMaps[i].id;if(v&&(d[v]||d[lo(v)]))break}this.listenerMaps.splice(i,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,a){if(this.getDocIndex(t)!==-1)return!1;var i=F(t);a=a?T({},a):{},this.documents.push({doc:t,options:a}),this.events.documents.push(t),t!==this.document&&this.events.add(i,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:i,scope:this,options:a})}},{key:"removeDocument",value:function(t){var a=this.getDocIndex(t),i=F(t),s=this.documents[a].options;this.events.remove(i,"unload",this.onWindowUnload),this.documents.splice(a,1),this.events.documents.splice(a,1),this.fire("scope:remove-document",{doc:t,window:i,scope:this,options:s})}},{key:"getDocIndex",value:function(t){for(var a=0;a<this.documents.length;a++)if(this.documents[a].doc===t)return a;return-1}},{key:"getDocOptions",value:function(t){var a=this.getDocIndex(t);return a===-1?null:this.documents[a].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function lo(n){return n&&n.replace(/\/.*$/,"")}var so=new Yr,Jt=so.interactStatic,Jr=typeof globalThis<"u"?globalThis:window;so.init(Jr);var Zr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(i){var s=i[0],d=i[1];return s in n||d in n}),a=function(i,s){for(var d=n.range,v=n.limits,m=v===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:v,B=n.offset,P=B===void 0?{x:0,y:0}:B,I={range:d,grid:n,x:null,y:null},G=0;G<t.length;G++){var ve=t[G],ze=ve[0],Ae=ve[1],$e=Math.round((i-P.x)/n[ze]),at=Math.round((s-P.y)/n[Ae]);I[ze]=Math.max(m.left,Math.min(m.right,$e*n[ze]+P.x)),I[Ae]=Math.max(m.top,Math.min(m.bottom,at*n[Ae]+P.y))}return I};return a.grid=n,a.coordFields=t,a}}),Qr={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=T(t.snappers||{},Zr),t.createSnapGrid=t.snappers.grid}},ei=Qr,ti={start:function(n){var t=n.state,a=n.rect,i=n.edges,s=n.pageCoords,d=t.options,v=d.ratio,m=d.enabled,B=t.options,P=B.equalDelta,I=B.modifiers;v==="preserve"&&(v=a.width/a.height),t.startCoords=T({},s),t.startRect=T({},a),t.ratio=v,t.equalDelta=P;var G=t.linkedEdges={top:i.top||i.left&&!i.bottom,left:i.left||i.top&&!i.right,bottom:i.bottom||i.right&&!i.top,right:i.right||i.bottom&&!i.left};if(t.xIsPrimaryAxis=!(!i.left&&!i.right),t.equalDelta){var ve=(G.left?1:-1)*(G.top?1:-1);t.edgeSign={x:ve,y:ve}}else t.edgeSign={x:G.left?-1:1,y:G.top?-1:1};if(m!==!1&&T(i,G),I!=null&&I.length){var ze=new yn(n.interaction);ze.copyFrom(n.interaction.modification),ze.prepareStates(I),t.subModification=ze,ze.startAll(r({},n))}},set:function(n){var t=n.state,a=n.rect,i=n.coords,s=t.linkedEdges,d=T({},i),v=t.equalDelta?ni:ai;if(T(n.edges,s),v(t,t.xIsPrimaryAxis,i,a),!t.subModification)return null;var m=T({},a);J(s,m,{x:i.x-d.x,y:i.y-d.y});var B=t.subModification.setAll(r(r({},n),{},{rect:m,edges:s,pageCoords:i,prevCoords:i,prevRect:m})),P=B.delta;return B.changed&&(v(t,Math.abs(P.x)>Math.abs(P.y),B.coords,B.rect),T(i,B.coords)),B.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function ni(n,t,a){var i=n.startCoords,s=n.edgeSign;t?a.y=i.y+(a.x-i.x)*s.y:a.x=i.x+(a.y-i.y)*s.x}function ai(n,t,a,i){var s=n.startRect,d=n.startCoords,v=n.ratio,m=n.edgeSign;if(t){var B=i.width/v;a.y=d.y+(B-s.height)*m.y}else{var P=i.height*v;a.x=d.x+(P-s.width)*m.x}}var oi=tn(ti,"aspectRatio"),co=function(){};co._defaults={};var Ca=co;function Xn(n,t,a){return N.func(n)?qe(n,t.interactable,t.element,[a.x,a.y,t]):qe(n,t.interactable,t.element)}var Da={start:function(n){var t=n.rect,a=n.startOffset,i=n.state,s=n.interaction,d=n.pageCoords,v=i.options,m=v.elementRect,B=T({left:0,top:0,right:0,bottom:0},v.offset||{});if(t&&m){var P=Xn(v.restriction,s,d);if(P){var I=P.right-P.left-t.width,G=P.bottom-P.top-t.height;I<0&&(B.left+=I,B.right+=I),G<0&&(B.top+=G,B.bottom+=G)}B.left+=a.left-t.width*m.left,B.top+=a.top-t.height*m.top,B.right+=a.right-t.width*(1-m.right),B.bottom+=a.bottom-t.height*(1-m.bottom)}i.offset=B},set:function(n){var t=n.coords,a=n.interaction,i=n.state,s=i.options,d=i.offset,v=Xn(s.restriction,a,t);if(v){var m=function(B){return!B||"left"in B&&"top"in B||((B=T({},B)).left=B.x||0,B.top=B.y||0,B.right=B.right||B.left+B.width,B.bottom=B.bottom||B.top+B.height),B}(v);t.x=Math.max(Math.min(m.right-d.right,t.x),m.left+d.left),t.y=Math.max(Math.min(m.bottom-d.bottom,t.y),m.top+d.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ri=tn(Da,"restrict"),uo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},po={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function fo(n,t){for(var a=0,i=["top","left","bottom","right"];a<i.length;a++){var s=i[a];s in n||(n[s]=t[s])}return n}var ua={noInner:uo,noOuter:po,start:function(n){var t,a=n.interaction,i=n.startOffset,s=n.state,d=s.options;d&&(t=Ee(Xn(d.offset,a,a.coords.start.page))),t=t||{x:0,y:0},s.offset={top:t.y+i.top,left:t.x+i.left,bottom:t.y-i.bottom,right:t.x-i.right}},set:function(n){var t=n.coords,a=n.edges,i=n.interaction,s=n.state,d=s.offset,v=s.options;if(a){var m=T({},t),B=Xn(v.inner,i,m)||{},P=Xn(v.outer,i,m)||{};fo(B,uo),fo(P,po),a.top?t.y=Math.min(Math.max(P.top+d.top,m.y),B.top+d.top):a.bottom&&(t.y=Math.max(Math.min(P.bottom+d.bottom,m.y),B.bottom+d.bottom)),a.left?t.x=Math.min(Math.max(P.left+d.left,m.x),B.left+d.left):a.right&&(t.x=Math.max(Math.min(P.right+d.right,m.x),B.right+d.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},ii=tn(ua,"restrictEdges"),li=T({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Da.defaults),si=tn({start:Da.start,set:Da.set,defaults:li},"restrictRect"),ci={width:-1/0,height:-1/0},ui={width:1/0,height:1/0},di=tn({start:function(n){return ua.start(n)},set:function(n){var t=n.interaction,a=n.state,i=n.rect,s=n.edges,d=a.options;if(s){var v=ne(Xn(d.min,t,n.coords))||ci,m=ne(Xn(d.max,t,n.coords))||ui;a.options={endOnly:d.endOnly,inner:T({},ua.noInner),outer:T({},ua.noOuter)},s.top?(a.options.inner.top=i.bottom-v.height,a.options.outer.top=i.bottom-m.height):s.bottom&&(a.options.inner.bottom=i.top+v.height,a.options.outer.bottom=i.top+m.height),s.left?(a.options.inner.left=i.right-v.width,a.options.outer.left=i.right-m.width):s.right&&(a.options.inner.right=i.left+v.width,a.options.outer.right=i.left+m.width),ua.set(n),a.options=d}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Ka={start:function(n){var t,a=n.interaction,i=n.interactable,s=n.element,d=n.rect,v=n.state,m=n.startOffset,B=v.options,P=B.offsetWithOrigin?function(ve){var ze=ve.interaction.element,Ae=Ee(qe(ve.state.options.origin,null,null,[ze])),$e=Ae||oe(ve.interactable,ze,ve.interaction.prepared.name);return $e}(n):{x:0,y:0};if(B.offset==="startCoords")t={x:a.coords.start.page.x,y:a.coords.start.page.y};else{var I=qe(B.offset,i,s,[a]);(t=Ee(I)||{x:0,y:0}).x+=P.x,t.y+=P.y}var G=B.relativePoints;v.offsets=d&&G&&G.length?G.map(function(ve,ze){return{index:ze,relativePoint:ve,x:m.left-d.width*ve.x+t.x,y:m.top-d.height*ve.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,a=n.coords,i=n.state,s=i.options,d=i.offsets,v=oe(t.interactable,t.element,t.prepared.name),m=T({},a),B=[];s.offsetWithOrigin||(m.x-=v.x,m.y-=v.y);for(var P=0,I=d;P<I.length;P++)for(var G=I[P],ve=m.x-G.x,ze=m.y-G.y,Ae=0,$e=s.targets.length;Ae<$e;Ae++){var at=s.targets[Ae],et=void 0;(et=N.func(at)?at(ve,ze,t._proxy,G,Ae):at)&&B.push({x:(N.number(et.x)?et.x:ve)+G.x,y:(N.number(et.y)?et.y:ze)+G.y,range:N.number(et.range)?et.range:s.range,source:at,index:Ae,offset:G})}for(var ft={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Et=0;Et<B.length;Et++){var Nt=B[Et],kt=Nt.range,St=Nt.x-m.x,Zt=Nt.y-m.y,$t=ut(St,Zt),on=$t<=kt;kt===1/0&&ft.inRange&&ft.range!==1/0&&(on=!1),ft.target&&!(on?ft.inRange&&kt!==1/0?$t/kt<ft.distance/ft.range:kt===1/0&&ft.range!==1/0||$t<ft.distance:!ft.inRange&&$t<ft.distance)||(ft.target=Nt,ft.distance=$t,ft.range=kt,ft.inRange=on,ft.delta.x=St,ft.delta.y=Zt)}return ft.inRange&&(a.x=ft.target.x,a.y=ft.target.y),i.closest=ft,ft},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},pi=tn(Ka,"snap"),_a={start:function(n){var t=n.state,a=n.edges,i=t.options;if(!a)return null;n.state={options:{targets:null,relativePoints:[{x:a.left?0:1,y:a.top?0:1}],offset:i.offset||"self",origin:{x:0,y:0},range:i.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],Ka.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,a=n.state,i=n.coords,s=a.options,d=a.offsets,v={x:i.x-d[0].x,y:i.y-d[0].y};a.options=T({},s),a.options.targets=[];for(var m=0,B=s.targets||[];m<B.length;m++){var P=B[m],I=void 0;if(I=N.func(P)?P(v.x,v.y,t):P){for(var G=0,ve=a.targetFields;G<ve.length;G++){var ze=ve[G],Ae=ze[0],$e=ze[1];if(Ae in I||$e in I){I.x=I[Ae],I.y=I[$e];break}}a.options.targets.push(I)}}var at=Ka.set(n);return a.options=s,at},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},fi=tn(_a,"snapSize"),Wa={aspectRatio:oi,restrictEdges:ii,restrict:ri,restrictRect:si,restrictSize:di,snapEdges:tn({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],_a.start(n)):null},set:_a.set,defaults:T(sn(_a.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:pi,snapSize:fi,spring:Ca,avoid:Ca,transform:Ca,rubberband:Ca},hi={id:"modifiers",install:function(n){var t=n.interactStatic;for(var a in n.usePlugin(En),n.usePlugin(ei),t.modifiers=Wa,Wa){var i=Wa[a],s=i._defaults,d=i._methods;s._methods=d,n.defaults.perAction[a]=s}}},vi=hi,ho=function(n){C(a,n);var t=Q(a);function a(i,s,d,v,m,B){var P;if(u(this,a),D(R(P=t.call(this,m)),d),d!==s&&D(R(P),s),P.timeStamp=B,P.originalEvent=d,P.type=i,P.pointerId=_(s),P.pointerType=Y(s),P.target=v,P.currentTarget=null,i==="tap"){var I=m.getPointerIndex(s);P.dt=P.timeStamp-m.pointers[I].downTime;var G=P.timeStamp-m.tapTime;P.double=!!m.prevTap&&m.prevTap.type!=="doubletap"&&m.prevTap.target===P.target&&G<500}else i==="doubletap"&&(P.dt=s.timeStamp-m.tapTime,P.double=!0);return P}return g(a,[{key:"_subtractOrigin",value:function(i){var s=i.x,d=i.y;return this.pageX-=s,this.pageY-=d,this.clientX-=s,this.clientY-=d,this}},{key:"_addOrigin",value:function(i){var s=i.x,d=i.y;return this.pageX+=s,this.pageY+=d,this.clientX+=s,this.clientY+=d,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),a}(de),da={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=da,n.defaults.actions.pointerEvents=da.defaults,T(n.actions.phaselessTypes,da.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,a=n.pointerInfo;!t&&a.hold||(a.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var a=n.interaction,i=n.pointer,s=n.event,d=n.eventTarget;n.duplicate||a.pointerIsDown&&!a.pointerWasMoved||(a.pointerIsDown&&Ha(n),An({interaction:a,pointer:i,event:s,eventTarget:d,type:"move"},t))},"interactions:down":function(n,t){(function(a,i){for(var s=a.interaction,d=a.pointer,v=a.event,m=a.eventTarget,B=a.pointerIndex,P=s.pointers[B].hold,I=ee(m),G={interaction:s,pointer:d,event:v,eventTarget:m,type:"hold",targets:[],path:I,node:null},ve=0;ve<I.length;ve++){var ze=I[ve];G.node=ze,i.fire("pointerEvents:collect-targets",G)}if(G.targets.length){for(var Ae=1/0,$e=0,at=G.targets;$e<at.length;$e++){var et=at[$e].eventable.options.holdDuration;et<Ae&&(Ae=et)}P.duration=Ae,P.timeout=setTimeout(function(){An({interaction:s,eventTarget:m,pointer:d,event:v,type:"hold"},i)},Ae)}})(n,t),An(n,t)},"interactions:up":function(n,t){Ha(n),An(n,t),function(a,i){var s=a.interaction,d=a.pointer,v=a.event,m=a.eventTarget;s.pointerWasMoved||An({interaction:s,eventTarget:m,pointer:d,event:v,type:"tap"},i)}(n,t)},"interactions:cancel":function(n,t){Ha(n),An(n,t)}},PointerEvent:ho,fire:An,collectEventTargets:vo,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 An(n,t){var a=n.interaction,i=n.pointer,s=n.event,d=n.eventTarget,v=n.type,m=n.targets,B=m===void 0?vo(n,t):m,P=new ho(v,i,s,d,a,t.now());t.fire("pointerEvents:new",{pointerEvent:P});for(var I={interaction:a,pointer:i,event:s,eventTarget:d,targets:B,type:v,pointerEvent:P},G=0;G<B.length;G++){var ve=B[G];for(var ze in ve.props||{})P[ze]=ve.props[ze];var Ae=oe(ve.eventable,ve.node);if(P._subtractOrigin(Ae),P.eventable=ve.eventable,P.currentTarget=ve.node,ve.eventable.fire(P),P._addOrigin(Ae),P.immediatePropagationStopped||P.propagationStopped&&G+1<B.length&&B[G+1].node!==P.currentTarget)break}if(t.fire("pointerEvents:fired",I),v==="tap"){var $e=P.double?An({interaction:a,pointer:i,event:s,eventTarget:d,type:"doubletap"},t):P;a.prevTap=$e,a.tapTime=$e.timeStamp}return P}function vo(n,t){var a=n.interaction,i=n.pointer,s=n.event,d=n.eventTarget,v=n.type,m=a.getPointerIndex(i),B=a.pointers[m];if(v==="tap"&&(a.pointerWasMoved||!B||B.downTarget!==d))return[];for(var P=ee(d),I={interaction:a,pointer:i,event:s,eventTarget:d,type:v,path:P,targets:[],node:null},G=0;G<P.length;G++){var ve=P[G];I.node=ve,t.fire("pointerEvents:collect-targets",I)}return v==="hold"&&(I.targets=I.targets.filter(function(ze){var Ae,$e;return ze.eventable.options.holdDuration===((Ae=a.pointers[m])==null||($e=Ae.hold)==null?void 0:$e.duration)})),I.targets}function Ha(n){var t=n.interaction,a=n.pointerIndex,i=t.pointers[a].hold;i&&i.timeout&&(clearTimeout(i.timeout),i.timeout=null)}var gi=Object.freeze({__proto__:null,default:da});function mi(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var yi={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(da);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)]=mi,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var a=n.interaction,i=n.pointerEvent,s=n.eventTarget,d=n.targets;if(i.type==="hold"&&d.length){var v=d[0].eventable.options.holdRepeatInterval;v<=0||(a.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:a,eventTarget:s,type:"hold",pointer:i,event:i},t)},v))}}})},bi=yi,ki={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(i){return T(this.events.options,i),this};var a=t.prototype._backCompatOption;t.prototype._backCompatOption=function(i,s){var d=a.call(this,i,s);return d===this&&(this.events.options[i]=s),d}},listeners:{"pointerEvents:collect-targets":function(n,t){var a=n.targets,i=n.node,s=n.type,d=n.eventTarget;t.interactables.forEachMatch(i,function(v){var m=v.events,B=m.options;m.types[s]&&m.types[s].length&&v.testIgnoreAllow(B,i,d)&&a.push({node:i,eventable:m,props:{interactable:v}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(a){return t.getRect(a)}},"interactable:set":function(n,t){var a=n.interactable,i=n.options;T(a.events.options,t.pointerEvents.defaults),T(a.events.options,i.pointerEvents||{})}}},xi=ki,wi={id:"pointer-events",install:function(n){n.usePlugin(gi),n.usePlugin(bi),n.usePlugin(xi)}},Ci=wi,Di={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(a){return function(i,s,d){for(var v=i.getAllElements(),m=d.window.Promise,B=m?[]:null,P=function(){var G=v[I],ve=i.getRect(G);if(!ve)return 1;var ze,Ae=Ne(d.interactions.list,function(et){return et.interacting()&&et.interactable===i&&et.element===G&&et.prepared.name===s.name});if(Ae)Ae.move(),B&&(ze=Ae._reflowPromise||new m(function(et){Ae._reflowResolve=et}));else{var $e=ne(ve),at=function(et){return{coords:et,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:$e.x,y:$e.y},client:{x:$e.x,y:$e.y},timeStamp:d.now()});ze=function(et,ft,Et,Nt,kt){var St=et.interactions.new({pointerType:"reflow"}),Zt={interaction:St,event:kt,pointer:kt,eventTarget:Et,phase:"reflow"};St.interactable=ft,St.element=Et,St.prevEvent=kt,St.updatePointer(kt,kt,Et,!0),X(St.coords.delta),pt(St.prepared,Nt),St._doPhase(Zt);var $t=et.window,on=$t.Promise,dn=on?new on(function(kn){St._reflowResolve=kn}):void 0;return St._reflowPromise=dn,St.start(Nt,ft,Et),St._interacting?(St.move(Zt),St.end(kt)):(St.stop(),St._reflowResolve()),St.removePointer(kt,kt),dn}(d,i,G,s,at)}B&&B.push(ze)},I=0;I<v.length&&!P();I++);return B&&m.all(B).then(function(){return i})}(this,a,n)}},listeners:{"interactions:stop":function(n,t){var a=n.interaction;a.pointerType==="reflow"&&(a._reflowResolve&&a._reflowResolve(),function(i,s){i.splice(i.indexOf(s),1)}(t.interactions.list,a))}}},_i=Di;if(Jt.use(_n),Jt.use(Kt),Jt.use(Ci),Jt.use(Ht),Jt.use(vi),Jt.use(Rn),Jt.use(w),Jt.use(dt),Jt.use(_i),Jt.default=Jt,p(o)==="object"&&o)try{o.exports=Jt}catch{}return Jt.default=Jt,Jt})}(ga,ga.exports)),ga.exports}var Wd=Kd();const Fo=Ie.getDefaultExportFromCjs(Wd),$a=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(o,{expose:l,emit:c}){const r=o,p=c,u=e.inject(Ir),E=e.inject(Nr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let C=!1,S=!1,M=NaN,R=NaN,Q=NaN,O=NaN,ke=-1,H=-1,U=-1,se=-1,x=r.x,F=r.y,b=r.w,V=r.h;const N=e.ref(),be=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:N,calcXY:qe});function Je(k){we(k)}function yt(){Ue()}function Ve(k){rn(r.isDraggable)&&(f.draggable=k)}function We(k){rn(r.isResizable)&&(f.resizable=k)}function je(k){rn(r.isBounded)&&(f.bounded=k)}function z(k){f.transformScale=k}function ie(k){f.rowHeight=k}function re(k){f.maxRows=k}function fe(){f.rtl=zo()==="rtl",Ue()}function Ye(k){f.cols=Math.floor(k)}u.increaseItem(be),e.onBeforeMount(()=>{f.rtl=zo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Mr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,rn(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,rn(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,rn(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{x=r.x,F=r.y,V=r.h,b=r.w,Qt(Ze)}),E.on("updateWidth",Je),E.on("compact",yt),E.on("setDraggable",Ve),E.on("setResizable",We),E.on("setBounded",je),E.on("setTransformScale",z),E.on("setRowHeight",ie),E.on("setMaxRows",re),E.on("directionchange",fe),E.on("setColNum",Ye)}),e.onBeforeUnmount(()=>{E.off("updateWidth",Je),E.off("compact",yt),E.off("setDraggable",Ve),E.off("setResizable",We),E.off("setBounded",je),E.off("setTransformScale",z),E.off("setRowHeight",ie),E.off("setMaxRows",re),E.off("directionchange",fe),E.off("setColNum",Ye),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(be)}),l({state:f,wrapper:N});const it=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,q=e.computed(()=>f.resizable&&!r.static),A=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),ge=e.computed(()=>(f.draggable||f.resizable)&&!r.static),me=Md("item"),Me=e.computed(()=>({[me.b()]:!0,[me.bm("resizable")]:q.value,[me.bm("static")]:r.static,[me.bm("resizing")]:f.isResizing,[me.bm("dragging")]:f.isDragging,[me.bm("transform")]:f.useCssTransforms,[me.bm("rtl")]:A.value,[me.bm("no-touch")]:it&&ge.value})),Te=e.computed(()=>[me.be("resizer"),A.value&&me.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,k=>{f.draggable=k}),e.watch(()=>r.static,()=>{Qt(D),Qt(X)}),e.watch(()=>f.draggable,()=>{Qt(D)}),e.watch(()=>r.isResizable,k=>{f.resizable=k}),e.watch(()=>r.isBounded,k=>{f.bounded=k}),e.watch(()=>f.resizable,()=>{Qt(X)}),e.watch(()=>f.rowHeight,()=>{Qt(Ze),Qt(ee)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{Qt(X),Qt(Ze),Qt(ee)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{Qt(X)}),e.watch(A,()=>{Qt(X),Qt(Ze)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const k=u.margin;!k||k[0]===f.margin[0]&&k[1]===f.margin[1]||(f.margin=k.map(Number),Qt(Ze),Qt(ee))});function Ze(){r.x+r.w>f.cols?(x=0,b=r.w>f.cols?f.cols:r.w):(x=r.x,b=r.w);const k=He(x,F,b,V);f.isDragging&&(k.top=f.dragging.top,A.value?k.right=f.dragging.left:k.left=f.dragging.left),f.isResizing&&(k.width=f.resizing.width,k.height=f.resizing.height);let te;f.useCssTransforms?A.value?te=Vd(k.top,k.right,k.width,k.height):te=Nd(k.top,k.left,k.width,k.height):A.value?te=Od(k.top,k.right,k.width,k.height):te=Ad(k.top,k.left,k.width,k.height),f.style=te}function ee(){const k={};for(const te of["width","height"]){const Se=f.style[te].match(/^(\d+)px$/);if(!Se)return;k[te]=Se[1]}p("container-resized",r.i,r.h,r.w,k.height,k.width)}function xe(k){if(r.static)return;const te=k.type;if(te==="resizestart"&&f.isResizing||te!=="resizestart"&&!f.isResizing)return;const Se=Ao(k);if(rn(Se))return;const{x:_,y:Z}=Se,L={width:0,height:0};let K;switch(te){case"resizestart":{X(),ke=b,H=V,K=He(x,F,b,V),L.width=K.width,L.height=K.height,f.resizing=L,f.isResizing=!0;break}case"resizemove":{!k.edges.right&&!k.edges.left&&(Q=_),!k.edges.top&&!k.edges.bottom&&(O=Z);const Ce=Oo(Q,O,_,Z);A.value?L.width=f.resizing.width-Ce.deltaX/f.transformScale:L.width=f.resizing.width+Ce.deltaX/f.transformScale,L.height=f.resizing.height+Ce.deltaY/f.transformScale,f.resizing=L;break}case"resizeend":{K=He(x,F,b,V),L.width=K.width,L.height=K.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}K=oe(L.height,L.width),K.w<r.minW&&(K.w=r.minW),K.w>r.maxW&&(K.w=r.maxW),K.h<r.minH&&(K.h=r.minH),K.h>r.maxH&&(K.h=r.maxH),K.h<1&&(K.h=1),K.w<1&&(K.w=1),Q=_,O=Z,(b!==K.w||V!==K.h)&&p("resize",r.i,K.h,K.w,L.height,L.width),k.type==="resizeend"&&(ke!==b||H!==V)&&p("resized",r.i,K.h,K.w,L.height,L.width),E.emit("resizeEvent",k.type,r.i,x,F,K.h,K.w)}function T(k){if(r.static||f.isResizing)return;const te=k.type;if(te==="dragstart"&&f.isDragging||te!=="dragstart"&&!f.isDragging)return;const Se=Ao(k);if(rn(Se))return;const{x:_,y:Z}=Se,L=k.target;if(!L.offsetParent)return;const K={top:0,left:0};switch(te){case"dragstart":{U=x,se=F;const ae=L.offsetParent.getBoundingClientRect(),W=L.getBoundingClientRect(),Y=W.left/f.transformScale,le=ae.left/f.transformScale,de=W.right/f.transformScale,ye=ae.right/f.transformScale,he=W.top/f.transformScale,$=ae.top/f.transformScale;A.value?K.left=(de-ye)*-1:K.left=Y-le,K.top=he-$,f.dragging=K,f.isDragging=!0;break}case"dragmove":{const ae=Oo(M,R,_,Z);if(A.value?K.left=f.dragging.left-ae.deltaX/f.transformScale:K.left=f.dragging.left+ae.deltaX/f.transformScale,K.top=f.dragging.top+ae.deltaY/f.transformScale,f.bounded){const W=L.offsetParent.clientHeight-ne(r.h,f.rowHeight,f.margin[1]);K.top=J(K.top,0,W);const Y=Ee(),le=f.containerWidth-ne(r.w,Y,f.margin[0]);K.left=J(K.left,0,le)}f.dragging=K;break}case"dragend":{const ae=L.offsetParent.getBoundingClientRect(),W=L.getBoundingClientRect(),Y=W.left/f.transformScale,le=ae.left/f.transformScale,de=W.right/f.transformScale,ye=ae.right/f.transformScale,he=W.top/f.transformScale,$=ae.top/f.transformScale;A.value?K.left=(de-ye)*-1:K.left=Y-le,K.top=he-$,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ce;A.value,Ce=qe(K.top,K.left),M=_,R=Z,(x!==Ce.x||F!==Ce.y)&&p("move",r.i,Ce.x,Ce.y),k.type==="dragend"&&(U!==x||se!==F)&&p("moved",r.i,Ce.x,Ce.y),E.emit("dragEvent",k.type,r.i,Ce.x,Ce.y,V,b)}function He(k,te,Se,_){const Z=Ee();let L;return A.value?L={right:Math.round(Z*k+(k+1)*f.margin[0]),top:Math.round(f.rowHeight*te+(te+1)*f.margin[1]),width:Se===1/0?Se:Math.round(Z*Se+Math.max(0,Se-1)*f.margin[0]),height:_===1/0?_:Math.round(f.rowHeight*_+Math.max(0,_-1)*f.margin[1])}:L={left:Math.round(Z*k+(k+1)*f.margin[0]),top:Math.round(f.rowHeight*te+(te+1)*f.margin[1]),width:Se===1/0?Se:Math.round(Z*Se+Math.max(0,Se-1)*f.margin[0]),height:_===1/0?_:Math.round(f.rowHeight*_+Math.max(0,_-1)*f.margin[1])},L}function qe(k,te){const Se=Ee();let _=Math.round((te-f.margin[0])/(Se+f.margin[0])),Z=Math.round((k-f.margin[1])/(f.rowHeight+f.margin[1]));return _=Math.max(Math.min(_,f.cols-b),0),Z=Math.max(Math.min(Z,f.maxRows-V),0),{x:_,y:Z}}function Ee(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function ne(k,te,Se){return Number.isFinite(k)?Math.round(te*k+Math.max(0,k-1)*Se):k}function J(k,te,Se){return Math.max(Math.min(k,Se),te)}function oe(k,te,Se=!1){const _=Ee();let Z=Math.round((te+f.margin[0])/(_+f.margin[0])),L=0;return Se?L=Math.ceil((k+f.margin[1])/(f.rowHeight+f.margin[1])):L=Math.round((k+f.margin[1])/(f.rowHeight+f.margin[1])),Z=Math.max(Math.min(Z,f.cols-x),0),L=Math.max(Math.min(L,f.maxRows-F),0),{w:Z,h:L}}function we(k,te){f.containerWidth=k}function Ue(){Ze()}function ut(){!g.value&&N.value&&(g.value=Fo(N.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Io(T);function D(){if(ut(),!!g.value)if(f.draggable&&!r.static){const k={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(k),C||(C=!0,g.value.on("dragstart dragmove dragend",te=>{te.type==="dragmove"?h(te):T(te)}))}else g.value.draggable({enabled:!1})}const j=Io(xe);function X(){if(ut(),!!g.value)if(f.resizable&&!r.static){const k=He(0,0,r.maxW,r.maxH),te=He(0,0,r.minW,r.minH),Se={edges:{left:A.value?`.${Te.value[0]}`:!1,right:A.value?!1:`.${Te.value[0]}`,bottom:`.${Te.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:te.height*f.transformScale,width:te.width*f.transformScale},max:{height:k.height*f.transformScale,width:k.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(Se.modifiers=[Fo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(Se),S||(S=!0,g.value.on("resizestart resizemove resizeend",_=>{_.type==="resizemove"?j(_):xe(_)}))}else g.value.resizable({enabled:!1})}return(k,te)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:N,class:e.normalizeClass(Me.value),style:e.normalizeStyle(f.style)},[e.renderSlot(k.$slots,"default"),q.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Te.value)},null,2)):e.createCommentVNode("",!0)],6))}}),ea=typeof window<"u";var Ro;ea&&(Ro=window==null?void 0:window.navigator)!=null&&Ro.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Po(o){return o!=null}function Lo(){}const Hd=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(Hd)));const qd=ea&&("ontouchstart"in window||Xd()>0),Gd=qd?"pointerdown":"click";function Xd(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Yd(o,l,c=window.Event){const{type:r,bubbles:p=!1,cancelable:u=!1,...E}=l;if(!Po(r)||r==="")return!1;let g;return Po(c)?g=new c(r,{bubbles:p,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,p,u)),Object.assign(g,E),o.dispatchEvent(g)}const Jd="clickoutside",Zd=new Set;ea&&document.addEventListener(Gd,o=>{const l=o.target,c=o.composedPath&&o.composedPath();Zd.forEach(r=>{r!==l&&(c?!c.includes(r):!r.contains(l))&&(!r.__transferElement||r.__transferElement!==l&&!r.__transferElement.contains(l))&&Yd(r,{type:Jd})})},!0);const Qd=[["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 Va;if(ea){for(const o of Qd)if(o[1]in document){Va=o;break}}e.computed(()=>!1);const ep=new Set,tp=new WeakMap;if(ea&&Va){const o=Va[2],l=Va[4];document.addEventListener(l,()=>{if(ep.forEach(c=>{c.value=!1}),document[o]){const c=tp.get(document[o]);c&&(c.value=!0)}},!1)}const Rr=new Map;Rr.set("x",0);Rr.set("y",0);var Jn=[],np=function(){return Jn.some(function(o){return o.activeTargets.length>0})},ap=function(){return Jn.some(function(o){return o.skippedTargets.length>0})},$o="ResizeObserver loop completed with undelivered notifications.",op=function(){var o;typeof ErrorEvent=="function"?o=new ErrorEvent("error",{message:$o}):(o=document.createEvent("Event"),o.initEvent("error",!1,!1),o.message=$o),window.dispatchEvent(o)},ka;(function(o){o.BORDER_BOX="border-box",o.CONTENT_BOX="content-box",o.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(ka||(ka={}));var Zn=function(o){return Object.freeze(o)},rp=function(){function o(l,c){this.inlineSize=l,this.blockSize=c,Zn(this)}return o}(),Pr=function(){function o(l,c,r,p){return this.x=l,this.y=c,this.width=r,this.height=p,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Zn(this)}return o.prototype.toJSON=function(){var l=this,c=l.x,r=l.y,p=l.top,u=l.right,E=l.bottom,g=l.left,f=l.width,C=l.height;return{x:c,y:r,top:p,right:u,bottom:E,left:g,width:f,height:C}},o.fromRect=function(l){return new o(l.x,l.y,l.width,l.height)},o}(),io=function(o){return o instanceof SVGElement&&"getBBox"in o},Lr=function(o){if(io(o)){var l=o.getBBox(),c=l.width,r=l.height;return!c&&!r}var p=o,u=p.offsetWidth,E=p.offsetHeight;return!(u||E||o.getClientRects().length)},jo=function(o){var l;if(o instanceof Element)return!0;var c=(l=o==null?void 0:o.ownerDocument)===null||l===void 0?void 0:l.defaultView;return!!(c&&o instanceof c.Element)},ip=function(o){switch(o.tagName){case"INPUT":if(o.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},ba=typeof window<"u"?window:{},Ta=new WeakMap,Uo=/auto|scroll/,lp=/^tb|vertical/,sp=/msie|trident/i.test(ba.navigator&&ba.navigator.userAgent),vn=function(o){return parseFloat(o||"0")},la=function(o,l,c){return o===void 0&&(o=0),l===void 0&&(l=0),c===void 0&&(c=!1),new rp((c?l:o)||0,(c?o:l)||0)},Ko=Zn({devicePixelContentBoxSize:la(),borderBoxSize:la(),contentBoxSize:la(),contentRect:new Pr(0,0,0,0)}),$r=function(o,l){if(l===void 0&&(l=!1),Ta.has(o)&&!l)return Ta.get(o);if(Lr(o))return Ta.set(o,Ko),Ko;var c=getComputedStyle(o),r=io(o)&&o.ownerSVGElement&&o.getBBox(),p=!sp&&c.boxSizing==="border-box",u=lp.test(c.writingMode||""),E=!r&&Uo.test(c.overflowY||""),g=!r&&Uo.test(c.overflowX||""),f=r?0:vn(c.paddingTop),C=r?0:vn(c.paddingRight),S=r?0:vn(c.paddingBottom),M=r?0:vn(c.paddingLeft),R=r?0:vn(c.borderTopWidth),Q=r?0:vn(c.borderRightWidth),O=r?0:vn(c.borderBottomWidth),ke=r?0:vn(c.borderLeftWidth),H=M+C,U=f+S,se=ke+Q,x=R+O,F=g?o.offsetHeight-x-o.clientHeight:0,b=E?o.offsetWidth-se-o.clientWidth:0,V=p?H+se:0,N=p?U+x:0,be=r?r.width:vn(c.width)-V-b,Je=r?r.height:vn(c.height)-N-F,yt=be+H+b+se,Ve=Je+U+F+x,We=Zn({devicePixelContentBoxSize:la(Math.round(be*devicePixelRatio),Math.round(Je*devicePixelRatio),u),borderBoxSize:la(yt,Ve,u),contentBoxSize:la(be,Je,u),contentRect:new Pr(M,f,be,Je)});return Ta.set(o,We),We},jr=function(o,l,c){var r=$r(o,c),p=r.borderBoxSize,u=r.contentBoxSize,E=r.devicePixelContentBoxSize;switch(l){case ka.DEVICE_PIXEL_CONTENT_BOX:return E;case ka.BORDER_BOX:return p;default:return u}},cp=function(){function o(l){var c=$r(l);this.target=l,this.contentRect=c.contentRect,this.borderBoxSize=Zn([c.borderBoxSize]),this.contentBoxSize=Zn([c.contentBoxSize]),this.devicePixelContentBoxSize=Zn([c.devicePixelContentBoxSize])}return o}(),Ur=function(o){if(Lr(o))return 1/0;for(var l=0,c=o.parentNode;c;)l+=1,c=c.parentNode;return l},up=function(){var o=1/0,l=[];Jn.forEach(function(u){if(u.activeTargets.length!==0){var E=[];u.activeTargets.forEach(function(g){var f=new cp(g.target),C=Ur(g.target);E.push(f),g.lastReportedSize=jr(g.target,g.observedBox),C<o&&(o=C)}),l.push(function(){u.callback.call(u.observer,E,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var c=0,r=l;c<r.length;c++){var p=r[c];p()}return o},Wo=function(o){Jn.forEach(function(l){l.activeTargets.splice(0,l.activeTargets.length),l.skippedTargets.splice(0,l.skippedTargets.length),l.observationTargets.forEach(function(c){c.isActive()&&(Ur(c.target)>o?l.activeTargets.push(c):l.skippedTargets.push(c))})})},dp=function(){var o=0;for(Wo(o);np();)o=up(),Wo(o);return ap()&&op(),o>0},Ja,Kr=[],pp=function(){return Kr.splice(0).forEach(function(o){return o()})},fp=function(o){if(!Ja){var l=0,c=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return pp()}).observe(c,r),Ja=function(){c.textContent="".concat(l?l--:l++)}}Kr.push(o),Ja()},hp=function(o){fp(function(){requestAnimationFrame(o)})},Aa=0,vp=function(){return!!Aa},gp=250,mp={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ho=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],qo=function(o){return o===void 0&&(o=0),Date.now()+o},Za=!1,yp=function(){function o(){var l=this;this.stopped=!0,this.listener=function(){return l.schedule()}}return o.prototype.run=function(l){var c=this;if(l===void 0&&(l=gp),!Za){Za=!0;var r=qo(l);hp(function(){var p=!1;try{p=dp()}finally{if(Za=!1,l=r-qo(),!vp())return;p?c.run(1e3):l>0?c.run(l):c.start()}})}},o.prototype.schedule=function(){this.stop(),this.run()},o.prototype.observe=function(){var l=this,c=function(){return l.observer&&l.observer.observe(document.body,mp)};document.body?c():ba.addEventListener("DOMContentLoaded",c)},o.prototype.start=function(){var l=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ho.forEach(function(c){return ba.addEventListener(c,l.listener,!0)}))},o.prototype.stop=function(){var l=this;this.stopped||(this.observer&&this.observer.disconnect(),Ho.forEach(function(c){return ba.removeEventListener(c,l.listener,!0)}),this.stopped=!0)},o}(),oo=new yp,Go=function(o){!Aa&&o>0&&oo.start(),Aa+=o,!Aa&&oo.stop()},bp=function(o){return!io(o)&&!ip(o)&&getComputedStyle(o).display==="inline"},kp=function(){function o(l,c){this.target=l,this.observedBox=c||ka.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return o.prototype.isActive=function(){var l=jr(this.target,this.observedBox,!0);return bp(this.target)&&(this.lastReportedSize=l),this.lastReportedSize.inlineSize!==l.inlineSize||this.lastReportedSize.blockSize!==l.blockSize},o}(),xp=function(){function o(l,c){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=l,this.callback=c}return o}(),Ba=new WeakMap,Xo=function(o,l){for(var c=0;c<o.length;c+=1)if(o[c].target===l)return c;return-1},Ia=function(){function o(){}return o.connect=function(l,c){var r=new xp(l,c);Ba.set(l,r)},o.observe=function(l,c,r){var p=Ba.get(l),u=p.observationTargets.length===0;Xo(p.observationTargets,c)<0&&(u&&Jn.push(p),p.observationTargets.push(new kp(c,r&&r.box)),Go(1),oo.schedule())},o.unobserve=function(l,c){var r=Ba.get(l),p=Xo(r.observationTargets,c),u=r.observationTargets.length===1;p>=0&&(u&&Jn.splice(Jn.indexOf(r),1),r.observationTargets.splice(p,1),Go(-1))},o.disconnect=function(l){var c=this,r=Ba.get(l);r.observationTargets.slice().forEach(function(p){return c.unobserve(l,p.target)}),r.activeTargets.splice(0,r.activeTargets.length)},o}(),wp=function(){function o(l){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof l!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Ia.connect(this,l)}return o.prototype.observe=function(l,c){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jo(l))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ia.observe(this,l,c)},o.prototype.unobserve=function(l){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!jo(l))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ia.unobserve(this,l)},o.prototype.disconnect=function(){Ia.disconnect(this)},o.toString=function(){return"function ResizeObserver () { [polyfill code] }"},o}();const ja=new WeakMap;function Cp(o){var l;for(let c=0,r=o.length;c<r;++c){const p=o[c],u=ja.get(p.target);if(typeof u=="function"){const{inlineSize:E,blockSize:g}=((l=p.borderBoxSize)==null?void 0:l[0])??{},{offsetWidth:f,offsetHeight:C}=p.target;u(Object.assign(p,{offsetWidth:f,offsetHeight:C,width:E??f,height:g??C}))}}}const Wr=new(ea&&window.ResizeObserver||wp)(Cp);function Yo(o,l){ja.set(o,l),Wr.observe(o)}function Jo(o){ja.has(o)&&(Wr.unobserve(o),ja.delete(o))}function Dp(o={}){let l=Lo;const c=e.watch(()=>e.unref(o.target),p=>{l(),!(!p||typeof o.onResize!="function")&&(Yo(p,o.onResize),l=()=>{Jo(p),l=Lo})},{immediate:!0}),r=()=>{c(),l()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:Yo,unobserveResize:Jo,unobserve:r}}const _p=e.ref(!1);e.computed(()=>_p.value);const Zo="__theme_style__",Qa="__theme_observer__",Qo=e.reactive(new Map),er=new Map;e.watch(Qo,()=>{if(!ea)return;er.clear();const o=document.head.querySelector(`#${Zo}`);o&&document.head.removeChild(o);const l=document.createElement("style");let c=`.${Qa} { width: 1px }`,r=1;for(const[p,[u,E]]of Qo.entries())c+=` html.${u} .${Qa}, .${E} .${Qa} { width: ${++r}px }`,er.set(r,p);l.textContent=c,l.id=Zo,document.head.appendChild(l)});const Hr=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(o,{expose:l,emit:c}){const r=o,p=c,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),E=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:C,unobserveResize:S}=Dp(),M=Dd();M.on("resizeEvent",R),M.on("dragEvent",Q),e.onBeforeMount(()=>{p("layout-before-mount",g.value)}),e.onMounted(()=>{p("layout-mounted",g.value),e.nextTick(()=>{zd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Je(),f.value&&C(f.value,_d(x,16)),ra(g.value,r.verticalCompact),p("layout-updated",g.value),se(),x()})})}),e.onBeforeUnmount(()=>{M.clearAll(),f.value&&S(f.value)});function R(Ve,We,je,z,ie,re){N(Ve,We,je,z,ie,re)}function Q(Ve,We,je,z,ie,re){V(Ve,We,je,z,ie,re)}e.watch(()=>u.width,(Ve,We)=>{e.nextTick(()=>{M.emit("updateWidth",Ve),We===-1&&e.nextTick(()=>{p("layout-ready",g.value)}),se()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,U()}),e.watch(()=>r.colNum,Ve=>{M.emit("setColNum",Ve)}),e.watch(()=>r.rowHeight,Ve=>{M.emit("setRowHeight",Ve)}),e.watch(()=>r.isDraggable,Ve=>{M.emit("setDraggable",Ve)}),e.watch(()=>r.isResizable,Ve=>{M.emit("setResizable",Ve)}),e.watch(()=>r.isBounded,Ve=>{M.emit("setBounded",Ve)}),e.watch(()=>r.transformScale,Ve=>{M.emit("setTransformScale",Ve)}),e.watch(()=>r.responsive,Ve=>{Ve||(p("update:layout",u.originalLayout),M.emit("setColNum",r.colNum)),x()}),e.watch(()=>r.maxRows,Ve=>{M.emit("setMaxRows",Ve)}),e.watch([()=>r.margin,()=>r.margin[1]],se),e.provide(Ir,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:O,decreaseItem:ke})),e.provide(Nr,M),l({state:u,getItem:H,resizeEvent:N,dragEvent:V,layoutUpdate:U});function O(Ve){E.set(Ve.i,Ve)}function ke(Ve){E.delete(Ve.i)}function H(Ve){return E.get(Ve)}function U(){if(!rn(g.value)&&!rn(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Ve=yt(g.value,u.originalLayout);if(Ve.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Ve);else{const We=new Set(Ve.map(je=>je.i));u.originalLayout=u.originalLayout.filter(je=>!We.has(je.i))}u.lastLayoutLength=g.value.length,Je()}ra(g.value,r.verticalCompact),M.emit("updateWidth",u.width),se(),p("layout-updated",g.value)}}function se(){u.mergedStyle={height:F()}}function x(){f.value&&(u.width=f.value.offsetWidth),M.emit("resizeEvent")}function F(){if(!r.autoSize)return;const Ve=parseFloat(r.margin[1]);return Sd(g.value)*(r.rowHeight+Ve)+Ve+"px"}let b;function V(Ve,We,je,z,ie,re){let fe=No(g.value,We);rn(fe)&&(fe={h:0,w:0,x:0,y:0,i:""}),Ve==="dragstart"&&!r.verticalCompact&&(b=g.value.reduce((Ye,{i:it,x:q,y:A})=>({...Ye,[it]:{x:q,y:A}}),{})),Ve==="dragmove"||Ve==="dragstart"?(u.placeholder.i=We,u.placeholder.x=fe.x,u.placeholder.y=fe.y,u.placeholder.w=re,u.placeholder.h=ie,e.nextTick(()=>{u.isDragging=!0}),M.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=ao(g.value,fe,je,z,!0,r.preventCollision),r.restoreOnDrag?(fe.static=!0,ra(g.value,r.verticalCompact,b),fe.static=!1):ra(g.value,r.verticalCompact),M.emit("compact"),se(),Ve==="dragend"&&(b=void 0,p("layout-updated",g.value))}function N(Ve,We,je,z,ie,re){let fe=No(g.value,We);rn(fe)&&(fe={h:0,w:0,x:0,y:0,i:""});let Ye;if(r.preventCollision){const it=Ar(g.value,{...fe,w:re,h:ie}).filter(q=>q.i!==fe.i);if(Ye=it.length>0,Ye){let q=1/0,A=1/0;it.forEach(ge=>{ge.x>fe.x&&(q=Math.min(q,ge.x)),ge.y>fe.y&&(A=Math.min(A,ge.y))}),Number.isFinite(q)&&(fe.w=q-fe.x),Number.isFinite(A)&&(fe.h=A-fe.y)}}Ye||(fe.w=re,fe.h=ie),Ve==="resizestart"||Ve==="resizemove"?(u.placeholder.i=We,u.placeholder.x=je,u.placeholder.y=z,u.placeholder.w=fe.w,u.placeholder.h=fe.h,e.nextTick(()=>{u.isDragging=!0}),M.emit("updateWidth",u.width)):Ve&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&be(),ra(g.value,r.verticalCompact),M.emit("compact"),se(),Ve==="resizeend"&&p("layout-updated",g.value)}function be(){const Ve=Pd(r.breakpoints,u.width);if(Ve===u.lastBreakpoint)return;const We=Mr(Ve,r.cols);!rn(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=no(g.value));const je=Ld(u.originalLayout,u.layouts,r.breakpoints,Ve,u.lastBreakpoint,We,r.verticalCompact);u.layouts[Ve]=je,u.lastBreakpoint!==Ve&&p("breakpoint-changed",Ve,je),g.value=je,p("update:layout",je),u.lastBreakpoint=Ve,M.emit("setColNum",We)}function Je(){u.layouts=Object.assign({},r.responsiveLayouts)}function yt(Ve,We){const je=new Set(We.map(fe=>fe.i)),z=new Set(Ve.map(fe=>fe.i)),ie=Ve.filter(fe=>!je.has(fe.i)),re=We.filter(fe=>!z.has(fe.i));return ie.concat(re)}return(Ve,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Ve.$slots.default?e.renderSlot(Ve.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,je=>(e.openBlock(),e.createBlock($a,e.mergeProps({key:je.i,ref_for:!0},je),{default:e.withCtx(()=>[e.renderSlot(Ve.$slots,"item",{item:je})]),_:2},1040))),128)),e.withDirectives(e.createVNode($a,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var o=document.createElement("style");o.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(o)}}catch(l){console.error("vite-plugin-css-injected-by-js",l)}})();const Ep={key:0,class:"item-view-group"},Sp={key:0,class:"item-view-group"},Tp=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(o,{emit:l}){const c=y.useModelComp(y.pinia),{isEdit:r}=y.storeToRefs(c),p=l,u=o,E=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var R,Q,O,ke;return((R=u==null?void 0:u.children)==null?void 0:R.length)>0&&((Q=u==null?void 0:u.children)!=null&&Q.every(H=>H==null?void 0:H.layout))?(ke=(O=u==null?void 0:u.children)==null?void 0:O[0])==null?void 0:ke.layout:"vertical"}),f=e.computed(()=>{var R,Q;return((Q=(R=u==null?void 0:u.children)==null?void 0:R[0])==null?void 0:Q.isGridLayout)||!1}),C=e.ref((u==null?void 0:u.level)+1),S=R=>{p("rowClick",R)},M=(R,Q)=>{p("routeUrl",R,Q)};return(R,Q)=>f.value?(e.openBlock(),e.createBlock(e.unref(Hr),{key:0,layout:E.value,"onUpdate:layout":Q[0]||(Q[0]=O=>E.value=O),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(O,ke)=>(e.openBlock(),e.createBlock(e.unref($a),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var H,U,se,x,F,b,V,N,be,Je,yt,Ve,We;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:ke===((H=u==null?void 0:u.children)==null?void 0:H.length)-1?"0px":"24px"})},[((se=(U=O==null?void 0:O.component)==null?void 0:U.comp)==null?void 0:se.toUpperCase())!=="TABLE"&&((x=O==null?void 0:O.component)!=null&&x.name)?(e.openBlock(),e.createElementBlock("div",Ep,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(C.value.toString())-1)*12+"px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString((F=O==null?void 0:O.component)==null?void 0:F.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Fa)((b=O==null?void 0:O.component)==null?void 0:b.comp)),{pageLayout:g.value,config:{showIndex:(V=e.unref(qt)[ke])==null?void 0:V.showIndex,allowMove:(N=e.unref(qt)[ke])==null?void 0:N.allowMove,viewport:(be=e.unref(qt)[ke])==null?void 0:be.viewport},related:O==null?void 0:O.relatedTables,compName:O==null?void 0:O.component.name,compNames:e.unref(xr),itemData:(Je=O==null?void 0:O.component)==null?void 0:Je.compData,childItemData:(yt=O==null?void 0:O.component)==null?void 0:yt.itemChildData,key:e.unref(sa),cacheNewData:e.unref(kr),onChange:e.unref(Ra),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Pa),onPageChange:e.unref(La),parentTableId:(Ve=O==null?void 0:O.component)==null?void 0:Ve.tableId,allMapContents:e.unref(to),children:(We=O==null?void 0:O.component)==null?void 0:We.children,level:C.value,onRowClick:S,onRouteUrl:M,onClickTrigger:e.unref(wr),onClickMainKey:e.unref(Cr)},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(u==null?void 0:u.children,(O,ke)=>{var H,U;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(O==null?void 0:O.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(ke)===((H=u==null?void 0:u.children)==null?void 0:H.length)-1?"0px":"24px"})},[((U=O==null?void 0:O.comp)==null?void 0:U.toUpperCase())!=="TABLE"&&O.name?(e.openBlock(),e.createElementBlock("div",Sp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(C.value.toString())>1?"12px":"0px",fontWeight:600-(C.value-1)*100>=400?600-(C.value-1)*100:400,fontSize:17-C.value>=14?17-C.value+"px":"14px"})},e.toDisplayString(O.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(Fa)(O.comp)),{compName:O.name,itemData:O==null?void 0:O.compData,related:O==null?void 0:O.relatedTables,childItemData:O==null?void 0:O.itemChildData,key:e.unref(sa),onChange:e.unref(Ra),index:(O==null?void 0:O.id)??ke,onContentChange:e.unref(Pa),onPageChange:e.unref(La),parentTableId:O==null?void 0:O.tableId,allMapContents:e.unref(to),children:O==null?void 0:O.children,level:C.value,onRowClick:S,onRouteUrl:M},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Bp=Rt._export_sfc(Tp,[["__scopeId","data-v-a00427c1"]]),qr=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"}]),Ip={TABLE:ha.ssTable,FORM:wo,TABLEOPERATE:ts,TABLESTYLE:ms,TABLEEXTEND:bs,TABLEINTERACTION:ws,FORMOPERATE:Co,FOLD:Zs,CALCULATOR:oc,METHODBUTTON:lc,AVATARUPLOAD:bo.ssAvatar,SIGNATURE:bo.ssSignature,FORMTOP:wo,STEP:bc,STEPOPERATE:Us,TIMELINE:_c,TIMELINEOPERATE:Xs,FORMTOPOPERATE:Co,SIGNATUREOPERATE:gc,AVATARUPLOADOPERATE:uc,TABS:Tc,TABSOPERATE:fu,CHART:Su,CHARTOPERATE:Ru,LAYOUT:pd,LAYOUTOPERATE:xd,PARENTITEM:Bp};function ta(o){return Ip[o==null?void 0:o.toUpperCase()]||null}exports.De=Hr;exports._sfc_main=pr;exports.activeStepInfo=ia;exports.affixItems=td;exports.allMapContents=to;exports.cacheNewData=kr;exports.clickMainKey=Cr;exports.clickSavePage=ed;exports.clickStep=_r;exports.clickTrigger=wr;exports.compId=sa;exports.compNames=xr;exports.compShow=Ma;exports.existLayouts=ad;exports.generateLayouts=fs;exports.getComponent=ta;exports.getComponents=Fa;exports.getSliceContLength=ld;exports.gridRowHeight=ss;exports.isStepLayout=Er;exports.onBack=Ju;exports.onChange=Ra;exports.onClick=Qu;exports.onContentChange=Pa;exports.onExtendTaskEnd=nd;exports.onPageBack=od;exports.onPageChange=La;exports.onSelectFixContent=Yu;exports.renderShowItems=yr;exports.setComponent=gr;exports.showItems=qt;exports.sliceTableLength=br;exports.slotContent=qr;exports.ssMenu=za;exports.st=$a;exports.stepItems=sd;exports.toolBar=va;exports.verifyButton=rd;
|