ss-component-new 1.3.78 → 1.3.80
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-Bkr7rTJW.js → MTLLoader-DcC1T2R-.js} +1 -1
- package/dist/{OrbitControls-goGQ9Lfs.js → OrbitControls-cVaf6msP.js} +1 -1
- package/dist/{URDFLoader-d1AzVQ5F.js → URDFLoader-CQ8lAP5N.js} +2 -2
- package/dist/{animationData-Sok20fOI.js → animationData-CTeDjcic.js} +2 -2
- package/dist/{array-CCxIPliQ.cjs → array-8_OZbk2v.cjs} +1 -1
- package/dist/{array-BkHYCyls.js → array-CEU-aUH0.js} +5 -5
- package/dist/{iconfont-CJoblcL2.js → iconfont-CEG9Z6Me.js} +2 -2
- package/dist/{index-Dld88iXe.js → index-6BIWxNNp.js} +1 -1
- package/dist/{index-M_FLMoBh.cjs → index-6WBJezE7.cjs} +1 -1
- package/dist/{index-BIbLwf-J.cjs → index-8Z4IsZZv.cjs} +1 -1
- package/dist/{index-CNLUhFlr.js → index-B7VdpJDk.js} +2 -2
- package/dist/{index-Bj7H-CHU.js → index-BCWnEKxi.js} +3 -3
- package/dist/{index-DmeZpSGM.js → index-BG8jt-Mj.js} +5 -5
- package/dist/{index-BQWGBLrD.cjs → index-BjWZWOgD.cjs} +1 -1
- package/dist/{index-KEXDCkKc.js → index-BlB_bACw.js} +560 -556
- package/dist/{index-CGpIY6jB.js → index-BqR1xrMr.js} +2052 -2047
- package/dist/{index-AHbRUQqE.cjs → index-Btrq5Gn1.cjs} +1 -1
- package/dist/{index-CIGrCpB_.js → index-BuBXET-y.js} +7 -7
- package/dist/{index-BVh3Ylgt.cjs → index-BzFG5s7n.cjs} +1 -1
- package/dist/index-C1Uh8jCE.js +12930 -0
- package/dist/index-CA1feDx6.cjs +1 -0
- package/dist/{index-CWY9HxrG.js → index-CA7UCEkN.js} +1 -1
- package/dist/{index-rCV_Ea-P.js → index-CGBpbw73.js} +1 -1
- package/dist/{index-BgKqiFcg.cjs → index-CKURWd0H.cjs} +1 -1
- package/dist/{index-t9jd4l9Q.js → index-C_cT03gR.js} +2 -2
- package/dist/{index-DaWzSNzm.js → index-ChQ73kWT.js} +1 -1
- package/dist/{index-JAXzKk2F.js → index-Clipar8b.js} +27 -27
- package/dist/index-CpRVq-cP.cjs +19 -0
- package/dist/{index-BysdHzB7.cjs → index-CqJbR7xA.cjs} +1 -1
- package/dist/{index-DLGxv8po.js → index-CqNjbufe.js} +3 -3
- package/dist/{index-ChiYyt8L.js → index-CutRrd-B.js} +2 -2
- package/dist/{index-DBh4mbmL.js → index-Cy0n69Vx.js} +874 -873
- package/dist/{index-DnMPqjrX.js → index-D-EzCf3J.js} +2 -2
- package/dist/{index-B7cNKrrU.cjs → index-DEoAMOtQ.cjs} +1 -1
- package/dist/{index-DsymuEzu.cjs → index-DFEHKFcd.cjs} +8 -8
- package/dist/{index-CST5bbhY.js → index-DL6GoCQo.js} +5 -5
- package/dist/{index-oJEY_fSN.js → index-DQFYF-JT.js} +1 -1
- package/dist/{index-DilZmA-l.cjs → index-DQuoAY25.cjs} +1 -1
- package/dist/{index-EtZh1qtq.js → index-DW_PZTFF.js} +1 -1
- package/dist/index-DYHt5wp1.cjs +11 -0
- package/dist/index-DZC_X4jJ.cjs +1 -0
- package/dist/{index-cKFeu5XW.cjs → index-DdwdkIUV.cjs} +1 -1
- package/dist/{index-BPmWhs0O.js → index-Dl3xjXba.js} +1 -1
- package/dist/index-DsNF-9jb.cjs +1 -0
- package/dist/{index-BRPLPxlx.cjs → index-DuEbn5K9.cjs} +1 -1
- package/dist/index-DzB3yFdI.js +466 -0
- package/dist/index-DzrSNzlY.js +19 -0
- package/dist/{index-G0nsjixB.js → index-FNrh3w2p.js} +1 -1
- package/dist/{index-BAelm3VG.cjs → index-GUrkhRB4.cjs} +1 -1
- package/dist/{index-CI8pzqx6.js → index-PL_DwseC.js} +5 -5
- package/dist/{index-DijK6RWK.js → index-PdNfeHpP.js} +6 -6
- package/dist/{index-XSETNP_T.js → index-eEPkBH_J.js} +1 -1
- package/dist/{index-2B1wHje0.cjs → index-vUyKT8gH.cjs} +1 -1
- package/dist/{index-5CdDKPk6.js → index-yhgYB2mn.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-DljCMBcU.js → index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-CP92dvJu.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-DDUoM--M.js → index.vue_vue_type_style_index_1_lang-B-i2NlLm.js} +4 -4
- package/dist/{main-DDI-kRzh.cjs → main-BGQ7ZbRn.cjs} +1 -1
- package/dist/{main-DKugsEJQ.js → main-vDQTmc2j.js} +4 -4
- package/dist/{menuIndex-BvSKgV5f.js → menuIndex-C-vOSUnB.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-BC_JZ1RV.cjs → threeModel-BFRYVMqO.cjs} +1 -1
- package/dist/{threeModel-BwWSWObs.js → threeModel-DFtMuwnG.js} +5 -5
- package/dist/{threePreview-CfyAicAQ.js → threePreview-zWwjj8dj.js} +4 -4
- package/dist/{threeSceneView-Dbr2KLMM.js → threeSceneView-DUBgUbZa.js} +10 -10
- package/dist/{threeSceneViewForCPMPIP-tPswynXd.js → threeSceneViewForCPMPIP-Bk0ih2-7.js} +8 -8
- package/dist/{threeTrackPathView-CZt3mY2y.js → threeTrackPathView-CoWPetyS.js} +4 -4
- package/dist/{threeViewerHost-D2qSyCw-.js → threeViewerHost-BaZw0MrX.js} +3 -3
- package/dist/{urdfTree-BCj0sPXo.js → urdfTree-CGAeYKn8.js} +1 -1
- package/dist/{workpieceTreePanel-CrpY18jo.js → workpieceTreePanel-BwtqOOAo.js} +4 -4
- package/package.json +1 -1
- package/dist/index-BFvOrU__.cjs +0 -19
- package/dist/index-BQ5LLLCI.cjs +0 -1
- package/dist/index-CM8Na0Nb.js +0 -12905
- package/dist/index-CjCqvZ07.cjs +0 -11
- package/dist/index-Cuw9DLEb.cjs +0 -1
- package/dist/index-D0aKEqnU.js +0 -476
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";const oa=require("./index-CpRVq-cP.cjs"),e=require("vue"),T=require("./index-fwa9LBX5.cjs"),Nt=require("./index-DFEHKFcd.cjs"),ct=require("./index-C5pQXH0_.cjs"),Oe=require("./index.vue_vue_type_style_index_0_scoped_afbdd7b2_lang-Ceq-4YAl.cjs"),Gt=require("./index-eUZKu-7F.cjs"),No=require("./threeViewerHost-DtuM2v2G.cjs");require("./index.vue_vue_type_style_index_1_lang-D9kYnXoD.cjs");const zt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ao=require("./isString-Cdf6R00a.cjs"),Vo=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Oo=require("./index-vUyKT8gH.cjs"),bl=require("./index-BVaHwt5f.cjs"),Hr=require("./index-CInkQ8cP.cjs"),Ba=require("./index-TvWbGp-2.cjs"),qr=require("./index-BpPyaNFa.cjs"),Xr=require("vue-router"),wn=require("./index-9hspBVrQ.cjs"),Yr=require("./menuIndex-BVHXKOLk.cjs"),ao=require("./index-D8DcUSsZ.cjs");var Gr=/\s/;function Jr(t){for(var i=t.length;i--&&Gr.test(t.charAt(i)););return i}var Zr=/^\s+/;function Qr(t){return t&&t.slice(0,Jr(t)+1).replace(Zr,"")}var Mo=NaN,ei=/^[-+]0x[0-9a-f]+$/i,ti=/^0b[01]+$/i,ai=/^0o[0-7]+$/i,ni=parseInt;function zo(t){if(typeof t=="number")return t;if(ct.isSymbol(t))return Mo;if(ct.isObject(t)){var i=typeof t.valueOf=="function"?t.valueOf():t;t=ct.isObject(i)?i+"":i}if(typeof t!="string")return t===0?t:+t;t=Qr(t);var r=ti.test(t);return r||ai.test(t)?ni(t.slice(2),r?2:8):ei.test(t)?Mo:+t}var no=function(){return ct.root.Date.now()},oi="Expected a function",li=Math.max,ri=Math.min;function kl(t,i,r){var o,c,s,m,p,f,b=0,x=!1,_=!1,N=!0;if(typeof t!="function")throw new TypeError(oi);i=zo(i)||0,ct.isObject(r)&&(x=!!r.leading,_="maxWait"in r,s=_?li(zo(r.maxWait)||0,i):s,N="trailing"in r?!!r.trailing:N);function q(C){var S=o,F=c;return o=c=void 0,b=C,m=t.apply(F,S),m}function $(C){return b=C,p=setTimeout(L,i),x?q(C):m}function oe(C){var S=C-f,F=C-b,Be=i-S;return _?ri(Be,s-F):Be}function P(C){var S=C-f,F=C-b;return f===void 0||S>=i||S<0||_&&F>=s}function L(){var C=no();if(P(C))return R(C);p=setTimeout(L,oe(C))}function R(C){return p=void 0,N&&o?q(C):(o=c=void 0,m)}function g(){p!==void 0&&clearTimeout(p),b=0,o=f=c=p=void 0}function v(){return p===void 0?m:R(no())}function y(){var C=no(),S=P(C);if(o=arguments,c=this,f=C,S){if(p===void 0)return $(f);if(_)return clearTimeout(p),p=setTimeout(L,i),q(f)}return p===void 0&&(p=setTimeout(L,i)),m}return y.cancel=g,y.flush=v,y}var ii="[object Boolean]";function xl(t){return t===!0||t===!1||ct.isObjectLike(t)&&ct.baseGetTag(t)==ii}function si(t){return t===void 0}const ci={class:"statistics-cards-container"},ui={class:"statistics-label"},di={class:"statistics-value"},pi=e.defineComponent({__name:"index",props:{items:{default:()=>[]}},setup(t){return(i,r)=>(e.openBlock(),e.createElementBlock("div",ci,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.items,(o,c)=>(e.openBlock(),e.createElementBlock("div",{class:"statistics-card",key:c},[e.createElementVNode("div",ui,e.toDisplayString(o==null?void 0:o.label),1),e.createElementVNode("div",di,e.toDisplayString((o==null?void 0:o.value)??0),1)]))),128))]))}}),fi=zt._export_sfc(pi,[["__scopeId","data-v-f54ed8af"]]),hi={class:"static-form-card"},vi={key:0,class:"static-form-body"},mi={class:"static-form-label"},gi={class:"static-form-value"},yi={key:1},bi={key:1,class:"static-form-empty"},ki=e.defineComponent({__name:"index",props:{itemData:{default:()=>[]},compName:{default:""},title:{default:""}},setup(t){const i=t,r=c=>{switch(c){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},o=e.computed(()=>{var m;const c=(m=i.itemData)==null?void 0:m.find(p=>(p==null?void 0:p.key)==="formContent");return((c==null?void 0:c.contents)||[]).filter(p=>!(p!=null&&p.isFormColHidden)&&(p==null?void 0:p.label)).map(p=>{let f=p==null?void 0:p.value;Array.isArray(f)&&(f=f.map(N=>N==null?"":typeof N=="object"?N.label??N.value??N.name??JSON.stringify(N):String(N)).filter(Boolean).join(",")),f!=null&&typeof f=="object"&&(f=f.label??f.value??f.name??JSON.stringify(f));const b=p.label??"",x=f??"",_=b==="使用状态";return{label:b,value:x,isStatus:_,tagType:_?r(x):""}})});return(c,s)=>{const m=e.resolveComponent("el-tag");return e.openBlock(),e.createElementBlock("div",hi,[o.value.length?(e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(p,f)=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"static-form-item"},[e.createElementVNode("div",mi,e.toDisplayString(p.label)+": ",1),e.createElementVNode("div",gi,[p.isStatus?(e.openBlock(),e.createBlock(m,{key:0,type:p.tagType,size:"Default",effect:"plain"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value??"-"),1)]),_:2},1032,["type"])):(e.openBlock(),e.createElementBlock("span",yi,e.toDisplayString(p.value??"-"),1))])]))),128))])):(e.openBlock(),e.createElementBlock("div",bi," 暂无数据 "))])}}}),wl=zt._export_sfc(ki,[["__scopeId","data-v-d92a85c0"]]),xi={class:"form-content"},wi={title:"选择标签"},Di={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},_i={class:"col-operate-wrap"},Ei={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},Ci={__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(t,{emit:i}){const r=()=>{m.value=!1,p.value=!1,f.value=[]},o=t;e.computed(()=>{var G;const U=(G=O.value)==null?void 0:G.split("/");return(U==null?void 0:U.some(De=>(De==null?void 0:De.includes("updateLoading"))||(De==null?void 0:De.includes("loading"))))?!1:z.value==="view"});const c=i,s=e.ref([]),m=e.ref(!1),p=e.ref(!1),f=e.ref([]),{getFileExtension:b}=No.useThreeSystem(),x=e.ref(),_=e.ref(!1),N=e.ref(!1),q=Oe.useUnit(T.pinia),{chooseTitle:$}=T.storeToRefs(q),oe=e.ref([]),P=e.ref(),L=e.ref(!1),R=e.ref([]),g=oa.useFormToTableComp(T.pinia),v=oa.useFormComp(T.pinia),y=e.ref(!1),C=e.ref(),S=T.useLoginState(T.pinia),{loginUserInfo:F}=T.storeToRefs(S),Be=e.ref(),Je=e.ref(!0),Ee=T.useModelComp(T.pinia),{tableViewContents:Ie,itemData:Ae,isEdit:z,routeToChildPath:se,lockingPage:te}=T.storeToRefs(Ee),ue=e.ref(null),Re=e.ref(!1),Qe=e.ref(!1),Z=T.useMenuState(),{activeMenuPath:O}=T.storeToRefs(Z),W=Oe.useOriginalState(T.pinia),{originalPath:ce}=T.storeToRefs(W),xe=e.computed(()=>O.value==="设备管理/试验设备"&&o.compName==="设备概要"),ke=e.ref([]),Ke=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),ae=async U=>{Qe.value=U,await ee("disabled",null,U,!0)},J=async U=>{await ee("operable",null,U,!0)};e.watch(()=>O.value,async()=>{s.value=[],f.value=[]},{deep:!0,immediate:!0});const k=()=>{e.nextTick(()=>{Q()})},be=U=>{var H;s.value=(H=s.value)==null?void 0:H.map(G=>({...G,isFormColHidden:!(U!=null&&U.includes(G.label))}))};e.onUnmounted(()=>{ue.value=null});const Ce=U=>{c("clickTrigger",U)},me=async U=>{var H,G,De,ve,X,he;if(U===""){let ie="";(H=s.value)==null||H.forEach(j=>{j!=null&&j.isMain&&(ie=j==null?void 0:j.value)});let Me=await Oe.getItemData(se.value,sessionStorage.getItem("systemKey"),"");ie=((he=(X=(ve=(De=(G=Me==null?void 0:Me[0])==null?void 0:G.compData)==null?void 0:De.find(j=>(j==null?void 0:j.key)==="mainRouters"))==null?void 0:ve.contents)==null?void 0:X[0])==null?void 0:he.routerContent)+ce.value+ie;let Ne=await Oe.getItemData(ie,sessionStorage.getItem("systemKey"),"");L.value=!0,R.value=Ne==null?void 0:Ne.filter(j=>(j==null?void 0:j.comp)!=="methodButton"),c("routeUrl",R.value)}},Q=()=>{var H;const U=(H=ue.value)==null?void 0:H.$el;U&&Oe.Sortable.create(U,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:G=>{const{oldIndex:De,newIndex:ve}=G;if(De===ve)return;const X=s.value.splice(De,1)[0];s.value.splice(ve,0,X)}})},ee=async(U,H,G,De=!1)=>{try{Ee.setRefreshCurStructure(!1)}catch{ct.ElMessage.error("编辑处理失败")}},pe=async(U,H)=>{await ee()},Se=async(U,H)=>{U&&await ee()},Ge=async(U,H,G)=>{await ee(H,G,U,!1)},dt=(U,H)=>{Be.value===H?Je.value=!1:Je.value=!0,Be.value=H==null?void 0:H.changeProp},w=async U=>{var G,De,ve,X,he,ie,Me,fe,Ne,j,ze,ge,We,st,Ye;let H=[];if((G=U==null?void 0:U.toString())!=null&&G.includes(".urdf")){if(U.includes(",")){ct.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:U,extension:b(U)}],p.value=!0,m.value=!0;return}if((De=U==null?void 0:U.toString())!=null&&De.includes(".stl")||(ve=U==null?void 0:U.toString())!=null&&ve.includes(".STL")||(X=U==null?void 0:U.toString())!=null&&X.includes(".obj")||(he=U==null?void 0:U.toString())!=null&&he.includes(".mtl")){const Ve=((ie=U==null?void 0:U.toString())==null?void 0:ie.split(",")).map(pt=>({url:pt,extension:b(pt)}));f.value=Ve,p.value=!1,m.value=!0;return}if((Me=U==null?void 0:U.toString())!=null&&Me.includes(".stl")||(fe=U==null?void 0:U.toString())!=null&&fe.includes(".STL")||(Ne=U==null?void 0:U.toString())!=null&&Ne.includes(".obj")||(j=U==null?void 0:U.toString())!=null&&j.includes(".mtl")){let tt,Ve=[],pt={};if(Array.isArray(U)?tt=U:tt=U==null?void 0:U.split(","),tt==null||tt.forEach(Ze=>{Ze.includes(".mtl")?Ve.push(Ze):pt.blob=pt.blob?pt.blob+","+Ze:Ze}),(Ve==null?void 0:Ve.length)>0&&(pt.mtlBlobs=Ve),(ge=(ze=Object.values(pt))==null?void 0:ze[0])!=null&&ge.includes("http:"))H.push(pt);else{const Ze=new Blob([pt.blob],{type:"application/octet-stream;charset=UTF-8"});let $e=URL.createObjectURL(Ze),rt="";(We=U==null?void 0:U.split("/"))==null||We.forEach((mt,wt)=>{var He;wt===((He=U==null?void 0:U.split("/"))==null?void 0:He.length)-1&&(rt=mt)}),(st=pt.blob)!=null&&st.includes(".stl")&&(rt=(rt==null?void 0:rt.replaceAll(">",""))+".urdf"),P.value=[{name:rt,blobUrl:$e}],N.value=!0}}else{const tt=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ve=await ct.axios.get(U,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{tt.close()}),pt=new Blob([Ve.data],{type:"application/octet-stream;charset=UTF-8"});let Ze=URL.createObjectURL(pt),$e="";(Ye=U==null?void 0:U.split("/"))==null||Ye.forEach((rt,mt)=>{var wt;mt===((wt=U==null?void 0:U.split("/"))==null?void 0:wt.length)-1&&($e=rt)}),P.value=[{name:$e,blobUrl:Ze}],N.value=!0}(H==null?void 0:H.length)>0&&v.setBlobUrls(H)},I=()=>{N.value=!1},Y=U=>{var X,he,ie,Me;const H=(he=(X=T.cloneDeep(o.itemData))==null?void 0:X.find(fe=>(fe==null?void 0:fe.key)==="formContent"))==null?void 0:he.contents,G=T.cloneDeep(U.content);let De={};G&&((ie=Object.values(G))==null?void 0:ie.length)>0&&((Me=Object.values(G))==null||Me.forEach((fe,Ne)=>{De[H[Ne].key]=fe}));const ve={content:De,index:o==null?void 0:o.index,buttonName:U==null?void 0:U.buttonName};c("change",ve)},le=e.computed(()=>"http://222.92.178.198:62001"),B=async U=>{var ze,ge,We,st,Ye,tt,Ve,pt,Ze,$e,rt,mt,wt,He,ot,bt;if(!U)return;(ge=(ze=o==null?void 0:o.itemData)==null?void 0:ze.find(Fe=>(Fe==null?void 0:Fe.key)==="parentFormPath"))==null||ge.contents;let H=Ie.value;(H==null?void 0:H.length)>0&&(H=H==null?void 0:H.map(Fe=>{var Xe,Te,V,ye;let Ue=(Xe=Fe==null?void 0:Fe.key)==null?void 0:Xe.split("/");return(o==null?void 0:o.compName)===(Ue==null?void 0:Ue[0])&&(Te=s.value)!=null&&Te.find(we=>(we==null?void 0:we.prop)===(Ue==null?void 0:Ue[1]))&&(Fe.value=(ye=(V=s.value)==null?void 0:V.find(we=>(we==null?void 0:we.prop)===(Ue==null?void 0:Ue[1])))==null?void 0:ye.value),Fe}),Ee.setTableViewContents(H));const G=T.cloneDeep(o.itemData);let De=G==null?void 0:G.map(Fe=>{var Ue;return(Fe==null?void 0:Fe.key)==="formContent"&&((Ue=Fe.contents)==null||Ue.map((Xe,Te)=>{var V,ye,we,at,et,Et,_t,ut,ft,vt,yt,$t,kt,Rt,Pt,Kt,qt,Jt,ta;return Xe.type=(ye=(V=s.value)==null?void 0:V.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:ye.type,Xe.options=Xe!=null&&Xe.options?Xe.options:((et=(at=(we=Xe==null?void 0:Xe.key)==null?void 0:we.split("$"))==null?void 0:at[1])==null?void 0:et.length)>0?(ft=(ut=oa.formGetOptions((_t=(Et=Xe==null?void 0:Xe.key)==null?void 0:Et.split("$"))==null?void 0:_t[1]))==null?void 0:ut.split(","))==null?void 0:ft.map(jt=>({label:jt,value:jt})):[],(vt=Xe==null?void 0:Xe.key)!=null&&vt.includes("$")&&(Xe.key=($t=(yt=Xe==null?void 0:Xe.key)==null?void 0:yt.split("$"))==null?void 0:$t[0]),Xe.signature=(Rt=(kt=s.value)==null?void 0:kt.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Rt.signature,Xe.isLoginUser=(Kt=(Pt=s.value)==null?void 0:Pt.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:Kt.isLoginUser,Xe.value=(qt=Object.values(U))==null?void 0:qt[Te],Xe.isFormColHidden=(ta=(Jt=s.value)==null?void 0:Jt.find(jt=>(jt==null?void 0:jt.prop)===(Xe==null?void 0:Xe.prop)))==null?void 0:ta.isFormColHidden,Xe})),Fe}),ve=s.value,X=(st=(We=T.cloneDeep(De))==null?void 0:We.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:st.contents;if(ve=ve==null?void 0:ve.map(Fe=>{var Ue;return Fe.value=(Ue=X==null?void 0:X.find((Xe,Te)=>((Xe==null?void 0:Xe.id)??Te)===(Fe==null?void 0:Fe.id)))==null?void 0:Ue.value,Fe}),!Je.value){c("contentChange",{contents:De,index:o.index});return}let he="",ie=(Ve=(tt=(Ye=T.cloneDeep(De))==null?void 0:Ye.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ve.find((Fe,Ue)=>{var Xe,Te,V;return(Fe==null?void 0:Fe.label)===Be.value||Ue.toString()===((V=(Te=(Xe=Be.value)==null?void 0:Xe.split("t"))==null?void 0:Te[1])==null?void 0:V.toString())}),Me=(pt=ie==null?void 0:ie.optionUrl)==null?void 0:pt.menuSelect,fe=!0;if((rt=($e=(Ze=T.cloneDeep(De))==null?void 0:Ze.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:$e.contents)==null||rt.forEach(Fe=>{var Ue,Xe,Te,V,ye,we;fe&&((Te=(Xe=(Ue=Fe==null?void 0:Fe.optionUrl)==null?void 0:Ue.groupSelect)==null?void 0:Xe[1])!=null&&Te.includes("["))&&(he=(ye=(V=Fe==null?void 0:Fe.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ye[1],JSON.stringify(Me)===JSON.stringify((we=Fe==null?void 0:Fe.optionUrl)==null?void 0:we.menuSelect)&&(fe=!1))}),(mt=ie==null?void 0:ie.optionUrl)!=null&&mt.menuSelect&&Je.value){let Fe=await oa.getSelectRow(ie),Ue,Xe=(wt=ie==null?void 0:ie.optionUrl)==null?void 0:wt.menuSelect;if(Fe==null||Fe.forEach(Te=>{var V,ye,we,at,et,Et,_t,ut,ft,vt;he===((ye=(V=ie==null?void 0:ie.optionUrl)==null?void 0:V.groupSelect)==null?void 0:ye[1])&&((et=(at=(we=ie==null?void 0:ie.optionUrl)==null?void 0:we.groupSelect)==null?void 0:at[1])!=null&&et.includes("["))&&((vt=T.cloneDeep(Te))==null?void 0:vt[(ft=(ut=(_t=(Et=ie==null?void 0:ie.optionUrl)==null?void 0:Et.groupSelect)==null?void 0:_t[1])==null?void 0:ut.replaceAll("[",""))==null?void 0:ft.replaceAll("]","")])===(ie==null?void 0:ie.value)&&(Ue=Te)}),Ue){let Te=T.cloneDeep(ve);Te=Te==null?void 0:Te.map(ye=>{var we,at,et,Et,_t,ut,ft,vt,yt,$t,kt;return(Ue!=null&&Ue[ye==null?void 0:ye.label]||Ue!=null&&Ue[(Et=(et=(at=(we=ye==null?void 0:ye.optionUrl)==null?void 0:we.groupSelect)==null?void 0:at[1])==null?void 0:et.replaceAll("[",""))==null?void 0:Et.replaceAll("]","")])&&((ft=(ut=(_t=ye==null?void 0:ye.optionUrl)==null?void 0:_t.groupSelect)==null?void 0:ut[1])!=null&&ft.includes("["))&&Xe!=null&&Xe.every(Rt=>{var Pt,Kt;return(Kt=(Pt=ye==null?void 0:ye.optionUrl)==null?void 0:Pt.menuSelect)==null?void 0:Kt.includes(Rt)})&&(ye.value=(Ue==null?void 0:Ue[ye==null?void 0:ye.label])||(Ue==null?void 0:Ue[(kt=($t=(yt=(vt=ye==null?void 0:ye.optionUrl)==null?void 0:vt.groupSelect)==null?void 0:yt[1])==null?void 0:$t.replaceAll("[",""))==null?void 0:kt.replaceAll("]","")]),Array.isArray(ye.value)&&ye.value.every(Rt=>(Rt==null?void 0:Rt.url)&&(Rt==null?void 0:Rt.name))&&(ye.type="Upload")),ye}),Te=Te==null?void 0:Te.map(ye=>{var we,at,et;return(we=ye==null?void 0:ye.optionUrl)!=null&&we.oldMenuSelect&&(ye.optionUrl.menuSelect=(et=(at=T.cloneDeep(ye))==null?void 0:at.optionUrl)==null?void 0:et.oldMenuSelect),ye}),s.value=T.cloneDeep(Te);let V=T.cloneDeep(Te);V=V==null?void 0:V.map(ye=>{var we,at,et,Et,_t,ut;return(at=(we=ye==null?void 0:ye.optionUrl)==null?void 0:we.menuSelect)!=null&&at.some(ft=>ft==null?void 0:ft.includes("["))&&(ye.optionUrl.oldMenuSelect=(Et=(et=T.cloneDeep(ye))==null?void 0:et.optionUrl)==null?void 0:Et.menuSelect,ye.optionUrl.menuSelect=(ut=(_t=ye==null?void 0:ye.optionUrl)==null?void 0:_t.menuSelect)==null?void 0:ut.map(ft=>{var vt,yt,$t,kt;if(ft!=null&&ft.includes("[")){let Rt=(yt=(vt=ft==null?void 0:ft.replaceAll("[","").replaceAll("]",""))==null?void 0:vt.split(":"))==null?void 0:yt[1];ft=(kt=($t=T.cloneDeep(Te))==null?void 0:$t.find(Pt=>(Pt==null?void 0:Pt.label)===Rt))==null?void 0:kt.value}return ft})),ye}),s.value=V}else s.value=ve;De=De==null?void 0:De.map(Te=>{var V;return(Te==null?void 0:Te.key)==="formContent"&&(Te.contents=(V=Te.contents)==null?void 0:V.map(ye=>{var we,at,et,Et;return ye.value=((at=(we=s.value)==null?void 0:we.find(_t=>(_t==null?void 0:_t.label)===(ye==null?void 0:ye.key)))==null?void 0:at.value)??(ye==null?void 0:ye.value),ye.type=((Et=(et=s.value)==null?void 0:et.find(_t=>(_t==null?void 0:_t.prop)===(ye==null?void 0:ye.key)))==null?void 0:Et.type)??(ye==null?void 0:ye.type),ye})),Te})}Je.value=!1,c("contentChange",{contents:De,index:o.index});let Ne=[],j=[];if((ot=T.cloneDeep((He=De==null?void 0:De.find(Fe=>(Fe==null?void 0:Fe.key)==="formContent"))==null?void 0:He.contents))==null||ot.forEach(Fe=>{var Ue;Array.isArray(Fe==null?void 0:Fe.value)&&((Ue=Fe==null?void 0:Fe.value)!=null&&Ue.find(Xe=>{var Te;return(Te=Xe==null?void 0:Xe.url)==null?void 0:Te.includes(".obj")}))&&(j=Fe==null?void 0:Fe.value)}),(j==null?void 0:j.length)>0){const Fe=(bt=T.cloneDeep(j))==null?void 0:bt.filter(Ue=>{var Xe;return(Xe=Ue==null?void 0:Ue.url)==null?void 0:Xe.includes(".obj")});Fe==null||Fe.forEach(Ue=>{var Te,V,ye,we;const Xe=(Te=j==null?void 0:j.filter(at=>{var et;return(at==null?void 0:at.name)===(Ue==null?void 0:Ue.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Te.map(at=>at==null?void 0:at.url);Ne.push({objUrl:Ue==null?void 0:Ue.url,mtlUrls:((V=j==null?void 0:j.filter(at=>{var et;return(at==null?void 0:at.name)===(Ue==null?void 0:Ue.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:V.length)===1?(we=(ye=j==null?void 0:j.filter(at=>{var et;return(at==null?void 0:at.name)===(Ue==null?void 0:Ue.name)&&((et=at==null?void 0:at.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:ye[0])==null?void 0:we.url:Xe})}),v.setObjUrl(Ne)}},de=U=>{if(!U)return;const H=[];let G="";for(let De of U)(De.includes("[")||G.includes("["))&&(G+=De.trim(),T.cloneDeep(G).split("【").length-1===T.cloneDeep(G).split("】").length-1&&T.cloneDeep(G).split("[").length-1===T.cloneDeep(G).split("]").length-1&&(H.push(G.replace(/\/\*[\s\S]*?\*\//g,"")),G=""));return H},Pe=(U,H,G)=>{let De="";const ve=H==null?void 0:H.map(X=>{var he;return(he=X==null?void 0:X.value)==null?void 0:he.pageData});return ve==null||ve.forEach(X=>{var he;(X==null?void 0:X.name)===(U==null?void 0:U[0])&&((he=X==null?void 0:X.compData)==null||he.forEach(ie=>{var Me;(ie==null?void 0:ie.key)==="formContent"&&((Me=ie==null?void 0:ie.contents)==null||Me.forEach(fe=>{var Ne;(fe==null?void 0:fe.prop)===(U==null?void 0:U[1])&&(De=(fe==null?void 0:fe.value)===""?Oe.judgeContents((Ne=T.cloneDeep(fe))==null?void 0:Ne.optionUrl,G):fe==null?void 0:fe.value)}))}))}),De},re=(U,H,G,De)=>{var ie,Me;let ve="",X="";(ie=T.cloneDeep(H))==null||ie.forEach((fe,Ne)=>{fe!=null&&fe.includes("[")?X=X+ce.value+U[Ne]:X=X===""?X+fe:X+"/"+fe});let he=(Me=De[X])==null?void 0:Me.map(fe=>{var Ne;return(Ne=fe==null?void 0:fe.value)==null?void 0:Ne.pageData});return he==null||he.forEach(fe=>{var Ne;(fe==null?void 0:fe.name)===(G==null?void 0:G[0])&&((Ne=fe==null?void 0:fe.compData)==null||Ne.forEach(j=>{var ze;(j==null?void 0:j.key)==="formContent"&&((ze=j==null?void 0:j.contents)==null||ze.forEach(ge=>{(ge==null?void 0:ge.prop)===(G==null?void 0:G[1])&&(ve=ge==null?void 0:ge.value)}))}))}),ve};return e.watch(()=>o.itemData,async()=>{var he,ie,Me,fe,Ne,j,ze,ge,We,st,Ye,tt,Ve,pt,Ze,$e,rt,mt,wt;const U=(he=o.itemData)==null?void 0:he.find(He=>(He==null?void 0:He.key)==="formContent"),H=(ie=T.cloneDeep(o.itemData))==null?void 0:ie.find(He=>(He==null?void 0:He.key)==="formButton"),G=(Me=T.cloneDeep(o.itemData))==null?void 0:Me.find(He=>(He==null?void 0:He.key)==="formFlex"),De=(fe=T.cloneDeep(o.itemData))==null?void 0:fe.find(He=>(He==null?void 0:He.key)==="formWrap"),ve=(Ne=T.cloneDeep(o.itemData))==null?void 0:Ne.find(He=>(He==null?void 0:He.key)==="enableWrap");if((De==null?void 0:De.contents)==="纵向"?_.value=!1:_.value=!0,y.value=(ve==null?void 0:ve.contents)===void 0?!1:ve==null?void 0:ve.contents,C.value=typeof(G==null?void 0:G.contents)!="boolean"?!(!(G!=null&&G.contents)===""||((j=G==null?void 0:G.contents)==null?void 0:j.toUpperCase())==="VERTICAL"):G==null?void 0:G.contents,((ze=U==null?void 0:U.contents)==null?void 0:ze.length)>0&&Array.isArray(U==null?void 0:U.contents)){let He=o.allMapContents;const ot=(We=(ge=T.cloneDeep(U))==null?void 0:ge.contents)==null?void 0:We.map((V,ye)=>{var Rt,Pt,Kt,qt,Jt,ta,jt,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma;let we=(V==null?void 0:V.label)??(V==null?void 0:V.key)??"",at=(V==null?void 0:V.type)??"",et=(V==null?void 0:V.options)??[];if((Rt=V==null?void 0:V.key)!=null&&Rt.includes("$")&&(we=(Pt=T.cloneDeep(V==null?void 0:V.key).split("$"))==null?void 0:Pt[0],((qt=(Kt=T.cloneDeep(V==null?void 0:V.key).split("$"))==null?void 0:Kt[1])==null?void 0:qt.length)>0)){const[Ct,aa]=(ta=(Jt=T.cloneDeep(V==null?void 0:V.key).split("$"))==null?void 0:Jt[1])==null?void 0:ta.split(/[()]/);at=((jt=Oe.FormType.find(nt=>(nt==null?void 0:nt.key)===Ct))==null?void 0:jt.value)??"",((Fa=aa==null?void 0:aa.split(","))==null?void 0:Fa.length)>0&&(et=(wa=aa==null?void 0:aa.split(","))==null?void 0:wa.map(nt=>({label:nt,value:nt})))}let Et=[];V!=null&&V.contents&&!Array.isArray(V==null?void 0:V.contents)&&(Et=(Da=(ja=V==null?void 0:V.contents)==null?void 0:ja.split(","))==null?void 0:Da.map(Ct=>({label:Ct,value:Ct}))),((Ua=V==null?void 0:V.optionUrl)==null?void 0:Ua.selectRelateType)==="自定义绑定"&&(Et=(Wa=(Ka=V==null?void 0:V.optionUrl)==null?void 0:Ka.defaultSelect)==null?void 0:Wa.map(Ct=>({label:Ct,value:Ct})));let _t=!1,ut=(V==null?void 0:V.isFormColHidden)??!1,ft=Oe.judgeContents((Ha=T.cloneDeep(V))==null?void 0:Ha.optionUrl,He),vt=ft!==void 0&&ft!==""?ft:V!=null&&V.originalContent&&(V==null?void 0:V.originalContent)!==""?V.originalContent:V!=null&&V.value?V.value:(et==null?void 0:et.length)>0?(qa=et==null?void 0:et[0])==null?void 0:qa.value:(V==null?void 0:V.value)??"",yt=!1,$t=ft!==void 0||at===""?"Input":at;if((Array.isArray(ft)&&(ft!=null&&ft.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url)))||Array.isArray(vt)&&(vt!=null&&vt.every(Ct=>(Ct==null?void 0:Ct.name)&&(Ct==null?void 0:Ct.url))))&&($t="upload"),typeof vt=="string"&&(vt!=null&&vt.includes("loginUser"))&&!(vt!=null&&vt.includes("loginUserSign"))||V!=null&&V.isLoginUser)_t=!0,vt=((Na=F.value)==null?void 0:Na.姓名)||((ya=F.value)==null?void 0:ya.account)||((fa=F.value)==null?void 0:fa.账号)||((_a=F.value)==null?void 0:_a.userName);else if(typeof vt=="string"&&(vt!=null&&vt.includes("loginUserSign"))||V!=null&&V.signature||V!=null&&V.isShow)if(yt=!0,(V==null?void 0:V.isShow)==="originalSignature")$t="image",vt=le.value+"/"+((ba=F.value)==null?void 0:ba.signature);else{let Ct=[...new Set(de(V.isShow))].map(St=>{var It,Mt,Lt,At;return{key:(At=(Lt=(Mt=(It=St==null?void 0:St.split("["))==null?void 0:It[1])==null?void 0:Mt.split("]"))==null?void 0:Lt[0])==null?void 0:At.split(":"),value:""}});(ca=Ae.value)==null||ca.forEach(St=>{Ct==null||Ct.forEach((Dt,It)=>{var Lt;let Mt=Dt==null?void 0:Dt.key;(St==null?void 0:St.name)===(Mt==null?void 0:Mt[0].replaceAll("'",""))&&((Lt=St==null?void 0:St.compData)==null||Lt.forEach(At=>{var na;(At==null?void 0:At.key)==="formContent"&&((na=At==null?void 0:At.contents)==null||na.forEach(Yt=>{(Yt==null?void 0:Yt.prop)===(Mt==null?void 0:Mt[1].replaceAll("'",""))&&(Ct[It].value=Yt==null?void 0:Yt.value)}))}))})});let aa=Ct==null?void 0:Ct.map(St=>{var Dt;return St.key="["+((Dt=St.key)==null?void 0:Dt.join(":"))+"]",St}),nt=V==null?void 0:V.isShow;aa==null||aa.forEach(St=>{St!=null&&St.value?nt=nt.replaceAll(St==null?void 0:St.key,"'"+(St==null?void 0:St.value)+"'"):nt=nt.replaceAll(St==null?void 0:St.key,"undefined")}),nt!=null&&nt.includes("(")||(nt!=null&&nt.includes("==")?nt=((ma=nt==null?void 0:nt.split("==="))==null?void 0:ma[0])+"==='"+((Xa=nt==null?void 0:nt.split("==="))==null?void 0:Xa[1])+"'":nt=((Aa=nt==null?void 0:nt.split("="))==null?void 0:Aa[0])+"='"+((Va=nt==null?void 0:nt.split("="))==null?void 0:Va[1])+"'"),nt!=null&&nt.includes("=")&&!(nt!=null&&nt.includes("=="))&&!(nt!=null&&nt.includes("==="))&&(nt=nt==null?void 0:nt.replaceAll("=","==")),new Function(`if (${nt}) { return true } else { return false }`)()?(ut=!1,$t="image",vt=le.value+"/"+((Ea=F.value)==null?void 0:Ea.signature)):vt=""}return Array.isArray(vt)&&vt.every(Ct=>(Ct==null?void 0:Ct.url)&&(Ct==null?void 0:Ct.name))&&(V.type="Upload"),V!=null&&V.isMainUrl&&($t="Url"),{label:we??"",name:"t"+ye,prop:T.cloneDeep(V==null?void 0:V.key),type:$t,value:V!=null&&V.isSync?((Ga=(Ya=$.value)==null?void 0:Ya[0])==null?void 0:Ga.value)??((Ma=(Oa=O==null?void 0:O.value)==null?void 0:Oa.split("/"))==null?void 0:Ma[((Za=(Ja=O==null?void 0:O.value)==null?void 0:Ja.split("/"))==null?void 0:Za.length)-1]):V!=null&&V.isNewDate&&vt===""?new Date:vt,id:(V==null?void 0:V.id)??ye,contents:(Et==null?void 0:Et.length)>0?Et:et??[],width:(V==null?void 0:V.width)??1,isLoginUser:_t,config:V==null?void 0:V.config,optionUrl:(V==null?void 0:V.optionUrl)??V,isFormColHidden:ut,signature:yt,isMain:V==null?void 0:V.isMain,isMainUrl:V==null?void 0:V.isMainUrl,operable:(V==null?void 0:V.operable)??!1,disabled:(V==null?void 0:V.disabled)??!1,isSync:V==null?void 0:V.isSync}}),bt=ot==null?void 0:ot.map(V=>V==null?void 0:V.value);let Fe="";bt==null||bt.forEach(V=>{V!==""&&V!==void 0&&(Fe=Fe===""?V:Fe+"/"+V)}),g.setSelectArray(bt),g.setSelectString(Fe);let Ue=(st=T.cloneDeep(ot))==null?void 0:st.map(V=>(V!=null&&V.value&&Oe.IsJson(V==null?void 0:V.value)&&Array.isArray(JSON.parse(V==null?void 0:V.value))&&(V.value=JSON.parse(V.value)),V));Ue=Ue==null?void 0:Ue.map(V=>{var ye,we,at,et,Et,_t,ut,ft;if((we=(ye=V==null?void 0:V.optionUrl)==null?void 0:ye.menuSelect)!=null&&we.some(vt=>vt==null?void 0:vt.includes("["))){let vt="";V.optionUrl.oldMenuSelect=(et=(at=T.cloneDeep(V))==null?void 0:at.optionUrl)==null?void 0:et.menuSelect,V.optionUrl.menuSelect=(_t=(Et=V==null?void 0:V.optionUrl)==null?void 0:Et.menuSelect)==null?void 0:_t.map(yt=>{var $t,kt,Rt,Pt,Kt,qt;if(yt!=null&&yt.includes("[")){let Jt=(kt=($t=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:$t.split(":"))==null?void 0:kt[1];vt=Pe((Rt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:Rt.split(":"),He==null?void 0:He[O.value],He),yt=((Kt=(Pt=T.cloneDeep(Ue))==null?void 0:Pt.find(ta=>(ta==null?void 0:ta.label)===Jt))==null?void 0:Kt.value)||Pe((qt=yt==null?void 0:yt.replaceAll("[","").replaceAll("]",""))==null?void 0:qt.split(":"),He==null?void 0:He[O.value],He)}return yt}),vt!==""&&V.value===""&&(V.value=re(V.optionUrl.menuSelect,V.optionUrl.oldMenuSelect,(ut=V==null?void 0:V.optionUrl)==null?void 0:ut.groupSelect,He),Array.isArray(V.value)&&((ft=V.value)!=null&&ft.every(yt=>yt==null?void 0:yt.url))&&(V.type="UPLOAD"))}return V}),s.value=Ue,Qe.value=((Ye=s.value)==null?void 0:Ye.every(V=>V==null?void 0:V.disabled))||te.value===O.value,Re.value=(tt=s.value)==null?void 0:tt.every(V=>V==null?void 0:V.operable),ke.value=(Ve=s.value)==null?void 0:Ve.map(V=>V==null?void 0:V.label);let Xe=[],Te=[];if((pt=T.cloneDeep(s.value))==null||pt.forEach(V=>{var ye;Array.isArray(V==null?void 0:V.value)&&((ye=V==null?void 0:V.value)!=null&&ye.find(we=>{var at;return(at=we==null?void 0:we.url)==null?void 0:at.includes(".obj")}))&&(Te=V==null?void 0:V.value)}),(Te==null?void 0:Te.length)>0){const V=(Ze=T.cloneDeep(Te))==null?void 0:Ze.filter(ye=>{var we;return(we=ye==null?void 0:ye.url)==null?void 0:we.includes(".obj")});V==null||V.forEach(ye=>{var at,et,Et,_t;const we=(at=Te==null?void 0:Te.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:at.map(ut=>ut==null?void 0:ut.url);Xe.push({objUrl:ye==null?void 0:ye.url,mtlUrls:((et=Te==null?void 0:Te.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:et.length)===1?(_t=(Et=Te==null?void 0:Te.filter(ut=>{var ft;return(ut==null?void 0:ut.name)===(ye==null?void 0:ye.name)&&((ft=ut==null?void 0:ut.url)==null?void 0:ft.includes(".mtl"))}))==null?void 0:Et[0])==null?void 0:_t.url:we})}),v.setObjUrl(Xe)}($e=T.cloneDeep(s.value))==null||$e.forEach(V=>{var ye,we,at,et,Et,_t,ut,ft,vt,yt,$t,kt,Rt;if((we=(ye=V==null?void 0:V.value)==null?void 0:ye.toString())!=null&&we.includes(".stl")||(et=(at=V==null?void 0:V.value)==null?void 0:at.toString())!=null&&et.includes(".STL")||(_t=(Et=V==null?void 0:V.value)==null?void 0:Et.toString())!=null&&_t.includes(".obj")||(ft=(ut=V==null?void 0:V.value)==null?void 0:ut.toString())!=null&&ft.includes(".mtl")||(yt=(vt=V==null?void 0:V.value)==null?void 0:vt.toString())!=null&&yt.includes(".urdf")){let Pt={},Kt=[],qt;Array.isArray(V==null?void 0:V.value)?qt=V==null?void 0:V.value:qt=($t=V==null?void 0:V.value)==null?void 0:$t.split(","),qt==null||qt.forEach(Jt=>{Jt.includes(".mtl")?Kt.push(Jt):Pt.blob=Pt.blob==="undefined"?Jt:Pt.blob+","+Jt}),(Kt==null?void 0:Kt.length)>0&&(Pt.mtlBlobs=Kt),(Rt=(kt=Object.values(Pt))==null?void 0:kt[0])!=null&&Rt.includes("http:")}})}else s.value=[];let X=Ie.value;if((X==null?void 0:X.length)>0&&(X=X==null?void 0:X.map(He=>{var bt,Fe,Ue,Xe;let ot=(bt=He==null?void 0:He.key)==null?void 0:bt.split("/");return(o==null?void 0:o.compName)===(ot==null?void 0:ot[0])&&(Fe=s.value)!=null&&Fe.find(Te=>(Te==null?void 0:Te.prop)===(ot==null?void 0:ot[1]))&&(He.value=(Xe=(Ue=s.value)==null?void 0:Ue.find(Te=>(Te==null?void 0:Te.prop)===(ot==null?void 0:ot[1])))==null?void 0:Xe.value),He}),Ee.setTableViewContents(X)),o!=null&&o.formRules)x.value=o==null?void 0:o.formRules;else{let He={};(rt=T.cloneDeep(s).value)==null||rt.forEach(ot=>{(ot==null?void 0:ot.isMain)===!0&&(He[(ot==null?void 0:ot.prop)??(ot==null?void 0:ot.name)]=[{required:!0,message:`${(ot==null?void 0:ot.prop)||(ot==null?void 0:ot.name)}不能为空`}])}),x.value=He}if(((mt=H==null?void 0:H.contents)==null?void 0:mt.length)>0){const He=[];(wt=H==null?void 0:H.contents)==null||wt.forEach((ot,bt)=>{(ot==null?void 0:ot.label)!==""&&He.push({label:(ot==null?void 0:ot.label)??"",id:(ot==null?void 0:ot.id)??bt,type:(ot==null?void 0:ot.type)??"",background:ot==null?void 0:ot.background})}),oe.value=He}else oe.value=[]},{deep:!0,immediate:!0}),e.watch(()=>te.value,U=>{Qe.value=U===O.value},{immediate:!0}),(U,H)=>{var ie,Me;const G=e.resolveComponent("svg-icon"),De=e.resolveComponent("el-switch"),ve=e.resolveComponent("el-checkbox"),X=e.resolveComponent("el-popover"),he=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",xi,[y.value===!1?(e.openBlock(),e.createBlock(fi,{key:0,items:(Me=(ie=s.value)==null?void 0:ie.filter(fe=>!(fe!=null&&fe.isFormColHidden)))==null?void 0:Me.map(fe=>({label:fe==null?void 0:fe.label,value:fe==null?void 0:fe.value}))},null,8,["items"])):xe.value?(e.openBlock(),e.createBlock(wl,{key:1,itemData:t.itemData,compName:t.compName},null,8,["itemData","compName"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"form-shadow-box":y.value})},[e.createVNode(Nt.ssForm,{rowContents:s.value,formRules:x.value,buttonValue:oe.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:Y,onChange:B,formDisabled:Qe.value,formLabelsOperable:Re.value,isButtonRow:_.value,onPreview:w,onBlurChange:dt,onHandleColEditChange:pe,onHandleColTypeChange:Se,onRouteUrl:me,onClickTrigger:Ce},{operateCol:e.withCtx(({renderColumns:fe,formDisabled:Ne,formLabelsOperable:j})=>[e.createVNode(X,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:k},{reference:e.withCtx(()=>[e.createElementVNode("span",wi,[e.createVNode(G,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Di,[H[1]||(H[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(De,{"model-value":Ne,"active-text":"禁用","inactive-text":"",onChange:ae,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(De,{"model-value":j,"active-text":"编辑所有标签","inactive-text":"",onChange:J},null,8,["model-value"]),H[2]||(H[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(he,{modelValue:ke.value,"onUpdate:modelValue":H[0]||(H[0]=ze=>ke.value=ze),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:ue,onChange:be},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fe,ze=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ze.label},[e.createVNode(ve,{value:ze.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ze.label),1)]),_:2},1032,["value"]),e.createVNode(X,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(G,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ge;return[e.createElementVNode("div",_i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ge=Object.keys(ze))==null?void 0:ge.filter(We=>{var st;return(st=Ke.value)==null?void 0:st.find(Ye=>(Ye==null?void 0:Ye.value)===We)}),We=>{var st,Ye;return e.openBlock(),e.createElementBlock("div",{key:We},[e.createVNode(Nt._sfc_main$1,{value:ze==null?void 0:ze[We],"active-text":(Ye=(st=Ke.value)==null?void 0:st.find(tt=>(tt==null?void 0:tt.value)===We))==null?void 0:Ye.label,inactiveText:"",onChange:tt=>Ge(tt,We,ze)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",Ei,[e.createVNode(G,{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"])],2)),N.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:3,fileDataList:P.value,onDestroy:I},null,8,["fileDataList"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createBlock(Gt.ssDialog,{key:4,visible:m.value,onBeforeDestroy:r,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(No.ThreeViewerHost,{files:f.value,onGetAnimationData:U.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Ro=zt._export_sfc(Ci,[["__scopeId","data-v-354b0fba"]]),Hn=e.ref(0),Dl=t=>{var i;return!t||(t==null?void 0:t.length)===0?[]:(i=T.cloneDeep(t))==null?void 0:i.map(o=>(Hn.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Hn.value,children:Dl(o==null?void 0:o.children)},o))},Si=t=>{var r;return(r=T.cloneDeep(t))==null?void 0:r.map(o=>(Hn.value++,o={label:(o==null?void 0:o.label)??"",prop:(o==null?void 0:o.label)==="操作"?"operate":o==null?void 0:o.prop,width:o!=null&&o.width?parseInt(o.width):"",fixed:(o==null?void 0:o.fixed)??void 0,sortable:(o==null?void 0:o.sortable)??!1,align:(o==null?void 0:o.align)??"left",showOverflowTooltip:(o==null?void 0:o.showOverflowTooltip)??!0,isNotDrag:(o==null?void 0:o.isNotDrag)??!1,isEditCol:(o==null?void 0:o.isEditCol)??!1,isOperate:(o==null?void 0:o.isOperate)??!1,id:(o==null?void 0:o.id)??Hn.value,children:Dl(o==null?void 0:o.children)},o))},_l=(t,i)=>{var r;return t!=null&&t.find(o=>(o==null?void 0:o.id)===i)?(r=T.cloneDeep(t))==null?void 0:r.filter(c=>(c==null?void 0:c.id)!==i):(t=t==null?void 0:t.map(o=>(o.children=_l(o==null?void 0:o.children,i),o)),t)},El=(t,i)=>{var r;return t!=null&&t.find(o=>(o==null?void 0:o.id)===(i==null?void 0:i.id))?(r=T.cloneDeep(t))==null?void 0:r.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(t=t==null?void 0:t.map(o=>(o.children=El(o==null?void 0:o.children,i),o)),t)},Cl=(t,i)=>{var r;return t!=null&&t.find(o=>{var c;return(o==null?void 0:o.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(r=T.cloneDeep(t))==null?void 0:r.map(c=>{var s;return(c==null?void 0:c.id)===((s=i==null?void 0:i.contents)==null?void 0:s.id)&&(c=i==null?void 0:i.contents),c}):(t=t==null?void 0:t.map(o=>(o.children=Cl(o==null?void 0:o.children,i),o)),t)},Sl=(t,i)=>{var r;return t!=null&&t.find(o=>(o==null?void 0:o.id)===(i==null?void 0:i.id))?(r=T.cloneDeep(t))==null?void 0:r.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c!=null&&c.children||(c.children=[]),c.children.push(i.contents)),c)):(t=t==null?void 0:t.map(o=>(o.children=Sl(o==null?void 0:o.children,i),o)),t)},Ot=[{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"}],Ti=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],Bi=[{label:"新增",value:"add"}],Sa=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Bi},{key:"background",label:"按钮背景色",type:"Color"}],Ta=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ti},{key:"textColor",label:"按钮颜色",type:"Color"}],Ii={class:"table-header-child"},Ni={class:"table-header-child-main"},Ai={class:"table-header-child-content"},Vi={class:"table-header-child-content-item"},Oi={class:"fix-button"},Mi={key:0},zi={class:"form-content"},Ri={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(t,{emit:i}){const r=t,o=i,c=e.ref(!1),s=e.ref(""),m=Oe.useTableComp(T.pinia),{tableIndex:p}=T.storeToRefs(m);e.ref(0);const f=e.ref(""),b=e.ref([]),x=e.ref([]),_=g=>{var y;c.value=!0;let v=[];Ot==null||Ot.forEach(C=>{let S=T.cloneDeep(p.value)+1;m.setTableIndex(S),v.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:g[C.key],id:p.value,contents:C==null?void 0:C.options})}),g!=null&&g.children&&((y=g==null?void 0:g.children)==null?void 0:y.length)>0&&v.push({children:g==null?void 0:g.children,isFormColHidden:!0}),f.value=g==null?void 0:g.id,b.value=v,x.value=v},N=g=>{o("fixChange",T.cloneDeep(g))},q=g=>{o("deleteChange",T.cloneDeep(g))},$=g=>{c.value=!0;let v=[];Ot==null||Ot.forEach(y=>{let C=T.cloneDeep(p.value)+1;m.setTableIndex(C),v.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:p.value,contents:y==null?void 0:y.options})}),s.value=g==null?void 0:g.id,b.value=v,x.value=v},oe=g=>{let v=T.cloneDeep(x.value);v=v==null?void 0:v.map(y=>(y.children||(y.value=g==null?void 0:g[y.name]),y)),x.value=v},P=()=>{var v,y;b.value=x.value;let g={};if(f.value!=="")g.id=f.value,(v=b.value)==null||v.forEach(C=>{const S=Ot==null?void 0:Ot.find(F=>(F==null?void 0:F.label)===(C==null?void 0:C.label));S?g[S.key]=C.value:C!=null&&C.children&&C.children.length>0&&(g.children=C.children)}),c.value=!1,o("fixChange",{contents:T.cloneDeep(g),id:s.value,type:"fix"});else{let C=T.cloneDeep(p.value)+1;m.setTableIndex(C),g.id="id"+p.value,(y=b.value)==null||y.forEach(S=>{const F=Ot==null?void 0:Ot.find(Be=>(Be==null?void 0:Be.label)===(S==null?void 0:S.label));F?g[F.key]=S.value:S!=null&&S.children&&S.children.length>0&&(g.children=S.children)}),c.value=!1,o("fixChange",{contents:T.cloneDeep(g),id:s.value,type:"add"})}f.value="",b.value=[],x.value=[]},L=()=>{c.value=!1,f.value="",s.value="",b.value=[],x.value=[]},R=g=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",g),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(g,v)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(C,S)=>(e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("div",Ai,[e.createElementVNode("div",Vi,e.toDisplayString(C.label),1),e.createElementVNode("div",Oi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>$(C)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>_(C)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>R(C)},null,8,["onClick"])])]),C!=null&&C.children&&C.children.length>0?(e.openBlock(),e.createElementBlock("div",Mi,[e.createVNode(Tl,{tableChildContents:C==null?void 0:C.children,onDeleteChange:q,onFixChange:N},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:L,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:oe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:L,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:P},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Pi=zt._export_sfc(Ri,[["__scopeId","data-v-e0fef72d"]]),$i={class:"table-header-child"},Li={class:"table-header-child-main"},Fi={class:"table-header-child-content"},ji={class:"table-header-child-content-item"},Ui={class:"fix-button"},Ki={key:0},Wi={class:"form-content"},Hi={class:"dialog-footer"},qi={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(t,{emit:i}){const r=t,o=i,c=e.ref(!1),s=e.ref(""),m=Oe.useTableComp(T.pinia),{tableIndex:p}=T.storeToRefs(m),f=e.ref(""),b=e.ref([]),x=e.ref([]),_=g=>{o("fixChange",T.cloneDeep(g))},N=g=>{var y;c.value=!0;let v=[];Ot==null||Ot.forEach(C=>{let S=T.cloneDeep(p.value)+1;m.setTableIndex(S),v.push({label:C==null?void 0:C.label,name:C==null?void 0:C.label,type:C.type,value:g[C.key],id:p.value,contents:C==null?void 0:C.options})}),g!=null&&g.children&&((y=g==null?void 0:g.children)==null?void 0:y.length)>0&&v.push({children:g==null?void 0:g.children,isFormColHidden:!0}),f.value=g==null?void 0:g.id,b.value=v,x.value=v},q=g=>{c.value=!0;let v=[];Ot==null||Ot.forEach(y=>{let C=T.cloneDeep(p.value)+1;m.setTableIndex(C),v.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:p.value,contents:y==null?void 0:y.options})}),s.value=g==null?void 0:g.id,b.value=v,x.value=v},$=g=>{let v=T.cloneDeep(x.value);v=v==null?void 0:v.map(y=>(y.children||(y.value=g==null?void 0:g[y.name]),y)),x.value=v},oe=()=>{var v,y;b.value=x.value;let g={};if(f.value!=="")g.id=f.value,(v=b.value)==null||v.forEach(C=>{const S=Ot==null?void 0:Ot.find(F=>(F==null?void 0:F.label)===(C==null?void 0:C.label));S?g[S.key]=C.value:C!=null&&C.children&&C.children.length>0&&(g.children=C.children)}),c.value=!1,o("fixChange",{contents:T.cloneDeep(g),id:s.value,type:"fix"});else{let C=T.cloneDeep(p.value)+1;m.setTableIndex(C),g.id="idChild"+p.value,(y=b.value)==null||y.forEach(S=>{const F=Ot==null?void 0:Ot.find(Be=>(Be==null?void 0:Be.label)===(S==null?void 0:S.label));F?g[F.key]=S.value:S!=null&&S.children&&S.children.length>0&&(g.children=S.children)}),c.value=!1,o("fixChange",{contents:T.cloneDeep(g),id:s.value,type:"add"})}f.value="",b.value=[],x.value=[]},P=()=>{c.value=!1,f.value="",s.value="",b.value=[],x.value=[]},L=g=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{o("deleteChange",g),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=g=>{o("deleteChange",g)};return(g,v)=>{const y=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$i,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r==null?void 0:r.tableChildContents,(S,F)=>(e.openBlock(),e.createElementBlock("div",Li,[e.createElementVNode("div",Fi,[e.createElementVNode("div",ji,e.toDisplayString(S.label),1),e.createElementVNode("div",Ui,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Be=>q(S)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Be=>N(S)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Be=>L(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",Ki,[e.createVNode(Pi,{tableChildContents:S==null?void 0:S.children,onDeleteChange:R,onFixChange:_},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:P,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Wi,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:$},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Hi,[e.createVNode(C,{onClick:P,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>v[0]||(v[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(C,{class:"ok-button button",onClick:oe,id:"themeButton"},{default:e.withCtx(()=>v[1]||(v[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Tl=zt._export_sfc(qi,[["__scopeId","data-v-ebd68fa1"]]),Xi={class:"table-operate-content"},Yi={class:"table-operate-item"},Gi={class:"operate-title"},Ji={class:"operate-content"},Zi={class:"fix-content"},Qi={class:"fix-content-label"},es={class:"fix-button"},ts={key:0},as={class:"operate-title"},ns={class:"operate-content"},os={class:"fix-content"},ls={class:"fix-content-label"},rs={class:"fix-button"},is={class:"operate-title"},ss={class:"operate-content"},cs={class:"fix-content"},us={class:"fix-content-label"},ds={class:"fix-button"},ps={class:"operate-title"},fs={class:"operate-content"},hs={class:"fix-content"},vs={class:"fix-content-label"},ms={class:"fix-button"},gs={class:"operate-content"},ys={style:{display:"flex","justify-content":"space-between"}},bs={class:"form-content"},ks={class:"dialog-footer"},xs={class:"form-content"},ws={class:"dialog-footer"},Ds={class:"form-content"},_s={class:"dialog-footer"},Es={class:"form-content"},Cs={class:"dialog-footer"},Ss={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.ref([]),s=e.ref(!1),m=e.ref(!1),p=e.ref([]),f=e.ref(!1),b=e.ref([]),x=e.ref(!1),_=e.ref([]),N=e.ref(""),q=e.ref(""),$=e.ref([]),oe=e.ref([]),P=e.ref([]),L=e.ref([]),R=e.ref(!1),g=e.ref([]),v=e.ref([]),y=e.ref(0),C=e.ref([]),S=e.ref([]),F=e.ref([]),Be=()=>{R.value=!0;let w=[];Sa==null||Sa.forEach(I=>{y.value++,w.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:(I==null?void 0:I.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:I==null?void 0:I.options})}),g.value=w,v.value=w},Je=()=>{var I,Y,le;m.value=!0;let w=[];(le=(Y=(I=Oe.FormContent)==null?void 0:I.find(B=>(B==null?void 0:B.key)==="Input"))==null?void 0:Y.value)==null||le.forEach(B=>{y.value++,w.push({label:B==null?void 0:B.label,name:(B==null?void 0:B.name)||(B==null?void 0:B.label),type:B.type,value:(B==null?void 0:B.label)==="类型"?"Input":"",id:y.value,contents:B==null?void 0:B.options})}),C.value=w,S.value=w},Ee=w=>{w||(C.value=S.value)},Ie=async w=>{var I,Y,le,B,de,Pe,re,U,H,G,De,ve;if((w==null?void 0:w.类型)!==((Y=(I=S.value)==null?void 0:I.find(X=>(X==null?void 0:X.label)==="类型"))==null?void 0:Y.value)){let X=[],he=await((de=(B=(le=Oe.FormContent)==null?void 0:le.find(ie=>(ie==null?void 0:ie.key)===((w==null?void 0:w.类型)===""?"Input":w==null?void 0:w.类型)))==null?void 0:B.value)==null?void 0:de.value)?await((G=(H=(U=Oe.FormContent)==null?void 0:U.find(ie=>(ie==null?void 0:ie.key)===((w==null?void 0:w.类型)===""?"Input":w==null?void 0:w.类型)))==null?void 0:H.value)==null?void 0:G.value):(re=(Pe=Oe.FormContent)==null?void 0:Pe.find(ie=>(ie==null?void 0:ie.key)===((w==null?void 0:w.类型)===""?"Input":w==null?void 0:w.类型)))==null?void 0:re.value;if(he==null||he.forEach(ie=>{y.value++,X.push({label:ie==null?void 0:ie.label,name:(ie==null?void 0:ie.name)||(ie==null?void 0:ie.label),type:ie.type,value:ie!=null&&ie.属性名?(w==null?void 0:w.prop)||(w==null?void 0:w.name)||(w==null?void 0:w.label):(w==null?void 0:w[ie.label])??"",id:y.value,contents:ie==null?void 0:ie.options,prop:(ie==null?void 0:ie.prop)||(ie==null?void 0:ie.name)||(ie==null?void 0:ie.label)})}),w!=null&&w.菜单选项&&((De=w==null?void 0:w.菜单选项)==null?void 0:De.length)>0){const ie=await Oe.menuToContentType(w==null?void 0:w.菜单选项);X=X==null?void 0:X.map(Me=>((Me==null?void 0:Me.name)==="组信息选项"&&(Me.contents=ie),Me))}S.value=await Oe.selectToBase(T.cloneDeep(X)),C.value=await Oe.selectToBase(T.cloneDeep(X))}else{let X=T.cloneDeep(C.value);if(X=X==null?void 0:X.map(he=>(he.value=w==null?void 0:w[he.name],he)),w!=null&&w.菜单选项&&((ve=w==null?void 0:w.菜单选项)==null?void 0:ve.length)>0){const he=await Oe.menuToContentType(w==null?void 0:w.菜单选项);X=X==null?void 0:X.map(ie=>((ie==null?void 0:ie.name)==="组信息选项"&&(ie.contents=he),ie))}X=Oe.formToOptionsContents(X),S.value=await Oe.selectToBase(T.cloneDeep(X))}},Ae=async w=>{await Ie(w),C.value=S.value},z=(w,I)=>{if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="selectRelateType"){const Y=I==null?void 0:I.optionUrl;return(Y==null?void 0:Y.selectRelateType)||I[w.key]}if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="menuSelect"){const Y=I==null?void 0:I.optionUrl;return(Y==null?void 0:Y.menuSelect)||I[w.key]}if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="groupSelect"){const Y=I==null?void 0:I.optionUrl;return(Y==null?void 0:Y.groupSelect)||I[w.key]}if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="originalContent")return(I==null?void 0:I.value)||I[w.key];if((I==null?void 0:I.type)=="Select"&&(w==null?void 0:w.key)==="multiple"){const Y=I[w.key];return xl(Y)?Y:w.default}return(w==null?void 0:w.label)==="类型"&&I[w.key]===""?"Input":(w==null?void 0:w.key)==="isFormColHidden"&&!I[w.key]?!1:I[w.key]},se=async w=>{var le,B,de,Pe,re,U,H,G,De;m.value=!0;let I=[];const Y=await((de=(B=(le=Oe.FormContent)==null?void 0:le.find(ve=>(ve==null?void 0:ve.key)===((w==null?void 0:w.type)===""?"Input":w==null?void 0:w.type)))==null?void 0:B.value)==null?void 0:de.value)?await((G=(H=(U=Oe.FormContent)==null?void 0:U.find(ve=>(ve==null?void 0:ve.key)===((w==null?void 0:w.type)===""?"Input":w==null?void 0:w.type)))==null?void 0:H.value)==null?void 0:G.value):(re=(Pe=Oe.FormContent)==null?void 0:Pe.find(ve=>(ve==null?void 0:ve.key)===((w==null?void 0:w.type)===""?"Input":w==null?void 0:w.type)))==null?void 0:re.value;if(Y==null||Y.forEach(ve=>{y.value++,I.push({label:ve==null?void 0:ve.label,name:(ve==null?void 0:ve.name)||(ve==null?void 0:ve.label),type:ve.type,value:(ve==null?void 0:ve.label)==="属性名"?(w==null?void 0:w.prop)||(w==null?void 0:w.name)||(w==null?void 0:w.label):z(ve,w),id:y.value,contents:ve==null?void 0:ve.options})}),w!=null&&w.menuSelect&&((De=w==null?void 0:w.menuSelect)==null?void 0:De.length)>0){const ve=await Oe.menuToContentType(w==null?void 0:w.menuSelect);I=I==null?void 0:I.map(X=>((X==null?void 0:X.name)==="组信息选项"&&(X.contents=ve),X))}N.value=w==null?void 0:w.id,C.value=await Oe.selectToBase(Oe.formToOptionsContents(I)),S.value=await Oe.selectToBase(Oe.formToOptionsContents(I))},te=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,Y;F.value=(I=T.cloneDeep(F.value))==null?void 0:I.filter(le=>(le==null?void 0:le.id)!==(w==null?void 0:w.id)),o("change",(Y=T.cloneDeep(r.originalItemContents))==null?void 0:Y.map(le=>((le==null?void 0:le.key)==="tableToForm"&&(le.contents=F.value),le))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ue=()=>{m.value=!1,C.value=[],N.value=""},Re=async()=>{var le,B,de,Pe,re,U,H,G,De,ve;C.value=S.value;let w={};N.value!==""?w.id=N.value:(y.value++,w.id="id"+y.value);let I=await((de=(B=(le=Oe.FormContent)==null?void 0:le.find(X=>{var he,ie;return(X==null?void 0:X.key)===(((ie=(he=C.value)==null?void 0:he.find(Me=>(Me==null?void 0:Me.label)==="类型"))==null?void 0:ie.value)??"label")}))==null?void 0:B.value)==null?void 0:de.value)??((re=(Pe=Oe.FormContent)==null?void 0:Pe.find(X=>{var he,ie;return(X==null?void 0:X.key)===(((ie=(he=C.value)==null?void 0:he.find(Me=>(Me==null?void 0:Me.label)==="类型"))==null?void 0:ie.value)??"label")}))==null?void 0:re.value);if((U=C.value)==null||U.forEach(X=>{const he=I==null?void 0:I.find(ie=>(ie==null?void 0:ie.label)===(X==null?void 0:X.label));he&&(w[he.key]=X.value)}),w.name=w.label,(H=F.value)!=null&&H.find(X=>X.id===w.id))F.value=(G=F.value)==null?void 0:G.map(X=>(X.id===w.id&&(X=w),X));else{let X=T.cloneDeep(F.value);F.value||(F.value=[]),X.push(w),F.value=X}F.value=F.value.map(({id:X,...he})=>he),m.value=!1,N.value="";let Y=T.cloneDeep(r.originalItemContents);(De=T.cloneDeep(r.originalItemContents))!=null&&De.find(X=>(X==null?void 0:X.key)==="tableToForm")?Y=(ve=T.cloneDeep(r.originalItemContents))==null?void 0:ve.map(X=>((X==null?void 0:X.key)==="tableToForm"&&(X.contents=F.value),X)):Y.push({key:"tableToForm",contents:F.value}),o("change",Y)},Qe=w=>{R.value=!0;let I=[];Sa==null||Sa.forEach(Y=>{y.value++,I.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:w[Y.key],id:y.value,contents:Y==null?void 0:Y.options})}),N.value=w==null?void 0:w.id,g.value=I,v.value=I};e.watch(()=>x.value,()=>{var I,Y;let w=T.cloneDeep(r.originalItemContents);(I=T.cloneDeep(r.originalItemContents))!=null&&I.find(le=>(le==null?void 0:le.key)==="page")?w=(Y=T.cloneDeep(r.originalItemContents))==null?void 0:Y.map(le=>((le==null?void 0:le.key)==="page"&&(le.contents=x.value),le)):w.push({key:"page",contents:x.value}),o("change",w)},{deep:!0});const Z=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,Y;oe.value=(I=T.cloneDeep(oe.value))==null?void 0:I.filter(le=>(le==null?void 0:le.id)!==(w==null?void 0:w.id)),o("change",(Y=T.cloneDeep(r.originalItemContents))==null?void 0:Y.map(le=>((le==null?void 0:le.key)==="extraButton"&&(le.contents=oe.value),le))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},O=()=>{var Y,le,B,de,Pe;g.value=v.value;let w={};if(N.value!==""?w.id=N.value:(y.value++,w.id="id"+y.value),(Y=g.value)==null||Y.forEach(re=>{const U=Sa==null?void 0:Sa.find(H=>(H==null?void 0:H.label)===(re==null?void 0:re.label));U?w[U.key]=re.value:re!=null&&re.children&&re.children.length>0&&(w.children=re.children)}),(le=oe.value)!=null&&le.find(re=>re.id===w.id))oe.value=(B=oe.value)==null?void 0:B.map(re=>(re.id===w.id&&(re=w),re));else{let re=T.cloneDeep(oe.value)??[];re.push(w),oe.value=re}R.value=!1,N.value="";let I=T.cloneDeep(r.originalItemContents);(de=T.cloneDeep(r.originalItemContents))!=null&&de.find(re=>(re==null?void 0:re.key)==="extraButton")?I=(Pe=T.cloneDeep(r.originalItemContents))==null?void 0:Pe.map(re=>((re==null?void 0:re.key)==="extraButton"&&(re.contents=oe.value),re)):I.push({key:"extraButton",contents:oe.value}),o("change",I)},W=w=>{let I=T.cloneDeep(v.value);I=I==null?void 0:I.map(Y=>(Y.children||(Y.value=w==null?void 0:w[Y.name]),Y)),v.value=I},ce=()=>{R.value=!1,g.value=[],N.value=""},xe=w=>{f.value=!0;let I=[];Ta==null||Ta.forEach(Y=>{y.value++,I.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:w[Y.key],id:y.value,contents:Y==null?void 0:Y.options})}),N.value=w==null?void 0:w.id,P.value=I,L.value=I},ke=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,Y;$.value=(I=T.cloneDeep($.value))==null?void 0:I.filter(le=>(le==null?void 0:le.id)!==(w==null?void 0:w.id)),o("change",(Y=T.cloneDeep(r.originalItemContents))==null?void 0:Y.map(le=>((le==null?void 0:le.key)==="rowButton"&&(le.contents=$.value),le))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Ke=()=>{s.value=!0;let w=[];Ot==null||Ot.forEach(I=>{y.value++,w.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),b.value=w,_.value=w},ae=()=>{f.value=!0;let w=[];Ta==null||Ta.forEach(I=>{y.value++,w.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),P.value=w,L.value=w},J=w=>{let I=T.cloneDeep(L.value);I=I==null?void 0:I.map(Y=>(Y.children||(Y.value=w==null?void 0:w[Y.name]),Y)),L.value=I},k=()=>{var Y,le,B,de,Pe;P.value=L.value;let w={};if(N.value!==""?w.id=N.value:(y.value++,w.id="id"+y.value),(Y=P.value)==null||Y.forEach(re=>{const U=Ta==null?void 0:Ta.find(H=>(H==null?void 0:H.label)===(re==null?void 0:re.label));U?w[U.key]=re.value:re!=null&&re.children&&re.children.length>0&&(w.children=re.children)}),(le=$.value)!=null&&le.find(re=>re.id===w.id))$.value=(B=$.value)==null?void 0:B.map(re=>(re.id===w.id&&(re=w),re));else{let re=T.cloneDeep($.value);re.push(w),$.value=re}f.value=!1,N.value="";let I=T.cloneDeep(r.originalItemContents);(de=T.cloneDeep(r.originalItemContents))!=null&&de.find(re=>(re==null?void 0:re.key)==="rowButton")?I=(Pe=T.cloneDeep(r.originalItemContents))==null?void 0:Pe.map(re=>((re==null?void 0:re.key)==="rowButton"&&(re.contents=$.value),re)):I.push({key:"rowButton",contents:$.value}),o("change",I)},be=()=>{f.value=!1,N.value="",L.value=[],P.value=[]},Ce=w=>{s.value=!0;let I=[];Ot==null||Ot.forEach(Y=>{y.value++,I.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:"",id:y.value,contents:Y==null?void 0:Y.options})}),b.value=I,q.value=w==null?void 0:w.id,_.value=I},me=w=>{var I;p.value=_l(T.cloneDeep(p.value),w==null?void 0:w.id),o("change",(I=T.cloneDeep(r.originalItemContents))==null?void 0:I.map(Y=>{var le;return(Y==null?void 0:Y.key)==="header"&&(Y.contents=(le=p.value)!=null&&le.some(B=>B==null?void 0:B.children)?[p.value]:p.value),Y}))},Q=w=>{var Y,le,B;w.type==="fix"?w.id!==""?p.value=Cl(p.value,w):p.value=El(p.value,w==null?void 0:w.contents):p.value=Sl(p.value,w),p.value=(Y=p.value)!=null&&Y.some(de=>de==null?void 0:de.children)?[p.value]:p.value,N.value="";let I=T.cloneDeep(r.originalItemContents);(le=T.cloneDeep(r.originalItemContents))!=null&&le.find(de=>(de==null?void 0:de.key)==="header")?I=(B=T.cloneDeep(r.originalItemContents))==null?void 0:B.map(de=>((de==null?void 0:de.key)==="header"&&(de.contents=p.value),de)):I.push({key:"header",contents:p.value}),o("change",I)},ee=w=>{var Y;s.value=!0;let I=[];Ot==null||Ot.forEach(le=>{y.value++,I.push({label:le==null?void 0:le.label,name:le==null?void 0:le.label,type:le.type,value:w[le.key],id:y.value,contents:le==null?void 0:le.options})}),w!=null&&w.children&&((Y=w==null?void 0:w.children)==null?void 0:Y.length)>0&&I.push({children:w==null?void 0:w.children,isFormColHidden:!0}),N.value=w==null?void 0:w.id,q.value="",b.value=I,_.value=I},pe=w=>{let I=T.cloneDeep(_.value);I=I==null?void 0:I.map(Y=>(Y.children||(Y.value=w==null?void 0:w[Y.name]),Y)),_.value=I},Se=()=>{s.value=!1,N.value="",q.value="",_.value=[]},Ge=()=>{var Y,le,B,de,Pe,re;b.value=_.value;let w={};if(N.value!==""?w.id=N.value:(y.value++,w.id="id"+y.value),(Y=b.value)==null||Y.forEach(U=>{const H=Ot==null?void 0:Ot.find(G=>(G==null?void 0:G.label)===(U==null?void 0:U.label));H?w[H.key]=U.value:U!=null&&U.children&&U.children.length>0&&(w.children=U.children)}),(le=p.value)!=null&&le.find(U=>U.id===w.id))p.value=(B=p.value)==null?void 0:B.map(U=>(U.id===w.id&&(U=w),U));else{let U=T.cloneDeep(p.value)??[];q.value===""?U.push(w):U=U==null?void 0:U.map(H=>(H.id===q.value&&(H.children||(H.children=[]),H.children.push(w)),H)),p.value=U}p.value=(de=p.value)!=null&&de.some(U=>U==null?void 0:U.children)?[p.value]:p.value,s.value=!1,N.value="",q.value="";let I=T.cloneDeep(r.originalItemContents);(Pe=T.cloneDeep(r.originalItemContents))!=null&&Pe.find(U=>(U==null?void 0:U.key)==="header")?I=(re=T.cloneDeep(r.originalItemContents))==null?void 0:re.map(U=>((U==null?void 0:U.key)==="header"&&(U.contents=p.value),U)):I.push({key:"header",contents:p.value}),o("change",I)},dt=w=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var I,Y;p.value=(I=T.cloneDeep(p.value))==null?void 0:I.filter(le=>(le==null?void 0:le.id)!==(w==null?void 0:w.id)),o("change",(Y=T.cloneDeep(r.originalItemContents))==null?void 0:Y.map(le=>{var B;return(le==null?void 0:le.key)==="header"&&(le.contents=(B=p.value)!=null&&B.some(de=>de==null?void 0:de.children)?[p.value]:p.value),le})),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>r.originalItemContents,()=>{var w,I,Y,le,B,de,Pe,re,U,H,G,De,ve,X,he,ie,Me,fe,Ne;if(!(!r.originalItemContents||r.originalItemContents.length===0))if(c.value=T.cloneDeep(r.originalItemContents),p.value=(I=(w=c.value)==null?void 0:w.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:I.contents,$.value=(le=(Y=c.value)==null?void 0:Y.find(j=>(j==null?void 0:j.key)==="rowButton"))==null?void 0:le.contents,oe.value=(de=(B=c.value)==null?void 0:B.find(j=>(j==null?void 0:j.key)==="extraButton"))==null?void 0:de.contents,x.value=(re=(Pe=c.value)==null?void 0:Pe.find(j=>(j==null?void 0:j.key)==="page"))!=null&&re.contents?!!((H=(U=c.value)==null?void 0:U.find(j=>(j==null?void 0:j.key)==="page"))!=null&&H.contents):!1,F.value=(De=(G=c.value)==null?void 0:G.find(j=>(j==null?void 0:j.key)==="tableToForm"))==null?void 0:De.contents,p.value=(ve=p.value)==null?void 0:ve.map((j,ze)=>(Array.isArray(j)?j=Si(j):j={label:(j==null?void 0:j.label)??"",prop:(j==null?void 0:j.label)==="操作"?"operate":j==null?void 0:j.prop,width:j!=null&&j.width?parseInt(j.width):"",fixed:(j==null?void 0:j.fixed)??void 0,sortable:(j==null?void 0:j.sortable)??!1,align:(j==null?void 0:j.align)??"left",showOverflowTooltip:(j==null?void 0:j.showOverflowTooltip)??!0,isNotDrag:(j==null?void 0:j.isNotDrag)??!1,isEditCol:(j==null?void 0:j.isEditCol)??!1,isOperate:(j==null?void 0:j.isOperate)??!1,id:(j==null?void 0:j.id)??ze,formMenuSelect:(j==null?void 0:j.formMenuSelect)??void 0,groupSelect:(j==null?void 0:j.groupSelect)??void 0},j)),p.value=(X=p.value)!=null&&X.every(j=>Array.isArray(j))?(he=p.value)==null?void 0:he[0]:p.value,$.value=(ie=$.value)==null?void 0:ie.map((j,ze)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",textColor:(j==null?void 0:j.textColor)??"#000000",id:(j==null?void 0:j.id)??ze}),oe.value=(Me=oe.value)==null?void 0:Me.map((j,ze)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",background:(j==null?void 0:j.background)??"var(--ssComponent-primary-color)",id:(j==null?void 0:j.id)??ze}),F.value)F.value=(Ne=F.value)==null?void 0:Ne.map(j=>{y.value++;let ze=j;return ze.id=y.value,ze});else{let j=[];const ze=(fe=Oe.getColumnChild(T.cloneDeep(p.value)))==null?void 0:fe.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");ze==null||ze.forEach(ge=>{var We;y.value++,j.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label),type:ge!=null&&ge.groupSelect?"Select":"Input",value:"",id:y.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(We=ge==null?void 0:ge.groupSelect)==null?void 0:We.split(":"),selectRelateType:"关联绑定列"})}),F.value=j}},{deep:!0,immediate:!0}),(w,I)=>{const Y=e.resolveComponent("svg-icon"),le=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Xi,[e.createElementVNode("div",Yi,[e.createElementVNode("div",Gi,[I[2]||(I[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(le,{class:"icon-content",onClick:Ke,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[1]||(I[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ji,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(B,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",Zi,[e.createElementVNode("div",Qi,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",es,[e.createVNode(Y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>Ce(B)},null,8,["onClick"]),e.createVNode(Y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>ee(B)},null,8,["onClick"]),e.createVNode(Y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>dt(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(Tl,{tableChildContents:B==null?void 0:B.children,onDeleteChange:me,onFixChange:Q},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",as,[I[4]||(I[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(le,{class:"icon-content",id:"themeButton",onClick:ae},{icon:e.withCtx(()=>[e.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[3]||(I[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(B,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",os,[e.createElementVNode("div",ls,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",rs,[e.createVNode(Y,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Pe=>xe(B)},null,8,["onClick"]),e.createVNode(Y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>ke(B)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",is,[I[6]||(I[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(le,{class:"icon-content",id:"themeButton",onClick:Be},{icon:e.withCtx(()=>[e.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[5]||(I[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",ss,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(oe.value,(B,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",cs,[e.createElementVNode("div",us,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",ds,[e.createVNode(Y,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Pe=>Qe(B)},null,8,["onClick"]),e.createVNode(Y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>Z(B)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ps,[I[8]||(I[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(le,{class:"icon-content",id:"themeButton",onClick:Je},{icon:e.withCtx(()=>[e.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[I[7]||(I[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",fs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(B,de)=>(e.openBlock(),e.createElementBlock("div",{key:de},[e.createElementVNode("div",hs,[e.createElementVNode("div",vs,e.toDisplayString(B==null?void 0:B.label),1),e.createElementVNode("div",ms,[e.createVNode(Y,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:Pe=>se(B)},null,8,["onClick"]),e.createVNode(Y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>te(B)},null,8,["onClick"])])])]))),128))]),I[10]||(I[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",gs,[e.createElementVNode("div",ys,[I[9]||(I[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:x.value,"onUpdate:modelValue":I[0]||(I[0]=B=>x.value=B)},null,8,["modelValue"])])])]),e.createVNode(Gt.ssDialog,{visible:s.value,onBeforeDestroy:Se,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",bs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:pe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ks,[e.createVNode(le,{onClick:Se,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[11]||(I[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(le,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>I[12]||(I[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:f.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xs,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:P.value,key:P.value,isEnableWrap:!0,onChange:J},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ws,[e.createVNode(le,{onClick:be,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[13]||(I[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(le,{class:"ok-button button",onClick:k,id:"themeButton"},{default:e.withCtx(()=>I[14]||(I[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:R.value,onBeforeDestroy:ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ds,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",_s,[e.createVNode(le,{onClick:ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[15]||(I[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(le,{class:"ok-button button",onClick:O,id:"themeButton"},{default:e.withCtx(()=>I[16]||(I[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:m.value,onBeforeDestroy:ue,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Es,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:Ie,onChangeVisible:Ee,onBlurChange:Ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Cs,[e.createVNode(le,{onClick:ue,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>I[17]||(I[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(le,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>I[18]||(I[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},Ts=zt._export_sfc(Ss,[["__scopeId","data-v-7a6b87b5"]]),Bs=T.useModelComp(T.pinia),{pageMapState:Is}=T.storeToRefs(Bs),Ns=T.useMenuState(T.pinia),{activeMenuPath:As}=T.storeToRefs(Ns),Vs=e.ref(24),Os=e.ref(6),Ms=e.ref(70),zs=e.ref(.18),Rs=e.ref(45),Ps=(t,i,r,o)=>{var c,s,m,p,f,b,x,_,N,q,$,oe,P,L,R,g;return{x:((s=(c=t==null?void 0:t.value)==null?void 0:c.tableData)==null?void 0:s.x)||i%2*12,y:((p=(m=t==null?void 0:t.value)==null?void 0:m.tableData)==null?void 0:p.y)||i,w:((b=(f=t==null?void 0:t.value)==null?void 0:f.tableData)==null?void 0:b.w)||Vs.value,h:((_=(x=t==null?void 0:t.value)==null?void 0:x.tableData)==null?void 0:_.h)||r,minW:((q=(N=t==null?void 0:t.value)==null?void 0:N.tableData)==null?void 0:q.minW)||Os.value,minH:((oe=($=t==null?void 0:t.value)==null?void 0:$.tableData)==null?void 0:oe.minH)||zs.value,maxH:((L=(P=t==null?void 0:t.value)==null?void 0:P.tableData)==null?void 0:L.maxH)||Rs.value,i:((g=(R=t==null?void 0:t.value)==null?void 0:R.tableData)==null?void 0:g.i)||i,id:(t==null?void 0:t.id)||i+"",component:o}},$s=(t,i)=>{var o,c,s,m,p,f,b,x;let r=1;if(t!=null&&t.compData&&Array.isArray(t==null?void 0:t.compData))if(((o=t==null?void 0:t.comp)==null?void 0:o.toUpperCase())==="TABLE"){if(((m=(s=(c=t==null?void 0:t.compData)==null?void 0:c.find(N=>(N==null?void 0:N.key)==="tableContents"))==null?void 0:s.contents)==null?void 0:m.length)===0)return 2}else((p=t==null?void 0:t.comp)==null?void 0:p.toUpperCase())==="FORM"&&(r=((x=(b=(f=t==null?void 0:t.compData)==null?void 0:f.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:b.contents)==null?void 0:x.length)/5);return r*2},Bl=(t,i,r)=>{var m,p;const o=(p=(m=Is.value)==null?void 0:m[As.value])==null?void 0:p.filter(f=>{var b;return((b=f==null?void 0:f.key)==null?void 0:b.type)==="gridLayout"}),c=o==null?void 0:o.find(f=>{var b,x,_;return((_=(x=(b=f==null?void 0:f.value)==null?void 0:b.tableData)==null?void 0:x.component)==null?void 0:_.id)===t.id}),s=$s(t);return t!=null&&t.children&&(t==null?void 0:t.children.length)>0&&(t.children=t.children.map((f,b)=>Bl(f,b))),{...Ps(c,i,s,t)}},Ls=(t,i)=>{if((t==null?void 0:t.length)===0)return[];const r=T.cloneDeep(t);return Array.isArray(t)?r==null?void 0:r.map((o,c)=>Bl(o,c)):[]},Fs=t=>({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}]}]}}),js=(t,i)=>t==null?void 0:t.map(r=>{for(const o in i)if(o===(r==null?void 0:r.prop))return{...r,value:i[o]};return r}),Us=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.ref([]);e.watch(()=>r.compType,p=>{var x;const f=Fs(r==null?void 0:r.optionItems),b=p?(x=f[p==null?void 0:p.toUpperCase()])==null?void 0:x[r==null?void 0:r.target]:[];c.value=b==null?void 0:b.map(_=>{for(const[N,q]of Object.entries((r==null?void 0:r.comp)||{}))if((_==null?void 0:_.prop)===N)return{..._,value:q};return _})},{immediate:!0});const s=p=>Nt.getComponent(p),m=p=>{var f,b;(p==null?void 0:p.prop)==="layout"&&(p==null?void 0:p.value)==="horizontal"?c.value=(f=c.value)==null?void 0:f.map(x=>{var _;return(x==null?void 0:x.prop)==="isStepLayout"?{...x,options:(_=x==null?void 0:x.options)==null?void 0:_.map(N=>({...N,disabled:!0}))}:(x==null?void 0:x.prop)==="isGridLayout"?{...x,disabled:!0}:x}):c.value=(b=c.value)==null?void 0:b.map(x=>{var _;return(x==null?void 0:x.prop)==="isStepLayout"?{...x,options:(_=x==null?void 0:x.options)==null?void 0:_.map(N=>({...N,disabled:!1}))}:(x==null?void 0:x.prop)==="isGridLayout"?{...x,disabled:!1}:x}),o("change",{target:r==null?void 0:r.target,styleConfigs:c.value,prop:p==null?void 0:p.prop})};return(p,f)=>{const b=e.resolveComponent("el-col"),x=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,_=>(e.openBlock(),e.createBlock(x,{class:"style-row",key:_==null?void 0:_.prop},{default:e.withCtx(()=>[e.createVNode(b,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),e.createVNode(b,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(_.type)),{modelValue:_.value,"onUpdate:modelValue":N=>_.value=N,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:N=>m(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),Ks=zt._export_sfc(Us,[["__scopeId","data-v-6c233914"]]),Ws=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(t,{emit:i}){const r=t,o=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],s=e.ref([]),m=L=>L==null?void 0:L.reduce((R,g)=>(R[g==null?void 0:g.prop]=g==null?void 0:g.rule,R),{}),p=e.computed(()=>({formRules:m(s.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),b=e.ref(""),x=(L,R,g)=>{var C;let v=[];(r==null?void 0:r.activeTabName)==="任务配置"?(v=[{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:L},{label:"按钮名称",value:"按钮名称",children:R}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(r==null?void 0:r.activeTabName)==="任务关联"&&(v=[{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:(C=r==null?void 0:r.relatedData)==null?void 0:C.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],s.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let y;return g&&(g==null?void 0:g.length)>0?y=[...v,..._(L,R,g)]:y=v,y},_=(L,R,g)=>{const v=[{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 g?v==null?void 0:v.filter(y=>g==null?void 0:g.includes(y==null?void 0:y.prop)):v},N=(L,R)=>{var S,F,Be,Je,Ee,Ie,Ae,z,se;const g=((Ee=(Je=(Be=(F=(S=r==null?void 0:r.comp)==null?void 0:S.compData)==null?void 0:F.find(te=>(te==null?void 0:te.key)==="header"))==null?void 0:Be.contents)==null?void 0:Je.filter(te=>(te==null?void 0:te.label)!=="操作"))==null?void 0:Ee.map(te=>({value:te==null?void 0:te.prop,label:te.label})))||[],v=/button/i,y=((se=(z=(Ae=(Ie=r==null?void 0:r.comp)==null?void 0:Ie.compData)==null?void 0:Ae.filter(te=>v.test(te==null?void 0:te.key)))==null?void 0:z.flatMap(te=>te==null?void 0:te.contents))==null?void 0:se.map(te=>({value:te==null?void 0:te.label,label:te.label})))||[],C=x(g,y,L);f.value=R?js(C,R):C,L&&(L==null?void 0:L.length)>0&&s.value.push(...L==null?void 0:L.map(te=>({prop:te,rule:c})))};e.onMounted(()=>{N(null,r==null?void 0:r.extendItem)});const q=L=>{const R=L==null?void 0:L[b.value];if(b.value==="执行任务"){if(!(R!=null&&R.join("/")))return;const g=R==null?void 0:R.join("/");N(g==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:g==="进度设置/进度条"?["进度关键词"]:null,L)}},$=L=>{o("change",{target:r==null?void 0:r.target,extendConfigs:L})},oe=(L,R)=>{b.value=R==null?void 0:R.changeProp,q(L)},P=L=>{o("onButtonClick",L)};return(L,R)=>(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:p.value.formRules,buttonValue:p.value.buttonValue,onChange:$,onBlurChange:oe,onOnButtonClick:P},null,8,["rowContents","formRules","buttonValue"]))}}),Hs=zt._export_sfc(Ws,[["__scopeId","data-v-7c660c1f"]]),qs={};function Xs(t,i){return null}const Ys=zt._export_sfc(qs,[["render",Xs]]),Gs={class:"form-operate-content"},Js={class:"form-operate-item"},Zs={class:"operate-title"},Qs={class:"operate-content"},ec={class:"fix-content"},tc={class:"fix-button"},ac={class:"operate-title"},nc={class:"operate-content"},oc={class:"fix-content"},lc={class:"fix-button"},rc={style:{display:"flex","justify-content":"space-between"}},ic={class:"form-content"},sc={class:"dialog-footer"},cc={class:"form-content"},uc={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.ref(!1),s=e.ref([]),m=e.ref([]),p=e.ref(!1),f=e.ref([]),b=e.ref([]),x=e.ref(""),_=e.ref(!1),N=e.ref(0),q=e.ref([]),$=e.ref([]),oe=(z,se)=>{if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="selectRelateType"){const te=se==null?void 0:se.optionUrl;return(te==null?void 0:te.selectRelateType)||se[z.key]}if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="menuSelect"){const te=se==null?void 0:se.optionUrl;return(te==null?void 0:te.menuSelect)||se[z.key]}if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="groupSelect"){const te=se==null?void 0:se.optionUrl;return(te==null?void 0:te.groupSelect)||se[z.key]}if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="originalContent")return(se==null?void 0:se.value)||se[z.key];if((se==null?void 0:se.type)=="Select"&&(z==null?void 0:z.key)==="multiple"){const te=se[z.key];return xl(te)?te:z.default}return(z==null?void 0:z.label)==="类型"&&se[z.key]===""?"Input":(z==null?void 0:z.key)==="isFormColHidden"&&!se[z.key]?!1:se[z.key]},P=async z=>{var ue,Re,Qe,Z,O,W;c.value=!0;let se=[];const te=await((Qe=(Re=(ue=Oe.FormContent)==null?void 0:ue.find(ce=>(ce==null?void 0:ce.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:Re.value)==null?void 0:Qe.value)??((O=(Z=Oe.FormContent)==null?void 0:Z.find(ce=>(ce==null?void 0:ce.key)===((z==null?void 0:z.type)===""?"Input":z==null?void 0:z.type)))==null?void 0:O.value);if(te==null||te.forEach(ce=>{N.value++,se.push({label:ce==null?void 0:ce.label,name:ce==null?void 0:ce.label,type:ce.type,prop:ce==null?void 0:ce.prop,value:oe(ce,z),id:N.value,contents:ce==null?void 0:ce.options,width:(z==null?void 0:z.width)??1})}),z!=null&&z.menuSelect&&((W=z==null?void 0:z.menuSelect)==null?void 0:W.length)>0){const ce=await Oe.menuToContentType(z==null?void 0:z.menuSelect);se=se==null?void 0:se.map(xe=>((xe==null?void 0:xe.name)==="组信息选项"&&(xe.contents=ce),xe))}x.value=z==null?void 0:z.id,s.value=await Oe.selectToBase(Oe.formToOptionsContents(se)),m.value=await Oe.selectToBase(Oe.formToOptionsContents(se))},L=z=>{var te;p.value=!0;let se=[];(te=Oe.FormButton)==null||te.forEach(ue=>{N.value++,se.push({label:ue==null?void 0:ue.label,name:ue==null?void 0:ue.label,type:ue.type,value:(ue==null?void 0:ue.label)==="类型"&&z[ue.key]===""?"normal":z[ue.key],id:N.value,contents:ue==null?void 0:ue.options})}),q.value=se,$.value=se,x.value=z==null?void 0:z.id};e.watch(()=>_.value,()=>{var se,te;let z=T.cloneDeep(r.originalItemContents);(se=T.cloneDeep(r.originalItemContents))!=null&&se.find(ue=>(ue==null?void 0:ue.key)==="enableWrap")?z=(te=T.cloneDeep(r.originalItemContents))==null?void 0:te.map(ue=>((ue==null?void 0:ue.key)==="enableWrap"&&(ue.contents=!_.value),ue)):z.push({key:"enableWrap",contents:!_.value}),o("change",z)},{deep:!0});const R=()=>{var te,ue,Re,Qe,Z;q.value=$.value;let z={};if(x.value!==""?z.id=x.value:(N.value++,z.id="id"+N.value),(te=q.value)==null||te.forEach(O=>{var ce;const W=(ce=Oe.FormButton)==null?void 0:ce.find(xe=>(xe==null?void 0:xe.label)===(O==null?void 0:O.label));W&&(z[W.key]=O.value)}),(ue=f.value)!=null&&ue.find(O=>O.id===z.id))f.value=(Re=f.value)==null?void 0:Re.map(O=>(O.id===z.id&&(O=z),O));else{let O=T.cloneDeep(f.value);f.value||(f.value=[]),O.push(z),f.value=O}p.value=!1,x.value="";let se=T.cloneDeep(r.originalItemContents);(Qe=T.cloneDeep(r.originalItemContents))!=null&&Qe.find(O=>(O==null?void 0:O.key)==="formButton")?se=(Z=T.cloneDeep(r.originalItemContents))==null?void 0:Z.map(O=>((O==null?void 0:O.key)==="formButton"&&(O.contents=f.value),O)):se.push({key:"formButton",contents:f.value}),o("change",se)},g=z=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,te;b.value=(se=T.cloneDeep(b.value))==null?void 0:se.filter(ue=>(ue==null?void 0:ue.id)!==(z==null?void 0:z.id)),o("change",(te=T.cloneDeep(r.originalItemContents))==null?void 0:te.map(ue=>((ue==null?void 0:ue.key)==="formContent"&&(ue.contents=b.value),ue))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=z=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var se,te;f.value=(se=T.cloneDeep(f.value))==null?void 0:se.filter(ue=>(ue==null?void 0:ue.id)!==(z==null?void 0:z.id)),o("change",(te=T.cloneDeep(r.originalItemContents))==null?void 0:te.map(ue=>((ue==null?void 0:ue.key)==="formButton"&&(ue.contents=f.value),ue))),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var se;p.value=!0;let z=[];(se=Oe.FormButton)==null||se.forEach(te=>{N.value++,z.push({label:te==null?void 0:te.label,name:te==null?void 0:te.label,type:te.type,value:(te==null?void 0:te.label)==="类型"?"normal":"",id:N.value,contents:te==null?void 0:te.options})}),q.value=z,$.value=z},C=()=>{var se,te,ue;c.value=!0;let z=[];(ue=(te=(se=Oe.FormContent)==null?void 0:se.find(Re=>(Re==null?void 0:Re.key)==="Input"))==null?void 0:te.value)==null||ue.forEach(Re=>{N.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)==="类型"?"Input":"",id:N.value,contents:Re==null?void 0:Re.options})}),s.value=z,m.value=z},S=z=>{let se=T.cloneDeep($.value);se=se==null?void 0:se.map(te=>(te.value=z==null?void 0:z[te.name],te)),$.value=se},F=z=>{const se=z.find(Re=>(Re==null?void 0:Re.name)==="类型");if((se==null?void 0:se.value)!="Select")return;const te=z.find(Re=>(Re==null?void 0:Re.name)==="多选"),ue=z.find(Re=>(Re==null?void 0:Re.name)==="初始值");te!=null&&te.value&&Ao.isString(ue.value)&&(ue.value=[ue.value]),!(te!=null&&te.value)&&!Ao.isString(ue.value)&&(ue.value="")},Be=async z=>{var se,te,ue,Re,Qe,Z,O,W,ce,xe,ke,Ke;if((z==null?void 0:z.类型)!==((te=(se=m.value)==null?void 0:se.find(ae=>(ae==null?void 0:ae.label)==="类型"))==null?void 0:te.value)){let ae=[];const J=await((Qe=(Re=(ue=Oe.FormContent)==null?void 0:ue.find(k=>(k==null?void 0:k.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:Re.value)==null?void 0:Qe.value)?await((xe=(ce=(W=Oe.FormContent)==null?void 0:W.find(k=>(k==null?void 0:k.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:ce.value)==null?void 0:xe.value):(O=(Z=Oe.FormContent)==null?void 0:Z.find(k=>(k==null?void 0:k.key)===((z==null?void 0:z.类型)===""?"Input":z==null?void 0:z.类型)))==null?void 0:O.value;if(J==null||J.forEach(k=>{var Ce,me;N.value++;const be=si(k==null?void 0:k.default)?(z==null?void 0:z[k.label])??k.value??"":k==null?void 0:k.default;ae.push({label:k==null?void 0:k.label,name:k==null?void 0:k.label,type:k.type,value:be,prop:k==null?void 0:k.prop,id:N.value,contents:k==null?void 0:k.options,width:((me=(Ce=m.value)==null?void 0:Ce[0])==null?void 0:me.width)??1})}),z!=null&&z.菜单选项&&((ke=z==null?void 0:z.菜单选项)==null?void 0:ke.length)>0){const k=await Oe.menuToContentType(z==null?void 0:z.菜单选项);ae=ae==null?void 0:ae.map(be=>((be==null?void 0:be.name)==="组信息选项"&&(be.contents=k),be))}F(ae),m.value=await Oe.selectToBase(T.cloneDeep(ae)),s.value=await Oe.selectToBase(T.cloneDeep(ae))}else{let ae=T.cloneDeep(m.value);if(ae=ae==null?void 0:ae.map(J=>(J.value=z==null?void 0:z[J.name],J)),z!=null&&z.菜单选项&&((Ke=z==null?void 0:z.菜单选项)==null?void 0:Ke.length)>0){const J=await Oe.menuToContentType(z==null?void 0:z.菜单选项);ae=ae==null?void 0:ae.map(k=>((k==null?void 0:k.name)==="组信息选项"&&(k.contents=J),k))}ae=Oe.formToOptionsContents(ae),F(ae),m.value=await Oe.selectToBase(T.cloneDeep(ae))}},Je=z=>{z||(s.value=m.value)},Ee=async z=>{await Be(z),s.value=m.value},Ie=kl(async()=>{var ue,Re,Qe,Z,O,W,ce,xe,ke,Ke,ae,J;s.value=m.value;let z={};z.width=((Re=(ue=s.value)==null?void 0:ue[0])==null?void 0:Re.width)??1,x.value!==""?z.id=x.value:(N.value++,z.id="id"+N.value);let se=await((O=(Z=(Qe=Oe.FormContent)==null?void 0:Qe.find(k=>{var be,Ce;return(k==null?void 0:k.key)===(((Ce=(be=s.value)==null?void 0:be.find(me=>(me==null?void 0:me.label)==="类型"))==null?void 0:Ce.value)??"label")}))==null?void 0:Z.value)==null?void 0:O.value)??((ce=(W=Oe.FormContent)==null?void 0:W.find(k=>{var be,Ce;return(k==null?void 0:k.key)===(((Ce=(be=s.value)==null?void 0:be.find(me=>(me==null?void 0:me.label)==="类型"))==null?void 0:Ce.value)??"label")}))==null?void 0:ce.value);if((xe=s.value)==null||xe.forEach(k=>{const be=se==null?void 0:se.find(Ce=>(Ce==null?void 0:Ce.label)===(k==null?void 0:k.label));be&&(z[be.key]=k.value)}),z.width=z.width?z.width:1,z.key=z==null?void 0:z.label,z.isFormColHidden=z==null?void 0:z.isFormColHidden,(ke=b.value)!=null&&ke.find(k=>k.id===z.id))b.value=(Ke=b.value)==null?void 0:Ke.map(k=>(k.id===z.id&&(k=z),k));else{let k=T.cloneDeep(b.value);k.push(z),b.value=k}b.value=b.value.map(({id:k,...be})=>be),c.value=!1,x.value="";let te=T.cloneDeep(r.originalItemContents);(ae=T.cloneDeep(r.originalItemContents))!=null&&ae.find(k=>(k==null?void 0:k.key)==="formContent")?te=(J=T.cloneDeep(r.originalItemContents))==null?void 0:J.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=b.value),k)):te.push({key:"formContent",contents:b.value}),o("change",te)},300),Ae=()=>{c.value=!1,p.value=!1,x.value="",m.value=[],$.value=[]};return e.watch(()=>r.originalItemContents,()=>{var se,te,ue,Re,Qe,Z;if(!r.originalItemContents||r.originalItemContents.length===0)return;const z=T.cloneDeep(r.originalItemContents);b.value=((se=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:se.contents)??[],f.value=((te=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="formButton"))==null?void 0:te.contents)??[],_.value=(ue=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="enableWrap"))!=null&&ue.contents?!((Re=z==null?void 0:z.find(O=>(O==null?void 0:O.key)==="enableWrap"))!=null&&Re.contents):!0,b.value=(Qe=T.cloneDeep(b.value))==null?void 0:Qe.map((O,W)=>{var xe;let ce=O;return ce.id=(O==null?void 0:O.id)??W,O!=null&&O.label||(O.label=(O==null?void 0:O.key)??(O==null?void 0:O.label)??""),O!=null&&O.type||(O.type=(O==null?void 0:O.type)??""),O.contents=((xe=O==null?void 0:O.options)==null?void 0:xe.length)===0?(O==null?void 0:O.contents)??"":O==null?void 0:O.options,ce}),b.value=Oe.formToOptionsContents(b.value),f.value=(Z=f.value)==null?void 0:Z.map((O,W)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",background:(O==null?void 0:O.background)??"var(--ssComponent-primary-color)",id:W})},{deep:!0,immediate:!0}),(z,se)=>{const te=e.resolveComponent("svg-icon"),ue=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Gs,[e.createElementVNode("div",Js,[e.createElementVNode("div",Zs,[se[2]||(se[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:C},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[1]||(se[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(Re,Qe)=>(e.openBlock(),e.createElementBlock("div",{key:Qe},[e.createElementVNode("div",ec,[e.createElementVNode("div",null,e.toDisplayString(Re.label),1),e.createElementVNode("div",tc,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>P(Re)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>g(Re)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ac,[se[4]||(se[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(ue,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(te,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[se[3]||(se[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Re,Qe)=>(e.openBlock(),e.createElementBlock("div",{key:Qe},[e.createElementVNode("div",oc,[e.createElementVNode("div",null,e.toDisplayString(Re.label),1),e.createElementVNode("div",lc,[e.createVNode(te,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>L(Re)},null,8,["onClick"]),e.createVNode(te,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Z=>v(Re)},null,8,["onClick"])])])]))),128))]),se[6]||(se[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",rc,[se[5]||(se[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Nt._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":se[0]||(se[0]=Re=>_.value=Re)},null,8,["modelValue"])])]),e.createVNode(Gt.ssDialog,{visible:c.value,onBeforeDestroy:Ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ic,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:Be,onChangeVisible:Je,onBlurChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",sc,[e.createVNode(ue,{onClick:Ae,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>se[7]||(se[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(ue,{class:"ok-button button",onClick:e.unref(Ie),id:"themeButton"},{default:e.withCtx(()=>se[8]||(se[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:Ae,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",cc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:q.value,key:q.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ae,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:R},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Po=zt._export_sfc(uc,[["__scopeId","data-v-20850524"]]),dc={class:"step-module content"},pc={class:"module-data"},fc={class:"step-module layout"},hc={class:"form-content"},vc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),b=e.ref({}),x=e.ref([]),_=P=>{var L;b.value=P,o("change",(L=$())==null?void 0:L.compData)},N=(P,L)=>{var R,g;switch(P){case"create":(R=s.value)==null||R.forEach(v=>{v.value=""}),f.value="create",p.visible=!0;break;case"update":(g=s.value)==null||g.forEach(v=>{v.value=L[v==null?void 0:v.prop]}),f.value="update",p.visible=!0;break;case"delete":x.value.splice(L,1),f.value="delete";break}},q=P=>{var L,R,g;if((P==null?void 0:P.buttonName)==="确认"){const v=T.cloneDeep(P==null?void 0:P.content);switch(Object.keys(v).forEach(y=>{v[y]===""&&delete v[y]}),f.value){case"create":x.value.push({...v,index:((L=x.value)==null?void 0:L.length)+1});break;case"update":x.value=(R=x.value)==null?void 0:R.map(y=>y.index===(v==null?void 0:v.index)?{...y,title:v==null?void 0:v.title,description:v==null?void 0:v.description}:y);break}o("change",(g=$())==null?void 0:g.compData),p.visible=!1}else p.visible=!1},$=()=>({comp:"Step",compData:[{key:"stepList",contents:x.value},{key:"stepConfig",contents:b.value}]}),oe=()=>{p.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,P=>{var L,R;P&&(b.value=((L=P==null?void 0:P.find(g=>g.key==="stepConfig"))==null?void 0:L.contents)??{},x.value=((R=P==null?void 0:P.find(g=>g.key==="stepList"))==null?void 0:R.contents)??[])},{immediate:!0}),(P,L)=>{const R=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",dc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(g,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=v=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",pc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(v,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(v==null?void 0:v.title),1),e.createElementVNode("div",null,[e.createVNode(g,{type:"primary",size:"small",onClick:C=>N("update",{...v,index:y+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(g,{type:"danger",size:"small",onClick:C=>N("delete",y)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",fc,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:c.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:p.visible,title:p.title,onBeforeDestroy:oe,width:p.width},{default:e.withCtx(()=>[e.createElementVNode("div",hc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),mc=zt._export_sfc(vc,[["__scopeId","data-v-7dbd17f2"]]),gc={class:"step-module content"},yc={class:"module-data"},bc={class:"step-module layout"},kc={class:"form-content"},xc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.ref("create"),s=e.ref({}),m=e.ref([]),p=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:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),x=e.reactive({visible:!1,width:"40%",title:"时间线"}),_=P=>{var L;s.value=P,o("change",(L=$())==null?void 0:L.compData)},N=(P,L)=>{var R,g;switch(P){case"create":(R=f.value)==null||R.forEach(v=>{v.value=""}),c.value="create",x.visible=!0;break;case"update":(g=f.value)==null||g.forEach(v=>{v.value=L[v==null?void 0:v.prop]}),c.value="update",x.visible=!0;break;case"delete":m.value.splice(L,1),c.value="delete";break}},q=P=>{var L,R,g,v;if((P==null?void 0:P.buttonName)==="确认"){const y=T.cloneDeep(P==null?void 0:P.content);switch(Object.keys(y).forEach(C=>{y[C]===""&&delete y[C]}),c.value){case"create":(R=m.value)==null||R.push({...y,index:((L=m.value)==null?void 0:L.length)+1});break;case"update":m.value=(g=m.value)==null?void 0:g.map(C=>C.index===(y==null?void 0:y.index)?{...C,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:C);break}o("change",(v=$())==null?void 0:v.compData),x.visible=!1}else x.visible=!1},$=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:m.value},{key:"timeLineConfig",contents:s.value}]}),oe=()=>{x.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,P=>{var L,R;P&&(s.value=((L=P==null?void 0:P.find(g=>g.key==="timeLineConfig"))==null?void 0:L.contents)??{},m.value=((R=P==null?void 0:P.find(g=>g.key==="timeLineList"))==null?void 0:R.contents)??[])},{immediate:!0}),(P,L)=>{const R=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(g,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=v=>N("create"))},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(v,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(v==null?void 0:v.content),1),e.createElementVNode("div",null,[e.createVNode(g,{type:"primary",size:"small",onClick:C=>N("update",{...v,index:y+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(g,{type:"danger",size:"small",onClick:C=>N("delete",y)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",bc,[L[5]||(L[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Nt.ssForm,{rowContents:p.value,onChange:_},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:x.visible,title:x.title,onBeforeDestroy:oe,width:x.width},{default:e.withCtx(()=>[e.createElementVNode("div",kc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),wc=zt._export_sfc(xc,[["__scopeId","data-v-39ffc861"]]),Dc={};function _c(t,i){return e.openBlock(),e.createElementBlock("div")}const Ec=zt._export_sfc(Dc,[["render",_c]]),Cc={class:"extra-content"},Sc={key:0},Tc={key:1},Bc={class:"dialog-footer"},Ic={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(t,{emit:i}){const r=t,o=e.ref(0),c=e.ref(),s=e.ref(),m=i,p=e.ref(!1),f=e.ref({}),b=e.ref({}),x=e.ref();e.watch(()=>[r.itemData],()=>{var v;const g=T.cloneDeep(r.itemData);c.value=(v=T.cloneDeep(g))==null?void 0:v.map(y=>{var C;if(y.key==="extra"){let S=[];(C=y.value)==null||C.forEach(F=>{var Be;S.push((Be=Object.values(F))==null?void 0:Be[0])}),y.value=S}return y})},{deep:!0,immediate:!0});const _=(g,v,y,C)=>{var F;let S={};((F=g==null?void 0:g[0])==null?void 0:F.contents)==="详情"&&(p.value=!0,S[v]=g,s.value=g==null?void 0:g.filter(Be=>(Be==null?void 0:Be.key)!=="tableContentName"),f.value=S,b.value=y,x.value=C.id)},N=g=>{var Be,Je,Ee,Ie;const v=(Je=(Be=Object.values(T.cloneDeep(f.value)))==null?void 0:Be[0])==null?void 0:Je.filter(Ae=>(Ae==null?void 0:Ae.key)==="tableContentName"),y=(Ie=(Ee=Object.values(T.cloneDeep(f.value)))==null?void 0:Ee[0])==null?void 0:Ie.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),C=y==null?void 0:y.map((Ae,z)=>{var se;return z===g.index&&(Ae==null?void 0:Ae.comp)==="Table"&&(Ae.compData=(se=Ae.compData)==null?void 0:se.map(te=>{var ue,Re;return(te==null?void 0:te.key)==="tableContents"&&(te.contents=(Re=(ue=g.content)==null?void 0:ue.map(Qe=>{let Z={};for(let O in Qe)O!=="id"&&(Z[O]=Qe[O]);return Z}))==null?void 0:Re.map(Qe=>Object.values(Qe))),te})),Ae});C.unshift(v==null?void 0:v[0]);let S=T.cloneDeep(f.value),F={};for(let Ae in S)F[Ae]=C;f.value=F},q=()=>{p.value=!1,f.value={},b.value={},x.value=void 0,o.value++},$=g=>{var Be,Je,Ee,Ie;const v=(Je=(Be=Object.values(T.cloneDeep(f.value)))==null?void 0:Be[0])==null?void 0:Je.filter(Ae=>(Ae==null?void 0:Ae.key)==="tableContentName"),y=(Ie=(Ee=Object.values(T.cloneDeep(f.value)))==null?void 0:Ee[0])==null?void 0:Ie.filter(Ae=>(Ae==null?void 0:Ae.key)!=="tableContentName"),C=y==null?void 0:y.map((Ae,z)=>(z===g.index&&(Ae.compData=g.contents),Ae));C.unshift(v==null?void 0:v[0]);let S=T.cloneDeep(f.value),F={};for(let Ae in S)F[Ae]=C;f.value=F},oe=()=>{var v,y;let g={};for(let C in b.value)C===((v=Object.keys(f.value))==null?void 0:v[0])?g[C]=(y=Object.values(f.value))==null?void 0:y[0]:g[C]=b.value[C];m("change",{buttonName:"编辑",index:x.value,singleContent:g},"methodData"),p.value=!1,f.value={},b.value={},x.value=void 0},P=()=>{p.value=!1,f.value={},b.value={},x.value=void 0},L=g=>{m("change",g,"methodData")},R=g=>un(g);return(g,v)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Cc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(C,S)=>(e.openBlock(),e.createElementBlock("div",{key:o.value},[(C==null?void 0:C.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Sc)):(e.openBlock(),e.createElementBlock("div",Tc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(C.comp)),{itemData:C==null?void 0:C.compData,childItemData:C==null?void 0:C.itemChildData,key:S,index:(C==null?void 0:C.id)??S,onContentClick:_,onChange:L},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Gt.ssDialog,{visible:p.value,onBeforeDestroy:P},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(C,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(R(C.comp)),{itemData:C==null?void 0:C.compData,onChange:N,childItemData:C==null?void 0:C.itemChildData,key:S,onContentChange:$,index:(C==null?void 0:C.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",Bc,[e.createVNode(y,{class:"cancel-button footer-button",onClick:q,id:"themeBorderButton"},{default:e.withCtx(()=>v[0]||(v[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:oe,id:"themeButton"},{default:e.withCtx(()=>v[1]||(v[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Nc=zt._export_sfc(Ic,[["__scopeId","data-v-2d9c5ab2"]]),Ac={key:0,class:"method-content"},Vc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(t){const i=e.ref([]),r=Oe.useOriginalState(T.pinia),{originalPath:o}=T.storeToRefs(r),c=t,s=e.ref(!1),m=e.ref(),p=Oe.useTableComp(T.pinia),{multipleTableConst:f}=T.storeToRefs(p),b=T.useModelComp(T.pinia),x=e.ref(!1),_=T.useMenuState(T.pinia),N=T.useLoginState(T.pinia),{itemData:q,isEdit:$,routeToChildPath:oe,tableViewContents:P,lockingPage:L,payloadTypes:R}=T.storeToRefs(b),{activeMenuPath:g,platform:v,childMenu:y}=T.storeToRefs(_),{loginUserInfo:C}=T.storeToRefs(N),S=e.ref(!1),F=async()=>{var Z,O;(Z=i.value)!=null&&Z.find(W=>(W==null?void 0:W.buttonName)==="保存")&&await te((O=i.value)==null?void 0:O.find(W=>(W==null?void 0:W.buttonName)==="保存")),await Oe.onSaveBack()};e.watch(()=>q.value,async()=>{$.value==="view"&&!S.value&&await Qe(T.cloneDeep(c.itemData)),S.value=!1},{deep:!0});const Be=()=>{s.value=!1,m.value=void 0},Je=Z=>Z.map(O=>{const W={};for(const ce in O){const xe=O[ce];if(ce.includes(f.value)){const ke=ce.split(f.value);let Ke=W;ke.forEach((ae,J)=>{J===ke.length-1?Ke[ae]=xe:(Ke[ae]||(Ke[ae]={}),Ke=Ke[ae])})}else W[ce]=xe}return W}),Ee=async(Z,O,W=[])=>{var xe,ke,Ke,ae,J,k,be,Ce,me,Q,ee,pe,Se,Ge,dt;let ce=(xe=T.cloneDeep(O))==null?void 0:xe.filter(w=>(w==null?void 0:w.comp)!=="methodButton");if(Z!=null&&Z.includes("[")){let w=(k=(J=(ae=(Ke=(ke=T.cloneDeep(Z))==null?void 0:ke.split("["))==null?void 0:Ke[1])==null?void 0:ae.split("]"))==null?void 0:J[0])==null?void 0:k.split(":"),I="";if(w!=null&&w[0]){let Y=(be=ce==null?void 0:ce.find(le=>(le==null?void 0:le.name)===(w==null?void 0:w[0])))==null?void 0:be.compData;if(!Y){let le=(Ce=Z==null?void 0:Z.split("["))==null?void 0:Ce[0],B=await Oe.getItemData(le,sessionStorage.getItem("systemKey"),"",!1,"","",W);Y=(me=B==null?void 0:B.find(de=>(de==null?void 0:de.name)===(w==null?void 0:w[0])))==null?void 0:me.compData}Y==null||Y.forEach(le=>{var B,de,Pe,re,U,H;if((le==null?void 0:le.key)==="formContent")(B=le==null?void 0:le.contents)==null||B.forEach(G=>{var De;(G==null?void 0:G.key)===(w==null?void 0:w[1])&&(Array.isArray(G==null?void 0:G.value)?I=G==null?void 0:G.value:I=(De=G==null?void 0:G.value)==null?void 0:De.toString())});else if((le==null?void 0:le.key)==="tableContents"){let G=[],De=(de=Y==null?void 0:Y.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:de.contents,ve=(w==null?void 0:w[1])??"";if(De!=null&&De.every(X=>Array.isArray(X))){let X=Oe.getColumnChild((U=De==null?void 0:De[0])==null?void 0:U.filter(he=>(he==null?void 0:he.label)!=="操作"));(H=le.contents)==null||H.forEach(he=>{let ie={};he=he==null?void 0:he.filter(Me=>!(Me!=null&&Me.id)),X==null||X.forEach((Me,fe)=>{let Ne=he[fe];typeof he[fe]=="number"&&(Ne=he[fe].toString()),(ve===""||ve===Me.prop)&&(ie[Me.prop]=Ne)}),G.push(ie)}),G=Je(G)}else{let X=(Pe=De==null?void 0:De.map(he=>he==null?void 0:he.label))==null?void 0:Pe.filter(he=>he!=="操作");(re=le.contents)==null||re.forEach(he=>{let ie={};he=he==null?void 0:he.filter(Me=>!(Me!=null&&Me.id)),X==null||X.forEach((Me,fe)=>{let Ne=he[fe];typeof he[fe]=="number"&&(Ne=he[fe].toString()),(ve===""||ve===Me)&&(ie[Me]=Ne)}),G.push(ie)})}I=G}})}return I}else if(Z!=null&&Z.includes("/")){let w={};return(Q=T.cloneDeep(ce))==null||Q.forEach((I,Y)=>{var le,B,de,Pe,re,U,H,G,De,ve,X,he,ie,Me,fe,Ne,j,ze,ge;if((I==null?void 0:I.comp)==="Table"){let We=Array.isArray((de=(B=(le=I==null?void 0:I.compData)==null?void 0:le.find(Ve=>(Ve==null?void 0:Ve.key)==="header"))==null?void 0:B.contents)==null?void 0:de[0])?(H=(U=(re=(Pe=I==null?void 0:I.compData)==null?void 0:Pe.find(Ve=>(Ve==null?void 0:Ve.key)==="header"))==null?void 0:re.contents)==null?void 0:U[0])==null?void 0:H.some(Ve=>Ve==null?void 0:Ve.children):[],st=(ve=(De=(G=I==null?void 0:I.compData)==null?void 0:G.find(Ve=>(Ve==null?void 0:Ve.key)==="tableContents"))==null?void 0:De.contents)==null?void 0:ve.map(Ve=>(Ve!=null&&Ve.find(pt=>pt==null?void 0:pt.id)&&(Ve=Ve.slice(1)),Ve)),Ye=(fe=(Me=(ie=(he=(X=I==null?void 0:I.compData)==null?void 0:X.find(Ve=>(Ve==null?void 0:Ve.key)==="header"))==null?void 0:he.contents)==null?void 0:ie[0])==null?void 0:Me[0])==null?void 0:fe.label,tt=(j=(Ne=I==null?void 0:I.compData)==null?void 0:Ne.find(Ve=>(Ve==null?void 0:Ve.key)==="header"))==null?void 0:j.contents;if(We)(We==null?void 0:We.length)===0?w[I.name]=w!=null&&w[I.name]?w[I.name]:Oe.tableToForm(st,tt):w[Ye]=Oe.tableToForm(st,tt);else{const Ve=[];tt=tt.slice(1,tt.length-1),tt==null||tt.forEach((pt,Ze)=>{st==null||st.forEach($e=>{Ve.push({key:pt.label+$e[0],value:$e[Ze+1]})})}),w["form"+Y]=Ve}}else{const We=(ge=(ze=I.compData)==null?void 0:ze.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"))==null?void 0:ge.contents;w!=null&&w.form||(w.form=[]);const st=[];We==null||We.forEach(Ye=>{Ye.key!==""&&(Ye={key:(Ye==null?void 0:Ye.key)??(Ye==null?void 0:Ye.label),value:Ye==null?void 0:Ye.value},st.push(Ye))}),w.form=[...st,...T.cloneDeep(w==null?void 0:w.form)]}}),w}else{if(Z==="createInsofDataApi"){let w=(ee=T.cloneDeep(O))==null?void 0:ee[0];return w={comp:(pe=T.cloneDeep(w))==null?void 0:pe.comp,compData:(Se=T.cloneDeep(w))==null?void 0:Se.compData,name:(Ge=T.cloneDeep(w))==null?void 0:Ge.name,isShow:(dt=T.cloneDeep(w))==null?void 0:dt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:g.value},value:{pageData:w}}}return Z}},Ie=async(Z,O,W)=>{var ke,Ke,ae;let ce=await Oe.getItemData(O,sessionStorage.getItem("systemKey"),""),xe=ce==null?void 0:ce.find(J=>(J==null?void 0:J.name)===(W==null?void 0:W[0]));if(xe){if((xe==null?void 0:xe.comp)==="Table"){let J={};for(let pe in T.cloneDeep(Z))T.cloneDeep(Z)[pe]!=="loginUser"?J[pe]=T.cloneDeep(Z)[pe]:J[pe]=((ke=C.value)==null?void 0:ke.account)||((Ke=C.value)==null?void 0:Ke.账号);let k=[],be=J;Array.isArray(Z)||(be=[J]),be==null||be.forEach(pe=>{k.push({[pe[W[1]]]:pe})});let Ce=[],me=k==null?void 0:k.map(pe=>{var Se;return(Se=Object.keys(pe))==null?void 0:Se[0]});ce==null||ce.forEach(pe=>{var Se;(pe==null?void 0:pe.name)===(W==null?void 0:W[0])&&((Se=pe==null?void 0:pe.compData)==null||Se.forEach(Ge=>{var dt;(Ge==null?void 0:Ge.key)==="tableContents"&&((dt=Ge==null?void 0:Ge.contents)==null||dt.forEach(w=>{w!=null&&w.some(I=>me.includes(I))&&Ce.push({[w.find(I=>I.id).id]:w.find(I=>me.includes(I))})}))}))});let Q=Ce==null?void 0:Ce.map(pe=>{var Se;return(Se=Object.keys(pe))==null?void 0:Se[0]}),ee=[];if(Q==null||Q.forEach(pe=>{var dt;let Se=(dt=Ce==null?void 0:Ce.find(w=>{var I;return((I=Object.keys(w))==null?void 0:I[0].toString())===pe.toString()}))==null?void 0:dt[pe],Ge=k==null?void 0:k.find(w=>{var I;return((I=Object.keys(w))==null?void 0:I[0])===Se});ee.push({id:parseInt(pe),value:{tableData:Ge[Se]}})}),(ee==null?void 0:ee.length)>0)return ee}else if((xe==null?void 0:xe.comp)==="Form"){let J=T.cloneDeep(xe);J.compData=(ae=J.compData)==null?void 0:ae.map(Ce=>{var me;return(Ce==null?void 0:Ce.key)==="formContent"&&(Ce.contents=(me=Ce.contents)==null?void 0:me.map(Q=>((Q==null?void 0:Q.key)===(W==null?void 0:W[1])&&(Q.value=(Z==null?void 0:Z[Q==null?void 0:Q.prop])||Z),Q))),Ce});let k={};for(let Ce in J)Ce!=="id"&&(k[Ce]=J[Ce]);let be=[];if(be.push({id:xe==null?void 0:xe.id,keyType:W==null?void 0:W[1],value:{pageData:k}}),(be==null?void 0:be.length)>0)return be}}},Ae=async(Z,O,W)=>{var ke,Ke,ae,J,k,be,Ce,me,Q,ee;let ce=await Oe.getItemData(O,sessionStorage.getItem("systemKey"),""),xe=ce==null?void 0:ce.find(pe=>(pe==null?void 0:pe.name)===(W==null?void 0:W[0]));if(xe){if((xe==null?void 0:xe.comp)==="Table"){let pe={};for(let Se in T.cloneDeep(Z))T.cloneDeep(Z)[Se]!=="loginUser"?pe[Se]=T.cloneDeep(Z)[Se]:pe[Se]=((ke=C.value)==null?void 0:ke.account)||((Ke=C.value)==null?void 0:Ke.账号);await ct.createInsofDataApi({key:{type:"data",pageKey:O,tableId:xe==null?void 0:xe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:pe}})}else if((xe==null?void 0:xe.comp)==="Form"){let pe=T.cloneDeep(xe),Se=Object.keys(Z),Ge="";(J=(ae=T.cloneDeep(pe))==null?void 0:ae.compData)==null||J.forEach(B=>{var de,Pe;(B==null?void 0:B.key)==="formContent"&&((Pe=(de=T.cloneDeep(B))==null?void 0:de.contents)==null||Pe.forEach(re=>{var U;Se.includes(re==null?void 0:re.key)&&(re==null?void 0:re.value)===((U=C.value)==null?void 0:U.姓名)&&(Ge=re==null?void 0:re.key)}))});let dt=[];(k=Object.values(Z[Ge]))==null||k.forEach(B=>{B!=null&&B.includes("(")&&dt.push(B)}),dt=[...new Set(dt)];const w=dt==null?void 0:dt.map(async B=>{var H,G,De,ve,X,he,ie,Me,fe,Ne,j,ze;let de="";(he=(X=(ve=(De=(G=(H=T.cloneDeep(B))==null?void 0:H.split("("))==null?void 0:G[1])==null?void 0:De.split(")"))==null?void 0:ve[0])==null?void 0:X.split(":"))==null||he.forEach(ge=>{de=de===""?de+ge.replaceAll("'",""):de+"/"+ge.replaceAll("'","")});let Pe=[];(ze=(j=(Ne=(fe=(Me=(ie=T.cloneDeep(B))==null?void 0:ie.split("<"))==null?void 0:Me[1])==null?void 0:fe.split(">"))==null?void 0:Ne[0])==null?void 0:j.split(":"))==null||ze.forEach(ge=>{Pe.push(ge.replaceAll("'",""))});const re=await Oe.getItemData(de,sessionStorage.getItem("systemKey"),"");let U="";return re==null||re.forEach(ge=>{var We;ge.name===(Pe==null?void 0:Pe[0])&&((We=ge==null?void 0:ge.compData)==null||We.forEach(st=>{var Ye;(st==null?void 0:st.key)==="formContent"&&((Ye=st.contents)==null||Ye.forEach(tt=>{(tt==null?void 0:tt.key)===(Pe==null?void 0:Pe[1])&&(U=tt==null?void 0:tt.value)}))}))}),{[B]:U}}),I=await Promise.all(w);pe.compData=(Ce=(be=T.cloneDeep(pe))==null?void 0:be.compData)==null?void 0:Ce.map(B=>{var de,Pe;return(B==null?void 0:B.key)==="formContent"&&(B.contents=(Pe=(de=T.cloneDeep(B))==null?void 0:de.contents)==null?void 0:Pe.map(re=>{var U,H,G,De;return(U=Z[Ge])!=null&&U[re==null?void 0:re.key]&&(Z[Ge][re==null?void 0:re.key].includes("(")?re.value=(H=I==null?void 0:I.find(ve=>{var X;return((X=Object.keys(ve))==null?void 0:X[0])===Z[Ge][re==null?void 0:re.key]}))==null?void 0:H[Z[Ge][re==null?void 0:re.key]]:re.value=(De=(G=T.cloneDeep(Z))==null?void 0:G[Ge])==null?void 0:De[re==null?void 0:re.key]),re})),B});const Y=await ct.getInsofDataApi({key:{type:"structure",pageKey:O,systemKey:sessionStorage.getItem("systemKey")}});let le="";((me=Y==null?void 0:Y.data)==null?void 0:me.type)==="success"&&((ee=(Q=Y==null?void 0:Y.data)==null?void 0:Q.result)==null||ee.forEach(B=>{var de,Pe;((Pe=(de=B==null?void 0:B.value)==null?void 0:de.pageData)==null?void 0:Pe.name)===(W==null?void 0:W[0])&&(le=B.id)}),await ct.updateInsofDataApi({id:le,value:{pageData:pe}}))}}},z=(Z,O="",W={})=>{for(const[ce,xe]of Object.entries(Z)){const ke=O?`${O}.${ce}`:ce;xe!==null&&typeof xe=="object"&&!Array.isArray(xe)&&Object.prototype.toString.call(xe)!=="[object Date]"?z(xe,ke,W):W[ke]=xe}return W},se=async(Z,O,W,ce)=>{var Ke,ae,J,k,be,Ce,me,Q,ee,pe,Se,Ge,dt,w,I,Y,le,B,de,Pe,re,U,H,G,De;let xe=await Oe.getItemData(O,sessionStorage.getItem("systemKey"),""),ke=xe==null?void 0:xe.find(ve=>(ve==null?void 0:ve.name)===(W==null?void 0:W[0]));if(ke){if(!(W!=null&&W[1])&&(ke==null?void 0:ke.comp)==="Table"){let ve={},X=[],he=(ae=(Ke=ke==null?void 0:ke.compData)==null?void 0:Ke.find(fe=>(fe==null?void 0:fe.key)==="header"))==null?void 0:ae.contents;he!=null&&he.every(fe=>Array.isArray(fe))?X=(k=Oe.getColumnChild((J=he==null?void 0:he[0])==null?void 0:J.filter(fe=>(fe==null?void 0:fe.label)!=="操作")))==null?void 0:k.map(fe=>fe==null?void 0:fe.prop):X=he==null?void 0:he.map(fe=>fe==null?void 0:fe.label);for(let fe in T.cloneDeep(Z))if(T.cloneDeep(Z)[fe]!=="loginUser"){let Ne=z(T.cloneDeep(Z)[fe]),j={};for(let ze in Ne)if(X!=null&&X.find(ge=>ge===ze))j[ze]=Ne[ze];else if(X!=null&&X.find(ge=>(ge==null?void 0:ge.toUpperCase())===(ze==null?void 0:ze.toUpperCase()))){let ge=X==null?void 0:X.find(We=>(We==null?void 0:We.toUpperCase())===(ze==null?void 0:ze.toUpperCase()));j[ge]=Ne[ze]}ve[fe]=j}else ve[fe]=((be=C.value)==null?void 0:be.account)||((Ce=C.value)==null?void 0:Ce.账号);let ie=await ct.getInsofDataApi({keyLikes:{tableId:ke==null?void 0:ke.id}});if(((Q=(me=ie==null?void 0:ie.data)==null?void 0:me.result)==null?void 0:Q.length)>0){let fe=(pe=(ee=ie==null?void 0:ie.data)==null?void 0:ee.result)==null?void 0:pe.map(Ne=>Ne==null?void 0:Ne.id);(fe==null?void 0:fe.length)>0&&await ct.batchDeleteInsofDataApi({ids:fe})}let Me=[];if((Se=ke==null?void 0:ke.compData)!=null&&Se.find(fe=>(fe==null?void 0:fe.key)==="pageColumn")&&((w=(dt=(Ge=ke==null?void 0:ke.compData)==null?void 0:Ge.find(fe=>(fe==null?void 0:fe.key)==="pageColumn"))==null?void 0:dt.contents)!=null&&w.includes("["))){const fe=await ct.getInsofDataApi({id:ke==null?void 0:ke.tableId});let Ne=((B=(le=(Y=(I=fe==null?void 0:fe.data)==null?void 0:I.result)==null?void 0:Y[0])==null?void 0:le.key)==null?void 0:B.pageKey)??"";(de=Object.values(ve))==null||de.forEach(j=>{Me.push({key:{type:"data",pageKey:Ne,tableId:ke==null?void 0:ke.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else(Pe=Object.values(ve))==null||Pe.forEach(fe=>{Me.push({key:{type:"data",pageKey:O,tableId:ke==null?void 0:ke.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:fe}})});(Me==null?void 0:Me.length)>0&&await ct.batchAddInsofDataApi({dataList:Me})}else if(!(W!=null&&W[1])&&(ke==null?void 0:ke.comp)==="Form"){let ve=T.cloneDeep(ke);ve.compData=(U=(re=T.cloneDeep(ve))==null?void 0:re.compData)==null?void 0:U.map(ie=>{var Me,fe;return(ie==null?void 0:ie.key)==="formContent"&&(ie.contents=(fe=(Me=T.cloneDeep(ie))==null?void 0:Me.contents)==null?void 0:fe.map(Ne=>{var j,ze;return(j=T.cloneDeep(Z))!=null&&j[Ne==null?void 0:Ne.key]&&(Ne.value=(ze=T.cloneDeep(Z))==null?void 0:ze[Ne==null?void 0:Ne.key]),Ne})),ie});const X=await ct.getInsofDataApi({key:{type:"structure",pageKey:O,systemKey:sessionStorage.getItem("systemKey")}});let he="";((H=X==null?void 0:X.data)==null?void 0:H.type)==="success"&&((De=(G=X==null?void 0:X.data)==null?void 0:G.result)==null||De.forEach(ie=>{var Me,fe;((fe=(Me=ie==null?void 0:ie.value)==null?void 0:Me.pageData)==null?void 0:fe.name)===(W==null?void 0:W[0])&&(he=ie.id)}),await ct.updateInsofDataApi({id:he,value:{pageData:ve}}))}}},te=async Z=>{var O,W,ce,xe,ke,Ke,ae,J,k,be,Ce,me,Q,ee,pe,Se;_.setImportLoading(!0);try{if(Z.api){let Ge=new WeakMap;(W=(O=(await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:R.value})).data.result)==null?void 0:O.filter(H=>{var G,De;return((G=H==null?void 0:H.key)==null?void 0:G.pageKey)!=="menu"&&((De=H==null?void 0:H.key)==null?void 0:De.pageKey)!=="secret"}))==null||W.forEach(H=>{Ge[H.key.pageKey]?Ge[H.key.pageKey]=[...Ge[H.key.pageKey],H]:Ge[H.key.pageKey]=[H]});let w=await Oe.getItemData((y==null?void 0:y.value)===""?g.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge),I="";if(w=w==null?void 0:w.map(H=>{var G,De,ve,X,he,ie,Me,fe,Ne,j,ze,ge;if((H==null?void 0:H.comp)==="Form")H.compData=(G=H.compData)==null?void 0:G.map(We=>{var st;return(We==null?void 0:We.key)==="formContent"&&(We.contents=(st=We.contents)==null?void 0:st.map(Ye=>{var tt;if((Ye==null?void 0:Ye.value)===""&&(Ye==null?void 0:Ye.type)==="Select"){let Ve=Oe.judgeContents((tt=T.cloneDeep(Ye))==null?void 0:tt.optionUrl,Ge);Ye.value=Ye.value||Ve}return Ye})),We});else if((H==null?void 0:H.comp)==="Table"&&(De=H.compData)!=null&&De.find(We=>(We==null?void 0:We.key)==="pageColumn")){let We=(X=(ve=H.compData)==null?void 0:ve.find(Ve=>(Ve==null?void 0:Ve.key)==="pageColumn"))==null?void 0:X.contents,st=((ie=(he=H.compData)==null?void 0:he.find(Ve=>(Ve==null?void 0:Ve.key)==="pageGroup"))==null?void 0:ie.contents)??"",Ye=(Ne=(fe=(Me=We==null?void 0:We.split("["))==null?void 0:Me[1])==null?void 0:fe.split("]"))==null?void 0:Ne[0];I=((j=We==null?void 0:We.split("["))==null?void 0:j[0])+((ge=(ze=P.value)==null?void 0:ze.find(Ve=>(Ve==null?void 0:Ve.key)===Ye))==null?void 0:ge.value)}return H}),!(I===""||I==="")){const H=await Oe.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);w=w==null?void 0:w.map(G=>{var De,ve,X,he,ie,Me,fe,Ne,j,ze,ge,We,st;if((G==null?void 0:G.comp)==="Table"&&(De=G.compData)!=null&&De.find(Ye=>(Ye==null?void 0:Ye.key)==="pageColumn")){let Ye=(X=(ve=G.compData)==null?void 0:ve.find($e=>($e==null?void 0:$e.key)==="pageColumn"))==null?void 0:X.contents,tt=((ie=(he=G.compData)==null?void 0:he.find($e=>($e==null?void 0:$e.key)==="pageGroup"))==null?void 0:ie.contents)??"",Ve=(Ne=(fe=(Me=Ye==null?void 0:Ye.split("["))==null?void 0:Me[1])==null?void 0:fe.split("]"))==null?void 0:Ne[0],pt=((j=Ye==null?void 0:Ye.split("["))==null?void 0:j[0])+((ge=(ze=P.value)==null?void 0:ze.find($e=>($e==null?void 0:$e.key)===Ve))==null?void 0:ge.value),Ze=(We=H==null?void 0:H.find($e=>($e==null?void 0:$e.name)===(tt===""?c==null?void 0:c.compName:tt)))==null?void 0:We.compData;G.compData=(st=G.compData)==null?void 0:st.map($e=>{var rt;return($e==null?void 0:$e.key)==="tableContents"&&($e.contents=(rt=Ze==null?void 0:Ze.find(mt=>(mt==null?void 0:mt.key)==="tableContents"))==null?void 0:rt.contents),$e})}return G})}let Y={};if(((xe=(ce=Z==null?void 0:Z.extraValues)==null?void 0:ce.input)==null?void 0:xe.length)>0){const H=(Ke=(ke=Z==null?void 0:Z.extraValues)==null?void 0:ke.input)==null?void 0:Ke.map(async G=>{var De;ue!=null&&ue.find(ve=>ve===G)?Y=await Ee(G,w):Y[Object.keys(G)[0]]=await Ee((De=Object.values(G))==null?void 0:De[0],w,Ge)});await Promise.all(H)}else Y=await Ee("/",w);let le=!1;(J=(ae=Z==null?void 0:Z.extraValues)==null?void 0:ae.output)==null||J.forEach(H=>{var G,De;(De=(G=Object.values(H))==null?void 0:G[0])!=null&&De.includes(".doc")&&(le=!0)});let B;if(le){const H=Nt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});B=await ct.axios.post(Z.api,Y,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{H.close()})}else B=await ct.axios.post(Z.api,Y,{headers:{"Content-Type":"application/json"}});let de=(me=(Ce=(be=(k=T.cloneDeep(Z))==null?void 0:k.extraValues)==null?void 0:be.output)==null?void 0:Ce.map(H=>{var G,De,ve,X,he,ie,Me,fe,Ne,j,ze,ge,We,st,Ye,tt;if(!((De=(G=Object.values(H))==null?void 0:G[0])!=null&&De.includes(".doc"))){let Ve=(j=(Ne=(fe=(X=T.cloneDeep((ve=Object.values(H))==null?void 0:ve[0]))==null?void 0:X.split("["))==null?void 0:fe[((Me=(ie=T.cloneDeep((he=Object.values(H))==null?void 0:he[0]))==null?void 0:ie.split("["))==null?void 0:Me.length)-1])==null?void 0:Ne.split("]"))==null?void 0:j[0],pt=Ve==null?void 0:Ve.split(":"),Ze=(We=T.cloneDeep((ze=Object.values(H))==null?void 0:ze[0]))==null?void 0:We.substring(0,T.cloneDeep((ge=Object.values(H))==null?void 0:ge[0]).lastIndexOf("["));if(Ze=(Ye=T.cloneDeep(Ze))==null?void 0:Ye.slice(0,((st=T.cloneDeep(Ze))==null?void 0:st.length)-1),Ze!=null&&Ze.includes("[")){let $e="";if((tt=Oe.contentTransArrayToAll(Ze,"/"))==null||tt.forEach(rt=>{var mt,wt,He,ot,bt,Fe,Ue;if(!(rt!=null&&rt.includes("[")))$e=$e===""?$e+rt.replaceAll("/",""):$e+"/"+rt.replaceAll("/","");else{let Xe=T.cloneDeep(rt).slice(1,((mt=T.cloneDeep(rt))==null?void 0:mt.length)-1),Te=(Fe=(bt=(ot=(He=(wt=T.cloneDeep(Xe))==null?void 0:wt.split("["))==null?void 0:He[1])==null?void 0:ot.split("]"))==null?void 0:bt[0])==null?void 0:Fe.split(":"),V="",ye=(Ue=w==null?void 0:w.find(we=>(we==null?void 0:we.name)===(Te==null?void 0:Te[0])))==null?void 0:Ue.compData;ye==null||ye.forEach(we=>{var at;(we==null?void 0:we.key)==="formContent"&&((at=we==null?void 0:we.contents)==null||at.forEach(et=>{(et==null?void 0:et.key)===(Te==null?void 0:Te[1])&&(V=et==null?void 0:et.value)}))}),$e=$e===""?$e+V.replaceAll("/",""):$e+"/"+V.replaceAll("/","")}}),Ze=$e,Ze[(Ze==null?void 0:Ze.length)-1]!=="/")return Ze}}}))==null?void 0:me.filter(H=>H);de=[...new Set(T.cloneDeep(de))];let Pe=de==null?void 0:de.map(async H=>{let G=await Oe.getItemData(H,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);if((G==null?void 0:G.length)===0)return await Oe.getParentContents(H)});await Promise.all(Pe);let re=[],U=(pe=(ee=(Q=T.cloneDeep(Z))==null?void 0:Q.extraValues)==null?void 0:ee.output)==null?void 0:pe.map(async H=>{var fe,Ne,j,ze,ge,We,st,Ye,tt,Ve,pt,Ze,$e,rt,mt,wt,He,ot,bt,Fe,Ue,Xe,Te,V,ye,we,at,et,Et,_t,ut,ft,vt,yt,$t,kt,Rt,Pt,Kt,qt,Jt,ta,jt,Fa,wa,ja,Da,Ua,Ka,Wa,Ha,qa,Na,ya,fa,_a,ba,ca,ma,Xa,Aa,Va,Ea,Ya,Ga,Oa,Ja,Za,Ma,Ct;if((Ne=(fe=Object.values(H))==null?void 0:fe[0])!=null&&Ne.includes(".doc")){var G=new Blob([B.data],{type:"application/octet-stream;charset=UTF-8"}),De=B.headers["content-disposition"],ve=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),X=ve.exec(De),he=X==null?void 0:X[1],ie=document.createElement("a"),Me=window.URL.createObjectURL(G);m.value=[{name:he,blobUrl:Me}],s.value=!0}else{let aa=(Ve=(tt=(Ye=(ze=T.cloneDeep((j=Object.values(H))==null?void 0:j[0]))==null?void 0:ze.split("["))==null?void 0:Ye[((st=(We=T.cloneDeep((ge=Object.values(H))==null?void 0:ge[0]))==null?void 0:We.split("["))==null?void 0:st.length)-1])==null?void 0:tt.split("]"))==null?void 0:Ve[0],nt=aa==null?void 0:aa.split(":"),Xt=($e=T.cloneDeep((pt=Object.values(H))==null?void 0:pt[0]))==null?void 0:$e.substring(0,T.cloneDeep((Ze=Object.values(H))==null?void 0:Ze[0]).lastIndexOf("["));if(Xt!=null&&Xt.includes("[")?Xt=(mt=T.cloneDeep(Xt))==null?void 0:mt.slice(0,((rt=T.cloneDeep(Xt))==null?void 0:rt.length)-1):Xt===""&&(Xt=g.value),Xt=Xt.replaceAll("<","[").replaceAll(">","]"),Xt!=null&&Xt.includes("[")){let Dt="";(wt=Oe.contentTransArrayToAll(Xt,"/"))==null||wt.forEach((It,Mt)=>{var Lt,At,na,Yt,za,Qa,Ra,en,An,dn,yn;if(!(It!=null&&It.includes("[")))Dt=Dt===""?Dt+It.replaceAll("/",""):Dt+"/"+It.replaceAll("/","");else{let pn="",ha="";(Lt=T.cloneDeep(It))!=null&&Lt.includes("]")?(pn=T.cloneDeep(It).slice(1,((At=T.cloneDeep(It))==null?void 0:At.length)-1),ha=(Ra=(Qa=(za=(Yt=(na=T.cloneDeep(pn))==null?void 0:na.split("["))==null?void 0:Yt[1])==null?void 0:za.split("]"))==null?void 0:Qa[0])==null?void 0:Ra.split(":")):(pn=T.cloneDeep(It).slice(1,(en=T.cloneDeep(It))==null?void 0:en.length),ha=(An=T.cloneDeep(pn))==null?void 0:An.split("/"));let tn="",fn=(dn=w==null?void 0:w.find(ua=>(ua==null?void 0:ua.name)===(ha==null?void 0:ha[0])))==null?void 0:dn.compData;fn==null||fn.forEach(ua=>{var Vn;(ua==null?void 0:ua.key)==="formContent"&&((Vn=ua==null?void 0:ua.contents)==null||Vn.forEach(Pa=>{(Pa==null?void 0:Pa.key)===(ha==null?void 0:ha[1])&&(tn=Pa==null?void 0:Pa.value)}))}),((yn=Oe.contentTransArrayToAll(Xt,"/"))==null?void 0:yn.length)-1!==Mt?Dt=Dt===""?Dt+tn.replaceAll("/",""):Dt+"/"+tn.replaceAll("/",""):Dt=Dt+o.value+tn.replaceAll("/","")}}),(He=g.value)!=null&&He.includes(Dt)?Xt=g.value:Xt=Dt}let St=T.cloneDeep((ot=Object.keys(H))==null?void 0:ot[0]);if(((bt=B==null?void 0:B.data)==null?void 0:bt.statusCode)===200||((Fe=B==null?void 0:B.data)==null?void 0:Fe.code)===200){if(((Xe=(Ue=B==null?void 0:B.data)==null?void 0:Ue.data)!=null&&Xe[St]||(V=(Te=B==null?void 0:B.data)==null?void 0:Te.result)!=null&&V[St])&&(nt==null?void 0:nt.length)===1)return await se(((we=(ye=B==null?void 0:B.data)==null?void 0:ye.data)==null?void 0:we[St])||((et=(at=B==null?void 0:B.data)==null?void 0:at.result)==null?void 0:et[St]),T.cloneDeep(Xt),nt,I);if((_t=(Et=B==null?void 0:B.data)==null?void 0:Et.data)!=null&&_t[St]||(ft=(ut=B==null?void 0:B.data)==null?void 0:ut.result)!=null&&ft[St]){let Dt=await Ie(((yt=(vt=B==null?void 0:B.data)==null?void 0:vt.data)==null?void 0:yt[St])||((kt=($t=B==null?void 0:B.data)==null?void 0:$t.result)==null?void 0:kt[St]),T.cloneDeep(Xt),nt);return Dt&&(re=[...re,...Dt]),Dt}else{if(!((Rt=B==null?void 0:B.data)!=null&&Rt.data)){let Dt=await Oe.getItemData(g.value,sessionStorage.getItem("systemKey"),"",!1,"","",Ge);Dt=Dt==null?void 0:Dt.map(Mt=>{var Lt;return(Mt==null?void 0:Mt.name)===(nt==null?void 0:nt[0])&&(Mt.compData=(Lt=Mt.compData)==null?void 0:Lt.map(At=>{var na;return(At==null?void 0:At.key)==="formContent"&&(At.contents=(na=At.contents)==null?void 0:na.map(Yt=>{var za,Qa;return(Yt==null?void 0:Yt.key)===(nt==null?void 0:nt[1])&&(Yt.value=(Qa=(za=B==null?void 0:B.data)==null?void 0:za.result)==null?void 0:Qa[St==null?void 0:St.replaceAll(":","")]),Yt})),At})),Mt});let It=[];(Pt=Dt==null?void 0:Dt.filter(Mt=>(Mt==null?void 0:Mt.comp)==="Form"))==null||Pt.forEach(async Mt=>{let Lt={};for(let At in Mt)At!=="id"&&(Lt[At]=Mt[At]);It.push({id:Mt==null?void 0:Mt.id,value:{pageData:Lt}})}),(It==null?void 0:It.length)>0&&await ct.batchUpdateInsofDataApi({dataList:It});return}if((nt==null?void 0:nt.length)===1){const Dt=(Jt=(qt=(Kt=B==null?void 0:B.data)==null?void 0:Kt.data)==null?void 0:qt.path)==null?void 0:Jt.path;let It="";(ja=(wa=(Fa=(jt=(ta=Dt==null?void 0:Dt.split("("))==null?void 0:ta[1])==null?void 0:jt.split(")"))==null?void 0:Fa[0])==null?void 0:wa.split(":"))==null||ja.forEach(At=>{var na,Yt;It=It===""?It+((na=At==null?void 0:At.replaceAll("'",""))==null?void 0:na.trim()):It+"/"+((Yt=At==null?void 0:At.replaceAll("'",""))==null?void 0:Yt.trim())});let Mt=[(Ha=(Wa=(Ka=(Ua=(Da=Dt==null?void 0:Dt.split("<"))==null?void 0:Da[1])==null?void 0:Ua.split(">"))==null?void 0:Ka[0])==null?void 0:Wa.replaceAll("'",""))==null?void 0:Ha.trim()],Lt;return(ya=(Na=(qa=B==null?void 0:B.data)==null?void 0:qa.data)==null?void 0:Na.data)!=null&&ya[nt==null?void 0:nt[0]]?Lt=await se((ba=(_a=(fa=B==null?void 0:B.data)==null?void 0:fa.data)==null?void 0:_a.data)==null?void 0:ba[nt==null?void 0:nt[0]],It,nt,I):Lt=await Ae((ma=(ca=B==null?void 0:B.data)==null?void 0:ca.data)==null?void 0:ma.data,It,Mt,Ge),Lt}else{const Dt=(Va=(Aa=(Xa=B==null?void 0:B.data)==null?void 0:Xa.data)==null?void 0:Aa.path)==null?void 0:Va.path;let It="";return(Ja=(Oa=(Ga=(Ya=(Ea=Dt==null?void 0:Dt.split("("))==null?void 0:Ea[1])==null?void 0:Ya.split(")"))==null?void 0:Ga[0])==null?void 0:Oa.split(":"))==null||Ja.forEach(Lt=>{var At,na;It=It===""?It+((At=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:At.trim()):It+"/"+((na=Lt==null?void 0:Lt.replaceAll("'",""))==null?void 0:na.trim())}),await Ie((Ct=(Ma=(Za=B==null?void 0:B.data)==null?void 0:Za.data)==null?void 0:Ma.data)==null?void 0:Ct[nt==null?void 0:nt[0]],It,nt)}}}}});if(await Promise.all(U),(re==null?void 0:re.length)>0){let H=[];re==null||re.forEach(ve=>{H!=null&&H.find(X=>{var he,ie,Me,fe;return((ie=(he=X==null?void 0:X.value)==null?void 0:he.pageData)==null?void 0:ie.name)===((fe=(Me=ve==null?void 0:ve.value)==null?void 0:Me.pageData)==null?void 0:fe.name)})||H.push(ve)});let G=[];H==null||H.forEach(ve=>{var ie,Me,fe,Ne;let X=T.cloneDeep(ve);X.value.pageData.compData=(ie=X.value.pageData.compData)==null?void 0:ie.map(j=>{var ze;return(j==null?void 0:j.key)==="formContent"&&(j.contents=(ze=j.contents)==null?void 0:ze.map(ge=>{var st,Ye,tt,Ve;let We=(st=T.cloneDeep(re))==null?void 0:st.find(pt=>(pt==null?void 0:pt.keyType)===(ge==null?void 0:ge.key));if(We){let pt=(Ve=(tt=(Ye=We.value.pageData.compData)==null?void 0:Ye.find(Ze=>(Ze==null?void 0:Ze.key)==="formContent"))==null?void 0:tt.contents)==null?void 0:Ve.find(Ze=>(Ze==null?void 0:Ze.key)===(ge==null?void 0:ge.key));ge.value=pt==null?void 0:pt.value}return ge})),j}),G.push({id:X==null?void 0:X.id,value:X==null?void 0:X.value});let he=[];(Ne=(fe=(Me=X==null?void 0:X.value)==null?void 0:Me.pageData)==null?void 0:fe.compData)==null||Ne.forEach(j=>{var ze;(j==null?void 0:j.key)==="formContent"&&((ze=j==null?void 0:j.contents)==null||ze.forEach(ge=>{var We,st,Ye,tt,Ve,pt;if((st=(We=ge==null?void 0:ge.optionUrl)==null?void 0:We.menuSelect)!=null&&st.find(Ze=>Ze==null?void 0:Ze.includes("[")))if(he!=null&&he.find(Ze=>{var $e,rt,mt;return(($e=Ze==null?void 0:Ze.key)==null?void 0:$e.join(","))===((mt=(rt=ge==null?void 0:ge.optionUrl)==null?void 0:rt.menuSelect)==null?void 0:mt.join(","))})){let Ze=(Ye=he==null?void 0:he.find($e=>{var rt,mt,wt;return((rt=$e==null?void 0:$e.key)==null?void 0:rt.join(","))===((wt=(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))}))==null?void 0:Ye.value;Ze.push({key:ge==null?void 0:ge.prop,groups:(tt=ge==null?void 0:ge.optionUrl)==null?void 0:tt.groupSelect,value:ge==null?void 0:ge.value}),he=he==null?void 0:he.map($e=>{var rt,mt,wt;return((rt=$e==null?void 0:$e.key)==null?void 0:rt.join(","))===((wt=(mt=ge==null?void 0:ge.optionUrl)==null?void 0:mt.menuSelect)==null?void 0:wt.join(","))&&($e.value=Ze),$e})}else he.push({key:(Ve=ge==null?void 0:ge.optionUrl)==null?void 0:Ve.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(pt=ge==null?void 0:ge.optionUrl)==null?void 0:pt.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(he==null?void 0:he.length)>0&&(he=he==null?void 0:he.map(j=>{var ge;let ze="";return(ge=j==null?void 0:j.key)==null||ge.forEach(We=>{var st;if(!(We!=null&&We.includes("[")))ze=ze===""?ze+We:ze+"/"+We;else{let Ye="",tt=(st=We==null?void 0:We.replaceAll("[","").replaceAll("]",""))==null?void 0:st.split(":");w==null||w.forEach(Ve=>{var pt;(Ve==null?void 0:Ve.name)===(tt==null?void 0:tt[0])&&((pt=Ve==null?void 0:Ve.compData)==null||pt.forEach(Ze=>{var $e;(Ze==null?void 0:Ze.key)==="formContent"&&(($e=Ze==null?void 0:Ze.contents)==null||$e.forEach(rt=>{(rt==null?void 0:rt.prop)===(tt==null?void 0:tt[1])&&(Ye=rt==null?void 0:rt.value)}))}))}),ze=ze+o.value+Ye}}),j.key=ze,j})),he==null||he.forEach(j=>{var st,Ye,tt;let ze=(st=Ge[j.key])==null?void 0:st.find(Ve=>{var pt,Ze,$e,rt,mt,wt,He;return((Ze=(pt=Ve==null?void 0:Ve.value)==null?void 0:pt.pageData)==null?void 0:Ze.name)===((mt=(rt=($e=j==null?void 0:j.value)==null?void 0:$e[0])==null?void 0:rt.groups)==null?void 0:mt[0])&&((He=(wt=Ve==null?void 0:Ve.value)==null?void 0:wt.pageData)==null?void 0:He.name)!==void 0}),ge=ze==null?void 0:ze.id,We=(Ye=ze==null?void 0:ze.value)==null?void 0:Ye.pageData;We.compData=(tt=We.compData)==null?void 0:tt.map(Ve=>{var pt;return(Ve==null?void 0:Ve.key)==="formContent"&&(Ve.contents=(pt=Ve.contents)==null?void 0:pt.map(Ze=>{var rt;let $e=(rt=j.value)==null?void 0:rt.find(mt=>(mt==null?void 0:mt.key)===(Ze==null?void 0:Ze.prop));return $e&&(Ze.value=$e.value),Ze})),Ve}),G.push({id:ge,value:{pageData:We}})})});let De=(Se=T.cloneDeep(re))==null?void 0:Se[0];(G==null?void 0:G.length)>0&&await ct.batchUpdateInsofDataApi({dataList:G})}b.setFreshContent(!0)}_.setImportLoading(!1)}catch{ct.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}S.value=!0},ue=["createInsofDataApi"],Re=kl(async Z=>{te(Z)},100),Qe=async Z=>{var ae,J,k,be,Ce;const O=T.cloneDeep(Z);let W,ce=new WeakMap,xe=await ct.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:R.value});(J=(ae=xe.data.result)==null?void 0:ae.filter(me=>{var Q,ee;return((Q=me==null?void 0:me.key)==null?void 0:Q.pageKey)!=="menu"&&((ee=me==null?void 0:me.key)==null?void 0:ee.pageKey)!=="secret"}))==null||J.forEach(me=>{ce[me.key.pageKey]?ce[me.key.pageKey]=[...ce[me.key.pageKey],me]:ce[me.key.pageKey]=[me]}),Z!=null&&Z[0].path&&(W=await(O==null?void 0:O.map(async(me,Q)=>{var Y,le,B,de,Pe,re,U,H,G,De,ve,X,he,ie,Me,fe;const pe=(Y=ce[me==null?void 0:me.path])==null?void 0:Y.filter(Ne=>{var j;return((j=Ne==null?void 0:Ne.key)==null?void 0:j.type)==="data"});let Se="";const Ge=await Oe.getItemData(g.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ce);pe==null||pe.forEach(Ne=>{var j,ze,ge,We,st;((ze=(j=Ne==null?void 0:Ne.value)==null?void 0:j.tableData)==null?void 0:ze.算法名称)===((ge=O==null?void 0:O[Q])==null?void 0:ge.method)&&(Se=(st=(We=Ne==null?void 0:Ne.value)==null?void 0:We.tableData)==null?void 0:st.算法体)});const dt=await Oe.getItemData(me==null?void 0:me.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ce);let w="",I=(Pe=(de=(B=(le=dt==null?void 0:dt[0])==null?void 0:le.compData)==null?void 0:B.find(Ne=>(Ne==null?void 0:Ne.key)==="header"))==null?void 0:de.contents)==null?void 0:Pe.findIndex(Ne=>(Ne==null?void 0:Ne.prop)==="算法体");return(U=(re=dt==null?void 0:dt[0])==null?void 0:re.compData)==null||U.forEach(Ne=>{var j;(Ne==null?void 0:Ne.key)==="tableContents"&&((j=Ne==null?void 0:Ne.contents)==null||j.forEach(ze=>{ze!=null&&ze.find(ge=>ge===(me==null?void 0:me.method))&&(w=ze[I])}))}),{buttonName:((H=O==null?void 0:O[Q])==null?void 0:H.method)||((ve=(De=(G=pe==null?void 0:pe[0])==null?void 0:G.value)==null?void 0:De.tableData)==null?void 0:ve.算法名称),api:(Se===""?(ie=(he=(X=pe==null?void 0:pe[0])==null?void 0:X.value)==null?void 0:he.tableData)==null?void 0:ie.算法体:Se)||w,content:Ge==null?void 0:Ge.filter(Ne=>Ne.comp!=="methodButton"),extraContent:(Me=T.cloneDeep(me.value))==null?void 0:Me.slice(1),methodName:(me==null?void 0:me.path)??"",extraValues:(fe=O==null?void 0:O[Q])==null?void 0:fe.data}})));const ke=O==null?void 0:O.map(async me=>{var dt,w,I,Y,le,B;const Q=(dt=xe.data.result)==null?void 0:dt.filter(de=>{var Pe,re,U;return((Pe=de==null?void 0:de.key)==null?void 0:Pe.parentTable)===""&&((re=de==null?void 0:de.key)==null?void 0:re.type)==="method"&&((U=de==null?void 0:de.key)==null?void 0:U.methodName)===de.method}),ee=Q==null?void 0:Q[0],pe=(w=xe.data.result)==null?void 0:w.filter(de=>{var Pe,re;return((Pe=de==null?void 0:de.key)==null?void 0:Pe.type)==="methodData"&&((re=de==null?void 0:de.key)==null?void 0:re.tableId)===(ee==null?void 0:ee.id)}),Se=await Oe.getItemData(g.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ce),Ge=pe==null?void 0:pe[0];return{buttonName:(I=ee==null?void 0:ee.key)==null?void 0:I.methodKey,api:(le=(Y=Ge==null?void 0:Ge.value)==null?void 0:Y.tableData)==null?void 0:le[0],content:Se==null?void 0:Se.filter(de=>de.comp!=="methodButton"),extraContent:(B=T.cloneDeep(me.value))==null?void 0:B.slice(1),methodName:(me==null?void 0:me.method)??""}}),Ke=(k=Z==null?void 0:Z[0])!=null&&k.path&&((be=Z==null?void 0:Z[0])==null?void 0:be.path)!==""?await Promise.all(W):await Promise.all(ke);i.value=Ke==null?void 0:Ke.filter(me=>me==null?void 0:me.extraContent),(Ce=i.value)==null||Ce.forEach(me=>{var Q;me.api===""&&((Q=me.content)==null||Q.forEach(ee=>{var pe;ee.comp=="Table"&&b.setExtraContents(Oe.methodTableToContent(ee.compData,(pe=me.extraContent)==null?void 0:pe[0]))}))})};return e.watch(()=>c.itemData,async()=>{$.value=="view"&&!S.value&&await Qe(T.cloneDeep(c.itemData)),S.value=!1},{immediate:!0,deep:!0}),(Z,O)=>{var W,ce,xe;return e.unref($)!=="edit"?(e.openBlock(),e.createElementBlock("div",Ac,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((W=i.value)==null?void 0:W.filter(ke=>(ke==null?void 0:ke.buttonName)!=="保存"),ke=>{var Ke;return e.openBlock(),e.createElementBlock("div",null,[ke.api!==""?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,disabled:e.unref(L)===e.unref(g)&&!((Ke=ke==null?void 0:ke.buttonName)!=null&&Ke.includes("预览")),class:"calculator-content",modelValue:ke.buttonName,onClickTrigger:ae=>e.unref(Re)(ke),loading:x.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(oe)!==""&&((xe=e.unref(g))==null?void 0:xe[((ce=e.unref(g))==null?void 0:ce.length)-1])!==e.unref(o)?(e.openBlock(),e.createBlock(e.unref(Vo._sfc_main),{key:0,class:"calculator-content",onClickTrigger:F,modelValue:"保存"})):e.createCommentVNode("",!0)]),s.value?(e.openBlock(),e.createBlock(Nt.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:Be},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},Oc=zt._export_sfc(Vc,[["__scopeId","data-v-11fca7e0"]]),Mc={};function zc(t,i){return" 567 "}const Rc=zt._export_sfc(Mc,[["render",zc]]),Pc={class:"module content"},$c={class:"module data"},Lc={class:"module layout"},Fc={class:"form-content"},jc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),s=e.ref("create"),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),p=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:""}]),b=e.ref({}),x=e.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:x.value},{key:"signConfig",contents:b.value}]}),N=P=>{var L;b.value=T.cloneDeep(P),o("change",(L=_())==null?void 0:L.compData)},q=P=>{var L,R;if((P==null?void 0:P.buttonName)==="确认"){const g=T.cloneDeep(P==null?void 0:P.content);switch(s.value){case"create":x.value.push({...g,index:((L=x.value)==null?void 0:L.length)+1});break}o("change",(R=_())==null?void 0:R.compData),c.visible=!1}else c.visible=!1},$=(P,L)=>{var R,g;switch(P){case"create":(R=f.value)==null||R.forEach(v=>{v.value=""}),s.value="create",c.visible=!0;break;case"update":(g=f.value)==null||g.forEach(v=>{v.value=L[v==null?void 0:v.prop]}),s.value="update",c.visible=!0;break;case"delete":x.value.splice(L,1),s.value="delete";break}},oe=()=>{c.visible=!1};return e.watch(()=>r==null?void 0:r.itemContents,P=>{var L,R;P&&(b.value=((L=P==null?void 0:P.find(g=>g.key==="signConfig"))==null?void 0:L.contents)??{},x.value=((R=P==null?void 0:P.find(g=>g.key==="signTypeList"))==null?void 0:R.contents)??[])},{immediate:!0}),(P,L)=>{const R=e.resolveComponent("svg-icon"),g=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Pc,[L[2]||(L[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(g,{class:"module-icon",id:"themeButton",onClick:L[0]||(L[0]=v=>$("create"))},{icon:e.withCtx(()=>[e.createVNode(R,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[L[1]||(L[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",$c,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(v,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(v==null?void 0:v.label),1),e.createElementVNode("div",null,[e.createVNode(g,{type:"primary",size:"small",onClick:C=>$("update",{...v,index:y+1})},{default:e.withCtx(()=>L[3]||(L[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(g,{type:"danger",size:"small",onClick:C=>$("delete",y)},{default:e.withCtx(()=>L[4]||(L[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Lc,[e.createVNode(Nt.ssForm,{rowContents:p.value,onChange:N},null,8,["rowContents"])])]),e.createVNode(Gt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:oe,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fc,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:q},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Uc=zt._export_sfc(jc,[["__scopeId","data-v-487e0536"]]),Kc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(t,{emit:i}){const r=t,o=i,c=e.ref(1),s=e.computed(()=>{var _,N;return(_=r==null?void 0:r.stepConfig)!=null&&_.allowTrigger?c.value:(N=r==null?void 0:r.stepConfig)==null?void 0:N.active}),m=(_,N)=>{c.value=N,o("clickStep",_,N)},p=_=>Nt.getComponent(_),f=()=>{var N;const _=(N=r==null?void 0:r.stepList)==null?void 0:N.find((q,$)=>$+1===s.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},b=_=>{o("clickTrigger",_)},x=_=>{o("changeTrigger",_)};return(_,N)=>{var oe,P,L,R,g;const q=e.resolveComponent("el-step"),$=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode($,{direction:(oe=t.stepConfig)==null?void 0:oe.direction,active:s.value,"finish-status":"success",simple:(P=t.stepConfig)==null?void 0:P.simple,"align-center":((L=t.stepConfig)==null?void 0:L.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.stepList,(v,y)=>(e.openBlock(),e.createBlock(q,{key:y,class:"step-item",onClick:C=>m(v,y+1)},{title:e.withCtx(()=>[e.renderSlot(_.$slots,"title",{title:v==null?void 0:v.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(_.$slots,"description",{description:v==null?void 0:v.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(R=t.stepConfig)!=null&&R.allowTrigger&&((g=t.stepConfig)!=null&&g.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(v,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(v==null?void 0:v.type)),{modelValue:v.value,"onUpdate:modelValue":C=>v.value=C,onClickTrigger:b,onChangeTrigger:x,content:v==null?void 0:v.content},e.createSlots({_:2},[e.renderList(_.$slots,(C,S)=>({name:S,fn:e.withCtx(F=>[e.renderSlot(_.$slots,S,e.mergeProps({ref_for:!0},F||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Wc=zt._export_sfc(Kc,[["__scopeId","data-v-d7c99969"]]),Hc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(t,{emit:i}){const r=t,o=i,c=e.ref({}),s=e.ref([]),m=(p,f)=>{o("clickStep",p,f)};return e.watch(()=>r==null?void 0:r.itemData,p=>{var f,b;s.value=(f=p==null?void 0:p.find(x=>(x==null?void 0:x.key)==="stepList"))==null?void 0:f.contents,c.value=(b=p==null?void 0:p.find(x=>(x==null?void 0:x.key)==="stepConfig"))==null?void 0:b.contents},{immediate:!0,deep:!0}),(p,f)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Wc,{stepConfig:c.value,stepList:s.value,onClickStep:m},{icon:e.withCtx(()=>[e.createVNode(b,{name:"import"})]),title:e.withCtx(({title:x})=>[e.createTextVNode(e.toDisplayString(x),1)]),description:e.withCtx(({description:x})=>[e.createTextVNode(e.toDisplayString(x),1)]),_:1},8,["stepConfig","stepList"])}}}),qc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(t){return(i,r)=>{const o=e.resolveComponent("el-timeline-item"),c=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(c,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.activities,(s,m)=>(e.openBlock(),e.createBlock(o,{key:m,timestamp:s.timestamp,placement:t.timeLineConfig.placement,center:t.timeLineConfig.isCenter,"hide-timestamp":!0,type:t.timeLineConfig.type,color:t.timeLineConfig.color,size:t.timeLineConfig.size,icon:t.timeLineConfig.icon,hollow:t.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Xc=zt._export_sfc(qc,[["__scopeId","data-v-4172a886"]]),Yc={class:"line-content"},Gc={class:"line-time"},Jc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(t){const i=t,r=e.ref({}),o=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var s,m;o.value=(s=c==null?void 0:c.find(p=>(p==null?void 0:p.key)==="timeLineList"))==null?void 0:s.contents,r.value=(m=c==null?void 0:c.find(p=>(p==null?void 0:p.key)==="timeLineConfig"))==null?void 0:m.contents},{immediate:!0}),(c,s)=>(e.openBlock(),e.createBlock(Xc,{activities:o.value,timeLineConfig:r.value},{content:e.withCtx(({content:m,timestamp:p})=>[e.createElementVNode("span",Yc,e.toDisplayString(m),1),e.createElementVNode("span",Gc,e.toDisplayString(p),1)]),_:1},8,["activities","timeLineConfig"]))}}),Zc=zt._export_sfc(Jc,[["__scopeId","data-v-b4d9deed"]]),Qc={class:"tabs-content"},eu={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(t){const i=t,r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,o=>{const c=o.find(s=>(s==null?void 0:s.key)=="stepList");c?r.value=c.contents.map(s=>({value:s.value||s.title,label:s.label||s.title,children:s.children||[]})):r.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(o,c)=>(e.openBlock(),e.createElementBlock("div",Qc,[e.createVNode(Nt.ssTab,{tabsContents:r.value},null,8,["tabsContents"])]))}},tu=zt._export_sfc(eu,[["__scopeId","data-v-279085ed"]]),Jn=T.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(t){this.itemData=t},setCurStructureCompIds(t){this.curStructureCompIds=t},setRefreshCurStructure(t){this.isRefreshCurStructure=t},setOriginalData(t){this.originalData=t},setExtraContents(t){this.extraContents=t},setNodeDev(t){this.nodeDev=t},setIsEdit(t){this.isEdit=t}}}),au={class:"type-select"},nu=["onClick"],ou={class:"list-icon"},lu={__name:"modelSelect",setup(t){const i=Jn(T.pinia),{itemData:r}=T.storeToRefs(i),o=c=>{const s=T.cloneDeep(r.value);s.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(s)};return(c,s)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(fr),(p,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:b=>o(p)},[e.createElementVNode("div",ou,[e.createVNode(m,{name:p.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(p.name),1)],8,nu)]))),128))])}}},ru=zt._export_sfc(lu,[["__scopeId","data-v-91799bf8"]]),iu={class:"fill-content"},su={class:"operate-content"},cu={class:"collapse-title-content"},uu={class:"collapse-title-item"},du={key:1},pu=["onClick"],fu={class:"icon-content"},hu={key:0,class:"edit-content"},vu=["onClick"],mu={class:"comp-child"},gu={__name:"modelFill",setup(t){const i=Jn(T.pinia),{itemData:r,originalData:o}=T.storeToRefs(i),c=e.ref([]);e.ref([]);const s=e.ref([]),m=e.ref([]),p=q=>{var oe;let $=(oe=T.cloneDeep(m.value))==null?void 0:oe.map((P,L)=>(q===L&&(P.content=!0),P));m.value=$},f=q=>{var oe;let $=(oe=T.cloneDeep(m.value))==null?void 0:oe.map((P,L)=>(q===L&&(P.content=!1),P));m.value=$,c.value=T.cloneDeep(r.value)},b=(q,$)=>{var R;let oe=(R=T.cloneDeep(m.value))==null?void 0:R.map((g,v)=>(q===v&&(g.content=!1),g));m.value=oe;const P=T.cloneDeep(r.value),L=P==null?void 0:P.filter((g,v)=>(v===q&&(g.name=$),g));i.setOriginalData(L),i.setItemData(L)};e.watch(()=>r.value,()=>{var q,$,oe;!r.value||((q=r.value)==null?void 0:q.length)===0?c.value=[]:c.value=($=T.cloneDeep(r.value))==null?void 0:$.filter(P=>(P==null?void 0:P.comp)!=="methodButton"),s.value=c.value,m.value=(oe=T.cloneDeep(s.value))==null?void 0:oe.map((P,L)=>({id:L,content:!1}))},{deep:!0,immediate:!0});const x=q=>un(q),_=(q,$,oe)=>{var L,R;if(!q)return;let P=T.cloneDeep(r.value);P=(L=P==null?void 0:P.map((g,v)=>(v===oe&&(g.compData=q),g)))==null?void 0:L.filter(g=>(g==null?void 0:g.comp)!=="methodButton"),m.value=(R=T.cloneDeep(P))==null?void 0:R.map((g,v)=>({id:v,content:!1})),i.setOriginalData(P),i.setItemData(P)},N=q=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const $=T.cloneDeep(r.value),oe=$==null?void 0:$.filter((P,L)=>L!==q);i.setOriginalData(oe),i.setItemData(oe),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(q,$)=>{const oe=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",iu,[$[1]||($[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",su,[e.createVNode(bl.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:P,index:L})=>{var R,g,v,y,C,S,F,Be,Je,Ee;return[e.createElementVNode("div",cu,[e.createElementVNode("div",uu,[(g=(R=m.value)==null?void 0:R.find(Ie=>Ie.id===L))!=null&&g.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:P.name&&P.name!==""?"8px":"0px"})},e.toDisplayString(P.name),5)),(y=(v=m.value)==null?void 0:v.find(Ie=>Ie.id===L))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",du,[e.createVNode(Nt._sfc_main$2,{modelValue:P.name,"onUpdate:modelValue":Ie=>P.name=Ie,onClick:$[0]||($[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(C=m.value)==null?void 0:C.find(Ie=>Ie.id===L))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(Ie=>p(L),["stop"]),class:"icon-content"},[e.createVNode(oe,{name:"Edit",style:{width:"16px",height:"16px"}})],8,pu))]),e.createElementVNode("div",fu,[(Be=(F=m.value)==null?void 0:F.find(Ie=>Ie.id===L))!=null&&Be.content?(e.openBlock(),e.createElementBlock("div",hu,[e.createVNode(oe,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(Ie=>f(L),["stop"])},null,8,["onClick"]),e.createVNode(oe,{name:"Save",onClick:e.withModifiers(Ie=>b(L,P.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ee=(Je=m.value)==null?void 0:Je.find(Ie=>Ie.id===L))!=null&&Ee.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(Ie=>N(L),["stop"]),class:"icon-content"},[e.createVNode(oe,{name:"Delete",style:{width:"16px",height:"16px"}})],8,vu))])])]}),content:e.withCtx(({item:P,index:L})=>{var R,g;return[e.createElementVNode("div",mu,[e.createTextVNode(e.toDisplayString(x(P.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(P.comp+"Operate")),{itemContents:P==null?void 0:P.compData,originalItemContents:(g=(R=s.value)==null?void 0:R.find((v,y)=>y===L))==null?void 0:g.compData,onChange:v=>_(v,P,L)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},yu=zt._export_sfc(gu,[["__scopeId","data-v-a46a44b9"]]),bu={key:0,class:"show-content"},ku={style:{display:"flex"}},xu={__name:"modelShow",setup(t){const i=Jn(T.pinia),{itemData:r}=T.storeToRefs(i),o=e.ref([]);e.watch(()=>r.value,()=>{var s;!r.value||((s=r.value)==null?void 0:s.length)===0?o.value=[]:o.value=T.cloneDeep(r.value)},{deep:!0,immediate:!0});const c=s=>un(s);return(s,m)=>{var p;return((p=o.value)==null?void 0:p.length)>0?(e.openBlock(),e.createElementBlock("div",bu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(f,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ku,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:b},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},wu=zt._export_sfc(xu,[["__scopeId","data-v-3f3e863e"]]),Du={class:"tabs-header"},_u={class:"tabs-list"},Eu={class:"tab-name"},Cu={class:"tab-actions"},Su=["onClick"],Tu=["onClick"],Bu=["onClick"],Iu={class:"model-operate"},Nu={class:"model-select",style:{display:"unset"}},Au={class:"existing-components"},Vu={class:"component-list"},Ou=["onClick"],Mu={class:"component-info"},zu={class:"component-type"},Ru={class:"component-name"},Pu={class:"model-fill"},$u={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.ref([]),s=e.ref(!1),m=e.ref(""),p=e.ref({title:""}),f=e.ref(-1),b=e.ref(!1),x=e.ref(-1),_=e.ref(new WeakMap),N=e.ref(null),q=Jn(T.pinia),{itemData:$}=T.storeToRefs(q),oe=()=>{m.value="新增标签页",p.value.title="",f.value=-1,s.value=!0},P=Z=>{m.value="修改标签页",p.value.title=c.value[Z].title,f.value=Z,s.value=!0},L=Z=>{const O=v(Z);_.value.delete(O),c.value.splice(Z,1),Qe()},R=()=>{if(p.value.title.trim()){if(f.value===-1){const Z={title:p.value.title,value:p.value.title,label:p.value.title,children:[],id:g()};c.value.push(Z)}else c.value[f.value].title=p.value.title,c.value[f.value].value=p.value.title,c.value[f.value].label=p.value.title;s.value=!1,Qe()}},g=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,v=Z=>{const O=c.value[Z];return O.id||(O.id=g()),O.id},y=Z=>{var ce;x.value=Z;const O=v(Z);N.value=T.cloneDeep($.value);let W=_.value.get(O);!W&&((ce=c.value[Z].children)==null?void 0:ce.length)>0&&(W=Be(c.value[Z].children)),W?q.setItemData(T.cloneDeep(W)):q.setItemData([]),b.value=!0},C=e.computed(()=>{const Z=T.useModelComp(T.pinia),O=T.storeToRefs(Z).itemData.value;return console.log("可用组件数据",O),!O||!Array.isArray(O)?[]:O.filter(W=>{var ce;if(W.comp==="Tabs"&&x.value>=0){const xe=v(x.value);if((ce=W.compData)==null?void 0:ce.some(Ke=>{var ae;return Ke.key==="stepList"&&((ae=Ke.contents)==null?void 0:ae.some(J=>J.id===xe))}))return!1}return!0})}),S=Z=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Z]||Z,F=Z=>{var O;try{const W=T.cloneDeep(Z);W.id=Date.now()+Math.random(),W.comp==="Tabs"&&((O=W.compData)==null||O.forEach(xe=>{xe.key==="stepList"&&xe.contents&&xe.contents.forEach(ke=>{ke.id=g()})}));const ce=T.cloneDeep($.value);ce.push(W),q.setItemData(ce)}catch(W){console.error("添加组件失败:",W)}},Be=Z=>Z.map(O=>{var W;switch(O.type){case"form":return{comp:"Form",name:O.value||"表单",compData:Je(O.content)};case"table":return{comp:"Table",name:O.value||"表格",compData:Ee(O.content)};default:return{comp:"Unknown",name:O.value||"",compData:((W=O.content)==null?void 0:W.originalData)||[]}}}),Je=Z=>{if(!Z)return[];const O=[];return Z.rowContents&&O.push({key:"formContent",contents:Z.rowContents}),Z.buttonValue&&O.push({key:"formButton",contents:Z.buttonValue}),typeof Z.isEnableWrap<"u"&&O.push({key:"enableWrap",contents:Z.isEnableWrap}),O},Ee=Z=>[],Ie=()=>{if(x.value>=0&&x.value<c.value.length){const Z=v(x.value);_.value.set(Z,T.cloneDeep($.value)),c.value[x.value].children=se($.value),console.log("保存后的数据",se($.value))}b.value=!1,x.value=-1,N.value=null,Qe()},Ae=()=>{N.value&&q.setItemData(T.cloneDeep(N.value)),b.value=!1,x.value=-1,N.value=null},z=()=>{b.value&&Ae()},se=Z=>{if(!Array.isArray(Z))throw new Error("sourceData must be an array");return Z.map((O,W)=>{if(!O||typeof O!="object")return O;const{comp:ce,name:xe,compData:ke}=O;switch(ce){case"Form":return{type:"form",content:te(ke||[]),value:"表单"};case"Table":return{type:"table",content:ue(ke||[]),value:"表格"};default:return{type:"xxx",content:Re(ke||[]),value:""}}})},te=Z=>{const O={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},W={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Z.forEach((ce,xe)=>{if(!ce||typeof ce!="object"){console.warn(`Invalid config at index ${xe}:`,ce);return}const{key:ke,contents:Ke}=ce,ae=W[ke];if(!ae){console.warn(`Unknown Form config key: ${ke}`);return}ke==="enableWrap"?O[ae]=!!Ke:O[ae]=Array.isArray(Ke)?Ke:[]}),O},ue=Z=>{const O={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},W={header:"columns",tableContents:"tableData"};return Z.forEach((ce,xe)=>{if(!ce||typeof ce!="object"){console.warn(`Invalid config at index ${xe}:`,ce);return}const{key:ke,contents:Ke}=ce,ae=W[ke];if(!ae){console.warn(`Unknown Table config key: ${ke}`);return}O[ae]=Array.isArray(Ke)?Ke:[]}),O},Re=Z=>(console.log("Default conversion logic - to be implemented"),{originalData:Z,processed:!1,componentType:"unknown"}),Qe=()=>{const Z=[{key:"stepList",contents:c.value}];o("change",Z)};return e.watch(()=>r.itemContents,Z=>{if(Z&&Z.length>0){const O=Z.find(W=>W.key==="stepList");O&&O.contents&&(c.value=O.contents.map(W=>({title:W.title||"",value:W.value||W.title||"",label:W.label||W.title||"",children:W.children||[],id:W.id||g()})))}},{immediate:!0,deep:!0}),(Z,O)=>{const W=e.resolveComponent("svg-icon"),ce=e.resolveComponent("el-input"),xe=e.resolveComponent("el-form-item"),ke=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Du,[O[6]||(O[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:oe},[e.createVNode(W,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),O[5]||(O[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",_u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(Ke,ae)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:ae},[e.createElementVNode("span",Eu,e.toDisplayString(Ke.title),1),e.createElementVNode("div",Cu,[e.createElementVNode("button",{onClick:J=>P(ae)},"修改标题",8,Su),e.createElementVNode("button",{onClick:J=>y(ae)},"布局调整",8,Tu),e.createElementVNode("button",{onClick:J=>L(ae)},"删除",8,Bu)])]))),128))]),e.createVNode(Gt.ssDialog,{modelValue:s.value,"onUpdate:modelValue":O[2]||(O[2]=Ke=>s.value=Ke),title:m.value,onBeforeDestroy:O[3]||(O[3]=Ke=>s.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:O[1]||(O[1]=Ke=>s.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:R},"确定")]),default:e.withCtx(()=>[e.createVNode(ke,{model:p.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(xe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(ce,{modelValue:p.value.title,"onUpdate:modelValue":O[0]||(O[0]=Ke=>p.value.title=Ke),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Gt.ssDialog,{modelValue:b.value,"onUpdate:modelValue":O[4]||(O[4]=Ke=>b.value=Ke),title:"布局调整",fullScreen:"",onBeforeDestroy:z},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ae},"取消"),e.createElementVNode("button",{onClick:Ie},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",Iu,[e.createElementVNode("div",Nu,[e.createVNode(ru),e.createElementVNode("div",Au,[O[8]||(O[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,Ke=>(e.openBlock(),e.createElementBlock("div",{key:Ke.id,class:"component-item",onClick:ae=>F(Ke)},[e.createElementVNode("div",Mu,[e.createElementVNode("span",zu,e.toDisplayString(S(Ke.comp)),1),e.createElementVNode("span",Ru,e.toDisplayString(Ke.name),1)]),O[7]||(O[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Ou))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Z.innerWidth},[e.createVNode(wu)])),e.createElementVNode("div",Pu,[e.createVNode(yu)])])]),_:1},8,["modelValue"])])}}},Lu=zt._export_sfc($u,[["__scopeId","data-v-9096ed0d"]]);function Fu(){return{title:{text:"",left:"center",top:10,textStyle:{color:"#333",fontSize:18,fontWeight:"bold"}},tooltip:{trigger:"axis"},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"category",axisLabel:{interval:0},data:[]},yAxis:{type:"value"},series:[]}}function ju(t){return{type:"line",...t}}function Uu(){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 Ku(t){return{type:"bar",barWidth:"60%",...t}}function Wu(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Hu(t){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...t}}const Ia={line:{initBaseoptions:Fu,initSeries:ju},bar:{initBaseoptions:Uu,initSeries:Ku},pie:{initBaseoptions:Wu,initSeries:Hu}},$o=T.useMenuState(T.pinia),Il=(t,i)=>{var x;const r=[],o=[],{group:c,nameCol:s,valueCol:m}=i||{},p=t==null?void 0:t.find(_=>{const{name:N}=_;return N===c});if(!p)return{names:r,values:o};const f=(x=p==null?void 0:p.compData)==null?void 0:x.find(_=>{const{key:N}=_;return N==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(_=>{const N=_==null?void 0:_[0];let q=!1;ct.isObject(N)&&(N!=null&&N.id)&&(q=!0);let $=s,oe=m;q&&($=$+1,oe=oe+1);const P=_==null?void 0:_[$],L=_==null?void 0:_[oe];r.push(P),o.push(L)}),{names:r,values:o}},qu=async t=>{const{menu:i,mainKey:r,detailGroup:o,detailNameCol:c,detailValueCol:s,isSelfDetail:m}=t||{};let p=null;const f=sessionStorage.getItem("systemKey");if(m&&$o.activeMenuPath&&(p=await Oe.getItemData(`${$o.activeMenuPath}`,f,"")),!m){const b=i==null?void 0:i.join("/");p=await Oe.getItemData(`${b}^${r}`,f,"")}return Il(p,{group:o,nameCol:c,valueCol:s})},Xu=async t=>{const{menu:i,group:r,nameCol:o,valueCol:c}=t||{},s=i==null?void 0:i.join("/"),m=sessionStorage.getItem("systemKey"),p=await Oe.getItemData(s,m,"");return Il(p,{group:r,nameCol:o,valueCol:c})},ko=async(t,i)=>{const r={names:[],values:[]},{menu:o,group:c,nameCol:s,valueCol:m}=t||{};if(!o.length||!c)return r;const{mainKey:p,group:f,nameCol:b,valueCol:x,isSelfDetail:_}=i||{};return p&&f&&Nt.isNumber(b)&&Nt.isNumber(x)?await qu({menu:o,mainKey:p,detailGroup:f,detailNameCol:b,detailValueCol:x,isSelfDetail:_}):Nt.isNumber(s)&&Nt.isNumber(m)?await Xu({menu:o,group:c,nameCol:s,valueCol:m}):r},Yu=async({chartBaseConfig:t,chartDataConfig:i,chartDetailConfig:r})=>{const{type:o,title:c}=t||{},s=Ia==null?void 0:Ia[o];if(!s)return;const{initBaseoptions:m,initSeries:p}=s,f=m();f.title.text=c??"";const{names:b,values:x}=await ko(i,r);if(!b||!x)return f;f.xAxis.data=b;const _=p({data:x});return f.series.push(_),f},Gu=async({chartBaseConfig:t,chartDataConfig:i,chartDetailConfig:r})=>{const{type:o,title:c}=t||{},s=Ia==null?void 0:Ia[o];if(!s)return;const{initBaseoptions:m,initSeries:p}=s,f=m();f.title.text=c??"";const{names:b,values:x}=await ko(i,r);if(!b||!x)return f;f.xAxis.data=b;const _=p({data:x});return f.series.push(_),f},Ju=async({chartBaseConfig:t,chartDataConfig:i,chartDetailConfig:r})=>{const{type:o,title:c}=t||{},s=Ia==null?void 0:Ia[o];if(!s)return;const{initBaseoptions:m,initSeries:p}=s,f=m();f.title.text=c??"";const{names:b,values:x}=await ko(i,r);if(!b||!x)return f;const _=[];for(let q=0;q<b.length;q++){const $=b[q],oe=x[q];_.push({name:$,value:oe})}const N=p({data:_});return f.series.push(N),f},Zu=async(t=[])=>{var m,p,f;const i=((m=t==null?void 0:t.find(b=>b.key==="chartBaseConfig"))==null?void 0:m.contents)??{},r=((p=t==null?void 0:t.find(b=>b.key==="chartDataConfig"))==null?void 0:p.contents)??{},o=((f=t==null?void 0:t.find(b=>b.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:c}=i;let s={};return c==="line"&&(s=await Yu({chartBaseConfig:i,chartDataConfig:r,chartDetailConfig:o})),c==="bar"&&(s=await Gu({chartBaseConfig:i,chartDataConfig:r,chartDetailConfig:o})),c==="pie"&&(s=await Ju({chartBaseConfig:i,chartDataConfig:r,chartDetailConfig:o})),s},Qu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(t){const i=t,r=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;r.value=await Zu(c)});const o=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:o.value})},[e.createVNode(Hr.ssChart,{optionContents:r.value},null,8,["optionContents"])],4))}}),ed=zt._export_sfc(Qu,[["__scopeId","data-v-d4c081e8"]]),td={class:"chart-module layout"},ad={class:"chart-module content"},nd={class:"chart-module content"},od={class:"form-content"},ld={class:"dialog-footer"},rd={class:"form-content"},id={class:"dialog-footer"},sd={class:"form-content"},cd={class:"dialog-footer"},ud=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),s=e.ref([]),m=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],p=e.ref({}),f=()=>{var Q;s.value=m(),(Q=s.value)==null||Q.forEach(ee=>{var Se;const pe=ee==null?void 0:ee.prop;ee.value=(Se=p==null?void 0:p.value)==null?void 0:Se[pe]}),c.visible=!0},b=Q=>{p.value=Q},x=()=>{var Q;c.visible=!1,o("change",(Q=Ce())==null?void 0:Q.compData)},_=e.reactive({visible:!1,width:"840",title:"数据配置"}),N=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:[]}],$=e.ref({}),oe=()=>{const Q=N.value,ee=T.cloneDeep(Q);return ee==null||ee.forEach(pe=>{var Ge;const Se=pe==null?void 0:pe.prop;pe.value=(Ge=$.value)==null?void 0:Ge[Se]}),ee},P=Q=>{var pe;$.value=Q;const ee=oe();N.value=ee,o("change",(pe=Ce())==null?void 0:pe.compData)},L=async()=>{const Q=await Oe.getMenusContent(),ee=oe();ee==null||ee.forEach(pe=>{(pe==null?void 0:pe.prop)==="menu"&&(pe.contents=Q)}),N.value=ee,_.visible=!0,await Ke($.value.menu),await k($.value.group)},R=e.reactive({visible:!1,width:"840",title:"详情页配置"}),g=e.ref([]),v=()=>[{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:[]}],y=e.ref({}),C=()=>{const Q=g.value,ee=T.cloneDeep(Q);return ee==null||ee.forEach(pe=>{var Ge;const Se=pe==null?void 0:pe.prop;pe.value=(Ge=y.value)==null?void 0:Ge[Se]}),ee},S=Q=>{var pe;y.value=Q;const ee=C();g.value=ee,o("change",(pe=Ce())==null?void 0:pe.compData)},F=async()=>{await z();const Q=T.cloneDeep(Be.value),ee=C();ee==null||ee.forEach(pe=>{var Ge;const Se=pe==null?void 0:pe.prop;pe.value=(Ge=y==null?void 0:y.value)==null?void 0:Ge[Se],Se==="mainKey"&&(pe.contents=Q)}),g.value=ee,R.visible=!0},Be=e.ref([]),Je=e.ref([]),Ee=e.ref({}),Ie=e.ref({}),Ae=()=>{const{compData:Q}=ce.value||{},ee=Q==null?void 0:Q.find(Y=>{const{key:le}=Y;return le==="header"}),pe=(ee==null?void 0:ee.contents)||[],Se=pe==null?void 0:pe.filter((Y,le)=>{const{label:B}=Y;return B!=="操作"}),Ge=Se==null?void 0:Se.findIndex((Y,le)=>{const{isMainKey:B}=Y;return B});if(Ge<0)return[];const dt=Q==null?void 0:Q.find(Y=>{const{key:le}=Y;return le==="tableContents"}),w=(dt==null?void 0:dt.contents)||[];return w==null?void 0:w.map(Y=>{const le=Y==null?void 0:Y[0];let B=Ge;ct.isObject(le)&&(le!=null&&le.id)&&(B=B+1);const de=Y==null?void 0:Y[B];return{label:de,value:de}})},z=async()=>{const Q=await Ae();Be.value=Q},se=async Q=>{const ee=sessionStorage.getItem("systemKey");return await Oe.getItemData(Q,ee,"")},te=async Q=>{const ee=Q;Je.value=ee==null?void 0:ee.map(pe=>{const{name:Se}=pe;return Ee.value[Se]=pe,{label:Se,value:Se}})},ue=Q=>{const{comp:ee,compData:pe}=Ie.value||{};if(ee==="Table"){let Se=C();Se=Se.filter(Ge=>{const{prop:dt}=Ge;return dt!=="formItems"}),ae(Se,pe),g.value=Se}},Re=async()=>{var pe,Se;const Q=(pe=y==null?void 0:y.value)==null?void 0:pe.mainKey,ee=(Se=$==null?void 0:$.value)==null?void 0:Se.menu;if(Q){const dt=`${ee==null?void 0:ee.join("/")}^${Q}`,w=await se(dt);await te(w);const I=C();I==null||I.forEach(Y=>{(Y==null?void 0:Y.prop)==="group"&&(Y.contents=Je.value)}),g.value=I}};e.watch(()=>{var Q;return(Q=y==null?void 0:y.value)==null?void 0:Q.mainKey},async(Q,ee)=>{Q!=ee&&Q&&await Re()});const Qe=async Q=>{const ee=Ee.value[Q];Ie.value=ee,await ue()};e.watch(()=>{var Q;return(Q=y==null?void 0:y.value)==null?void 0:Q.group},async(Q,ee)=>{Q!=ee&&Q&&Qe(Q)});const Z=async()=>{var ee;await Re();const Q=(ee=y.value)==null?void 0:ee.group;await Qe(Q)},O=e.ref([]),W=e.ref({}),ce=e.ref({}),xe=async Q=>{const ee=Q==null?void 0:Q.join("/"),pe=sessionStorage.getItem("systemKey");return await Oe.getItemData(ee,pe,"")},ke=async Q=>{const ee=await xe(Q);O.value=ee==null?void 0:ee.map(pe=>{const{name:Se}=pe;return W.value[Se]=pe,{label:Se,value:Se}})},Ke=async(Q,ee)=>{await ke(Q);const pe=oe();pe==null||pe.forEach(Se=>{(Se==null?void 0:Se.prop)==="group"&&(Se.contents=O.value)}),N.value=pe};e.watch(()=>{var Q;return(Q=$==null?void 0:$.value)==null?void 0:Q.menu},async(Q,ee)=>{const pe=Q==null?void 0:Q.join("/"),Se=ee==null?void 0:ee.join("/");pe!=Se&&await Ke(Q)});const ae=(Q,ee)=>{const pe=ee==null?void 0:ee.find(w=>{const{key:I}=w;return I==="header"}),Se=(pe==null?void 0:pe.contents)||[],Ge=Se==null?void 0:Se.filter((w,I)=>{const{label:Y}=w;return Y!=="操作"}),dt=Ge==null?void 0:Ge.map((w,I)=>{const{label:Y}=w;return{label:Y,value:I}});Q==null||Q.forEach(w=>{const I=w==null?void 0:w.prop;(I==="nameCol"||I==="valueCol")&&(w.contents=dt)})},J=Q=>{const{comp:ee,compData:pe}=ce.value||{};if(ee==="Table"){$.value.formItems=[];let Se=oe();Se=Se.filter(Ge=>{const{prop:dt}=Ge;return dt!=="formItems"}),ae(Se,pe),N.value=Se}},k=async Q=>{const ee=W.value[Q];ce.value=ee,await J()};e.watch(()=>{var Q;return(Q=$==null?void 0:$.value)==null?void 0:Q.group},async(Q,ee)=>{Q!=ee&&k(Q)});const be=async()=>{var pe,Se;const Q=(pe=$.value)==null?void 0:pe.menu;await Ke(Q);const ee=(Se=$.value)==null?void 0:Se.group;await k(ee)},Ce=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:p.value},{key:"chartDataConfig",contents:$.value},{key:"chartDetailConfig",contents:y.value}]}),me=()=>{c.visible=!1,_.visible=!1,R.visible=!1};return e.onMounted(async()=>{var ee,pe,Se;N.value=q(),g.value=v();const Q=r==null?void 0:r.itemContents;p.value=((ee=Q==null?void 0:Q.find(Ge=>Ge.key==="chartBaseConfig"))==null?void 0:ee.contents)??{},$.value=((pe=Q==null?void 0:Q.find(Ge=>Ge.key==="chartDataConfig"))==null?void 0:pe.contents)??{},await be(),y.value=((Se=Q==null?void 0:Q.find(Ge=>Ge.key==="chartDetailConfig"))==null?void 0:Se.contents)??{},await Z()}),(Q,ee)=>{const pe=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",td,[ee[4]||(ee[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:ee[0]||(ee[0]=Se=>f())},{default:e.withCtx(()=>ee[3]||(ee[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",ad,[ee[6]||(ee[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:ee[1]||(ee[1]=Se=>L())},{default:e.withCtx(()=>ee[5]||(ee[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",nd,[ee[8]||(ee[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(pe,{id:"themeButton",onClick:ee[2]||(ee[2]=Se=>F())},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Gt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:me,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",od,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ld,[e.createVNode(pe,{class:"cancel-button button",onClick:me,id:"themeBorderButton"},{default:e.withCtx(()=>ee[9]||(ee[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(pe,{class:"ok-button button",onClick:x,id:"themeButton"},{default:e.withCtx(()=>ee[10]||(ee[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:me,width:_.width},{default:e.withCtx(()=>[e.createElementVNode("div",rd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:P},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",id,[e.createVNode(pe,{class:"cancel-button button",onClick:me,id:"themeBorderButton"},{default:e.withCtx(()=>ee[11]||(ee[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(pe,{class:"ok-button button",onClick:me,id:"themeButton"},{default:e.withCtx(()=>ee[12]||(ee[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Gt.ssDialog,{visible:R.visible,title:R.title,onBeforeDestroy:me,width:R.width},{default:e.withCtx(()=>[e.createElementVNode("div",sd,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",cd,[e.createVNode(pe,{class:"cancel-button button",onClick:me,id:"themeBorderButton"},{default:e.withCtx(()=>ee[13]||(ee[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(pe,{class:"ok-button button",onClick:me,id:"themeButton"},{default:e.withCtx(()=>ee[14]||(ee[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),dd=zt._export_sfc(ud,[["__scopeId","data-v-fe119645"]]),pd=(t,i)=>{let r;t.replaceAll(" ",`\r
|
|
2
|
+
`).replaceAll(`
|
|
3
|
+
`,`\r
|
|
4
|
+
`).includes(`\r
|
|
5
|
+
`)?r=t.replaceAll(`
|
|
6
|
+
`,`\r
|
|
7
|
+
`).replaceAll(" ",`\r
|
|
8
|
+
`).split(`\r
|
|
9
|
+
`).filter(s=>s.trim()!==""):r=t.replaceAll(" ",`\r
|
|
10
|
+
`).split(`
|
|
11
|
+
`).filter(s=>s.trim()!==""),r=r==null?void 0:r.map(s=>(s=s==null?void 0:s.replaceAll("\r",""),s));const o=[];let c="";for(const s of r)s.includes("{")||c.includes("{")||s.includes("[")||c.includes("[")||s.includes("【")||c.includes("【")||s.includes("(")||c.includes("(")||s.includes("(")||c.includes("(")||s.includes("/*")||c.includes("/*")?(c+=s.trim(),c.split("{").length-1===c.split("}").length-1&&c.split("【").length-1===c.split("】").length-1&&c.split("[").length-1===c.split("]").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("/*").length-1===c.split("*/").length-1&&!(i!=null&&i.find(m=>m===c[c.length-1]))?(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):c!=null&&c.includes("*/")&&(c=c.replace(/\/\*[\s\S]*?\*\//g,""))):i!=null&&i.find(m=>m===s[s.length-1])?c+=s.trim():o.push(s.trim().replace(/\/\*[\s\S]*?\*\//g,""));return o},Ut=(t,i)=>{let r=t;const o=[];let c="",s=0;for(const m of r)s++,m.includes("{")||c.includes("{")||m.includes("[")||c.includes("[")||m.includes("【")||c.includes("【")||m.includes("(")||c.includes("(")||m.includes("(")||c.includes("(")||m.includes("/*")||c.includes("/*")?(c+=m.trim(),c.split("{").length-1===c.split("}").length-1&&c.split("【").length-1===c.split("】").length-1&&c.split("[").length-1===c.split("]").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("(").length-1===c.split(")").length-1&&c.split("/*").length-1===c.split("*/").length-1&&c[c.length-1]===i?(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):s===(t==null?void 0:t.length)&&(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=m.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&o.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),o},fd=(t,i)=>t===i||t.length===i.length&&t.every((r,o)=>r===i[o]),hd=t=>t.reduce((i,r)=>{var c;const o=(((c=i.at(-1))==null?void 0:c.total)??0)+r;return i.push({key:r,total:o}),i},[]),vd=t=>{for(let i=t.length-1;i>0;i--){const r=Math.floor(Math.random()*(i+1));[t[i],t[r]]=[t[r],t[i]]}return t},md=t=>{let i=t;(i==null?void 0:i[0])==="("&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1))};let gt="$R",gd="[Any]";const yd=t=>{var m,p;let i={},r=t==null?void 0:t[0],o=(p=(m=r==null?void 0:r.replace("{",gt))==null?void 0:m.split(gt))==null?void 0:p[0];(o==null?void 0:o[0])==="*"&&(o=o==null?void 0:o.slice(1,o==null?void 0:o.length)),o=o==null?void 0:o.split(":"),i.group=o;let c=t==null?void 0:t[1],s=c==null?void 0:c.replaceAll(gd,"");return(s==null?void 0:s[0])==="$"&&(s=s==null?void 0:s.slice(1,s==null?void 0:s.length)),i.filter=s,i},bd=t=>{var b,x,_,N,q,$,oe,P,L;let i=[],r=[],o=t==null?void 0:t.map(R=>{var v;let g=(v=Ut(R,"@"))==null?void 0:v[0];return(g==null?void 0:g[(g==null?void 0:g.length)-1])==="@"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),g}),c=Ut(o==null?void 0:o[0],":");r=(b=c==null?void 0:c.filter(R=>!(R!=null&&R.includes("{"))&&!(R!=null&&R.includes("["))))==null?void 0:b.join(""),(r==null?void 0:r[(r==null?void 0:r.length)-1])===":"&&(r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1)),(r==null?void 0:r[0])==="*"&&(r=r==null?void 0:r.slice(1,r==null?void 0:r.length)),r=r==null?void 0:r.split(":");let s=c==null?void 0:c.filter(R=>(R==null?void 0:R.includes("{"))||(R==null?void 0:R.includes("["))),m=(_=s==null?void 0:s[0])==null?void 0:_.slice(1,((x=s==null?void 0:s[0])==null?void 0:x.length)-1);m=(N=Ut(m,","))==null?void 0:N.map(R=>((R==null?void 0:R[(R==null?void 0:R.length)-1])===","&&(R=R==null?void 0:R.slice(0,(R==null?void 0:R.length)-1)),R));let p="@"+((oe=($=(q=t==null?void 0:t[0])==null?void 0:q.replace("@",gt))==null?void 0:$.split(gt))==null?void 0:oe[1]);((P=Ut(p,":"))==null?void 0:P.length)>1&&(i=Zn((L=Ut(p,":"))==null?void 0:L[1]),i=[i]);let f=m==null?void 0:m.map((R,g)=>{var Be,Je,Ee,Ie,Ae,z,se,te,ue,Re,Qe,Z;let v=(Be=R==null?void 0:R.split("=="))==null?void 0:Be[0],y=(Je=R==null?void 0:R.split("=="))==null?void 0:Je[1],C=[],S=[],F=[];return(y==null?void 0:y[0])==="$"&&(y=y==null?void 0:y.slice(1,y==null?void 0:y.length),C=(Ie=(Ee=y==null?void 0:y.split("*"))==null?void 0:Ee[0])==null?void 0:Ie.split(":"),S=(Re=(ue=(te=(se=(z=(Ae=y==null?void 0:y.split("*"))==null?void 0:Ae[1])==null?void 0:z.replace("{",gt))==null?void 0:se.split(gt))==null?void 0:te[0])==null?void 0:ue.split(":"))==null?void 0:Re.filter(O=>O!==""),F=(Z=(Qe=y==null?void 0:y.replace("{",gt))==null?void 0:Qe.split(gt))==null?void 0:Z[1],F=F==null?void 0:F.replaceAll("}",""),F=F==null?void 0:F.split(":")),{prop:v,label:v,value:"",menuPath:C,groups:S,columns:F,width:m==null?void 0:m.length}});return{groupName:r,formContents:f,contents:i}},Zn=t=>{var o,c;let i=[],r=t.slice(1,(t==null?void 0:t.length)-1);if((r==null?void 0:r[0])!=="[")(o=Ut(r,","))==null||o.forEach(s=>{(s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s.slice(0,(s==null?void 0:s.length)-1)),i.push(s??"")});else{let s=[];(c=Ut(r,","))==null||c.forEach(m=>{(m==null?void 0:m[(m==null?void 0:m.length)-1])===","&&(m=m==null?void 0:m.slice(0,(m==null?void 0:m.length)-1)),s.push(Zn(m))}),i=s}return i},ho=(t,i)=>{var _,N,q,$,oe,P,L,R,g,v,y,C,S,F,Be,Je,Ee,Ie,Ae,z,se,te,ue,Re,Qe,Z,O,W,ce,xe,ke,Ke,ae;let r,o=[],c=[],s=[],m=[],p=[],f=[],b="Input",x;if(t!=null&&t.includes("@Pam")||t!=null&&t.includes("==")||t!=null&&t.includes("="))if(t!=null&&t.includes("@Pam")){r=(N=(_=t==null?void 0:t.replace("@Pam",gt))==null?void 0:_.split(gt))==null?void 0:N[0];let J=($=(q=t==null?void 0:t.replace("@Pam",gt))==null?void 0:q.split(gt))==null?void 0:$[1];J=J==null?void 0:J.slice(1,(J==null?void 0:J.length)-1),J=(oe=Ut(J,","))==null?void 0:oe.map(be=>(be="@"+be,be));let k=J==null?void 0:J.find(be=>be==null?void 0:be.includes("@Type"));k!=null&&k.includes("Upload")&&(b="Upload"),x=J==null?void 0:J.find(be=>be==null?void 0:be.includes("@IdentName")),x=x?(L=(P=x==null?void 0:x.replace("=",gt))==null?void 0:P.split(gt))==null?void 0:L[1]:r}else{if(r=(R=t==null?void 0:t.split("=="))==null?void 0:R[0],x=(g=t==null?void 0:t.split("=="))==null?void 0:g[0],t!=null&&t.includes("=")&&!(t!=null&&t.includes("==")))r=(v=t==null?void 0:t.split("="))==null?void 0:v[0],x=r,o=(S=(C=(y=t==null?void 0:t.split("="))==null?void 0:y[1])==null?void 0:C.split("/"))==null?void 0:S.map(J=>({label:J,value:J}));else if((Be=(F=t==null?void 0:t.split("=="))==null?void 0:F[1])!=null&&Be.includes("||")){let J=[];(Ie=(Ee=(Je=t==null?void 0:t.split("=="))==null?void 0:Je[1])==null?void 0:Ee.split("||"))==null||Ie.forEach(k=>{var be,Ce,me;c.push((Ce=(be=k==null?void 0:k.split("@Filter"))==null?void 0:be[0])==null?void 0:Ce.split("/")),J.push((me=k==null?void 0:k.split("@Filter"))==null?void 0:me[1])}),s=J==null?void 0:J.map(k=>(k=k==null?void 0:k.slice(1,(k==null?void 0:k.length)-1),k))}else{let J=(z=t==null?void 0:t.split("=="))==null?void 0:z[((Ae=t==null?void 0:t.split("=="))==null?void 0:Ae.length)-1];if(!(J!=null&&J.includes("&"))){let k=(se=J==null?void 0:J.replace("*",gt))==null?void 0:se.split(gt),be=(k==null?void 0:k[0])===""?i==null?void 0:i.value:k==null?void 0:k[0];be=be==null?void 0:be.replaceAll("[Any]",""),(be==null?void 0:be[0])==="$"&&(be=(te=be==null?void 0:be.slice(1,be==null?void 0:be.length))==null?void 0:te.replaceAll(":","/")),m=be==null?void 0:be.split("/");let Ce=(Re=(ue=k==null?void 0:k[1])==null?void 0:ue.replace("{",gt))==null?void 0:Re.split(gt),me=Ce==null?void 0:Ce[0];(me==null?void 0:me[(me==null?void 0:me.length)-1])===":"&&(me=me==null?void 0:me.slice(0,(me==null?void 0:me.length)-1)),p=me==null?void 0:me.split(":"),f=(W=(O=(Z=(Qe=Ce==null?void 0:Ce[1])==null?void 0:Qe.replace("}",gt))==null?void 0:Z.split(gt))==null?void 0:O[0])==null?void 0:W.split(":");let Q=(ke=(xe=(ce=Ce==null?void 0:Ce[1])==null?void 0:ce.replace("}",gt))==null?void 0:xe.split(gt))==null?void 0:ke[1];Q!==""&&md(Q)}}b="Select"}else r=t,x=t;return r!=null&&r.includes("@Pam")&&(r=(ae=(Ke=t==null?void 0:t.replace("@Pam",gt))==null?void 0:Ke.split(gt))==null?void 0:ae[0],x=r),{label:r,prop:x,options:o,allContents:c,filterContents:s,menus:m,groups:p,words:f,align:"center",formType:b}},vo=(t,i)=>{var o,c,s,m,p,f,b,x,_,N,q,$,oe,P,L,R,g;let r=[];if((t==null?void 0:t[0])==="{"&&(t==null?void 0:t[(t==null?void 0:t.length)-1])==="}"&&!((m=(s=(c=(o=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1))==null?void 0:o.replace(":",gt))==null?void 0:c.split(gt))==null?void 0:s[0])!=null&&m.includes(","))){let v=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1),y=(p=v==null?void 0:v.replace(":",gt))==null?void 0:p.split(gt);if(((f=Ut(y==null?void 0:y[1],"="))==null?void 0:f.length)===1){let C=y==null?void 0:y[0];r==null||r.push({label:C,prop:C,children:vo((x=y==null?void 0:y[1])==null?void 0:x.slice(1,((b=y==null?void 0:y[1])==null?void 0:b.length)-1),i),align:"center"})}else(L=(P=(oe=($=(q=(N=(_=v==null?void 0:v.replace("{",gt))==null?void 0:_.split(gt))==null?void 0:N[1])==null?void 0:q.replace("}",gt))==null?void 0:$.split(gt))==null?void 0:oe[0])==null?void 0:P.split(","))==null||L.forEach(C=>{r==null||r.push({label:C,prop:C,align:"center"})})}else if((t==null?void 0:t[0])==="{")(R=Ut(t,","))==null||R.forEach(v=>{var y,C,S,F,Be,Je,Ee,Ie,Ae,z,se;if((v==null?void 0:v[(v==null?void 0:v.length)-1])===","&&(v=v==null?void 0:v.slice(0,(v==null?void 0:v.length)-1)),(v==null?void 0:v[0])==="{"){let te=Ut(v,"="),ue=te==null?void 0:te[(te==null?void 0:te.length)-1],Re=[],Qe=[],Z=[],O=(y=ue==null?void 0:ue.replace("*",gt))==null?void 0:y.split(gt),W=(O==null?void 0:O[0])===""?i==null?void 0:i.value:O==null?void 0:O[0];W=W==null?void 0:W.replaceAll("[Any]",""),(W==null?void 0:W[0])==="$"&&(W=(C=W==null?void 0:W.slice(1,W==null?void 0:W.length))==null?void 0:C.replaceAll(":","/")),Re=W==null?void 0:W.split("/");let ce=(F=(S=O==null?void 0:O[1])==null?void 0:S.replace("{",gt))==null?void 0:F.split(gt),xe=ce==null?void 0:ce[0];(xe==null?void 0:xe[(xe==null?void 0:xe.length)-1])===":"&&(xe=xe==null?void 0:xe.slice(0,(xe==null?void 0:xe.length)-1)),Qe=xe==null?void 0:xe.split(":"),Z=(Ie=(Ee=(Je=(Be=ce==null?void 0:ce[1])==null?void 0:Be.replace("}",gt))==null?void 0:Je.split(gt))==null?void 0:Ee[0])==null?void 0:Ie.split(",");let ke=(z=te==null?void 0:te[0])==null?void 0:z.slice(1,((Ae=te==null?void 0:te[0])==null?void 0:Ae.length)-2);(se=ke==null?void 0:ke.split(","))==null||se.forEach((Ke,ae)=>{var J;r.push({label:Ke,prop:Ke,align:"center",menus:Re,groups:Qe,words:(J=Z==null?void 0:Z[ae])==null?void 0:J.split(":"),formType:(Re==null?void 0:Re.length)>0?"Select":"Input"})})}else r.push({label:v,prop:v,align:"center"})});else{let v=(g=Ut(t,","))==null?void 0:g.map(y=>((y==null?void 0:y[(y==null?void 0:y.length)-1])===","&&(y=y==null?void 0:y.slice(0,(y==null?void 0:y.length)-1)),y));v==null||v.forEach(y=>{r.push(ho(y,i))})}return r},kd=(t,i)=>{var m,p,f,b,x;let r=t;if(!t)return;let o="";((m=Ut(t,"}"))==null?void 0:m.length)>1&&(r=(p=Ut(t,"}"))==null?void 0:p[0],o=(f=Ut(t,"}"))==null?void 0:f[1]),(t==null?void 0:t[0])==="{"&&(t==null?void 0:t[(t==null?void 0:t.length)-1])==="}"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let c=[],s=[];return c.push({label:"排序",prop:"sort"}),(b=Ut(r,","))==null||b.forEach(_=>{var N;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(N=vo(_,i))==null||N.forEach(q=>{c.push(q)}):c.push(ho(_,i))}),o!==""&&((o==null?void 0:o[0])=="{"&&(o=o==null?void 0:o.slice(1,(o==null?void 0:o.length)-1)),(x=Ut(o,","))==null||x.forEach(_=>{var N;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(N=vo(_,i))==null||N.forEach(q=>{s.push(q)}):s.push(ho(_,i))})),{columns:c,secondColumns:s}},Lo=t=>{var i,r,o;if(t!=null&&t.includes("@Filter")||t!=null&&t.includes("@Condition"))return t;{let c=(r=(i=t==null?void 0:t.replace("(",gt))==null?void 0:i.split(gt))==null?void 0:r[1];return c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1),c=(o=Ut(c,","))==null?void 0:o.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),"@"+s)),c=c==null?void 0:c.join(","),t!=null&&t.includes("@Quote")&&(c!=null&&c.includes("@Type")||(c=c===""?c+"@Type:Manual":c+",@Type:Manual"),c!=null&&c.includes("@SonSync")||(c=c===""?c+"@SonSync:No":c+",@SonSync:No"),c!=null&&c.includes("@FatherSync")||(c=c===""?c+"@FatherSync:Yes":c+",@FatherSync:Yes")),c}},xd=(t,i,r="")=>{var q,$,oe,P,L,R,g,v,y,C,S,F,Be,Je,Ee,Ie,Ae,z,se,te,ue,Re,Qe,Z,O;let o=[];if(((q=t==null?void 0:t[0])==null?void 0:q[0])!=="*"&&(($=t==null?void 0:t[0])==null?void 0:$[0])!=="$")return;let c=Ut(t==null?void 0:t[0],":"),s=c==null?void 0:c.filter(W=>!((W==null?void 0:W[0])!=="{"&&(W==null?void 0:W[0])!=="["));o=(oe=c==null?void 0:c.filter(W=>(W==null?void 0:W[0])!=="{"&&(W==null?void 0:W[0])!=="["))==null?void 0:oe.join("");let m="",p="";(o==null?void 0:o[(o==null?void 0:o.length)-1])===":"&&(o=o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1)),o!=null&&o.includes("(@")&&(o==null?void 0:o[0])==="*"&&(m="(@"+((P=o==null?void 0:o.split("(@"))==null?void 0:P[1]),o=(L=o==null?void 0:o.split("(@"))==null?void 0:L[0]),o!=null&&o.includes("@")&&(o==null?void 0:o[0])==="*"&&(m="@"+((g=(R=o==null?void 0:o.replace("@",gt))==null?void 0:R.split(gt))==null?void 0:g[1]),o=(y=(v=o==null?void 0:o.replace("@",gt))==null?void 0:v.split(gt))==null?void 0:y[0]),(o==null?void 0:o[0])==="*"?(o=o==null?void 0:o.slice(1,o==null?void 0:o.length),o=o==null?void 0:o.split(":")):(p=T.cloneDeep(o)+":",o=[]),p=p+((s==null?void 0:s[0])??""),(p==null?void 0:p[(p==null?void 0:p.length)-1])===":"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1)),m!==""&&p!==""&&(p=p+m);let f=s==null?void 0:s[1];(p==null?void 0:p[0])==="["&&(f=T.cloneDeep(p)+(f??""),p="");let b=f?Zn(f):[];!(b!=null&&b.every(W=>Array.isArray(W)))&&(b==null?void 0:b.length)>0&&(b=[b]);let x=(C=Ut(p,"@"))!=null&&C[1]?"@"+((S=Ut(p,"@"))==null?void 0:S[1]):"";if(p=(F=Ut(p,"@"))==null?void 0:F[0],(p==null?void 0:p[0])==="$"&&(x=T.cloneDeep(p)+(x??""),p=""),r!==""&&(m!==""?x=(r==null?void 0:r[(r==null?void 0:r.length)-1])!==")"?r+m:(r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1))+","+m:x=r),x!==""){(x==null?void 0:x[0])==="$"&&(x=x==null?void 0:x.slice(1,x==null?void 0:x.length)),(x==null?void 0:x[(x==null?void 0:x.length)-1])===":"&&(x=x==null?void 0:x.slice(0,(x==null?void 0:x.length)-1));let W="";if(x!=null&&x.includes("(@")){W=(Je=(Be=x==null?void 0:x.replace("(@",gt))==null?void 0:Be.split(gt))==null?void 0:Je[0];let ce=(Ie=(Ee=x==null?void 0:x.replace("(@",gt))==null?void 0:Ee.split(gt))==null?void 0:Ie[1];ce="@"+(ce==null?void 0:ce.slice(0,(ce==null?void 0:ce.length)-1));let xe=(Ae=Ut(ce,","))==null?void 0:Ae.map(ke=>((ke==null?void 0:ke[(ke==null?void 0:ke.length)-1])===","&&(ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1)),Lo(ke)));x=W+"("+(xe==null?void 0:xe.join(","))+")"}else{W=(se=(z=x==null?void 0:x.replace("@",gt))==null?void 0:z.split(gt))==null?void 0:se[0];let ce=(ue=(te=x==null?void 0:x.replace("@",gt))==null?void 0:te.split(gt))==null?void 0:ue[1];if(ce){ce="@"+ce;let xe=(Re=Ut(ce,","))==null?void 0:Re.map(ke=>Lo(ke));x=W+"("+(xe==null?void 0:xe.join(","))+")"}else x=W}}(p==null?void 0:p[(p==null?void 0:p.length)-1])==="@"&&(p=p==null?void 0:p.slice(0,(p==null?void 0:p.length)-1));let _=kd(p,i),N=p===""?[]:(_==null?void 0:_.columns)??[];return N!=null&&N.some(W=>{var ce;return Array.isArray(W==null?void 0:W.children)&&((ce=W==null?void 0:W.children)==null?void 0:ce.length)>0})&&(N=[N]),(b==null?void 0:b.length)>0&&(Array.isArray(b==null?void 0:b[0])&&((Qe=b==null?void 0:b[0])!=null&&Qe.every(W=>Array.isArray(W)))?b=b==null?void 0:b.map((W,ce)=>(W=W.map((xe,ke)=>(xe.unshift((ke+1).toString()),xe)),W)):b=b==null?void 0:b.map((W,ce)=>(W.unshift((ce+1).toString()),W))),_!=null&&_.secondColumns&&((Z=_==null?void 0:_.secondColumns)==null?void 0:Z.length)>0&&((b==null?void 0:b.length)>0?b=b==null?void 0:b.map((W,ce)=>{var xe,ke;return Array.isArray(W==null?void 0:W[0])?W=W==null?void 0:W.map((Ke,ae)=>{var J,k;return Ke.unshift((k=(J=_==null?void 0:_.secondColumns)==null?void 0:J[ae])==null?void 0:k.prop),Ke}):W.unshift((ke=(xe=_==null?void 0:_.secondColumns)==null?void 0:xe[ce])==null?void 0:ke.prop),W}):b=(O=_==null?void 0:_.secondColumns)==null?void 0:O.map((W,ce)=>(W=[W==null?void 0:W.label],W.push(ce),W)),N.unshift({label:"",prop:"disabled",sortable:!1})),{groupName:o,tableColumns:N,tableFilter:x,tableContents:b,columns:(_==null?void 0:_.secondColumns)??[]}};let Ht="$R";const mn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MultiLead",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@Condition",value:"onConditionContent",order:1}],wd=t=>{var r;return(t==null?void 0:t.filter.toUpperCase())==="ALL"||(t==null?void 0:t.filter.toUpperCase())==="NONE"?t==null?void 0:t.contents:(r=t==null?void 0:t.contents)==null?void 0:r.map(o=>{var c;return(o==null?void 0:o.key)==="tableContents"&&(o.contents=(c=o.contents)==null?void 0:c.slice(0,parseInt(t==null?void 0:t.filter))),o})},Dd=t=>{var i;return(t==null?void 0:t.filter)==="Random"?(i=t==null?void 0:t.contents)==null?void 0:i.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=vd(o.contents)),o)):((t==null?void 0:t.filter)==="Ordin"&&(t==null?void 0:t.contents).push({key:"enableWrap",contents:!0}),t==null?void 0:t.contents)},_d=t=>{var o,c,s,m;let i=t==null?void 0:t.filter;if(i!=null&&i.includes("*")&&(i="({"+((c=(o=i==null?void 0:i.replace("{",Ht))==null?void 0:o.split(Ht))==null?void 0:c[1])),i=(s=i==null?void 0:i.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(i==null?void 0:i[0])!=="("&&(i="("+i+")"),i.slice(1,(i==null?void 0:i.length)-1)==="undefined")return t==null?void 0:t.contents;let r=Oe.calculatorAndToOr(i);if((r==null?void 0:r.length)>0){let p=[];return r==null||r.forEach(b=>{let x={};for(let _ in b){let N=_;N!=null&&N.includes("[")||(x[N]=b[_])}p.push(x)}),(m=t==null?void 0:t.contents)==null?void 0:m.map(b=>{var _,N,q;let x=(N=(_=t==null?void 0:t.contents)==null?void 0:_.find($=>($==null?void 0:$.key)==="header"))==null?void 0:N.contents;if(x=(q=Oe.getEqualChild(x))==null?void 0:q.filter($=>($==null?void 0:$.label)!=="操作"),(b==null?void 0:b.key)==="tableContents"){let oe=Oe.tableToForm(b==null?void 0:b.contents,x);p==null||p.forEach(P=>{var L,R;for(let g in P)!((L=oe==null?void 0:oe[0])!=null&&L.find(v=>{var y;return(v==null?void 0:v.key)===g||((y=v==null?void 0:v.key)==null?void 0:y.includes(g))}))&&!(oe!=null&&oe.find(v=>{var y;return(v==null?void 0:v.key)===g||((y=v==null?void 0:v.key)==null?void 0:y.includes(g))}))||(((R=P[g])==null?void 0:R[0])!=="!"?oe=oe==null?void 0:oe.filter(v=>{var y,C;return((y=v==null?void 0:v.find(S=>{var F;return(S==null?void 0:S.key)===g||((F=S==null?void 0:S.key)==null?void 0:F.includes(g))}))==null?void 0:y.value)===P[g]&&!Array.isArray(P==null?void 0:P[g])||Array.isArray(P==null?void 0:P[g])&&((C=P==null?void 0:P[g])==null?void 0:C.find(S=>{var F;return((F=v==null?void 0:v.find(Be=>{var Je;return(Be==null?void 0:Be.key)===g||((Je=Be==null?void 0:Be.key)==null?void 0:Je.includes(g))}))==null?void 0:F.value)===S}))}):oe=oe==null?void 0:oe.filter(v=>{var y;return((y=v==null?void 0:v.find(C=>{var S;return(C==null?void 0:C.key)===g||((S=C==null?void 0:C.key)==null?void 0:S.includes(g))}))==null?void 0:y.value)!==P[g]}))}),(oe==null?void 0:oe.length)===0?b.contents=[]:b.contents=oe==null?void 0:oe.map(P=>{let L={};return P==null||P.forEach(R=>{L[R==null?void 0:R.key]=R==null?void 0:R.value}),L})}return b})}return t==null?void 0:t.contents},Ed=t=>t==null?void 0:t.contents,Cd=t=>t==null?void 0:t.contents,Sd=t=>t==null?void 0:t.contents,Td=t=>{var r;let i=(t==null?void 0:t.filter)??"";return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i!==""?(r=t==null?void 0:t.contents)==null?void 0:r.map(c=>{var s;return(c==null?void 0:c.key)==="extraButton"&&(c.contents=(s=i==null?void 0:i.split(","))==null?void 0:s.map(m=>({label:m,prop:m}))),c}):t==null?void 0:t.contents},Bd=t=>t==null?void 0:t.contents,Id=t=>{var r;let i=(t==null?void 0:t.filter)??"";return(i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i!==""?(r=t==null?void 0:t.contents)==null?void 0:r.map(c=>{var s;return(c==null?void 0:c.key)==="rowButton"&&(c.contents=(s=i==null?void 0:i.split(","))==null?void 0:s.map(m=>({label:m,prop:m}))),c}):t==null?void 0:t.contents},Nd=t=>{var r;let i=(t==null?void 0:t.filter)??"";if((i==null?void 0:i[0])==="{"&&(i=i==null?void 0:i.slice(1,(i==null?void 0:i.length)-1)),i!==""){let o=t==null?void 0:t.contents,c=(r=i==null?void 0:i.split(","))==null?void 0:r.map(s=>({label:s,prop:s}));return o.push({key:"bottomButton",contents:c}),o}return t==null?void 0:t.contents},Ad=t=>{var i,r,o,c;if(((i=t==null?void 0:t.filter)==null?void 0:i[0])!=="[")return(r=t==null?void 0:t.contents)==null?void 0:r.map(m=>{var p;return(m==null?void 0:m.key)==="formContent"&&(m.contents=(p=m.contents)==null?void 0:p.map(f=>(f.width=parseInt(t==null?void 0:t.filter),f))),m});if(((o=t==null?void 0:t.filter)==null?void 0:o[0])==="["){let s=Zn(t==null?void 0:t.filter),m=s==null?void 0:s.map(f=>parseInt(f));return m=hd(m),(c=t==null?void 0:t.contents)==null?void 0:c.map((f,b)=>{var x;return(f==null?void 0:f.key)==="formContent"&&(f.contents=(x=f.contents)==null?void 0:x.map(_=>{var N;return _.width=(N=m==null?void 0:m.find(q=>(q==null?void 0:q.total)>b+1))==null?void 0:N.key,_})),f})}return t==null?void 0:t.contents},Vd=t=>{var i;if((t==null?void 0:t.filter)!==""){let r=t==null?void 0:t.filter;return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r=r==null?void 0:r.split(","),(i=t==null?void 0:t.contents)==null?void 0:i.map(c=>{var s,m,p;return(c==null?void 0:c.key)==="header"&&(Array.isArray((s=c==null?void 0:c.contents)==null?void 0:s[0])?c.contents[0]=(p=c.contents[0])==null?void 0:p.map(f=>(r!=null&&r.find(b=>b===(f==null?void 0:f.prop))&&(f.fixed="left"),f)):c.contents=(m=c.contents)==null?void 0:m.map(f=>(r!=null&&r.find(b=>b===(f==null?void 0:f.prop))&&(f.fixed="left"),f))),c})}return t==null?void 0:t.contents},Od=async t=>{var o,c,s,m,p,f,b,x,_,N,q;const i=Oe.useUnit(T.pinia),{chooseTitle:r}=T.storeToRefs(i);if((t==null?void 0:t.filter)==="true"){let $=await sn((c=(o=r==null?void 0:r.value)==null?void 0:o[0])==null?void 0:c.parentContent,!1),oe=(m=(s=r==null?void 0:r.value)==null?void 0:s[0])==null?void 0:m.value;$=(p=$==null?void 0:$[0])==null?void 0:p.compData;let P=(f=$==null?void 0:$.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:f.contents;P=((b=P==null?void 0:P.find(g=>g==null?void 0:g.isMainKey))==null?void 0:b.prop)??((x=P==null?void 0:P[0])==null?void 0:x.prop);let L=(N=(_=$==null?void 0:$.find(g=>(g==null?void 0:g.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:N.find(g=>(g==null?void 0:g[P])===oe);return(q=t==null?void 0:t.contents)==null?void 0:q.map(g=>{var v;return(g==null?void 0:g.key)==="formContent"&&(g.contents=(v=g.contents)==null?void 0:v.map(y=>(y.value=L==null?void 0:L[y==null?void 0:y.prop],y))),g})}return t==null?void 0:t.contents},Md=t=>{var i,r,o,c,s;if((i=t==null?void 0:t.extra)!=null&&i.row){let m=t==null?void 0:t.filter;if(m!=null&&m.includes("*")&&(m="({"+((o=(r=m==null?void 0:m.replace("{",Ht))==null?void 0:r.split(Ht))==null?void 0:o[1])),m=(c=m==null?void 0:m.replaceAll("{",""))==null?void 0:c.replaceAll("}",""),(m==null?void 0:m[0])!=="("&&(m="("+m+")"),m.slice(1,(m==null?void 0:m.length)-1)==="undefined")return t==null?void 0:t.contents;let p=Oe.calculatorAndToOr(m),f=p==null?void 0:p[0],b=(s=t==null?void 0:t.extra)==null?void 0:s.row,x=[];for(let _ in f)(f==null?void 0:f[_])===(b==null?void 0:b[_])?x.push(!0):x.push(!1);return x!=null&&x.every(_=>_===!0)?t==null?void 0:t.contents:[]}else return t==null?void 0:t.contents},Nl={onNumSlice:wd,onRandomContents:Dd,onConditionContents:_d,onFatherPaceContents:Ed,onPaceContents:Cd,onMainTagContents:Sd,onButtonContents:Td,onPamButtonContents:Bd,onRowButtonContents:Id,onRelated:Od,onRowNum:Ad,onFixRow:Vd,onBottomButtonContents:Nd,onConditionContent:Md},zd=async(t,i)=>{var s,m,p,f,b,x,_,N,q,$,oe,P,L,R,g,v,y,C,S;let r="";if(((s=t==null?void 0:t.find(F=>(F==null?void 0:F.key)==="filter"))==null?void 0:s.contents)!==""&&(r=(m=t==null?void 0:t.find(F=>(F==null?void 0:F.key)==="filter"))==null?void 0:m.contents),r===""||!r)return t;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(f=(p=r==null?void 0:r.replace("(",Ht))==null?void 0:p.split(Ht))==null?void 0:f[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(b=Ut(r,","))==null?void 0:b.map(F=>((F==null?void 0:F[(F==null?void 0:F.length)-1])===","&&(F=F==null?void 0:F.slice(0,(F==null?void 0:F.length)-1)),F!=null&&F.includes("(")||(F=F==null?void 0:F.replaceAll(":","=")),F)),c=t;for(let F in o){let Be,Je="";(x=o==null?void 0:o[F])!=null&&x.includes("(")?(Be=(q=(N=(_=o==null?void 0:o[F])==null?void 0:_.replace("(",Ht))==null?void 0:N.split(Ht))==null?void 0:q[0],Je="("+((P=(oe=($=o==null?void 0:o[F])==null?void 0:$.replace("(",Ht))==null?void 0:oe.split(Ht))==null?void 0:P[1])):(Be=(g=(R=(L=o==null?void 0:o[F])==null?void 0:L.replace("=",Ht))==null?void 0:R.split(Ht))==null?void 0:g[0],Je=(C=(y=(v=o==null?void 0:o[F])==null?void 0:v.replace("=",Ht))==null?void 0:y.split(Ht))==null?void 0:C[1]);let Ee=(S=mn==null?void 0:mn.find(Ie=>(Ie==null?void 0:Ie.key)===Be))==null?void 0:S.value;if(Ee){const Ie=Nl[Ee];c=await Ie({contents:c,filter:Je})}}return c},Rd=async(t,i)=>{var s,m,p,f,b,x,_,N,q,$,oe,P,L,R,g,v,y,C,S;let r="";if(((s=t==null?void 0:t.find(F=>(F==null?void 0:F.key)==="filter"))==null?void 0:s.contents)!==""&&(r=(m=t==null?void 0:t.find(F=>(F==null?void 0:F.key)==="filter"))==null?void 0:m.contents),r===""||!r)return t;(r==null?void 0:r[0])==="("?r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1):(r=(f=(p=r==null?void 0:r.replace("(",Ht))==null?void 0:p.split(Ht))==null?void 0:f[1],r=r==null?void 0:r.slice(0,(r==null?void 0:r.length)-1));let o=(b=Ut(r,","))==null?void 0:b.map(F=>((F==null?void 0:F[(F==null?void 0:F.length)-1])===","&&(F=F==null?void 0:F.slice(0,(F==null?void 0:F.length)-1)),F!=null&&F.includes("(")||(F=F==null?void 0:F.replaceAll(":","=")),F)),c=t;for(let F in o){let Be,Je="";(x=o==null?void 0:o[F])!=null&&x.includes("(")?(Be=(q=(N=(_=o==null?void 0:o[F])==null?void 0:_.replace("(",Ht))==null?void 0:N.split(Ht))==null?void 0:q[0],Je="("+((P=(oe=($=o==null?void 0:o[F])==null?void 0:$.replace("(",Ht))==null?void 0:oe.split(Ht))==null?void 0:P[1])):(Be=(g=(R=(L=o==null?void 0:o[F])==null?void 0:L.replace("=",Ht))==null?void 0:R.split(Ht))==null?void 0:g[0],Je=(C=(y=(v=o==null?void 0:o[F])==null?void 0:v.replace("=",Ht))==null?void 0:y.split(Ht))==null?void 0:C[1]);let Ee=(S=mn==null?void 0:mn.find(Ie=>(Ie==null?void 0:Ie.key)===Be))==null?void 0:S.value;if(Ee){const Ie=Nl[Ee];c=await Ie({contents:c,filter:Je,extra:i})}}return c};let oo=["新增","导入","导出"],lo=["查看","编辑","复制新增","删除"],ro=["导入","导出"],io=["查看","编辑"];const Fo=async(t,i)=>{const r=T.useMenuState(T.pinia);T.storeToRefs(r);let o=[],c=t==null?void 0:t.map(async s=>{var x,_,N,q,$,oe,P,L,R,g,v,y,C,S,F,Be,Je,Ee,Ie,Ae,z,se,te,ue,Re,Qe,Z,O,W,ce,xe,ke,Ke,ae;let m=(q=(N=(_=(x=s==null?void 0:s.contents)==null?void 0:x.find(J=>{var k;return(k=J==null?void 0:J.key)==null?void 0:k.includes("struct")}))==null?void 0:_.value)==null?void 0:N[0])==null?void 0:q.类型,p=Object.values(s==null?void 0:s.name);p=p==null?void 0:p.reverse();let f=($=s==null?void 0:s.contents)==null?void 0:$.map(J=>J==null?void 0:J.key),b={comp:m,isShow:s==null?void 0:s.is_show,name:p==null?void 0:p[0],id:s==null?void 0:s.object_id,relatedTables:f};for(let J in p)parseInt(J)>=1&&(b[`name${parseInt(J)-1}`]=p[J]);if(m==="Table"){let J=(oe=s==null?void 0:s.contents)==null?void 0:oe.find(Q=>{var ee;return(ee=Q==null?void 0:Q.key)==null?void 0:ee.includes("content")}),k=[];J.value=(P=J==null?void 0:J.value)==null?void 0:P.sort((Q,ee)=>parseInt(Q==null?void 0:Q.id)-parseInt(ee==null?void 0:ee.id)),k.push({key:"tableContents",contents:J==null?void 0:J.value});let be=(y=(v=(g=(R=(L=s==null?void 0:s.contents)==null?void 0:L.find(Q=>{var ee;return(ee=Q==null?void 0:Q.key)==null?void 0:ee.includes("struct")}))==null?void 0:R.value)==null?void 0:g[0])==null?void 0:v.结构)==null?void 0:y.contents;Array.isArray(be==null?void 0:be[0])?be[0]=(C=be==null?void 0:be[0])==null?void 0:C.filter(Q=>(Q==null?void 0:Q.prop)!=="sort"):be=be==null?void 0:be.filter(Q=>(Q==null?void 0:Q.prop)!=="sort"),k.push({key:"header",contents:be}),k.push({key:"filter",contents:(Ee=(Je=(Be=(F=(S=s==null?void 0:s.contents)==null?void 0:S.find(Q=>{var ee;return(ee=Q==null?void 0:Q.key)==null?void 0:ee.includes("struct")}))==null?void 0:F.value)==null?void 0:Be[0])==null?void 0:Je.引用)==null?void 0:Ee.contents});let Ce=oo==null?void 0:oo.map(Q=>({label:Q})),me=lo==null?void 0:lo.map(Q=>({label:Q}));!Array.isArray(be==null?void 0:be[0])&&((Ie=be==null?void 0:be[0])==null?void 0:Ie.prop)==="disabled"&&(Ce=ro==null?void 0:ro.map(Q=>({label:Q})),me=io==null?void 0:io.map(Q=>({label:Q}))),k.push({key:"extraButton",contents:Ce}),k.push({key:"rowButton",contents:me}),b.compData=await Rd(k,i)}else if(m==="Form"){let J=[],k=(se=(z=(Ae=s==null?void 0:s.contents)==null?void 0:Ae.find(Ce=>{var me;return(me=Ce==null?void 0:Ce.key)==null?void 0:me.includes("content")}))==null?void 0:z.value)==null?void 0:se[0],be=(W=(O=(Z=(Qe=(Re=(ue=(te=s==null?void 0:s.contents)==null?void 0:te.find(Ce=>{var me;return(me=Ce==null?void 0:Ce.key)==null?void 0:me.includes("struct")}))==null?void 0:ue.value)==null?void 0:Re[0])==null?void 0:Qe.结构)==null?void 0:Z.contents)==null?void 0:O.map(Ce=>(Ce.value=k==null?void 0:k[Ce==null?void 0:Ce.prop],Ce)))==null?void 0:W.filter(Ce=>(Ce==null?void 0:Ce.prop)!=="sort");J.push({key:"filter",contents:(ae=(Ke=(ke=(xe=(ce=s==null?void 0:s.contents)==null?void 0:ce.find(Ce=>{var me;return(me=Ce==null?void 0:Ce.key)==null?void 0:me.includes("struct")}))==null?void 0:xe.value)==null?void 0:ke[0])==null?void 0:Ke.引用)==null?void 0:ae.contents}),J.push({key:"formContent",contents:be}),b.compData=await zd(J)}return b});return o=await Promise.all(c),o=o==null?void 0:o.filter(s=>{var m;return((m=s==null?void 0:s.compData)==null?void 0:m.length)>0}),o},Pd=T.useLoginState(T.pinia),{loginUserInfo:sa}=T.storeToRefs(Pd),$d=T.useMenuState(T.pinia),{activeMenuPath:jo,currentMenuPath:Ld}=T.storeToRefs($d),Al=Oe.useUnit(T.pinia),{selectTitle:so}=T.storeToRefs(Al),Fd=async(t,i)=>{var m,p,f,b,x,_,N,q,$,oe,P,L,R;let r=jo.value,o="",c=((m=so==null?void 0:so.value)==null?void 0:m.find(g=>(g==null?void 0:g.condition)==="child"&&!(g!=null&&g.relatedContent)))??void 0;(t==null?void 0:t.length)===0||(r=i?r:(p=t==null?void 0:t[0])==null?void 0:p.object_name,o=(f=t==null?void 0:t[0])==null?void 0:f.father_name);let s=[];if(o!==""){let g=o;(g==null?void 0:g[(g==null?void 0:g.length)-1])==="/"&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1));let v=await sn(g,!1);v=(b=v==null?void 0:v[0])==null?void 0:b.compData;let y=(x=v==null?void 0:v.find(S=>(S==null?void 0:S.key)==="header"))==null?void 0:x.contents;y=((_=y==null?void 0:y.find(S=>S==null?void 0:S.isMainKey))==null?void 0:_.prop)??((N=y==null?void 0:y[0])==null?void 0:N.prop);let C=($=(q=v==null?void 0:v.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:q.contents)==null?void 0:$.map(S=>({label:S==null?void 0:S[y],value:S==null?void 0:S[y]}));s=(oe=o==null?void 0:o.split("/"))==null?void 0:oe.map(S=>(S===""?c?(c.isShow=!0,S=c):S={value:S,condition:"child",options:C,parentContent:(o==null?void 0:o[(o==null?void 0:o.length)-1])==="/"?o==null?void 0:o.slice(0,(o==null?void 0:o.length)-1):o,isShow:!0}:S={condition:"parent",value:S.trim(),isShow:!0},S))}if(r!==""){let g=(P=r==null?void 0:r.split("/"))==null?void 0:P.map(v=>(v={condition:"normal",value:v.trim(),isShow:!0},v));((L=g==null?void 0:g[0])==null?void 0:L.value)===((R=s==null?void 0:s[0])==null?void 0:R.value)&&(g=g==null?void 0:g.filter((v,y)=>y!==0)),s=[...s,...g??[]]}o===""&&c&&((c==null?void 0:c.parentContent)!==jo.value&&(c.isShow=!1),(c==null?void 0:c.value)!==""&&s.push(c)),Al.setSelectTitle(s)},jd=async t=>{var c,s;let i=await Ba.getPageDataApi({platId:parseInt((c=sa==null?void 0:sa.value)==null?void 0:c.plat_id),pageName:"menu"}),r=(s=i==null?void 0:i.data)==null?void 0:s.result,o=r==null?void 0:r.filter(m=>(m==null?void 0:m.object_name)===Ld.value+"/");return(o==null?void 0:o.length)>0&&(t=t==null?void 0:t.map(m=>{var p;return(m==null?void 0:m.comp)==="Table"&&(m.compData=(p=m==null?void 0:m.compData)==null?void 0:p.map(f=>{var b;return(f==null?void 0:f.key)==="header"&&(f.contents=(b=f.contents)==null?void 0:b.map((x,_)=>(_===0&&(x.isExistChild=!0),x))),f})),m})),t},sn=async(t,i,r={})=>{var m,p,f,b,x,_,N,q,$,oe,P,L;let o=await Ba.getPageDataApi({platId:parseInt((m=sa==null?void 0:sa.value)==null?void 0:m.plat_id),pageName:t}),c=(p=o==null?void 0:o.data)==null?void 0:p.result;if((c==null?void 0:c.length)===0&&(r!=null&&r.originPath)&&(r==null?void 0:r.originPath)!==t){let R=await Ba.getPageDataApi({platId:parseInt((f=sa==null?void 0:sa.value)==null?void 0:f.plat_id),pageName:r==null?void 0:r.originPath});if(((x=(b=R==null?void 0:R.data)==null?void 0:b.result)==null?void 0:x.length)>0){let g=await Fo((_=R==null?void 0:R.data)==null?void 0:_.result,r);g=g==null?void 0:g.map(C=>{var Be,Je,Ee,Ie,Ae,z,se,te,ue,Re,Qe,Z,O,W,ce,xe,ke,Ke;let S=[],F=(Be=Object.keys(C))==null?void 0:Be.filter(ae=>ae==null?void 0:ae.includes("name"));for(let ae in C)F!=null&&F.find(J=>J===ae)&&S.push(C==null?void 0:C[ae]);if(S=S.reverse(),(C==null?void 0:C.comp)==="Table"){let ae=(Ie=(Ee=(Je=C==null?void 0:C.compData)==null?void 0:Je.find(k=>(k==null?void 0:k.key)==="tableContents"))==null?void 0:Ee.contents)==null?void 0:Ie.map(k=>{let be={};for(let Ce in k)Ce!=="id"&&(be[Ce]=k==null?void 0:k[Ce]);return k=Object.values(be),k}),J=(z=(Ae=C==null?void 0:C.compData)==null?void 0:Ae.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:z.contents;Array.isArray(J==null?void 0:J[0])?(J[0].unshift({label:"排序",prop:"sort"}),(se=J[0])!=null&&se.find(k=>(k==null?void 0:k.prop)==="disabled")&&(J[0]=(te=J[0])==null?void 0:te.filter(k=>(k==null?void 0:k.prop)!=="disabled"),J[0].unshift({label:"",prop:"disabled",sortable:!1}))):(J.unshift({label:"排序",prop:"sort"}),J!=null&&J.find(k=>(k==null?void 0:k.prop)==="disabled")&&(J=J==null?void 0:J.filter(k=>(k==null?void 0:k.prop)!=="disabled"),J.unshift({label:"",prop:"disabled",sortable:!1}))),C={filter:(Re=(ue=C==null?void 0:C.compData)==null?void 0:ue.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:Re.contents,key:C==null?void 0:C.comp,name:S,tableColumns:J,tableContents:ae}}else{let ae=(O=(Z=(Qe=C==null?void 0:C.compData)==null?void 0:Qe.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:Z.contents)==null?void 0:O.map(k=>(k==null?void 0:k.value)??"");ae=[ae];let J=(xe=(ce=(W=C==null?void 0:C.compData)==null?void 0:W.find(k=>(k==null?void 0:k.key)==="formContent"))==null?void 0:ce.contents)==null?void 0:xe.map(k=>(k.value="",k));C={contents:ae,filter:(Ke=(ke=C==null?void 0:C.compData)==null?void 0:ke.find(k=>(k==null?void 0:k.key)==="filter"))==null?void 0:Ke.contents,key:C==null?void 0:C.comp,name:S,value:J}}return C.isShow=!1,C});let v=[{key:"menuPath",contents:[{path:t,fatherPath:($=(q=(N=R==null?void 0:R.data)==null?void 0:N.result)==null?void 0:q[0])==null?void 0:$.father_name,isShow:!1}]},{key:t,contents:g}];await Ba.createPlatFormDataApi({platId:parseInt((oe=sa==null?void 0:sa.value)==null?void 0:oe.plat_id),changeData:v});let y=await Ba.getPageDataApi({platId:parseInt((P=sa==null?void 0:sa.value)==null?void 0:P.plat_id),pageName:t});c=(L=y==null?void 0:y.data)==null?void 0:L.result}}i&&await Fd(c,!!(r!=null&&r.originPath));let s=await Fo(c,r);return i&&(s=await jd(s)),s};var jn={exports:{}},Ud=jn.exports,Uo;function Kd(){return Uo||(Uo=1,function(t,i){(function(r,o){o()})(Ud,function(){function r(b,x){return typeof x>"u"?x={autoBom:!1}:typeof x!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),x={autoBom:!x}),x.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.type)?new Blob(["\uFEFF",b],{type:b.type}):b}function o(b,x,_){var N=new XMLHttpRequest;N.open("GET",b),N.responseType="blob",N.onload=function(){f(N.response,x,_)},N.onerror=function(){console.error("could not download file")},N.send()}function c(b){var x=new XMLHttpRequest;x.open("HEAD",b,!1);try{x.send()}catch{}return 200<=x.status&&299>=x.status}function s(b){try{b.dispatchEvent(new MouseEvent("click"))}catch{var x=document.createEvent("MouseEvents");x.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),b.dispatchEvent(x)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Oe.commonjsGlobal=="object"&&Oe.commonjsGlobal.global===Oe.commonjsGlobal?Oe.commonjsGlobal:void 0,p=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!p?function(b,x,_){var N=m.URL||m.webkitURL,q=document.createElement("a");x=x||b.name||"download",q.download=x,q.rel="noopener",typeof b=="string"?(q.href=b,q.origin===location.origin?s(q):c(q.href)?o(b,x,_):s(q,q.target="_blank")):(q.href=N.createObjectURL(b),setTimeout(function(){N.revokeObjectURL(q.href)},4e4),setTimeout(function(){s(q)},0))}:"msSaveOrOpenBlob"in navigator?function(b,x,_){if(x=x||b.name||"download",typeof b!="string")navigator.msSaveOrOpenBlob(r(b,_),x);else if(c(b))o(b,x,_);else{var N=document.createElement("a");N.href=b,N.target="_blank",setTimeout(function(){s(N)})}}:function(b,x,_,N){if(N=N||open("","_blank"),N&&(N.document.title=N.document.body.innerText="downloading..."),typeof b=="string")return o(b,x,_);var q=b.type==="application/octet-stream",$=/constructor/i.test(m.HTMLElement)||m.safari,oe=/CriOS\/[\d]+/.test(navigator.userAgent);if((oe||q&&$||p)&&typeof FileReader<"u"){var P=new FileReader;P.onloadend=function(){var g=P.result;g=oe?g:g.replace(/^data:[^;]*;/,"data:attachment/file;"),N?N.location.href=g:location=g,N=null},P.readAsDataURL(b)}else{var L=m.URL||m.webkitURL,R=L.createObjectURL(b);N?N.location=R:location.href=R,N=null,setTimeout(function(){L.revokeObjectURL(R)},4e4)}});m.saveAs=f.saveAs=f,t.exports=f})}(jn)),jn.exports}Kd();const qn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DFEHKFcd.cjs")).then(t=>t.index));qn.install=t=>{t.component("ssMenu",qn)};const Vl={__name:"index",props:{name:String},setup(t){const i=t,r=e.computed(()=>ct.ElIcons[i.name]);return e.onMounted(()=>{}),(o,c)=>{const s=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(s,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value)))]),_:1})}}},Ol=(t,i,r=0)=>{let o=t;return o!=null&&o.every(c=>Array.isArray(c))&&(o!=null&&o.every(c=>Array.isArray(c)&&c.length===1)?o=o==null?void 0:o.filter(c=>(c==null?void 0:c[0])!==(i==null?void 0:i[r])):o=o==null?void 0:o.map(c=>{if(c!=null&&c.find(s=>s===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let s=T.cloneDeep(i),m=c==null?void 0:c.filter(x=>x!==(s==null?void 0:s[r])),p=r+1,f=Ol(m,s,p),b=[];b.push(c==null?void 0:c[0]),f==null||f.forEach(x=>{b.push(x)}),c=b}return c})),o},Ml=(t,i,r,o=0)=>{let c=t;return c!=null&&c.every(s=>Array.isArray(s))&&(c!=null&&c.every(s=>Array.isArray(s)&&s.length===1)?c.push([r]):c=c==null?void 0:c.map(s=>{if(s!=null&&s.find(m=>m===(i==null?void 0:i[o]))&&(i==null?void 0:i.length)!==1){let m=T.cloneDeep(i),p=s==null?void 0:s.filter(_=>_!==(m==null?void 0:m[o])),f=o+1,b=Ml(p,m,r,f),x=[];x.push(s==null?void 0:s[0]),b==null||b.forEach(_=>{x.push(_)}),s=x}return s})),c},zl=(t,i,r,o,c=0)=>{let s=t;return s!=null&&s.every(m=>Array.isArray(m))&&(s!=null&&s.every(m=>Array.isArray(m)&&m.length===1)?s=s==null?void 0:s.map(m=>((m==null?void 0:m[0])===r&&(m=[o]),m)):s=s==null?void 0:s.map(m=>{if(m!=null&&m.find(p=>p===(i==null?void 0:i[c]))&&(i==null?void 0:i.length)!==1){let p=T.cloneDeep(i),f=m==null?void 0:m.filter(N=>N!==(p==null?void 0:p[c])),b=c+1,x=zl(f,p,r,o,b),_=[];_.push(m==null?void 0:m[0]),x==null||x.forEach(N=>{_.push(N)}),m=_}return m})),s};function Rl(t="menu"){return{name:t,components:{SvgIcon:qr.SvgIcon,ssMenu:qn,DynamicIcon:Vl,ssDialog:Gt.ssDialog,ssInput:Nt._sfc_main$2},setup(i,{emit:r}){const o=e.defineProps({mode:{type:String,default:"vertical"}}),c=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=T.useMenuState(),m=T.useModelComp(T.pinia),p=T.useLoginState(T.pinia),{loginUserInfo:f}=T.storeToRefs(p),b=e.ref(0),x=Xr.useRouter(),_=e.ref(),{asideMenus:N,menuTriggerType:q,platform:$}=T.storeToRefs(s),{fixMenuStatus:oe}=T.storeToRefs(m),P=e.computed(()=>o==null?void 0:o.mode),L=ae=>ae==null?void 0:ae.map(k=>{var be,Ce;return!(k!=null&&k.children)||((be=k==null?void 0:k.children)==null?void 0:be.length)===0?k.config=c.value:k!=null&&k.children&&((Ce=k==null?void 0:k.children)==null?void 0:Ce.length)>0&&(k.children=L(k.children)),k}),R=e.computed(()=>{let ae=[...N.value];if((ae==null?void 0:ae.length)===0)return x.push("/"),[];const J=F(ae,S.value);return J.isFlag||(ae=J==null?void 0:J.data),ae=ae==null?void 0:ae.map(k=>{var be,Ce;return!(k!=null&&k.children)||((be=k==null?void 0:k.children)==null?void 0:be.length)===0?k.config=c.value:k!=null&&k.children&&((Ce=k==null?void 0:k.children)==null?void 0:Ce.length)>0&&(k.children=L(k.children)),k}),ae}),g=async(ae,J)=>{m.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(ae==null?void 0:ae.path),s.setActiveAsideMenu(ae),ae.isRouter?x.push(ae.path):x.push("/"),r("node-click",ae,J)},v=async ae=>{const J=Yr.findNodeByPropInTree(R.value,"path",ae);s.setActiveAsideMenu(J),m.setRouteToChildPath(""),oe.value?m.setFixMenuStatus(!1):(ke.value&&(q.value="open"),q.value==="click"?b.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(ae):ke.value||(s.setMenuTriggerType("click"),s.setActiveMenuPath(ae))),ae!=null&&ae.startsWith("/")?x.push(ae):x.push("/"),b.value++},y=ae=>{ke.value||s.setActiveMenuPath(ae)},C=ae=>{const J=document.documentElement;ae==null||ae.forEach(k=>{J.style.setProperty(k.name,k.value)})};e.onMounted(()=>{b.value=1});const S=e.computed(()=>{const ae=sessionStorage.getItem("authority");return ae?JSON.parse(ae):[]});e.watch(()=>$.value,ae=>{ae==="browser"?C(wn.browserVerticalMenuClasses):ae==="client"?(C(wn.clientHorizontalMenuClasses),C(wn.clientVerticalMenuClasses)):ae==="three"&&(C(wn.threeHorizontalMenuClasses),C(wn.threeVerticalMenuClasses))},{immediate:!0});const F=(ae,J)=>({isFlag:!0}),Be=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Je=ae=>un(ae),Ee=e.ref({}),Ie=e.ref([]),Ae=e.ref({}),z=e.ref({}),se=ae=>{switch(ae){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},te=e.ref({}),ue=ae=>{s.setCacheInputMenu({type:Be.type,data:ae}),s.setIsRefreshMenus(!0)},Re=async(ae,J,k)=>{var be,Ce,me,Q,ee,pe,Se,Ge,dt,w,I,Y,le,B,de,Pe,re,U,H,G,De,ve,X,he,ie,Me,fe,Ne,j,ze,ge,We,st,Ye,tt,Ve,pt,Ze,$e,rt,mt,wt;if(J==="create"){let He=(k==null?void 0:k.title)+"(1)",ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),bt=(Ce=(be=ot==null?void 0:ot.data)==null?void 0:be.result)==null?void 0:Ce[0],Fe=(me=bt==null?void 0:bt.value)==null?void 0:me.pageData;Fe.compData=(Q=Fe.compData)==null?void 0:Q.map(Te=>{var V;return(Te==null?void 0:Te.key)==="menuContents"&&(Te.contents=Ml(Te.contents,(V=k==null?void 0:k.path)==null?void 0:V.split("/"),He)),Te}),await ct.updateInsofDataApi({id:bt==null?void 0:bt.id,value:{pageData:Fe}});let Ue=(pe=(ee=k==null?void 0:k.path)==null?void 0:ee.split("/"))==null?void 0:pe.filter((Te,V)=>{var ye,we;return V!==((we=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:we.length)-1}),Xe=await Oe.getItemData((dt=(Ge=(Se=k==null?void 0:k.path)==null?void 0:Se.split("/"))==null?void 0:Ge.filter((Te,V)=>{var ye,we;return V!==((we=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:we.length)-1}))==null?void 0:dt.join("/"),sessionStorage.getItem("systemKey"),"");if(Ue.push(He),Ue=Ue==null?void 0:Ue.join("/"),(Xe==null?void 0:Xe.length)>0){let Te=Xe==null?void 0:Xe[0],V=(I=(w=Te==null?void 0:Te.compData)==null?void 0:w.find(ye=>(ye==null?void 0:ye.key)==="header"))==null?void 0:I.contents;if(((Y=V==null?void 0:V[0])==null?void 0:Y.directiveLabel)==="#isMain"){let ye=(le=V==null?void 0:V[0])==null?void 0:le.prop,we=(de=(B=Te==null?void 0:Te.compData)==null?void 0:B.find(et=>(et==null?void 0:et.key)==="tableContents"))==null?void 0:de.contents,at;we==null||we.forEach(et=>{var Et,_t;if(et.length===1)((Et=et==null?void 0:et[0])==null?void 0:Et[ye])===(k==null?void 0:k.title)&&(at=et==null?void 0:et[0],at[ye]=He);else{let ut=(_t=V==null?void 0:V.filter(yt=>yt!=="操作"))==null?void 0:_t.map(yt=>yt==null?void 0:yt.prop),ft=et==null?void 0:et.filter(yt=>!(yt!=null&&yt.id)),vt=Oe.getValueToObjectValue(ft,ut);vt[ye]=He,at=vt}}),await ct.createInsofDataApi({key:{type:"data",pageKey:(U=(re=(Pe=k==null?void 0:k.path)==null?void 0:Pe.split("/"))==null?void 0:re.filter((et,Et)=>{var _t,ut;return Et!==((ut=(_t=k==null?void 0:k.path)==null?void 0:_t.split("/"))==null?void 0:ut.length)-1}))==null?void 0:U.join("/"),tableId:Te==null?void 0:Te.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(H=f.value)==null?void 0:H.id,createUserLayer:((G=f.value)==null?void 0:G.dept)||((De=f.value)==null?void 0:De.部门名称)},value:{tableData:at}})}}await Oe.newLoadingConstruct(k==null?void 0:k.path,Ue),s.setUpdateMenuStatus(!1),await ao.verifyStructureDataToStore(),s.setActiveMenuPath((he=(X=(ve=k==null?void 0:k.path)==null?void 0:ve.split("/"))==null?void 0:X.filter((Te,V)=>{var ye,we;return V!==((we=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:we.length)-1}))==null?void 0:he.join("/")),s.setActiveTopMenuPath((Me=(ie=k==null?void 0:k.path)==null?void 0:ie.split("/"))==null?void 0:Me[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(J==="update")_.value=k;else if(J==="delete"){let He=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:k==null?void 0:k.path}}),ot=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),bt=(Ne=(fe=ot==null?void 0:ot.data)==null?void 0:fe.result)==null?void 0:Ne[0],Fe=(j=bt==null?void 0:bt.value)==null?void 0:j.pageData;if(Fe.compData=(ze=Fe.compData)==null?void 0:ze.map(Te=>{var V;return(Te==null?void 0:Te.key)==="menuContents"&&(Te.contents=Ol(Te.contents,(V=k==null?void 0:k.path)==null?void 0:V.split("/"))),Te}),await ct.updateInsofDataApi({id:bt==null?void 0:bt.id,value:{pageData:Fe}}),((We=(ge=He==null?void 0:He.data)==null?void 0:ge.result)==null?void 0:We.length)>0){let Te=(Ye=(st=He==null?void 0:He.data)==null?void 0:st.result)==null?void 0:Ye.map(V=>V==null?void 0:V.id);(Te==null?void 0:Te.length)>0&&await ct.batchDeleteInsofDataApi({ids:Te})}let Ue=await Oe.getItemData((pt=(Ve=(tt=k==null?void 0:k.path)==null?void 0:tt.split("/"))==null?void 0:Ve.filter((Te,V)=>{var ye,we;return V!==((we=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:we.length)-1}))==null?void 0:pt.join("/"),sessionStorage.getItem("systemKey"),""),Xe=[];(Ue==null?void 0:Ue.length)>0&&(Ue==null||Ue.forEach(Te=>{var ye,we,at,et,Et,_t,ut,ft,vt,yt,$t;let V=(et=(at=(we=(ye=Te==null?void 0:Te.compData)==null?void 0:ye.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:we.contents)==null?void 0:at[0])==null?void 0:et.prop;((ft=(ut=(_t=(Et=Te==null?void 0:Te.compData)==null?void 0:Et.find(kt=>(kt==null?void 0:kt.key)==="header"))==null?void 0:_t.contents)==null?void 0:ut[0])==null?void 0:ft.directiveLabel)==="#isMain"&&(($t=(yt=(vt=Te==null?void 0:Te.compData)==null?void 0:vt.find(kt=>(kt==null?void 0:kt.key)==="tableContents"))==null?void 0:yt.contents)==null||$t.forEach(kt=>{var Rt,Pt,Kt;(kt==null?void 0:kt.length)>1?(kt==null?void 0:kt[1])===(k==null?void 0:k.title)&&Xe.push((Rt=kt==null?void 0:kt[0])==null?void 0:Rt.id):((Pt=kt==null?void 0:kt[0])==null?void 0:Pt[V])===(k==null?void 0:k.title)&&Xe.push((Kt=kt==null?void 0:kt[0])==null?void 0:Kt.id)}))})),(Xe==null?void 0:Xe.length)>0&&await ct.batchDeleteInsofDataApi({ids:Xe}),s.setUpdateMenuStatus(!1),await ao.verifyStructureDataToStore(),s.setActiveMenuPath((rt=($e=(Ze=k==null?void 0:k.path)==null?void 0:Ze.split("/"))==null?void 0:$e.filter((Te,V)=>{var ye,we;return V!==((we=(ye=k==null?void 0:k.path)==null?void 0:ye.split("/"))==null?void 0:we.length)-1}))==null?void 0:rt.join("/")),s.setActiveTopMenuPath((wt=(mt=k==null?void 0:k.path)==null?void 0:mt.split("/"))==null?void 0:wt[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},Qe=async(ae,J)=>{var Ge,dt,w,I,Y,le,B,de,Pe,re,U,H,G,De,ve,X,he,ie,Me,fe,Ne,j,ze,ge,We,st,Ye,tt,Ve,pt,Ze;let k=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),be=(dt=(Ge=k==null?void 0:k.data)==null?void 0:Ge.result)==null?void 0:dt[0],Ce=(w=be==null?void 0:be.value)==null?void 0:w.pageData;Ce.compData=(I=Ce.compData)==null?void 0:I.map($e=>{var rt,mt;return($e==null?void 0:$e.key)==="menuContents"&&($e.contents=zl($e.contents,(rt=J==null?void 0:J.path)==null?void 0:rt.split("/"),J==null?void 0:J.title,(mt=ae==null?void 0:ae.target)==null?void 0:mt.value)),$e}),be!=null&&be.id&&await ct.updateInsofDataApi({id:be==null?void 0:be.id,value:{pageData:Ce}});let me=(le=(Y=J==null?void 0:J.path)==null?void 0:Y.split("/"))==null?void 0:le.filter(($e,rt)=>{var mt,wt;return rt!==((wt=(mt=J==null?void 0:J.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}),Q=me==null?void 0:me.join("/");me.push((B=ae==null?void 0:ae.target)==null?void 0:B.value),me=me==null?void 0:me.join("/");let ee=await Oe.getItemData(Q,sessionStorage.getItem("systemKey"),"");if(((H=(U=(re=(Pe=(de=ee==null?void 0:ee[0])==null?void 0:de.compData)==null?void 0:Pe.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:re.contents)==null?void 0:U[0])==null?void 0:H.directiveLabel)==="#isMain"){let $e=(he=(X=(ve=(De=(G=ee==null?void 0:ee[0])==null?void 0:G.compData)==null?void 0:De.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:ve.contents)==null?void 0:X[0])==null?void 0:he.prop,rt=(fe=(Me=(ie=ee==null?void 0:ee[0])==null?void 0:ie.compData)==null?void 0:Me.find(He=>(He==null?void 0:He.key)==="tableContents"))==null?void 0:fe.contents,mt=(ge=(ze=(j=(Ne=ee==null?void 0:ee[0])==null?void 0:Ne.compData)==null?void 0:j.find(He=>(He==null?void 0:He.key)==="header"))==null?void 0:ze.contents)==null?void 0:ge.map(He=>He==null?void 0:He.prop),wt;if(rt==null||rt.forEach(He=>{var bt;let ot=Oe.getValueToObjectValue(He,mt);(ot==null?void 0:ot[$e])===J.title&&(wt=ot,wt[$e]=(bt=ae==null?void 0:ae.target)==null?void 0:bt.value)}),wt){let He={};for(let bt in wt)bt!=="id"&&(He[bt]=wt==null?void 0:wt[bt]);let ot=[{id:wt==null?void 0:wt.id,value:{tableData:He}}];await ct.batchUpdateInsofDataApi({dataList:ot})}}let pe=await ct.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:J==null?void 0:J.path}}),Se=(st=(We=pe==null?void 0:pe.data)==null?void 0:We.result)==null?void 0:st.map($e=>({id:$e==null?void 0:$e.id,key:$e==null?void 0:$e.key}));Se=Se==null?void 0:Se.map($e=>($e.key.pageKey=me,$e)),(Se==null?void 0:Se.length)>0&&await ct.batchUpdateInsofDataApi({dataList:Se}),s.setUpdateMenuStatus(!1),await ao.verifyStructureDataToStore(),s.setActiveMenuPath((Ve=(tt=(Ye=J==null?void 0:J.path)==null?void 0:Ye.split("/"))==null?void 0:tt.filter(($e,rt)=>{var mt,wt;return rt!==((wt=(mt=J==null?void 0:J.path)==null?void 0:mt.split("/"))==null?void 0:wt.length)-1}))==null?void 0:Ve.join("/")),s.setActiveTopMenuPath((Ze=(pt=J==null?void 0:J.path)==null?void 0:pt.split("/"))==null?void 0:Ze[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),_.value=void 0},Z=async(ae,J)=>{Be.type=se(J==null?void 0:J.operateType),await Re(J,Be.type,ae),z.value=ae,te.value=J},O=()=>{Be.show=!1},W=ae=>ae==null?void 0:ae.filter(J=>J.allowInherit),ce=()=>{var k,be,Ce,me,Q;let ae;Be.type==="create"&&(ae=((k=z.value)==null?void 0:k.path)+"/"+Ae.value[(be=Ae.value)==null?void 0:be.prop]),Be.type==="update"&&(ae=(Ce=z.value)==null?void 0:Ce.path);const J={...z.value,config:W((me=z.value)==null?void 0:me.config),children:[],childMenus:[],title:Ae.value[(Q=Ae.value)==null?void 0:Q.prop],path:ae};console.log("clickSubmitForm",te.value,z.value,J),ue(J),Be.show=!1},xe=ae=>{var k,be;const J=(k=ae==null?void 0:ae.contents)==null?void 0:k.find(Ce=>Ce.key==="formContent");J&&(Ae.value=(be=J==null?void 0:J.contents)==null?void 0:be.reduce((Ce,me)=>(Ce[me.key]=me.value,Ce.prop=me.key,Ce),{}))},ke=e.ref(!1);return{isCollapse:ke,handleMenuCollapse:()=>{ke.value=!ke.value},handleCompChange:xe,dialogForm:Ee,dialogRenderComps:Ie,getComponents:Je,clickSubmitForm:ce,dialogInfo:Be,beforeDialogDestroy:O,clickMenuIcon:Z,mode:P,renderMenuList:R,clickMenu:g,openMenu:v,closeMenu:y,changeMenuStyle:C,fixElement:_,onBlur:Qe}}}}e.defineComponent(Rl());const Wd=T.useLoginState(),{loginUserInfo:va}=T.storeToRefs(Wd),Zt=T.useModelComp(T.pinia),Hd=e.ref(!1),{itemData:qd,itemGridData:nn,curStructureCompIds:Ko,isSubmitCurStructure:Xd,isRefreshCurStructure:$f,routeToChildPath:Yd,pageMapState:mo,itemExtendData:Pn}=T.storeToRefs(Zt),Qt=T.useMenuState(T.pinia),{activeTopMenuPath:Gd,activeMenuPath:ea,platform:Lf,activeAsideMenu:Ff,buttonTriggerType:Jd,menus:jf,currentMenuPath:Uf}=T.storeToRefs(Qt),xa=Oe.useUnit(T.pinia),{selectTitle:xo,chooseTitle:Wo}=T.storeToRefs(xa),Zd=Oe.useOriginalState(T.pinia),{originalPath:Kf}=T.storeToRefs(Zd);e.ref();T.useAuthorityState(T.pinia);const Xn=e.ref(!0),on=e.ref(0),Un=e.ref([]);e.ref(!1);const Qd=()=>{Zt.setItemGridData([]),Zt.setIsEdit("edit"),Zt.setSubmitCurStructure(ea.value!=="/平台管理/菜单管理")},ep=()=>{Zt.setIsEdit("view"),Zt.setRefreshCurStructure(!0)},tp=async t=>{var c;let i=xo.value,r=i==null?void 0:i.findIndex(s=>(s==null?void 0:s.value)===(t==null?void 0:t.value)),o=i==null?void 0:i.filter((s,m)=>m<=r);xa.setSelectTitle(T.cloneDeep(o)),o=(c=o==null?void 0:o.map(s=>s==null?void 0:s.value))==null?void 0:c.join("/"),Qt.setActiveMenuPath(null),Qt.setActiveMenuPath(o)},co=async(t,i,r,o="contentConfig")=>{var c;try{if(!Array.isArray(t))return;let s,m;i==="create"?(s={dataList:t==null?void 0:t.map(f=>{var b;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r!=null&&r.startsWith("/")?r==null?void 0:r.substring(1):r,type:"structure",structureBelong:o,parentTable:"",version:1},value:{pageData:{...f,compData:(b=f==null?void 0:f.compData)==null?void 0:b.filter(x=>(x==null?void 0:x.key)!=="tableContents")}}}})},m=ct.batchAddInsofDataApi):i==="update"?(s={dataList:t==null?void 0:t.map(f=>{var b;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(b=f==null?void 0:f.compData)==null?void 0:b.filter(x=>(x==null?void 0:x.key)!=="tableContents")}}}})},m=ct.batchUpdateInsofDataApi):i==="delete"&&(s={ids:t},m=ct.batchDeleteInsofDataApi);const p=await m(s);if(((c=p==null?void 0:p.data)==null?void 0:c.code)===200)return p.data.result;throw ct.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{ct.ElMessage.error("保存响应失败")}},Ho=async(t,i,r,o)=>{var c,s,m,p,f,b,x,_,N,q,$;try{const oe=(s=(c=t==null?void 0:t.results)==null?void 0:c.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:s.map(y=>({key:{pageKey:t==null?void 0:t.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:r},value:{tableData:y}})),P=(p=(m=t==null?void 0:t.results)==null?void 0:m.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:p.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),L=JSON.parse(T.cloneDeep(JSON.stringify(t))),R=(f=L==null?void 0:L.results)==null?void 0:f.map(y=>y.id);let g;r?g=(_=(x=(b=mo.value)==null?void 0:b[ea.value])==null?void 0:x.filter(y=>{var C,S,F;return((C=y==null?void 0:y.key)==null?void 0:C.type)===i&&((F=(S=y==null?void 0:y.key)==null?void 0:S.relatedInfo)==null?void 0:F.target)===o}))==null?void 0:_.map(y=>y==null?void 0:y.id):g=($=(q=(N=mo.value)==null?void 0:N[ea.value])==null?void 0:q.filter(y=>{var C;return((C=y==null?void 0:y.key)==null?void 0:C.type)===i}))==null?void 0:$.map(y=>y==null?void 0:y.id);const v=g==null?void 0:g.filter(y=>!(R!=null&&R.includes(y))&&typeof y=="number");(oe==null?void 0:oe.length)>0&&await ct.batchAddInsofDataApi({dataList:oe}),(P==null?void 0:P.length)>0&&await ct.batchUpdateInsofDataApi({dataList:P}),(v==null?void 0:v.length)>0&&await ct.batchDeleteInsofDataApi({ids:v})}catch(oe){throw new Error(oe)}},ap=async t=>{var b,x,_,N,q,$,oe,P,L,R;Qt.setContentLoading(!0);const i=JSON.parse(T.cloneDeep(JSON.stringify(qd.value)));if(!Xd.value)return Qt.setCacheStructures({key:Jd.value,data:i}),ct.ElMessage.success("已暂存");const r=i==null?void 0:i.map(g=>g.id),o=r.filter(g=>{var v;return!((v=Ko.value)!=null&&v.includes(g))}),c=(b=Ko.value)==null?void 0:b.filter(g=>!r.includes(g)),s=[...o,...c].filter(g=>typeof g!==null&&typeof g<"u"),m=i==null?void 0:i.filter(g=>!g.id),p=i==null?void 0:i.filter(g=>g.id);let f=[];if(s&&(s==null?void 0:s.length)>0&&f.push(co(s,"delete",t)),m&&(m==null?void 0:m.length)>0&&f.push(co(m,"create",t)),p&&(p==null?void 0:p.length)>0&&f.push(co(p,"update",t)),nn.value&&((x=nn.value)!=null&&x.isDelete&&((N=(_=nn.value)==null?void 0:_.results)==null?void 0:N.length)>0&&(($=(q=nn.value)==null?void 0:q.results)!=null&&$.every(g=>typeof g=="number"))?await ct.batchDeleteInsofDataApi({ids:(oe=nn.value)==null?void 0:oe.results}):(console.log("itemGridData.value",nn.value),f.push(await Ho(nn.value,"gridLayout")))),Pn.value)for(const g in Pn.value)f.push(await Ho((P=Pn.value)==null?void 0:P[g],"extend",{target:g,compId:(R=(L=Pn.value)==null?void 0:L[g])==null?void 0:R.compId},g));await Promise.all(f).then(()=>{ct.ElMessage.success("保存成功"),Zt.setRefreshCurStructure(!0)}).catch(g=>{ct.ElMessage.success(g)}),Qt.setContentLoading(!1)},_n=t=>un(t),Ft=e.ref([]),np=e.computed(()=>{var t;return(t=Ft.value)==null?void 0:t.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Pl=e.computed(()=>{var t;return(t=Ft.value)==null?void 0:t.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),$l=e.ref(0),Ll=e.ref(null),En=async(t,i="data",r)=>{var o,c,s,m,p,f,b,x;if((t==null?void 0:t.buttonName)==="新增"){let _=[{tableName:(o=t==null?void 0:t.relatedContents)==null?void 0:o.find(N=>N==null?void 0:N.includes("content")),tableContents:t==null?void 0:t.fixContent}];await Ba.pageBatchAddApi({platId:parseInt((c=va==null?void 0:va.value)==null?void 0:c.plat_id),changeContents:_})}if((t==null?void 0:t.buttonName)==="OCR批量新增"){const _=((t==null?void 0:t.ocrRows)||[]).map(q=>{const $={...q};return delete $._isOCRRow,delete $._ocrTableId,Object.keys($).forEach(oe=>{oe==="证书附件"&&Array.isArray($[oe])&&($[oe]=JSON.stringify($[oe]))}),$});let N=[{tableName:(s=t==null?void 0:t.relatedContents)==null?void 0:s.find(q=>q==null?void 0:q.includes("content")),tableContents:_}];await Ba.pageBatchAddApi({platId:parseInt((m=va==null?void 0:va.value)==null?void 0:m.plat_id),changeContents:N})}if((t==null?void 0:t.buttonName)==="编辑"){const N=((t==null?void 0:t.fixContent)||(t==null?void 0:t.singleContent)||[]||[]).map($=>{const oe={...$};return delete oe._isOCRRow,delete oe._ocrTableId,delete oe._isTemp,delete oe.tableEditType,delete oe.index,oe});let q=[{tableName:(p=t==null?void 0:t.relatedContents)==null?void 0:p.find($=>$==null?void 0:$.includes("content")),tableContents:N}];await Ba.pageBatchUpdateApi({platId:parseInt((f=va==null?void 0:va.value)==null?void 0:f.plat_id),changeContents:q})}if((t==null?void 0:t.buttonName)==="删除"){let _=[{tableName:(b=t==null?void 0:t.relatedContents)==null?void 0:b.find(N=>N==null?void 0:N.includes("content")),tableContents:t==null?void 0:t.fixContent}];await Ba.pageBatchDeleteApi({platId:parseInt((x=va==null?void 0:va.value)==null?void 0:x.plat_id),changeContents:_})}Zt.setRefreshCurStructure(!0)},Cn=async(t,i)=>{},Sn=async t=>{Ft.value=await Oe.getDeepDiffItems(t),Zt.setItemData(Ft.value),Zt.setOriginalData(Ft.value)};e.ref();const op=e.ref(null),lp=()=>{var t,i;console.log("倒计时结束时"),oa.ElMessageBox.alert(`超时未提交,【${(i=(t=ea.value)==null?void 0:t.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=e.ref([]),rp=e.computed(()=>{var t,i;return(i=(t=mo.value)==null?void 0:t[ea.value])==null?void 0:i.filter(r=>{var o;return((o=r==null?void 0:r.key)==null?void 0:o.type)==="gridLayout"})});e.watch(()=>[Gd.value],()=>{xa.setSelectTitle([]),xa.setChooseTitle([])},{deep:!0});e.watch(()=>[Wo.value],async()=>{var i,r,o;let t=(i=Wo.value)==null?void 0:i.filter(c=>(c==null?void 0:c.condition)==="child"&&(c==null?void 0:c.value)!==""&&(c==null?void 0:c.parentContent)!==ea.value);if((t==null?void 0:t.length)>0){Qt.setContentLoading(!0);let c=ea.value+"/"+((r=t==null?void 0:t[0])==null?void 0:r.value),s=!!((o=t==null?void 0:t[0])!=null&&o.parentContent),m=await sn(c,s,{originPath:ea.value});m=m==null?void 0:m.map(p=>(p.isShow=!0,p)),console.log(m,"loadingContents"),Ft.value=await Oe.getDeepDiffItems(m),console.log(Ft.value,"showItems.value"),Qt.setContentLoading(!1)}});e.watch(()=>[ea.value],async t=>{var m,p,f;if(!ea.value)return;Qt.setCurrentMenuPath(ea.value),Zt.setLockingPage(""),Ft.value=[];let i=e.getCurrentInstance();(m=i==null?void 0:i.scope)==null||m.stop(),i=null,Xn.value=!1,Qt.setContentLoading(!0),Hd.value=!0;let r=t==null?void 0:t[0],o=r,c=(p=xo.value)==null?void 0:p.filter(b=>(b==null?void 0:b.condition)==="child"&&(b==null?void 0:b.value)!==""&&(b==null?void 0:b.parentContent)!==ea.value&&!(b!=null&&b.relatedContent));(c==null?void 0:c.length)>0&&(r=r+"/"+((f=c==null?void 0:c[0])==null?void 0:f.value));let s=await sn(r,!0,{originPath:o});s=s==null?void 0:s.map(b=>(b.isShow=!0,b)),Ft.value=await Oe.getDeepDiffItems(s),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(Ft.value),Zt.setOriginalData(Ft.value),e.nextTick(()=>{on.value=on.value++,Xn.value=!0})},{immediate:!0});const ip=async()=>{Qt.setLinkMenuInfo(null),Qt.setActiveMenuPath(Yd.value),Ft.value=null,Zt.setRouteToChildPath(""),Qt.setChildMenu("")},sp=t=>new RegExp("button","i").test(t),cp=t=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(t),jl=t=>{if(cp(t)){const i=t==null?void 0:t.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&Qt.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Ul=async(t,i)=>{var f,b,x,_,N,q,$,oe;Qt.setCurrentMenuPath(ea.value+"/"+t),Qt.setContentLoading(!0),Ft.value=await sn(ea.value+"/"+t,!0,{originPath:ea.value+"/",row:i});let r=await sn(ea.value,!1);Ft.value=(f=Ft.value)==null?void 0:f.map(P=>(P.isShow=!0,P));let o=(b=r==null?void 0:r.filter(P=>(P==null?void 0:P.comp)==="Table"))==null?void 0:b[0],c=(q=(N=(_=(x=o==null?void 0:o.compData)==null?void 0:x.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:_.contents)==null?void 0:N[0])==null?void 0:q.prop,s=(oe=($=o==null?void 0:o.compData)==null?void 0:$.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:oe.contents;s=s==null?void 0:s.map(P=>({label:P==null?void 0:P[c],value:P==null?void 0:P[c]}));let m=xo.value,p={value:t,condition:"child",options:s,relatedContent:ea.value,isShow:!0};m.push(p),xa.setSelectTitle(m),xa.setChooseTitle([p]),Ft.value=await Oe.getDeepDiffItems(Ft.value),Qt.setContentLoading(!1),Zt.setExtraContents([]),xa.setSelectIndex(""),xa.setSelectMenu(""),Zt.setItemData(Ft.value),Zt.setOriginalData(Ft.value)},up=t=>{$l.value=t},vn=e.reactive({index:0,comp:null}),dp=e.computed(()=>{var t;return(t=Ft.value)==null?void 0:t.map((i,r)=>({id:i.id,name:i.name,status:pp(i,r)}))}),Kl=(t,i)=>{var f,b,x,_,N;const r=i?t:t-2,o=(f=Ft.value)==null?void 0:f[r],c=(x=(b=o==null?void 0:o.compData)==null?void 0:b.find(q=>(q==null?void 0:q.key)==="header"))==null?void 0:x.contents,s=c==null?void 0:c.findIndex(q=>(q==null?void 0:q.isMainKey)&&(q==null?void 0:q.label)!=="操作"),m=s===-1?0:s,p=(N=(_=o==null?void 0:o.compData)==null?void 0:_.find(q=>(q==null?void 0:q.key)==="tableContents"))==null?void 0:N.contents;return{valid:p==null?void 0:p.every(q=>q==null?void 0:q[m+1]),length:(p==null?void 0:p.length)||0}},pp=(t,i)=>{var o;let r="process";if(((o=t==null?void 0:t.comp)==null?void 0:o.toUpperCase())==="TABLE"){const{valid:c,length:s}=Kl(i,!0);vn.index===i?r="process":s===0?r="wait":r=c?"success":"error"}return r},Wl=t=>{var r,o,c,s,m;const i=t+1;if(i>1&&((c=(o=(r=Ft.value)==null?void 0:r[t])==null?void 0:o.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:p}=Kl(i);p?(vn.index=i,vn.comp=(s=Ft.value)==null?void 0:s[t]):ct.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else vn.index=i,vn.comp=(m=Ft.value)==null?void 0:m[t]},Hl=e.computed(()=>{var t,i;return(i=(t=Pl.value)==null?void 0:t[0])==null?void 0:i.isStepLayout});e.watch(()=>Hl.value,t=>{t&&Wl(0)},{immediate:!0});const fp={class:"layout"},hp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(t,{emit:i}){const r=i,o=t;e.onMounted(async()=>{});const c=e.computed(()=>T.cloneDeep(o==null?void 0:o.itemData)||[]),s=e.computed(()=>{var x;const b=(x=c==null?void 0:c.value)==null?void 0:x.find(_=>{const{key:N}=_;return N==="baseConfig"});return b==null?void 0:b.contents}),m=e.computed(()=>{var x;const b=(x=c==null?void 0:c.value)==null?void 0:x.find(_=>{const{key:N}=_;return N==="children"});return b==null?void 0:b.contents}),p=e.computed(()=>{let b=T.cloneDeep(m.value)||[];const x=b.length;let _=0;const N=[];if(b=b.map(q=>{const $=q.span;return $?(q.span=Number($),_=_+q.span):N.push(q),q}),_<24){const q=Math.floor((24-_)/x);N.forEach($=>{$.span=q})}return b}),f=b=>{r("rowClick",b)};return(b,x)=>{var q;const _=e.resolveComponent("el-col"),N=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",fp,[e.createVNode(N,{style:e.normalizeStyle({height:(q=s.value)==null?void 0:q.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,($,oe)=>(e.openBlock(),e.createBlock(_,{span:$==null?void 0:$.span},{default:e.withCtx(()=>{var P;return[e.unref(Xn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)($.comp)),{key:e.unref(on),compName:$.name,index:($==null?void 0:$.id)??oe,height:(P=s.value)==null?void 0:P.height,itemData:$==null?void 0:$.compData,childItemData:$==null?void 0:$.itemChildData,onChange:e.unref(En),onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),vp=zt._export_sfc(hp,[["__scopeId","data-v-ab9a36ed"]]),mp={class:"layout-operate"},gp={class:"layout-module"},yp={class:"collapse-title-item"},bp={class:"collapse-title"},kp={class:"icon-content"},xp=["onClick"],wp={class:"comp-child"},Dp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(t,{emit:i}){const r=t,o=i;e.onMounted(()=>{oe()});const c=e.ref({}),s=e.ref({}),m=e.ref([]),p=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{s.value=y,o("change",v(),!0)},b=e.ref([]),x=e.ref([]),_=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],N=e.computed(()=>{const y=r==null?void 0:r.itemContents;return T.cloneDeep(y)}),q=e.computed(()=>{const y=N==null?void 0:N.value,C=y==null?void 0:y.find(S=>{const{key:F}=S;return F==="baseConfig"});return C==null?void 0:C.contents}),$=e.computed(()=>{const y=N==null?void 0:N.value,C=y==null?void 0:y.find(S=>{const{key:F}=S;return F==="children"});return C==null?void 0:C.contents}),oe=()=>{var y;c.value=N.value||{},b.value=($==null?void 0:$.value)||[],m.value=p(),m.value=(y=m.value)==null?void 0:y.map(C=>{var F;const{prop:S}=C;return C.value=(F=q.value)==null?void 0:F[S],C})};e.watch(()=>{var y;return(y=$==null?void 0:$.value)==null?void 0:y.length},()=>{var y;b.value=($==null?void 0:$.value)||[],x.value=(y=$.value)==null?void 0:y.map(C=>_(C))},{immediate:!0});const P=(y,C)=>{const S=T.cloneDeep($==null?void 0:$.value);S[C].span=y.span,b.value=S,o("change",v(),!0)},L=y=>un(y),R=(y,C,S)=>{if(!y)return;const F=T.cloneDeep($==null?void 0:$.value);F[S]&&(F[S].compData=y,b.value=F,o("change",v(),!0))},g=y=>{oa.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let C=T.cloneDeep($==null?void 0:$.value);C=C==null?void 0:C.filter((S,F)=>y!==F),b.value=C,o("change",v(),!0),ct.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},v=()=>({compData:[{key:"baseConfig",contents:s.value},{key:"children",contents:b==null?void 0:b.value}]});return(y,C)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",mp,[e.createElementVNode("div",gp,[C[1]||(C[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Nt.ssForm,{rowContents:m.value,isEnableWrap:!0,onChange:C[0]||(C[0]=F=>f(F))},null,8,["rowContents"])])]),e.createVNode(bl.default,{class:"collapse-content",collapseContents:$.value},{title:e.withCtx(({item:F,index:Be})=>[e.createElementVNode("div",yp,[e.createElementVNode("div",bp,e.toDisplayString(F.name),1),e.createElementVNode("div",kp,[e.createElementVNode("div",{onClick:e.withModifiers(Je=>g(Be),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,xp)])])]),content:e.withCtx(({item:F,index:Be})=>[e.createElementVNode("div",wp,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Nt.ssForm,{rowContents:x.value[Be],key:Be,isEnableWrap:!0,onChange:Je=>P(Je,Be)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(L(F.comp+"Operate")),{itemContents:F==null?void 0:F.compData,originalItemContents:F.compData,onChange:Je=>R(Je,F,Be)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),_p=zt._export_sfc(Dp,[["__scopeId","data-v-ba05456e"]]),Ep=typeof window<"u";var qo;Ep&&((qo=window==null?void 0:window.navigator)!=null&&qo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function pa(t){return t==null}function ql(){}const Cp=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(Cp)));function Sp(){const t=new Map;return{on(i,r){const o=t.get(i);o!=null&&o.add(r)||t.set(i,new Set([r]))},off(i,r){const o=t.get(i);o&&o.delete(r)},clear(i){const r=t.get(i);r&&r.clear()},clearAll(){t.clear()},emit(i,...r){const o=t.get(i);o&&o.forEach(c=>{c(...r)})}}}function Xo(t,i=16){if(typeof t!="function")return ql;const r=(...s)=>{t(...s)};if(i<=0)return Xl(r);let o=0,c;return function(...s){const m=Date.now(),p=m-o;clearTimeout(c),p>=i?(o=m,r(...s)):c=setTimeout(()=>{o=Date.now(),r(...s)},Math.max(0,i-p))}}function Tp(t,i=100){if(typeof t!="function")return ql;const r=(...c)=>{t(...c)};if(i<=0)return Xl(r);let o;return function(...c){clearTimeout(o),o=setTimeout(()=>{r(...c)},i)}}function Xl(t){if(typeof t!="function")return t;let i=!1,r,o;return function(...c){return r=c,i||(i=!0,o=Promise.resolve().then(()=>(i=!1,o=void 0,t(...r)))),o}}const Tn=new Set,Yl=new WeakMap;function Bp(){Tn.forEach(t=>{t(...Yl.get(t))}),Tn.clear()}function ia(t,...i){if(typeof t!="function")return t;Yl.set(t,i),!Tn.has(t)&&(Tn.add(t),Tn.size===1&&Promise.resolve().then(Bp))}const Gl=Symbol("LAYOUT_KEY"),Jl=Symbol("EMITTER_KEY");function Ip(t){let i=0,r;for(let o=0,c=t.length;o<c;o++)r=t[o].y+t[o].h,r>i&&(i=r);return i}function go(t){const i=Array(t.length);for(let r=0,o=t.length;r<o;r++)i[r]=Np(t[r]);return i}function Np(t){return{...t}}function Zl(t,i){return!(t===i||t.x+t.w<=i.x||t.x>=i.x+i.w||t.y+t.h<=i.y||t.y>=i.y+i.h)}function hn(t,i,r){const o=er(t),c=tr(t),s=Array(t.length);for(let m=0,p=c.length;m<p;m++){let f=c[m];f.static||(f=Ap(o,f,i,r),o.push(f)),s[t.findIndex(b=>b.i===f.i)]=f,f.moved=!1}return s}function Ap(t,i,r,o){if(r)for(;i.y>0&&!Bn(t,i);)i.y--;else if(o){const s=o[i.i].y;for(;i.y>s&&!Bn(t,i);)i.y--}let c;for(;c=Bn(t,i);)i.y=c.y+c.h;return i}function Vp(t,i){const r=er(t);for(let o=0,c=t.length;o<c;o++){const s=t[o];if(s.x+s.w>i.cols&&(s.x=i.cols-s.w),s.x<0&&(s.x=0,s.w=i.cols),!s.static)r.push(s);else for(;Bn(r,s);)s.y++}return t}function Yo(t,i){for(let r=0,o=t.length;r<o;r++)if(t[r].i===i)return t[r]}function Bn(t,i){for(let r=0,o=t.length;r<o;r++)if(Zl(t[r],i))return t[r]}function Ql(t,i){return t.filter(r=>Zl(r,i))}function er(t){return t.filter(i=>i.static)}function yo(t,i,r,o,c=!1,s=!1){if(i.static)return t;const m=i.x,p=i.y,f=o&&i.y>o;typeof r=="number"&&(i.x=r),typeof o=="number"&&(i.y=o),i.moved=!0;let b=tr(t);f&&(b=b.reverse());const x=Ql(b,i);if(s&&x.length)return i.x=m,i.y=p,i.moved=!1,t;for(let _=0,N=x.length;_<N;_++){const q=x[_];q.moved||i.y>q.y&&i.y-q.y>q.h/4||(q.static?t=Go(t,q,i,c):t=Go(t,i,q,c))}return t}function Go(t,i,r,o){if(o){const c={x:r.x,y:r.y,w:r.w,h:r.h};if(c.y=Math.max(i.y-r.h,0),!Bn(t,c))return yo(t,r,void 0,c.y,!1)}return yo(t,r,void 0,r.y+1,!1)}function Op(t,i,r,o){const c="translate3d("+i+"px,"+t+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:r+"px",height:o+"px",position:"absolute"}}function Mp(t,i,r,o){const c="translate3d("+i*-1+"px,"+t+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:r+"px",height:o+"px",position:"absolute"}}function zp(t,i,r,o){return{top:t+"px",left:i+"px",width:r+"px",height:o+"px",position:"absolute"}}function Rp(t,i,r,o){return{top:t+"px",right:i+"px",width:r+"px",height:o+"px",position:"absolute"}}function tr(t){return Array.from(t).sort(function(i,r){return i.y===r.y&&i.x===r.x?0:i.y>r.y||i.y===r.y&&i.x>r.x?1:-1})}function Pp(t,i){i=i||"Layout";const r=["x","y","w","h"],o=[];if(!Array.isArray(t))throw new Error(i+" must be an array!");for(let c=0,s=t.length;c<s;c++){const m=t[c];for(let p=0;p<r.length;p++)if(typeof m[r[p]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+r[p]+" must be a number!");if(m.i===void 0||m.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof m.i!="number"&&typeof m.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(o.indexOf(m.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(o.push(m.i),m.static!==void 0&&typeof m.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function $p(t,i="vgl"){const r=()=>`${i}-${t}`;return{b:r,be:o=>`${r()}__${o}`,bm:o=>`${r()}--${o}`,bem:(o,c)=>`${r()}__${o}--${c}`}}function Jo(t){return Lp(t)}function Lp(t){var i;const r=((i=t.target)==null?void 0:i.offsetParent)||document.body,o=t.offsetParent===document.body?{left:0,top:0}:r.getBoundingClientRect(),c=t.clientX+r.scrollLeft-o.left,s=t.clientY+r.scrollTop-o.top;return{x:c,y:s}}function Zo(t,i,r,o){return Fp(t)?{deltaX:r-t,deltaY:o-i,lastX:t,lastY:i,x:r,y:o}:{deltaX:0,deltaY:0,lastX:r,lastY:o,x:r,y:o}}function Fp(t){return typeof t=="number"&&!Number.isNaN(t)}function jp(t,i){const r=nr(t);let o=r[0];for(let c=1,s=r.length;c<s;c++){const m=r[c];i>t[m]&&(o=m)}return o}function ar(t,i){if(!i[t])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+t+" is missing!");return i[t]}function Up(t,i,r,o,c,s,m){if(i[o])return go(i[o]);let p=t;const f=nr(r),b=f.slice(f.indexOf(o));for(let x=0,_=b.length;x<_;x++){const N=b[x];if(i[N]){p=i[N];break}}return p=go(p||[]),hn(Vp(p,{cols:s}),m)}function nr(t){return Object.keys(t).sort((i,r)=>t[i]-t[r])}let Kp="auto";function Wp(){return typeof document<"u"}function Qo(){return Wp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):Kp}var Dn={exports:{}},Hp=Dn.exports,el;function qp(){return el||(el=1,function(t,i){(function(r,o){t.exports=o()})(Hp,function(){function r(n,a){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(n);a&&(u=u.filter(function(d){return Object.getOwnPropertyDescriptor(n,d).enumerable})),l.push.apply(l,u)}return l}function o(n){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?r(Object(l),!0).forEach(function(u){f(n,u,l[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):r(Object(l)).forEach(function(u){Object.defineProperty(n,u,Object.getOwnPropertyDescriptor(l,u))})}return n}function c(n){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},c(n)}function s(n,a){if(!(n instanceof a))throw new TypeError("Cannot call a class as a function")}function m(n,a){for(var l=0;l<a.length;l++){var u=a[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(n,oe(u.key),u)}}function p(n,a,l){return a&&m(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n}function f(n,a,l){return(a=oe(a))in n?Object.defineProperty(n,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[a]=l,n}function b(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(a&&a.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),a&&_(n,a)}function x(n){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},x(n)}function _(n,a){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,u){return l.__proto__=u,l},_(n,a)}function N(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function q(n){var a=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 l,u=x(n);if(a){var d=x(this).constructor;l=Reflect.construct(u,arguments,d)}else l=u.apply(this,arguments);return function(h,D){if(D&&(typeof D=="object"||typeof D=="function"))return D;if(D!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(h)}(this,l)}}function $(){return $=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,a,l){var u=function(h,D){for(;!Object.prototype.hasOwnProperty.call(h,D)&&(h=x(h))!==null;);return h}(n,a);if(u){var d=Object.getOwnPropertyDescriptor(u,a);return d.get?d.get.call(arguments.length<3?n:l):d.value}},$.apply(this,arguments)}function oe(n){var a=function(l,u){if(typeof l!="object"||l===null)return l;var d=l[Symbol.toPrimitive];if(d!==void 0){var h=d.call(l,u);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(l)}(n,"string");return typeof a=="symbol"?a:a+""}var P=function(n){return!(!n||!n.Window)&&n instanceof n.Window},L=void 0,R=void 0;function g(n){L=n;var a=n.document.createTextNode("");a.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(a)===a&&(n=n.wrap(n)),R=n}function v(n){return P(n)?n:(n.ownerDocument||n).defaultView||R.window}typeof window<"u"&&window&&g(window);var y=function(n){return!!n&&c(n)==="object"},C=function(n){return typeof n=="function"},S={window:function(n){return n===R||P(n)},docFrag:function(n){return y(n)&&n.nodeType===11},object:y,func:C,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||c(n)!=="object")return!1;var a=v(n)||R;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof a.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return y(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return y(n)&&n.length!==void 0&&C(n.splice)}};function F(n){var a=n.interaction;if(a.prepared.name==="drag"){var l=a.prepared.axis;l==="x"?(a.coords.cur.page.y=a.coords.start.page.y,a.coords.cur.client.y=a.coords.start.client.y,a.coords.velocity.client.y=0,a.coords.velocity.page.y=0):l==="y"&&(a.coords.cur.page.x=a.coords.start.page.x,a.coords.cur.client.x=a.coords.start.client.x,a.coords.velocity.client.x=0,a.coords.velocity.page.x=0)}}function Be(n){var a=n.iEvent,l=n.interaction;if(l.prepared.name==="drag"){var u=l.prepared.axis;if(u==="x"||u==="y"){var d=u==="x"?"y":"x";a.page[d]=l.coords.start.page[d],a.client[d]=l.coords.start.client[d],a.delta[d]=0}}}var Je={id:"actions/drag",install:function(n){var a=n.actions,l=n.Interactable,u=n.defaults;l.prototype.draggable=Je.draggable,a.map.drag=Je,a.methodDict.drag="draggable",u.actions.drag=Je.defaults},listeners:{"interactions:before-action-move":F,"interactions:action-resume":F,"interactions:action-move":Be,"auto-start:check":function(n){var a=n.interaction,l=n.interactable,u=n.buttons,d=l.options.drag;if(d&&d.enabled&&(!a.pointerIsDown||!/mouse|pointer/.test(a.pointerType)||(u&l.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:d.lockAxis==="start"?d.startAxis:d.lockAxis},!1}},draggable:function(n){return S.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):S.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:F,move:Be,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},Ee=Je,Ie={init:function(n){var a=n;Ie.document=a.document,Ie.DocumentFragment=a.DocumentFragment||Ae,Ie.SVGElement=a.SVGElement||Ae,Ie.SVGSVGElement=a.SVGSVGElement||Ae,Ie.SVGElementInstance=a.SVGElementInstance||Ae,Ie.Element=a.Element||Ae,Ie.HTMLElement=a.HTMLElement||Ie.Element,Ie.Event=a.Event,Ie.Touch=a.Touch||Ae,Ie.PointerEvent=a.PointerEvent||a.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ae(){}var z=Ie,se={init:function(n){var a=z.Element,l=n.navigator||{};se.supportsTouch="ontouchstart"in n||S.func(n.DocumentTouch)&&z.document instanceof n.DocumentTouch,se.supportsPointerEvent=l.pointerEnabled!==!1&&!!z.PointerEvent,se.isIOS=/iP(hone|od|ad)/.test(l.platform),se.isIOS7=/iP(hone|od|ad)/.test(l.platform)&&/OS 7[^\d]/.test(l.appVersion),se.isIe9=/MSIE 9/.test(l.userAgent),se.isOperaMobile=l.appName==="Opera"&&se.supportsTouch&&/Presto/.test(l.userAgent),se.prefixedMatchesSelector="matches"in a.prototype?"matches":"webkitMatchesSelector"in a.prototype?"webkitMatchesSelector":"mozMatchesSelector"in a.prototype?"mozMatchesSelector":"oMatchesSelector"in a.prototype?"oMatchesSelector":"msMatchesSelector",se.pEventTypes=se.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,se.wheelEvent=z.document&&"onmousewheel"in z.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},te=se;function ue(n,a){if(n.contains)return n.contains(a);for(;a;){if(a===n)return!0;a=a.parentNode}return!1}function Re(n,a){for(;S.element(n);){if(Z(n,a))return n;n=Qe(n)}return null}function Qe(n){var a=n.parentNode;if(S.docFrag(a)){for(;(a=a.host)&&S.docFrag(a););return a}return a}function Z(n,a){return R!==L&&(a=a.replace(/\/deep\//g," ")),n[te.prefixedMatchesSelector](a)}var O=function(n){return n.parentNode||n.host};function W(n,a){for(var l,u=[],d=n;(l=O(d))&&d!==a&&l!==d.ownerDocument;)u.unshift(d),d=l;return u}function ce(n,a,l){for(;S.element(n);){if(Z(n,a))return!0;if((n=Qe(n))===l)return Z(n,a)}return!1}function xe(n){return n.correspondingUseElement||n}function ke(n){var a=n instanceof z.SVGElement?n.getBoundingClientRect():n.getClientRects()[0];return a&&{left:a.left,right:a.right,top:a.top,bottom:a.bottom,width:a.width||a.right-a.left,height:a.height||a.bottom-a.top}}function Ke(n){var a,l=ke(n);if(!te.isIOS7&&l){var u={x:(a=(a=v(n))||R).scrollX||a.document.documentElement.scrollLeft,y:a.scrollY||a.document.documentElement.scrollTop};l.left+=u.x,l.right+=u.x,l.top+=u.y,l.bottom+=u.y}return l}function ae(n){for(var a=[];n;)a.push(n),n=Qe(n);return a}function J(n){return!!S.string(n)&&(z.document.querySelector(n),!0)}function k(n,a){for(var l in a)n[l]=a[l];return n}function be(n,a,l){return n==="parent"?Qe(l):n==="self"?a.getRect(l):Re(l,n)}function Ce(n,a,l,u){var d=n;return S.string(d)?d=be(d,a,l):S.func(d)&&(d=d.apply(void 0,u)),S.element(d)&&(d=Ke(d)),d}function me(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function Q(n){return!n||"x"in n&&"y"in n||((n=k({},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 ee(n,a,l){n.left&&(a.left+=l.x),n.right&&(a.right+=l.x),n.top&&(a.top+=l.y),n.bottom&&(a.bottom+=l.y),a.width=a.right-a.left,a.height=a.bottom-a.top}function pe(n,a,l){var u=l&&n.options[l];return me(Ce(u&&u.origin||n.options.origin,n,a,[n&&a]))||{x:0,y:0}}function Se(n,a){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(A){return!0},u=arguments.length>3?arguments[3]:void 0;if(u=u||{},S.string(n)&&n.search(" ")!==-1&&(n=Ge(n)),S.array(n))return n.forEach(function(A){return Se(A,a,l,u)}),u;if(S.object(n)&&(a=n,n=""),S.func(a)&&l(n))u[n]=u[n]||[],u[n].push(a);else if(S.array(a))for(var d=0,h=a;d<h.length;d++){var D=h[d];Se(n,D,l,u)}else if(S.object(a))for(var E in a)Se(Ge(E).map(function(A){return"".concat(n).concat(A)}),a[E],l,u);return u}function Ge(n){return n.trim().split(/ +/)}var dt=function(n,a){return Math.sqrt(n*n+a*a)},w=["webkit","moz"];function I(n,a){n.__set||(n.__set={});var l=function(d){if(w.some(function(h){return d.indexOf(h)===0}))return 1;typeof n[d]!="function"&&d!=="__set"&&Object.defineProperty(n,d,{get:function(){return d in n.__set?n.__set[d]:n.__set[d]=a[d]},set:function(h){n.__set[d]=h},configurable:!0})};for(var u in a)l(u);return n}function Y(n,a){n.page=n.page||{},n.page.x=a.page.x,n.page.y=a.page.y,n.client=n.client||{},n.client.x=a.client.x,n.client.y=a.client.y,n.timeStamp=a.timeStamp}function le(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function B(n){return n instanceof z.Event||n instanceof z.Touch}function de(n,a,l){return n=n||"page",(l=l||{}).x=a[n+"X"],l.y=a[n+"Y"],l}function Pe(n,a){return a=a||{x:0,y:0},te.isOperaMobile&&B(n)?(de("screen",n,a),a.x+=window.scrollX,a.y+=window.scrollY):de("page",n,a),a}function re(n){return S.number(n.pointerId)?n.pointerId:n.identifier}function U(n,a,l){var u=a.length>1?G(a):a[0];Pe(u,n.page),function(d,h){h=h||{},te.isOperaMobile&&B(d)?de("screen",d,h):de("client",d,h)}(u,n.client),n.timeStamp=l}function H(n){var a=[];return S.array(n)?(a[0]=n[0],a[1]=n[1]):n.type==="touchend"?n.touches.length===1?(a[0]=n.touches[0],a[1]=n.changedTouches[0]):n.touches.length===0&&(a[0]=n.changedTouches[0],a[1]=n.changedTouches[1]):(a[0]=n.touches[0],a[1]=n.touches[1]),a}function G(n){for(var a={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},l=0;l<n.length;l++){var u=n[l];for(var d in a)a[d]+=u[d]}for(var h in a)a[h]/=n.length;return a}function De(n){if(!n.length)return null;var a=H(n),l=Math.min(a[0].pageX,a[1].pageX),u=Math.min(a[0].pageY,a[1].pageY),d=Math.max(a[0].pageX,a[1].pageX),h=Math.max(a[0].pageY,a[1].pageY);return{x:l,y:u,left:l,top:u,right:d,bottom:h,width:d-l,height:h-u}}function ve(n,a){var l=a+"X",u=a+"Y",d=H(n),h=d[0][l]-d[1][l],D=d[0][u]-d[1][u];return dt(h,D)}function X(n,a){var l=a+"X",u=a+"Y",d=H(n),h=d[1][l]-d[0][l],D=d[1][u]-d[0][u];return 180*Math.atan2(D,h)/Math.PI}function he(n){return S.string(n.pointerType)?n.pointerType:S.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof z.Touch?"touch":"mouse"}function ie(n){var a=S.func(n.composedPath)?n.composedPath():n.path;return[xe(a?a[0]:n.target),xe(n.currentTarget)]}var Me=function(){function n(a){s(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=a}return p(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Me.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var fe=function(n,a){for(var l=0;l<a.length;l++){var u=a[l];n.push(u)}return n},Ne=function(n){return fe([],n)},j=function(n,a){for(var l=0;l<n.length;l++)if(a(n[l],l,n))return l;return-1},ze=function(n,a){return n[j(n,a)]},ge=function(n){b(l,n);var a=q(l);function l(u,d,h){var D;s(this,l),(D=a.call(this,d._interaction)).dropzone=void 0,D.dragEvent=void 0,D.relatedTarget=void 0,D.draggable=void 0,D.propagationStopped=!1,D.immediatePropagationStopped=!1;var E=h==="dragleave"?u.prev:u.cur,A=E.element,K=E.dropzone;return D.type=h,D.target=A,D.currentTarget=A,D.dropzone=K,D.dragEvent=d,D.relatedTarget=d.target,D.draggable=d.interactable,D.timeStamp=d.timeStamp,D}return p(l,[{key:"reject",value:function(){var u=this,d=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&d.cur.dropzone===this.dropzone&&d.cur.element===this.target)if(d.prev.dropzone=this.dropzone,d.prev.element=this.target,d.rejected=!0,d.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var h=d.activeDrops,D=j(h,function(A){var K=A.dropzone,M=A.element;return K===u.dropzone&&M===u.target});d.activeDrops.splice(D,1);var E=new l(d,this.dragEvent,"dropdeactivate");E.dropzone=this.dropzone,E.target=this.target,this.dropzone.fire(E)}else this.dropzone.fire(new l(d,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),l}(Me);function We(n,a){for(var l=0,u=n.slice();l<u.length;l++){var d=u[l],h=d.dropzone,D=d.element;a.dropzone=h,a.target=D,h.fire(a),a.propagationStopped=a.immediatePropagationStopped=!1}}function st(n,a){for(var l=function(h,D){for(var E=[],A=0,K=h.interactables.list;A<K.length;A++){var M=K[A];if(M.options.drop.enabled){var ne=M.options.drop.accept;if(!(S.element(ne)&&ne!==D||S.string(ne)&&!Z(D,ne)||S.func(ne)&&!ne({dropzone:M,draggableElement:D})))for(var _e=0,je=M.getAllElements();_e<je.length;_e++){var Le=je[_e];Le!==D&&E.push({dropzone:M,element:Le,rect:M.getRect(Le)})}}}return E}(n,a),u=0;u<l.length;u++){var d=l[u];d.rect=d.dropzone.getRect(d.element)}return l}function Ye(n,a,l){for(var u=n.dropState,d=n.interactable,h=n.element,D=[],E=0,A=u.activeDrops;E<A.length;E++){var K=A[E],M=K.dropzone,ne=K.element,_e=K.rect,je=M.dropCheck(a,l,d,h,ne,_e);D.push(je?ne:null)}var Le=function(qe){for(var it,lt,ht,Tt=[],Vt=0;Vt<qe.length;Vt++){var xt=qe[Vt],Bt=qe[it];if(xt&&Vt!==it)if(Bt){var ra=O(xt),Wt=O(Bt);if(ra!==xt.ownerDocument)if(Wt!==xt.ownerDocument)if(ra!==Wt){Tt=Tt.length?Tt:W(Bt);var da=void 0;if(Bt instanceof z.HTMLElement&&xt instanceof z.SVGElement&&!(xt instanceof z.SVGSVGElement)){if(xt===Wt)continue;da=xt.ownerSVGElement}else da=xt;for(var ga=W(da,Bt.ownerDocument),Ca=0;ga[Ca]&&ga[Ca]===Tt[Ca];)Ca++;var Rn=[ga[Ca-1],ga[Ca],Tt[Ca]];if(Rn[0])for(var xn=Rn[0].lastChild;xn;){if(xn===Rn[1]){it=Vt,Tt=ga;break}if(xn===Rn[2])break;xn=xn.previousSibling}}else ht=Bt,(parseInt(v(lt=xt).getComputedStyle(lt).zIndex,10)||0)>=(parseInt(v(ht).getComputedStyle(ht).zIndex,10)||0)&&(it=Vt);else it=Vt}else it=Vt}return it}(D);return u.activeDrops[Le]||null}function tt(n,a,l){var u=n.dropState,d={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return l.type==="dragstart"&&(d.activate=new ge(u,l,"dropactivate"),d.activate.target=null,d.activate.dropzone=null),l.type==="dragend"&&(d.deactivate=new ge(u,l,"dropdeactivate"),d.deactivate.target=null,d.deactivate.dropzone=null),u.rejected||(u.cur.element!==u.prev.element&&(u.prev.dropzone&&(d.leave=new ge(u,l,"dragleave"),l.dragLeave=d.leave.target=u.prev.element,l.prevDropzone=d.leave.dropzone=u.prev.dropzone),u.cur.dropzone&&(d.enter=new ge(u,l,"dragenter"),l.dragEnter=u.cur.element,l.dropzone=u.cur.dropzone)),l.type==="dragend"&&u.cur.dropzone&&(d.drop=new ge(u,l,"drop"),l.dropzone=u.cur.dropzone,l.relatedTarget=u.cur.element),l.type==="dragmove"&&u.cur.dropzone&&(d.move=new ge(u,l,"dropmove"),l.dropzone=u.cur.dropzone)),d}function Ve(n,a){var l=n.dropState,u=l.activeDrops,d=l.cur,h=l.prev;a.leave&&h.dropzone.fire(a.leave),a.enter&&d.dropzone.fire(a.enter),a.move&&d.dropzone.fire(a.move),a.drop&&d.dropzone.fire(a.drop),a.deactivate&&We(u,a.deactivate),l.prev.dropzone=d.dropzone,l.prev.element=d.element}function pt(n,a){var l=n.interaction,u=n.iEvent,d=n.event;if(u.type==="dragmove"||u.type==="dragend"){var h=l.dropState;a.dynamicDrop&&(h.activeDrops=st(a,l.element));var D=u,E=Ye(l,D,d);h.rejected=h.rejected&&!!E&&E.dropzone===h.cur.dropzone&&E.element===h.cur.element,h.cur.dropzone=E&&E.dropzone,h.cur.element=E&&E.element,h.events=tt(l,0,D)}}var Ze={id:"actions/drop",install:function(n){var a=n.actions,l=n.interactStatic,u=n.Interactable,d=n.defaults;n.usePlugin(Ee),u.prototype.dropzone=function(h){return function(D,E){if(S.object(E)){if(D.options.drop.enabled=E.enabled!==!1,E.listeners){var A=Se(E.listeners),K=Object.keys(A).reduce(function(ne,_e){return ne[/^(enter|leave)/.test(_e)?"drag".concat(_e):/^(activate|deactivate|move)/.test(_e)?"drop".concat(_e):_e]=A[_e],ne},{}),M=D.options.drop.listeners;M&&D.off(M),D.on(K),D.options.drop.listeners=K}return S.func(E.ondrop)&&D.on("drop",E.ondrop),S.func(E.ondropactivate)&&D.on("dropactivate",E.ondropactivate),S.func(E.ondropdeactivate)&&D.on("dropdeactivate",E.ondropdeactivate),S.func(E.ondragenter)&&D.on("dragenter",E.ondragenter),S.func(E.ondragleave)&&D.on("dragleave",E.ondragleave),S.func(E.ondropmove)&&D.on("dropmove",E.ondropmove),/^(pointer|center)$/.test(E.overlap)?D.options.drop.overlap=E.overlap:S.number(E.overlap)&&(D.options.drop.overlap=Math.max(Math.min(1,E.overlap),0)),"accept"in E&&(D.options.drop.accept=E.accept),"checker"in E&&(D.options.drop.checker=E.checker),D}return S.bool(E)?(D.options.drop.enabled=E,D):D.options.drop}(this,h)},u.prototype.dropCheck=function(h,D,E,A,K,M){return function(ne,_e,je,Le,qe,it,lt){var ht=!1;if(!(lt=lt||ne.getRect(it)))return!!ne.options.drop.checker&&ne.options.drop.checker(_e,je,ht,ne,it,Le,qe);var Tt=ne.options.drop.overlap;if(Tt==="pointer"){var Vt=pe(Le,qe,"drag"),xt=Pe(_e);xt.x+=Vt.x,xt.y+=Vt.y;var Bt=xt.x>lt.left&&xt.x<lt.right,ra=xt.y>lt.top&&xt.y<lt.bottom;ht=Bt&&ra}var Wt=Le.getRect(qe);if(Wt&&Tt==="center"){var da=Wt.left+Wt.width/2,ga=Wt.top+Wt.height/2;ht=da>=lt.left&&da<=lt.right&&ga>=lt.top&&ga<=lt.bottom}return Wt&&S.number(Tt)&&(ht=Math.max(0,Math.min(lt.right,Wt.right)-Math.max(lt.left,Wt.left))*Math.max(0,Math.min(lt.bottom,Wt.bottom)-Math.max(lt.top,Wt.top))/(Wt.width*Wt.height)>=Tt),ne.options.drop.checker&&(ht=ne.options.drop.checker(_e,je,ht,ne,it,Le,qe)),ht}(this,h,D,E,A,K,M)},l.dynamicDrop=function(h){return S.bool(h)?(n.dynamicDrop=h,l):n.dynamicDrop},k(a.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),a.methodDict.drop="dropzone",n.dynamicDrop=!1,d.actions.drop=Ze.defaults},listeners:{"interactions:before-action-start":function(n){var a=n.interaction;a.prepared.name==="drag"&&(a.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,a){var l=n.interaction,u=(n.event,n.iEvent);if(l.prepared.name==="drag"){var d=l.dropState;d.activeDrops=[],d.events={},d.activeDrops=st(a,l.element),d.events=tt(l,0,u),d.events.activate&&(We(d.activeDrops,d.events.activate),a.fire("actions/drop:start",{interaction:l,dragEvent:u}))}},"interactions:action-move":pt,"interactions:after-action-move":function(n,a){var l=n.interaction,u=n.iEvent;if(l.prepared.name==="drag"){var d=l.dropState;Ve(l,d.events),a.fire("actions/drop:move",{interaction:l,dragEvent:u}),d.events={}}},"interactions:action-end":function(n,a){if(n.interaction.prepared.name==="drag"){var l=n.interaction,u=n.iEvent;pt(n,a),Ve(l,l.dropState.events),a.fire("actions/drop:end",{interaction:l,dragEvent:u})}},"interactions:stop":function(n){var a=n.interaction;if(a.prepared.name==="drag"){var l=a.dropState;l&&(l.activeDrops=null,l.events=null,l.cur.dropzone=null,l.cur.element=null,l.prev.dropzone=null,l.prev.element=null,l.rejected=!1)}}},getActiveDrops:st,getDrop:Ye,getDropEvents:tt,fireDropEvents:Ve,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},$e=Ze;function rt(n){var a=n.interaction,l=n.iEvent,u=n.phase;if(a.prepared.name==="gesture"){var d=a.pointers.map(function(K){return K.pointer}),h=u==="start",D=u==="end",E=a.interactable.options.deltaSource;if(l.touches=[d[0],d[1]],h)l.distance=ve(d,E),l.box=De(d),l.scale=1,l.ds=0,l.angle=X(d,E),l.da=0,a.gesture.startDistance=l.distance,a.gesture.startAngle=l.angle;else if(D||a.pointers.length<2){var A=a.prevEvent;l.distance=A.distance,l.box=A.box,l.scale=A.scale,l.ds=0,l.angle=A.angle,l.da=0}else l.distance=ve(d,E),l.box=De(d),l.scale=l.distance/a.gesture.startDistance,l.angle=X(d,E),l.ds=l.scale-a.gesture.scale,l.da=l.angle-a.gesture.angle;a.gesture.distance=l.distance,a.gesture.angle=l.angle,S.number(l.scale)&&l.scale!==1/0&&!isNaN(l.scale)&&(a.gesture.scale=l.scale)}}var mt={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var a=n.actions,l=n.Interactable,u=n.defaults;l.prototype.gesturable=function(d){return S.object(d)?(this.options.gesture.enabled=d.enabled!==!1,this.setPerAction("gesture",d),this.setOnEvents("gesture",d),this):S.bool(d)?(this.options.gesture.enabled=d,this):this.options.gesture},a.map.gesture=mt,a.methodDict.gesture="gesturable",u.actions.gesture=mt.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 a=n.interactable.options.gesture;if(a&&a.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},wt=mt;function He(n,a,l,u,d,h,D){if(!a)return!1;if(a===!0){var E=S.number(h.width)?h.width:h.right-h.left,A=S.number(h.height)?h.height:h.bottom-h.top;if(D=Math.min(D,Math.abs((n==="left"||n==="right"?E:A)/2)),E<0&&(n==="left"?n="right":n==="right"&&(n="left")),A<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var K=E>=0?h.left:h.right;return l.x<K+D}if(n==="top"){var M=A>=0?h.top:h.bottom;return l.y<M+D}if(n==="right")return l.x>(E>=0?h.right:h.left)-D;if(n==="bottom")return l.y>(A>=0?h.bottom:h.top)-D}return!!S.element(u)&&(S.element(a)?a===u:ce(u,a,d))}function ot(n){var a=n.iEvent,l=n.interaction;if(l.prepared.name==="resize"&&l.resizeAxes){var u=a;l.interactable.options.resize.square?(l.resizeAxes==="y"?u.delta.x=u.delta.y:u.delta.y=u.delta.x,u.axes="xy"):(u.axes=l.resizeAxes,l.resizeAxes==="x"?u.delta.y=0:l.resizeAxes==="y"&&(u.delta.x=0))}}var bt,Fe,Ue={id:"actions/resize",before:["actions/drag"],install:function(n){var a=n.actions,l=n.browser,u=n.Interactable,d=n.defaults;Ue.cursors=function(h){return h.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"}}(l),Ue.defaultMargin=l.supportsTouch||l.supportsPointerEvent?20:10,u.prototype.resizable=function(h){return function(D,E,A){return S.object(E)?(D.options.resize.enabled=E.enabled!==!1,D.setPerAction("resize",E),D.setOnEvents("resize",E),S.string(E.axis)&&/^x$|^y$|^xy$/.test(E.axis)?D.options.resize.axis=E.axis:E.axis===null&&(D.options.resize.axis=A.defaults.actions.resize.axis),S.bool(E.preserveAspectRatio)?D.options.resize.preserveAspectRatio=E.preserveAspectRatio:S.bool(E.square)&&(D.options.resize.square=E.square),D):S.bool(E)?(D.options.resize.enabled=E,D):D.options.resize}(this,h,n)},a.map.resize=Ue,a.methodDict.resize="resizable",d.actions.resize=Ue.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(a){var l=a.iEvent,u=a.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var d=l,h=u.rect;u._rects={start:k({},h),corrected:k({},h),previous:k({},h),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},d.edges=u.prepared.edges,d.rect=u._rects.corrected,d.deltaRect=u._rects.delta}})(n),ot(n)},"interactions:action-move":function(n){(function(a){var l=a.iEvent,u=a.interaction;if(u.prepared.name==="resize"&&u.prepared.edges){var d=l,h=u.interactable.options.resize.invert,D=h==="reposition"||h==="negate",E=u.rect,A=u._rects,K=A.start,M=A.corrected,ne=A.delta,_e=A.previous;if(k(_e,M),D){if(k(M,E),h==="reposition"){if(M.top>M.bottom){var je=M.top;M.top=M.bottom,M.bottom=je}if(M.left>M.right){var Le=M.left;M.left=M.right,M.right=Le}}}else M.top=Math.min(E.top,K.bottom),M.bottom=Math.max(E.bottom,K.top),M.left=Math.min(E.left,K.right),M.right=Math.max(E.right,K.left);for(var qe in M.width=M.right-M.left,M.height=M.bottom-M.top,M)ne[qe]=M[qe]-_e[qe];d.edges=u.prepared.edges,d.rect=M,d.deltaRect=ne}})(n),ot(n)},"interactions:action-end":function(n){var a=n.iEvent,l=n.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var u=a;u.edges=l.prepared.edges,u.rect=l._rects.corrected,u.deltaRect=l._rects.delta}},"auto-start:check":function(n){var a=n.interaction,l=n.interactable,u=n.element,d=n.rect,h=n.buttons;if(d){var D=k({},a.coords.cur.page),E=l.options.resize;if(E&&E.enabled&&(!a.pointerIsDown||!/mouse|pointer/.test(a.pointerType)||(h&E.mouseButtons)!=0)){if(S.object(E.edges)){var A={left:!1,right:!1,top:!1,bottom:!1};for(var K in A)A[K]=He(K,E.edges[K],D,a._latestPointer.eventTarget,u,d,E.margin||Ue.defaultMargin);A.left=A.left&&!A.right,A.top=A.top&&!A.bottom,(A.left||A.right||A.top||A.bottom)&&(n.action={name:"resize",edges:A})}else{var M=E.axis!=="y"&&D.x>d.right-Ue.defaultMargin,ne=E.axis!=="x"&&D.y>d.bottom-Ue.defaultMargin;(M||ne)&&(n.action={name:"resize",axes:(M?"x":"")+(ne?"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 a=n.edges,l=n.axis,u=n.name,d=Ue.cursors,h=null;if(l)h=d[u+l];else if(a){for(var D="",E=0,A=["top","bottom","left","right"];E<A.length;E++){var K=A[E];a[K]&&(D+=K)}h=d[D]}return h},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Xe=Ue,Te={id:"actions",install:function(n){n.usePlugin(wt),n.usePlugin(Xe),n.usePlugin(Ee),n.usePlugin($e)}},V=0,ye={request:function(n){return bt(n)},cancel:function(n){return Fe(n)},init:function(n){if(bt=n.requestAnimationFrame,Fe=n.cancelAnimationFrame,!bt)for(var a=["ms","moz","webkit","o"],l=0;l<a.length;l++){var u=a[l];bt=n["".concat(u,"RequestAnimationFrame")],Fe=n["".concat(u,"CancelAnimationFrame")]||n["".concat(u,"CancelRequestAnimationFrame")]}bt=bt&&bt.bind(n),Fe=Fe&&Fe.bind(n),bt||(bt=function(d){var h=Date.now(),D=Math.max(0,16-(h-V)),E=n.setTimeout(function(){d(h+D)},D);return V=h+D,E},Fe=function(d){return clearTimeout(d)})}},we={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){we.isScrolling=!0,ye.cancel(we.i),n.autoScroll=we,we.interaction=n,we.prevTime=we.now(),we.i=ye.request(we.scroll)},stop:function(){we.isScrolling=!1,we.interaction&&(we.interaction.autoScroll=null),ye.cancel(we.i)},scroll:function(){var n=we.interaction,a=n.interactable,l=n.element,u=n.prepared.name,d=a.options[u].autoScroll,h=at(d.container,a,l),D=we.now(),E=(D-we.prevTime)/1e3,A=d.speed*E;if(A>=1){var K={x:we.x*A,y:we.y*A};if(K.x||K.y){var M=et(h);S.window(h)?h.scrollBy(K.x,K.y):h&&(h.scrollLeft+=K.x,h.scrollTop+=K.y);var ne=et(h),_e={x:ne.x-M.x,y:ne.y-M.y};(_e.x||_e.y)&&a.fire({type:"autoscroll",target:l,interactable:a,delta:_e,interaction:n,container:h})}we.prevTime=D}we.isScrolling&&(ye.cancel(we.i),we.i=ye.request(we.scroll))},check:function(n,a){var l;return(l=n.options[a].autoScroll)==null?void 0:l.enabled},onInteractionMove:function(n){var a=n.interaction,l=n.pointer;if(a.interacting()&&we.check(a.interactable,a.prepared.name))if(a.simulation)we.x=we.y=0;else{var u,d,h,D,E=a.interactable,A=a.element,K=a.prepared.name,M=E.options[K].autoScroll,ne=at(M.container,E,A);if(S.window(ne))D=l.clientX<we.margin,u=l.clientY<we.margin,d=l.clientX>ne.innerWidth-we.margin,h=l.clientY>ne.innerHeight-we.margin;else{var _e=ke(ne);D=l.clientX<_e.left+we.margin,u=l.clientY<_e.top+we.margin,d=l.clientX>_e.right-we.margin,h=l.clientY>_e.bottom-we.margin}we.x=d?1:D?-1:0,we.y=h?1:u?-1:0,we.isScrolling||(we.margin=M.margin,we.speed=M.speed,we.start(a))}}};function at(n,a,l){return(S.string(n)?be(n,a,l):n)||v(l)}function et(n){return S.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var Et={id:"auto-scroll",install:function(n){var a=n.defaults,l=n.actions;n.autoScroll=we,we.now=function(){return n.now()},l.phaselessTypes.autoscroll=!0,a.perAction.autoScroll=we.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,we.stop(),we.interaction&&(we.interaction=null)},"interactions:stop":we.stop,"interactions:action-move":function(n){return we.onInteractionMove(n)}}},_t=Et;function ut(n,a){var l=!1;return function(){return l||(R.console.warn(a),l=!0),n.apply(this,arguments)}}function ft(n,a){return n.name=a.name,n.axis=a.axis,n.edges=a.edges,n}function vt(n){return S.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function yt(n){return S.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var $t={id:"auto-start/interactableMethods",install:function(n){var a=n.Interactable;a.prototype.getAction=function(l,u,d,h){var D=function(E,A,K,M,ne){var _e=E.getRect(M),je=A.buttons||{0:1,1:4,3:8,4:16}[A.button],Le={action:null,interactable:E,interaction:K,element:M,rect:_e,buttons:je};return ne.fire("auto-start:check",Le),Le.action}(this,u,d,h,n);return this.options.actionChecker?this.options.actionChecker(l,u,D,this,h,d):D},a.prototype.ignoreFrom=ut(function(l){return this._backCompatOption("ignoreFrom",l)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),a.prototype.allowFrom=ut(function(l){return this._backCompatOption("allowFrom",l)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),a.prototype.actionChecker=yt,a.prototype.styleCursor=vt}};function kt(n,a,l,u,d){return a.testIgnoreAllow(a.options[n.name],l,u)&&a.options[n.name].enabled&&qt(a,l,n,d)?n:null}function Rt(n,a,l,u,d,h,D){for(var E=0,A=u.length;E<A;E++){var K=u[E],M=d[E],ne=K.getAction(a,l,n,M);if(ne){var _e=kt(ne,K,M,h,D);if(_e)return{action:_e,interactable:K,element:M}}}return{action:null,interactable:null,element:null}}function Pt(n,a,l,u,d){var h=[],D=[],E=u;function A(M){h.push(M),D.push(E)}for(;S.element(E);){h=[],D=[],d.interactables.forEachMatch(E,A);var K=Rt(n,a,l,h,D,u,d);if(K.action&&!K.interactable.options[K.action.name].manualStart)return K;E=Qe(E)}return{action:null,interactable:null,element:null}}function Kt(n,a,l){var u=a.action,d=a.interactable,h=a.element;u=u||{name:null},n.interactable=d,n.element=h,ft(n.prepared,u),n.rect=d&&u.name?d.getRect(h):null,jt(n,l),l.fire("autoStart:prepared",{interaction:n})}function qt(n,a,l,u){var d=n.options,h=d[l.name].max,D=d[l.name].maxPerElement,E=u.autoStart.maxInteractions,A=0,K=0,M=0;if(!(h&&D&&E))return!1;for(var ne=0,_e=u.interactions.list;ne<_e.length;ne++){var je=_e[ne],Le=je.prepared.name;if(je.interacting()&&(++A>=E||je.interactable===n&&((K+=Le===l.name?1:0)>=h||je.element===a&&(M++,Le===l.name&&M>=D))))return!1}return E>0}function Jt(n,a){return S.number(n)?(a.autoStart.maxInteractions=n,this):a.autoStart.maxInteractions}function ta(n,a,l){var u=l.autoStart.cursorElement;u&&u!==n&&(u.style.cursor=""),n.ownerDocument.documentElement.style.cursor=a,n.style.cursor=a,l.autoStart.cursorElement=a?n:null}function jt(n,a){var l=n.interactable,u=n.element,d=n.prepared;if(n.pointerType==="mouse"&&l&&l.options.styleCursor){var h="";if(d.name){var D=l.options[d.name].cursorChecker;h=S.func(D)?D(d,l,u,n._interacting):a.actions.map[d.name].getCursor(d)}ta(n.element,h||"",a)}else a.autoStart.cursorElement&&ta(a.autoStart.cursorElement,"",a)}var Fa={id:"auto-start/base",before:["actions"],install:function(n){var a=n.interactStatic,l=n.defaults;n.usePlugin($t),l.base.actionChecker=null,l.base.styleCursor=!0,k(l.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),a.maxInteractions=function(u){return Jt(u,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:qt,cursorElement:null}},listeners:{"interactions:down":function(n,a){var l=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget;l.interacting()||Kt(l,Pt(l,u,d,h,a),a)},"interactions:move":function(n,a){(function(l,u){var d=l.interaction,h=l.pointer,D=l.event,E=l.eventTarget;d.pointerType!=="mouse"||d.pointerIsDown||d.interacting()||Kt(d,Pt(d,h,D,E,u),u)})(n,a),function(l,u){var d=l.interaction;if(d.pointerIsDown&&!d.interacting()&&d.pointerWasMoved&&d.prepared.name){u.fire("autoStart:before-start",l);var h=d.interactable,D=d.prepared.name;D&&h&&(h.options[D].manualStart||!qt(h,d.element,d.prepared,u)?d.stop():(d.start(d.prepared,h,d.element),jt(d,u)))}}(n,a)},"interactions:stop":function(n,a){var l=n.interaction,u=l.interactable;u&&u.options.styleCursor&&ta(l.element,"",a)}},maxInteractions:Jt,withinInteractionLimit:qt,validateAction:kt},wa=Fa,ja={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,a){var l=n.interaction,u=n.eventTarget,d=n.dx,h=n.dy;if(l.prepared.name==="drag"){var D=Math.abs(d),E=Math.abs(h),A=l.interactable.options.drag,K=A.startAxis,M=D>E?"x":D<E?"y":"xy";if(l.prepared.axis=A.lockAxis==="start"?M[0]:A.lockAxis,M!=="xy"&&K!=="xy"&&K!==M){l.prepared.name=null;for(var ne=u,_e=function(Le){if(Le!==l.interactable){var qe=l.interactable.options.drag;if(!qe.manualStart&&Le.testIgnoreAllow(qe,ne,u)){var it=Le.getAction(l.downPointer,l.downEvent,l,ne);if(it&&it.name==="drag"&&function(lt,ht){if(!ht)return!1;var Tt=ht.options.drag.startAxis;return lt==="xy"||Tt==="xy"||Tt===lt}(M,Le)&&wa.validateAction(it,Le,ne,u,a))return Le}}};S.element(ne);){var je=a.interactables.forEachMatch(ne,_e);if(je){l.prepared.name="drag",l.interactable=je,l.element=ne;break}ne=Qe(ne)}}}}}};function Da(n){var a=n.prepared&&n.prepared.name;if(!a)return null;var l=n.interactable.options;return l[a].hold||l[a].delay}var Ua={id:"auto-start/hold",install:function(n){var a=n.defaults;n.usePlugin(wa),a.perAction.hold=0,a.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var a=n.interaction,l=Da(a);l>0&&(a.autoStartHoldTimer=setTimeout(function(){a.start(a.prepared,a.interactable,a.element)},l))},"interactions:move":function(n){var a=n.interaction,l=n.duplicate;a.autoStartHoldTimer&&a.pointerWasMoved&&!l&&(clearTimeout(a.autoStartHoldTimer),a.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var a=n.interaction;Da(a)>0&&(a.prepared.name=null)}},getHoldDuration:Da},Ka=Ua,Wa={id:"auto-start",install:function(n){n.usePlugin(wa),n.usePlugin(Ka),n.usePlugin(ja)}},Ha=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):S.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function qa(n){var a=n.interaction,l=n.event;a.interactable&&a.interactable.checkAndPreventDefault(l)}var Na={id:"core/interactablePreventDefault",install:function(n){var a=n.Interactable;a.prototype.preventDefault=Ha,a.prototype.checkAndPreventDefault=function(l){return function(u,d,h){var D=u.options.preventDefault;if(D!=="never")if(D!=="always"){if(d.events.supportsPassive&&/^touch(start|move)$/.test(h.type)){var E=v(h.target).document,A=d.getDocOptions(E);if(!A||!A.events||A.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(h.type)||S.element(h.target)&&Z(h.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||h.preventDefault()}else h.preventDefault()}(this,n,l)},n.interactions.docEvents.push({type:"dragstart",listener:function(l){for(var u=0,d=n.interactions.list;u<d.length;u++){var h=d[u];if(h.element&&(h.element===l.target||ue(h.element,l.target)))return void h.interactable.checkAndPreventDefault(l)}}})},listeners:["down","move","up","cancel"].reduce(function(n,a){return n["interactions:".concat(a)]=qa,n},{})};function ya(n,a){if(a.phaselessTypes[n])return!0;for(var l in a.map)if(n.indexOf(l)===0&&n.substr(l.length)in a.phases)return!0;return!1}function fa(n){var a={};for(var l in n){var u=n[l];S.plainObject(u)?a[l]=fa(u):S.array(u)?a[l]=Ne(u):a[l]=u}return a}var _a=function(){function n(a){s(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=a,this.result=ba(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return p(n,[{key:"start",value:function(a,l){var u,d,h=a.phase,D=this.interaction,E=function(K){var M=K.interactable.options[K.prepared.name],ne=M.modifiers;return ne&&ne.length?ne:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(_e){var je=M[_e];return je&&je.enabled&&{options:je,methods:je._methods}}).filter(function(_e){return!!_e})}(D);this.prepareStates(E),this.startEdges=k({},D.edges),this.edges=k({},this.startEdges),this.startOffset=(u=D.rect,d=l,u?{left:d.x-u.left,top:d.y-u.top,right:u.right-d.x,bottom:u.bottom-d.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var A=this.fillArg({phase:h,pageCoords:l,preEnd:!1});return this.result=ba(),this.startAll(A),this.result=this.setAll(A)}},{key:"fillArg",value:function(a){var l=this.interaction;return a.interaction=l,a.interactable=l.interactable,a.element=l.element,a.rect||(a.rect=l.rect),a.edges||(a.edges=this.startEdges),a.startOffset=this.startOffset,a}},{key:"startAll",value:function(a){for(var l=0,u=this.states;l<u.length;l++){var d=u[l];d.methods.start&&(a.state=d,d.methods.start(a))}}},{key:"setAll",value:function(a){var l=a.phase,u=a.preEnd,d=a.skipModifiers,h=a.rect,D=a.edges;a.coords=k({},a.pageCoords),a.rect=k({},h),a.edges=k({},D);for(var E=d?this.states.slice(d):this.states,A=ba(a.coords,a.rect),K=0;K<E.length;K++){var M,ne=E[K],_e=ne.options,je=k({},a.coords),Le=null;(M=ne.methods)!=null&&M.set&&this.shouldDo(_e,u,l)&&(a.state=ne,Le=ne.methods.set(a),ee(a.edges,a.rect,{x:a.coords.x-je.x,y:a.coords.y-je.y})),A.eventProps.push(Le)}k(this.edges,a.edges),A.delta.x=a.coords.x-a.pageCoords.x,A.delta.y=a.coords.y-a.pageCoords.y,A.rectDelta.left=a.rect.left-h.left,A.rectDelta.right=a.rect.right-h.right,A.rectDelta.top=a.rect.top-h.top,A.rectDelta.bottom=a.rect.bottom-h.bottom;var qe=this.result.coords,it=this.result.rect;if(qe&&it){var lt=A.rect.left!==it.left||A.rect.right!==it.right||A.rect.top!==it.top||A.rect.bottom!==it.bottom;A.changed=lt||qe.x!==A.coords.x||qe.y!==A.coords.y}return A}},{key:"applyToInteraction",value:function(a){var l=this.interaction,u=a.phase,d=l.coords.cur,h=l.coords.start,D=this.result,E=this.startDelta,A=D.delta;u==="start"&&k(this.startDelta,D.delta);for(var K=0,M=[[h,E],[d,A]];K<M.length;K++){var ne=M[K],_e=ne[0],je=ne[1];_e.page.x+=je.x,_e.page.y+=je.y,_e.client.x+=je.x,_e.client.y+=je.y}var Le=this.result.rectDelta,qe=a.rect||l.rect;qe.left+=Le.left,qe.right+=Le.right,qe.top+=Le.top,qe.bottom+=Le.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top}},{key:"setAndApply",value:function(a){var l=this.interaction,u=a.phase,d=a.preEnd,h=a.skipModifiers,D=this.setAll(this.fillArg({preEnd:d,phase:u,pageCoords:a.modifiedCoords||l.coords.cur.page}));if(this.result=D,!D.changed&&(!h||h<this.states.length)&&l.interacting())return!1;if(a.modifiedCoords){var E=l.coords.cur.page,A={x:a.modifiedCoords.x-E.x,y:a.modifiedCoords.y-E.y};D.coords.x+=A.x,D.coords.y+=A.y,D.delta.x+=A.x,D.delta.y+=A.y}this.applyToInteraction(a)}},{key:"beforeEnd",value:function(a){var l=a.interaction,u=a.event,d=this.states;if(d&&d.length){for(var h=!1,D=0;D<d.length;D++){var E=d[D];a.state=E;var A=E.options,K=E.methods,M=K.beforeEnd&&K.beforeEnd(a);if(M)return this.endResult=M,!1;h=h||!h&&this.shouldDo(A,!0,a.phase,!0)}h&&l.move({event:u,preEnd:!0})}}},{key:"stop",value:function(a){var l=a.interaction;if(this.states&&this.states.length){var u=k({states:this.states,interactable:l.interactable,element:l.element,rect:null},a);this.fillArg(u);for(var d=0,h=this.states;d<h.length;d++){var D=h[d];u.state=D,D.methods.stop&&D.methods.stop(u)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(a){this.states=[];for(var l=0;l<a.length;l++){var u=a[l],d=u.options,h=u.methods,D=u.name;this.states.push({options:d,methods:h,index:l,name:D})}return this.states}},{key:"restoreInteractionCoords",value:function(a){var l=a.interaction,u=l.coords,d=l.rect,h=l.modification;if(h.result){for(var D=h.startDelta,E=h.result,A=E.delta,K=E.rectDelta,M=0,ne=[[u.start,D],[u.cur,A]];M<ne.length;M++){var _e=ne[M],je=_e[0],Le=_e[1];je.page.x-=Le.x,je.page.y-=Le.y,je.client.x-=Le.x,je.client.y-=Le.y}d.left-=K.left,d.right-=K.right,d.top-=K.top,d.bottom-=K.bottom}}},{key:"shouldDo",value:function(a,l,u,d){return!(!a||a.enabled===!1||d&&!a.endOnly||a.endOnly&&!l||u==="start"&&!a.setStart)}},{key:"copyFrom",value:function(a){this.startOffset=a.startOffset,this.startDelta=a.startDelta,this.startEdges=a.startEdges,this.edges=a.edges,this.states=a.states.map(function(l){return fa(l)}),this.result=ba(k({},a.result.coords),k({},a.result.rect))}},{key:"destroy",value:function(){for(var a in this)this[a]=null}}]),n}();function ba(n,a){return{rect:a,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ca(n,a){var l=n.defaults,u={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},d=function(h){var D=h||{};for(var E in D.enabled=D.enabled!==!1,l)E in D||(D[E]=l[E]);var A={options:D,methods:u,name:a,enable:function(){return D.enabled=!0,A},disable:function(){return D.enabled=!1,A}};return A};return a&&typeof a=="string"&&(d._defaults=l,d._methods=u),d}function ma(n){var a=n.iEvent,l=n.interaction.modification.result;l&&(a.modifiers=l.eventProps)}var Xa={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var a=n.interaction;a.modification=new _a(a)},"interactions:before-action-start":function(n){var a=n.interaction,l=n.interaction.modification;l.start(n,a.coords.start.page),a.edges=l.edges,l.applyToInteraction(n)},"interactions:before-action-move":function(n){var a=n.interaction,l=a.modification,u=l.setAndApply(n);return a.edges=l.edges,u},"interactions:before-action-end":function(n){var a=n.interaction,l=a.modification,u=l.beforeEnd(n);return a.edges=l.startEdges,u},"interactions:action-start":ma,"interactions:action-move":ma,"interactions:action-end":ma,"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)}}},Aa=Xa,Va={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Ea=function(n){b(l,n);var a=q(l);function l(u,d,h,D,E,A,K){var M;s(this,l),(M=a.call(this,u)).relatedTarget=null,M.screenX=void 0,M.screenY=void 0,M.button=void 0,M.buttons=void 0,M.ctrlKey=void 0,M.shiftKey=void 0,M.altKey=void 0,M.metaKey=void 0,M.page=void 0,M.client=void 0,M.delta=void 0,M.rect=void 0,M.x0=void 0,M.y0=void 0,M.t0=void 0,M.dt=void 0,M.duration=void 0,M.clientX0=void 0,M.clientY0=void 0,M.velocity=void 0,M.speed=void 0,M.swipe=void 0,M.axes=void 0,M.preEnd=void 0,E=E||u.element;var ne=u.interactable,_e=(ne&&ne.options||Va).deltaSource,je=pe(ne,E,h),Le=D==="start",qe=D==="end",it=Le?N(M):u.prevEvent,lt=Le?u.coords.start:qe?{page:it.page,client:it.client,timeStamp:u.coords.cur.timeStamp}:u.coords.cur;return M.page=k({},lt.page),M.client=k({},lt.client),M.rect=k({},u.rect),M.timeStamp=lt.timeStamp,qe||(M.page.x-=je.x,M.page.y-=je.y,M.client.x-=je.x,M.client.y-=je.y),M.ctrlKey=d.ctrlKey,M.altKey=d.altKey,M.shiftKey=d.shiftKey,M.metaKey=d.metaKey,M.button=d.button,M.buttons=d.buttons,M.target=E,M.currentTarget=E,M.preEnd=A,M.type=K||h+(D||""),M.interactable=ne,M.t0=Le?u.pointers[u.pointers.length-1].downTime:it.t0,M.x0=u.coords.start.page.x-je.x,M.y0=u.coords.start.page.y-je.y,M.clientX0=u.coords.start.client.x-je.x,M.clientY0=u.coords.start.client.y-je.y,M.delta=Le||qe?{x:0,y:0}:{x:M[_e].x-it[_e].x,y:M[_e].y-it[_e].y},M.dt=u.coords.delta.timeStamp,M.duration=M.timeStamp-M.t0,M.velocity=k({},u.coords.velocity[_e]),M.speed=dt(M.velocity.x,M.velocity.y),M.swipe=qe||D==="inertiastart"?M.getSwipe():null,M}return p(l,[{key:"getSwipe",value:function(){var u=this._interaction;if(u.prevEvent.speed<600||this.timeStamp-u.prevEvent.timeStamp>150)return null;var d=180*Math.atan2(u.prevEvent.velocityY,u.prevEvent.velocityX)/Math.PI;d<0&&(d+=360);var h=112.5<=d&&d<247.5,D=202.5<=d&&d<337.5;return{up:D,down:!D&&22.5<=d&&d<157.5,left:h,right:!h&&(292.5<=d||d<67.5),angle:d,speed:u.prevEvent.speed,velocity:{x:u.prevEvent.velocityX,y:u.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),l}(Me);Object.defineProperties(Ea.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 Ya=p(function n(a,l,u,d,h){s(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=a,this.pointer=l,this.event=u,this.downTime=d,this.downTarget=h}),Ga=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),Oa=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Ja=0,Za=function(){function n(a){var l=this,u=a.pointerType,d=a.scopeFire;s(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=ut(function(M){this.move(M)},"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=Ja++,this._scopeFire=d,this.pointerType=u;var h=this;this._proxy={};var D=function(M){Object.defineProperty(l._proxy,M,{get:function(){return h[M]}})};for(var E in Ga)D(E);var A=function(M){Object.defineProperty(l._proxy,M,{value:function(){return h[M].apply(h,arguments)}})};for(var K in Oa)A(K);this._scopeFire("interactions:new",{interaction:this})}return p(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(a,l,u){var d=this.updatePointer(a,l,u,!0),h=this.pointers[d];this._scopeFire("interactions:down",{pointer:a,event:l,eventTarget:u,pointerIndex:d,pointerInfo:h,type:"down",interaction:this})}},{key:"start",value:function(a,l,u){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(a.name==="gesture"?2:1)||!l.options[a.name].enabled)&&(ft(this.prepared,a),this.interactable=l,this.element=u,this.rect=l.getRect(u),this.edges=this.prepared.edges?k({},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(a,l,u){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(a,l,u,!1);var d,h,D=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(d=this.coords.cur.client.x-this.coords.start.client.x,h=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=dt(d,h)>this.pointerMoveTolerance);var E,A,K,M=this.getPointerIndex(a),ne={pointer:a,pointerIndex:M,pointerInfo:this.pointers[M],event:l,type:"move",eventTarget:u,dx:d,dy:h,duplicate:D,interaction:this};D||(E=this.coords.velocity,A=this.coords.delta,K=Math.max(A.timeStamp/1e3,.001),E.page.x=A.page.x/K,E.page.y=A.page.y/K,E.client.x=A.client.x/K,E.client.y=A.client.y/K,E.timeStamp=K),this._scopeFire("interactions:move",ne),D||this.simulation||(this.interacting()&&(ne.type=null,this.move(ne)),this.pointerWasMoved&&Y(this.coords.prev,this.coords.cur))}},{key:"move",value:function(a){a&&a.event||le(this.coords.delta),(a=k({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},a||{})).phase="move",this._doPhase(a)}},{key:"pointerUp",value:function(a,l,u,d){var h=this.getPointerIndex(a);h===-1&&(h=this.updatePointer(a,l,u,!1));var D=/cancel$/i.test(l.type)?"cancel":"up";this._scopeFire("interactions:".concat(D),{pointer:a,pointerIndex:h,pointerInfo:this.pointers[h],event:l,eventTarget:u,type:D,curEventTarget:d,interaction:this}),this.simulation||this.end(l),this.removePointer(a,l)}},{key:"documentBlur",value:function(a){this.end(a),this._scopeFire("interactions:blur",{event:a,type:"blur",interaction:this})}},{key:"end",value:function(a){var l;this._ending=!0,a=a||this._latestPointer.event,this.interacting()&&(l=this._doPhase({event:a,interaction:this,phase:"end"})),this._ending=!1,l===!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(a){var l=re(a);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:j(this.pointers,function(u){return u.id===l})}},{key:"getPointerInfo",value:function(a){return this.pointers[this.getPointerIndex(a)]}},{key:"updatePointer",value:function(a,l,u,d){var h,D,E,A=re(a),K=this.getPointerIndex(a),M=this.pointers[K];return d=d!==!1&&(d||/(down|start)$/i.test(l.type)),M?M.pointer=a:(M=new Ya(A,a,l,null,null),K=this.pointers.length,this.pointers.push(M)),U(this.coords.cur,this.pointers.map(function(ne){return ne.pointer}),this._now()),h=this.coords.delta,D=this.coords.prev,E=this.coords.cur,h.page.x=E.page.x-D.page.x,h.page.y=E.page.y-D.page.y,h.client.x=E.client.x-D.client.x,h.client.y=E.client.y-D.client.y,h.timeStamp=E.timeStamp-D.timeStamp,d&&(this.pointerIsDown=!0,M.downTime=this.coords.cur.timeStamp,M.downTarget=u,I(this.downPointer,a),this.interacting()||(Y(this.coords.start,this.coords.cur),Y(this.coords.prev,this.coords.cur),this.downEvent=l,this.pointerWasMoved=!1)),this._updateLatestPointer(a,l,u),this._scopeFire("interactions:update-pointer",{pointer:a,event:l,eventTarget:u,down:d,pointerInfo:M,pointerIndex:K,interaction:this}),K}},{key:"removePointer",value:function(a,l){var u=this.getPointerIndex(a);if(u!==-1){var d=this.pointers[u];this._scopeFire("interactions:remove-pointer",{pointer:a,event:l,eventTarget:null,pointerIndex:u,pointerInfo:d,interaction:this}),this.pointers.splice(u,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(a,l,u){this._latestPointer.pointer=a,this._latestPointer.event=l,this._latestPointer.eventTarget=u}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(a,l,u,d){return new Ea(this,a,this.prepared.name,l,this.element,u,d)}},{key:"_fireEvent",value:function(a){var l;(l=this.interactable)==null||l.fire(a),(!this.prevEvent||a.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=a)}},{key:"_doPhase",value:function(a){var l=a.event,u=a.phase,d=a.preEnd,h=a.type,D=this.rect;if(D&&u==="move"&&(ee(this.edges,D,this.coords.delta[this.interactable.options.deltaSource]),D.width=D.right-D.left,D.height=D.bottom-D.top),this._scopeFire("interactions:before-action-".concat(u),a)===!1)return!1;var E=a.iEvent=this._createPreparedEvent(l,u,d,h);return this._scopeFire("interactions:action-".concat(u),a),u==="start"&&(this.prevEvent=E),this._fireEvent(E),this._scopeFire("interactions:after-action-".concat(u),a),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function Ma(n){Ct(n.interaction)}function Ct(n){if(!function(l){return!(!l.offset.pending.x&&!l.offset.pending.y)}(n))return!1;var a=n.offset.pending;return nt(n.coords.cur,a),nt(n.coords.delta,a),ee(n.edges,n.rect,a),a.x=0,a.y=0,!0}function aa(n){var a=n.x,l=n.y;this.offset.pending.x+=a,this.offset.pending.y+=l,this.offset.total.x+=a,this.offset.total.y+=l}function nt(n,a){var l=n.page,u=n.client,d=a.x,h=a.y;l.x+=d,l.y+=h,u.x+=d,u.y+=h}Oa.offsetBy="";var Xt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=aa},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(a){a.pointerIsDown&&(nt(a.coords.cur,a.offset.total),a.offset.pending.x=0,a.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":Ma,"interactions:before-action-move":Ma,"interactions:before-action-end":function(n){var a=n.interaction;if(Ct(a))return a.move({offset:!0}),a.end(),!1},"interactions:stop":function(n){var a=n.interaction;a.offset.total.x=0,a.offset.total.y=0,a.offset.pending.x=0,a.offset.pending.y=0}}},St=Xt,Dt=function(){function n(a){s(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=a}return p(n,[{key:"start",value:function(a){var l=this.interaction,u=It(l);if(!u||!u.enabled)return!1;var d=l.coords.velocity.client,h=dt(d.x,d.y),D=this.modification||(this.modification=new _a(l));if(D.copyFrom(l.modification),this.t0=l._now(),this.allowResume=u.allowResume,this.v0=h,this.currentOffset={x:0,y:0},this.startCoords=l.coords.cur.page,this.modifierArg=D.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-l.coords.cur.timeStamp<50&&h>u.minSpeed&&h>u.endSpeed)this.startInertia();else{if(D.result=D.setAll(this.modifierArg),!D.result.changed)return!1;this.startSmoothEnd()}return l.modification.result.rect=null,l.offsetBy(this.targetOffset),l._doPhase({interaction:l,event:a,phase:"inertiastart"}),l.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),l.modification.result.rect=null,this.active=!0,l.simulation=this,!0}},{key:"startInertia",value:function(){var a=this,l=this.interaction.coords.velocity.client,u=It(this.interaction),d=u.resistance,h=-Math.log(u.endSpeed/this.v0)/d;this.targetOffset={x:(l.x-h)/d,y:(l.y-h)/d},this.te=h,this.lambda_v0=d/this.v0,this.one_ve_v0=1-u.endSpeed/this.v0;var D=this.modification,E=this.modifierArg;E.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},D.result=D.setAll(E),D.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+D.result.delta.x,y:this.targetOffset.y+D.result.delta.y}),this.onNextFrame(function(){return a.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var a=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 a.smoothEndTick()})}},{key:"onNextFrame",value:function(a){var l=this;this.timeout=ye.request(function(){l.active&&a()})}},{key:"inertiaTick",value:function(){var a,l,u,d,h,D,E,A=this,K=this.interaction,M=It(K).resistance,ne=(K._now()-this.t0)/1e3;if(ne<this.te){var _e,je=1-(Math.exp(-M*ne)-this.lambda_v0)/this.one_ve_v0;this.isModified?(a=0,l=0,u=this.targetOffset.x,d=this.targetOffset.y,h=this.modifiedOffset.x,D=this.modifiedOffset.y,_e={x:Lt(E=je,a,u,h),y:Lt(E,l,d,D)}):_e={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var Le={x:_e.x-this.currentOffset.x,y:_e.y-this.currentOffset.y};this.currentOffset.x+=Le.x,this.currentOffset.y+=Le.y,K.offsetBy(Le),K.move(),this.onNextFrame(function(){return A.inertiaTick()})}else K.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var a=this,l=this.interaction,u=l._now()-this.t0,d=It(l).smoothEndDuration;if(u<d){var h={x:At(u,0,this.targetOffset.x,d),y:At(u,0,this.targetOffset.y,d)},D={x:h.x-this.currentOffset.x,y:h.y-this.currentOffset.y};this.currentOffset.x+=D.x,this.currentOffset.y+=D.y,l.offsetBy(D),l.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return a.smoothEndTick()})}else l.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(a){var l=a.pointer,u=a.event,d=a.eventTarget,h=this.interaction;h.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),h.updatePointer(l,u,d,!0),h._doPhase({interaction:h,event:u,phase:"resume"}),Y(h.coords.prev,h.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,ye.cancel(this.timeout)}}]),n}();function It(n){var a=n.interactable,l=n.prepared;return a&&a.options&&l.name&&a.options[l.name].inertia}var Mt={id:"inertia",before:["modifiers","actions"],install:function(n){var a=n.defaults;n.usePlugin(St),n.usePlugin(Aa),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,a.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var a=n.interaction;a.inertia=new Dt(a)},"interactions:before-action-end":function(n){var a=n.interaction,l=n.event;return(!a._interacting||a.simulation||!a.inertia.start(l))&&null},"interactions:down":function(n){var a=n.interaction,l=n.eventTarget,u=a.inertia;if(u.active)for(var d=l;S.element(d);){if(d===a.element){u.resume(n);break}d=Qe(d)}},"interactions:stop":function(n){var a=n.interaction.inertia;a.active&&a.stop()},"interactions:before-action-resume":function(n){var a=n.interaction.modification;a.stop(n),a.start(n,n.interaction.coords.cur.page),a.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":ma,"interactions:action-inertiastart":ma,"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 Lt(n,a,l,u){var d=1-n;return d*d*a+2*d*n*l+n*n*u}function At(n,a,l,u){return-l*(n/=u)*(n-2)+a}var na=Mt;function Yt(n,a){for(var l=0;l<a.length;l++){var u=a[l];if(n.immediatePropagationStopped)break;u(n)}}var za=function(){function n(a){s(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=k({},a||{})}return p(n,[{key:"fire",value:function(a){var l,u=this.global;(l=this.types[a.type])&&Yt(a,l),!a.propagationStopped&&u&&(l=u[a.type])&&Yt(a,l)}},{key:"on",value:function(a,l){var u=Se(a,l);for(a in u)this.types[a]=fe(this.types[a]||[],u[a])}},{key:"off",value:function(a,l){var u=Se(a,l);for(a in u){var d=this.types[a];if(d&&d.length)for(var h=0,D=u[a];h<D.length;h++){var E=D[h],A=d.indexOf(E);A!==-1&&d.splice(A,1)}}}},{key:"getRect",value:function(a){return null}}]),n}(),Qa=function(){function n(a){s(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=a,I(this,a)}return p(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function Ra(n){return S.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function en(n,a){return n===a||(typeof n=="boolean"?!!a.capture===n&&!a.passive:!!n.capture==!!a.capture&&!!n.passive==!!a.passive)}var An={id:"events",install:function(n){var a,l=[],u={},d=[],h={add:D,remove:E,addDelegate:function(M,ne,_e,je,Le){var qe=Ra(Le);if(!u[_e]){u[_e]=[];for(var it=0;it<d.length;it++){var lt=d[it];D(lt,_e,A),D(lt,_e,K,!0)}}var ht=u[_e],Tt=ze(ht,function(Vt){return Vt.selector===M&&Vt.context===ne});Tt||(Tt={selector:M,context:ne,listeners:[]},ht.push(Tt)),Tt.listeners.push({func:je,options:qe})},removeDelegate:function(M,ne,_e,je,Le){var qe,it=Ra(Le),lt=u[_e],ht=!1;if(lt)for(qe=lt.length-1;qe>=0;qe--){var Tt=lt[qe];if(Tt.selector===M&&Tt.context===ne){for(var Vt=Tt.listeners,xt=Vt.length-1;xt>=0;xt--){var Bt=Vt[xt];if(Bt.func===je&&en(Bt.options,it)){Vt.splice(xt,1),Vt.length||(lt.splice(qe,1),E(ne,_e,A),E(ne,_e,K,!0)),ht=!0;break}}if(ht)break}}},delegateListener:A,delegateUseCapture:K,delegatedEvents:u,documents:d,targets:l,supportsOptions:!1,supportsPassive:!1};function D(M,ne,_e,je){if(M.addEventListener){var Le=Ra(je),qe=ze(l,function(it){return it.eventTarget===M});qe||(qe={eventTarget:M,events:{}},l.push(qe)),qe.events[ne]||(qe.events[ne]=[]),ze(qe.events[ne],function(it){return it.func===_e&&en(it.options,Le)})||(M.addEventListener(ne,_e,h.supportsOptions?Le:Le.capture),qe.events[ne].push({func:_e,options:Le}))}}function E(M,ne,_e,je){if(M.addEventListener&&M.removeEventListener){var Le=j(l,function(ra){return ra.eventTarget===M}),qe=l[Le];if(qe&&qe.events)if(ne!=="all"){var it=!1,lt=qe.events[ne];if(lt){if(_e==="all"){for(var ht=lt.length-1;ht>=0;ht--){var Tt=lt[ht];E(M,ne,Tt.func,Tt.options)}return}for(var Vt=Ra(je),xt=0;xt<lt.length;xt++){var Bt=lt[xt];if(Bt.func===_e&&en(Bt.options,Vt)){M.removeEventListener(ne,_e,h.supportsOptions?Vt:Vt.capture),lt.splice(xt,1),lt.length===0&&(delete qe.events[ne],it=!0);break}}}it&&!Object.keys(qe.events).length&&l.splice(Le,1)}else for(ne in qe.events)qe.events.hasOwnProperty(ne)&&E(M,ne,"all")}}function A(M,ne){for(var _e=Ra(ne),je=new Qa(M),Le=u[M.type],qe=ie(M)[0],it=qe;S.element(it);){for(var lt=0;lt<Le.length;lt++){var ht=Le[lt],Tt=ht.selector,Vt=ht.context;if(Z(it,Tt)&&ue(Vt,qe)&&ue(Vt,it)){var xt=ht.listeners;je.currentTarget=it;for(var Bt=0;Bt<xt.length;Bt++){var ra=xt[Bt];en(ra.options,_e)&&ra.func(je)}}}it=Qe(it)}}function K(M){return A(M,!0)}return(a=n.document)==null||a.createElement("div").addEventListener("test",null,{get capture(){return h.supportsOptions=!0},get passive(){return h.supportsPassive=!0}}),n.events=h,h}},dn={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var a=0,l=dn.methodOrder;a<l.length;a++){var u=l[a],d=dn[u](n);if(d)return d}return null},simulationResume:function(n){var a=n.pointerType,l=n.eventType,u=n.eventTarget,d=n.scope;if(!/down|start/i.test(l))return null;for(var h=0,D=d.interactions.list;h<D.length;h++){var E=D[h],A=u;if(E.simulation&&E.simulation.allowResume&&E.pointerType===a)for(;A;){if(A===E.element)return E;A=Qe(A)}}return null},mouseOrPen:function(n){var a,l=n.pointerId,u=n.pointerType,d=n.eventType,h=n.scope;if(u!=="mouse"&&u!=="pen")return null;for(var D=0,E=h.interactions.list;D<E.length;D++){var A=E[D];if(A.pointerType===u){if(A.simulation&&!yn(A,l))continue;if(A.interacting())return A;a||(a=A)}}if(a)return a;for(var K=0,M=h.interactions.list;K<M.length;K++){var ne=M[K];if(!(ne.pointerType!==u||/down/i.test(d)&&ne.simulation))return ne}return null},hasPointer:function(n){for(var a=n.pointerId,l=0,u=n.scope.interactions.list;l<u.length;l++){var d=u[l];if(yn(d,a))return d}return null},idle:function(n){for(var a=n.pointerType,l=0,u=n.scope.interactions.list;l<u.length;l++){var d=u[l];if(d.pointers.length===1){var h=d.interactable;if(h&&(!h.options.gesture||!h.options.gesture.enabled))continue}else if(d.pointers.length>=2)continue;if(!d.interacting()&&a===d.pointerType)return d}return null}};function yn(n,a){return n.pointers.some(function(l){return l.id===a})}var pn=dn,ha=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function tn(n,a){return function(l){var u=a.interactions.list,d=he(l),h=ie(l),D=h[0],E=h[1],A=[];if(/^touch/.test(l.type)){a.prevTouchTime=a.now();for(var K=0,M=l.changedTouches;K<M.length;K++){var ne=M[K],_e={pointer:ne,pointerId:re(ne),pointerType:d,eventType:l.type,eventTarget:D,curEventTarget:E,scope:a},je=fn(_e);A.push([_e.pointer,_e.eventTarget,_e.curEventTarget,je])}}else{var Le=!1;if(!te.supportsPointerEvent&&/mouse/.test(l.type)){for(var qe=0;qe<u.length&&!Le;qe++)Le=u[qe].pointerType!=="mouse"&&u[qe].pointerIsDown;Le=Le||a.now()-a.prevTouchTime<500||l.timeStamp===0}if(!Le){var it={pointer:l,pointerId:re(l),pointerType:d,eventType:l.type,curEventTarget:E,eventTarget:D,scope:a},lt=fn(it);A.push([it.pointer,it.eventTarget,it.curEventTarget,lt])}}for(var ht=0;ht<A.length;ht++){var Tt=A[ht],Vt=Tt[0],xt=Tt[1],Bt=Tt[2];Tt[3][n](Vt,l,xt,Bt)}}}function fn(n){var a=n.pointerType,l=n.scope,u={interaction:pn.search(n),searchDetails:n};return l.fire("interactions:find",u),u.interaction||l.interactions.new({pointerType:a})}function ua(n,a){var l=n.doc,u=n.scope,d=n.options,h=u.interactions.docEvents,D=u.events,E=D[a];for(var A in u.browser.isIOS&&!d.events&&(d.events={passive:!1}),D.delegatedEvents)E(l,A,D.delegateListener),E(l,A,D.delegateUseCapture,!0);for(var K=d&&d.events,M=0;M<h.length;M++){var ne=h[M];E(l,ne.type,ne.listener,K)}}var Vn={id:"core/interactions",install:function(n){for(var a={},l=0;l<ha.length;l++){var u=ha[l];a[u]=tn(u,n)}var d,h=te.pEventTypes;function D(){for(var E=0,A=n.interactions.list;E<A.length;E++){var K=A[E];if(K.pointerIsDown&&K.pointerType==="touch"&&!K._interacting)for(var M=function(){var je=_e[ne];n.documents.some(function(Le){return ue(Le.doc,je.downTarget)})||K.removePointer(je.pointer,je.event)},ne=0,_e=K.pointers;ne<_e.length;ne++)M()}}(d=z.PointerEvent?[{type:h.down,listener:D},{type:h.down,listener:a.pointerDown},{type:h.move,listener:a.pointerMove},{type:h.up,listener:a.pointerUp},{type:h.cancel,listener:a.pointerUp}]:[{type:"mousedown",listener:a.pointerDown},{type:"mousemove",listener:a.pointerMove},{type:"mouseup",listener:a.pointerUp},{type:"touchstart",listener:D},{type:"touchstart",listener:a.pointerDown},{type:"touchmove",listener:a.pointerMove},{type:"touchend",listener:a.pointerUp},{type:"touchcancel",listener:a.pointerUp}]).push({type:"blur",listener:function(E){for(var A=0,K=n.interactions.list;A<K.length;A++)K[A].documentBlur(E)}}),n.prevTouchTime=0,n.Interaction=function(E){b(K,E);var A=q(K);function K(){return s(this,K),A.apply(this,arguments)}return p(K,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(M){n.interactions.pointerMoveTolerance=M}},{key:"_now",value:function(){return n.now()}}]),K}(Za),n.interactions={list:[],new:function(E){E.scopeFire=function(K,M){return n.fire(K,M)};var A=new n.Interaction(E);return n.interactions.list.push(A),A},listeners:a,docEvents:d,pointerMoveTolerance:1},n.usePlugin(Na)},listeners:{"scope:add-document":function(n){return ua(n,"add")},"scope:remove-document":function(n){return ua(n,"remove")},"interactable:unset":function(n,a){for(var l=n.interactable,u=a.interactions.list.length-1;u>=0;u--){var d=a.interactions.list[u];d.interactable===l&&(d.stop(),a.fire("interactions:destroy",{interaction:d}),d.destroy(),a.interactions.list.length>2&&a.interactions.list.splice(u,1))}}},onDocSignal:ua,doOnInteractions:tn,methodNames:ha},Pa=Vn,$a=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}($a||{}),hr=function(){function n(a,l,u,d){s(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new za,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=l.actions,this.target=a,this._context=l.context||u,this._win=v(J(a)?this._context:a),this._doc=this._win.document,this._scopeEvents=d,this.set(l)}return p(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(a,l){return S.func(l.onstart)&&this.on("".concat(a,"start"),l.onstart),S.func(l.onmove)&&this.on("".concat(a,"move"),l.onmove),S.func(l.onend)&&this.on("".concat(a,"end"),l.onend),S.func(l.oninertiastart)&&this.on("".concat(a,"inertiastart"),l.oninertiastart),this}},{key:"updatePerActionListeners",value:function(a,l,u){var d,h=this,D=(d=this._actions.map[a])==null?void 0:d.filterEventType,E=function(A){return(D==null||D(A))&&ya(A,h._actions)};(S.array(l)||S.object(l))&&this._onOff($a.Off,a,l,void 0,E),(S.array(u)||S.object(u))&&this._onOff($a.On,a,u,void 0,E)}},{key:"setPerAction",value:function(a,l){var u=this._defaults;for(var d in l){var h=d,D=this.options[a],E=l[h];h==="listeners"&&this.updatePerActionListeners(a,D.listeners,E),S.array(E)?D[h]=Ne(E):S.plainObject(E)?(D[h]=k(D[h]||{},fa(E)),S.object(u.perAction[h])&&"enabled"in u.perAction[h]&&(D[h].enabled=E.enabled!==!1)):S.bool(E)&&S.object(u.perAction[h])?D[h].enabled=E:D[h]=E}}},{key:"getRect",value:function(a){return a=a||(S.element(this.target)?this.target:null),S.string(this.target)&&(a=a||this._context.querySelector(this.target)),Ke(a)}},{key:"rectChecker",value:function(a){var l=this;return S.func(a)?(this.getRect=function(u){var d=k({},a.apply(l,u));return"width"in d||(d.width=d.right-d.left,d.height=d.bottom-d.top),d},this):a===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(a,l){if(J(l)||S.object(l)){for(var u in this.options[a]=l,this._actions.map)this.options[u][a]=l;return this}return this.options[a]}},{key:"origin",value:function(a){return this._backCompatOption("origin",a)}},{key:"deltaSource",value:function(a){return a==="page"||a==="client"?(this.options.deltaSource=a,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var a=this.target;return S.string(a)?Array.from(this._context.querySelectorAll(a)):S.func(a)&&a.getAllElements?a.getAllElements():S.element(a)?[a]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(a){return this._context===a.ownerDocument||ue(this._context,a)}},{key:"testIgnoreAllow",value:function(a,l,u){return!this.testIgnore(a.ignoreFrom,l,u)&&this.testAllow(a.allowFrom,l,u)}},{key:"testAllow",value:function(a,l,u){return!a||!!S.element(u)&&(S.string(a)?ce(u,a,l):!!S.element(a)&&ue(a,u))}},{key:"testIgnore",value:function(a,l,u){return!(!a||!S.element(u))&&(S.string(a)?ce(u,a,l):!!S.element(a)&&ue(a,u))}},{key:"fire",value:function(a){return this.events.fire(a),this}},{key:"_onOff",value:function(a,l,u,d,h){S.object(l)&&!S.array(l)&&(d=u,u=null);var D=Se(l,u,h);for(var E in D){E==="wheel"&&(E=te.wheelEvent);for(var A=0,K=D[E];A<K.length;A++){var M=K[A];ya(E,this._actions)?this.events[a===$a.On?"on":"off"](E,M):S.string(this.target)?this._scopeEvents[a===$a.On?"addDelegate":"removeDelegate"](this.target,this._context,E,M,d):this._scopeEvents[a===$a.On?"add":"remove"](this.target,E,M,d)}}return this}},{key:"on",value:function(a,l,u){return this._onOff($a.On,a,l,u)}},{key:"off",value:function(a,l,u){return this._onOff($a.Off,a,l,u)}},{key:"set",value:function(a){var l=this._defaults;for(var u in S.object(a)||(a={}),this.options=fa(l.base),this._actions.methodDict){var d=u,h=this._actions.methodDict[d];this.options[d]={},this.setPerAction(d,k(k({},l.perAction),l.actions[d])),this[h](a[d])}for(var D in a)D!=="getRect"?S.func(this[D])&&this[D](a[D]):this.rectChecker(a.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var a in this._scopeEvents.delegatedEvents)for(var l=this._scopeEvents.delegatedEvents[a],u=l.length-1;u>=0;u--){var d=l[u],h=d.selector,D=d.context,E=d.listeners;h===this.target&&D===this._context&&l.splice(u,1);for(var A=E.length-1;A>=0;A--)this._scopeEvents.removeDelegate(this.target,this._context,a,E[A][0],E[A][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),vr=function(){function n(a){var l=this;s(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=a,a.addListeners({"interactable:unset":function(u){var d=u.interactable,h=d.target,D=S.string(h)?l.selectorMap[h]:h[l.scope.id],E=j(D,function(A){return A===d});D.splice(E,1)}})}return p(n,[{key:"new",value:function(a,l){l=k(l||{},{actions:this.scope.actions});var u=new this.scope.Interactable(a,l,this.scope.document,this.scope.events);return this.scope.addDocument(u._doc),this.list.push(u),S.string(a)?(this.selectorMap[a]||(this.selectorMap[a]=[]),this.selectorMap[a].push(u)):(u.target[this.scope.id]||Object.defineProperty(a,this.scope.id,{value:[],configurable:!0}),a[this.scope.id].push(u)),this.scope.fire("interactable:new",{target:a,options:l,interactable:u,win:this.scope._win}),u}},{key:"getExisting",value:function(a,l){var u=l&&l.context||this.scope.document,d=S.string(a),h=d?this.selectorMap[a]:a[this.scope.id];if(h)return ze(h,function(D){return D._context===u&&(d||D.inContext(a))})}},{key:"forEachMatch",value:function(a,l){for(var u=0,d=this.list;u<d.length;u++){var h=d[u],D=void 0;if((S.string(h.target)?S.element(a)&&Z(a,h.target):a===h.target)&&h.inContext(a)&&(D=l(h)),D!==void 0)return D}}}]),n}(),mr=function(){function n(){var a=this;s(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=te,this.defaults=fa(Va),this.Eventable=za,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(u){var d=function h(D,E){var A=u.interactables.getExisting(D,E);return A||((A=u.interactables.new(D,E)).events.global=h.globalEvents),A};return d.getPointerAverage=G,d.getTouchBBox=De,d.getTouchDistance=ve,d.getTouchAngle=X,d.getElementRect=Ke,d.getElementClientRect=ke,d.matchesSelector=Z,d.closest=Re,d.globalEvents={},d.version="1.10.27",d.scope=u,d.use=function(h,D){return this.scope.usePlugin(h,D),this},d.isSet=function(h,D){return!!this.scope.interactables.get(h,D&&D.context)},d.on=ut(function(h,D,E){if(S.string(h)&&h.search(" ")!==-1&&(h=h.trim().split(/ +/)),S.array(h)){for(var A=0,K=h;A<K.length;A++){var M=K[A];this.on(M,D,E)}return this}if(S.object(h)){for(var ne in h)this.on(ne,h[ne],D);return this}return ya(h,this.scope.actions)?this.globalEvents[h]?this.globalEvents[h].push(D):this.globalEvents[h]=[D]:this.scope.events.add(this.scope.document,h,D,{options:E}),this},"The interact.on() method is being deprecated"),d.off=ut(function(h,D,E){if(S.string(h)&&h.search(" ")!==-1&&(h=h.trim().split(/ +/)),S.array(h)){for(var A=0,K=h;A<K.length;A++){var M=K[A];this.off(M,D,E)}return this}if(S.object(h)){for(var ne in h)this.off(ne,h[ne],D);return this}var _e;return ya(h,this.scope.actions)?h in this.globalEvents&&(_e=this.globalEvents[h].indexOf(D))!==-1&&this.globalEvents[h].splice(_e,1):this.scope.events.remove(this.scope.document,h,D,E),this},"The interact.off() method is being deprecated"),d.debug=function(){return this.scope},d.supportsTouch=function(){return te.supportsTouch},d.supportsPointerEvent=function(){return te.supportsPointerEvent},d.stop=function(){for(var h=0,D=this.scope.interactions.list;h<D.length;h++)D[h].stop();return this},d.pointerMoveTolerance=function(h){return S.number(h)?(this.scope.interactions.pointerMoveTolerance=h,this):this.scope.interactions.pointerMoveTolerance},d.addDocument=function(h,D){this.scope.addDocument(h,D)},d.removeDocument=function(h){this.scope.removeDocument(h)},d}(this),this.InteractEvent=Ea,this.Interactable=void 0,this.interactables=new vr(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(u){return a.removeDocument(u.target)};var l=this;this.Interactable=function(u){b(h,u);var d=q(h);function h(){return s(this,h),d.apply(this,arguments)}return p(h,[{key:"_defaults",get:function(){return l.defaults}},{key:"set",value:function(D){return $(x(h.prototype),"set",this).call(this,D),l.fire("interactable:set",{options:D,interactable:this}),this}},{key:"unset",value:function(){$(x(h.prototype),"unset",this).call(this);var D=l.interactables.list.indexOf(this);D<0||(l.interactables.list.splice(D,1),l.fire("interactable:unset",{interactable:this}))}}]),h}(hr)}return p(n,[{key:"addListeners",value:function(a,l){this.listenerMaps.push({id:l,map:a})}},{key:"fire",value:function(a,l){for(var u=0,d=this.listenerMaps;u<d.length;u++){var h=d[u].map[a];if(h&&h(l,this,a)===!1)return!1}}},{key:"init",value:function(a){return this.isInitialized?this:function(l,u){return l.isInitialized=!0,S.window(u)&&g(u),z.init(u),te.init(u),ye.init(u),l.window=u,l.document=u.document,l.usePlugin(Pa),l.usePlugin(An),l}(this,a)}},{key:"pluginIsInstalled",value:function(a){var l=a.id;return l?!!this._plugins.map[l]:this._plugins.list.indexOf(a)!==-1}},{key:"usePlugin",value:function(a,l){if(!this.isInitialized)return this;if(this.pluginIsInstalled(a))return this;if(a.id&&(this._plugins.map[a.id]=a),this._plugins.list.push(a),a.install&&a.install(this,l),a.listeners&&a.before){for(var u=0,d=this.listenerMaps.length,h=a.before.reduce(function(E,A){return E[A]=!0,E[Do(A)]=!0,E},{});u<d;u++){var D=this.listenerMaps[u].id;if(D&&(h[D]||h[Do(D)]))break}this.listenerMaps.splice(u,0,{id:a.id,map:a.listeners})}else a.listeners&&this.listenerMaps.push({id:a.id,map:a.listeners});return this}},{key:"addDocument",value:function(a,l){if(this.getDocIndex(a)!==-1)return!1;var u=v(a);l=l?k({},l):{},this.documents.push({doc:a,options:l}),this.events.documents.push(a),a!==this.document&&this.events.add(u,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:a,window:u,scope:this,options:l})}},{key:"removeDocument",value:function(a){var l=this.getDocIndex(a),u=v(a),d=this.documents[l].options;this.events.remove(u,"unload",this.onWindowUnload),this.documents.splice(l,1),this.events.documents.splice(l,1),this.fire("scope:remove-document",{doc:a,window:u,scope:this,options:d})}},{key:"getDocIndex",value:function(a){for(var l=0;l<this.documents.length;l++)if(this.documents[l].doc===a)return l;return-1}},{key:"getDocOptions",value:function(a){var l=this.getDocIndex(a);return l===-1?null:this.documents[l].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function Do(n){return n&&n.replace(/\/.*$/,"")}var _o=new mr,la=_o.interactStatic,gr=typeof globalThis<"u"?globalThis:window;_o.init(gr);var yr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var a=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(u){var d=u[0],h=u[1];return d in n||h in n}),l=function(u,d){for(var h=n.range,D=n.limits,E=D===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:D,A=n.offset,K=A===void 0?{x:0,y:0}:A,M={range:h,grid:n,x:null,y:null},ne=0;ne<a.length;ne++){var _e=a[ne],je=_e[0],Le=_e[1],qe=Math.round((u-K.x)/n[je]),it=Math.round((d-K.y)/n[Le]);M[je]=Math.max(E.left,Math.min(E.right,qe*n[je]+K.x)),M[Le]=Math.max(E.top,Math.min(E.bottom,it*n[Le]+K.y))}return M};return l.grid=n,l.coordFields=a,l}}),br={id:"snappers",install:function(n){var a=n.interactStatic;a.snappers=k(a.snappers||{},yr),a.createSnapGrid=a.snappers.grid}},kr=br,xr={start:function(n){var a=n.state,l=n.rect,u=n.edges,d=n.pageCoords,h=a.options,D=h.ratio,E=h.enabled,A=a.options,K=A.equalDelta,M=A.modifiers;D==="preserve"&&(D=l.width/l.height),a.startCoords=k({},d),a.startRect=k({},l),a.ratio=D,a.equalDelta=K;var ne=a.linkedEdges={top:u.top||u.left&&!u.bottom,left:u.left||u.top&&!u.right,bottom:u.bottom||u.right&&!u.top,right:u.right||u.bottom&&!u.left};if(a.xIsPrimaryAxis=!(!u.left&&!u.right),a.equalDelta){var _e=(ne.left?1:-1)*(ne.top?1:-1);a.edgeSign={x:_e,y:_e}}else a.edgeSign={x:ne.left?-1:1,y:ne.top?-1:1};if(E!==!1&&k(u,ne),M!=null&&M.length){var je=new _a(n.interaction);je.copyFrom(n.interaction.modification),je.prepareStates(M),a.subModification=je,je.startAll(o({},n))}},set:function(n){var a=n.state,l=n.rect,u=n.coords,d=a.linkedEdges,h=k({},u),D=a.equalDelta?wr:Dr;if(k(n.edges,d),D(a,a.xIsPrimaryAxis,u,l),!a.subModification)return null;var E=k({},l);ee(d,E,{x:u.x-h.x,y:u.y-h.y});var A=a.subModification.setAll(o(o({},n),{},{rect:E,edges:d,pageCoords:u,prevCoords:u,prevRect:E})),K=A.delta;return A.changed&&(D(a,Math.abs(K.x)>Math.abs(K.y),A.coords,A.rect),k(u,A.coords)),A.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function wr(n,a,l){var u=n.startCoords,d=n.edgeSign;a?l.y=u.y+(l.x-u.x)*d.y:l.x=u.x+(l.y-u.y)*d.x}function Dr(n,a,l,u){var d=n.startRect,h=n.startCoords,D=n.ratio,E=n.edgeSign;if(a){var A=u.width/D;l.y=h.y+(A-d.height)*E.y}else{var K=u.height*D;l.x=h.x+(K-d.width)*E.x}}var _r=ca(xr,"aspectRatio"),Eo=function(){};Eo._defaults={};var On=Eo;function an(n,a,l){return S.func(n)?Ce(n,a.interactable,a.element,[l.x,l.y,a]):Ce(n,a.interactable,a.element)}var Mn={start:function(n){var a=n.rect,l=n.startOffset,u=n.state,d=n.interaction,h=n.pageCoords,D=u.options,E=D.elementRect,A=k({left:0,top:0,right:0,bottom:0},D.offset||{});if(a&&E){var K=an(D.restriction,d,h);if(K){var M=K.right-K.left-a.width,ne=K.bottom-K.top-a.height;M<0&&(A.left+=M,A.right+=M),ne<0&&(A.top+=ne,A.bottom+=ne)}A.left+=l.left-a.width*E.left,A.top+=l.top-a.height*E.top,A.right+=l.right-a.width*(1-E.right),A.bottom+=l.bottom-a.height*(1-E.bottom)}u.offset=A},set:function(n){var a=n.coords,l=n.interaction,u=n.state,d=u.options,h=u.offset,D=an(d.restriction,l,a);if(D){var E=function(A){return!A||"left"in A&&"top"in A||((A=k({},A)).left=A.x||0,A.top=A.y||0,A.right=A.right||A.left+A.width,A.bottom=A.bottom||A.top+A.height),A}(D);a.x=Math.max(Math.min(E.right-h.right,a.x),E.left+h.left),a.y=Math.max(Math.min(E.bottom-h.bottom,a.y),E.top+h.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Er=ca(Mn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},So={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function To(n,a){for(var l=0,u=["top","left","bottom","right"];l<u.length;l++){var d=u[l];d in n||(n[d]=a[d])}return n}var bn={noInner:Co,noOuter:So,start:function(n){var a,l=n.interaction,u=n.startOffset,d=n.state,h=d.options;h&&(a=me(an(h.offset,l,l.coords.start.page))),a=a||{x:0,y:0},d.offset={top:a.y+u.top,left:a.x+u.left,bottom:a.y-u.bottom,right:a.x-u.right}},set:function(n){var a=n.coords,l=n.edges,u=n.interaction,d=n.state,h=d.offset,D=d.options;if(l){var E=k({},a),A=an(D.inner,u,E)||{},K=an(D.outer,u,E)||{};To(A,Co),To(K,So),l.top?a.y=Math.min(Math.max(K.top+h.top,E.y),A.top+h.top):l.bottom&&(a.y=Math.max(Math.min(K.bottom+h.bottom,E.y),A.bottom+h.bottom)),l.left?a.x=Math.min(Math.max(K.left+h.left,E.x),A.left+h.left):l.right&&(a.x=Math.max(Math.min(K.right+h.right,E.x),A.right+h.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Cr=ca(bn,"restrictEdges"),Sr=k({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Mn.defaults),Tr=ca({start:Mn.start,set:Mn.set,defaults:Sr},"restrictRect"),Br={width:-1/0,height:-1/0},Ir={width:1/0,height:1/0},Nr=ca({start:function(n){return bn.start(n)},set:function(n){var a=n.interaction,l=n.state,u=n.rect,d=n.edges,h=l.options;if(d){var D=Q(an(h.min,a,n.coords))||Br,E=Q(an(h.max,a,n.coords))||Ir;l.options={endOnly:h.endOnly,inner:k({},bn.noInner),outer:k({},bn.noOuter)},d.top?(l.options.inner.top=u.bottom-D.height,l.options.outer.top=u.bottom-E.height):d.bottom&&(l.options.inner.bottom=u.top+D.height,l.options.outer.bottom=u.top+E.height),d.left?(l.options.inner.left=u.right-D.width,l.options.outer.left=u.right-E.width):d.right&&(l.options.inner.right=u.left+D.width,l.options.outer.right=u.left+E.width),bn.set(n),l.options=h}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Qn={start:function(n){var a,l=n.interaction,u=n.interactable,d=n.element,h=n.rect,D=n.state,E=n.startOffset,A=D.options,K=A.offsetWithOrigin?function(_e){var je=_e.interaction.element,Le=me(Ce(_e.state.options.origin,null,null,[je])),qe=Le||pe(_e.interactable,je,_e.interaction.prepared.name);return qe}(n):{x:0,y:0};if(A.offset==="startCoords")a={x:l.coords.start.page.x,y:l.coords.start.page.y};else{var M=Ce(A.offset,u,d,[l]);(a=me(M)||{x:0,y:0}).x+=K.x,a.y+=K.y}var ne=A.relativePoints;D.offsets=h&&ne&&ne.length?ne.map(function(_e,je){return{index:je,relativePoint:_e,x:E.left-h.width*_e.x+a.x,y:E.top-h.height*_e.y+a.y}}):[{index:0,relativePoint:null,x:a.x,y:a.y}]},set:function(n){var a=n.interaction,l=n.coords,u=n.state,d=u.options,h=u.offsets,D=pe(a.interactable,a.element,a.prepared.name),E=k({},l),A=[];d.offsetWithOrigin||(E.x-=D.x,E.y-=D.y);for(var K=0,M=h;K<M.length;K++)for(var ne=M[K],_e=E.x-ne.x,je=E.y-ne.y,Le=0,qe=d.targets.length;Le<qe;Le++){var it=d.targets[Le],lt=void 0;(lt=S.func(it)?it(_e,je,a._proxy,ne,Le):it)&&A.push({x:(S.number(lt.x)?lt.x:_e)+ne.x,y:(S.number(lt.y)?lt.y:je)+ne.y,range:S.number(lt.range)?lt.range:d.range,source:it,index:Le,offset:ne})}for(var ht={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Tt=0;Tt<A.length;Tt++){var Vt=A[Tt],xt=Vt.range,Bt=Vt.x-E.x,ra=Vt.y-E.y,Wt=dt(Bt,ra),da=Wt<=xt;xt===1/0&&ht.inRange&&ht.range!==1/0&&(da=!1),ht.target&&!(da?ht.inRange&&xt!==1/0?Wt/xt<ht.distance/ht.range:xt===1/0&&ht.range!==1/0||Wt<ht.distance:!ht.inRange&&Wt<ht.distance)||(ht.target=Vt,ht.distance=Wt,ht.range=xt,ht.inRange=da,ht.delta.x=Bt,ht.delta.y=ra)}return ht.inRange&&(l.x=ht.target.x,l.y=ht.target.y),u.closest=ht,ht},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Ar=ca(Qn,"snap"),zn={start:function(n){var a=n.state,l=n.edges,u=a.options;if(!l)return null;n.state={options:{targets:null,relativePoints:[{x:l.left?0:1,y:l.top?0:1}],offset:u.offset||"self",origin:{x:0,y:0},range:u.range}},a.targetFields=a.targetFields||[["width","height"],["x","y"]],Qn.start(n),a.offsets=n.state.offsets,n.state=a},set:function(n){var a=n.interaction,l=n.state,u=n.coords,d=l.options,h=l.offsets,D={x:u.x-h[0].x,y:u.y-h[0].y};l.options=k({},d),l.options.targets=[];for(var E=0,A=d.targets||[];E<A.length;E++){var K=A[E],M=void 0;if(M=S.func(K)?K(D.x,D.y,a):K){for(var ne=0,_e=l.targetFields;ne<_e.length;ne++){var je=_e[ne],Le=je[0],qe=je[1];if(Le in M||qe in M){M.x=M[Le],M.y=M[qe];break}}l.options.targets.push(M)}}var it=Qn.set(n);return l.options=d,it},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Vr=ca(zn,"snapSize"),eo={aspectRatio:_r,restrictEdges:Cr,restrict:Er,restrictRect:Tr,restrictSize:Nr,snapEdges:ca({start:function(n){var a=n.edges;return a?(n.state.targetFields=n.state.targetFields||[[a.left?"left":"right",a.top?"top":"bottom"]],zn.start(n)):null},set:zn.set,defaults:k(fa(zn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Ar,snapSize:Vr,spring:On,avoid:On,transform:On,rubberband:On},Or={id:"modifiers",install:function(n){var a=n.interactStatic;for(var l in n.usePlugin(Aa),n.usePlugin(kr),a.modifiers=eo,eo){var u=eo[l],d=u._defaults,h=u._methods;d._methods=h,n.defaults.perAction[l]=d}}},Mr=Or,Bo=function(n){b(l,n);var a=q(l);function l(u,d,h,D,E,A){var K;if(s(this,l),I(N(K=a.call(this,E)),h),h!==d&&I(N(K),d),K.timeStamp=A,K.originalEvent=h,K.type=u,K.pointerId=re(d),K.pointerType=he(d),K.target=D,K.currentTarget=null,u==="tap"){var M=E.getPointerIndex(d);K.dt=K.timeStamp-E.pointers[M].downTime;var ne=K.timeStamp-E.tapTime;K.double=!!E.prevTap&&E.prevTap.type!=="doubletap"&&E.prevTap.target===K.target&&ne<500}else u==="doubletap"&&(K.dt=d.timeStamp-E.tapTime,K.double=!0);return K}return p(l,[{key:"_subtractOrigin",value:function(u){var d=u.x,h=u.y;return this.pageX-=d,this.pageY-=h,this.clientX-=d,this.clientY-=h,this}},{key:"_addOrigin",value:function(u){var d=u.x,h=u.y;return this.pageX+=d,this.pageY+=h,this.clientX+=d,this.clientY+=h,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),l}(Me),kn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=kn,n.defaults.actions.pointerEvents=kn.defaults,k(n.actions.phaselessTypes,kn.types)},listeners:{"interactions:new":function(n){var a=n.interaction;a.prevTap=null,a.tapTime=0},"interactions:update-pointer":function(n){var a=n.down,l=n.pointerInfo;!a&&l.hold||(l.hold={duration:1/0,timeout:null})},"interactions:move":function(n,a){var l=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget;n.duplicate||l.pointerIsDown&&!l.pointerWasMoved||(l.pointerIsDown&&to(n),La({interaction:l,pointer:u,event:d,eventTarget:h,type:"move"},a))},"interactions:down":function(n,a){(function(l,u){for(var d=l.interaction,h=l.pointer,D=l.event,E=l.eventTarget,A=l.pointerIndex,K=d.pointers[A].hold,M=ae(E),ne={interaction:d,pointer:h,event:D,eventTarget:E,type:"hold",targets:[],path:M,node:null},_e=0;_e<M.length;_e++){var je=M[_e];ne.node=je,u.fire("pointerEvents:collect-targets",ne)}if(ne.targets.length){for(var Le=1/0,qe=0,it=ne.targets;qe<it.length;qe++){var lt=it[qe].eventable.options.holdDuration;lt<Le&&(Le=lt)}K.duration=Le,K.timeout=setTimeout(function(){La({interaction:d,eventTarget:E,pointer:h,event:D,type:"hold"},u)},Le)}})(n,a),La(n,a)},"interactions:up":function(n,a){to(n),La(n,a),function(l,u){var d=l.interaction,h=l.pointer,D=l.event,E=l.eventTarget;d.pointerWasMoved||La({interaction:d,eventTarget:E,pointer:h,event:D,type:"tap"},u)}(n,a)},"interactions:cancel":function(n,a){to(n),La(n,a)}},PointerEvent:Bo,fire:La,collectEventTargets:Io,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 La(n,a){var l=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget,D=n.type,E=n.targets,A=E===void 0?Io(n,a):E,K=new Bo(D,u,d,h,l,a.now());a.fire("pointerEvents:new",{pointerEvent:K});for(var M={interaction:l,pointer:u,event:d,eventTarget:h,targets:A,type:D,pointerEvent:K},ne=0;ne<A.length;ne++){var _e=A[ne];for(var je in _e.props||{})K[je]=_e.props[je];var Le=pe(_e.eventable,_e.node);if(K._subtractOrigin(Le),K.eventable=_e.eventable,K.currentTarget=_e.node,_e.eventable.fire(K),K._addOrigin(Le),K.immediatePropagationStopped||K.propagationStopped&&ne+1<A.length&&A[ne+1].node!==K.currentTarget)break}if(a.fire("pointerEvents:fired",M),D==="tap"){var qe=K.double?La({interaction:l,pointer:u,event:d,eventTarget:h,type:"doubletap"},a):K;l.prevTap=qe,l.tapTime=qe.timeStamp}return K}function Io(n,a){var l=n.interaction,u=n.pointer,d=n.event,h=n.eventTarget,D=n.type,E=l.getPointerIndex(u),A=l.pointers[E];if(D==="tap"&&(l.pointerWasMoved||!A||A.downTarget!==h))return[];for(var K=ae(h),M={interaction:l,pointer:u,event:d,eventTarget:h,type:D,path:K,targets:[],node:null},ne=0;ne<K.length;ne++){var _e=K[ne];M.node=_e,a.fire("pointerEvents:collect-targets",M)}return D==="hold"&&(M.targets=M.targets.filter(function(je){var Le,qe;return je.eventable.options.holdDuration===((Le=l.pointers[E])==null||(qe=Le.hold)==null?void 0:qe.duration)})),M.targets}function to(n){var a=n.interaction,l=n.pointerIndex,u=a.pointers[l].hold;u&&u.timeout&&(clearTimeout(u.timeout),u.timeout=null)}var zr=Object.freeze({__proto__:null,default:kn});function Rr(n){var a=n.interaction;a.holdIntervalHandle&&(clearInterval(a.holdIntervalHandle),a.holdIntervalHandle=null)}var Pr={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(kn);var a=n.pointerEvents;a.defaults.holdRepeatInterval=0,a.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,a){return n["pointerEvents:".concat(a)]=Rr,n},{"pointerEvents:new":function(n){var a=n.pointerEvent;a.type==="hold"&&(a.count=(a.count||0)+1)},"pointerEvents:fired":function(n,a){var l=n.interaction,u=n.pointerEvent,d=n.eventTarget,h=n.targets;if(u.type==="hold"&&h.length){var D=h[0].eventable.options.holdRepeatInterval;D<=0||(l.holdIntervalHandle=setTimeout(function(){a.pointerEvents.fire({interaction:l,eventTarget:d,type:"hold",pointer:u,event:u},a)},D))}}})},$r=Pr,Lr={id:"pointer-events/interactableTargets",install:function(n){var a=n.Interactable;a.prototype.pointerEvents=function(u){return k(this.events.options,u),this};var l=a.prototype._backCompatOption;a.prototype._backCompatOption=function(u,d){var h=l.call(this,u,d);return h===this&&(this.events.options[u]=d),h}},listeners:{"pointerEvents:collect-targets":function(n,a){var l=n.targets,u=n.node,d=n.type,h=n.eventTarget;a.interactables.forEachMatch(u,function(D){var E=D.events,A=E.options;E.types[d]&&E.types[d].length&&D.testIgnoreAllow(A,u,h)&&l.push({node:u,eventable:E,props:{interactable:D}})})},"interactable:new":function(n){var a=n.interactable;a.events.getRect=function(l){return a.getRect(l)}},"interactable:set":function(n,a){var l=n.interactable,u=n.options;k(l.events.options,a.pointerEvents.defaults),k(l.events.options,u.pointerEvents||{})}}},Fr=Lr,jr={id:"pointer-events",install:function(n){n.usePlugin(zr),n.usePlugin($r),n.usePlugin(Fr)}},Ur=jr,Kr={id:"reflow",install:function(n){var a=n.Interactable;n.actions.phases.reflow=!0,a.prototype.reflow=function(l){return function(u,d,h){for(var D=u.getAllElements(),E=h.window.Promise,A=E?[]:null,K=function(){var ne=D[M],_e=u.getRect(ne);if(!_e)return 1;var je,Le=ze(h.interactions.list,function(lt){return lt.interacting()&<.interactable===u&<.element===ne&<.prepared.name===d.name});if(Le)Le.move(),A&&(je=Le._reflowPromise||new E(function(lt){Le._reflowResolve=lt}));else{var qe=Q(_e),it=function(lt){return{coords:lt,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:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:h.now()});je=function(lt,ht,Tt,Vt,xt){var Bt=lt.interactions.new({pointerType:"reflow"}),ra={interaction:Bt,event:xt,pointer:xt,eventTarget:Tt,phase:"reflow"};Bt.interactable=ht,Bt.element=Tt,Bt.prevEvent=xt,Bt.updatePointer(xt,xt,Tt,!0),le(Bt.coords.delta),ft(Bt.prepared,Vt),Bt._doPhase(ra);var Wt=lt.window,da=Wt.Promise,ga=da?new da(function(Ca){Bt._reflowResolve=Ca}):void 0;return Bt._reflowPromise=ga,Bt.start(Vt,ht,Tt),Bt._interacting?(Bt.move(ra),Bt.end(xt)):(Bt.stop(),Bt._reflowResolve()),Bt.removePointer(xt,xt),ga}(h,u,ne,d,it)}A&&A.push(je)},M=0;M<D.length&&!K();M++);return A&&E.all(A).then(function(){return u})}(this,l,n)}},listeners:{"interactions:stop":function(n,a){var l=n.interaction;l.pointerType==="reflow"&&(l._reflowResolve&&l._reflowResolve(),function(u,d){u.splice(u.indexOf(d),1)}(a.interactions.list,l))}}},Wr=Kr;if(la.use(Na),la.use(St),la.use(Ur),la.use(na),la.use(Mr),la.use(Wa),la.use(Te),la.use(_t),la.use(Wr),la.default=la,c(t)==="object"&&t)try{t.exports=la}catch{}return la.default=la,la})}(Dn,Dn.exports)),Dn.exports}var Xp=qp();const tl=Oe.getDefaultExportFromCjs(Xp),Yn=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(t,{expose:i,emit:r}){const o=t,c=r,s=e.inject(Gl),m=e.inject(Jl);if(!s)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const p=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 b=!1,x=!1,_=NaN,N=NaN,q=NaN,$=NaN,oe=-1,P=-1,L=-1,R=-1,g=o.x,v=o.y,y=o.w,C=o.h;const S=e.ref(),F=e.reactive({i:e.toRef(o,"i"),state:f,wrapper:S,calcXY:Ce});function Be(B){Se(B)}function Je(){Ge()}function Ee(B){pa(o.isDraggable)&&(f.draggable=B)}function Ie(B){pa(o.isResizable)&&(f.resizable=B)}function Ae(B){pa(o.isBounded)&&(f.bounded=B)}function z(B){f.transformScale=B}function se(B){f.rowHeight=B}function te(B){f.maxRows=B}function ue(){f.rtl=Qo()==="rtl",Ge()}function Re(B){f.cols=Math.floor(B)}s.increaseItem(F),e.onBeforeMount(()=>{f.rtl=Qo()==="rtl"}),e.onMounted(()=>{s.responsive&&s.lastBreakpoint?f.cols=ar(s.lastBreakpoint,s.cols):f.cols=s.colNum,f.rowHeight=s.rowHeight,f.containerWidth=s.width!==null?s.width:100,f.margin=s.margin!==void 0?s.margin.map(Number):[10,10],f.maxRows=s.maxRows,pa(o.isDraggable)?f.draggable=s.isDraggable:f.draggable=o.isDraggable,pa(o.isResizable)?f.resizable=s.isResizable:f.resizable=o.isResizable,pa(o.isBounded)?f.bounded=s.isBounded:f.bounded=o.isBounded,f.transformScale=s.transformScale,f.useCssTransforms=s.useCssTransforms,f.useStyleCursor=s.useStyleCursor,e.watchEffect(()=>{g=o.x,v=o.y,C=o.h,y=o.w,ia(Ke)}),m.on("updateWidth",Be),m.on("compact",Je),m.on("setDraggable",Ee),m.on("setResizable",Ie),m.on("setBounded",Ae),m.on("setTransformScale",z),m.on("setRowHeight",se),m.on("setMaxRows",te),m.on("directionchange",ue),m.on("setColNum",Re)}),e.onBeforeUnmount(()=>{m.off("updateWidth",Be),m.off("compact",Je),m.off("setDraggable",Ee),m.off("setResizable",Ie),m.off("setBounded",Ae),m.off("setTransformScale",z),m.off("setRowHeight",se),m.off("setMaxRows",te),m.off("directionchange",ue),m.off("setColNum",Re),p.value&&(p.value.unset(),p.value=null),s.decreaseItem(F)}),i({state:f,wrapper:S});const Qe=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Z=e.computed(()=>f.resizable&&!o.static),O=e.computed(()=>s.isMirrored?!f.rtl:f.rtl),W=e.computed(()=>(f.draggable||f.resizable)&&!o.static),ce=$p("item"),xe=e.computed(()=>({[ce.b()]:!0,[ce.bm("resizable")]:Z.value,[ce.bm("static")]:o.static,[ce.bm("resizing")]:f.isResizing,[ce.bm("dragging")]:f.isDragging,[ce.bm("transform")]:f.useCssTransforms,[ce.bm("rtl")]:O.value,[ce.bm("no-touch")]:Qe&&W.value})),ke=e.computed(()=>[ce.be("resizer"),O.value&&ce.bem("resizer","rtl")].filter(Boolean));e.watch(()=>o.isDraggable,B=>{f.draggable=B}),e.watch(()=>o.static,()=>{ia(I),ia(le)}),e.watch(()=>f.draggable,()=>{ia(I)}),e.watch(()=>o.isResizable,B=>{f.resizable=B}),e.watch(()=>o.isBounded,B=>{f.bounded=B}),e.watch(()=>f.resizable,()=>{ia(le)}),e.watch(()=>f.rowHeight,()=>{ia(Ke),ia(ae)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{ia(le),ia(Ke),ia(ae)}),e.watch([()=>o.minH,()=>o.maxH,()=>o.minW,()=>o.maxW],()=>{ia(le)}),e.watch(O,()=>{ia(le),ia(Ke)}),e.watch([()=>s.margin,()=>s.margin[0],()=>s.margin[1]],()=>{const B=s.margin;!B||B[0]===f.margin[0]&&B[1]===f.margin[1]||(f.margin=B.map(Number),ia(Ke),ia(ae))});function Ke(){o.x+o.w>f.cols?(g=0,y=o.w>f.cols?f.cols:o.w):(g=o.x,y=o.w);const B=be(g,v,y,C);f.isDragging&&(B.top=f.dragging.top,O.value?B.right=f.dragging.left:B.left=f.dragging.left),f.isResizing&&(B.width=f.resizing.width,B.height=f.resizing.height);let de;f.useCssTransforms?O.value?de=Mp(B.top,B.right,B.width,B.height):de=Op(B.top,B.left,B.width,B.height):O.value?de=Rp(B.top,B.right,B.width,B.height):de=zp(B.top,B.left,B.width,B.height),f.style=de}function ae(){const B={};for(const de of["width","height"]){const Pe=f.style[de].match(/^(\d+)px$/);if(!Pe)return;B[de]=Pe[1]}c("container-resized",o.i,o.h,o.w,B.height,B.width)}function J(B){if(o.static)return;const de=B.type;if(de==="resizestart"&&f.isResizing||de!=="resizestart"&&!f.isResizing)return;const Pe=Jo(B);if(pa(Pe))return;const{x:re,y:U}=Pe,H={width:0,height:0};let G;switch(de){case"resizestart":{le(),oe=y,P=C,G=be(g,v,y,C),H.width=G.width,H.height=G.height,f.resizing=H,f.isResizing=!0;break}case"resizemove":{!B.edges.right&&!B.edges.left&&(q=re),!B.edges.top&&!B.edges.bottom&&($=U);const De=Zo(q,$,re,U);O.value?H.width=f.resizing.width-De.deltaX/f.transformScale:H.width=f.resizing.width+De.deltaX/f.transformScale,H.height=f.resizing.height+De.deltaY/f.transformScale,f.resizing=H;break}case"resizeend":{G=be(g,v,y,C),H.width=G.width,H.height=G.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}G=pe(H.height,H.width),G.w<o.minW&&(G.w=o.minW),G.w>o.maxW&&(G.w=o.maxW),G.h<o.minH&&(G.h=o.minH),G.h>o.maxH&&(G.h=o.maxH),G.h<1&&(G.h=1),G.w<1&&(G.w=1),q=re,$=U,(y!==G.w||C!==G.h)&&c("resize",o.i,G.h,G.w,H.height,H.width),B.type==="resizeend"&&(oe!==y||P!==C)&&c("resized",o.i,G.h,G.w,H.height,H.width),m.emit("resizeEvent",B.type,o.i,g,v,G.h,G.w)}function k(B){if(o.static||f.isResizing)return;const de=B.type;if(de==="dragstart"&&f.isDragging||de!=="dragstart"&&!f.isDragging)return;const Pe=Jo(B);if(pa(Pe))return;const{x:re,y:U}=Pe,H=B.target;if(!H.offsetParent)return;const G={top:0,left:0};switch(de){case"dragstart":{L=g,R=v;const ve=H.offsetParent.getBoundingClientRect(),X=H.getBoundingClientRect(),he=X.left/f.transformScale,ie=ve.left/f.transformScale,Me=X.right/f.transformScale,fe=ve.right/f.transformScale,Ne=X.top/f.transformScale,j=ve.top/f.transformScale;O.value?G.left=(Me-fe)*-1:G.left=he-ie,G.top=Ne-j,f.dragging=G,f.isDragging=!0;break}case"dragmove":{const ve=Zo(_,N,re,U);if(O.value?G.left=f.dragging.left-ve.deltaX/f.transformScale:G.left=f.dragging.left+ve.deltaX/f.transformScale,G.top=f.dragging.top+ve.deltaY/f.transformScale,f.bounded){const X=H.offsetParent.clientHeight-Q(o.h,f.rowHeight,f.margin[1]);G.top=ee(G.top,0,X);const he=me(),ie=f.containerWidth-Q(o.w,he,f.margin[0]);G.left=ee(G.left,0,ie)}f.dragging=G;break}case"dragend":{const ve=H.offsetParent.getBoundingClientRect(),X=H.getBoundingClientRect(),he=X.left/f.transformScale,ie=ve.left/f.transformScale,Me=X.right/f.transformScale,fe=ve.right/f.transformScale,Ne=X.top/f.transformScale,j=ve.top/f.transformScale;O.value?G.left=(Me-fe)*-1:G.left=he-ie,G.top=Ne-j,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let De;O.value,De=Ce(G.top,G.left),_=re,N=U,(g!==De.x||v!==De.y)&&c("move",o.i,De.x,De.y),B.type==="dragend"&&(L!==g||R!==v)&&c("moved",o.i,De.x,De.y),m.emit("dragEvent",B.type,o.i,De.x,De.y,C,y)}function be(B,de,Pe,re){const U=me();let H;return O.value?H={right:Math.round(U*B+(B+1)*f.margin[0]),top:Math.round(f.rowHeight*de+(de+1)*f.margin[1]),width:Pe===1/0?Pe:Math.round(U*Pe+Math.max(0,Pe-1)*f.margin[0]),height:re===1/0?re:Math.round(f.rowHeight*re+Math.max(0,re-1)*f.margin[1])}:H={left:Math.round(U*B+(B+1)*f.margin[0]),top:Math.round(f.rowHeight*de+(de+1)*f.margin[1]),width:Pe===1/0?Pe:Math.round(U*Pe+Math.max(0,Pe-1)*f.margin[0]),height:re===1/0?re:Math.round(f.rowHeight*re+Math.max(0,re-1)*f.margin[1])},H}function Ce(B,de){const Pe=me();let re=Math.round((de-f.margin[0])/(Pe+f.margin[0])),U=Math.round((B-f.margin[1])/(f.rowHeight+f.margin[1]));return re=Math.max(Math.min(re,f.cols-y),0),U=Math.max(Math.min(U,f.maxRows-C),0),{x:re,y:U}}function me(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function Q(B,de,Pe){return Number.isFinite(B)?Math.round(de*B+Math.max(0,B-1)*Pe):B}function ee(B,de,Pe){return Math.max(Math.min(B,Pe),de)}function pe(B,de,Pe=!1){const re=me();let U=Math.round((de+f.margin[0])/(re+f.margin[0])),H=0;return Pe?H=Math.ceil((B+f.margin[1])/(f.rowHeight+f.margin[1])):H=Math.round((B+f.margin[1])/(f.rowHeight+f.margin[1])),U=Math.max(Math.min(U,f.cols-g),0),H=Math.max(Math.min(H,f.maxRows-v),0),{w:U,h:H}}function Se(B,de){f.containerWidth=B}function Ge(){Ke()}function dt(){!p.value&&S.value&&(p.value=tl(S.value),f.useStyleCursor||p.value.styleCursor(!1))}const w=Xo(k);function I(){if(dt(),!!p.value)if(f.draggable&&!o.static){const B={ignoreFrom:o.dragIgnoreFrom,allowFrom:o.dragAllowFrom,...o.dragOption};p.value.draggable(B),b||(b=!0,p.value.on("dragstart dragmove dragend",de=>{de.type==="dragmove"?w(de):k(de)}))}else p.value.draggable({enabled:!1})}const Y=Xo(J);function le(){if(dt(),!!p.value)if(f.resizable&&!o.static){const B=be(0,0,o.maxW,o.maxH),de=be(0,0,o.minW,o.minH),Pe={edges:{left:O.value?`.${ke.value[0]}`:!1,right:O.value?!1:`.${ke.value[0]}`,bottom:`.${ke.value[0]}`,top:!1},ignoreFrom:o.resizeIgnoreFrom,restrictSize:{min:{height:de.height*f.transformScale,width:de.width*f.transformScale},max:{height:B.height*f.transformScale,width:B.width*f.transformScale}},...o.resizeOption};o.preserveAspectRatio&&(Pe.modifiers=[tl.modifiers.aspectRatio({ratio:"preserve"})]),p.value.resizable(Pe),x||(x=!0,p.value.on("resizestart resizemove resizeend",re=>{re.type==="resizemove"?Y(re):J(re)}))}else p.value.resizable({enabled:!1})}return(B,de)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(xe.value),style:e.normalizeStyle(f.style)},[e.renderSlot(B.$slots,"default"),Z.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(ke.value)},null,2)):e.createCommentVNode("",!0)],6))}}),cn=typeof window<"u";var al;cn&&(al=window==null?void 0:window.navigator)!=null&&al.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function nl(t){return t!=null}function ol(){}const Yp=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(Yp)));const Gp=cn&&("ontouchstart"in window||Zp()>0),Jp=Gp?"pointerdown":"click";function Zp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Qp(t,i,r=window.Event){const{type:o,bubbles:c=!1,cancelable:s=!1,...m}=i;if(!nl(o)||o==="")return!1;let p;return nl(r)?p=new r(o,{bubbles:c,cancelable:s}):(p=document.createEvent("HTMLEvents"),p.initEvent(o,c,s)),Object.assign(p,m),t.dispatchEvent(p)}const ef="clickoutside",tf=new Set;cn&&document.addEventListener(Jp,t=>{const i=t.target,r=t.composedPath&&t.composedPath();tf.forEach(o=>{o!==i&&(r?!r.includes(o):!o.contains(i))&&(!o.__transferElement||o.__transferElement!==i&&!o.__transferElement.contains(i))&&Qp(o,{type:ef})})},!0);const af=[["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 Kn;if(cn){for(const t of af)if(t[1]in document){Kn=t;break}}e.computed(()=>!1);const nf=new Set,of=new WeakMap;if(cn&&Kn){const t=Kn[2],i=Kn[4];document.addEventListener(i,()=>{if(nf.forEach(r=>{r.value=!1}),document[t]){const r=of.get(document[t]);r&&(r.value=!0)}},!1)}const or=new Map;or.set("x",0);or.set("y",0);var ln=[],lf=function(){return ln.some(function(t){return t.activeTargets.length>0})},rf=function(){return ln.some(function(t){return t.skippedTargets.length>0})},ll="ResizeObserver loop completed with undelivered notifications.",sf=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:ll}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=ll),window.dispatchEvent(t)},Nn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Nn||(Nn={}));var rn=function(t){return Object.freeze(t)},cf=function(){function t(i,r){this.inlineSize=i,this.blockSize=r,rn(this)}return t}(),lr=function(){function t(i,r,o,c){return this.x=i,this.y=r,this.width=o,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,rn(this)}return t.prototype.toJSON=function(){var i=this,r=i.x,o=i.y,c=i.top,s=i.right,m=i.bottom,p=i.left,f=i.width,b=i.height;return{x:r,y:o,top:c,right:s,bottom:m,left:p,width:f,height:b}},t.fromRect=function(i){return new t(i.x,i.y,i.width,i.height)},t}(),wo=function(t){return t instanceof SVGElement&&"getBBox"in t},rr=function(t){if(wo(t)){var i=t.getBBox(),r=i.width,o=i.height;return!r&&!o}var c=t,s=c.offsetWidth,m=c.offsetHeight;return!(s||m||t.getClientRects().length)},rl=function(t){var i;if(t instanceof Element)return!0;var r=(i=t==null?void 0:t.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(r&&t instanceof r.Element)},uf=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},In=typeof window<"u"?window:{},$n=new WeakMap,il=/auto|scroll/,df=/^tb|vertical/,pf=/msie|trident/i.test(In.navigator&&In.navigator.userAgent),ka=function(t){return parseFloat(t||"0")},gn=function(t,i,r){return t===void 0&&(t=0),i===void 0&&(i=0),r===void 0&&(r=!1),new cf((r?i:t)||0,(r?t:i)||0)},sl=rn({devicePixelContentBoxSize:gn(),borderBoxSize:gn(),contentBoxSize:gn(),contentRect:new lr(0,0,0,0)}),ir=function(t,i){if(i===void 0&&(i=!1),$n.has(t)&&!i)return $n.get(t);if(rr(t))return $n.set(t,sl),sl;var r=getComputedStyle(t),o=wo(t)&&t.ownerSVGElement&&t.getBBox(),c=!pf&&r.boxSizing==="border-box",s=df.test(r.writingMode||""),m=!o&&il.test(r.overflowY||""),p=!o&&il.test(r.overflowX||""),f=o?0:ka(r.paddingTop),b=o?0:ka(r.paddingRight),x=o?0:ka(r.paddingBottom),_=o?0:ka(r.paddingLeft),N=o?0:ka(r.borderTopWidth),q=o?0:ka(r.borderRightWidth),$=o?0:ka(r.borderBottomWidth),oe=o?0:ka(r.borderLeftWidth),P=_+b,L=f+x,R=oe+q,g=N+$,v=p?t.offsetHeight-g-t.clientHeight:0,y=m?t.offsetWidth-R-t.clientWidth:0,C=c?P+R:0,S=c?L+g:0,F=o?o.width:ka(r.width)-C-y,Be=o?o.height:ka(r.height)-S-v,Je=F+P+y+R,Ee=Be+L+v+g,Ie=rn({devicePixelContentBoxSize:gn(Math.round(F*devicePixelRatio),Math.round(Be*devicePixelRatio),s),borderBoxSize:gn(Je,Ee,s),contentBoxSize:gn(F,Be,s),contentRect:new lr(_,f,F,Be)});return $n.set(t,Ie),Ie},sr=function(t,i,r){var o=ir(t,r),c=o.borderBoxSize,s=o.contentBoxSize,m=o.devicePixelContentBoxSize;switch(i){case Nn.DEVICE_PIXEL_CONTENT_BOX:return m;case Nn.BORDER_BOX:return c;default:return s}},ff=function(){function t(i){var r=ir(i);this.target=i,this.contentRect=r.contentRect,this.borderBoxSize=rn([r.borderBoxSize]),this.contentBoxSize=rn([r.contentBoxSize]),this.devicePixelContentBoxSize=rn([r.devicePixelContentBoxSize])}return t}(),cr=function(t){if(rr(t))return 1/0;for(var i=0,r=t.parentNode;r;)i+=1,r=r.parentNode;return i},hf=function(){var t=1/0,i=[];ln.forEach(function(s){if(s.activeTargets.length!==0){var m=[];s.activeTargets.forEach(function(p){var f=new ff(p.target),b=cr(p.target);m.push(f),p.lastReportedSize=sr(p.target,p.observedBox),b<t&&(t=b)}),i.push(function(){s.callback.call(s.observer,m,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var r=0,o=i;r<o.length;r++){var c=o[r];c()}return t},cl=function(t){ln.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(r){r.isActive()&&(cr(r.target)>t?i.activeTargets.push(r):i.skippedTargets.push(r))})})},vf=function(){var t=0;for(cl(t);lf();)t=hf(),cl(t);return rf()&&sf(),t>0},uo,ur=[],mf=function(){return ur.splice(0).forEach(function(t){return t()})},gf=function(t){if(!uo){var i=0,r=document.createTextNode(""),o={characterData:!0};new MutationObserver(function(){return mf()}).observe(r,o),uo=function(){r.textContent="".concat(i?i--:i++)}}ur.push(t),uo()},yf=function(t){gf(function(){requestAnimationFrame(t)})},Wn=0,bf=function(){return!!Wn},kf=250,xf={attributes:!0,characterData:!0,childList:!0,subtree:!0},ul=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],dl=function(t){return t===void 0&&(t=0),Date.now()+t},po=!1,wf=function(){function t(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return t.prototype.run=function(i){var r=this;if(i===void 0&&(i=kf),!po){po=!0;var o=dl(i);yf(function(){var c=!1;try{c=vf()}finally{if(po=!1,i=o-dl(),!bf())return;c?r.run(1e3):i>0?r.run(i):r.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var i=this,r=function(){return i.observer&&i.observer.observe(document.body,xf)};document.body?r():In.addEventListener("DOMContentLoaded",r)},t.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ul.forEach(function(r){return In.addEventListener(r,i.listener,!0)}))},t.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ul.forEach(function(r){return In.removeEventListener(r,i.listener,!0)}),this.stopped=!0)},t}(),bo=new wf,pl=function(t){!Wn&&t>0&&bo.start(),Wn+=t,!Wn&&bo.stop()},Df=function(t){return!wo(t)&&!uf(t)&&getComputedStyle(t).display==="inline"},_f=function(){function t(i,r){this.target=i,this.observedBox=r||Nn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var i=sr(this.target,this.observedBox,!0);return Df(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},t}(),Ef=function(){function t(i,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=r}return t}(),Ln=new WeakMap,fl=function(t,i){for(var r=0;r<t.length;r+=1)if(t[r].target===i)return r;return-1},Fn=function(){function t(){}return t.connect=function(i,r){var o=new Ef(i,r);Ln.set(i,o)},t.observe=function(i,r,o){var c=Ln.get(i),s=c.observationTargets.length===0;fl(c.observationTargets,r)<0&&(s&&ln.push(c),c.observationTargets.push(new _f(r,o&&o.box)),pl(1),bo.schedule())},t.unobserve=function(i,r){var o=Ln.get(i),c=fl(o.observationTargets,r),s=o.observationTargets.length===1;c>=0&&(s&&ln.splice(ln.indexOf(o),1),o.observationTargets.splice(c,1),pl(-1))},t.disconnect=function(i){var r=this,o=Ln.get(i);o.observationTargets.slice().forEach(function(c){return r.unobserve(i,c.target)}),o.activeTargets.splice(0,o.activeTargets.length)},t}(),Cf=function(){function t(i){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof i!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Fn.connect(this,i)}return t.prototype.observe=function(i,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Fn.observe(this,i,r)},t.prototype.unobserve=function(i){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!rl(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Fn.unobserve(this,i)},t.prototype.disconnect=function(){Fn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const Gn=new WeakMap;function Sf(t){var i;for(let r=0,o=t.length;r<o;++r){const c=t[r],s=Gn.get(c.target);if(typeof s=="function"){const{inlineSize:m,blockSize:p}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:b}=c.target;s(Object.assign(c,{offsetWidth:f,offsetHeight:b,width:m??f,height:p??b}))}}}const dr=new(cn&&window.ResizeObserver||Cf)(Sf);function hl(t,i){Gn.set(t,i),dr.observe(t)}function vl(t){Gn.has(t)&&(dr.unobserve(t),Gn.delete(t))}function Tf(t={}){let i=ol;const r=e.watch(()=>e.unref(t.target),c=>{i(),!(!c||typeof t.onResize!="function")&&(hl(c,t.onResize),i=()=>{vl(c),i=ol})},{immediate:!0}),o=()=>{r(),i()};return e.getCurrentScope()&&e.onScopeDispose(o),{observeResize:hl,unobserveResize:vl,unobserve:o}}const Bf=e.ref(!1);e.computed(()=>Bf.value);const ml="__theme_style__",fo="__theme_observer__",gl=e.reactive(new Map),yl=new Map;e.watch(gl,()=>{if(!cn)return;yl.clear();const t=document.head.querySelector(`#${ml}`);t&&document.head.removeChild(t);const i=document.createElement("style");let r=`.${fo} { width: 1px }`,o=1;for(const[c,[s,m]]of gl.entries())r+=` html.${s} .${fo}, .${m} .${fo} { width: ${++o}px }`,yl.set(o,c);i.textContent=r,i.id=ml,document.head.appendChild(i)});const pr=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(t,{expose:i,emit:r}){const o=t,c=r,s=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),m=new Map,p=e.ref(o.layout),f=e.ref(),{observeResize:b,unobserveResize:x}=Tf(),_=Sp();_.on("resizeEvent",N),_.on("dragEvent",q),e.onBeforeMount(()=>{c("layout-before-mount",p.value)}),e.onMounted(()=>{c("layout-mounted",p.value),e.nextTick(()=>{Pp(p.value),s.originalLayout=p.value,e.nextTick(()=>{Be(),f.value&&b(f.value,Tp(g,16)),hn(p.value,o.verticalCompact),c("layout-updated",p.value),R(),g()})})}),e.onBeforeUnmount(()=>{_.clearAll(),f.value&&x(f.value)});function N(Ee,Ie,Ae,z,se,te){S(Ee,Ie,Ae,z,se,te)}function q(Ee,Ie,Ae,z,se,te){C(Ee,Ie,Ae,z,se,te)}e.watch(()=>s.width,(Ee,Ie)=>{e.nextTick(()=>{_.emit("updateWidth",Ee),Ie===-1&&e.nextTick(()=>{c("layout-ready",p.value)}),R()})}),e.watch(()=>[o.layout,o.layout.length],()=>{p.value=o.layout,L()}),e.watch(()=>o.colNum,Ee=>{_.emit("setColNum",Ee)}),e.watch(()=>o.rowHeight,Ee=>{_.emit("setRowHeight",Ee)}),e.watch(()=>o.isDraggable,Ee=>{_.emit("setDraggable",Ee)}),e.watch(()=>o.isResizable,Ee=>{_.emit("setResizable",Ee)}),e.watch(()=>o.isBounded,Ee=>{_.emit("setBounded",Ee)}),e.watch(()=>o.transformScale,Ee=>{_.emit("setTransformScale",Ee)}),e.watch(()=>o.responsive,Ee=>{Ee||(c("update:layout",s.originalLayout),_.emit("setColNum",o.colNum)),g()}),e.watch(()=>o.maxRows,Ee=>{_.emit("setMaxRows",Ee)}),e.watch([()=>o.margin,()=>o.margin[1]],R),e.provide(Gl,e.reactive({...e.toRefs(o),...e.toRefs(s),increaseItem:$,decreaseItem:oe})),e.provide(Jl,_),i({state:s,getItem:P,resizeEvent:S,dragEvent:C,layoutUpdate:L});function $(Ee){m.set(Ee.i,Ee)}function oe(Ee){m.delete(Ee.i)}function P(Ee){return m.get(Ee)}function L(){if(!pa(p.value)&&!pa(s.originalLayout)){if(p.value.length!==s.originalLayout.length){const Ee=Je(p.value,s.originalLayout);if(Ee.length>0)if(p.value.length>s.originalLayout.length)s.originalLayout=s.originalLayout.concat(Ee);else{const Ie=new Set(Ee.map(Ae=>Ae.i));s.originalLayout=s.originalLayout.filter(Ae=>!Ie.has(Ae.i))}s.lastLayoutLength=p.value.length,Be()}hn(p.value,o.verticalCompact),_.emit("updateWidth",s.width),R(),c("layout-updated",p.value)}}function R(){s.mergedStyle={height:v()}}function g(){f.value&&(s.width=f.value.offsetWidth),_.emit("resizeEvent")}function v(){if(!o.autoSize)return;const Ee=parseFloat(o.margin[1]);return Ip(p.value)*(o.rowHeight+Ee)+Ee+"px"}let y;function C(Ee,Ie,Ae,z,se,te){let ue=Yo(p.value,Ie);pa(ue)&&(ue={h:0,w:0,x:0,y:0,i:""}),Ee==="dragstart"&&!o.verticalCompact&&(y=p.value.reduce((Re,{i:Qe,x:Z,y:O})=>({...Re,[Qe]:{x:Z,y:O}}),{})),Ee==="dragmove"||Ee==="dragstart"?(s.placeholder.i=Ie,s.placeholder.x=ue.x,s.placeholder.y=ue.y,s.placeholder.w=te,s.placeholder.h=se,e.nextTick(()=>{s.isDragging=!0}),_.emit("updateWidth",s.width)):e.nextTick(()=>{s.isDragging=!1}),p.value=yo(p.value,ue,Ae,z,!0,o.preventCollision),o.restoreOnDrag?(ue.static=!0,hn(p.value,o.verticalCompact,y),ue.static=!1):hn(p.value,o.verticalCompact),_.emit("compact"),R(),Ee==="dragend"&&(y=void 0,c("layout-updated",p.value))}function S(Ee,Ie,Ae,z,se,te){let ue=Yo(p.value,Ie);pa(ue)&&(ue={h:0,w:0,x:0,y:0,i:""});let Re;if(o.preventCollision){const Qe=Ql(p.value,{...ue,w:te,h:se}).filter(Z=>Z.i!==ue.i);if(Re=Qe.length>0,Re){let Z=1/0,O=1/0;Qe.forEach(W=>{W.x>ue.x&&(Z=Math.min(Z,W.x)),W.y>ue.y&&(O=Math.min(O,W.y))}),Number.isFinite(Z)&&(ue.w=Z-ue.x),Number.isFinite(O)&&(ue.h=O-ue.y)}}Re||(ue.w=te,ue.h=se),Ee==="resizestart"||Ee==="resizemove"?(s.placeholder.i=Ie,s.placeholder.x=Ae,s.placeholder.y=z,s.placeholder.w=ue.w,s.placeholder.h=ue.h,e.nextTick(()=>{s.isDragging=!0}),_.emit("updateWidth",s.width)):Ee&&e.nextTick(()=>{s.isDragging=!1}),o.responsive&&F(),hn(p.value,o.verticalCompact),_.emit("compact"),R(),Ee==="resizeend"&&c("layout-updated",p.value)}function F(){const Ee=jp(o.breakpoints,s.width);if(Ee===s.lastBreakpoint)return;const Ie=ar(Ee,o.cols);!pa(s.lastBreakpoint)&&!s.layouts[s.lastBreakpoint]&&(s.layouts[s.lastBreakpoint]=go(p.value));const Ae=Up(s.originalLayout,s.layouts,o.breakpoints,Ee,s.lastBreakpoint,Ie,o.verticalCompact);s.layouts[Ee]=Ae,s.lastBreakpoint!==Ee&&c("breakpoint-changed",Ee,Ae),p.value=Ae,c("update:layout",Ae),s.lastBreakpoint=Ee,_.emit("setColNum",Ie)}function Be(){s.layouts=Object.assign({},o.responsiveLayouts)}function Je(Ee,Ie){const Ae=new Set(Ie.map(ue=>ue.i)),z=new Set(Ee.map(ue=>ue.i)),se=Ee.filter(ue=>!Ae.has(ue.i)),te=Ie.filter(ue=>!z.has(ue.i));return se.concat(te)}return(Ee,Ie)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(s.mergedStyle)},[Ee.$slots.default?e.renderSlot(Ee.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(p.value,Ae=>(e.openBlock(),e.createBlock(Yn,e.mergeProps({key:Ae.i,ref_for:!0},Ae),{default:e.withCtx(()=>[e.renderSlot(Ee.$slots,"item",{item:Ae})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Yn,{class:"vgl-item--placeholder",x:s.placeholder.x,y:s.placeholder.y,w:s.placeholder.w,h:s.placeholder.h,i:s.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,s.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.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(t)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const If=e.defineComponent({__name:"index",props:{modelValue:{type:[String,Number,Boolean]},options:{default:()=>[]},disabled:{type:Boolean,default:!1},size:{default:"default"},align:{default:"left"}},emits:["update:modelValue","change"],setup(t,{emit:i}){const r=t,o=i,c=e.computed({get:()=>r.modelValue,set:p=>o("update:modelValue",p)}),s=e.computed(()=>Array.isArray(r.options)?r.options:[]),m=p=>{o("change",p)};return(p,f)=>{const b=e.resolveComponent("el-radio"),x=e.resolveComponent("el-radio-group");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["ss-radio",{"ss-radio--left":p.align==="left","ss-radio--center":p.align==="center"}])},[e.createVNode(x,{modelValue:c.value,"onUpdate:modelValue":f[0]||(f[0]=_=>c.value=_),disabled:p.disabled,size:p.size,onChange:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,_=>(e.openBlock(),e.createBlock(b,{key:String(_.value),label:_.value,disabled:_.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(_.label),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled","size"])],2)}}}),Nf=zt._export_sfc(If,[["__scopeId","data-v-06ebf670"]]),Af={key:0,class:"item-view-group"},Vf={key:1,class:"measurement-system-container"},Of={class:"radio-group-container"},Mf={key:0,class:"item-view-group"},zf=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(t,{emit:i}){const r=T.useModelComp(T.pinia),{isEdit:o}=T.storeToRefs(r),c=i,s=t,m=e.computed(()=>s==null?void 0:s.children),p=e.computed(()=>{var R,g,v,y;return((R=s==null?void 0:s.children)==null?void 0:R.length)>0&&((g=s==null?void 0:s.children)!=null&&g.every(C=>C==null?void 0:C.layout))?(y=(v=s==null?void 0:s.children)==null?void 0:v[0])==null?void 0:y.layout:"vertical"}),f=e.computed(()=>{var R,g;return((g=(R=s==null?void 0:s.children)==null?void 0:R[0])==null?void 0:g.isGridLayout)||!1}),b=e.ref((s==null?void 0:s.level)+1),x=e.computed(()=>{if(!(s!=null&&s.children)||!Array.isArray(s.children)||s.children.length<2)return!1;const R=s.children.some(v=>(v==null?void 0:v.name)==="测量系统配置表"&&(v==null?void 0:v.comp)==="ParentItem"),g=s.children.some(v=>(v==null?void 0:v.name)==="测量系统传递表"&&(v==null?void 0:v.comp)==="ParentItem");return R&&g}),_=e.ref("测量系统配置表"),N=e.computed(()=>[{label:"测量系统配置表",value:"测量系统配置表"},{label:"测量系统传递表",value:"测量系统传递表"}]),q=e.computed(()=>{if(!x.value||!(s!=null&&s.children))return[];const R=s.children.find(g=>(g==null?void 0:g.name)===_.value);return!R||!R.children?[]:R.children.filter(g=>(g==null?void 0:g.comp)==="Table")}),$=e.computed(()=>q.value.map((R,g)=>({value:String((R==null?void 0:R.id)||(R==null?void 0:R.name)||g),label:R==null?void 0:R.name,tableItem:R}))),oe=R=>{_.value=String(R)};e.watch(()=>s==null?void 0:s.children,()=>{x.value},{deep:!0});const P=R=>{c("rowClick",R)},L=(R,g)=>{c("routeUrl",R,g)};return(R,g)=>f.value?(e.openBlock(),e.createBlock(e.unref(pr),{key:0,layout:m.value,"onUpdate:layout":g[0]||(g[0]=v=>m.value=v),"is-draggable":e.unref(o)==="edit","is-resizable":e.unref(o)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(v,y)=>(e.openBlock(),e.createBlock(e.unref(Yn),{key:v.i,x:v.x,y:v.y,"min-h":v.minH,"max-h":v.maxH,"min-w":v.minW,w:v.w,h:v.h,i:v.i},{default:e.withCtx(()=>{var C,S,F,Be,Je,Ee,Ie,Ae,z,se,te,ue,Re;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:y===((C=s==null?void 0:s.children)==null?void 0:C.length)-1?"0px":"24px"})},[((F=(S=v==null?void 0:v.component)==null?void 0:S.comp)==null?void 0:F.toUpperCase())!=="TABLE"&&((Be=v==null?void 0:v.component)!=null&&Be.name)?(e.openBlock(),e.createElementBlock("div",Af,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(b.value.toString())-1)*12+"px",fontWeight:600-(b.value-1)*100>=400?600-(b.value-1)*100:400,fontSize:17-b.value>=14?17-b.value+"px":"14px"})},e.toDisplayString((Je=v==null?void 0:v.component)==null?void 0:Je.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)((Ee=v==null?void 0:v.component)==null?void 0:Ee.comp)),{pageLayout:p.value,config:{showIndex:(Ie=e.unref(Ft)[y])==null?void 0:Ie.showIndex,allowMove:(Ae=e.unref(Ft)[y])==null?void 0:Ae.allowMove,viewport:(z=e.unref(Ft)[y])==null?void 0:z.viewport},related:v==null?void 0:v.relatedTables,compName:v==null?void 0:v.component.name,compNames:e.unref(Fl),itemData:(se=v==null?void 0:v.component)==null?void 0:se.compData,childItemData:(te=v==null?void 0:v.component)==null?void 0:te.itemChildData,key:e.unref(on),cacheNewData:e.unref(Ll),onChange:e.unref(En),index:(v==null?void 0:v.id)??y,onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),parentTableId:(ue=v==null?void 0:v.component)==null?void 0:ue.tableId,allMapContents:e.unref(Un),children:(Re=v==null?void 0:v.component)==null?void 0:Re.children,level:b.value,onRowClick:P,onRouteUrl:L,onClickTrigger:e.unref(jl),onClickMainKey:e.unref(Ul)},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"])):x.value?(e.openBlock(),e.createElementBlock("div",Vf,[e.createElementVNode("div",Of,[e.createVNode(Nf,{modelValue:_.value,"onUpdate:modelValue":g[1]||(g[1]=v=>_.value=v),options:N.value,onChange:oe},null,8,["modelValue","options"])]),$.value.length>0?(e.openBlock(),e.createBlock(Nt.ssTab,{key:0,class:"measurement-tabs",tabsContents:$.value},{pane:e.withCtx(({tab:v,index:y})=>{var C,S,F,Be,Je,Ee,Ie,Ae;return[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)((C=v==null?void 0:v.tableItem)==null?void 0:C.comp)),{compName:(S=v==null?void 0:v.tableItem)==null?void 0:S.name,itemData:(F=v==null?void 0:v.tableItem)==null?void 0:F.compData,related:(Be=v==null?void 0:v.tableItem)==null?void 0:Be.relatedTables,childItemData:(Je=v==null?void 0:v.tableItem)==null?void 0:Je.itemChildData,key:`${e.unref(on)}-${_.value}-${(v==null?void 0:v.value)||y}`,onChange:e.unref(En),index:((Ee=v==null?void 0:v.tableItem)==null?void 0:Ee.id)??y,onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),parentTableId:(Ie=v==null?void 0:v.tableItem)==null?void 0:Ie.tableId,allMapContents:e.unref(Un),children:(Ae=v==null?void 0:v.tableItem)==null?void 0:Ae.children,level:b.value,onRowClick:P,onRouteUrl:L},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))]}),_:1},8,["tabsContents"])):e.createCommentVNode("",!0)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(s==null?void 0:s.children,(v,y)=>{var C,S;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(v==null?void 0:v.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(y)===((C=s==null?void 0:s.children)==null?void 0:C.length)-1?"0px":"24px"})},[((S=v==null?void 0:v.comp)==null?void 0:S.toUpperCase())!=="TABLE"&&v.name?(e.openBlock(),e.createElementBlock("div",Mf,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(b.value.toString())>1?"12px":"0px",fontWeight:600-(b.value-1)*100>=400?600-(b.value-1)*100:400,fontSize:17-b.value>=14?17-b.value+"px":"14px"})},e.toDisplayString(v.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_n)(v.comp)),{compName:v.name,itemData:v==null?void 0:v.compData,related:v==null?void 0:v.relatedTables,childItemData:v==null?void 0:v.itemChildData,key:e.unref(on),onChange:e.unref(En),index:(v==null?void 0:v.id)??y,onContentChange:e.unref(Cn),onPageChange:e.unref(Sn),parentTableId:v==null?void 0:v.tableId,allMapContents:e.unref(Un),children:v==null?void 0:v.children,level:b.value,onRowClick:P,onRouteUrl:L},null,40,["compName","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Rf=zt._export_sfc(zf,[["__scopeId","data-v-cd7bc0cf"]]),fr=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"}]),Pf={TABLE:oa.ssTable,FORM:Ro,STATICFORM:wl,TABLEOPERATE:Ts,TABLESTYLE:Ks,TABLEEXTEND:Hs,TABLEINTERACTION:Ys,FORMOPERATE:Po,FOLD:Ec,CALCULATOR:Nc,METHODBUTTON:Oc,AVATARUPLOAD:Oo.ssAvatar,SIGNATURE:Oo.ssSignature,FORMTOP:Ro,STEP:Hc,STEPOPERATE:mc,TIMELINE:Zc,TIMELINEOPERATE:wc,FORMTOPOPERATE:Po,SIGNATUREOPERATE:Uc,AVATARUPLOADOPERATE:Rc,TABS:tu,TABSOPERATE:Lu,CHART:ed,CHARTOPERATE:dd,LAYOUT:vp,LAYOUTOPERATE:_p,PARENTITEM:Rf};function un(t){return Pf[t==null?void 0:t.toUpperCase()]||null}exports.De=pr;exports._sfc_main=Vl;exports.activeStepInfo=vn;exports.affixItems=np;exports.allMapContents=Un;exports.analyzeForm=bd;exports.analyzeQuoteForm=yd;exports.analyzeSplitToContent=Ut;exports.analyzeTable=xd;exports.analyzerStringToArray=pd;exports.cacheNewData=Ll;exports.clickMainKey=Ul;exports.clickSavePage=ap;exports.clickStep=Wl;exports.clickTrigger=jl;exports.compId=on;exports.compNames=Fl;exports.compShow=Xn;exports.existLayouts=rp;exports.generateLayouts=Ls;exports.getComponent=un;exports.getComponents=_n;exports.getPageData=sn;exports.getSliceContLength=up;exports.gridRowHeight=Ms;exports.isStepLayout=Hl;exports.onBack=ep;exports.onChange=En;exports.onClick=tp;exports.onContentChange=Cn;exports.onExtendTaskEnd=lp;exports.onPageBack=ip;exports.onPageChange=Sn;exports.onSelectFixContent=Qd;exports.renderShowItems=Pl;exports.same=fd;exports.setComponent=Rl;exports.showItems=Ft;exports.sliceTableLength=$l;exports.slotContent=fr;exports.ssMenu=qn;exports.st=Yn;exports.stepItems=dp;exports.toolBar=op;exports.verifyButton=sp;
|