ss-component-new 1.3.519 → 1.3.520
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/{index-CpRwzP5l.js → index-0mpbktSg.js} +3 -3
- package/dist/{index-DdV9wIEV.cjs → index-1mC2A21K.cjs} +1 -1
- package/dist/{index-ImwWdWlH.cjs → index-5Vjvm1OH.cjs} +1 -1
- package/dist/{index-BJflRJ9U.js → index-BEAESk_B.js} +2 -2
- package/dist/{index-CTfT0jS4.cjs → index-BLxVq9Aj.cjs} +1 -1
- package/dist/{index-CX-xhB8-.cjs → index-BQlPbXIW.cjs} +1 -1
- package/dist/{index-Bii_vGs4.cjs → index-BVDiEQB_.cjs} +1 -1
- package/dist/{index-1j1BF_NQ.cjs → index-BZvo-_7x.cjs} +1 -1
- package/dist/{index-CmdGIa1-.cjs → index-Ba8nH1mH.cjs} +1 -1
- package/dist/{index-CWqis7A8.js → index-BsV3w9bm.js} +5 -5
- package/dist/{index-FtyCsM8J.cjs → index-Bw90Lb3S.cjs} +1 -1
- package/dist/{index-CMRSEjTf.cjs → index-CBBfLdee.cjs} +1 -1
- package/dist/{index-CzLE4e08.cjs → index-CKWTbQGz.cjs} +1 -1
- package/dist/{index-lCOltxCV.js → index-COFtgp-U.js} +1 -1
- package/dist/{index-DFCbDRkV.js → index-ChDaYLee.js} +1 -1
- package/dist/{index-rMsfTW1X.cjs → index-CnpXAjkm.cjs} +1 -1
- package/dist/{index-Brjo_Q27.js → index-CtUmAmOv.js} +11 -11
- package/dist/{index-Cfa5ta3B.cjs → index-CxxRUJ-y.cjs} +1 -1
- package/dist/{index-BY66liLa.js → index-D0o8iHf1.js} +1 -1
- package/dist/{index-CncinBCe.js → index-D2hyyxEj.js} +3 -3
- package/dist/{index-B829T3zC.js → index-DHyYIvlT.js} +4 -4
- package/dist/{index-Bk9VGtRy.cjs → index-DNdU6yRf.cjs} +1 -1
- package/dist/{index-Ba_Azu4R.js → index-DewnnwQ6.js} +1 -1
- package/dist/{index-DX2TYn9C.js → index-DlKLQjxR.js} +1 -1
- package/dist/{index-dJX5-spW.cjs → index-DzO6_ExP.cjs} +1 -1
- package/dist/{index-Bf8JqO_9.js → index-GnVXGEHe.js} +2 -2
- package/dist/{index-BPKAk_F3.cjs → index-Ik04dFx5.cjs} +1 -1
- package/dist/{index-Cg_cV1sh.js → index-JwmJivXt.js} +1 -1
- package/dist/{index-Dm9lXfLU.cjs → index-K9qk0XCM.cjs} +1 -1
- package/dist/{index-Dnz1Fp17.js → index-Nby38CFo.js} +1 -1
- package/dist/{index-HPz4fiNC.cjs → index-hJzEeait.cjs} +1 -1
- package/dist/{index-CY84LR69.cjs → index-i4e0Esdp.cjs} +1 -1
- package/dist/{index-v9RPEHq4.js → index-nf2yds4w.js} +1 -1
- package/dist/{index-DTh2hfA5.js → index-pqmnzSvl.js} +2 -2
- package/dist/{index-RK0N00Vd.js → index-tFBhG3Jy.js} +1 -1
- package/dist/{index-D_DfTYUo.js → index-y_nzcmAA.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-C_R7wen6.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DvAbrnzO.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BEbojT7K.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-PPw515G5.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DEUapuYe.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-BWPbPTf5.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DIGHAGm0.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Bya9B4So.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_1_lang-dAljglMe.js → index.vue_vue_type_style_index_1_lang-DNXtxqeO.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-0T3F_kRW.cjs → index.vue_vue_type_style_index_1_lang-DWHjSLCm.cjs} +1 -1
- package/dist/{main-aX6kRTuP.cjs → main-CieLGTYq.cjs} +1 -1
- package/dist/{main-Dup8MUNV.js → main-NNG4465a.js} +2 -2
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-D-udFFWH.cjs → threeModel-BP35gpwR.cjs} +1 -1
- package/dist/{threeModel-BtbZLp4G.js → threeModel-BT8m0gg1.js} +2 -2
- package/dist/{threeSceneView-Dd_b10YG.js → threeSceneView--Ojbq4tB.js} +2 -2
- package/dist/{threeSceneView-BT3-qVGH.cjs → threeSceneView-DcHBprrB.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-FlkNC7Wb.cjs → threeSceneViewForCPMPIP-B7ao487R.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-CZEeHC8X.js → threeSceneViewForCPMPIP-DNgKmqQx.js} +6 -6
- package/dist/{threeTrackPathView-DOppTPMk.js → threeTrackPathView-Bx3vX5GB.js} +1 -1
- package/dist/{threeTrackPathView-B8a0xDZ8.cjs → threeTrackPathView-HiflV1Wn.cjs} +1 -1
- package/dist/{threeViewerHost-CpZDl88r.js → threeViewerHost-CxfujoTY.js} +1 -1
- package/dist/{threeViewerHost-B3sZ8h3R.cjs → threeViewerHost-DAOkqnVr.cjs} +1 -1
- package/dist/{workpieceTreePanel-VS1yrDMb.cjs → workpieceTreePanel-B1H5Tkxg.cjs} +1 -1
- package/dist/{workpieceTreePanel-DUvzpwQQ.js → workpieceTreePanel-BcGXi93D.js} +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const oa=require("./index-BPKAk_F3.cjs"),e=require("vue"),p=require("./index-CEwxrYB-.cjs"),Bt=require("./index-CX-xhB8-.cjs"),Te=require("./index.vue_vue_type_style_index_1_lang-BVjtPl2M.cjs"),Xt=require("./index-oH9f3nVB.cjs"),to=require("./threeViewerHost-B3sZ8h3R.cjs"),la=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DJnHA5u9.cjs"),Lt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Lo=require("./isString-Cvx5mmsS.cjs"),Fo=require("./index-dJX5-spW.cjs"),_l=require("./index-BVaHwt5f.cjs"),Rr=require("./index-DCL1siMj.cjs");var Lr=/\s/;function Fr(a){for(var i=a.length;i--&&Lr.test(a.charAt(i)););return i}var $r=/^\s+/;function jr(a){return a&&a.slice(0,Fr(a)+1).replace($r,"")}var $o=NaN,Ur=/^[-+]0x[0-9a-f]+$/i,Kr=/^0b[01]+$/i,Wr=/^0o[0-7]+$/i,Hr=parseInt;function jo(a){if(typeof a=="number")return a;if(p.isSymbol(a))return $o;if(p.isObject(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=jr(a);var s=Kr.test(a);return s||Wr.test(a)?Hr(a.slice(2),s?2:8):Ur.test(a)?$o:+a}var ho=function(){return p.root.Date.now()},qr="Expected a function",Gr=Math.max,Xr=Math.min;function Do(a,i,s){var l,c,d,b,v,h,w=0,E=!1,S=!1,M=!0;if(typeof a!="function")throw new TypeError(qr);i=jo(i)||0,p.isObject(s)&&(E=!!s.leading,S="maxWait"in s,d=S?Gr(jo(s.maxWait)||0,i):d,M="trailing"in s?!!s.trailing:M);function O(T){var I=l,Q=c;return l=c=void 0,w=T,b=a.apply(Q,I),b}function W(T){return w=T,v=setTimeout($,i),E?O(T):b}function Ee(T){var I=T-h,Q=T-w,Le=i-I;return S?Xr(Le,d-Q):Le}function Y(T){var I=T-h,Q=T-w;return h===void 0||I>=i||I<0||S&&Q>=d}function $(){var T=ho();if(Y(T))return pe(T);v=setTimeout($,Ee(T))}function pe(T){return v=void 0,M&&l?O(T):(l=c=void 0,b)}function C(){v!==void 0&&clearTimeout(v),w=0,l=h=c=v=void 0}function P(){return v===void 0?b:pe(ho())}function x(){var T=ho(),I=Y(T);if(l=arguments,c=this,h=T,I){if(v===void 0)return W(h);if(S)return clearTimeout(v),v=setTimeout($,i),O(h)}return v===void 0&&(v=setTimeout($,i)),b}return x.cancel=C,x.flush=P,x}var Yr="[object Boolean]";function Sl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Yr}function Tl(a){return a===void 0}const Jr={class:"form-content"},Zr={title:"选择标签"},Qr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ei={class:"col-operate-wrap"},ti={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ni={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:i}){const s=()=>{b.value=!1,v.value=!1,h.value=[]},l=a;e.computed(()=>{var q;const y=(q=nt.value)==null?void 0:q.split("/");return(y==null?void 0:y.some(X=>(X==null?void 0:X.includes("updateLoading"))||(X==null?void 0:X.includes("loading"))))?!1:We.value==="view"});const c=i,d=e.ref([]),b=e.ref(!1),v=e.ref(!1),h=e.ref([]),w=e.ref("");to.useThreeSystem();const E=e.ref(),S=e.ref(!1),M=e.ref(!1),O=e.ref([]),W=e.ref(),Ee=e.ref(!1),Y=e.ref([]),$=oa.useFormToTableComp(p.pinia),pe=oa.useFormComp(p.pinia),C=e.ref(!1),P=e.ref(),x=p.useLoginState(p.pinia),{loginUserInfo:T}=p.storeToRefs(x),I=e.ref(),Q=e.ref(!0),Le=Te.useModelComp(p.pinia),{tableViewContents:tt,itemData:ze,isEdit:We,routeToChildPath:De,lockingPage:A}=p.storeToRefs(Le),oe=e.ref(null),ne=e.ref(!1),me=e.ref(!1),Xe=Te.useMenuState(),{activeMenuPath:nt}=p.storeToRefs(Xe),Pe=Te.useOriginalState(p.pinia),{originalPath:j}=p.storeToRefs(Pe),Qe=e.ref([]),Ke=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),vt=async y=>{me.value=y,await Ye("disabled",null,y,!0)},yt=async y=>{await Ye("operable",null,y,!0)};e.watch(()=>nt.value,async()=>{d.value=[],h.value=[],w.value=""},{deep:!0,immediate:!0});const ct=()=>{e.nextTick(()=>{be()})},at=y=>{var D;d.value=(D=d.value)==null?void 0:D.map(q=>({...q,isFormColHidden:!(y!=null&&y.includes(q.label))}))};e.onUnmounted(()=>{oe.value=null});const St=y=>{c("clickTrigger",y)},ge=async y=>{var D,q,X,G,J,de;if(y===""){let K="";(D=d.value)==null||D.forEach(H=>{H!=null&&H.isMain&&(K=H==null?void 0:H.value)});let _e=await Te.getItemData(De.value,sessionStorage.getItem("systemKey"),"");K=((de=(J=(G=(X=(q=_e==null?void 0:_e[0])==null?void 0:q.compData)==null?void 0:X.find(H=>(H==null?void 0:H.key)==="mainRouters"))==null?void 0:G.contents)==null?void 0:J[0])==null?void 0:de.routerContent)+j.value+K;let ae=await Te.getItemData(K,sessionStorage.getItem("systemKey"),"");Ee.value=!0,Y.value=ae==null?void 0:ae.filter(H=>(H==null?void 0:H.comp)!=="methodButton"),c("routeUrl",Y.value)}},be=()=>{var D;const y=(D=oe.value)==null?void 0:D.$el;y&&la.Sortable.create(y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:q=>{const{oldIndex:X,newIndex:G}=q;if(X===G)return;const J=d.value.splice(X,1)[0];d.value.splice(G,0,J)}})},Ye=async(y,D,q,X=!1)=>{var G,J,de,K,_e,ke,ae,H;try{Le.setRefreshCurStructure(!1);const le=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((G=le==null?void 0:le.data)==null?void 0:G.code)===200){let Fe=(_e=(K=(de=(J=le==null?void 0:le.data)==null?void 0:J.result)==null?void 0:de[0])==null?void 0:K.value)==null?void 0:_e.pageData;X?Fe={...Fe,compData:(ae=Fe==null?void 0:Fe.compData)==null?void 0:ae.map(Ge=>{var z;return(Ge==null?void 0:Ge.key)==="formContent"?{...Ge,contents:(z=Ge==null?void 0:Ge.contents)==null?void 0:z.map(he=>({...he,[y]:q}))}:Ge})}:Fe={...Fe,compData:(ke=Fe==null?void 0:Fe.compData)==null?void 0:ke.map(Ge=>{var z;return(Ge==null?void 0:Ge.key)==="formContent"?{...Ge,contents:(z=Ge==null?void 0:Ge.contents)==null?void 0:z.map(he=>(he==null?void 0:he.prop)===(D==null?void 0:D.prop)?{...he,[y]:q}:he)}:Ge})};const ye=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:Fe}});((H=ye==null?void 0:ye.data)==null?void 0:H.code)===200?(p.ElMessage.success("编辑成功"),Le.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},Ae=async(y,D)=>{await Ye("label",D,y)},se=async(y,D)=>{y&&await Ye("type",D,y)},te=async(y,D,q)=>{await Ye(D,q,y,!1)},ce=(y,D)=>{I.value===D?Q.value=!1:Q.value=!0,I.value=D==null?void 0:D.changeProp},Be=async(y,D)=>{var X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re;if(!y){p.ElMessage.error("文件路径为空,无法预览");return}w.value=D;let q=[];if((X=y==null?void 0:y.toString())!=null&&X.includes(".urdf")){if(y.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[y],v.value=!0,b.value=!0;return}if((G=y==null?void 0:y.toString())!=null&&G.includes(".stl")||(J=y==null?void 0:y.toString())!=null&&J.includes(".STL")||(de=y==null?void 0:y.toString())!=null&&de.includes(".obj")||(K=y==null?void 0:y.toString())!=null&&K.includes(".mtl")){h.value=(_e=y==null?void 0:y.toString())==null?void 0:_e.split(","),v.value=!1,b.value=!0;return}if((ke=y==null?void 0:y.toString())!=null&&ke.includes(".pcd")||(ae=y==null?void 0:y.toString())!=null&&ae.includes(".PCD")){h.value=(H=y==null?void 0:y.toString())==null?void 0:H.split(","),v.value=!1,b.value=!0;return}if((le=y==null?void 0:y.toString())!=null&&le.includes(".stl")||(Fe=y==null?void 0:y.toString())!=null&&Fe.includes(".STL")||(ye=y==null?void 0:y.toString())!=null&&ye.includes(".obj")||(Ge=y==null?void 0:y.toString())!=null&&Ge.includes(".mtl")){let re,fe=[],Se={};if(Array.isArray(y)?re=y:re=y==null?void 0:y.split(","),re==null||re.forEach(B=>{B.includes(".mtl")?fe.push(B):Se.blob=Se.blob?Se.blob+","+B:B}),(fe==null?void 0:fe.length)>0&&(Se.mtlBlobs=fe),(he=(z=Object.values(Se))==null?void 0:z[0])!=null&&he.includes("http:"))q.push(Se);else{const B=new Blob([Se.blob],{type:"application/octet-stream;charset=UTF-8"});let Ie=URL.createObjectURL(B),Me="";(Ne=y==null?void 0:y.split("/"))==null||Ne.forEach((we,R)=>{var L;R===((L=y==null?void 0:y.split("/"))==null?void 0:L.length)-1&&(Me=we)}),(He=Se.blob)!=null&&He.includes(".stl")&&(Me=(Me==null?void 0:Me.replaceAll(">",""))+".urdf"),W.value=[{name:Me,blobUrl:Ie}],M.value=!0}}else{const re=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),fe=await p.axios.get(y,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{re.close()}),Se=new Blob([fe.data],{type:"application/octet-stream;charset=UTF-8"});let B=URL.createObjectURL(Se),Ie="";(Re=y==null?void 0:y.split("/"))==null||Re.forEach((Me,we)=>{var R;we===((R=y==null?void 0:y.split("/"))==null?void 0:R.length)-1&&(Ie=Me)}),W.value=[{name:Ie,blobUrl:B}],M.value=!0}(q==null?void 0:q.length)>0&&pe.setBlobUrls(q)},Je=()=>{M.value=!1},ut=y=>{var J,de,K,_e;const D=(de=(J=p.cloneDeep(l.itemData))==null?void 0:J.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:de.contents,q=p.cloneDeep(y.content);let X={};q&&((K=Object.values(q))==null?void 0:K.length)>0&&((_e=Object.values(q))==null||_e.forEach((ke,ae)=>{X[D[ae].key]=ke}));const G={content:X,index:l==null?void 0:l.index,buttonName:y==null?void 0:y.buttonName};c("change",G)},k=e.computed(()=>"http://222.92.178.198:62001"),V=async y=>{var le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we;if(!y)return;(Fe=(le=l==null?void 0:l.itemData)==null?void 0:le.find(R=>(R==null?void 0:R.key)==="parentFormPath"))==null||Fe.contents;let D=tt.value;(D==null?void 0:D.length)>0&&(D=D==null?void 0:D.map(R=>{var ie,Ve,ue,ve;let L=(ie=R==null?void 0:R.key)==null?void 0:ie.split("/");return(l==null?void 0:l.compName)===(L==null?void 0:L[0])&&(Ve=d.value)!=null&&Ve.find(Ze=>(Ze==null?void 0:Ze.prop)===(L==null?void 0:L[1]))&&(R.value=y!=null&&y[L==null?void 0:L[1]]&&(y==null?void 0:y[L==null?void 0:L[1]])!==""?y==null?void 0:y[L==null?void 0:L[1]]:(ve=(ue=d.value)==null?void 0:ue.find(Ze=>(Ze==null?void 0:Ze.prop)===(L==null?void 0:L[1])))==null?void 0:ve.value),R}),Le.setTableViewContents(D));const q=p.cloneDeep(l.itemData);let X=q==null?void 0:q.map(R=>{var L;return(R==null?void 0:R.key)==="formContent"&&((L=R.contents)==null||L.map((ie,Ve)=>{var ue,ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t;return ie.type=(ve=(ue=d.value)==null?void 0:ue.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:ve.type,ie.options=ie!=null&&ie.options?ie.options:((et=(Oe=(Ze=ie==null?void 0:ie.key)==null?void 0:Ze.split("$"))==null?void 0:Oe[1])==null?void 0:et.length)>0?(lt=(Ce=oa.formGetOptions((Ue=(Z=ie==null?void 0:ie.key)==null?void 0:Z.split("$"))==null?void 0:Ue[1]))==null?void 0:Ce.split(","))==null?void 0:lt.map(ft=>({label:ft,value:ft})):[],(it=ie==null?void 0:ie.key)!=null&&it.includes("$")&&(ie.key=(kt=(bt=ie==null?void 0:ie.key)==null?void 0:bt.split("$"))==null?void 0:kt[0]),ie.signature=(dt=(st=d.value)==null?void 0:st.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:dt.signature,ie.isLoginUser=(Tt=(xt=d.value)==null?void 0:xt.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:Tt.isLoginUser,ie.value=(gt=Object.values(y))==null?void 0:gt[Ve],ie.isFormColHidden=($t=(wt=d.value)==null?void 0:wt.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:$t.isFormColHidden,ie})),R}),G=d.value,J=(Ge=(ye=p.cloneDeep(X))==null?void 0:ye.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:Ge.contents;if(G=G==null?void 0:G.map(R=>{var L,ie,Ve;return(R==null?void 0:R.type)==="Select"&&((ie=(L=R==null?void 0:R.optionUrl)==null?void 0:L.oldMenuSelect)!=null&&ie.some(ue=>(ue==null?void 0:ue[0])==="["))&&(R.optionUrl.defaultMenu=y),R.value=(Ve=J==null?void 0:J.find((ue,ve)=>((ue==null?void 0:ue.id)??ve)===(R==null?void 0:R.id)))==null?void 0:Ve.value,R}),!Q.value){c("contentChange",{contents:X,index:l.index});return}let de="",K=(Ne=(he=(z=p.cloneDeep(X))==null?void 0:z.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:he.contents)==null?void 0:Ne.find((R,L)=>{var ie,Ve,ue;return(R==null?void 0:R.label)===I.value||L.toString()===((ue=(Ve=(ie=I.value)==null?void 0:ie.split("t"))==null?void 0:Ve[1])==null?void 0:ue.toString())}),_e=(He=K==null?void 0:K.optionUrl)==null?void 0:He.menuSelect,ke=!0;if((fe=(re=(Re=p.cloneDeep(X))==null?void 0:Re.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:re.contents)==null||fe.forEach(R=>{var L,ie,Ve,ue,ve,Ze;ke&&((Ve=(ie=(L=R==null?void 0:R.optionUrl)==null?void 0:L.groupSelect)==null?void 0:ie[1])!=null&&Ve.includes("["))&&(de=(ve=(ue=R==null?void 0:R.optionUrl)==null?void 0:ue.groupSelect)==null?void 0:ve[1],JSON.stringify(_e)===JSON.stringify((Ze=R==null?void 0:R.optionUrl)==null?void 0:Ze.menuSelect)&&(ke=!1))}),(Se=K==null?void 0:K.optionUrl)!=null&&Se.menuSelect&&Q.value){let R=await oa.getSelectRow(K,d.value),L;if((B=K==null?void 0:K.optionUrl)==null||B.menuSelect,R==null||R.forEach(ie=>{var Ve,ue,ve,Ze,Oe,et,Z,Ue,Ce,lt;de===((ue=(Ve=K==null?void 0:K.optionUrl)==null?void 0:Ve.groupSelect)==null?void 0:ue[1])&&((Oe=(Ze=(ve=K==null?void 0:K.optionUrl)==null?void 0:ve.groupSelect)==null?void 0:Ze[1])!=null&&Oe.includes("["))&&((lt=p.cloneDeep(ie))==null?void 0:lt[(Ce=(Ue=(Z=(et=K==null?void 0:K.optionUrl)==null?void 0:et.groupSelect)==null?void 0:Z[1])==null?void 0:Ue.replaceAll("[",""))==null?void 0:Ce.replaceAll("]","")])===(K==null?void 0:K.value)&&(L=ie)}),L){let ie=p.cloneDeep(G);ie=ie==null?void 0:ie.map(ue=>{var ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt;return(L!=null&&L[ue==null?void 0:ue.label]||L!=null&&L[(et=(Oe=(Ze=(ve=ue==null?void 0:ue.optionUrl)==null?void 0:ve.groupSelect)==null?void 0:Ze[1])==null?void 0:Oe.replaceAll("[",""))==null?void 0:et.replaceAll("]","")])&&((Ce=(Ue=(Z=ue==null?void 0:ue.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:Ue[1])!=null&&Ce.includes("["))&&(ue.value=(L==null?void 0:L[ue==null?void 0:ue.label])||(L==null?void 0:L[(kt=(bt=(it=(lt=ue==null?void 0:ue.optionUrl)==null?void 0:lt.groupSelect)==null?void 0:it[1])==null?void 0:bt.replaceAll("[",""))==null?void 0:kt.replaceAll("]","")]),Array.isArray(ue.value)&&ue.value.every(st=>(st==null?void 0:st.url)&&(st==null?void 0:st.name))&&(ue.type="Upload")),ue}),ie=ie==null?void 0:ie.map(ue=>{var ve;return(ve=ue==null?void 0:ue.optionUrl)!=null&&ve.oldMenuSelect,ue}),d.value=p.cloneDeep(ie);let Ve=p.cloneDeep(ie);Ve=Ve==null?void 0:Ve.map(ue=>{var ve,Ze,Oe,et,Z,Ue;return(Ze=(ve=ue==null?void 0:ue.optionUrl)==null?void 0:ve.menuSelect)!=null&&Ze.some(Ce=>Ce==null?void 0:Ce.includes("["))&&(ue.optionUrl.oldMenuSelect=(et=(Oe=p.cloneDeep(ue))==null?void 0:Oe.optionUrl)==null?void 0:et.menuSelect,ue.optionUrl.menuSelect=(Ue=(Z=ue==null?void 0:ue.optionUrl)==null?void 0:Z.menuSelect)==null?void 0:Ue.map(Ce=>{var lt,it,bt,kt;if(Ce!=null&&Ce.includes("[")){let st=(it=(lt=Ce==null?void 0:Ce.replaceAll("[","").replaceAll("]",""))==null?void 0:lt.split(":"))==null?void 0:it[1];Ce=(kt=(bt=p.cloneDeep(ie))==null?void 0:bt.find(dt=>(dt==null?void 0:dt.label)===st))==null?void 0:kt.value}return Ce})),ue}),d.value=Ve}else d.value=G;X=X==null?void 0:X.map(ie=>{var Ve;return(ie==null?void 0:ie.key)==="formContent"&&(ie.contents=(Ve=ie.contents)==null?void 0:Ve.map(ue=>{var ve,Ze,Oe,et;return ue.value=((Ze=(ve=d.value)==null?void 0:ve.find(Z=>(Z==null?void 0:Z.label)===(ue==null?void 0:ue.key)))==null?void 0:Ze.value)??(ue==null?void 0:ue.value),ue.type=((et=(Oe=d.value)==null?void 0:Oe.find(Z=>(Z==null?void 0:Z.prop)===(ue==null?void 0:ue.key)))==null?void 0:et.type)??(ue==null?void 0:ue.type),ue})),ie})}Q.value=!1,c("contentChange",{contents:X,index:l.index});let ae=[],H=[];if((Me=p.cloneDeep((Ie=X==null?void 0:X.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:Ie.contents))==null||Me.forEach(R=>{var L;Array.isArray(R==null?void 0:R.value)&&((L=R==null?void 0:R.value)!=null&&L.find(ie=>{var Ve;return(Ve=ie==null?void 0:ie.url)==null?void 0:Ve.includes(".obj")}))&&(H=R==null?void 0:R.value)}),(H==null?void 0:H.length)>0){const R=(we=p.cloneDeep(H))==null?void 0:we.filter(L=>{var ie;return(ie=L==null?void 0:L.url)==null?void 0:ie.includes(".obj")});R==null||R.forEach(L=>{var Ve,ue,ve,Ze;const ie=(Ve=H==null?void 0:H.filter(Oe=>{var et;return(Oe==null?void 0:Oe.name)===(L==null?void 0:L.name)&&((et=Oe==null?void 0:Oe.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Ve.map(Oe=>Oe==null?void 0:Oe.url);ae.push({objUrl:L==null?void 0:L.url,mtlUrls:((ue=H==null?void 0:H.filter(Oe=>{var et;return(Oe==null?void 0:Oe.name)===(L==null?void 0:L.name)&&((et=Oe==null?void 0:Oe.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:ue.length)===1?(Ze=(ve=H==null?void 0:H.filter(Oe=>{var et;return(Oe==null?void 0:Oe.name)===(L==null?void 0:L.name)&&((et=Oe==null?void 0:Oe.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:ve[0])==null?void 0:Ze.url:ie})}),pe.setObjUrl(ae)}},U=y=>{if(!y)return;const D=[];let q="";for(let X of y)(X.includes("[")||q.includes("["))&&(q+=X.trim(),p.cloneDeep(q).split("【").length-1===p.cloneDeep(q).split("】").length-1&&p.cloneDeep(q).split("[").length-1===p.cloneDeep(q).split("]").length-1&&(D.push(q.replace(/\/\*[\s\S]*?\*\//g,"")),q=""));return D};return e.watch(()=>l.itemData,async()=>{var de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re;const y=(de=l.itemData)==null?void 0:de.find(re=>(re==null?void 0:re.key)==="formContent"),D=(K=p.cloneDeep(l.itemData))==null?void 0:K.find(re=>(re==null?void 0:re.key)==="formButton"),q=(_e=p.cloneDeep(l.itemData))==null?void 0:_e.find(re=>(re==null?void 0:re.key)==="formFlex"),X=(ke=p.cloneDeep(l.itemData))==null?void 0:ke.find(re=>(re==null?void 0:re.key)==="formWrap"),G=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(re=>(re==null?void 0:re.key)==="enableWrap");if((X==null?void 0:X.contents)==="纵向"?S.value=!1:S.value=!0,C.value=(G==null?void 0:G.contents)===void 0?!1:G==null?void 0:G.contents,P.value=typeof(q==null?void 0:q.contents)!="boolean"?!(!(q!=null&&q.contents)===""||((H=q==null?void 0:q.contents)==null?void 0:H.toUpperCase())==="VERTICAL"):q==null?void 0:q.contents,((le=y==null?void 0:y.contents)==null?void 0:le.length)>0&&Array.isArray(y==null?void 0:y.contents)){let re=new WeakMap,fe=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:"data,structure,structureMethod"});await p.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey")}}),(ye=(Fe=fe.data.result)==null?void 0:Fe.filter(B=>{var Ie,Me;return((Ie=B==null?void 0:B.key)==null?void 0:Ie.pageKey)!=="menu"&&((Me=B==null?void 0:B.key)==null?void 0:Me.pageKey)!=="secret"}))==null||ye.forEach(B=>{re[B.key.pageKey]?re[B.key.pageKey]=[...re[B.key.pageKey],B]:re[B.key.pageKey]=[B]});let Se=(z=(Ge=p.cloneDeep(y))==null?void 0:Ge.contents)==null?void 0:z.map((B,Ie)=>{var Z,Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t,ft,Wt,Pt,Yt,cn,nn,_n,gn,Sn,mn,Tn,In,Bn,An,an;let Me=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",we=(B==null?void 0:B.type)??"",R=(B==null?void 0:B.options)??[];if((Z=B==null?void 0:B.key)!=null&&Z.includes("$")&&(Me=(Ue=p.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ue[0],((lt=(Ce=p.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ce[1])==null?void 0:lt.length)>0)){const[Dt,Qt]=(bt=(it=p.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:it[1])==null?void 0:bt.split(/[()]/);we=((kt=Te.FormType.find(ht=>(ht==null?void 0:ht.key)===Dt))==null?void 0:kt.value)??"",((st=Qt==null?void 0:Qt.split(","))==null?void 0:st.length)>0&&(R=(dt=Qt==null?void 0:Qt.split(","))==null?void 0:dt.map(ht=>({label:ht,value:ht})))}let L=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(L=(Tt=(xt=B==null?void 0:B.contents)==null?void 0:xt.split(","))==null?void 0:Tt.map(Dt=>({label:Dt,value:Dt}))),((gt=B==null?void 0:B.optionUrl)==null?void 0:gt.selectRelateType)==="自定义绑定"&&(L=($t=(wt=B==null?void 0:B.optionUrl)==null?void 0:wt.defaultSelect)==null?void 0:$t.map(Dt=>({label:Dt,value:Dt})));let ie=!1,Ve=(B==null?void 0:B.isFormColHidden)??!1,ue=Te.judgeContents((ft=p.cloneDeep(B))==null?void 0:ft.optionUrl,re),ve=ue!==void 0&&ue!==""?ue:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(R==null?void 0:R.length)>0?(Wt=R==null?void 0:R[0])==null?void 0:Wt.value:(B==null?void 0:B.value)??"",Ze=!1,Oe=ue!==void 0||we===""?"Input":we;if((Array.isArray(ue)&&(ue!=null&&ue.every(Dt=>(Dt==null?void 0:Dt.name)&&(Dt==null?void 0:Dt.url)))||Array.isArray(ve)&&(ve!=null&&ve.every(Dt=>(Dt==null?void 0:Dt.name)&&(Dt==null?void 0:Dt.url))))&&(Oe="upload"),typeof ve=="string"&&(ve!=null&&ve.includes("loginUser"))&&!(ve!=null&&ve.includes("loginUserSign"))||B!=null&&B.isLoginUser)ie=!0,ve=((Pt=T.value)==null?void 0:Pt.姓名)||((Yt=T.value)==null?void 0:Yt.account)||((cn=T.value)==null?void 0:cn.账号)||((nn=T.value)==null?void 0:nn.userName);else if(typeof ve=="string"&&(ve!=null&&ve.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(Ze=!0,(B==null?void 0:B.isShow)==="originalSignature")Oe="image",ve=k.value+"/"+((_n=T.value)==null?void 0:_n.signature);else{let Dt=[...new Set(U(B.isShow))].map(Ot=>{var dn,un,kn,on;return{key:(on=(kn=(un=(dn=Ot==null?void 0:Ot.split("["))==null?void 0:dn[1])==null?void 0:un.split("]"))==null?void 0:kn[0])==null?void 0:on.split(":"),value:""}});(gn=ze.value)==null||gn.forEach(Ot=>{Dt==null||Dt.forEach((Jt,dn)=>{var kn;let un=Jt==null?void 0:Jt.key;(Ot==null?void 0:Ot.name)===(un==null?void 0:un[0].replaceAll("'",""))&&((kn=Ot==null?void 0:Ot.compData)==null||kn.forEach(on=>{var On;(on==null?void 0:on.key)==="formContent"&&((On=on==null?void 0:on.contents)==null||On.forEach(xn=>{(xn==null?void 0:xn.prop)===(un==null?void 0:un[1].replaceAll("'",""))&&(Dt[dn].value=xn==null?void 0:xn.value)}))}))})});let Qt=Dt==null?void 0:Dt.map(Ot=>{var Jt;return Ot.key="["+((Jt=Ot.key)==null?void 0:Jt.join(":"))+"]",Ot}),ht=B==null?void 0:B.isShow;Qt==null||Qt.forEach(Ot=>{Ot!=null&&Ot.value?ht=ht.replaceAll(Ot==null?void 0:Ot.key,"'"+(Ot==null?void 0:Ot.value)+"'"):ht=ht.replaceAll(Ot==null?void 0:Ot.key,"undefined")}),ht!=null&&ht.includes("(")||(ht!=null&&ht.includes("==")?ht=((Sn=ht==null?void 0:ht.split("==="))==null?void 0:Sn[0])+"==='"+((mn=ht==null?void 0:ht.split("==="))==null?void 0:mn[1])+"'":ht=((Tn=ht==null?void 0:ht.split("="))==null?void 0:Tn[0])+"='"+((In=ht==null?void 0:ht.split("="))==null?void 0:In[1])+"'"),ht!=null&&ht.includes("=")&&!(ht!=null&&ht.includes("=="))&&!(ht!=null&&ht.includes("==="))&&(ht=ht==null?void 0:ht.replaceAll("=","==")),new Function(`if (${ht}) { return true } else { return false }`)()?(Ve=!1,Oe="image",ve=k.value+"/"+((Bn=T.value)==null?void 0:Bn.signature)):ve=""}return Array.isArray(ve)&&ve.every(Dt=>(Dt==null?void 0:Dt.url)&&(Dt==null?void 0:Dt.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Oe="Url"),(An=B==null?void 0:B.optionUrl)!=null&&An.type&&(Oe=(an=B==null?void 0:B.optionUrl)==null?void 0:an.type),{label:Me??"",name:"t"+Ie,prop:p.cloneDeep(B==null?void 0:B.key),type:Oe,value:B!=null&&B.isNewDate&&ve===""?new Date:ve,id:(B==null?void 0:B.id)??Ie,contents:(L==null?void 0:L.length)>0?L:R??[],width:(B==null?void 0:B.width)??1,isLoginUser:ie,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:Ve,signature:Ze,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1}});setTimeout(async()=>{var ie,Ve,ue,ve,Ze,Oe,et;let B=await(Se==null?void 0:Se.map(async Z=>{var Ue,Ce,lt,it,bt,kt,st;if(((Ue=Z==null?void 0:Z.type)==null?void 0:Ue.toUpperCase())==="UPLOAD"&&!Array.isArray(Z==null?void 0:Z.value)&&(Z==null?void 0:Z.value)!==""){let dt=await p.axios.get(Z==null?void 0:Z.value,{responseType:"blob",headers:{"Content-Type":"application/json"}}),xt="";xt=(bt=(it=(lt=(Ce=dt==null?void 0:dt.headers)==null?void 0:Ce["content-disposition"])==null?void 0:lt.split("filename="))==null?void 0:it[1])==null?void 0:bt.replaceAll('"',"");const Tt=new FormData;Tt.append("file",dt.data,xt);const gt=await Bt.uploadFileApi(Tt);let wt=[{name:xt,url:(st=(kt=gt==null?void 0:gt.data)==null?void 0:kt.result)==null?void 0:st.url}];Z.value=wt}return Z}));Se=await Promise.all(B);const Ie=Se==null?void 0:Se.map(Z=>Z==null?void 0:Z.value);let Me="";Ie==null||Ie.forEach(Z=>{Z!==""&&Z!==void 0&&(Me=Me===""?Z:Me+"/"+Z)}),$.setSelectArray(Ie),$.setSelectString(Me);let we=(ie=p.cloneDeep(Se))==null?void 0:ie.map(Z=>(Z!=null&&Z.value&&Te.IsJson(Z==null?void 0:Z.value)&&Array.isArray(JSON.parse(Z==null?void 0:Z.value))&&(Z.value=JSON.parse(Z.value)),Z));we=we==null?void 0:we.map(Z=>{var Ue,Ce,lt,it,bt,kt,st,dt,xt;if((Ce=(Ue=Z==null?void 0:Z.optionUrl)==null?void 0:Ue.menuSelect)!=null&&Ce.some(Tt=>Tt==null?void 0:Tt.includes("["))){let Tt="";Z.optionUrl.oldMenuSelect=(it=(lt=p.cloneDeep(Z))==null?void 0:lt.optionUrl)==null?void 0:it.menuSelect,Z.optionUrl.menuSelect=(kt=(bt=Z==null?void 0:Z.optionUrl)==null?void 0:bt.menuSelect)==null?void 0:kt.map(gt=>{var wt,$t,ft,Wt,Pt,Yt;if(gt!=null&>.includes("[")){let cn=($t=(wt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:wt.split(":"))==null?void 0:$t[1];Tt=Te.getFindValue((ft=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"),re==null?void 0:re[nt.value],re),gt=((Pt=(Wt=p.cloneDeep(we))==null?void 0:Wt.find(nn=>(nn==null?void 0:nn.label)===cn))==null?void 0:Pt.value)||Te.getFindValue((Yt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:Yt.split(":"),re==null?void 0:re[nt.value],re)}return gt}),Tt!==""&&(Te.getNewValue(Z.optionUrl.menuSelect,Z.optionUrl.oldMenuSelect,(st=Z==null?void 0:Z.optionUrl)==null?void 0:st.groupSelect,re)!==void 0&&(Z.value=Te.getNewValue(Z.optionUrl.menuSelect,Z.optionUrl.oldMenuSelect,(dt=Z==null?void 0:Z.optionUrl)==null?void 0:dt.groupSelect,re)),Array.isArray(Z.value)&&((xt=Z.value)!=null&&xt.every(gt=>gt==null?void 0:gt.url))&&(Z.type="UPLOAD"))}return Z}),d.value=we,me.value=((Ve=d.value)==null?void 0:Ve.every(Z=>Z==null?void 0:Z.disabled))||A.value===nt.value,ne.value=(ue=d.value)==null?void 0:ue.every(Z=>Z==null?void 0:Z.operable),Qe.value=(ve=d.value)==null?void 0:ve.map(Z=>Z==null?void 0:Z.label);let R=[],L=[];if((Ze=p.cloneDeep(d.value))==null||Ze.forEach(Z=>{var Ue;Array.isArray(Z==null?void 0:Z.value)&&((Ue=Z==null?void 0:Z.value)!=null&&Ue.find(Ce=>{var lt;return(lt=Ce==null?void 0:Ce.url)==null?void 0:lt.includes(".obj")}))&&(L=Z==null?void 0:Z.value)}),(L==null?void 0:L.length)>0){const Z=(Oe=p.cloneDeep(L))==null?void 0:Oe.filter(Ue=>{var Ce;return(Ce=Ue==null?void 0:Ue.url)==null?void 0:Ce.includes(".obj")});Z==null||Z.forEach(Ue=>{var lt,it,bt,kt;const Ce=(lt=L==null?void 0:L.filter(st=>{var dt;return(st==null?void 0:st.name)===(Ue==null?void 0:Ue.name)&&((dt=st==null?void 0:st.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:lt.map(st=>st==null?void 0:st.url);R.push({objUrl:Ue==null?void 0:Ue.url,mtlUrls:((it=L==null?void 0:L.filter(st=>{var dt;return(st==null?void 0:st.name)===(Ue==null?void 0:Ue.name)&&((dt=st==null?void 0:st.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:it.length)===1?(kt=(bt=L==null?void 0:L.filter(st=>{var dt;return(st==null?void 0:st.name)===(Ue==null?void 0:Ue.name)&&((dt=st==null?void 0:st.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:bt[0])==null?void 0:kt.url:Ce})}),pe.setObjUrl(R)}(et=p.cloneDeep(d.value))==null||et.forEach(Z=>{var Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t;if((Ce=(Ue=Z==null?void 0:Z.value)==null?void 0:Ue.toString())!=null&&Ce.includes(".stl")||(it=(lt=Z==null?void 0:Z.value)==null?void 0:lt.toString())!=null&&it.includes(".STL")||(kt=(bt=Z==null?void 0:Z.value)==null?void 0:bt.toString())!=null&&kt.includes(".obj")||(dt=(st=Z==null?void 0:Z.value)==null?void 0:st.toString())!=null&&dt.includes(".mtl")||(Tt=(xt=Z==null?void 0:Z.value)==null?void 0:xt.toString())!=null&&Tt.includes(".urdf")){let ft={},Wt=[],Pt;Array.isArray(Z==null?void 0:Z.value)?Pt=Z==null?void 0:Z.value:Pt=(gt=Z==null?void 0:Z.value)==null?void 0:gt.split(","),Pt==null||Pt.forEach(Yt=>{Yt.includes(".mtl")?Wt.push(Yt):ft.blob=ft.blob==="undefined"?Yt:ft.blob+","+Yt}),(Wt==null?void 0:Wt.length)>0&&(ft.mtlBlobs=Wt),($t=(wt=Object.values(ft))==null?void 0:wt[0])!=null&&$t.includes("http:")}})},100)}else d.value=[];let J=tt.value;if((J==null?void 0:J.length)>0&&((he=d.value)==null?void 0:he.length)>0&&(J=J==null?void 0:J.map(re=>{var Se,B,Ie,Me;let fe=(Se=re==null?void 0:re.key)==null?void 0:Se.split("/");return(l==null?void 0:l.compName)===(fe==null?void 0:fe[0])&&(B=d.value)!=null&&B.find(we=>(we==null?void 0:we.prop)===(fe==null?void 0:fe[1]))&&(re.value=(Me=(Ie=d.value)==null?void 0:Ie.find(we=>(we==null?void 0:we.prop)===(fe==null?void 0:fe[1])))==null?void 0:Me.value),re}),Le.setTableViewContents(J)),l!=null&&l.formRules)E.value=l==null?void 0:l.formRules;else{let re={};(Ne=p.cloneDeep(d).value)==null||Ne.forEach(fe=>{(fe==null?void 0:fe.isMain)===!0&&(re[(fe==null?void 0:fe.prop)??(fe==null?void 0:fe.name)]=[{required:!0,message:`${(fe==null?void 0:fe.prop)||(fe==null?void 0:fe.name)}不能为空`}])}),E.value=re}if(((He=D==null?void 0:D.contents)==null?void 0:He.length)>0){const re=[];(Re=D==null?void 0:D.contents)==null||Re.forEach((fe,Se)=>{(fe==null?void 0:fe.label)!==""&&re.push({label:(fe==null?void 0:fe.label)??"",id:(fe==null?void 0:fe.id)??Se,type:(fe==null?void 0:fe.type)??"",background:fe==null?void 0:fe.background})}),O.value=re}else O.value=[]},{deep:!0,immediate:!0}),e.watch(()=>A.value,y=>{me.value=y===nt.value},{immediate:!0}),(y,D)=>{const q=e.resolveComponent("svg-icon"),X=e.resolveComponent("el-switch"),G=e.resolveComponent("el-checkbox"),J=e.resolveComponent("el-popover"),de=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jr,[e.createVNode(Bt.ssForm,{rowContents:d.value,formRules:E.value,buttonValue:O.value,isRowFlex:!1,isEnableWrap:C.value,onOnButtonClick:ut,onChange:V,formDisabled:me.value,formLabelsOperable:ne.value,isButtonRow:S.value,onPreview:Be,onBlurChange:ce,onHandleColEditChange:Ae,onHandleColTypeChange:se,onRouteUrl:ge,onClickTrigger:St},{operateCol:e.withCtx(({renderColumns:K,formDisabled:_e,formLabelsOperable:ke})=>[e.createVNode(J,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ct},{reference:e.withCtx(()=>[e.createElementVNode("span",Zr,[e.createVNode(q,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Qr,[D[1]||(D[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(X,{"model-value":_e,"active-text":"禁用","inactive-text":"",onChange:vt,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(X,{"model-value":ke,"active-text":"编辑所有标签","inactive-text":"",onChange:yt},null,8,["model-value"]),D[2]||(D[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(de,{modelValue:Qe.value,"onUpdate:modelValue":D[0]||(D[0]=ae=>Qe.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:oe,onChange:at},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(G,{value:ae.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ae.label),1)]),_:2},1032,["value"]),e.createVNode(J,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(q,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var H;return[e.createElementVNode("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((H=Object.keys(ae))==null?void 0:H.filter(le=>{var Fe;return(Fe=Ke.value)==null?void 0:Fe.find(ye=>(ye==null?void 0:ye.value)===le)}),le=>{var Fe,ye;return e.openBlock(),e.createElementBlock("div",{key:le},[e.createVNode(Bt._sfc_main$1,{value:ae==null?void 0:ae[le],"active-text":(ye=(Fe=Ke.value)==null?void 0:Fe.find(Ge=>(Ge==null?void 0:Ge.value)===le))==null?void 0:ye.label,inactiveText:"",onChange:Ge=>te(Ge,le,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ti,[e.createVNode(q,{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"]),M.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:W.value,itemProp:w.value,onDestroy:Je},null,8,["fileDataList","itemProp"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(to.ThreeViewerHost,{"file-urls":h.value,isThreeScene:v.value,onGetAnimationData:y.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Uo=Lt._export_sfc(ni,[["__scopeId","data-v-501c758a"]]),no=e.ref(0),Il=a=>{var i;return!a||(a==null?void 0:a.length)===0?[]:(i=p.cloneDeep(a))==null?void 0:i.map(l=>(no.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??no.value,children:Il(l==null?void 0:l.children)},l))},ai=a=>{var s;return(s=p.cloneDeep(a))==null?void 0:s.map(l=>(no.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??no.value,children:Il(l==null?void 0:l.children)},l))},Bl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===i)?(s=p.cloneDeep(a))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==i):(a=a==null?void 0:a.map(l=>(l.children=Bl(l==null?void 0:l.children,i),l)),a)},Al=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(a=a==null?void 0:a.map(l=>(l.children=Al(l==null?void 0:l.children,i),l)),a)},Nl=(a,i)=>{var s;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(s=p.cloneDeep(a))==null?void 0:s.map(c=>{var d;return(c==null?void 0:c.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)&&(c=i==null?void 0:i.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=Nl(l==null?void 0:l.children,i),l)),a)},Vl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.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)):(a=a==null?void 0:a.map(l=>(l.children=Vl(l==null?void 0:l.children,i),l)),a)},Vt=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],oi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],zn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},ii={class:"table-header-child-main"},si={class:"table-header-child-content"},ci={class:"table-header-child-content-item"},ui={class:"fix-button"},pi={key:0},di={class:"form-content"},fi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),b=Te.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(b);e.ref(0);const h=e.ref(""),w=e.ref([]),E=e.ref([]),S=C=>{var x;c.value=!0;let P=[];Vt==null||Vt.forEach(T=>{let I=p.cloneDeep(v.value)+1;b.setTableIndex(I),P.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:C[T.key],id:v.value,contents:T==null?void 0:T.options})}),C!=null&&C.children&&((x=C==null?void 0:C.children)==null?void 0:x.length)>0&&P.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,w.value=P,E.value=P},M=C=>{l("fixChange",p.cloneDeep(C))},O=C=>{l("deleteChange",p.cloneDeep(C))},W=C=>{c.value=!0;let P=[];Vt==null||Vt.forEach(x=>{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),P.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:v.value,contents:x==null?void 0:x.options})}),d.value=C==null?void 0:C.id,w.value=P,E.value=P},Ee=C=>{let P=p.cloneDeep(E.value);P=P==null?void 0:P.map(x=>(x.children||(x.value=C==null?void 0:C[x.name]),x)),E.value=P},Y=()=>{var P,x;w.value=E.value;let C={};if(h.value!=="")C.id=h.value,(P=w.value)==null||P.forEach(T=>{const I=Vt==null?void 0:Vt.find(Q=>(Q==null?void 0:Q.label)===(T==null?void 0:T.label));I?C[I.key]=T.value:T!=null&&T.children&&T.children.length>0&&(C.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"fix"});else{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),C.id="id"+v.value,(x=w.value)==null||x.forEach(I=>{const Q=Vt==null?void 0:Vt.find(Le=>(Le==null?void 0:Le.label)===(I==null?void 0:I.label));Q?C[Q.key]=I.value:I!=null&&I.children&&I.children.length>0&&(C.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"add"})}h.value="",w.value=[],E.value=[]},$=()=>{c.value=!1,h.value="",d.value="",w.value=[],E.value=[]},pe=C=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",C),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(C,P)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,I)=>(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,e.toDisplayString(T.label),1),e.createElementVNode("div",ui,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>W(T)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>S(T)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>pe(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Ol,{tableChildContents:T==null?void 0:T.children,onDeleteChange:O,onFixChange:M},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:$,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:$,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:Y},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hi=Lt._export_sfc(fi,[["__scopeId","data-v-e0fef72d"]]),vi={class:"table-header-child"},gi={class:"table-header-child-main"},mi={class:"table-header-child-content"},yi={class:"table-header-child-content-item"},bi={class:"fix-button"},ki={key:0},xi={class:"form-content"},wi={class:"dialog-footer"},Di={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),b=Te.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(b),h=e.ref(""),w=e.ref([]),E=e.ref([]),S=C=>{l("fixChange",p.cloneDeep(C))},M=C=>{var x;c.value=!0;let P=[];Vt==null||Vt.forEach(T=>{let I=p.cloneDeep(v.value)+1;b.setTableIndex(I),P.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:C[T.key],id:v.value,contents:T==null?void 0:T.options})}),C!=null&&C.children&&((x=C==null?void 0:C.children)==null?void 0:x.length)>0&&P.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,w.value=P,E.value=P},O=C=>{c.value=!0;let P=[];Vt==null||Vt.forEach(x=>{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),P.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:v.value,contents:x==null?void 0:x.options})}),d.value=C==null?void 0:C.id,w.value=P,E.value=P},W=C=>{let P=p.cloneDeep(E.value);P=P==null?void 0:P.map(x=>(x.children||(x.value=C==null?void 0:C[x.name]),x)),E.value=P},Ee=()=>{var P,x;w.value=E.value;let C={};if(h.value!=="")C.id=h.value,(P=w.value)==null||P.forEach(T=>{const I=Vt==null?void 0:Vt.find(Q=>(Q==null?void 0:Q.label)===(T==null?void 0:T.label));I?C[I.key]=T.value:T!=null&&T.children&&T.children.length>0&&(C.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"fix"});else{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),C.id="idChild"+v.value,(x=w.value)==null||x.forEach(I=>{const Q=Vt==null?void 0:Vt.find(Le=>(Le==null?void 0:Le.label)===(I==null?void 0:I.label));Q?C[Q.key]=I.value:I!=null&&I.children&&I.children.length>0&&(C.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"add"})}h.value="",w.value=[],E.value=[]},Y=()=>{c.value=!1,h.value="",d.value="",w.value=[],E.value=[]},$=C=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",C),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pe=C=>{l("deleteChange",C)};return(C,P)=>{const x=e.resolveComponent("svg-icon"),T=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(I,Q)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createElementVNode("div",mi,[e.createElementVNode("div",yi,e.toDisplayString(I.label),1),e.createElementVNode("div",bi,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>O(I)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>M(I)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>$(I)},null,8,["onClick"])])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(hi,{tableChildContents:I==null?void 0:I.children,onDeleteChange:pe,onFixChange:S},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(T,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>P[0]||(P[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(T,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>P[1]||(P[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Ol=Lt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Ei={class:"table-operate-item"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={key:0},Ni={class:"operate-title"},Vi={class:"operate-content"},Oi={class:"fix-content"},Mi={class:"fix-content-label"},Pi={class:"fix-button"},zi={class:"operate-title"},Ri={class:"operate-content"},Li={class:"fix-content"},Fi={class:"fix-content-label"},$i={class:"fix-button"},ji={class:"operate-title"},Ui={class:"operate-content"},Ki={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={class:"operate-content"},Gi={style:{display:"flex","justify-content":"space-between"}},Xi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},ns={class:"dialog-footer"},as={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),b=e.ref(!1),v=e.ref([]),h=e.ref(!1),w=e.ref([]),E=e.ref(!1),S=e.ref([]),M=e.ref(""),O=e.ref(""),W=e.ref([]),Ee=e.ref([]),Y=e.ref([]),$=e.ref([]),pe=e.ref(!1),C=e.ref([]),P=e.ref([]),x=e.ref(0),T=e.ref([]),I=e.ref([]),Q=e.ref([]),Le=()=>{pe.value=!0;let k=[];zn==null||zn.forEach(V=>{x.value++,k.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(V==null?void 0:V.key)==="background"?"var(--ssComponent-primary-color)":"",id:x.value,contents:V==null?void 0:V.options})}),C.value=k,P.value=k},tt=()=>{var V,U,y;b.value=!0;let k=[];(y=(U=(V=Te.FormContent)==null?void 0:V.find(D=>(D==null?void 0:D.key)==="Input"))==null?void 0:U.value)==null||y.forEach(D=>{x.value++,k.push({label:D==null?void 0:D.label,name:(D==null?void 0:D.name)||(D==null?void 0:D.label),type:D.type,value:(D==null?void 0:D.label)==="类型"?"Input":"",id:x.value,contents:D==null?void 0:D.options})}),T.value=k,I.value=k},ze=k=>{k||(T.value=I.value)},We=async k=>{var V,U,y,D,q,X,G,J,de,K,_e,ke;if((k==null?void 0:k.类型)!==((U=(V=I.value)==null?void 0:V.find(ae=>(ae==null?void 0:ae.label)==="类型"))==null?void 0:U.value)){let ae=[],H=await((q=(D=(y=Te.FormContent)==null?void 0:y.find(le=>(le==null?void 0:le.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:D.value)==null?void 0:q.value)?await((K=(de=(J=Te.FormContent)==null?void 0:J.find(le=>(le==null?void 0:le.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:de.value)==null?void 0:K.value):(G=(X=Te.FormContent)==null?void 0:X.find(le=>(le==null?void 0:le.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:G.value;if(H==null||H.forEach(le=>{x.value++,ae.push({label:le==null?void 0:le.label,name:(le==null?void 0:le.name)||(le==null?void 0:le.label),type:le.type,value:le!=null&&le.属性名?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):(k==null?void 0:k[le.label])??"",id:x.value,contents:le==null?void 0:le.options,prop:(le==null?void 0:le.prop)||(le==null?void 0:le.name)||(le==null?void 0:le.label)})}),k!=null&&k.菜单选项&&((_e=k==null?void 0:k.菜单选项)==null?void 0:_e.length)>0){const le=await Te.menuToContentType(k==null?void 0:k.菜单选项);ae=ae==null?void 0:ae.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=le),Fe))}I.value=await Te.selectToBase(p.cloneDeep(ae)),T.value=await Te.selectToBase(p.cloneDeep(ae))}else{let ae=p.cloneDeep(T.value);if(ae=ae==null?void 0:ae.map(H=>(H.value=k==null?void 0:k[H.name],H)),k!=null&&k.菜单选项&&((ke=k==null?void 0:k.菜单选项)==null?void 0:ke.length)>0){const H=await Te.menuToContentType(k==null?void 0:k.菜单选项);ae=ae==null?void 0:ae.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=H),le))}ae=Te.formToOptionsContents(ae),I.value=await Te.selectToBase(p.cloneDeep(ae))}},De=async k=>{await We(k),T.value=I.value},A=(k,V)=>{if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="selectRelateType"){const U=V==null?void 0:V.optionUrl;return(U==null?void 0:U.selectRelateType)||V[k.key]}if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="menuSelect"){const U=V==null?void 0:V.optionUrl;return(U==null?void 0:U.menuSelect)||V[k.key]}if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="groupSelect"){const U=V==null?void 0:V.optionUrl;return(U==null?void 0:U.groupSelect)||V[k.key]}if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="originalContent")return(V==null?void 0:V.value)||V[k.key];if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="multiple"){const U=V[k.key];return Sl(U)?U:k.default}return(k==null?void 0:k.label)==="类型"&&V[k.key]===""?"Input":(k==null?void 0:k.key)==="isFormColHidden"&&!V[k.key]?!1:V[k.key]},oe=async k=>{var y,D,q,X,G,J,de,K,_e;b.value=!0;let V=[];const U=await((q=(D=(y=Te.FormContent)==null?void 0:y.find(ke=>(ke==null?void 0:ke.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:D.value)==null?void 0:q.value)?await((K=(de=(J=Te.FormContent)==null?void 0:J.find(ke=>(ke==null?void 0:ke.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:de.value)==null?void 0:K.value):(G=(X=Te.FormContent)==null?void 0:X.find(ke=>(ke==null?void 0:ke.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:G.value;if(U==null||U.forEach(ke=>{x.value++,V.push({label:ke==null?void 0:ke.label,name:(ke==null?void 0:ke.name)||(ke==null?void 0:ke.label),type:ke.type,value:(ke==null?void 0:ke.label)==="属性名"?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):A(ke,k),id:x.value,contents:ke==null?void 0:ke.options})}),k!=null&&k.menuSelect&&((_e=k==null?void 0:k.menuSelect)==null?void 0:_e.length)>0){const ke=await Te.menuToContentType(k==null?void 0:k.menuSelect);V=V==null?void 0:V.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=ke),ae))}M.value=k==null?void 0:k.id,T.value=await Te.selectToBase(Te.formToOptionsContents(V)),I.value=await Te.selectToBase(Te.formToOptionsContents(V))},ne=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;Q.value=(V=p.cloneDeep(Q.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="tableToForm"&&(y.contents=Q.value),y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},me=()=>{b.value=!1,T.value=[],M.value=""},Xe=async()=>{var y,D,q,X,G,J,de,K,_e,ke;T.value=I.value;let k={};M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value);let V=await((q=(D=(y=Te.FormContent)==null?void 0:y.find(ae=>{var H,le;return(ae==null?void 0:ae.key)===(((le=(H=T.value)==null?void 0:H.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:D.value)==null?void 0:q.value)??((G=(X=Te.FormContent)==null?void 0:X.find(ae=>{var H,le;return(ae==null?void 0:ae.key)===(((le=(H=T.value)==null?void 0:H.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:G.value);if((J=T.value)==null||J.forEach(ae=>{const H=V==null?void 0:V.find(le=>(le==null?void 0:le.label)===(ae==null?void 0:ae.label));H&&(k[H.key]=ae.value)}),k.name=k.label,(de=Q.value)!=null&&de.find(ae=>ae.id===k.id))Q.value=(K=Q.value)==null?void 0:K.map(ae=>(ae.id===k.id&&(ae=k),ae));else{let ae=p.cloneDeep(Q.value);Q.value||(Q.value=[]),ae.push(k),Q.value=ae}Q.value=Q.value.map(({id:ae,...H})=>H),b.value=!1,M.value="";let U=p.cloneDeep(s.originalItemContents);(_e=p.cloneDeep(s.originalItemContents))!=null&&_e.find(ae=>(ae==null?void 0:ae.key)==="tableToForm")?U=(ke=p.cloneDeep(s.originalItemContents))==null?void 0:ke.map(ae=>((ae==null?void 0:ae.key)==="tableToForm"&&(ae.contents=Q.value),ae)):U.push({key:"tableToForm",contents:Q.value}),l("change",U)},nt=k=>{pe.value=!0;let V=[];zn==null||zn.forEach(U=>{x.value++,V.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:k[U.key],id:x.value,contents:U==null?void 0:U.options})}),M.value=k==null?void 0:k.id,C.value=V,P.value=V};e.watch(()=>E.value,()=>{var V,U;let k=p.cloneDeep(s.originalItemContents);(V=p.cloneDeep(s.originalItemContents))!=null&&V.find(y=>(y==null?void 0:y.key)==="page")?k=(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="page"&&(y.contents=E.value),y)):k.push({key:"page",contents:E.value}),l("change",k)},{deep:!0});const Pe=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;Ee.value=(V=p.cloneDeep(Ee.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="extraButton"&&(y.contents=Ee.value),y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},j=()=>{var U,y,D,q,X;C.value=P.value;let k={};if(M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value),(U=C.value)==null||U.forEach(G=>{const J=zn==null?void 0:zn.find(de=>(de==null?void 0:de.label)===(G==null?void 0:G.label));J?k[J.key]=G.value:G!=null&&G.children&&G.children.length>0&&(k.children=G.children)}),(y=Ee.value)!=null&&y.find(G=>G.id===k.id))Ee.value=(D=Ee.value)==null?void 0:D.map(G=>(G.id===k.id&&(G=k),G));else{let G=p.cloneDeep(Ee.value)??[];G.push(k),Ee.value=G}pe.value=!1,M.value="";let V=p.cloneDeep(s.originalItemContents);(q=p.cloneDeep(s.originalItemContents))!=null&&q.find(G=>(G==null?void 0:G.key)==="extraButton")?V=(X=p.cloneDeep(s.originalItemContents))==null?void 0:X.map(G=>((G==null?void 0:G.key)==="extraButton"&&(G.contents=Ee.value),G)):V.push({key:"extraButton",contents:Ee.value}),l("change",V)},Qe=k=>{let V=p.cloneDeep(P.value);V=V==null?void 0:V.map(U=>(U.children||(U.value=k==null?void 0:k[U.name]),U)),P.value=V},Ke=()=>{pe.value=!1,C.value=[],M.value=""},vt=k=>{h.value=!0;let V=[];Rn==null||Rn.forEach(U=>{x.value++,V.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:k[U.key],id:x.value,contents:U==null?void 0:U.options})}),M.value=k==null?void 0:k.id,Y.value=V,$.value=V},yt=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;W.value=(V=p.cloneDeep(W.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="rowButton"&&(y.contents=W.value),y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ct=()=>{d.value=!0;let k=[];Vt==null||Vt.forEach(V=>{x.value++,k.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),w.value=k,S.value=k},at=()=>{h.value=!0;let k=[];Rn==null||Rn.forEach(V=>{x.value++,k.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),Y.value=k,$.value=k},St=k=>{let V=p.cloneDeep($.value);V=V==null?void 0:V.map(U=>(U.children||(U.value=k==null?void 0:k[U.name]),U)),$.value=V},ge=()=>{var U,y,D,q,X;Y.value=$.value;let k={};if(M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value),(U=Y.value)==null||U.forEach(G=>{const J=Rn==null?void 0:Rn.find(de=>(de==null?void 0:de.label)===(G==null?void 0:G.label));J?k[J.key]=G.value:G!=null&&G.children&&G.children.length>0&&(k.children=G.children)}),(y=W.value)!=null&&y.find(G=>G.id===k.id))W.value=(D=W.value)==null?void 0:D.map(G=>(G.id===k.id&&(G=k),G));else{let G=p.cloneDeep(W.value);G.push(k),W.value=G}h.value=!1,M.value="";let V=p.cloneDeep(s.originalItemContents);(q=p.cloneDeep(s.originalItemContents))!=null&&q.find(G=>(G==null?void 0:G.key)==="rowButton")?V=(X=p.cloneDeep(s.originalItemContents))==null?void 0:X.map(G=>((G==null?void 0:G.key)==="rowButton"&&(G.contents=W.value),G)):V.push({key:"rowButton",contents:W.value}),l("change",V)},be=()=>{h.value=!1,M.value="",$.value=[],Y.value=[]},Ye=k=>{d.value=!0;let V=[];Vt==null||Vt.forEach(U=>{x.value++,V.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:x.value,contents:U==null?void 0:U.options})}),w.value=V,O.value=k==null?void 0:k.id,S.value=V},Ae=k=>{var V;v.value=Bl(p.cloneDeep(v.value),k==null?void 0:k.id),l("change",(V=p.cloneDeep(s.originalItemContents))==null?void 0:V.map(U=>{var y;return(U==null?void 0:U.key)==="header"&&(U.contents=(y=v.value)!=null&&y.some(D=>D==null?void 0:D.children)?[v.value]:v.value),U}))},se=k=>{var U,y,D;k.type==="fix"?k.id!==""?v.value=Nl(v.value,k):v.value=Al(v.value,k==null?void 0:k.contents):v.value=Vl(v.value,k),v.value=(U=v.value)!=null&&U.some(q=>q==null?void 0:q.children)?[v.value]:v.value,M.value="";let V=p.cloneDeep(s.originalItemContents);(y=p.cloneDeep(s.originalItemContents))!=null&&y.find(q=>(q==null?void 0:q.key)==="header")?V=(D=p.cloneDeep(s.originalItemContents))==null?void 0:D.map(q=>((q==null?void 0:q.key)==="header"&&(q.contents=v.value),q)):V.push({key:"header",contents:v.value}),l("change",V)},te=k=>{var U;d.value=!0;let V=[];Vt==null||Vt.forEach(y=>{x.value++,V.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:k[y.key],id:x.value,contents:y==null?void 0:y.options})}),k!=null&&k.children&&((U=k==null?void 0:k.children)==null?void 0:U.length)>0&&V.push({children:k==null?void 0:k.children,isFormColHidden:!0}),M.value=k==null?void 0:k.id,O.value="",w.value=V,S.value=V},ce=k=>{let V=p.cloneDeep(S.value);V=V==null?void 0:V.map(U=>(U.children||(U.value=k==null?void 0:k[U.name]),U)),S.value=V},Be=()=>{d.value=!1,M.value="",O.value="",S.value=[]},Je=()=>{var U,y,D,q,X,G;w.value=S.value;let k={};if(M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value),(U=w.value)==null||U.forEach(J=>{const de=Vt==null?void 0:Vt.find(K=>(K==null?void 0:K.label)===(J==null?void 0:J.label));de?k[de.key]=J.value:J!=null&&J.children&&J.children.length>0&&(k.children=J.children)}),(y=v.value)!=null&&y.find(J=>J.id===k.id))v.value=(D=v.value)==null?void 0:D.map(J=>(J.id===k.id&&(J=k),J));else{let J=p.cloneDeep(v.value)??[];O.value===""?J.push(k):J=J==null?void 0:J.map(de=>(de.id===O.value&&(de.children||(de.children=[]),de.children.push(k)),de)),v.value=J}v.value=(q=v.value)!=null&&q.some(J=>J==null?void 0:J.children)?[v.value]:v.value,d.value=!1,M.value="",O.value="";let V=p.cloneDeep(s.originalItemContents);(X=p.cloneDeep(s.originalItemContents))!=null&&X.find(J=>(J==null?void 0:J.key)==="header")?V=(G=p.cloneDeep(s.originalItemContents))==null?void 0:G.map(J=>((J==null?void 0:J.key)==="header"&&(J.contents=v.value),J)):V.push({key:"header",contents:v.value}),l("change",V)},ut=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;v.value=(V=p.cloneDeep(v.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>{var D;return(y==null?void 0:y.key)==="header"&&(y.contents=(D=v.value)!=null&&D.some(q=>q==null?void 0:q.children)?[v.value]:v.value),y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),v.value=(V=(k=c.value)==null?void 0:k.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:V.contents,W.value=(y=(U=c.value)==null?void 0:U.find(z=>(z==null?void 0:z.key)==="rowButton"))==null?void 0:y.contents,Ee.value=(q=(D=c.value)==null?void 0:D.find(z=>(z==null?void 0:z.key)==="extraButton"))==null?void 0:q.contents,E.value=(G=(X=c.value)==null?void 0:X.find(z=>(z==null?void 0:z.key)==="page"))!=null&&G.contents?!!((de=(J=c.value)==null?void 0:J.find(z=>(z==null?void 0:z.key)==="page"))!=null&&de.contents):!1,Q.value=(_e=(K=c.value)==null?void 0:K.find(z=>(z==null?void 0:z.key)==="tableToForm"))==null?void 0:_e.contents,v.value=(ke=v.value)==null?void 0:ke.map((z,he)=>(Array.isArray(z)?z=ai(z):z={label:(z==null?void 0:z.label)??"",prop:(z==null?void 0:z.label)==="操作"?"operate":z==null?void 0:z.prop,width:z!=null&&z.width?parseInt(z.width):"",fixed:(z==null?void 0:z.fixed)??void 0,sortable:(z==null?void 0:z.sortable)??!1,align:(z==null?void 0:z.align)??"left",showOverflowTooltip:(z==null?void 0:z.showOverflowTooltip)??!0,isNotDrag:(z==null?void 0:z.isNotDrag)??!1,isEditCol:(z==null?void 0:z.isEditCol)??!1,isOperate:(z==null?void 0:z.isOperate)??!1,id:(z==null?void 0:z.id)??he,formMenuSelect:(z==null?void 0:z.formMenuSelect)??void 0,groupSelect:(z==null?void 0:z.groupSelect)??void 0},z)),v.value=(ae=v.value)!=null&&ae.every(z=>Array.isArray(z))?(H=v.value)==null?void 0:H[0]:v.value,W.value=(le=W.value)==null?void 0:le.map((z,he)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",textColor:(z==null?void 0:z.textColor)??"#000000",id:(z==null?void 0:z.id)??he}),Ee.value=(Fe=Ee.value)==null?void 0:Fe.map((z,he)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:(z==null?void 0:z.id)??he}),Q.value)Q.value=(Ge=Q.value)==null?void 0:Ge.map(z=>{x.value++;let he=z;return he.id=x.value,he});else{let z=[];const he=(ye=Te.getColumnChild(p.cloneDeep(v.value)))==null?void 0:ye.filter(Ne=>(Ne==null?void 0:Ne.prop)!=="operate");he==null||he.forEach(Ne=>{var He;x.value++,z.push({label:Ne==null?void 0:Ne.label,name:Ne==null?void 0:Ne.label,type:Ne!=null&&Ne.groupSelect?"Select":"Input",value:"",id:x.value,contents:Ne==null?void 0:Ne.options,menuSelect:Ne==null?void 0:Ne.formMenuSelect,groupSelect:(He=Ne==null?void 0:Ne.groupSelect)==null?void 0:He.split(":"),selectRelateType:"关联绑定列"})}),Q.value=z}},{deep:!0,immediate:!0}),(k,V)=>{const U=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Ei,[e.createElementVNode("div",_i,[V[2]||(V[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(y,{class:"icon-content",onClick:ct,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[1]||(V[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Bi,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>Ye(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>te(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>ut(D)},null,8,["onClick"])])]),D!=null&&D.children&&D.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Ol,{tableChildContents:D==null?void 0:D.children,onDeleteChange:Ae,onFixChange:se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[V[4]||(V[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(y,{class:"icon-content",id:"themeButton",onClick:at},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Mi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Pi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:X=>vt(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>yt(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",zi,[V[6]||(V[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(y,{class:"icon-content",id:"themeButton",onClick:Le},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Li,[e.createElementVNode("div",Fi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",$i,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:X=>nt(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>Pe(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ji,[V[8]||(V[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(y,{class:"icon-content",id:"themeButton",onClick:tt},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[7]||(V[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Ki,[e.createElementVNode("div",Wi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Hi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:X=>oe(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>ne(D)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,[V[9]||(V[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":V[0]||(V[0]=D=>E.value=D)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(y,{onClick:Be,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[11]||(V[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(y,{class:"ok-button button",onClick:Je,id:"themeButton"},{default:e.withCtx(()=>V[12]||(V[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:h.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:Y.value,key:Y.value,isEnableWrap:!0,onChange:St},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(y,{onClick:be,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[13]||(V[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(y,{class:"ok-button button",onClick:ge,id:"themeButton"},{default:e.withCtx(()=>V[14]||(V[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:pe.value,onBeforeDestroy:Ke,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:Qe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(y,{onClick:Ke,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[15]||(V[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(y,{class:"ok-button button",onClick:j,id:"themeButton"},{default:e.withCtx(()=>V[16]||(V[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:me,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:T.value,key:T.value,isEnableWrap:!0,onChange:We,onChangeVisible:ze,onBlurChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(y,{onClick:me,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[17]||(V[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(y,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>V[18]||(V[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},os=Lt._export_sfc(as,[["__scopeId","data-v-0a7fc163"]]),ls=Te.useModelComp(p.pinia),{pageMapState:rs}=p.storeToRefs(ls),is=Te.useMenuState(p.pinia),{activeMenuPath:ss}=p.storeToRefs(is),cs=e.ref(24),us=e.ref(6),ps=e.ref(70),ds=e.ref(.18),fs=e.ref(45),hs=(a,i,s,l)=>{var c,d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((v=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:v.y)||i,w:((w=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:w.w)||cs.value,h:((S=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:S.h)||s,minW:((O=(M=a==null?void 0:a.value)==null?void 0:M.tableData)==null?void 0:O.minW)||us.value,minH:((Ee=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:Ee.minH)||ds.value,maxH:(($=(Y=a==null?void 0:a.value)==null?void 0:Y.tableData)==null?void 0:$.maxH)||fs.value,i:((C=(pe=a==null?void 0:a.value)==null?void 0:pe.tableData)==null?void 0:C.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},vs=(a,i)=>{var l,c,d,b,v,h,w,E;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((b=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:b.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(s=((E=(w=(h=a==null?void 0:a.compData)==null?void 0:h.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:w.contents)==null?void 0:E.length)/5);return s*2},Ml=(a,i,s)=>{var b,v;const l=(v=(b=rs.value)==null?void 0:b[ss.value])==null?void 0:v.filter(h=>{var w;return((w=h==null?void 0:h.key)==null?void 0:w.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var w,E,S;return((S=(E=(w=h==null?void 0:h.value)==null?void 0:w.tableData)==null?void 0:E.component)==null?void 0:S.id)===a.id}),d=vs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,w)=>Ml(h,w))),{...hs(c,i,d,a)}},gs=(a,i)=>{if((a==null?void 0:a.length)===0)return[];const s=p.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((l,c)=>Ml(l,c)):[]},ms=a=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ys=(a,i)=>a==null?void 0:a.map(s=>{for(const l in i)if(l===(s==null?void 0:s.prop))return{...s,value:i[l]};return s}),bs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]);e.watch(()=>s.compType,v=>{var E;const h=ms(s==null?void 0:s.optionItems),w=v?(E=h[v==null?void 0:v.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=w==null?void 0:w.map(S=>{for(const[M,O]of Object.entries((s==null?void 0:s.comp)||{}))if((S==null?void 0:S.prop)===M)return{...S,value:O};return S})},{immediate:!0});const d=v=>Bt.getComponent(v),b=v=>{var h,w;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var S;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(S=E==null?void 0:E.options)==null?void 0:S.map(M=>({...M,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(w=c.value)==null?void 0:w.map(E=>{var S;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(S=E==null?void 0:E.options)==null?void 0:S.map(M=>({...M,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:v==null?void 0:v.prop})};return(v,h)=>{const w=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,S=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:S==null?void 0:S.prop},{default:e.withCtx(()=>[e.createVNode(w,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S==null?void 0:S.label)+":",1)]),_:2},1024),e.createVNode(w,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(S.type)),{modelValue:S.value,"onUpdate:modelValue":M=>S.value=M,content:S==null?void 0:S.options,optionUrl:S==null?void 0:S.optionUrl,disabled:S==null?void 0:S.disabled,activeText:S==null?void 0:S.activeText,inactiveText:S==null?void 0:S.inactiveText,onChange:M=>b(S)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ks=Lt._export_sfc(bs,[["__scopeId","data-v-a99af9a7"]]),xs=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:i}){const s=a,l=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),b=$=>$==null?void 0:$.reduce((pe,C)=>(pe[C==null?void 0:C.prop]=C==null?void 0:C.rule,pe),{}),v=e.computed(()=>({formRules:b(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),w=e.ref(""),E=($,pe,C)=>{var T;let P=[];(s==null?void 0:s.activeTabName)==="任务配置"?(P=[{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:$},{label:"按钮名称",value:"按钮名称",children:pe}]},{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:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(P=[{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:(T=s==null?void 0:s.relatedData)==null?void 0:T.map(I=>({label:I==null?void 0:I.任务名称,value:I==null?void 0:I.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let x;return C&&(C==null?void 0:C.length)>0?x=[...P,...S($,pe,C)]:x=P,x},S=($,pe,C)=>{const P=[{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 C?P==null?void 0:P.filter(x=>C==null?void 0:C.includes(x==null?void 0:x.prop)):P},M=($,pe)=>{var I,Q,Le,tt,ze,We,De,A,oe;const C=((ze=(tt=(Le=(Q=(I=s==null?void 0:s.comp)==null?void 0:I.compData)==null?void 0:Q.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:Le.contents)==null?void 0:tt.filter(ne=>(ne==null?void 0:ne.label)!=="操作"))==null?void 0:ze.map(ne=>({value:ne==null?void 0:ne.prop,label:ne.label})))||[],P=/button/i,x=((oe=(A=(De=(We=s==null?void 0:s.comp)==null?void 0:We.compData)==null?void 0:De.filter(ne=>P.test(ne==null?void 0:ne.key)))==null?void 0:A.flatMap(ne=>ne==null?void 0:ne.contents))==null?void 0:oe.map(ne=>({value:ne==null?void 0:ne.label,label:ne.label})))||[],T=E(C,x,$);h.value=pe?ys(T,pe):T,$&&($==null?void 0:$.length)>0&&d.value.push(...$==null?void 0:$.map(ne=>({prop:ne,rule:c})))};e.onMounted(()=>{M(null,s==null?void 0:s.extendItem)});const O=$=>{const pe=$==null?void 0:$[w.value];if(w.value==="执行任务"){if(!(pe!=null&&pe.join("/")))return;const C=pe==null?void 0:pe.join("/");M(C==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:C==="进度设置/进度条"?["进度关键词"]:null,$)}},W=$=>{l("change",{target:s==null?void 0:s.target,extendConfigs:$})},Ee=($,pe)=>{w.value=pe==null?void 0:pe.changeProp,O($)},Y=$=>{l("onButtonClick",$)};return($,pe)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:W,onBlurChange:Ee,onOnButtonClick:Y},null,8,["rowContents","formRules","buttonValue"]))}}),ws=Lt._export_sfc(xs,[["__scopeId","data-v-7c660c1f"]]),Ds={};function Cs(a,i){return null}const Es=Lt._export_sfc(Ds,[["render",Cs]]),_s={class:"form-operate-content"},Ss={class:"form-operate-item"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={class:"operate-title"},Vs={class:"operate-content"},Os={class:"fix-content"},Ms={class:"fix-button"},Ps={style:{display:"flex","justify-content":"space-between"}},zs={class:"form-content"},Rs={class:"dialog-footer"},Ls={class:"form-content"},Fs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref([]),b=e.ref([]),v=e.ref(!1),h=e.ref([]),w=e.ref([]),E=e.ref(""),S=e.ref(!1),M=e.ref(0),O=e.ref([]),W=e.ref([]),Ee=(A,oe)=>{if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="selectRelateType"){const ne=oe==null?void 0:oe.optionUrl;return(ne==null?void 0:ne.selectRelateType)||oe[A.key]}if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="menuSelect"){const ne=oe==null?void 0:oe.optionUrl;return(ne==null?void 0:ne.menuSelect)||oe[A.key]}if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="groupSelect"){const ne=oe==null?void 0:oe.optionUrl;return(ne==null?void 0:ne.groupSelect)||oe[A.key]}if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="originalContent")return(oe==null?void 0:oe.value)||oe[A.key];if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="multiple"){const ne=oe[A.key];return Sl(ne)?ne:A.default}return(A==null?void 0:A.label)==="类型"&&oe[A.key]===""?"Input":(A==null?void 0:A.key)==="isFormColHidden"&&!oe[A.key]?!1:oe[A.key]},Y=async A=>{var me,Xe,nt,Pe,j,Qe;c.value=!0;let oe=[];const ne=await((nt=(Xe=(me=Te.FormContent)==null?void 0:me.find(Ke=>(Ke==null?void 0:Ke.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:Xe.value)==null?void 0:nt.value)??((j=(Pe=Te.FormContent)==null?void 0:Pe.find(Ke=>(Ke==null?void 0:Ke.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:j.value);if(ne==null||ne.forEach(Ke=>{M.value++,oe.push({label:Ke==null?void 0:Ke.label,name:Ke==null?void 0:Ke.label,type:Ke.type,prop:Ke==null?void 0:Ke.prop,value:Ee(Ke,A),id:M.value,contents:Ke==null?void 0:Ke.options,width:(A==null?void 0:A.width)??1})}),A!=null&&A.menuSelect&&((Qe=A==null?void 0:A.menuSelect)==null?void 0:Qe.length)>0){const Ke=await Te.menuToContentType(A==null?void 0:A.menuSelect);oe=oe==null?void 0:oe.map(vt=>((vt==null?void 0:vt.name)==="组信息选项"&&(vt.contents=Ke),vt))}E.value=A==null?void 0:A.id,d.value=await Te.selectToBase(Te.formToOptionsContents(oe)),b.value=await Te.selectToBase(Te.formToOptionsContents(oe))},$=A=>{var ne;v.value=!0;let oe=[];(ne=Te.FormButton)==null||ne.forEach(me=>{M.value++,oe.push({label:me==null?void 0:me.label,name:me==null?void 0:me.label,type:me.type,value:(me==null?void 0:me.label)==="类型"&&A[me.key]===""?"normal":A[me.key],id:M.value,contents:me==null?void 0:me.options})}),O.value=oe,W.value=oe,E.value=A==null?void 0:A.id};e.watch(()=>S.value,()=>{var oe,ne;let A=p.cloneDeep(s.originalItemContents);(oe=p.cloneDeep(s.originalItemContents))!=null&&oe.find(me=>(me==null?void 0:me.key)==="enableWrap")?A=(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(me=>((me==null?void 0:me.key)==="enableWrap"&&(me.contents=!S.value),me)):A.push({key:"enableWrap",contents:!S.value}),l("change",A)},{deep:!0});const pe=()=>{var ne,me,Xe,nt,Pe;O.value=W.value;let A={};if(E.value!==""?A.id=E.value:(M.value++,A.id="id"+M.value),(ne=O.value)==null||ne.forEach(j=>{var Ke;const Qe=(Ke=Te.FormButton)==null?void 0:Ke.find(vt=>(vt==null?void 0:vt.label)===(j==null?void 0:j.label));Qe&&(A[Qe.key]=j.value)}),(me=h.value)!=null&&me.find(j=>j.id===A.id))h.value=(Xe=h.value)==null?void 0:Xe.map(j=>(j.id===A.id&&(j=A),j));else{let j=p.cloneDeep(h.value);h.value||(h.value=[]),j.push(A),h.value=j}v.value=!1,E.value="";let oe=p.cloneDeep(s.originalItemContents);(nt=p.cloneDeep(s.originalItemContents))!=null&&nt.find(j=>(j==null?void 0:j.key)==="formButton")?oe=(Pe=p.cloneDeep(s.originalItemContents))==null?void 0:Pe.map(j=>((j==null?void 0:j.key)==="formButton"&&(j.contents=h.value),j)):oe.push({key:"formButton",contents:h.value}),l("change",oe)},C=A=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var oe,ne;w.value=(oe=p.cloneDeep(w.value))==null?void 0:oe.filter(me=>(me==null?void 0:me.id)!==(A==null?void 0:A.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(me=>((me==null?void 0:me.key)==="formContent"&&(me.contents=w.value),me))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},P=A=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var oe,ne;h.value=(oe=p.cloneDeep(h.value))==null?void 0:oe.filter(me=>(me==null?void 0:me.id)!==(A==null?void 0:A.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(me=>((me==null?void 0:me.key)==="formButton"&&(me.contents=h.value),me))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>{var oe;v.value=!0;let A=[];(oe=Te.FormButton)==null||oe.forEach(ne=>{M.value++,A.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:(ne==null?void 0:ne.label)==="类型"?"normal":"",id:M.value,contents:ne==null?void 0:ne.options})}),O.value=A,W.value=A},T=()=>{var oe,ne,me;c.value=!0;let A=[];(me=(ne=(oe=Te.FormContent)==null?void 0:oe.find(Xe=>(Xe==null?void 0:Xe.key)==="Input"))==null?void 0:ne.value)==null||me.forEach(Xe=>{M.value++,A.push({label:Xe==null?void 0:Xe.label,name:Xe==null?void 0:Xe.label,type:Xe.type,value:(Xe==null?void 0:Xe.label)==="类型"?"Input":"",id:M.value,contents:Xe==null?void 0:Xe.options})}),d.value=A,b.value=A},I=A=>{let oe=p.cloneDeep(W.value);oe=oe==null?void 0:oe.map(ne=>(ne.value=A==null?void 0:A[ne.name],ne)),W.value=oe},Q=A=>{const oe=A.find(Xe=>(Xe==null?void 0:Xe.name)==="类型");if((oe==null?void 0:oe.value)!="Select")return;const ne=A.find(Xe=>(Xe==null?void 0:Xe.name)==="多选"),me=A.find(Xe=>(Xe==null?void 0:Xe.name)==="初始值");ne!=null&&ne.value&&Lo.isString(me.value)&&(me.value=[me.value]),!(ne!=null&&ne.value)&&!Lo.isString(me.value)&&(me.value="")},Le=async A=>{var oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct;if((A==null?void 0:A.类型)!==((ne=(oe=b.value)==null?void 0:oe.find(at=>(at==null?void 0:at.label)==="类型"))==null?void 0:ne.value)){let at=[];const St=await((nt=(Xe=(me=Te.FormContent)==null?void 0:me.find(ge=>(ge==null?void 0:ge.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:Xe.value)==null?void 0:nt.value)?await((vt=(Ke=(Qe=Te.FormContent)==null?void 0:Qe.find(ge=>(ge==null?void 0:ge.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:Ke.value)==null?void 0:vt.value):(j=(Pe=Te.FormContent)==null?void 0:Pe.find(ge=>(ge==null?void 0:ge.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:j.value;if(St==null||St.forEach(ge=>{var Ye,Ae;M.value++;const be=Tl(ge==null?void 0:ge.default)?(A==null?void 0:A[ge.label])??ge.value??"":ge==null?void 0:ge.default;at.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,value:be,prop:ge==null?void 0:ge.prop,id:M.value,contents:ge==null?void 0:ge.options,width:((Ae=(Ye=b.value)==null?void 0:Ye[0])==null?void 0:Ae.width)??1})}),A!=null&&A.菜单选项&&((yt=A==null?void 0:A.菜单选项)==null?void 0:yt.length)>0){const ge=await Te.menuToContentType(A==null?void 0:A.菜单选项);at=at==null?void 0:at.map(be=>((be==null?void 0:be.name)==="组信息选项"&&(be.contents=ge),be))}Q(at),b.value=await Te.selectToBase(p.cloneDeep(at)),d.value=await Te.selectToBase(p.cloneDeep(at))}else{let at=p.cloneDeep(b.value);if(at=at==null?void 0:at.map(St=>(St.value=A==null?void 0:A[St.name],St)),A!=null&&A.菜单选项&&((ct=A==null?void 0:A.菜单选项)==null?void 0:ct.length)>0){const St=await Te.menuToContentType(A==null?void 0:A.菜单选项);at=at==null?void 0:at.map(ge=>((ge==null?void 0:ge.name)==="组信息选项"&&(ge.contents=St),ge))}at=Te.formToOptionsContents(at),Q(at),b.value=await Te.selectToBase(p.cloneDeep(at))}},tt=A=>{A||(d.value=b.value)},ze=async A=>{await Le(A),d.value=b.value},We=Do(async()=>{var me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St;d.value=b.value;let A={};A.width=((Xe=(me=d.value)==null?void 0:me[0])==null?void 0:Xe.width)??1,E.value!==""?A.id=E.value:(M.value++,A.id="id"+M.value);let oe=await((j=(Pe=(nt=Te.FormContent)==null?void 0:nt.find(ge=>{var be,Ye;return(ge==null?void 0:ge.key)===(((Ye=(be=d.value)==null?void 0:be.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:Pe.value)==null?void 0:j.value)??((Ke=(Qe=Te.FormContent)==null?void 0:Qe.find(ge=>{var be,Ye;return(ge==null?void 0:ge.key)===(((Ye=(be=d.value)==null?void 0:be.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:Ke.value);if((vt=d.value)==null||vt.forEach(ge=>{const be=oe==null?void 0:oe.find(Ye=>(Ye==null?void 0:Ye.label)===(ge==null?void 0:ge.label));be&&(A[be.key]=ge.value)}),A.width=A.width?A.width:1,A.key=A==null?void 0:A.label,A.isFormColHidden=A==null?void 0:A.isFormColHidden,(yt=w.value)!=null&&yt.find(ge=>ge.id===A.id))w.value=(ct=w.value)==null?void 0:ct.map(ge=>(ge.id===A.id&&(ge=A),ge));else{let ge=p.cloneDeep(w.value);ge.push(A),w.value=ge}w.value=w.value.map(({id:ge,...be})=>be),c.value=!1,E.value="";let ne=p.cloneDeep(s.originalItemContents);(at=p.cloneDeep(s.originalItemContents))!=null&&at.find(ge=>(ge==null?void 0:ge.key)==="formContent")?ne=(St=p.cloneDeep(s.originalItemContents))==null?void 0:St.map(ge=>((ge==null?void 0:ge.key)==="formContent"&&(ge.contents=w.value),ge)):ne.push({key:"formContent",contents:w.value}),l("change",ne)},300),De=()=>{c.value=!1,v.value=!1,E.value="",b.value=[],W.value=[]};return e.watch(()=>s.originalItemContents,()=>{var oe,ne,me,Xe,nt,Pe;if(!s.originalItemContents||s.originalItemContents.length===0)return;const A=p.cloneDeep(s.originalItemContents);w.value=((oe=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="formContent"))==null?void 0:oe.contents)??[],h.value=((ne=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="formButton"))==null?void 0:ne.contents)??[],S.value=(me=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="enableWrap"))!=null&&me.contents?!((Xe=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="enableWrap"))!=null&&Xe.contents):!0,w.value=(nt=p.cloneDeep(w.value))==null?void 0:nt.map((j,Qe)=>{var vt;let Ke=j;return Ke.id=(j==null?void 0:j.id)??Qe,j!=null&&j.label||(j.label=(j==null?void 0:j.key)??(j==null?void 0:j.label)??""),j!=null&&j.type||(j.type=(j==null?void 0:j.type)??""),j.contents=((vt=j==null?void 0:j.options)==null?void 0:vt.length)===0?(j==null?void 0:j.contents)??"":j==null?void 0:j.options,Ke}),w.value=Te.formToOptionsContents(w.value),h.value=(Pe=h.value)==null?void 0:Pe.map((j,Qe)=>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:Qe})},{deep:!0,immediate:!0}),(A,oe)=>{const ne=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Ss,[e.createElementVNode("div",Ts,[oe[2]||(oe[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:T},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[oe[1]||(oe[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(Xe,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",As,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>Y(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>C(Xe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[oe[4]||(oe[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:x},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[oe[3]||(oe[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Xe,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",Ms,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>$(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>P(Xe)},null,8,["onClick"])])])]))),128))]),oe[6]||(oe[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Ps,[oe[5]||(oe[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:S.value,"onUpdate:modelValue":oe[0]||(oe[0]=Xe=>S.value=Xe)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Le,onChangeVisible:tt,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(me,{onClick:De,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(me,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>oe[8]||(oe[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:De,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:pe},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ko=Lt._export_sfc(Fs,[["__scopeId","data-v-20850524"]]),$s={class:"step-module content"},js={class:"module-data"},Us={class:"step-module layout"},Ks={class:"form-content"},Ws=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=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}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),w=e.ref({}),E=e.ref([]),S=Y=>{var $;w.value=Y,l("change",($=W())==null?void 0:$.compData)},M=(Y,$)=>{var pe,C;switch(Y){case"create":(pe=d.value)==null||pe.forEach(P=>{P.value=""}),h.value="create",v.visible=!0;break;case"update":(C=d.value)==null||C.forEach(P=>{P.value=$[P==null?void 0:P.prop]}),h.value="update",v.visible=!0;break;case"delete":E.value.splice($,1),h.value="delete";break}},O=Y=>{var $,pe,C;if((Y==null?void 0:Y.buttonName)==="确认"){const P=p.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys(P).forEach(x=>{P[x]===""&&delete P[x]}),h.value){case"create":E.value.push({...P,index:(($=E.value)==null?void 0:$.length)+1});break;case"update":E.value=(pe=E.value)==null?void 0:pe.map(x=>x.index===(P==null?void 0:P.index)?{...x,title:P==null?void 0:P.title,description:P==null?void 0:P.description}:x);break}l("change",(C=W())==null?void 0:C.compData),v.visible=!1}else v.visible=!1},W=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:w.value}]}),Ee=()=>{v.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var $,pe;Y&&(w.value=(($=Y==null?void 0:Y.find(C=>C.key==="stepConfig"))==null?void 0:$.contents)??{},E.value=((pe=Y==null?void 0:Y.find(C=>C.key==="stepList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Y,$)=>{const pe=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$s,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=P=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(P,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.title),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:T=>M("update",{...P,index:x+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:T=>M("delete",x)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Us,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:c.value,onChange:S},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:Ee,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ks,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hs=Lt._export_sfc(Ws,[["__scopeId","data-v-7dbd17f2"]]),qs={class:"step-module content"},Gs={class:"module-data"},Xs={class:"step-module layout"},Ys={class:"form-content"},Js=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref("create"),d=e.ref({}),b=e.ref([]),v=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),w=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),S=Y=>{var $;d.value=Y,l("change",($=W())==null?void 0:$.compData)},M=(Y,$)=>{var pe,C;switch(Y){case"create":(pe=h.value)==null||pe.forEach(P=>{P.value=""}),c.value="create",E.visible=!0;break;case"update":(C=h.value)==null||C.forEach(P=>{P.value=$[P==null?void 0:P.prop]}),c.value="update",E.visible=!0;break;case"delete":b.value.splice($,1),c.value="delete";break}},O=Y=>{var $,pe,C,P;if((Y==null?void 0:Y.buttonName)==="确认"){const x=p.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys(x).forEach(T=>{x[T]===""&&delete x[T]}),c.value){case"create":(pe=b.value)==null||pe.push({...x,index:(($=b.value)==null?void 0:$.length)+1});break;case"update":b.value=(C=b.value)==null?void 0:C.map(T=>T.index===(x==null?void 0:x.index)?{...T,content:x==null?void 0:x.content,timestamp:x==null?void 0:x.timestamp}:T);break}l("change",(P=W())==null?void 0:P.compData),E.visible=!1}else E.visible=!1},W=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:d.value}]}),Ee=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var $,pe;Y&&(d.value=(($=Y==null?void 0:Y.find(C=>C.key==="timeLineConfig"))==null?void 0:$.contents)??{},b.value=((pe=Y==null?void 0:Y.find(C=>C.key==="timeLineList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Y,$)=>{const pe=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qs,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=P=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(P,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.content),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:T=>M("update",{...P,index:x+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:T=>M("delete",x)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Xs,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:S},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:Ee,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:w.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Zs=Lt._export_sfc(Js,[["__scopeId","data-v-39ffc861"]]),Qs={};function ec(a,i){return e.openBlock(),e.createElementBlock("div")}const tc=Lt._export_sfc(Qs,[["render",ec]]),nc={class:"extra-content"},ac={key:0},oc={key:1},lc={class:"dialog-footer"},rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:i}){const s=a,l=e.ref(0),c=e.ref(),d=e.ref(),b=i,v=e.ref(!1),h=e.ref({}),w=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var P;const C=p.cloneDeep(s.itemData);c.value=(P=p.cloneDeep(C))==null?void 0:P.map(x=>{var T;if(x.key==="extra"){let I=[];(T=x.value)==null||T.forEach(Q=>{var Le;I.push((Le=Object.values(Q))==null?void 0:Le[0])}),x.value=I}return x})},{deep:!0,immediate:!0});const S=(C,P,x,T)=>{var Q;let I={};((Q=C==null?void 0:C[0])==null?void 0:Q.contents)==="详情"&&(v.value=!0,I[P]=C,d.value=C==null?void 0:C.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),h.value=I,w.value=x,E.value=T.id)},M=C=>{var Le,tt,ze,We;const P=(tt=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:tt.filter(De=>(De==null?void 0:De.key)==="tableContentName"),x=(We=(ze=Object.values(p.cloneDeep(h.value)))==null?void 0:ze[0])==null?void 0:We.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),T=x==null?void 0:x.map((De,A)=>{var oe;return A===C.index&&(De==null?void 0:De.comp)==="Table"&&(De.compData=(oe=De.compData)==null?void 0:oe.map(ne=>{var me,Xe;return(ne==null?void 0:ne.key)==="tableContents"&&(ne.contents=(Xe=(me=C.content)==null?void 0:me.map(nt=>{let Pe={};for(let j in nt)j!=="id"&&(Pe[j]=nt[j]);return Pe}))==null?void 0:Xe.map(nt=>Object.values(nt))),ne})),De});T.unshift(P==null?void 0:P[0]);let I=p.cloneDeep(h.value),Q={};for(let De in I)Q[De]=T;h.value=Q},O=()=>{v.value=!1,h.value={},w.value={},E.value=void 0,l.value++},W=C=>{var Le,tt,ze,We;const P=(tt=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:tt.filter(De=>(De==null?void 0:De.key)==="tableContentName"),x=(We=(ze=Object.values(p.cloneDeep(h.value)))==null?void 0:ze[0])==null?void 0:We.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),T=x==null?void 0:x.map((De,A)=>(A===C.index&&(De.compData=C.contents),De));T.unshift(P==null?void 0:P[0]);let I=p.cloneDeep(h.value),Q={};for(let De in I)Q[De]=T;h.value=Q},Ee=()=>{var P,x;let C={};for(let T in w.value)T===((P=Object.keys(h.value))==null?void 0:P[0])?C[T]=(x=Object.values(h.value))==null?void 0:x[0]:C[T]=w.value[T];b("change",{buttonName:"编辑",index:E.value,singleContent:C},"methodData"),v.value=!1,h.value={},w.value={},E.value=void 0},Y=()=>{v.value=!1,h.value={},w.value={},E.value=void 0},$=C=>{b("change",C,"methodData")},pe=C=>sa(C);return(C,P)=>{const x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(T,I)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(T==null?void 0:T.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ac)):(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(T.comp)),{itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:I,index:(T==null?void 0:T.id)??I,onContentClick:S,onChange:$},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:Y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(T,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(T.comp)),{itemData:T==null?void 0:T.compData,onChange:M,childItemData:T==null?void 0:T.itemChildData,key:I,onContentChange:W,index:(T==null?void 0:T.id)??I,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createVNode(x,{class:"cancel-button footer-button",onClick:O,id:"themeBorderButton"},{default:e.withCtx(()=>P[0]||(P[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(x,{class:"confirm-button footer-button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>P[1]||(P[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ic=Lt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]);let Nt="$R";const sc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),cc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),uc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),ya=a=>{let i=a;const s=[];let l="";for(const c of i)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(s.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},xa=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===i?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=b.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},pc=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===i)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=b.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===i||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Wo=(a,i)=>{let s=0;for(let l=0;l<a.length;l++)a[l]===i&&s++;return s%2===0},bo=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===i&&Wo(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=b.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&Wo(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},dc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),fc=a=>{var i,s,l,c,d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We,De,A,oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St,ge,be,Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B;if(uc(a)){let Ie={},Me=(l=(s=(i=a==null?void 0:a.replace(":",Nt))==null?void 0:i.split(Nt))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),we="",R="",L=(d=(c=a==null?void 0:a.replace(":",Nt))==null?void 0:c.split(Nt))==null?void 0:d[1];if((L==null?void 0:L[0])==="("&&(R=(h=(v=(b=L==null?void 0:L.split("("))==null?void 0:b[1])==null?void 0:v.split(")"))==null?void 0:h[0],L=(E=(w=L==null?void 0:L.replace(")",Nt))==null?void 0:w.split(Nt))==null?void 0:E[1]),((S=bo(L,"/"))==null?void 0:S.length)>1)we=(M=bo(L,"/"))==null?void 0:M.map(ie=>ie==null?void 0:ie.replaceAll("/","").replaceAll("'",""));else if(L.includes("{")||L.includes("("))if(L.includes("{")?we=we+((pe=($=(Y=(Ee=(W=(O=L==null?void 0:L.split("{"))==null?void 0:O[1])==null?void 0:W.split("}"))==null?void 0:Ee[0])==null?void 0:Y.replaceAll(":","/").replaceAll("'",""))==null?void 0:$.replaceAll("[","(["))==null?void 0:pe.replaceAll("]","])"))+"[":we=we+((Q=(I=(T=(x=(P=(C=L==null?void 0:L.split("("))==null?void 0:C[1])==null?void 0:P.split(")"))==null?void 0:x[0])==null?void 0:T.replaceAll(":","/").replaceAll("'",""))==null?void 0:I.replaceAll("[","(["))==null?void 0:Q.replaceAll("]","])"))+"[",!((Le=L==null?void 0:L.split(")"))!=null&&Le[1]))we=we+((We=(ze=(tt=L==null?void 0:L.split("["))==null?void 0:tt[1])==null?void 0:ze.split("]"))==null?void 0:We[0])+"]";else{const ie=(ne=(oe=(A=(De=L==null?void 0:L.split(")"))==null?void 0:De[1])==null?void 0:A.replace("[",Nt))==null?void 0:oe.split(Nt))==null?void 0:ne[1];if(L!=null&&L.includes("?"))we=((me=L==null?void 0:L.split("?"))==null?void 0:me[1])+"&&"+((nt=(Xe=L==null?void 0:L.split("?"))==null?void 0:Xe[0])==null?void 0:nt.replaceAll("#","==="));else if(ie){const Ve=ie.lastIndexOf("]"),ue=ie.substring(0,Ve)+Nt+ie.substring(Ve+1);we=we+((Pe=ue==null?void 0:ue.split(Nt))==null?void 0:Pe[0])+"]"}else we=(Ke=(Qe=(j=a==null?void 0:a.replace(":",Nt))==null?void 0:j.split(Nt))==null?void 0:Qe[1])==null?void 0:Ke.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))we=(ct=(yt=(vt=a==null?void 0:a.replace(":",Nt))==null?void 0:vt.split(Nt))==null?void 0:yt[1])==null?void 0:ct.replaceAll("'","");else{let ie=(ge=(St=(at=a==null?void 0:a.replace(":",Nt))==null?void 0:at.split(Nt))==null?void 0:St[1])==null?void 0:ge.replaceAll("'","");we=((Ae=(Ye=(be=ie==null?void 0:ie.split("?"))==null?void 0:be[1])==null?void 0:Ye.split(":"))==null?void 0:Ae[0])+"&&"+((se=ie==null?void 0:ie.split("?"))==null?void 0:se[0])}return Ie[Me]=R!==""?R+"$##"+we:we,{groupName:"",formContents:[[Ie]]}}else{let Ie={},Me="",we="";if(a.includes("#")){Me=(ce=(te=a==null?void 0:a.split("#"))==null?void 0:te[0])==null?void 0:ce.replaceAll("'","");let R=(Je=(Be=a==null?void 0:a.split("#"))==null?void 0:Be[1])==null?void 0:Je.replaceAll("'","");R!=null&&R.includes("{")?we=we+((U=(V=(k=(ut=R==null?void 0:R.split("{"))==null?void 0:ut[1])==null?void 0:k.split("}"))==null?void 0:V[0])==null?void 0:U.replaceAll(":","/").replaceAll("'",""))+"[":we=we+((X=(q=(D=(y=R==null?void 0:R.split("("))==null?void 0:y[1])==null?void 0:D.split(")"))==null?void 0:q[0])==null?void 0:X.replaceAll(":","/").replaceAll("'",""))+"[",we=we+((ke=(J=(G=R==null?void 0:R.replace("[",Nt))==null?void 0:G.split(Nt))==null?void 0:J[1])==null?void 0:ke.slice(0,((_e=(K=(de=R==null?void 0:R.replace("[",Nt))==null?void 0:de.split(Nt))==null?void 0:K[1])==null?void 0:_e.length)-1))}else{let R=(le=(H=(ae=a==null?void 0:a.split("]"))==null?void 0:ae[0])==null?void 0:H.split("["))==null?void 0:le[1];if((Fe=R==null?void 0:R.split(":"))==null||Fe.forEach((L,ie)=>{var Ve;((Ve=R==null?void 0:R.split(":"))==null?void 0:Ve.length)-1===ie&&(Me=L==null?void 0:L.replaceAll("'",""))}),!(a!=null&&a.includes("[")))we=((he=(z=(Ge=(ye=a==null?void 0:a.split("]"))==null?void 0:ye[1])==null?void 0:Ge.replace(":",Nt).split(Nt))==null?void 0:z[1])==null?void 0:he.replaceAll("'",""))??"";else{let L=(Se=(fe=(re=(Re=(He=(Ne=p.cloneDeep(a))==null?void 0:Ne.split("("))==null?void 0:He[1])==null?void 0:Re.split(")"))==null?void 0:re[0])==null?void 0:fe.replaceAll("{","").replaceAll("}",""))==null?void 0:Se.replaceAll("'","").replaceAll(":","/"),ie="";(B=R==null?void 0:R.split(":"))==null||B.forEach(Ve=>{ie=ie===""?ie+(Ve==null?void 0:Ve.replaceAll("'","")):ie+":"+(Ve==null?void 0:Ve.replaceAll("'",""))}),we=L+"["+ie+"]"}}return Ie[Me]=we,{groupName:"",formContents:[[Ie]]}}},hc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),vc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},gc=a=>{var d,b,v,h,w;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(b=(d=ya(p.cloneDeep(i)))==null?void 0:d.filter(E=>E!==","))==null?void 0:b.map(E=>E==null?void 0:E.slice(1,E.length-1)):(i="["+p.cloneDeep(i)+"]",s=(h=(v=ya(p.cloneDeep(i)))==null?void 0:v.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),s=(w=p.cloneDeep(s))==null?void 0:w.map(E=>{var S,M;return E=(M=(S=E.replace(")",Nt))==null?void 0:S.split(Nt))==null?void 0:M[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We,De,A,oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St,ge,be,Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q;let S=(W=(O=p.cloneDeep(E))==null?void 0:O.slice(1,p.cloneDeep(E).length-1))==null?void 0:W.replace(":",Nt).split(Nt);if(((Y=(Ee=p.cloneDeep(S))==null?void 0:Ee[0])==null?void 0:Y.replaceAll("'",""))==="输入"){if(!((pe=($=p.cloneDeep(S))==null?void 0:$[1])!=null&&pe.includes("["))&&!((P=(C=p.cloneDeep(S))==null?void 0:C[1])!=null&&P.includes("("))){Te.IsJson((x=p.cloneDeep(S))==null?void 0:x[1].replaceAll("'",'"'))&&c.push(JSON.parse((T=p.cloneDeep(S))==null?void 0:T[1].replaceAll("'",'"')));return}if(((Q=(I=p.cloneDeep(S))==null?void 0:I[1])==null?void 0:Q[0])==="["){let X=(We=(Le=p.cloneDeep(S))==null?void 0:Le[1])==null?void 0:We.slice(1,((ze=(tt=p.cloneDeep(S))==null?void 0:tt[1])==null?void 0:ze.length)-1);(A=(De=ya(X))==null?void 0:De.filter(G=>G!==","))==null||A.forEach(G=>{var ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R,L,ie;let J={},de=(H=(ae=p.cloneDeep(G))==null?void 0:ae.slice(1,((ke=p.cloneDeep(G))==null?void 0:ke.length)-1))==null?void 0:H.replace(":",Nt).split(Nt),K=(le=de==null?void 0:de[0])==null?void 0:le.replaceAll("'",""),_e;(Fe=de==null?void 0:de[1])!=null&&Fe.includes("(")?(_e=(fe=(re=(Re=(He=(Ne=(he=(z=(Ge=p.cloneDeep(de))==null?void 0:Ge[1])==null?void 0:z.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:Ne.split("("))==null?void 0:He[1])==null?void 0:Re.split(")"))==null?void 0:re[0])==null?void 0:fe.replaceAll(":","/").replaceAll("'",""),(B=(Se=p.cloneDeep(de))==null?void 0:Se[1])!=null&&B.includes("[")&&(_e=p.cloneDeep(_e)+"["+((ie=(L=(R=(we=(Me=(Ie=p.cloneDeep(de))==null?void 0:Ie[1])==null?void 0:Me.split("["))==null?void 0:we[1])==null?void 0:R.split("]"))==null?void 0:L[0])==null?void 0:ie.replaceAll("'",""))+"]")):_e=(ye=de==null?void 0:de[1])==null?void 0:ye.replaceAll("'",""),J[K]=_e,c.push(J)})}}else{if(!((ne=(oe=p.cloneDeep(S))==null?void 0:oe[1])!=null&&ne.includes("["))&&!((Xe=(me=p.cloneDeep(S))==null?void 0:me[1])!=null&&Xe.includes("("))){Te.IsJson((nt=p.cloneDeep(S))==null?void 0:nt[1].replaceAll("'",'"'))&&l.push(JSON.parse((Pe=p.cloneDeep(S))==null?void 0:Pe[1].replaceAll("'",'"')));return}if(((Qe=(j=p.cloneDeep(S))==null?void 0:j[1])==null?void 0:Qe[0])==="["){let X=(ct=(Ke=p.cloneDeep(S))==null?void 0:Ke[1])==null?void 0:ct.slice(1,((yt=(vt=p.cloneDeep(S))==null?void 0:vt[1])==null?void 0:yt.length)-1);(St=(at=ya(X))==null?void 0:at.filter(G=>G!==","))==null||St.forEach(G=>{var ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt,st;let J={},de=(H=(ae=p.cloneDeep(G))==null?void 0:ae.slice(1,((ke=p.cloneDeep(G))==null?void 0:ke.length)-1))==null?void 0:H.replace(":",Nt).split(Nt),K=(le=de==null?void 0:de[0])==null?void 0:le.replaceAll("'",""),_e;if(!((Fe=de==null?void 0:de[1])!=null&&Fe.includes("(")))_e=(ye=de==null?void 0:de[1])==null?void 0:ye.replaceAll("'","");else if(_e=(Re=(He=(Ne=(he=(z=(Ge=p.cloneDeep(de))==null?void 0:Ge[1])==null?void 0:z.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:Ne.replace("(",Nt))==null?void 0:He.split(Nt))==null?void 0:Re[1],_e=(fe=(re=vc(p.cloneDeep(_e),Nt))==null?void 0:re.split(Nt))==null?void 0:fe[0],!(_e!=null&&_e.includes("(")))_e=(Se=p.cloneDeep(_e))==null?void 0:Se.replaceAll(":","/").replaceAll("'",""),(Ie=(B=p.cloneDeep(de))==null?void 0:B[1])!=null&&Ie.includes("[")&&(_e=p.cloneDeep(_e)+"["+((Ze=(ve=(ue=(Ve=(we=(Me=p.cloneDeep(de))==null?void 0:Me[1])==null?void 0:we.split("["))==null?void 0:Ve[((ie=(L=(R=p.cloneDeep(de))==null?void 0:R[1])==null?void 0:L.split("["))==null?void 0:ie.length)-1])==null?void 0:ue.split("]"))==null?void 0:ve[0])==null?void 0:Ze.replaceAll("'",""))+"]");else{let dt="";(Oe=xa(_e,":"))==null||Oe.forEach(xt=>{var Tt,gt,wt,$t,ft,Wt,Pt,Yt,cn,nn,_n,gn,Sn,mn,Tn,In,Bn,An;if(!(xt!=null&&xt.includes("(")))dt=dt===""?dt+((Tt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:Tt.replaceAll("'","")):dt+"/"+((gt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:gt.replaceAll("'",""));else if(xt!=null&&xt.includes(")[")){let an=(ft=($t=(wt=p.cloneDeep(xt))==null?void 0:wt.split(")"))==null?void 0:$t[0])==null?void 0:ft.replaceAll("'","");dt=dt===""?dt+an:dt+"/"+an}else{let an=(Sn=(gn=(_n=(nn=(cn=(Yt=(Pt=(Wt=p.cloneDeep(xt))==null?void 0:Wt.replaceAll("{",""))==null?void 0:Pt.replaceAll("}",""))==null?void 0:Yt.replace("(",Nt))==null?void 0:cn.split(Nt))==null?void 0:nn[1])==null?void 0:_n.split(")"))==null?void 0:gn[0])==null?void 0:Sn.replaceAll(":","/").replaceAll("'","");an=an+"["+((An=(Bn=(In=(Tn=(mn=p.cloneDeep(xt))==null?void 0:mn.split("["))==null?void 0:Tn[1])==null?void 0:In.split("]"))==null?void 0:Bn[0])==null?void 0:An.replaceAll("'",""))+"]",dt=dt===""?dt+"["+an+"]":dt+"/["+an+"]"}}),_e=dt+"["+((st=(kt=(bt=(it=(Z=(et=p.cloneDeep(de))==null?void 0:et[1])==null?void 0:Z.split("["))==null?void 0:it[((lt=(Ce=(Ue=p.cloneDeep(de))==null?void 0:Ue[1])==null?void 0:Ce.split("["))==null?void 0:lt.length)-1])==null?void 0:bt.split("]"))==null?void 0:kt[0])==null?void 0:st.replaceAll("'",""))+"]"}J[K]=_e,l.push(J)})}else{let X=(Ae=(ge=p.cloneDeep(S))==null?void 0:ge[1])==null?void 0:Ae.slice(1,((Ye=(be=p.cloneDeep(S))==null?void 0:be[1])==null?void 0:Ye.length)-1),G={},J=(U=(V=(ce=(te=(se=p.cloneDeep(X))==null?void 0:se.split("]"))==null?void 0:te[0])==null?void 0:ce.split(":"))==null?void 0:V[((k=(ut=(Je=(Be=p.cloneDeep(X))==null?void 0:Be.split("]"))==null?void 0:Je[0])==null?void 0:ut.split(":"))==null?void 0:k.length)-1])==null?void 0:U.replaceAll("'",""),de=((q=(D=(y=p.cloneDeep(X))==null?void 0:y.split("]"))==null?void 0:D[0])==null?void 0:q.replaceAll("'",""))+"]";G[J]=de,l.push(G)}}}),{output:l,input:c}},mc=Te.useModelComp(p.pinia),{routeToChildPath:En}=p.storeToRefs(mc),Vn=Te.useMenuState(p.pinia),{activeMenuPath:Gn}=p.storeToRefs(Vn),ba=p.useLoginState(),{loginUserInfo:Gt}=p.storeToRefs(ba),yc=Te.useOriginalState(p.pinia),{originalPath:bc}=p.storeToRefs(yc),tn=bc.value,kc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const b in c){const v=b.match(i);v&&d.push({idx:Number(v[1]),value:c[b]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((b,v)=>b.idx-v.idx),{item:c,names:d}});function l(c,d){var v;if(!c)return[];if(d>=((v=c==null?void 0:c[0])==null?void 0:v.names.length))return c.map(h=>h.item);const b=new Map;for(const h of c){const w=h.names[d].value;b.has(w)||b.set(w,[]),b.get(w).push(h)}return Array.from(b.entries()).map(([h,w])=>{var E,S,M;return(w[0].names.length===1||(w==null?void 0:w.length)===1)&&((S=(E=w[0].names)==null?void 0:E[0])==null?void 0:S.idx)===-1?(M=w==null?void 0:w[0])==null?void 0:M.item:{name:h,isShow:!0,comp:"ParentItem",children:l(w,d+1)}})}if(s)return l(s,0)},Ta=a=>a!=null&&a.every(i=>{var s,l;return((l=(s=Object.keys(i))==null?void 0:s.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:kc(a),Pl=async()=>{var d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We,De,A,oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St,ge,be,Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe;Vn.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(En).value,systemKey:sessionStorage.getItem("systemKey")}});if(((b=(d=i==null?void 0:i.data)==null?void 0:d.result)==null?void 0:b.length)>0){let ye=(O=(M=(S=(E=(w=(h=(v=i==null?void 0:i.data)==null?void 0:v.result)==null?void 0:h[0])==null?void 0:w.value)==null?void 0:E.pageData)==null?void 0:S.compData)==null?void 0:M.find(Ge=>(Ge==null?void 0:Ge.key)==="header"))==null?void 0:O.contents;a=(Ee=(W=p.cloneDeep(ye))==null?void 0:W[0])==null?void 0:Ee.label}let s=Gn.value;(pe=Gn.value)!=null&&pe.includes(`updateLoading${((Y=Gt.value)==null?void 0:Y.account)||(($=Gt.value)==null?void 0:$.账号)}`)?s=p.cloneDeep(Gn).value:(x=Gn.value)!=null&&x.includes(`loading${((C=Gt.value)==null?void 0:C.account)||((P=Gt.value)==null?void 0:P.账号)}`)&&(s=p.cloneDeep(En).value+tn+`loading${((T=Gt.value)==null?void 0:T.account)||((I=Gt.value)==null?void 0:I.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Le=(Q=l==null?void 0:l.data)==null?void 0:Q.result)==null?void 0:Le.length)>0){let ye="",Ge=[];(ze=(tt=l==null?void 0:l.data)==null?void 0:tt.result)==null||ze.forEach(he=>{var Ne,He,Re,re,fe;((He=(Ne=he==null?void 0:he.value)==null?void 0:Ne.pageData)==null?void 0:He.comp)==="Form"&&((fe=(re=(Re=he==null?void 0:he.value)==null?void 0:Re.pageData)==null?void 0:re.compData)==null||fe.forEach(Se=>{(Se==null?void 0:Se.key)==="formContent"&&(Ge=[...Ge,...Se==null?void 0:Se.contents])}))});let z=Ge==null?void 0:Ge.find(he=>(he==null?void 0:he.isMain)===!0);if(z?(ye=z==null?void 0:z.value,a=z==null?void 0:z.key):ye=(Pe=(nt=(Xe=(me=(ne=(oe=(A=(De=(We=l==null?void 0:l.data)==null?void 0:We.result)==null?void 0:De[0])==null?void 0:A.value)==null?void 0:oe.pageData)==null?void 0:ne.compData)==null?void 0:me.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:Xe.contents)==null?void 0:nt.find(he=>{var Ne,He;return(he==null?void 0:he.key)===a||((He=(Ne=he==null?void 0:he.optionUrl)==null?void 0:Ne.groupSelect)==null?void 0:He[1])===a}))==null?void 0:Pe.value,(Ke=Gn.value)!=null&&Ke.includes(`updateLoading${((j=Gt.value)==null?void 0:j.account)||((Qe=Gt.value)==null?void 0:Qe.账号)}`)){let he=[],Ne=[];const He=await p.getInsofDataApi({key:{pageKey:(te=Gn.value.split(tn+`updateLoading${((Ae=Gt.value)==null?void 0:Ae.account)||((se=Gt.value)==null?void 0:se.账号)}`))==null?void 0:te[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Be=(ce=He==null?void 0:He.data)==null?void 0:ce.result)==null?void 0:Be.length)>0){let Re=(Je=l==null?void 0:l.data)==null?void 0:Je.result,re=(ut=p.cloneDeep(Re))==null?void 0:ut.map(async fe=>{var Se,B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe,et;if(((Se=fe==null?void 0:fe.key)==null?void 0:Se.type)==="structure"){let Z=(we=(Me=(Ie=(B=fe==null?void 0:fe.value)==null?void 0:B.pageData)==null?void 0:Ie.compData)==null?void 0:Me.find(Ue=>(Ue==null?void 0:Ue.key)==="parentFormPath"))==null?void 0:we.contents;if(Z){let Ue=await Te.getItemData(Z,sessionStorage.getItem("systemKey"),""),Ce=(Ve=(ie=(L=(R=fe==null?void 0:fe.value)==null?void 0:R.pageData)==null?void 0:L.compData)==null?void 0:ie.find(it=>(it==null?void 0:it.key)==="formContent"))==null?void 0:Ve.contents,lt=Ue==null?void 0:Ue.filter(it=>(it==null?void 0:it.comp)==="Form");lt==null||lt.forEach(it=>{var bt;(bt=it==null?void 0:it.compData)==null||bt.forEach(kt=>{var st,dt;if((kt==null?void 0:kt.key)==="formContent"&&((st=kt==null?void 0:kt.contents)==null?void 0:st.some(Tt=>Ce==null?void 0:Ce.find(gt=>(gt==null?void 0:gt.prop)===(Tt==null?void 0:Tt.prop))))){let Tt=it;Tt.compData=(dt=Tt.compData)==null?void 0:dt.map(wt=>{var $t;return(wt==null?void 0:wt.key)==="formContent"&&(wt.contents=($t=wt.contents)==null?void 0:$t.map(ft=>{var Wt;return Ce!=null&&Ce.find(Pt=>(Pt==null?void 0:Pt.prop)===(ft==null?void 0:ft.prop))&&(ft.value=(Wt=Ce==null?void 0:Ce.find(Pt=>(Pt==null?void 0:Pt.prop)===(ft==null?void 0:ft.prop)))==null?void 0:Wt.value),ft})),wt});let gt={};for(let wt in Tt)wt!=="id"&&(gt[wt]=Tt[wt]);c.push({id:it==null?void 0:it.id,value:{pageData:gt}})}})})}else if((ve=(ue=He==null?void 0:He.data)==null?void 0:ue.result)!=null&&ve.find(Ue=>{var Ce,lt,it,bt;return((lt=(Ce=Ue==null?void 0:Ue.value)==null?void 0:Ce.pageData)==null?void 0:lt.name)===((bt=(it=fe==null?void 0:fe.value)==null?void 0:it.pageData)==null?void 0:bt.name)})){let Ue=fe==null?void 0:fe.key;Ue.pageKey=p.cloneDeep(En).value+tn+ye,c.push({id:(et=(Oe=(Ze=He==null?void 0:He.data)==null?void 0:Ze.result)==null?void 0:Oe.find(Ce=>{var lt,it,bt,kt;return((it=(lt=Ce==null?void 0:Ce.value)==null?void 0:lt.pageData)==null?void 0:it.name)===((kt=(bt=fe==null?void 0:fe.value)==null?void 0:bt.pageData)==null?void 0:kt.name)}))==null?void 0:et.id,key:Ue,value:fe==null?void 0:fe.value})}else{let Ue=fe==null?void 0:fe.key;Ue.pageKey=p.cloneDeep(En).value+tn+ye,he.push({key:Ue,value:fe==null?void 0:fe.value})}}});await Promise.all(re),(V=(k=l==null?void 0:l.data)==null?void 0:k.result)==null||V.forEach(fe=>{var B,Ie,Me;let Se=(B=p.cloneDeep(fe))==null?void 0:B.key;Se.pageKey=p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((Ie=Gt.value)==null?void 0:Ie.account)||((Me=Gt.value)==null?void 0:Me.账号)}`,Vn.setChildMenu(Se.pageKey),c.push({id:fe==null?void 0:fe.id,key:Se})})}if(ye===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(U=c==null?void 0:c[0])!=null&&U.key&&await ba.setLogRecordAsync({type:"保存",data:c},(y=c==null?void 0:c[0])==null?void 0:y.key),(he==null?void 0:he.length)>0&&(await p.batchAddInsofDataApi({dataList:he}),(D=he==null?void 0:he[0])!=null&&D.key&&await ba.setLogRecordAsync({type:"保存",data:he},(q=he==null?void 0:he[0])==null?void 0:q.key));const Re=await p.getInsofDataApi({key:{pageKey:(J=Gn.value.split(tn+`updateLoading${((X=Gt.value)==null?void 0:X.account)||((G=Gt.value)==null?void 0:G.账号)}`))==null?void 0:J[0],systemKey:sessionStorage.getItem("systemKey")}});if(((K=(de=Re==null?void 0:Re.data)==null?void 0:de.result)==null?void 0:K.length)>0){let re=[],fe=(_e=l==null?void 0:l.data)==null?void 0:_e.result;(ke=p.cloneDeep(fe))==null||ke.forEach(Se=>{var B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe;if(((B=Se==null?void 0:Se.key)==null?void 0:B.type)!=="structure"){let et=(we=(Me=(Ie=Re==null?void 0:Re.data)==null?void 0:Ie.result)==null?void 0:Me.filter(lt=>{var it;return((it=lt==null?void 0:lt.key)==null?void 0:it.type)==="data"}))==null?void 0:we.map(lt=>lt==null?void 0:lt.id);re=[...re,...et];let Z=(Ve=(ie=(L=(R=p.cloneDeep(fe))==null?void 0:R.find(lt=>{var it;return((it=Se==null?void 0:Se.key)==null?void 0:it.tableId)===(lt==null?void 0:lt.id)}))==null?void 0:L.value)==null?void 0:ie.pageData)==null?void 0:Ve.name,Ue=(Ze=(ve=(ue=Re==null?void 0:Re.data)==null?void 0:ue.result)==null?void 0:ve.find(lt=>{var it,bt;return((bt=(it=lt==null?void 0:lt.value)==null?void 0:it.pageData)==null?void 0:bt.name)===Z}))==null?void 0:Ze.id,Ce=(Oe=p.cloneDeep(Se))==null?void 0:Oe.key;Ce.tableId=Ue,Ce.pageKey=p.cloneDeep(En).value+tn+ye,Ne.push({key:Ce,value:Se==null?void 0:Se.value})}}),(re==null?void 0:re.length)>0&&(re=[...new Set(re)],await p.batchDeleteInsofDataApi({ids:re})),(H=(ae=l==null?void 0:l.data)==null?void 0:ae.result)==null||H.forEach(Se=>{var Ie,Me,we;let B=(Ie=p.cloneDeep(Se))==null?void 0:Ie.key;B.pageKey=p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((Me=Gt.value)==null?void 0:Me.account)||((we=Gt.value)==null?void 0:we.账号)}`,Vn.setChildMenu(B.pageKey),c.push({id:Se==null?void 0:Se.id,key:B})})}(Ne==null?void 0:Ne.length)>0&&(await p.batchAddInsofDataApi({dataList:Ne}),(le=he==null?void 0:he[0])!=null&&le.key&&await ba.setLogRecordAsync({type:"保存",data:Ne},(Fe=Ne==null?void 0:Ne[0])==null?void 0:Fe.key)),p.ElMessage.success("保存成功")}}else{if((yt=(vt=l==null?void 0:l.data)==null?void 0:vt.result)==null||yt.forEach(he=>{var He;let Ne=(He=p.cloneDeep(he))==null?void 0:He.key;Ne.pageKey=p.cloneDeep(En).value+tn+ye,Vn.setChildMenu(Ne.pageKey),c.push({id:he==null?void 0:he.id,key:Ne})}),ye===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1),Vn.setChildMenu("");return}(ct=c==null?void 0:c[0])!=null&&ct.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await ba.setLogRecordAsync({type:"保存",data:c},(at=c==null?void 0:c[0])==null?void 0:at.key)),await Te.loadingConstruct(p.cloneDeep(En).value+tn+ye,p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((St=Gt.value)==null?void 0:St.account)||((ge=Gt.value)==null?void 0:ge.账号)}`),Vn.setActiveMenuPath(p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((be=Gt.value)==null?void 0:be.account)||((Ye=Gt.value)==null?void 0:Ye.账号)}`),p.ElMessage.success("保存成功")}}Vn.setImportLoading(!1)},xc={key:0},wc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=Te.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=to.useThreeState(p.pinia),{managementWidth:d}=p.storeToRefs(c),{isThreeSystem:b}=to.useThreeSystem(),v=a,h=e.ref(!1),w=e.ref(),E=Te.useTableComp(p.pinia),{multipleTableConst:S}=p.storeToRefs(E),M=Te.useModelComp(p.pinia),O=e.ref(!1),W=Te.useMenuState(p.pinia),Ee=p.useLoginState(p.pinia),{itemData:Y,isEdit:$,routeToChildPath:pe,tableViewContents:C,lockingPage:P,payloadTypes:x}=p.storeToRefs(M),{activeMenuPath:T,platform:I,childMenu:Q}=p.storeToRefs(W),{loginUserInfo:Le}=p.storeToRefs(Ee),tt=e.ref(!1),ze=e.computed(()=>b()?{width:d.value?d.value:"20vw",padding:"24px",boxSizing:"border-box",bottom:"130px"}:{}),We=(be,Ye)=>{const Ae=Ye;return be==null?void 0:be.map(se=>{var te;return se=(te=se==null?void 0:se.map((ce,Be)=>{var Je,ut;return ce!=null&&ce.id?{key:"id",value:ce==null?void 0:ce.id}:Ae!=null&&Ae.find(k=>k==null?void 0:k.id)||se!=null&&se.find(k=>k==null?void 0:k.id)?{key:(Je=Ae[Be-1])==null?void 0:Je.label,value:ce}:{key:(ut=Ae[Be])==null?void 0:ut.label,value:ce}}))==null?void 0:te.filter(ce=>ce.key!=="操作"),se})},De=async()=>{var be,Ye;(be=i.value)!=null&&be.find(Ae=>(Ae==null?void 0:Ae.buttonName)==="保存")&&await ct((Ye=i.value)==null?void 0:Ye.find(Ae=>(Ae==null?void 0:Ae.buttonName)==="保存")),await Pl()};e.watch(()=>Y.value,async()=>{$.value==="view"&&!tt.value&&await ge(p.cloneDeep(v.itemData)),tt.value=!1},{deep:!0});const A=()=>{h.value=!1,w.value=void 0},oe=be=>be.map(Ye=>{const Ae={};for(const se in Ye){const te=Ye[se];if(se.includes(S.value)){const ce=se.split(S.value);let Be=Ae;ce.forEach((Je,ut)=>{ut===ce.length-1?Be[Je]=te:(Be[Je]||(Be[Je]={}),Be=Be[Je])})}else Ae[se]=te}return Ae}),ne=async(be,Ye,Ae=[])=>{var te,ce,Be,Je,ut,k,V,U,y,D,q,X,G,J,de;let se=(te=p.cloneDeep(Ye))==null?void 0:te.filter(K=>(K==null?void 0:K.comp)!=="methodButton");if(be!=null&&be.includes("[")){let K=(k=(ut=(Je=(Be=(ce=p.cloneDeep(be))==null?void 0:ce.split("["))==null?void 0:Be[1])==null?void 0:Je.split("]"))==null?void 0:ut[0])==null?void 0:k.split(":"),_e="";if(K!=null&&K[0]){se=se==null?void 0:se.map(ae=>{var H;return ae.compData=(H=ae.compData)==null?void 0:H.map(le=>{var Fe;return(le==null?void 0:le.key)==="formContent"&&(le.contents=(Fe=le.contents)==null?void 0:Fe.map(ye=>{var Ge,z,he,Ne,He,Re,re,fe;if((z=(Ge=ye==null?void 0:ye.optionUrl)==null?void 0:Ge.menuSelect)!=null&&z.some(Se=>Se==null?void 0:Se.includes("["))){let Se="";ye.optionUrl.oldMenuSelect=(Ne=(he=p.cloneDeep(ye))==null?void 0:he.optionUrl)==null?void 0:Ne.menuSelect,ye.optionUrl.menuSelect=(Re=(He=ye==null?void 0:ye.optionUrl)==null?void 0:He.menuSelect)==null?void 0:Re.map(B=>{var Ie,Me,we,R,L,ie;if(B!=null&&B.includes("[")){let Ve=(Me=(Ie=B==null?void 0:B.replaceAll("[","").replaceAll("]",""))==null?void 0:Ie.split(":"))==null?void 0:Me[1];Se=Te.getFindValue((we=B==null?void 0:B.replaceAll("[","").replaceAll("]",""))==null?void 0:we.split(":"),Ae==null?void 0:Ae[T.value],Ae),B=((L=(R=p.cloneDeep(se))==null?void 0:R.find(ue=>(ue==null?void 0:ue.label)===Ve))==null?void 0:L.value)||Te.getFindValue((ie=B==null?void 0:B.replaceAll("[","").replaceAll("]",""))==null?void 0:ie.split(":"),Ae==null?void 0:Ae[T.value],Ae)}return B}),Se!==""&&(ye.value===""||!(ye!=null&&ye.value))&&(ye.value=Te.getNewValue(ye.optionUrl.menuSelect,ye.optionUrl.oldMenuSelect,(re=ye==null?void 0:ye.optionUrl)==null?void 0:re.groupSelect,Ae),Array.isArray(ye.value)&&((fe=ye.value)!=null&&fe.every(B=>B==null?void 0:B.url))&&(ye.type="UPLOAD"))}return ye})),le}),ae});let ke=(V=se==null?void 0:se.find(ae=>(ae==null?void 0:ae.name)===(K==null?void 0:K[0])))==null?void 0:V.compData;if(!ke){let ae=(U=be==null?void 0:be.split("["))==null?void 0:U[0],H=await Te.getItemData(ae,sessionStorage.getItem("systemKey"),"",!1,"","",Ae);ke=(y=H==null?void 0:H.find(le=>(le==null?void 0:le.name)===(K==null?void 0:K[0])))==null?void 0:y.compData}ke==null||ke.forEach(ae=>{var H,le,Fe,ye,Ge,z;if((ae==null?void 0:ae.key)==="formContent")(H=ae==null?void 0:ae.contents)==null||H.forEach(he=>{var Ne;(he==null?void 0:he.key)===(K==null?void 0:K[1])&&(Array.isArray(he==null?void 0:he.value)?_e=he==null?void 0:he.value:_e=(Ne=he==null?void 0:he.value)==null?void 0:Ne.toString())});else if((ae==null?void 0:ae.key)==="tableContents"){let he=[],Ne=(le=ke==null?void 0:ke.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:le.contents,He=(K==null?void 0:K[1])??"";if(Ne!=null&&Ne.every(Re=>Array.isArray(Re))){let Re=Te.getColumnChild((Ge=Ne==null?void 0:Ne[0])==null?void 0:Ge.filter(re=>(re==null?void 0:re.label)!=="操作"));(z=ae.contents)==null||z.forEach(re=>{let fe={};re=re==null?void 0:re.filter(Se=>!(Se!=null&&Se.id)),Re==null||Re.forEach((Se,B)=>{let Ie=re[B];typeof re[B]=="number"&&(Ie=re[B].toString()),(He===""||He===Se.prop)&&(fe[Se.prop]=Ie)}),he.push(fe)}),he=oe(he)}else{let Re=(Fe=Ne==null?void 0:Ne.map(re=>re==null?void 0:re.label))==null?void 0:Fe.filter(re=>re!=="操作");(ye=ae.contents)==null||ye.forEach(re=>{let fe={};re=re==null?void 0:re.filter(Se=>!(Se!=null&&Se.id)),Re==null||Re.forEach((Se,B)=>{let Ie=re[B];typeof re[B]=="number"&&(Ie=re[B].toString()),(He===""||He===Se)&&(fe[Se]=Ie)}),he.push(fe)})}_e=he}})}return _e}else if(be!=null&&be.includes("/")){let K={};return(D=p.cloneDeep(se))==null||D.forEach((_e,ke)=>{var ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R;if((_e==null?void 0:_e.comp)==="Table"){let L=Array.isArray((le=(H=(ae=_e==null?void 0:_e.compData)==null?void 0:ae.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:H.contents)==null?void 0:le[0])?(z=(Ge=(ye=(Fe=_e==null?void 0:_e.compData)==null?void 0:Fe.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:ye.contents)==null?void 0:Ge[0])==null?void 0:z.some(ve=>ve==null?void 0:ve.children):[],ie=(He=(Ne=(he=_e==null?void 0:_e.compData)==null?void 0:he.find(ve=>(ve==null?void 0:ve.key)==="tableContents"))==null?void 0:Ne.contents)==null?void 0:He.map(ve=>(ve!=null&&ve.find(Ze=>Ze==null?void 0:Ze.id)&&(ve=ve.slice(1)),ve)),Ve=(B=(Se=(fe=(re=(Re=_e==null?void 0:_e.compData)==null?void 0:Re.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:re.contents)==null?void 0:fe[0])==null?void 0:Se[0])==null?void 0:B.label,ue=(Me=(Ie=_e==null?void 0:_e.compData)==null?void 0:Ie.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:Me.contents;if(L)(L==null?void 0:L.length)===0?K[_e.name]=K!=null&&K[_e.name]?K[_e.name]:We(ie,ue):K[Ve]=We(ie,ue);else{const ve=[];ue=ue.slice(1,ue.length-1),ue==null||ue.forEach((Ze,Oe)=>{ie==null||ie.forEach(et=>{ve.push({key:Ze.label+et[0],value:et[Oe+1]})})}),K["form"+ke]=ve}}else{const L=(R=(we=_e.compData)==null?void 0:we.find(Ve=>(Ve==null?void 0:Ve.key)==="formContent"))==null?void 0:R.contents;K!=null&&K.form||(K.form=[]);const ie=[];L==null||L.forEach(Ve=>{Ve.key!==""&&(Ve={key:(Ve==null?void 0:Ve.key)??(Ve==null?void 0:Ve.label),value:Ve==null?void 0:Ve.value},ie.push(Ve))}),K.form=[...ie,...p.cloneDeep(K==null?void 0:K.form)]}}),K}else{if(be==="createInsofDataApi"){let K=(q=p.cloneDeep(Ye))==null?void 0:q[0];return K={comp:(X=p.cloneDeep(K))==null?void 0:X.comp,compData:(G=p.cloneDeep(K))==null?void 0:G.compData,name:(J=p.cloneDeep(K))==null?void 0:J.name,isShow:(de=p.cloneDeep(K))==null?void 0:de.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:T.value},value:{pageData:K}}}return be}},me=async(be,Ye,Ae,se,te)=>{var Je,ut,k;let ce=await Te.getItemData(Ye,sessionStorage.getItem("systemKey"),""),Be=ce==null?void 0:ce.find(V=>(V==null?void 0:V.name)===(Ae==null?void 0:Ae[0]));if(Be){if((Be==null?void 0:Be.comp)==="Table"){let V={};for(let J in p.cloneDeep(be))p.cloneDeep(be)[J]!=="loginUser"?V[J]=p.cloneDeep(be)[J]:V[J]=((Je=Le.value)==null?void 0:Je.account)||((ut=Le.value)==null?void 0:ut.账号);let U=[],y=V;Array.isArray(be)||(y=[V]),y==null||y.forEach(J=>{U.push({[J[Ae[1]]]:J})});let D=[],q=U==null?void 0:U.map(J=>{var de;return(de=Object.keys(J))==null?void 0:de[0]});ce==null||ce.forEach(J=>{var de;(J==null?void 0:J.name)===(Ae==null?void 0:Ae[0])&&((de=J==null?void 0:J.compData)==null||de.forEach(K=>{var _e;(K==null?void 0:K.key)==="tableContents"&&((_e=K==null?void 0:K.contents)==null||_e.forEach(ke=>{ke!=null&&ke.some(ae=>q.includes(ae))&&D.push({[ke.find(ae=>ae.id).id]:ke.find(ae=>q.includes(ae))})}))}))});let X=D==null?void 0:D.map(J=>{var de;return(de=Object.keys(J))==null?void 0:de[0]}),G=[];if(X==null||X.forEach(J=>{var _e;let de=(_e=D==null?void 0:D.find(ke=>{var ae;return((ae=Object.keys(ke))==null?void 0:ae[0].toString())===J.toString()}))==null?void 0:_e[J],K=U==null?void 0:U.find(ke=>{var ae;return((ae=Object.keys(ke))==null?void 0:ae[0])===de});G.push({id:parseInt(J),value:{tableData:K[de]}})}),(G==null?void 0:G.length)>0)return G}else if((Be==null?void 0:Be.comp)==="Form"){let V=p.cloneDeep(Be);V.compData=(k=V.compData)==null?void 0:k.map(D=>{var q;return(D==null?void 0:D.key)==="formContent"&&(D.contents=(q=D.contents)==null?void 0:q.map(X=>{var G;if((X==null?void 0:X.key)===(Ae==null?void 0:Ae[1])&&(be!=null&&be[X==null?void 0:X.prop]))X.value=(be==null?void 0:be[X==null?void 0:X.prop])||be;else if((X==null?void 0:X.type)==="Select"){let J=Te.judgeContents((G=p.cloneDeep(X))==null?void 0:G.optionUrl,se,te);X.value=J??X.value??(be==null?void 0:be[X==null?void 0:X.prop])}return X})),D});let U={};for(let D in V)D!=="id"&&(U[D]=V[D]);let y=[];if(y.push({id:Be==null?void 0:Be.id,keyType:Ae==null?void 0:Ae[1],value:{pageData:U}}),(y==null?void 0:y.length)>0)return y}}},Xe=async(be,Ye,Ae)=>{var ce,Be,Je,ut,k,V,U,y,D,q;let se=await Te.getItemData(Ye,sessionStorage.getItem("systemKey"),""),te=se==null?void 0:se.find(X=>(X==null?void 0:X.name)===(Ae==null?void 0:Ae[0]));if(te){if((te==null?void 0:te.comp)==="Table"){let X={};for(let G in p.cloneDeep(be))p.cloneDeep(be)[G]!=="loginUser"?X[G]=p.cloneDeep(be)[G]:X[G]=((ce=Le.value)==null?void 0:ce.account)||((Be=Le.value)==null?void 0:Be.账号);await p.createInsofDataApi({key:{type:"data",pageKey:Ye,tableId:te==null?void 0:te.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:X}})}else if((te==null?void 0:te.comp)==="Form"){let X=p.cloneDeep(te),G=Object.keys(be),J="";(ut=(Je=p.cloneDeep(X))==null?void 0:Je.compData)==null||ut.forEach(H=>{var le,Fe;(H==null?void 0:H.key)==="formContent"&&((Fe=(le=p.cloneDeep(H))==null?void 0:le.contents)==null||Fe.forEach(ye=>{var Ge;G.includes(ye==null?void 0:ye.key)&&(ye==null?void 0:ye.value)===((Ge=Le.value)==null?void 0:Ge.姓名)&&(J=ye==null?void 0:ye.key)}))});let de=[];(k=Object.values(be[J]))==null||k.forEach(H=>{H!=null&&H.includes("(")&&de.push(H)}),de=[...new Set(de)];const K=de==null?void 0:de.map(async H=>{var z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we;let le="";(re=(Re=(He=(Ne=(he=(z=p.cloneDeep(H))==null?void 0:z.split("("))==null?void 0:he[1])==null?void 0:Ne.split(")"))==null?void 0:He[0])==null?void 0:Re.split(":"))==null||re.forEach(R=>{le=le===""?le+R.replaceAll("'",""):le+"/"+R.replaceAll("'","")});let Fe=[];(we=(Me=(Ie=(B=(Se=(fe=p.cloneDeep(H))==null?void 0:fe.split("<"))==null?void 0:Se[1])==null?void 0:B.split(">"))==null?void 0:Ie[0])==null?void 0:Me.split(":"))==null||we.forEach(R=>{Fe.push(R.replaceAll("'",""))});const ye=await Te.getItemData(le,sessionStorage.getItem("systemKey"),"");let Ge="";return ye==null||ye.forEach(R=>{var L;R.name===(Fe==null?void 0:Fe[0])&&((L=R==null?void 0:R.compData)==null||L.forEach(ie=>{var Ve;(ie==null?void 0:ie.key)==="formContent"&&((Ve=ie.contents)==null||Ve.forEach(ue=>{(ue==null?void 0:ue.key)===(Fe==null?void 0:Fe[1])&&(Ge=ue==null?void 0:ue.value)}))}))}),{[H]:Ge}}),_e=await Promise.all(K);X.compData=(U=(V=p.cloneDeep(X))==null?void 0:V.compData)==null?void 0:U.map(H=>{var le,Fe;return(H==null?void 0:H.key)==="formContent"&&(H.contents=(Fe=(le=p.cloneDeep(H))==null?void 0:le.contents)==null?void 0:Fe.map(ye=>{var Ge,z,he,Ne;return(Ge=be[J])!=null&&Ge[ye==null?void 0:ye.key]&&(be[J][ye==null?void 0:ye.key].includes("(")?ye.value=(z=_e==null?void 0:_e.find(He=>{var Re;return((Re=Object.keys(He))==null?void 0:Re[0])===be[J][ye==null?void 0:ye.key]}))==null?void 0:z[be[J][ye==null?void 0:ye.key]]:ye.value=(Ne=(he=p.cloneDeep(be))==null?void 0:he[J])==null?void 0:Ne[ye==null?void 0:ye.key]),ye})),H});const ke=await p.getInsofDataApi({key:{type:"structure",pageKey:Ye,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((y=ke==null?void 0:ke.data)==null?void 0:y.type)==="success"&&((q=(D=ke==null?void 0:ke.data)==null?void 0:D.result)==null||q.forEach(H=>{var le,Fe;((Fe=(le=H==null?void 0:H.value)==null?void 0:le.pageData)==null?void 0:Fe.name)===(Ae==null?void 0:Ae[0])&&(ae=H.id)}),await p.updateInsofDataApi({id:ae,value:{pageData:X}}))}}},nt=(be,Ye="",Ae={})=>{for(const[se,te]of Object.entries(be)){const ce=Ye?`${Ye}.${se}`:se;te!==null&&typeof te=="object"&&!Array.isArray(te)&&Object.prototype.toString.call(te)!=="[object Date]"?nt(te,ce,Ae):Ae[ce]=te}return Ae},Pe=async(be,Ye,Ae,se)=>{var Be,Je,ut,k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne;let te=await Te.getItemData(Ye,sessionStorage.getItem("systemKey"),""),ce=te==null?void 0:te.find(He=>(He==null?void 0:He.name)===(Ae==null?void 0:Ae[0]));if(ce){if(!(Ae!=null&&Ae[1])&&(ce==null?void 0:ce.comp)==="Table"){let He={},Re=[],re=(Je=(Be=ce==null?void 0:ce.compData)==null?void 0:Be.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:Je.contents;re!=null&&re.every(B=>Array.isArray(B))?Re=(k=Te.getColumnChild((ut=re==null?void 0:re[0])==null?void 0:ut.filter(B=>(B==null?void 0:B.label)!=="操作")))==null?void 0:k.map(B=>B==null?void 0:B.prop):Re=re==null?void 0:re.map(B=>B==null?void 0:B.label);for(let B in p.cloneDeep(be))if(p.cloneDeep(be)[B]!=="loginUser"){let Ie=nt(p.cloneDeep(be)[B]),Me={};for(let we in Ie)if(Re!=null&&Re.find(R=>R===we))Me[we]=Ie[we];else if(Re!=null&&Re.find(R=>(R==null?void 0:R.toUpperCase())===(we==null?void 0:we.toUpperCase()))){let R=Re==null?void 0:Re.find(L=>(L==null?void 0:L.toUpperCase())===(we==null?void 0:we.toUpperCase()));Me[R]=Ie[we]}He[B]=Me}else He[B]=((V=Le.value)==null?void 0:V.account)||((U=Le.value)==null?void 0:U.账号);let fe=await p.getInsofDataApi({keyLikes:{tableId:ce==null?void 0:ce.id}});if(((D=(y=fe==null?void 0:fe.data)==null?void 0:y.result)==null?void 0:D.length)>0){let B=(X=(q=fe==null?void 0:fe.data)==null?void 0:q.result)==null?void 0:X.map(Ie=>Ie==null?void 0:Ie.id);(B==null?void 0:B.length)>0&&await p.batchDeleteInsofDataApi({ids:B})}let Se=[];if((G=ce==null?void 0:ce.compData)!=null&&G.find(B=>(B==null?void 0:B.key)==="pageColumn")&&((K=(de=(J=ce==null?void 0:ce.compData)==null?void 0:J.find(B=>(B==null?void 0:B.key)==="pageColumn"))==null?void 0:de.contents)!=null&&K.includes("["))){const B=await p.getInsofDataApi({id:ce==null?void 0:ce.tableId});let Ie=((H=(ae=(ke=(_e=B==null?void 0:B.data)==null?void 0:_e.result)==null?void 0:ke[0])==null?void 0:ae.key)==null?void 0:H.pageKey)??"";(le=Object.values(He))==null||le.forEach(Me=>{Se.push({key:{type:"data",pageKey:Ie,tableId:ce==null?void 0:ce.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Me}})})}else(Fe=Object.values(He))==null||Fe.forEach(B=>{Se.push({key:{type:"data",pageKey:Ye,tableId:ce==null?void 0:ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:B}})});(Se==null?void 0:Se.length)>0&&await p.batchAddInsofDataApi({dataList:Se})}else if(!(Ae!=null&&Ae[1])&&(ce==null?void 0:ce.comp)==="Form"){let He=p.cloneDeep(ce);He.compData=(Ge=(ye=p.cloneDeep(He))==null?void 0:ye.compData)==null?void 0:Ge.map(fe=>{var Se,B;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(B=(Se=p.cloneDeep(fe))==null?void 0:Se.contents)==null?void 0:B.map(Ie=>{var Me,we;return(Me=p.cloneDeep(be))!=null&&Me[Ie==null?void 0:Ie.key]&&(Ie.value=(we=p.cloneDeep(be))==null?void 0:we[Ie==null?void 0:Ie.key]),Ie})),fe});const Re=await p.getInsofDataApi({key:{type:"structure",pageKey:Ye,systemKey:sessionStorage.getItem("systemKey")}});let re="";((z=Re==null?void 0:Re.data)==null?void 0:z.type)==="success"&&((Ne=(he=Re==null?void 0:Re.data)==null?void 0:he.result)==null||Ne.forEach(fe=>{var Se,B;((B=(Se=fe==null?void 0:fe.value)==null?void 0:Se.pageData)==null?void 0:B.name)===(Ae==null?void 0:Ae[0])&&(re=fe.id)}),await p.updateInsofDataApi({id:re,value:{pageData:He}}))}}};let j=null;const Qe=()=>{W.setLoadingPercent(0)},Ke=()=>{clearInterval(j),j=null},vt=()=>{Ke(),Qe()},yt=()=>{j=setInterval(()=>{const be=W.getLoadingPercent();if(be==99){Ke();return}W.setLoadingPercent(be+1)},100)},ct=async be=>{var Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q,X,G;W.setImportLoading(!0,Te.loadingTypeConstants.PROGRESS),j||yt();try{if(be.api){let J=new WeakMap;(Ae=(Ye=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:x.value})).data.result)==null?void 0:Ye.filter(z=>{var he,Ne;return((he=z==null?void 0:z.key)==null?void 0:he.pageKey)!=="menu"&&((Ne=z==null?void 0:z.key)==null?void 0:Ne.pageKey)!=="secret"}))==null||Ae.forEach(z=>{J[z.key.pageKey]?J[z.key.pageKey]=[...J[z.key.pageKey],z]:J[z.key.pageKey]=[z]});let K=await Te.getItemData((Q==null?void 0:Q.value)===""?T.value:Q==null?void 0:Q.value,sessionStorage.getItem("systemKey"),"",!1,"","",J),_e="";K=K==null?void 0:K.map(z=>{var he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R;if((z==null?void 0:z.comp)==="Form")z.compData=(he=z.compData)==null?void 0:he.map(L=>{var ie;return(L==null?void 0:L.key)==="formContent"&&(L.contents=(ie=L.contents)==null?void 0:ie.map(Ve=>{var ue;if((Ve==null?void 0:Ve.type)==="Select"){let ve=Te.judgeContents((ue=p.cloneDeep(Ve))==null?void 0:ue.optionUrl,J,K);Ve.value=ve??""??Ve.value}return Ve})),L});else if((z==null?void 0:z.comp)==="Table"&&(Ne=z.compData)!=null&&Ne.find(L=>(L==null?void 0:L.key)==="pageColumn")){let L=(Re=(He=z.compData)==null?void 0:He.find(ve=>(ve==null?void 0:ve.key)==="pageColumn"))==null?void 0:Re.contents,ie=((fe=(re=z.compData)==null?void 0:re.find(ve=>(ve==null?void 0:ve.key)==="pageGroup"))==null?void 0:fe.contents)??"",Ve=(Ie=(B=(Se=L==null?void 0:L.split("["))==null?void 0:Se[1])==null?void 0:B.split("]"))==null?void 0:Ie[0];_e=((Me=L==null?void 0:L.split("["))==null?void 0:Me[0])+((R=(we=C.value)==null?void 0:we.find(ve=>(ve==null?void 0:ve.key)===Ve))==null?void 0:R.value)}return z});let ke={};if(((te=(se=be==null?void 0:be.extraValues)==null?void 0:se.input)==null?void 0:te.length)>0){const z=(Be=(ce=be==null?void 0:be.extraValues)==null?void 0:ce.input)==null?void 0:Be.map(async he=>{var Ne;at!=null&&at.find(He=>He===he)?ke=await ne(he,K):ke[Object.keys(he)[0]]=await ne((Ne=Object.values(he))==null?void 0:Ne[0],K,J)});await Promise.all(z)}else ke=await ne("/",K);let ae=!1;(ut=(Je=be==null?void 0:be.extraValues)==null?void 0:Je.output)==null||ut.forEach(z=>{var he,Ne;(Ne=(he=Object.values(z))==null?void 0:he[0])!=null&&Ne.includes(".doc")&&(ae=!0)});let H;if(ae){const z=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await p.axios.post(be.api,ke,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{z.close()})}else H=await p.axios.post(be.api,ke,{headers:{"Content-Type":"application/json"}});let le=(y=(U=(V=(k=p.cloneDeep(be))==null?void 0:k.extraValues)==null?void 0:V.output)==null?void 0:U.map(z=>{var he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R,L,ie,Ve,ue;if(!((Ne=(he=Object.values(z))==null?void 0:he[0])!=null&&Ne.includes(".doc"))){let ve=(Me=(Ie=(B=(Re=p.cloneDeep((He=Object.values(z))==null?void 0:He[0]))==null?void 0:Re.split("["))==null?void 0:B[((Se=(fe=p.cloneDeep((re=Object.values(z))==null?void 0:re[0]))==null?void 0:fe.split("["))==null?void 0:Se.length)-1])==null?void 0:Ie.split("]"))==null?void 0:Me[0],Ze=ve==null?void 0:ve.split(":"),Oe=(L=p.cloneDeep((we=Object.values(z))==null?void 0:we[0]))==null?void 0:L.substring(0,p.cloneDeep((R=Object.values(z))==null?void 0:R[0]).lastIndexOf("["));if(Oe=(Ve=p.cloneDeep(Oe))==null?void 0:Ve.slice(0,((ie=p.cloneDeep(Oe))==null?void 0:ie.length)-1),Oe!=null&&Oe.includes("[")){let et="";if((ue=xa(Oe,"/"))==null||ue.forEach(Z=>{var Ue,Ce,lt,it,bt,kt,st;if(!(Z!=null&&Z.includes("[")))et=et===""?et+Z.replaceAll("/",""):et+"/"+Z.replaceAll("/","");else{let dt=p.cloneDeep(Z).slice(1,((Ue=p.cloneDeep(Z))==null?void 0:Ue.length)-1),xt=(kt=(bt=(it=(lt=(Ce=p.cloneDeep(dt))==null?void 0:Ce.split("["))==null?void 0:lt[1])==null?void 0:it.split("]"))==null?void 0:bt[0])==null?void 0:kt.split(":"),Tt="",gt=(st=K==null?void 0:K.find(wt=>(wt==null?void 0:wt.name)===(xt==null?void 0:xt[0])))==null?void 0:st.compData;gt==null||gt.forEach(wt=>{var $t;(wt==null?void 0:wt.key)==="formContent"&&(($t=wt==null?void 0:wt.contents)==null||$t.forEach(ft=>{(ft==null?void 0:ft.key)===(xt==null?void 0:xt[1])&&(Tt=ft==null?void 0:ft.value)}))}),et=et===""?et+Tt.replaceAll("/",""):et+"/"+Tt.replaceAll("/","")}}),Oe=et,Oe[(Oe==null?void 0:Oe.length)-1]!=="/")return Oe}else Oe=(Q==null?void 0:Q.value)===""?T.value:Q==null?void 0:Q.value}}))==null?void 0:y.filter(z=>z);le=[...new Set(p.cloneDeep(le))];let Fe=le==null?void 0:le.map(async z=>{let he=await Te.getItemData(z,sessionStorage.getItem("systemKey"),"",!1,"","",J);if((he==null?void 0:he.length)===0)return await Te.getParentContents(z)});await Promise.all(Fe);let ye=[],Ge=(X=(q=(D=p.cloneDeep(be))==null?void 0:D.extraValues)==null?void 0:q.output)==null?void 0:X.map(async z=>{var B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t,ft,Wt,Pt,Yt,cn,nn,_n,gn,Sn,mn,Tn,In,Bn,An,an,Dt,Qt,ht,Kn,Ot,Jt,dn,un,kn,on,On,xn,Ia,ca,Ba,Aa,ua,pa,Na,ea,Va,da,Oa,Wn,Ma,fa,ha,Pa;if((Ie=(B=Object.values(z))==null?void 0:B[0])!=null&&Ie.includes(".doc")){var he=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),Ne=H.headers["content-disposition"],He=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Re=He.exec(Ne),re=Re==null?void 0:Re[1],fe=document.createElement("a"),Se=window.URL.createObjectURL(he);w.value=[{name:re,blobUrl:Se}],h.value=!0}else{let ta=(ve=(ue=(Ve=(we=p.cloneDeep((Me=Object.values(z))==null?void 0:Me[0]))==null?void 0:we.split("["))==null?void 0:Ve[((ie=(L=p.cloneDeep((R=Object.values(z))==null?void 0:R[0]))==null?void 0:L.split("["))==null?void 0:ie.length)-1])==null?void 0:ue.split("]"))==null?void 0:ve[0],zt=ta==null?void 0:ta.split(":"),Ht=(et=p.cloneDeep((Ze=Object.values(z))==null?void 0:Ze[0]))==null?void 0:et.substring(0,p.cloneDeep((Oe=Object.values(z))==null?void 0:Oe[0]).lastIndexOf("["));if(Ht!=null&&Ht.includes("[")?Ht=(Ue=p.cloneDeep(Ht))==null?void 0:Ue.slice(0,((Z=p.cloneDeep(Ht))==null?void 0:Z.length)-1):Ht===""&&(Ht=T.value),Ht=Ht.replaceAll("<","[").replaceAll(">","]"),Ht!=null&&Ht.includes("[")){let Et="";(Ce=xa(Ht,"/"))==null||Ce.forEach((Mt,jt)=>{var qt,Ut,ln,pn,$n,Mn,za,Ra,wn,La,Fa;if(!(Mt!=null&&Mt.includes("[")))Et=Et===""?Et+Mt.replaceAll("/",""):Et+"/"+Mt.replaceAll("/","");else{let na="",Dn="";(qt=p.cloneDeep(Mt))!=null&&qt.includes("]")?(na=p.cloneDeep(Mt).slice(1,((Ut=p.cloneDeep(Mt))==null?void 0:Ut.length)-1),Dn=(za=(Mn=($n=(pn=(ln=p.cloneDeep(na))==null?void 0:ln.split("["))==null?void 0:pn[1])==null?void 0:$n.split("]"))==null?void 0:Mn[0])==null?void 0:za.split(":")):(na=p.cloneDeep(Mt).slice(1,(Ra=p.cloneDeep(Mt))==null?void 0:Ra.length),Dn=(wn=p.cloneDeep(na))==null?void 0:wn.split("/"));let Hn="",Zt=(La=K==null?void 0:K.find(yn=>(yn==null?void 0:yn.name)===(Dn==null?void 0:Dn[0])))==null?void 0:La.compData;Zt==null||Zt.forEach(yn=>{var $a;(yn==null?void 0:yn.key)==="formContent"&&(($a=yn==null?void 0:yn.contents)==null||$a.forEach(jn=>{(jn==null?void 0:jn.key)===(Dn==null?void 0:Dn[1])&&(Hn=jn==null?void 0:jn.value)}))}),((Fa=xa(Ht,"/"))==null?void 0:Fa.length)-1!==jt?Et=Et===""?Et+Hn.replaceAll("/",""):Et+"/"+Hn.replaceAll("/",""):Et=Et+l.value+Hn.replaceAll("/","")}}),(lt=T.value)!=null&<.includes(Et)?Ht=T.value:Ht=Et}else Ht=(Q==null?void 0:Q.value)===""?T.value:Q==null?void 0:Q.value;let en=p.cloneDeep((it=Object.keys(z))==null?void 0:it[0]);if(((bt=H==null?void 0:H.data)==null?void 0:bt.statusCode)===200||((kt=H==null?void 0:H.data)==null?void 0:kt.code)===200){if(((dt=(st=H==null?void 0:H.data)==null?void 0:st.data)!=null&&dt[en]||(Tt=(xt=H==null?void 0:H.data)==null?void 0:xt.result)!=null&&Tt[en])&&(zt==null?void 0:zt.length)===1)return await Pe(((wt=(gt=H==null?void 0:H.data)==null?void 0:gt.data)==null?void 0:wt[en])||((ft=($t=H==null?void 0:H.data)==null?void 0:$t.result)==null?void 0:ft[en]),p.cloneDeep(Ht),zt,_e);if((Pt=(Wt=H==null?void 0:H.data)==null?void 0:Wt.data)!=null&&Pt[en]||(cn=(Yt=H==null?void 0:H.data)==null?void 0:Yt.result)!=null&&cn[en]){let Et=await me(((_n=(nn=H==null?void 0:H.data)==null?void 0:nn.data)==null?void 0:_n[en])||((Sn=(gn=H==null?void 0:H.data)==null?void 0:gn.result)==null?void 0:Sn[en]),p.cloneDeep(Ht),zt,J,K);return Et&&(ye=[...ye,...Et]),Et}else{if(!((mn=H==null?void 0:H.data)!=null&&mn.data)){let Et=await Te.getItemData(T.value,sessionStorage.getItem("systemKey"),"",!1,"","",J);Et=Et==null?void 0:Et.map(jt=>{var qt;return(jt==null?void 0:jt.name)===(zt==null?void 0:zt[0])&&(jt.compData=(qt=jt.compData)==null?void 0:qt.map(Ut=>{var ln;return(Ut==null?void 0:Ut.key)==="formContent"&&(Ut.contents=(ln=Ut.contents)==null?void 0:ln.map(pn=>{var $n,Mn;return(pn==null?void 0:pn.key)===(zt==null?void 0:zt[1])&&(pn.value=(Mn=($n=H==null?void 0:H.data)==null?void 0:$n.result)==null?void 0:Mn[en==null?void 0:en.replaceAll(":","")]),pn})),Ut})),jt});let Mt=[];(Tn=Et==null?void 0:Et.filter(jt=>(jt==null?void 0:jt.comp)==="Form"))==null||Tn.forEach(async jt=>{let qt={};for(let Ut in jt)Ut!=="id"&&(qt[Ut]=jt[Ut]);Mt.push({id:jt==null?void 0:jt.id,value:{pageData:qt}})}),(Mt==null?void 0:Mt.length)>0&&await p.batchUpdateInsofDataApi({dataList:Mt});return}if((zt==null?void 0:zt.length)===1){const Et=(An=(Bn=(In=H==null?void 0:H.data)==null?void 0:In.data)==null?void 0:Bn.path)==null?void 0:An.path;let Mt="";(Kn=(ht=(Qt=(Dt=(an=Et==null?void 0:Et.split("("))==null?void 0:an[1])==null?void 0:Dt.split(")"))==null?void 0:Qt[0])==null?void 0:ht.split(":"))==null||Kn.forEach(Ut=>{var ln,pn;Mt=Mt===""?Mt+((ln=Ut==null?void 0:Ut.replaceAll("'",""))==null?void 0:ln.trim()):Mt+"/"+((pn=Ut==null?void 0:Ut.replaceAll("'",""))==null?void 0:pn.trim())});let jt=[(kn=(un=(dn=(Jt=(Ot=Et==null?void 0:Et.split("<"))==null?void 0:Ot[1])==null?void 0:Jt.split(">"))==null?void 0:dn[0])==null?void 0:un.replaceAll("'",""))==null?void 0:kn.trim()],qt;return(xn=(On=(on=H==null?void 0:H.data)==null?void 0:on.data)==null?void 0:On.data)!=null&&xn[zt==null?void 0:zt[0]]?qt=await Pe((Ba=(ca=(Ia=H==null?void 0:H.data)==null?void 0:Ia.data)==null?void 0:ca.data)==null?void 0:Ba[zt==null?void 0:zt[0]],Mt,zt,_e):qt=await Xe((ua=(Aa=H==null?void 0:H.data)==null?void 0:Aa.data)==null?void 0:ua.data,Mt,jt,J),qt}else{const Et=(ea=(Na=(pa=H==null?void 0:H.data)==null?void 0:pa.data)==null?void 0:Na.path)==null?void 0:ea.path;let Mt="";return(Ma=(Wn=(Oa=(da=(Va=Et==null?void 0:Et.split("("))==null?void 0:Va[1])==null?void 0:da.split(")"))==null?void 0:Oa[0])==null?void 0:Wn.split(":"))==null||Ma.forEach(qt=>{var Ut,ln;Mt=Mt===""?Mt+((Ut=qt==null?void 0:qt.replaceAll("'",""))==null?void 0:Ut.trim()):Mt+"/"+((ln=qt==null?void 0:qt.replaceAll("'",""))==null?void 0:ln.trim())}),await me((Pa=(ha=(fa=H==null?void 0:H.data)==null?void 0:fa.data)==null?void 0:ha.data)==null?void 0:Pa[zt==null?void 0:zt[0]],Mt,zt,J,K)}}}}});if(await Promise.all(Ge),(ye==null?void 0:ye.length)>0){let z=[];ye==null||ye.forEach(He=>{z!=null&&z.find(Re=>{var re,fe,Se,B;return((fe=(re=Re==null?void 0:Re.value)==null?void 0:re.pageData)==null?void 0:fe.name)===((B=(Se=He==null?void 0:He.value)==null?void 0:Se.pageData)==null?void 0:B.name)})||z.push(He)});let he=[];z==null||z.forEach(He=>{var fe,Se,B,Ie;let Re=p.cloneDeep(He);Re.value.pageData.compData=(fe=Re.value.pageData.compData)==null?void 0:fe.map(Me=>{var we;return(Me==null?void 0:Me.key)==="formContent"&&(Me.contents=(we=Me.contents)==null?void 0:we.map(R=>{var ie,Ve,ue,ve;let L=(ie=p.cloneDeep(ye))==null?void 0:ie.find(Ze=>(Ze==null?void 0:Ze.keyType)===(R==null?void 0:R.key));if(L){let Ze=(ve=(ue=(Ve=L.value.pageData.compData)==null?void 0:Ve.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:ue.contents)==null?void 0:ve.find(Oe=>(Oe==null?void 0:Oe.key)===(R==null?void 0:R.key));R.value=Ze==null?void 0:Ze.value}return R})),Me}),he.push({id:Re==null?void 0:Re.id,value:Re==null?void 0:Re.value});let re=[];(Ie=(B=(Se=Re==null?void 0:Re.value)==null?void 0:Se.pageData)==null?void 0:B.compData)==null||Ie.forEach(Me=>{var we;(Me==null?void 0:Me.key)==="formContent"&&((we=Me==null?void 0:Me.contents)==null||we.forEach(R=>{var L,ie,Ve,ue,ve,Ze;if((ie=(L=R==null?void 0:R.optionUrl)==null?void 0:L.menuSelect)!=null&&ie.find(Oe=>Oe==null?void 0:Oe.includes("[")))if(re!=null&&re.find(Oe=>{var et,Z,Ue;return((et=Oe==null?void 0:Oe.key)==null?void 0:et.join(","))===((Ue=(Z=R==null?void 0:R.optionUrl)==null?void 0:Z.menuSelect)==null?void 0:Ue.join(","))})){let Oe=(Ve=re==null?void 0:re.find(et=>{var Z,Ue,Ce;return((Z=et==null?void 0:et.key)==null?void 0:Z.join(","))===((Ce=(Ue=R==null?void 0:R.optionUrl)==null?void 0:Ue.menuSelect)==null?void 0:Ce.join(","))}))==null?void 0:Ve.value;Oe.push({key:R==null?void 0:R.prop,groups:(ue=R==null?void 0:R.optionUrl)==null?void 0:ue.groupSelect,value:R==null?void 0:R.value}),re=re==null?void 0:re.map(et=>{var Z,Ue,Ce;return((Z=et==null?void 0:et.key)==null?void 0:Z.join(","))===((Ce=(Ue=R==null?void 0:R.optionUrl)==null?void 0:Ue.menuSelect)==null?void 0:Ce.join(","))&&(et.value=Oe),et})}else re.push({key:(ve=R==null?void 0:R.optionUrl)==null?void 0:ve.menuSelect,value:[{key:R==null?void 0:R.prop,groups:(Ze=R==null?void 0:R.optionUrl)==null?void 0:Ze.groupSelect,value:R==null?void 0:R.value}]})}))}),(re==null?void 0:re.length)>0&&(re=re==null?void 0:re.map(Me=>{var R;let we="";return(R=Me==null?void 0:Me.key)==null||R.forEach(L=>{var ie;if(!(L!=null&&L.includes("[")))we=we===""?we+L:we+"/"+L;else{let Ve="",ue=(ie=L==null?void 0:L.replaceAll("[","").replaceAll("]",""))==null?void 0:ie.split(":");K==null||K.forEach(ve=>{var Ze;(ve==null?void 0:ve.name)===(ue==null?void 0:ue[0])&&((Ze=ve==null?void 0:ve.compData)==null||Ze.forEach(Oe=>{var et;(Oe==null?void 0:Oe.key)==="formContent"&&((et=Oe==null?void 0:Oe.contents)==null||et.forEach(Z=>{(Z==null?void 0:Z.prop)===(ue==null?void 0:ue[1])&&(Ve=Z==null?void 0:Z.value)}))}))}),we=we+l.value+Ve}}),Me.key=we,Me})),re==null||re.forEach(Me=>{var ie,Ve,ue;let we=(ie=J[Me.key])==null?void 0:ie.find(ve=>{var Ze,Oe,et,Z,Ue,Ce,lt;return((Oe=(Ze=ve==null?void 0:ve.value)==null?void 0:Ze.pageData)==null?void 0:Oe.name)===((Ue=(Z=(et=Me==null?void 0:Me.value)==null?void 0:et[0])==null?void 0:Z.groups)==null?void 0:Ue[0])&&((lt=(Ce=ve==null?void 0:ve.value)==null?void 0:Ce.pageData)==null?void 0:lt.name)!==void 0}),R=we==null?void 0:we.id,L=(Ve=we==null?void 0:we.value)==null?void 0:Ve.pageData;L.compData=(ue=L.compData)==null?void 0:ue.map(ve=>{var Ze;return(ve==null?void 0:ve.key)==="formContent"&&(ve.contents=(Ze=ve.contents)==null?void 0:Ze.map(Oe=>{var Z;let et=(Z=Me.value)==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)===(Oe==null?void 0:Oe.prop));return et&&(Oe.value=et.value),Oe})),ve}),he.push({id:R,value:{pageData:L}})})});let Ne=(G=p.cloneDeep(ye))==null?void 0:G[0];(he==null?void 0:he.length)>0&&await p.batchUpdateInsofDataApi({dataList:he})}M.setFreshContent(!0)}W.setImportLoading(!1),vt()}catch{p.ElMessage.error("方法执行错误,请查看方法!"),W.setImportLoading(!1),vt()}tt.value=!0},at=["createInsofDataApi"],St=Do(async be=>{ct(be)},100),ge=async be=>{var Je,ut,k,V,U;const Ye=p.cloneDeep(be);let Ae,se=new WeakMap,te=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:x.value});(ut=(Je=te.data.result)==null?void 0:Je.filter(y=>{var D,q;return((D=y==null?void 0:y.key)==null?void 0:D.pageKey)!=="menu"&&((q=y==null?void 0:y.key)==null?void 0:q.pageKey)!=="secret"}))==null||ut.forEach(y=>{se[y.key.pageKey]?se[y.key.pageKey]=[...se[y.key.pageKey],y]:se[y.key.pageKey]=[y]}),be!=null&&be[0].path&&(Ae=await(Ye==null?void 0:Ye.map(async(y,D)=>{var ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B;const X=(ke=se[y==null?void 0:y.path])==null?void 0:ke.filter(Ie=>{var Me;return((Me=Ie==null?void 0:Ie.key)==null?void 0:Me.type)==="data"});let G="";const J=await Te.getItemData(T.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,se);X==null||X.forEach(Ie=>{var Me,we,R,L,ie;((we=(Me=Ie==null?void 0:Ie.value)==null?void 0:Me.tableData)==null?void 0:we.算法名称)===((R=Ye==null?void 0:Ye[D])==null?void 0:R.method)&&(G=(ie=(L=Ie==null?void 0:Ie.value)==null?void 0:L.tableData)==null?void 0:ie.算法体)});const de=await Te.getItemData(y==null?void 0:y.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,se);let K="",_e=(Fe=(le=(H=(ae=de==null?void 0:de[0])==null?void 0:ae.compData)==null?void 0:H.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:le.contents)==null?void 0:Fe.findIndex(Ie=>(Ie==null?void 0:Ie.prop)==="算法体");return(Ge=(ye=de==null?void 0:de[0])==null?void 0:ye.compData)==null||Ge.forEach(Ie=>{var Me;(Ie==null?void 0:Ie.key)==="tableContents"&&((Me=Ie==null?void 0:Ie.contents)==null||Me.forEach(we=>{we!=null&&we.find(R=>R===(y==null?void 0:y.method))&&(K=we[_e])}))}),{buttonName:((z=Ye==null?void 0:Ye[D])==null?void 0:z.method)||((He=(Ne=(he=X==null?void 0:X[0])==null?void 0:he.value)==null?void 0:Ne.tableData)==null?void 0:He.算法名称),api:(G===""?(fe=(re=(Re=X==null?void 0:X[0])==null?void 0:Re.value)==null?void 0:re.tableData)==null?void 0:fe.算法体:G)||K,content:J==null?void 0:J.filter(Ie=>Ie.comp!=="methodButton"),extraContent:(Se=p.cloneDeep(y.value))==null?void 0:Se.slice(1),methodName:(y==null?void 0:y.path)??"",extraValues:(B=Ye==null?void 0:Ye[D])==null?void 0:B.data}})));const ce=Ye==null?void 0:Ye.map(async y=>{var de,K,_e,ke,ae,H;const D=(de=te.data.result)==null?void 0:de.filter(le=>{var Fe,ye,Ge;return((Fe=le==null?void 0:le.key)==null?void 0:Fe.parentTable)===""&&((ye=le==null?void 0:le.key)==null?void 0:ye.type)==="method"&&((Ge=le==null?void 0:le.key)==null?void 0:Ge.methodName)===le.method}),q=D==null?void 0:D[0],X=(K=te.data.result)==null?void 0:K.filter(le=>{var Fe,ye;return((Fe=le==null?void 0:le.key)==null?void 0:Fe.type)==="methodData"&&((ye=le==null?void 0:le.key)==null?void 0:ye.tableId)===(q==null?void 0:q.id)}),G=await Te.getItemData(T.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,se),J=X==null?void 0:X[0];return{buttonName:(_e=q==null?void 0:q.key)==null?void 0:_e.methodKey,api:(ae=(ke=J==null?void 0:J.value)==null?void 0:ke.tableData)==null?void 0:ae[0],content:G==null?void 0:G.filter(le=>le.comp!=="methodButton"),extraContent:(H=p.cloneDeep(y.value))==null?void 0:H.slice(1),methodName:(y==null?void 0:y.method)??""}}),Be=(k=be==null?void 0:be[0])!=null&&k.path&&((V=be==null?void 0:be[0])==null?void 0:V.path)!==""?await Promise.all(Ae):await Promise.all(ce);i.value=Be==null?void 0:Be.filter(y=>y==null?void 0:y.extraContent),(U=i.value)==null||U.forEach(y=>{var D;y.api===""&&((D=y.content)==null||D.forEach(q=>{var X;q.comp=="Table"&&M.setExtraContents(Te.methodTableToContent(q.compData,(X=y.extraContent)==null?void 0:X[0]))}))})};return e.watch(()=>v.itemData,async()=>{$.value=="view"&&!tt.value&&await ge(p.cloneDeep(v.itemData)),tt.value=!1},{immediate:!0,deep:!0}),(be,Ye)=>{var Ae,se,te,ce,Be;return e.unref($)!=="edit"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"method-content",style:e.normalizeStyle(ze.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ae=i.value)==null?void 0:Ae.filter(Je=>(Je==null?void 0:Je.buttonName)!=="保存"),Je=>{var ut;return e.openBlock(),e.createElementBlock("div",null,[Je.api!==""?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,disabled:e.unref(P)===e.unref(T)&&!((ut=Je==null?void 0:Je.buttonName)!=null&&ut.includes("预览")),class:"calculator-content",modelValue:Je.buttonName,onClickTrigger:k=>e.unref(St)(Je),loading:O.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.unref(pe)!==""&&((te=e.unref(T))==null?void 0:te[((se=e.unref(T))==null?void 0:se.length)-1])!==e.unref(l)?(e.openBlock(),e.createElementBlock("div",xc,[e.unref(pe)!==""&&((Be=e.unref(T))==null?void 0:Be[((ce=e.unref(T))==null?void 0:ce.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:De,modelValue:"保存"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:1,fileDataList:w.value,onDestroy:A},null,8,["fileDataList"])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)}}},Dc=Lt._export_sfc(wc,[["__scopeId","data-v-681e3053"]]),Cc={};function Ec(a,i){return" 567 "}const _c=Lt._export_sfc(Cc,[["render",Ec]]),Sc={class:"module content"},Tc={class:"module data"},Ic={class:"module layout"},Bc={class:"form-content"},Ac=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),h=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),w=e.ref({}),E=e.ref([]),S=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:w.value}]}),M=Y=>{var $;w.value=p.cloneDeep(Y),l("change",($=S())==null?void 0:$.compData)},O=Y=>{var $,pe;if((Y==null?void 0:Y.buttonName)==="确认"){const C=p.cloneDeep(Y==null?void 0:Y.content);switch(d.value){case"create":E.value.push({...C,index:(($=E.value)==null?void 0:$.length)+1});break}l("change",(pe=S())==null?void 0:pe.compData),c.visible=!1}else c.visible=!1},W=(Y,$)=>{var pe,C;switch(Y){case"create":(pe=h.value)==null||pe.forEach(P=>{P.value=""}),d.value="create",c.visible=!0;break;case"update":(C=h.value)==null||C.forEach(P=>{P.value=$[P==null?void 0:P.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice($,1),d.value="delete";break}},Ee=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var $,pe;Y&&(w.value=(($=Y==null?void 0:Y.find(C=>C.key==="signConfig"))==null?void 0:$.contents)??{},E.value=((pe=Y==null?void 0:Y.find(C=>C.key==="signTypeList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Y,$)=>{const pe=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Sc,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=P=>W("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(P,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.label),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:T=>W("update",{...P,index:x+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:T=>W("delete",x)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ic,[e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:M},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Ee,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Bc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Nc=Lt._export_sfc(Ac,[["__scopeId","data-v-487e0536"]]),Vc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(1),d=e.computed(()=>{var S,M;return(S=s==null?void 0:s.stepConfig)!=null&&S.allowTrigger?c.value:(M=s==null?void 0:s.stepConfig)==null?void 0:M.active}),b=(S,M)=>{c.value=M,l("clickStep",S,M)},v=S=>Bt.getComponent(S),h=()=>{var M;const S=(M=s==null?void 0:s.stepList)==null?void 0:M.find((O,W)=>W+1===d.value);return console.log("findStep",S),S?S==null?void 0:S.children:[]},w=S=>{l("clickTrigger",S)},E=S=>{l("changeTrigger",S)};return(S,M)=>{var Ee,Y,$,pe,C;const O=e.resolveComponent("el-step"),W=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(W,{direction:(Ee=a.stepConfig)==null?void 0:Ee.direction,active:d.value,"finish-status":"success",simple:(Y=a.stepConfig)==null?void 0:Y.simple,"align-center":(($=a.stepConfig)==null?void 0:$.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(P,x)=>(e.openBlock(),e.createBlock(O,{key:x,class:"step-item",onClick:T=>b(P,x+1)},{title:e.withCtx(()=>[e.renderSlot(S.$slots,"title",{title:P==null?void 0:P.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(S.$slots,"description",{description:P==null?void 0:P.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(pe=a.stepConfig)!=null&&pe.allowTrigger&&((C=a.stepConfig)!=null&&C.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(P,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(P==null?void 0:P.type)),{modelValue:P.value,"onUpdate:modelValue":T=>P.value=T,onClickTrigger:w,onChangeTrigger:E,content:P==null?void 0:P.content},e.createSlots({_:2},[e.renderList(S.$slots,(T,I)=>({name:I,fn:e.withCtx(Q=>[e.renderSlot(S.$slots,I,e.mergeProps({ref_for:!0},Q||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Oc=Lt._export_sfc(Vc,[["__scopeId","data-v-d7c99969"]]),Mc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:i}){const s=a,l=i,c=e.ref({}),d=e.ref([]),b=(v,h)=>{l("clickStep",v,h)};return e.watch(()=>s==null?void 0:s.itemData,v=>{var h,w;d.value=(h=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(w=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:w.contents},{immediate:!0,deep:!0}),(v,h)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Oc,{stepConfig:c.value,stepList:d.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(w,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),Pc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(i,s)=>{const l=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(a.activities,(d,b)=>(e.openBlock(),e.createBlock(l,{key:b,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),zc=Lt._export_sfc(Pc,[["__scopeId","data-v-4172a886"]]),Rc={class:"line-content"},Lc={class:"line-time"},Fc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const i=a,s=e.ref({}),l=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var d,b;l.value=(d=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:d.contents,s.value=(b=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(zc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:v})=>[e.createElementVNode("span",Rc,e.toDisplayString(b),1),e.createElementVNode("span",Lc,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),$c=Lt._export_sfc(Fc,[["__scopeId","data-v-b4d9deed"]]),jc={class:"tabs-content"},Uc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const i=a,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?s.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(Bt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Kc=Lt._export_sfc(Uc,[["__scopeId","data-v-40865f68"]]),so=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Wc={class:"type-select"},Hc=["onClick"],qc={class:"list-icon"},Gc={__name:"modelSelect",setup(a){const i=so(p.pinia),{itemData:s}=p.storeToRefs(i),l=c=>{const d=p.cloneDeep(s.value);d.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(d)};return(c,d)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(pr),(v,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:w=>l(v)},[e.createElementVNode("div",qc,[e.createVNode(b,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,Hc)]))),128))])}}},Xc=Lt._export_sfc(Gc,[["__scopeId","data-v-91799bf8"]]),Yc={class:"fill-content"},Jc={class:"operate-content"},Zc={class:"collapse-title-content"},Qc={class:"collapse-title-item"},eu={key:1},tu=["onClick"],nu={class:"icon-content"},au={key:0,class:"edit-content"},ou=["onClick"],lu={class:"comp-child"},ru={__name:"modelFill",setup(a){const i=so(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),b=e.ref([]),v=O=>{var Ee;let W=(Ee=p.cloneDeep(b.value))==null?void 0:Ee.map((Y,$)=>(O===$&&(Y.content=!0),Y));b.value=W},h=O=>{var Ee;let W=(Ee=p.cloneDeep(b.value))==null?void 0:Ee.map((Y,$)=>(O===$&&(Y.content=!1),Y));b.value=W,c.value=p.cloneDeep(s.value)},w=(O,W)=>{var pe;let Ee=(pe=p.cloneDeep(b.value))==null?void 0:pe.map((C,P)=>(O===P&&(C.content=!1),C));b.value=Ee;const Y=p.cloneDeep(s.value),$=Y==null?void 0:Y.filter((C,P)=>(P===O&&(C.name=W),C));i.setOriginalData($),i.setItemData($)};e.watch(()=>s.value,()=>{var O,W,Ee;!s.value||((O=s.value)==null?void 0:O.length)===0?c.value=[]:c.value=(W=p.cloneDeep(s.value))==null?void 0:W.filter(Y=>(Y==null?void 0:Y.comp)!=="methodButton"),d.value=c.value,b.value=(Ee=p.cloneDeep(d.value))==null?void 0:Ee.map((Y,$)=>({id:$,content:!1}))},{deep:!0,immediate:!0});const E=O=>sa(O),S=(O,W,Ee)=>{var $,pe;if(!O)return;let Y=p.cloneDeep(s.value);Y=($=Y==null?void 0:Y.map((C,P)=>(P===Ee&&(C.compData=O),C)))==null?void 0:$.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),b.value=(pe=p.cloneDeep(Y))==null?void 0:pe.map((C,P)=>({id:P,content:!1})),i.setOriginalData(Y),i.setItemData(Y)},M=O=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const W=p.cloneDeep(s.value),Ee=W==null?void 0:W.filter((Y,$)=>$!==O);i.setOriginalData(Ee),i.setItemData(Ee),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(O,W)=>{const Ee=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Yc,[W[1]||(W[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Jc,[e.createVNode(_l.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:Y,index:$})=>{var pe,C,P,x,T,I,Q,Le,tt,ze;return[e.createElementVNode("div",Zc,[e.createElementVNode("div",Qc,[(C=(pe=b.value)==null?void 0:pe.find(We=>We.id===$))!=null&&C.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:Y.name&&Y.name!==""?"8px":"0px"})},e.toDisplayString(Y.name),5)),(x=(P=b.value)==null?void 0:P.find(We=>We.id===$))!=null&&x.content?(e.openBlock(),e.createElementBlock("div",eu,[e.createVNode(Bt._sfc_main$2,{modelValue:Y.name,"onUpdate:modelValue":We=>Y.name=We,onClick:W[0]||(W[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(I=(T=b.value)==null?void 0:T.find(We=>We.id===$))!=null&&I.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>v($),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Edit",style:{width:"16px",height:"16px"}})],8,tu))]),e.createElementVNode("div",nu,[(Le=(Q=b.value)==null?void 0:Q.find(We=>We.id===$))!=null&&Le.content?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(Ee,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>h($),["stop"])},null,8,["onClick"]),e.createVNode(Ee,{name:"Save",onClick:e.withModifiers(We=>w($,Y.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ze=(tt=b.value)==null?void 0:tt.find(We=>We.id===$))!=null&&ze.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>M($),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Delete",style:{width:"16px",height:"16px"}})],8,ou))])])]}),content:e.withCtx(({item:Y,index:$})=>{var pe,C;return[e.createElementVNode("div",lu,[e.createTextVNode(e.toDisplayString(E(Y.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(Y.comp+"Operate")),{itemContents:Y==null?void 0:Y.compData,originalItemContents:(C=(pe=d.value)==null?void 0:pe.find((P,x)=>x===$))==null?void 0:C.compData,onChange:P=>S(P,Y,$)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},iu=Lt._export_sfc(ru,[["__scopeId","data-v-a46a44b9"]]),su={key:0,class:"show-content"},cu={style:{display:"flex"}},uu={__name:"modelShow",setup(a){const i=so(p.pinia),{itemData:s}=p.storeToRefs(i),l=e.ref([]);e.watch(()=>s.value,()=>{var d;!s.value||((d=s.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=d=>sa(d);return(d,b)=>{var v;return((v=l.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:w},[e.createElementVNode("div",cu,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:w},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},pu=Lt._export_sfc(uu,[["__scopeId","data-v-3f3e863e"]]),du={class:"tabs-header"},fu={class:"tabs-list"},hu={class:"tab-name"},vu={class:"tab-actions"},gu=["onClick"],mu=["onClick"],yu=["onClick"],bu={class:"model-operate"},ku={class:"model-select",style:{display:"unset"}},xu={class:"existing-components"},wu={class:"component-list"},Du=["onClick"],Cu={class:"component-info"},Eu={class:"component-type"},_u={class:"component-name"},Su={class:"model-fill"},Tu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),b=e.ref(""),v=e.ref({title:""}),h=e.ref(-1),w=e.ref(!1),E=e.ref(-1),S=e.ref(new WeakMap),M=e.ref(null),O=so(p.pinia),{itemData:W}=p.storeToRefs(O),Ee=()=>{b.value="新增标签页",v.value.title="",h.value=-1,d.value=!0},Y=Pe=>{b.value="修改标签页",v.value.title=c.value[Pe].title,h.value=Pe,d.value=!0},$=Pe=>{const j=P(Pe);S.value.delete(j),c.value.splice(Pe,1),nt()},pe=()=>{if(v.value.title.trim()){if(h.value===-1){const Pe={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:C()};c.value.push(Pe)}else c.value[h.value].title=v.value.title,c.value[h.value].value=v.value.title,c.value[h.value].label=v.value.title;d.value=!1,nt()}},C=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,P=Pe=>{const j=c.value[Pe];return j.id||(j.id=C()),j.id},x=Pe=>{var Ke;E.value=Pe;const j=P(Pe);M.value=p.cloneDeep(W.value);let Qe=S.value.get(j);!Qe&&((Ke=c.value[Pe].children)==null?void 0:Ke.length)>0&&(Qe=Le(c.value[Pe].children)),Qe?O.setItemData(p.cloneDeep(Qe)):O.setItemData([]),w.value=!0},T=e.computed(()=>{const Pe=Te.useModelComp(p.pinia),j=p.storeToRefs(Pe).itemData.value;return console.log("可用组件数据",j),!j||!Array.isArray(j)?[]:j.filter(Qe=>{var Ke;if(Qe.comp==="Tabs"&&E.value>=0){const vt=P(E.value);if((Ke=Qe.compData)==null?void 0:Ke.some(ct=>{var at;return ct.key==="stepList"&&((at=ct.contents)==null?void 0:at.some(St=>St.id===vt))}))return!1}return!0})}),I=Pe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Pe]||Pe,Q=Pe=>{var j;try{const Qe=p.cloneDeep(Pe);Qe.id=Date.now()+Math.random(),Qe.comp==="Tabs"&&((j=Qe.compData)==null||j.forEach(vt=>{vt.key==="stepList"&&vt.contents&&vt.contents.forEach(yt=>{yt.id=C()})}));const Ke=p.cloneDeep(W.value);Ke.push(Qe),O.setItemData(Ke)}catch(Qe){console.error("添加组件失败:",Qe)}},Le=Pe=>Pe.map(j=>{var Qe;switch(j.type){case"form":return{comp:"Form",name:j.value||"表单",compData:tt(j.content)};case"table":return{comp:"Table",name:j.value||"表格",compData:ze(j.content)};default:return{comp:"Unknown",name:j.value||"",compData:((Qe=j.content)==null?void 0:Qe.originalData)||[]}}}),tt=Pe=>{if(!Pe)return[];const j=[];return Pe.rowContents&&j.push({key:"formContent",contents:Pe.rowContents}),Pe.buttonValue&&j.push({key:"formButton",contents:Pe.buttonValue}),typeof Pe.isEnableWrap<"u"&&j.push({key:"enableWrap",contents:Pe.isEnableWrap}),j},ze=Pe=>[],We=()=>{if(E.value>=0&&E.value<c.value.length){const Pe=P(E.value);S.value.set(Pe,p.cloneDeep(W.value)),c.value[E.value].children=oe(W.value),console.log("保存后的数据",oe(W.value))}w.value=!1,E.value=-1,M.value=null,nt()},De=()=>{M.value&&O.setItemData(p.cloneDeep(M.value)),w.value=!1,E.value=-1,M.value=null},A=()=>{w.value&&De()},oe=Pe=>{if(!Array.isArray(Pe))throw new Error("sourceData must be an array");return Pe.map((j,Qe)=>{if(!j||typeof j!="object")return j;const{comp:Ke,name:vt,compData:yt}=j;switch(Ke){case"Form":return{type:"form",content:ne(yt||[]),value:"表单"};case"Table":return{type:"table",content:me(yt||[]),value:"表格"};default:return{type:"xxx",content:Xe(yt||[]),value:""}}})},ne=Pe=>{const j={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},Qe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Pe.forEach((Ke,vt)=>{if(!Ke||typeof Ke!="object"){console.warn(`Invalid config at index ${vt}:`,Ke);return}const{key:yt,contents:ct}=Ke,at=Qe[yt];if(!at){console.warn(`Unknown Form config key: ${yt}`);return}yt==="enableWrap"?j[at]=!!ct:j[at]=Array.isArray(ct)?ct:[]}),j},me=Pe=>{const j={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},Qe={header:"columns",tableContents:"tableData"};return Pe.forEach((Ke,vt)=>{if(!Ke||typeof Ke!="object"){console.warn(`Invalid config at index ${vt}:`,Ke);return}const{key:yt,contents:ct}=Ke,at=Qe[yt];if(!at){console.warn(`Unknown Table config key: ${yt}`);return}j[at]=Array.isArray(ct)?ct:[]}),j},Xe=Pe=>(console.log("Default conversion logic - to be implemented"),{originalData:Pe,processed:!1,componentType:"unknown"}),nt=()=>{const Pe=[{key:"stepList",contents:c.value}];l("change",Pe)};return e.watch(()=>s.itemContents,Pe=>{if(Pe&&Pe.length>0){const j=Pe.find(Qe=>Qe.key==="stepList");j&&j.contents&&(c.value=j.contents.map(Qe=>({title:Qe.title||"",value:Qe.value||Qe.title||"",label:Qe.label||Qe.title||"",children:Qe.children||[],id:Qe.id||C()})))}},{immediate:!0,deep:!0}),(Pe,j)=>{const Qe=e.resolveComponent("svg-icon"),Ke=e.resolveComponent("el-input"),vt=e.resolveComponent("el-form-item"),yt=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",du,[j[6]||(j[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Ee},[e.createVNode(Qe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),j[5]||(j[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",fu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(ct,at)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:at},[e.createElementVNode("span",hu,e.toDisplayString(ct.title),1),e.createElementVNode("div",vu,[e.createElementVNode("button",{onClick:St=>Y(at)},"修改标题",8,gu),e.createElementVNode("button",{onClick:St=>x(at)},"布局调整",8,mu),e.createElementVNode("button",{onClick:St=>$(at)},"删除",8,yu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":j[2]||(j[2]=ct=>d.value=ct),title:b.value,onBeforeDestroy:j[3]||(j[3]=ct=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:j[1]||(j[1]=ct=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:pe},"确定")]),default:e.withCtx(()=>[e.createVNode(yt,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(vt,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ke,{modelValue:v.value.title,"onUpdate:modelValue":j[0]||(j[0]=ct=>v.value.title=ct),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:w.value,"onUpdate:modelValue":j[4]||(j[4]=ct=>w.value=ct),title:"布局调整",fullScreen:"",onBeforeDestroy:A},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:De},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",bu,[e.createElementVNode("div",ku,[e.createVNode(Xc),e.createElementVNode("div",xu,[j[8]||(j[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",wu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,ct=>(e.openBlock(),e.createElementBlock("div",{key:ct.id,class:"component-item",onClick:at=>Q(ct)},[e.createElementVNode("div",Cu,[e.createElementVNode("span",Eu,e.toDisplayString(I(ct.comp)),1),e.createElementVNode("span",_u,e.toDisplayString(ct.name),1)]),j[7]||(j[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Du))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Pe.innerWidth},[e.createVNode(pu)])),e.createElementVNode("div",Su,[e.createVNode(iu)])])]),_:1},8,["modelValue"])])}}},Iu=Lt._export_sfc(Tu,[["__scopeId","data-v-9096ed0d"]]);function Bu(){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 Au(a){return{type:"line",...a}}function Nu(){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 Vu(a){return{type:"bar",barWidth:"60%",...a}}function Ou(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Mu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Fn={line:{initBaseoptions:Bu,initSeries:Au},bar:{initBaseoptions:Nu,initSeries:Vu},pie:{initBaseoptions:Ou,initSeries:Mu}},Ho=Te.useMenuState(p.pinia),zl=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:b}=i||{},v=a==null?void 0:a.find(S=>{const{name:M}=S;return M===c});if(!v)return{names:s,values:l};const h=(E=v==null?void 0:v.compData)==null?void 0:E.find(S=>{const{key:M}=S;return M==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(S=>{const M=S==null?void 0:S[0];let O=!1;p.isObject(M)&&(M!=null&&M.id)&&(O=!0);let W=d,Ee=b;O&&(W=W+1,Ee=Ee+1);const Y=S==null?void 0:S[W],$=S==null?void 0:S[Ee];s.push(Y),l.push($)}),{names:s,values:l}},Pu=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:b}=a||{};let v=null;const h=sessionStorage.getItem("systemKey");if(b&&Ho.activeMenuPath&&(v=await Te.getItemData(`${Ho.activeMenuPath}`,h,"")),!b){const w=i==null?void 0:i.join("/");v=await Te.getItemData(`${w}^${s}`,h,"")}return zl(v,{group:l,nameCol:c,valueCol:d})},zu=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),v=await Te.getItemData(d,b,"");return zl(v,{group:s,nameCol:l,valueCol:c})},Co=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:b}=a||{};if(!l.length||!c)return s;const{mainKey:v,group:h,nameCol:w,valueCol:E,isSelfDetail:S}=i||{};return v&&h&&Bt.isNumber(w)&&Bt.isNumber(E)?await Pu({menu:l,mainKey:v,detailGroup:h,detailNameCol:w,detailValueCol:E,isSelfDetail:S}):Bt.isNumber(d)&&Bt.isNumber(b)?await zu({menu:l,group:c,nameCol:d,valueCol:b}):s},Ru=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Fn==null?void 0:Fn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:w,values:E}=await Co(i,s);if(!w||!E)return h;h.xAxis.data=w;const S=v({data:E});return h.series.push(S),h},Lu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Fn==null?void 0:Fn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:w,values:E}=await Co(i,s);if(!w||!E)return h;h.xAxis.data=w;const S=v({data:E});return h.series.push(S),h},Fu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Fn==null?void 0:Fn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:w,values:E}=await Co(i,s);if(!w||!E)return h;const S=[];for(let O=0;O<w.length;O++){const W=w[O],Ee=E[O];S.push({name:W,value:Ee})}const M=v({data:S});return h.series.push(M),h},$u=async(a=[])=>{var b,v,h;const i=((b=a==null?void 0:a.find(w=>w.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((v=a==null?void 0:a.find(w=>w.key==="chartDataConfig"))==null?void 0:v.contents)??{},l=((h=a==null?void 0:a.find(w=>w.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=i;let d={};return c==="line"&&(d=await Ru({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await Lu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Fu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},ju=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const i=a,s=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;s.value=await $u(c)});const l=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Rr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Uu=Lt._export_sfc(ju,[["__scopeId","data-v-d4c081e8"]]),Ku={class:"chart-module layout"},Wu={class:"chart-module content"},Hu={class:"chart-module content"},qu={class:"form-content"},Gu={class:"dialog-footer"},Xu={class:"form-content"},Yu={class:"dialog-footer"},Ju={class:"form-content"},Zu={class:"dialog-footer"},Qu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],v=e.ref({}),h=()=>{var se;d.value=b(),(se=d.value)==null||se.forEach(te=>{var Be;const ce=te==null?void 0:te.prop;te.value=(Be=v==null?void 0:v.value)==null?void 0:Be[ce]}),c.visible=!0},w=se=>{v.value=se},E=()=>{var se;c.visible=!1,l("change",(se=Ye())==null?void 0:se.compData)},S=e.reactive({visible:!1,width:"840",title:"数据配置"}),M=e.ref([]),O=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],W=e.ref({}),Ee=()=>{const se=M.value,te=p.cloneDeep(se);return te==null||te.forEach(ce=>{var Je;const Be=ce==null?void 0:ce.prop;ce.value=(Je=W.value)==null?void 0:Je[Be]}),te},Y=se=>{var ce;W.value=se;const te=Ee();M.value=te,l("change",(ce=Ye())==null?void 0:ce.compData)},$=async()=>{const se=await Te.getMenusContent(),te=Ee();te==null||te.forEach(ce=>{(ce==null?void 0:ce.prop)==="menu"&&(ce.contents=se)}),M.value=te,S.visible=!0,await ct(W.value.menu),await ge(W.value.group)},pe=e.reactive({visible:!1,width:"840",title:"详情页配置"}),C=e.ref([]),P=()=>[{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:[]}],x=e.ref({}),T=()=>{const se=C.value,te=p.cloneDeep(se);return te==null||te.forEach(ce=>{var Je;const Be=ce==null?void 0:ce.prop;ce.value=(Je=x.value)==null?void 0:Je[Be]}),te},I=se=>{var ce;x.value=se;const te=T();C.value=te,l("change",(ce=Ye())==null?void 0:ce.compData)},Q=async()=>{await A();const se=p.cloneDeep(Le.value),te=T();te==null||te.forEach(ce=>{var Je;const Be=ce==null?void 0:ce.prop;ce.value=(Je=x==null?void 0:x.value)==null?void 0:Je[Be],Be==="mainKey"&&(ce.contents=se)}),C.value=te,pe.visible=!0},Le=e.ref([]),tt=e.ref([]),ze=e.ref({}),We=e.ref({}),De=()=>{const{compData:se}=Ke.value||{},te=se==null?void 0:se.find(U=>{const{key:y}=U;return y==="header"}),ce=(te==null?void 0:te.contents)||[],Be=ce==null?void 0:ce.filter((U,y)=>{const{label:D}=U;return D!=="操作"}),Je=Be==null?void 0:Be.findIndex((U,y)=>{const{isMainKey:D}=U;return D});if(Je<0)return[];const ut=se==null?void 0:se.find(U=>{const{key:y}=U;return y==="tableContents"}),k=(ut==null?void 0:ut.contents)||[];return k==null?void 0:k.map(U=>{const y=U==null?void 0:U[0];let D=Je;p.isObject(y)&&(y!=null&&y.id)&&(D=D+1);const q=U==null?void 0:U[D];return{label:q,value:q}})},A=async()=>{const se=await De();Le.value=se},oe=async se=>{const te=sessionStorage.getItem("systemKey");return await Te.getItemData(se,te,"")},ne=async se=>{const te=se;tt.value=te==null?void 0:te.map(ce=>{const{name:Be}=ce;return ze.value[Be]=ce,{label:Be,value:Be}})},me=se=>{const{comp:te,compData:ce}=We.value||{};if(te==="Table"){let Be=T();Be=Be.filter(Je=>{const{prop:ut}=Je;return ut!=="formItems"}),at(Be,ce),C.value=Be}},Xe=async()=>{var ce,Be;const se=(ce=x==null?void 0:x.value)==null?void 0:ce.mainKey,te=(Be=W==null?void 0:W.value)==null?void 0:Be.menu;if(se){const ut=`${te==null?void 0:te.join("/")}^${se}`,k=await oe(ut);await ne(k);const V=T();V==null||V.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=tt.value)}),C.value=V}};e.watch(()=>{var se;return(se=x==null?void 0:x.value)==null?void 0:se.mainKey},async(se,te)=>{se!=te&&se&&await Xe()});const nt=async se=>{const te=ze.value[se];We.value=te,await me()};e.watch(()=>{var se;return(se=x==null?void 0:x.value)==null?void 0:se.group},async(se,te)=>{se!=te&&se&&nt(se)});const Pe=async()=>{var te;await Xe();const se=(te=x.value)==null?void 0:te.group;await nt(se)},j=e.ref([]),Qe=e.ref({}),Ke=e.ref({}),vt=async se=>{const te=se==null?void 0:se.join("/"),ce=sessionStorage.getItem("systemKey");return await Te.getItemData(te,ce,"")},yt=async se=>{const te=await vt(se);j.value=te==null?void 0:te.map(ce=>{const{name:Be}=ce;return Qe.value[Be]=ce,{label:Be,value:Be}})},ct=async(se,te)=>{await yt(se);const ce=Ee();ce==null||ce.forEach(Be=>{(Be==null?void 0:Be.prop)==="group"&&(Be.contents=j.value)}),M.value=ce};e.watch(()=>{var se;return(se=W==null?void 0:W.value)==null?void 0:se.menu},async(se,te)=>{const ce=se==null?void 0:se.join("/"),Be=te==null?void 0:te.join("/");ce!=Be&&await ct(se)});const at=(se,te)=>{const ce=te==null?void 0:te.find(k=>{const{key:V}=k;return V==="header"}),Be=(ce==null?void 0:ce.contents)||[],Je=Be==null?void 0:Be.filter((k,V)=>{const{label:U}=k;return U!=="操作"}),ut=Je==null?void 0:Je.map((k,V)=>{const{label:U}=k;return{label:U,value:V}});se==null||se.forEach(k=>{const V=k==null?void 0:k.prop;(V==="nameCol"||V==="valueCol")&&(k.contents=ut)})},St=se=>{const{comp:te,compData:ce}=Ke.value||{};if(te==="Table"){W.value.formItems=[];let Be=Ee();Be=Be.filter(Je=>{const{prop:ut}=Je;return ut!=="formItems"}),at(Be,ce),M.value=Be}},ge=async se=>{const te=Qe.value[se];Ke.value=te,await St()};e.watch(()=>{var se;return(se=W==null?void 0:W.value)==null?void 0:se.group},async(se,te)=>{se!=te&&ge(se)});const be=async()=>{var ce,Be;const se=(ce=W.value)==null?void 0:ce.menu;await ct(se);const te=(Be=W.value)==null?void 0:Be.group;await ge(te)},Ye=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:W.value},{key:"chartDetailConfig",contents:x.value}]}),Ae=()=>{c.visible=!1,S.visible=!1,pe.visible=!1};return e.onMounted(async()=>{var te,ce,Be;M.value=O(),C.value=P();const se=s==null?void 0:s.itemContents;v.value=((te=se==null?void 0:se.find(Je=>Je.key==="chartBaseConfig"))==null?void 0:te.contents)??{},W.value=((ce=se==null?void 0:se.find(Je=>Je.key==="chartDataConfig"))==null?void 0:ce.contents)??{},await be(),x.value=((Be=se==null?void 0:se.find(Je=>Je.key==="chartDetailConfig"))==null?void 0:Be.contents)??{},await Pe()}),(se,te)=>{const ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ku,[te[4]||(te[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(ce,{id:"themeButton",onClick:te[0]||(te[0]=Be=>h())},{default:e.withCtx(()=>te[3]||(te[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Wu,[te[6]||(te[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(ce,{id:"themeButton",onClick:te[1]||(te[1]=Be=>$())},{default:e.withCtx(()=>te[5]||(te[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Hu,[te[8]||(te[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(ce,{id:"themeButton",onClick:te[2]||(te[2]=Be=>Q())},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Ae,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",qu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gu,[e.createVNode(ce,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>te[9]||(te[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(ce,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>te[10]||(te[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:S.visible,title:S.title,onBeforeDestroy:Ae,width:S.width},{default:e.withCtx(()=>[e.createElementVNode("div",Xu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yu,[e.createVNode(ce,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>te[11]||(te[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ce,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>te[12]||(te[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:pe.visible,title:pe.title,onBeforeDestroy:Ae,width:pe.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ju,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(ce,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>te[13]||(te[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ce,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>te[14]||(te[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ep=Lt._export_sfc(Qu,[["__scopeId","data-v-fe119645"]]);var Ja={exports:{}},tp=Ja.exports,qo;function np(){return qo||(qo=1,function(a,i){(function(s,l){l()})(tp,function(){function s(w,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(w.type)?new Blob(["\uFEFF",w],{type:w.type}):w}function l(w,E,S){var M=new XMLHttpRequest;M.open("GET",w),M.responseType="blob",M.onload=function(){h(M.response,E,S)},M.onerror=function(){console.error("could not download file")},M.send()}function c(w){var E=new XMLHttpRequest;E.open("HEAD",w,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(w){try{w.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),w.dispatchEvent(E)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof la.commonjsGlobal=="object"&&la.commonjsGlobal.global===la.commonjsGlobal?la.commonjsGlobal:void 0,v=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(w,E,S){var M=b.URL||b.webkitURL,O=document.createElement("a");E=E||w.name||"download",O.download=E,O.rel="noopener",typeof w=="string"?(O.href=w,O.origin===location.origin?d(O):c(O.href)?l(w,E,S):d(O,O.target="_blank")):(O.href=M.createObjectURL(w),setTimeout(function(){M.revokeObjectURL(O.href)},4e4),setTimeout(function(){d(O)},0))}:"msSaveOrOpenBlob"in navigator?function(w,E,S){if(E=E||w.name||"download",typeof w!="string")navigator.msSaveOrOpenBlob(s(w,S),E);else if(c(w))l(w,E,S);else{var M=document.createElement("a");M.href=w,M.target="_blank",setTimeout(function(){d(M)})}}:function(w,E,S,M){if(M=M||open("","_blank"),M&&(M.document.title=M.document.body.innerText="downloading..."),typeof w=="string")return l(w,E,S);var O=w.type==="application/octet-stream",W=/constructor/i.test(b.HTMLElement)||b.safari,Ee=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ee||O&&W||v)&&typeof FileReader<"u"){var Y=new FileReader;Y.onloadend=function(){var C=Y.result;C=Ee?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),M?M.location.href=C:location=C,M=null},Y.readAsDataURL(w)}else{var $=b.URL||b.webkitURL,pe=$.createObjectURL(w);M?M.location=pe:location.href=pe,M=null,setTimeout(function(){$.revokeObjectURL(pe)},4e4)}});b.saveAs=h.saveAs=h,a.exports=h})}(Ja)),Ja.exports}np();const Zn=p.useLoginState(),{loginUserInfo:Ha}=p.storeToRefs(Zn),Ft=Te.useModelComp(p.pinia),Za=e.ref(!1),{itemData:ap,itemGridData:Xn,curStructureCompIds:Go,isSubmitCurStructure:op,isRefreshCurStructure:lp,freshContent:Xo,routeToChildPath:rp,payloadTypes:ip,pageMapState:ao,itemExtendData:qa}=p.storeToRefs(Ft),vn=Te.useMenuState(p.pinia),{activeTopMenuPath:sp,activeMenuPath:Rt,platform:Zd,activeAsideMenu:cp,buttonTriggerType:up}=p.storeToRefs(vn),bn=oa.useUnit(p.pinia),{selectTitle:Yo}=p.storeToRefs(bn),pp=Te.useOriginalState(p.pinia),{originalPath:co}=p.storeToRefs(pp),Jo=Te.useAuthorityState(p.pinia),oo=e.ref(!0),Ea=e.ref(0),Eo=e.ref([]),_a=e.computed(async()=>{var i,s;const a=(i=Rt.value)!=null&&i.startsWith("/")?(s=Rt.value)==null?void 0:s.substring(1):Rt.value;return(a==null?void 0:a.includes(co.value))||await xp(a)}),dp=()=>{Ft.setItemGridData([]),Ft.setIsEdit("edit"),Ft.setSubmitCurStructure(Rt.value!=="/平台管理/菜单管理")},fp=()=>{Ft.setIsEdit("view"),Ft.setRefreshCurStructure(!0)},hp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Yo.value.length===1)It.value=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value),bn.setSelectIndex(""),bn.setSelectMenu(""),bn.setSelectTitle([]);else{const s=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);It.value=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),l,!1,[],await _a.value);let c=-1;(i=Yo.value)==null||i.forEach((d,b)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=b),(c===-1||c>=b)&&s.push(d)}),bn.setSelectTitle(s),l!==""?bn.setSelectMenu(a==null?void 0:a.key):(bn.setSelectIndex(""),bn.setSelectMenu(""))}It.value=Ta(It.value),Ft.setItemData(It.value),Ft.setOriginalData(It.value)},vo=async(a,i,s,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,b;i==="create"?(d={dataList:a==null?void 0:a.map(h=>{var w;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(w=h==null?void 0:h.compData)==null?void 0:w.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},b=p.batchAddInsofDataApi):i==="update"?(d={dataList:a==null?void 0:a.map(h=>{var w;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(w=h==null?void 0:h.compData)==null?void 0:w.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},b=p.batchUpdateInsofDataApi):i==="delete"&&(d={ids:a},b=p.batchDeleteInsofDataApi);const v=await b(d);if(((c=v==null?void 0:v.data)==null?void 0:c.code)===200)return v.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Zo=async(a,i,s,l)=>{var c,d,b,v,h,w,E,S,M,O,W;try{const Ee=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(x=>!(x!=null&&x.id)||typeof(x==null?void 0:x.id)=="string"))==null?void 0:d.map(x=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:x}})),Y=(v=(b=a==null?void 0:a.results)==null?void 0:b.filter(x=>(x==null?void 0:x.id)&&typeof(x==null?void 0:x.id)=="number"))==null?void 0:v.map(x=>({id:x==null?void 0:x.id,value:{tableData:x}})),$=JSON.parse(p.cloneDeep(JSON.stringify(a))),pe=(h=$==null?void 0:$.results)==null?void 0:h.map(x=>x.id);let C;s?C=(S=(E=(w=ao.value)==null?void 0:w[Rt.value])==null?void 0:E.filter(x=>{var T,I,Q;return((T=x==null?void 0:x.key)==null?void 0:T.type)===i&&((Q=(I=x==null?void 0:x.key)==null?void 0:I.relatedInfo)==null?void 0:Q.target)===l}))==null?void 0:S.map(x=>x==null?void 0:x.id):C=(W=(O=(M=ao.value)==null?void 0:M[Rt.value])==null?void 0:O.filter(x=>{var T;return((T=x==null?void 0:x.key)==null?void 0:T.type)===i}))==null?void 0:W.map(x=>x==null?void 0:x.id);const P=C==null?void 0:C.filter(x=>!(pe!=null&&pe.includes(x))&&typeof x=="number");(Ee==null?void 0:Ee.length)>0&&await p.batchAddInsofDataApi({dataList:Ee}),(Y==null?void 0:Y.length)>0&&await p.batchUpdateInsofDataApi({dataList:Y}),(P==null?void 0:P.length)>0&&await p.batchDeleteInsofDataApi({ids:P})}catch(Ee){throw new Error(Ee)}},vp=async a=>{var w,E,S,M,O,W,Ee,Y,$,pe;vn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(ap.value)));if(!op.value)return vn.setCacheStructures({key:up.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(C=>C.id),l=s.filter(C=>{var P;return!((P=Go.value)!=null&&P.includes(C))}),c=(w=Go.value)==null?void 0:w.filter(C=>!s.includes(C)),d=[...l,...c].filter(C=>typeof C!==null&&typeof C<"u"),b=i==null?void 0:i.filter(C=>!C.id),v=i==null?void 0:i.filter(C=>C.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(vo(d,"delete",a)),b&&(b==null?void 0:b.length)>0&&h.push(vo(b,"create",a)),v&&(v==null?void 0:v.length)>0&&h.push(vo(v,"update",a)),Xn.value&&((E=Xn.value)!=null&&E.isDelete&&((M=(S=Xn.value)==null?void 0:S.results)==null?void 0:M.length)>0&&((W=(O=Xn.value)==null?void 0:O.results)!=null&&W.every(C=>typeof C=="number"))?await p.batchDeleteInsofDataApi({ids:(Ee=Xn.value)==null?void 0:Ee.results}):(console.log("itemGridData.value",Xn.value),h.push(await Zo(Xn.value,"gridLayout")))),qa.value)for(const C in qa.value)h.push(await Zo((Y=qa.value)==null?void 0:Y[C],"extend",{target:C,compId:(pe=($=qa.value)==null?void 0:$[C])==null?void 0:pe.compId},C));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Ft.setRefreshCurStructure(!0)}).catch(C=>{p.ElMessage.success(C)}),vn.setContentLoading(!1)},_o=a=>sa(a),It=e.ref([]),gp=e.computed(()=>{var a;return(a=It.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Rl=e.computed(()=>{var a;return(a=It.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),mp=async a=>{var l,c,d,b,v,h;let i=p.cloneDeep(Rt).value;i=i+co.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const s=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((d=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:d.length)>0){const w=(v=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:v.map(S=>S==null?void 0:S.id),E=await p.batchDeleteInsofDataApi({ids:w});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await Zn.setLogRecordAsync({type:"删除",data:a},i)):p.ElMessage.error("删除响应失败"),Ft.setTableLoading(!1)}},Qo=async a=>{var i,s;try{let l=p.cloneDeep(Rt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(b=>{var v;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+co.value+((v=Object.values(b==null?void 0:b.singleContent))==null?void 0:v[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(b=>{var v;return((v=b==null?void 0:b.data)==null?void 0:v.code)===200}))){const b=Array.from(new Set((i=d==null?void 0:d.flatMap(h=>{var w;return(w=h==null?void 0:h.data)==null?void 0:w.result}))==null?void 0:i.map(h=>h==null?void 0:h.id))),v=await p.batchDeleteInsofDataApi({ids:b});((s=v==null?void 0:v.data)==null?void 0:s.code)===200?(p.ElMessage.success("删除成功"),await Zn.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await mp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Ft.setTableLoading(!1)}},yp=async a=>{var i,s;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Rt.value,tableId:(i=a==null?void 0:a.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=a==null?void 0:a.data)!=null&&s.id))return;const b=await Promise.all([d]);(b==null?void 0:b.every(h=>{var w;return((w=h==null?void 0:h.data)==null?void 0:w.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Ll=e.ref(0),lo=e.ref(null),So=async(a,i="data",s)=>{var l,c,d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I;if(lo.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await Qo(a):await Te.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await Zn.setLogRecordAsync({type:"删除",data:a},Rt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(Q=>typeof(Q==null?void 0:Q.id)=="string")){const Q=(b=a==null?void 0:a.selectItems)==null?void 0:b.map(Le=>({content:a==null?void 0:a.content,singleContent:Le,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await Qo(Q)}else{const Q=(v=a==null?void 0:a.selectItems)==null?void 0:v.map(Le=>Le==null?void 0:Le.id);await p.batchDeleteInsofDataApi({ids:Q}),await Zn.setLogRecordAsync({type:"删除",data:Q},Rt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let Q={};for(let tt in a==null?void 0:a.singleContent)tt!=="id"&&tt!=="index"&&(Q[tt]=a==null?void 0:a.singleContent[tt]);const Le=await Te.addTableContents(i,Rt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(Q),a==null?void 0:a.column,a,{param:s});lo.value={resId:Le,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Ft.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let Q=[],Le=[],tt=((w=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:w.id)??"",ze=s==null?void 0:s.url,We="",De="";if(tt!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((M=(S=a==null?void 0:a.content)==null?void 0:S[0])==null?void 0:M.id)!="string"){const A=await p.getInsofDataApi({id:tt});We=((Y=(Ee=(W=(O=A==null?void 0:A.data)==null?void 0:O.result)==null?void 0:W[0])==null?void 0:Ee.key)==null?void 0:Y.tableId)??"",De=((P=(C=(pe=($=A==null?void 0:A.data)==null?void 0:$.result)==null?void 0:pe[0])==null?void 0:C.key)==null?void 0:P.pageKey)??""}(x=a==null?void 0:a.singleContent)==null||x.forEach(A=>{let oe={};for(let ne in A)ne!=="id"&&ne!=="index"&&(oe[ne]=A[ne]);typeof(A==null?void 0:A.id)=="number"?Q.push({id:A==null?void 0:A.id,value:{tableData:oe}}):Le.push({key:{type:i,pageKey:ze||De||Rt.value,tableId:We||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:oe}})}),(Le==null?void 0:Le.length)>0&&await p.batchAddInsofDataApi({dataList:Le}),(Q==null?void 0:Q.length)>0&&await p.batchUpdateInsofDataApi({dataList:Q})}else{let Q={},Le=(T=a==null?void 0:a.singleContent)==null?void 0:T.id;for(let tt in a==null?void 0:a.singleContent)tt!=="id"&&tt!=="index"&&(Q[tt]=a==null?void 0:a.singleContent[tt]);await Te.fixTableContents(i,Rt.value,a==null?void 0:a.index,Le,sessionStorage.getItem("systemKey"),Object.values(Q),a==null?void 0:a.column)}Ft.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await yp(a==null?void 0:a.value);Ft.setTableLoading(!1),(I=a==null?void 0:a.column)!=null&&I.some(Q=>Q==null?void 0:Q.isMainKey)||(It.value=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value)),It.value=Ta(It.value),Ao.value&&(a==null?void 0:a.buttonName)!=="删除"&&Ft.setRefreshCurStructure(!0)},bp=async a=>{var s,l,c;const i=await p.getInsofDataApi({id:a});return(c=(l=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:l[0])==null?void 0:c.value},To=async(a,i)=>{var c,d,b;if(Za.value||typeof(a==null?void 0:a.index)=="string")return;const s=await bp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await Te.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(v=>v.contents),name:l,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(vn.setActiveMenuPath(null),vn.setActiveMenuPath(i))},Io=a=>{It.value=Ta(a),Ft.setItemData(It.value),Ft.setOriginalData(It.value)},kp=async a=>{var i;await e.nextTick(),(i=cp.value)!=null&&i.isRouter?Jo.setRouterPageStructure(a):Jo.setRouterPageStructure([])},xp=async a=>{var d,b,v,h,w,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((S,M)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-2>M&&(i=i===""?i+S:i+"/"+S)}),(b=a==null?void 0:a.split("/"))==null||b.forEach((S,M)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-1>M&&(s=s===""?s+S:s+"/"+S)}),i=i+"/",s=s+"/";let l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(v=l==null?void 0:l.data)==null?void 0:v.result)==null?void 0:h.length)>0||((E=(w=c==null?void 0:c.data)==null?void 0:w.result)==null?void 0:E.length)>0},wp=e.ref(),Ln=e.ref(null),Dp=a=>{var w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We;const i=(E=(w=ao.value)==null?void 0:w[a])==null?void 0:E.filter(De=>{var A;return((A=De==null?void 0:De.key)==null?void 0:A.type)==="extend"});if((i==null?void 0:i.length)===0)return Ln.value=null;wp.value=i;const s=(M=(S=i==null?void 0:i.find(De=>{var A,oe,ne;return(ne=(oe=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:oe.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:S.value)==null?void 0:M.tableData;if(!s)return Ln.value=null;const l=(Ee=(W=(O=i==null?void 0:i.find(De=>{var A,oe,ne;return(ne=(oe=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:oe.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:O.key)==null?void 0:W.relatedInfo)==null?void 0:Ee.compId,c=(Y=It.value)==null?void 0:Y.find(De=>(De==null?void 0:De.id)===l);if(!c)return Ln.value=null;const d=(pe=s==null?void 0:s.任务关键词)==null?void 0:pe[(($=s==null?void 0:s.任务关键词)==null?void 0:$.length)-1],b=(x=(P=(C=c==null?void 0:c.compData)==null?void 0:C.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:P.contents)==null?void 0:x.findIndex(De=>(De==null?void 0:De.prop)===d),v=(Le=(Q=(I=(T=c==null?void 0:c.compData)==null?void 0:T.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:I.contents)==null?void 0:Q.find(De=>De==null?void 0:De.isMainKey))==null?void 0:Le.prop,h=(We=(ze=(tt=c==null?void 0:c.compData)==null?void 0:tt.find(De=>(De==null?void 0:De.key)==="tableContents"))==null?void 0:ze.contents)==null?void 0:We[b];Ln.value={prop:d,value:h,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:v},console.log("getPageExtendData:",s,i)},Cp=()=>{var a,i;console.log("倒计时结束时"),Te.ElMessageBox.alert(`超时未提交,【${(i=(a=Rt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=()=>{var a,i,s,l;try{if(sp.value!=="报告中心"||!((a=Rt.value)!=null&&a.includes(co.value)))return;const c=(i=It.value)==null?void 0:i.find(h=>{var w;return((w=h==null?void 0:h.comp)==null?void 0:w.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},b=(l=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,v=b==null?void 0:b.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));v!=null&&v.value&&(v==null?void 0:v.value)!==(d==null?void 0:d.value)&&Ft.setLockingPage(Rt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},Bo=e.ref([]),Ep=e.computed(()=>{var a,i;return(i=(a=ao.value)==null?void 0:a[Rt.value])==null?void 0:i.filter(s=>{var l;return((l=s==null?void 0:s.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Rt.value,lp.value],async a=>{var d,b,v,h,w,E,S,M;if(!Rt.value)return;Ft.setLockingPage(""),It.value=[];let i=e.getCurrentInstance();(d=i==null?void 0:i.scope)==null||d.stop(),i=null,oo.value=!1,Za.value=!0;const s=(b=a==null?void 0:a[0])!=null&&b.startsWith("/")?(v=a==null?void 0:a[0])==null?void 0:v.substring(1):a==null?void 0:a[0];let l=new WeakMap;(w=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ip.value})).data.result)==null?void 0:h.filter(O=>{var W,Ee;return((W=O==null?void 0:O.key)==null?void 0:W.pageKey)!=="menu"&&((Ee=O==null?void 0:O.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||w.forEach(O=>{l[O.key.pageKey]?l[O.key.pageKey]=[...l[O.key.pageKey],O]:l[O.key.pageKey]=[O]}),Eo.value=l,s?(vn.setContentLoading(!0),sessionStorage.setItem("pageKey",Rt.value),It.value=await Te.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value,l),await Zn.setLogRecordAsync({type:"查询",data:It.value},Rt.value),It.value=Ta(It.value),await kp(It.value),Fl(),Dp(s),Bo.value=(E=It.value)==null?void 0:E.map(O=>({label:O==null?void 0:O.name,value:O==null?void 0:O.id})),Ft.setExtraContents([]),bn.setSelectTitle([]),bn.setSelectIndex(""),bn.setSelectMenu(""),Ft.setItemData(It.value),Ft.setOriginalData(It.value),Ft.setCurStructureCompIds((S=It.value)==null?void 0:S.map(O=>O==null?void 0:O.id)),Ft.setRefreshCurStructure(!1),bn.setSelectTitle((M=Rt.value)==null?void 0:M.split("/").map(O=>({value:O.trim()}))),vn.setChildMenu(""),vn.setContentLoading(!1),Ft.setTableLoading(!1),Za.value=!1):(It.value=[],Za.value=!1),e.nextTick(()=>{Ea.value=Ea.value++,oo.value=!0})},{immediate:!0});e.watch(()=>Xo.value,async()=>{if(Xo.value){let a=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value);It.value=Ta(a),Ft.setFreshContent(!1),Fl()}},{deep:!0});const _p=async()=>{var c,d,b,v,h,w,E,S;vn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Ha.value)==null?void 0:c.account)||((d=Ha.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=Ha.value)==null?void 0:b.account)||((v=Ha.value)==null?void 0:v.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(w=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:w.map(M=>M==null?void 0:M.id);const l=(S=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:S.map(M=>M==null?void 0:M.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(M=>M!==null&&M))&&(await p.batchDeleteInsofDataApi({ids:s}),await Zn.setLogRecordAsync({type:"删除",data:s},Rt.value)),vn.setActiveMenuPath(rp.value),It.value=null,Ft.setRouteToChildPath(""),vn.setChildMenu("")},Sp=a=>new RegExp("button","i").test(a),Tp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),$l=a=>{if(Tp(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&vn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},jl=a=>{var i;Ln.value&&(Ln.value={...Ln.value,mainKeyPropValue:a==null?void 0:a[(i=Ln.value)==null?void 0:i.mainKeyProp]})},Ip=a=>{Ll.value=a},ra=e.reactive({index:0,comp:null}),Bp=e.computed(()=>{var a;return(a=It.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:Ap(i,s)}))}),Ul=(a,i)=>{var h,w,E,S,M;const s=i?a:a-2,l=(h=It.value)==null?void 0:h[s],c=(E=(w=l==null?void 0:l.compData)==null?void 0:w.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(O=>(O==null?void 0:O.isMainKey)&&(O==null?void 0:O.label)!=="操作"),b=d===-1?0:d,v=(M=(S=l==null?void 0:l.compData)==null?void 0:S.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:M.contents;return{valid:v==null?void 0:v.every(O=>O==null?void 0:O[b+1]),length:(v==null?void 0:v.length)||0}},Ap=(a,i)=>{var l;let s="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Ul(i,!0);ra.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Kl=a=>{var s,l,c,d,b;const i=a+1;if(i>1&&((c=(l=(s=It.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:v}=Ul(i);v?(ra.index=i,ra.comp=(d=It.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ra.index=i,ra.comp=(b=It.value)==null?void 0:b[a]},Ao=e.computed(()=>{var a,i;return(i=(a=Rl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>Ao.value,a=>{a&&Kl(0)},{immediate:!0});const Np={class:"layout"},Vp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:i}){const s=i,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const w=(E=c==null?void 0:c.value)==null?void 0:E.find(S=>{const{key:M}=S;return M==="baseConfig"});return w==null?void 0:w.contents}),b=e.computed(()=>{var E;const w=(E=c==null?void 0:c.value)==null?void 0:E.find(S=>{const{key:M}=S;return M==="children"});return w==null?void 0:w.contents}),v=e.computed(()=>{let w=p.cloneDeep(b.value)||[];const E=w.length;let S=0;const M=[];if(w=w.map(O=>{const W=O.span;return W?(O.span=Number(W),S=S+O.span):M.push(O),O}),S<24){const O=Math.floor((24-S)/E);M.forEach(W=>{W.span=O})}return w}),h=w=>{s("rowClick",w)};return(w,E)=>{var O;const S=e.resolveComponent("el-col"),M=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Np,[e.createVNode(M,{style:e.normalizeStyle({height:(O=d.value)==null?void 0:O.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(W,Ee)=>(e.openBlock(),e.createBlock(S,{span:W==null?void 0:W.span},{default:e.withCtx(()=>{var Y;return[e.unref(oo)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_o)(W.comp)),{key:e.unref(Ea),compName:W.name,index:(W==null?void 0:W.id)??Ee,height:(Y=d.value)==null?void 0:Y.height,itemData:W==null?void 0:W.compData,childItemData:W==null?void 0:W.itemChildData,onChange:e.unref(So),onContentChange:e.unref(To),onPageChange:e.unref(Io),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Op=Lt._export_sfc(Vp,[["__scopeId","data-v-ab9a36ed"]]),Mp={class:"layout-operate"},Pp={class:"layout-module"},zp={class:"collapse-title-item"},Rp={class:"collapse-title"},Lp={class:"icon-content"},Fp=["onClick"],$p={class:"comp-child"},jp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i;e.onMounted(()=>{Ee()});const c=e.ref({}),d=e.ref({}),b=e.ref([]),v=x=>[{label:"高度",prop:"height",type:"input",value:x==null?void 0:x.height}],h=x=>{d.value=x,l("change",P(),!0)},w=e.ref([]),E=e.ref([]),S=x=>[{label:"占比",prop:"span",type:"input",value:x==null?void 0:x.span}],M=e.computed(()=>{const x=s==null?void 0:s.itemContents;return p.cloneDeep(x)}),O=e.computed(()=>{const x=M==null?void 0:M.value,T=x==null?void 0:x.find(I=>{const{key:Q}=I;return Q==="baseConfig"});return T==null?void 0:T.contents}),W=e.computed(()=>{const x=M==null?void 0:M.value,T=x==null?void 0:x.find(I=>{const{key:Q}=I;return Q==="children"});return T==null?void 0:T.contents}),Ee=()=>{var x;c.value=M.value||{},w.value=(W==null?void 0:W.value)||[],b.value=v(),b.value=(x=b.value)==null?void 0:x.map(T=>{var Q;const{prop:I}=T;return T.value=(Q=O.value)==null?void 0:Q[I],T})};e.watch(()=>{var x;return(x=W==null?void 0:W.value)==null?void 0:x.length},()=>{var x;w.value=(W==null?void 0:W.value)||[],E.value=(x=W.value)==null?void 0:x.map(T=>S(T))},{immediate:!0});const Y=(x,T)=>{const I=p.cloneDeep(W==null?void 0:W.value);I[T].span=x.span,w.value=I,l("change",P(),!0)},$=x=>sa(x),pe=(x,T,I)=>{if(!x)return;const Q=p.cloneDeep(W==null?void 0:W.value);Q[I]&&(Q[I].compData=x,w.value=Q,l("change",P(),!0))},C=x=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let T=p.cloneDeep(W==null?void 0:W.value);T=T==null?void 0:T.filter((I,Q)=>x!==Q),w.value=T,l("change",P(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},P=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:w==null?void 0:w.value}]});return(x,T)=>{const I=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Mp,[e.createElementVNode("div",Pp,[T[1]||(T[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:T[0]||(T[0]=Q=>h(Q))},null,8,["rowContents"])])]),e.createVNode(_l.default,{class:"collapse-content",collapseContents:W.value},{title:e.withCtx(({item:Q,index:Le})=>[e.createElementVNode("div",zp,[e.createElementVNode("div",Rp,e.toDisplayString(Q.name),1),e.createElementVNode("div",Lp,[e.createElementVNode("div",{onClick:e.withModifiers(tt=>C(Le),["stop"]),class:"icon-content"},[e.createVNode(I,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Fp)])])]),content:e.withCtx(({item:Q,index:Le})=>[e.createElementVNode("div",$p,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:E.value[Le],key:Le,isEnableWrap:!0,onChange:tt=>Y(tt,Le)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(Q.comp+"Operate")),{itemContents:Q==null?void 0:Q.compData,originalItemContents:Q.compData,onChange:tt=>pe(tt,Q,Le)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Up=Lt._export_sfc(jp,[["__scopeId","data-v-ba05456e"]]),Kp=typeof window<"u";var el;Kp&&((el=window==null?void 0:window.navigator)!=null&&el.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function hn(a){return a==null}function Wl(){}const Wp=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(Wp)));function Hp(){const a=new Map;return{on(i,s){const l=a.get(i);l!=null&&l.add(s)||a.set(i,new Set([s]))},off(i,s){const l=a.get(i);l&&l.delete(s)},clear(i){const s=a.get(i);s&&s.clear()},clearAll(){a.clear()},emit(i,...s){const l=a.get(i);l&&l.forEach(c=>{c(...s)})}}}function tl(a,i=16){if(typeof a!="function")return Wl;const s=(...d)=>{a(...d)};if(i<=0)return Hl(s);let l=0,c;return function(...d){const b=Date.now(),v=b-l;clearTimeout(c),v>=i?(l=b,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-v))}}function qp(a,i=100){if(typeof a!="function")return Wl;const s=(...c)=>{a(...c)};if(i<=0)return Hl(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function Hl(a){if(typeof a!="function")return a;let i=!1,s,l;return function(...c){return s=c,i||(i=!0,l=Promise.resolve().then(()=>(i=!1,l=void 0,a(...s)))),l}}const wa=new Set,ql=new WeakMap;function Gp(){wa.forEach(a=>{a(...ql.get(a))}),wa.clear()}function sn(a,...i){if(typeof a!="function")return a;ql.set(a,i),!wa.has(a)&&(wa.add(a),wa.size===1&&Promise.resolve().then(Gp))}const Gl=Symbol("LAYOUT_KEY"),Xl=Symbol("EMITTER_KEY");function Xp(a){let i=0,s;for(let l=0,c=a.length;l<c;l++)s=a[l].y+a[l].h,s>i&&(i=s);return i}function ko(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=Yp(a[s]);return i}function Yp(a){return{...a}}function Yl(a,i){return!(a===i||a.x+a.w<=i.x||a.x>=i.x+i.w||a.y+a.h<=i.y||a.y>=i.y+i.h)}function aa(a,i,s){const l=Zl(a),c=Ql(a),d=Array(a.length);for(let b=0,v=c.length;b<v;b++){let h=c[b];h.static||(h=Jp(l,h,i,s),l.push(h)),d[a.findIndex(w=>w.i===h.i)]=h,h.moved=!1}return d}function Jp(a,i,s,l){if(s)for(;i.y>0&&!Da(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!Da(a,i);)i.y--}let c;for(;c=Da(a,i);)i.y=c.y+c.h;return i}function Zp(a,i){const s=Zl(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>i.cols&&(d.x=i.cols-d.w),d.x<0&&(d.x=0,d.w=i.cols),!d.static)s.push(d);else for(;Da(s,d);)d.y++}return a}function nl(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function Da(a,i){for(let s=0,l=a.length;s<l;s++)if(Yl(a[s],i))return a[s]}function Jl(a,i){return a.filter(s=>Yl(s,i))}function Zl(a){return a.filter(i=>i.static)}function xo(a,i,s,l,c=!1,d=!1){if(i.static)return a;const b=i.x,v=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let w=Ql(a);h&&(w=w.reverse());const E=Jl(w,i);if(d&&E.length)return i.x=b,i.y=v,i.moved=!1,a;for(let S=0,M=E.length;S<M;S++){const O=E[S];O.moved||i.y>O.y&&i.y-O.y>O.h/4||(O.static?a=al(a,O,i,c):a=al(a,i,O,c))}return a}function al(a,i,s,l){if(l){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(i.y-s.h,0),!Da(a,c))return xo(a,s,void 0,c.y,!1)}return xo(a,s,void 0,s.y+1,!1)}function Qp(a,i,s,l){const c="translate3d("+i+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function ed(a,i,s,l){const c="translate3d("+i*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function td(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function nd(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function Ql(a){return Array.from(a).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function ad(a,i){i=i||"Layout";const s=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(i+" must be an array!");for(let c=0,d=a.length;c<d;c++){const b=a[c];for(let v=0;v<s.length;v++)if(typeof b[s[v]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[v]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(l.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(l.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function od(a,i="vgl"){const s=()=>`${i}-${a}`;return{b:s,be:l=>`${s()}__${l}`,bm:l=>`${s()}--${l}`,bem:(l,c)=>`${s()}__${l}--${c}`}}function ol(a){return ld(a)}function ld(a){var i;const s=((i=a.target)==null?void 0:i.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=a.clientX+s.scrollLeft-l.left,d=a.clientY+s.scrollTop-l.top;return{x:c,y:d}}function ll(a,i,s,l){return rd(a)?{deltaX:s-a,deltaY:l-i,lastX:a,lastY:i,x:s,y:l}:{deltaX:0,deltaY:0,lastX:s,lastY:l,x:s,y:l}}function rd(a){return typeof a=="number"&&!Number.isNaN(a)}function id(a,i){const s=tr(a);let l=s[0];for(let c=1,d=s.length;c<d;c++){const b=s[c];i>a[b]&&(l=b)}return l}function er(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function sd(a,i,s,l,c,d,b){if(i[l])return ko(i[l]);let v=a;const h=tr(s),w=h.slice(h.indexOf(l));for(let E=0,S=w.length;E<S;E++){const M=w[E];if(i[M]){v=i[M];break}}return v=ko(v||[]),aa(Zp(v,{cols:d}),b)}function tr(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let cd="auto";function ud(){return typeof document<"u"}function rl(){return ud()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):cd}var ka={exports:{}},pd=ka.exports,il;function dd(){return il||(il=1,function(a,i){(function(s,l){a.exports=l()})(pd,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function b(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,Ee(r.key),r)}}function v(n,t,o){return t&&b(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=Ee(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function w(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&S(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function S(n,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},S(n,t)}function M(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function O(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(f)}(this,o)}}function W(){return W=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,g){for(;!Object.prototype.hasOwnProperty.call(f,g)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},W.apply(this,arguments)}function Ee(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var Y=function(n){return!(!n||!n.Window)&&n instanceof n.Window},$=void 0,pe=void 0;function C(n){$=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),pe=n}function P(n){return Y(n)?n:(n.ownerDocument||n).defaultView||pe.window}typeof window<"u"&&window&&C(window);var x=function(n){return!!n&&c(n)==="object"},T=function(n){return typeof n=="function"},I={window:function(n){return n===pe||Y(n)},docFrag:function(n){return x(n)&&n.nodeType===11},object:x,func:T,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 t=P(n)||pe;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return x(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return x(n)&&n.length!==void 0&&T(n.splice)}};function Q(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Le(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var tt={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=tt.draggable,t.map.drag=tt,t.methodDict.drag="draggable",r.actions.drag=tt.defaults},listeners:{"interactions:before-action-move":Q,"interactions:action-resume":Q,"interactions:action-move":Le,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return I.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):I.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:Q,move:Le,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},ze=tt,We={init:function(n){var t=n;We.document=t.document,We.DocumentFragment=t.DocumentFragment||De,We.SVGElement=t.SVGElement||De,We.SVGSVGElement=t.SVGSVGElement||De,We.SVGElementInstance=t.SVGElementInstance||De,We.Element=t.Element||De,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||De,We.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function De(){}var A=We,oe={init:function(n){var t=A.Element,o=n.navigator||{};oe.supportsTouch="ontouchstart"in n||I.func(n.DocumentTouch)&&A.document instanceof n.DocumentTouch,oe.supportsPointerEvent=o.pointerEnabled!==!1&&!!A.PointerEvent,oe.isIOS=/iP(hone|od|ad)/.test(o.platform),oe.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),oe.isIe9=/MSIE 9/.test(o.userAgent),oe.isOperaMobile=o.appName==="Opera"&&oe.supportsTouch&&/Presto/.test(o.userAgent),oe.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",oe.pEventTypes=oe.supportsPointerEvent?A.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,oe.wheelEvent=A.document&&"onmousewheel"in A.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ne=oe;function me(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Xe(n,t){for(;I.element(n);){if(Pe(n,t))return n;n=nt(n)}return null}function nt(n){var t=n.parentNode;if(I.docFrag(t)){for(;(t=t.host)&&I.docFrag(t););return t}return t}function Pe(n,t){return pe!==$&&(t=t.replace(/\/deep\//g," ")),n[ne.prefixedMatchesSelector](t)}var j=function(n){return n.parentNode||n.host};function Qe(n,t){for(var o,r=[],u=n;(o=j(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function Ke(n,t,o){for(;I.element(n);){if(Pe(n,t))return!0;if((n=nt(n))===o)return Pe(n,t)}return!1}function vt(n){return n.correspondingUseElement||n}function yt(n){var t=n instanceof A.SVGElement?n.getBoundingClientRect():n.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function ct(n){var t,o=yt(n);if(!ne.isIOS7&&o){var r={x:(t=(t=P(n))||pe).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function at(n){for(var t=[];n;)t.push(n),n=nt(n);return t}function St(n){return!!I.string(n)&&(A.document.querySelector(n),!0)}function ge(n,t){for(var o in t)n[o]=t[o];return n}function be(n,t,o){return n==="parent"?nt(o):n==="self"?t.getRect(o):Xe(o,n)}function Ye(n,t,o,r){var u=n;return I.string(u)?u=be(u,t,o):I.func(u)&&(u=u.apply(void 0,r)),I.element(u)&&(u=ct(u)),u}function Ae(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function se(n){return!n||"x"in n&&"y"in n||((n=ge({},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 te(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function ce(n,t,o){var r=o&&n.options[o];return Ae(Ye(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Be(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(_){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},I.string(n)&&n.search(" ")!==-1&&(n=Je(n)),I.array(n))return n.forEach(function(_){return Be(_,t,o,r)}),r;if(I.object(n)&&(t=n,n=""),I.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(I.array(t))for(var u=0,f=t;u<f.length;u++){var g=f[u];Be(n,g,o,r)}else if(I.object(t))for(var m in t)Be(Je(m).map(function(_){return"".concat(n).concat(_)}),t[m],o,r);return r}function Je(n){return n.trim().split(/ +/)}var ut=function(n,t){return Math.sqrt(n*n+t*t)},k=["webkit","moz"];function V(n,t){n.__set||(n.__set={});var o=function(u){if(k.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function U(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function y(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function D(n){return n instanceof A.Event||n instanceof A.Touch}function q(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function X(n,t){return t=t||{x:0,y:0},ne.isOperaMobile&&D(n)?(q("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):q("page",n,t),t}function G(n){return I.number(n.pointerId)?n.pointerId:n.identifier}function J(n,t,o){var r=t.length>1?K(t):t[0];X(r,n.page),function(u,f){f=f||{},ne.isOperaMobile&&D(u)?q("screen",u,f):q("client",u,f)}(r,n.client),n.timeStamp=o}function de(n){var t=[];return I.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function K(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function _e(n){if(!n.length)return null;var t=de(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function ke(n,t){var o=t+"X",r=t+"Y",u=de(n),f=u[0][o]-u[1][o],g=u[0][r]-u[1][r];return ut(f,g)}function ae(n,t){var o=t+"X",r=t+"Y",u=de(n),f=u[1][o]-u[0][o],g=u[1][r]-u[0][r];return 180*Math.atan2(g,f)/Math.PI}function H(n){return I.string(n.pointerType)?n.pointerType:I.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof A.Touch?"touch":"mouse"}function le(n){var t=I.func(n.composedPath)?n.composedPath():n.path;return[vt(t?t[0]:n.target),vt(n.currentTarget)]}var Fe=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Fe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var ye=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ge=function(n){return ye([],n)},z=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},he=function(n,t){return n[z(n,t)]},Ne=function(n){w(o,n);var t=O(o);function o(r,u,f){var g;d(this,o),(g=t.call(this,u._interaction)).dropzone=void 0,g.dragEvent=void 0,g.relatedTarget=void 0,g.draggable=void 0,g.propagationStopped=!1,g.immediatePropagationStopped=!1;var m=f==="dragleave"?r.prev:r.cur,_=m.element,F=m.dropzone;return g.type=f,g.target=_,g.currentTarget=_,g.dropzone=F,g.dragEvent=u,g.relatedTarget=u.target,g.draggable=u.interactable,g.timeStamp=u.timeStamp,g}return v(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,g=z(f,function(_){var F=_.dropzone,N=_.element;return F===r.dropzone&&N===r.target});u.activeDrops.splice(g,1);var m=new o(u,this.dragEvent,"dropdeactivate");m.dropzone=this.dropzone,m.target=this.target,this.dropzone.fire(m)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(Fe);function He(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,g=u.element;t.dropzone=f,t.target=g,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Re(n,t){for(var o=function(f,g){for(var m=[],_=0,F=f.interactables.list;_<F.length;_++){var N=F[_];if(N.options.drop.enabled){var ee=N.options.drop.accept;if(!(I.element(ee)&&ee!==g||I.string(ee)&&!Pe(g,ee)||I.func(ee)&&!ee({dropzone:N,draggableElement:g})))for(var xe=0,je=N.getAllElements();xe<je.length;xe++){var $e=je[xe];$e!==g&&m.push({dropzone:N,element:$e,rect:N.getRect($e)})}}}return m}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function re(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,g=[],m=0,_=r.activeDrops;m<_.length;m++){var F=_[m],N=F.dropzone,ee=F.element,xe=F.rect,je=N.dropCheck(t,o,u,f,ee,xe);g.push(je?ee:null)}var $e=function(qe){for(var rt,ot,pt,Ct=[],At=0;At<qe.length;At++){var mt=qe[At],_t=qe[rt];if(mt&&At!==rt)if(_t){var rn=j(mt),Kt=j(_t);if(rn!==mt.ownerDocument)if(Kt!==mt.ownerDocument)if(rn!==Kt){Ct=Ct.length?Ct:Qe(_t);var fn=void 0;if(_t instanceof A.HTMLElement&&mt instanceof A.SVGElement&&!(mt instanceof A.SVGSVGElement)){if(mt===Kt)continue;fn=mt.ownerSVGElement}else fn=mt;for(var Cn=Qe(fn,_t.ownerDocument),Pn=0;Cn[Pn]&&Cn[Pn]===Ct[Pn];)Pn++;var Wa=[Cn[Pn-1],Cn[Pn],Ct[Pn]];if(Wa[0])for(var ma=Wa[0].lastChild;ma;){if(ma===Wa[1]){rt=At,Ct=Cn;break}if(ma===Wa[2])break;ma=ma.previousSibling}}else pt=_t,(parseInt(P(ot=mt).getComputedStyle(ot).zIndex,10)||0)>=(parseInt(P(pt).getComputedStyle(pt).zIndex,10)||0)&&(rt=At);else rt=At}else rt=At}return rt}(g);return r.activeDrops[$e]||null}function fe(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new Ne(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new Ne(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new Ne(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new Ne(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new Ne(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new Ne(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function Se(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&He(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function B(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Re(t,o.element));var g=r,m=re(o,g,u);f.rejected=f.rejected&&!!m&&m.dropzone===f.cur.dropzone&&m.element===f.cur.element,f.cur.dropzone=m&&m.dropzone,f.cur.element=m&&m.element,f.events=fe(o,0,g)}}var Ie={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(ze),r.prototype.dropzone=function(f){return function(g,m){if(I.object(m)){if(g.options.drop.enabled=m.enabled!==!1,m.listeners){var _=Be(m.listeners),F=Object.keys(_).reduce(function(ee,xe){return ee[/^(enter|leave)/.test(xe)?"drag".concat(xe):/^(activate|deactivate|move)/.test(xe)?"drop".concat(xe):xe]=_[xe],ee},{}),N=g.options.drop.listeners;N&&g.off(N),g.on(F),g.options.drop.listeners=F}return I.func(m.ondrop)&&g.on("drop",m.ondrop),I.func(m.ondropactivate)&&g.on("dropactivate",m.ondropactivate),I.func(m.ondropdeactivate)&&g.on("dropdeactivate",m.ondropdeactivate),I.func(m.ondragenter)&&g.on("dragenter",m.ondragenter),I.func(m.ondragleave)&&g.on("dragleave",m.ondragleave),I.func(m.ondropmove)&&g.on("dropmove",m.ondropmove),/^(pointer|center)$/.test(m.overlap)?g.options.drop.overlap=m.overlap:I.number(m.overlap)&&(g.options.drop.overlap=Math.max(Math.min(1,m.overlap),0)),"accept"in m&&(g.options.drop.accept=m.accept),"checker"in m&&(g.options.drop.checker=m.checker),g}return I.bool(m)?(g.options.drop.enabled=m,g):g.options.drop}(this,f)},r.prototype.dropCheck=function(f,g,m,_,F,N){return function(ee,xe,je,$e,qe,rt,ot){var pt=!1;if(!(ot=ot||ee.getRect(rt)))return!!ee.options.drop.checker&&ee.options.drop.checker(xe,je,pt,ee,rt,$e,qe);var Ct=ee.options.drop.overlap;if(Ct==="pointer"){var At=ce($e,qe,"drag"),mt=X(xe);mt.x+=At.x,mt.y+=At.y;var _t=mt.x>ot.left&&mt.x<ot.right,rn=mt.y>ot.top&&mt.y<ot.bottom;pt=_t&&rn}var Kt=$e.getRect(qe);if(Kt&&Ct==="center"){var fn=Kt.left+Kt.width/2,Cn=Kt.top+Kt.height/2;pt=fn>=ot.left&&fn<=ot.right&&Cn>=ot.top&&Cn<=ot.bottom}return Kt&&I.number(Ct)&&(pt=Math.max(0,Math.min(ot.right,Kt.right)-Math.max(ot.left,Kt.left))*Math.max(0,Math.min(ot.bottom,Kt.bottom)-Math.max(ot.top,Kt.top))/(Kt.width*Kt.height)>=Ct),ee.options.drop.checker&&(pt=ee.options.drop.checker(xe,je,pt,ee,rt,$e,qe)),pt}(this,f,g,m,_,F,N)},o.dynamicDrop=function(f){return I.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},ge(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ie.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Re(t,o.element),u.events=fe(o,0,r),u.events.activate&&(He(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":B,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;Se(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;B(n,t),Se(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:Re,getDrop:re,getDropEvents:fe,fireDropEvents:Se,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Me=Ie;function we(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(F){return F.pointer}),f=r==="start",g=r==="end",m=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ke(u,m),o.box=_e(u),o.scale=1,o.ds=0,o.angle=ae(u,m),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(g||t.pointers.length<2){var _=t.prevEvent;o.distance=_.distance,o.box=_.box,o.scale=_.scale,o.ds=0,o.angle=_.angle,o.da=0}else o.distance=ke(u,m),o.box=_e(u),o.scale=o.distance/t.gesture.startDistance,o.angle=ae(u,m),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,I.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var R={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return I.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):I.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=R,t.methodDict.gesture="gesturable",r.actions.gesture=R.defaults},listeners:{"interactions:action-start":we,"interactions:action-move":we,"interactions:action-end":we,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},L=R;function ie(n,t,o,r,u,f,g){if(!t)return!1;if(t===!0){var m=I.number(f.width)?f.width:f.right-f.left,_=I.number(f.height)?f.height:f.bottom-f.top;if(g=Math.min(g,Math.abs((n==="left"||n==="right"?m:_)/2)),m<0&&(n==="left"?n="right":n==="right"&&(n="left")),_<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var F=m>=0?f.left:f.right;return o.x<F+g}if(n==="top"){var N=_>=0?f.top:f.bottom;return o.y<N+g}if(n==="right")return o.x>(m>=0?f.right:f.left)-g;if(n==="bottom")return o.y>(_>=0?f.bottom:f.top)-g}return!!I.element(r)&&(I.element(t)?t===r:Ke(r,t,u))}function Ve(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var ue,ve,Ze={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ze.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ze.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(g,m,_){return I.object(m)?(g.options.resize.enabled=m.enabled!==!1,g.setPerAction("resize",m),g.setOnEvents("resize",m),I.string(m.axis)&&/^x$|^y$|^xy$/.test(m.axis)?g.options.resize.axis=m.axis:m.axis===null&&(g.options.resize.axis=_.defaults.actions.resize.axis),I.bool(m.preserveAspectRatio)?g.options.resize.preserveAspectRatio=m.preserveAspectRatio:I.bool(m.square)&&(g.options.resize.square=m.square),g):I.bool(m)?(g.options.resize.enabled=m,g):g.options.resize}(this,f,n)},t.map.resize=Ze,t.methodDict.resize="resizable",u.actions.resize=Ze.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:ge({},f),corrected:ge({},f),previous:ge({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),Ve(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,g=f==="reposition"||f==="negate",m=r.rect,_=r._rects,F=_.start,N=_.corrected,ee=_.delta,xe=_.previous;if(ge(xe,N),g){if(ge(N,m),f==="reposition"){if(N.top>N.bottom){var je=N.top;N.top=N.bottom,N.bottom=je}if(N.left>N.right){var $e=N.left;N.left=N.right,N.right=$e}}}else N.top=Math.min(m.top,F.bottom),N.bottom=Math.max(m.bottom,F.top),N.left=Math.min(m.left,F.right),N.right=Math.max(m.right,F.left);for(var qe in N.width=N.right-N.left,N.height=N.bottom-N.top,N)ee[qe]=N[qe]-xe[qe];u.edges=r.prepared.edges,u.rect=N,u.deltaRect=ee}})(n),Ve(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var g=ge({},t.coords.cur.page),m=o.options.resize;if(m&&m.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&m.mouseButtons)!=0)){if(I.object(m.edges)){var _={left:!1,right:!1,top:!1,bottom:!1};for(var F in _)_[F]=ie(F,m.edges[F],g,t._latestPointer.eventTarget,r,u,m.margin||Ze.defaultMargin);_.left=_.left&&!_.right,_.top=_.top&&!_.bottom,(_.left||_.right||_.top||_.bottom)&&(n.action={name:"resize",edges:_})}else{var N=m.axis!=="y"&&g.x>u.right-Ze.defaultMargin,ee=m.axis!=="x"&&g.y>u.bottom-Ze.defaultMargin;(N||ee)&&(n.action={name:"resize",axes:(N?"x":"")+(ee?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=Ze.cursors,f=null;if(o)f=u[r+o];else if(t){for(var g="",m=0,_=["top","bottom","left","right"];m<_.length;m++){var F=_[m];t[F]&&(g+=F)}f=u[g]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Oe=Ze,et={id:"actions",install:function(n){n.usePlugin(L),n.usePlugin(Oe),n.usePlugin(ze),n.usePlugin(Me)}},Z=0,Ue={request:function(n){return ue(n)},cancel:function(n){return ve(n)},init:function(n){if(ue=n.requestAnimationFrame,ve=n.cancelAnimationFrame,!ue)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];ue=n["".concat(r,"RequestAnimationFrame")],ve=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}ue=ue&&ue.bind(n),ve=ve&&ve.bind(n),ue||(ue=function(u){var f=Date.now(),g=Math.max(0,16-(f-Z)),m=n.setTimeout(function(){u(f+g)},g);return Z=f+g,m},ve=function(u){return clearTimeout(u)})}},Ce={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){Ce.isScrolling=!0,Ue.cancel(Ce.i),n.autoScroll=Ce,Ce.interaction=n,Ce.prevTime=Ce.now(),Ce.i=Ue.request(Ce.scroll)},stop:function(){Ce.isScrolling=!1,Ce.interaction&&(Ce.interaction.autoScroll=null),Ue.cancel(Ce.i)},scroll:function(){var n=Ce.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=lt(u.container,t,o),g=Ce.now(),m=(g-Ce.prevTime)/1e3,_=u.speed*m;if(_>=1){var F={x:Ce.x*_,y:Ce.y*_};if(F.x||F.y){var N=it(f);I.window(f)?f.scrollBy(F.x,F.y):f&&(f.scrollLeft+=F.x,f.scrollTop+=F.y);var ee=it(f),xe={x:ee.x-N.x,y:ee.y-N.y};(xe.x||xe.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:xe,interaction:n,container:f})}Ce.prevTime=g}Ce.isScrolling&&(Ue.cancel(Ce.i),Ce.i=Ue.request(Ce.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&Ce.check(t.interactable,t.prepared.name))if(t.simulation)Ce.x=Ce.y=0;else{var r,u,f,g,m=t.interactable,_=t.element,F=t.prepared.name,N=m.options[F].autoScroll,ee=lt(N.container,m,_);if(I.window(ee))g=o.clientX<Ce.margin,r=o.clientY<Ce.margin,u=o.clientX>ee.innerWidth-Ce.margin,f=o.clientY>ee.innerHeight-Ce.margin;else{var xe=yt(ee);g=o.clientX<xe.left+Ce.margin,r=o.clientY<xe.top+Ce.margin,u=o.clientX>xe.right-Ce.margin,f=o.clientY>xe.bottom-Ce.margin}Ce.x=u?1:g?-1:0,Ce.y=f?1:r?-1:0,Ce.isScrolling||(Ce.margin=N.margin,Ce.speed=N.speed,Ce.start(t))}}};function lt(n,t,o){return(I.string(n)?be(n,t,o):n)||P(o)}function it(n){return I.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var bt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Ce,Ce.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Ce.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Ce.stop(),Ce.interaction&&(Ce.interaction=null)},"interactions:stop":Ce.stop,"interactions:action-move":function(n){return Ce.onInteractionMove(n)}}},kt=bt;function st(n,t){var o=!1;return function(){return o||(pe.console.warn(t),o=!0),n.apply(this,arguments)}}function dt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function xt(n){return I.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Tt(n){return I.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var gt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var g=function(m,_,F,N,ee){var xe=m.getRect(N),je=_.buttons||{0:1,1:4,3:8,4:16}[_.button],$e={action:null,interactable:m,interaction:F,element:N,rect:xe,buttons:je};return ee.fire("auto-start:check",$e),$e.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,g,this,f,u):g},t.prototype.ignoreFrom=st(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=st(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Tt,t.prototype.styleCursor=xt}};function wt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&Pt(t,o,n,u)?n:null}function $t(n,t,o,r,u,f,g){for(var m=0,_=r.length;m<_;m++){var F=r[m],N=u[m],ee=F.getAction(t,o,n,N);if(ee){var xe=wt(ee,F,N,f,g);if(xe)return{action:xe,interactable:F,element:N}}}return{action:null,interactable:null,element:null}}function ft(n,t,o,r,u){var f=[],g=[],m=r;function _(N){f.push(N),g.push(m)}for(;I.element(m);){f=[],g=[],u.interactables.forEachMatch(m,_);var F=$t(n,t,o,f,g,r,u);if(F.action&&!F.interactable.options[F.action.name].manualStart)return F;m=nt(m)}return{action:null,interactable:null,element:null}}function Wt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,dt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,nn(n,o),o.fire("autoStart:prepared",{interaction:n})}function Pt(n,t,o,r){var u=n.options,f=u[o.name].max,g=u[o.name].maxPerElement,m=r.autoStart.maxInteractions,_=0,F=0,N=0;if(!(f&&g&&m))return!1;for(var ee=0,xe=r.interactions.list;ee<xe.length;ee++){var je=xe[ee],$e=je.prepared.name;if(je.interacting()&&(++_>=m||je.interactable===n&&((F+=$e===o.name?1:0)>=f||je.element===t&&(N++,$e===o.name&&N>=g))))return!1}return m>0}function Yt(n,t){return I.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function cn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function nn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var g=o.options[u.name].cursorChecker;f=I.func(g)?g(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}cn(n.element,f||"",t)}else t.autoStart.cursorElement&&cn(t.autoStart.cursorElement,"",t)}var _n={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(gt),o.base.actionChecker=null,o.base.styleCursor=!0,ge(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return Yt(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Pt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Wt(o,ft(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,g=o.event,m=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Wt(u,ft(u,f,g,m,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,g=u.prepared.name;g&&f&&(f.options[g].manualStart||!Pt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),nn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&cn(o.element,"",t)}},maxInteractions:Yt,withinInteractionLimit:Pt,validateAction:wt},gn=_n,Sn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var g=Math.abs(u),m=Math.abs(f),_=o.interactable.options.drag,F=_.startAxis,N=g>m?"x":g<m?"y":"xy";if(o.prepared.axis=_.lockAxis==="start"?N[0]:_.lockAxis,N!=="xy"&&F!=="xy"&&F!==N){o.prepared.name=null;for(var ee=r,xe=function($e){if($e!==o.interactable){var qe=o.interactable.options.drag;if(!qe.manualStart&&$e.testIgnoreAllow(qe,ee,r)){var rt=$e.getAction(o.downPointer,o.downEvent,o,ee);if(rt&&rt.name==="drag"&&function(ot,pt){if(!pt)return!1;var Ct=pt.options.drag.startAxis;return ot==="xy"||Ct==="xy"||Ct===ot}(N,$e)&&gn.validateAction(rt,$e,ee,r,t))return $e}}};I.element(ee);){var je=t.interactables.forEachMatch(ee,xe);if(je){o.prepared.name="drag",o.interactable=je,o.element=ee;break}ee=nt(ee)}}}}}};function mn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var Tn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(gn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=mn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;mn(t)>0&&(t.prepared.name=null)}},getHoldDuration:mn},In=Tn,Bn={id:"auto-start",install:function(n){n.usePlugin(gn),n.usePlugin(In),n.usePlugin(Sn)}},An=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):I.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function an(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Dt={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=An,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var g=r.options.preventDefault;if(g!=="never")if(g!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var m=P(f.target).document,_=u.getDocOptions(m);if(!_||!_.events||_.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||I.element(f.target)&&Pe(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||me(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=an,n},{})};function Qt(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function ht(n){var t={};for(var o in n){var r=n[o];I.plainObject(r)?t[o]=ht(r):I.array(r)?t[o]=Ge(r):t[o]=r}return t}var Kn=function(){function n(t){d(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=Ot(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,g=this.interaction,m=function(F){var N=F.interactable.options[F.prepared.name],ee=N.modifiers;return ee&&ee.length?ee:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(xe){var je=N[xe];return je&&je.enabled&&{options:je,methods:je._methods}}).filter(function(xe){return!!xe})}(g);this.prepareStates(m),this.startEdges=ge({},g.edges),this.edges=ge({},this.startEdges),this.startOffset=(r=g.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var _=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=Ot(),this.startAll(_),this.result=this.setAll(_)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,g=t.edges;t.coords=ge({},t.pageCoords),t.rect=ge({},f),t.edges=ge({},g);for(var m=u?this.states.slice(u):this.states,_=Ot(t.coords,t.rect),F=0;F<m.length;F++){var N,ee=m[F],xe=ee.options,je=ge({},t.coords),$e=null;(N=ee.methods)!=null&&N.set&&this.shouldDo(xe,r,o)&&(t.state=ee,$e=ee.methods.set(t),te(t.edges,t.rect,{x:t.coords.x-je.x,y:t.coords.y-je.y})),_.eventProps.push($e)}ge(this.edges,t.edges),_.delta.x=t.coords.x-t.pageCoords.x,_.delta.y=t.coords.y-t.pageCoords.y,_.rectDelta.left=t.rect.left-f.left,_.rectDelta.right=t.rect.right-f.right,_.rectDelta.top=t.rect.top-f.top,_.rectDelta.bottom=t.rect.bottom-f.bottom;var qe=this.result.coords,rt=this.result.rect;if(qe&&rt){var ot=_.rect.left!==rt.left||_.rect.right!==rt.right||_.rect.top!==rt.top||_.rect.bottom!==rt.bottom;_.changed=ot||qe.x!==_.coords.x||qe.y!==_.coords.y}return _}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,g=this.result,m=this.startDelta,_=g.delta;r==="start"&&ge(this.startDelta,g.delta);for(var F=0,N=[[f,m],[u,_]];F<N.length;F++){var ee=N[F],xe=ee[0],je=ee[1];xe.page.x+=je.x,xe.page.y+=je.y,xe.client.x+=je.x,xe.client.y+=je.y}var $e=this.result.rectDelta,qe=t.rect||o.rect;qe.left+=$e.left,qe.right+=$e.right,qe.top+=$e.top,qe.bottom+=$e.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,g=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=g,!g.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var m=o.coords.cur.page,_={x:t.modifiedCoords.x-m.x,y:t.modifiedCoords.y-m.y};g.coords.x+=_.x,g.coords.y+=_.y,g.delta.x+=_.x,g.delta.y+=_.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,g=0;g<u.length;g++){var m=u[g];t.state=m;var _=m.options,F=m.methods,N=F.beforeEnd&&F.beforeEnd(t);if(N)return this.endResult=N,!1;f=f||!f&&this.shouldDo(_,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=ge({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var g=f[u];r.state=g,g.methods.stop&&g.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,g=r.name;this.states.push({options:u,methods:f,index:o,name:g})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var g=f.startDelta,m=f.result,_=m.delta,F=m.rectDelta,N=0,ee=[[r.start,g],[r.cur,_]];N<ee.length;N++){var xe=ee[N],je=xe[0],$e=xe[1];je.page.x-=$e.x,je.page.y-=$e.y,je.client.x-=$e.x,je.client.y-=$e.y}u.left-=F.left,u.right-=F.right,u.top-=F.top,u.bottom-=F.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return ht(o)}),this.result=Ot(ge({},t.result.coords),ge({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function Ot(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Jt(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var g=f||{};for(var m in g.enabled=g.enabled!==!1,o)m in g||(g[m]=o[m]);var _={options:g,methods:r,name:t,enable:function(){return g.enabled=!0,_},disable:function(){return g.enabled=!1,_}};return _};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function dn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var un={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new Kn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":dn,"interactions:action-move":dn,"interactions:action-end":dn,"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)}}},kn=un,on={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},On=function(n){w(o,n);var t=O(o);function o(r,u,f,g,m,_,F){var N;d(this,o),(N=t.call(this,r)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,m=m||r.element;var ee=r.interactable,xe=(ee&&ee.options||on).deltaSource,je=ce(ee,m,f),$e=g==="start",qe=g==="end",rt=$e?M(N):r.prevEvent,ot=$e?r.coords.start:qe?{page:rt.page,client:rt.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return N.page=ge({},ot.page),N.client=ge({},ot.client),N.rect=ge({},r.rect),N.timeStamp=ot.timeStamp,qe||(N.page.x-=je.x,N.page.y-=je.y,N.client.x-=je.x,N.client.y-=je.y),N.ctrlKey=u.ctrlKey,N.altKey=u.altKey,N.shiftKey=u.shiftKey,N.metaKey=u.metaKey,N.button=u.button,N.buttons=u.buttons,N.target=m,N.currentTarget=m,N.preEnd=_,N.type=F||f+(g||""),N.interactable=ee,N.t0=$e?r.pointers[r.pointers.length-1].downTime:rt.t0,N.x0=r.coords.start.page.x-je.x,N.y0=r.coords.start.page.y-je.y,N.clientX0=r.coords.start.client.x-je.x,N.clientY0=r.coords.start.client.y-je.y,N.delta=$e||qe?{x:0,y:0}:{x:N[xe].x-rt[xe].x,y:N[xe].y-rt[xe].y},N.dt=r.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=ge({},r.coords.velocity[xe]),N.speed=ut(N.velocity.x,N.velocity.y),N.swipe=qe||g==="inertiastart"?N.getSwipe():null,N}return v(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,g=202.5<=u&&u<337.5;return{up:g,down:!g&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(Fe);Object.defineProperties(On.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 xn=v(function n(t,o,r,u,f){d(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=r,this.downTime=u,this.downTarget=f}),Ia=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),ca=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Ba=0,Aa=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=st(function(N){this.move(N)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ba++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var g=function(N){Object.defineProperty(o._proxy,N,{get:function(){return f[N]}})};for(var m in Ia)g(m);var _=function(N){Object.defineProperty(o._proxy,N,{value:function(){return f[N].apply(f,arguments)}})};for(var F in ca)_(F);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(dt(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?ge({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,g=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ut(u,f)>this.pointerMoveTolerance);var m,_,F,N=this.getPointerIndex(t),ee={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:g,interaction:this};g||(m=this.coords.velocity,_=this.coords.delta,F=Math.max(_.timeStamp/1e3,.001),m.page.x=_.page.x/F,m.page.y=_.page.y/F,m.client.x=_.client.x/F,m.client.y=_.client.y/F,m.timeStamp=F),this._scopeFire("interactions:move",ee),g||this.simulation||(this.interacting()&&(ee.type=null,this.move(ee)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||y(this.coords.delta),(t=ge({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var g=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:g,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=G(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:z(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,g,m,_=G(t),F=this.getPointerIndex(t),N=this.pointers[F];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new xn(_,t,o,null,null),F=this.pointers.length,this.pointers.push(N)),J(this.coords.cur,this.pointers.map(function(ee){return ee.pointer}),this._now()),f=this.coords.delta,g=this.coords.prev,m=this.coords.cur,f.page.x=m.page.x-g.page.x,f.page.y=m.page.y-g.page.y,f.client.x=m.client.x-g.client.x,f.client.y=m.client.y-g.client.y,f.timeStamp=m.timeStamp-g.timeStamp,u&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=r,V(this.downPointer,t),this.interacting()||(U(this.coords.start,this.coords.cur),U(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:N,pointerIndex:F,interaction:this}),F}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new On(this,t,this.prepared.name,o,this.element,r,u)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,r=t.phase,u=t.preEnd,f=t.type,g=this.rect;if(g&&r==="move"&&(te(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var m=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=m),this._fireEvent(m),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function ua(n){pa(n.interaction)}function pa(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return ea(n.coords.cur,t),ea(n.coords.delta,t),te(n.edges,n.rect,t),t.x=0,t.y=0,!0}function Na(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function ea(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}ca.offsetBy="";var Va={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=Na},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(ea(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":ua,"interactions:before-action-move":ua,"interactions:before-action-end":function(n){var t=n.interaction;if(pa(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},da=Va,Oa=function(){function n(t){d(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return v(n,[{key:"start",value:function(t){var o=this.interaction,r=Wn(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=ut(u.x,u.y),g=this.modification||(this.modification=new Kn(o));if(g.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=g.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,r=Wn(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var g=this.modification,m=this.modifierArg;m.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(m),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Ue.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,g,m,_=this,F=this.interaction,N=Wn(F).resistance,ee=(F._now()-this.t0)/1e3;if(ee<this.te){var xe,je=1-(Math.exp(-N*ee)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,g=this.modifiedOffset.y,xe={x:fa(m=je,t,r,f),y:fa(m,o,u,g)}):xe={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var $e={x:xe.x-this.currentOffset.x,y:xe.y-this.currentOffset.y};this.currentOffset.x+=$e.x,this.currentOffset.y+=$e.y,F.offsetBy($e),F.move(),this.onNextFrame(function(){return _.inertiaTick()})}else F.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=Wn(o).smoothEndDuration;if(r<u){var f={x:ha(r,0,this.targetOffset.x,u),y:ha(r,0,this.targetOffset.y,u)},g={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=g.x,this.currentOffset.y+=g.y,o.offsetBy(g),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),U(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ue.cancel(this.timeout)}}]),n}();function Wn(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ma={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(da),n.usePlugin(kn),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Oa(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;I.element(u);){if(u===t.element){r.resume(n);break}u=nt(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":dn,"interactions:action-inertiastart":dn,"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 fa(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function ha(n,t,o,r){return-o*(n/=r)*(n-2)+t}var Pa=Ma;function ta(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var zt=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ge({},t||{})}return v(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&ta(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&ta(t,o)}},{key:"on",value:function(t,o){var r=Be(t,o);for(t in r)this.types[t]=ye(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Be(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,g=r[t];f<g.length;f++){var m=g[f],_=u.indexOf(m);_!==-1&&u.splice(_,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Ht=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,V(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function en(n){return I.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Et(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Mt={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:g,remove:m,addDelegate:function(N,ee,xe,je,$e){var qe=en($e);if(!r[xe]){r[xe]=[];for(var rt=0;rt<u.length;rt++){var ot=u[rt];g(ot,xe,_),g(ot,xe,F,!0)}}var pt=r[xe],Ct=he(pt,function(At){return At.selector===N&&At.context===ee});Ct||(Ct={selector:N,context:ee,listeners:[]},pt.push(Ct)),Ct.listeners.push({func:je,options:qe})},removeDelegate:function(N,ee,xe,je,$e){var qe,rt=en($e),ot=r[xe],pt=!1;if(ot)for(qe=ot.length-1;qe>=0;qe--){var Ct=ot[qe];if(Ct.selector===N&&Ct.context===ee){for(var At=Ct.listeners,mt=At.length-1;mt>=0;mt--){var _t=At[mt];if(_t.func===je&&Et(_t.options,rt)){At.splice(mt,1),At.length||(ot.splice(qe,1),m(ee,xe,_),m(ee,xe,F,!0)),pt=!0;break}}if(pt)break}}},delegateListener:_,delegateUseCapture:F,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function g(N,ee,xe,je){if(N.addEventListener){var $e=en(je),qe=he(o,function(rt){return rt.eventTarget===N});qe||(qe={eventTarget:N,events:{}},o.push(qe)),qe.events[ee]||(qe.events[ee]=[]),he(qe.events[ee],function(rt){return rt.func===xe&&Et(rt.options,$e)})||(N.addEventListener(ee,xe,f.supportsOptions?$e:$e.capture),qe.events[ee].push({func:xe,options:$e}))}}function m(N,ee,xe,je){if(N.addEventListener&&N.removeEventListener){var $e=z(o,function(rn){return rn.eventTarget===N}),qe=o[$e];if(qe&&qe.events)if(ee!=="all"){var rt=!1,ot=qe.events[ee];if(ot){if(xe==="all"){for(var pt=ot.length-1;pt>=0;pt--){var Ct=ot[pt];m(N,ee,Ct.func,Ct.options)}return}for(var At=en(je),mt=0;mt<ot.length;mt++){var _t=ot[mt];if(_t.func===xe&&Et(_t.options,At)){N.removeEventListener(ee,xe,f.supportsOptions?At:At.capture),ot.splice(mt,1),ot.length===0&&(delete qe.events[ee],rt=!0);break}}}rt&&!Object.keys(qe.events).length&&o.splice($e,1)}else for(ee in qe.events)qe.events.hasOwnProperty(ee)&&m(N,ee,"all")}}function _(N,ee){for(var xe=en(ee),je=new Ht(N),$e=r[N.type],qe=le(N)[0],rt=qe;I.element(rt);){for(var ot=0;ot<$e.length;ot++){var pt=$e[ot],Ct=pt.selector,At=pt.context;if(Pe(rt,Ct)&&me(At,qe)&&me(At,rt)){var mt=pt.listeners;je.currentTarget=rt;for(var _t=0;_t<mt.length;_t++){var rn=mt[_t];Et(rn.options,xe)&&rn.func(je)}}}rt=nt(rt)}}function F(N){return _(N,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},jt={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=jt.methodOrder;t<o.length;t++){var r=o[t],u=jt[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,g=u.interactions.list;f<g.length;f++){var m=g[f],_=r;if(m.simulation&&m.simulation.allowResume&&m.pointerType===t)for(;_;){if(_===m.element)return m;_=nt(_)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var g=0,m=f.interactions.list;g<m.length;g++){var _=m[g];if(_.pointerType===r){if(_.simulation&&!qt(_,o))continue;if(_.interacting())return _;t||(t=_)}}if(t)return t;for(var F=0,N=f.interactions.list;F<N.length;F++){var ee=N[F];if(!(ee.pointerType!==r||/down/i.test(u)&&ee.simulation))return ee}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(qt(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function qt(n,t){return n.pointers.some(function(o){return o.id===t})}var Ut=jt,ln=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function pn(n,t){return function(o){var r=t.interactions.list,u=H(o),f=le(o),g=f[0],m=f[1],_=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var F=0,N=o.changedTouches;F<N.length;F++){var ee=N[F],xe={pointer:ee,pointerId:G(ee),pointerType:u,eventType:o.type,eventTarget:g,curEventTarget:m,scope:t},je=$n(xe);_.push([xe.pointer,xe.eventTarget,xe.curEventTarget,je])}}else{var $e=!1;if(!ne.supportsPointerEvent&&/mouse/.test(o.type)){for(var qe=0;qe<r.length&&!$e;qe++)$e=r[qe].pointerType!=="mouse"&&r[qe].pointerIsDown;$e=$e||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!$e){var rt={pointer:o,pointerId:G(o),pointerType:u,eventType:o.type,curEventTarget:m,eventTarget:g,scope:t},ot=$n(rt);_.push([rt.pointer,rt.eventTarget,rt.curEventTarget,ot])}}for(var pt=0;pt<_.length;pt++){var Ct=_[pt],At=Ct[0],mt=Ct[1],_t=Ct[2];Ct[3][n](At,o,mt,_t)}}}function $n(n){var t=n.pointerType,o=n.scope,r={interaction:Ut.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function Mn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,g=r.events,m=g[t];for(var _ in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),g.delegatedEvents)m(o,_,g.delegateListener),m(o,_,g.delegateUseCapture,!0);for(var F=u&&u.events,N=0;N<f.length;N++){var ee=f[N];m(o,ee.type,ee.listener,F)}}var za={id:"core/interactions",install:function(n){for(var t={},o=0;o<ln.length;o++){var r=ln[o];t[r]=pn(r,n)}var u,f=ne.pEventTypes;function g(){for(var m=0,_=n.interactions.list;m<_.length;m++){var F=_[m];if(F.pointerIsDown&&F.pointerType==="touch"&&!F._interacting)for(var N=function(){var je=xe[ee];n.documents.some(function($e){return me($e.doc,je.downTarget)})||F.removePointer(je.pointer,je.event)},ee=0,xe=F.pointers;ee<xe.length;ee++)N()}}(u=A.PointerEvent?[{type:f.down,listener:g},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:g},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(m){for(var _=0,F=n.interactions.list;_<F.length;_++)F[_].documentBlur(m)}}),n.prevTouchTime=0,n.Interaction=function(m){w(F,m);var _=O(F);function F(){return d(this,F),_.apply(this,arguments)}return v(F,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(N){n.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return n.now()}}]),F}(Aa),n.interactions={list:[],new:function(m){m.scopeFire=function(F,N){return n.fire(F,N)};var _=new n.Interaction(m);return n.interactions.list.push(_),_},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(Dt)},listeners:{"scope:add-document":function(n){return Mn(n,"add")},"scope:remove-document":function(n){return Mn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:Mn,doOnInteractions:pn,methodNames:ln},Ra=za,wn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(wn||{}),La=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new zt,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||r,this._win=P(St(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return I.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),I.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),I.func(o.onend)&&this.on("".concat(t,"end"),o.onend),I.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,g=(u=this._actions.map[t])==null?void 0:u.filterEventType,m=function(_){return(g==null||g(_))&&Qt(_,f._actions)};(I.array(o)||I.object(o))&&this._onOff(wn.Off,t,o,void 0,m),(I.array(r)||I.object(r))&&this._onOff(wn.On,t,r,void 0,m)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,g=this.options[t],m=o[f];f==="listeners"&&this.updatePerActionListeners(t,g.listeners,m),I.array(m)?g[f]=Ge(m):I.plainObject(m)?(g[f]=ge(g[f]||{},ht(m)),I.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(g[f].enabled=m.enabled!==!1)):I.bool(m)&&I.object(r.perAction[f])?g[f].enabled=m:g[f]=m}}},{key:"getRect",value:function(t){return t=t||(I.element(this.target)?this.target:null),I.string(this.target)&&(t=t||this._context.querySelector(this.target)),ct(t)}},{key:"rectChecker",value:function(t){var o=this;return I.func(t)?(this.getRect=function(r){var u=ge({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(St(o)||I.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return I.string(t)?Array.from(this._context.querySelectorAll(t)):I.func(t)&&t.getAllElements?t.getAllElements():I.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||me(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!I.element(r)&&(I.string(t)?Ke(r,t,o):!!I.element(t)&&me(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!I.element(r))&&(I.string(t)?Ke(r,t,o):!!I.element(t)&&me(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){I.object(o)&&!I.array(o)&&(u=r,r=null);var g=Be(o,r,f);for(var m in g){m==="wheel"&&(m=ne.wheelEvent);for(var _=0,F=g[m];_<F.length;_++){var N=F[_];Qt(m,this._actions)?this.events[t===wn.On?"on":"off"](m,N):I.string(this.target)?this._scopeEvents[t===wn.On?"addDelegate":"removeDelegate"](this.target,this._context,m,N,u):this._scopeEvents[t===wn.On?"add":"remove"](this.target,m,N,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(wn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(wn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in I.object(t)||(t={}),this.options=ht(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,ge(ge({},o.perAction),o.actions[u])),this[f](t[u])}for(var g in t)g!=="getRect"?I.func(this[g])&&this[g](t[g]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(I.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,g=u.context,m=u.listeners;f===this.target&&g===this._context&&o.splice(r,1);for(var _=m.length-1;_>=0;_--)this._scopeEvents.removeDelegate(this.target,this._context,t,m[_][0],m[_][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),Fa=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,g=I.string(f)?o.selectorMap[f]:f[o.scope.id],m=z(g,function(_){return _===u});g.splice(m,1)}})}return v(n,[{key:"new",value:function(t,o){o=ge(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),I.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=I.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return he(f,function(g){return g._context===r&&(u||g.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],g=void 0;if((I.string(f.target)?I.element(t)&&Pe(t,f.target):t===f.target)&&f.inContext(t)&&(g=o(f)),g!==void 0)return g}}}]),n}(),na=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ne,this.defaults=ht(on),this.Eventable=zt,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(g,m){var _=r.interactables.getExisting(g,m);return _||((_=r.interactables.new(g,m)).events.global=f.globalEvents),_};return u.getPointerAverage=K,u.getTouchBBox=_e,u.getTouchDistance=ke,u.getTouchAngle=ae,u.getElementRect=ct,u.getElementClientRect=yt,u.matchesSelector=Pe,u.closest=Xe,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,g){return this.scope.usePlugin(f,g),this},u.isSet=function(f,g){return!!this.scope.interactables.get(f,g&&g.context)},u.on=st(function(f,g,m){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var _=0,F=f;_<F.length;_++){var N=F[_];this.on(N,g,m)}return this}if(I.object(f)){for(var ee in f)this.on(ee,f[ee],g);return this}return Qt(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(g):this.globalEvents[f]=[g]:this.scope.events.add(this.scope.document,f,g,{options:m}),this},"The interact.on() method is being deprecated"),u.off=st(function(f,g,m){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var _=0,F=f;_<F.length;_++){var N=F[_];this.off(N,g,m)}return this}if(I.object(f)){for(var ee in f)this.off(ee,f[ee],g);return this}var xe;return Qt(f,this.scope.actions)?f in this.globalEvents&&(xe=this.globalEvents[f].indexOf(g))!==-1&&this.globalEvents[f].splice(xe,1):this.scope.events.remove(this.scope.document,f,g,m),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ne.supportsTouch},u.supportsPointerEvent=function(){return ne.supportsPointerEvent},u.stop=function(){for(var f=0,g=this.scope.interactions.list;f<g.length;f++)g[f].stop();return this},u.pointerMoveTolerance=function(f){return I.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,g){this.scope.addDocument(f,g)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=On,this.Interactable=void 0,this.interactables=new Fa(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){w(f,r);var u=O(f);function f(){return d(this,f),u.apply(this,arguments)}return v(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(g){return W(E(f.prototype),"set",this).call(this,g),o.fire("interactable:set",{options:g,interactable:this}),this}},{key:"unset",value:function(){W(E(f.prototype),"unset",this).call(this);var g=o.interactables.list.indexOf(this);g<0||(o.interactables.list.splice(g,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(La)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,I.window(r)&&C(r),A.init(r),ne.init(r),Ue.init(r),o.window=r,o.document=r.document,o.usePlugin(Ra),o.usePlugin(Mt),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var r=0,u=this.listenerMaps.length,f=t.before.reduce(function(m,_){return m[_]=!0,m[Dn(_)]=!0,m},{});r<u;r++){var g=this.listenerMaps[r].id;if(g&&(f[g]||f[Dn(g)]))break}this.listenerMaps.splice(r,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var r=P(t);o=o?ge({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=P(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function Dn(n){return n&&n.replace(/\/.*$/,"")}var Hn=new na,Zt=Hn.interactStatic,yn=typeof globalThis<"u"?globalThis:window;Hn.init(yn);var $a=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,g=n.limits,m=g===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:g,_=n.offset,F=_===void 0?{x:0,y:0}:_,N={range:f,grid:n,x:null,y:null},ee=0;ee<t.length;ee++){var xe=t[ee],je=xe[0],$e=xe[1],qe=Math.round((r-F.x)/n[je]),rt=Math.round((u-F.y)/n[$e]);N[je]=Math.max(m.left,Math.min(m.right,qe*n[je]+F.x)),N[$e]=Math.max(m.top,Math.min(m.bottom,rt*n[$e]+F.y))}return N};return o.grid=n,o.coordFields=t,o}}),jn={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=ge(t.snappers||{},$a),t.createSnapGrid=t.snappers.grid}},dr=jn,fr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,g=f.ratio,m=f.enabled,_=t.options,F=_.equalDelta,N=_.modifiers;g==="preserve"&&(g=o.width/o.height),t.startCoords=ge({},u),t.startRect=ge({},o),t.ratio=g,t.equalDelta=F;var ee=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var xe=(ee.left?1:-1)*(ee.top?1:-1);t.edgeSign={x:xe,y:xe}}else t.edgeSign={x:ee.left?-1:1,y:ee.top?-1:1};if(m!==!1&&ge(r,ee),N!=null&&N.length){var je=new Kn(n.interaction);je.copyFrom(n.interaction.modification),je.prepareStates(N),t.subModification=je,je.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=ge({},r),g=t.equalDelta?hr:vr;if(ge(n.edges,u),g(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var m=ge({},o);te(u,m,{x:r.x-f.x,y:r.y-f.y});var _=t.subModification.setAll(l(l({},n),{},{rect:m,edges:u,pageCoords:r,prevCoords:r,prevRect:m})),F=_.delta;return _.changed&&(g(t,Math.abs(F.x)>Math.abs(F.y),_.coords,_.rect),ge(r,_.coords)),_.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function hr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function vr(n,t,o,r){var u=n.startRect,f=n.startCoords,g=n.ratio,m=n.edgeSign;if(t){var _=r.width/g;o.y=f.y+(_-u.height)*m.y}else{var F=r.height*g;o.x=f.x+(F-u.width)*m.x}}var gr=Jt(fr,"aspectRatio"),Vo=function(){};Vo._defaults={};var ja=Vo;function qn(n,t,o){return I.func(n)?Ye(n,t.interactable,t.element,[o.x,o.y,t]):Ye(n,t.interactable,t.element)}var Ua={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,g=r.options,m=g.elementRect,_=ge({left:0,top:0,right:0,bottom:0},g.offset||{});if(t&&m){var F=qn(g.restriction,u,f);if(F){var N=F.right-F.left-t.width,ee=F.bottom-F.top-t.height;N<0&&(_.left+=N,_.right+=N),ee<0&&(_.top+=ee,_.bottom+=ee)}_.left+=o.left-t.width*m.left,_.top+=o.top-t.height*m.top,_.right+=o.right-t.width*(1-m.right),_.bottom+=o.bottom-t.height*(1-m.bottom)}r.offset=_},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,g=qn(u.restriction,o,t);if(g){var m=function(_){return!_||"left"in _&&"top"in _||((_=ge({},_)).left=_.x||0,_.top=_.y||0,_.right=_.right||_.left+_.width,_.bottom=_.bottom||_.top+_.height),_}(g);t.x=Math.max(Math.min(m.right-f.right,t.x),m.left+f.left),t.y=Math.max(Math.min(m.bottom-f.bottom,t.y),m.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},mr=Jt(Ua,"restrict"),Oo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Mo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Po(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var va={noInner:Oo,noOuter:Mo,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Ae(qn(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,g=u.options;if(o){var m=ge({},t),_=qn(g.inner,r,m)||{},F=qn(g.outer,r,m)||{};Po(_,Oo),Po(F,Mo),o.top?t.y=Math.min(Math.max(F.top+f.top,m.y),_.top+f.top):o.bottom&&(t.y=Math.max(Math.min(F.bottom+f.bottom,m.y),_.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(F.left+f.left,m.x),_.left+f.left):o.right&&(t.x=Math.max(Math.min(F.right+f.right,m.x),_.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yr=Jt(va,"restrictEdges"),br=ge({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ua.defaults),kr=Jt({start:Ua.start,set:Ua.set,defaults:br},"restrictRect"),xr={width:-1/0,height:-1/0},wr={width:1/0,height:1/0},Dr=Jt({start:function(n){return va.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var g=se(qn(f.min,t,n.coords))||xr,m=se(qn(f.max,t,n.coords))||wr;o.options={endOnly:f.endOnly,inner:ge({},va.noInner),outer:ge({},va.noOuter)},u.top?(o.options.inner.top=r.bottom-g.height,o.options.outer.top=r.bottom-m.height):u.bottom&&(o.options.inner.bottom=r.top+g.height,o.options.outer.bottom=r.top+m.height),u.left?(o.options.inner.left=r.right-g.width,o.options.outer.left=r.right-m.width):u.right&&(o.options.inner.right=r.left+g.width,o.options.outer.right=r.left+m.width),va.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),uo={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,g=n.state,m=n.startOffset,_=g.options,F=_.offsetWithOrigin?function(xe){var je=xe.interaction.element,$e=Ae(Ye(xe.state.options.origin,null,null,[je])),qe=$e||ce(xe.interactable,je,xe.interaction.prepared.name);return qe}(n):{x:0,y:0};if(_.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=Ye(_.offset,r,u,[o]);(t=Ae(N)||{x:0,y:0}).x+=F.x,t.y+=F.y}var ee=_.relativePoints;g.offsets=f&&ee&&ee.length?ee.map(function(xe,je){return{index:je,relativePoint:xe,x:m.left-f.width*xe.x+t.x,y:m.top-f.height*xe.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,g=ce(t.interactable,t.element,t.prepared.name),m=ge({},o),_=[];u.offsetWithOrigin||(m.x-=g.x,m.y-=g.y);for(var F=0,N=f;F<N.length;F++)for(var ee=N[F],xe=m.x-ee.x,je=m.y-ee.y,$e=0,qe=u.targets.length;$e<qe;$e++){var rt=u.targets[$e],ot=void 0;(ot=I.func(rt)?rt(xe,je,t._proxy,ee,$e):rt)&&_.push({x:(I.number(ot.x)?ot.x:xe)+ee.x,y:(I.number(ot.y)?ot.y:je)+ee.y,range:I.number(ot.range)?ot.range:u.range,source:rt,index:$e,offset:ee})}for(var pt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ct=0;Ct<_.length;Ct++){var At=_[Ct],mt=At.range,_t=At.x-m.x,rn=At.y-m.y,Kt=ut(_t,rn),fn=Kt<=mt;mt===1/0&&pt.inRange&&pt.range!==1/0&&(fn=!1),pt.target&&!(fn?pt.inRange&&mt!==1/0?Kt/mt<pt.distance/pt.range:mt===1/0&&pt.range!==1/0||Kt<pt.distance:!pt.inRange&&Kt<pt.distance)||(pt.target=At,pt.distance=Kt,pt.range=mt,pt.inRange=fn,pt.delta.x=_t,pt.delta.y=rn)}return pt.inRange&&(o.x=pt.target.x,o.y=pt.target.y),r.closest=pt,pt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cr=Jt(uo,"snap"),Ka={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],uo.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,g={x:r.x-f[0].x,y:r.y-f[0].y};o.options=ge({},u),o.options.targets=[];for(var m=0,_=u.targets||[];m<_.length;m++){var F=_[m],N=void 0;if(N=I.func(F)?F(g.x,g.y,t):F){for(var ee=0,xe=o.targetFields;ee<xe.length;ee++){var je=xe[ee],$e=je[0],qe=je[1];if($e in N||qe in N){N.x=N[$e],N.y=N[qe];break}}o.options.targets.push(N)}}var rt=uo.set(n);return o.options=u,rt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Er=Jt(Ka,"snapSize"),po={aspectRatio:gr,restrictEdges:yr,restrict:mr,restrictRect:kr,restrictSize:Dr,snapEdges:Jt({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Ka.start(n)):null},set:Ka.set,defaults:ge(ht(Ka.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cr,snapSize:Er,spring:ja,avoid:ja,transform:ja,rubberband:ja},_r={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(kn),n.usePlugin(dr),t.modifiers=po,po){var r=po[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Sr=_r,zo=function(n){w(o,n);var t=O(o);function o(r,u,f,g,m,_){var F;if(d(this,o),V(M(F=t.call(this,m)),f),f!==u&&V(M(F),u),F.timeStamp=_,F.originalEvent=f,F.type=r,F.pointerId=G(u),F.pointerType=H(u),F.target=g,F.currentTarget=null,r==="tap"){var N=m.getPointerIndex(u);F.dt=F.timeStamp-m.pointers[N].downTime;var ee=F.timeStamp-m.tapTime;F.double=!!m.prevTap&&m.prevTap.type!=="doubletap"&&m.prevTap.target===F.target&&ee<500}else r==="doubletap"&&(F.dt=u.timeStamp-m.tapTime,F.double=!0);return F}return v(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(Fe),ga={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ga,n.defaults.actions.pointerEvents=ga.defaults,ge(n.actions.phaselessTypes,ga.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&fo(n),Un({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,g=o.event,m=o.eventTarget,_=o.pointerIndex,F=u.pointers[_].hold,N=at(m),ee={interaction:u,pointer:f,event:g,eventTarget:m,type:"hold",targets:[],path:N,node:null},xe=0;xe<N.length;xe++){var je=N[xe];ee.node=je,r.fire("pointerEvents:collect-targets",ee)}if(ee.targets.length){for(var $e=1/0,qe=0,rt=ee.targets;qe<rt.length;qe++){var ot=rt[qe].eventable.options.holdDuration;ot<$e&&($e=ot)}F.duration=$e,F.timeout=setTimeout(function(){Un({interaction:u,eventTarget:m,pointer:f,event:g,type:"hold"},r)},$e)}})(n,t),Un(n,t)},"interactions:up":function(n,t){fo(n),Un(n,t),function(o,r){var u=o.interaction,f=o.pointer,g=o.event,m=o.eventTarget;u.pointerWasMoved||Un({interaction:u,eventTarget:m,pointer:f,event:g,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){fo(n),Un(n,t)}},PointerEvent:zo,fire:Un,collectEventTargets:Ro,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 Un(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,g=n.type,m=n.targets,_=m===void 0?Ro(n,t):m,F=new zo(g,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:F});for(var N={interaction:o,pointer:r,event:u,eventTarget:f,targets:_,type:g,pointerEvent:F},ee=0;ee<_.length;ee++){var xe=_[ee];for(var je in xe.props||{})F[je]=xe.props[je];var $e=ce(xe.eventable,xe.node);if(F._subtractOrigin($e),F.eventable=xe.eventable,F.currentTarget=xe.node,xe.eventable.fire(F),F._addOrigin($e),F.immediatePropagationStopped||F.propagationStopped&&ee+1<_.length&&_[ee+1].node!==F.currentTarget)break}if(t.fire("pointerEvents:fired",N),g==="tap"){var qe=F.double?Un({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):F;o.prevTap=qe,o.tapTime=qe.timeStamp}return F}function Ro(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,g=n.type,m=o.getPointerIndex(r),_=o.pointers[m];if(g==="tap"&&(o.pointerWasMoved||!_||_.downTarget!==f))return[];for(var F=at(f),N={interaction:o,pointer:r,event:u,eventTarget:f,type:g,path:F,targets:[],node:null},ee=0;ee<F.length;ee++){var xe=F[ee];N.node=xe,t.fire("pointerEvents:collect-targets",N)}return g==="hold"&&(N.targets=N.targets.filter(function(je){var $e,qe;return je.eventable.options.holdDuration===(($e=o.pointers[m])==null||(qe=$e.hold)==null?void 0:qe.duration)})),N.targets}function fo(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Tr=Object.freeze({__proto__:null,default:ga});function Ir(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Br={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ga);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Ir,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var g=f[0].eventable.options.holdRepeatInterval;g<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},g))}}})},Ar=Br,Nr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return ge(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(g){var m=g.events,_=m.options;m.types[u]&&m.types[u].length&&g.testIgnoreAllow(_,r,f)&&o.push({node:r,eventable:m,props:{interactable:g}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;ge(o.events.options,t.pointerEvents.defaults),ge(o.events.options,r.pointerEvents||{})}}},Vr=Nr,Or={id:"pointer-events",install:function(n){n.usePlugin(Tr),n.usePlugin(Ar),n.usePlugin(Vr)}},Mr=Or,Pr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var g=r.getAllElements(),m=f.window.Promise,_=m?[]:null,F=function(){var ee=g[N],xe=r.getRect(ee);if(!xe)return 1;var je,$e=he(f.interactions.list,function(ot){return ot.interacting()&&ot.interactable===r&&ot.element===ee&&ot.prepared.name===u.name});if($e)$e.move(),_&&(je=$e._reflowPromise||new m(function(ot){$e._reflowResolve=ot}));else{var qe=se(xe),rt=function(ot){return{coords:ot,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:f.now()});je=function(ot,pt,Ct,At,mt){var _t=ot.interactions.new({pointerType:"reflow"}),rn={interaction:_t,event:mt,pointer:mt,eventTarget:Ct,phase:"reflow"};_t.interactable=pt,_t.element=Ct,_t.prevEvent=mt,_t.updatePointer(mt,mt,Ct,!0),y(_t.coords.delta),dt(_t.prepared,At),_t._doPhase(rn);var Kt=ot.window,fn=Kt.Promise,Cn=fn?new fn(function(Pn){_t._reflowResolve=Pn}):void 0;return _t._reflowPromise=Cn,_t.start(At,pt,Ct),_t._interacting?(_t.move(rn),_t.end(mt)):(_t.stop(),_t._reflowResolve()),_t.removePointer(mt,mt),Cn}(f,r,ee,u,rt)}_&&_.push(je)},N=0;N<g.length&&!F();N++);return _&&m.all(_).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},zr=Pr;if(Zt.use(Dt),Zt.use(da),Zt.use(Mr),Zt.use(Pa),Zt.use(Sr),Zt.use(Bn),Zt.use(et),Zt.use(kt),Zt.use(zr),Zt.default=Zt,c(a)==="object"&&a)try{a.exports=Zt}catch{}return Zt.default=Zt,Zt})}(ka,ka.exports)),ka.exports}var fd=dd();const sl=la.getDefaultExportFromCjs(fd),ro=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:i,emit:s}){const l=a,c=s,d=e.inject(Gl),b=e.inject(Xl);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),h=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let w=!1,E=!1,S=NaN,M=NaN,O=NaN,W=NaN,Ee=-1,Y=-1,$=-1,pe=-1,C=l.x,P=l.y,x=l.w,T=l.h;const I=e.ref(),Q=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:I,calcXY:Ye});function Le(D){Be(D)}function tt(){Je()}function ze(D){hn(l.isDraggable)&&(h.draggable=D)}function We(D){hn(l.isResizable)&&(h.resizable=D)}function De(D){hn(l.isBounded)&&(h.bounded=D)}function A(D){h.transformScale=D}function oe(D){h.rowHeight=D}function ne(D){h.maxRows=D}function me(){h.rtl=rl()==="rtl",Je()}function Xe(D){h.cols=Math.floor(D)}d.increaseItem(Q),e.onBeforeMount(()=>{h.rtl=rl()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=er(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,hn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,hn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,hn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{C=l.x,P=l.y,T=l.h,x=l.w,sn(ct)}),b.on("updateWidth",Le),b.on("compact",tt),b.on("setDraggable",ze),b.on("setResizable",We),b.on("setBounded",De),b.on("setTransformScale",A),b.on("setRowHeight",oe),b.on("setMaxRows",ne),b.on("directionchange",me),b.on("setColNum",Xe)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Le),b.off("compact",tt),b.off("setDraggable",ze),b.off("setResizable",We),b.off("setBounded",De),b.off("setTransformScale",A),b.off("setRowHeight",oe),b.off("setMaxRows",ne),b.off("directionchange",me),b.off("setColNum",Xe),v.value&&(v.value.unset(),v.value=null),d.decreaseItem(Q)}),i({state:h,wrapper:I});const nt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Pe=e.computed(()=>h.resizable&&!l.static),j=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),Qe=e.computed(()=>(h.draggable||h.resizable)&&!l.static),Ke=od("item"),vt=e.computed(()=>({[Ke.b()]:!0,[Ke.bm("resizable")]:Pe.value,[Ke.bm("static")]:l.static,[Ke.bm("resizing")]:h.isResizing,[Ke.bm("dragging")]:h.isDragging,[Ke.bm("transform")]:h.useCssTransforms,[Ke.bm("rtl")]:j.value,[Ke.bm("no-touch")]:nt&&Qe.value})),yt=e.computed(()=>[Ke.be("resizer"),j.value&&Ke.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,D=>{h.draggable=D}),e.watch(()=>l.static,()=>{sn(V),sn(y)}),e.watch(()=>h.draggable,()=>{sn(V)}),e.watch(()=>l.isResizable,D=>{h.resizable=D}),e.watch(()=>l.isBounded,D=>{h.bounded=D}),e.watch(()=>h.resizable,()=>{sn(y)}),e.watch(()=>h.rowHeight,()=>{sn(ct),sn(at)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{sn(y),sn(ct),sn(at)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{sn(y)}),e.watch(j,()=>{sn(y),sn(ct)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const D=d.margin;!D||D[0]===h.margin[0]&&D[1]===h.margin[1]||(h.margin=D.map(Number),sn(ct),sn(at))});function ct(){l.x+l.w>h.cols?(C=0,x=l.w>h.cols?h.cols:l.w):(C=l.x,x=l.w);const D=be(C,P,x,T);h.isDragging&&(D.top=h.dragging.top,j.value?D.right=h.dragging.left:D.left=h.dragging.left),h.isResizing&&(D.width=h.resizing.width,D.height=h.resizing.height);let q;h.useCssTransforms?j.value?q=ed(D.top,D.right,D.width,D.height):q=Qp(D.top,D.left,D.width,D.height):j.value?q=nd(D.top,D.right,D.width,D.height):q=td(D.top,D.left,D.width,D.height),h.style=q}function at(){const D={};for(const q of["width","height"]){const X=h.style[q].match(/^(\d+)px$/);if(!X)return;D[q]=X[1]}c("container-resized",l.i,l.h,l.w,D.height,D.width)}function St(D){if(l.static)return;const q=D.type;if(q==="resizestart"&&h.isResizing||q!=="resizestart"&&!h.isResizing)return;const X=ol(D);if(hn(X))return;const{x:G,y:J}=X,de={width:0,height:0};let K;switch(q){case"resizestart":{y(),Ee=x,Y=T,K=be(C,P,x,T),de.width=K.width,de.height=K.height,h.resizing=de,h.isResizing=!0;break}case"resizemove":{!D.edges.right&&!D.edges.left&&(O=G),!D.edges.top&&!D.edges.bottom&&(W=J);const _e=ll(O,W,G,J);j.value?de.width=h.resizing.width-_e.deltaX/h.transformScale:de.width=h.resizing.width+_e.deltaX/h.transformScale,de.height=h.resizing.height+_e.deltaY/h.transformScale,h.resizing=de;break}case"resizeend":{K=be(C,P,x,T),de.width=K.width,de.height=K.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}K=ce(de.height,de.width),K.w<l.minW&&(K.w=l.minW),K.w>l.maxW&&(K.w=l.maxW),K.h<l.minH&&(K.h=l.minH),K.h>l.maxH&&(K.h=l.maxH),K.h<1&&(K.h=1),K.w<1&&(K.w=1),O=G,W=J,(x!==K.w||T!==K.h)&&c("resize",l.i,K.h,K.w,de.height,de.width),D.type==="resizeend"&&(Ee!==x||Y!==T)&&c("resized",l.i,K.h,K.w,de.height,de.width),b.emit("resizeEvent",D.type,l.i,C,P,K.h,K.w)}function ge(D){if(l.static||h.isResizing)return;const q=D.type;if(q==="dragstart"&&h.isDragging||q!=="dragstart"&&!h.isDragging)return;const X=ol(D);if(hn(X))return;const{x:G,y:J}=X,de=D.target;if(!de.offsetParent)return;const K={top:0,left:0};switch(q){case"dragstart":{$=C,pe=P;const ke=de.offsetParent.getBoundingClientRect(),ae=de.getBoundingClientRect(),H=ae.left/h.transformScale,le=ke.left/h.transformScale,Fe=ae.right/h.transformScale,ye=ke.right/h.transformScale,Ge=ae.top/h.transformScale,z=ke.top/h.transformScale;j.value?K.left=(Fe-ye)*-1:K.left=H-le,K.top=Ge-z,h.dragging=K,h.isDragging=!0;break}case"dragmove":{const ke=ll(S,M,G,J);if(j.value?K.left=h.dragging.left-ke.deltaX/h.transformScale:K.left=h.dragging.left+ke.deltaX/h.transformScale,K.top=h.dragging.top+ke.deltaY/h.transformScale,h.bounded){const ae=de.offsetParent.clientHeight-se(l.h,h.rowHeight,h.margin[1]);K.top=te(K.top,0,ae);const H=Ae(),le=h.containerWidth-se(l.w,H,h.margin[0]);K.left=te(K.left,0,le)}h.dragging=K;break}case"dragend":{const ke=de.offsetParent.getBoundingClientRect(),ae=de.getBoundingClientRect(),H=ae.left/h.transformScale,le=ke.left/h.transformScale,Fe=ae.right/h.transformScale,ye=ke.right/h.transformScale,Ge=ae.top/h.transformScale,z=ke.top/h.transformScale;j.value?K.left=(Fe-ye)*-1:K.left=H-le,K.top=Ge-z,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let _e;j.value,_e=Ye(K.top,K.left),S=G,M=J,(C!==_e.x||P!==_e.y)&&c("move",l.i,_e.x,_e.y),D.type==="dragend"&&($!==C||pe!==P)&&c("moved",l.i,_e.x,_e.y),b.emit("dragEvent",D.type,l.i,_e.x,_e.y,T,x)}function be(D,q,X,G){const J=Ae();let de;return j.value?de={right:Math.round(J*D+(D+1)*h.margin[0]),top:Math.round(h.rowHeight*q+(q+1)*h.margin[1]),width:X===1/0?X:Math.round(J*X+Math.max(0,X-1)*h.margin[0]),height:G===1/0?G:Math.round(h.rowHeight*G+Math.max(0,G-1)*h.margin[1])}:de={left:Math.round(J*D+(D+1)*h.margin[0]),top:Math.round(h.rowHeight*q+(q+1)*h.margin[1]),width:X===1/0?X:Math.round(J*X+Math.max(0,X-1)*h.margin[0]),height:G===1/0?G:Math.round(h.rowHeight*G+Math.max(0,G-1)*h.margin[1])},de}function Ye(D,q){const X=Ae();let G=Math.round((q-h.margin[0])/(X+h.margin[0])),J=Math.round((D-h.margin[1])/(h.rowHeight+h.margin[1]));return G=Math.max(Math.min(G,h.cols-x),0),J=Math.max(Math.min(J,h.maxRows-T),0),{x:G,y:J}}function Ae(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function se(D,q,X){return Number.isFinite(D)?Math.round(q*D+Math.max(0,D-1)*X):D}function te(D,q,X){return Math.max(Math.min(D,X),q)}function ce(D,q,X=!1){const G=Ae();let J=Math.round((q+h.margin[0])/(G+h.margin[0])),de=0;return X?de=Math.ceil((D+h.margin[1])/(h.rowHeight+h.margin[1])):de=Math.round((D+h.margin[1])/(h.rowHeight+h.margin[1])),J=Math.max(Math.min(J,h.cols-C),0),de=Math.max(Math.min(de,h.maxRows-P),0),{w:J,h:de}}function Be(D,q){h.containerWidth=D}function Je(){ct()}function ut(){!v.value&&I.value&&(v.value=sl(I.value),h.useStyleCursor||v.value.styleCursor(!1))}const k=tl(ge);function V(){if(ut(),!!v.value)if(h.draggable&&!l.static){const D={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};v.value.draggable(D),w||(w=!0,v.value.on("dragstart dragmove dragend",q=>{q.type==="dragmove"?k(q):ge(q)}))}else v.value.draggable({enabled:!1})}const U=tl(St);function y(){if(ut(),!!v.value)if(h.resizable&&!l.static){const D=be(0,0,l.maxW,l.maxH),q=be(0,0,l.minW,l.minH),X={edges:{left:j.value?`.${yt.value[0]}`:!1,right:j.value?!1:`.${yt.value[0]}`,bottom:`.${yt.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:q.height*h.transformScale,width:q.width*h.transformScale},max:{height:D.height*h.transformScale,width:D.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(X.modifiers=[sl.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(X),E||(E=!0,v.value.on("resizestart resizemove resizeend",G=>{G.type==="resizemove"?U(G):St(G)}))}else v.value.resizable({enabled:!1})}return(D,q)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:I,class:e.normalizeClass(vt.value),style:e.normalizeStyle(h.style)},[e.renderSlot(D.$slots,"default"),Pe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(yt.value)},null,2)):e.createCommentVNode("",!0)],6))}}),Qn=typeof window<"u";var cl;Qn&&(cl=window==null?void 0:window.navigator)!=null&&cl.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ul(a){return a!=null}function pl(){}const hd=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(hd)));const vd=Qn&&("ontouchstart"in window||md()>0),gd=vd?"pointerdown":"click";function md(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function yd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...b}=i;if(!ul(l)||l==="")return!1;let v;return ul(s)?v=new s(l,{bubbles:c,cancelable:d}):(v=document.createEvent("HTMLEvents"),v.initEvent(l,c,d)),Object.assign(v,b),a.dispatchEvent(v)}const bd="clickoutside",kd=new Set;Qn&&document.addEventListener(gd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();kd.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&yd(l,{type:bd})})},!0);const xd=[["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 Qa;if(Qn){for(const a of xd)if(a[1]in document){Qa=a;break}}e.computed(()=>!1);const wd=new Set,Dd=new WeakMap;if(Qn&&Qa){const a=Qa[2],i=Qa[4];document.addEventListener(i,()=>{if(wd.forEach(s=>{s.value=!1}),document[a]){const s=Dd.get(document[a]);s&&(s.value=!0)}},!1)}const nr=new Map;nr.set("x",0);nr.set("y",0);var Yn=[],Cd=function(){return Yn.some(function(a){return a.activeTargets.length>0})},Ed=function(){return Yn.some(function(a){return a.skippedTargets.length>0})},dl="ResizeObserver loop completed with undelivered notifications.",_d=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:dl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=dl),window.dispatchEvent(a)},Sa;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Sa||(Sa={}));var Jn=function(a){return Object.freeze(a)},Sd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,Jn(this)}return a}(),ar=function(){function a(i,s,l,c){return this.x=i,this.y=s,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Jn(this)}return a.prototype.toJSON=function(){var i=this,s=i.x,l=i.y,c=i.top,d=i.right,b=i.bottom,v=i.left,h=i.width,w=i.height;return{x:s,y:l,top:c,right:d,bottom:b,left:v,width:h,height:w}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),No=function(a){return a instanceof SVGElement&&"getBBox"in a},or=function(a){if(No(a)){var i=a.getBBox(),s=i.width,l=i.height;return!s&&!l}var c=a,d=c.offsetWidth,b=c.offsetHeight;return!(d||b||a.getClientRects().length)},fl=function(a){var i;if(a instanceof Element)return!0;var s=(i=a==null?void 0:a.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&a instanceof s.Element)},Td=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ca=typeof window<"u"?window:{},Ga=new WeakMap,hl=/auto|scroll/,Id=/^tb|vertical/,Bd=/msie|trident/i.test(Ca.navigator&&Ca.navigator.userAgent),Nn=function(a){return parseFloat(a||"0")},ia=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Sd((s?i:a)||0,(s?a:i)||0)},vl=Jn({devicePixelContentBoxSize:ia(),borderBoxSize:ia(),contentBoxSize:ia(),contentRect:new ar(0,0,0,0)}),lr=function(a,i){if(i===void 0&&(i=!1),Ga.has(a)&&!i)return Ga.get(a);if(or(a))return Ga.set(a,vl),vl;var s=getComputedStyle(a),l=No(a)&&a.ownerSVGElement&&a.getBBox(),c=!Bd&&s.boxSizing==="border-box",d=Id.test(s.writingMode||""),b=!l&&hl.test(s.overflowY||""),v=!l&&hl.test(s.overflowX||""),h=l?0:Nn(s.paddingTop),w=l?0:Nn(s.paddingRight),E=l?0:Nn(s.paddingBottom),S=l?0:Nn(s.paddingLeft),M=l?0:Nn(s.borderTopWidth),O=l?0:Nn(s.borderRightWidth),W=l?0:Nn(s.borderBottomWidth),Ee=l?0:Nn(s.borderLeftWidth),Y=S+w,$=h+E,pe=Ee+O,C=M+W,P=v?a.offsetHeight-C-a.clientHeight:0,x=b?a.offsetWidth-pe-a.clientWidth:0,T=c?Y+pe:0,I=c?$+C:0,Q=l?l.width:Nn(s.width)-T-x,Le=l?l.height:Nn(s.height)-I-P,tt=Q+Y+x+pe,ze=Le+$+P+C,We=Jn({devicePixelContentBoxSize:ia(Math.round(Q*devicePixelRatio),Math.round(Le*devicePixelRatio),d),borderBoxSize:ia(tt,ze,d),contentBoxSize:ia(Q,Le,d),contentRect:new ar(S,h,Q,Le)});return Ga.set(a,We),We},rr=function(a,i,s){var l=lr(a,s),c=l.borderBoxSize,d=l.contentBoxSize,b=l.devicePixelContentBoxSize;switch(i){case Sa.DEVICE_PIXEL_CONTENT_BOX:return b;case Sa.BORDER_BOX:return c;default:return d}},Ad=function(){function a(i){var s=lr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=Jn([s.borderBoxSize]),this.contentBoxSize=Jn([s.contentBoxSize]),this.devicePixelContentBoxSize=Jn([s.devicePixelContentBoxSize])}return a}(),ir=function(a){if(or(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Nd=function(){var a=1/0,i=[];Yn.forEach(function(d){if(d.activeTargets.length!==0){var b=[];d.activeTargets.forEach(function(v){var h=new Ad(v.target),w=ir(v.target);b.push(h),v.lastReportedSize=rr(v.target,v.observedBox),w<a&&(a=w)}),i.push(function(){d.callback.call(d.observer,b,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var s=0,l=i;s<l.length;s++){var c=l[s];c()}return a},gl=function(a){Yn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(ir(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Vd=function(){var a=0;for(gl(a);Cd();)a=Nd(),gl(a);return Ed()&&_d(),a>0},go,sr=[],Od=function(){return sr.splice(0).forEach(function(a){return a()})},Md=function(a){if(!go){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Od()}).observe(s,l),go=function(){s.textContent="".concat(i?i--:i++)}}sr.push(a),go()},Pd=function(a){Md(function(){requestAnimationFrame(a)})},eo=0,zd=function(){return!!eo},Rd=250,Ld={attributes:!0,characterData:!0,childList:!0,subtree:!0},ml=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],yl=function(a){return a===void 0&&(a=0),Date.now()+a},mo=!1,Fd=function(){function a(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return a.prototype.run=function(i){var s=this;if(i===void 0&&(i=Rd),!mo){mo=!0;var l=yl(i);Pd(function(){var c=!1;try{c=Vd()}finally{if(mo=!1,i=l-yl(),!zd())return;c?s.run(1e3):i>0?s.run(i):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ld)};document.body?s():Ca.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ml.forEach(function(s){return Ca.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ml.forEach(function(s){return Ca.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),wo=new Fd,bl=function(a){!eo&&a>0&&wo.start(),eo+=a,!eo&&wo.stop()},$d=function(a){return!No(a)&&!Td(a)&&getComputedStyle(a).display==="inline"},jd=function(){function a(i,s){this.target=i,this.observedBox=s||Sa.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var i=rr(this.target,this.observedBox,!0);return $d(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Ud=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),Xa=new WeakMap,kl=function(a,i){for(var s=0;s<a.length;s+=1)if(a[s].target===i)return s;return-1},Ya=function(){function a(){}return a.connect=function(i,s){var l=new Ud(i,s);Xa.set(i,l)},a.observe=function(i,s,l){var c=Xa.get(i),d=c.observationTargets.length===0;kl(c.observationTargets,s)<0&&(d&&Yn.push(c),c.observationTargets.push(new jd(s,l&&l.box)),bl(1),wo.schedule())},a.unobserve=function(i,s){var l=Xa.get(i),c=kl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&Yn.splice(Yn.indexOf(l),1),l.observationTargets.splice(c,1),bl(-1))},a.disconnect=function(i){var s=this,l=Xa.get(i);l.observationTargets.slice().forEach(function(c){return s.unobserve(i,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Kd=function(){function a(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.");Ya.connect(this,i)}return a.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!fl(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ya.observe(this,i,s)},a.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(!fl(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ya.unobserve(this,i)},a.prototype.disconnect=function(){Ya.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const io=new WeakMap;function Wd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=io.get(c.target);if(typeof d=="function"){const{inlineSize:b,blockSize:v}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:h,offsetHeight:w}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:w,width:b??h,height:v??w}))}}}const cr=new(Qn&&window.ResizeObserver||Kd)(Wd);function xl(a,i){io.set(a,i),cr.observe(a)}function wl(a){io.has(a)&&(cr.unobserve(a),io.delete(a))}function Hd(a={}){let i=pl;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(xl(c,a.onResize),i=()=>{wl(c),i=pl})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:xl,unobserveResize:wl,unobserve:l}}const qd=e.ref(!1);e.computed(()=>qd.value);const Dl="__theme_style__",yo="__theme_observer__",Cl=e.reactive(new Map),El=new Map;e.watch(Cl,()=>{if(!Qn)return;El.clear();const a=document.head.querySelector(`#${Dl}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${yo} { width: 1px }`,l=1;for(const[c,[d,b]]of Cl.entries())s+=` html.${d} .${yo}, .${b} .${yo} { width: ${++l}px }`,El.set(l,c);i.textContent=s,i.id=Dl,document.head.appendChild(i)});const ur=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:i,emit:s}){const l=a,c=s,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,v=e.ref(l.layout),h=e.ref(),{observeResize:w,unobserveResize:E}=Hd(),S=Hp();S.on("resizeEvent",M),S.on("dragEvent",O),e.onBeforeMount(()=>{c("layout-before-mount",v.value)}),e.onMounted(()=>{c("layout-mounted",v.value),e.nextTick(()=>{ad(v.value),d.originalLayout=v.value,e.nextTick(()=>{Le(),h.value&&w(h.value,qp(C,16)),aa(v.value,l.verticalCompact),c("layout-updated",v.value),pe(),C()})})}),e.onBeforeUnmount(()=>{S.clearAll(),h.value&&E(h.value)});function M(ze,We,De,A,oe,ne){I(ze,We,De,A,oe,ne)}function O(ze,We,De,A,oe,ne){T(ze,We,De,A,oe,ne)}e.watch(()=>d.width,(ze,We)=>{e.nextTick(()=>{S.emit("updateWidth",ze),We===-1&&e.nextTick(()=>{c("layout-ready",v.value)}),pe()})}),e.watch(()=>[l.layout,l.layout.length],()=>{v.value=l.layout,$()}),e.watch(()=>l.colNum,ze=>{S.emit("setColNum",ze)}),e.watch(()=>l.rowHeight,ze=>{S.emit("setRowHeight",ze)}),e.watch(()=>l.isDraggable,ze=>{S.emit("setDraggable",ze)}),e.watch(()=>l.isResizable,ze=>{S.emit("setResizable",ze)}),e.watch(()=>l.isBounded,ze=>{S.emit("setBounded",ze)}),e.watch(()=>l.transformScale,ze=>{S.emit("setTransformScale",ze)}),e.watch(()=>l.responsive,ze=>{ze||(c("update:layout",d.originalLayout),S.emit("setColNum",l.colNum)),C()}),e.watch(()=>l.maxRows,ze=>{S.emit("setMaxRows",ze)}),e.watch([()=>l.margin,()=>l.margin[1]],pe),e.provide(Gl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:W,decreaseItem:Ee})),e.provide(Xl,S),i({state:d,getItem:Y,resizeEvent:I,dragEvent:T,layoutUpdate:$});function W(ze){b.set(ze.i,ze)}function Ee(ze){b.delete(ze.i)}function Y(ze){return b.get(ze)}function $(){if(!hn(v.value)&&!hn(d.originalLayout)){if(v.value.length!==d.originalLayout.length){const ze=tt(v.value,d.originalLayout);if(ze.length>0)if(v.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(ze);else{const We=new Set(ze.map(De=>De.i));d.originalLayout=d.originalLayout.filter(De=>!We.has(De.i))}d.lastLayoutLength=v.value.length,Le()}aa(v.value,l.verticalCompact),S.emit("updateWidth",d.width),pe(),c("layout-updated",v.value)}}function pe(){d.mergedStyle={height:P()}}function C(){h.value&&(d.width=h.value.offsetWidth),S.emit("resizeEvent")}function P(){if(!l.autoSize)return;const ze=parseFloat(l.margin[1]);return Xp(v.value)*(l.rowHeight+ze)+ze+"px"}let x;function T(ze,We,De,A,oe,ne){let me=nl(v.value,We);hn(me)&&(me={h:0,w:0,x:0,y:0,i:""}),ze==="dragstart"&&!l.verticalCompact&&(x=v.value.reduce((Xe,{i:nt,x:Pe,y:j})=>({...Xe,[nt]:{x:Pe,y:j}}),{})),ze==="dragmove"||ze==="dragstart"?(d.placeholder.i=We,d.placeholder.x=me.x,d.placeholder.y=me.y,d.placeholder.w=ne,d.placeholder.h=oe,e.nextTick(()=>{d.isDragging=!0}),S.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),v.value=xo(v.value,me,De,A,!0,l.preventCollision),l.restoreOnDrag?(me.static=!0,aa(v.value,l.verticalCompact,x),me.static=!1):aa(v.value,l.verticalCompact),S.emit("compact"),pe(),ze==="dragend"&&(x=void 0,c("layout-updated",v.value))}function I(ze,We,De,A,oe,ne){let me=nl(v.value,We);hn(me)&&(me={h:0,w:0,x:0,y:0,i:""});let Xe;if(l.preventCollision){const nt=Jl(v.value,{...me,w:ne,h:oe}).filter(Pe=>Pe.i!==me.i);if(Xe=nt.length>0,Xe){let Pe=1/0,j=1/0;nt.forEach(Qe=>{Qe.x>me.x&&(Pe=Math.min(Pe,Qe.x)),Qe.y>me.y&&(j=Math.min(j,Qe.y))}),Number.isFinite(Pe)&&(me.w=Pe-me.x),Number.isFinite(j)&&(me.h=j-me.y)}}Xe||(me.w=ne,me.h=oe),ze==="resizestart"||ze==="resizemove"?(d.placeholder.i=We,d.placeholder.x=De,d.placeholder.y=A,d.placeholder.w=me.w,d.placeholder.h=me.h,e.nextTick(()=>{d.isDragging=!0}),S.emit("updateWidth",d.width)):ze&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&Q(),aa(v.value,l.verticalCompact),S.emit("compact"),pe(),ze==="resizeend"&&c("layout-updated",v.value)}function Q(){const ze=id(l.breakpoints,d.width);if(ze===d.lastBreakpoint)return;const We=er(ze,l.cols);!hn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=ko(v.value));const De=sd(d.originalLayout,d.layouts,l.breakpoints,ze,d.lastBreakpoint,We,l.verticalCompact);d.layouts[ze]=De,d.lastBreakpoint!==ze&&c("breakpoint-changed",ze,De),v.value=De,c("update:layout",De),d.lastBreakpoint=ze,S.emit("setColNum",We)}function Le(){d.layouts=Object.assign({},l.responsiveLayouts)}function tt(ze,We){const De=new Set(We.map(me=>me.i)),A=new Set(ze.map(me=>me.i)),oe=ze.filter(me=>!De.has(me.i)),ne=We.filter(me=>!A.has(me.i));return oe.concat(ne)}return(ze,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[ze.$slots.default?e.renderSlot(ze.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,De=>(e.openBlock(),e.createBlock(ro,e.mergeProps({key:De.i,ref_for:!0},De),{default:e.withCtx(()=>[e.renderSlot(ze.$slots,"item",{item:De})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ro,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Gd={key:0,class:"item-view-group"},Xd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=Te.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,b=e.computed(()=>d==null?void 0:d.children),v=e.computed(()=>{var S,M,O,W;return((S=d==null?void 0:d.children)==null?void 0:S.length)>0&&((M=d==null?void 0:d.children)!=null&&M.every(Ee=>Ee==null?void 0:Ee.layout))?(W=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:W.layout:"vertical"}),h=e.ref((d==null?void 0:d.level)+1),w=S=>{c("rowClick",S)},E=(S,M)=>{c("routeUrl",S,M)};return(S,M)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(ur),{layout:b.value,"onUpdate:layout":M[0]||(M[0]=O=>b.value=O),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(O,W)=>(e.openBlock(),e.createBlock(e.unref(ro),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:W===((Ee=d==null?void 0:d.children)==null?void 0:Ee.length)-1?"0px":"24px"})},[(($=(Y=O==null?void 0:O.component)==null?void 0:Y.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((pe=O==null?void 0:O.component)!=null&&pe.name)?(e.openBlock(),e.createElementBlock("div",Gd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(h.value.toString())>1?"0px":"8px",fontWeight:600-(h.value-1)*100>=400?600-(h.value-1)*100:400,fontSize:17-h.value>=14?17-h.value+"px":"14px"})},e.toDisplayString((C=O==null?void 0:O.component)==null?void 0:C.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_o)((P=O==null?void 0:O.component)==null?void 0:P.comp)),{pageLayout:v.value,config:{showIndex:(x=e.unref(It)[W])==null?void 0:x.showIndex,allowMove:(T=e.unref(It)[W])==null?void 0:T.allowMove,viewport:(I=e.unref(It)[W])==null?void 0:I.viewport},compName:O==null?void 0:O.component.name,compNames:e.unref(Bo),itemData:(Q=O==null?void 0:O.component)==null?void 0:Q.compData,childItemData:(Le=O==null?void 0:O.component)==null?void 0:Le.itemChildData,key:e.unref(Ea),cacheNewData:e.unref(lo),onChange:e.unref(So),index:(O==null?void 0:O.id)??W,onContentChange:e.unref(To),onPageChange:e.unref(Io),parentTableId:(tt=O==null?void 0:O.component)==null?void 0:tt.tableId,allMapContents:e.unref(Eo),children:(ze=O==null?void 0:O.component)==null?void 0:ze.children,level:h.value,onRowClick:w,onRouteUrl:E,onClickTrigger:e.unref($l),onClickMainKey:e.unref(jl)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])]))}}),Yd=Lt._export_sfc(Xd,[["__scopeId","data-v-6e5a155a"]]),pr=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"}]),Jd={TABLE:oa.ssTable,FORM:Uo,TABLEOPERATE:os,TABLESTYLE:ks,TABLEEXTEND:ws,TABLEINTERACTION:Es,FORMOPERATE:Ko,FOLD:tc,CALCULATOR:ic,METHODBUTTON:Dc,AVATARUPLOAD:Fo.ssAvatar,SIGNATURE:Fo.ssSignature,FORMTOP:Uo,STEP:Mc,STEPOPERATE:Hs,TIMELINE:$c,TIMELINEOPERATE:Zs,FORMTOPOPERATE:Ko,SIGNATUREOPERATE:Nc,AVATARUPLOADOPERATE:_c,TABS:Kc,TABSOPERATE:Iu,CHART:Uu,CHARTOPERATE:ep,LAYOUT:Op,LAYOUTOPERATE:Up,PARENTITEM:Yd};function sa(a){return Jd[a==null?void 0:a.toUpperCase()]||null}exports.De=ur;exports.activeStepInfo=ra;exports.affixItems=gp;exports.allMapContents=Eo;exports.cacheNewData=lo;exports.checkForTableContents=hc;exports.checkIsShowGroup=sc;exports.checkIsShowGroupForm=cc;exports.checkIsShowTable=dc;exports.clickMainKey=jl;exports.clickSavePage=vp;exports.clickStep=Kl;exports.clickTrigger=$l;exports.compId=Ea;exports.compNames=Bo;exports.compShow=oo;exports.contentTransArray=ya;exports.contentTransArrayToAll=xa;exports.contentTransArrayToAllNoExtra=bo;exports.debounce=Do;exports.existLayouts=Ep;exports.formToExtraContent=fc;exports.generateLayouts=gs;exports.getComponent=sa;exports.getComponents=_o;exports.getExtraContents=gc;exports.getSliceContLength=Ip;exports.gridRowHeight=ps;exports.isStepLayout=Ao;exports.isUndefined=Tl;exports.newContentTransArrayToAllNoExtra=pc;exports.onBack=fp;exports.onChange=So;exports.onClick=hp;exports.onContentChange=To;exports.onExtendTaskEnd=Cp;exports.onPageBack=_p;exports.onPageChange=Io;exports.onSaveBack=Pl;exports.onSelectFixContent=dp;exports.renderShowItems=Rl;exports.showItems=It;exports.sliceTableLength=Ll;exports.slotContent=pr;exports.st=ro;exports.stepItems=Bp;exports.toolBar=Ln;exports.verifyButton=Sp;
|
|
1
|
+
"use strict";const oa=require("./index-Ik04dFx5.cjs"),e=require("vue"),p=require("./index-CEwxrYB-.cjs"),Bt=require("./index-BQlPbXIW.cjs"),Te=require("./index.vue_vue_type_style_index_1_lang-BVjtPl2M.cjs"),Xt=require("./index-oH9f3nVB.cjs"),to=require("./threeViewerHost-DAOkqnVr.cjs"),la=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DJnHA5u9.cjs"),Lt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Lo=require("./isString-Cvx5mmsS.cjs"),Fo=require("./index-DzO6_ExP.cjs"),_l=require("./index-BVaHwt5f.cjs"),Rr=require("./index-DCL1siMj.cjs");var Lr=/\s/;function Fr(a){for(var i=a.length;i--&&Lr.test(a.charAt(i)););return i}var $r=/^\s+/;function jr(a){return a&&a.slice(0,Fr(a)+1).replace($r,"")}var $o=NaN,Ur=/^[-+]0x[0-9a-f]+$/i,Kr=/^0b[01]+$/i,Wr=/^0o[0-7]+$/i,Hr=parseInt;function jo(a){if(typeof a=="number")return a;if(p.isSymbol(a))return $o;if(p.isObject(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=p.isObject(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=jr(a);var s=Kr.test(a);return s||Wr.test(a)?Hr(a.slice(2),s?2:8):Ur.test(a)?$o:+a}var ho=function(){return p.root.Date.now()},qr="Expected a function",Gr=Math.max,Xr=Math.min;function Do(a,i,s){var l,c,d,b,v,h,w=0,E=!1,S=!1,M=!0;if(typeof a!="function")throw new TypeError(qr);i=jo(i)||0,p.isObject(s)&&(E=!!s.leading,S="maxWait"in s,d=S?Gr(jo(s.maxWait)||0,i):d,M="trailing"in s?!!s.trailing:M);function O(T){var I=l,Q=c;return l=c=void 0,w=T,b=a.apply(Q,I),b}function W(T){return w=T,v=setTimeout($,i),E?O(T):b}function Ee(T){var I=T-h,Q=T-w,Le=i-I;return S?Xr(Le,d-Q):Le}function Y(T){var I=T-h,Q=T-w;return h===void 0||I>=i||I<0||S&&Q>=d}function $(){var T=ho();if(Y(T))return pe(T);v=setTimeout($,Ee(T))}function pe(T){return v=void 0,M&&l?O(T):(l=c=void 0,b)}function C(){v!==void 0&&clearTimeout(v),w=0,l=h=c=v=void 0}function P(){return v===void 0?b:pe(ho())}function x(){var T=ho(),I=Y(T);if(l=arguments,c=this,h=T,I){if(v===void 0)return W(h);if(S)return clearTimeout(v),v=setTimeout($,i),O(h)}return v===void 0&&(v=setTimeout($,i)),b}return x.cancel=C,x.flush=P,x}var Yr="[object Boolean]";function Sl(a){return a===!0||a===!1||p.isObjectLike(a)&&p.baseGetTag(a)==Yr}function Tl(a){return a===void 0}const Jr={class:"form-content"},Zr={title:"选择标签"},Qr={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ei={class:"col-operate-wrap"},ti={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},ni={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(a,{emit:i}){const s=()=>{b.value=!1,v.value=!1,h.value=[]},l=a;e.computed(()=>{var q;const y=(q=nt.value)==null?void 0:q.split("/");return(y==null?void 0:y.some(X=>(X==null?void 0:X.includes("updateLoading"))||(X==null?void 0:X.includes("loading"))))?!1:We.value==="view"});const c=i,d=e.ref([]),b=e.ref(!1),v=e.ref(!1),h=e.ref([]),w=e.ref("");to.useThreeSystem();const E=e.ref(),S=e.ref(!1),M=e.ref(!1),O=e.ref([]),W=e.ref(),Ee=e.ref(!1),Y=e.ref([]),$=oa.useFormToTableComp(p.pinia),pe=oa.useFormComp(p.pinia),C=e.ref(!1),P=e.ref(),x=p.useLoginState(p.pinia),{loginUserInfo:T}=p.storeToRefs(x),I=e.ref(),Q=e.ref(!0),Le=Te.useModelComp(p.pinia),{tableViewContents:tt,itemData:ze,isEdit:We,routeToChildPath:De,lockingPage:A}=p.storeToRefs(Le),oe=e.ref(null),ne=e.ref(!1),me=e.ref(!1),Xe=Te.useMenuState(),{activeMenuPath:nt}=p.storeToRefs(Xe),Pe=Te.useOriginalState(p.pinia),{originalPath:j}=p.storeToRefs(Pe),Qe=e.ref([]),Ke=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),vt=async y=>{me.value=y,await Ye("disabled",null,y,!0)},yt=async y=>{await Ye("operable",null,y,!0)};e.watch(()=>nt.value,async()=>{d.value=[],h.value=[],w.value=""},{deep:!0,immediate:!0});const ct=()=>{e.nextTick(()=>{be()})},at=y=>{var D;d.value=(D=d.value)==null?void 0:D.map(q=>({...q,isFormColHidden:!(y!=null&&y.includes(q.label))}))};e.onUnmounted(()=>{oe.value=null});const St=y=>{c("clickTrigger",y)},ge=async y=>{var D,q,X,G,J,de;if(y===""){let K="";(D=d.value)==null||D.forEach(H=>{H!=null&&H.isMain&&(K=H==null?void 0:H.value)});let _e=await Te.getItemData(De.value,sessionStorage.getItem("systemKey"),"");K=((de=(J=(G=(X=(q=_e==null?void 0:_e[0])==null?void 0:q.compData)==null?void 0:X.find(H=>(H==null?void 0:H.key)==="mainRouters"))==null?void 0:G.contents)==null?void 0:J[0])==null?void 0:de.routerContent)+j.value+K;let ae=await Te.getItemData(K,sessionStorage.getItem("systemKey"),"");Ee.value=!0,Y.value=ae==null?void 0:ae.filter(H=>(H==null?void 0:H.comp)!=="methodButton"),c("routeUrl",Y.value)}},be=()=>{var D;const y=(D=oe.value)==null?void 0:D.$el;y&&la.Sortable.create(y,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:q=>{const{oldIndex:X,newIndex:G}=q;if(X===G)return;const J=d.value.splice(X,1)[0];d.value.splice(G,0,J)}})},Ye=async(y,D,q,X=!1)=>{var G,J,de,K,_e,ke,ae,H;try{Le.setRefreshCurStructure(!1);const le=await p.getInsofDataApi({id:l==null?void 0:l.index});if(((G=le==null?void 0:le.data)==null?void 0:G.code)===200){let Fe=(_e=(K=(de=(J=le==null?void 0:le.data)==null?void 0:J.result)==null?void 0:de[0])==null?void 0:K.value)==null?void 0:_e.pageData;X?Fe={...Fe,compData:(ae=Fe==null?void 0:Fe.compData)==null?void 0:ae.map(Ge=>{var z;return(Ge==null?void 0:Ge.key)==="formContent"?{...Ge,contents:(z=Ge==null?void 0:Ge.contents)==null?void 0:z.map(he=>({...he,[y]:q}))}:Ge})}:Fe={...Fe,compData:(ke=Fe==null?void 0:Fe.compData)==null?void 0:ke.map(Ge=>{var z;return(Ge==null?void 0:Ge.key)==="formContent"?{...Ge,contents:(z=Ge==null?void 0:Ge.contents)==null?void 0:z.map(he=>(he==null?void 0:he.prop)===(D==null?void 0:D.prop)?{...he,[y]:q}:he)}:Ge})};const ye=await p.updateInsofDataApi({id:l==null?void 0:l.index,value:{pageData:Fe}});((H=ye==null?void 0:ye.data)==null?void 0:H.code)===200?(p.ElMessage.success("编辑成功"),Le.setRefreshCurStructure(!0)):p.ElMessage.error("编辑响应失败")}}catch{p.ElMessage.error("编辑处理失败")}},Ae=async(y,D)=>{await Ye("label",D,y)},se=async(y,D)=>{y&&await Ye("type",D,y)},te=async(y,D,q)=>{await Ye(D,q,y,!1)},ce=(y,D)=>{I.value===D?Q.value=!1:Q.value=!0,I.value=D==null?void 0:D.changeProp},Be=async(y,D)=>{var X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re;if(!y){p.ElMessage.error("文件路径为空,无法预览");return}w.value=D;let q=[];if((X=y==null?void 0:y.toString())!=null&&X.includes(".urdf")){if(y.includes(",")){p.ElMessage.error("当前版本仅允许单个urdf预览!");return}h.value=[y],v.value=!0,b.value=!0;return}if((G=y==null?void 0:y.toString())!=null&&G.includes(".stl")||(J=y==null?void 0:y.toString())!=null&&J.includes(".STL")||(de=y==null?void 0:y.toString())!=null&&de.includes(".obj")||(K=y==null?void 0:y.toString())!=null&&K.includes(".mtl")){h.value=(_e=y==null?void 0:y.toString())==null?void 0:_e.split(","),v.value=!1,b.value=!0;return}if((ke=y==null?void 0:y.toString())!=null&&ke.includes(".pcd")||(ae=y==null?void 0:y.toString())!=null&&ae.includes(".PCD")){h.value=(H=y==null?void 0:y.toString())==null?void 0:H.split(","),v.value=!1,b.value=!0;return}if((le=y==null?void 0:y.toString())!=null&&le.includes(".stl")||(Fe=y==null?void 0:y.toString())!=null&&Fe.includes(".STL")||(ye=y==null?void 0:y.toString())!=null&&ye.includes(".obj")||(Ge=y==null?void 0:y.toString())!=null&&Ge.includes(".mtl")){let re,fe=[],Se={};if(Array.isArray(y)?re=y:re=y==null?void 0:y.split(","),re==null||re.forEach(B=>{B.includes(".mtl")?fe.push(B):Se.blob=Se.blob?Se.blob+","+B:B}),(fe==null?void 0:fe.length)>0&&(Se.mtlBlobs=fe),(he=(z=Object.values(Se))==null?void 0:z[0])!=null&&he.includes("http:"))q.push(Se);else{const B=new Blob([Se.blob],{type:"application/octet-stream;charset=UTF-8"});let Ie=URL.createObjectURL(B),Me="";(Ne=y==null?void 0:y.split("/"))==null||Ne.forEach((we,R)=>{var L;R===((L=y==null?void 0:y.split("/"))==null?void 0:L.length)-1&&(Me=we)}),(He=Se.blob)!=null&&He.includes(".stl")&&(Me=(Me==null?void 0:Me.replaceAll(">",""))+".urdf"),W.value=[{name:Me,blobUrl:Ie}],M.value=!0}}else{const re=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),fe=await p.axios.get(y,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{re.close()}),Se=new Blob([fe.data],{type:"application/octet-stream;charset=UTF-8"});let B=URL.createObjectURL(Se),Ie="";(Re=y==null?void 0:y.split("/"))==null||Re.forEach((Me,we)=>{var R;we===((R=y==null?void 0:y.split("/"))==null?void 0:R.length)-1&&(Ie=Me)}),W.value=[{name:Ie,blobUrl:B}],M.value=!0}(q==null?void 0:q.length)>0&&pe.setBlobUrls(q)},Je=()=>{M.value=!1},ut=y=>{var J,de,K,_e;const D=(de=(J=p.cloneDeep(l.itemData))==null?void 0:J.find(ke=>(ke==null?void 0:ke.key)==="formContent"))==null?void 0:de.contents,q=p.cloneDeep(y.content);let X={};q&&((K=Object.values(q))==null?void 0:K.length)>0&&((_e=Object.values(q))==null||_e.forEach((ke,ae)=>{X[D[ae].key]=ke}));const G={content:X,index:l==null?void 0:l.index,buttonName:y==null?void 0:y.buttonName};c("change",G)},k=e.computed(()=>"http://222.92.178.198:62001"),V=async y=>{var le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we;if(!y)return;(Fe=(le=l==null?void 0:l.itemData)==null?void 0:le.find(R=>(R==null?void 0:R.key)==="parentFormPath"))==null||Fe.contents;let D=tt.value;(D==null?void 0:D.length)>0&&(D=D==null?void 0:D.map(R=>{var ie,Ve,ue,ve;let L=(ie=R==null?void 0:R.key)==null?void 0:ie.split("/");return(l==null?void 0:l.compName)===(L==null?void 0:L[0])&&(Ve=d.value)!=null&&Ve.find(Ze=>(Ze==null?void 0:Ze.prop)===(L==null?void 0:L[1]))&&(R.value=y!=null&&y[L==null?void 0:L[1]]&&(y==null?void 0:y[L==null?void 0:L[1]])!==""?y==null?void 0:y[L==null?void 0:L[1]]:(ve=(ue=d.value)==null?void 0:ue.find(Ze=>(Ze==null?void 0:Ze.prop)===(L==null?void 0:L[1])))==null?void 0:ve.value),R}),Le.setTableViewContents(D));const q=p.cloneDeep(l.itemData);let X=q==null?void 0:q.map(R=>{var L;return(R==null?void 0:R.key)==="formContent"&&((L=R.contents)==null||L.map((ie,Ve)=>{var ue,ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t;return ie.type=(ve=(ue=d.value)==null?void 0:ue.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:ve.type,ie.options=ie!=null&&ie.options?ie.options:((et=(Oe=(Ze=ie==null?void 0:ie.key)==null?void 0:Ze.split("$"))==null?void 0:Oe[1])==null?void 0:et.length)>0?(lt=(Ce=oa.formGetOptions((Ue=(Z=ie==null?void 0:ie.key)==null?void 0:Z.split("$"))==null?void 0:Ue[1]))==null?void 0:Ce.split(","))==null?void 0:lt.map(ft=>({label:ft,value:ft})):[],(it=ie==null?void 0:ie.key)!=null&&it.includes("$")&&(ie.key=(kt=(bt=ie==null?void 0:ie.key)==null?void 0:bt.split("$"))==null?void 0:kt[0]),ie.signature=(dt=(st=d.value)==null?void 0:st.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:dt.signature,ie.isLoginUser=(Tt=(xt=d.value)==null?void 0:xt.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:Tt.isLoginUser,ie.value=(gt=Object.values(y))==null?void 0:gt[Ve],ie.isFormColHidden=($t=(wt=d.value)==null?void 0:wt.find(ft=>(ft==null?void 0:ft.prop)===(ie==null?void 0:ie.prop)))==null?void 0:$t.isFormColHidden,ie})),R}),G=d.value,J=(Ge=(ye=p.cloneDeep(X))==null?void 0:ye.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:Ge.contents;if(G=G==null?void 0:G.map(R=>{var L,ie,Ve;return(R==null?void 0:R.type)==="Select"&&((ie=(L=R==null?void 0:R.optionUrl)==null?void 0:L.oldMenuSelect)!=null&&ie.some(ue=>(ue==null?void 0:ue[0])==="["))&&(R.optionUrl.defaultMenu=y),R.value=(Ve=J==null?void 0:J.find((ue,ve)=>((ue==null?void 0:ue.id)??ve)===(R==null?void 0:R.id)))==null?void 0:Ve.value,R}),!Q.value){c("contentChange",{contents:X,index:l.index});return}let de="",K=(Ne=(he=(z=p.cloneDeep(X))==null?void 0:z.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:he.contents)==null?void 0:Ne.find((R,L)=>{var ie,Ve,ue;return(R==null?void 0:R.label)===I.value||L.toString()===((ue=(Ve=(ie=I.value)==null?void 0:ie.split("t"))==null?void 0:Ve[1])==null?void 0:ue.toString())}),_e=(He=K==null?void 0:K.optionUrl)==null?void 0:He.menuSelect,ke=!0;if((fe=(re=(Re=p.cloneDeep(X))==null?void 0:Re.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:re.contents)==null||fe.forEach(R=>{var L,ie,Ve,ue,ve,Ze;ke&&((Ve=(ie=(L=R==null?void 0:R.optionUrl)==null?void 0:L.groupSelect)==null?void 0:ie[1])!=null&&Ve.includes("["))&&(de=(ve=(ue=R==null?void 0:R.optionUrl)==null?void 0:ue.groupSelect)==null?void 0:ve[1],JSON.stringify(_e)===JSON.stringify((Ze=R==null?void 0:R.optionUrl)==null?void 0:Ze.menuSelect)&&(ke=!1))}),(Se=K==null?void 0:K.optionUrl)!=null&&Se.menuSelect&&Q.value){let R=await oa.getSelectRow(K,d.value),L;if((B=K==null?void 0:K.optionUrl)==null||B.menuSelect,R==null||R.forEach(ie=>{var Ve,ue,ve,Ze,Oe,et,Z,Ue,Ce,lt;de===((ue=(Ve=K==null?void 0:K.optionUrl)==null?void 0:Ve.groupSelect)==null?void 0:ue[1])&&((Oe=(Ze=(ve=K==null?void 0:K.optionUrl)==null?void 0:ve.groupSelect)==null?void 0:Ze[1])!=null&&Oe.includes("["))&&((lt=p.cloneDeep(ie))==null?void 0:lt[(Ce=(Ue=(Z=(et=K==null?void 0:K.optionUrl)==null?void 0:et.groupSelect)==null?void 0:Z[1])==null?void 0:Ue.replaceAll("[",""))==null?void 0:Ce.replaceAll("]","")])===(K==null?void 0:K.value)&&(L=ie)}),L){let ie=p.cloneDeep(G);ie=ie==null?void 0:ie.map(ue=>{var ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt;return(L!=null&&L[ue==null?void 0:ue.label]||L!=null&&L[(et=(Oe=(Ze=(ve=ue==null?void 0:ue.optionUrl)==null?void 0:ve.groupSelect)==null?void 0:Ze[1])==null?void 0:Oe.replaceAll("[",""))==null?void 0:et.replaceAll("]","")])&&((Ce=(Ue=(Z=ue==null?void 0:ue.optionUrl)==null?void 0:Z.groupSelect)==null?void 0:Ue[1])!=null&&Ce.includes("["))&&(ue.value=(L==null?void 0:L[ue==null?void 0:ue.label])||(L==null?void 0:L[(kt=(bt=(it=(lt=ue==null?void 0:ue.optionUrl)==null?void 0:lt.groupSelect)==null?void 0:it[1])==null?void 0:bt.replaceAll("[",""))==null?void 0:kt.replaceAll("]","")]),Array.isArray(ue.value)&&ue.value.every(st=>(st==null?void 0:st.url)&&(st==null?void 0:st.name))&&(ue.type="Upload")),ue}),ie=ie==null?void 0:ie.map(ue=>{var ve;return(ve=ue==null?void 0:ue.optionUrl)!=null&&ve.oldMenuSelect,ue}),d.value=p.cloneDeep(ie);let Ve=p.cloneDeep(ie);Ve=Ve==null?void 0:Ve.map(ue=>{var ve,Ze,Oe,et,Z,Ue;return(Ze=(ve=ue==null?void 0:ue.optionUrl)==null?void 0:ve.menuSelect)!=null&&Ze.some(Ce=>Ce==null?void 0:Ce.includes("["))&&(ue.optionUrl.oldMenuSelect=(et=(Oe=p.cloneDeep(ue))==null?void 0:Oe.optionUrl)==null?void 0:et.menuSelect,ue.optionUrl.menuSelect=(Ue=(Z=ue==null?void 0:ue.optionUrl)==null?void 0:Z.menuSelect)==null?void 0:Ue.map(Ce=>{var lt,it,bt,kt;if(Ce!=null&&Ce.includes("[")){let st=(it=(lt=Ce==null?void 0:Ce.replaceAll("[","").replaceAll("]",""))==null?void 0:lt.split(":"))==null?void 0:it[1];Ce=(kt=(bt=p.cloneDeep(ie))==null?void 0:bt.find(dt=>(dt==null?void 0:dt.label)===st))==null?void 0:kt.value}return Ce})),ue}),d.value=Ve}else d.value=G;X=X==null?void 0:X.map(ie=>{var Ve;return(ie==null?void 0:ie.key)==="formContent"&&(ie.contents=(Ve=ie.contents)==null?void 0:Ve.map(ue=>{var ve,Ze,Oe,et;return ue.value=((Ze=(ve=d.value)==null?void 0:ve.find(Z=>(Z==null?void 0:Z.label)===(ue==null?void 0:ue.key)))==null?void 0:Ze.value)??(ue==null?void 0:ue.value),ue.type=((et=(Oe=d.value)==null?void 0:Oe.find(Z=>(Z==null?void 0:Z.prop)===(ue==null?void 0:ue.key)))==null?void 0:et.type)??(ue==null?void 0:ue.type),ue})),ie})}Q.value=!1,c("contentChange",{contents:X,index:l.index});let ae=[],H=[];if((Me=p.cloneDeep((Ie=X==null?void 0:X.find(R=>(R==null?void 0:R.key)==="formContent"))==null?void 0:Ie.contents))==null||Me.forEach(R=>{var L;Array.isArray(R==null?void 0:R.value)&&((L=R==null?void 0:R.value)!=null&&L.find(ie=>{var Ve;return(Ve=ie==null?void 0:ie.url)==null?void 0:Ve.includes(".obj")}))&&(H=R==null?void 0:R.value)}),(H==null?void 0:H.length)>0){const R=(we=p.cloneDeep(H))==null?void 0:we.filter(L=>{var ie;return(ie=L==null?void 0:L.url)==null?void 0:ie.includes(".obj")});R==null||R.forEach(L=>{var Ve,ue,ve,Ze;const ie=(Ve=H==null?void 0:H.filter(Oe=>{var et;return(Oe==null?void 0:Oe.name)===(L==null?void 0:L.name)&&((et=Oe==null?void 0:Oe.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:Ve.map(Oe=>Oe==null?void 0:Oe.url);ae.push({objUrl:L==null?void 0:L.url,mtlUrls:((ue=H==null?void 0:H.filter(Oe=>{var et;return(Oe==null?void 0:Oe.name)===(L==null?void 0:L.name)&&((et=Oe==null?void 0:Oe.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:ue.length)===1?(Ze=(ve=H==null?void 0:H.filter(Oe=>{var et;return(Oe==null?void 0:Oe.name)===(L==null?void 0:L.name)&&((et=Oe==null?void 0:Oe.url)==null?void 0:et.includes(".mtl"))}))==null?void 0:ve[0])==null?void 0:Ze.url:ie})}),pe.setObjUrl(ae)}},U=y=>{if(!y)return;const D=[];let q="";for(let X of y)(X.includes("[")||q.includes("["))&&(q+=X.trim(),p.cloneDeep(q).split("【").length-1===p.cloneDeep(q).split("】").length-1&&p.cloneDeep(q).split("[").length-1===p.cloneDeep(q).split("]").length-1&&(D.push(q.replace(/\/\*[\s\S]*?\*\//g,"")),q=""));return D};return e.watch(()=>l.itemData,async()=>{var de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re;const y=(de=l.itemData)==null?void 0:de.find(re=>(re==null?void 0:re.key)==="formContent"),D=(K=p.cloneDeep(l.itemData))==null?void 0:K.find(re=>(re==null?void 0:re.key)==="formButton"),q=(_e=p.cloneDeep(l.itemData))==null?void 0:_e.find(re=>(re==null?void 0:re.key)==="formFlex"),X=(ke=p.cloneDeep(l.itemData))==null?void 0:ke.find(re=>(re==null?void 0:re.key)==="formWrap"),G=(ae=p.cloneDeep(l.itemData))==null?void 0:ae.find(re=>(re==null?void 0:re.key)==="enableWrap");if((X==null?void 0:X.contents)==="纵向"?S.value=!1:S.value=!0,C.value=(G==null?void 0:G.contents)===void 0?!1:G==null?void 0:G.contents,P.value=typeof(q==null?void 0:q.contents)!="boolean"?!(!(q!=null&&q.contents)===""||((H=q==null?void 0:q.contents)==null?void 0:H.toUpperCase())==="VERTICAL"):q==null?void 0:q.contents,((le=y==null?void 0:y.contents)==null?void 0:le.length)>0&&Array.isArray(y==null?void 0:y.contents)){let re=new WeakMap,fe=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:"data,structure,structureMethod"});await p.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey")}}),(ye=(Fe=fe.data.result)==null?void 0:Fe.filter(B=>{var Ie,Me;return((Ie=B==null?void 0:B.key)==null?void 0:Ie.pageKey)!=="menu"&&((Me=B==null?void 0:B.key)==null?void 0:Me.pageKey)!=="secret"}))==null||ye.forEach(B=>{re[B.key.pageKey]?re[B.key.pageKey]=[...re[B.key.pageKey],B]:re[B.key.pageKey]=[B]});let Se=(z=(Ge=p.cloneDeep(y))==null?void 0:Ge.contents)==null?void 0:z.map((B,Ie)=>{var Z,Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t,ft,Wt,Pt,Yt,cn,nn,_n,gn,Sn,mn,Tn,In,Bn,An,an;let Me=(B==null?void 0:B.label)??(B==null?void 0:B.key)??"",we=(B==null?void 0:B.type)??"",R=(B==null?void 0:B.options)??[];if((Z=B==null?void 0:B.key)!=null&&Z.includes("$")&&(Me=(Ue=p.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ue[0],((lt=(Ce=p.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:Ce[1])==null?void 0:lt.length)>0)){const[Dt,Qt]=(bt=(it=p.cloneDeep(B==null?void 0:B.key).split("$"))==null?void 0:it[1])==null?void 0:bt.split(/[()]/);we=((kt=Te.FormType.find(ht=>(ht==null?void 0:ht.key)===Dt))==null?void 0:kt.value)??"",((st=Qt==null?void 0:Qt.split(","))==null?void 0:st.length)>0&&(R=(dt=Qt==null?void 0:Qt.split(","))==null?void 0:dt.map(ht=>({label:ht,value:ht})))}let L=[];B!=null&&B.contents&&!Array.isArray(B==null?void 0:B.contents)&&(L=(Tt=(xt=B==null?void 0:B.contents)==null?void 0:xt.split(","))==null?void 0:Tt.map(Dt=>({label:Dt,value:Dt}))),((gt=B==null?void 0:B.optionUrl)==null?void 0:gt.selectRelateType)==="自定义绑定"&&(L=($t=(wt=B==null?void 0:B.optionUrl)==null?void 0:wt.defaultSelect)==null?void 0:$t.map(Dt=>({label:Dt,value:Dt})));let ie=!1,Ve=(B==null?void 0:B.isFormColHidden)??!1,ue=Te.judgeContents((ft=p.cloneDeep(B))==null?void 0:ft.optionUrl,re),ve=ue!==void 0&&ue!==""?ue:B!=null&&B.originalContent&&(B==null?void 0:B.originalContent)!==""?B.originalContent:B!=null&&B.value?B.value:(R==null?void 0:R.length)>0?(Wt=R==null?void 0:R[0])==null?void 0:Wt.value:(B==null?void 0:B.value)??"",Ze=!1,Oe=ue!==void 0||we===""?"Input":we;if((Array.isArray(ue)&&(ue!=null&&ue.every(Dt=>(Dt==null?void 0:Dt.name)&&(Dt==null?void 0:Dt.url)))||Array.isArray(ve)&&(ve!=null&&ve.every(Dt=>(Dt==null?void 0:Dt.name)&&(Dt==null?void 0:Dt.url))))&&(Oe="upload"),typeof ve=="string"&&(ve!=null&&ve.includes("loginUser"))&&!(ve!=null&&ve.includes("loginUserSign"))||B!=null&&B.isLoginUser)ie=!0,ve=((Pt=T.value)==null?void 0:Pt.姓名)||((Yt=T.value)==null?void 0:Yt.account)||((cn=T.value)==null?void 0:cn.账号)||((nn=T.value)==null?void 0:nn.userName);else if(typeof ve=="string"&&(ve!=null&&ve.includes("loginUserSign"))||B!=null&&B.signature||B!=null&&B.isShow)if(Ze=!0,(B==null?void 0:B.isShow)==="originalSignature")Oe="image",ve=k.value+"/"+((_n=T.value)==null?void 0:_n.signature);else{let Dt=[...new Set(U(B.isShow))].map(Ot=>{var dn,un,kn,on;return{key:(on=(kn=(un=(dn=Ot==null?void 0:Ot.split("["))==null?void 0:dn[1])==null?void 0:un.split("]"))==null?void 0:kn[0])==null?void 0:on.split(":"),value:""}});(gn=ze.value)==null||gn.forEach(Ot=>{Dt==null||Dt.forEach((Jt,dn)=>{var kn;let un=Jt==null?void 0:Jt.key;(Ot==null?void 0:Ot.name)===(un==null?void 0:un[0].replaceAll("'",""))&&((kn=Ot==null?void 0:Ot.compData)==null||kn.forEach(on=>{var On;(on==null?void 0:on.key)==="formContent"&&((On=on==null?void 0:on.contents)==null||On.forEach(xn=>{(xn==null?void 0:xn.prop)===(un==null?void 0:un[1].replaceAll("'",""))&&(Dt[dn].value=xn==null?void 0:xn.value)}))}))})});let Qt=Dt==null?void 0:Dt.map(Ot=>{var Jt;return Ot.key="["+((Jt=Ot.key)==null?void 0:Jt.join(":"))+"]",Ot}),ht=B==null?void 0:B.isShow;Qt==null||Qt.forEach(Ot=>{Ot!=null&&Ot.value?ht=ht.replaceAll(Ot==null?void 0:Ot.key,"'"+(Ot==null?void 0:Ot.value)+"'"):ht=ht.replaceAll(Ot==null?void 0:Ot.key,"undefined")}),ht!=null&&ht.includes("(")||(ht!=null&&ht.includes("==")?ht=((Sn=ht==null?void 0:ht.split("==="))==null?void 0:Sn[0])+"==='"+((mn=ht==null?void 0:ht.split("==="))==null?void 0:mn[1])+"'":ht=((Tn=ht==null?void 0:ht.split("="))==null?void 0:Tn[0])+"='"+((In=ht==null?void 0:ht.split("="))==null?void 0:In[1])+"'"),ht!=null&&ht.includes("=")&&!(ht!=null&&ht.includes("=="))&&!(ht!=null&&ht.includes("==="))&&(ht=ht==null?void 0:ht.replaceAll("=","==")),new Function(`if (${ht}) { return true } else { return false }`)()?(Ve=!1,Oe="image",ve=k.value+"/"+((Bn=T.value)==null?void 0:Bn.signature)):ve=""}return Array.isArray(ve)&&ve.every(Dt=>(Dt==null?void 0:Dt.url)&&(Dt==null?void 0:Dt.name))&&(B.type="Upload"),B!=null&&B.isMainUrl&&(Oe="Url"),(An=B==null?void 0:B.optionUrl)!=null&&An.type&&(Oe=(an=B==null?void 0:B.optionUrl)==null?void 0:an.type),{label:Me??"",name:"t"+Ie,prop:p.cloneDeep(B==null?void 0:B.key),type:Oe,value:B!=null&&B.isNewDate&&ve===""?new Date:ve,id:(B==null?void 0:B.id)??Ie,contents:(L==null?void 0:L.length)>0?L:R??[],width:(B==null?void 0:B.width)??1,isLoginUser:ie,config:B==null?void 0:B.config,optionUrl:(B==null?void 0:B.optionUrl)??B,isFormColHidden:Ve,signature:Ze,isMain:B==null?void 0:B.isMain,isMainUrl:B==null?void 0:B.isMainUrl,operable:(B==null?void 0:B.operable)??!1,disabled:(B==null?void 0:B.disabled)??!1}});setTimeout(async()=>{var ie,Ve,ue,ve,Ze,Oe,et;let B=await(Se==null?void 0:Se.map(async Z=>{var Ue,Ce,lt,it,bt,kt,st;if(((Ue=Z==null?void 0:Z.type)==null?void 0:Ue.toUpperCase())==="UPLOAD"&&!Array.isArray(Z==null?void 0:Z.value)&&(Z==null?void 0:Z.value)!==""){let dt=await p.axios.get(Z==null?void 0:Z.value,{responseType:"blob",headers:{"Content-Type":"application/json"}}),xt="";xt=(bt=(it=(lt=(Ce=dt==null?void 0:dt.headers)==null?void 0:Ce["content-disposition"])==null?void 0:lt.split("filename="))==null?void 0:it[1])==null?void 0:bt.replaceAll('"',"");const Tt=new FormData;Tt.append("file",dt.data,xt);const gt=await Bt.uploadFileApi(Tt);let wt=[{name:xt,url:(st=(kt=gt==null?void 0:gt.data)==null?void 0:kt.result)==null?void 0:st.url}];Z.value=wt}return Z}));Se=await Promise.all(B);const Ie=Se==null?void 0:Se.map(Z=>Z==null?void 0:Z.value);let Me="";Ie==null||Ie.forEach(Z=>{Z!==""&&Z!==void 0&&(Me=Me===""?Z:Me+"/"+Z)}),$.setSelectArray(Ie),$.setSelectString(Me);let we=(ie=p.cloneDeep(Se))==null?void 0:ie.map(Z=>(Z!=null&&Z.value&&Te.IsJson(Z==null?void 0:Z.value)&&Array.isArray(JSON.parse(Z==null?void 0:Z.value))&&(Z.value=JSON.parse(Z.value)),Z));we=we==null?void 0:we.map(Z=>{var Ue,Ce,lt,it,bt,kt,st,dt,xt;if((Ce=(Ue=Z==null?void 0:Z.optionUrl)==null?void 0:Ue.menuSelect)!=null&&Ce.some(Tt=>Tt==null?void 0:Tt.includes("["))){let Tt="";Z.optionUrl.oldMenuSelect=(it=(lt=p.cloneDeep(Z))==null?void 0:lt.optionUrl)==null?void 0:it.menuSelect,Z.optionUrl.menuSelect=(kt=(bt=Z==null?void 0:Z.optionUrl)==null?void 0:bt.menuSelect)==null?void 0:kt.map(gt=>{var wt,$t,ft,Wt,Pt,Yt;if(gt!=null&>.includes("[")){let cn=($t=(wt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:wt.split(":"))==null?void 0:$t[1];Tt=Te.getFindValue((ft=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"),re==null?void 0:re[nt.value],re),gt=((Pt=(Wt=p.cloneDeep(we))==null?void 0:Wt.find(nn=>(nn==null?void 0:nn.label)===cn))==null?void 0:Pt.value)||Te.getFindValue((Yt=gt==null?void 0:gt.replaceAll("[","").replaceAll("]",""))==null?void 0:Yt.split(":"),re==null?void 0:re[nt.value],re)}return gt}),Tt!==""&&(Te.getNewValue(Z.optionUrl.menuSelect,Z.optionUrl.oldMenuSelect,(st=Z==null?void 0:Z.optionUrl)==null?void 0:st.groupSelect,re)!==void 0&&(Z.value=Te.getNewValue(Z.optionUrl.menuSelect,Z.optionUrl.oldMenuSelect,(dt=Z==null?void 0:Z.optionUrl)==null?void 0:dt.groupSelect,re)),Array.isArray(Z.value)&&((xt=Z.value)!=null&&xt.every(gt=>gt==null?void 0:gt.url))&&(Z.type="UPLOAD"))}return Z}),d.value=we,me.value=((Ve=d.value)==null?void 0:Ve.every(Z=>Z==null?void 0:Z.disabled))||A.value===nt.value,ne.value=(ue=d.value)==null?void 0:ue.every(Z=>Z==null?void 0:Z.operable),Qe.value=(ve=d.value)==null?void 0:ve.map(Z=>Z==null?void 0:Z.label);let R=[],L=[];if((Ze=p.cloneDeep(d.value))==null||Ze.forEach(Z=>{var Ue;Array.isArray(Z==null?void 0:Z.value)&&((Ue=Z==null?void 0:Z.value)!=null&&Ue.find(Ce=>{var lt;return(lt=Ce==null?void 0:Ce.url)==null?void 0:lt.includes(".obj")}))&&(L=Z==null?void 0:Z.value)}),(L==null?void 0:L.length)>0){const Z=(Oe=p.cloneDeep(L))==null?void 0:Oe.filter(Ue=>{var Ce;return(Ce=Ue==null?void 0:Ue.url)==null?void 0:Ce.includes(".obj")});Z==null||Z.forEach(Ue=>{var lt,it,bt,kt;const Ce=(lt=L==null?void 0:L.filter(st=>{var dt;return(st==null?void 0:st.name)===(Ue==null?void 0:Ue.name)&&((dt=st==null?void 0:st.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:lt.map(st=>st==null?void 0:st.url);R.push({objUrl:Ue==null?void 0:Ue.url,mtlUrls:((it=L==null?void 0:L.filter(st=>{var dt;return(st==null?void 0:st.name)===(Ue==null?void 0:Ue.name)&&((dt=st==null?void 0:st.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:it.length)===1?(kt=(bt=L==null?void 0:L.filter(st=>{var dt;return(st==null?void 0:st.name)===(Ue==null?void 0:Ue.name)&&((dt=st==null?void 0:st.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:bt[0])==null?void 0:kt.url:Ce})}),pe.setObjUrl(R)}(et=p.cloneDeep(d.value))==null||et.forEach(Z=>{var Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t;if((Ce=(Ue=Z==null?void 0:Z.value)==null?void 0:Ue.toString())!=null&&Ce.includes(".stl")||(it=(lt=Z==null?void 0:Z.value)==null?void 0:lt.toString())!=null&&it.includes(".STL")||(kt=(bt=Z==null?void 0:Z.value)==null?void 0:bt.toString())!=null&&kt.includes(".obj")||(dt=(st=Z==null?void 0:Z.value)==null?void 0:st.toString())!=null&&dt.includes(".mtl")||(Tt=(xt=Z==null?void 0:Z.value)==null?void 0:xt.toString())!=null&&Tt.includes(".urdf")){let ft={},Wt=[],Pt;Array.isArray(Z==null?void 0:Z.value)?Pt=Z==null?void 0:Z.value:Pt=(gt=Z==null?void 0:Z.value)==null?void 0:gt.split(","),Pt==null||Pt.forEach(Yt=>{Yt.includes(".mtl")?Wt.push(Yt):ft.blob=ft.blob==="undefined"?Yt:ft.blob+","+Yt}),(Wt==null?void 0:Wt.length)>0&&(ft.mtlBlobs=Wt),($t=(wt=Object.values(ft))==null?void 0:wt[0])!=null&&$t.includes("http:")}})},100)}else d.value=[];let J=tt.value;if((J==null?void 0:J.length)>0&&((he=d.value)==null?void 0:he.length)>0&&(J=J==null?void 0:J.map(re=>{var Se,B,Ie,Me;let fe=(Se=re==null?void 0:re.key)==null?void 0:Se.split("/");return(l==null?void 0:l.compName)===(fe==null?void 0:fe[0])&&(B=d.value)!=null&&B.find(we=>(we==null?void 0:we.prop)===(fe==null?void 0:fe[1]))&&(re.value=(Me=(Ie=d.value)==null?void 0:Ie.find(we=>(we==null?void 0:we.prop)===(fe==null?void 0:fe[1])))==null?void 0:Me.value),re}),Le.setTableViewContents(J)),l!=null&&l.formRules)E.value=l==null?void 0:l.formRules;else{let re={};(Ne=p.cloneDeep(d).value)==null||Ne.forEach(fe=>{(fe==null?void 0:fe.isMain)===!0&&(re[(fe==null?void 0:fe.prop)??(fe==null?void 0:fe.name)]=[{required:!0,message:`${(fe==null?void 0:fe.prop)||(fe==null?void 0:fe.name)}不能为空`}])}),E.value=re}if(((He=D==null?void 0:D.contents)==null?void 0:He.length)>0){const re=[];(Re=D==null?void 0:D.contents)==null||Re.forEach((fe,Se)=>{(fe==null?void 0:fe.label)!==""&&re.push({label:(fe==null?void 0:fe.label)??"",id:(fe==null?void 0:fe.id)??Se,type:(fe==null?void 0:fe.type)??"",background:fe==null?void 0:fe.background})}),O.value=re}else O.value=[]},{deep:!0,immediate:!0}),e.watch(()=>A.value,y=>{me.value=y===nt.value},{immediate:!0}),(y,D)=>{const q=e.resolveComponent("svg-icon"),X=e.resolveComponent("el-switch"),G=e.resolveComponent("el-checkbox"),J=e.resolveComponent("el-popover"),de=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jr,[e.createVNode(Bt.ssForm,{rowContents:d.value,formRules:E.value,buttonValue:O.value,isRowFlex:!1,isEnableWrap:C.value,onOnButtonClick:ut,onChange:V,formDisabled:me.value,formLabelsOperable:ne.value,isButtonRow:S.value,onPreview:Be,onBlurChange:ce,onHandleColEditChange:Ae,onHandleColTypeChange:se,onRouteUrl:ge,onClickTrigger:St},{operateCol:e.withCtx(({renderColumns:K,formDisabled:_e,formLabelsOperable:ke})=>[e.createVNode(J,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:ct},{reference:e.withCtx(()=>[e.createElementVNode("span",Zr,[e.createVNode(q,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",Qr,[D[1]||(D[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(X,{"model-value":_e,"active-text":"禁用","inactive-text":"",onChange:vt,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(X,{"model-value":ke,"active-text":"编辑所有标签","inactive-text":"",onChange:yt},null,8,["model-value"]),D[2]||(D[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(de,{modelValue:Qe.value,"onUpdate:modelValue":D[0]||(D[0]=ae=>Qe.value=ae),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:oe,onChange:at},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K,ae=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:ae.label},[e.createVNode(G,{value:ae.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(ae.label),1)]),_:2},1032,["value"]),e.createVNode(J,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode(q,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var H;return[e.createElementVNode("div",ei,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((H=Object.keys(ae))==null?void 0:H.filter(le=>{var Fe;return(Fe=Ke.value)==null?void 0:Fe.find(ye=>(ye==null?void 0:ye.value)===le)}),le=>{var Fe,ye;return e.openBlock(),e.createElementBlock("div",{key:le},[e.createVNode(Bt._sfc_main$1,{value:ae==null?void 0:ae[le],"active-text":(ye=(Fe=Ke.value)==null?void 0:Fe.find(Ge=>(Ge==null?void 0:Ge.value)===le))==null?void 0:ye.label,inactiveText:"",onChange:Ge=>te(Ge,le,ae)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ti,[e.createVNode(q,{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"]),M.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:W.value,itemProp:w.value,onDestroy:Je},null,8,["fileDataList","itemProp"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createBlock(Xt.ssDialog,{key:1,visible:b.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(to.ThreeViewerHost,{"file-urls":h.value,isThreeScene:v.value,onGetAnimationData:y.onAnimationData},null,8,["file-urls","isThreeScene","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Uo=Lt._export_sfc(ni,[["__scopeId","data-v-501c758a"]]),no=e.ref(0),Il=a=>{var i;return!a||(a==null?void 0:a.length)===0?[]:(i=p.cloneDeep(a))==null?void 0:i.map(l=>(no.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??no.value,children:Il(l==null?void 0:l.children)},l))},ai=a=>{var s;return(s=p.cloneDeep(a))==null?void 0:s.map(l=>(no.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"left",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??no.value,children:Il(l==null?void 0:l.children)},l))},Bl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===i)?(s=p.cloneDeep(a))==null?void 0:s.filter(c=>(c==null?void 0:c.id)!==i):(a=a==null?void 0:a.map(l=>(l.children=Bl(l==null?void 0:l.children,i),l)),a)},Al=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.map(c=>((c==null?void 0:c.id)===(i==null?void 0:i.id)&&(c=i),c)):(a=a==null?void 0:a.map(l=>(l.children=Al(l==null?void 0:l.children,i),l)),a)},Nl=(a,i)=>{var s;return a!=null&&a.find(l=>{var c;return(l==null?void 0:l.id)===((c=i==null?void 0:i.contents)==null?void 0:c.id)})?(s=p.cloneDeep(a))==null?void 0:s.map(c=>{var d;return(c==null?void 0:c.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)&&(c=i==null?void 0:i.contents),c}):(a=a==null?void 0:a.map(l=>(l.children=Nl(l==null?void 0:l.children,i),l)),a)},Vl=(a,i)=>{var s;return a!=null&&a.find(l=>(l==null?void 0:l.id)===(i==null?void 0:i.id))?(s=p.cloneDeep(a))==null?void 0:s.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)):(a=a==null?void 0:a.map(l=>(l.children=Vl(l==null?void 0:l.children,i),l)),a)},Vt=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],oi=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],li=[{label:"新增",value:"add"}],zn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"background",label:"按钮背景色",type:"Color"}],Rn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:oi},{key:"textColor",label:"按钮颜色",type:"Color"}],ri={class:"table-header-child"},ii={class:"table-header-child-main"},si={class:"table-header-child-content"},ci={class:"table-header-child-content-item"},ui={class:"fix-button"},pi={key:0},di={class:"form-content"},fi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),b=Te.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(b);e.ref(0);const h=e.ref(""),w=e.ref([]),E=e.ref([]),S=C=>{var x;c.value=!0;let P=[];Vt==null||Vt.forEach(T=>{let I=p.cloneDeep(v.value)+1;b.setTableIndex(I),P.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:C[T.key],id:v.value,contents:T==null?void 0:T.options})}),C!=null&&C.children&&((x=C==null?void 0:C.children)==null?void 0:x.length)>0&&P.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,w.value=P,E.value=P},M=C=>{l("fixChange",p.cloneDeep(C))},O=C=>{l("deleteChange",p.cloneDeep(C))},W=C=>{c.value=!0;let P=[];Vt==null||Vt.forEach(x=>{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),P.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:v.value,contents:x==null?void 0:x.options})}),d.value=C==null?void 0:C.id,w.value=P,E.value=P},Ee=C=>{let P=p.cloneDeep(E.value);P=P==null?void 0:P.map(x=>(x.children||(x.value=C==null?void 0:C[x.name]),x)),E.value=P},Y=()=>{var P,x;w.value=E.value;let C={};if(h.value!=="")C.id=h.value,(P=w.value)==null||P.forEach(T=>{const I=Vt==null?void 0:Vt.find(Q=>(Q==null?void 0:Q.label)===(T==null?void 0:T.label));I?C[I.key]=T.value:T!=null&&T.children&&T.children.length>0&&(C.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"fix"});else{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),C.id="id"+v.value,(x=w.value)==null||x.forEach(I=>{const Q=Vt==null?void 0:Vt.find(Le=>(Le==null?void 0:Le.label)===(I==null?void 0:I.label));Q?C[Q.key]=I.value:I!=null&&I.children&&I.children.length>0&&(C.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"add"})}h.value="",w.value=[],E.value=[]},$=()=>{c.value=!1,h.value="",d.value="",w.value=[],E.value=[]},pe=C=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",C),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(C,P)=>{const x=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(T,I)=>(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,e.toDisplayString(T.label),1),e.createElementVNode("div",ui,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>W(T)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>S(T)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Q=>pe(T)},null,8,["onClick"])])]),T!=null&&T.children&&T.children.length>0?(e.openBlock(),e.createElementBlock("div",pi,[e.createVNode(Ol,{tableChildContents:T==null?void 0:T.children,onDeleteChange:O,onFixChange:M},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:$,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",di,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:Ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:$,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:Y},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hi=Lt._export_sfc(fi,[["__scopeId","data-v-e0fef72d"]]),vi={class:"table-header-child"},gi={class:"table-header-child-main"},mi={class:"table-header-child-content"},yi={class:"table-header-child-content-item"},bi={class:"fix-button"},ki={key:0},xi={class:"form-content"},wi={class:"dialog-footer"},Di={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref(""),b=Te.useTableComp(p.pinia),{tableIndex:v}=p.storeToRefs(b),h=e.ref(""),w=e.ref([]),E=e.ref([]),S=C=>{l("fixChange",p.cloneDeep(C))},M=C=>{var x;c.value=!0;let P=[];Vt==null||Vt.forEach(T=>{let I=p.cloneDeep(v.value)+1;b.setTableIndex(I),P.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:C[T.key],id:v.value,contents:T==null?void 0:T.options})}),C!=null&&C.children&&((x=C==null?void 0:C.children)==null?void 0:x.length)>0&&P.push({children:C==null?void 0:C.children,isFormColHidden:!0}),h.value=C==null?void 0:C.id,w.value=P,E.value=P},O=C=>{c.value=!0;let P=[];Vt==null||Vt.forEach(x=>{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),P.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:v.value,contents:x==null?void 0:x.options})}),d.value=C==null?void 0:C.id,w.value=P,E.value=P},W=C=>{let P=p.cloneDeep(E.value);P=P==null?void 0:P.map(x=>(x.children||(x.value=C==null?void 0:C[x.name]),x)),E.value=P},Ee=()=>{var P,x;w.value=E.value;let C={};if(h.value!=="")C.id=h.value,(P=w.value)==null||P.forEach(T=>{const I=Vt==null?void 0:Vt.find(Q=>(Q==null?void 0:Q.label)===(T==null?void 0:T.label));I?C[I.key]=T.value:T!=null&&T.children&&T.children.length>0&&(C.children=T.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"fix"});else{let T=p.cloneDeep(v.value)+1;b.setTableIndex(T),C.id="idChild"+v.value,(x=w.value)==null||x.forEach(I=>{const Q=Vt==null?void 0:Vt.find(Le=>(Le==null?void 0:Le.label)===(I==null?void 0:I.label));Q?C[Q.key]=I.value:I!=null&&I.children&&I.children.length>0&&(C.children=I.children)}),c.value=!1,l("fixChange",{contents:p.cloneDeep(C),id:d.value,type:"add"})}h.value="",w.value=[],E.value=[]},Y=()=>{c.value=!1,h.value="",d.value="",w.value=[],E.value=[]},$=C=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",C),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pe=C=>{l("deleteChange",C)};return(C,P)=>{const x=e.resolveComponent("svg-icon"),T=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(I,Q)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createElementVNode("div",mi,[e.createElementVNode("div",yi,e.toDisplayString(I.label),1),e.createElementVNode("div",bi,[e.createVNode(x,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>O(I)},null,8,["onClick"]),e.createVNode(x,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>M(I)},null,8,["onClick"]),e.createVNode(x,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Le=>$(I)},null,8,["onClick"])])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(hi,{tableChildContents:I==null?void 0:I.children,onDeleteChange:pe,onFixChange:S},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:Y,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:W},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",wi,[e.createVNode(T,{onClick:Y,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>P[0]||(P[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(T,{class:"ok-button button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>P[1]||(P[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Ol=Lt._export_sfc(Di,[["__scopeId","data-v-ebd68fa1"]]),Ci={class:"table-operate-content"},Ei={class:"table-operate-item"},_i={class:"operate-title"},Si={class:"operate-content"},Ti={class:"fix-content"},Ii={class:"fix-content-label"},Bi={class:"fix-button"},Ai={key:0},Ni={class:"operate-title"},Vi={class:"operate-content"},Oi={class:"fix-content"},Mi={class:"fix-content-label"},Pi={class:"fix-button"},zi={class:"operate-title"},Ri={class:"operate-content"},Li={class:"fix-content"},Fi={class:"fix-content-label"},$i={class:"fix-button"},ji={class:"operate-title"},Ui={class:"operate-content"},Ki={class:"fix-content"},Wi={class:"fix-content-label"},Hi={class:"fix-button"},qi={class:"operate-content"},Gi={style:{display:"flex","justify-content":"space-between"}},Xi={class:"form-content"},Yi={class:"dialog-footer"},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},ns={class:"dialog-footer"},as={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),b=e.ref(!1),v=e.ref([]),h=e.ref(!1),w=e.ref([]),E=e.ref(!1),S=e.ref([]),M=e.ref(""),O=e.ref(""),W=e.ref([]),Ee=e.ref([]),Y=e.ref([]),$=e.ref([]),pe=e.ref(!1),C=e.ref([]),P=e.ref([]),x=e.ref(0),T=e.ref([]),I=e.ref([]),Q=e.ref([]),Le=()=>{pe.value=!0;let k=[];zn==null||zn.forEach(V=>{x.value++,k.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:(V==null?void 0:V.key)==="background"?"var(--ssComponent-primary-color)":"",id:x.value,contents:V==null?void 0:V.options})}),C.value=k,P.value=k},tt=()=>{var V,U,y;b.value=!0;let k=[];(y=(U=(V=Te.FormContent)==null?void 0:V.find(D=>(D==null?void 0:D.key)==="Input"))==null?void 0:U.value)==null||y.forEach(D=>{x.value++,k.push({label:D==null?void 0:D.label,name:(D==null?void 0:D.name)||(D==null?void 0:D.label),type:D.type,value:(D==null?void 0:D.label)==="类型"?"Input":"",id:x.value,contents:D==null?void 0:D.options})}),T.value=k,I.value=k},ze=k=>{k||(T.value=I.value)},We=async k=>{var V,U,y,D,q,X,G,J,de,K,_e,ke;if((k==null?void 0:k.类型)!==((U=(V=I.value)==null?void 0:V.find(ae=>(ae==null?void 0:ae.label)==="类型"))==null?void 0:U.value)){let ae=[],H=await((q=(D=(y=Te.FormContent)==null?void 0:y.find(le=>(le==null?void 0:le.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:D.value)==null?void 0:q.value)?await((K=(de=(J=Te.FormContent)==null?void 0:J.find(le=>(le==null?void 0:le.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:de.value)==null?void 0:K.value):(G=(X=Te.FormContent)==null?void 0:X.find(le=>(le==null?void 0:le.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:G.value;if(H==null||H.forEach(le=>{x.value++,ae.push({label:le==null?void 0:le.label,name:(le==null?void 0:le.name)||(le==null?void 0:le.label),type:le.type,value:le!=null&&le.属性名?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):(k==null?void 0:k[le.label])??"",id:x.value,contents:le==null?void 0:le.options,prop:(le==null?void 0:le.prop)||(le==null?void 0:le.name)||(le==null?void 0:le.label)})}),k!=null&&k.菜单选项&&((_e=k==null?void 0:k.菜单选项)==null?void 0:_e.length)>0){const le=await Te.menuToContentType(k==null?void 0:k.菜单选项);ae=ae==null?void 0:ae.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=le),Fe))}I.value=await Te.selectToBase(p.cloneDeep(ae)),T.value=await Te.selectToBase(p.cloneDeep(ae))}else{let ae=p.cloneDeep(T.value);if(ae=ae==null?void 0:ae.map(H=>(H.value=k==null?void 0:k[H.name],H)),k!=null&&k.菜单选项&&((ke=k==null?void 0:k.菜单选项)==null?void 0:ke.length)>0){const H=await Te.menuToContentType(k==null?void 0:k.菜单选项);ae=ae==null?void 0:ae.map(le=>((le==null?void 0:le.name)==="组信息选项"&&(le.contents=H),le))}ae=Te.formToOptionsContents(ae),I.value=await Te.selectToBase(p.cloneDeep(ae))}},De=async k=>{await We(k),T.value=I.value},A=(k,V)=>{if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="selectRelateType"){const U=V==null?void 0:V.optionUrl;return(U==null?void 0:U.selectRelateType)||V[k.key]}if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="menuSelect"){const U=V==null?void 0:V.optionUrl;return(U==null?void 0:U.menuSelect)||V[k.key]}if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="groupSelect"){const U=V==null?void 0:V.optionUrl;return(U==null?void 0:U.groupSelect)||V[k.key]}if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="originalContent")return(V==null?void 0:V.value)||V[k.key];if((V==null?void 0:V.type)=="Select"&&(k==null?void 0:k.key)==="multiple"){const U=V[k.key];return Sl(U)?U:k.default}return(k==null?void 0:k.label)==="类型"&&V[k.key]===""?"Input":(k==null?void 0:k.key)==="isFormColHidden"&&!V[k.key]?!1:V[k.key]},oe=async k=>{var y,D,q,X,G,J,de,K,_e;b.value=!0;let V=[];const U=await((q=(D=(y=Te.FormContent)==null?void 0:y.find(ke=>(ke==null?void 0:ke.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:D.value)==null?void 0:q.value)?await((K=(de=(J=Te.FormContent)==null?void 0:J.find(ke=>(ke==null?void 0:ke.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:de.value)==null?void 0:K.value):(G=(X=Te.FormContent)==null?void 0:X.find(ke=>(ke==null?void 0:ke.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:G.value;if(U==null||U.forEach(ke=>{x.value++,V.push({label:ke==null?void 0:ke.label,name:(ke==null?void 0:ke.name)||(ke==null?void 0:ke.label),type:ke.type,value:(ke==null?void 0:ke.label)==="属性名"?(k==null?void 0:k.prop)||(k==null?void 0:k.name)||(k==null?void 0:k.label):A(ke,k),id:x.value,contents:ke==null?void 0:ke.options})}),k!=null&&k.menuSelect&&((_e=k==null?void 0:k.menuSelect)==null?void 0:_e.length)>0){const ke=await Te.menuToContentType(k==null?void 0:k.menuSelect);V=V==null?void 0:V.map(ae=>((ae==null?void 0:ae.name)==="组信息选项"&&(ae.contents=ke),ae))}M.value=k==null?void 0:k.id,T.value=await Te.selectToBase(Te.formToOptionsContents(V)),I.value=await Te.selectToBase(Te.formToOptionsContents(V))},ne=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;Q.value=(V=p.cloneDeep(Q.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="tableToForm"&&(y.contents=Q.value),y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},me=()=>{b.value=!1,T.value=[],M.value=""},Xe=async()=>{var y,D,q,X,G,J,de,K,_e,ke;T.value=I.value;let k={};M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value);let V=await((q=(D=(y=Te.FormContent)==null?void 0:y.find(ae=>{var H,le;return(ae==null?void 0:ae.key)===(((le=(H=T.value)==null?void 0:H.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:D.value)==null?void 0:q.value)??((G=(X=Te.FormContent)==null?void 0:X.find(ae=>{var H,le;return(ae==null?void 0:ae.key)===(((le=(H=T.value)==null?void 0:H.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:le.value)??"label")}))==null?void 0:G.value);if((J=T.value)==null||J.forEach(ae=>{const H=V==null?void 0:V.find(le=>(le==null?void 0:le.label)===(ae==null?void 0:ae.label));H&&(k[H.key]=ae.value)}),k.name=k.label,(de=Q.value)!=null&&de.find(ae=>ae.id===k.id))Q.value=(K=Q.value)==null?void 0:K.map(ae=>(ae.id===k.id&&(ae=k),ae));else{let ae=p.cloneDeep(Q.value);Q.value||(Q.value=[]),ae.push(k),Q.value=ae}Q.value=Q.value.map(({id:ae,...H})=>H),b.value=!1,M.value="";let U=p.cloneDeep(s.originalItemContents);(_e=p.cloneDeep(s.originalItemContents))!=null&&_e.find(ae=>(ae==null?void 0:ae.key)==="tableToForm")?U=(ke=p.cloneDeep(s.originalItemContents))==null?void 0:ke.map(ae=>((ae==null?void 0:ae.key)==="tableToForm"&&(ae.contents=Q.value),ae)):U.push({key:"tableToForm",contents:Q.value}),l("change",U)},nt=k=>{pe.value=!0;let V=[];zn==null||zn.forEach(U=>{x.value++,V.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:k[U.key],id:x.value,contents:U==null?void 0:U.options})}),M.value=k==null?void 0:k.id,C.value=V,P.value=V};e.watch(()=>E.value,()=>{var V,U;let k=p.cloneDeep(s.originalItemContents);(V=p.cloneDeep(s.originalItemContents))!=null&&V.find(y=>(y==null?void 0:y.key)==="page")?k=(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="page"&&(y.contents=E.value),y)):k.push({key:"page",contents:E.value}),l("change",k)},{deep:!0});const Pe=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;Ee.value=(V=p.cloneDeep(Ee.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="extraButton"&&(y.contents=Ee.value),y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},j=()=>{var U,y,D,q,X;C.value=P.value;let k={};if(M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value),(U=C.value)==null||U.forEach(G=>{const J=zn==null?void 0:zn.find(de=>(de==null?void 0:de.label)===(G==null?void 0:G.label));J?k[J.key]=G.value:G!=null&&G.children&&G.children.length>0&&(k.children=G.children)}),(y=Ee.value)!=null&&y.find(G=>G.id===k.id))Ee.value=(D=Ee.value)==null?void 0:D.map(G=>(G.id===k.id&&(G=k),G));else{let G=p.cloneDeep(Ee.value)??[];G.push(k),Ee.value=G}pe.value=!1,M.value="";let V=p.cloneDeep(s.originalItemContents);(q=p.cloneDeep(s.originalItemContents))!=null&&q.find(G=>(G==null?void 0:G.key)==="extraButton")?V=(X=p.cloneDeep(s.originalItemContents))==null?void 0:X.map(G=>((G==null?void 0:G.key)==="extraButton"&&(G.contents=Ee.value),G)):V.push({key:"extraButton",contents:Ee.value}),l("change",V)},Qe=k=>{let V=p.cloneDeep(P.value);V=V==null?void 0:V.map(U=>(U.children||(U.value=k==null?void 0:k[U.name]),U)),P.value=V},Ke=()=>{pe.value=!1,C.value=[],M.value=""},vt=k=>{h.value=!0;let V=[];Rn==null||Rn.forEach(U=>{x.value++,V.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:k[U.key],id:x.value,contents:U==null?void 0:U.options})}),M.value=k==null?void 0:k.id,Y.value=V,$.value=V},yt=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;W.value=(V=p.cloneDeep(W.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>((y==null?void 0:y.key)==="rowButton"&&(y.contents=W.value),y))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},ct=()=>{d.value=!0;let k=[];Vt==null||Vt.forEach(V=>{x.value++,k.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),w.value=k,S.value=k},at=()=>{h.value=!0;let k=[];Rn==null||Rn.forEach(V=>{x.value++,k.push({label:V==null?void 0:V.label,name:V==null?void 0:V.label,type:V.type,value:"",id:x.value,contents:V==null?void 0:V.options})}),Y.value=k,$.value=k},St=k=>{let V=p.cloneDeep($.value);V=V==null?void 0:V.map(U=>(U.children||(U.value=k==null?void 0:k[U.name]),U)),$.value=V},ge=()=>{var U,y,D,q,X;Y.value=$.value;let k={};if(M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value),(U=Y.value)==null||U.forEach(G=>{const J=Rn==null?void 0:Rn.find(de=>(de==null?void 0:de.label)===(G==null?void 0:G.label));J?k[J.key]=G.value:G!=null&&G.children&&G.children.length>0&&(k.children=G.children)}),(y=W.value)!=null&&y.find(G=>G.id===k.id))W.value=(D=W.value)==null?void 0:D.map(G=>(G.id===k.id&&(G=k),G));else{let G=p.cloneDeep(W.value);G.push(k),W.value=G}h.value=!1,M.value="";let V=p.cloneDeep(s.originalItemContents);(q=p.cloneDeep(s.originalItemContents))!=null&&q.find(G=>(G==null?void 0:G.key)==="rowButton")?V=(X=p.cloneDeep(s.originalItemContents))==null?void 0:X.map(G=>((G==null?void 0:G.key)==="rowButton"&&(G.contents=W.value),G)):V.push({key:"rowButton",contents:W.value}),l("change",V)},be=()=>{h.value=!1,M.value="",$.value=[],Y.value=[]},Ye=k=>{d.value=!0;let V=[];Vt==null||Vt.forEach(U=>{x.value++,V.push({label:U==null?void 0:U.label,name:U==null?void 0:U.label,type:U.type,value:"",id:x.value,contents:U==null?void 0:U.options})}),w.value=V,O.value=k==null?void 0:k.id,S.value=V},Ae=k=>{var V;v.value=Bl(p.cloneDeep(v.value),k==null?void 0:k.id),l("change",(V=p.cloneDeep(s.originalItemContents))==null?void 0:V.map(U=>{var y;return(U==null?void 0:U.key)==="header"&&(U.contents=(y=v.value)!=null&&y.some(D=>D==null?void 0:D.children)?[v.value]:v.value),U}))},se=k=>{var U,y,D;k.type==="fix"?k.id!==""?v.value=Nl(v.value,k):v.value=Al(v.value,k==null?void 0:k.contents):v.value=Vl(v.value,k),v.value=(U=v.value)!=null&&U.some(q=>q==null?void 0:q.children)?[v.value]:v.value,M.value="";let V=p.cloneDeep(s.originalItemContents);(y=p.cloneDeep(s.originalItemContents))!=null&&y.find(q=>(q==null?void 0:q.key)==="header")?V=(D=p.cloneDeep(s.originalItemContents))==null?void 0:D.map(q=>((q==null?void 0:q.key)==="header"&&(q.contents=v.value),q)):V.push({key:"header",contents:v.value}),l("change",V)},te=k=>{var U;d.value=!0;let V=[];Vt==null||Vt.forEach(y=>{x.value++,V.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:k[y.key],id:x.value,contents:y==null?void 0:y.options})}),k!=null&&k.children&&((U=k==null?void 0:k.children)==null?void 0:U.length)>0&&V.push({children:k==null?void 0:k.children,isFormColHidden:!0}),M.value=k==null?void 0:k.id,O.value="",w.value=V,S.value=V},ce=k=>{let V=p.cloneDeep(S.value);V=V==null?void 0:V.map(U=>(U.children||(U.value=k==null?void 0:k[U.name]),U)),S.value=V},Be=()=>{d.value=!1,M.value="",O.value="",S.value=[]},Je=()=>{var U,y,D,q,X,G;w.value=S.value;let k={};if(M.value!==""?k.id=M.value:(x.value++,k.id="id"+x.value),(U=w.value)==null||U.forEach(J=>{const de=Vt==null?void 0:Vt.find(K=>(K==null?void 0:K.label)===(J==null?void 0:J.label));de?k[de.key]=J.value:J!=null&&J.children&&J.children.length>0&&(k.children=J.children)}),(y=v.value)!=null&&y.find(J=>J.id===k.id))v.value=(D=v.value)==null?void 0:D.map(J=>(J.id===k.id&&(J=k),J));else{let J=p.cloneDeep(v.value)??[];O.value===""?J.push(k):J=J==null?void 0:J.map(de=>(de.id===O.value&&(de.children||(de.children=[]),de.children.push(k)),de)),v.value=J}v.value=(q=v.value)!=null&&q.some(J=>J==null?void 0:J.children)?[v.value]:v.value,d.value=!1,M.value="",O.value="";let V=p.cloneDeep(s.originalItemContents);(X=p.cloneDeep(s.originalItemContents))!=null&&X.find(J=>(J==null?void 0:J.key)==="header")?V=(G=p.cloneDeep(s.originalItemContents))==null?void 0:G.map(J=>((J==null?void 0:J.key)==="header"&&(J.contents=v.value),J)):V.push({key:"header",contents:v.value}),l("change",V)},ut=k=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var V,U;v.value=(V=p.cloneDeep(v.value))==null?void 0:V.filter(y=>(y==null?void 0:y.id)!==(k==null?void 0:k.id)),l("change",(U=p.cloneDeep(s.originalItemContents))==null?void 0:U.map(y=>{var D;return(y==null?void 0:y.key)==="header"&&(y.contents=(D=v.value)!=null&&D.some(q=>q==null?void 0:q.children)?[v.value]:v.value),y})),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(c.value=p.cloneDeep(s.originalItemContents),v.value=(V=(k=c.value)==null?void 0:k.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:V.contents,W.value=(y=(U=c.value)==null?void 0:U.find(z=>(z==null?void 0:z.key)==="rowButton"))==null?void 0:y.contents,Ee.value=(q=(D=c.value)==null?void 0:D.find(z=>(z==null?void 0:z.key)==="extraButton"))==null?void 0:q.contents,E.value=(G=(X=c.value)==null?void 0:X.find(z=>(z==null?void 0:z.key)==="page"))!=null&&G.contents?!!((de=(J=c.value)==null?void 0:J.find(z=>(z==null?void 0:z.key)==="page"))!=null&&de.contents):!1,Q.value=(_e=(K=c.value)==null?void 0:K.find(z=>(z==null?void 0:z.key)==="tableToForm"))==null?void 0:_e.contents,v.value=(ke=v.value)==null?void 0:ke.map((z,he)=>(Array.isArray(z)?z=ai(z):z={label:(z==null?void 0:z.label)??"",prop:(z==null?void 0:z.label)==="操作"?"operate":z==null?void 0:z.prop,width:z!=null&&z.width?parseInt(z.width):"",fixed:(z==null?void 0:z.fixed)??void 0,sortable:(z==null?void 0:z.sortable)??!1,align:(z==null?void 0:z.align)??"left",showOverflowTooltip:(z==null?void 0:z.showOverflowTooltip)??!0,isNotDrag:(z==null?void 0:z.isNotDrag)??!1,isEditCol:(z==null?void 0:z.isEditCol)??!1,isOperate:(z==null?void 0:z.isOperate)??!1,id:(z==null?void 0:z.id)??he,formMenuSelect:(z==null?void 0:z.formMenuSelect)??void 0,groupSelect:(z==null?void 0:z.groupSelect)??void 0},z)),v.value=(ae=v.value)!=null&&ae.every(z=>Array.isArray(z))?(H=v.value)==null?void 0:H[0]:v.value,W.value=(le=W.value)==null?void 0:le.map((z,he)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",textColor:(z==null?void 0:z.textColor)??"#000000",id:(z==null?void 0:z.id)??he}),Ee.value=(Fe=Ee.value)==null?void 0:Fe.map((z,he)=>z={label:(z==null?void 0:z.label)??"",type:(z==null?void 0:z.type)??"",background:(z==null?void 0:z.background)??"var(--ssComponent-primary-color)",id:(z==null?void 0:z.id)??he}),Q.value)Q.value=(Ge=Q.value)==null?void 0:Ge.map(z=>{x.value++;let he=z;return he.id=x.value,he});else{let z=[];const he=(ye=Te.getColumnChild(p.cloneDeep(v.value)))==null?void 0:ye.filter(Ne=>(Ne==null?void 0:Ne.prop)!=="operate");he==null||he.forEach(Ne=>{var He;x.value++,z.push({label:Ne==null?void 0:Ne.label,name:Ne==null?void 0:Ne.label,type:Ne!=null&&Ne.groupSelect?"Select":"Input",value:"",id:x.value,contents:Ne==null?void 0:Ne.options,menuSelect:Ne==null?void 0:Ne.formMenuSelect,groupSelect:(He=Ne==null?void 0:Ne.groupSelect)==null?void 0:He.split(":"),selectRelateType:"关联绑定列"})}),Q.value=z}},{deep:!0,immediate:!0}),(k,V)=>{const U=e.resolveComponent("svg-icon"),y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ci,[e.createElementVNode("div",Ei,[e.createElementVNode("div",_i,[V[2]||(V[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(y,{class:"icon-content",onClick:ct,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[1]||(V[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Ti,[e.createElementVNode("div",Ii,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Bi,[e.createVNode(U,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>Ye(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>te(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>ut(D)},null,8,["onClick"])])]),D!=null&&D.children&&D.children.length>0?(e.openBlock(),e.createElementBlock("div",Ai,[e.createVNode(Ol,{tableChildContents:D==null?void 0:D.children,onDeleteChange:Ae,onFixChange:se},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Ni,[V[4]||(V[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(y,{class:"icon-content",id:"themeButton",onClick:at},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[3]||(V[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Oi,[e.createElementVNode("div",Mi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Pi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:X=>vt(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>yt(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",zi,[V[6]||(V[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(y,{class:"icon-content",id:"themeButton",onClick:Le},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[5]||(V[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Ri,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ee.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Li,[e.createElementVNode("div",Fi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",$i,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:X=>nt(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>Pe(D)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",ji,[V[8]||(V[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(y,{class:"icon-content",id:"themeButton",onClick:tt},{icon:e.withCtx(()=>[e.createVNode(U,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[V[7]||(V[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Ui,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q.value,(D,q)=>(e.openBlock(),e.createElementBlock("div",{key:q},[e.createElementVNode("div",Ki,[e.createElementVNode("div",Wi,e.toDisplayString(D==null?void 0:D.label),1),e.createElementVNode("div",Hi,[e.createVNode(U,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:X=>oe(D)},null,8,["onClick"]),e.createVNode(U,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:X=>ne(D)},null,8,["onClick"])])])]))),128))]),V[10]||(V[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",qi,[e.createElementVNode("div",Gi,[V[9]||(V[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":V[0]||(V[0]=D=>E.value=D)},null,8,["modelValue"])])])]),e.createVNode(Xt.ssDialog,{visible:d.value,onBeforeDestroy:Be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Xi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:ce},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yi,[e.createVNode(y,{onClick:Be,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[11]||(V[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(y,{class:"ok-button button",onClick:Je,id:"themeButton"},{default:e.withCtx(()=>V[12]||(V[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:h.value,onBeforeDestroy:be,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:Y.value,key:Y.value,isEnableWrap:!0,onChange:St},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(y,{onClick:be,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[13]||(V[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(y,{class:"ok-button button",onClick:ge,id:"themeButton"},{default:e.withCtx(()=>V[14]||(V[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:pe.value,onBeforeDestroy:Ke,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:Qe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(y,{onClick:Ke,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[15]||(V[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(y,{class:"ok-button button",onClick:j,id:"themeButton"},{default:e.withCtx(()=>V[16]||(V[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:b.value,onBeforeDestroy:me,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:T.value,key:T.value,isEnableWrap:!0,onChange:We,onChangeVisible:ze,onBlurChange:De},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",ns,[e.createVNode(y,{onClick:me,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>V[17]||(V[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(y,{class:"ok-button button",onClick:Xe,id:"themeButton"},{default:e.withCtx(()=>V[18]||(V[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},os=Lt._export_sfc(as,[["__scopeId","data-v-0a7fc163"]]),ls=Te.useModelComp(p.pinia),{pageMapState:rs}=p.storeToRefs(ls),is=Te.useMenuState(p.pinia),{activeMenuPath:ss}=p.storeToRefs(is),cs=e.ref(24),us=e.ref(6),ps=e.ref(70),ds=e.ref(.18),fs=e.ref(45),hs=(a,i,s,l)=>{var c,d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C;return{x:((d=(c=a==null?void 0:a.value)==null?void 0:c.tableData)==null?void 0:d.x)||i%2*12,y:((v=(b=a==null?void 0:a.value)==null?void 0:b.tableData)==null?void 0:v.y)||i,w:((w=(h=a==null?void 0:a.value)==null?void 0:h.tableData)==null?void 0:w.w)||cs.value,h:((S=(E=a==null?void 0:a.value)==null?void 0:E.tableData)==null?void 0:S.h)||s,minW:((O=(M=a==null?void 0:a.value)==null?void 0:M.tableData)==null?void 0:O.minW)||us.value,minH:((Ee=(W=a==null?void 0:a.value)==null?void 0:W.tableData)==null?void 0:Ee.minH)||ds.value,maxH:(($=(Y=a==null?void 0:a.value)==null?void 0:Y.tableData)==null?void 0:$.maxH)||fs.value,i:((C=(pe=a==null?void 0:a.value)==null?void 0:pe.tableData)==null?void 0:C.i)||i,id:(a==null?void 0:a.id)||i+"",component:l}},vs=(a,i)=>{var l,c,d,b,v,h,w,E;let s=1;if(a!=null&&a.compData&&Array.isArray(a==null?void 0:a.compData))if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){if(((b=(d=(c=a==null?void 0:a.compData)==null?void 0:c.find(M=>(M==null?void 0:M.key)==="tableContents"))==null?void 0:d.contents)==null?void 0:b.length)===0)return 2}else((v=a==null?void 0:a.comp)==null?void 0:v.toUpperCase())==="FORM"&&(s=((E=(w=(h=a==null?void 0:a.compData)==null?void 0:h.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:w.contents)==null?void 0:E.length)/5);return s*2},Ml=(a,i,s)=>{var b,v;const l=(v=(b=rs.value)==null?void 0:b[ss.value])==null?void 0:v.filter(h=>{var w;return((w=h==null?void 0:h.key)==null?void 0:w.type)==="gridLayout"}),c=l==null?void 0:l.find(h=>{var w,E,S;return((S=(E=(w=h==null?void 0:h.value)==null?void 0:w.tableData)==null?void 0:E.component)==null?void 0:S.id)===a.id}),d=vs(a);return a!=null&&a.children&&(a==null?void 0:a.children.length)>0&&(a.children=a.children.map((h,w)=>Ml(h,w))),{...hs(c,i,d,a)}},gs=(a,i)=>{if((a==null?void 0:a.length)===0)return[];const s=p.cloneDeep(a);return Array.isArray(a)?s==null?void 0:s.map((l,c)=>Ml(l,c)):[]},ms=a=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ys=(a,i)=>a==null?void 0:a.map(s=>{for(const l in i)if(l===(s==null?void 0:s.prop))return{...s,value:i[l]};return s}),bs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]);e.watch(()=>s.compType,v=>{var E;const h=ms(s==null?void 0:s.optionItems),w=v?(E=h[v==null?void 0:v.toUpperCase()])==null?void 0:E[s==null?void 0:s.target]:[];c.value=w==null?void 0:w.map(S=>{for(const[M,O]of Object.entries((s==null?void 0:s.comp)||{}))if((S==null?void 0:S.prop)===M)return{...S,value:O};return S})},{immediate:!0});const d=v=>Bt.getComponent(v),b=v=>{var h,w;(v==null?void 0:v.prop)==="layout"&&(v==null?void 0:v.value)==="horizontal"?c.value=(h=c.value)==null?void 0:h.map(E=>{var S;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(S=E==null?void 0:E.options)==null?void 0:S.map(M=>({...M,disabled:!0}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!0}:E}):c.value=(w=c.value)==null?void 0:w.map(E=>{var S;return(E==null?void 0:E.prop)==="isStepLayout"?{...E,options:(S=E==null?void 0:E.options)==null?void 0:S.map(M=>({...M,disabled:!1}))}:(E==null?void 0:E.prop)==="isGridLayout"?{...E,disabled:!1}:E}),l("change",{target:s==null?void 0:s.target,styleConfigs:c.value,prop:v==null?void 0:v.prop})};return(v,h)=>{const w=e.resolveComponent("el-col"),E=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,S=>(e.openBlock(),e.createBlock(E,{class:"style-row",key:S==null?void 0:S.prop},{default:e.withCtx(()=>[e.createVNode(w,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S==null?void 0:S.label)+":",1)]),_:2},1024),e.createVNode(w,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(S.type)),{modelValue:S.value,"onUpdate:modelValue":M=>S.value=M,content:S==null?void 0:S.options,optionUrl:S==null?void 0:S.optionUrl,disabled:S==null?void 0:S.disabled,activeText:S==null?void 0:S.activeText,inactiveText:S==null?void 0:S.inactiveText,onChange:M=>b(S)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ks=Lt._export_sfc(bs,[["__scopeId","data-v-a99af9a7"]]),xs=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(a,{emit:i}){const s=a,l=i,c=[{required:!0,message:"输入不能为空",trigger:"blur"}],d=e.ref([]),b=$=>$==null?void 0:$.reduce((pe,C)=>(pe[C==null?void 0:C.prop]=C==null?void 0:C.rule,pe),{}),v=e.computed(()=>({formRules:b(d.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),h=e.ref([]),w=e.ref(""),E=($,pe,C)=>{var T;let P=[];(s==null?void 0:s.activeTabName)==="任务配置"?(P=[{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:$},{label:"按钮名称",value:"按钮名称",children:pe}]},{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:"暂停"}]}],d.value=[{prop:"任务名称",rule:c},{prop:"任务关键词",rule:c},{prop:"执行任务",rule:c},{prop:"执行动作",rule:c},{prop:"执行交互",rule:c}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(P=[{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:(T=s==null?void 0:s.relatedData)==null?void 0:T.map(I=>({label:I==null?void 0:I.任务名称,value:I==null?void 0:I.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],d.value=[{prop:"关联名称",rule:c},{prop:"关联状态",rule:c},{prop:"关联形式",rule:c},{prop:"关联任务集合",rule:c}]);let x;return C&&(C==null?void 0:C.length)>0?x=[...P,...S($,pe,C)]:x=P,x},S=($,pe,C)=>{const P=[{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 C?P==null?void 0:P.filter(x=>C==null?void 0:C.includes(x==null?void 0:x.prop)):P},M=($,pe)=>{var I,Q,Le,tt,ze,We,De,A,oe;const C=((ze=(tt=(Le=(Q=(I=s==null?void 0:s.comp)==null?void 0:I.compData)==null?void 0:Q.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:Le.contents)==null?void 0:tt.filter(ne=>(ne==null?void 0:ne.label)!=="操作"))==null?void 0:ze.map(ne=>({value:ne==null?void 0:ne.prop,label:ne.label})))||[],P=/button/i,x=((oe=(A=(De=(We=s==null?void 0:s.comp)==null?void 0:We.compData)==null?void 0:De.filter(ne=>P.test(ne==null?void 0:ne.key)))==null?void 0:A.flatMap(ne=>ne==null?void 0:ne.contents))==null?void 0:oe.map(ne=>({value:ne==null?void 0:ne.label,label:ne.label})))||[],T=E(C,x,$);h.value=pe?ys(T,pe):T,$&&($==null?void 0:$.length)>0&&d.value.push(...$==null?void 0:$.map(ne=>({prop:ne,rule:c})))};e.onMounted(()=>{M(null,s==null?void 0:s.extendItem)});const O=$=>{const pe=$==null?void 0:$[w.value];if(w.value==="执行任务"){if(!(pe!=null&&pe.join("/")))return;const C=pe==null?void 0:pe.join("/");M(C==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:C==="进度设置/进度条"?["进度关键词"]:null,$)}},W=$=>{l("change",{target:s==null?void 0:s.target,extendConfigs:$})},Ee=($,pe)=>{w.value=pe==null?void 0:pe.changeProp,O($)},Y=$=>{l("onButtonClick",$)};return($,pe)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:h.value,key:h.value,isStartJustify:!1,isEnableWrap:!1,formRules:v.value.formRules,buttonValue:v.value.buttonValue,onChange:W,onBlurChange:Ee,onOnButtonClick:Y},null,8,["rowContents","formRules","buttonValue"]))}}),ws=Lt._export_sfc(xs,[["__scopeId","data-v-7c660c1f"]]),Ds={};function Cs(a,i){return null}const Es=Lt._export_sfc(Ds,[["render",Cs]]),_s={class:"form-operate-content"},Ss={class:"form-operate-item"},Ts={class:"operate-title"},Is={class:"operate-content"},Bs={class:"fix-content"},As={class:"fix-button"},Ns={class:"operate-title"},Vs={class:"operate-content"},Os={class:"fix-content"},Ms={class:"fix-button"},Ps={style:{display:"flex","justify-content":"space-between"}},zs={class:"form-content"},Rs={class:"dialog-footer"},Ls={class:"form-content"},Fs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(!1),d=e.ref([]),b=e.ref([]),v=e.ref(!1),h=e.ref([]),w=e.ref([]),E=e.ref(""),S=e.ref(!1),M=e.ref(0),O=e.ref([]),W=e.ref([]),Ee=(A,oe)=>{if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="selectRelateType"){const ne=oe==null?void 0:oe.optionUrl;return(ne==null?void 0:ne.selectRelateType)||oe[A.key]}if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="menuSelect"){const ne=oe==null?void 0:oe.optionUrl;return(ne==null?void 0:ne.menuSelect)||oe[A.key]}if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="groupSelect"){const ne=oe==null?void 0:oe.optionUrl;return(ne==null?void 0:ne.groupSelect)||oe[A.key]}if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="originalContent")return(oe==null?void 0:oe.value)||oe[A.key];if((oe==null?void 0:oe.type)=="Select"&&(A==null?void 0:A.key)==="multiple"){const ne=oe[A.key];return Sl(ne)?ne:A.default}return(A==null?void 0:A.label)==="类型"&&oe[A.key]===""?"Input":(A==null?void 0:A.key)==="isFormColHidden"&&!oe[A.key]?!1:oe[A.key]},Y=async A=>{var me,Xe,nt,Pe,j,Qe;c.value=!0;let oe=[];const ne=await((nt=(Xe=(me=Te.FormContent)==null?void 0:me.find(Ke=>(Ke==null?void 0:Ke.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:Xe.value)==null?void 0:nt.value)??((j=(Pe=Te.FormContent)==null?void 0:Pe.find(Ke=>(Ke==null?void 0:Ke.key)===((A==null?void 0:A.type)===""?"Input":A==null?void 0:A.type)))==null?void 0:j.value);if(ne==null||ne.forEach(Ke=>{M.value++,oe.push({label:Ke==null?void 0:Ke.label,name:Ke==null?void 0:Ke.label,type:Ke.type,prop:Ke==null?void 0:Ke.prop,value:Ee(Ke,A),id:M.value,contents:Ke==null?void 0:Ke.options,width:(A==null?void 0:A.width)??1})}),A!=null&&A.menuSelect&&((Qe=A==null?void 0:A.menuSelect)==null?void 0:Qe.length)>0){const Ke=await Te.menuToContentType(A==null?void 0:A.menuSelect);oe=oe==null?void 0:oe.map(vt=>((vt==null?void 0:vt.name)==="组信息选项"&&(vt.contents=Ke),vt))}E.value=A==null?void 0:A.id,d.value=await Te.selectToBase(Te.formToOptionsContents(oe)),b.value=await Te.selectToBase(Te.formToOptionsContents(oe))},$=A=>{var ne;v.value=!0;let oe=[];(ne=Te.FormButton)==null||ne.forEach(me=>{M.value++,oe.push({label:me==null?void 0:me.label,name:me==null?void 0:me.label,type:me.type,value:(me==null?void 0:me.label)==="类型"&&A[me.key]===""?"normal":A[me.key],id:M.value,contents:me==null?void 0:me.options})}),O.value=oe,W.value=oe,E.value=A==null?void 0:A.id};e.watch(()=>S.value,()=>{var oe,ne;let A=p.cloneDeep(s.originalItemContents);(oe=p.cloneDeep(s.originalItemContents))!=null&&oe.find(me=>(me==null?void 0:me.key)==="enableWrap")?A=(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(me=>((me==null?void 0:me.key)==="enableWrap"&&(me.contents=!S.value),me)):A.push({key:"enableWrap",contents:!S.value}),l("change",A)},{deep:!0});const pe=()=>{var ne,me,Xe,nt,Pe;O.value=W.value;let A={};if(E.value!==""?A.id=E.value:(M.value++,A.id="id"+M.value),(ne=O.value)==null||ne.forEach(j=>{var Ke;const Qe=(Ke=Te.FormButton)==null?void 0:Ke.find(vt=>(vt==null?void 0:vt.label)===(j==null?void 0:j.label));Qe&&(A[Qe.key]=j.value)}),(me=h.value)!=null&&me.find(j=>j.id===A.id))h.value=(Xe=h.value)==null?void 0:Xe.map(j=>(j.id===A.id&&(j=A),j));else{let j=p.cloneDeep(h.value);h.value||(h.value=[]),j.push(A),h.value=j}v.value=!1,E.value="";let oe=p.cloneDeep(s.originalItemContents);(nt=p.cloneDeep(s.originalItemContents))!=null&&nt.find(j=>(j==null?void 0:j.key)==="formButton")?oe=(Pe=p.cloneDeep(s.originalItemContents))==null?void 0:Pe.map(j=>((j==null?void 0:j.key)==="formButton"&&(j.contents=h.value),j)):oe.push({key:"formButton",contents:h.value}),l("change",oe)},C=A=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var oe,ne;w.value=(oe=p.cloneDeep(w.value))==null?void 0:oe.filter(me=>(me==null?void 0:me.id)!==(A==null?void 0:A.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(me=>((me==null?void 0:me.key)==="formContent"&&(me.contents=w.value),me))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},P=A=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var oe,ne;h.value=(oe=p.cloneDeep(h.value))==null?void 0:oe.filter(me=>(me==null?void 0:me.id)!==(A==null?void 0:A.id)),l("change",(ne=p.cloneDeep(s.originalItemContents))==null?void 0:ne.map(me=>((me==null?void 0:me.key)==="formButton"&&(me.contents=h.value),me))),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=()=>{var oe;v.value=!0;let A=[];(oe=Te.FormButton)==null||oe.forEach(ne=>{M.value++,A.push({label:ne==null?void 0:ne.label,name:ne==null?void 0:ne.label,type:ne.type,value:(ne==null?void 0:ne.label)==="类型"?"normal":"",id:M.value,contents:ne==null?void 0:ne.options})}),O.value=A,W.value=A},T=()=>{var oe,ne,me;c.value=!0;let A=[];(me=(ne=(oe=Te.FormContent)==null?void 0:oe.find(Xe=>(Xe==null?void 0:Xe.key)==="Input"))==null?void 0:ne.value)==null||me.forEach(Xe=>{M.value++,A.push({label:Xe==null?void 0:Xe.label,name:Xe==null?void 0:Xe.label,type:Xe.type,value:(Xe==null?void 0:Xe.label)==="类型"?"Input":"",id:M.value,contents:Xe==null?void 0:Xe.options})}),d.value=A,b.value=A},I=A=>{let oe=p.cloneDeep(W.value);oe=oe==null?void 0:oe.map(ne=>(ne.value=A==null?void 0:A[ne.name],ne)),W.value=oe},Q=A=>{const oe=A.find(Xe=>(Xe==null?void 0:Xe.name)==="类型");if((oe==null?void 0:oe.value)!="Select")return;const ne=A.find(Xe=>(Xe==null?void 0:Xe.name)==="多选"),me=A.find(Xe=>(Xe==null?void 0:Xe.name)==="初始值");ne!=null&&ne.value&&Lo.isString(me.value)&&(me.value=[me.value]),!(ne!=null&&ne.value)&&!Lo.isString(me.value)&&(me.value="")},Le=async A=>{var oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct;if((A==null?void 0:A.类型)!==((ne=(oe=b.value)==null?void 0:oe.find(at=>(at==null?void 0:at.label)==="类型"))==null?void 0:ne.value)){let at=[];const St=await((nt=(Xe=(me=Te.FormContent)==null?void 0:me.find(ge=>(ge==null?void 0:ge.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:Xe.value)==null?void 0:nt.value)?await((vt=(Ke=(Qe=Te.FormContent)==null?void 0:Qe.find(ge=>(ge==null?void 0:ge.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:Ke.value)==null?void 0:vt.value):(j=(Pe=Te.FormContent)==null?void 0:Pe.find(ge=>(ge==null?void 0:ge.key)===((A==null?void 0:A.类型)===""?"Input":A==null?void 0:A.类型)))==null?void 0:j.value;if(St==null||St.forEach(ge=>{var Ye,Ae;M.value++;const be=Tl(ge==null?void 0:ge.default)?(A==null?void 0:A[ge.label])??ge.value??"":ge==null?void 0:ge.default;at.push({label:ge==null?void 0:ge.label,name:ge==null?void 0:ge.label,type:ge.type,value:be,prop:ge==null?void 0:ge.prop,id:M.value,contents:ge==null?void 0:ge.options,width:((Ae=(Ye=b.value)==null?void 0:Ye[0])==null?void 0:Ae.width)??1})}),A!=null&&A.菜单选项&&((yt=A==null?void 0:A.菜单选项)==null?void 0:yt.length)>0){const ge=await Te.menuToContentType(A==null?void 0:A.菜单选项);at=at==null?void 0:at.map(be=>((be==null?void 0:be.name)==="组信息选项"&&(be.contents=ge),be))}Q(at),b.value=await Te.selectToBase(p.cloneDeep(at)),d.value=await Te.selectToBase(p.cloneDeep(at))}else{let at=p.cloneDeep(b.value);if(at=at==null?void 0:at.map(St=>(St.value=A==null?void 0:A[St.name],St)),A!=null&&A.菜单选项&&((ct=A==null?void 0:A.菜单选项)==null?void 0:ct.length)>0){const St=await Te.menuToContentType(A==null?void 0:A.菜单选项);at=at==null?void 0:at.map(ge=>((ge==null?void 0:ge.name)==="组信息选项"&&(ge.contents=St),ge))}at=Te.formToOptionsContents(at),Q(at),b.value=await Te.selectToBase(p.cloneDeep(at))}},tt=A=>{A||(d.value=b.value)},ze=async A=>{await Le(A),d.value=b.value},We=Do(async()=>{var me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St;d.value=b.value;let A={};A.width=((Xe=(me=d.value)==null?void 0:me[0])==null?void 0:Xe.width)??1,E.value!==""?A.id=E.value:(M.value++,A.id="id"+M.value);let oe=await((j=(Pe=(nt=Te.FormContent)==null?void 0:nt.find(ge=>{var be,Ye;return(ge==null?void 0:ge.key)===(((Ye=(be=d.value)==null?void 0:be.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:Pe.value)==null?void 0:j.value)??((Ke=(Qe=Te.FormContent)==null?void 0:Qe.find(ge=>{var be,Ye;return(ge==null?void 0:ge.key)===(((Ye=(be=d.value)==null?void 0:be.find(Ae=>(Ae==null?void 0:Ae.label)==="类型"))==null?void 0:Ye.value)??"label")}))==null?void 0:Ke.value);if((vt=d.value)==null||vt.forEach(ge=>{const be=oe==null?void 0:oe.find(Ye=>(Ye==null?void 0:Ye.label)===(ge==null?void 0:ge.label));be&&(A[be.key]=ge.value)}),A.width=A.width?A.width:1,A.key=A==null?void 0:A.label,A.isFormColHidden=A==null?void 0:A.isFormColHidden,(yt=w.value)!=null&&yt.find(ge=>ge.id===A.id))w.value=(ct=w.value)==null?void 0:ct.map(ge=>(ge.id===A.id&&(ge=A),ge));else{let ge=p.cloneDeep(w.value);ge.push(A),w.value=ge}w.value=w.value.map(({id:ge,...be})=>be),c.value=!1,E.value="";let ne=p.cloneDeep(s.originalItemContents);(at=p.cloneDeep(s.originalItemContents))!=null&&at.find(ge=>(ge==null?void 0:ge.key)==="formContent")?ne=(St=p.cloneDeep(s.originalItemContents))==null?void 0:St.map(ge=>((ge==null?void 0:ge.key)==="formContent"&&(ge.contents=w.value),ge)):ne.push({key:"formContent",contents:w.value}),l("change",ne)},300),De=()=>{c.value=!1,v.value=!1,E.value="",b.value=[],W.value=[]};return e.watch(()=>s.originalItemContents,()=>{var oe,ne,me,Xe,nt,Pe;if(!s.originalItemContents||s.originalItemContents.length===0)return;const A=p.cloneDeep(s.originalItemContents);w.value=((oe=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="formContent"))==null?void 0:oe.contents)??[],h.value=((ne=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="formButton"))==null?void 0:ne.contents)??[],S.value=(me=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="enableWrap"))!=null&&me.contents?!((Xe=A==null?void 0:A.find(j=>(j==null?void 0:j.key)==="enableWrap"))!=null&&Xe.contents):!0,w.value=(nt=p.cloneDeep(w.value))==null?void 0:nt.map((j,Qe)=>{var vt;let Ke=j;return Ke.id=(j==null?void 0:j.id)??Qe,j!=null&&j.label||(j.label=(j==null?void 0:j.key)??(j==null?void 0:j.label)??""),j!=null&&j.type||(j.type=(j==null?void 0:j.type)??""),j.contents=((vt=j==null?void 0:j.options)==null?void 0:vt.length)===0?(j==null?void 0:j.contents)??"":j==null?void 0:j.options,Ke}),w.value=Te.formToOptionsContents(w.value),h.value=(Pe=h.value)==null?void 0:Pe.map((j,Qe)=>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:Qe})},{deep:!0,immediate:!0}),(A,oe)=>{const ne=e.resolveComponent("svg-icon"),me=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",_s,[e.createElementVNode("div",Ss,[e.createElementVNode("div",Ts,[oe[2]||(oe[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:T},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[oe[1]||(oe[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Is,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(Xe,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",Bs,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",As,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>Y(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>C(Xe)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ns,[oe[4]||(oe[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(me,{class:"icon-content",id:"themeButton",onClick:x},{icon:e.withCtx(()=>[e.createVNode(ne,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[oe[3]||(oe[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Vs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(Xe,nt)=>(e.openBlock(),e.createElementBlock("div",{key:nt},[e.createElementVNode("div",Os,[e.createElementVNode("div",null,e.toDisplayString(Xe.label),1),e.createElementVNode("div",Ms,[e.createVNode(ne,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>$(Xe)},null,8,["onClick"]),e.createVNode(ne,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Pe=>P(Xe)},null,8,["onClick"])])])]))),128))]),oe[6]||(oe[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Ps,[oe[5]||(oe[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:S.value,"onUpdate:modelValue":oe[0]||(oe[0]=Xe=>S.value=Xe)},null,8,["modelValue"])])]),e.createVNode(Xt.ssDialog,{visible:c.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",zs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:Le,onChangeVisible:tt,onBlurChange:ze},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Rs,[e.createVNode(me,{onClick:De,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>oe[7]||(oe[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(me,{class:"ok-button button",onClick:e.unref(We),id:"themeButton"},{default:e.withCtx(()=>oe[8]||(oe[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:De,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ls,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:O.value,key:O.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:De,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:pe},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ko=Lt._export_sfc(Fs,[["__scopeId","data-v-20850524"]]),$s={class:"step-module content"},js={class:"module-data"},Us={class:"step-module layout"},Ks={class:"form-content"},Ws=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=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}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.reactive({visible:!1,width:"40%",title:"步骤条"}),h=e.ref("create"),w=e.ref({}),E=e.ref([]),S=Y=>{var $;w.value=Y,l("change",($=W())==null?void 0:$.compData)},M=(Y,$)=>{var pe,C;switch(Y){case"create":(pe=d.value)==null||pe.forEach(P=>{P.value=""}),h.value="create",v.visible=!0;break;case"update":(C=d.value)==null||C.forEach(P=>{P.value=$[P==null?void 0:P.prop]}),h.value="update",v.visible=!0;break;case"delete":E.value.splice($,1),h.value="delete";break}},O=Y=>{var $,pe,C;if((Y==null?void 0:Y.buttonName)==="确认"){const P=p.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys(P).forEach(x=>{P[x]===""&&delete P[x]}),h.value){case"create":E.value.push({...P,index:(($=E.value)==null?void 0:$.length)+1});break;case"update":E.value=(pe=E.value)==null?void 0:pe.map(x=>x.index===(P==null?void 0:P.index)?{...x,title:P==null?void 0:P.title,description:P==null?void 0:P.description}:x);break}l("change",(C=W())==null?void 0:C.compData),v.visible=!1}else v.visible=!1},W=()=>({comp:"Step",compData:[{key:"stepList",contents:E.value},{key:"stepConfig",contents:w.value}]}),Ee=()=>{v.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var $,pe;Y&&(w.value=(($=Y==null?void 0:Y.find(C=>C.key==="stepConfig"))==null?void 0:$.contents)??{},E.value=((pe=Y==null?void 0:Y.find(C=>C.key==="stepList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Y,$)=>{const pe=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",$s,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=P=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",js,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(P,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.title),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:T=>M("update",{...P,index:x+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:T=>M("delete",x)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Us,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:c.value,onChange:S},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:v.visible,title:v.title,onBeforeDestroy:Ee,width:v.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ks,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Hs=Lt._export_sfc(Ws,[["__scopeId","data-v-7dbd17f2"]]),qs={class:"step-module content"},Gs={class:"module-data"},Xs={class:"step-module layout"},Ys={class:"form-content"},Js=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref("create"),d=e.ref({}),b=e.ref([]),v=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),h=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),w=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),E=e.reactive({visible:!1,width:"40%",title:"时间线"}),S=Y=>{var $;d.value=Y,l("change",($=W())==null?void 0:$.compData)},M=(Y,$)=>{var pe,C;switch(Y){case"create":(pe=h.value)==null||pe.forEach(P=>{P.value=""}),c.value="create",E.visible=!0;break;case"update":(C=h.value)==null||C.forEach(P=>{P.value=$[P==null?void 0:P.prop]}),c.value="update",E.visible=!0;break;case"delete":b.value.splice($,1),c.value="delete";break}},O=Y=>{var $,pe,C,P;if((Y==null?void 0:Y.buttonName)==="确认"){const x=p.cloneDeep(Y==null?void 0:Y.content);switch(Object.keys(x).forEach(T=>{x[T]===""&&delete x[T]}),c.value){case"create":(pe=b.value)==null||pe.push({...x,index:(($=b.value)==null?void 0:$.length)+1});break;case"update":b.value=(C=b.value)==null?void 0:C.map(T=>T.index===(x==null?void 0:x.index)?{...T,content:x==null?void 0:x.content,timestamp:x==null?void 0:x.timestamp}:T);break}l("change",(P=W())==null?void 0:P.compData),E.visible=!1}else E.visible=!1},W=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:b.value},{key:"timeLineConfig",contents:d.value}]}),Ee=()=>{E.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var $,pe;Y&&(d.value=(($=Y==null?void 0:Y.find(C=>C.key==="timeLineConfig"))==null?void 0:$.contents)??{},b.value=((pe=Y==null?void 0:Y.find(C=>C.key==="timeLineList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Y,$)=>{const pe=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qs,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=P=>M("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Gs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(P,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.content),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:T=>M("update",{...P,index:x+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:T=>M("delete",x)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Xs,[$[5]||($[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:S},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:E.visible,title:E.title,onBeforeDestroy:Ee,width:E.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ys,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:w.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Zs=Lt._export_sfc(Js,[["__scopeId","data-v-39ffc861"]]),Qs={};function ec(a,i){return e.openBlock(),e.createElementBlock("div")}const tc=Lt._export_sfc(Qs,[["render",ec]]),nc={class:"extra-content"},ac={key:0},oc={key:1},lc={class:"dialog-footer"},rc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(a,{emit:i}){const s=a,l=e.ref(0),c=e.ref(),d=e.ref(),b=i,v=e.ref(!1),h=e.ref({}),w=e.ref({}),E=e.ref();e.watch(()=>[s.itemData],()=>{var P;const C=p.cloneDeep(s.itemData);c.value=(P=p.cloneDeep(C))==null?void 0:P.map(x=>{var T;if(x.key==="extra"){let I=[];(T=x.value)==null||T.forEach(Q=>{var Le;I.push((Le=Object.values(Q))==null?void 0:Le[0])}),x.value=I}return x})},{deep:!0,immediate:!0});const S=(C,P,x,T)=>{var Q;let I={};((Q=C==null?void 0:C[0])==null?void 0:Q.contents)==="详情"&&(v.value=!0,I[P]=C,d.value=C==null?void 0:C.filter(Le=>(Le==null?void 0:Le.key)!=="tableContentName"),h.value=I,w.value=x,E.value=T.id)},M=C=>{var Le,tt,ze,We;const P=(tt=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:tt.filter(De=>(De==null?void 0:De.key)==="tableContentName"),x=(We=(ze=Object.values(p.cloneDeep(h.value)))==null?void 0:ze[0])==null?void 0:We.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),T=x==null?void 0:x.map((De,A)=>{var oe;return A===C.index&&(De==null?void 0:De.comp)==="Table"&&(De.compData=(oe=De.compData)==null?void 0:oe.map(ne=>{var me,Xe;return(ne==null?void 0:ne.key)==="tableContents"&&(ne.contents=(Xe=(me=C.content)==null?void 0:me.map(nt=>{let Pe={};for(let j in nt)j!=="id"&&(Pe[j]=nt[j]);return Pe}))==null?void 0:Xe.map(nt=>Object.values(nt))),ne})),De});T.unshift(P==null?void 0:P[0]);let I=p.cloneDeep(h.value),Q={};for(let De in I)Q[De]=T;h.value=Q},O=()=>{v.value=!1,h.value={},w.value={},E.value=void 0,l.value++},W=C=>{var Le,tt,ze,We;const P=(tt=(Le=Object.values(p.cloneDeep(h.value)))==null?void 0:Le[0])==null?void 0:tt.filter(De=>(De==null?void 0:De.key)==="tableContentName"),x=(We=(ze=Object.values(p.cloneDeep(h.value)))==null?void 0:ze[0])==null?void 0:We.filter(De=>(De==null?void 0:De.key)!=="tableContentName"),T=x==null?void 0:x.map((De,A)=>(A===C.index&&(De.compData=C.contents),De));T.unshift(P==null?void 0:P[0]);let I=p.cloneDeep(h.value),Q={};for(let De in I)Q[De]=T;h.value=Q},Ee=()=>{var P,x;let C={};for(let T in w.value)T===((P=Object.keys(h.value))==null?void 0:P[0])?C[T]=(x=Object.values(h.value))==null?void 0:x[0]:C[T]=w.value[T];b("change",{buttonName:"编辑",index:E.value,singleContent:C},"methodData"),v.value=!1,h.value={},w.value={},E.value=void 0},Y=()=>{v.value=!1,h.value={},w.value={},E.value=void 0},$=C=>{b("change",C,"methodData")},pe=C=>sa(C);return(C,P)=>{const x=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",nc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(T,I)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(T==null?void 0:T.key)==="extra"?(e.openBlock(),e.createElementBlock("div",ac)):(e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(T.comp)),{itemData:T==null?void 0:T.compData,childItemData:T==null?void 0:T.itemChildData,key:I,index:(T==null?void 0:T.id)??I,onContentClick:S,onChange:$},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Xt.ssDialog,{visible:v.value,onBeforeDestroy:Y},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(T,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(pe(T.comp)),{itemData:T==null?void 0:T.compData,onChange:M,childItemData:T==null?void 0:T.itemChildData,key:I,onContentChange:W,index:(T==null?void 0:T.id)??I,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",lc,[e.createVNode(x,{class:"cancel-button footer-button",onClick:O,id:"themeBorderButton"},{default:e.withCtx(()=>P[0]||(P[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(x,{class:"confirm-button footer-button",onClick:Ee,id:"themeButton"},{default:e.withCtx(()=>P[1]||(P[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},ic=Lt._export_sfc(rc,[["__scopeId","data-v-2d9c5ab2"]]);let Nt="$R";const sc=a=>/^'[^']+':\{.*\}$/.exec(p.cloneDeep(a)),cc=a=>/^'[^']+':(?:\[{1,2}.*\]{1,2})$/.exec(p.cloneDeep(a)),uc=a=>/^'([^']+)':.*$/.exec(p.cloneDeep(a)),ya=a=>{let i=a;const s=[];let l="";for(const c of i)c.includes("{")||l.includes("{")||c.includes("[")||l.includes("[")||c.includes("【")||l.includes("【")||c.includes("(")||l.includes("(")||c.includes("(")||l.includes("(")||c.includes("/*")||l.includes("/*")||c.includes("&")||l.includes("&")?(l+=c.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&l[l.length-1]!=="&"&&(s.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):s.push(c.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},xa=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]!==","&&c[c.length-1]===i?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,""))):(c+=b.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return l},pc=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&(c[c.length-1]===":"||c[c.length-1]===i)&&(c.match(/'/g)||[]).length%2===0?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=b.trim(),((c==null?void 0:c[(c==null?void 0:c.length)-1])===i||c[c.length-1]===":")&&(c.match(/'/g)||[]).length%2===0&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},Wo=(a,i)=>{let s=0;for(let l=0;l<a.length;l++)a[l]===i&&s++;return s%2===0},bo=(a,i)=>{let s=a;const l=[];let c="",d=0;for(const b of s)d++,b.includes("{")||c.includes("{")||b.includes("[")||c.includes("[")||b.includes("【")||c.includes("【")||b.includes("(")||c.includes("(")||b.includes("(")||c.includes("(")||b.includes("/*")||c.includes("/*")?(c+=b.trim(),p.cloneDeep(c).split("{").length-1===p.cloneDeep(c).split("}").length-1&&p.cloneDeep(c).split("【").length-1===p.cloneDeep(c).split("】").length-1&&p.cloneDeep(c).split("[").length-1===p.cloneDeep(c).split("]").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("(").length-1===p.cloneDeep(c).split(")").length-1&&p.cloneDeep(c).split("/*").length-1===p.cloneDeep(c).split("*/").length-1&&c[c.length-1]===i&&Wo(c,"'")?(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""):d===(a==null?void 0:a.length)&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c="")):(c+=b.trim(),(c==null?void 0:c[(c==null?void 0:c.length)-1])===i&&Wo(c,"'")&&(l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),c=""));return(c==null?void 0:c.length)!==0&&l.push(c.replace(/\/\*[\s\S]*?\*\//g,"")),l},dc=a=>/^\[[\s\S]*?\]\s*:\s*\[[\s\S]*?\]$/.exec(p.cloneDeep(a)),fc=a=>{var i,s,l,c,d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We,De,A,oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St,ge,be,Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B;if(uc(a)){let Ie={},Me=(l=(s=(i=a==null?void 0:a.replace(":",Nt))==null?void 0:i.split(Nt))==null?void 0:s[0])==null?void 0:l.replaceAll("'",""),we="",R="",L=(d=(c=a==null?void 0:a.replace(":",Nt))==null?void 0:c.split(Nt))==null?void 0:d[1];if((L==null?void 0:L[0])==="("&&(R=(h=(v=(b=L==null?void 0:L.split("("))==null?void 0:b[1])==null?void 0:v.split(")"))==null?void 0:h[0],L=(E=(w=L==null?void 0:L.replace(")",Nt))==null?void 0:w.split(Nt))==null?void 0:E[1]),((S=bo(L,"/"))==null?void 0:S.length)>1)we=(M=bo(L,"/"))==null?void 0:M.map(ie=>ie==null?void 0:ie.replaceAll("/","").replaceAll("'",""));else if(L.includes("{")||L.includes("("))if(L.includes("{")?we=we+((pe=($=(Y=(Ee=(W=(O=L==null?void 0:L.split("{"))==null?void 0:O[1])==null?void 0:W.split("}"))==null?void 0:Ee[0])==null?void 0:Y.replaceAll(":","/").replaceAll("'",""))==null?void 0:$.replaceAll("[","(["))==null?void 0:pe.replaceAll("]","])"))+"[":we=we+((Q=(I=(T=(x=(P=(C=L==null?void 0:L.split("("))==null?void 0:C[1])==null?void 0:P.split(")"))==null?void 0:x[0])==null?void 0:T.replaceAll(":","/").replaceAll("'",""))==null?void 0:I.replaceAll("[","(["))==null?void 0:Q.replaceAll("]","])"))+"[",!((Le=L==null?void 0:L.split(")"))!=null&&Le[1]))we=we+((We=(ze=(tt=L==null?void 0:L.split("["))==null?void 0:tt[1])==null?void 0:ze.split("]"))==null?void 0:We[0])+"]";else{const ie=(ne=(oe=(A=(De=L==null?void 0:L.split(")"))==null?void 0:De[1])==null?void 0:A.replace("[",Nt))==null?void 0:oe.split(Nt))==null?void 0:ne[1];if(L!=null&&L.includes("?"))we=((me=L==null?void 0:L.split("?"))==null?void 0:me[1])+"&&"+((nt=(Xe=L==null?void 0:L.split("?"))==null?void 0:Xe[0])==null?void 0:nt.replaceAll("#","==="));else if(ie){const Ve=ie.lastIndexOf("]"),ue=ie.substring(0,Ve)+Nt+ie.substring(Ve+1);we=we+((Pe=ue==null?void 0:ue.split(Nt))==null?void 0:Pe[0])+"]"}else we=(Ke=(Qe=(j=a==null?void 0:a.replace(":",Nt))==null?void 0:j.split(Nt))==null?void 0:Qe[1])==null?void 0:Ke.replaceAll("'","")}else if(!(a!=null&&a.includes("?")))we=(ct=(yt=(vt=a==null?void 0:a.replace(":",Nt))==null?void 0:vt.split(Nt))==null?void 0:yt[1])==null?void 0:ct.replaceAll("'","");else{let ie=(ge=(St=(at=a==null?void 0:a.replace(":",Nt))==null?void 0:at.split(Nt))==null?void 0:St[1])==null?void 0:ge.replaceAll("'","");we=((Ae=(Ye=(be=ie==null?void 0:ie.split("?"))==null?void 0:be[1])==null?void 0:Ye.split(":"))==null?void 0:Ae[0])+"&&"+((se=ie==null?void 0:ie.split("?"))==null?void 0:se[0])}return Ie[Me]=R!==""?R+"$##"+we:we,{groupName:"",formContents:[[Ie]]}}else{let Ie={},Me="",we="";if(a.includes("#")){Me=(ce=(te=a==null?void 0:a.split("#"))==null?void 0:te[0])==null?void 0:ce.replaceAll("'","");let R=(Je=(Be=a==null?void 0:a.split("#"))==null?void 0:Be[1])==null?void 0:Je.replaceAll("'","");R!=null&&R.includes("{")?we=we+((U=(V=(k=(ut=R==null?void 0:R.split("{"))==null?void 0:ut[1])==null?void 0:k.split("}"))==null?void 0:V[0])==null?void 0:U.replaceAll(":","/").replaceAll("'",""))+"[":we=we+((X=(q=(D=(y=R==null?void 0:R.split("("))==null?void 0:y[1])==null?void 0:D.split(")"))==null?void 0:q[0])==null?void 0:X.replaceAll(":","/").replaceAll("'",""))+"[",we=we+((ke=(J=(G=R==null?void 0:R.replace("[",Nt))==null?void 0:G.split(Nt))==null?void 0:J[1])==null?void 0:ke.slice(0,((_e=(K=(de=R==null?void 0:R.replace("[",Nt))==null?void 0:de.split(Nt))==null?void 0:K[1])==null?void 0:_e.length)-1))}else{let R=(le=(H=(ae=a==null?void 0:a.split("]"))==null?void 0:ae[0])==null?void 0:H.split("["))==null?void 0:le[1];if((Fe=R==null?void 0:R.split(":"))==null||Fe.forEach((L,ie)=>{var Ve;((Ve=R==null?void 0:R.split(":"))==null?void 0:Ve.length)-1===ie&&(Me=L==null?void 0:L.replaceAll("'",""))}),!(a!=null&&a.includes("[")))we=((he=(z=(Ge=(ye=a==null?void 0:a.split("]"))==null?void 0:ye[1])==null?void 0:Ge.replace(":",Nt).split(Nt))==null?void 0:z[1])==null?void 0:he.replaceAll("'",""))??"";else{let L=(Se=(fe=(re=(Re=(He=(Ne=p.cloneDeep(a))==null?void 0:Ne.split("("))==null?void 0:He[1])==null?void 0:Re.split(")"))==null?void 0:re[0])==null?void 0:fe.replaceAll("{","").replaceAll("}",""))==null?void 0:Se.replaceAll("'","").replaceAll(":","/"),ie="";(B=R==null?void 0:R.split(":"))==null||B.forEach(Ve=>{ie=ie===""?ie+(Ve==null?void 0:Ve.replaceAll("'","")):ie+":"+(Ve==null?void 0:Ve.replaceAll("'",""))}),we=L+"["+ie+"]"}}return Ie[Me]=we,{groupName:"",formContents:[[Ie]]}}},hc=a=>(a==null?void 0:a[0])==="["&&(a==null?void 0:a[a.length-1])==="]"&&!(a!=null&&a.includes("{")),vc=(a,i)=>{let s=a.length;for(;s--;)if(a[s]===")")return a.substring(0,s)+i+a.substring(s+1);return a},gc=a=>{var d,b,v,h,w;let i=a.slice(1,a.length-1),s;(i==null?void 0:i[0])==="["?s=(b=(d=ya(p.cloneDeep(i)))==null?void 0:d.filter(E=>E!==","))==null?void 0:b.map(E=>E==null?void 0:E.slice(1,E.length-1)):(i="["+p.cloneDeep(i)+"]",s=(h=(v=ya(p.cloneDeep(i)))==null?void 0:v.filter(E=>E!==","))==null?void 0:h.map(E=>E==null?void 0:E.slice(1,E.length-1))),s=(w=p.cloneDeep(s))==null?void 0:w.map(E=>{var S,M;return E=(M=(S=E.replace(")",Nt))==null?void 0:S.split(Nt))==null?void 0:M[1],E});let l=[],c=[];return s==null||s.forEach(E=>{var O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We,De,A,oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St,ge,be,Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q;let S=(W=(O=p.cloneDeep(E))==null?void 0:O.slice(1,p.cloneDeep(E).length-1))==null?void 0:W.replace(":",Nt).split(Nt);if(((Y=(Ee=p.cloneDeep(S))==null?void 0:Ee[0])==null?void 0:Y.replaceAll("'",""))==="输入"){if(!((pe=($=p.cloneDeep(S))==null?void 0:$[1])!=null&&pe.includes("["))&&!((P=(C=p.cloneDeep(S))==null?void 0:C[1])!=null&&P.includes("("))){Te.IsJson((x=p.cloneDeep(S))==null?void 0:x[1].replaceAll("'",'"'))&&c.push(JSON.parse((T=p.cloneDeep(S))==null?void 0:T[1].replaceAll("'",'"')));return}if(((Q=(I=p.cloneDeep(S))==null?void 0:I[1])==null?void 0:Q[0])==="["){let X=(We=(Le=p.cloneDeep(S))==null?void 0:Le[1])==null?void 0:We.slice(1,((ze=(tt=p.cloneDeep(S))==null?void 0:tt[1])==null?void 0:ze.length)-1);(A=(De=ya(X))==null?void 0:De.filter(G=>G!==","))==null||A.forEach(G=>{var ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R,L,ie;let J={},de=(H=(ae=p.cloneDeep(G))==null?void 0:ae.slice(1,((ke=p.cloneDeep(G))==null?void 0:ke.length)-1))==null?void 0:H.replace(":",Nt).split(Nt),K=(le=de==null?void 0:de[0])==null?void 0:le.replaceAll("'",""),_e;(Fe=de==null?void 0:de[1])!=null&&Fe.includes("(")?(_e=(fe=(re=(Re=(He=(Ne=(he=(z=(Ge=p.cloneDeep(de))==null?void 0:Ge[1])==null?void 0:z.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:Ne.split("("))==null?void 0:He[1])==null?void 0:Re.split(")"))==null?void 0:re[0])==null?void 0:fe.replaceAll(":","/").replaceAll("'",""),(B=(Se=p.cloneDeep(de))==null?void 0:Se[1])!=null&&B.includes("[")&&(_e=p.cloneDeep(_e)+"["+((ie=(L=(R=(we=(Me=(Ie=p.cloneDeep(de))==null?void 0:Ie[1])==null?void 0:Me.split("["))==null?void 0:we[1])==null?void 0:R.split("]"))==null?void 0:L[0])==null?void 0:ie.replaceAll("'",""))+"]")):_e=(ye=de==null?void 0:de[1])==null?void 0:ye.replaceAll("'",""),J[K]=_e,c.push(J)})}}else{if(!((ne=(oe=p.cloneDeep(S))==null?void 0:oe[1])!=null&&ne.includes("["))&&!((Xe=(me=p.cloneDeep(S))==null?void 0:me[1])!=null&&Xe.includes("("))){Te.IsJson((nt=p.cloneDeep(S))==null?void 0:nt[1].replaceAll("'",'"'))&&l.push(JSON.parse((Pe=p.cloneDeep(S))==null?void 0:Pe[1].replaceAll("'",'"')));return}if(((Qe=(j=p.cloneDeep(S))==null?void 0:j[1])==null?void 0:Qe[0])==="["){let X=(ct=(Ke=p.cloneDeep(S))==null?void 0:Ke[1])==null?void 0:ct.slice(1,((yt=(vt=p.cloneDeep(S))==null?void 0:vt[1])==null?void 0:yt.length)-1);(St=(at=ya(X))==null?void 0:at.filter(G=>G!==","))==null||St.forEach(G=>{var ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt,st;let J={},de=(H=(ae=p.cloneDeep(G))==null?void 0:ae.slice(1,((ke=p.cloneDeep(G))==null?void 0:ke.length)-1))==null?void 0:H.replace(":",Nt).split(Nt),K=(le=de==null?void 0:de[0])==null?void 0:le.replaceAll("'",""),_e;if(!((Fe=de==null?void 0:de[1])!=null&&Fe.includes("(")))_e=(ye=de==null?void 0:de[1])==null?void 0:ye.replaceAll("'","");else if(_e=(Re=(He=(Ne=(he=(z=(Ge=p.cloneDeep(de))==null?void 0:Ge[1])==null?void 0:z.replaceAll("{",""))==null?void 0:he.replaceAll("}",""))==null?void 0:Ne.replace("(",Nt))==null?void 0:He.split(Nt))==null?void 0:Re[1],_e=(fe=(re=vc(p.cloneDeep(_e),Nt))==null?void 0:re.split(Nt))==null?void 0:fe[0],!(_e!=null&&_e.includes("(")))_e=(Se=p.cloneDeep(_e))==null?void 0:Se.replaceAll(":","/").replaceAll("'",""),(Ie=(B=p.cloneDeep(de))==null?void 0:B[1])!=null&&Ie.includes("[")&&(_e=p.cloneDeep(_e)+"["+((Ze=(ve=(ue=(Ve=(we=(Me=p.cloneDeep(de))==null?void 0:Me[1])==null?void 0:we.split("["))==null?void 0:Ve[((ie=(L=(R=p.cloneDeep(de))==null?void 0:R[1])==null?void 0:L.split("["))==null?void 0:ie.length)-1])==null?void 0:ue.split("]"))==null?void 0:ve[0])==null?void 0:Ze.replaceAll("'",""))+"]");else{let dt="";(Oe=xa(_e,":"))==null||Oe.forEach(xt=>{var Tt,gt,wt,$t,ft,Wt,Pt,Yt,cn,nn,_n,gn,Sn,mn,Tn,In,Bn,An;if(!(xt!=null&&xt.includes("(")))dt=dt===""?dt+((Tt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:Tt.replaceAll("'","")):dt+"/"+((gt=xt==null?void 0:xt.replaceAll(":",""))==null?void 0:gt.replaceAll("'",""));else if(xt!=null&&xt.includes(")[")){let an=(ft=($t=(wt=p.cloneDeep(xt))==null?void 0:wt.split(")"))==null?void 0:$t[0])==null?void 0:ft.replaceAll("'","");dt=dt===""?dt+an:dt+"/"+an}else{let an=(Sn=(gn=(_n=(nn=(cn=(Yt=(Pt=(Wt=p.cloneDeep(xt))==null?void 0:Wt.replaceAll("{",""))==null?void 0:Pt.replaceAll("}",""))==null?void 0:Yt.replace("(",Nt))==null?void 0:cn.split(Nt))==null?void 0:nn[1])==null?void 0:_n.split(")"))==null?void 0:gn[0])==null?void 0:Sn.replaceAll(":","/").replaceAll("'","");an=an+"["+((An=(Bn=(In=(Tn=(mn=p.cloneDeep(xt))==null?void 0:mn.split("["))==null?void 0:Tn[1])==null?void 0:In.split("]"))==null?void 0:Bn[0])==null?void 0:An.replaceAll("'",""))+"]",dt=dt===""?dt+"["+an+"]":dt+"/["+an+"]"}}),_e=dt+"["+((st=(kt=(bt=(it=(Z=(et=p.cloneDeep(de))==null?void 0:et[1])==null?void 0:Z.split("["))==null?void 0:it[((lt=(Ce=(Ue=p.cloneDeep(de))==null?void 0:Ue[1])==null?void 0:Ce.split("["))==null?void 0:lt.length)-1])==null?void 0:bt.split("]"))==null?void 0:kt[0])==null?void 0:st.replaceAll("'",""))+"]"}J[K]=_e,l.push(J)})}else{let X=(Ae=(ge=p.cloneDeep(S))==null?void 0:ge[1])==null?void 0:Ae.slice(1,((Ye=(be=p.cloneDeep(S))==null?void 0:be[1])==null?void 0:Ye.length)-1),G={},J=(U=(V=(ce=(te=(se=p.cloneDeep(X))==null?void 0:se.split("]"))==null?void 0:te[0])==null?void 0:ce.split(":"))==null?void 0:V[((k=(ut=(Je=(Be=p.cloneDeep(X))==null?void 0:Be.split("]"))==null?void 0:Je[0])==null?void 0:ut.split(":"))==null?void 0:k.length)-1])==null?void 0:U.replaceAll("'",""),de=((q=(D=(y=p.cloneDeep(X))==null?void 0:y.split("]"))==null?void 0:D[0])==null?void 0:q.replaceAll("'",""))+"]";G[J]=de,l.push(G)}}}),{output:l,input:c}},mc=Te.useModelComp(p.pinia),{routeToChildPath:En}=p.storeToRefs(mc),Vn=Te.useMenuState(p.pinia),{activeMenuPath:Gn}=p.storeToRefs(Vn),ba=p.useLoginState(),{loginUserInfo:Gt}=p.storeToRefs(ba),yc=Te.useOriginalState(p.pinia),{originalPath:bc}=p.storeToRefs(yc),tn=bc.value,kc=a=>{const i=/^name(\d+)$/,s=a==null?void 0:a.map(c=>{const d=[];for(const b in c){const v=b.match(i);v&&d.push({idx:Number(v[1]),value:c[b]})}return!d.length&&c.name&&d.push({idx:-1,value:c.name}),d.sort((b,v)=>b.idx-v.idx),{item:c,names:d}});function l(c,d){var v;if(!c)return[];if(d>=((v=c==null?void 0:c[0])==null?void 0:v.names.length))return c.map(h=>h.item);const b=new Map;for(const h of c){const w=h.names[d].value;b.has(w)||b.set(w,[]),b.get(w).push(h)}return Array.from(b.entries()).map(([h,w])=>{var E,S,M;return(w[0].names.length===1||(w==null?void 0:w.length)===1)&&((S=(E=w[0].names)==null?void 0:E[0])==null?void 0:S.idx)===-1?(M=w==null?void 0:w[0])==null?void 0:M.item:{name:h,isShow:!0,comp:"ParentItem",children:l(w,d+1)}})}if(s)return l(s,0)},Ta=a=>a!=null&&a.every(i=>{var s,l;return((l=(s=Object.keys(i))==null?void 0:s.filter(c=>c==null?void 0:c.includes("name")))==null?void 0:l.length)===1})?a:kc(a),Pl=async()=>{var d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We,De,A,oe,ne,me,Xe,nt,Pe,j,Qe,Ke,vt,yt,ct,at,St,ge,be,Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe;Vn.setImportLoading(!0);let a="";const i=await p.getInsofDataApi({key:{type:"structure",pageKey:p.cloneDeep(En).value,systemKey:sessionStorage.getItem("systemKey")}});if(((b=(d=i==null?void 0:i.data)==null?void 0:d.result)==null?void 0:b.length)>0){let ye=(O=(M=(S=(E=(w=(h=(v=i==null?void 0:i.data)==null?void 0:v.result)==null?void 0:h[0])==null?void 0:w.value)==null?void 0:E.pageData)==null?void 0:S.compData)==null?void 0:M.find(Ge=>(Ge==null?void 0:Ge.key)==="header"))==null?void 0:O.contents;a=(Ee=(W=p.cloneDeep(ye))==null?void 0:W[0])==null?void 0:Ee.label}let s=Gn.value;(pe=Gn.value)!=null&&pe.includes(`updateLoading${((Y=Gt.value)==null?void 0:Y.account)||(($=Gt.value)==null?void 0:$.账号)}`)?s=p.cloneDeep(Gn).value:(x=Gn.value)!=null&&x.includes(`loading${((C=Gt.value)==null?void 0:C.account)||((P=Gt.value)==null?void 0:P.账号)}`)&&(s=p.cloneDeep(En).value+tn+`loading${((T=Gt.value)==null?void 0:T.account)||((I=Gt.value)==null?void 0:I.账号)}`);const l=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});let c=[];if(((Le=(Q=l==null?void 0:l.data)==null?void 0:Q.result)==null?void 0:Le.length)>0){let ye="",Ge=[];(ze=(tt=l==null?void 0:l.data)==null?void 0:tt.result)==null||ze.forEach(he=>{var Ne,He,Re,re,fe;((He=(Ne=he==null?void 0:he.value)==null?void 0:Ne.pageData)==null?void 0:He.comp)==="Form"&&((fe=(re=(Re=he==null?void 0:he.value)==null?void 0:Re.pageData)==null?void 0:re.compData)==null||fe.forEach(Se=>{(Se==null?void 0:Se.key)==="formContent"&&(Ge=[...Ge,...Se==null?void 0:Se.contents])}))});let z=Ge==null?void 0:Ge.find(he=>(he==null?void 0:he.isMain)===!0);if(z?(ye=z==null?void 0:z.value,a=z==null?void 0:z.key):ye=(Pe=(nt=(Xe=(me=(ne=(oe=(A=(De=(We=l==null?void 0:l.data)==null?void 0:We.result)==null?void 0:De[0])==null?void 0:A.value)==null?void 0:oe.pageData)==null?void 0:ne.compData)==null?void 0:me.find(he=>(he==null?void 0:he.key)==="formContent"))==null?void 0:Xe.contents)==null?void 0:nt.find(he=>{var Ne,He;return(he==null?void 0:he.key)===a||((He=(Ne=he==null?void 0:he.optionUrl)==null?void 0:Ne.groupSelect)==null?void 0:He[1])===a}))==null?void 0:Pe.value,(Ke=Gn.value)!=null&&Ke.includes(`updateLoading${((j=Gt.value)==null?void 0:j.account)||((Qe=Gt.value)==null?void 0:Qe.账号)}`)){let he=[],Ne=[];const He=await p.getInsofDataApi({key:{pageKey:(te=Gn.value.split(tn+`updateLoading${((Ae=Gt.value)==null?void 0:Ae.account)||((se=Gt.value)==null?void 0:se.账号)}`))==null?void 0:te[0],systemKey:sessionStorage.getItem("systemKey")}});if(((Be=(ce=He==null?void 0:He.data)==null?void 0:ce.result)==null?void 0:Be.length)>0){let Re=(Je=l==null?void 0:l.data)==null?void 0:Je.result,re=(ut=p.cloneDeep(Re))==null?void 0:ut.map(async fe=>{var Se,B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe,et;if(((Se=fe==null?void 0:fe.key)==null?void 0:Se.type)==="structure"){let Z=(we=(Me=(Ie=(B=fe==null?void 0:fe.value)==null?void 0:B.pageData)==null?void 0:Ie.compData)==null?void 0:Me.find(Ue=>(Ue==null?void 0:Ue.key)==="parentFormPath"))==null?void 0:we.contents;if(Z){let Ue=await Te.getItemData(Z,sessionStorage.getItem("systemKey"),""),Ce=(Ve=(ie=(L=(R=fe==null?void 0:fe.value)==null?void 0:R.pageData)==null?void 0:L.compData)==null?void 0:ie.find(it=>(it==null?void 0:it.key)==="formContent"))==null?void 0:Ve.contents,lt=Ue==null?void 0:Ue.filter(it=>(it==null?void 0:it.comp)==="Form");lt==null||lt.forEach(it=>{var bt;(bt=it==null?void 0:it.compData)==null||bt.forEach(kt=>{var st,dt;if((kt==null?void 0:kt.key)==="formContent"&&((st=kt==null?void 0:kt.contents)==null?void 0:st.some(Tt=>Ce==null?void 0:Ce.find(gt=>(gt==null?void 0:gt.prop)===(Tt==null?void 0:Tt.prop))))){let Tt=it;Tt.compData=(dt=Tt.compData)==null?void 0:dt.map(wt=>{var $t;return(wt==null?void 0:wt.key)==="formContent"&&(wt.contents=($t=wt.contents)==null?void 0:$t.map(ft=>{var Wt;return Ce!=null&&Ce.find(Pt=>(Pt==null?void 0:Pt.prop)===(ft==null?void 0:ft.prop))&&(ft.value=(Wt=Ce==null?void 0:Ce.find(Pt=>(Pt==null?void 0:Pt.prop)===(ft==null?void 0:ft.prop)))==null?void 0:Wt.value),ft})),wt});let gt={};for(let wt in Tt)wt!=="id"&&(gt[wt]=Tt[wt]);c.push({id:it==null?void 0:it.id,value:{pageData:gt}})}})})}else if((ve=(ue=He==null?void 0:He.data)==null?void 0:ue.result)!=null&&ve.find(Ue=>{var Ce,lt,it,bt;return((lt=(Ce=Ue==null?void 0:Ue.value)==null?void 0:Ce.pageData)==null?void 0:lt.name)===((bt=(it=fe==null?void 0:fe.value)==null?void 0:it.pageData)==null?void 0:bt.name)})){let Ue=fe==null?void 0:fe.key;Ue.pageKey=p.cloneDeep(En).value+tn+ye,c.push({id:(et=(Oe=(Ze=He==null?void 0:He.data)==null?void 0:Ze.result)==null?void 0:Oe.find(Ce=>{var lt,it,bt,kt;return((it=(lt=Ce==null?void 0:Ce.value)==null?void 0:lt.pageData)==null?void 0:it.name)===((kt=(bt=fe==null?void 0:fe.value)==null?void 0:bt.pageData)==null?void 0:kt.name)}))==null?void 0:et.id,key:Ue,value:fe==null?void 0:fe.value})}else{let Ue=fe==null?void 0:fe.key;Ue.pageKey=p.cloneDeep(En).value+tn+ye,he.push({key:Ue,value:fe==null?void 0:fe.value})}}});await Promise.all(re),(V=(k=l==null?void 0:l.data)==null?void 0:k.result)==null||V.forEach(fe=>{var B,Ie,Me;let Se=(B=p.cloneDeep(fe))==null?void 0:B.key;Se.pageKey=p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((Ie=Gt.value)==null?void 0:Ie.account)||((Me=Gt.value)==null?void 0:Me.账号)}`,Vn.setChildMenu(Se.pageKey),c.push({id:fe==null?void 0:fe.id,key:Se})})}if(ye===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1);return}if((c==null?void 0:c.length)>0){await p.batchUpdateInsofDataApi({dataList:c}),(U=c==null?void 0:c[0])!=null&&U.key&&await ba.setLogRecordAsync({type:"保存",data:c},(y=c==null?void 0:c[0])==null?void 0:y.key),(he==null?void 0:he.length)>0&&(await p.batchAddInsofDataApi({dataList:he}),(D=he==null?void 0:he[0])!=null&&D.key&&await ba.setLogRecordAsync({type:"保存",data:he},(q=he==null?void 0:he[0])==null?void 0:q.key));const Re=await p.getInsofDataApi({key:{pageKey:(J=Gn.value.split(tn+`updateLoading${((X=Gt.value)==null?void 0:X.account)||((G=Gt.value)==null?void 0:G.账号)}`))==null?void 0:J[0],systemKey:sessionStorage.getItem("systemKey")}});if(((K=(de=Re==null?void 0:Re.data)==null?void 0:de.result)==null?void 0:K.length)>0){let re=[],fe=(_e=l==null?void 0:l.data)==null?void 0:_e.result;(ke=p.cloneDeep(fe))==null||ke.forEach(Se=>{var B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe;if(((B=Se==null?void 0:Se.key)==null?void 0:B.type)!=="structure"){let et=(we=(Me=(Ie=Re==null?void 0:Re.data)==null?void 0:Ie.result)==null?void 0:Me.filter(lt=>{var it;return((it=lt==null?void 0:lt.key)==null?void 0:it.type)==="data"}))==null?void 0:we.map(lt=>lt==null?void 0:lt.id);re=[...re,...et];let Z=(Ve=(ie=(L=(R=p.cloneDeep(fe))==null?void 0:R.find(lt=>{var it;return((it=Se==null?void 0:Se.key)==null?void 0:it.tableId)===(lt==null?void 0:lt.id)}))==null?void 0:L.value)==null?void 0:ie.pageData)==null?void 0:Ve.name,Ue=(Ze=(ve=(ue=Re==null?void 0:Re.data)==null?void 0:ue.result)==null?void 0:ve.find(lt=>{var it,bt;return((bt=(it=lt==null?void 0:lt.value)==null?void 0:it.pageData)==null?void 0:bt.name)===Z}))==null?void 0:Ze.id,Ce=(Oe=p.cloneDeep(Se))==null?void 0:Oe.key;Ce.tableId=Ue,Ce.pageKey=p.cloneDeep(En).value+tn+ye,Ne.push({key:Ce,value:Se==null?void 0:Se.value})}}),(re==null?void 0:re.length)>0&&(re=[...new Set(re)],await p.batchDeleteInsofDataApi({ids:re})),(H=(ae=l==null?void 0:l.data)==null?void 0:ae.result)==null||H.forEach(Se=>{var Ie,Me,we;let B=(Ie=p.cloneDeep(Se))==null?void 0:Ie.key;B.pageKey=p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((Me=Gt.value)==null?void 0:Me.account)||((we=Gt.value)==null?void 0:we.账号)}`,Vn.setChildMenu(B.pageKey),c.push({id:Se==null?void 0:Se.id,key:B})})}(Ne==null?void 0:Ne.length)>0&&(await p.batchAddInsofDataApi({dataList:Ne}),(le=he==null?void 0:he[0])!=null&&le.key&&await ba.setLogRecordAsync({type:"保存",data:Ne},(Fe=Ne==null?void 0:Ne[0])==null?void 0:Fe.key)),p.ElMessage.success("保存成功")}}else{if((yt=(vt=l==null?void 0:l.data)==null?void 0:vt.result)==null||yt.forEach(he=>{var He;let Ne=(He=p.cloneDeep(he))==null?void 0:He.key;Ne.pageKey=p.cloneDeep(En).value+tn+ye,Vn.setChildMenu(Ne.pageKey),c.push({id:he==null?void 0:he.id,key:Ne})}),ye===""){p.ElMessage.error(`保存失败,${a}的必填字段没有填写`),Vn.setImportLoading(!1),Vn.setChildMenu("");return}(ct=c==null?void 0:c[0])!=null&&ct.key&&(await p.batchUpdateInsofDataApi({dataList:c}),await ba.setLogRecordAsync({type:"保存",data:c},(at=c==null?void 0:c[0])==null?void 0:at.key)),await Te.loadingConstruct(p.cloneDeep(En).value+tn+ye,p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((St=Gt.value)==null?void 0:St.account)||((ge=Gt.value)==null?void 0:ge.账号)}`),Vn.setActiveMenuPath(p.cloneDeep(En).value+tn+ye+tn+`updateLoading${((be=Gt.value)==null?void 0:be.account)||((Ye=Gt.value)==null?void 0:Ye.账号)}`),p.ElMessage.success("保存成功")}}Vn.setImportLoading(!1)},xc={key:0},wc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(a){const i=e.ref([]),s=Te.useOriginalState(p.pinia),{originalPath:l}=p.storeToRefs(s),c=to.useThreeState(p.pinia),{managementWidth:d}=p.storeToRefs(c),{isThreeSystem:b}=to.useThreeSystem(),v=a,h=e.ref(!1),w=e.ref(),E=Te.useTableComp(p.pinia),{multipleTableConst:S}=p.storeToRefs(E),M=Te.useModelComp(p.pinia),O=e.ref(!1),W=Te.useMenuState(p.pinia),Ee=p.useLoginState(p.pinia),{itemData:Y,isEdit:$,routeToChildPath:pe,tableViewContents:C,lockingPage:P,payloadTypes:x}=p.storeToRefs(M),{activeMenuPath:T,platform:I,childMenu:Q}=p.storeToRefs(W),{loginUserInfo:Le}=p.storeToRefs(Ee),tt=e.ref(!1),ze=e.computed(()=>b()?{width:d.value?d.value:"20vw",padding:"24px",boxSizing:"border-box",bottom:"130px"}:{}),We=(be,Ye)=>{const Ae=Ye;return be==null?void 0:be.map(se=>{var te;return se=(te=se==null?void 0:se.map((ce,Be)=>{var Je,ut;return ce!=null&&ce.id?{key:"id",value:ce==null?void 0:ce.id}:Ae!=null&&Ae.find(k=>k==null?void 0:k.id)||se!=null&&se.find(k=>k==null?void 0:k.id)?{key:(Je=Ae[Be-1])==null?void 0:Je.label,value:ce}:{key:(ut=Ae[Be])==null?void 0:ut.label,value:ce}}))==null?void 0:te.filter(ce=>ce.key!=="操作"),se})},De=async()=>{var be,Ye;(be=i.value)!=null&&be.find(Ae=>(Ae==null?void 0:Ae.buttonName)==="保存")&&await ct((Ye=i.value)==null?void 0:Ye.find(Ae=>(Ae==null?void 0:Ae.buttonName)==="保存")),await Pl()};e.watch(()=>Y.value,async()=>{$.value==="view"&&!tt.value&&await ge(p.cloneDeep(v.itemData)),tt.value=!1},{deep:!0});const A=()=>{h.value=!1,w.value=void 0},oe=be=>be.map(Ye=>{const Ae={};for(const se in Ye){const te=Ye[se];if(se.includes(S.value)){const ce=se.split(S.value);let Be=Ae;ce.forEach((Je,ut)=>{ut===ce.length-1?Be[Je]=te:(Be[Je]||(Be[Je]={}),Be=Be[Je])})}else Ae[se]=te}return Ae}),ne=async(be,Ye,Ae=[])=>{var te,ce,Be,Je,ut,k,V,U,y,D,q,X,G,J,de;let se=(te=p.cloneDeep(Ye))==null?void 0:te.filter(K=>(K==null?void 0:K.comp)!=="methodButton");if(be!=null&&be.includes("[")){let K=(k=(ut=(Je=(Be=(ce=p.cloneDeep(be))==null?void 0:ce.split("["))==null?void 0:Be[1])==null?void 0:Je.split("]"))==null?void 0:ut[0])==null?void 0:k.split(":"),_e="";if(K!=null&&K[0]){se=se==null?void 0:se.map(ae=>{var H;return ae.compData=(H=ae.compData)==null?void 0:H.map(le=>{var Fe;return(le==null?void 0:le.key)==="formContent"&&(le.contents=(Fe=le.contents)==null?void 0:Fe.map(ye=>{var Ge,z,he,Ne,He,Re,re,fe;if((z=(Ge=ye==null?void 0:ye.optionUrl)==null?void 0:Ge.menuSelect)!=null&&z.some(Se=>Se==null?void 0:Se.includes("["))){let Se="";ye.optionUrl.oldMenuSelect=(Ne=(he=p.cloneDeep(ye))==null?void 0:he.optionUrl)==null?void 0:Ne.menuSelect,ye.optionUrl.menuSelect=(Re=(He=ye==null?void 0:ye.optionUrl)==null?void 0:He.menuSelect)==null?void 0:Re.map(B=>{var Ie,Me,we,R,L,ie;if(B!=null&&B.includes("[")){let Ve=(Me=(Ie=B==null?void 0:B.replaceAll("[","").replaceAll("]",""))==null?void 0:Ie.split(":"))==null?void 0:Me[1];Se=Te.getFindValue((we=B==null?void 0:B.replaceAll("[","").replaceAll("]",""))==null?void 0:we.split(":"),Ae==null?void 0:Ae[T.value],Ae),B=((L=(R=p.cloneDeep(se))==null?void 0:R.find(ue=>(ue==null?void 0:ue.label)===Ve))==null?void 0:L.value)||Te.getFindValue((ie=B==null?void 0:B.replaceAll("[","").replaceAll("]",""))==null?void 0:ie.split(":"),Ae==null?void 0:Ae[T.value],Ae)}return B}),Se!==""&&(ye.value===""||!(ye!=null&&ye.value))&&(ye.value=Te.getNewValue(ye.optionUrl.menuSelect,ye.optionUrl.oldMenuSelect,(re=ye==null?void 0:ye.optionUrl)==null?void 0:re.groupSelect,Ae),Array.isArray(ye.value)&&((fe=ye.value)!=null&&fe.every(B=>B==null?void 0:B.url))&&(ye.type="UPLOAD"))}return ye})),le}),ae});let ke=(V=se==null?void 0:se.find(ae=>(ae==null?void 0:ae.name)===(K==null?void 0:K[0])))==null?void 0:V.compData;if(!ke){let ae=(U=be==null?void 0:be.split("["))==null?void 0:U[0],H=await Te.getItemData(ae,sessionStorage.getItem("systemKey"),"",!1,"","",Ae);ke=(y=H==null?void 0:H.find(le=>(le==null?void 0:le.name)===(K==null?void 0:K[0])))==null?void 0:y.compData}ke==null||ke.forEach(ae=>{var H,le,Fe,ye,Ge,z;if((ae==null?void 0:ae.key)==="formContent")(H=ae==null?void 0:ae.contents)==null||H.forEach(he=>{var Ne;(he==null?void 0:he.key)===(K==null?void 0:K[1])&&(Array.isArray(he==null?void 0:he.value)?_e=he==null?void 0:he.value:_e=(Ne=he==null?void 0:he.value)==null?void 0:Ne.toString())});else if((ae==null?void 0:ae.key)==="tableContents"){let he=[],Ne=(le=ke==null?void 0:ke.find(Re=>(Re==null?void 0:Re.key)==="header"))==null?void 0:le.contents,He=(K==null?void 0:K[1])??"";if(Ne!=null&&Ne.every(Re=>Array.isArray(Re))){let Re=Te.getColumnChild((Ge=Ne==null?void 0:Ne[0])==null?void 0:Ge.filter(re=>(re==null?void 0:re.label)!=="操作"));(z=ae.contents)==null||z.forEach(re=>{let fe={};re=re==null?void 0:re.filter(Se=>!(Se!=null&&Se.id)),Re==null||Re.forEach((Se,B)=>{let Ie=re[B];typeof re[B]=="number"&&(Ie=re[B].toString()),(He===""||He===Se.prop)&&(fe[Se.prop]=Ie)}),he.push(fe)}),he=oe(he)}else{let Re=(Fe=Ne==null?void 0:Ne.map(re=>re==null?void 0:re.label))==null?void 0:Fe.filter(re=>re!=="操作");(ye=ae.contents)==null||ye.forEach(re=>{let fe={};re=re==null?void 0:re.filter(Se=>!(Se!=null&&Se.id)),Re==null||Re.forEach((Se,B)=>{let Ie=re[B];typeof re[B]=="number"&&(Ie=re[B].toString()),(He===""||He===Se)&&(fe[Se]=Ie)}),he.push(fe)})}_e=he}})}return _e}else if(be!=null&&be.includes("/")){let K={};return(D=p.cloneDeep(se))==null||D.forEach((_e,ke)=>{var ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R;if((_e==null?void 0:_e.comp)==="Table"){let L=Array.isArray((le=(H=(ae=_e==null?void 0:_e.compData)==null?void 0:ae.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:H.contents)==null?void 0:le[0])?(z=(Ge=(ye=(Fe=_e==null?void 0:_e.compData)==null?void 0:Fe.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:ye.contents)==null?void 0:Ge[0])==null?void 0:z.some(ve=>ve==null?void 0:ve.children):[],ie=(He=(Ne=(he=_e==null?void 0:_e.compData)==null?void 0:he.find(ve=>(ve==null?void 0:ve.key)==="tableContents"))==null?void 0:Ne.contents)==null?void 0:He.map(ve=>(ve!=null&&ve.find(Ze=>Ze==null?void 0:Ze.id)&&(ve=ve.slice(1)),ve)),Ve=(B=(Se=(fe=(re=(Re=_e==null?void 0:_e.compData)==null?void 0:Re.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:re.contents)==null?void 0:fe[0])==null?void 0:Se[0])==null?void 0:B.label,ue=(Me=(Ie=_e==null?void 0:_e.compData)==null?void 0:Ie.find(ve=>(ve==null?void 0:ve.key)==="header"))==null?void 0:Me.contents;if(L)(L==null?void 0:L.length)===0?K[_e.name]=K!=null&&K[_e.name]?K[_e.name]:We(ie,ue):K[Ve]=We(ie,ue);else{const ve=[];ue=ue.slice(1,ue.length-1),ue==null||ue.forEach((Ze,Oe)=>{ie==null||ie.forEach(et=>{ve.push({key:Ze.label+et[0],value:et[Oe+1]})})}),K["form"+ke]=ve}}else{const L=(R=(we=_e.compData)==null?void 0:we.find(Ve=>(Ve==null?void 0:Ve.key)==="formContent"))==null?void 0:R.contents;K!=null&&K.form||(K.form=[]);const ie=[];L==null||L.forEach(Ve=>{Ve.key!==""&&(Ve={key:(Ve==null?void 0:Ve.key)??(Ve==null?void 0:Ve.label),value:Ve==null?void 0:Ve.value},ie.push(Ve))}),K.form=[...ie,...p.cloneDeep(K==null?void 0:K.form)]}}),K}else{if(be==="createInsofDataApi"){let K=(q=p.cloneDeep(Ye))==null?void 0:q[0];return K={comp:(X=p.cloneDeep(K))==null?void 0:X.comp,compData:(G=p.cloneDeep(K))==null?void 0:G.compData,name:(J=p.cloneDeep(K))==null?void 0:J.name,isShow:(de=p.cloneDeep(K))==null?void 0:de.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:T.value},value:{pageData:K}}}return be}},me=async(be,Ye,Ae,se,te)=>{var Je,ut,k;let ce=await Te.getItemData(Ye,sessionStorage.getItem("systemKey"),""),Be=ce==null?void 0:ce.find(V=>(V==null?void 0:V.name)===(Ae==null?void 0:Ae[0]));if(Be){if((Be==null?void 0:Be.comp)==="Table"){let V={};for(let J in p.cloneDeep(be))p.cloneDeep(be)[J]!=="loginUser"?V[J]=p.cloneDeep(be)[J]:V[J]=((Je=Le.value)==null?void 0:Je.account)||((ut=Le.value)==null?void 0:ut.账号);let U=[],y=V;Array.isArray(be)||(y=[V]),y==null||y.forEach(J=>{U.push({[J[Ae[1]]]:J})});let D=[],q=U==null?void 0:U.map(J=>{var de;return(de=Object.keys(J))==null?void 0:de[0]});ce==null||ce.forEach(J=>{var de;(J==null?void 0:J.name)===(Ae==null?void 0:Ae[0])&&((de=J==null?void 0:J.compData)==null||de.forEach(K=>{var _e;(K==null?void 0:K.key)==="tableContents"&&((_e=K==null?void 0:K.contents)==null||_e.forEach(ke=>{ke!=null&&ke.some(ae=>q.includes(ae))&&D.push({[ke.find(ae=>ae.id).id]:ke.find(ae=>q.includes(ae))})}))}))});let X=D==null?void 0:D.map(J=>{var de;return(de=Object.keys(J))==null?void 0:de[0]}),G=[];if(X==null||X.forEach(J=>{var _e;let de=(_e=D==null?void 0:D.find(ke=>{var ae;return((ae=Object.keys(ke))==null?void 0:ae[0].toString())===J.toString()}))==null?void 0:_e[J],K=U==null?void 0:U.find(ke=>{var ae;return((ae=Object.keys(ke))==null?void 0:ae[0])===de});G.push({id:parseInt(J),value:{tableData:K[de]}})}),(G==null?void 0:G.length)>0)return G}else if((Be==null?void 0:Be.comp)==="Form"){let V=p.cloneDeep(Be);V.compData=(k=V.compData)==null?void 0:k.map(D=>{var q;return(D==null?void 0:D.key)==="formContent"&&(D.contents=(q=D.contents)==null?void 0:q.map(X=>{var G;if((X==null?void 0:X.key)===(Ae==null?void 0:Ae[1])&&(be!=null&&be[X==null?void 0:X.prop]))X.value=(be==null?void 0:be[X==null?void 0:X.prop])||be;else if((X==null?void 0:X.type)==="Select"){let J=Te.judgeContents((G=p.cloneDeep(X))==null?void 0:G.optionUrl,se,te);X.value=J??X.value??(be==null?void 0:be[X==null?void 0:X.prop])}return X})),D});let U={};for(let D in V)D!=="id"&&(U[D]=V[D]);let y=[];if(y.push({id:Be==null?void 0:Be.id,keyType:Ae==null?void 0:Ae[1],value:{pageData:U}}),(y==null?void 0:y.length)>0)return y}}},Xe=async(be,Ye,Ae)=>{var ce,Be,Je,ut,k,V,U,y,D,q;let se=await Te.getItemData(Ye,sessionStorage.getItem("systemKey"),""),te=se==null?void 0:se.find(X=>(X==null?void 0:X.name)===(Ae==null?void 0:Ae[0]));if(te){if((te==null?void 0:te.comp)==="Table"){let X={};for(let G in p.cloneDeep(be))p.cloneDeep(be)[G]!=="loginUser"?X[G]=p.cloneDeep(be)[G]:X[G]=((ce=Le.value)==null?void 0:ce.account)||((Be=Le.value)==null?void 0:Be.账号);await p.createInsofDataApi({key:{type:"data",pageKey:Ye,tableId:te==null?void 0:te.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:X}})}else if((te==null?void 0:te.comp)==="Form"){let X=p.cloneDeep(te),G=Object.keys(be),J="";(ut=(Je=p.cloneDeep(X))==null?void 0:Je.compData)==null||ut.forEach(H=>{var le,Fe;(H==null?void 0:H.key)==="formContent"&&((Fe=(le=p.cloneDeep(H))==null?void 0:le.contents)==null||Fe.forEach(ye=>{var Ge;G.includes(ye==null?void 0:ye.key)&&(ye==null?void 0:ye.value)===((Ge=Le.value)==null?void 0:Ge.姓名)&&(J=ye==null?void 0:ye.key)}))});let de=[];(k=Object.values(be[J]))==null||k.forEach(H=>{H!=null&&H.includes("(")&&de.push(H)}),de=[...new Set(de)];const K=de==null?void 0:de.map(async H=>{var z,he,Ne,He,Re,re,fe,Se,B,Ie,Me,we;let le="";(re=(Re=(He=(Ne=(he=(z=p.cloneDeep(H))==null?void 0:z.split("("))==null?void 0:he[1])==null?void 0:Ne.split(")"))==null?void 0:He[0])==null?void 0:Re.split(":"))==null||re.forEach(R=>{le=le===""?le+R.replaceAll("'",""):le+"/"+R.replaceAll("'","")});let Fe=[];(we=(Me=(Ie=(B=(Se=(fe=p.cloneDeep(H))==null?void 0:fe.split("<"))==null?void 0:Se[1])==null?void 0:B.split(">"))==null?void 0:Ie[0])==null?void 0:Me.split(":"))==null||we.forEach(R=>{Fe.push(R.replaceAll("'",""))});const ye=await Te.getItemData(le,sessionStorage.getItem("systemKey"),"");let Ge="";return ye==null||ye.forEach(R=>{var L;R.name===(Fe==null?void 0:Fe[0])&&((L=R==null?void 0:R.compData)==null||L.forEach(ie=>{var Ve;(ie==null?void 0:ie.key)==="formContent"&&((Ve=ie.contents)==null||Ve.forEach(ue=>{(ue==null?void 0:ue.key)===(Fe==null?void 0:Fe[1])&&(Ge=ue==null?void 0:ue.value)}))}))}),{[H]:Ge}}),_e=await Promise.all(K);X.compData=(U=(V=p.cloneDeep(X))==null?void 0:V.compData)==null?void 0:U.map(H=>{var le,Fe;return(H==null?void 0:H.key)==="formContent"&&(H.contents=(Fe=(le=p.cloneDeep(H))==null?void 0:le.contents)==null?void 0:Fe.map(ye=>{var Ge,z,he,Ne;return(Ge=be[J])!=null&&Ge[ye==null?void 0:ye.key]&&(be[J][ye==null?void 0:ye.key].includes("(")?ye.value=(z=_e==null?void 0:_e.find(He=>{var Re;return((Re=Object.keys(He))==null?void 0:Re[0])===be[J][ye==null?void 0:ye.key]}))==null?void 0:z[be[J][ye==null?void 0:ye.key]]:ye.value=(Ne=(he=p.cloneDeep(be))==null?void 0:he[J])==null?void 0:Ne[ye==null?void 0:ye.key]),ye})),H});const ke=await p.getInsofDataApi({key:{type:"structure",pageKey:Ye,systemKey:sessionStorage.getItem("systemKey")}});let ae="";((y=ke==null?void 0:ke.data)==null?void 0:y.type)==="success"&&((q=(D=ke==null?void 0:ke.data)==null?void 0:D.result)==null||q.forEach(H=>{var le,Fe;((Fe=(le=H==null?void 0:H.value)==null?void 0:le.pageData)==null?void 0:Fe.name)===(Ae==null?void 0:Ae[0])&&(ae=H.id)}),await p.updateInsofDataApi({id:ae,value:{pageData:X}}))}}},nt=(be,Ye="",Ae={})=>{for(const[se,te]of Object.entries(be)){const ce=Ye?`${Ye}.${se}`:se;te!==null&&typeof te=="object"&&!Array.isArray(te)&&Object.prototype.toString.call(te)!=="[object Date]"?nt(te,ce,Ae):Ae[ce]=te}return Ae},Pe=async(be,Ye,Ae,se)=>{var Be,Je,ut,k,V,U,y,D,q,X,G,J,de,K,_e,ke,ae,H,le,Fe,ye,Ge,z,he,Ne;let te=await Te.getItemData(Ye,sessionStorage.getItem("systemKey"),""),ce=te==null?void 0:te.find(He=>(He==null?void 0:He.name)===(Ae==null?void 0:Ae[0]));if(ce){if(!(Ae!=null&&Ae[1])&&(ce==null?void 0:ce.comp)==="Table"){let He={},Re=[],re=(Je=(Be=ce==null?void 0:ce.compData)==null?void 0:Be.find(B=>(B==null?void 0:B.key)==="header"))==null?void 0:Je.contents;re!=null&&re.every(B=>Array.isArray(B))?Re=(k=Te.getColumnChild((ut=re==null?void 0:re[0])==null?void 0:ut.filter(B=>(B==null?void 0:B.label)!=="操作")))==null?void 0:k.map(B=>B==null?void 0:B.prop):Re=re==null?void 0:re.map(B=>B==null?void 0:B.label);for(let B in p.cloneDeep(be))if(p.cloneDeep(be)[B]!=="loginUser"){let Ie=nt(p.cloneDeep(be)[B]),Me={};for(let we in Ie)if(Re!=null&&Re.find(R=>R===we))Me[we]=Ie[we];else if(Re!=null&&Re.find(R=>(R==null?void 0:R.toUpperCase())===(we==null?void 0:we.toUpperCase()))){let R=Re==null?void 0:Re.find(L=>(L==null?void 0:L.toUpperCase())===(we==null?void 0:we.toUpperCase()));Me[R]=Ie[we]}He[B]=Me}else He[B]=((V=Le.value)==null?void 0:V.account)||((U=Le.value)==null?void 0:U.账号);let fe=await p.getInsofDataApi({keyLikes:{tableId:ce==null?void 0:ce.id}});if(((D=(y=fe==null?void 0:fe.data)==null?void 0:y.result)==null?void 0:D.length)>0){let B=(X=(q=fe==null?void 0:fe.data)==null?void 0:q.result)==null?void 0:X.map(Ie=>Ie==null?void 0:Ie.id);(B==null?void 0:B.length)>0&&await p.batchDeleteInsofDataApi({ids:B})}let Se=[];if((G=ce==null?void 0:ce.compData)!=null&&G.find(B=>(B==null?void 0:B.key)==="pageColumn")&&((K=(de=(J=ce==null?void 0:ce.compData)==null?void 0:J.find(B=>(B==null?void 0:B.key)==="pageColumn"))==null?void 0:de.contents)!=null&&K.includes("["))){const B=await p.getInsofDataApi({id:ce==null?void 0:ce.tableId});let Ie=((H=(ae=(ke=(_e=B==null?void 0:B.data)==null?void 0:_e.result)==null?void 0:ke[0])==null?void 0:ae.key)==null?void 0:H.pageKey)??"";(le=Object.values(He))==null||le.forEach(Me=>{Se.push({key:{type:"data",pageKey:Ie,tableId:ce==null?void 0:ce.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Me}})})}else(Fe=Object.values(He))==null||Fe.forEach(B=>{Se.push({key:{type:"data",pageKey:Ye,tableId:ce==null?void 0:ce.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:B}})});(Se==null?void 0:Se.length)>0&&await p.batchAddInsofDataApi({dataList:Se})}else if(!(Ae!=null&&Ae[1])&&(ce==null?void 0:ce.comp)==="Form"){let He=p.cloneDeep(ce);He.compData=(Ge=(ye=p.cloneDeep(He))==null?void 0:ye.compData)==null?void 0:Ge.map(fe=>{var Se,B;return(fe==null?void 0:fe.key)==="formContent"&&(fe.contents=(B=(Se=p.cloneDeep(fe))==null?void 0:Se.contents)==null?void 0:B.map(Ie=>{var Me,we;return(Me=p.cloneDeep(be))!=null&&Me[Ie==null?void 0:Ie.key]&&(Ie.value=(we=p.cloneDeep(be))==null?void 0:we[Ie==null?void 0:Ie.key]),Ie})),fe});const Re=await p.getInsofDataApi({key:{type:"structure",pageKey:Ye,systemKey:sessionStorage.getItem("systemKey")}});let re="";((z=Re==null?void 0:Re.data)==null?void 0:z.type)==="success"&&((Ne=(he=Re==null?void 0:Re.data)==null?void 0:he.result)==null||Ne.forEach(fe=>{var Se,B;((B=(Se=fe==null?void 0:fe.value)==null?void 0:Se.pageData)==null?void 0:B.name)===(Ae==null?void 0:Ae[0])&&(re=fe.id)}),await p.updateInsofDataApi({id:re,value:{pageData:He}}))}}};let j=null;const Qe=()=>{W.setLoadingPercent(0)},Ke=()=>{clearInterval(j),j=null},vt=()=>{Ke(),Qe()},yt=()=>{j=setInterval(()=>{const be=W.getLoadingPercent();if(be==99){Ke();return}W.setLoadingPercent(be+1)},100)},ct=async be=>{var Ye,Ae,se,te,ce,Be,Je,ut,k,V,U,y,D,q,X,G;W.setImportLoading(!0,Te.loadingTypeConstants.PROGRESS),j||yt();try{if(be.api){let J=new WeakMap;(Ae=(Ye=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:x.value})).data.result)==null?void 0:Ye.filter(z=>{var he,Ne;return((he=z==null?void 0:z.key)==null?void 0:he.pageKey)!=="menu"&&((Ne=z==null?void 0:z.key)==null?void 0:Ne.pageKey)!=="secret"}))==null||Ae.forEach(z=>{J[z.key.pageKey]?J[z.key.pageKey]=[...J[z.key.pageKey],z]:J[z.key.pageKey]=[z]});let K=await Te.getItemData((Q==null?void 0:Q.value)===""?T.value:Q==null?void 0:Q.value,sessionStorage.getItem("systemKey"),"",!1,"","",J),_e="";K=K==null?void 0:K.map(z=>{var he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R;if((z==null?void 0:z.comp)==="Form")z.compData=(he=z.compData)==null?void 0:he.map(L=>{var ie;return(L==null?void 0:L.key)==="formContent"&&(L.contents=(ie=L.contents)==null?void 0:ie.map(Ve=>{var ue;if((Ve==null?void 0:Ve.type)==="Select"){let ve=Te.judgeContents((ue=p.cloneDeep(Ve))==null?void 0:ue.optionUrl,J,K);Ve.value=ve??""??Ve.value}return Ve})),L});else if((z==null?void 0:z.comp)==="Table"&&(Ne=z.compData)!=null&&Ne.find(L=>(L==null?void 0:L.key)==="pageColumn")){let L=(Re=(He=z.compData)==null?void 0:He.find(ve=>(ve==null?void 0:ve.key)==="pageColumn"))==null?void 0:Re.contents,ie=((fe=(re=z.compData)==null?void 0:re.find(ve=>(ve==null?void 0:ve.key)==="pageGroup"))==null?void 0:fe.contents)??"",Ve=(Ie=(B=(Se=L==null?void 0:L.split("["))==null?void 0:Se[1])==null?void 0:B.split("]"))==null?void 0:Ie[0];_e=((Me=L==null?void 0:L.split("["))==null?void 0:Me[0])+((R=(we=C.value)==null?void 0:we.find(ve=>(ve==null?void 0:ve.key)===Ve))==null?void 0:R.value)}return z});let ke={};if(((te=(se=be==null?void 0:be.extraValues)==null?void 0:se.input)==null?void 0:te.length)>0){const z=(Be=(ce=be==null?void 0:be.extraValues)==null?void 0:ce.input)==null?void 0:Be.map(async he=>{var Ne;at!=null&&at.find(He=>He===he)?ke=await ne(he,K):ke[Object.keys(he)[0]]=await ne((Ne=Object.values(he))==null?void 0:Ne[0],K,J)});await Promise.all(z)}else ke=await ne("/",K);let ae=!1;(ut=(Je=be==null?void 0:be.extraValues)==null?void 0:Je.output)==null||ut.forEach(z=>{var he,Ne;(Ne=(he=Object.values(z))==null?void 0:he[0])!=null&&Ne.includes(".doc")&&(ae=!0)});let H;if(ae){const z=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});H=await p.axios.post(be.api,ke,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{z.close()})}else H=await p.axios.post(be.api,ke,{headers:{"Content-Type":"application/json"}});let le=(y=(U=(V=(k=p.cloneDeep(be))==null?void 0:k.extraValues)==null?void 0:V.output)==null?void 0:U.map(z=>{var he,Ne,He,Re,re,fe,Se,B,Ie,Me,we,R,L,ie,Ve,ue;if(!((Ne=(he=Object.values(z))==null?void 0:he[0])!=null&&Ne.includes(".doc"))){let ve=(Me=(Ie=(B=(Re=p.cloneDeep((He=Object.values(z))==null?void 0:He[0]))==null?void 0:Re.split("["))==null?void 0:B[((Se=(fe=p.cloneDeep((re=Object.values(z))==null?void 0:re[0]))==null?void 0:fe.split("["))==null?void 0:Se.length)-1])==null?void 0:Ie.split("]"))==null?void 0:Me[0],Ze=ve==null?void 0:ve.split(":"),Oe=(L=p.cloneDeep((we=Object.values(z))==null?void 0:we[0]))==null?void 0:L.substring(0,p.cloneDeep((R=Object.values(z))==null?void 0:R[0]).lastIndexOf("["));if(Oe=(Ve=p.cloneDeep(Oe))==null?void 0:Ve.slice(0,((ie=p.cloneDeep(Oe))==null?void 0:ie.length)-1),Oe!=null&&Oe.includes("[")){let et="";if((ue=xa(Oe,"/"))==null||ue.forEach(Z=>{var Ue,Ce,lt,it,bt,kt,st;if(!(Z!=null&&Z.includes("[")))et=et===""?et+Z.replaceAll("/",""):et+"/"+Z.replaceAll("/","");else{let dt=p.cloneDeep(Z).slice(1,((Ue=p.cloneDeep(Z))==null?void 0:Ue.length)-1),xt=(kt=(bt=(it=(lt=(Ce=p.cloneDeep(dt))==null?void 0:Ce.split("["))==null?void 0:lt[1])==null?void 0:it.split("]"))==null?void 0:bt[0])==null?void 0:kt.split(":"),Tt="",gt=(st=K==null?void 0:K.find(wt=>(wt==null?void 0:wt.name)===(xt==null?void 0:xt[0])))==null?void 0:st.compData;gt==null||gt.forEach(wt=>{var $t;(wt==null?void 0:wt.key)==="formContent"&&(($t=wt==null?void 0:wt.contents)==null||$t.forEach(ft=>{(ft==null?void 0:ft.key)===(xt==null?void 0:xt[1])&&(Tt=ft==null?void 0:ft.value)}))}),et=et===""?et+Tt.replaceAll("/",""):et+"/"+Tt.replaceAll("/","")}}),Oe=et,Oe[(Oe==null?void 0:Oe.length)-1]!=="/")return Oe}else Oe=(Q==null?void 0:Q.value)===""?T.value:Q==null?void 0:Q.value}}))==null?void 0:y.filter(z=>z);le=[...new Set(p.cloneDeep(le))];let Fe=le==null?void 0:le.map(async z=>{let he=await Te.getItemData(z,sessionStorage.getItem("systemKey"),"",!1,"","",J);if((he==null?void 0:he.length)===0)return await Te.getParentContents(z)});await Promise.all(Fe);let ye=[],Ge=(X=(q=(D=p.cloneDeep(be))==null?void 0:D.extraValues)==null?void 0:q.output)==null?void 0:X.map(async z=>{var B,Ie,Me,we,R,L,ie,Ve,ue,ve,Ze,Oe,et,Z,Ue,Ce,lt,it,bt,kt,st,dt,xt,Tt,gt,wt,$t,ft,Wt,Pt,Yt,cn,nn,_n,gn,Sn,mn,Tn,In,Bn,An,an,Dt,Qt,ht,Kn,Ot,Jt,dn,un,kn,on,On,xn,Ia,ca,Ba,Aa,ua,pa,Na,ea,Va,da,Oa,Wn,Ma,fa,ha,Pa;if((Ie=(B=Object.values(z))==null?void 0:B[0])!=null&&Ie.includes(".doc")){var he=new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"}),Ne=H.headers["content-disposition"],He=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),Re=He.exec(Ne),re=Re==null?void 0:Re[1],fe=document.createElement("a"),Se=window.URL.createObjectURL(he);w.value=[{name:re,blobUrl:Se}],h.value=!0}else{let ta=(ve=(ue=(Ve=(we=p.cloneDeep((Me=Object.values(z))==null?void 0:Me[0]))==null?void 0:we.split("["))==null?void 0:Ve[((ie=(L=p.cloneDeep((R=Object.values(z))==null?void 0:R[0]))==null?void 0:L.split("["))==null?void 0:ie.length)-1])==null?void 0:ue.split("]"))==null?void 0:ve[0],zt=ta==null?void 0:ta.split(":"),Ht=(et=p.cloneDeep((Ze=Object.values(z))==null?void 0:Ze[0]))==null?void 0:et.substring(0,p.cloneDeep((Oe=Object.values(z))==null?void 0:Oe[0]).lastIndexOf("["));if(Ht!=null&&Ht.includes("[")?Ht=(Ue=p.cloneDeep(Ht))==null?void 0:Ue.slice(0,((Z=p.cloneDeep(Ht))==null?void 0:Z.length)-1):Ht===""&&(Ht=T.value),Ht=Ht.replaceAll("<","[").replaceAll(">","]"),Ht!=null&&Ht.includes("[")){let Et="";(Ce=xa(Ht,"/"))==null||Ce.forEach((Mt,jt)=>{var qt,Ut,ln,pn,$n,Mn,za,Ra,wn,La,Fa;if(!(Mt!=null&&Mt.includes("[")))Et=Et===""?Et+Mt.replaceAll("/",""):Et+"/"+Mt.replaceAll("/","");else{let na="",Dn="";(qt=p.cloneDeep(Mt))!=null&&qt.includes("]")?(na=p.cloneDeep(Mt).slice(1,((Ut=p.cloneDeep(Mt))==null?void 0:Ut.length)-1),Dn=(za=(Mn=($n=(pn=(ln=p.cloneDeep(na))==null?void 0:ln.split("["))==null?void 0:pn[1])==null?void 0:$n.split("]"))==null?void 0:Mn[0])==null?void 0:za.split(":")):(na=p.cloneDeep(Mt).slice(1,(Ra=p.cloneDeep(Mt))==null?void 0:Ra.length),Dn=(wn=p.cloneDeep(na))==null?void 0:wn.split("/"));let Hn="",Zt=(La=K==null?void 0:K.find(yn=>(yn==null?void 0:yn.name)===(Dn==null?void 0:Dn[0])))==null?void 0:La.compData;Zt==null||Zt.forEach(yn=>{var $a;(yn==null?void 0:yn.key)==="formContent"&&(($a=yn==null?void 0:yn.contents)==null||$a.forEach(jn=>{(jn==null?void 0:jn.key)===(Dn==null?void 0:Dn[1])&&(Hn=jn==null?void 0:jn.value)}))}),((Fa=xa(Ht,"/"))==null?void 0:Fa.length)-1!==jt?Et=Et===""?Et+Hn.replaceAll("/",""):Et+"/"+Hn.replaceAll("/",""):Et=Et+l.value+Hn.replaceAll("/","")}}),(lt=T.value)!=null&<.includes(Et)?Ht=T.value:Ht=Et}else Ht=(Q==null?void 0:Q.value)===""?T.value:Q==null?void 0:Q.value;let en=p.cloneDeep((it=Object.keys(z))==null?void 0:it[0]);if(((bt=H==null?void 0:H.data)==null?void 0:bt.statusCode)===200||((kt=H==null?void 0:H.data)==null?void 0:kt.code)===200){if(((dt=(st=H==null?void 0:H.data)==null?void 0:st.data)!=null&&dt[en]||(Tt=(xt=H==null?void 0:H.data)==null?void 0:xt.result)!=null&&Tt[en])&&(zt==null?void 0:zt.length)===1)return await Pe(((wt=(gt=H==null?void 0:H.data)==null?void 0:gt.data)==null?void 0:wt[en])||((ft=($t=H==null?void 0:H.data)==null?void 0:$t.result)==null?void 0:ft[en]),p.cloneDeep(Ht),zt,_e);if((Pt=(Wt=H==null?void 0:H.data)==null?void 0:Wt.data)!=null&&Pt[en]||(cn=(Yt=H==null?void 0:H.data)==null?void 0:Yt.result)!=null&&cn[en]){let Et=await me(((_n=(nn=H==null?void 0:H.data)==null?void 0:nn.data)==null?void 0:_n[en])||((Sn=(gn=H==null?void 0:H.data)==null?void 0:gn.result)==null?void 0:Sn[en]),p.cloneDeep(Ht),zt,J,K);return Et&&(ye=[...ye,...Et]),Et}else{if(!((mn=H==null?void 0:H.data)!=null&&mn.data)){let Et=await Te.getItemData(T.value,sessionStorage.getItem("systemKey"),"",!1,"","",J);Et=Et==null?void 0:Et.map(jt=>{var qt;return(jt==null?void 0:jt.name)===(zt==null?void 0:zt[0])&&(jt.compData=(qt=jt.compData)==null?void 0:qt.map(Ut=>{var ln;return(Ut==null?void 0:Ut.key)==="formContent"&&(Ut.contents=(ln=Ut.contents)==null?void 0:ln.map(pn=>{var $n,Mn;return(pn==null?void 0:pn.key)===(zt==null?void 0:zt[1])&&(pn.value=(Mn=($n=H==null?void 0:H.data)==null?void 0:$n.result)==null?void 0:Mn[en==null?void 0:en.replaceAll(":","")]),pn})),Ut})),jt});let Mt=[];(Tn=Et==null?void 0:Et.filter(jt=>(jt==null?void 0:jt.comp)==="Form"))==null||Tn.forEach(async jt=>{let qt={};for(let Ut in jt)Ut!=="id"&&(qt[Ut]=jt[Ut]);Mt.push({id:jt==null?void 0:jt.id,value:{pageData:qt}})}),(Mt==null?void 0:Mt.length)>0&&await p.batchUpdateInsofDataApi({dataList:Mt});return}if((zt==null?void 0:zt.length)===1){const Et=(An=(Bn=(In=H==null?void 0:H.data)==null?void 0:In.data)==null?void 0:Bn.path)==null?void 0:An.path;let Mt="";(Kn=(ht=(Qt=(Dt=(an=Et==null?void 0:Et.split("("))==null?void 0:an[1])==null?void 0:Dt.split(")"))==null?void 0:Qt[0])==null?void 0:ht.split(":"))==null||Kn.forEach(Ut=>{var ln,pn;Mt=Mt===""?Mt+((ln=Ut==null?void 0:Ut.replaceAll("'",""))==null?void 0:ln.trim()):Mt+"/"+((pn=Ut==null?void 0:Ut.replaceAll("'",""))==null?void 0:pn.trim())});let jt=[(kn=(un=(dn=(Jt=(Ot=Et==null?void 0:Et.split("<"))==null?void 0:Ot[1])==null?void 0:Jt.split(">"))==null?void 0:dn[0])==null?void 0:un.replaceAll("'",""))==null?void 0:kn.trim()],qt;return(xn=(On=(on=H==null?void 0:H.data)==null?void 0:on.data)==null?void 0:On.data)!=null&&xn[zt==null?void 0:zt[0]]?qt=await Pe((Ba=(ca=(Ia=H==null?void 0:H.data)==null?void 0:Ia.data)==null?void 0:ca.data)==null?void 0:Ba[zt==null?void 0:zt[0]],Mt,zt,_e):qt=await Xe((ua=(Aa=H==null?void 0:H.data)==null?void 0:Aa.data)==null?void 0:ua.data,Mt,jt,J),qt}else{const Et=(ea=(Na=(pa=H==null?void 0:H.data)==null?void 0:pa.data)==null?void 0:Na.path)==null?void 0:ea.path;let Mt="";return(Ma=(Wn=(Oa=(da=(Va=Et==null?void 0:Et.split("("))==null?void 0:Va[1])==null?void 0:da.split(")"))==null?void 0:Oa[0])==null?void 0:Wn.split(":"))==null||Ma.forEach(qt=>{var Ut,ln;Mt=Mt===""?Mt+((Ut=qt==null?void 0:qt.replaceAll("'",""))==null?void 0:Ut.trim()):Mt+"/"+((ln=qt==null?void 0:qt.replaceAll("'",""))==null?void 0:ln.trim())}),await me((Pa=(ha=(fa=H==null?void 0:H.data)==null?void 0:fa.data)==null?void 0:ha.data)==null?void 0:Pa[zt==null?void 0:zt[0]],Mt,zt,J,K)}}}}});if(await Promise.all(Ge),(ye==null?void 0:ye.length)>0){let z=[];ye==null||ye.forEach(He=>{z!=null&&z.find(Re=>{var re,fe,Se,B;return((fe=(re=Re==null?void 0:Re.value)==null?void 0:re.pageData)==null?void 0:fe.name)===((B=(Se=He==null?void 0:He.value)==null?void 0:Se.pageData)==null?void 0:B.name)})||z.push(He)});let he=[];z==null||z.forEach(He=>{var fe,Se,B,Ie;let Re=p.cloneDeep(He);Re.value.pageData.compData=(fe=Re.value.pageData.compData)==null?void 0:fe.map(Me=>{var we;return(Me==null?void 0:Me.key)==="formContent"&&(Me.contents=(we=Me.contents)==null?void 0:we.map(R=>{var ie,Ve,ue,ve;let L=(ie=p.cloneDeep(ye))==null?void 0:ie.find(Ze=>(Ze==null?void 0:Ze.keyType)===(R==null?void 0:R.key));if(L){let Ze=(ve=(ue=(Ve=L.value.pageData.compData)==null?void 0:Ve.find(Oe=>(Oe==null?void 0:Oe.key)==="formContent"))==null?void 0:ue.contents)==null?void 0:ve.find(Oe=>(Oe==null?void 0:Oe.key)===(R==null?void 0:R.key));R.value=Ze==null?void 0:Ze.value}return R})),Me}),he.push({id:Re==null?void 0:Re.id,value:Re==null?void 0:Re.value});let re=[];(Ie=(B=(Se=Re==null?void 0:Re.value)==null?void 0:Se.pageData)==null?void 0:B.compData)==null||Ie.forEach(Me=>{var we;(Me==null?void 0:Me.key)==="formContent"&&((we=Me==null?void 0:Me.contents)==null||we.forEach(R=>{var L,ie,Ve,ue,ve,Ze;if((ie=(L=R==null?void 0:R.optionUrl)==null?void 0:L.menuSelect)!=null&&ie.find(Oe=>Oe==null?void 0:Oe.includes("[")))if(re!=null&&re.find(Oe=>{var et,Z,Ue;return((et=Oe==null?void 0:Oe.key)==null?void 0:et.join(","))===((Ue=(Z=R==null?void 0:R.optionUrl)==null?void 0:Z.menuSelect)==null?void 0:Ue.join(","))})){let Oe=(Ve=re==null?void 0:re.find(et=>{var Z,Ue,Ce;return((Z=et==null?void 0:et.key)==null?void 0:Z.join(","))===((Ce=(Ue=R==null?void 0:R.optionUrl)==null?void 0:Ue.menuSelect)==null?void 0:Ce.join(","))}))==null?void 0:Ve.value;Oe.push({key:R==null?void 0:R.prop,groups:(ue=R==null?void 0:R.optionUrl)==null?void 0:ue.groupSelect,value:R==null?void 0:R.value}),re=re==null?void 0:re.map(et=>{var Z,Ue,Ce;return((Z=et==null?void 0:et.key)==null?void 0:Z.join(","))===((Ce=(Ue=R==null?void 0:R.optionUrl)==null?void 0:Ue.menuSelect)==null?void 0:Ce.join(","))&&(et.value=Oe),et})}else re.push({key:(ve=R==null?void 0:R.optionUrl)==null?void 0:ve.menuSelect,value:[{key:R==null?void 0:R.prop,groups:(Ze=R==null?void 0:R.optionUrl)==null?void 0:Ze.groupSelect,value:R==null?void 0:R.value}]})}))}),(re==null?void 0:re.length)>0&&(re=re==null?void 0:re.map(Me=>{var R;let we="";return(R=Me==null?void 0:Me.key)==null||R.forEach(L=>{var ie;if(!(L!=null&&L.includes("[")))we=we===""?we+L:we+"/"+L;else{let Ve="",ue=(ie=L==null?void 0:L.replaceAll("[","").replaceAll("]",""))==null?void 0:ie.split(":");K==null||K.forEach(ve=>{var Ze;(ve==null?void 0:ve.name)===(ue==null?void 0:ue[0])&&((Ze=ve==null?void 0:ve.compData)==null||Ze.forEach(Oe=>{var et;(Oe==null?void 0:Oe.key)==="formContent"&&((et=Oe==null?void 0:Oe.contents)==null||et.forEach(Z=>{(Z==null?void 0:Z.prop)===(ue==null?void 0:ue[1])&&(Ve=Z==null?void 0:Z.value)}))}))}),we=we+l.value+Ve}}),Me.key=we,Me})),re==null||re.forEach(Me=>{var ie,Ve,ue;let we=(ie=J[Me.key])==null?void 0:ie.find(ve=>{var Ze,Oe,et,Z,Ue,Ce,lt;return((Oe=(Ze=ve==null?void 0:ve.value)==null?void 0:Ze.pageData)==null?void 0:Oe.name)===((Ue=(Z=(et=Me==null?void 0:Me.value)==null?void 0:et[0])==null?void 0:Z.groups)==null?void 0:Ue[0])&&((lt=(Ce=ve==null?void 0:ve.value)==null?void 0:Ce.pageData)==null?void 0:lt.name)!==void 0}),R=we==null?void 0:we.id,L=(Ve=we==null?void 0:we.value)==null?void 0:Ve.pageData;L.compData=(ue=L.compData)==null?void 0:ue.map(ve=>{var Ze;return(ve==null?void 0:ve.key)==="formContent"&&(ve.contents=(Ze=ve.contents)==null?void 0:Ze.map(Oe=>{var Z;let et=(Z=Me.value)==null?void 0:Z.find(Ue=>(Ue==null?void 0:Ue.key)===(Oe==null?void 0:Oe.prop));return et&&(Oe.value=et.value),Oe})),ve}),he.push({id:R,value:{pageData:L}})})});let Ne=(G=p.cloneDeep(ye))==null?void 0:G[0];(he==null?void 0:he.length)>0&&await p.batchUpdateInsofDataApi({dataList:he})}M.setFreshContent(!0)}W.setImportLoading(!1),vt()}catch{p.ElMessage.error("方法执行错误,请查看方法!"),W.setImportLoading(!1),vt()}tt.value=!0},at=["createInsofDataApi"],St=Do(async be=>{ct(be)},100),ge=async be=>{var Je,ut,k,V,U;const Ye=p.cloneDeep(be);let Ae,se=new WeakMap,te=await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:x.value});(ut=(Je=te.data.result)==null?void 0:Je.filter(y=>{var D,q;return((D=y==null?void 0:y.key)==null?void 0:D.pageKey)!=="menu"&&((q=y==null?void 0:y.key)==null?void 0:q.pageKey)!=="secret"}))==null||ut.forEach(y=>{se[y.key.pageKey]?se[y.key.pageKey]=[...se[y.key.pageKey],y]:se[y.key.pageKey]=[y]}),be!=null&&be[0].path&&(Ae=await(Ye==null?void 0:Ye.map(async(y,D)=>{var ke,ae,H,le,Fe,ye,Ge,z,he,Ne,He,Re,re,fe,Se,B;const X=(ke=se[y==null?void 0:y.path])==null?void 0:ke.filter(Ie=>{var Me;return((Me=Ie==null?void 0:Ie.key)==null?void 0:Me.type)==="data"});let G="";const J=await Te.getItemData(T.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,se);X==null||X.forEach(Ie=>{var Me,we,R,L,ie;((we=(Me=Ie==null?void 0:Ie.value)==null?void 0:Me.tableData)==null?void 0:we.算法名称)===((R=Ye==null?void 0:Ye[D])==null?void 0:R.method)&&(G=(ie=(L=Ie==null?void 0:Ie.value)==null?void 0:L.tableData)==null?void 0:ie.算法体)});const de=await Te.getItemData(y==null?void 0:y.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,se);let K="",_e=(Fe=(le=(H=(ae=de==null?void 0:de[0])==null?void 0:ae.compData)==null?void 0:H.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:le.contents)==null?void 0:Fe.findIndex(Ie=>(Ie==null?void 0:Ie.prop)==="算法体");return(Ge=(ye=de==null?void 0:de[0])==null?void 0:ye.compData)==null||Ge.forEach(Ie=>{var Me;(Ie==null?void 0:Ie.key)==="tableContents"&&((Me=Ie==null?void 0:Ie.contents)==null||Me.forEach(we=>{we!=null&&we.find(R=>R===(y==null?void 0:y.method))&&(K=we[_e])}))}),{buttonName:((z=Ye==null?void 0:Ye[D])==null?void 0:z.method)||((He=(Ne=(he=X==null?void 0:X[0])==null?void 0:he.value)==null?void 0:Ne.tableData)==null?void 0:He.算法名称),api:(G===""?(fe=(re=(Re=X==null?void 0:X[0])==null?void 0:Re.value)==null?void 0:re.tableData)==null?void 0:fe.算法体:G)||K,content:J==null?void 0:J.filter(Ie=>Ie.comp!=="methodButton"),extraContent:(Se=p.cloneDeep(y.value))==null?void 0:Se.slice(1),methodName:(y==null?void 0:y.path)??"",extraValues:(B=Ye==null?void 0:Ye[D])==null?void 0:B.data}})));const ce=Ye==null?void 0:Ye.map(async y=>{var de,K,_e,ke,ae,H;const D=(de=te.data.result)==null?void 0:de.filter(le=>{var Fe,ye,Ge;return((Fe=le==null?void 0:le.key)==null?void 0:Fe.parentTable)===""&&((ye=le==null?void 0:le.key)==null?void 0:ye.type)==="method"&&((Ge=le==null?void 0:le.key)==null?void 0:Ge.methodName)===le.method}),q=D==null?void 0:D[0],X=(K=te.data.result)==null?void 0:K.filter(le=>{var Fe,ye;return((Fe=le==null?void 0:le.key)==null?void 0:Fe.type)==="methodData"&&((ye=le==null?void 0:le.key)==null?void 0:ye.tableId)===(q==null?void 0:q.id)}),G=await Te.getItemData(T.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,se),J=X==null?void 0:X[0];return{buttonName:(_e=q==null?void 0:q.key)==null?void 0:_e.methodKey,api:(ae=(ke=J==null?void 0:J.value)==null?void 0:ke.tableData)==null?void 0:ae[0],content:G==null?void 0:G.filter(le=>le.comp!=="methodButton"),extraContent:(H=p.cloneDeep(y.value))==null?void 0:H.slice(1),methodName:(y==null?void 0:y.method)??""}}),Be=(k=be==null?void 0:be[0])!=null&&k.path&&((V=be==null?void 0:be[0])==null?void 0:V.path)!==""?await Promise.all(Ae):await Promise.all(ce);i.value=Be==null?void 0:Be.filter(y=>y==null?void 0:y.extraContent),(U=i.value)==null||U.forEach(y=>{var D;y.api===""&&((D=y.content)==null||D.forEach(q=>{var X;q.comp=="Table"&&M.setExtraContents(Te.methodTableToContent(q.compData,(X=y.extraContent)==null?void 0:X[0]))}))})};return e.watch(()=>v.itemData,async()=>{$.value=="view"&&!tt.value&&await ge(p.cloneDeep(v.itemData)),tt.value=!1},{immediate:!0,deep:!0}),(be,Ye)=>{var Ae,se,te,ce,Be;return e.unref($)!=="edit"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"method-content",style:e.normalizeStyle(ze.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((Ae=i.value)==null?void 0:Ae.filter(Je=>(Je==null?void 0:Je.buttonName)!=="保存"),Je=>{var ut;return e.openBlock(),e.createElementBlock("div",null,[Je.api!==""?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,disabled:e.unref(P)===e.unref(T)&&!((ut=Je==null?void 0:Je.buttonName)!=null&&ut.includes("预览")),class:"calculator-content",modelValue:Je.buttonName,onClickTrigger:k=>e.unref(St)(Je),loading:O.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.unref(pe)!==""&&((te=e.unref(T))==null?void 0:te[((se=e.unref(T))==null?void 0:se.length)-1])!==e.unref(l)?(e.openBlock(),e.createElementBlock("div",xc,[e.unref(pe)!==""&&((Be=e.unref(T))==null?void 0:Be[((ce=e.unref(T))==null?void 0:ce.length)-1])!==e.unref(l)?(e.openBlock(),e.createBlock(e.unref(Xt._sfc_main),{key:0,class:"calculator-content",onClickTrigger:De,modelValue:"保存"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:1,fileDataList:w.value,onDestroy:A},null,8,["fileDataList"])):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)}}},Dc=Lt._export_sfc(wc,[["__scopeId","data-v-681e3053"]]),Cc={};function Ec(a,i){return" 567 "}const _c=Lt._export_sfc(Cc,[["render",Ec]]),Sc={class:"module content"},Tc={class:"module data"},Ic={class:"module layout"},Bc={class:"form-content"},Ac=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"40%",title:"签名配置"}),d=e.ref("create"),b=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),v=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),h=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),w=e.ref({}),E=e.ref([]),S=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:E.value},{key:"signConfig",contents:w.value}]}),M=Y=>{var $;w.value=p.cloneDeep(Y),l("change",($=S())==null?void 0:$.compData)},O=Y=>{var $,pe;if((Y==null?void 0:Y.buttonName)==="确认"){const C=p.cloneDeep(Y==null?void 0:Y.content);switch(d.value){case"create":E.value.push({...C,index:(($=E.value)==null?void 0:$.length)+1});break}l("change",(pe=S())==null?void 0:pe.compData),c.visible=!1}else c.visible=!1},W=(Y,$)=>{var pe,C;switch(Y){case"create":(pe=h.value)==null||pe.forEach(P=>{P.value=""}),d.value="create",c.visible=!0;break;case"update":(C=h.value)==null||C.forEach(P=>{P.value=$[P==null?void 0:P.prop]}),d.value="update",c.visible=!0;break;case"delete":E.value.splice($,1),d.value="delete";break}},Ee=()=>{c.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,Y=>{var $,pe;Y&&(w.value=(($=Y==null?void 0:Y.find(C=>C.key==="signConfig"))==null?void 0:$.contents)??{},E.value=((pe=Y==null?void 0:Y.find(C=>C.key==="signTypeList"))==null?void 0:pe.contents)??[])},{immediate:!0}),(Y,$)=>{const pe=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Sc,[$[2]||($[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(C,{class:"module-icon",id:"themeButton",onClick:$[0]||($[0]=P=>W("create"))},{icon:e.withCtx(()=>[e.createVNode(pe,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[$[1]||($[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(P,x)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:x},[e.createElementVNode("span",null,e.toDisplayString(P==null?void 0:P.label),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:T=>W("update",{...P,index:x+1})},{default:e.withCtx(()=>$[3]||($[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:T=>W("delete",x)},{default:e.withCtx(()=>$[4]||($[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ic,[e.createVNode(Bt.ssForm,{rowContents:v.value,onChange:M},null,8,["rowContents"])])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Ee,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",Bc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:b.value,onOnButtonClick:O},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Nc=Lt._export_sfc(Ac,[["__scopeId","data-v-487e0536"]]),Vc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(a,{emit:i}){const s=a,l=i,c=e.ref(1),d=e.computed(()=>{var S,M;return(S=s==null?void 0:s.stepConfig)!=null&&S.allowTrigger?c.value:(M=s==null?void 0:s.stepConfig)==null?void 0:M.active}),b=(S,M)=>{c.value=M,l("clickStep",S,M)},v=S=>Bt.getComponent(S),h=()=>{var M;const S=(M=s==null?void 0:s.stepList)==null?void 0:M.find((O,W)=>W+1===d.value);return console.log("findStep",S),S?S==null?void 0:S.children:[]},w=S=>{l("clickTrigger",S)},E=S=>{l("changeTrigger",S)};return(S,M)=>{var Ee,Y,$,pe,C;const O=e.resolveComponent("el-step"),W=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(W,{direction:(Ee=a.stepConfig)==null?void 0:Ee.direction,active:d.value,"finish-status":"success",simple:(Y=a.stepConfig)==null?void 0:Y.simple,"align-center":(($=a.stepConfig)==null?void 0:$.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.stepList,(P,x)=>(e.openBlock(),e.createBlock(O,{key:x,class:"step-item",onClick:T=>b(P,x+1)},{title:e.withCtx(()=>[e.renderSlot(S.$slots,"title",{title:P==null?void 0:P.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(S.$slots,"description",{description:P==null?void 0:P.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(pe=a.stepConfig)!=null&&pe.allowTrigger&&((C=a.stepConfig)!=null&&C.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(h(),(P,x)=>(e.openBlock(),e.createElementBlock("div",{key:x,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(v(P==null?void 0:P.type)),{modelValue:P.value,"onUpdate:modelValue":T=>P.value=T,onClickTrigger:w,onChangeTrigger:E,content:P==null?void 0:P.content},e.createSlots({_:2},[e.renderList(S.$slots,(T,I)=>({name:I,fn:e.withCtx(Q=>[e.renderSlot(S.$slots,I,e.mergeProps({ref_for:!0},Q||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Oc=Lt._export_sfc(Vc,[["__scopeId","data-v-d7c99969"]]),Mc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(a,{emit:i}){const s=a,l=i,c=e.ref({}),d=e.ref([]),b=(v,h)=>{l("clickStep",v,h)};return e.watch(()=>s==null?void 0:s.itemData,v=>{var h,w;d.value=(h=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepList"))==null?void 0:h.contents,c.value=(w=v==null?void 0:v.find(E=>(E==null?void 0:E.key)==="stepConfig"))==null?void 0:w.contents},{immediate:!0,deep:!0}),(v,h)=>{const w=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Oc,{stepConfig:c.value,stepList:d.value,onClickStep:b},{icon:e.withCtx(()=>[e.createVNode(w,{name:"import"})]),title:e.withCtx(({title:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),description:e.withCtx(({description:E})=>[e.createTextVNode(e.toDisplayString(E),1)]),_:1},8,["stepConfig","stepList"])}}}),Pc=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(a){return(i,s)=>{const l=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(a.activities,(d,b)=>(e.openBlock(),e.createBlock(l,{key:b,timestamp:d.timestamp,placement:a.timeLineConfig.placement,center:a.timeLineConfig.isCenter,"hide-timestamp":!0,type:a.timeLineConfig.type,color:a.timeLineConfig.color,size:a.timeLineConfig.size,icon:a.timeLineConfig.icon,hollow:a.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:d==null?void 0:d.content,timestamp:d==null?void 0:d.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),zc=Lt._export_sfc(Pc,[["__scopeId","data-v-4172a886"]]),Rc={class:"line-content"},Lc={class:"line-time"},Fc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(a){const i=a,s=e.ref({}),l=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,c=>{var d,b;l.value=(d=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineList"))==null?void 0:d.contents,s.value=(b=c==null?void 0:c.find(v=>(v==null?void 0:v.key)==="timeLineConfig"))==null?void 0:b.contents},{immediate:!0}),(c,d)=>(e.openBlock(),e.createBlock(zc,{activities:l.value,timeLineConfig:s.value},{content:e.withCtx(({content:b,timestamp:v})=>[e.createElementVNode("span",Rc,e.toDisplayString(b),1),e.createElementVNode("span",Lc,e.toDisplayString(v),1)]),_:1},8,["activities","timeLineConfig"]))}}),$c=Lt._export_sfc(Fc,[["__scopeId","data-v-b4d9deed"]]),jc={class:"tabs-content"},Uc={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(a){const i=a,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,l=>{const c=l.find(d=>(d==null?void 0:d.key)=="stepList");c?s.value=c.contents.map(d=>({value:d.value||d.title,label:d.label||d.title,children:d.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(l,c)=>(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(Bt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Kc=Lt._export_sfc(Uc,[["__scopeId","data-v-40865f68"]]),so=p.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(a){this.itemData=a},setCurStructureCompIds(a){this.curStructureCompIds=a},setRefreshCurStructure(a){this.isRefreshCurStructure=a},setOriginalData(a){this.originalData=a},setExtraContents(a){this.extraContents=a},setNodeDev(a){this.nodeDev=a},setIsEdit(a){this.isEdit=a}}}),Wc={class:"type-select"},Hc=["onClick"],qc={class:"list-icon"},Gc={__name:"modelSelect",setup(a){const i=so(p.pinia),{itemData:s}=p.storeToRefs(i),l=c=>{const d=p.cloneDeep(s.value);d.push({comp:c.comp,name:c.name,compData:[]}),i.setItemData(d)};return(c,d)=>{const b=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(pr),(v,h)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:h},[e.createElementVNode("div",{class:"list-content",onClick:w=>l(v)},[e.createElementVNode("div",qc,[e.createVNode(b,{name:v.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(v.name),1)],8,Hc)]))),128))])}}},Xc=Lt._export_sfc(Gc,[["__scopeId","data-v-91799bf8"]]),Yc={class:"fill-content"},Jc={class:"operate-content"},Zc={class:"collapse-title-content"},Qc={class:"collapse-title-item"},eu={key:1},tu=["onClick"],nu={class:"icon-content"},au={key:0,class:"edit-content"},ou=["onClick"],lu={class:"comp-child"},ru={__name:"modelFill",setup(a){const i=so(p.pinia),{itemData:s,originalData:l}=p.storeToRefs(i),c=e.ref([]);e.ref([]);const d=e.ref([]),b=e.ref([]),v=O=>{var Ee;let W=(Ee=p.cloneDeep(b.value))==null?void 0:Ee.map((Y,$)=>(O===$&&(Y.content=!0),Y));b.value=W},h=O=>{var Ee;let W=(Ee=p.cloneDeep(b.value))==null?void 0:Ee.map((Y,$)=>(O===$&&(Y.content=!1),Y));b.value=W,c.value=p.cloneDeep(s.value)},w=(O,W)=>{var pe;let Ee=(pe=p.cloneDeep(b.value))==null?void 0:pe.map((C,P)=>(O===P&&(C.content=!1),C));b.value=Ee;const Y=p.cloneDeep(s.value),$=Y==null?void 0:Y.filter((C,P)=>(P===O&&(C.name=W),C));i.setOriginalData($),i.setItemData($)};e.watch(()=>s.value,()=>{var O,W,Ee;!s.value||((O=s.value)==null?void 0:O.length)===0?c.value=[]:c.value=(W=p.cloneDeep(s.value))==null?void 0:W.filter(Y=>(Y==null?void 0:Y.comp)!=="methodButton"),d.value=c.value,b.value=(Ee=p.cloneDeep(d.value))==null?void 0:Ee.map((Y,$)=>({id:$,content:!1}))},{deep:!0,immediate:!0});const E=O=>sa(O),S=(O,W,Ee)=>{var $,pe;if(!O)return;let Y=p.cloneDeep(s.value);Y=($=Y==null?void 0:Y.map((C,P)=>(P===Ee&&(C.compData=O),C)))==null?void 0:$.filter(C=>(C==null?void 0:C.comp)!=="methodButton"),b.value=(pe=p.cloneDeep(Y))==null?void 0:pe.map((C,P)=>({id:P,content:!1})),i.setOriginalData(Y),i.setItemData(Y)},M=O=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const W=p.cloneDeep(s.value),Ee=W==null?void 0:W.filter((Y,$)=>$!==O);i.setOriginalData(Ee),i.setItemData(Ee),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(O,W)=>{const Ee=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Yc,[W[1]||(W[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Jc,[e.createVNode(_l.default,{class:"collapse-content",collapseContents:c.value},{title:e.withCtx(({item:Y,index:$})=>{var pe,C,P,x,T,I,Q,Le,tt,ze;return[e.createElementVNode("div",Zc,[e.createElementVNode("div",Qc,[(C=(pe=b.value)==null?void 0:pe.find(We=>We.id===$))!=null&&C.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:Y.name&&Y.name!==""?"8px":"0px"})},e.toDisplayString(Y.name),5)),(x=(P=b.value)==null?void 0:P.find(We=>We.id===$))!=null&&x.content?(e.openBlock(),e.createElementBlock("div",eu,[e.createVNode(Bt._sfc_main$2,{modelValue:Y.name,"onUpdate:modelValue":We=>Y.name=We,onClick:W[0]||(W[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(I=(T=b.value)==null?void 0:T.find(We=>We.id===$))!=null&&I.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(We=>v($),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Edit",style:{width:"16px",height:"16px"}})],8,tu))]),e.createElementVNode("div",nu,[(Le=(Q=b.value)==null?void 0:Q.find(We=>We.id===$))!=null&&Le.content?(e.openBlock(),e.createElementBlock("div",au,[e.createVNode(Ee,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(We=>h($),["stop"])},null,8,["onClick"]),e.createVNode(Ee,{name:"Save",onClick:e.withModifiers(We=>w($,Y.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(ze=(tt=b.value)==null?void 0:tt.find(We=>We.id===$))!=null&&ze.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(We=>M($),["stop"]),class:"icon-content"},[e.createVNode(Ee,{name:"Delete",style:{width:"16px",height:"16px"}})],8,ou))])])]}),content:e.withCtx(({item:Y,index:$})=>{var pe,C;return[e.createElementVNode("div",lu,[e.createTextVNode(e.toDisplayString(E(Y.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(E(Y.comp+"Operate")),{itemContents:Y==null?void 0:Y.compData,originalItemContents:(C=(pe=d.value)==null?void 0:pe.find((P,x)=>x===$))==null?void 0:C.compData,onChange:P=>S(P,Y,$)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},iu=Lt._export_sfc(ru,[["__scopeId","data-v-a46a44b9"]]),su={key:0,class:"show-content"},cu={style:{display:"flex"}},uu={__name:"modelShow",setup(a){const i=so(p.pinia),{itemData:s}=p.storeToRefs(i),l=e.ref([]);e.watch(()=>s.value,()=>{var d;!s.value||((d=s.value)==null?void 0:d.length)===0?l.value=[]:l.value=p.cloneDeep(s.value)},{deep:!0,immediate:!0});const c=d=>sa(d);return(d,b)=>{var v;return((v=l.value)==null?void 0:v.length)>0?(e.openBlock(),e.createElementBlock("div",su,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,(h,w)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:w},[e.createElementVNode("div",cu,e.toDisplayString(h.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(h.comp)),{itemData:h==null?void 0:h.compData,childItemData:h==null?void 0:h.itemChildData,key:w},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},pu=Lt._export_sfc(uu,[["__scopeId","data-v-3f3e863e"]]),du={class:"tabs-header"},fu={class:"tabs-list"},hu={class:"tab-name"},vu={class:"tab-actions"},gu=["onClick"],mu=["onClick"],yu=["onClick"],bu={class:"model-operate"},ku={class:"model-select",style:{display:"unset"}},xu={class:"existing-components"},wu={class:"component-list"},Du=["onClick"],Cu={class:"component-info"},Eu={class:"component-type"},_u={class:"component-name"},Su={class:"model-fill"},Tu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.ref([]),d=e.ref(!1),b=e.ref(""),v=e.ref({title:""}),h=e.ref(-1),w=e.ref(!1),E=e.ref(-1),S=e.ref(new WeakMap),M=e.ref(null),O=so(p.pinia),{itemData:W}=p.storeToRefs(O),Ee=()=>{b.value="新增标签页",v.value.title="",h.value=-1,d.value=!0},Y=Pe=>{b.value="修改标签页",v.value.title=c.value[Pe].title,h.value=Pe,d.value=!0},$=Pe=>{const j=P(Pe);S.value.delete(j),c.value.splice(Pe,1),nt()},pe=()=>{if(v.value.title.trim()){if(h.value===-1){const Pe={title:v.value.title,value:v.value.title,label:v.value.title,children:[],id:C()};c.value.push(Pe)}else c.value[h.value].title=v.value.title,c.value[h.value].value=v.value.title,c.value[h.value].label=v.value.title;d.value=!1,nt()}},C=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,P=Pe=>{const j=c.value[Pe];return j.id||(j.id=C()),j.id},x=Pe=>{var Ke;E.value=Pe;const j=P(Pe);M.value=p.cloneDeep(W.value);let Qe=S.value.get(j);!Qe&&((Ke=c.value[Pe].children)==null?void 0:Ke.length)>0&&(Qe=Le(c.value[Pe].children)),Qe?O.setItemData(p.cloneDeep(Qe)):O.setItemData([]),w.value=!0},T=e.computed(()=>{const Pe=Te.useModelComp(p.pinia),j=p.storeToRefs(Pe).itemData.value;return console.log("可用组件数据",j),!j||!Array.isArray(j)?[]:j.filter(Qe=>{var Ke;if(Qe.comp==="Tabs"&&E.value>=0){const vt=P(E.value);if((Ke=Qe.compData)==null?void 0:Ke.some(ct=>{var at;return ct.key==="stepList"&&((at=ct.contents)==null?void 0:at.some(St=>St.id===vt))}))return!1}return!0})}),I=Pe=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[Pe]||Pe,Q=Pe=>{var j;try{const Qe=p.cloneDeep(Pe);Qe.id=Date.now()+Math.random(),Qe.comp==="Tabs"&&((j=Qe.compData)==null||j.forEach(vt=>{vt.key==="stepList"&&vt.contents&&vt.contents.forEach(yt=>{yt.id=C()})}));const Ke=p.cloneDeep(W.value);Ke.push(Qe),O.setItemData(Ke)}catch(Qe){console.error("添加组件失败:",Qe)}},Le=Pe=>Pe.map(j=>{var Qe;switch(j.type){case"form":return{comp:"Form",name:j.value||"表单",compData:tt(j.content)};case"table":return{comp:"Table",name:j.value||"表格",compData:ze(j.content)};default:return{comp:"Unknown",name:j.value||"",compData:((Qe=j.content)==null?void 0:Qe.originalData)||[]}}}),tt=Pe=>{if(!Pe)return[];const j=[];return Pe.rowContents&&j.push({key:"formContent",contents:Pe.rowContents}),Pe.buttonValue&&j.push({key:"formButton",contents:Pe.buttonValue}),typeof Pe.isEnableWrap<"u"&&j.push({key:"enableWrap",contents:Pe.isEnableWrap}),j},ze=Pe=>[],We=()=>{if(E.value>=0&&E.value<c.value.length){const Pe=P(E.value);S.value.set(Pe,p.cloneDeep(W.value)),c.value[E.value].children=oe(W.value),console.log("保存后的数据",oe(W.value))}w.value=!1,E.value=-1,M.value=null,nt()},De=()=>{M.value&&O.setItemData(p.cloneDeep(M.value)),w.value=!1,E.value=-1,M.value=null},A=()=>{w.value&&De()},oe=Pe=>{if(!Array.isArray(Pe))throw new Error("sourceData must be an array");return Pe.map((j,Qe)=>{if(!j||typeof j!="object")return j;const{comp:Ke,name:vt,compData:yt}=j;switch(Ke){case"Form":return{type:"form",content:ne(yt||[]),value:"表单"};case"Table":return{type:"table",content:me(yt||[]),value:"表格"};default:return{type:"xxx",content:Xe(yt||[]),value:""}}})},ne=Pe=>{const j={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},Qe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return Pe.forEach((Ke,vt)=>{if(!Ke||typeof Ke!="object"){console.warn(`Invalid config at index ${vt}:`,Ke);return}const{key:yt,contents:ct}=Ke,at=Qe[yt];if(!at){console.warn(`Unknown Form config key: ${yt}`);return}yt==="enableWrap"?j[at]=!!ct:j[at]=Array.isArray(ct)?ct:[]}),j},me=Pe=>{const j={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},Qe={header:"columns",tableContents:"tableData"};return Pe.forEach((Ke,vt)=>{if(!Ke||typeof Ke!="object"){console.warn(`Invalid config at index ${vt}:`,Ke);return}const{key:yt,contents:ct}=Ke,at=Qe[yt];if(!at){console.warn(`Unknown Table config key: ${yt}`);return}j[at]=Array.isArray(ct)?ct:[]}),j},Xe=Pe=>(console.log("Default conversion logic - to be implemented"),{originalData:Pe,processed:!1,componentType:"unknown"}),nt=()=>{const Pe=[{key:"stepList",contents:c.value}];l("change",Pe)};return e.watch(()=>s.itemContents,Pe=>{if(Pe&&Pe.length>0){const j=Pe.find(Qe=>Qe.key==="stepList");j&&j.contents&&(c.value=j.contents.map(Qe=>({title:Qe.title||"",value:Qe.value||Qe.title||"",label:Qe.label||Qe.title||"",children:Qe.children||[],id:Qe.id||C()})))}},{immediate:!0,deep:!0}),(Pe,j)=>{const Qe=e.resolveComponent("svg-icon"),Ke=e.resolveComponent("el-input"),vt=e.resolveComponent("el-form-item"),yt=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",du,[j[6]||(j[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:Ee},[e.createVNode(Qe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),j[5]||(j[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",fu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(ct,at)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:at},[e.createElementVNode("span",hu,e.toDisplayString(ct.title),1),e.createElementVNode("div",vu,[e.createElementVNode("button",{onClick:St=>Y(at)},"修改标题",8,gu),e.createElementVNode("button",{onClick:St=>x(at)},"布局调整",8,mu),e.createElementVNode("button",{onClick:St=>$(at)},"删除",8,yu)])]))),128))]),e.createVNode(Xt.ssDialog,{modelValue:d.value,"onUpdate:modelValue":j[2]||(j[2]=ct=>d.value=ct),title:b.value,onBeforeDestroy:j[3]||(j[3]=ct=>d.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:j[1]||(j[1]=ct=>d.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:pe},"确定")]),default:e.withCtx(()=>[e.createVNode(yt,{model:v.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(vt,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ke,{modelValue:v.value.title,"onUpdate:modelValue":j[0]||(j[0]=ct=>v.value.title=ct),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Xt.ssDialog,{modelValue:w.value,"onUpdate:modelValue":j[4]||(j[4]=ct=>w.value=ct),title:"布局调整",fullScreen:"",onBeforeDestroy:A},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:De},"取消"),e.createElementVNode("button",{onClick:We},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",bu,[e.createElementVNode("div",ku,[e.createVNode(Xc),e.createElementVNode("div",xu,[j[8]||(j[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",wu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,ct=>(e.openBlock(),e.createElementBlock("div",{key:ct.id,class:"component-item",onClick:at=>Q(ct)},[e.createElementVNode("div",Cu,[e.createElementVNode("span",Eu,e.toDisplayString(I(ct.comp)),1),e.createElementVNode("span",_u,e.toDisplayString(ct.name),1)]),j[7]||(j[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Du))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:Pe.innerWidth},[e.createVNode(pu)])),e.createElementVNode("div",Su,[e.createVNode(iu)])])]),_:1},8,["modelValue"])])}}},Iu=Lt._export_sfc(Tu,[["__scopeId","data-v-9096ed0d"]]);function Bu(){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 Au(a){return{type:"line",...a}}function Nu(){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 Vu(a){return{type:"bar",barWidth:"60%",...a}}function Ou(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Mu(a){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...a}}const Fn={line:{initBaseoptions:Bu,initSeries:Au},bar:{initBaseoptions:Nu,initSeries:Vu},pie:{initBaseoptions:Ou,initSeries:Mu}},Ho=Te.useMenuState(p.pinia),zl=(a,i)=>{var E;const s=[],l=[],{group:c,nameCol:d,valueCol:b}=i||{},v=a==null?void 0:a.find(S=>{const{name:M}=S;return M===c});if(!v)return{names:s,values:l};const h=(E=v==null?void 0:v.compData)==null?void 0:E.find(S=>{const{key:M}=S;return M==="tableContents"});return((h==null?void 0:h.contents)||[]).forEach(S=>{const M=S==null?void 0:S[0];let O=!1;p.isObject(M)&&(M!=null&&M.id)&&(O=!0);let W=d,Ee=b;O&&(W=W+1,Ee=Ee+1);const Y=S==null?void 0:S[W],$=S==null?void 0:S[Ee];s.push(Y),l.push($)}),{names:s,values:l}},Pu=async a=>{const{menu:i,mainKey:s,detailGroup:l,detailNameCol:c,detailValueCol:d,isSelfDetail:b}=a||{};let v=null;const h=sessionStorage.getItem("systemKey");if(b&&Ho.activeMenuPath&&(v=await Te.getItemData(`${Ho.activeMenuPath}`,h,"")),!b){const w=i==null?void 0:i.join("/");v=await Te.getItemData(`${w}^${s}`,h,"")}return zl(v,{group:l,nameCol:c,valueCol:d})},zu=async a=>{const{menu:i,group:s,nameCol:l,valueCol:c}=a||{},d=i==null?void 0:i.join("/"),b=sessionStorage.getItem("systemKey"),v=await Te.getItemData(d,b,"");return zl(v,{group:s,nameCol:l,valueCol:c})},Co=async(a,i)=>{const s={names:[],values:[]},{menu:l,group:c,nameCol:d,valueCol:b}=a||{};if(!l.length||!c)return s;const{mainKey:v,group:h,nameCol:w,valueCol:E,isSelfDetail:S}=i||{};return v&&h&&Bt.isNumber(w)&&Bt.isNumber(E)?await Pu({menu:l,mainKey:v,detailGroup:h,detailNameCol:w,detailValueCol:E,isSelfDetail:S}):Bt.isNumber(d)&&Bt.isNumber(b)?await zu({menu:l,group:c,nameCol:d,valueCol:b}):s},Ru=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Fn==null?void 0:Fn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:w,values:E}=await Co(i,s);if(!w||!E)return h;h.xAxis.data=w;const S=v({data:E});return h.series.push(S),h},Lu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Fn==null?void 0:Fn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:w,values:E}=await Co(i,s);if(!w||!E)return h;h.xAxis.data=w;const S=v({data:E});return h.series.push(S),h},Fu=async({chartBaseConfig:a,chartDataConfig:i,chartDetailConfig:s})=>{const{type:l,title:c}=a||{},d=Fn==null?void 0:Fn[l];if(!d)return;const{initBaseoptions:b,initSeries:v}=d,h=b();h.title.text=c??"";const{names:w,values:E}=await Co(i,s);if(!w||!E)return h;const S=[];for(let O=0;O<w.length;O++){const W=w[O],Ee=E[O];S.push({name:W,value:Ee})}const M=v({data:S});return h.series.push(M),h},$u=async(a=[])=>{var b,v,h;const i=((b=a==null?void 0:a.find(w=>w.key==="chartBaseConfig"))==null?void 0:b.contents)??{},s=((v=a==null?void 0:a.find(w=>w.key==="chartDataConfig"))==null?void 0:v.contents)??{},l=((h=a==null?void 0:a.find(w=>w.key==="chartDetailConfig"))==null?void 0:h.contents)??{},{type:c}=i;let d={};return c==="line"&&(d=await Ru({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="bar"&&(d=await Lu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),c==="pie"&&(d=await Fu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:l})),d},ju=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(a){const i=a,s=e.ref({});e.onMounted(async()=>{const c=i==null?void 0:i.itemData;s.value=await $u(c)});const l=e.computed(()=>(i==null?void 0:i.height)||"300px");return(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:l.value})},[e.createVNode(Rr.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Uu=Lt._export_sfc(ju,[["__scopeId","data-v-d4c081e8"]]),Ku={class:"chart-module layout"},Wu={class:"chart-module content"},Hu={class:"chart-module content"},qu={class:"form-content"},Gu={class:"dialog-footer"},Xu={class:"form-content"},Yu={class:"dialog-footer"},Ju={class:"form-content"},Zu={class:"dialog-footer"},Qu=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i,c=e.reactive({visible:!1,width:"840",title:"基础配置"}),d=e.ref([]),b=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],v=e.ref({}),h=()=>{var se;d.value=b(),(se=d.value)==null||se.forEach(te=>{var Be;const ce=te==null?void 0:te.prop;te.value=(Be=v==null?void 0:v.value)==null?void 0:Be[ce]}),c.visible=!0},w=se=>{v.value=se},E=()=>{var se;c.visible=!1,l("change",(se=Ye())==null?void 0:se.compData)},S=e.reactive({visible:!1,width:"840",title:"数据配置"}),M=e.ref([]),O=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],W=e.ref({}),Ee=()=>{const se=M.value,te=p.cloneDeep(se);return te==null||te.forEach(ce=>{var Je;const Be=ce==null?void 0:ce.prop;ce.value=(Je=W.value)==null?void 0:Je[Be]}),te},Y=se=>{var ce;W.value=se;const te=Ee();M.value=te,l("change",(ce=Ye())==null?void 0:ce.compData)},$=async()=>{const se=await Te.getMenusContent(),te=Ee();te==null||te.forEach(ce=>{(ce==null?void 0:ce.prop)==="menu"&&(ce.contents=se)}),M.value=te,S.visible=!0,await ct(W.value.menu),await ge(W.value.group)},pe=e.reactive({visible:!1,width:"840",title:"详情页配置"}),C=e.ref([]),P=()=>[{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:[]}],x=e.ref({}),T=()=>{const se=C.value,te=p.cloneDeep(se);return te==null||te.forEach(ce=>{var Je;const Be=ce==null?void 0:ce.prop;ce.value=(Je=x.value)==null?void 0:Je[Be]}),te},I=se=>{var ce;x.value=se;const te=T();C.value=te,l("change",(ce=Ye())==null?void 0:ce.compData)},Q=async()=>{await A();const se=p.cloneDeep(Le.value),te=T();te==null||te.forEach(ce=>{var Je;const Be=ce==null?void 0:ce.prop;ce.value=(Je=x==null?void 0:x.value)==null?void 0:Je[Be],Be==="mainKey"&&(ce.contents=se)}),C.value=te,pe.visible=!0},Le=e.ref([]),tt=e.ref([]),ze=e.ref({}),We=e.ref({}),De=()=>{const{compData:se}=Ke.value||{},te=se==null?void 0:se.find(U=>{const{key:y}=U;return y==="header"}),ce=(te==null?void 0:te.contents)||[],Be=ce==null?void 0:ce.filter((U,y)=>{const{label:D}=U;return D!=="操作"}),Je=Be==null?void 0:Be.findIndex((U,y)=>{const{isMainKey:D}=U;return D});if(Je<0)return[];const ut=se==null?void 0:se.find(U=>{const{key:y}=U;return y==="tableContents"}),k=(ut==null?void 0:ut.contents)||[];return k==null?void 0:k.map(U=>{const y=U==null?void 0:U[0];let D=Je;p.isObject(y)&&(y!=null&&y.id)&&(D=D+1);const q=U==null?void 0:U[D];return{label:q,value:q}})},A=async()=>{const se=await De();Le.value=se},oe=async se=>{const te=sessionStorage.getItem("systemKey");return await Te.getItemData(se,te,"")},ne=async se=>{const te=se;tt.value=te==null?void 0:te.map(ce=>{const{name:Be}=ce;return ze.value[Be]=ce,{label:Be,value:Be}})},me=se=>{const{comp:te,compData:ce}=We.value||{};if(te==="Table"){let Be=T();Be=Be.filter(Je=>{const{prop:ut}=Je;return ut!=="formItems"}),at(Be,ce),C.value=Be}},Xe=async()=>{var ce,Be;const se=(ce=x==null?void 0:x.value)==null?void 0:ce.mainKey,te=(Be=W==null?void 0:W.value)==null?void 0:Be.menu;if(se){const ut=`${te==null?void 0:te.join("/")}^${se}`,k=await oe(ut);await ne(k);const V=T();V==null||V.forEach(U=>{(U==null?void 0:U.prop)==="group"&&(U.contents=tt.value)}),C.value=V}};e.watch(()=>{var se;return(se=x==null?void 0:x.value)==null?void 0:se.mainKey},async(se,te)=>{se!=te&&se&&await Xe()});const nt=async se=>{const te=ze.value[se];We.value=te,await me()};e.watch(()=>{var se;return(se=x==null?void 0:x.value)==null?void 0:se.group},async(se,te)=>{se!=te&&se&&nt(se)});const Pe=async()=>{var te;await Xe();const se=(te=x.value)==null?void 0:te.group;await nt(se)},j=e.ref([]),Qe=e.ref({}),Ke=e.ref({}),vt=async se=>{const te=se==null?void 0:se.join("/"),ce=sessionStorage.getItem("systemKey");return await Te.getItemData(te,ce,"")},yt=async se=>{const te=await vt(se);j.value=te==null?void 0:te.map(ce=>{const{name:Be}=ce;return Qe.value[Be]=ce,{label:Be,value:Be}})},ct=async(se,te)=>{await yt(se);const ce=Ee();ce==null||ce.forEach(Be=>{(Be==null?void 0:Be.prop)==="group"&&(Be.contents=j.value)}),M.value=ce};e.watch(()=>{var se;return(se=W==null?void 0:W.value)==null?void 0:se.menu},async(se,te)=>{const ce=se==null?void 0:se.join("/"),Be=te==null?void 0:te.join("/");ce!=Be&&await ct(se)});const at=(se,te)=>{const ce=te==null?void 0:te.find(k=>{const{key:V}=k;return V==="header"}),Be=(ce==null?void 0:ce.contents)||[],Je=Be==null?void 0:Be.filter((k,V)=>{const{label:U}=k;return U!=="操作"}),ut=Je==null?void 0:Je.map((k,V)=>{const{label:U}=k;return{label:U,value:V}});se==null||se.forEach(k=>{const V=k==null?void 0:k.prop;(V==="nameCol"||V==="valueCol")&&(k.contents=ut)})},St=se=>{const{comp:te,compData:ce}=Ke.value||{};if(te==="Table"){W.value.formItems=[];let Be=Ee();Be=Be.filter(Je=>{const{prop:ut}=Je;return ut!=="formItems"}),at(Be,ce),M.value=Be}},ge=async se=>{const te=Qe.value[se];Ke.value=te,await St()};e.watch(()=>{var se;return(se=W==null?void 0:W.value)==null?void 0:se.group},async(se,te)=>{se!=te&&ge(se)});const be=async()=>{var ce,Be;const se=(ce=W.value)==null?void 0:ce.menu;await ct(se);const te=(Be=W.value)==null?void 0:Be.group;await ge(te)},Ye=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:v.value},{key:"chartDataConfig",contents:W.value},{key:"chartDetailConfig",contents:x.value}]}),Ae=()=>{c.visible=!1,S.visible=!1,pe.visible=!1};return e.onMounted(async()=>{var te,ce,Be;M.value=O(),C.value=P();const se=s==null?void 0:s.itemContents;v.value=((te=se==null?void 0:se.find(Je=>Je.key==="chartBaseConfig"))==null?void 0:te.contents)??{},W.value=((ce=se==null?void 0:se.find(Je=>Je.key==="chartDataConfig"))==null?void 0:ce.contents)??{},await be(),x.value=((Be=se==null?void 0:se.find(Je=>Je.key==="chartDetailConfig"))==null?void 0:Be.contents)??{},await Pe()}),(se,te)=>{const ce=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Ku,[te[4]||(te[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(ce,{id:"themeButton",onClick:te[0]||(te[0]=Be=>h())},{default:e.withCtx(()=>te[3]||(te[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Wu,[te[6]||(te[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(ce,{id:"themeButton",onClick:te[1]||(te[1]=Be=>$())},{default:e.withCtx(()=>te[5]||(te[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Hu,[te[8]||(te[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(ce,{id:"themeButton",onClick:te[2]||(te[2]=Be=>Q())},{default:e.withCtx(()=>te[7]||(te[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Xt.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:Ae,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",qu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Gu,[e.createVNode(ce,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>te[9]||(te[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(ce,{class:"ok-button button",onClick:E,id:"themeButton"},{default:e.withCtx(()=>te[10]||(te[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:S.visible,title:S.title,onBeforeDestroy:Ae,width:S.width},{default:e.withCtx(()=>[e.createElementVNode("div",Xu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:M.value,key:M.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Yu,[e.createVNode(ce,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>te[11]||(te[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(ce,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>te[12]||(te[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Xt.ssDialog,{visible:pe.visible,title:pe.title,onBeforeDestroy:Ae,width:pe.width},{default:e.withCtx(()=>[e.createElementVNode("div",Ju,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:I},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zu,[e.createVNode(ce,{class:"cancel-button button",onClick:Ae,id:"themeBorderButton"},{default:e.withCtx(()=>te[13]||(te[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(ce,{class:"ok-button button",onClick:Ae,id:"themeButton"},{default:e.withCtx(()=>te[14]||(te[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ep=Lt._export_sfc(Qu,[["__scopeId","data-v-fe119645"]]);var Ja={exports:{}},tp=Ja.exports,qo;function np(){return qo||(qo=1,function(a,i){(function(s,l){l()})(tp,function(){function s(w,E){return typeof E>"u"?E={autoBom:!1}:typeof E!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),E={autoBom:!E}),E.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(w.type)?new Blob(["\uFEFF",w],{type:w.type}):w}function l(w,E,S){var M=new XMLHttpRequest;M.open("GET",w),M.responseType="blob",M.onload=function(){h(M.response,E,S)},M.onerror=function(){console.error("could not download file")},M.send()}function c(w){var E=new XMLHttpRequest;E.open("HEAD",w,!1);try{E.send()}catch{}return 200<=E.status&&299>=E.status}function d(w){try{w.dispatchEvent(new MouseEvent("click"))}catch{var E=document.createEvent("MouseEvents");E.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),w.dispatchEvent(E)}}var b=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof la.commonjsGlobal=="object"&&la.commonjsGlobal.global===la.commonjsGlobal?la.commonjsGlobal:void 0,v=b.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=b.saveAs||(typeof window!="object"||window!==b?function(){}:"download"in HTMLAnchorElement.prototype&&!v?function(w,E,S){var M=b.URL||b.webkitURL,O=document.createElement("a");E=E||w.name||"download",O.download=E,O.rel="noopener",typeof w=="string"?(O.href=w,O.origin===location.origin?d(O):c(O.href)?l(w,E,S):d(O,O.target="_blank")):(O.href=M.createObjectURL(w),setTimeout(function(){M.revokeObjectURL(O.href)},4e4),setTimeout(function(){d(O)},0))}:"msSaveOrOpenBlob"in navigator?function(w,E,S){if(E=E||w.name||"download",typeof w!="string")navigator.msSaveOrOpenBlob(s(w,S),E);else if(c(w))l(w,E,S);else{var M=document.createElement("a");M.href=w,M.target="_blank",setTimeout(function(){d(M)})}}:function(w,E,S,M){if(M=M||open("","_blank"),M&&(M.document.title=M.document.body.innerText="downloading..."),typeof w=="string")return l(w,E,S);var O=w.type==="application/octet-stream",W=/constructor/i.test(b.HTMLElement)||b.safari,Ee=/CriOS\/[\d]+/.test(navigator.userAgent);if((Ee||O&&W||v)&&typeof FileReader<"u"){var Y=new FileReader;Y.onloadend=function(){var C=Y.result;C=Ee?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),M?M.location.href=C:location=C,M=null},Y.readAsDataURL(w)}else{var $=b.URL||b.webkitURL,pe=$.createObjectURL(w);M?M.location=pe:location.href=pe,M=null,setTimeout(function(){$.revokeObjectURL(pe)},4e4)}});b.saveAs=h.saveAs=h,a.exports=h})}(Ja)),Ja.exports}np();const Zn=p.useLoginState(),{loginUserInfo:Ha}=p.storeToRefs(Zn),Ft=Te.useModelComp(p.pinia),Za=e.ref(!1),{itemData:ap,itemGridData:Xn,curStructureCompIds:Go,isSubmitCurStructure:op,isRefreshCurStructure:lp,freshContent:Xo,routeToChildPath:rp,payloadTypes:ip,pageMapState:ao,itemExtendData:qa}=p.storeToRefs(Ft),vn=Te.useMenuState(p.pinia),{activeTopMenuPath:sp,activeMenuPath:Rt,platform:Zd,activeAsideMenu:cp,buttonTriggerType:up}=p.storeToRefs(vn),bn=oa.useUnit(p.pinia),{selectTitle:Yo}=p.storeToRefs(bn),pp=Te.useOriginalState(p.pinia),{originalPath:co}=p.storeToRefs(pp),Jo=Te.useAuthorityState(p.pinia),oo=e.ref(!0),Ea=e.ref(0),Eo=e.ref([]),_a=e.computed(async()=>{var i,s;const a=(i=Rt.value)!=null&&i.startsWith("/")?(s=Rt.value)==null?void 0:s.substring(1):Rt.value;return(a==null?void 0:a.includes(co.value))||await xp(a)}),dp=()=>{Ft.setItemGridData([]),Ft.setIsEdit("edit"),Ft.setSubmitCurStructure(Rt.value!=="/平台管理/菜单管理")},fp=()=>{Ft.setIsEdit("view"),Ft.setRefreshCurStructure(!0)},hp=async a=>{var i;if((a==null?void 0:a.key)==="main"||Yo.value.length===1)It.value=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value),bn.setSelectIndex(""),bn.setSelectMenu(""),bn.setSelectTitle([]);else{const s=[],l=(a==null?void 0:a.key)===""||!(a!=null&&a.key)?"":parseInt(a==null?void 0:a.key);It.value=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),l,!1,[],await _a.value);let c=-1;(i=Yo.value)==null||i.forEach((d,b)=>{(d==null?void 0:d.key)===(a==null?void 0:a.key)&&(c=b),(c===-1||c>=b)&&s.push(d)}),bn.setSelectTitle(s),l!==""?bn.setSelectMenu(a==null?void 0:a.key):(bn.setSelectIndex(""),bn.setSelectMenu(""))}It.value=Ta(It.value),Ft.setItemData(It.value),Ft.setOriginalData(It.value)},vo=async(a,i,s,l="contentConfig")=>{var c;try{if(!Array.isArray(a))return;let d,b;i==="create"?(d={dataList:a==null?void 0:a.map(h=>{var w;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:l,parentTable:"",version:1},value:{pageData:{...h,compData:(w=h==null?void 0:h.compData)==null?void 0:w.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},b=p.batchAddInsofDataApi):i==="update"?(d={dataList:a==null?void 0:a.map(h=>{var w;return{id:h==null?void 0:h.id,value:{pageData:{...h,compData:(w=h==null?void 0:h.compData)==null?void 0:w.filter(E=>(E==null?void 0:E.key)!=="tableContents")}}}})},b=p.batchUpdateInsofDataApi):i==="delete"&&(d={ids:a},b=p.batchDeleteInsofDataApi);const v=await b(d);if(((c=v==null?void 0:v.data)==null?void 0:c.code)===200)return v.data.result;throw p.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{p.ElMessage.error("保存响应失败")}},Zo=async(a,i,s,l)=>{var c,d,b,v,h,w,E,S,M,O,W;try{const Ee=(d=(c=a==null?void 0:a.results)==null?void 0:c.filter(x=>!(x!=null&&x.id)||typeof(x==null?void 0:x.id)=="string"))==null?void 0:d.map(x=>({key:{pageKey:a==null?void 0:a.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:x}})),Y=(v=(b=a==null?void 0:a.results)==null?void 0:b.filter(x=>(x==null?void 0:x.id)&&typeof(x==null?void 0:x.id)=="number"))==null?void 0:v.map(x=>({id:x==null?void 0:x.id,value:{tableData:x}})),$=JSON.parse(p.cloneDeep(JSON.stringify(a))),pe=(h=$==null?void 0:$.results)==null?void 0:h.map(x=>x.id);let C;s?C=(S=(E=(w=ao.value)==null?void 0:w[Rt.value])==null?void 0:E.filter(x=>{var T,I,Q;return((T=x==null?void 0:x.key)==null?void 0:T.type)===i&&((Q=(I=x==null?void 0:x.key)==null?void 0:I.relatedInfo)==null?void 0:Q.target)===l}))==null?void 0:S.map(x=>x==null?void 0:x.id):C=(W=(O=(M=ao.value)==null?void 0:M[Rt.value])==null?void 0:O.filter(x=>{var T;return((T=x==null?void 0:x.key)==null?void 0:T.type)===i}))==null?void 0:W.map(x=>x==null?void 0:x.id);const P=C==null?void 0:C.filter(x=>!(pe!=null&&pe.includes(x))&&typeof x=="number");(Ee==null?void 0:Ee.length)>0&&await p.batchAddInsofDataApi({dataList:Ee}),(Y==null?void 0:Y.length)>0&&await p.batchUpdateInsofDataApi({dataList:Y}),(P==null?void 0:P.length)>0&&await p.batchDeleteInsofDataApi({ids:P})}catch(Ee){throw new Error(Ee)}},vp=async a=>{var w,E,S,M,O,W,Ee,Y,$,pe;vn.setContentLoading(!0);const i=JSON.parse(p.cloneDeep(JSON.stringify(ap.value)));if(!op.value)return vn.setCacheStructures({key:up.value,data:i}),p.ElMessage.success("已暂存");const s=i==null?void 0:i.map(C=>C.id),l=s.filter(C=>{var P;return!((P=Go.value)!=null&&P.includes(C))}),c=(w=Go.value)==null?void 0:w.filter(C=>!s.includes(C)),d=[...l,...c].filter(C=>typeof C!==null&&typeof C<"u"),b=i==null?void 0:i.filter(C=>!C.id),v=i==null?void 0:i.filter(C=>C.id);let h=[];if(d&&(d==null?void 0:d.length)>0&&h.push(vo(d,"delete",a)),b&&(b==null?void 0:b.length)>0&&h.push(vo(b,"create",a)),v&&(v==null?void 0:v.length)>0&&h.push(vo(v,"update",a)),Xn.value&&((E=Xn.value)!=null&&E.isDelete&&((M=(S=Xn.value)==null?void 0:S.results)==null?void 0:M.length)>0&&((W=(O=Xn.value)==null?void 0:O.results)!=null&&W.every(C=>typeof C=="number"))?await p.batchDeleteInsofDataApi({ids:(Ee=Xn.value)==null?void 0:Ee.results}):(console.log("itemGridData.value",Xn.value),h.push(await Zo(Xn.value,"gridLayout")))),qa.value)for(const C in qa.value)h.push(await Zo((Y=qa.value)==null?void 0:Y[C],"extend",{target:C,compId:(pe=($=qa.value)==null?void 0:$[C])==null?void 0:pe.compId},C));await Promise.all(h).then(()=>{p.ElMessage.success("保存成功"),Ft.setRefreshCurStructure(!0)}).catch(C=>{p.ElMessage.success(C)}),vn.setContentLoading(!1)},_o=a=>sa(a),It=e.ref([]),gp=e.computed(()=>{var a;return(a=It.value)==null?void 0:a.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Rl=e.computed(()=>{var a;return(a=It.value)==null?void 0:a.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),mp=async a=>{var l,c,d,b,v,h;let i=p.cloneDeep(Rt).value;i=i+co.value+((l=Object.values(a==null?void 0:a.singleContent))==null?void 0:l[0]);const s=await p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((d=(c=s==null?void 0:s.data)==null?void 0:c.result)==null?void 0:d.length)>0){const w=(v=(b=s==null?void 0:s.data)==null?void 0:b.result)==null?void 0:v.map(S=>S==null?void 0:S.id),E=await p.batchDeleteInsofDataApi({ids:w});((h=E==null?void 0:E.data)==null?void 0:h.code)===200?(p.ElMessage.success("删除成功"),await Zn.setLogRecordAsync({type:"删除",data:a},i)):p.ElMessage.error("删除响应失败"),Ft.setTableLoading(!1)}},Qo=async a=>{var i,s;try{let l=p.cloneDeep(Rt).value,c=[];if(Array.isArray(a)){a==null||a.forEach(b=>{var v;c.push(p.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:l+co.value+((v=Object.values(b==null?void 0:b.singleContent))==null?void 0:v[0])}}))});const d=await Promise.all(c);if((d==null?void 0:d.length)>0&&(d!=null&&d.every(b=>{var v;return((v=b==null?void 0:b.data)==null?void 0:v.code)===200}))){const b=Array.from(new Set((i=d==null?void 0:d.flatMap(h=>{var w;return(w=h==null?void 0:h.data)==null?void 0:w.result}))==null?void 0:i.map(h=>h==null?void 0:h.id))),v=await p.batchDeleteInsofDataApi({ids:b});((s=v==null?void 0:v.data)==null?void 0:s.code)===200?(p.ElMessage.success("删除成功"),await Zn.setLogRecordAsync({type:"删除",data:a},l)):p.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await mp(a)}catch{p.ElMessage.error("删除数据时处理失败")}finally{Ft.setTableLoading(!1)}},yp=async a=>{var i,s;try{if(!a||!(a!=null&&a.data))return;const{id:l,...c}=p.cloneDeep(a==null?void 0:a.data),d=await p.createInsofDataApi({key:{type:"data",pageKey:Rt.value,tableId:(i=a==null?void 0:a.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:c}});if(!((s=a==null?void 0:a.data)!=null&&s.id))return;const b=await Promise.all([d]);(b==null?void 0:b.every(h=>{var w;return((w=h==null?void 0:h.data)==null?void 0:w.code)===200}))?p.ElMessage.success("迁移成功"):p.ElMessage.error("迁移响应失败")}catch(l){throw p.ElMessage.error(l),new Error(l)}},Ll=e.ref(0),lo=e.ref(null),So=async(a,i="data",s)=>{var l,c,d,b,v,h,w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I;if(lo.value=null,(a==null?void 0:a.buttonName)==="删除")typeof((l=a==null?void 0:a.singleContent)==null?void 0:l.id)=="string"?await Qo(a):await Te.deleteTableContents((c=a==null?void 0:a.singleContent)==null?void 0:c.id),await Zn.setLogRecordAsync({type:"删除",data:a},Rt.value);else if((a==null?void 0:a.buttonName)==="批量删除")if((d=a==null?void 0:a.selectItems)!=null&&d.every(Q=>typeof(Q==null?void 0:Q.id)=="string")){const Q=(b=a==null?void 0:a.selectItems)==null?void 0:b.map(Le=>({content:a==null?void 0:a.content,singleContent:Le,index:a==null?void 0:a.index,type:a==null?void 0:a.type,buttonName:a==null?void 0:a.buttonName,column:a==null?void 0:a.column}));await Qo(Q)}else{const Q=(v=a==null?void 0:a.selectItems)==null?void 0:v.map(Le=>Le==null?void 0:Le.id);await p.batchDeleteInsofDataApi({ids:Q}),await Zn.setLogRecordAsync({type:"删除",data:Q},Rt.value)}else if((a==null?void 0:a.buttonName)==="新增"){let Q={};for(let tt in a==null?void 0:a.singleContent)tt!=="id"&&tt!=="index"&&(Q[tt]=a==null?void 0:a.singleContent[tt]);const Le=await Te.addTableContents(i,Rt.value,a==null?void 0:a.index,sessionStorage.getItem("systemKey"),Object.values(Q),a==null?void 0:a.column,a,{param:s});lo.value={resId:Le,compId:a==null?void 0:a.index,data:a==null?void 0:a.singleContent},Ft.setCacheUpdatingData(null)}else if((a==null?void 0:a.buttonName)==="编辑"){if(Array.isArray(a==null?void 0:a.singleContent)){let Q=[],Le=[],tt=((w=(h=a==null?void 0:a.content)==null?void 0:h[0])==null?void 0:w.id)??"",ze=s==null?void 0:s.url,We="",De="";if(tt!==""&&((E=a==null?void 0:a.content)==null?void 0:E.length)>1&&typeof((M=(S=a==null?void 0:a.content)==null?void 0:S[0])==null?void 0:M.id)!="string"){const A=await p.getInsofDataApi({id:tt});We=((Y=(Ee=(W=(O=A==null?void 0:A.data)==null?void 0:O.result)==null?void 0:W[0])==null?void 0:Ee.key)==null?void 0:Y.tableId)??"",De=((P=(C=(pe=($=A==null?void 0:A.data)==null?void 0:$.result)==null?void 0:pe[0])==null?void 0:C.key)==null?void 0:P.pageKey)??""}(x=a==null?void 0:a.singleContent)==null||x.forEach(A=>{let oe={};for(let ne in A)ne!=="id"&&ne!=="index"&&(oe[ne]=A[ne]);typeof(A==null?void 0:A.id)=="number"?Q.push({id:A==null?void 0:A.id,value:{tableData:oe}}):Le.push({key:{type:i,pageKey:ze||De||Rt.value,tableId:We||(a==null?void 0:a.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:oe}})}),(Le==null?void 0:Le.length)>0&&await p.batchAddInsofDataApi({dataList:Le}),(Q==null?void 0:Q.length)>0&&await p.batchUpdateInsofDataApi({dataList:Q})}else{let Q={},Le=(T=a==null?void 0:a.singleContent)==null?void 0:T.id;for(let tt in a==null?void 0:a.singleContent)tt!=="id"&&tt!=="index"&&(Q[tt]=a==null?void 0:a.singleContent[tt]);await Te.fixTableContents(i,Rt.value,a==null?void 0:a.index,Le,sessionStorage.getItem("systemKey"),Object.values(Q),a==null?void 0:a.column)}Ft.setCacheUpdatingData(null)}else(a==null?void 0:a.buttonName)==="迁移"&&await yp(a==null?void 0:a.value);Ft.setTableLoading(!1),(I=a==null?void 0:a.column)!=null&&I.some(Q=>Q==null?void 0:Q.isMainKey)||(It.value=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value)),It.value=Ta(It.value),Ao.value&&(a==null?void 0:a.buttonName)!=="删除"&&Ft.setRefreshCurStructure(!0)},bp=async a=>{var s,l,c;const i=await p.getInsofDataApi({id:a});return(c=(l=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:l[0])==null?void 0:c.value},To=async(a,i)=>{var c,d,b;if(Za.value||typeof(a==null?void 0:a.index)=="string")return;const s=await bp(a==null?void 0:a.index),l=(c=s==null?void 0:s.pageData)==null?void 0:c.name;await Te.fixFormContents(a==null?void 0:a.index,{comp:"Form",compData:(d=p.cloneDeep(a==null?void 0:a.contents))==null?void 0:d.filter(v=>v.contents),name:l,isShow:(b=s==null?void 0:s.pageData)==null?void 0:b.isShow}),i&&(vn.setActiveMenuPath(null),vn.setActiveMenuPath(i))},Io=a=>{It.value=Ta(a),Ft.setItemData(It.value),Ft.setOriginalData(It.value)},kp=async a=>{var i;await e.nextTick(),(i=cp.value)!=null&&i.isRouter?Jo.setRouterPageStructure(a):Jo.setRouterPageStructure([])},xp=async a=>{var d,b,v,h,w,E;let i="",s="";(d=a==null?void 0:a.split("/"))==null||d.forEach((S,M)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-2>M&&(i=i===""?i+S:i+"/"+S)}),(b=a==null?void 0:a.split("/"))==null||b.forEach((S,M)=>{var O;((O=a==null?void 0:a.split("/"))==null?void 0:O.length)-1>M&&(s=s===""?s+S:s+"/"+S)}),i=i+"/",s=s+"/";let l=await p.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),c=await p.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((h=(v=l==null?void 0:l.data)==null?void 0:v.result)==null?void 0:h.length)>0||((E=(w=c==null?void 0:c.data)==null?void 0:w.result)==null?void 0:E.length)>0},wp=e.ref(),Ln=e.ref(null),Dp=a=>{var w,E,S,M,O,W,Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze,We;const i=(E=(w=ao.value)==null?void 0:w[a])==null?void 0:E.filter(De=>{var A;return((A=De==null?void 0:De.key)==null?void 0:A.type)==="extend"});if((i==null?void 0:i.length)===0)return Ln.value=null;wp.value=i;const s=(M=(S=i==null?void 0:i.find(De=>{var A,oe,ne;return(ne=(oe=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:oe.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:S.value)==null?void 0:M.tableData;if(!s)return Ln.value=null;const l=(Ee=(W=(O=i==null?void 0:i.find(De=>{var A,oe,ne;return(ne=(oe=(A=De==null?void 0:De.value)==null?void 0:A.tableData)==null?void 0:oe.执行任务)==null?void 0:ne.includes("计时")}))==null?void 0:O.key)==null?void 0:W.relatedInfo)==null?void 0:Ee.compId,c=(Y=It.value)==null?void 0:Y.find(De=>(De==null?void 0:De.id)===l);if(!c)return Ln.value=null;const d=(pe=s==null?void 0:s.任务关键词)==null?void 0:pe[(($=s==null?void 0:s.任务关键词)==null?void 0:$.length)-1],b=(x=(P=(C=c==null?void 0:c.compData)==null?void 0:C.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:P.contents)==null?void 0:x.findIndex(De=>(De==null?void 0:De.prop)===d),v=(Le=(Q=(I=(T=c==null?void 0:c.compData)==null?void 0:T.find(De=>(De==null?void 0:De.key)==="header"))==null?void 0:I.contents)==null?void 0:Q.find(De=>De==null?void 0:De.isMainKey))==null?void 0:Le.prop,h=(We=(ze=(tt=c==null?void 0:c.compData)==null?void 0:tt.find(De=>(De==null?void 0:De.key)==="tableContents"))==null?void 0:ze.contents)==null?void 0:We[b];Ln.value={prop:d,value:h,title:s==null?void 0:s.任务名称,task:s==null?void 0:s.执行任务,action:s==null?void 0:s.执行动作,runIn:s==null?void 0:s.执行交互,mainKeyProp:v},console.log("getPageExtendData:",s,i)},Cp=()=>{var a,i;console.log("倒计时结束时"),Te.ElMessageBox.alert(`超时未提交,【${(i=(a=Rt.value)==null?void 0:a.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Fl=()=>{var a,i,s,l;try{if(sp.value!=="报告中心"||!((a=Rt.value)!=null&&a.includes(co.value)))return;const c=(i=It.value)==null?void 0:i.find(h=>{var w;return((w=h==null?void 0:h.comp)==null?void 0:w.toUpperCase())==="FORM"});if(!c)return;const d={prop:"状态",value:"编制中"},b=(l=(s=c==null?void 0:c.compData)==null?void 0:s.find(h=>(h==null?void 0:h.key)==="formContent"))==null?void 0:l.contents,v=b==null?void 0:b.find(h=>(h==null?void 0:h.prop)===(d==null?void 0:d.prop));v!=null&&v.value&&(v==null?void 0:v.value)!==(d==null?void 0:d.value)&&Ft.setLockingPage(Rt.value)}catch(c){throw p.ElMessage.error(c),new Error(c)}},Bo=e.ref([]),Ep=e.computed(()=>{var a,i;return(i=(a=ao.value)==null?void 0:a[Rt.value])==null?void 0:i.filter(s=>{var l;return((l=s==null?void 0:s.key)==null?void 0:l.type)==="gridLayout"})});e.watch(()=>[Rt.value,lp.value],async a=>{var d,b,v,h,w,E,S,M;if(!Rt.value)return;Ft.setLockingPage(""),It.value=[];let i=e.getCurrentInstance();(d=i==null?void 0:i.scope)==null||d.stop(),i=null,oo.value=!1,Za.value=!0;const s=(b=a==null?void 0:a[0])!=null&&b.startsWith("/")?(v=a==null?void 0:a[0])==null?void 0:v.substring(1):a==null?void 0:a[0];let l=new WeakMap;(w=(h=(await p.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:ip.value})).data.result)==null?void 0:h.filter(O=>{var W,Ee;return((W=O==null?void 0:O.key)==null?void 0:W.pageKey)!=="menu"&&((Ee=O==null?void 0:O.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||w.forEach(O=>{l[O.key.pageKey]?l[O.key.pageKey]=[...l[O.key.pageKey],O]:l[O.key.pageKey]=[O]}),Eo.value=l,s?(vn.setContentLoading(!0),sessionStorage.setItem("pageKey",Rt.value),It.value=await Te.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value,l),await Zn.setLogRecordAsync({type:"查询",data:It.value},Rt.value),It.value=Ta(It.value),await kp(It.value),Fl(),Dp(s),Bo.value=(E=It.value)==null?void 0:E.map(O=>({label:O==null?void 0:O.name,value:O==null?void 0:O.id})),Ft.setExtraContents([]),bn.setSelectTitle([]),bn.setSelectIndex(""),bn.setSelectMenu(""),Ft.setItemData(It.value),Ft.setOriginalData(It.value),Ft.setCurStructureCompIds((S=It.value)==null?void 0:S.map(O=>O==null?void 0:O.id)),Ft.setRefreshCurStructure(!1),bn.setSelectTitle((M=Rt.value)==null?void 0:M.split("/").map(O=>({value:O.trim()}))),vn.setChildMenu(""),vn.setContentLoading(!1),Ft.setTableLoading(!1),Za.value=!1):(It.value=[],Za.value=!1),e.nextTick(()=>{Ea.value=Ea.value++,oo.value=!0})},{immediate:!0});e.watch(()=>Xo.value,async()=>{if(Xo.value){let a=await Te.getItemData(Rt.value,sessionStorage.getItem("systemKey"),"",!1,[],await _a.value);It.value=Ta(a),Ft.setFreshContent(!1),Fl()}},{deep:!0});const _p=async()=>{var c,d,b,v,h,w,E,S;vn.setLinkMenuInfo(null);const a=await p.getInsofDataApi({keyLikes:{pageKey:`loading${((c=Ha.value)==null?void 0:c.account)||((d=Ha.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await p.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((b=Ha.value)==null?void 0:b.account)||((v=Ha.value)==null?void 0:v.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(w=(h=a==null?void 0:a.data)==null?void 0:h.result)==null?void 0:w.map(M=>M==null?void 0:M.id);const l=(S=(E=i==null?void 0:i.data)==null?void 0:E.result)==null?void 0:S.map(M=>M==null?void 0:M.id);s=[...p.cloneDeep(s),...l],(s==null?void 0:s.length)>0&&(s!=null&&s.every(M=>M!==null&&M))&&(await p.batchDeleteInsofDataApi({ids:s}),await Zn.setLogRecordAsync({type:"删除",data:s},Rt.value)),vn.setActiveMenuPath(rp.value),It.value=null,Ft.setRouteToChildPath(""),vn.setChildMenu("")},Sp=a=>new RegExp("button","i").test(a),Tp=a=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(a),$l=a=>{if(Tp(a)){const i=a==null?void 0:a.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&vn.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},jl=a=>{var i;Ln.value&&(Ln.value={...Ln.value,mainKeyPropValue:a==null?void 0:a[(i=Ln.value)==null?void 0:i.mainKeyProp]})},Ip=a=>{Ll.value=a},ra=e.reactive({index:0,comp:null}),Bp=e.computed(()=>{var a;return(a=It.value)==null?void 0:a.map((i,s)=>({id:i.id,name:i.name,status:Ap(i,s)}))}),Ul=(a,i)=>{var h,w,E,S,M;const s=i?a:a-2,l=(h=It.value)==null?void 0:h[s],c=(E=(w=l==null?void 0:l.compData)==null?void 0:w.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:E.contents,d=c==null?void 0:c.findIndex(O=>(O==null?void 0:O.isMainKey)&&(O==null?void 0:O.label)!=="操作"),b=d===-1?0:d,v=(M=(S=l==null?void 0:l.compData)==null?void 0:S.find(O=>(O==null?void 0:O.key)==="tableContents"))==null?void 0:M.contents;return{valid:v==null?void 0:v.every(O=>O==null?void 0:O[b+1]),length:(v==null?void 0:v.length)||0}},Ap=(a,i)=>{var l;let s="process";if(((l=a==null?void 0:a.comp)==null?void 0:l.toUpperCase())==="TABLE"){const{valid:c,length:d}=Ul(i,!0);ra.index===i?s="process":d===0?s="wait":s=c?"success":"error"}return s},Kl=a=>{var s,l,c,d,b;const i=a+1;if(i>1&&((c=(l=(s=It.value)==null?void 0:s[a])==null?void 0:l.comp)==null?void 0:c.toUpperCase())==="TABLE"){const{valid:v}=Ul(i);v?(ra.index=i,ra.comp=(d=It.value)==null?void 0:d[a]):p.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else ra.index=i,ra.comp=(b=It.value)==null?void 0:b[a]},Ao=e.computed(()=>{var a,i;return(i=(a=Rl.value)==null?void 0:a[0])==null?void 0:i.isStepLayout});e.watch(()=>Ao.value,a=>{a&&Kl(0)},{immediate:!0});const Np={class:"layout"},Vp=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(a,{emit:i}){const s=i,l=a;e.onMounted(async()=>{});const c=e.computed(()=>p.cloneDeep(l==null?void 0:l.itemData)||[]),d=e.computed(()=>{var E;const w=(E=c==null?void 0:c.value)==null?void 0:E.find(S=>{const{key:M}=S;return M==="baseConfig"});return w==null?void 0:w.contents}),b=e.computed(()=>{var E;const w=(E=c==null?void 0:c.value)==null?void 0:E.find(S=>{const{key:M}=S;return M==="children"});return w==null?void 0:w.contents}),v=e.computed(()=>{let w=p.cloneDeep(b.value)||[];const E=w.length;let S=0;const M=[];if(w=w.map(O=>{const W=O.span;return W?(O.span=Number(W),S=S+O.span):M.push(O),O}),S<24){const O=Math.floor((24-S)/E);M.forEach(W=>{W.span=O})}return w}),h=w=>{s("rowClick",w)};return(w,E)=>{var O;const S=e.resolveComponent("el-col"),M=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Np,[e.createVNode(M,{style:e.normalizeStyle({height:(O=d.value)==null?void 0:O.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(W,Ee)=>(e.openBlock(),e.createBlock(S,{span:W==null?void 0:W.span},{default:e.withCtx(()=>{var Y;return[e.unref(oo)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_o)(W.comp)),{key:e.unref(Ea),compName:W.name,index:(W==null?void 0:W.id)??Ee,height:(Y=d.value)==null?void 0:Y.height,itemData:W==null?void 0:W.compData,childItemData:W==null?void 0:W.itemChildData,onChange:e.unref(So),onContentChange:e.unref(To),onPageChange:e.unref(Io),onRowClick:h},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),Op=Lt._export_sfc(Vp,[["__scopeId","data-v-ab9a36ed"]]),Mp={class:"layout-operate"},Pp={class:"layout-module"},zp={class:"collapse-title-item"},Rp={class:"collapse-title"},Lp={class:"icon-content"},Fp=["onClick"],$p={class:"comp-child"},jp=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(a,{emit:i}){const s=a,l=i;e.onMounted(()=>{Ee()});const c=e.ref({}),d=e.ref({}),b=e.ref([]),v=x=>[{label:"高度",prop:"height",type:"input",value:x==null?void 0:x.height}],h=x=>{d.value=x,l("change",P(),!0)},w=e.ref([]),E=e.ref([]),S=x=>[{label:"占比",prop:"span",type:"input",value:x==null?void 0:x.span}],M=e.computed(()=>{const x=s==null?void 0:s.itemContents;return p.cloneDeep(x)}),O=e.computed(()=>{const x=M==null?void 0:M.value,T=x==null?void 0:x.find(I=>{const{key:Q}=I;return Q==="baseConfig"});return T==null?void 0:T.contents}),W=e.computed(()=>{const x=M==null?void 0:M.value,T=x==null?void 0:x.find(I=>{const{key:Q}=I;return Q==="children"});return T==null?void 0:T.contents}),Ee=()=>{var x;c.value=M.value||{},w.value=(W==null?void 0:W.value)||[],b.value=v(),b.value=(x=b.value)==null?void 0:x.map(T=>{var Q;const{prop:I}=T;return T.value=(Q=O.value)==null?void 0:Q[I],T})};e.watch(()=>{var x;return(x=W==null?void 0:W.value)==null?void 0:x.length},()=>{var x;w.value=(W==null?void 0:W.value)||[],E.value=(x=W.value)==null?void 0:x.map(T=>S(T))},{immediate:!0});const Y=(x,T)=>{const I=p.cloneDeep(W==null?void 0:W.value);I[T].span=x.span,w.value=I,l("change",P(),!0)},$=x=>sa(x),pe=(x,T,I)=>{if(!x)return;const Q=p.cloneDeep(W==null?void 0:W.value);Q[I]&&(Q[I].compData=x,w.value=Q,l("change",P(),!0))},C=x=>{Te.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let T=p.cloneDeep(W==null?void 0:W.value);T=T==null?void 0:T.filter((I,Q)=>x!==Q),w.value=T,l("change",P(),!0),p.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},P=()=>({compData:[{key:"baseConfig",contents:d.value},{key:"children",contents:w==null?void 0:w.value}]});return(x,T)=>{const I=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Mp,[e.createElementVNode("div",Pp,[T[1]||(T[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:b.value,isEnableWrap:!0,onChange:T[0]||(T[0]=Q=>h(Q))},null,8,["rowContents"])])]),e.createVNode(_l.default,{class:"collapse-content",collapseContents:W.value},{title:e.withCtx(({item:Q,index:Le})=>[e.createElementVNode("div",zp,[e.createElementVNode("div",Rp,e.toDisplayString(Q.name),1),e.createElementVNode("div",Lp,[e.createElementVNode("div",{onClick:e.withModifiers(tt=>C(Le),["stop"]),class:"icon-content"},[e.createVNode(I,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Fp)])])]),content:e.withCtx(({item:Q,index:Le})=>[e.createElementVNode("div",$p,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:E.value[Le],key:Le,isEnableWrap:!0,onChange:tt=>Y(tt,Le)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(Q.comp+"Operate")),{itemContents:Q==null?void 0:Q.compData,originalItemContents:Q.compData,onChange:tt=>pe(tt,Q,Le)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Up=Lt._export_sfc(jp,[["__scopeId","data-v-ba05456e"]]),Kp=typeof window<"u";var el;Kp&&((el=window==null?void 0:window.navigator)!=null&&el.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function hn(a){return a==null}function Wl(){}const Wp=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(Wp)));function Hp(){const a=new Map;return{on(i,s){const l=a.get(i);l!=null&&l.add(s)||a.set(i,new Set([s]))},off(i,s){const l=a.get(i);l&&l.delete(s)},clear(i){const s=a.get(i);s&&s.clear()},clearAll(){a.clear()},emit(i,...s){const l=a.get(i);l&&l.forEach(c=>{c(...s)})}}}function tl(a,i=16){if(typeof a!="function")return Wl;const s=(...d)=>{a(...d)};if(i<=0)return Hl(s);let l=0,c;return function(...d){const b=Date.now(),v=b-l;clearTimeout(c),v>=i?(l=b,s(...d)):c=setTimeout(()=>{l=Date.now(),s(...d)},Math.max(0,i-v))}}function qp(a,i=100){if(typeof a!="function")return Wl;const s=(...c)=>{a(...c)};if(i<=0)return Hl(s);let l;return function(...c){clearTimeout(l),l=setTimeout(()=>{s(...c)},i)}}function Hl(a){if(typeof a!="function")return a;let i=!1,s,l;return function(...c){return s=c,i||(i=!0,l=Promise.resolve().then(()=>(i=!1,l=void 0,a(...s)))),l}}const wa=new Set,ql=new WeakMap;function Gp(){wa.forEach(a=>{a(...ql.get(a))}),wa.clear()}function sn(a,...i){if(typeof a!="function")return a;ql.set(a,i),!wa.has(a)&&(wa.add(a),wa.size===1&&Promise.resolve().then(Gp))}const Gl=Symbol("LAYOUT_KEY"),Xl=Symbol("EMITTER_KEY");function Xp(a){let i=0,s;for(let l=0,c=a.length;l<c;l++)s=a[l].y+a[l].h,s>i&&(i=s);return i}function ko(a){const i=Array(a.length);for(let s=0,l=a.length;s<l;s++)i[s]=Yp(a[s]);return i}function Yp(a){return{...a}}function Yl(a,i){return!(a===i||a.x+a.w<=i.x||a.x>=i.x+i.w||a.y+a.h<=i.y||a.y>=i.y+i.h)}function aa(a,i,s){const l=Zl(a),c=Ql(a),d=Array(a.length);for(let b=0,v=c.length;b<v;b++){let h=c[b];h.static||(h=Jp(l,h,i,s),l.push(h)),d[a.findIndex(w=>w.i===h.i)]=h,h.moved=!1}return d}function Jp(a,i,s,l){if(s)for(;i.y>0&&!Da(a,i);)i.y--;else if(l){const d=l[i.i].y;for(;i.y>d&&!Da(a,i);)i.y--}let c;for(;c=Da(a,i);)i.y=c.y+c.h;return i}function Zp(a,i){const s=Zl(a);for(let l=0,c=a.length;l<c;l++){const d=a[l];if(d.x+d.w>i.cols&&(d.x=i.cols-d.w),d.x<0&&(d.x=0,d.w=i.cols),!d.static)s.push(d);else for(;Da(s,d);)d.y++}return a}function nl(a,i){for(let s=0,l=a.length;s<l;s++)if(a[s].i===i)return a[s]}function Da(a,i){for(let s=0,l=a.length;s<l;s++)if(Yl(a[s],i))return a[s]}function Jl(a,i){return a.filter(s=>Yl(s,i))}function Zl(a){return a.filter(i=>i.static)}function xo(a,i,s,l,c=!1,d=!1){if(i.static)return a;const b=i.x,v=i.y,h=l&&i.y>l;typeof s=="number"&&(i.x=s),typeof l=="number"&&(i.y=l),i.moved=!0;let w=Ql(a);h&&(w=w.reverse());const E=Jl(w,i);if(d&&E.length)return i.x=b,i.y=v,i.moved=!1,a;for(let S=0,M=E.length;S<M;S++){const O=E[S];O.moved||i.y>O.y&&i.y-O.y>O.h/4||(O.static?a=al(a,O,i,c):a=al(a,i,O,c))}return a}function al(a,i,s,l){if(l){const c={x:s.x,y:s.y,w:s.w,h:s.h};if(c.y=Math.max(i.y-s.h,0),!Da(a,c))return xo(a,s,void 0,c.y,!1)}return xo(a,s,void 0,s.y+1,!1)}function Qp(a,i,s,l){const c="translate3d("+i+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function ed(a,i,s,l){const c="translate3d("+i*-1+"px,"+a+"px, 0)";return{transform:c,WebkitTransform:c,MozTransform:c,msTransform:c,OTransform:c,width:s+"px",height:l+"px",position:"absolute"}}function td(a,i,s,l){return{top:a+"px",left:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function nd(a,i,s,l){return{top:a+"px",right:i+"px",width:s+"px",height:l+"px",position:"absolute"}}function Ql(a){return Array.from(a).sort(function(i,s){return i.y===s.y&&i.x===s.x?0:i.y>s.y||i.y===s.y&&i.x>s.x?1:-1})}function ad(a,i){i=i||"Layout";const s=["x","y","w","h"],l=[];if(!Array.isArray(a))throw new Error(i+" must be an array!");for(let c=0,d=a.length;c<d;c++){const b=a[c];for(let v=0;v<s.length;v++)if(typeof b[s[v]]!="number")throw new Error("VueGridLayout: "+i+"["+c+"]."+s[v]+" must be a number!");if(b.i===void 0||b.i===null)throw new Error("VueGridLayout: "+i+"["+c+"].i cannot be null!");if(typeof b.i!="number"&&typeof b.i!="string")throw new Error("VueGridLayout: "+i+"["+c+"].i must be a string or number!");if(l.indexOf(b.i)>=0)throw new Error("VueGridLayout: "+i+"["+c+"].i must be unique!");if(l.push(b.i),b.static!==void 0&&typeof b.static!="boolean")throw new Error("VueGridLayout: "+i+"["+c+"].static must be a boolean!")}}function od(a,i="vgl"){const s=()=>`${i}-${a}`;return{b:s,be:l=>`${s()}__${l}`,bm:l=>`${s()}--${l}`,bem:(l,c)=>`${s()}__${l}--${c}`}}function ol(a){return ld(a)}function ld(a){var i;const s=((i=a.target)==null?void 0:i.offsetParent)||document.body,l=a.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),c=a.clientX+s.scrollLeft-l.left,d=a.clientY+s.scrollTop-l.top;return{x:c,y:d}}function ll(a,i,s,l){return rd(a)?{deltaX:s-a,deltaY:l-i,lastX:a,lastY:i,x:s,y:l}:{deltaX:0,deltaY:0,lastX:s,lastY:l,x:s,y:l}}function rd(a){return typeof a=="number"&&!Number.isNaN(a)}function id(a,i){const s=tr(a);let l=s[0];for(let c=1,d=s.length;c<d;c++){const b=s[c];i>a[b]&&(l=b)}return l}function er(a,i){if(!i[a])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+a+" is missing!");return i[a]}function sd(a,i,s,l,c,d,b){if(i[l])return ko(i[l]);let v=a;const h=tr(s),w=h.slice(h.indexOf(l));for(let E=0,S=w.length;E<S;E++){const M=w[E];if(i[M]){v=i[M];break}}return v=ko(v||[]),aa(Zp(v,{cols:d}),b)}function tr(a){return Object.keys(a).sort((i,s)=>a[i]-a[s])}let cd="auto";function ud(){return typeof document<"u"}function rl(){return ud()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):cd}var ka={exports:{}},pd=ka.exports,il;function dd(){return il||(il=1,function(a,i){(function(s,l){a.exports=l()})(pd,function(){function s(n,t){var o=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),o.push.apply(o,r)}return o}function l(n){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(r){h(n,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(o,r))})}return n}function c(n){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(n)}function d(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function b(n,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,Ee(r.key),r)}}function v(n,t,o){return t&&b(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}function h(n,t,o){return(t=Ee(t))in n?Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[t]=o,n}function w(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),t&&S(n,t)}function E(n){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(n)}function S(n,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,r){return o.__proto__=r,o},S(n,t)}function M(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function O(n){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,r=E(n);if(t){var u=E(this).constructor;o=Reflect.construct(r,arguments,u)}else o=r.apply(this,arguments);return function(f,g){if(g&&(typeof g=="object"||typeof g=="function"))return g;if(g!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M(f)}(this,o)}}function W(){return W=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(n,t,o){var r=function(f,g){for(;!Object.prototype.hasOwnProperty.call(f,g)&&(f=E(f))!==null;);return f}(n,t);if(r){var u=Object.getOwnPropertyDescriptor(r,t);return u.get?u.get.call(arguments.length<3?n:o):u.value}},W.apply(this,arguments)}function Ee(n){var t=function(o,r){if(typeof o!="object"||o===null)return o;var u=o[Symbol.toPrimitive];if(u!==void 0){var f=u.call(o,r);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(n,"string");return typeof t=="symbol"?t:t+""}var Y=function(n){return!(!n||!n.Window)&&n instanceof n.Window},$=void 0,pe=void 0;function C(n){$=n;var t=n.document.createTextNode("");t.ownerDocument!==n.document&&typeof n.wrap=="function"&&n.wrap(t)===t&&(n=n.wrap(n)),pe=n}function P(n){return Y(n)?n:(n.ownerDocument||n).defaultView||pe.window}typeof window<"u"&&window&&C(window);var x=function(n){return!!n&&c(n)==="object"},T=function(n){return typeof n=="function"},I={window:function(n){return n===pe||Y(n)},docFrag:function(n){return x(n)&&n.nodeType===11},object:x,func:T,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 t=P(n)||pe;return/object|function/.test(typeof Element>"u"?"undefined":c(Element))?n instanceof Element||n instanceof t.Element:n.nodeType===1&&typeof n.nodeName=="string"},plainObject:function(n){return x(n)&&!!n.constructor&&/function Object\b/.test(n.constructor.toString())},array:function(n){return x(n)&&n.length!==void 0&&T(n.splice)}};function Q(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Le(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="drag"){var r=o.prepared.axis;if(r==="x"||r==="y"){var u=r==="x"?"y":"x";t.page[u]=o.coords.start.page[u],t.client[u]=o.coords.start.client[u],t.delta[u]=0}}}var tt={id:"actions/drag",install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.draggable=tt.draggable,t.map.drag=tt,t.methodDict.drag="draggable",r.actions.drag=tt.defaults},listeners:{"interactions:before-action-move":Q,"interactions:action-resume":Q,"interactions:action-move":Le,"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.buttons,u=o.options.drag;if(u&&u.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(r&o.options.drag.mouseButtons)!=0))return n.action={name:"drag",axis:u.lockAxis==="start"?u.startAxis:u.lockAxis},!1}},draggable:function(n){return I.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):I.bool(n)?(this.options.drag.enabled=n,this):this.options.drag},beforeMove:Q,move:Le,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(n){return n.search("drag")===0}},ze=tt,We={init:function(n){var t=n;We.document=t.document,We.DocumentFragment=t.DocumentFragment||De,We.SVGElement=t.SVGElement||De,We.SVGSVGElement=t.SVGSVGElement||De,We.SVGElementInstance=t.SVGElementInstance||De,We.Element=t.Element||De,We.HTMLElement=t.HTMLElement||We.Element,We.Event=t.Event,We.Touch=t.Touch||De,We.PointerEvent=t.PointerEvent||t.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function De(){}var A=We,oe={init:function(n){var t=A.Element,o=n.navigator||{};oe.supportsTouch="ontouchstart"in n||I.func(n.DocumentTouch)&&A.document instanceof n.DocumentTouch,oe.supportsPointerEvent=o.pointerEnabled!==!1&&!!A.PointerEvent,oe.isIOS=/iP(hone|od|ad)/.test(o.platform),oe.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),oe.isIe9=/MSIE 9/.test(o.userAgent),oe.isOperaMobile=o.appName==="Opera"&&oe.supportsTouch&&/Presto/.test(o.userAgent),oe.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",oe.pEventTypes=oe.supportsPointerEvent?A.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,oe.wheelEvent=A.document&&"onmousewheel"in A.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ne=oe;function me(n,t){if(n.contains)return n.contains(t);for(;t;){if(t===n)return!0;t=t.parentNode}return!1}function Xe(n,t){for(;I.element(n);){if(Pe(n,t))return n;n=nt(n)}return null}function nt(n){var t=n.parentNode;if(I.docFrag(t)){for(;(t=t.host)&&I.docFrag(t););return t}return t}function Pe(n,t){return pe!==$&&(t=t.replace(/\/deep\//g," ")),n[ne.prefixedMatchesSelector](t)}var j=function(n){return n.parentNode||n.host};function Qe(n,t){for(var o,r=[],u=n;(o=j(u))&&u!==t&&o!==u.ownerDocument;)r.unshift(u),u=o;return r}function Ke(n,t,o){for(;I.element(n);){if(Pe(n,t))return!0;if((n=nt(n))===o)return Pe(n,t)}return!1}function vt(n){return n.correspondingUseElement||n}function yt(n){var t=n instanceof A.SVGElement?n.getBoundingClientRect():n.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function ct(n){var t,o=yt(n);if(!ne.isIOS7&&o){var r={x:(t=(t=P(n))||pe).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=r.x,o.right+=r.x,o.top+=r.y,o.bottom+=r.y}return o}function at(n){for(var t=[];n;)t.push(n),n=nt(n);return t}function St(n){return!!I.string(n)&&(A.document.querySelector(n),!0)}function ge(n,t){for(var o in t)n[o]=t[o];return n}function be(n,t,o){return n==="parent"?nt(o):n==="self"?t.getRect(o):Xe(o,n)}function Ye(n,t,o,r){var u=n;return I.string(u)?u=be(u,t,o):I.func(u)&&(u=u.apply(void 0,r)),I.element(u)&&(u=ct(u)),u}function Ae(n){return n&&{x:"x"in n?n.x:n.left,y:"y"in n?n.y:n.top}}function se(n){return!n||"x"in n&&"y"in n||((n=ge({},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 te(n,t,o){n.left&&(t.left+=o.x),n.right&&(t.right+=o.x),n.top&&(t.top+=o.y),n.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function ce(n,t,o){var r=o&&n.options[o];return Ae(Ye(r&&r.origin||n.options.origin,n,t,[n&&t]))||{x:0,y:0}}function Be(n,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(_){return!0},r=arguments.length>3?arguments[3]:void 0;if(r=r||{},I.string(n)&&n.search(" ")!==-1&&(n=Je(n)),I.array(n))return n.forEach(function(_){return Be(_,t,o,r)}),r;if(I.object(n)&&(t=n,n=""),I.func(t)&&o(n))r[n]=r[n]||[],r[n].push(t);else if(I.array(t))for(var u=0,f=t;u<f.length;u++){var g=f[u];Be(n,g,o,r)}else if(I.object(t))for(var m in t)Be(Je(m).map(function(_){return"".concat(n).concat(_)}),t[m],o,r);return r}function Je(n){return n.trim().split(/ +/)}var ut=function(n,t){return Math.sqrt(n*n+t*t)},k=["webkit","moz"];function V(n,t){n.__set||(n.__set={});var o=function(u){if(k.some(function(f){return u.indexOf(f)===0}))return 1;typeof n[u]!="function"&&u!=="__set"&&Object.defineProperty(n,u,{get:function(){return u in n.__set?n.__set[u]:n.__set[u]=t[u]},set:function(f){n.__set[u]=f},configurable:!0})};for(var r in t)o(r);return n}function U(n,t){n.page=n.page||{},n.page.x=t.page.x,n.page.y=t.page.y,n.client=n.client||{},n.client.x=t.client.x,n.client.y=t.client.y,n.timeStamp=t.timeStamp}function y(n){n.page.x=0,n.page.y=0,n.client.x=0,n.client.y=0}function D(n){return n instanceof A.Event||n instanceof A.Touch}function q(n,t,o){return n=n||"page",(o=o||{}).x=t[n+"X"],o.y=t[n+"Y"],o}function X(n,t){return t=t||{x:0,y:0},ne.isOperaMobile&&D(n)?(q("screen",n,t),t.x+=window.scrollX,t.y+=window.scrollY):q("page",n,t),t}function G(n){return I.number(n.pointerId)?n.pointerId:n.identifier}function J(n,t,o){var r=t.length>1?K(t):t[0];X(r,n.page),function(u,f){f=f||{},ne.isOperaMobile&&D(u)?q("screen",u,f):q("client",u,f)}(r,n.client),n.timeStamp=o}function de(n){var t=[];return I.array(n)?(t[0]=n[0],t[1]=n[1]):n.type==="touchend"?n.touches.length===1?(t[0]=n.touches[0],t[1]=n.changedTouches[0]):n.touches.length===0&&(t[0]=n.changedTouches[0],t[1]=n.changedTouches[1]):(t[0]=n.touches[0],t[1]=n.touches[1]),t}function K(n){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<n.length;o++){var r=n[o];for(var u in t)t[u]+=r[u]}for(var f in t)t[f]/=n.length;return t}function _e(n){if(!n.length)return null;var t=de(n),o=Math.min(t[0].pageX,t[1].pageX),r=Math.min(t[0].pageY,t[1].pageY),u=Math.max(t[0].pageX,t[1].pageX),f=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:r,left:o,top:r,right:u,bottom:f,width:u-o,height:f-r}}function ke(n,t){var o=t+"X",r=t+"Y",u=de(n),f=u[0][o]-u[1][o],g=u[0][r]-u[1][r];return ut(f,g)}function ae(n,t){var o=t+"X",r=t+"Y",u=de(n),f=u[1][o]-u[0][o],g=u[1][r]-u[0][r];return 180*Math.atan2(g,f)/Math.PI}function H(n){return I.string(n.pointerType)?n.pointerType:I.number(n.pointerType)?[void 0,void 0,"touch","pen","mouse"][n.pointerType]:/touch/.test(n.type||"")||n instanceof A.Touch?"touch":"mouse"}function le(n){var t=I.func(n.composedPath)?n.composedPath():n.path;return[vt(t?t[0]:n.target),vt(n.currentTarget)]}var Fe=function(){function n(t){d(this,n),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return v(n,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),n}();Object.defineProperty(Fe.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var ye=function(n,t){for(var o=0;o<t.length;o++){var r=t[o];n.push(r)}return n},Ge=function(n){return ye([],n)},z=function(n,t){for(var o=0;o<n.length;o++)if(t(n[o],o,n))return o;return-1},he=function(n,t){return n[z(n,t)]},Ne=function(n){w(o,n);var t=O(o);function o(r,u,f){var g;d(this,o),(g=t.call(this,u._interaction)).dropzone=void 0,g.dragEvent=void 0,g.relatedTarget=void 0,g.draggable=void 0,g.propagationStopped=!1,g.immediatePropagationStopped=!1;var m=f==="dragleave"?r.prev:r.cur,_=m.element,F=m.dropzone;return g.type=f,g.target=_,g.currentTarget=_,g.dropzone=F,g.dragEvent=u,g.relatedTarget=u.target,g.draggable=u.interactable,g.timeStamp=u.timeStamp,g}return v(o,[{key:"reject",value:function(){var r=this,u=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&u.cur.dropzone===this.dropzone&&u.cur.element===this.target)if(u.prev.dropzone=this.dropzone,u.prev.element=this.target,u.rejected=!0,u.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var f=u.activeDrops,g=z(f,function(_){var F=_.dropzone,N=_.element;return F===r.dropzone&&N===r.target});u.activeDrops.splice(g,1);var m=new o(u,this.dragEvent,"dropdeactivate");m.dropzone=this.dropzone,m.target=this.target,this.dropzone.fire(m)}else this.dropzone.fire(new o(u,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(Fe);function He(n,t){for(var o=0,r=n.slice();o<r.length;o++){var u=r[o],f=u.dropzone,g=u.element;t.dropzone=f,t.target=g,f.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function Re(n,t){for(var o=function(f,g){for(var m=[],_=0,F=f.interactables.list;_<F.length;_++){var N=F[_];if(N.options.drop.enabled){var ee=N.options.drop.accept;if(!(I.element(ee)&&ee!==g||I.string(ee)&&!Pe(g,ee)||I.func(ee)&&!ee({dropzone:N,draggableElement:g})))for(var xe=0,je=N.getAllElements();xe<je.length;xe++){var $e=je[xe];$e!==g&&m.push({dropzone:N,element:$e,rect:N.getRect($e)})}}}return m}(n,t),r=0;r<o.length;r++){var u=o[r];u.rect=u.dropzone.getRect(u.element)}return o}function re(n,t,o){for(var r=n.dropState,u=n.interactable,f=n.element,g=[],m=0,_=r.activeDrops;m<_.length;m++){var F=_[m],N=F.dropzone,ee=F.element,xe=F.rect,je=N.dropCheck(t,o,u,f,ee,xe);g.push(je?ee:null)}var $e=function(qe){for(var rt,ot,pt,Ct=[],At=0;At<qe.length;At++){var mt=qe[At],_t=qe[rt];if(mt&&At!==rt)if(_t){var rn=j(mt),Kt=j(_t);if(rn!==mt.ownerDocument)if(Kt!==mt.ownerDocument)if(rn!==Kt){Ct=Ct.length?Ct:Qe(_t);var fn=void 0;if(_t instanceof A.HTMLElement&&mt instanceof A.SVGElement&&!(mt instanceof A.SVGSVGElement)){if(mt===Kt)continue;fn=mt.ownerSVGElement}else fn=mt;for(var Cn=Qe(fn,_t.ownerDocument),Pn=0;Cn[Pn]&&Cn[Pn]===Ct[Pn];)Pn++;var Wa=[Cn[Pn-1],Cn[Pn],Ct[Pn]];if(Wa[0])for(var ma=Wa[0].lastChild;ma;){if(ma===Wa[1]){rt=At,Ct=Cn;break}if(ma===Wa[2])break;ma=ma.previousSibling}}else pt=_t,(parseInt(P(ot=mt).getComputedStyle(ot).zIndex,10)||0)>=(parseInt(P(pt).getComputedStyle(pt).zIndex,10)||0)&&(rt=At);else rt=At}else rt=At}return rt}(g);return r.activeDrops[$e]||null}function fe(n,t,o){var r=n.dropState,u={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(u.activate=new Ne(r,o,"dropactivate"),u.activate.target=null,u.activate.dropzone=null),o.type==="dragend"&&(u.deactivate=new Ne(r,o,"dropdeactivate"),u.deactivate.target=null,u.deactivate.dropzone=null),r.rejected||(r.cur.element!==r.prev.element&&(r.prev.dropzone&&(u.leave=new Ne(r,o,"dragleave"),o.dragLeave=u.leave.target=r.prev.element,o.prevDropzone=u.leave.dropzone=r.prev.dropzone),r.cur.dropzone&&(u.enter=new Ne(r,o,"dragenter"),o.dragEnter=r.cur.element,o.dropzone=r.cur.dropzone)),o.type==="dragend"&&r.cur.dropzone&&(u.drop=new Ne(r,o,"drop"),o.dropzone=r.cur.dropzone,o.relatedTarget=r.cur.element),o.type==="dragmove"&&r.cur.dropzone&&(u.move=new Ne(r,o,"dropmove"),o.dropzone=r.cur.dropzone)),u}function Se(n,t){var o=n.dropState,r=o.activeDrops,u=o.cur,f=o.prev;t.leave&&f.dropzone.fire(t.leave),t.enter&&u.dropzone.fire(t.enter),t.move&&u.dropzone.fire(t.move),t.drop&&u.dropzone.fire(t.drop),t.deactivate&&He(r,t.deactivate),o.prev.dropzone=u.dropzone,o.prev.element=u.element}function B(n,t){var o=n.interaction,r=n.iEvent,u=n.event;if(r.type==="dragmove"||r.type==="dragend"){var f=o.dropState;t.dynamicDrop&&(f.activeDrops=Re(t,o.element));var g=r,m=re(o,g,u);f.rejected=f.rejected&&!!m&&m.dropzone===f.cur.dropzone&&m.element===f.cur.element,f.cur.dropzone=m&&m.dropzone,f.cur.element=m&&m.element,f.events=fe(o,0,g)}}var Ie={id:"actions/drop",install:function(n){var t=n.actions,o=n.interactStatic,r=n.Interactable,u=n.defaults;n.usePlugin(ze),r.prototype.dropzone=function(f){return function(g,m){if(I.object(m)){if(g.options.drop.enabled=m.enabled!==!1,m.listeners){var _=Be(m.listeners),F=Object.keys(_).reduce(function(ee,xe){return ee[/^(enter|leave)/.test(xe)?"drag".concat(xe):/^(activate|deactivate|move)/.test(xe)?"drop".concat(xe):xe]=_[xe],ee},{}),N=g.options.drop.listeners;N&&g.off(N),g.on(F),g.options.drop.listeners=F}return I.func(m.ondrop)&&g.on("drop",m.ondrop),I.func(m.ondropactivate)&&g.on("dropactivate",m.ondropactivate),I.func(m.ondropdeactivate)&&g.on("dropdeactivate",m.ondropdeactivate),I.func(m.ondragenter)&&g.on("dragenter",m.ondragenter),I.func(m.ondragleave)&&g.on("dragleave",m.ondragleave),I.func(m.ondropmove)&&g.on("dropmove",m.ondropmove),/^(pointer|center)$/.test(m.overlap)?g.options.drop.overlap=m.overlap:I.number(m.overlap)&&(g.options.drop.overlap=Math.max(Math.min(1,m.overlap),0)),"accept"in m&&(g.options.drop.accept=m.accept),"checker"in m&&(g.options.drop.checker=m.checker),g}return I.bool(m)?(g.options.drop.enabled=m,g):g.options.drop}(this,f)},r.prototype.dropCheck=function(f,g,m,_,F,N){return function(ee,xe,je,$e,qe,rt,ot){var pt=!1;if(!(ot=ot||ee.getRect(rt)))return!!ee.options.drop.checker&&ee.options.drop.checker(xe,je,pt,ee,rt,$e,qe);var Ct=ee.options.drop.overlap;if(Ct==="pointer"){var At=ce($e,qe,"drag"),mt=X(xe);mt.x+=At.x,mt.y+=At.y;var _t=mt.x>ot.left&&mt.x<ot.right,rn=mt.y>ot.top&&mt.y<ot.bottom;pt=_t&&rn}var Kt=$e.getRect(qe);if(Kt&&Ct==="center"){var fn=Kt.left+Kt.width/2,Cn=Kt.top+Kt.height/2;pt=fn>=ot.left&&fn<=ot.right&&Cn>=ot.top&&Cn<=ot.bottom}return Kt&&I.number(Ct)&&(pt=Math.max(0,Math.min(ot.right,Kt.right)-Math.max(ot.left,Kt.left))*Math.max(0,Math.min(ot.bottom,Kt.bottom)-Math.max(ot.top,Kt.top))/(Kt.width*Kt.height)>=Ct),ee.options.drop.checker&&(pt=ee.options.drop.checker(xe,je,pt,ee,rt,$e,qe)),pt}(this,f,g,m,_,F,N)},o.dynamicDrop=function(f){return I.bool(f)?(n.dynamicDrop=f,o):n.dynamicDrop},ge(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",n.dynamicDrop=!1,u.actions.drop=Ie.defaults},listeners:{"interactions:before-action-start":function(n){var t=n.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(n,t){var o=n.interaction,r=(n.event,n.iEvent);if(o.prepared.name==="drag"){var u=o.dropState;u.activeDrops=[],u.events={},u.activeDrops=Re(t,o.element),u.events=fe(o,0,r),u.events.activate&&(He(u.activeDrops,u.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:r}))}},"interactions:action-move":B,"interactions:after-action-move":function(n,t){var o=n.interaction,r=n.iEvent;if(o.prepared.name==="drag"){var u=o.dropState;Se(o,u.events),t.fire("actions/drop:move",{interaction:o,dragEvent:r}),u.events={}}},"interactions:action-end":function(n,t){if(n.interaction.prepared.name==="drag"){var o=n.interaction,r=n.iEvent;B(n,t),Se(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:r})}},"interactions:stop":function(n){var t=n.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:Re,getDrop:re,getDropEvents:fe,fireDropEvents:Se,filterEventType:function(n){return n.search("drag")===0||n.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Me=Ie;function we(n){var t=n.interaction,o=n.iEvent,r=n.phase;if(t.prepared.name==="gesture"){var u=t.pointers.map(function(F){return F.pointer}),f=r==="start",g=r==="end",m=t.interactable.options.deltaSource;if(o.touches=[u[0],u[1]],f)o.distance=ke(u,m),o.box=_e(u),o.scale=1,o.ds=0,o.angle=ae(u,m),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(g||t.pointers.length<2){var _=t.prevEvent;o.distance=_.distance,o.box=_.box,o.scale=_.scale,o.ds=0,o.angle=_.angle,o.da=0}else o.distance=ke(u,m),o.box=_e(u),o.scale=o.distance/t.gesture.startDistance,o.angle=ae(u,m),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,I.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var R={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(n){var t=n.actions,o=n.Interactable,r=n.defaults;o.prototype.gesturable=function(u){return I.object(u)?(this.options.gesture.enabled=u.enabled!==!1,this.setPerAction("gesture",u),this.setOnEvents("gesture",u),this):I.bool(u)?(this.options.gesture.enabled=u,this):this.options.gesture},t.map.gesture=R,t.methodDict.gesture="gesturable",r.actions.gesture=R.defaults},listeners:{"interactions:action-start":we,"interactions:action-move":we,"interactions:action-end":we,"interactions:new":function(n){n.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(n){if(!(n.interaction.pointers.length<2)){var t=n.interactable.options.gesture;if(t&&t.enabled)return n.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(n){return n.search("gesture")===0}},L=R;function ie(n,t,o,r,u,f,g){if(!t)return!1;if(t===!0){var m=I.number(f.width)?f.width:f.right-f.left,_=I.number(f.height)?f.height:f.bottom-f.top;if(g=Math.min(g,Math.abs((n==="left"||n==="right"?m:_)/2)),m<0&&(n==="left"?n="right":n==="right"&&(n="left")),_<0&&(n==="top"?n="bottom":n==="bottom"&&(n="top")),n==="left"){var F=m>=0?f.left:f.right;return o.x<F+g}if(n==="top"){var N=_>=0?f.top:f.bottom;return o.y<N+g}if(n==="right")return o.x>(m>=0?f.right:f.left)-g;if(n==="bottom")return o.y>(_>=0?f.bottom:f.top)-g}return!!I.element(r)&&(I.element(t)?t===r:Ke(r,t,u))}function Ve(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var r=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?r.delta.x=r.delta.y:r.delta.y=r.delta.x,r.axes="xy"):(r.axes=o.resizeAxes,o.resizeAxes==="x"?r.delta.y=0:o.resizeAxes==="y"&&(r.delta.x=0))}}var ue,ve,Ze={id:"actions/resize",before:["actions/drag"],install:function(n){var t=n.actions,o=n.browser,r=n.Interactable,u=n.defaults;Ze.cursors=function(f){return f.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}}(o),Ze.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,r.prototype.resizable=function(f){return function(g,m,_){return I.object(m)?(g.options.resize.enabled=m.enabled!==!1,g.setPerAction("resize",m),g.setOnEvents("resize",m),I.string(m.axis)&&/^x$|^y$|^xy$/.test(m.axis)?g.options.resize.axis=m.axis:m.axis===null&&(g.options.resize.axis=_.defaults.actions.resize.axis),I.bool(m.preserveAspectRatio)?g.options.resize.preserveAspectRatio=m.preserveAspectRatio:I.bool(m.square)&&(g.options.resize.square=m.square),g):I.bool(m)?(g.options.resize.enabled=m,g):g.options.resize}(this,f,n)},t.map.resize=Ze,t.methodDict.resize="resizable",u.actions.resize=Ze.defaults},listeners:{"interactions:new":function(n){n.interaction.resizeAxes="xy"},"interactions:action-start":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.rect;r._rects={start:ge({},f),corrected:ge({},f),previous:ge({},f),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},u.edges=r.prepared.edges,u.rect=r._rects.corrected,u.deltaRect=r._rects.delta}})(n),Ve(n)},"interactions:action-move":function(n){(function(t){var o=t.iEvent,r=t.interaction;if(r.prepared.name==="resize"&&r.prepared.edges){var u=o,f=r.interactable.options.resize.invert,g=f==="reposition"||f==="negate",m=r.rect,_=r._rects,F=_.start,N=_.corrected,ee=_.delta,xe=_.previous;if(ge(xe,N),g){if(ge(N,m),f==="reposition"){if(N.top>N.bottom){var je=N.top;N.top=N.bottom,N.bottom=je}if(N.left>N.right){var $e=N.left;N.left=N.right,N.right=$e}}}else N.top=Math.min(m.top,F.bottom),N.bottom=Math.max(m.bottom,F.top),N.left=Math.min(m.left,F.right),N.right=Math.max(m.right,F.left);for(var qe in N.width=N.right-N.left,N.height=N.bottom-N.top,N)ee[qe]=N[qe]-xe[qe];u.edges=r.prepared.edges,u.rect=N,u.deltaRect=ee}})(n),Ve(n)},"interactions:action-end":function(n){var t=n.iEvent,o=n.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var r=t;r.edges=o.prepared.edges,r.rect=o._rects.corrected,r.deltaRect=o._rects.delta}},"auto-start:check":function(n){var t=n.interaction,o=n.interactable,r=n.element,u=n.rect,f=n.buttons;if(u){var g=ge({},t.coords.cur.page),m=o.options.resize;if(m&&m.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(f&m.mouseButtons)!=0)){if(I.object(m.edges)){var _={left:!1,right:!1,top:!1,bottom:!1};for(var F in _)_[F]=ie(F,m.edges[F],g,t._latestPointer.eventTarget,r,u,m.margin||Ze.defaultMargin);_.left=_.left&&!_.right,_.top=_.top&&!_.bottom,(_.left||_.right||_.top||_.bottom)&&(n.action={name:"resize",edges:_})}else{var N=m.axis!=="y"&&g.x>u.right-Ze.defaultMargin,ee=m.axis!=="x"&&g.y>u.bottom-Ze.defaultMargin;(N||ee)&&(n.action={name:"resize",axes:(N?"x":"")+(ee?"y":"")})}return!n.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(n){var t=n.edges,o=n.axis,r=n.name,u=Ze.cursors,f=null;if(o)f=u[r+o];else if(t){for(var g="",m=0,_=["top","bottom","left","right"];m<_.length;m++){var F=_[m];t[F]&&(g+=F)}f=u[g]}return f},filterEventType:function(n){return n.search("resize")===0},defaultMargin:null},Oe=Ze,et={id:"actions",install:function(n){n.usePlugin(L),n.usePlugin(Oe),n.usePlugin(ze),n.usePlugin(Me)}},Z=0,Ue={request:function(n){return ue(n)},cancel:function(n){return ve(n)},init:function(n){if(ue=n.requestAnimationFrame,ve=n.cancelAnimationFrame,!ue)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var r=t[o];ue=n["".concat(r,"RequestAnimationFrame")],ve=n["".concat(r,"CancelAnimationFrame")]||n["".concat(r,"CancelRequestAnimationFrame")]}ue=ue&&ue.bind(n),ve=ve&&ve.bind(n),ue||(ue=function(u){var f=Date.now(),g=Math.max(0,16-(f-Z)),m=n.setTimeout(function(){u(f+g)},g);return Z=f+g,m},ve=function(u){return clearTimeout(u)})}},Ce={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){Ce.isScrolling=!0,Ue.cancel(Ce.i),n.autoScroll=Ce,Ce.interaction=n,Ce.prevTime=Ce.now(),Ce.i=Ue.request(Ce.scroll)},stop:function(){Ce.isScrolling=!1,Ce.interaction&&(Ce.interaction.autoScroll=null),Ue.cancel(Ce.i)},scroll:function(){var n=Ce.interaction,t=n.interactable,o=n.element,r=n.prepared.name,u=t.options[r].autoScroll,f=lt(u.container,t,o),g=Ce.now(),m=(g-Ce.prevTime)/1e3,_=u.speed*m;if(_>=1){var F={x:Ce.x*_,y:Ce.y*_};if(F.x||F.y){var N=it(f);I.window(f)?f.scrollBy(F.x,F.y):f&&(f.scrollLeft+=F.x,f.scrollTop+=F.y);var ee=it(f),xe={x:ee.x-N.x,y:ee.y-N.y};(xe.x||xe.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:xe,interaction:n,container:f})}Ce.prevTime=g}Ce.isScrolling&&(Ue.cancel(Ce.i),Ce.i=Ue.request(Ce.scroll))},check:function(n,t){var o;return(o=n.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(n){var t=n.interaction,o=n.pointer;if(t.interacting()&&Ce.check(t.interactable,t.prepared.name))if(t.simulation)Ce.x=Ce.y=0;else{var r,u,f,g,m=t.interactable,_=t.element,F=t.prepared.name,N=m.options[F].autoScroll,ee=lt(N.container,m,_);if(I.window(ee))g=o.clientX<Ce.margin,r=o.clientY<Ce.margin,u=o.clientX>ee.innerWidth-Ce.margin,f=o.clientY>ee.innerHeight-Ce.margin;else{var xe=yt(ee);g=o.clientX<xe.left+Ce.margin,r=o.clientY<xe.top+Ce.margin,u=o.clientX>xe.right-Ce.margin,f=o.clientY>xe.bottom-Ce.margin}Ce.x=u?1:g?-1:0,Ce.y=f?1:r?-1:0,Ce.isScrolling||(Ce.margin=N.margin,Ce.speed=N.speed,Ce.start(t))}}};function lt(n,t,o){return(I.string(n)?be(n,t,o):n)||P(o)}function it(n){return I.window(n)&&(n=window.document.body),{x:n.scrollLeft,y:n.scrollTop}}var bt={id:"auto-scroll",install:function(n){var t=n.defaults,o=n.actions;n.autoScroll=Ce,Ce.now=function(){return n.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=Ce.defaults},listeners:{"interactions:new":function(n){n.interaction.autoScroll=null},"interactions:destroy":function(n){n.interaction.autoScroll=null,Ce.stop(),Ce.interaction&&(Ce.interaction=null)},"interactions:stop":Ce.stop,"interactions:action-move":function(n){return Ce.onInteractionMove(n)}}},kt=bt;function st(n,t){var o=!1;return function(){return o||(pe.console.warn(t),o=!0),n.apply(this,arguments)}}function dt(n,t){return n.name=t.name,n.axis=t.axis,n.edges=t.edges,n}function xt(n){return I.bool(n)?(this.options.styleCursor=n,this):n===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Tt(n){return I.func(n)?(this.options.actionChecker=n,this):n===null?(delete this.options.actionChecker,this):this.options.actionChecker}var gt={id:"auto-start/interactableMethods",install:function(n){var t=n.Interactable;t.prototype.getAction=function(o,r,u,f){var g=function(m,_,F,N,ee){var xe=m.getRect(N),je=_.buttons||{0:1,1:4,3:8,4:16}[_.button],$e={action:null,interactable:m,interaction:F,element:N,rect:xe,buttons:je};return ee.fire("auto-start:check",$e),$e.action}(this,r,u,f,n);return this.options.actionChecker?this.options.actionChecker(o,r,g,this,f,u):g},t.prototype.ignoreFrom=st(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=st(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Tt,t.prototype.styleCursor=xt}};function wt(n,t,o,r,u){return t.testIgnoreAllow(t.options[n.name],o,r)&&t.options[n.name].enabled&&Pt(t,o,n,u)?n:null}function $t(n,t,o,r,u,f,g){for(var m=0,_=r.length;m<_;m++){var F=r[m],N=u[m],ee=F.getAction(t,o,n,N);if(ee){var xe=wt(ee,F,N,f,g);if(xe)return{action:xe,interactable:F,element:N}}}return{action:null,interactable:null,element:null}}function ft(n,t,o,r,u){var f=[],g=[],m=r;function _(N){f.push(N),g.push(m)}for(;I.element(m);){f=[],g=[],u.interactables.forEachMatch(m,_);var F=$t(n,t,o,f,g,r,u);if(F.action&&!F.interactable.options[F.action.name].manualStart)return F;m=nt(m)}return{action:null,interactable:null,element:null}}function Wt(n,t,o){var r=t.action,u=t.interactable,f=t.element;r=r||{name:null},n.interactable=u,n.element=f,dt(n.prepared,r),n.rect=u&&r.name?u.getRect(f):null,nn(n,o),o.fire("autoStart:prepared",{interaction:n})}function Pt(n,t,o,r){var u=n.options,f=u[o.name].max,g=u[o.name].maxPerElement,m=r.autoStart.maxInteractions,_=0,F=0,N=0;if(!(f&&g&&m))return!1;for(var ee=0,xe=r.interactions.list;ee<xe.length;ee++){var je=xe[ee],$e=je.prepared.name;if(je.interacting()&&(++_>=m||je.interactable===n&&((F+=$e===o.name?1:0)>=f||je.element===t&&(N++,$e===o.name&&N>=g))))return!1}return m>0}function Yt(n,t){return I.number(n)?(t.autoStart.maxInteractions=n,this):t.autoStart.maxInteractions}function cn(n,t,o){var r=o.autoStart.cursorElement;r&&r!==n&&(r.style.cursor=""),n.ownerDocument.documentElement.style.cursor=t,n.style.cursor=t,o.autoStart.cursorElement=t?n:null}function nn(n,t){var o=n.interactable,r=n.element,u=n.prepared;if(n.pointerType==="mouse"&&o&&o.options.styleCursor){var f="";if(u.name){var g=o.options[u.name].cursorChecker;f=I.func(g)?g(u,o,r,n._interacting):t.actions.map[u.name].getCursor(u)}cn(n.element,f||"",t)}else t.autoStart.cursorElement&&cn(t.autoStart.cursorElement,"",t)}var _n={id:"auto-start/base",before:["actions"],install:function(n){var t=n.interactStatic,o=n.defaults;n.usePlugin(gt),o.base.actionChecker=null,o.base.styleCursor=!0,ge(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(r){return Yt(r,n)},n.autoStart={maxInteractions:1/0,withinInteractionLimit:Pt,cursorElement:null}},listeners:{"interactions:down":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;o.interacting()||Wt(o,ft(o,r,u,f,t),t)},"interactions:move":function(n,t){(function(o,r){var u=o.interaction,f=o.pointer,g=o.event,m=o.eventTarget;u.pointerType!=="mouse"||u.pointerIsDown||u.interacting()||Wt(u,ft(u,f,g,m,r),r)})(n,t),function(o,r){var u=o.interaction;if(u.pointerIsDown&&!u.interacting()&&u.pointerWasMoved&&u.prepared.name){r.fire("autoStart:before-start",o);var f=u.interactable,g=u.prepared.name;g&&f&&(f.options[g].manualStart||!Pt(f,u.element,u.prepared,r)?u.stop():(u.start(u.prepared,f,u.element),nn(u,r)))}}(n,t)},"interactions:stop":function(n,t){var o=n.interaction,r=o.interactable;r&&r.options.styleCursor&&cn(o.element,"",t)}},maxInteractions:Yt,withinInteractionLimit:Pt,validateAction:wt},gn=_n,Sn={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(n,t){var o=n.interaction,r=n.eventTarget,u=n.dx,f=n.dy;if(o.prepared.name==="drag"){var g=Math.abs(u),m=Math.abs(f),_=o.interactable.options.drag,F=_.startAxis,N=g>m?"x":g<m?"y":"xy";if(o.prepared.axis=_.lockAxis==="start"?N[0]:_.lockAxis,N!=="xy"&&F!=="xy"&&F!==N){o.prepared.name=null;for(var ee=r,xe=function($e){if($e!==o.interactable){var qe=o.interactable.options.drag;if(!qe.manualStart&&$e.testIgnoreAllow(qe,ee,r)){var rt=$e.getAction(o.downPointer,o.downEvent,o,ee);if(rt&&rt.name==="drag"&&function(ot,pt){if(!pt)return!1;var Ct=pt.options.drag.startAxis;return ot==="xy"||Ct==="xy"||Ct===ot}(N,$e)&&gn.validateAction(rt,$e,ee,r,t))return $e}}};I.element(ee);){var je=t.interactables.forEachMatch(ee,xe);if(je){o.prepared.name="drag",o.interactable=je,o.element=ee;break}ee=nt(ee)}}}}}};function mn(n){var t=n.prepared&&n.prepared.name;if(!t)return null;var o=n.interactable.options;return o[t].hold||o[t].delay}var Tn={id:"auto-start/hold",install:function(n){var t=n.defaults;n.usePlugin(gn),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(n){n.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(n){var t=n.interaction,o=mn(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(n){var t=n.interaction,o=n.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(n){var t=n.interaction;mn(t)>0&&(t.prepared.name=null)}},getHoldDuration:mn},In=Tn,Bn={id:"auto-start",install:function(n){n.usePlugin(gn),n.usePlugin(In),n.usePlugin(Sn)}},An=function(n){return/^(always|never|auto)$/.test(n)?(this.options.preventDefault=n,this):I.bool(n)?(this.options.preventDefault=n?"always":"never",this):this.options.preventDefault};function an(n){var t=n.interaction,o=n.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Dt={id:"core/interactablePreventDefault",install:function(n){var t=n.Interactable;t.prototype.preventDefault=An,t.prototype.checkAndPreventDefault=function(o){return function(r,u,f){var g=r.options.preventDefault;if(g!=="never")if(g!=="always"){if(u.events.supportsPassive&&/^touch(start|move)$/.test(f.type)){var m=P(f.target).document,_=u.getDocOptions(m);if(!_||!_.events||_.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(f.type)||I.element(f.target)&&Pe(f.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||f.preventDefault()}else f.preventDefault()}(this,n,o)},n.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var r=0,u=n.interactions.list;r<u.length;r++){var f=u[r];if(f.element&&(f.element===o.target||me(f.element,o.target)))return void f.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(n,t){return n["interactions:".concat(t)]=an,n},{})};function Qt(n,t){if(t.phaselessTypes[n])return!0;for(var o in t.map)if(n.indexOf(o)===0&&n.substr(o.length)in t.phases)return!0;return!1}function ht(n){var t={};for(var o in n){var r=n[o];I.plainObject(r)?t[o]=ht(r):I.array(r)?t[o]=Ge(r):t[o]=r}return t}var Kn=function(){function n(t){d(this,n),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=Ot(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return v(n,[{key:"start",value:function(t,o){var r,u,f=t.phase,g=this.interaction,m=function(F){var N=F.interactable.options[F.prepared.name],ee=N.modifiers;return ee&&ee.length?ee:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(xe){var je=N[xe];return je&&je.enabled&&{options:je,methods:je._methods}}).filter(function(xe){return!!xe})}(g);this.prepareStates(m),this.startEdges=ge({},g.edges),this.edges=ge({},this.startEdges),this.startOffset=(r=g.rect,u=o,r?{left:u.x-r.left,top:u.y-r.top,right:r.right-u.x,bottom:r.bottom-u.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var _=this.fillArg({phase:f,pageCoords:o,preEnd:!1});return this.result=Ot(),this.startAll(_),this.result=this.setAll(_)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,r=this.states;o<r.length;o++){var u=r[o];u.methods.start&&(t.state=u,u.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,r=t.preEnd,u=t.skipModifiers,f=t.rect,g=t.edges;t.coords=ge({},t.pageCoords),t.rect=ge({},f),t.edges=ge({},g);for(var m=u?this.states.slice(u):this.states,_=Ot(t.coords,t.rect),F=0;F<m.length;F++){var N,ee=m[F],xe=ee.options,je=ge({},t.coords),$e=null;(N=ee.methods)!=null&&N.set&&this.shouldDo(xe,r,o)&&(t.state=ee,$e=ee.methods.set(t),te(t.edges,t.rect,{x:t.coords.x-je.x,y:t.coords.y-je.y})),_.eventProps.push($e)}ge(this.edges,t.edges),_.delta.x=t.coords.x-t.pageCoords.x,_.delta.y=t.coords.y-t.pageCoords.y,_.rectDelta.left=t.rect.left-f.left,_.rectDelta.right=t.rect.right-f.right,_.rectDelta.top=t.rect.top-f.top,_.rectDelta.bottom=t.rect.bottom-f.bottom;var qe=this.result.coords,rt=this.result.rect;if(qe&&rt){var ot=_.rect.left!==rt.left||_.rect.right!==rt.right||_.rect.top!==rt.top||_.rect.bottom!==rt.bottom;_.changed=ot||qe.x!==_.coords.x||qe.y!==_.coords.y}return _}},{key:"applyToInteraction",value:function(t){var o=this.interaction,r=t.phase,u=o.coords.cur,f=o.coords.start,g=this.result,m=this.startDelta,_=g.delta;r==="start"&&ge(this.startDelta,g.delta);for(var F=0,N=[[f,m],[u,_]];F<N.length;F++){var ee=N[F],xe=ee[0],je=ee[1];xe.page.x+=je.x,xe.page.y+=je.y,xe.client.x+=je.x,xe.client.y+=je.y}var $e=this.result.rectDelta,qe=t.rect||o.rect;qe.left+=$e.left,qe.right+=$e.right,qe.top+=$e.top,qe.bottom+=$e.bottom,qe.width=qe.right-qe.left,qe.height=qe.bottom-qe.top}},{key:"setAndApply",value:function(t){var o=this.interaction,r=t.phase,u=t.preEnd,f=t.skipModifiers,g=this.setAll(this.fillArg({preEnd:u,phase:r,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=g,!g.changed&&(!f||f<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var m=o.coords.cur.page,_={x:t.modifiedCoords.x-m.x,y:t.modifiedCoords.y-m.y};g.coords.x+=_.x,g.coords.y+=_.y,g.delta.x+=_.x,g.delta.y+=_.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,r=t.event,u=this.states;if(u&&u.length){for(var f=!1,g=0;g<u.length;g++){var m=u[g];t.state=m;var _=m.options,F=m.methods,N=F.beforeEnd&&F.beforeEnd(t);if(N)return this.endResult=N,!1;f=f||!f&&this.shouldDo(_,!0,t.phase,!0)}f&&o.move({event:r,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var r=ge({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(r);for(var u=0,f=this.states;u<f.length;u++){var g=f[u];r.state=g,g.methods.stop&&g.methods.stop(r)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var r=t[o],u=r.options,f=r.methods,g=r.name;this.states.push({options:u,methods:f,index:o,name:g})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,r=o.coords,u=o.rect,f=o.modification;if(f.result){for(var g=f.startDelta,m=f.result,_=m.delta,F=m.rectDelta,N=0,ee=[[r.start,g],[r.cur,_]];N<ee.length;N++){var xe=ee[N],je=xe[0],$e=xe[1];je.page.x-=$e.x,je.page.y-=$e.y,je.client.x-=$e.x,je.client.y-=$e.y}u.left-=F.left,u.right-=F.right,u.top-=F.top,u.bottom-=F.bottom}}},{key:"shouldDo",value:function(t,o,r,u){return!(!t||t.enabled===!1||u&&!t.endOnly||t.endOnly&&!o||r==="start"&&!t.setStart)}},{key:"copyFrom",value:function(t){this.startOffset=t.startOffset,this.startDelta=t.startDelta,this.startEdges=t.startEdges,this.edges=t.edges,this.states=t.states.map(function(o){return ht(o)}),this.result=Ot(ge({},t.result.coords),ge({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),n}();function Ot(n,t){return{rect:t,coords:n,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Jt(n,t){var o=n.defaults,r={start:n.start,set:n.set,beforeEnd:n.beforeEnd,stop:n.stop},u=function(f){var g=f||{};for(var m in g.enabled=g.enabled!==!1,o)m in g||(g[m]=o[m]);var _={options:g,methods:r,name:t,enable:function(){return g.enabled=!0,_},disable:function(){return g.enabled=!1,_}};return _};return t&&typeof t=="string"&&(u._defaults=o,u._methods=r),u}function dn(n){var t=n.iEvent,o=n.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var un={id:"modifiers/base",before:["actions"],install:function(n){n.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(n){var t=n.interaction;t.modification=new Kn(t)},"interactions:before-action-start":function(n){var t=n.interaction,o=n.interaction.modification;o.start(n,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(n)},"interactions:before-action-move":function(n){var t=n.interaction,o=t.modification,r=o.setAndApply(n);return t.edges=o.edges,r},"interactions:before-action-end":function(n){var t=n.interaction,o=t.modification,r=o.beforeEnd(n);return t.edges=o.startEdges,r},"interactions:action-start":dn,"interactions:action-move":dn,"interactions:action-end":dn,"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)}}},kn=un,on={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},On=function(n){w(o,n);var t=O(o);function o(r,u,f,g,m,_,F){var N;d(this,o),(N=t.call(this,r)).relatedTarget=null,N.screenX=void 0,N.screenY=void 0,N.button=void 0,N.buttons=void 0,N.ctrlKey=void 0,N.shiftKey=void 0,N.altKey=void 0,N.metaKey=void 0,N.page=void 0,N.client=void 0,N.delta=void 0,N.rect=void 0,N.x0=void 0,N.y0=void 0,N.t0=void 0,N.dt=void 0,N.duration=void 0,N.clientX0=void 0,N.clientY0=void 0,N.velocity=void 0,N.speed=void 0,N.swipe=void 0,N.axes=void 0,N.preEnd=void 0,m=m||r.element;var ee=r.interactable,xe=(ee&&ee.options||on).deltaSource,je=ce(ee,m,f),$e=g==="start",qe=g==="end",rt=$e?M(N):r.prevEvent,ot=$e?r.coords.start:qe?{page:rt.page,client:rt.client,timeStamp:r.coords.cur.timeStamp}:r.coords.cur;return N.page=ge({},ot.page),N.client=ge({},ot.client),N.rect=ge({},r.rect),N.timeStamp=ot.timeStamp,qe||(N.page.x-=je.x,N.page.y-=je.y,N.client.x-=je.x,N.client.y-=je.y),N.ctrlKey=u.ctrlKey,N.altKey=u.altKey,N.shiftKey=u.shiftKey,N.metaKey=u.metaKey,N.button=u.button,N.buttons=u.buttons,N.target=m,N.currentTarget=m,N.preEnd=_,N.type=F||f+(g||""),N.interactable=ee,N.t0=$e?r.pointers[r.pointers.length-1].downTime:rt.t0,N.x0=r.coords.start.page.x-je.x,N.y0=r.coords.start.page.y-je.y,N.clientX0=r.coords.start.client.x-je.x,N.clientY0=r.coords.start.client.y-je.y,N.delta=$e||qe?{x:0,y:0}:{x:N[xe].x-rt[xe].x,y:N[xe].y-rt[xe].y},N.dt=r.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=ge({},r.coords.velocity[xe]),N.speed=ut(N.velocity.x,N.velocity.y),N.swipe=qe||g==="inertiastart"?N.getSwipe():null,N}return v(o,[{key:"getSwipe",value:function(){var r=this._interaction;if(r.prevEvent.speed<600||this.timeStamp-r.prevEvent.timeStamp>150)return null;var u=180*Math.atan2(r.prevEvent.velocityY,r.prevEvent.velocityX)/Math.PI;u<0&&(u+=360);var f=112.5<=u&&u<247.5,g=202.5<=u&&u<337.5;return{up:g,down:!g&&22.5<=u&&u<157.5,left:f,right:!f&&(292.5<=u||u<67.5),angle:u,speed:r.prevEvent.speed,velocity:{x:r.prevEvent.velocityX,y:r.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(Fe);Object.defineProperties(On.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 xn=v(function n(t,o,r,u,f){d(this,n),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=r,this.downTime=u,this.downTarget=f}),Ia=function(n){return n.interactable="",n.element="",n.prepared="",n.pointerIsDown="",n.pointerWasMoved="",n._proxy="",n}({}),ca=function(n){return n.start="",n.move="",n.end="",n.stop="",n.interacting="",n}({}),Ba=0,Aa=function(){function n(t){var o=this,r=t.pointerType,u=t.scopeFire;d(this,n),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=st(function(N){this.move(N)},"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Ba++,this._scopeFire=u,this.pointerType=r;var f=this;this._proxy={};var g=function(N){Object.defineProperty(o._proxy,N,{get:function(){return f[N]}})};for(var m in Ia)g(m);var _=function(N){Object.defineProperty(o._proxy,N,{value:function(){return f[N].apply(f,arguments)}})};for(var F in ca)_(F);this._scopeFire("interactions:new",{interaction:this})}return v(n,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,r){var u=this.updatePointer(t,o,r,!0),f=this.pointers[u];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:r,pointerIndex:u,pointerInfo:f,type:"down",interaction:this})}},{key:"start",value:function(t,o,r){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(dt(this.prepared,t),this.interactable=o,this.element=r,this.rect=o.getRect(r),this.edges=this.prepared.edges?ge({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(t,o,r){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,r,!1);var u,f,g=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(u=this.coords.cur.client.x-this.coords.start.client.x,f=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=ut(u,f)>this.pointerMoveTolerance);var m,_,F,N=this.getPointerIndex(t),ee={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:r,dx:u,dy:f,duplicate:g,interaction:this};g||(m=this.coords.velocity,_=this.coords.delta,F=Math.max(_.timeStamp/1e3,.001),m.page.x=_.page.x/F,m.page.y=_.page.y/F,m.client.x=_.client.x/F,m.client.y=_.client.y/F,m.timeStamp=F),this._scopeFire("interactions:move",ee),g||this.simulation||(this.interacting()&&(ee.type=null,this.move(ee)),this.pointerWasMoved&&U(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||y(this.coords.delta),(t=ge({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},t||{})).phase="move",this._doPhase(t)}},{key:"pointerUp",value:function(t,o,r,u){var f=this.getPointerIndex(t);f===-1&&(f=this.updatePointer(t,o,r,!1));var g=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(g),{pointer:t,pointerIndex:f,pointerInfo:this.pointers[f],event:o,eventTarget:r,type:g,curEventTarget:u,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=G(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:z(this.pointers,function(r){return r.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,r,u){var f,g,m,_=G(t),F=this.getPointerIndex(t),N=this.pointers[F];return u=u!==!1&&(u||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new xn(_,t,o,null,null),F=this.pointers.length,this.pointers.push(N)),J(this.coords.cur,this.pointers.map(function(ee){return ee.pointer}),this._now()),f=this.coords.delta,g=this.coords.prev,m=this.coords.cur,f.page.x=m.page.x-g.page.x,f.page.y=m.page.y-g.page.y,f.client.x=m.client.x-g.client.x,f.client.y=m.client.y-g.client.y,f.timeStamp=m.timeStamp-g.timeStamp,u&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=r,V(this.downPointer,t),this.interacting()||(U(this.coords.start,this.coords.cur),U(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,r),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:r,down:u,pointerInfo:N,pointerIndex:F,interaction:this}),F}},{key:"removePointer",value:function(t,o){var r=this.getPointerIndex(t);if(r!==-1){var u=this.pointers[r];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:r,pointerInfo:u,interaction:this}),this.pointers.splice(r,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,r){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=r}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,r,u){return new On(this,t,this.prepared.name,o,this.element,r,u)}},{key:"_fireEvent",value:function(t){var o;(o=this.interactable)==null||o.fire(t),(!this.prevEvent||t.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=t)}},{key:"_doPhase",value:function(t){var o=t.event,r=t.phase,u=t.preEnd,f=t.type,g=this.rect;if(g&&r==="move"&&(te(this.edges,g,this.coords.delta[this.interactable.options.deltaSource]),g.width=g.right-g.left,g.height=g.bottom-g.top),this._scopeFire("interactions:before-action-".concat(r),t)===!1)return!1;var m=t.iEvent=this._createPreparedEvent(o,r,u,f);return this._scopeFire("interactions:action-".concat(r),t),r==="start"&&(this.prevEvent=m),this._fireEvent(m),this._scopeFire("interactions:after-action-".concat(r),t),!0}},{key:"_now",value:function(){return Date.now()}}]),n}();function ua(n){pa(n.interaction)}function pa(n){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(n))return!1;var t=n.offset.pending;return ea(n.coords.cur,t),ea(n.coords.delta,t),te(n.edges,n.rect,t),t.x=0,t.y=0,!0}function Na(n){var t=n.x,o=n.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function ea(n,t){var o=n.page,r=n.client,u=t.x,f=t.y;o.x+=u,o.y+=f,r.x+=u,r.y+=f}ca.offsetBy="";var Va={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(n){n.Interaction.prototype.offsetBy=Na},listeners:{"interactions:new":function(n){n.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(n){return function(t){t.pointerIsDown&&(ea(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(n.interaction)},"interactions:before-action-start":ua,"interactions:before-action-move":ua,"interactions:before-action-end":function(n){var t=n.interaction;if(pa(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(n){var t=n.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},da=Va,Oa=function(){function n(t){d(this,n),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return v(n,[{key:"start",value:function(t){var o=this.interaction,r=Wn(o);if(!r||!r.enabled)return!1;var u=o.coords.velocity.client,f=ut(u.x,u.y),g=this.modification||(this.modification=new Kn(o));if(g.copyFrom(o.modification),this.t0=o._now(),this.allowResume=r.allowResume,this.v0=f,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=g.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&f>r.minSpeed&&f>r.endSpeed)this.startInertia();else{if(g.result=g.setAll(this.modifierArg),!g.result.changed)return!1;this.startSmoothEnd()}return o.modification.result.rect=null,o.offsetBy(this.targetOffset),o._doPhase({interaction:o,event:t,phase:"inertiastart"}),o.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),o.modification.result.rect=null,this.active=!0,o.simulation=this,!0}},{key:"startInertia",value:function(){var t=this,o=this.interaction.coords.velocity.client,r=Wn(this.interaction),u=r.resistance,f=-Math.log(r.endSpeed/this.v0)/u;this.targetOffset={x:(o.x-f)/u,y:(o.y-f)/u},this.te=f,this.lambda_v0=u/this.v0,this.one_ve_v0=1-r.endSpeed/this.v0;var g=this.modification,m=this.modifierArg;m.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},g.result=g.setAll(m),g.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+g.result.delta.x,y:this.targetOffset.y+g.result.delta.y}),this.onNextFrame(function(){return t.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var t=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame(function(){return t.smoothEndTick()})}},{key:"onNextFrame",value:function(t){var o=this;this.timeout=Ue.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,r,u,f,g,m,_=this,F=this.interaction,N=Wn(F).resistance,ee=(F._now()-this.t0)/1e3;if(ee<this.te){var xe,je=1-(Math.exp(-N*ee)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,r=this.targetOffset.x,u=this.targetOffset.y,f=this.modifiedOffset.x,g=this.modifiedOffset.y,xe={x:fa(m=je,t,r,f),y:fa(m,o,u,g)}):xe={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var $e={x:xe.x-this.currentOffset.x,y:xe.y-this.currentOffset.y};this.currentOffset.x+=$e.x,this.currentOffset.y+=$e.y,F.offsetBy($e),F.move(),this.onNextFrame(function(){return _.inertiaTick()})}else F.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var t=this,o=this.interaction,r=o._now()-this.t0,u=Wn(o).smoothEndDuration;if(r<u){var f={x:ha(r,0,this.targetOffset.x,u),y:ha(r,0,this.targetOffset.y,u)},g={x:f.x-this.currentOffset.x,y:f.y-this.currentOffset.y};this.currentOffset.x+=g.x,this.currentOffset.y+=g.y,o.offsetBy(g),o.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return t.smoothEndTick()})}else o.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(t){var o=t.pointer,r=t.event,u=t.eventTarget,f=this.interaction;f.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),f.updatePointer(o,r,u,!0),f._doPhase({interaction:f,event:r,phase:"resume"}),U(f.coords.prev,f.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,Ue.cancel(this.timeout)}}]),n}();function Wn(n){var t=n.interactable,o=n.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ma={id:"inertia",before:["modifiers","actions"],install:function(n){var t=n.defaults;n.usePlugin(da),n.usePlugin(kn),n.actions.phases.inertiastart=!0,n.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(n){var t=n.interaction;t.inertia=new Oa(t)},"interactions:before-action-end":function(n){var t=n.interaction,o=n.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(n){var t=n.interaction,o=n.eventTarget,r=t.inertia;if(r.active)for(var u=o;I.element(u);){if(u===t.element){r.resume(n);break}u=nt(u)}},"interactions:stop":function(n){var t=n.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(n){var t=n.interaction.modification;t.stop(n),t.start(n,n.interaction.coords.cur.page),t.applyToInteraction(n)},"interactions:before-action-inertiastart":function(n){return n.interaction.modification.setAndApply(n)},"interactions:action-resume":dn,"interactions:action-inertiastart":dn,"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 fa(n,t,o,r){var u=1-n;return u*u*t+2*u*n*o+n*n*r}function ha(n,t,o,r){return-o*(n/=r)*(n-2)+t}var Pa=Ma;function ta(n,t){for(var o=0;o<t.length;o++){var r=t[o];if(n.immediatePropagationStopped)break;r(n)}}var zt=function(){function n(t){d(this,n),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ge({},t||{})}return v(n,[{key:"fire",value:function(t){var o,r=this.global;(o=this.types[t.type])&&ta(t,o),!t.propagationStopped&&r&&(o=r[t.type])&&ta(t,o)}},{key:"on",value:function(t,o){var r=Be(t,o);for(t in r)this.types[t]=ye(this.types[t]||[],r[t])}},{key:"off",value:function(t,o){var r=Be(t,o);for(t in r){var u=this.types[t];if(u&&u.length)for(var f=0,g=r[t];f<g.length;f++){var m=g[f],_=u.indexOf(m);_!==-1&&u.splice(_,1)}}}},{key:"getRect",value:function(t){return null}}]),n}(),Ht=function(){function n(t){d(this,n),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,V(this,t)}return v(n,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),n}();function en(n){return I.object(n)?{capture:!!n.capture,passive:!!n.passive}:{capture:!!n,passive:!1}}function Et(n,t){return n===t||(typeof n=="boolean"?!!t.capture===n&&!t.passive:!!n.capture==!!t.capture&&!!n.passive==!!t.passive)}var Mt={id:"events",install:function(n){var t,o=[],r={},u=[],f={add:g,remove:m,addDelegate:function(N,ee,xe,je,$e){var qe=en($e);if(!r[xe]){r[xe]=[];for(var rt=0;rt<u.length;rt++){var ot=u[rt];g(ot,xe,_),g(ot,xe,F,!0)}}var pt=r[xe],Ct=he(pt,function(At){return At.selector===N&&At.context===ee});Ct||(Ct={selector:N,context:ee,listeners:[]},pt.push(Ct)),Ct.listeners.push({func:je,options:qe})},removeDelegate:function(N,ee,xe,je,$e){var qe,rt=en($e),ot=r[xe],pt=!1;if(ot)for(qe=ot.length-1;qe>=0;qe--){var Ct=ot[qe];if(Ct.selector===N&&Ct.context===ee){for(var At=Ct.listeners,mt=At.length-1;mt>=0;mt--){var _t=At[mt];if(_t.func===je&&Et(_t.options,rt)){At.splice(mt,1),At.length||(ot.splice(qe,1),m(ee,xe,_),m(ee,xe,F,!0)),pt=!0;break}}if(pt)break}}},delegateListener:_,delegateUseCapture:F,delegatedEvents:r,documents:u,targets:o,supportsOptions:!1,supportsPassive:!1};function g(N,ee,xe,je){if(N.addEventListener){var $e=en(je),qe=he(o,function(rt){return rt.eventTarget===N});qe||(qe={eventTarget:N,events:{}},o.push(qe)),qe.events[ee]||(qe.events[ee]=[]),he(qe.events[ee],function(rt){return rt.func===xe&&Et(rt.options,$e)})||(N.addEventListener(ee,xe,f.supportsOptions?$e:$e.capture),qe.events[ee].push({func:xe,options:$e}))}}function m(N,ee,xe,je){if(N.addEventListener&&N.removeEventListener){var $e=z(o,function(rn){return rn.eventTarget===N}),qe=o[$e];if(qe&&qe.events)if(ee!=="all"){var rt=!1,ot=qe.events[ee];if(ot){if(xe==="all"){for(var pt=ot.length-1;pt>=0;pt--){var Ct=ot[pt];m(N,ee,Ct.func,Ct.options)}return}for(var At=en(je),mt=0;mt<ot.length;mt++){var _t=ot[mt];if(_t.func===xe&&Et(_t.options,At)){N.removeEventListener(ee,xe,f.supportsOptions?At:At.capture),ot.splice(mt,1),ot.length===0&&(delete qe.events[ee],rt=!0);break}}}rt&&!Object.keys(qe.events).length&&o.splice($e,1)}else for(ee in qe.events)qe.events.hasOwnProperty(ee)&&m(N,ee,"all")}}function _(N,ee){for(var xe=en(ee),je=new Ht(N),$e=r[N.type],qe=le(N)[0],rt=qe;I.element(rt);){for(var ot=0;ot<$e.length;ot++){var pt=$e[ot],Ct=pt.selector,At=pt.context;if(Pe(rt,Ct)&&me(At,qe)&&me(At,rt)){var mt=pt.listeners;je.currentTarget=rt;for(var _t=0;_t<mt.length;_t++){var rn=mt[_t];Et(rn.options,xe)&&rn.func(je)}}}rt=nt(rt)}}function F(N){return _(N,!0)}return(t=n.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return f.supportsOptions=!0},get passive(){return f.supportsPassive=!0}}),n.events=f,f}},jt={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(n){for(var t=0,o=jt.methodOrder;t<o.length;t++){var r=o[t],u=jt[r](n);if(u)return u}return null},simulationResume:function(n){var t=n.pointerType,o=n.eventType,r=n.eventTarget,u=n.scope;if(!/down|start/i.test(o))return null;for(var f=0,g=u.interactions.list;f<g.length;f++){var m=g[f],_=r;if(m.simulation&&m.simulation.allowResume&&m.pointerType===t)for(;_;){if(_===m.element)return m;_=nt(_)}}return null},mouseOrPen:function(n){var t,o=n.pointerId,r=n.pointerType,u=n.eventType,f=n.scope;if(r!=="mouse"&&r!=="pen")return null;for(var g=0,m=f.interactions.list;g<m.length;g++){var _=m[g];if(_.pointerType===r){if(_.simulation&&!qt(_,o))continue;if(_.interacting())return _;t||(t=_)}}if(t)return t;for(var F=0,N=f.interactions.list;F<N.length;F++){var ee=N[F];if(!(ee.pointerType!==r||/down/i.test(u)&&ee.simulation))return ee}return null},hasPointer:function(n){for(var t=n.pointerId,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(qt(u,t))return u}return null},idle:function(n){for(var t=n.pointerType,o=0,r=n.scope.interactions.list;o<r.length;o++){var u=r[o];if(u.pointers.length===1){var f=u.interactable;if(f&&(!f.options.gesture||!f.options.gesture.enabled))continue}else if(u.pointers.length>=2)continue;if(!u.interacting()&&t===u.pointerType)return u}return null}};function qt(n,t){return n.pointers.some(function(o){return o.id===t})}var Ut=jt,ln=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function pn(n,t){return function(o){var r=t.interactions.list,u=H(o),f=le(o),g=f[0],m=f[1],_=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var F=0,N=o.changedTouches;F<N.length;F++){var ee=N[F],xe={pointer:ee,pointerId:G(ee),pointerType:u,eventType:o.type,eventTarget:g,curEventTarget:m,scope:t},je=$n(xe);_.push([xe.pointer,xe.eventTarget,xe.curEventTarget,je])}}else{var $e=!1;if(!ne.supportsPointerEvent&&/mouse/.test(o.type)){for(var qe=0;qe<r.length&&!$e;qe++)$e=r[qe].pointerType!=="mouse"&&r[qe].pointerIsDown;$e=$e||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!$e){var rt={pointer:o,pointerId:G(o),pointerType:u,eventType:o.type,curEventTarget:m,eventTarget:g,scope:t},ot=$n(rt);_.push([rt.pointer,rt.eventTarget,rt.curEventTarget,ot])}}for(var pt=0;pt<_.length;pt++){var Ct=_[pt],At=Ct[0],mt=Ct[1],_t=Ct[2];Ct[3][n](At,o,mt,_t)}}}function $n(n){var t=n.pointerType,o=n.scope,r={interaction:Ut.search(n),searchDetails:n};return o.fire("interactions:find",r),r.interaction||o.interactions.new({pointerType:t})}function Mn(n,t){var o=n.doc,r=n.scope,u=n.options,f=r.interactions.docEvents,g=r.events,m=g[t];for(var _ in r.browser.isIOS&&!u.events&&(u.events={passive:!1}),g.delegatedEvents)m(o,_,g.delegateListener),m(o,_,g.delegateUseCapture,!0);for(var F=u&&u.events,N=0;N<f.length;N++){var ee=f[N];m(o,ee.type,ee.listener,F)}}var za={id:"core/interactions",install:function(n){for(var t={},o=0;o<ln.length;o++){var r=ln[o];t[r]=pn(r,n)}var u,f=ne.pEventTypes;function g(){for(var m=0,_=n.interactions.list;m<_.length;m++){var F=_[m];if(F.pointerIsDown&&F.pointerType==="touch"&&!F._interacting)for(var N=function(){var je=xe[ee];n.documents.some(function($e){return me($e.doc,je.downTarget)})||F.removePointer(je.pointer,je.event)},ee=0,xe=F.pointers;ee<xe.length;ee++)N()}}(u=A.PointerEvent?[{type:f.down,listener:g},{type:f.down,listener:t.pointerDown},{type:f.move,listener:t.pointerMove},{type:f.up,listener:t.pointerUp},{type:f.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:g},{type:"touchstart",listener:t.pointerDown},{type:"touchmove",listener:t.pointerMove},{type:"touchend",listener:t.pointerUp},{type:"touchcancel",listener:t.pointerUp}]).push({type:"blur",listener:function(m){for(var _=0,F=n.interactions.list;_<F.length;_++)F[_].documentBlur(m)}}),n.prevTouchTime=0,n.Interaction=function(m){w(F,m);var _=O(F);function F(){return d(this,F),_.apply(this,arguments)}return v(F,[{key:"pointerMoveTolerance",get:function(){return n.interactions.pointerMoveTolerance},set:function(N){n.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return n.now()}}]),F}(Aa),n.interactions={list:[],new:function(m){m.scopeFire=function(F,N){return n.fire(F,N)};var _=new n.Interaction(m);return n.interactions.list.push(_),_},listeners:t,docEvents:u,pointerMoveTolerance:1},n.usePlugin(Dt)},listeners:{"scope:add-document":function(n){return Mn(n,"add")},"scope:remove-document":function(n){return Mn(n,"remove")},"interactable:unset":function(n,t){for(var o=n.interactable,r=t.interactions.list.length-1;r>=0;r--){var u=t.interactions.list[r];u.interactable===o&&(u.stop(),t.fire("interactions:destroy",{interaction:u}),u.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(r,1))}}},onDocSignal:Mn,doOnInteractions:pn,methodNames:ln},Ra=za,wn=function(n){return n[n.On=0]="On",n[n.Off=1]="Off",n}(wn||{}),La=function(){function n(t,o,r,u){d(this,n),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new zt,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=o.actions,this.target=t,this._context=o.context||r,this._win=P(St(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=u,this.set(o)}return v(n,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return I.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),I.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),I.func(o.onend)&&this.on("".concat(t,"end"),o.onend),I.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,r){var u,f=this,g=(u=this._actions.map[t])==null?void 0:u.filterEventType,m=function(_){return(g==null||g(_))&&Qt(_,f._actions)};(I.array(o)||I.object(o))&&this._onOff(wn.Off,t,o,void 0,m),(I.array(r)||I.object(r))&&this._onOff(wn.On,t,r,void 0,m)}},{key:"setPerAction",value:function(t,o){var r=this._defaults;for(var u in o){var f=u,g=this.options[t],m=o[f];f==="listeners"&&this.updatePerActionListeners(t,g.listeners,m),I.array(m)?g[f]=Ge(m):I.plainObject(m)?(g[f]=ge(g[f]||{},ht(m)),I.object(r.perAction[f])&&"enabled"in r.perAction[f]&&(g[f].enabled=m.enabled!==!1)):I.bool(m)&&I.object(r.perAction[f])?g[f].enabled=m:g[f]=m}}},{key:"getRect",value:function(t){return t=t||(I.element(this.target)?this.target:null),I.string(this.target)&&(t=t||this._context.querySelector(this.target)),ct(t)}},{key:"rectChecker",value:function(t){var o=this;return I.func(t)?(this.getRect=function(r){var u=ge({},t.apply(o,r));return"width"in u||(u.width=u.right-u.left,u.height=u.bottom-u.top),u},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(St(o)||I.object(o)){for(var r in this.options[t]=o,this._actions.map)this.options[r][t]=o;return this}return this.options[t]}},{key:"origin",value:function(t){return this._backCompatOption("origin",t)}},{key:"deltaSource",value:function(t){return t==="page"||t==="client"?(this.options.deltaSource=t,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var t=this.target;return I.string(t)?Array.from(this._context.querySelectorAll(t)):I.func(t)&&t.getAllElements?t.getAllElements():I.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||me(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,r){return!this.testIgnore(t.ignoreFrom,o,r)&&this.testAllow(t.allowFrom,o,r)}},{key:"testAllow",value:function(t,o,r){return!t||!!I.element(r)&&(I.string(t)?Ke(r,t,o):!!I.element(t)&&me(t,r))}},{key:"testIgnore",value:function(t,o,r){return!(!t||!I.element(r))&&(I.string(t)?Ke(r,t,o):!!I.element(t)&&me(t,r))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,r,u,f){I.object(o)&&!I.array(o)&&(u=r,r=null);var g=Be(o,r,f);for(var m in g){m==="wheel"&&(m=ne.wheelEvent);for(var _=0,F=g[m];_<F.length;_++){var N=F[_];Qt(m,this._actions)?this.events[t===wn.On?"on":"off"](m,N):I.string(this.target)?this._scopeEvents[t===wn.On?"addDelegate":"removeDelegate"](this.target,this._context,m,N,u):this._scopeEvents[t===wn.On?"add":"remove"](this.target,m,N,u)}}return this}},{key:"on",value:function(t,o,r){return this._onOff(wn.On,t,o,r)}},{key:"off",value:function(t,o,r){return this._onOff(wn.Off,t,o,r)}},{key:"set",value:function(t){var o=this._defaults;for(var r in I.object(t)||(t={}),this.options=ht(o.base),this._actions.methodDict){var u=r,f=this._actions.methodDict[u];this.options[u]={},this.setPerAction(u,ge(ge({},o.perAction),o.actions[u])),this[f](t[u])}for(var g in t)g!=="getRect"?I.func(this[g])&&this[g](t[g]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(I.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],r=o.length-1;r>=0;r--){var u=o[r],f=u.selector,g=u.context,m=u.listeners;f===this.target&&g===this._context&&o.splice(r,1);for(var _=m.length-1;_>=0;_--)this._scopeEvents.removeDelegate(this.target,this._context,t,m[_][0],m[_][1])}else this._scopeEvents.remove(this.target,"all")}}]),n}(),Fa=function(){function n(t){var o=this;d(this,n),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(r){var u=r.interactable,f=u.target,g=I.string(f)?o.selectorMap[f]:f[o.scope.id],m=z(g,function(_){return _===u});g.splice(m,1)}})}return v(n,[{key:"new",value:function(t,o){o=ge(o||{},{actions:this.scope.actions});var r=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(r._doc),this.list.push(r),I.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(r)):(r.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(r)),this.scope.fire("interactable:new",{target:t,options:o,interactable:r,win:this.scope._win}),r}},{key:"getExisting",value:function(t,o){var r=o&&o.context||this.scope.document,u=I.string(t),f=u?this.selectorMap[t]:t[this.scope.id];if(f)return he(f,function(g){return g._context===r&&(u||g.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var r=0,u=this.list;r<u.length;r++){var f=u[r],g=void 0;if((I.string(f.target)?I.element(t)&&Pe(t,f.target):t===f.target)&&f.inContext(t)&&(g=o(f)),g!==void 0)return g}}}]),n}(),na=function(){function n(){var t=this;d(this,n),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ne,this.defaults=ht(on),this.Eventable=zt,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(r){var u=function f(g,m){var _=r.interactables.getExisting(g,m);return _||((_=r.interactables.new(g,m)).events.global=f.globalEvents),_};return u.getPointerAverage=K,u.getTouchBBox=_e,u.getTouchDistance=ke,u.getTouchAngle=ae,u.getElementRect=ct,u.getElementClientRect=yt,u.matchesSelector=Pe,u.closest=Xe,u.globalEvents={},u.version="1.10.27",u.scope=r,u.use=function(f,g){return this.scope.usePlugin(f,g),this},u.isSet=function(f,g){return!!this.scope.interactables.get(f,g&&g.context)},u.on=st(function(f,g,m){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var _=0,F=f;_<F.length;_++){var N=F[_];this.on(N,g,m)}return this}if(I.object(f)){for(var ee in f)this.on(ee,f[ee],g);return this}return Qt(f,this.scope.actions)?this.globalEvents[f]?this.globalEvents[f].push(g):this.globalEvents[f]=[g]:this.scope.events.add(this.scope.document,f,g,{options:m}),this},"The interact.on() method is being deprecated"),u.off=st(function(f,g,m){if(I.string(f)&&f.search(" ")!==-1&&(f=f.trim().split(/ +/)),I.array(f)){for(var _=0,F=f;_<F.length;_++){var N=F[_];this.off(N,g,m)}return this}if(I.object(f)){for(var ee in f)this.off(ee,f[ee],g);return this}var xe;return Qt(f,this.scope.actions)?f in this.globalEvents&&(xe=this.globalEvents[f].indexOf(g))!==-1&&this.globalEvents[f].splice(xe,1):this.scope.events.remove(this.scope.document,f,g,m),this},"The interact.off() method is being deprecated"),u.debug=function(){return this.scope},u.supportsTouch=function(){return ne.supportsTouch},u.supportsPointerEvent=function(){return ne.supportsPointerEvent},u.stop=function(){for(var f=0,g=this.scope.interactions.list;f<g.length;f++)g[f].stop();return this},u.pointerMoveTolerance=function(f){return I.number(f)?(this.scope.interactions.pointerMoveTolerance=f,this):this.scope.interactions.pointerMoveTolerance},u.addDocument=function(f,g){this.scope.addDocument(f,g)},u.removeDocument=function(f){this.scope.removeDocument(f)},u}(this),this.InteractEvent=On,this.Interactable=void 0,this.interactables=new Fa(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(r){return t.removeDocument(r.target)};var o=this;this.Interactable=function(r){w(f,r);var u=O(f);function f(){return d(this,f),u.apply(this,arguments)}return v(f,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(g){return W(E(f.prototype),"set",this).call(this,g),o.fire("interactable:set",{options:g,interactable:this}),this}},{key:"unset",value:function(){W(E(f.prototype),"unset",this).call(this);var g=o.interactables.list.indexOf(this);g<0||(o.interactables.list.splice(g,1),o.fire("interactable:unset",{interactable:this}))}}]),f}(La)}return v(n,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var r=0,u=this.listenerMaps;r<u.length;r++){var f=u[r].map[t];if(f&&f(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,r){return o.isInitialized=!0,I.window(r)&&C(r),A.init(r),ne.init(r),Ue.init(r),o.window=r,o.document=r.document,o.usePlugin(Ra),o.usePlugin(Mt),o}(this,t)}},{key:"pluginIsInstalled",value:function(t){var o=t.id;return o?!!this._plugins.map[o]:this._plugins.list.indexOf(t)!==-1}},{key:"usePlugin",value:function(t,o){if(!this.isInitialized)return this;if(this.pluginIsInstalled(t))return this;if(t.id&&(this._plugins.map[t.id]=t),this._plugins.list.push(t),t.install&&t.install(this,o),t.listeners&&t.before){for(var r=0,u=this.listenerMaps.length,f=t.before.reduce(function(m,_){return m[_]=!0,m[Dn(_)]=!0,m},{});r<u;r++){var g=this.listenerMaps[r].id;if(g&&(f[g]||f[Dn(g)]))break}this.listenerMaps.splice(r,0,{id:t.id,map:t.listeners})}else t.listeners&&this.listenerMaps.push({id:t.id,map:t.listeners});return this}},{key:"addDocument",value:function(t,o){if(this.getDocIndex(t)!==-1)return!1;var r=P(t);o=o?ge({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(r,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:r,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),r=P(t),u=this.documents[o].options;this.events.remove(r,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:r,scope:this,options:u})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),n}();function Dn(n){return n&&n.replace(/\/.*$/,"")}var Hn=new na,Zt=Hn.interactStatic,yn=typeof globalThis<"u"?globalThis:window;Hn.init(yn);var $a=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(n){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(r){var u=r[0],f=r[1];return u in n||f in n}),o=function(r,u){for(var f=n.range,g=n.limits,m=g===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:g,_=n.offset,F=_===void 0?{x:0,y:0}:_,N={range:f,grid:n,x:null,y:null},ee=0;ee<t.length;ee++){var xe=t[ee],je=xe[0],$e=xe[1],qe=Math.round((r-F.x)/n[je]),rt=Math.round((u-F.y)/n[$e]);N[je]=Math.max(m.left,Math.min(m.right,qe*n[je]+F.x)),N[$e]=Math.max(m.top,Math.min(m.bottom,rt*n[$e]+F.y))}return N};return o.grid=n,o.coordFields=t,o}}),jn={id:"snappers",install:function(n){var t=n.interactStatic;t.snappers=ge(t.snappers||{},$a),t.createSnapGrid=t.snappers.grid}},dr=jn,fr={start:function(n){var t=n.state,o=n.rect,r=n.edges,u=n.pageCoords,f=t.options,g=f.ratio,m=f.enabled,_=t.options,F=_.equalDelta,N=_.modifiers;g==="preserve"&&(g=o.width/o.height),t.startCoords=ge({},u),t.startRect=ge({},o),t.ratio=g,t.equalDelta=F;var ee=t.linkedEdges={top:r.top||r.left&&!r.bottom,left:r.left||r.top&&!r.right,bottom:r.bottom||r.right&&!r.top,right:r.right||r.bottom&&!r.left};if(t.xIsPrimaryAxis=!(!r.left&&!r.right),t.equalDelta){var xe=(ee.left?1:-1)*(ee.top?1:-1);t.edgeSign={x:xe,y:xe}}else t.edgeSign={x:ee.left?-1:1,y:ee.top?-1:1};if(m!==!1&&ge(r,ee),N!=null&&N.length){var je=new Kn(n.interaction);je.copyFrom(n.interaction.modification),je.prepareStates(N),t.subModification=je,je.startAll(l({},n))}},set:function(n){var t=n.state,o=n.rect,r=n.coords,u=t.linkedEdges,f=ge({},r),g=t.equalDelta?hr:vr;if(ge(n.edges,u),g(t,t.xIsPrimaryAxis,r,o),!t.subModification)return null;var m=ge({},o);te(u,m,{x:r.x-f.x,y:r.y-f.y});var _=t.subModification.setAll(l(l({},n),{},{rect:m,edges:u,pageCoords:r,prevCoords:r,prevRect:m})),F=_.delta;return _.changed&&(g(t,Math.abs(F.x)>Math.abs(F.y),_.coords,_.rect),ge(r,_.coords)),_.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function hr(n,t,o){var r=n.startCoords,u=n.edgeSign;t?o.y=r.y+(o.x-r.x)*u.y:o.x=r.x+(o.y-r.y)*u.x}function vr(n,t,o,r){var u=n.startRect,f=n.startCoords,g=n.ratio,m=n.edgeSign;if(t){var _=r.width/g;o.y=f.y+(_-u.height)*m.y}else{var F=r.height*g;o.x=f.x+(F-u.width)*m.x}}var gr=Jt(fr,"aspectRatio"),Vo=function(){};Vo._defaults={};var ja=Vo;function qn(n,t,o){return I.func(n)?Ye(n,t.interactable,t.element,[o.x,o.y,t]):Ye(n,t.interactable,t.element)}var Ua={start:function(n){var t=n.rect,o=n.startOffset,r=n.state,u=n.interaction,f=n.pageCoords,g=r.options,m=g.elementRect,_=ge({left:0,top:0,right:0,bottom:0},g.offset||{});if(t&&m){var F=qn(g.restriction,u,f);if(F){var N=F.right-F.left-t.width,ee=F.bottom-F.top-t.height;N<0&&(_.left+=N,_.right+=N),ee<0&&(_.top+=ee,_.bottom+=ee)}_.left+=o.left-t.width*m.left,_.top+=o.top-t.height*m.top,_.right+=o.right-t.width*(1-m.right),_.bottom+=o.bottom-t.height*(1-m.bottom)}r.offset=_},set:function(n){var t=n.coords,o=n.interaction,r=n.state,u=r.options,f=r.offset,g=qn(u.restriction,o,t);if(g){var m=function(_){return!_||"left"in _&&"top"in _||((_=ge({},_)).left=_.x||0,_.top=_.y||0,_.right=_.right||_.left+_.width,_.bottom=_.bottom||_.top+_.height),_}(g);t.x=Math.max(Math.min(m.right-f.right,t.x),m.left+f.left),t.y=Math.max(Math.min(m.bottom-f.bottom,t.y),m.top+f.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},mr=Jt(Ua,"restrict"),Oo={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Mo={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Po(n,t){for(var o=0,r=["top","left","bottom","right"];o<r.length;o++){var u=r[o];u in n||(n[u]=t[u])}return n}var va={noInner:Oo,noOuter:Mo,start:function(n){var t,o=n.interaction,r=n.startOffset,u=n.state,f=u.options;f&&(t=Ae(qn(f.offset,o,o.coords.start.page))),t=t||{x:0,y:0},u.offset={top:t.y+r.top,left:t.x+r.left,bottom:t.y-r.bottom,right:t.x-r.right}},set:function(n){var t=n.coords,o=n.edges,r=n.interaction,u=n.state,f=u.offset,g=u.options;if(o){var m=ge({},t),_=qn(g.inner,r,m)||{},F=qn(g.outer,r,m)||{};Po(_,Oo),Po(F,Mo),o.top?t.y=Math.min(Math.max(F.top+f.top,m.y),_.top+f.top):o.bottom&&(t.y=Math.max(Math.min(F.bottom+f.bottom,m.y),_.bottom+f.bottom)),o.left?t.x=Math.min(Math.max(F.left+f.left,m.x),_.left+f.left):o.right&&(t.x=Math.max(Math.min(F.right+f.right,m.x),_.right+f.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yr=Jt(va,"restrictEdges"),br=ge({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(n){}},Ua.defaults),kr=Jt({start:Ua.start,set:Ua.set,defaults:br},"restrictRect"),xr={width:-1/0,height:-1/0},wr={width:1/0,height:1/0},Dr=Jt({start:function(n){return va.start(n)},set:function(n){var t=n.interaction,o=n.state,r=n.rect,u=n.edges,f=o.options;if(u){var g=se(qn(f.min,t,n.coords))||xr,m=se(qn(f.max,t,n.coords))||wr;o.options={endOnly:f.endOnly,inner:ge({},va.noInner),outer:ge({},va.noOuter)},u.top?(o.options.inner.top=r.bottom-g.height,o.options.outer.top=r.bottom-m.height):u.bottom&&(o.options.inner.bottom=r.top+g.height,o.options.outer.bottom=r.top+m.height),u.left?(o.options.inner.left=r.right-g.width,o.options.outer.left=r.right-m.width):u.right&&(o.options.inner.right=r.left+g.width,o.options.outer.right=r.left+m.width),va.set(n),o.options=f}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),uo={start:function(n){var t,o=n.interaction,r=n.interactable,u=n.element,f=n.rect,g=n.state,m=n.startOffset,_=g.options,F=_.offsetWithOrigin?function(xe){var je=xe.interaction.element,$e=Ae(Ye(xe.state.options.origin,null,null,[je])),qe=$e||ce(xe.interactable,je,xe.interaction.prepared.name);return qe}(n):{x:0,y:0};if(_.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=Ye(_.offset,r,u,[o]);(t=Ae(N)||{x:0,y:0}).x+=F.x,t.y+=F.y}var ee=_.relativePoints;g.offsets=f&&ee&&ee.length?ee.map(function(xe,je){return{index:je,relativePoint:xe,x:m.left-f.width*xe.x+t.x,y:m.top-f.height*xe.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(n){var t=n.interaction,o=n.coords,r=n.state,u=r.options,f=r.offsets,g=ce(t.interactable,t.element,t.prepared.name),m=ge({},o),_=[];u.offsetWithOrigin||(m.x-=g.x,m.y-=g.y);for(var F=0,N=f;F<N.length;F++)for(var ee=N[F],xe=m.x-ee.x,je=m.y-ee.y,$e=0,qe=u.targets.length;$e<qe;$e++){var rt=u.targets[$e],ot=void 0;(ot=I.func(rt)?rt(xe,je,t._proxy,ee,$e):rt)&&_.push({x:(I.number(ot.x)?ot.x:xe)+ee.x,y:(I.number(ot.y)?ot.y:je)+ee.y,range:I.number(ot.range)?ot.range:u.range,source:rt,index:$e,offset:ee})}for(var pt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ct=0;Ct<_.length;Ct++){var At=_[Ct],mt=At.range,_t=At.x-m.x,rn=At.y-m.y,Kt=ut(_t,rn),fn=Kt<=mt;mt===1/0&&pt.inRange&&pt.range!==1/0&&(fn=!1),pt.target&&!(fn?pt.inRange&&mt!==1/0?Kt/mt<pt.distance/pt.range:mt===1/0&&pt.range!==1/0||Kt<pt.distance:!pt.inRange&&Kt<pt.distance)||(pt.target=At,pt.distance=Kt,pt.range=mt,pt.inRange=fn,pt.delta.x=_t,pt.delta.y=rn)}return pt.inRange&&(o.x=pt.target.x,o.y=pt.target.y),r.closest=pt,pt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cr=Jt(uo,"snap"),Ka={start:function(n){var t=n.state,o=n.edges,r=t.options;if(!o)return null;n.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:r.offset||"self",origin:{x:0,y:0},range:r.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],uo.start(n),t.offsets=n.state.offsets,n.state=t},set:function(n){var t=n.interaction,o=n.state,r=n.coords,u=o.options,f=o.offsets,g={x:r.x-f[0].x,y:r.y-f[0].y};o.options=ge({},u),o.options.targets=[];for(var m=0,_=u.targets||[];m<_.length;m++){var F=_[m],N=void 0;if(N=I.func(F)?F(g.x,g.y,t):F){for(var ee=0,xe=o.targetFields;ee<xe.length;ee++){var je=xe[ee],$e=je[0],qe=je[1];if($e in N||qe in N){N.x=N[$e],N.y=N[qe];break}}o.options.targets.push(N)}}var rt=uo.set(n);return o.options=u,rt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Er=Jt(Ka,"snapSize"),po={aspectRatio:gr,restrictEdges:yr,restrict:mr,restrictRect:kr,restrictSize:Dr,snapEdges:Jt({start:function(n){var t=n.edges;return t?(n.state.targetFields=n.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Ka.start(n)):null},set:Ka.set,defaults:ge(ht(Ka.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cr,snapSize:Er,spring:ja,avoid:ja,transform:ja,rubberband:ja},_r={id:"modifiers",install:function(n){var t=n.interactStatic;for(var o in n.usePlugin(kn),n.usePlugin(dr),t.modifiers=po,po){var r=po[o],u=r._defaults,f=r._methods;u._methods=f,n.defaults.perAction[o]=u}}},Sr=_r,zo=function(n){w(o,n);var t=O(o);function o(r,u,f,g,m,_){var F;if(d(this,o),V(M(F=t.call(this,m)),f),f!==u&&V(M(F),u),F.timeStamp=_,F.originalEvent=f,F.type=r,F.pointerId=G(u),F.pointerType=H(u),F.target=g,F.currentTarget=null,r==="tap"){var N=m.getPointerIndex(u);F.dt=F.timeStamp-m.pointers[N].downTime;var ee=F.timeStamp-m.tapTime;F.double=!!m.prevTap&&m.prevTap.type!=="doubletap"&&m.prevTap.target===F.target&&ee<500}else r==="doubletap"&&(F.dt=u.timeStamp-m.tapTime,F.double=!0);return F}return v(o,[{key:"_subtractOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX-=u,this.pageY-=f,this.clientX-=u,this.clientY-=f,this}},{key:"_addOrigin",value:function(r){var u=r.x,f=r.y;return this.pageX+=u,this.pageY+=f,this.clientX+=u,this.clientY+=f,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(Fe),ga={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(n){n.pointerEvents=ga,n.defaults.actions.pointerEvents=ga.defaults,ge(n.actions.phaselessTypes,ga.types)},listeners:{"interactions:new":function(n){var t=n.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(n){var t=n.down,o=n.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget;n.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&fo(n),Un({interaction:o,pointer:r,event:u,eventTarget:f,type:"move"},t))},"interactions:down":function(n,t){(function(o,r){for(var u=o.interaction,f=o.pointer,g=o.event,m=o.eventTarget,_=o.pointerIndex,F=u.pointers[_].hold,N=at(m),ee={interaction:u,pointer:f,event:g,eventTarget:m,type:"hold",targets:[],path:N,node:null},xe=0;xe<N.length;xe++){var je=N[xe];ee.node=je,r.fire("pointerEvents:collect-targets",ee)}if(ee.targets.length){for(var $e=1/0,qe=0,rt=ee.targets;qe<rt.length;qe++){var ot=rt[qe].eventable.options.holdDuration;ot<$e&&($e=ot)}F.duration=$e,F.timeout=setTimeout(function(){Un({interaction:u,eventTarget:m,pointer:f,event:g,type:"hold"},r)},$e)}})(n,t),Un(n,t)},"interactions:up":function(n,t){fo(n),Un(n,t),function(o,r){var u=o.interaction,f=o.pointer,g=o.event,m=o.eventTarget;u.pointerWasMoved||Un({interaction:u,eventTarget:m,pointer:f,event:g,type:"tap"},r)}(n,t)},"interactions:cancel":function(n,t){fo(n),Un(n,t)}},PointerEvent:zo,fire:Un,collectEventTargets:Ro,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 Un(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,g=n.type,m=n.targets,_=m===void 0?Ro(n,t):m,F=new zo(g,r,u,f,o,t.now());t.fire("pointerEvents:new",{pointerEvent:F});for(var N={interaction:o,pointer:r,event:u,eventTarget:f,targets:_,type:g,pointerEvent:F},ee=0;ee<_.length;ee++){var xe=_[ee];for(var je in xe.props||{})F[je]=xe.props[je];var $e=ce(xe.eventable,xe.node);if(F._subtractOrigin($e),F.eventable=xe.eventable,F.currentTarget=xe.node,xe.eventable.fire(F),F._addOrigin($e),F.immediatePropagationStopped||F.propagationStopped&&ee+1<_.length&&_[ee+1].node!==F.currentTarget)break}if(t.fire("pointerEvents:fired",N),g==="tap"){var qe=F.double?Un({interaction:o,pointer:r,event:u,eventTarget:f,type:"doubletap"},t):F;o.prevTap=qe,o.tapTime=qe.timeStamp}return F}function Ro(n,t){var o=n.interaction,r=n.pointer,u=n.event,f=n.eventTarget,g=n.type,m=o.getPointerIndex(r),_=o.pointers[m];if(g==="tap"&&(o.pointerWasMoved||!_||_.downTarget!==f))return[];for(var F=at(f),N={interaction:o,pointer:r,event:u,eventTarget:f,type:g,path:F,targets:[],node:null},ee=0;ee<F.length;ee++){var xe=F[ee];N.node=xe,t.fire("pointerEvents:collect-targets",N)}return g==="hold"&&(N.targets=N.targets.filter(function(je){var $e,qe;return je.eventable.options.holdDuration===(($e=o.pointers[m])==null||(qe=$e.hold)==null?void 0:qe.duration)})),N.targets}function fo(n){var t=n.interaction,o=n.pointerIndex,r=t.pointers[o].hold;r&&r.timeout&&(clearTimeout(r.timeout),r.timeout=null)}var Tr=Object.freeze({__proto__:null,default:ga});function Ir(n){var t=n.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Br={id:"pointer-events/holdRepeat",install:function(n){n.usePlugin(ga);var t=n.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=n.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(n,t){return n["pointerEvents:".concat(t)]=Ir,n},{"pointerEvents:new":function(n){var t=n.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(n,t){var o=n.interaction,r=n.pointerEvent,u=n.eventTarget,f=n.targets;if(r.type==="hold"&&f.length){var g=f[0].eventable.options.holdRepeatInterval;g<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:u,type:"hold",pointer:r,event:r},t)},g))}}})},Ar=Br,Nr={id:"pointer-events/interactableTargets",install:function(n){var t=n.Interactable;t.prototype.pointerEvents=function(r){return ge(this.events.options,r),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(r,u){var f=o.call(this,r,u);return f===this&&(this.events.options[r]=u),f}},listeners:{"pointerEvents:collect-targets":function(n,t){var o=n.targets,r=n.node,u=n.type,f=n.eventTarget;t.interactables.forEachMatch(r,function(g){var m=g.events,_=m.options;m.types[u]&&m.types[u].length&&g.testIgnoreAllow(_,r,f)&&o.push({node:r,eventable:m,props:{interactable:g}})})},"interactable:new":function(n){var t=n.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(n,t){var o=n.interactable,r=n.options;ge(o.events.options,t.pointerEvents.defaults),ge(o.events.options,r.pointerEvents||{})}}},Vr=Nr,Or={id:"pointer-events",install:function(n){n.usePlugin(Tr),n.usePlugin(Ar),n.usePlugin(Vr)}},Mr=Or,Pr={id:"reflow",install:function(n){var t=n.Interactable;n.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(r,u,f){for(var g=r.getAllElements(),m=f.window.Promise,_=m?[]:null,F=function(){var ee=g[N],xe=r.getRect(ee);if(!xe)return 1;var je,$e=he(f.interactions.list,function(ot){return ot.interacting()&&ot.interactable===r&&ot.element===ee&&ot.prepared.name===u.name});if($e)$e.move(),_&&(je=$e._reflowPromise||new m(function(ot){$e._reflowResolve=ot}));else{var qe=se(xe),rt=function(ot){return{coords:ot,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}}({page:{x:qe.x,y:qe.y},client:{x:qe.x,y:qe.y},timeStamp:f.now()});je=function(ot,pt,Ct,At,mt){var _t=ot.interactions.new({pointerType:"reflow"}),rn={interaction:_t,event:mt,pointer:mt,eventTarget:Ct,phase:"reflow"};_t.interactable=pt,_t.element=Ct,_t.prevEvent=mt,_t.updatePointer(mt,mt,Ct,!0),y(_t.coords.delta),dt(_t.prepared,At),_t._doPhase(rn);var Kt=ot.window,fn=Kt.Promise,Cn=fn?new fn(function(Pn){_t._reflowResolve=Pn}):void 0;return _t._reflowPromise=Cn,_t.start(At,pt,Ct),_t._interacting?(_t.move(rn),_t.end(mt)):(_t.stop(),_t._reflowResolve()),_t.removePointer(mt,mt),Cn}(f,r,ee,u,rt)}_&&_.push(je)},N=0;N<g.length&&!F();N++);return _&&m.all(_).then(function(){return r})}(this,o,n)}},listeners:{"interactions:stop":function(n,t){var o=n.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(r,u){r.splice(r.indexOf(u),1)}(t.interactions.list,o))}}},zr=Pr;if(Zt.use(Dt),Zt.use(da),Zt.use(Mr),Zt.use(Pa),Zt.use(Sr),Zt.use(Bn),Zt.use(et),Zt.use(kt),Zt.use(zr),Zt.default=Zt,c(a)==="object"&&a)try{a.exports=Zt}catch{}return Zt.default=Zt,Zt})}(ka,ka.exports)),ka.exports}var fd=dd();const sl=la.getDefaultExportFromCjs(fd),ro=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(a,{expose:i,emit:s}){const l=a,c=s,d=e.inject(Gl),b=e.inject(Xl);if(!d)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const v=e.shallowRef(null),h=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let w=!1,E=!1,S=NaN,M=NaN,O=NaN,W=NaN,Ee=-1,Y=-1,$=-1,pe=-1,C=l.x,P=l.y,x=l.w,T=l.h;const I=e.ref(),Q=e.reactive({i:e.toRef(l,"i"),state:h,wrapper:I,calcXY:Ye});function Le(D){Be(D)}function tt(){Je()}function ze(D){hn(l.isDraggable)&&(h.draggable=D)}function We(D){hn(l.isResizable)&&(h.resizable=D)}function De(D){hn(l.isBounded)&&(h.bounded=D)}function A(D){h.transformScale=D}function oe(D){h.rowHeight=D}function ne(D){h.maxRows=D}function me(){h.rtl=rl()==="rtl",Je()}function Xe(D){h.cols=Math.floor(D)}d.increaseItem(Q),e.onBeforeMount(()=>{h.rtl=rl()==="rtl"}),e.onMounted(()=>{d.responsive&&d.lastBreakpoint?h.cols=er(d.lastBreakpoint,d.cols):h.cols=d.colNum,h.rowHeight=d.rowHeight,h.containerWidth=d.width!==null?d.width:100,h.margin=d.margin!==void 0?d.margin.map(Number):[10,10],h.maxRows=d.maxRows,hn(l.isDraggable)?h.draggable=d.isDraggable:h.draggable=l.isDraggable,hn(l.isResizable)?h.resizable=d.isResizable:h.resizable=l.isResizable,hn(l.isBounded)?h.bounded=d.isBounded:h.bounded=l.isBounded,h.transformScale=d.transformScale,h.useCssTransforms=d.useCssTransforms,h.useStyleCursor=d.useStyleCursor,e.watchEffect(()=>{C=l.x,P=l.y,T=l.h,x=l.w,sn(ct)}),b.on("updateWidth",Le),b.on("compact",tt),b.on("setDraggable",ze),b.on("setResizable",We),b.on("setBounded",De),b.on("setTransformScale",A),b.on("setRowHeight",oe),b.on("setMaxRows",ne),b.on("directionchange",me),b.on("setColNum",Xe)}),e.onBeforeUnmount(()=>{b.off("updateWidth",Le),b.off("compact",tt),b.off("setDraggable",ze),b.off("setResizable",We),b.off("setBounded",De),b.off("setTransformScale",A),b.off("setRowHeight",oe),b.off("setMaxRows",ne),b.off("directionchange",me),b.off("setColNum",Xe),v.value&&(v.value.unset(),v.value=null),d.decreaseItem(Q)}),i({state:h,wrapper:I});const nt=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,Pe=e.computed(()=>h.resizable&&!l.static),j=e.computed(()=>d.isMirrored?!h.rtl:h.rtl),Qe=e.computed(()=>(h.draggable||h.resizable)&&!l.static),Ke=od("item"),vt=e.computed(()=>({[Ke.b()]:!0,[Ke.bm("resizable")]:Pe.value,[Ke.bm("static")]:l.static,[Ke.bm("resizing")]:h.isResizing,[Ke.bm("dragging")]:h.isDragging,[Ke.bm("transform")]:h.useCssTransforms,[Ke.bm("rtl")]:j.value,[Ke.bm("no-touch")]:nt&&Qe.value})),yt=e.computed(()=>[Ke.be("resizer"),j.value&&Ke.bem("resizer","rtl")].filter(Boolean));e.watch(()=>l.isDraggable,D=>{h.draggable=D}),e.watch(()=>l.static,()=>{sn(V),sn(y)}),e.watch(()=>h.draggable,()=>{sn(V)}),e.watch(()=>l.isResizable,D=>{h.resizable=D}),e.watch(()=>l.isBounded,D=>{h.bounded=D}),e.watch(()=>h.resizable,()=>{sn(y)}),e.watch(()=>h.rowHeight,()=>{sn(ct),sn(at)}),e.watch([()=>h.cols,()=>h.containerWidth],()=>{sn(y),sn(ct),sn(at)}),e.watch([()=>l.minH,()=>l.maxH,()=>l.minW,()=>l.maxW],()=>{sn(y)}),e.watch(j,()=>{sn(y),sn(ct)}),e.watch([()=>d.margin,()=>d.margin[0],()=>d.margin[1]],()=>{const D=d.margin;!D||D[0]===h.margin[0]&&D[1]===h.margin[1]||(h.margin=D.map(Number),sn(ct),sn(at))});function ct(){l.x+l.w>h.cols?(C=0,x=l.w>h.cols?h.cols:l.w):(C=l.x,x=l.w);const D=be(C,P,x,T);h.isDragging&&(D.top=h.dragging.top,j.value?D.right=h.dragging.left:D.left=h.dragging.left),h.isResizing&&(D.width=h.resizing.width,D.height=h.resizing.height);let q;h.useCssTransforms?j.value?q=ed(D.top,D.right,D.width,D.height):q=Qp(D.top,D.left,D.width,D.height):j.value?q=nd(D.top,D.right,D.width,D.height):q=td(D.top,D.left,D.width,D.height),h.style=q}function at(){const D={};for(const q of["width","height"]){const X=h.style[q].match(/^(\d+)px$/);if(!X)return;D[q]=X[1]}c("container-resized",l.i,l.h,l.w,D.height,D.width)}function St(D){if(l.static)return;const q=D.type;if(q==="resizestart"&&h.isResizing||q!=="resizestart"&&!h.isResizing)return;const X=ol(D);if(hn(X))return;const{x:G,y:J}=X,de={width:0,height:0};let K;switch(q){case"resizestart":{y(),Ee=x,Y=T,K=be(C,P,x,T),de.width=K.width,de.height=K.height,h.resizing=de,h.isResizing=!0;break}case"resizemove":{!D.edges.right&&!D.edges.left&&(O=G),!D.edges.top&&!D.edges.bottom&&(W=J);const _e=ll(O,W,G,J);j.value?de.width=h.resizing.width-_e.deltaX/h.transformScale:de.width=h.resizing.width+_e.deltaX/h.transformScale,de.height=h.resizing.height+_e.deltaY/h.transformScale,h.resizing=de;break}case"resizeend":{K=be(C,P,x,T),de.width=K.width,de.height=K.height,h.resizing={width:-1,height:-1},h.isResizing=!1;break}}K=ce(de.height,de.width),K.w<l.minW&&(K.w=l.minW),K.w>l.maxW&&(K.w=l.maxW),K.h<l.minH&&(K.h=l.minH),K.h>l.maxH&&(K.h=l.maxH),K.h<1&&(K.h=1),K.w<1&&(K.w=1),O=G,W=J,(x!==K.w||T!==K.h)&&c("resize",l.i,K.h,K.w,de.height,de.width),D.type==="resizeend"&&(Ee!==x||Y!==T)&&c("resized",l.i,K.h,K.w,de.height,de.width),b.emit("resizeEvent",D.type,l.i,C,P,K.h,K.w)}function ge(D){if(l.static||h.isResizing)return;const q=D.type;if(q==="dragstart"&&h.isDragging||q!=="dragstart"&&!h.isDragging)return;const X=ol(D);if(hn(X))return;const{x:G,y:J}=X,de=D.target;if(!de.offsetParent)return;const K={top:0,left:0};switch(q){case"dragstart":{$=C,pe=P;const ke=de.offsetParent.getBoundingClientRect(),ae=de.getBoundingClientRect(),H=ae.left/h.transformScale,le=ke.left/h.transformScale,Fe=ae.right/h.transformScale,ye=ke.right/h.transformScale,Ge=ae.top/h.transformScale,z=ke.top/h.transformScale;j.value?K.left=(Fe-ye)*-1:K.left=H-le,K.top=Ge-z,h.dragging=K,h.isDragging=!0;break}case"dragmove":{const ke=ll(S,M,G,J);if(j.value?K.left=h.dragging.left-ke.deltaX/h.transformScale:K.left=h.dragging.left+ke.deltaX/h.transformScale,K.top=h.dragging.top+ke.deltaY/h.transformScale,h.bounded){const ae=de.offsetParent.clientHeight-se(l.h,h.rowHeight,h.margin[1]);K.top=te(K.top,0,ae);const H=Ae(),le=h.containerWidth-se(l.w,H,h.margin[0]);K.left=te(K.left,0,le)}h.dragging=K;break}case"dragend":{const ke=de.offsetParent.getBoundingClientRect(),ae=de.getBoundingClientRect(),H=ae.left/h.transformScale,le=ke.left/h.transformScale,Fe=ae.right/h.transformScale,ye=ke.right/h.transformScale,Ge=ae.top/h.transformScale,z=ke.top/h.transformScale;j.value?K.left=(Fe-ye)*-1:K.left=H-le,K.top=Ge-z,h.dragging={top:-1,left:-1},h.isDragging=!1;break}}let _e;j.value,_e=Ye(K.top,K.left),S=G,M=J,(C!==_e.x||P!==_e.y)&&c("move",l.i,_e.x,_e.y),D.type==="dragend"&&($!==C||pe!==P)&&c("moved",l.i,_e.x,_e.y),b.emit("dragEvent",D.type,l.i,_e.x,_e.y,T,x)}function be(D,q,X,G){const J=Ae();let de;return j.value?de={right:Math.round(J*D+(D+1)*h.margin[0]),top:Math.round(h.rowHeight*q+(q+1)*h.margin[1]),width:X===1/0?X:Math.round(J*X+Math.max(0,X-1)*h.margin[0]),height:G===1/0?G:Math.round(h.rowHeight*G+Math.max(0,G-1)*h.margin[1])}:de={left:Math.round(J*D+(D+1)*h.margin[0]),top:Math.round(h.rowHeight*q+(q+1)*h.margin[1]),width:X===1/0?X:Math.round(J*X+Math.max(0,X-1)*h.margin[0]),height:G===1/0?G:Math.round(h.rowHeight*G+Math.max(0,G-1)*h.margin[1])},de}function Ye(D,q){const X=Ae();let G=Math.round((q-h.margin[0])/(X+h.margin[0])),J=Math.round((D-h.margin[1])/(h.rowHeight+h.margin[1]));return G=Math.max(Math.min(G,h.cols-x),0),J=Math.max(Math.min(J,h.maxRows-T),0),{x:G,y:J}}function Ae(){return(h.containerWidth-h.margin[0]*(h.cols+1))/h.cols}function se(D,q,X){return Number.isFinite(D)?Math.round(q*D+Math.max(0,D-1)*X):D}function te(D,q,X){return Math.max(Math.min(D,X),q)}function ce(D,q,X=!1){const G=Ae();let J=Math.round((q+h.margin[0])/(G+h.margin[0])),de=0;return X?de=Math.ceil((D+h.margin[1])/(h.rowHeight+h.margin[1])):de=Math.round((D+h.margin[1])/(h.rowHeight+h.margin[1])),J=Math.max(Math.min(J,h.cols-C),0),de=Math.max(Math.min(de,h.maxRows-P),0),{w:J,h:de}}function Be(D,q){h.containerWidth=D}function Je(){ct()}function ut(){!v.value&&I.value&&(v.value=sl(I.value),h.useStyleCursor||v.value.styleCursor(!1))}const k=tl(ge);function V(){if(ut(),!!v.value)if(h.draggable&&!l.static){const D={ignoreFrom:l.dragIgnoreFrom,allowFrom:l.dragAllowFrom,...l.dragOption};v.value.draggable(D),w||(w=!0,v.value.on("dragstart dragmove dragend",q=>{q.type==="dragmove"?k(q):ge(q)}))}else v.value.draggable({enabled:!1})}const U=tl(St);function y(){if(ut(),!!v.value)if(h.resizable&&!l.static){const D=be(0,0,l.maxW,l.maxH),q=be(0,0,l.minW,l.minH),X={edges:{left:j.value?`.${yt.value[0]}`:!1,right:j.value?!1:`.${yt.value[0]}`,bottom:`.${yt.value[0]}`,top:!1},ignoreFrom:l.resizeIgnoreFrom,restrictSize:{min:{height:q.height*h.transformScale,width:q.width*h.transformScale},max:{height:D.height*h.transformScale,width:D.width*h.transformScale}},...l.resizeOption};l.preserveAspectRatio&&(X.modifiers=[sl.modifiers.aspectRatio({ratio:"preserve"})]),v.value.resizable(X),E||(E=!0,v.value.on("resizestart resizemove resizeend",G=>{G.type==="resizemove"?U(G):St(G)}))}else v.value.resizable({enabled:!1})}return(D,q)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:I,class:e.normalizeClass(vt.value),style:e.normalizeStyle(h.style)},[e.renderSlot(D.$slots,"default"),Pe.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(yt.value)},null,2)):e.createCommentVNode("",!0)],6))}}),Qn=typeof window<"u";var cl;Qn&&(cl=window==null?void 0:window.navigator)!=null&&cl.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ul(a){return a!=null}function pl(){}const hd=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"});Object.freeze(new Set(Object.keys(hd)));const vd=Qn&&("ontouchstart"in window||md()>0),gd=vd?"pointerdown":"click";function md(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function yd(a,i,s=window.Event){const{type:l,bubbles:c=!1,cancelable:d=!1,...b}=i;if(!ul(l)||l==="")return!1;let v;return ul(s)?v=new s(l,{bubbles:c,cancelable:d}):(v=document.createEvent("HTMLEvents"),v.initEvent(l,c,d)),Object.assign(v,b),a.dispatchEvent(v)}const bd="clickoutside",kd=new Set;Qn&&document.addEventListener(gd,a=>{const i=a.target,s=a.composedPath&&a.composedPath();kd.forEach(l=>{l!==i&&(s?!s.includes(l):!l.contains(i))&&(!l.__transferElement||l.__transferElement!==i&&!l.__transferElement.contains(i))&&yd(l,{type:bd})})},!0);const xd=[["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 Qa;if(Qn){for(const a of xd)if(a[1]in document){Qa=a;break}}e.computed(()=>!1);const wd=new Set,Dd=new WeakMap;if(Qn&&Qa){const a=Qa[2],i=Qa[4];document.addEventListener(i,()=>{if(wd.forEach(s=>{s.value=!1}),document[a]){const s=Dd.get(document[a]);s&&(s.value=!0)}},!1)}const nr=new Map;nr.set("x",0);nr.set("y",0);var Yn=[],Cd=function(){return Yn.some(function(a){return a.activeTargets.length>0})},Ed=function(){return Yn.some(function(a){return a.skippedTargets.length>0})},dl="ResizeObserver loop completed with undelivered notifications.",_d=function(){var a;typeof ErrorEvent=="function"?a=new ErrorEvent("error",{message:dl}):(a=document.createEvent("Event"),a.initEvent("error",!1,!1),a.message=dl),window.dispatchEvent(a)},Sa;(function(a){a.BORDER_BOX="border-box",a.CONTENT_BOX="content-box",a.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Sa||(Sa={}));var Jn=function(a){return Object.freeze(a)},Sd=function(){function a(i,s){this.inlineSize=i,this.blockSize=s,Jn(this)}return a}(),ar=function(){function a(i,s,l,c){return this.x=i,this.y=s,this.width=l,this.height=c,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Jn(this)}return a.prototype.toJSON=function(){var i=this,s=i.x,l=i.y,c=i.top,d=i.right,b=i.bottom,v=i.left,h=i.width,w=i.height;return{x:s,y:l,top:c,right:d,bottom:b,left:v,width:h,height:w}},a.fromRect=function(i){return new a(i.x,i.y,i.width,i.height)},a}(),No=function(a){return a instanceof SVGElement&&"getBBox"in a},or=function(a){if(No(a)){var i=a.getBBox(),s=i.width,l=i.height;return!s&&!l}var c=a,d=c.offsetWidth,b=c.offsetHeight;return!(d||b||a.getClientRects().length)},fl=function(a){var i;if(a instanceof Element)return!0;var s=(i=a==null?void 0:a.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&a instanceof s.Element)},Td=function(a){switch(a.tagName){case"INPUT":if(a.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Ca=typeof window<"u"?window:{},Ga=new WeakMap,hl=/auto|scroll/,Id=/^tb|vertical/,Bd=/msie|trident/i.test(Ca.navigator&&Ca.navigator.userAgent),Nn=function(a){return parseFloat(a||"0")},ia=function(a,i,s){return a===void 0&&(a=0),i===void 0&&(i=0),s===void 0&&(s=!1),new Sd((s?i:a)||0,(s?a:i)||0)},vl=Jn({devicePixelContentBoxSize:ia(),borderBoxSize:ia(),contentBoxSize:ia(),contentRect:new ar(0,0,0,0)}),lr=function(a,i){if(i===void 0&&(i=!1),Ga.has(a)&&!i)return Ga.get(a);if(or(a))return Ga.set(a,vl),vl;var s=getComputedStyle(a),l=No(a)&&a.ownerSVGElement&&a.getBBox(),c=!Bd&&s.boxSizing==="border-box",d=Id.test(s.writingMode||""),b=!l&&hl.test(s.overflowY||""),v=!l&&hl.test(s.overflowX||""),h=l?0:Nn(s.paddingTop),w=l?0:Nn(s.paddingRight),E=l?0:Nn(s.paddingBottom),S=l?0:Nn(s.paddingLeft),M=l?0:Nn(s.borderTopWidth),O=l?0:Nn(s.borderRightWidth),W=l?0:Nn(s.borderBottomWidth),Ee=l?0:Nn(s.borderLeftWidth),Y=S+w,$=h+E,pe=Ee+O,C=M+W,P=v?a.offsetHeight-C-a.clientHeight:0,x=b?a.offsetWidth-pe-a.clientWidth:0,T=c?Y+pe:0,I=c?$+C:0,Q=l?l.width:Nn(s.width)-T-x,Le=l?l.height:Nn(s.height)-I-P,tt=Q+Y+x+pe,ze=Le+$+P+C,We=Jn({devicePixelContentBoxSize:ia(Math.round(Q*devicePixelRatio),Math.round(Le*devicePixelRatio),d),borderBoxSize:ia(tt,ze,d),contentBoxSize:ia(Q,Le,d),contentRect:new ar(S,h,Q,Le)});return Ga.set(a,We),We},rr=function(a,i,s){var l=lr(a,s),c=l.borderBoxSize,d=l.contentBoxSize,b=l.devicePixelContentBoxSize;switch(i){case Sa.DEVICE_PIXEL_CONTENT_BOX:return b;case Sa.BORDER_BOX:return c;default:return d}},Ad=function(){function a(i){var s=lr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=Jn([s.borderBoxSize]),this.contentBoxSize=Jn([s.contentBoxSize]),this.devicePixelContentBoxSize=Jn([s.devicePixelContentBoxSize])}return a}(),ir=function(a){if(or(a))return 1/0;for(var i=0,s=a.parentNode;s;)i+=1,s=s.parentNode;return i},Nd=function(){var a=1/0,i=[];Yn.forEach(function(d){if(d.activeTargets.length!==0){var b=[];d.activeTargets.forEach(function(v){var h=new Ad(v.target),w=ir(v.target);b.push(h),v.lastReportedSize=rr(v.target,v.observedBox),w<a&&(a=w)}),i.push(function(){d.callback.call(d.observer,b,d.observer)}),d.activeTargets.splice(0,d.activeTargets.length)}});for(var s=0,l=i;s<l.length;s++){var c=l[s];c()}return a},gl=function(a){Yn.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(ir(s.target)>a?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Vd=function(){var a=0;for(gl(a);Cd();)a=Nd(),gl(a);return Ed()&&_d(),a>0},go,sr=[],Od=function(){return sr.splice(0).forEach(function(a){return a()})},Md=function(a){if(!go){var i=0,s=document.createTextNode(""),l={characterData:!0};new MutationObserver(function(){return Od()}).observe(s,l),go=function(){s.textContent="".concat(i?i--:i++)}}sr.push(a),go()},Pd=function(a){Md(function(){requestAnimationFrame(a)})},eo=0,zd=function(){return!!eo},Rd=250,Ld={attributes:!0,characterData:!0,childList:!0,subtree:!0},ml=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],yl=function(a){return a===void 0&&(a=0),Date.now()+a},mo=!1,Fd=function(){function a(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return a.prototype.run=function(i){var s=this;if(i===void 0&&(i=Rd),!mo){mo=!0;var l=yl(i);Pd(function(){var c=!1;try{c=Vd()}finally{if(mo=!1,i=l-yl(),!zd())return;c?s.run(1e3):i>0?s.run(i):s.start()}})}},a.prototype.schedule=function(){this.stop(),this.run()},a.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Ld)};document.body?s():Ca.addEventListener("DOMContentLoaded",s)},a.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ml.forEach(function(s){return Ca.addEventListener(s,i.listener,!0)}))},a.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ml.forEach(function(s){return Ca.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},a}(),wo=new Fd,bl=function(a){!eo&&a>0&&wo.start(),eo+=a,!eo&&wo.stop()},$d=function(a){return!No(a)&&!Td(a)&&getComputedStyle(a).display==="inline"},jd=function(){function a(i,s){this.target=i,this.observedBox=s||Sa.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return a.prototype.isActive=function(){var i=rr(this.target,this.observedBox,!0);return $d(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},a}(),Ud=function(){function a(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return a}(),Xa=new WeakMap,kl=function(a,i){for(var s=0;s<a.length;s+=1)if(a[s].target===i)return s;return-1},Ya=function(){function a(){}return a.connect=function(i,s){var l=new Ud(i,s);Xa.set(i,l)},a.observe=function(i,s,l){var c=Xa.get(i),d=c.observationTargets.length===0;kl(c.observationTargets,s)<0&&(d&&Yn.push(c),c.observationTargets.push(new jd(s,l&&l.box)),bl(1),wo.schedule())},a.unobserve=function(i,s){var l=Xa.get(i),c=kl(l.observationTargets,s),d=l.observationTargets.length===1;c>=0&&(d&&Yn.splice(Yn.indexOf(l),1),l.observationTargets.splice(c,1),bl(-1))},a.disconnect=function(i){var s=this,l=Xa.get(i);l.observationTargets.slice().forEach(function(c){return s.unobserve(i,c.target)}),l.activeTargets.splice(0,l.activeTargets.length)},a}(),Kd=function(){function a(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.");Ya.connect(this,i)}return a.prototype.observe=function(i,s){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!fl(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Ya.observe(this,i,s)},a.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(!fl(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Ya.unobserve(this,i)},a.prototype.disconnect=function(){Ya.disconnect(this)},a.toString=function(){return"function ResizeObserver () { [polyfill code] }"},a}();const io=new WeakMap;function Wd(a){var i;for(let s=0,l=a.length;s<l;++s){const c=a[s],d=io.get(c.target);if(typeof d=="function"){const{inlineSize:b,blockSize:v}=((i=c.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:h,offsetHeight:w}=c.target;d(Object.assign(c,{offsetWidth:h,offsetHeight:w,width:b??h,height:v??w}))}}}const cr=new(Qn&&window.ResizeObserver||Kd)(Wd);function xl(a,i){io.set(a,i),cr.observe(a)}function wl(a){io.has(a)&&(cr.unobserve(a),io.delete(a))}function Hd(a={}){let i=pl;const s=e.watch(()=>e.unref(a.target),c=>{i(),!(!c||typeof a.onResize!="function")&&(xl(c,a.onResize),i=()=>{wl(c),i=pl})},{immediate:!0}),l=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(l),{observeResize:xl,unobserveResize:wl,unobserve:l}}const qd=e.ref(!1);e.computed(()=>qd.value);const Dl="__theme_style__",yo="__theme_observer__",Cl=e.reactive(new Map),El=new Map;e.watch(Cl,()=>{if(!Qn)return;El.clear();const a=document.head.querySelector(`#${Dl}`);a&&document.head.removeChild(a);const i=document.createElement("style");let s=`.${yo} { width: 1px }`,l=1;for(const[c,[d,b]]of Cl.entries())s+=` html.${d} .${yo}, .${b} .${yo} { width: ${++l}px }`,El.set(l,c);i.textContent=s,i.id=Dl,document.head.appendChild(i)});const ur=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(a,{expose:i,emit:s}){const l=a,c=s,d=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),b=new Map,v=e.ref(l.layout),h=e.ref(),{observeResize:w,unobserveResize:E}=Hd(),S=Hp();S.on("resizeEvent",M),S.on("dragEvent",O),e.onBeforeMount(()=>{c("layout-before-mount",v.value)}),e.onMounted(()=>{c("layout-mounted",v.value),e.nextTick(()=>{ad(v.value),d.originalLayout=v.value,e.nextTick(()=>{Le(),h.value&&w(h.value,qp(C,16)),aa(v.value,l.verticalCompact),c("layout-updated",v.value),pe(),C()})})}),e.onBeforeUnmount(()=>{S.clearAll(),h.value&&E(h.value)});function M(ze,We,De,A,oe,ne){I(ze,We,De,A,oe,ne)}function O(ze,We,De,A,oe,ne){T(ze,We,De,A,oe,ne)}e.watch(()=>d.width,(ze,We)=>{e.nextTick(()=>{S.emit("updateWidth",ze),We===-1&&e.nextTick(()=>{c("layout-ready",v.value)}),pe()})}),e.watch(()=>[l.layout,l.layout.length],()=>{v.value=l.layout,$()}),e.watch(()=>l.colNum,ze=>{S.emit("setColNum",ze)}),e.watch(()=>l.rowHeight,ze=>{S.emit("setRowHeight",ze)}),e.watch(()=>l.isDraggable,ze=>{S.emit("setDraggable",ze)}),e.watch(()=>l.isResizable,ze=>{S.emit("setResizable",ze)}),e.watch(()=>l.isBounded,ze=>{S.emit("setBounded",ze)}),e.watch(()=>l.transformScale,ze=>{S.emit("setTransformScale",ze)}),e.watch(()=>l.responsive,ze=>{ze||(c("update:layout",d.originalLayout),S.emit("setColNum",l.colNum)),C()}),e.watch(()=>l.maxRows,ze=>{S.emit("setMaxRows",ze)}),e.watch([()=>l.margin,()=>l.margin[1]],pe),e.provide(Gl,e.reactive({...e.toRefs(l),...e.toRefs(d),increaseItem:W,decreaseItem:Ee})),e.provide(Xl,S),i({state:d,getItem:Y,resizeEvent:I,dragEvent:T,layoutUpdate:$});function W(ze){b.set(ze.i,ze)}function Ee(ze){b.delete(ze.i)}function Y(ze){return b.get(ze)}function $(){if(!hn(v.value)&&!hn(d.originalLayout)){if(v.value.length!==d.originalLayout.length){const ze=tt(v.value,d.originalLayout);if(ze.length>0)if(v.value.length>d.originalLayout.length)d.originalLayout=d.originalLayout.concat(ze);else{const We=new Set(ze.map(De=>De.i));d.originalLayout=d.originalLayout.filter(De=>!We.has(De.i))}d.lastLayoutLength=v.value.length,Le()}aa(v.value,l.verticalCompact),S.emit("updateWidth",d.width),pe(),c("layout-updated",v.value)}}function pe(){d.mergedStyle={height:P()}}function C(){h.value&&(d.width=h.value.offsetWidth),S.emit("resizeEvent")}function P(){if(!l.autoSize)return;const ze=parseFloat(l.margin[1]);return Xp(v.value)*(l.rowHeight+ze)+ze+"px"}let x;function T(ze,We,De,A,oe,ne){let me=nl(v.value,We);hn(me)&&(me={h:0,w:0,x:0,y:0,i:""}),ze==="dragstart"&&!l.verticalCompact&&(x=v.value.reduce((Xe,{i:nt,x:Pe,y:j})=>({...Xe,[nt]:{x:Pe,y:j}}),{})),ze==="dragmove"||ze==="dragstart"?(d.placeholder.i=We,d.placeholder.x=me.x,d.placeholder.y=me.y,d.placeholder.w=ne,d.placeholder.h=oe,e.nextTick(()=>{d.isDragging=!0}),S.emit("updateWidth",d.width)):e.nextTick(()=>{d.isDragging=!1}),v.value=xo(v.value,me,De,A,!0,l.preventCollision),l.restoreOnDrag?(me.static=!0,aa(v.value,l.verticalCompact,x),me.static=!1):aa(v.value,l.verticalCompact),S.emit("compact"),pe(),ze==="dragend"&&(x=void 0,c("layout-updated",v.value))}function I(ze,We,De,A,oe,ne){let me=nl(v.value,We);hn(me)&&(me={h:0,w:0,x:0,y:0,i:""});let Xe;if(l.preventCollision){const nt=Jl(v.value,{...me,w:ne,h:oe}).filter(Pe=>Pe.i!==me.i);if(Xe=nt.length>0,Xe){let Pe=1/0,j=1/0;nt.forEach(Qe=>{Qe.x>me.x&&(Pe=Math.min(Pe,Qe.x)),Qe.y>me.y&&(j=Math.min(j,Qe.y))}),Number.isFinite(Pe)&&(me.w=Pe-me.x),Number.isFinite(j)&&(me.h=j-me.y)}}Xe||(me.w=ne,me.h=oe),ze==="resizestart"||ze==="resizemove"?(d.placeholder.i=We,d.placeholder.x=De,d.placeholder.y=A,d.placeholder.w=me.w,d.placeholder.h=me.h,e.nextTick(()=>{d.isDragging=!0}),S.emit("updateWidth",d.width)):ze&&e.nextTick(()=>{d.isDragging=!1}),l.responsive&&Q(),aa(v.value,l.verticalCompact),S.emit("compact"),pe(),ze==="resizeend"&&c("layout-updated",v.value)}function Q(){const ze=id(l.breakpoints,d.width);if(ze===d.lastBreakpoint)return;const We=er(ze,l.cols);!hn(d.lastBreakpoint)&&!d.layouts[d.lastBreakpoint]&&(d.layouts[d.lastBreakpoint]=ko(v.value));const De=sd(d.originalLayout,d.layouts,l.breakpoints,ze,d.lastBreakpoint,We,l.verticalCompact);d.layouts[ze]=De,d.lastBreakpoint!==ze&&c("breakpoint-changed",ze,De),v.value=De,c("update:layout",De),d.lastBreakpoint=ze,S.emit("setColNum",We)}function Le(){d.layouts=Object.assign({},l.responsiveLayouts)}function tt(ze,We){const De=new Set(We.map(me=>me.i)),A=new Set(ze.map(me=>me.i)),oe=ze.filter(me=>!De.has(me.i)),ne=We.filter(me=>!A.has(me.i));return oe.concat(ne)}return(ze,We)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:h,class:"vgl-layout",style:e.normalizeStyle(d.mergedStyle)},[ze.$slots.default?e.renderSlot(ze.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value,De=>(e.openBlock(),e.createBlock(ro,e.mergeProps({key:De.i,ref_for:!0},De),{default:e.withCtx(()=>[e.renderSlot(ze.$slots,"item",{item:De})]),_:2},1040))),128)),e.withDirectives(e.createVNode(ro,{class:"vgl-item--placeholder",x:d.placeholder.x,y:d.placeholder.y,w:d.placeholder.w,h:d.placeholder.h,i:d.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,d.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(a)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Gd={key:0,class:"item-view-group"},Xd=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(a,{emit:i}){const s=Te.useModelComp(p.pinia),{isEdit:l}=p.storeToRefs(s),c=i,d=a,b=e.computed(()=>d==null?void 0:d.children),v=e.computed(()=>{var S,M,O,W;return((S=d==null?void 0:d.children)==null?void 0:S.length)>0&&((M=d==null?void 0:d.children)!=null&&M.every(Ee=>Ee==null?void 0:Ee.layout))?(W=(O=d==null?void 0:d.children)==null?void 0:O[0])==null?void 0:W.layout:"vertical"}),h=e.ref((d==null?void 0:d.level)+1),w=S=>{c("rowClick",S)},E=(S,M)=>{c("routeUrl",S,M)};return(S,M)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(e.unref(ur),{layout:b.value,"onUpdate:layout":M[0]||(M[0]=O=>b.value=O),"is-draggable":e.unref(l)==="edit","is-resizable":e.unref(l)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(O,W)=>(e.openBlock(),e.createBlock(e.unref(ro),{key:O.i,x:O.x,y:O.y,"min-h":O.minH,"max-h":O.maxH,"min-w":O.minW,w:O.w,h:O.h,i:O.i},{default:e.withCtx(()=>{var Ee,Y,$,pe,C,P,x,T,I,Q,Le,tt,ze;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:W===((Ee=d==null?void 0:d.children)==null?void 0:Ee.length)-1?"0px":"24px"})},[(($=(Y=O==null?void 0:O.component)==null?void 0:Y.comp)==null?void 0:$.toUpperCase())!=="TABLE"&&((pe=O==null?void 0:O.component)!=null&&pe.name)?(e.openBlock(),e.createElementBlock("div",Gd,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(h.value.toString())>1?"0px":"8px",fontWeight:600-(h.value-1)*100>=400?600-(h.value-1)*100:400,fontSize:17-h.value>=14?17-h.value+"px":"14px"})},e.toDisplayString((C=O==null?void 0:O.component)==null?void 0:C.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(_o)((P=O==null?void 0:O.component)==null?void 0:P.comp)),{pageLayout:v.value,config:{showIndex:(x=e.unref(It)[W])==null?void 0:x.showIndex,allowMove:(T=e.unref(It)[W])==null?void 0:T.allowMove,viewport:(I=e.unref(It)[W])==null?void 0:I.viewport},compName:O==null?void 0:O.component.name,compNames:e.unref(Bo),itemData:(Q=O==null?void 0:O.component)==null?void 0:Q.compData,childItemData:(Le=O==null?void 0:O.component)==null?void 0:Le.itemChildData,key:e.unref(Ea),cacheNewData:e.unref(lo),onChange:e.unref(So),index:(O==null?void 0:O.id)??W,onContentChange:e.unref(To),onPageChange:e.unref(Io),parentTableId:(tt=O==null?void 0:O.component)==null?void 0:tt.tableId,allMapContents:e.unref(Eo),children:(ze=O==null?void 0:O.component)==null?void 0:ze.children,level:h.value,onRowClick:w,onRouteUrl:E,onClickTrigger:e.unref($l),onClickMainKey:e.unref(jl)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])]))}}),Yd=Lt._export_sfc(Xd,[["__scopeId","data-v-6e5a155a"]]),pr=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"}]),Jd={TABLE:oa.ssTable,FORM:Uo,TABLEOPERATE:os,TABLESTYLE:ks,TABLEEXTEND:ws,TABLEINTERACTION:Es,FORMOPERATE:Ko,FOLD:tc,CALCULATOR:ic,METHODBUTTON:Dc,AVATARUPLOAD:Fo.ssAvatar,SIGNATURE:Fo.ssSignature,FORMTOP:Uo,STEP:Mc,STEPOPERATE:Hs,TIMELINE:$c,TIMELINEOPERATE:Zs,FORMTOPOPERATE:Ko,SIGNATUREOPERATE:Nc,AVATARUPLOADOPERATE:_c,TABS:Kc,TABSOPERATE:Iu,CHART:Uu,CHARTOPERATE:ep,LAYOUT:Op,LAYOUTOPERATE:Up,PARENTITEM:Yd};function sa(a){return Jd[a==null?void 0:a.toUpperCase()]||null}exports.De=ur;exports.activeStepInfo=ra;exports.affixItems=gp;exports.allMapContents=Eo;exports.cacheNewData=lo;exports.checkForTableContents=hc;exports.checkIsShowGroup=sc;exports.checkIsShowGroupForm=cc;exports.checkIsShowTable=dc;exports.clickMainKey=jl;exports.clickSavePage=vp;exports.clickStep=Kl;exports.clickTrigger=$l;exports.compId=Ea;exports.compNames=Bo;exports.compShow=oo;exports.contentTransArray=ya;exports.contentTransArrayToAll=xa;exports.contentTransArrayToAllNoExtra=bo;exports.debounce=Do;exports.existLayouts=Ep;exports.formToExtraContent=fc;exports.generateLayouts=gs;exports.getComponent=sa;exports.getComponents=_o;exports.getExtraContents=gc;exports.getSliceContLength=Ip;exports.gridRowHeight=ps;exports.isStepLayout=Ao;exports.isUndefined=Tl;exports.newContentTransArrayToAllNoExtra=pc;exports.onBack=fp;exports.onChange=So;exports.onClick=hp;exports.onContentChange=To;exports.onExtendTaskEnd=Cp;exports.onPageBack=_p;exports.onPageChange=Io;exports.onSaveBack=Pl;exports.onSelectFixContent=dp;exports.renderShowItems=Rl;exports.showItems=It;exports.sliceTableLength=Ll;exports.slotContent=pr;exports.st=ro;exports.stepItems=Bp;exports.toolBar=Ln;exports.verifyButton=Sp;
|