ss-component-new 1.2.261 → 1.2.263

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.
Files changed (87) hide show
  1. package/dist/{MTLLoader-CYmAr1Hu.cjs → MTLLoader-BV5SUzmG.cjs} +1 -1
  2. package/dist/{MTLLoader-C245YB7a.js → MTLLoader-C60D0af6.js} +1 -1
  3. package/dist/{OrbitControls-CgpbusUT.js → OrbitControls-DiLJkuyu.js} +1 -1
  4. package/dist/{OrbitControls-BIkLIikf.cjs → OrbitControls-Dr_tJ4fZ.cjs} +1 -1
  5. package/dist/{URDFLoader-CKxg-TKF.js → URDFLoader-Cbui5CYq.js} +2 -2
  6. package/dist/{URDFLoader-CBs700OQ.cjs → URDFLoader-DglI0gl1.cjs} +1 -1
  7. package/dist/{animationData-Cfp2CIii.js → animationData-BS1KOggN.js} +1 -1
  8. package/dist/{animationData-u8gzeOzI.cjs → animationData-DAhPTTyV.cjs} +1 -1
  9. package/dist/{array-DtOCgsMJ.js → array-DQ3w0Sej.js} +1 -1
  10. package/dist/{array-DxmmIzG0.cjs → array-DV4Y5Qdq.cjs} +1 -1
  11. package/dist/{iconfont-C9Kc0DGF.js → iconfont-C0xSkmDm.js} +2 -2
  12. package/dist/{iconfont-CMh15h5f.cjs → iconfont-DFcKl5Tl.cjs} +1 -1
  13. package/dist/{index-CZdcobYs.js → index-0r9vJ4Dt.js} +4 -4
  14. package/dist/{index-CamRKKJN.cjs → index-0yP57X4c.cjs} +1 -1
  15. package/dist/{index-D4cnfAlY.js → index-5mUNsn1w.js} +7 -7
  16. package/dist/{index-CxJVoJTn.cjs → index-5ouuNlF1.cjs} +1 -1
  17. package/dist/{index-BtyUih-J.js → index-6JiENohi.js} +1 -1
  18. package/dist/{index-D3Bw7PIE.js → index-7t6O2kDd.js} +1 -1
  19. package/dist/{index-Dn2djkJk.cjs → index-BDHuCtb0.cjs} +1 -1
  20. package/dist/{index-DB3v8iRn.cjs → index-BTXISKif.cjs} +1 -1
  21. package/dist/{index-BaXQQWXT.cjs → index-BoT93rBf.cjs} +1 -1
  22. package/dist/{index-681BYwjT.js → index-Bp_tXnME.js} +4 -4
  23. package/dist/{index-Bj8tXTbv.cjs → index-BupiwS6Q.cjs} +1 -1
  24. package/dist/{index-eI_w6PXT.cjs → index-Bw9Yt-ff.cjs} +1 -1
  25. package/dist/{index-B9_F5Al3.js → index-BzyaLKAO.js} +1 -1
  26. package/dist/{index-DyoBXbcl.cjs → index-C4a_MPf7.cjs} +1 -1
  27. package/dist/{index-B6pgDwkd.js → index-C8BME0nI.js} +1 -1
  28. package/dist/{index-CjpctHsD.js → index-C8cUTV0K.js} +8 -8
  29. package/dist/{index-COif05bF.cjs → index-CB_H_0Ax.cjs} +1 -1
  30. package/dist/{index-D2nSdA8F.js → index-CCf7B4w5.js} +1 -1
  31. package/dist/{index-COECU96d.cjs → index-CGRBbwNI.cjs} +1 -1
  32. package/dist/{index-BwFEk7V_.js → index-CcFw88ze.js} +1 -1
  33. package/dist/{index-Cd3qAxFo.cjs → index-Cf8awUVC.cjs} +1 -1
  34. package/dist/{index-BqeX5bms.js → index-CorDLjba.js} +3 -3
  35. package/dist/{index-DZGolBog.cjs → index-CuPI2lqv.cjs} +1 -1
  36. package/dist/{index-LGGNc6a1.cjs → index-CzIULOgN.cjs} +1 -1
  37. package/dist/{index-CUSbHMVi.cjs → index-D49CORoN.cjs} +1 -1
  38. package/dist/{index-BCMUus0r.cjs → index-D7lbCuzf.cjs} +1 -1
  39. package/dist/{index-BbRwjuYR.js → index-D834bu6t.js} +1 -1
  40. package/dist/{index-DQYsvYAn.js → index-DFo6JZEl.js} +1 -1
  41. package/dist/{index-lI5tYopv.js → index-DLiNZrA6.js} +1 -1
  42. package/dist/{index-D8HXlxQr.cjs → index-DOCv-LZh.cjs} +1 -1
  43. package/dist/{index-D_tfFgs-.js → index-DP6wFpRB.js} +4 -4
  44. package/dist/{index-Cuq29oa4.js → index-DTepwcmD.js} +1 -1
  45. package/dist/{index-BeFrtjpc.cjs → index-DYoJ1b7h.cjs} +1 -1
  46. package/dist/{index-ItYWSDdr.js → index-DahG36bO.js} +2 -2
  47. package/dist/{index-C-8esy-a.js → index-Dc9WA-9R.js} +5 -5
  48. package/dist/{index-BQRQ125X.cjs → index-DfsfEirQ.cjs} +1 -1
  49. package/dist/{index-DPJGncY-.js → index-DsbyRC2o.js} +3 -3
  50. package/dist/{index-CJu3D2uo.js → index-DuvD2T3v.js} +16 -16
  51. package/dist/{index-D0bi9qIn.cjs → index-KIvXTS9h.cjs} +1 -1
  52. package/dist/{index-D4apDyB_.cjs → index-U4C6FUfG.cjs} +1 -1
  53. package/dist/{index-BCUCXydP.cjs → index-aZqbgOAP.cjs} +1 -1
  54. package/dist/{index-CWCj6D5D.cjs → index-kxxFoQbl.cjs} +1 -1
  55. package/dist/{index-DrkWJouc.js → index-l5gyINj-.js} +2 -2
  56. package/dist/{index-B_HpCnnI.js → index-o4S-_Dke.js} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-0RX57baY.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DbvAKPju.cjs} +1 -1
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CENgOezi.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-loW1NLVo.js} +6 -6
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CxeEhL4_.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_tm7tyu.js} +6 -4
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CPbadDFN.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkIBFS4N.cjs} +1 -1
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_20f284c2_lang-DfZ7hU4T.cjs → index.vue_vue_type_style_index_0_scoped_20f284c2_lang-DJ8GnU9R.cjs} +1 -1
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_20f284c2_lang-Cv0T9hca.js → index.vue_vue_type_style_index_0_scoped_20f284c2_lang-bYH1Sh6a.js} +4 -4
  63. package/dist/{index.vue_vue_type_style_index_1_lang-DKF4Ox94.js → index.vue_vue_type_style_index_1_lang-DIK0cSrJ.js} +3 -3
  64. package/dist/{index.vue_vue_type_style_index_1_lang-Cw-NkdEt.cjs → index.vue_vue_type_style_index_1_lang-MF8qbCuC.cjs} +1 -1
  65. package/dist/{main-DEeM0A21.cjs → main-BibCcP5D.cjs} +1 -1
  66. package/dist/{main-yjDb2N94.js → main-CnZCBEtm.js} +3 -3
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.js +9 -9
  69. package/dist/ss-component2.cjs +1 -1
  70. package/dist/ss-component2.js +10 -10
  71. package/dist/{threeModel-CmCUsEAj.cjs → threeModel-Av_Dm5Vo.cjs} +1 -1
  72. package/dist/{threeModel-DPqE-FYJ.js → threeModel-Mtr7ZQSj.js} +4 -4
  73. package/dist/{threePreview-D7Dq1xmv.js → threePreview-11vwvu6C.js} +3 -3
  74. package/dist/{threePreview-BVuWZma4.cjs → threePreview-CauUQ-OA.cjs} +1 -1
  75. package/dist/{threeSceneView-BrHwguCF.js → threeSceneView-Bcqtouvh.js} +8 -8
  76. package/dist/{threeSceneView-Bv4IAB1R.cjs → threeSceneView-DjBO-IBk.cjs} +1 -1
  77. package/dist/{threeSceneViewForCPMPIP-C1isyFva.js → threeSceneViewForCPMPIP-CYhcGgol.js} +7 -7
  78. package/dist/{threeSceneViewForCPMPIP-B3z8U_hY.cjs → threeSceneViewForCPMPIP-Iu85hN2X.cjs} +1 -1
  79. package/dist/{threeTrackPathView-DhV3HUi4.cjs → threeTrackPathView-DMfT4Blz.cjs} +1 -1
  80. package/dist/{threeTrackPathView-B894Zsbj.js → threeTrackPathView-Yv-dXetX.js} +3 -3
  81. package/dist/{threeViewerHost-CYvQxMHX.cjs → threeViewerHost-C2KsZZYX.cjs} +1 -1
  82. package/dist/{threeViewerHost-D_ONpQMP.js → threeViewerHost-lZhmjlZP.js} +2 -2
  83. package/dist/{urdfTree-Djufft4m.js → urdfTree-BiDHH7nr.js} +1 -1
  84. package/dist/{urdfTree-WiAKgNE4.cjs → urdfTree-C3E13Tqr.cjs} +1 -1
  85. package/dist/{workpieceTreePanel-DNg7xg7B.cjs → workpieceTreePanel-BY2EF3ND.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-Cp8YumLm.js → workpieceTreePanel-D8Rj2vkl.js} +4 -4
  87. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";const bn=require("./index-COECU96d.cjs"),e=require("vue"),v=require("./index-DOItJqcJ.cjs"),Bt=require("./index-BQRQ125X.cjs"),Be=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CPbadDFN.cjs"),Zt=require("./index-CamRKKJN.cjs"),Io=require("./threeViewerHost-CYvQxMHX.cjs"),Ut=require("./index-CXC0u8pm.cjs"),Kt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Do5yyRUw.cjs"),No=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ao=require("./index-D8HXlxQr.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-CUSbHMVi.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),yn=require("./index-9hspBVrQ.cjs"),xn=require("./index-DaRuwvRP.cjs");var $l=/\s/;function Kl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var jl=/^\s+/;function Ul(n){return n&&n.slice(0,Kl(n)+1).replace(jl,"")}var Vo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function Oo(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Vo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Vo:+n}var ro=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,k,g,f,D=0,C=!1,V=!1,F=!0;if(typeof n!="function")throw new TypeError(Xl);i=Oo(i)||0,v.isObject(s)&&(C=!!s.leading,V="maxWait"in s,u=V?Yl(Oo(s.maxWait)||0,i):u,F="trailing"in s?!!s.trailing:F);function Y(B){var S=r,ye=d;return r=d=void 0,D=B,k=n.apply(ye,S),k}function L(B){return D=B,g=setTimeout(K,i),C?Y(B):k}function we(B){var S=B-f,ye=B-D,Ze=i-S;return V?Jl(Ze,u-ye):Ze}function q(B){var S=B-f,ye=B-D;return f===void 0||S>=i||S<0||V&&ye>=u}function K(){var B=ro();if(q(B))return le(B);g=setTimeout(K,we(B))}function le(B){return g=void 0,F&&r?Y(B):(r=d=void 0,k)}function w(){g!==void 0&&clearTimeout(g),D=0,r=f=d=g=void 0}function R(){return g===void 0?k:le(ro())}function y(){var B=ro(),S=q(B);if(r=arguments,d=this,f=B,S){if(g===void 0)return L(f);if(V)return clearTimeout(g),g=setTimeout(K,i),Y(f)}return g===void 0&&(g=setTimeout(K,i)),k}return y.cancel=w,y.flush=R,y}var Zl="[object Boolean]";function mr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function yr(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:i}){const s=()=>{k.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var $;const E=($=M.value)==null?void 0:$.split("/");return(E==null?void 0:E.some(P=>(P==null?void 0:P.includes("updateLoading"))||(P==null?void 0:P.includes("loading"))))?!1:O.value==="view"});const d=i,u=e.ref([]),k=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:D}=Io.useThreeSystem(),C=e.ref(),V=e.ref(!1),F=e.ref(!1),Y=Be.useUnit(v.pinia),{chooseTitle:L}=v.storeToRefs(Y),we=e.ref([]),q=e.ref(),K=e.ref(!1),le=e.ref([]),w=bn.useFormToTableComp(v.pinia),R=bn.useFormComp(v.pinia),y=e.ref(!1),B=e.ref(),S=v.useLoginState(v.pinia),{loginUserInfo:ye}=v.storeToRefs(S),Ze=e.ref(),rt=e.ref(!0),Ae=Ut.useModelComp(v.pinia),{tableViewContents:je,itemData:Ie,isEdit:O,routeToChildPath:ee,lockingPage:se}=v.storeToRefs(Ae),he=e.ref(null),Ge=e.ref(!1),it=e.ref(!1),J=Ut.useMenuState(),{activeMenuPath:M}=v.storeToRefs(J),xe=Be.useOriginalState(v.pinia),{originalPath:Ce}=v.storeToRefs(xe),Pe=e.ref([]),Fe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),qe=async E=>{it.value=E,await G("disabled",null,E,!0)},Xe=async E=>{await G("operable",null,E,!0)};e.watch(()=>M.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const fe=()=>{e.nextTick(()=>{ce()})},z=E=>{var te;u.value=(te=u.value)==null?void 0:te.map($=>({...$,isFormColHidden:!(E!=null&&E.includes($.label))}))};e.onUnmounted(()=>{he.value=null});const X=E=>{d("clickTrigger",E)},pe=async E=>{var te,$,P,Ee,ne,H;if(E===""){let Q="";(te=u.value)==null||te.forEach(ke=>{ke!=null&&ke.isMain&&(Q=ke==null?void 0:ke.value)});let de=await Be.getItemData(ee.value,sessionStorage.getItem("systemKey"),"");Q=((H=(ne=(Ee=(P=($=de==null?void 0:de[0])==null?void 0:$.compData)==null?void 0:P.find(ke=>(ke==null?void 0:ke.key)==="mainRouters"))==null?void 0:Ee.contents)==null?void 0:ne[0])==null?void 0:H.routerContent)+Ce.value+Q;let be=await Be.getItemData(Q,sessionStorage.getItem("systemKey"),"");K.value=!0,le.value=be==null?void 0:be.filter(ke=>(ke==null?void 0:ke.comp)!=="methodButton"),d("routeUrl",le.value)}},ce=()=>{var te;const E=(te=he.value)==null?void 0:te.$el;E&&Be.Sortable.create(E,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:$=>{const{oldIndex:P,newIndex:Ee}=$;if(P===Ee)return;const ne=u.value.splice(P,1)[0];u.value.splice(Ee,0,ne)}})},G=async(E,te,$,P=!1)=>{var Ee,ne,H,Q,de,De,be,ke;try{Ae.setRefreshCurStructure(!1);const j=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((Ee=j==null?void 0:j.data)==null?void 0:Ee.code)===200){let Ne=(de=(Q=(H=(ne=j==null?void 0:j.data)==null?void 0:ne.result)==null?void 0:H[0])==null?void 0:Q.value)==null?void 0:de.pageData;P?Ne={...Ne,compData:(be=Ne==null?void 0:Ne.compData)==null?void 0:be.map(Le=>{var ct;return(Le==null?void 0:Le.key)==="formContent"?{...Le,contents:(ct=Le==null?void 0:Le.contents)==null?void 0:ct.map(Ue=>({...Ue,[E]:$}))}:Le})}:Ne={...Ne,compData:(De=Ne==null?void 0:Ne.compData)==null?void 0:De.map(Le=>{var ct;return(Le==null?void 0:Le.key)==="formContent"?{...Le,contents:(ct=Le==null?void 0:Le.contents)==null?void 0:ct.map(Ue=>(Ue==null?void 0:Ue.prop)===(te==null?void 0:te.prop)?{...Ue,[E]:$}:Ue)}:Le})};const ge=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Ne}});((ke=ge==null?void 0:ge.data)==null?void 0:ke.code)===200?(v.ElMessage.success("编辑成功"),Ae.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},ae=async(E,te)=>{await G("label",te,E)},Z=async(E,te)=>{E&&await G("type",te,E)},re=async(E,te,$)=>{await G(te,$,E,!1)},Re=(E,te)=>{Ze.value===te?rt.value=!1:rt.value=!0,Ze.value=te==null?void 0:te.changeProp},lt=async E=>{var $,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct;let te=[];if(($=E==null?void 0:E.toString())!=null&&$.includes(".urdf")){if(E.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:E,extension:D(E)}],g.value=!0,k.value=!0;return}if((P=E==null?void 0:E.toString())!=null&&P.includes(".stl")||(Ee=E==null?void 0:E.toString())!=null&&Ee.includes(".STL")||(ne=E==null?void 0:E.toString())!=null&&ne.includes(".obj")||(H=E==null?void 0:E.toString())!=null&&H.includes(".mtl")){const ot=((Q=E==null?void 0:E.toString())==null?void 0:Q.split(",")).map(Oe=>({url:Oe,extension:D(Oe)}));f.value=ot,g.value=!1,k.value=!0;return}if((de=E==null?void 0:E.toString())!=null&&de.includes(".stl")||(De=E==null?void 0:E.toString())!=null&&De.includes(".STL")||(be=E==null?void 0:E.toString())!=null&&be.includes(".obj")||(ke=E==null?void 0:E.toString())!=null&&ke.includes(".mtl")){let Ue,ot=[],Oe={};if(Array.isArray(E)?Ue=E:Ue=E==null?void 0:E.split(","),Ue==null||Ue.forEach(gt=>{gt.includes(".mtl")?ot.push(gt):Oe.blob=Oe.blob?Oe.blob+","+gt:gt}),(ot==null?void 0:ot.length)>0&&(Oe.mtlBlobs=ot),(Ne=(j=Object.values(Oe))==null?void 0:j[0])!=null&&Ne.includes("http:"))te.push(Oe);else{const gt=new Blob([Oe.blob],{type:"application/octet-stream;charset=UTF-8"});let tt=URL.createObjectURL(gt),Ve="";(ge=E==null?void 0:E.split("/"))==null||ge.forEach(($e,et)=>{var Ye;et===((Ye=E==null?void 0:E.split("/"))==null?void 0:Ye.length)-1&&(Ve=$e)}),(Le=Oe.blob)!=null&&Le.includes(".stl")&&(Ve=(Ve==null?void 0:Ve.replaceAll(">",""))+".urdf"),q.value=[{name:Ve,blobUrl:tt}],F.value=!0}}else{const Ue=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ot=await v.axios.get(E,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ue.close()}),Oe=new Blob([ot.data],{type:"application/octet-stream;charset=UTF-8"});let gt=URL.createObjectURL(Oe),tt="";(ct=E==null?void 0:E.split("/"))==null||ct.forEach((Ve,$e)=>{var et;$e===((et=E==null?void 0:E.split("/"))==null?void 0:et.length)-1&&(tt=Ve)}),q.value=[{name:tt,blobUrl:gt}],F.value=!0}(te==null?void 0:te.length)>0&&R.setBlobUrls(te)},h=()=>{F.value=!1},_=E=>{var ne,H,Q,de;const te=(H=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(De=>(De==null?void 0:De.key)==="formContent"))==null?void 0:H.contents,$=v.cloneDeep(E.content);let P={};$&&((Q=Object.values($))==null?void 0:Q.length)>0&&((de=Object.values($))==null||de.forEach((De,be)=>{P[te[be].key]=De}));const Ee={content:P,index:r==null?void 0:r.index,buttonName:E==null?void 0:E.buttonName};d("change",Ee)},I=e.computed(()=>"http://222.92.178.198:62001"),W=async E=>{var j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et,Ye,ze,at;if(!E)return;(Ne=(j=r==null?void 0:r.itemData)==null?void 0:j.find(ve=>(ve==null?void 0:ve.key)==="parentFormPath"))==null||Ne.contents;let te=je.value;(te==null?void 0:te.length)>0&&(te=te==null?void 0:te.map(ve=>{var Me,Qe,A,ue;let Se=(Me=ve==null?void 0:ve.key)==null?void 0:Me.split("/");return(r==null?void 0:r.compName)===(Se==null?void 0:Se[0])&&(Qe=u.value)!=null&&Qe.find(He=>(He==null?void 0:He.prop)===(Se==null?void 0:Se[1]))&&(ve.value=(ue=(A=u.value)==null?void 0:A.find(He=>(He==null?void 0:He.prop)===(Se==null?void 0:Se[1])))==null?void 0:ue.value),ve}),Ae.setTableViewContents(te));const $=v.cloneDeep(r.itemData);let P=$==null?void 0:$.map(ve=>{var Se;return(ve==null?void 0:ve.key)==="formContent"&&((Se=ve.contents)==null||Se.map((Me,Qe)=>{var A,ue,He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt,bt,jt,qt,Gt,ta;return Me.type=(ue=(A=u.value)==null?void 0:A.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:ue.type,Me.options=Me!=null&&Me.options?Me.options:((nt=(me=(He=Me==null?void 0:Me.key)==null?void 0:He.split("$"))==null?void 0:me[1])==null?void 0:nt.length)>0?(dt=(ht=bn.formGetOptions((yt=(kt=Me==null?void 0:Me.key)==null?void 0:kt.split("$"))==null?void 0:yt[1]))==null?void 0:ht.split(","))==null?void 0:dt.map($t=>({label:$t,value:$t})):[],(ft=Me==null?void 0:Me.key)!=null&&ft.includes("$")&&(Me.key=(Mt=(_t=Me==null?void 0:Me.key)==null?void 0:_t.split("$"))==null?void 0:Mt[0]),Me.signature=(Lt=(Vt=u.value)==null?void 0:Vt.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:Lt.signature,Me.isLoginUser=(jt=(bt=u.value)==null?void 0:bt.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:jt.isLoginUser,Me.value=(qt=Object.values(E))==null?void 0:qt[Qe],Me.isFormColHidden=(ta=(Gt=u.value)==null?void 0:Gt.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:ta.isFormColHidden,Me})),ve}),Ee=u.value,ne=(Le=(ge=v.cloneDeep(P))==null?void 0:ge.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Le.contents;if(Ee=Ee==null?void 0:Ee.map(ve=>{var Se;return ve.value=(Se=ne==null?void 0:ne.find((Me,Qe)=>((Me==null?void 0:Me.id)??Qe)===(ve==null?void 0:ve.id)))==null?void 0:Se.value,ve}),!rt.value){d("contentChange",{contents:P,index:r.index});return}let H="",Q=(ot=(Ue=(ct=v.cloneDeep(P))==null?void 0:ct.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:ot.find((ve,Se)=>{var Me,Qe,A;return(ve==null?void 0:ve.label)===Ze.value||Se.toString()===((A=(Qe=(Me=Ze.value)==null?void 0:Me.split("t"))==null?void 0:Qe[1])==null?void 0:A.toString())}),de=(Oe=Q==null?void 0:Q.optionUrl)==null?void 0:Oe.menuSelect,De=!0;if((Ve=(tt=(gt=v.cloneDeep(P))==null?void 0:gt.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:tt.contents)==null||Ve.forEach(ve=>{var Se,Me,Qe,A,ue,He;De&&((Qe=(Me=(Se=ve==null?void 0:ve.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Me[1])!=null&&Qe.includes("["))&&(H=(ue=(A=ve==null?void 0:ve.optionUrl)==null?void 0:A.groupSelect)==null?void 0:ue[1],JSON.stringify(de)===JSON.stringify((He=ve==null?void 0:ve.optionUrl)==null?void 0:He.menuSelect)&&(De=!1))}),($e=Q==null?void 0:Q.optionUrl)!=null&&$e.menuSelect&&rt.value){let ve=await bn.getSelectRow(Q),Se,Me=(et=Q==null?void 0:Q.optionUrl)==null?void 0:et.menuSelect;if(ve==null||ve.forEach(Qe=>{var A,ue,He,me,nt,kt,yt,ht,dt,ft;H===((ue=(A=Q==null?void 0:Q.optionUrl)==null?void 0:A.groupSelect)==null?void 0:ue[1])&&((nt=(me=(He=Q==null?void 0:Q.optionUrl)==null?void 0:He.groupSelect)==null?void 0:me[1])!=null&&nt.includes("["))&&((ft=v.cloneDeep(Qe))==null?void 0:ft[(dt=(ht=(yt=(kt=Q==null?void 0:Q.optionUrl)==null?void 0:kt.groupSelect)==null?void 0:yt[1])==null?void 0:ht.replaceAll("[",""))==null?void 0:dt.replaceAll("]","")])===(Q==null?void 0:Q.value)&&(Se=Qe)}),Se){let Qe=v.cloneDeep(Ee);Qe=Qe==null?void 0:Qe.map(ue=>{var He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt;return(Se!=null&&Se[ue==null?void 0:ue.label]||Se!=null&&Se[(kt=(nt=(me=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.groupSelect)==null?void 0:me[1])==null?void 0:nt.replaceAll("[",""))==null?void 0:kt.replaceAll("]","")])&&((dt=(ht=(yt=ue==null?void 0:ue.optionUrl)==null?void 0:yt.groupSelect)==null?void 0:ht[1])!=null&&dt.includes("["))&&Me!=null&&Me.every(Lt=>{var bt,jt;return(jt=(bt=ue==null?void 0:ue.optionUrl)==null?void 0:bt.menuSelect)==null?void 0:jt.includes(Lt)})&&(ue.value=(Se==null?void 0:Se[ue==null?void 0:ue.label])||(Se==null?void 0:Se[(Vt=(Mt=(_t=(ft=ue==null?void 0:ue.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:_t[1])==null?void 0:Mt.replaceAll("[",""))==null?void 0:Vt.replaceAll("]","")]),Array.isArray(ue.value)&&ue.value.every(Lt=>(Lt==null?void 0:Lt.url)&&(Lt==null?void 0:Lt.name))&&(ue.type="Upload")),ue}),Qe=Qe==null?void 0:Qe.map(ue=>{var He,me,nt;return(He=ue==null?void 0:ue.optionUrl)!=null&&He.oldMenuSelect&&(ue.optionUrl.menuSelect=(nt=(me=v.cloneDeep(ue))==null?void 0:me.optionUrl)==null?void 0:nt.oldMenuSelect),ue}),u.value=v.cloneDeep(Qe);let A=v.cloneDeep(Qe);A=A==null?void 0:A.map(ue=>{var He,me,nt,kt,yt,ht;return(me=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.menuSelect)!=null&&me.some(dt=>dt==null?void 0:dt.includes("["))&&(ue.optionUrl.oldMenuSelect=(kt=(nt=v.cloneDeep(ue))==null?void 0:nt.optionUrl)==null?void 0:kt.menuSelect,ue.optionUrl.menuSelect=(ht=(yt=ue==null?void 0:ue.optionUrl)==null?void 0:yt.menuSelect)==null?void 0:ht.map(dt=>{var ft,_t,Mt,Vt;if(dt!=null&&dt.includes("[")){let Lt=(_t=(ft=dt==null?void 0:dt.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:_t[1];dt=(Vt=(Mt=v.cloneDeep(Qe))==null?void 0:Mt.find(bt=>(bt==null?void 0:bt.label)===Lt))==null?void 0:Vt.value}return dt})),ue}),u.value=A}else u.value=Ee;P=P==null?void 0:P.map(Qe=>{var A;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(A=Qe.contents)==null?void 0:A.map(ue=>{var He,me,nt,kt;return ue.value=((me=(He=u.value)==null?void 0:He.find(yt=>(yt==null?void 0:yt.label)===(ue==null?void 0:ue.key)))==null?void 0:me.value)??(ue==null?void 0:ue.value),ue.type=((kt=(nt=u.value)==null?void 0:nt.find(yt=>(yt==null?void 0:yt.prop)===(ue==null?void 0:ue.key)))==null?void 0:kt.type)??(ue==null?void 0:ue.type),ue})),Qe})}rt.value=!1,d("contentChange",{contents:P,index:r.index});let be=[],ke=[];if((ze=v.cloneDeep((Ye=P==null?void 0:P.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Ye.contents))==null||ze.forEach(ve=>{var Se;Array.isArray(ve==null?void 0:ve.value)&&((Se=ve==null?void 0:ve.value)!=null&&Se.find(Me=>{var Qe;return(Qe=Me==null?void 0:Me.url)==null?void 0:Qe.includes(".obj")}))&&(ke=ve==null?void 0:ve.value)}),(ke==null?void 0:ke.length)>0){const ve=(at=v.cloneDeep(ke))==null?void 0:at.filter(Se=>{var Me;return(Me=Se==null?void 0:Se.url)==null?void 0:Me.includes(".obj")});ve==null||ve.forEach(Se=>{var Qe,A,ue,He;const Me=(Qe=ke==null?void 0:ke.filter(me=>{var nt;return(me==null?void 0:me.name)===(Se==null?void 0:Se.name)&&((nt=me==null?void 0:me.url)==null?void 0:nt.includes(".mtl"))}))==null?void 0:Qe.map(me=>me==null?void 0:me.url);be.push({objUrl:Se==null?void 0:Se.url,mtlUrls:((A=ke==null?void 0:ke.filter(me=>{var nt;return(me==null?void 0:me.name)===(Se==null?void 0:Se.name)&&((nt=me==null?void 0:me.url)==null?void 0:nt.includes(".mtl"))}))==null?void 0:A.length)===1?(He=(ue=ke==null?void 0:ke.filter(me=>{var nt;return(me==null?void 0:me.name)===(Se==null?void 0:Se.name)&&((nt=me==null?void 0:me.url)==null?void 0:nt.includes(".mtl"))}))==null?void 0:ue[0])==null?void 0:He.url:Me})}),R.setObjUrl(be)}},x=E=>{if(!E)return;const te=[];let $="";for(let P of E)(P.includes("[")||$.includes("["))&&($+=P.trim(),v.cloneDeep($).split("【").length-1===v.cloneDeep($).split("】").length-1&&v.cloneDeep($).split("[").length-1===v.cloneDeep($).split("]").length-1&&(te.push($.replace(/\/\*[\s\S]*?\*\//g,"")),$=""));return te},ie=(E,te,$)=>{let P="";const Ee=te==null?void 0:te.map(ne=>{var H;return(H=ne==null?void 0:ne.value)==null?void 0:H.pageData});return Ee==null||Ee.forEach(ne=>{var H;(ne==null?void 0:ne.name)===(E==null?void 0:E[0])&&((H=ne==null?void 0:ne.compData)==null||H.forEach(Q=>{var de;(Q==null?void 0:Q.key)==="formContent"&&((de=Q==null?void 0:Q.contents)==null||de.forEach(De=>{var be;(De==null?void 0:De.prop)===(E==null?void 0:E[1])&&(P=(De==null?void 0:De.value)===""?Be.judgeContents((be=v.cloneDeep(De))==null?void 0:be.optionUrl,$):De==null?void 0:De.value)}))}))}),P},_e=(E,te,$,P)=>{var Q,de;let Ee="",ne="";(Q=v.cloneDeep(te))==null||Q.forEach((De,be)=>{De!=null&&De.includes("[")?ne=ne+Ce.value+E[be]:ne=ne===""?ne+De:ne+"/"+De});let H=(de=P[ne])==null?void 0:de.map(De=>{var be;return(be=De==null?void 0:De.value)==null?void 0:be.pageData});return H==null||H.forEach(De=>{var be;(De==null?void 0:De.name)===($==null?void 0:$[0])&&((be=De==null?void 0:De.compData)==null||be.forEach(ke=>{var j;(ke==null?void 0:ke.key)==="formContent"&&((j=ke==null?void 0:ke.contents)==null||j.forEach(Ne=>{(Ne==null?void 0:Ne.prop)===($==null?void 0:$[1])&&(Ee=Ne==null?void 0:Ne.value)}))}))}),Ee};return e.watch(()=>r.itemData,async()=>{var H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et;const E=(H=r.itemData)==null?void 0:H.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"),te=(Q=v.cloneDeep(r.itemData))==null?void 0:Q.find(Ye=>(Ye==null?void 0:Ye.key)==="formButton"),$=(de=v.cloneDeep(r.itemData))==null?void 0:de.find(Ye=>(Ye==null?void 0:Ye.key)==="formFlex"),P=(De=v.cloneDeep(r.itemData))==null?void 0:De.find(Ye=>(Ye==null?void 0:Ye.key)==="formWrap"),Ee=(be=v.cloneDeep(r.itemData))==null?void 0:be.find(Ye=>(Ye==null?void 0:Ye.key)==="enableWrap");if((P==null?void 0:P.contents)==="纵向"?V.value=!1:V.value=!0,y.value=(Ee==null?void 0:Ee.contents)===void 0?!1:Ee==null?void 0:Ee.contents,B.value=typeof($==null?void 0:$.contents)!="boolean"?!(!($!=null&&$.contents)===""||((ke=$==null?void 0:$.contents)==null?void 0:ke.toUpperCase())==="VERTICAL"):$==null?void 0:$.contents,((j=E==null?void 0:E.contents)==null?void 0:j.length)>0&&Array.isArray(E==null?void 0:E.contents)){let Ye=r.allMapContents;const ze=(ge=(Ne=v.cloneDeep(E))==null?void 0:Ne.contents)==null?void 0:ge.map((A,ue)=>{var Lt,bt,jt,qt,Gt,ta,$t,Ia,Ra,ba,Pa,ka,$a,Ka,ja,Ua,Wa,Ba,ga,da,xa,ma,ra,va,Ha,Na,Aa,wa,qa,Ga,Va,Xa,Ya;let He=(A==null?void 0:A.label)??(A==null?void 0:A.key)??"",me=(A==null?void 0:A.type)??"",nt=(A==null?void 0:A.options)??[];if((Lt=A==null?void 0:A.key)!=null&&Lt.includes("$")&&(He=(bt=v.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:bt[0],((qt=(jt=v.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:jt[1])==null?void 0:qt.length)>0)){const[St,ea]=(ta=(Gt=v.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:Gt[1])==null?void 0:ta.split(/[()]/);me=(($t=Be.FormType.find(xt=>(xt==null?void 0:xt.key)===St))==null?void 0:$t.value)??"",((Ia=ea==null?void 0:ea.split(","))==null?void 0:Ia.length)>0&&(nt=(Ra=ea==null?void 0:ea.split(","))==null?void 0:Ra.map(xt=>({label:xt,value:xt})))}let kt=[];A!=null&&A.contents&&!Array.isArray(A==null?void 0:A.contents)&&(kt=(Pa=(ba=A==null?void 0:A.contents)==null?void 0:ba.split(","))==null?void 0:Pa.map(St=>({label:St,value:St}))),((ka=A==null?void 0:A.optionUrl)==null?void 0:ka.selectRelateType)==="自定义绑定"&&(kt=(Ka=($a=A==null?void 0:A.optionUrl)==null?void 0:$a.defaultSelect)==null?void 0:Ka.map(St=>({label:St,value:St})));let yt=!1,ht=(A==null?void 0:A.isFormColHidden)??!1,dt=Be.judgeContents((ja=v.cloneDeep(A))==null?void 0:ja.optionUrl,Ye),ft=dt!==void 0&&dt!==""?dt:A!=null&&A.originalContent&&(A==null?void 0:A.originalContent)!==""?A.originalContent:A!=null&&A.value?A.value:(nt==null?void 0:nt.length)>0?(Ua=nt==null?void 0:nt[0])==null?void 0:Ua.value:(A==null?void 0:A.value)??"",_t=!1,Mt=dt!==void 0||me===""?"Input":me;if((Array.isArray(dt)&&(dt!=null&&dt.every(St=>(St==null?void 0:St.name)&&(St==null?void 0:St.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(St=>(St==null?void 0:St.name)&&(St==null?void 0:St.url))))&&(Mt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||A!=null&&A.isLoginUser)yt=!0,ft=((Wa=ye.value)==null?void 0:Wa.姓名)||((Ba=ye.value)==null?void 0:Ba.account)||((ga=ye.value)==null?void 0:ga.账号)||((da=ye.value)==null?void 0:da.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||A!=null&&A.signature||A!=null&&A.isShow)if(_t=!0,(A==null?void 0:A.isShow)==="originalSignature")Mt="image",ft=I.value+"/"+((xa=ye.value)==null?void 0:xa.signature);else{let St=[...new Set(x(A.isShow))].map(wt=>{var Et,Ct,Ft,Ot;return{key:(Ot=(Ft=(Ct=(Et=wt==null?void 0:wt.split("["))==null?void 0:Et[1])==null?void 0:Ct.split("]"))==null?void 0:Ft[0])==null?void 0:Ot.split(":"),value:""}});(ma=Ie.value)==null||ma.forEach(wt=>{St==null||St.forEach((Xt,Et)=>{var Ft;let Ct=Xt==null?void 0:Xt.key;(wt==null?void 0:wt.name)===(Ct==null?void 0:Ct[0].replaceAll("'",""))&&((Ft=wt==null?void 0:wt.compData)==null||Ft.forEach(Ot=>{var Rt;(Ot==null?void 0:Ot.key)==="formContent"&&((Rt=Ot==null?void 0:Ot.contents)==null||Rt.forEach(Yt=>{(Yt==null?void 0:Yt.prop)===(Ct==null?void 0:Ct[1].replaceAll("'",""))&&(St[Et].value=Yt==null?void 0:Yt.value)}))}))})});let ea=St==null?void 0:St.map(wt=>{var Xt;return wt.key="["+((Xt=wt.key)==null?void 0:Xt.join(":"))+"]",wt}),xt=A==null?void 0:A.isShow;ea==null||ea.forEach(wt=>{wt!=null&&wt.value?xt=xt.replaceAll(wt==null?void 0:wt.key,"'"+(wt==null?void 0:wt.value)+"'"):xt=xt.replaceAll(wt==null?void 0:wt.key,"undefined")}),xt!=null&&xt.includes("(")||(xt!=null&&xt.includes("==")?xt=((ra=xt==null?void 0:xt.split("==="))==null?void 0:ra[0])+"==='"+((va=xt==null?void 0:xt.split("==="))==null?void 0:va[1])+"'":xt=((Ha=xt==null?void 0:xt.split("="))==null?void 0:Ha[0])+"='"+((Na=xt==null?void 0:xt.split("="))==null?void 0:Na[1])+"'"),xt!=null&&xt.includes("=")&&!(xt!=null&&xt.includes("=="))&&!(xt!=null&&xt.includes("==="))&&(xt=xt==null?void 0:xt.replaceAll("=","==")),new Function(`if (${xt}) { return true } else { return false }`)()?(ht=!1,Mt="image",ft=I.value+"/"+((Aa=ye.value)==null?void 0:Aa.signature)):ft=""}return Array.isArray(ft)&&ft.every(St=>(St==null?void 0:St.url)&&(St==null?void 0:St.name))&&(A.type="Upload"),A!=null&&A.isMainUrl&&(Mt="Url"),{label:He??"",name:"t"+ue,prop:v.cloneDeep(A==null?void 0:A.key),type:Mt,value:A!=null&&A.isSync?((qa=(wa=L.value)==null?void 0:wa[0])==null?void 0:qa.value)??((Ya=(Ga=M==null?void 0:M.value)==null?void 0:Ga.split("/"))==null?void 0:Ya[((Xa=(Va=M==null?void 0:M.value)==null?void 0:Va.split("/"))==null?void 0:Xa.length)-1]):A!=null&&A.isNewDate&&ft===""?new Date:ft,id:(A==null?void 0:A.id)??ue,contents:(kt==null?void 0:kt.length)>0?kt:nt??[],width:(A==null?void 0:A.width)??1,isLoginUser:yt,config:A==null?void 0:A.config,optionUrl:(A==null?void 0:A.optionUrl)??A,isFormColHidden:ht,signature:_t,isMain:A==null?void 0:A.isMain,isMainUrl:A==null?void 0:A.isMainUrl,operable:(A==null?void 0:A.operable)??!1,disabled:(A==null?void 0:A.disabled)??!1,isSync:A==null?void 0:A.isSync}}),at=ze==null?void 0:ze.map(A=>A==null?void 0:A.value);let ve="";at==null||at.forEach(A=>{A!==""&&A!==void 0&&(ve=ve===""?A:ve+"/"+A)}),w.setSelectArray(at),w.setSelectString(ve);let Se=(Le=v.cloneDeep(ze))==null?void 0:Le.map(A=>(A!=null&&A.value&&Be.IsJson(A==null?void 0:A.value)&&Array.isArray(JSON.parse(A==null?void 0:A.value))&&(A.value=JSON.parse(A.value)),A));Se=Se==null?void 0:Se.map(A=>{var ue,He,me,nt,kt,yt,ht,dt;if((He=(ue=A==null?void 0:A.optionUrl)==null?void 0:ue.menuSelect)!=null&&He.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";A.optionUrl.oldMenuSelect=(nt=(me=v.cloneDeep(A))==null?void 0:me.optionUrl)==null?void 0:nt.menuSelect,A.optionUrl.menuSelect=(yt=(kt=A==null?void 0:A.optionUrl)==null?void 0:kt.menuSelect)==null?void 0:yt.map(_t=>{var Mt,Vt,Lt,bt,jt,qt;if(_t!=null&&_t.includes("[")){let Gt=(Vt=(Mt=_t==null?void 0:_t.replaceAll("[","").replaceAll("]",""))==null?void 0:Mt.split(":"))==null?void 0:Vt[1];ft=ie((Lt=_t==null?void 0:_t.replaceAll("[","").replaceAll("]",""))==null?void 0:Lt.split(":"),Ye==null?void 0:Ye[M.value],Ye),_t=((jt=(bt=v.cloneDeep(Se))==null?void 0:bt.find(ta=>(ta==null?void 0:ta.label)===Gt))==null?void 0:jt.value)||ie((qt=_t==null?void 0:_t.replaceAll("[","").replaceAll("]",""))==null?void 0:qt.split(":"),Ye==null?void 0:Ye[M.value],Ye)}return _t}),ft!==""&&A.value===""&&(A.value=_e(A.optionUrl.menuSelect,A.optionUrl.oldMenuSelect,(ht=A==null?void 0:A.optionUrl)==null?void 0:ht.groupSelect,Ye),Array.isArray(A.value)&&((dt=A.value)!=null&&dt.every(_t=>_t==null?void 0:_t.url))&&(A.type="UPLOAD"))}return A}),u.value=Se,it.value=((ct=u.value)==null?void 0:ct.every(A=>A==null?void 0:A.disabled))||se.value===M.value,Ge.value=(Ue=u.value)==null?void 0:Ue.every(A=>A==null?void 0:A.operable),Pe.value=(ot=u.value)==null?void 0:ot.map(A=>A==null?void 0:A.label);let Me=[],Qe=[];if((Oe=v.cloneDeep(u.value))==null||Oe.forEach(A=>{var ue;Array.isArray(A==null?void 0:A.value)&&((ue=A==null?void 0:A.value)!=null&&ue.find(He=>{var me;return(me=He==null?void 0:He.url)==null?void 0:me.includes(".obj")}))&&(Qe=A==null?void 0:A.value)}),(Qe==null?void 0:Qe.length)>0){const A=(gt=v.cloneDeep(Qe))==null?void 0:gt.filter(ue=>{var He;return(He=ue==null?void 0:ue.url)==null?void 0:He.includes(".obj")});A==null||A.forEach(ue=>{var me,nt,kt,yt;const He=(me=Qe==null?void 0:Qe.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ue==null?void 0:ue.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:me.map(ht=>ht==null?void 0:ht.url);Me.push({objUrl:ue==null?void 0:ue.url,mtlUrls:((nt=Qe==null?void 0:Qe.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ue==null?void 0:ue.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:nt.length)===1?(yt=(kt=Qe==null?void 0:Qe.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ue==null?void 0:ue.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:kt[0])==null?void 0:yt.url:He})}),R.setObjUrl(Me)}(tt=v.cloneDeep(u.value))==null||tt.forEach(A=>{var ue,He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt;if((He=(ue=A==null?void 0:A.value)==null?void 0:ue.toString())!=null&&He.includes(".stl")||(nt=(me=A==null?void 0:A.value)==null?void 0:me.toString())!=null&&nt.includes(".STL")||(yt=(kt=A==null?void 0:A.value)==null?void 0:kt.toString())!=null&&yt.includes(".obj")||(dt=(ht=A==null?void 0:A.value)==null?void 0:ht.toString())!=null&&dt.includes(".mtl")||(_t=(ft=A==null?void 0:A.value)==null?void 0:ft.toString())!=null&&_t.includes(".urdf")){let bt={},jt=[],qt;Array.isArray(A==null?void 0:A.value)?qt=A==null?void 0:A.value:qt=(Mt=A==null?void 0:A.value)==null?void 0:Mt.split(","),qt==null||qt.forEach(Gt=>{Gt.includes(".mtl")?jt.push(Gt):bt.blob=bt.blob==="undefined"?Gt:bt.blob+","+Gt}),(jt==null?void 0:jt.length)>0&&(bt.mtlBlobs=jt),(Lt=(Vt=Object.values(bt))==null?void 0:Vt[0])!=null&&Lt.includes("http:")}})}else u.value=[];let ne=je.value;if((ne==null?void 0:ne.length)>0&&(ne=ne==null?void 0:ne.map(Ye=>{var at,ve,Se,Me;let ze=(at=Ye==null?void 0:Ye.key)==null?void 0:at.split("/");return(r==null?void 0:r.compName)===(ze==null?void 0:ze[0])&&(ve=u.value)!=null&&ve.find(Qe=>(Qe==null?void 0:Qe.prop)===(ze==null?void 0:ze[1]))&&(Ye.value=(Me=(Se=u.value)==null?void 0:Se.find(Qe=>(Qe==null?void 0:Qe.prop)===(ze==null?void 0:ze[1])))==null?void 0:Me.value),Ye}),Ae.setTableViewContents(ne)),r!=null&&r.formRules)C.value=r==null?void 0:r.formRules;else{let Ye={};(Ve=v.cloneDeep(u).value)==null||Ve.forEach(ze=>{(ze==null?void 0:ze.isMain)===!0&&(Ye[(ze==null?void 0:ze.prop)??(ze==null?void 0:ze.name)]=[{required:!0,message:`${(ze==null?void 0:ze.prop)||(ze==null?void 0:ze.name)}不能为空`}])}),C.value=Ye}if((($e=te==null?void 0:te.contents)==null?void 0:$e.length)>0){const Ye=[];(et=te==null?void 0:te.contents)==null||et.forEach((ze,at)=>{(ze==null?void 0:ze.label)!==""&&Ye.push({label:(ze==null?void 0:ze.label)??"",id:(ze==null?void 0:ze.id)??at,type:(ze==null?void 0:ze.type)??"",background:ze==null?void 0:ze.background})}),we.value=Ye}else we.value=[]},{deep:!0,immediate:!0}),e.watch(()=>se.value,E=>{it.value=E===M.value},{immediate:!0}),(E,te)=>{const $=e.resolveComponent("svg-icon"),P=e.resolveComponent("el-switch"),Ee=e.resolveComponent("el-checkbox"),ne=e.resolveComponent("el-popover"),H=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(Bt.ssForm,{rowContents:u.value,formRules:C.value,buttonValue:we.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:_,onChange:W,formDisabled:it.value,formLabelsOperable:Ge.value,isButtonRow:V.value,onPreview:lt,onBlurChange:Re,onHandleColEditChange:ae,onHandleColTypeChange:Z,onRouteUrl:pe,onClickTrigger:X},{operateCol:e.withCtx(({renderColumns:Q,formDisabled:de,formLabelsOperable:De})=>[e.createVNode(ne,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:fe},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode($,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[te[1]||(te[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(P,{"model-value":de,"active-text":"禁用","inactive-text":"",onChange:qe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(P,{"model-value":De,"active-text":"编辑所有标签","inactive-text":"",onChange:Xe},null,8,["model-value"]),te[2]||(te[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(H,{modelValue:Pe.value,"onUpdate:modelValue":te[0]||(te[0]=be=>Pe.value=be),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:he,onChange:z},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q,be=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:be.label},[e.createVNode(Ee,{value:be.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(be.label),1)]),_:2},1032,["value"]),e.createVNode(ne,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode($,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ke;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ke=Object.keys(be))==null?void 0:ke.filter(j=>{var Ne;return(Ne=Fe.value)==null?void 0:Ne.find(ge=>(ge==null?void 0:ge.value)===j)}),j=>{var Ne,ge;return e.openBlock(),e.createElementBlock("div",{key:j},[e.createVNode(Bt._sfc_main$1,{value:be==null?void 0:be[j],"active-text":(ge=(Ne=Fe.value)==null?void 0:Ne.find(Le=>(Le==null?void 0:Le.value)===j))==null?void 0:ge.label,inactiveText:"",onChange:Le=>re(Le,j,be)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode($,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),F.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:q.value,onDestroy:h},null,8,["fileDataList"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock(Zt.ssDialog,{key:1,visible:k.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Io.ThreeViewerHost,{files:f.value,onGetAnimationData:E.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=Kt._export_sfc(oi,[["__scopeId","data-v-3d8dbd5b"]]),Kn=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},kr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=kr(r==null?void 0:r.children,i),r)),n)},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},At=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ca=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],_a=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),k=Be.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(k);e.ref(0);const f=e.ref(""),D=e.ref([]),C=e.ref([]),V=w=>{var y;d.value=!0;let R=[];At==null||At.forEach(B=>{let S=v.cloneDeep(g.value)+1;k.setTableIndex(S),R.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:w[B.key],id:g.value,contents:B==null?void 0:B.options})}),w!=null&&w.children&&((y=w==null?void 0:w.children)==null?void 0:y.length)>0&&R.push({children:w==null?void 0:w.children,isFormColHidden:!0}),f.value=w==null?void 0:w.id,D.value=R,C.value=R},F=w=>{r("fixChange",v.cloneDeep(w))},Y=w=>{r("deleteChange",v.cloneDeep(w))},L=w=>{d.value=!0;let R=[];At==null||At.forEach(y=>{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),R.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=w==null?void 0:w.id,D.value=R,C.value=R},we=w=>{let R=v.cloneDeep(C.value);R=R==null?void 0:R.map(y=>(y.children||(y.value=w==null?void 0:w[y.name]),y)),C.value=R},q=()=>{var R,y;D.value=C.value;let w={};if(f.value!=="")w.id=f.value,(R=D.value)==null||R.forEach(B=>{const S=At==null?void 0:At.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));S?w[S.key]=B.value:B!=null&&B.children&&B.children.length>0&&(w.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),w.id="id"+g.value,(y=D.value)==null||y.forEach(S=>{const ye=At==null?void 0:At.find(Ze=>(Ze==null?void 0:Ze.label)===(S==null?void 0:S.label));ye?w[ye.key]=S.value:S!=null&&S.children&&S.children.length>0&&(w.children=S.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"add"})}f.value="",D.value=[],C.value=[]},K=()=>{d.value=!1,f.value="",u.value="",D.value=[],C.value=[]},le=w=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",w),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,R)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(B,S)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(B.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>L(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>V(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>le(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(Cr,{tableChildContents:B==null?void 0:B.children,onDeleteChange:Y,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Zt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:q},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=Kt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),k=Be.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(k),f=e.ref(""),D=e.ref([]),C=e.ref([]),V=w=>{r("fixChange",v.cloneDeep(w))},F=w=>{var y;d.value=!0;let R=[];At==null||At.forEach(B=>{let S=v.cloneDeep(g.value)+1;k.setTableIndex(S),R.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:w[B.key],id:g.value,contents:B==null?void 0:B.options})}),w!=null&&w.children&&((y=w==null?void 0:w.children)==null?void 0:y.length)>0&&R.push({children:w==null?void 0:w.children,isFormColHidden:!0}),f.value=w==null?void 0:w.id,D.value=R,C.value=R},Y=w=>{d.value=!0;let R=[];At==null||At.forEach(y=>{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),R.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=w==null?void 0:w.id,D.value=R,C.value=R},L=w=>{let R=v.cloneDeep(C.value);R=R==null?void 0:R.map(y=>(y.children||(y.value=w==null?void 0:w[y.name]),y)),C.value=R},we=()=>{var R,y;D.value=C.value;let w={};if(f.value!=="")w.id=f.value,(R=D.value)==null||R.forEach(B=>{const S=At==null?void 0:At.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));S?w[S.key]=B.value:B!=null&&B.children&&B.children.length>0&&(w.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),w.id="idChild"+g.value,(y=D.value)==null||y.forEach(S=>{const ye=At==null?void 0:At.find(Ze=>(Ze==null?void 0:Ze.label)===(S==null?void 0:S.label));ye?w[ye.key]=S.value:S!=null&&S.children&&S.children.length>0&&(w.children=S.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"add"})}f.value="",D.value=[],C.value=[]},q=()=>{d.value=!1,f.value="",u.value="",D.value=[],C.value=[]},K=w=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",w),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=w=>{r("deleteChange",w)};return(w,R)=>{const y=e.resolveComponent("svg-icon"),B=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(S,ye)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(S.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>Y(S)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>F(S)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>K(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:S==null?void 0:S.children,onDeleteChange:le,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Zt.ssDialog,{visible:d.value,onBeforeDestroy:q,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:L},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(B,{onClick:q,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(B,{class:"ok-button button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Cr=Kt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},Li={class:"fix-content"},zi={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),k=e.ref(!1),g=e.ref([]),f=e.ref(!1),D=e.ref([]),C=e.ref(!1),V=e.ref([]),F=e.ref(""),Y=e.ref(""),L=e.ref([]),we=e.ref([]),q=e.ref([]),K=e.ref([]),le=e.ref(!1),w=e.ref([]),R=e.ref([]),y=e.ref(0),B=e.ref([]),S=e.ref([]),ye=e.ref([]),Ze=()=>{le.value=!0;let h=[];Ca==null||Ca.forEach(_=>{y.value++,h.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:(_==null?void 0:_.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:_==null?void 0:_.options})}),w.value=h,R.value=h},rt=()=>{var _,I,W;k.value=!0;let h=[];(W=(I=(_=Be.FormContent)==null?void 0:_.find(x=>(x==null?void 0:x.key)==="Input"))==null?void 0:I.value)==null||W.forEach(x=>{y.value++,h.push({label:x==null?void 0:x.label,name:(x==null?void 0:x.name)||(x==null?void 0:x.label),type:x.type,value:(x==null?void 0:x.label)==="类型"?"Input":"",id:y.value,contents:x==null?void 0:x.options})}),B.value=h,S.value=h},Ae=h=>{h||(B.value=S.value)},je=async h=>{var _,I,W,x,ie,_e,E,te,$,P,Ee,ne;if((h==null?void 0:h.类型)!==((I=(_=S.value)==null?void 0:_.find(H=>(H==null?void 0:H.label)==="类型"))==null?void 0:I.value)){let H=[],Q=await((ie=(x=(W=Be.FormContent)==null?void 0:W.find(de=>(de==null?void 0:de.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:x.value)==null?void 0:ie.value)?await((P=($=(te=Be.FormContent)==null?void 0:te.find(de=>(de==null?void 0:de.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:$.value)==null?void 0:P.value):(E=(_e=Be.FormContent)==null?void 0:_e.find(de=>(de==null?void 0:de.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:E.value;if(Q==null||Q.forEach(de=>{y.value++,H.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:de!=null&&de.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[de.label])??"",id:y.value,contents:de==null?void 0:de.options,prop:(de==null?void 0:de.prop)||(de==null?void 0:de.name)||(de==null?void 0:de.label)})}),h!=null&&h.菜单选项&&((Ee=h==null?void 0:h.菜单选项)==null?void 0:Ee.length)>0){const de=await Be.menuToContentType(h==null?void 0:h.菜单选项);H=H==null?void 0:H.map(De=>((De==null?void 0:De.name)==="组信息选项"&&(De.contents=de),De))}S.value=await Be.selectToBase(v.cloneDeep(H)),B.value=await Be.selectToBase(v.cloneDeep(H))}else{let H=v.cloneDeep(B.value);if(H=H==null?void 0:H.map(Q=>(Q.value=h==null?void 0:h[Q.name],Q)),h!=null&&h.菜单选项&&((ne=h==null?void 0:h.菜单选项)==null?void 0:ne.length)>0){const Q=await Be.menuToContentType(h==null?void 0:h.菜单选项);H=H==null?void 0:H.map(de=>((de==null?void 0:de.name)==="组信息选项"&&(de.contents=Q),de))}H=Be.formToOptionsContents(H),S.value=await Be.selectToBase(v.cloneDeep(H))}},Ie=async h=>{await je(h),B.value=S.value},O=(h,_)=>{if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=_==null?void 0:_.optionUrl;return(I==null?void 0:I.selectRelateType)||_[h.key]}if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=_==null?void 0:_.optionUrl;return(I==null?void 0:I.menuSelect)||_[h.key]}if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=_==null?void 0:_.optionUrl;return(I==null?void 0:I.groupSelect)||_[h.key]}if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(_==null?void 0:_.value)||_[h.key];if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=_[h.key];return mr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&_[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!_[h.key]?!1:_[h.key]},ee=async h=>{var W,x,ie,_e,E,te,$,P,Ee;k.value=!0;let _=[];const I=await((ie=(x=(W=Be.FormContent)==null?void 0:W.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:x.value)==null?void 0:ie.value)?await((P=($=(te=Be.FormContent)==null?void 0:te.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:$.value)==null?void 0:P.value):(E=(_e=Be.FormContent)==null?void 0:_e.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:E.value;if(I==null||I.forEach(ne=>{y.value++,_.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:(ne==null?void 0:ne.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):O(ne,h),id:y.value,contents:ne==null?void 0:ne.options})}),h!=null&&h.menuSelect&&((Ee=h==null?void 0:h.menuSelect)==null?void 0:Ee.length)>0){const ne=await Be.menuToContentType(h==null?void 0:h.menuSelect);_=_==null?void 0:_.map(H=>((H==null?void 0:H.name)==="组信息选项"&&(H.contents=ne),H))}F.value=h==null?void 0:h.id,B.value=await Be.selectToBase(Be.formToOptionsContents(_)),S.value=await Be.selectToBase(Be.formToOptionsContents(_))},se=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;ye.value=(_=v.cloneDeep(ye.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=ye.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{k.value=!1,B.value=[],F.value=""},Ge=async()=>{var W,x,ie,_e,E,te,$,P,Ee,ne;B.value=S.value;let h={};F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value);let _=await((ie=(x=(W=Be.FormContent)==null?void 0:W.find(H=>{var Q,de;return(H==null?void 0:H.key)===(((de=(Q=B.value)==null?void 0:Q.find(De=>(De==null?void 0:De.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:x.value)==null?void 0:ie.value)??((E=(_e=Be.FormContent)==null?void 0:_e.find(H=>{var Q,de;return(H==null?void 0:H.key)===(((de=(Q=B.value)==null?void 0:Q.find(De=>(De==null?void 0:De.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:E.value);if((te=B.value)==null||te.forEach(H=>{const Q=_==null?void 0:_.find(de=>(de==null?void 0:de.label)===(H==null?void 0:H.label));Q&&(h[Q.key]=H.value)}),h.name=h.label,($=ye.value)!=null&&$.find(H=>H.id===h.id))ye.value=(P=ye.value)==null?void 0:P.map(H=>(H.id===h.id&&(H=h),H));else{let H=v.cloneDeep(ye.value);ye.value||(ye.value=[]),H.push(h),ye.value=H}ye.value=ye.value.map(({id:H,...Q})=>Q),k.value=!1,F.value="";let I=v.cloneDeep(s.originalItemContents);(Ee=v.cloneDeep(s.originalItemContents))!=null&&Ee.find(H=>(H==null?void 0:H.key)==="tableToForm")?I=(ne=v.cloneDeep(s.originalItemContents))==null?void 0:ne.map(H=>((H==null?void 0:H.key)==="tableToForm"&&(H.contents=ye.value),H)):I.push({key:"tableToForm",contents:ye.value}),r("change",I)},it=h=>{le.value=!0;let _=[];Ca==null||Ca.forEach(I=>{y.value++,_.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),F.value=h==null?void 0:h.id,w.value=_,R.value=_};e.watch(()=>C.value,()=>{var _,I;let h=v.cloneDeep(s.originalItemContents);(_=v.cloneDeep(s.originalItemContents))!=null&&_.find(W=>(W==null?void 0:W.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="page"&&(W.contents=C.value),W)):h.push({key:"page",contents:C.value}),r("change",h)},{deep:!0});const J=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;we.value=(_=v.cloneDeep(we.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="extraButton"&&(W.contents=we.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var I,W,x,ie,_e;w.value=R.value;let h={};if(F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value),(I=w.value)==null||I.forEach(E=>{const te=Ca==null?void 0:Ca.find($=>($==null?void 0:$.label)===(E==null?void 0:E.label));te?h[te.key]=E.value:E!=null&&E.children&&E.children.length>0&&(h.children=E.children)}),(W=we.value)!=null&&W.find(E=>E.id===h.id))we.value=(x=we.value)==null?void 0:x.map(E=>(E.id===h.id&&(E=h),E));else{let E=v.cloneDeep(we.value)??[];E.push(h),we.value=E}le.value=!1,F.value="";let _=v.cloneDeep(s.originalItemContents);(ie=v.cloneDeep(s.originalItemContents))!=null&&ie.find(E=>(E==null?void 0:E.key)==="extraButton")?_=(_e=v.cloneDeep(s.originalItemContents))==null?void 0:_e.map(E=>((E==null?void 0:E.key)==="extraButton"&&(E.contents=we.value),E)):_.push({key:"extraButton",contents:we.value}),r("change",_)},xe=h=>{let _=v.cloneDeep(R.value);_=_==null?void 0:_.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),R.value=_},Ce=()=>{le.value=!1,w.value=[],F.value=""},Pe=h=>{f.value=!0;let _=[];_a==null||_a.forEach(I=>{y.value++,_.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),F.value=h==null?void 0:h.id,q.value=_,K.value=_},Fe=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;L.value=(_=v.cloneDeep(L.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="rowButton"&&(W.contents=L.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},qe=()=>{u.value=!0;let h=[];At==null||At.forEach(_=>{y.value++,h.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:y.value,contents:_==null?void 0:_.options})}),D.value=h,V.value=h},Xe=()=>{f.value=!0;let h=[];_a==null||_a.forEach(_=>{y.value++,h.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:y.value,contents:_==null?void 0:_.options})}),q.value=h,K.value=h},fe=h=>{let _=v.cloneDeep(K.value);_=_==null?void 0:_.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=_},z=()=>{var I,W,x,ie,_e;q.value=K.value;let h={};if(F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value),(I=q.value)==null||I.forEach(E=>{const te=_a==null?void 0:_a.find($=>($==null?void 0:$.label)===(E==null?void 0:E.label));te?h[te.key]=E.value:E!=null&&E.children&&E.children.length>0&&(h.children=E.children)}),(W=L.value)!=null&&W.find(E=>E.id===h.id))L.value=(x=L.value)==null?void 0:x.map(E=>(E.id===h.id&&(E=h),E));else{let E=v.cloneDeep(L.value);E.push(h),L.value=E}f.value=!1,F.value="";let _=v.cloneDeep(s.originalItemContents);(ie=v.cloneDeep(s.originalItemContents))!=null&&ie.find(E=>(E==null?void 0:E.key)==="rowButton")?_=(_e=v.cloneDeep(s.originalItemContents))==null?void 0:_e.map(E=>((E==null?void 0:E.key)==="rowButton"&&(E.contents=L.value),E)):_.push({key:"rowButton",contents:L.value}),r("change",_)},X=()=>{f.value=!1,F.value="",K.value=[],q.value=[]},pe=h=>{u.value=!0;let _=[];At==null||At.forEach(I=>{y.value++,_.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),D.value=_,Y.value=h==null?void 0:h.id,V.value=_},ce=h=>{var _;g.value=kr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(_=v.cloneDeep(s.originalItemContents))==null?void 0:_.map(I=>{var W;return(I==null?void 0:I.key)==="header"&&(I.contents=(W=g.value)!=null&&W.some(x=>x==null?void 0:x.children)?[g.value]:g.value),I}))},G=h=>{var I,W,x;h.type==="fix"?h.id!==""?g.value=wr(g.value,h):g.value=xr(g.value,h==null?void 0:h.contents):g.value=Dr(g.value,h),g.value=(I=g.value)!=null&&I.some(ie=>ie==null?void 0:ie.children)?[g.value]:g.value,F.value="";let _=v.cloneDeep(s.originalItemContents);(W=v.cloneDeep(s.originalItemContents))!=null&&W.find(ie=>(ie==null?void 0:ie.key)==="header")?_=(x=v.cloneDeep(s.originalItemContents))==null?void 0:x.map(ie=>((ie==null?void 0:ie.key)==="header"&&(ie.contents=g.value),ie)):_.push({key:"header",contents:g.value}),r("change",_)},ae=h=>{var I;u.value=!0;let _=[];At==null||At.forEach(W=>{y.value++,_.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:h[W.key],id:y.value,contents:W==null?void 0:W.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&_.push({children:h==null?void 0:h.children,isFormColHidden:!0}),F.value=h==null?void 0:h.id,Y.value="",D.value=_,V.value=_},Z=h=>{let _=v.cloneDeep(V.value);_=_==null?void 0:_.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),V.value=_},re=()=>{u.value=!1,F.value="",Y.value="",V.value=[]},Re=()=>{var I,W,x,ie,_e,E;D.value=V.value;let h={};if(F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(te=>{const $=At==null?void 0:At.find(P=>(P==null?void 0:P.label)===(te==null?void 0:te.label));$?h[$.key]=te.value:te!=null&&te.children&&te.children.length>0&&(h.children=te.children)}),(W=g.value)!=null&&W.find(te=>te.id===h.id))g.value=(x=g.value)==null?void 0:x.map(te=>(te.id===h.id&&(te=h),te));else{let te=v.cloneDeep(g.value)??[];Y.value===""?te.push(h):te=te==null?void 0:te.map($=>($.id===Y.value&&($.children||($.children=[]),$.children.push(h)),$)),g.value=te}g.value=(ie=g.value)!=null&&ie.some(te=>te==null?void 0:te.children)?[g.value]:g.value,u.value=!1,F.value="",Y.value="";let _=v.cloneDeep(s.originalItemContents);(_e=v.cloneDeep(s.originalItemContents))!=null&&_e.find(te=>(te==null?void 0:te.key)==="header")?_=(E=v.cloneDeep(s.originalItemContents))==null?void 0:E.map(te=>((te==null?void 0:te.key)==="header"&&(te.contents=g.value),te)):_.push({key:"header",contents:g.value}),r("change",_)},lt=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;g.value=(_=v.cloneDeep(g.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>{var x;return(W==null?void 0:W.key)==="header"&&(W.contents=(x=g.value)!=null&&x.some(ie=>ie==null?void 0:ie.children)?[g.value]:g.value),W})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(_=(h=d.value)==null?void 0:h.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:_.contents,L.value=(W=(I=d.value)==null?void 0:I.find(j=>(j==null?void 0:j.key)==="rowButton"))==null?void 0:W.contents,we.value=(ie=(x=d.value)==null?void 0:x.find(j=>(j==null?void 0:j.key)==="extraButton"))==null?void 0:ie.contents,C.value=(E=(_e=d.value)==null?void 0:_e.find(j=>(j==null?void 0:j.key)==="page"))!=null&&E.contents?!!(($=(te=d.value)==null?void 0:te.find(j=>(j==null?void 0:j.key)==="page"))!=null&&$.contents):!1,ye.value=(Ee=(P=d.value)==null?void 0:P.find(j=>(j==null?void 0:j.key)==="tableToForm"))==null?void 0:Ee.contents,g.value=(ne=g.value)==null?void 0:ne.map((j,Ne)=>(Array.isArray(j)?j=ri(j):j={label:(j==null?void 0:j.label)??"",prop:(j==null?void 0:j.label)==="操作"?"operate":j==null?void 0:j.prop,width:j!=null&&j.width?parseInt(j.width):"",fixed:(j==null?void 0:j.fixed)??void 0,sortable:(j==null?void 0:j.sortable)??!1,align:(j==null?void 0:j.align)??"left",showOverflowTooltip:(j==null?void 0:j.showOverflowTooltip)??!0,isNotDrag:(j==null?void 0:j.isNotDrag)??!1,isEditCol:(j==null?void 0:j.isEditCol)??!1,isOperate:(j==null?void 0:j.isOperate)??!1,id:(j==null?void 0:j.id)??Ne,formMenuSelect:(j==null?void 0:j.formMenuSelect)??void 0,groupSelect:(j==null?void 0:j.groupSelect)??void 0},j)),g.value=(H=g.value)!=null&&H.every(j=>Array.isArray(j))?(Q=g.value)==null?void 0:Q[0]:g.value,L.value=(de=L.value)==null?void 0:de.map((j,Ne)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",textColor:(j==null?void 0:j.textColor)??"#000000",id:(j==null?void 0:j.id)??Ne}),we.value=(De=we.value)==null?void 0:De.map((j,Ne)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",background:(j==null?void 0:j.background)??"var(--ssComponent-primary-color)",id:(j==null?void 0:j.id)??Ne}),ye.value)ye.value=(ke=ye.value)==null?void 0:ke.map(j=>{y.value++;let Ne=j;return Ne.id=y.value,Ne});else{let j=[];const Ne=(be=Be.getColumnChild(v.cloneDeep(g.value)))==null?void 0:be.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");Ne==null||Ne.forEach(ge=>{var Le;y.value++,j.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label),type:ge!=null&&ge.groupSelect?"Select":"Input",value:"",id:y.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(Le=ge==null?void 0:ge.groupSelect)==null?void 0:Le.split(":"),selectRelateType:"关联绑定列"})}),ye.value=j}},{deep:!0,immediate:!0}),(h,_)=>{const I=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[_[2]||(_[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(W,{class:"icon-content",onClick:qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[1]||(_[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>pe(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>ae(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>lt(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(Cr,{tableChildContents:x==null?void 0:x.children,onDeleteChange:ce,onFixChange:G},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[_[4]||(_[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[3]||(_[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",Li,[e.createElementVNode("div",zi,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:_e=>Pe(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>Fe(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[_[6]||(_[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Ze},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[5]||(_[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",ji,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:_e=>it(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>J(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[_[8]||(_[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:rt},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[7]||(_[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:_e=>ee(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>se(x)},null,8,["onClick"])])])]))),128))]),_[10]||(_[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[_[9]||(_[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:C.value,"onUpdate:modelValue":_[0]||(_[0]=x=>C.value=x)},null,8,["modelValue"])])])]),e.createVNode(Zt.ssDialog,{visible:u.value,onBeforeDestroy:re,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(W,{onClick:re,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[11]||(_[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(W,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>_[12]||(_[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:f.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:q.value,key:q.value,isEnableWrap:!0,onChange:fe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(W,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[13]||(_[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(W,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>_[14]||(_[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:le.value,onBeforeDestroy:Ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:xe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(W,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[15]||(_[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(W,{class:"ok-button button",onClick:M,id:"themeButton"},{default:e.withCtx(()=>_[16]||(_[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:k.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:je,onChangeVisible:Ae,onBlurChange:Ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(W,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[17]||(_[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(W,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>_[18]||(_[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=Kt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=Ut.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=Ut.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(k=n==null?void 0:n.value)==null?void 0:k.tableData)==null?void 0:g.y)||i,w:((D=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:D.w)||ds.value,h:((V=(C=n==null?void 0:n.value)==null?void 0:C.tableData)==null?void 0:V.h)||s,minW:((Y=(F=n==null?void 0:n.value)==null?void 0:F.tableData)==null?void 0:Y.minW)||ps.value,minH:((we=(L=n==null?void 0:n.value)==null?void 0:L.tableData)==null?void 0:we.minH)||vs.value,maxH:((K=(q=n==null?void 0:n.value)==null?void 0:q.tableData)==null?void 0:K.maxH)||hs.value,i:((w=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:w.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,k,g,f,D,C;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((k=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:k.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((C=(D=(f=n==null?void 0:n.compData)==null?void 0:f.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:D.contents)==null?void 0:C.length)/5);return s*2},_r=(n,i,s)=>{var k,g;const r=(g=(k=ss.value)==null?void 0:k[us.value])==null?void 0:g.filter(f=>{var D;return((D=f==null?void 0:f.key)==null?void 0:D.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var D,C,V;return((V=(C=(D=f==null?void 0:f.value)==null?void 0:D.tableData)==null?void 0:C.component)==null?void 0:V.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,D)=>_r(f,D))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},bs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var C;const f=bs(s==null?void 0:s.optionItems),D=g?(C=f[g==null?void 0:g.toUpperCase()])==null?void 0:C[s==null?void 0:s.target]:[];d.value=D==null?void 0:D.map(V=>{for(const[F,Y]of Object.entries((s==null?void 0:s.comp)||{}))if((V==null?void 0:V.prop)===F)return{...V,value:Y};return V})},{immediate:!0});const u=g=>Bt.getComponent(g),k=g=>{var f,D;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(C=>{var V;return(C==null?void 0:C.prop)==="isStepLayout"?{...C,options:(V=C==null?void 0:C.options)==null?void 0:V.map(F=>({...F,disabled:!0}))}:(C==null?void 0:C.prop)==="isGridLayout"?{...C,disabled:!0}:C}):d.value=(D=d.value)==null?void 0:D.map(C=>{var V;return(C==null?void 0:C.prop)==="isStepLayout"?{...C,options:(V=C==null?void 0:C.options)==null?void 0:V.map(F=>({...F,disabled:!1}))}:(C==null?void 0:C.prop)==="isGridLayout"?{...C,disabled:!1}:C}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const D=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createBlock(C,{class:"style-row",key:V==null?void 0:V.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V==null?void 0:V.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(V.type)),{modelValue:V.value,"onUpdate:modelValue":F=>V.value=F,content:V==null?void 0:V.options,optionUrl:V==null?void 0:V.optionUrl,disabled:V==null?void 0:V.disabled,activeText:V==null?void 0:V.activeText,inactiveText:V==null?void 0:V.inactiveText,onChange:F=>k(V)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=Kt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),k=K=>K==null?void 0:K.reduce((le,w)=>(le[w==null?void 0:w.prop]=w==null?void 0:w.rule,le),{}),g=e.computed(()=>({formRules:k(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),D=e.ref(""),C=(K,le,w)=>{var B;let R=[];(s==null?void 0:s.activeTabName)==="任务配置"?(R=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:le}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(R=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(B=s==null?void 0:s.relatedData)==null?void 0:B.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return w&&(w==null?void 0:w.length)>0?y=[...R,...V(K,le,w)]:y=R,y},V=(K,le,w)=>{const R=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return w?R==null?void 0:R.filter(y=>w==null?void 0:w.includes(y==null?void 0:y.prop)):R},F=(K,le)=>{var S,ye,Ze,rt,Ae,je,Ie,O,ee;const w=((Ae=(rt=(Ze=(ye=(S=s==null?void 0:s.comp)==null?void 0:S.compData)==null?void 0:ye.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Ze.contents)==null?void 0:rt.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:Ae.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],R=/button/i,y=((ee=(O=(Ie=(je=s==null?void 0:s.comp)==null?void 0:je.compData)==null?void 0:Ie.filter(se=>R.test(se==null?void 0:se.key)))==null?void 0:O.flatMap(se=>se==null?void 0:se.contents))==null?void 0:ee.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],B=C(w,y,K);f.value=le?ks(B,le):B,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{F(null,s==null?void 0:s.extendItem)});const Y=K=>{const le=K==null?void 0:K[D.value];if(D.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const w=le==null?void 0:le.join("/");F(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,K)}},L=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},we=(K,le)=>{D.value=le==null?void 0:le.changeProp,Y(K)},q=K=>{r("onButtonClick",K)};return(K,le)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:L,onBlurChange:we,onOnButtonClick:q},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=Kt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=Kt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},Ls={class:"fix-content"},zs={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},Ks={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),k=e.ref([]),g=e.ref(!1),f=e.ref([]),D=e.ref([]),C=e.ref(""),V=e.ref(!1),F=e.ref(0),Y=e.ref([]),L=e.ref([]),we=(O,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="selectRelateType"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.selectRelateType)||ee[O.key]}if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="menuSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.menuSelect)||ee[O.key]}if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="groupSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.groupSelect)||ee[O.key]}if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[O.key];if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="multiple"){const se=ee[O.key];return mr(se)?se:O.default}return(O==null?void 0:O.label)==="类型"&&ee[O.key]===""?"Input":(O==null?void 0:O.key)==="isFormColHidden"&&!ee[O.key]?!1:ee[O.key]},q=async O=>{var he,Ge,it,J,M,xe;d.value=!0;let ee=[];const se=await((it=(Ge=(he=Be.FormContent)==null?void 0:he.find(Ce=>(Ce==null?void 0:Ce.key)===((O==null?void 0:O.type)===""?"Input":O==null?void 0:O.type)))==null?void 0:Ge.value)==null?void 0:it.value)??((M=(J=Be.FormContent)==null?void 0:J.find(Ce=>(Ce==null?void 0:Ce.key)===((O==null?void 0:O.type)===""?"Input":O==null?void 0:O.type)))==null?void 0:M.value);if(se==null||se.forEach(Ce=>{F.value++,ee.push({label:Ce==null?void 0:Ce.label,name:Ce==null?void 0:Ce.label,type:Ce.type,prop:Ce==null?void 0:Ce.prop,value:we(Ce,O),id:F.value,contents:Ce==null?void 0:Ce.options,width:(O==null?void 0:O.width)??1})}),O!=null&&O.menuSelect&&((xe=O==null?void 0:O.menuSelect)==null?void 0:xe.length)>0){const Ce=await Be.menuToContentType(O==null?void 0:O.menuSelect);ee=ee==null?void 0:ee.map(Pe=>((Pe==null?void 0:Pe.name)==="组信息选项"&&(Pe.contents=Ce),Pe))}C.value=O==null?void 0:O.id,u.value=await Be.selectToBase(Be.formToOptionsContents(ee)),k.value=await Be.selectToBase(Be.formToOptionsContents(ee))},K=O=>{var se;g.value=!0;let ee=[];(se=Be.FormButton)==null||se.forEach(he=>{F.value++,ee.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:(he==null?void 0:he.label)==="类型"&&O[he.key]===""?"normal":O[he.key],id:F.value,contents:he==null?void 0:he.options})}),Y.value=ee,L.value=ee,C.value=O==null?void 0:O.id};e.watch(()=>V.value,()=>{var ee,se;let O=v.cloneDeep(s.originalItemContents);(ee=v.cloneDeep(s.originalItemContents))!=null&&ee.find(he=>(he==null?void 0:he.key)==="enableWrap")?O=(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!V.value),he)):O.push({key:"enableWrap",contents:!V.value}),r("change",O)},{deep:!0});const le=()=>{var se,he,Ge,it,J;Y.value=L.value;let O={};if(C.value!==""?O.id=C.value:(F.value++,O.id="id"+F.value),(se=Y.value)==null||se.forEach(M=>{var Ce;const xe=(Ce=Be.FormButton)==null?void 0:Ce.find(Pe=>(Pe==null?void 0:Pe.label)===(M==null?void 0:M.label));xe&&(O[xe.key]=M.value)}),(he=f.value)!=null&&he.find(M=>M.id===O.id))f.value=(Ge=f.value)==null?void 0:Ge.map(M=>(M.id===O.id&&(M=O),M));else{let M=v.cloneDeep(f.value);f.value||(f.value=[]),M.push(O),f.value=M}g.value=!1,C.value="";let ee=v.cloneDeep(s.originalItemContents);(it=v.cloneDeep(s.originalItemContents))!=null&&it.find(M=>(M==null?void 0:M.key)==="formButton")?ee=(J=v.cloneDeep(s.originalItemContents))==null?void 0:J.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=f.value),M)):ee.push({key:"formButton",contents:f.value}),r("change",ee)},w=O=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;D.value=(ee=v.cloneDeep(D.value))==null?void 0:ee.filter(he=>(he==null?void 0:he.id)!==(O==null?void 0:O.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=D.value),he))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=O=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;f.value=(ee=v.cloneDeep(f.value))==null?void 0:ee.filter(he=>(he==null?void 0:he.id)!==(O==null?void 0:O.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=f.value),he))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ee;g.value=!0;let O=[];(ee=Be.FormButton)==null||ee.forEach(se=>{F.value++,O.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"?"normal":"",id:F.value,contents:se==null?void 0:se.options})}),Y.value=O,L.value=O},B=()=>{var ee,se,he;d.value=!0;let O=[];(he=(se=(ee=Be.FormContent)==null?void 0:ee.find(Ge=>(Ge==null?void 0:Ge.key)==="Input"))==null?void 0:se.value)==null||he.forEach(Ge=>{F.value++,O.push({label:Ge==null?void 0:Ge.label,name:Ge==null?void 0:Ge.label,type:Ge.type,value:(Ge==null?void 0:Ge.label)==="类型"?"Input":"",id:F.value,contents:Ge==null?void 0:Ge.options})}),u.value=O,k.value=O},S=O=>{let ee=v.cloneDeep(L.value);ee=ee==null?void 0:ee.map(se=>(se.value=O==null?void 0:O[se.name],se)),L.value=ee},ye=O=>{const ee=O.find(Ge=>(Ge==null?void 0:Ge.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const se=O.find(Ge=>(Ge==null?void 0:Ge.name)==="多选"),he=O.find(Ge=>(Ge==null?void 0:Ge.name)==="初始值");se!=null&&se.value&&Bo.isString(he.value)&&(he.value=[he.value]),!(se!=null&&se.value)&&!Bo.isString(he.value)&&(he.value="")},Ze=async O=>{var ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe;if((O==null?void 0:O.类型)!==((se=(ee=k.value)==null?void 0:ee.find(Xe=>(Xe==null?void 0:Xe.label)==="类型"))==null?void 0:se.value)){let Xe=[];const fe=await((it=(Ge=(he=Be.FormContent)==null?void 0:he.find(z=>(z==null?void 0:z.key)===((O==null?void 0:O.类型)===""?"Input":O==null?void 0:O.类型)))==null?void 0:Ge.value)==null?void 0:it.value)?await((Pe=(Ce=(xe=Be.FormContent)==null?void 0:xe.find(z=>(z==null?void 0:z.key)===((O==null?void 0:O.类型)===""?"Input":O==null?void 0:O.类型)))==null?void 0:Ce.value)==null?void 0:Pe.value):(M=(J=Be.FormContent)==null?void 0:J.find(z=>(z==null?void 0:z.key)===((O==null?void 0:O.类型)===""?"Input":O==null?void 0:O.类型)))==null?void 0:M.value;if(fe==null||fe.forEach(z=>{var pe,ce;F.value++;const X=yr(z==null?void 0:z.default)?(O==null?void 0:O[z.label])??z.value??"":z==null?void 0:z.default;Xe.push({label:z==null?void 0:z.label,name:z==null?void 0:z.label,type:z.type,value:X,prop:z==null?void 0:z.prop,id:F.value,contents:z==null?void 0:z.options,width:((ce=(pe=k.value)==null?void 0:pe[0])==null?void 0:ce.width)??1})}),O!=null&&O.菜单选项&&((Fe=O==null?void 0:O.菜单选项)==null?void 0:Fe.length)>0){const z=await Be.menuToContentType(O==null?void 0:O.菜单选项);Xe=Xe==null?void 0:Xe.map(X=>((X==null?void 0:X.name)==="组信息选项"&&(X.contents=z),X))}ye(Xe),k.value=await Be.selectToBase(v.cloneDeep(Xe)),u.value=await Be.selectToBase(v.cloneDeep(Xe))}else{let Xe=v.cloneDeep(k.value);if(Xe=Xe==null?void 0:Xe.map(fe=>(fe.value=O==null?void 0:O[fe.name],fe)),O!=null&&O.菜单选项&&((qe=O==null?void 0:O.菜单选项)==null?void 0:qe.length)>0){const fe=await Be.menuToContentType(O==null?void 0:O.菜单选项);Xe=Xe==null?void 0:Xe.map(z=>((z==null?void 0:z.name)==="组信息选项"&&(z.contents=fe),z))}Xe=Be.formToOptionsContents(Xe),ye(Xe),k.value=await Be.selectToBase(v.cloneDeep(Xe))}},rt=O=>{O||(u.value=k.value)},Ae=async O=>{await Ze(O),u.value=k.value},je=vo(async()=>{var he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe;u.value=k.value;let O={};O.width=((Ge=(he=u.value)==null?void 0:he[0])==null?void 0:Ge.width)??1,C.value!==""?O.id=C.value:(F.value++,O.id="id"+F.value);let ee=await((M=(J=(it=Be.FormContent)==null?void 0:it.find(z=>{var X,pe;return(z==null?void 0:z.key)===(((pe=(X=u.value)==null?void 0:X.find(ce=>(ce==null?void 0:ce.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:J.value)==null?void 0:M.value)??((Ce=(xe=Be.FormContent)==null?void 0:xe.find(z=>{var X,pe;return(z==null?void 0:z.key)===(((pe=(X=u.value)==null?void 0:X.find(ce=>(ce==null?void 0:ce.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Ce.value);if((Pe=u.value)==null||Pe.forEach(z=>{const X=ee==null?void 0:ee.find(pe=>(pe==null?void 0:pe.label)===(z==null?void 0:z.label));X&&(O[X.key]=z.value)}),O.width=O.width?O.width:1,O.key=O==null?void 0:O.label,O.isFormColHidden=O==null?void 0:O.isFormColHidden,(Fe=D.value)!=null&&Fe.find(z=>z.id===O.id))D.value=(qe=D.value)==null?void 0:qe.map(z=>(z.id===O.id&&(z=O),z));else{let z=v.cloneDeep(D.value);z.push(O),D.value=z}D.value=D.value.map(({id:z,...X})=>X),d.value=!1,C.value="";let se=v.cloneDeep(s.originalItemContents);(Xe=v.cloneDeep(s.originalItemContents))!=null&&Xe.find(z=>(z==null?void 0:z.key)==="formContent")?se=(fe=v.cloneDeep(s.originalItemContents))==null?void 0:fe.map(z=>((z==null?void 0:z.key)==="formContent"&&(z.contents=D.value),z)):se.push({key:"formContent",contents:D.value}),r("change",se)},300),Ie=()=>{d.value=!1,g.value=!1,C.value="",k.value=[],L.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ee,se,he,Ge,it,J;if(!s.originalItemContents||s.originalItemContents.length===0)return;const O=v.cloneDeep(s.originalItemContents);D.value=((ee=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:ee.contents)??[],f.value=((se=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:se.contents)??[],V.value=(he=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&he.contents?!((Ge=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ge.contents):!0,D.value=(it=v.cloneDeep(D.value))==null?void 0:it.map((M,xe)=>{var Pe;let Ce=M;return Ce.id=(M==null?void 0:M.id)??xe,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((Pe=M==null?void 0:M.options)==null?void 0:Pe.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,Ce}),D.value=Be.formToOptionsContents(D.value),f.value=(J=f.value)==null?void 0:J.map((M,xe)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:xe})},{deep:!0,immediate:!0}),(O,ee)=>{const se=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:B},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ge,it)=>(e.openBlock(),e.createElementBlock("div",{key:it},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Ge.label),1),e.createElementVNode("div",Vs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>q(Ge)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>w(Ge)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ge,it)=>(e.openBlock(),e.createElementBlock("div",{key:it},[e.createElementVNode("div",Ls,[e.createElementVNode("div",null,e.toDisplayString(Ge.label),1),e.createElementVNode("div",zs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>K(Ge)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>R(Ge)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:V.value,"onUpdate:modelValue":ee[0]||(ee[0]=Ge=>V.value=Ge)},null,8,["modelValue"])])]),e.createVNode(Zt.ssDialog,{visible:d.value,onBeforeDestroy:Ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Ze,onChangeVisible:rt,onBlurChange:Ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(he,{onClick:Ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(je),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:g.value,onBeforeDestroy:Ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:Y.value,key:Y.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ie,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Lo=Kt._export_sfc(Ks,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),k=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),D=e.ref({}),C=e.ref([]),V=q=>{var K;D.value=q,r("change",(K=L())==null?void 0:K.compData)},F=(q,K)=>{var le,w;switch(q){case"create":(le=u.value)==null||le.forEach(R=>{R.value=""}),f.value="create",g.visible=!0;break;case"update":(w=u.value)==null||w.forEach(R=>{R.value=K[R==null?void 0:R.prop]}),f.value="update",g.visible=!0;break;case"delete":C.value.splice(K,1),f.value="delete";break}},Y=q=>{var K,le,w;if((q==null?void 0:q.buttonName)==="确认"){const R=v.cloneDeep(q==null?void 0:q.content);switch(Object.keys(R).forEach(y=>{R[y]===""&&delete R[y]}),f.value){case"create":C.value.push({...R,index:((K=C.value)==null?void 0:K.length)+1});break;case"update":C.value=(le=C.value)==null?void 0:le.map(y=>y.index===(R==null?void 0:R.index)?{...y,title:R==null?void 0:R.title,description:R==null?void 0:R.description}:y);break}r("change",(w=L())==null?void 0:w.compData),g.visible=!1}else g.visible=!1},L=()=>({comp:"Step",compData:[{key:"stepList",contents:C.value},{key:"stepConfig",contents:D.value}]}),we=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,le;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="stepConfig"))==null?void 0:K.contents)??{},C.value=((le=q==null?void 0:q.find(w=>w.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(q,K)=>{const le=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:B=>F("update",{...R,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:B=>F("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:d.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Zt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:we,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:Y},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=Kt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),k=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),C=e.reactive({visible:!1,width:"40%",title:"时间线"}),V=q=>{var K;u.value=q,r("change",(K=L())==null?void 0:K.compData)},F=(q,K)=>{var le,w;switch(q){case"create":(le=f.value)==null||le.forEach(R=>{R.value=""}),d.value="create",C.visible=!0;break;case"update":(w=f.value)==null||w.forEach(R=>{R.value=K[R==null?void 0:R.prop]}),d.value="update",C.visible=!0;break;case"delete":k.value.splice(K,1),d.value="delete";break}},Y=q=>{var K,le,w,R;if((q==null?void 0:q.buttonName)==="确认"){const y=v.cloneDeep(q==null?void 0:q.content);switch(Object.keys(y).forEach(B=>{y[B]===""&&delete y[B]}),d.value){case"create":(le=k.value)==null||le.push({...y,index:((K=k.value)==null?void 0:K.length)+1});break;case"update":k.value=(w=k.value)==null?void 0:w.map(B=>B.index===(y==null?void 0:y.index)?{...B,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:B);break}r("change",(R=L())==null?void 0:R.compData),C.visible=!1}else C.visible=!1},L=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:k.value},{key:"timeLineConfig",contents:u.value}]}),we=()=>{C.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,le;q&&(u.value=((K=q==null?void 0:q.find(w=>w.key==="timeLineConfig"))==null?void 0:K.contents)??{},k.value=((le=q==null?void 0:q.find(w=>w.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(q,K)=>{const le=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:B=>F("update",{...R,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:B=>F("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:g.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Zt.ssDialog,{visible:C.visible,title:C.title,onBeforeDestroy:we,width:C.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:Y},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=Kt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=Kt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),k=i,g=e.ref(!1),f=e.ref({}),D=e.ref({}),C=e.ref();e.watch(()=>[s.itemData],()=>{var R;const w=v.cloneDeep(s.itemData);d.value=(R=v.cloneDeep(w))==null?void 0:R.map(y=>{var B;if(y.key==="extra"){let S=[];(B=y.value)==null||B.forEach(ye=>{var Ze;S.push((Ze=Object.values(ye))==null?void 0:Ze[0])}),y.value=S}return y})},{deep:!0,immediate:!0});const V=(w,R,y,B)=>{var ye;let S={};((ye=w==null?void 0:w[0])==null?void 0:ye.contents)==="详情"&&(g.value=!0,S[R]=w,u.value=w==null?void 0:w.filter(Ze=>(Ze==null?void 0:Ze.key)!=="tableContentName"),f.value=S,D.value=y,C.value=B.id)},F=w=>{var Ze,rt,Ae,je;const R=(rt=(Ze=Object.values(v.cloneDeep(f.value)))==null?void 0:Ze[0])==null?void 0:rt.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableContentName"),y=(je=(Ae=Object.values(v.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:je.filter(Ie=>(Ie==null?void 0:Ie.key)!=="tableContentName"),B=y==null?void 0:y.map((Ie,O)=>{var ee;return O===w.index&&(Ie==null?void 0:Ie.comp)==="Table"&&(Ie.compData=(ee=Ie.compData)==null?void 0:ee.map(se=>{var he,Ge;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Ge=(he=w.content)==null?void 0:he.map(it=>{let J={};for(let M in it)M!=="id"&&(J[M]=it[M]);return J}))==null?void 0:Ge.map(it=>Object.values(it))),se})),Ie});B.unshift(R==null?void 0:R[0]);let S=v.cloneDeep(f.value),ye={};for(let Ie in S)ye[Ie]=B;f.value=ye},Y=()=>{g.value=!1,f.value={},D.value={},C.value=void 0,r.value++},L=w=>{var Ze,rt,Ae,je;const R=(rt=(Ze=Object.values(v.cloneDeep(f.value)))==null?void 0:Ze[0])==null?void 0:rt.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableContentName"),y=(je=(Ae=Object.values(v.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:je.filter(Ie=>(Ie==null?void 0:Ie.key)!=="tableContentName"),B=y==null?void 0:y.map((Ie,O)=>(O===w.index&&(Ie.compData=w.contents),Ie));B.unshift(R==null?void 0:R[0]);let S=v.cloneDeep(f.value),ye={};for(let Ie in S)ye[Ie]=B;f.value=ye},we=()=>{var R,y;let w={};for(let B in D.value)B===((R=Object.keys(f.value))==null?void 0:R[0])?w[B]=(y=Object.values(f.value))==null?void 0:y[0]:w[B]=D.value[B];k("change",{buttonName:"编辑",index:C.value,singleContent:w},"methodData"),g.value=!1,f.value={},D.value={},C.value=void 0},q=()=>{g.value=!1,f.value={},D.value={},C.value=void 0},K=w=>{k("change",w,"methodData")},le=w=>rn(w);return(w,R)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(B,S)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(B==null?void 0:B.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,key:S,index:(B==null?void 0:B.id)??S,onContentClick:V,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Zt.ssDialog,{visible:g.value,onBeforeDestroy:q},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,onChange:F,childItemData:B==null?void 0:B.itemChildData,key:S,onContentChange:L,index:(B==null?void 0:B.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:Y,id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=Kt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Be.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),k=e.ref(),g=Be.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),D=Ut.useModelComp(v.pinia),C=e.ref(!1),V=Ut.useMenuState(v.pinia),F=v.useLoginState(v.pinia),{itemData:Y,isEdit:L,routeToChildPath:we,tableViewContents:q,lockingPage:K,payloadTypes:le}=v.storeToRefs(D),{activeMenuPath:w,platform:R,childMenu:y}=v.storeToRefs(V),{loginUserInfo:B}=v.storeToRefs(F),S=e.ref(!1),ye=async()=>{var J,M;(J=i.value)!=null&&J.find(xe=>(xe==null?void 0:xe.buttonName)==="保存")&&await se((M=i.value)==null?void 0:M.find(xe=>(xe==null?void 0:xe.buttonName)==="保存")),await Be.onSaveBack()};e.watch(()=>Y.value,async()=>{L.value==="view"&&!S.value&&await it(v.cloneDeep(d.itemData)),S.value=!1},{deep:!0});const Ze=()=>{u.value=!1,k.value=void 0},rt=J=>J.map(M=>{const xe={};for(const Ce in M){const Pe=M[Ce];if(Ce.includes(f.value)){const Fe=Ce.split(f.value);let qe=xe;Fe.forEach((Xe,fe)=>{fe===Fe.length-1?qe[Xe]=Pe:(qe[Xe]||(qe[Xe]={}),qe=qe[Xe])})}else xe[Ce]=Pe}return xe}),Ae=async(J,M,xe=[])=>{var Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt;let Ce=(Pe=v.cloneDeep(M))==null?void 0:Pe.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(J!=null&&J.includes("[")){let h=(z=(fe=(Xe=(qe=(Fe=v.cloneDeep(J))==null?void 0:Fe.split("["))==null?void 0:qe[1])==null?void 0:Xe.split("]"))==null?void 0:fe[0])==null?void 0:z.split(":"),_="";if(h!=null&&h[0]){let I=(X=Ce==null?void 0:Ce.find(W=>(W==null?void 0:W.name)===(h==null?void 0:h[0])))==null?void 0:X.compData;if(!I){let W=(pe=J==null?void 0:J.split("["))==null?void 0:pe[0],x=await Be.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",xe);I=(ce=x==null?void 0:x.find(ie=>(ie==null?void 0:ie.name)===(h==null?void 0:h[0])))==null?void 0:ce.compData}I==null||I.forEach(W=>{var x,ie,_e,E,te,$;if((W==null?void 0:W.key)==="formContent")(x=W==null?void 0:W.contents)==null||x.forEach(P=>{var Ee;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?_=P==null?void 0:P.value:_=(Ee=P==null?void 0:P.value)==null?void 0:Ee.toString())});else if((W==null?void 0:W.key)==="tableContents"){let P=[],Ee=(ie=I==null?void 0:I.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:ie.contents,ne=(h==null?void 0:h[1])??"";if(Ee!=null&&Ee.every(H=>Array.isArray(H))){let H=Be.getColumnChild((te=Ee==null?void 0:Ee[0])==null?void 0:te.filter(Q=>(Q==null?void 0:Q.label)!=="操作"));($=W.contents)==null||$.forEach(Q=>{let de={};Q=Q==null?void 0:Q.filter(De=>!(De!=null&&De.id)),H==null||H.forEach((De,be)=>{let ke=Q[be];typeof Q[be]=="number"&&(ke=Q[be].toString()),(ne===""||ne===De.prop)&&(de[De.prop]=ke)}),P.push(de)}),P=rt(P)}else{let H=(_e=Ee==null?void 0:Ee.map(Q=>Q==null?void 0:Q.label))==null?void 0:_e.filter(Q=>Q!=="操作");(E=W.contents)==null||E.forEach(Q=>{let de={};Q=Q==null?void 0:Q.filter(De=>!(De!=null&&De.id)),H==null||H.forEach((De,be)=>{let ke=Q[be];typeof Q[be]=="number"&&(ke=Q[be].toString()),(ne===""||ne===De)&&(de[De]=ke)}),P.push(de)})}_=P}})}return _}else if(J!=null&&J.includes("/")){let h={};return(G=v.cloneDeep(Ce))==null||G.forEach((_,I)=>{var W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge;if((_==null?void 0:_.comp)==="Table"){let Le=Array.isArray((ie=(x=(W=_==null?void 0:_.compData)==null?void 0:W.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:x.contents)==null?void 0:ie[0])?($=(te=(E=(_e=_==null?void 0:_.compData)==null?void 0:_e.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:E.contents)==null?void 0:te[0])==null?void 0:$.some(Oe=>Oe==null?void 0:Oe.children):[],ct=(ne=(Ee=(P=_==null?void 0:_.compData)==null?void 0:P.find(Oe=>(Oe==null?void 0:Oe.key)==="tableContents"))==null?void 0:Ee.contents)==null?void 0:ne.map(Oe=>(Oe!=null&&Oe.find(gt=>gt==null?void 0:gt.id)&&(Oe=Oe.slice(1)),Oe)),Ue=(be=(De=(de=(Q=(H=_==null?void 0:_.compData)==null?void 0:H.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:Q.contents)==null?void 0:de[0])==null?void 0:De[0])==null?void 0:be.label,ot=(j=(ke=_==null?void 0:_.compData)==null?void 0:ke.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:j.contents;if(Le)(Le==null?void 0:Le.length)===0?h[_.name]=h!=null&&h[_.name]?h[_.name]:Be.tableToForm(ct,ot):h[Ue]=Be.tableToForm(ct,ot);else{const Oe=[];ot=ot.slice(1,ot.length-1),ot==null||ot.forEach((gt,tt)=>{ct==null||ct.forEach(Ve=>{Oe.push({key:gt.label+Ve[0],value:Ve[tt+1]})})}),h["form"+I]=Oe}}else{const Le=(ge=(Ne=_.compData)==null?void 0:Ne.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:ge.contents;h!=null&&h.form||(h.form=[]);const ct=[];Le==null||Le.forEach(Ue=>{Ue.key!==""&&(Ue={key:(Ue==null?void 0:Ue.key)??(Ue==null?void 0:Ue.label),value:Ue==null?void 0:Ue.value},ct.push(Ue))}),h.form=[...ct,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(J==="createInsofDataApi"){let h=(ae=v.cloneDeep(M))==null?void 0:ae[0];return h={comp:(Z=v.cloneDeep(h))==null?void 0:Z.comp,compData:(re=v.cloneDeep(h))==null?void 0:re.compData,name:(Re=v.cloneDeep(h))==null?void 0:Re.name,isShow:(lt=v.cloneDeep(h))==null?void 0:lt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:h}}}return J}},je=async(J,M,xe)=>{var Fe,qe,Xe;let Ce=await Be.getItemData(M,sessionStorage.getItem("systemKey"),""),Pe=Ce==null?void 0:Ce.find(fe=>(fe==null?void 0:fe.name)===(xe==null?void 0:xe[0]));if(Pe){if((Pe==null?void 0:Pe.comp)==="Table"){let fe={};for(let Z in v.cloneDeep(J))v.cloneDeep(J)[Z]!=="loginUser"?fe[Z]=v.cloneDeep(J)[Z]:fe[Z]=((Fe=B.value)==null?void 0:Fe.account)||((qe=B.value)==null?void 0:qe.账号);let z=[],X=fe;Array.isArray(J)||(X=[fe]),X==null||X.forEach(Z=>{z.push({[Z[xe[1]]]:Z})});let pe=[],ce=z==null?void 0:z.map(Z=>{var re;return(re=Object.keys(Z))==null?void 0:re[0]});Ce==null||Ce.forEach(Z=>{var re;(Z==null?void 0:Z.name)===(xe==null?void 0:xe[0])&&((re=Z==null?void 0:Z.compData)==null||re.forEach(Re=>{var lt;(Re==null?void 0:Re.key)==="tableContents"&&((lt=Re==null?void 0:Re.contents)==null||lt.forEach(h=>{h!=null&&h.some(_=>ce.includes(_))&&pe.push({[h.find(_=>_.id).id]:h.find(_=>ce.includes(_))})}))}))});let G=pe==null?void 0:pe.map(Z=>{var re;return(re=Object.keys(Z))==null?void 0:re[0]}),ae=[];if(G==null||G.forEach(Z=>{var lt;let re=(lt=pe==null?void 0:pe.find(h=>{var _;return((_=Object.keys(h))==null?void 0:_[0].toString())===Z.toString()}))==null?void 0:lt[Z],Re=z==null?void 0:z.find(h=>{var _;return((_=Object.keys(h))==null?void 0:_[0])===re});ae.push({id:parseInt(Z),value:{tableData:Re[re]}})}),(ae==null?void 0:ae.length)>0)return ae}else if((Pe==null?void 0:Pe.comp)==="Form"){let fe=v.cloneDeep(Pe);fe.compData=(Xe=fe.compData)==null?void 0:Xe.map(pe=>{var ce;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(ce=pe.contents)==null?void 0:ce.map(G=>((G==null?void 0:G.key)===(xe==null?void 0:xe[1])&&(G.value=(J==null?void 0:J[G==null?void 0:G.prop])||J),G))),pe});let z={};for(let pe in fe)pe!=="id"&&(z[pe]=fe[pe]);let X=[];if(X.push({id:Pe==null?void 0:Pe.id,keyType:xe==null?void 0:xe[1],value:{pageData:z}}),(X==null?void 0:X.length)>0)return X}}},Ie=async(J,M,xe)=>{var Fe,qe,Xe,fe,z,X,pe,ce,G,ae;let Ce=await Be.getItemData(M,sessionStorage.getItem("systemKey"),""),Pe=Ce==null?void 0:Ce.find(Z=>(Z==null?void 0:Z.name)===(xe==null?void 0:xe[0]));if(Pe){if((Pe==null?void 0:Pe.comp)==="Table"){let Z={};for(let re in v.cloneDeep(J))v.cloneDeep(J)[re]!=="loginUser"?Z[re]=v.cloneDeep(J)[re]:Z[re]=((Fe=B.value)==null?void 0:Fe.account)||((qe=B.value)==null?void 0:qe.账号);await v.createInsofDataApi({key:{type:"data",pageKey:M,tableId:Pe==null?void 0:Pe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Z}})}else if((Pe==null?void 0:Pe.comp)==="Form"){let Z=v.cloneDeep(Pe),re=Object.keys(J),Re="";(fe=(Xe=v.cloneDeep(Z))==null?void 0:Xe.compData)==null||fe.forEach(x=>{var ie,_e;(x==null?void 0:x.key)==="formContent"&&((_e=(ie=v.cloneDeep(x))==null?void 0:ie.contents)==null||_e.forEach(E=>{var te;re.includes(E==null?void 0:E.key)&&(E==null?void 0:E.value)===((te=B.value)==null?void 0:te.姓名)&&(Re=E==null?void 0:E.key)}))});let lt=[];(z=Object.values(J[Re]))==null||z.forEach(x=>{x!=null&&x.includes("(")&&lt.push(x)}),lt=[...new Set(lt)];const h=lt==null?void 0:lt.map(async x=>{var $,P,Ee,ne,H,Q,de,De,be,ke,j,Ne;let ie="";(Q=(H=(ne=(Ee=(P=($=v.cloneDeep(x))==null?void 0:$.split("("))==null?void 0:P[1])==null?void 0:Ee.split(")"))==null?void 0:ne[0])==null?void 0:H.split(":"))==null||Q.forEach(ge=>{ie=ie===""?ie+ge.replaceAll("'",""):ie+"/"+ge.replaceAll("'","")});let _e=[];(Ne=(j=(ke=(be=(De=(de=v.cloneDeep(x))==null?void 0:de.split("<"))==null?void 0:De[1])==null?void 0:be.split(">"))==null?void 0:ke[0])==null?void 0:j.split(":"))==null||Ne.forEach(ge=>{_e.push(ge.replaceAll("'",""))});const E=await Be.getItemData(ie,sessionStorage.getItem("systemKey"),"");let te="";return E==null||E.forEach(ge=>{var Le;ge.name===(_e==null?void 0:_e[0])&&((Le=ge==null?void 0:ge.compData)==null||Le.forEach(ct=>{var Ue;(ct==null?void 0:ct.key)==="formContent"&&((Ue=ct.contents)==null||Ue.forEach(ot=>{(ot==null?void 0:ot.key)===(_e==null?void 0:_e[1])&&(te=ot==null?void 0:ot.value)}))}))}),{[x]:te}}),_=await Promise.all(h);Z.compData=(pe=(X=v.cloneDeep(Z))==null?void 0:X.compData)==null?void 0:pe.map(x=>{var ie,_e;return(x==null?void 0:x.key)==="formContent"&&(x.contents=(_e=(ie=v.cloneDeep(x))==null?void 0:ie.contents)==null?void 0:_e.map(E=>{var te,$,P,Ee;return(te=J[Re])!=null&&te[E==null?void 0:E.key]&&(J[Re][E==null?void 0:E.key].includes("(")?E.value=($=_==null?void 0:_.find(ne=>{var H;return((H=Object.keys(ne))==null?void 0:H[0])===J[Re][E==null?void 0:E.key]}))==null?void 0:$[J[Re][E==null?void 0:E.key]]:E.value=(Ee=(P=v.cloneDeep(J))==null?void 0:P[Re])==null?void 0:Ee[E==null?void 0:E.key]),E})),x});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let W="";((ce=I==null?void 0:I.data)==null?void 0:ce.type)==="success"&&((ae=(G=I==null?void 0:I.data)==null?void 0:G.result)==null||ae.forEach(x=>{var ie,_e;((_e=(ie=x==null?void 0:x.value)==null?void 0:ie.pageData)==null?void 0:_e.name)===(xe==null?void 0:xe[0])&&(W=x.id)}),await v.updateInsofDataApi({id:W,value:{pageData:Z}}))}}},O=(J,M="",xe={})=>{for(const[Ce,Pe]of Object.entries(J)){const Fe=M?`${M}.${Ce}`:Ce;Pe!==null&&typeof Pe=="object"&&!Array.isArray(Pe)&&Object.prototype.toString.call(Pe)!=="[object Date]"?O(Pe,Fe,xe):xe[Fe]=Pe}return xe},ee=async(J,M,xe,Ce)=>{var qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee;let Pe=await Be.getItemData(M,sessionStorage.getItem("systemKey"),""),Fe=Pe==null?void 0:Pe.find(ne=>(ne==null?void 0:ne.name)===(xe==null?void 0:xe[0]));if(Fe){if(!(xe!=null&&xe[1])&&(Fe==null?void 0:Fe.comp)==="Table"){let ne={},H=[],Q=(Xe=(qe=Fe==null?void 0:Fe.compData)==null?void 0:qe.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:Xe.contents;Q!=null&&Q.every(be=>Array.isArray(be))?H=(z=Be.getColumnChild((fe=Q==null?void 0:Q[0])==null?void 0:fe.filter(be=>(be==null?void 0:be.label)!=="操作")))==null?void 0:z.map(be=>be==null?void 0:be.prop):H=Q==null?void 0:Q.map(be=>be==null?void 0:be.label);for(let be in v.cloneDeep(J))if(v.cloneDeep(J)[be]!=="loginUser"){let ke=O(v.cloneDeep(J)[be]),j={};for(let Ne in ke)if(H!=null&&H.find(ge=>ge===Ne))j[Ne]=ke[Ne];else if(H!=null&&H.find(ge=>(ge==null?void 0:ge.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()))){let ge=H==null?void 0:H.find(Le=>(Le==null?void 0:Le.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()));j[ge]=ke[Ne]}ne[be]=j}else ne[be]=((X=B.value)==null?void 0:X.account)||((pe=B.value)==null?void 0:pe.账号);let de=await v.getInsofDataApi({keyLikes:{tableId:Fe==null?void 0:Fe.id}});if(((G=(ce=de==null?void 0:de.data)==null?void 0:ce.result)==null?void 0:G.length)>0){let be=(Z=(ae=de==null?void 0:de.data)==null?void 0:ae.result)==null?void 0:Z.map(ke=>ke==null?void 0:ke.id);(be==null?void 0:be.length)>0&&await v.batchDeleteInsofDataApi({ids:be})}let De=[];if((re=Fe==null?void 0:Fe.compData)!=null&&re.find(be=>(be==null?void 0:be.key)==="pageColumn")&&((h=(lt=(Re=Fe==null?void 0:Fe.compData)==null?void 0:Re.find(be=>(be==null?void 0:be.key)==="pageColumn"))==null?void 0:lt.contents)!=null&&h.includes("["))){const be=await v.getInsofDataApi({id:Fe==null?void 0:Fe.tableId});let ke=((x=(W=(I=(_=be==null?void 0:be.data)==null?void 0:_.result)==null?void 0:I[0])==null?void 0:W.key)==null?void 0:x.pageKey)??"";(ie=Object.values(ne))==null||ie.forEach(j=>{De.push({key:{type:"data",pageKey:ke,tableId:Fe==null?void 0:Fe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else(_e=Object.values(ne))==null||_e.forEach(be=>{De.push({key:{type:"data",pageKey:M,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:be}})});(De==null?void 0:De.length)>0&&await v.batchAddInsofDataApi({dataList:De})}else if(!(xe!=null&&xe[1])&&(Fe==null?void 0:Fe.comp)==="Form"){let ne=v.cloneDeep(Fe);ne.compData=(te=(E=v.cloneDeep(ne))==null?void 0:E.compData)==null?void 0:te.map(de=>{var De,be;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(be=(De=v.cloneDeep(de))==null?void 0:De.contents)==null?void 0:be.map(ke=>{var j,Ne;return(j=v.cloneDeep(J))!=null&&j[ke==null?void 0:ke.key]&&(ke.value=(Ne=v.cloneDeep(J))==null?void 0:Ne[ke==null?void 0:ke.key]),ke})),de});const H=await v.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Q="";(($=H==null?void 0:H.data)==null?void 0:$.type)==="success"&&((Ee=(P=H==null?void 0:H.data)==null?void 0:P.result)==null||Ee.forEach(de=>{var De,be;((be=(De=de==null?void 0:de.value)==null?void 0:De.pageData)==null?void 0:be.name)===(xe==null?void 0:xe[0])&&(Q=de.id)}),await v.updateInsofDataApi({id:Q,value:{pageData:ne}}))}}},se=async J=>{var M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re;V.setImportLoading(!0);try{if(J.api){let Re=new WeakMap;(xe=(M=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:M.filter($=>{var P,Ee;return((P=$==null?void 0:$.key)==null?void 0:P.pageKey)!=="menu"&&((Ee=$==null?void 0:$.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||xe.forEach($=>{Re[$.key.pageKey]?Re[$.key.pageKey]=[...Re[$.key.pageKey],$]:Re[$.key.pageKey]=[$]});let h=await Be.getItemData((y==null?void 0:y.value)===""?w.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re),_="";if(h=h==null?void 0:h.map($=>{var P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge;if(($==null?void 0:$.comp)==="Form")$.compData=(P=$.compData)==null?void 0:P.map(Le=>{var ct;return(Le==null?void 0:Le.key)==="formContent"&&(Le.contents=(ct=Le.contents)==null?void 0:ct.map(Ue=>{var ot;if((Ue==null?void 0:Ue.value)===""&&(Ue==null?void 0:Ue.type)==="Select"){let Oe=Be.judgeContents((ot=v.cloneDeep(Ue))==null?void 0:ot.optionUrl,Re);Ue.value=Ue.value||Oe}return Ue})),Le});else if(($==null?void 0:$.comp)==="Table"&&(Ee=$.compData)!=null&&Ee.find(Le=>(Le==null?void 0:Le.key)==="pageColumn")){let Le=(H=(ne=$.compData)==null?void 0:ne.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:H.contents,ct=((de=(Q=$.compData)==null?void 0:Q.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:de.contents)??"",Ue=(ke=(be=(De=Le==null?void 0:Le.split("["))==null?void 0:De[1])==null?void 0:be.split("]"))==null?void 0:ke[0];_=((j=Le==null?void 0:Le.split("["))==null?void 0:j[0])+((ge=(Ne=q.value)==null?void 0:Ne.find(Oe=>(Oe==null?void 0:Oe.key)===Ue))==null?void 0:ge.value)}return $}),!(_===""||_==="")){const $=await Be.getItemData(_,sessionStorage.getItem("systemKey"),"",!1,"","",Re);h=h==null?void 0:h.map(P=>{var Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct;if((P==null?void 0:P.comp)==="Table"&&(Ee=P.compData)!=null&&Ee.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn")){let Ue=(H=(ne=P.compData)==null?void 0:ne.find(Ve=>(Ve==null?void 0:Ve.key)==="pageColumn"))==null?void 0:H.contents,ot=((de=(Q=P.compData)==null?void 0:Q.find(Ve=>(Ve==null?void 0:Ve.key)==="pageGroup"))==null?void 0:de.contents)??"",Oe=(ke=(be=(De=Ue==null?void 0:Ue.split("["))==null?void 0:De[1])==null?void 0:be.split("]"))==null?void 0:ke[0],gt=((j=Ue==null?void 0:Ue.split("["))==null?void 0:j[0])+((ge=(Ne=q.value)==null?void 0:Ne.find(Ve=>(Ve==null?void 0:Ve.key)===Oe))==null?void 0:ge.value),tt=(Le=$==null?void 0:$.find(Ve=>(Ve==null?void 0:Ve.name)===(ot===""?d==null?void 0:d.compName:ot)))==null?void 0:Le.compData;P.compData=(ct=P.compData)==null?void 0:ct.map(Ve=>{var $e;return(Ve==null?void 0:Ve.key)==="tableContents"&&(Ve.contents=($e=tt==null?void 0:tt.find(et=>(et==null?void 0:et.key)==="tableContents"))==null?void 0:$e.contents),Ve})}return P})}let I={};if(((Pe=(Ce=J==null?void 0:J.extraValues)==null?void 0:Ce.input)==null?void 0:Pe.length)>0){const $=(qe=(Fe=J==null?void 0:J.extraValues)==null?void 0:Fe.input)==null?void 0:qe.map(async P=>{var Ee;he!=null&&he.find(ne=>ne===P)?I=await Ae(P,h):I[Object.keys(P)[0]]=await Ae((Ee=Object.values(P))==null?void 0:Ee[0],h,Re)});await Promise.all($)}else I=await Ae("/",h);let W=!1;(fe=(Xe=J==null?void 0:J.extraValues)==null?void 0:Xe.output)==null||fe.forEach($=>{var P,Ee;(Ee=(P=Object.values($))==null?void 0:P[0])!=null&&Ee.includes(".doc")&&(W=!0)});let x;if(W){const $=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});x=await v.axios.post(J.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$.close()})}else x=await v.axios.post(J.api,I,{headers:{"Content-Type":"application/json"}});let ie=(ce=(pe=(X=(z=v.cloneDeep(J))==null?void 0:z.extraValues)==null?void 0:X.output)==null?void 0:pe.map($=>{var P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot;if(!((Ee=(P=Object.values($))==null?void 0:P[0])!=null&&Ee.includes(".doc"))){let Oe=(j=(ke=(be=(H=v.cloneDeep((ne=Object.values($))==null?void 0:ne[0]))==null?void 0:H.split("["))==null?void 0:be[((De=(de=v.cloneDeep((Q=Object.values($))==null?void 0:Q[0]))==null?void 0:de.split("["))==null?void 0:De.length)-1])==null?void 0:ke.split("]"))==null?void 0:j[0],gt=Oe==null?void 0:Oe.split(":"),tt=(Le=v.cloneDeep((Ne=Object.values($))==null?void 0:Ne[0]))==null?void 0:Le.substring(0,v.cloneDeep((ge=Object.values($))==null?void 0:ge[0]).lastIndexOf("["));if(tt=(Ue=v.cloneDeep(tt))==null?void 0:Ue.slice(0,((ct=v.cloneDeep(tt))==null?void 0:ct.length)-1),tt!=null&&tt.includes("[")){let Ve="";if((ot=Be.contentTransArrayToAll(tt,"/"))==null||ot.forEach($e=>{var et,Ye,ze,at,ve,Se,Me;if(!($e!=null&&$e.includes("[")))Ve=Ve===""?Ve+$e.replaceAll("/",""):Ve+"/"+$e.replaceAll("/","");else{let Qe=v.cloneDeep($e).slice(1,((et=v.cloneDeep($e))==null?void 0:et.length)-1),A=(Se=(ve=(at=(ze=(Ye=v.cloneDeep(Qe))==null?void 0:Ye.split("["))==null?void 0:ze[1])==null?void 0:at.split("]"))==null?void 0:ve[0])==null?void 0:Se.split(":"),ue="",He=(Me=h==null?void 0:h.find(me=>(me==null?void 0:me.name)===(A==null?void 0:A[0])))==null?void 0:Me.compData;He==null||He.forEach(me=>{var nt;(me==null?void 0:me.key)==="formContent"&&((nt=me==null?void 0:me.contents)==null||nt.forEach(kt=>{(kt==null?void 0:kt.key)===(A==null?void 0:A[1])&&(ue=kt==null?void 0:kt.value)}))}),Ve=Ve===""?Ve+ue.replaceAll("/",""):Ve+"/"+ue.replaceAll("/","")}}),tt=Ve,tt[(tt==null?void 0:tt.length)-1]!=="/")return tt}}}))==null?void 0:ce.filter($=>$);ie=[...new Set(v.cloneDeep(ie))];let _e=ie==null?void 0:ie.map(async $=>{let P=await Be.getItemData($,sessionStorage.getItem("systemKey"),"",!1,"","",Re);if((P==null?void 0:P.length)===0)return await Be.getParentContents($)});await Promise.all(_e);let E=[],te=(Z=(ae=(G=v.cloneDeep(J))==null?void 0:G.extraValues)==null?void 0:ae.output)==null?void 0:Z.map(async $=>{var be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et,Ye,ze,at,ve,Se,Me,Qe,A,ue,He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt,bt,jt,qt,Gt,ta,$t,Ia,Ra,ba,Pa,ka,$a,Ka,ja,Ua,Wa,Ba,ga,da,xa,ma,ra,va,Ha,Na,Aa,wa,qa,Ga,Va,Xa,Ya,St,ea;if((ke=(be=Object.values($))==null?void 0:be[0])!=null&&ke.includes(".doc")){var P=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"}),Ee=x.headers["content-disposition"],ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),H=ne.exec(Ee),Q=H==null?void 0:H[1],de=document.createElement("a"),De=window.URL.createObjectURL(P);k.value=[{name:Q,blobUrl:De}],u.value=!0}else{let xt=(Oe=(ot=(Ue=(Ne=v.cloneDeep((j=Object.values($))==null?void 0:j[0]))==null?void 0:Ne.split("["))==null?void 0:Ue[((ct=(Le=v.cloneDeep((ge=Object.values($))==null?void 0:ge[0]))==null?void 0:Le.split("["))==null?void 0:ct.length)-1])==null?void 0:ot.split("]"))==null?void 0:Oe[0],zt=xt==null?void 0:xt.split(":"),wt=(Ve=v.cloneDeep((gt=Object.values($))==null?void 0:gt[0]))==null?void 0:Ve.substring(0,v.cloneDeep((tt=Object.values($))==null?void 0:tt[0]).lastIndexOf("["));if(wt!=null&&wt.includes("[")?wt=(et=v.cloneDeep(wt))==null?void 0:et.slice(0,(($e=v.cloneDeep(wt))==null?void 0:$e.length)-1):wt===""&&(wt=w.value),wt=wt.replaceAll("<","[").replaceAll(">","]"),wt!=null&&wt.includes("[")){let Et="";(Ye=Be.contentTransArrayToAll(wt,"/"))==null||Ye.forEach((Ct,Ft)=>{var Ot,Rt,Yt,la,Oa,Ja,Ma,Za,Sn,ln,vn;if(!(Ct!=null&&Ct.includes("[")))Et=Et===""?Et+Ct.replaceAll("/",""):Et+"/"+Ct.replaceAll("/","");else{let sn="",pa="";(Ot=v.cloneDeep(Ct))!=null&&Ot.includes("]")?(sn=v.cloneDeep(Ct).slice(1,((Rt=v.cloneDeep(Ct))==null?void 0:Rt.length)-1),pa=(Ma=(Ja=(Oa=(la=(Yt=v.cloneDeep(sn))==null?void 0:Yt.split("["))==null?void 0:la[1])==null?void 0:Oa.split("]"))==null?void 0:Ja[0])==null?void 0:Ma.split(":")):(sn=v.cloneDeep(Ct).slice(1,(Za=v.cloneDeep(Ct))==null?void 0:Za.length),pa=(Sn=v.cloneDeep(sn))==null?void 0:Sn.split("/"));let Qa="",cn=(ln=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(pa==null?void 0:pa[0])))==null?void 0:ln.compData;cn==null||cn.forEach(ia=>{var Tn;(ia==null?void 0:ia.key)==="formContent"&&((Tn=ia==null?void 0:ia.contents)==null||Tn.forEach(La=>{(La==null?void 0:La.key)===(pa==null?void 0:pa[1])&&(Qa=La==null?void 0:La.value)}))}),((vn=Be.contentTransArrayToAll(wt,"/"))==null?void 0:vn.length)-1!==Ft?Et=Et===""?Et+Qa.replaceAll("/",""):Et+"/"+Qa.replaceAll("/",""):Et=Et+r.value+Qa.replaceAll("/","")}}),(ze=w.value)!=null&&ze.includes(Et)?wt=w.value:wt=Et}let Xt=v.cloneDeep((at=Object.keys($))==null?void 0:at[0]);if(((ve=x==null?void 0:x.data)==null?void 0:ve.statusCode)===200||((Se=x==null?void 0:x.data)==null?void 0:Se.code)===200){if(((Qe=(Me=x==null?void 0:x.data)==null?void 0:Me.data)!=null&&Qe[Xt]||(ue=(A=x==null?void 0:x.data)==null?void 0:A.result)!=null&&ue[Xt])&&(zt==null?void 0:zt.length)===1)return await ee(((me=(He=x==null?void 0:x.data)==null?void 0:He.data)==null?void 0:me[Xt])||((kt=(nt=x==null?void 0:x.data)==null?void 0:nt.result)==null?void 0:kt[Xt]),v.cloneDeep(wt),zt,_);if((ht=(yt=x==null?void 0:x.data)==null?void 0:yt.data)!=null&&ht[Xt]||(ft=(dt=x==null?void 0:x.data)==null?void 0:dt.result)!=null&&ft[Xt]){let Et=await je(((Mt=(_t=x==null?void 0:x.data)==null?void 0:_t.data)==null?void 0:Mt[Xt])||((Lt=(Vt=x==null?void 0:x.data)==null?void 0:Vt.result)==null?void 0:Lt[Xt]),v.cloneDeep(wt),zt);return Et&&(E=[...E,...Et]),Et}else{if(!((bt=x==null?void 0:x.data)!=null&&bt.data)){let Et=await Be.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re);Et=Et==null?void 0:Et.map(Ft=>{var Ot;return(Ft==null?void 0:Ft.name)===(zt==null?void 0:zt[0])&&(Ft.compData=(Ot=Ft.compData)==null?void 0:Ot.map(Rt=>{var Yt;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(Yt=Rt.contents)==null?void 0:Yt.map(la=>{var Oa,Ja;return(la==null?void 0:la.key)===(zt==null?void 0:zt[1])&&(la.value=(Ja=(Oa=x==null?void 0:x.data)==null?void 0:Oa.result)==null?void 0:Ja[Xt==null?void 0:Xt.replaceAll(":","")]),la})),Rt})),Ft});let Ct=[];(jt=Et==null?void 0:Et.filter(Ft=>(Ft==null?void 0:Ft.comp)==="Form"))==null||jt.forEach(async Ft=>{let Ot={};for(let Rt in Ft)Rt!=="id"&&(Ot[Rt]=Ft[Rt]);Ct.push({id:Ft==null?void 0:Ft.id,value:{pageData:Ot}})}),(Ct==null?void 0:Ct.length)>0&&await v.batchUpdateInsofDataApi({dataList:Ct});return}if((zt==null?void 0:zt.length)===1){const Et=(ta=(Gt=(qt=x==null?void 0:x.data)==null?void 0:qt.data)==null?void 0:Gt.path)==null?void 0:ta.path;let Ct="";(Pa=(ba=(Ra=(Ia=($t=Et==null?void 0:Et.split("("))==null?void 0:$t[1])==null?void 0:Ia.split(")"))==null?void 0:Ra[0])==null?void 0:ba.split(":"))==null||Pa.forEach(Rt=>{var Yt,la;Ct=Ct===""?Ct+((Yt=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:Yt.trim()):Ct+"/"+((la=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:la.trim())});let Ft=[(Ua=(ja=(Ka=($a=(ka=Et==null?void 0:Et.split("<"))==null?void 0:ka[1])==null?void 0:$a.split(">"))==null?void 0:Ka[0])==null?void 0:ja.replaceAll("'",""))==null?void 0:Ua.trim()],Ot;return(ga=(Ba=(Wa=x==null?void 0:x.data)==null?void 0:Wa.data)==null?void 0:Ba.data)!=null&&ga[zt==null?void 0:zt[0]]?Ot=await ee((ma=(xa=(da=x==null?void 0:x.data)==null?void 0:da.data)==null?void 0:xa.data)==null?void 0:ma[zt==null?void 0:zt[0]],Ct,zt,_):Ot=await Ie((va=(ra=x==null?void 0:x.data)==null?void 0:ra.data)==null?void 0:va.data,Ct,Ft,Re),Ot}else{const Et=(Aa=(Na=(Ha=x==null?void 0:x.data)==null?void 0:Ha.data)==null?void 0:Na.path)==null?void 0:Aa.path;let Ct="";return(Xa=(Va=(Ga=(qa=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:qa.split(")"))==null?void 0:Ga[0])==null?void 0:Va.split(":"))==null||Xa.forEach(Ot=>{var Rt,Yt;Ct=Ct===""?Ct+((Rt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Rt.trim()):Ct+"/"+((Yt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Yt.trim())}),await je((ea=(St=(Ya=x==null?void 0:x.data)==null?void 0:Ya.data)==null?void 0:St.data)==null?void 0:ea[zt==null?void 0:zt[0]],Ct,zt)}}}}});if(await Promise.all(te),(E==null?void 0:E.length)>0){let $=[];E==null||E.forEach(ne=>{$!=null&&$.find(H=>{var Q,de,De,be;return((de=(Q=H==null?void 0:H.value)==null?void 0:Q.pageData)==null?void 0:de.name)===((be=(De=ne==null?void 0:ne.value)==null?void 0:De.pageData)==null?void 0:be.name)})||$.push(ne)});let P=[];$==null||$.forEach(ne=>{var de,De,be,ke;let H=v.cloneDeep(ne);H.value.pageData.compData=(de=H.value.pageData.compData)==null?void 0:de.map(j=>{var Ne;return(j==null?void 0:j.key)==="formContent"&&(j.contents=(Ne=j.contents)==null?void 0:Ne.map(ge=>{var ct,Ue,ot,Oe;let Le=(ct=v.cloneDeep(E))==null?void 0:ct.find(gt=>(gt==null?void 0:gt.keyType)===(ge==null?void 0:ge.key));if(Le){let gt=(Oe=(ot=(Ue=Le.value.pageData.compData)==null?void 0:Ue.find(tt=>(tt==null?void 0:tt.key)==="formContent"))==null?void 0:ot.contents)==null?void 0:Oe.find(tt=>(tt==null?void 0:tt.key)===(ge==null?void 0:ge.key));ge.value=gt==null?void 0:gt.value}return ge})),j}),P.push({id:H==null?void 0:H.id,value:H==null?void 0:H.value});let Q=[];(ke=(be=(De=H==null?void 0:H.value)==null?void 0:De.pageData)==null?void 0:be.compData)==null||ke.forEach(j=>{var Ne;(j==null?void 0:j.key)==="formContent"&&((Ne=j==null?void 0:j.contents)==null||Ne.forEach(ge=>{var Le,ct,Ue,ot,Oe,gt;if((ct=(Le=ge==null?void 0:ge.optionUrl)==null?void 0:Le.menuSelect)!=null&&ct.find(tt=>tt==null?void 0:tt.includes("[")))if(Q!=null&&Q.find(tt=>{var Ve,$e,et;return((Ve=tt==null?void 0:tt.key)==null?void 0:Ve.join(","))===((et=($e=ge==null?void 0:ge.optionUrl)==null?void 0:$e.menuSelect)==null?void 0:et.join(","))})){let tt=(Ue=Q==null?void 0:Q.find(Ve=>{var $e,et,Ye;return(($e=Ve==null?void 0:Ve.key)==null?void 0:$e.join(","))===((Ye=(et=ge==null?void 0:ge.optionUrl)==null?void 0:et.menuSelect)==null?void 0:Ye.join(","))}))==null?void 0:Ue.value;tt.push({key:ge==null?void 0:ge.prop,groups:(ot=ge==null?void 0:ge.optionUrl)==null?void 0:ot.groupSelect,value:ge==null?void 0:ge.value}),Q=Q==null?void 0:Q.map(Ve=>{var $e,et,Ye;return(($e=Ve==null?void 0:Ve.key)==null?void 0:$e.join(","))===((Ye=(et=ge==null?void 0:ge.optionUrl)==null?void 0:et.menuSelect)==null?void 0:Ye.join(","))&&(Ve.value=tt),Ve})}else Q.push({key:(Oe=ge==null?void 0:ge.optionUrl)==null?void 0:Oe.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(gt=ge==null?void 0:ge.optionUrl)==null?void 0:gt.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(Q==null?void 0:Q.length)>0&&(Q=Q==null?void 0:Q.map(j=>{var ge;let Ne="";return(ge=j==null?void 0:j.key)==null||ge.forEach(Le=>{var ct;if(!(Le!=null&&Le.includes("[")))Ne=Ne===""?Ne+Le:Ne+"/"+Le;else{let Ue="",ot=(ct=Le==null?void 0:Le.replaceAll("[","").replaceAll("]",""))==null?void 0:ct.split(":");h==null||h.forEach(Oe=>{var gt;(Oe==null?void 0:Oe.name)===(ot==null?void 0:ot[0])&&((gt=Oe==null?void 0:Oe.compData)==null||gt.forEach(tt=>{var Ve;(tt==null?void 0:tt.key)==="formContent"&&((Ve=tt==null?void 0:tt.contents)==null||Ve.forEach($e=>{($e==null?void 0:$e.prop)===(ot==null?void 0:ot[1])&&(Ue=$e==null?void 0:$e.value)}))}))}),Ne=Ne+r.value+Ue}}),j.key=Ne,j})),Q==null||Q.forEach(j=>{var ct,Ue,ot;let Ne=(ct=Re[j.key])==null?void 0:ct.find(Oe=>{var gt,tt,Ve,$e,et,Ye,ze;return((tt=(gt=Oe==null?void 0:Oe.value)==null?void 0:gt.pageData)==null?void 0:tt.name)===((et=($e=(Ve=j==null?void 0:j.value)==null?void 0:Ve[0])==null?void 0:$e.groups)==null?void 0:et[0])&&((ze=(Ye=Oe==null?void 0:Oe.value)==null?void 0:Ye.pageData)==null?void 0:ze.name)!==void 0}),ge=Ne==null?void 0:Ne.id,Le=(Ue=Ne==null?void 0:Ne.value)==null?void 0:Ue.pageData;Le.compData=(ot=Le.compData)==null?void 0:ot.map(Oe=>{var gt;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(gt=Oe.contents)==null?void 0:gt.map(tt=>{var $e;let Ve=($e=j.value)==null?void 0:$e.find(et=>(et==null?void 0:et.key)===(tt==null?void 0:tt.prop));return Ve&&(tt.value=Ve.value),tt})),Oe}),P.push({id:ge,value:{pageData:Le}})})});let Ee=(re=v.cloneDeep(E))==null?void 0:re[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}D.setFreshContent(!0)}V.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),V.setImportLoading(!1)}S.value=!0},he=["createInsofDataApi"],Ge=vo(async J=>{se(J)},100),it=async J=>{var Xe,fe,z,X,pe;const M=v.cloneDeep(J);let xe,Ce=new WeakMap,Pe=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(fe=(Xe=Pe.data.result)==null?void 0:Xe.filter(ce=>{var G,ae;return((G=ce==null?void 0:ce.key)==null?void 0:G.pageKey)!=="menu"&&((ae=ce==null?void 0:ce.key)==null?void 0:ae.pageKey)!=="secret"}))==null||fe.forEach(ce=>{Ce[ce.key.pageKey]?Ce[ce.key.pageKey]=[...Ce[ce.key.pageKey],ce]:Ce[ce.key.pageKey]=[ce]}),J!=null&&J[0].path&&(xe=await(M==null?void 0:M.map(async(ce,G)=>{var I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be;const Z=(I=Ce[ce==null?void 0:ce.path])==null?void 0:I.filter(ke=>{var j;return((j=ke==null?void 0:ke.key)==null?void 0:j.type)==="data"});let re="";const Re=await Be.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);Z==null||Z.forEach(ke=>{var j,Ne,ge,Le,ct;((Ne=(j=ke==null?void 0:ke.value)==null?void 0:j.tableData)==null?void 0:Ne.算法名称)===((ge=M==null?void 0:M[G])==null?void 0:ge.method)&&(re=(ct=(Le=ke==null?void 0:ke.value)==null?void 0:Le.tableData)==null?void 0:ct.算法体)});const lt=await Be.getItemData(ce==null?void 0:ce.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);let h="",_=(_e=(ie=(x=(W=lt==null?void 0:lt[0])==null?void 0:W.compData)==null?void 0:x.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:ie.contents)==null?void 0:_e.findIndex(ke=>(ke==null?void 0:ke.prop)==="算法体");return(te=(E=lt==null?void 0:lt[0])==null?void 0:E.compData)==null||te.forEach(ke=>{var j;(ke==null?void 0:ke.key)==="tableContents"&&((j=ke==null?void 0:ke.contents)==null||j.forEach(Ne=>{Ne!=null&&Ne.find(ge=>ge===(ce==null?void 0:ce.method))&&(h=Ne[_])}))}),{buttonName:(($=M==null?void 0:M[G])==null?void 0:$.method)||((ne=(Ee=(P=Z==null?void 0:Z[0])==null?void 0:P.value)==null?void 0:Ee.tableData)==null?void 0:ne.算法名称),api:(re===""?(de=(Q=(H=Z==null?void 0:Z[0])==null?void 0:H.value)==null?void 0:Q.tableData)==null?void 0:de.算法体:re)||h,content:Re==null?void 0:Re.filter(ke=>ke.comp!=="methodButton"),extraContent:(De=v.cloneDeep(ce.value))==null?void 0:De.slice(1),methodName:(ce==null?void 0:ce.path)??"",extraValues:(be=M==null?void 0:M[G])==null?void 0:be.data}})));const Fe=M==null?void 0:M.map(async ce=>{var lt,h,_,I,W,x;const G=(lt=Pe.data.result)==null?void 0:lt.filter(ie=>{var _e,E,te;return((_e=ie==null?void 0:ie.key)==null?void 0:_e.parentTable)===""&&((E=ie==null?void 0:ie.key)==null?void 0:E.type)==="method"&&((te=ie==null?void 0:ie.key)==null?void 0:te.methodName)===ie.method}),ae=G==null?void 0:G[0],Z=(h=Pe.data.result)==null?void 0:h.filter(ie=>{var _e,E;return((_e=ie==null?void 0:ie.key)==null?void 0:_e.type)==="methodData"&&((E=ie==null?void 0:ie.key)==null?void 0:E.tableId)===(ae==null?void 0:ae.id)}),re=await Be.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce),Re=Z==null?void 0:Z[0];return{buttonName:(_=ae==null?void 0:ae.key)==null?void 0:_.methodKey,api:(W=(I=Re==null?void 0:Re.value)==null?void 0:I.tableData)==null?void 0:W[0],content:re==null?void 0:re.filter(ie=>ie.comp!=="methodButton"),extraContent:(x=v.cloneDeep(ce.value))==null?void 0:x.slice(1),methodName:(ce==null?void 0:ce.method)??""}}),qe=(z=J==null?void 0:J[0])!=null&&z.path&&((X=J==null?void 0:J[0])==null?void 0:X.path)!==""?await Promise.all(xe):await Promise.all(Fe);i.value=qe==null?void 0:qe.filter(ce=>ce==null?void 0:ce.extraContent),(pe=i.value)==null||pe.forEach(ce=>{var G;ce.api===""&&((G=ce.content)==null||G.forEach(ae=>{var Z;ae.comp=="Table"&&D.setExtraContents(Be.methodTableToContent(ae.compData,(Z=ce.extraContent)==null?void 0:Z[0]))}))})};return e.watch(()=>d.itemData,async()=>{L.value=="view"&&!S.value&&await it(v.cloneDeep(d.itemData)),S.value=!1},{immediate:!0,deep:!0}),(J,M)=>{var xe,Ce,Pe;return e.unref(L)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((xe=i.value)==null?void 0:xe.filter(Fe=>(Fe==null?void 0:Fe.buttonName)!=="保存"),Fe=>{var qe;return e.openBlock(),e.createElementBlock("div",null,[Fe.api!==""?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,disabled:e.unref(K)===e.unref(w)&&!((qe=Fe==null?void 0:Fe.buttonName)!=null&&qe.includes("预览")),class:"calculator-content",modelValue:Fe.buttonName,onClickTrigger:Xe=>e.unref(Ge)(Fe),loading:C.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(we)!==""&&((Pe=e.unref(w))==null?void 0:Pe[((Ce=e.unref(w))==null?void 0:Ce.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ye,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:k.value,onDestroy:Ze},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=Kt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=Kt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),k=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),D=e.ref({}),C=e.ref([]),V=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:C.value},{key:"signConfig",contents:D.value}]}),F=q=>{var K;D.value=v.cloneDeep(q),r("change",(K=V())==null?void 0:K.compData)},Y=q=>{var K,le;if((q==null?void 0:q.buttonName)==="确认"){const w=v.cloneDeep(q==null?void 0:q.content);switch(u.value){case"create":C.value.push({...w,index:((K=C.value)==null?void 0:K.length)+1});break}r("change",(le=V())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},L=(q,K)=>{var le,w;switch(q){case"create":(le=f.value)==null||le.forEach(R=>{R.value=""}),u.value="create",d.visible=!0;break;case"update":(w=f.value)==null||w.forEach(R=>{R.value=K[R==null?void 0:R.prop]}),u.value="update",d.visible=!0;break;case"delete":C.value.splice(K,1),u.value="delete";break}},we=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,le;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="signConfig"))==null?void 0:K.contents)??{},C.value=((le=q==null?void 0:q.find(w=>w.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(q,K)=>{const le=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=R=>L("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:B=>L("update",{...R,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:B=>L("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(Bt.ssForm,{rowContents:g.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Zt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:we,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:Y},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=Kt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var V,F;return(V=s==null?void 0:s.stepConfig)!=null&&V.allowTrigger?d.value:(F=s==null?void 0:s.stepConfig)==null?void 0:F.active}),k=(V,F)=>{d.value=F,r("clickStep",V,F)},g=V=>Bt.getComponent(V),f=()=>{var F;const V=(F=s==null?void 0:s.stepList)==null?void 0:F.find((Y,L)=>L+1===u.value);return console.log("findStep",V),V?V==null?void 0:V.children:[]},D=V=>{r("clickTrigger",V)},C=V=>{r("changeTrigger",V)};return(V,F)=>{var we,q,K,le,w;const Y=e.resolveComponent("el-step"),L=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(L,{direction:(we=n.stepConfig)==null?void 0:we.direction,active:u.value,"finish-status":"success",simple:(q=n.stepConfig)==null?void 0:q.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,(R,y)=>(e.openBlock(),e.createBlock(Y,{key:y,class:"step-item",onClick:B=>k(R,y+1)},{title:e.withCtx(()=>[e.renderSlot(V.$slots,"title",{title:R==null?void 0:R.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(V.$slots,"description",{description:R==null?void 0:R.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(le=n.stepConfig)!=null&&le.allowTrigger&&((w=n.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(R,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(R==null?void 0:R.type)),{modelValue:R.value,"onUpdate:modelValue":B=>R.value=B,onClickTrigger:D,onChangeTrigger:C,content:R==null?void 0:R.content},e.createSlots({_:2},[e.renderList(V.$slots,(B,S)=>({name:S,fn:e.withCtx(ye=>[e.renderSlot(V.$slots,S,e.mergeProps({ref_for:!0},ye||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=Kt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),k=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,D;u.value=(f=g==null?void 0:g.find(C=>(C==null?void 0:C.key)==="stepList"))==null?void 0:f.contents,d.value=(D=g==null?void 0:g.find(C=>(C==null?void 0:C.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(g,f)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:k},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),description:e.withCtx(({description:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,k)=>(e.openBlock(),e.createBlock(r,{key:k,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=Kt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,k;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(k=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:k.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:k,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(k),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=Kt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(Bt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=Kt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Oc={class:"type-select"},Mc=["onClick"],Lc={class:"list-icon"},zc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:D=>r(g)},[e.createElementVNode("div",Lc,[e.createVNode(k,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=Kt._export_sfc(zc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},Kc={class:"collapse-title-item"},jc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),k=e.ref([]),g=Y=>{var we;let L=(we=v.cloneDeep(k.value))==null?void 0:we.map((q,K)=>(Y===K&&(q.content=!0),q));k.value=L},f=Y=>{var we;let L=(we=v.cloneDeep(k.value))==null?void 0:we.map((q,K)=>(Y===K&&(q.content=!1),q));k.value=L,d.value=v.cloneDeep(s.value)},D=(Y,L)=>{var le;let we=(le=v.cloneDeep(k.value))==null?void 0:le.map((w,R)=>(Y===R&&(w.content=!1),w));k.value=we;const q=v.cloneDeep(s.value),K=q==null?void 0:q.filter((w,R)=>(R===Y&&(w.name=L),w));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var Y,L,we;!s.value||((Y=s.value)==null?void 0:Y.length)===0?d.value=[]:d.value=(L=v.cloneDeep(s.value))==null?void 0:L.filter(q=>(q==null?void 0:q.comp)!=="methodButton"),u.value=d.value,k.value=(we=v.cloneDeep(u.value))==null?void 0:we.map((q,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const C=Y=>rn(Y),V=(Y,L,we)=>{var K,le;if(!Y)return;let q=v.cloneDeep(s.value);q=(K=q==null?void 0:q.map((w,R)=>(R===we&&(w.compData=Y),w)))==null?void 0:K.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),k.value=(le=v.cloneDeep(q))==null?void 0:le.map((w,R)=>({id:R,content:!1})),i.setOriginalData(q),i.setItemData(q)},F=Y=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const L=v.cloneDeep(s.value),we=L==null?void 0:L.filter((q,K)=>K!==Y);i.setOriginalData(we),i.setItemData(we),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(Y,L)=>{const we=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[L[1]||(L[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:q,index:K})=>{var le,w,R,y,B,S,ye,Ze,rt,Ae;return[e.createElementVNode("div",$c,[e.createElementVNode("div",Kc,[(w=(le=k.value)==null?void 0:le.find(je=>je.id===K))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:q.name&&q.name!==""?"8px":"0px"})},e.toDisplayString(q.name),5)),(y=(R=k.value)==null?void 0:R.find(je=>je.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(Bt._sfc_main$2,{modelValue:q.name,"onUpdate:modelValue":je=>q.name=je,onClick:L[0]||(L[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(B=k.value)==null?void 0:B.find(je=>je.id===K))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(je=>g(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Ze=(ye=k.value)==null?void 0:ye.find(je=>je.id===K))!=null&&Ze.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(we,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(je=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(we,{name:"Save",onClick:e.withModifiers(je=>D(K,q.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ae=(rt=k.value)==null?void 0:rt.find(je=>je.id===K))!=null&&Ae.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(je=>F(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:q,index:K})=>{var le,w;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(C(q.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C(q.comp+"Operate")),{itemContents:q==null?void 0:q.compData,originalItemContents:(w=(le=u.value)==null?void 0:le.find((R,y)=>y===K))==null?void 0:w.compData,onChange:R=>V(R,q,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=Kt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>rn(u);return(u,k)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=Kt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),k=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),D=e.ref(!1),C=e.ref(-1),V=e.ref(new WeakMap),F=e.ref(null),Y=Qn(v.pinia),{itemData:L}=v.storeToRefs(Y),we=()=>{k.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},q=J=>{k.value="修改标签页",g.value.title=d.value[J].title,f.value=J,u.value=!0},K=J=>{const M=R(J);V.value.delete(M),d.value.splice(J,1),it()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const J={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:w()};d.value.push(J)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,it()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,R=J=>{const M=d.value[J];return M.id||(M.id=w()),M.id},y=J=>{var Ce;C.value=J;const M=R(J);F.value=v.cloneDeep(L.value);let xe=V.value.get(M);!xe&&((Ce=d.value[J].children)==null?void 0:Ce.length)>0&&(xe=Ze(d.value[J].children)),xe?Y.setItemData(v.cloneDeep(xe)):Y.setItemData([]),D.value=!0},B=e.computed(()=>{const J=Ut.useModelComp(v.pinia),M=v.storeToRefs(J).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(xe=>{var Ce;if(xe.comp==="Tabs"&&C.value>=0){const Pe=R(C.value);if((Ce=xe.compData)==null?void 0:Ce.some(qe=>{var Xe;return qe.key==="stepList"&&((Xe=qe.contents)==null?void 0:Xe.some(fe=>fe.id===Pe))}))return!1}return!0})}),S=J=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[J]||J,ye=J=>{var M;try{const xe=v.cloneDeep(J);xe.id=Date.now()+Math.random(),xe.comp==="Tabs"&&((M=xe.compData)==null||M.forEach(Pe=>{Pe.key==="stepList"&&Pe.contents&&Pe.contents.forEach(Fe=>{Fe.id=w()})}));const Ce=v.cloneDeep(L.value);Ce.push(xe),Y.setItemData(Ce)}catch(xe){console.error("添加组件失败:",xe)}},Ze=J=>J.map(M=>{var xe;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:rt(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Ae(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((xe=M.content)==null?void 0:xe.originalData)||[]}}}),rt=J=>{if(!J)return[];const M=[];return J.rowContents&&M.push({key:"formContent",contents:J.rowContents}),J.buttonValue&&M.push({key:"formButton",contents:J.buttonValue}),typeof J.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:J.isEnableWrap}),M},Ae=J=>[],je=()=>{if(C.value>=0&&C.value<d.value.length){const J=R(C.value);V.value.set(J,v.cloneDeep(L.value)),d.value[C.value].children=ee(L.value),console.log("保存后的数据",ee(L.value))}D.value=!1,C.value=-1,F.value=null,it()},Ie=()=>{F.value&&Y.setItemData(v.cloneDeep(F.value)),D.value=!1,C.value=-1,F.value=null},O=()=>{D.value&&Ie()},ee=J=>{if(!Array.isArray(J))throw new Error("sourceData must be an array");return J.map((M,xe)=>{if(!M||typeof M!="object")return M;const{comp:Ce,name:Pe,compData:Fe}=M;switch(Ce){case"Form":return{type:"form",content:se(Fe||[]),value:"表单"};case"Table":return{type:"table",content:he(Fe||[]),value:"表格"};default:return{type:"xxx",content:Ge(Fe||[]),value:""}}})},se=J=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},xe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return J.forEach((Ce,Pe)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${Pe}:`,Ce);return}const{key:Fe,contents:qe}=Ce,Xe=xe[Fe];if(!Xe){console.warn(`Unknown Form config key: ${Fe}`);return}Fe==="enableWrap"?M[Xe]=!!qe:M[Xe]=Array.isArray(qe)?qe:[]}),M},he=J=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},xe={header:"columns",tableContents:"tableData"};return J.forEach((Ce,Pe)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${Pe}:`,Ce);return}const{key:Fe,contents:qe}=Ce,Xe=xe[Fe];if(!Xe){console.warn(`Unknown Table config key: ${Fe}`);return}M[Xe]=Array.isArray(qe)?qe:[]}),M},Ge=J=>(console.log("Default conversion logic - to be implemented"),{originalData:J,processed:!1,componentType:"unknown"}),it=()=>{const J=[{key:"stepList",contents:d.value}];r("change",J)};return e.watch(()=>s.itemContents,J=>{if(J&&J.length>0){const M=J.find(xe=>xe.key==="stepList");M&&M.contents&&(d.value=M.contents.map(xe=>({title:xe.title||"",value:xe.value||xe.title||"",label:xe.label||xe.title||"",children:xe.children||[],id:xe.id||w()})))}},{immediate:!0,deep:!0}),(J,M)=>{const xe=e.resolveComponent("svg-icon"),Ce=e.resolveComponent("el-input"),Pe=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:we},[e.createVNode(xe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(qe,Xe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Xe},[e.createElementVNode("span",nu,e.toDisplayString(qe.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:fe=>q(Xe)},"修改标题",8,ru),e.createElementVNode("button",{onClick:fe=>y(Xe)},"布局调整",8,lu),e.createElementVNode("button",{onClick:fe=>K(Xe)},"删除",8,iu)])]))),128))]),e.createVNode(Zt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":M[2]||(M[2]=qe=>u.value=qe),title:k.value,onBeforeDestroy:M[3]||(M[3]=qe=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=qe=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Fe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Pe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ce,{modelValue:g.value.title,"onUpdate:modelValue":M[0]||(M[0]=qe=>g.value.title=qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Zt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=qe=>D.value=qe),title:"布局调整",fullScreen:"",onBeforeDestroy:O},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ie},"取消"),e.createElementVNode("button",{onClick:je},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,qe=>(e.openBlock(),e.createElementBlock("div",{key:qe.id,class:"component-item",onClick:Xe=>ye(qe)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(S(qe.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(qe.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:J.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=Kt._export_sfc(mu,[["__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 ku(n){return{type:"line",...n}}function xu(){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 wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Sa={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},zo=Ut.useMenuState(v.pinia),Er=(n,i)=>{var C;const s=[],r=[],{group:d,nameCol:u,valueCol:k}=i||{},g=n==null?void 0:n.find(V=>{const{name:F}=V;return F===d});if(!g)return{names:s,values:r};const f=(C=g==null?void 0:g.compData)==null?void 0:C.find(V=>{const{key:F}=V;return F==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(V=>{const F=V==null?void 0:V[0];let Y=!1;v.isObject(F)&&(F!=null&&F.id)&&(Y=!0);let L=u,we=k;Y&&(L=L+1,we=we+1);const q=V==null?void 0:V[L],K=V==null?void 0:V[we];s.push(q),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:k}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(k&&zo.activeMenuPath&&(g=await Be.getItemData(`${zo.activeMenuPath}`,f,"")),!k){const D=i==null?void 0:i.join("/");g=await Be.getItemData(`${D}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),k=sessionStorage.getItem("systemKey"),g=await Be.getItemData(u,k,"");return Er(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:k}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:D,valueCol:C,isSelfDetail:V}=i||{};return g&&f&&Bt.isNumber(D)&&Bt.isNumber(C)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:D,detailValueCol:C,isSelfDetail:V}):Bt.isNumber(u)&&Bt.isNumber(k)?await Eu({menu:r,group:d,nameCol:u,valueCol:k}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Sa==null?void 0:Sa[r];if(!u)return;const{initBaseoptions:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:D,values:C}=await ho(i,s);if(!D||!C)return f;f.xAxis.data=D;const V=g({data:C});return f.series.push(V),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Sa==null?void 0:Sa[r];if(!u)return;const{initBaseoptions:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:D,values:C}=await ho(i,s);if(!D||!C)return f;f.xAxis.data=D;const V=g({data:C});return f.series.push(V),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Sa==null?void 0:Sa[r];if(!u)return;const{initBaseoptions:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:D,values:C}=await ho(i,s);if(!D||!C)return f;const V=[];for(let Y=0;Y<D.length;Y++){const L=D[Y],we=C[Y];V.push({name:L,value:we})}const F=g({data:V});return f.series.push(F),f},Bu=async(n=[])=>{var k,g,f;const i=((k=n==null?void 0:n.find(D=>D.key==="chartBaseConfig"))==null?void 0:k.contents)??{},s=((g=n==null?void 0:n.find(D=>D.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(D=>D.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=Kt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},Lu={class:"form-content"},zu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},Ku=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),k=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var G;u.value=k(),(G=u.value)==null||G.forEach(ae=>{var re;const Z=ae==null?void 0:ae.prop;ae.value=(re=g==null?void 0:g.value)==null?void 0:re[Z]}),d.visible=!0},D=G=>{g.value=G},C=()=>{var G;d.visible=!1,r("change",(G=pe())==null?void 0:G.compData)},V=e.reactive({visible:!1,width:"840",title:"数据配置"}),F=e.ref([]),Y=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],L=e.ref({}),we=()=>{const G=F.value,ae=v.cloneDeep(G);return ae==null||ae.forEach(Z=>{var Re;const re=Z==null?void 0:Z.prop;Z.value=(Re=L.value)==null?void 0:Re[re]}),ae},q=G=>{var Z;L.value=G;const ae=we();F.value=ae,r("change",(Z=pe())==null?void 0:Z.compData)},K=async()=>{const G=await Be.getMenusContent(),ae=we();ae==null||ae.forEach(Z=>{(Z==null?void 0:Z.prop)==="menu"&&(Z.contents=G)}),F.value=ae,V.visible=!0,await qe(L.value.menu),await z(L.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),R=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),B=()=>{const G=w.value,ae=v.cloneDeep(G);return ae==null||ae.forEach(Z=>{var Re;const re=Z==null?void 0:Z.prop;Z.value=(Re=y.value)==null?void 0:Re[re]}),ae},S=G=>{var Z;y.value=G;const ae=B();w.value=ae,r("change",(Z=pe())==null?void 0:Z.compData)},ye=async()=>{await O();const G=v.cloneDeep(Ze.value),ae=B();ae==null||ae.forEach(Z=>{var Re;const re=Z==null?void 0:Z.prop;Z.value=(Re=y==null?void 0:y.value)==null?void 0:Re[re],re==="mainKey"&&(Z.contents=G)}),w.value=ae,le.visible=!0},Ze=e.ref([]),rt=e.ref([]),Ae=e.ref({}),je=e.ref({}),Ie=()=>{const{compData:G}=Ce.value||{},ae=G==null?void 0:G.find(I=>{const{key:W}=I;return W==="header"}),Z=(ae==null?void 0:ae.contents)||[],re=Z==null?void 0:Z.filter((I,W)=>{const{label:x}=I;return x!=="操作"}),Re=re==null?void 0:re.findIndex((I,W)=>{const{isMainKey:x}=I;return x});if(Re<0)return[];const lt=G==null?void 0:G.find(I=>{const{key:W}=I;return W==="tableContents"}),h=(lt==null?void 0:lt.contents)||[];return h==null?void 0:h.map(I=>{const W=I==null?void 0:I[0];let x=Re;v.isObject(W)&&(W!=null&&W.id)&&(x=x+1);const ie=I==null?void 0:I[x];return{label:ie,value:ie}})},O=async()=>{const G=await Ie();Ze.value=G},ee=async G=>{const ae=sessionStorage.getItem("systemKey");return await Be.getItemData(G,ae,"")},se=async G=>{const ae=G;rt.value=ae==null?void 0:ae.map(Z=>{const{name:re}=Z;return Ae.value[re]=Z,{label:re,value:re}})},he=G=>{const{comp:ae,compData:Z}=je.value||{};if(ae==="Table"){let re=B();re=re.filter(Re=>{const{prop:lt}=Re;return lt!=="formItems"}),Xe(re,Z),w.value=re}},Ge=async()=>{var Z,re;const G=(Z=y==null?void 0:y.value)==null?void 0:Z.mainKey,ae=(re=L==null?void 0:L.value)==null?void 0:re.menu;if(G){const lt=`${ae==null?void 0:ae.join("/")}^${G}`,h=await ee(lt);await se(h);const _=B();_==null||_.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=rt.value)}),w.value=_}};e.watch(()=>{var G;return(G=y==null?void 0:y.value)==null?void 0:G.mainKey},async(G,ae)=>{G!=ae&&G&&await Ge()});const it=async G=>{const ae=Ae.value[G];je.value=ae,await he()};e.watch(()=>{var G;return(G=y==null?void 0:y.value)==null?void 0:G.group},async(G,ae)=>{G!=ae&&G&&it(G)});const J=async()=>{var ae;await Ge();const G=(ae=y.value)==null?void 0:ae.group;await it(G)},M=e.ref([]),xe=e.ref({}),Ce=e.ref({}),Pe=async G=>{const ae=G==null?void 0:G.join("/"),Z=sessionStorage.getItem("systemKey");return await Be.getItemData(ae,Z,"")},Fe=async G=>{const ae=await Pe(G);M.value=ae==null?void 0:ae.map(Z=>{const{name:re}=Z;return xe.value[re]=Z,{label:re,value:re}})},qe=async(G,ae)=>{await Fe(G);const Z=we();Z==null||Z.forEach(re=>{(re==null?void 0:re.prop)==="group"&&(re.contents=M.value)}),F.value=Z};e.watch(()=>{var G;return(G=L==null?void 0:L.value)==null?void 0:G.menu},async(G,ae)=>{const Z=G==null?void 0:G.join("/"),re=ae==null?void 0:ae.join("/");Z!=re&&await qe(G)});const Xe=(G,ae)=>{const Z=ae==null?void 0:ae.find(h=>{const{key:_}=h;return _==="header"}),re=(Z==null?void 0:Z.contents)||[],Re=re==null?void 0:re.filter((h,_)=>{const{label:I}=h;return I!=="操作"}),lt=Re==null?void 0:Re.map((h,_)=>{const{label:I}=h;return{label:I,value:_}});G==null||G.forEach(h=>{const _=h==null?void 0:h.prop;(_==="nameCol"||_==="valueCol")&&(h.contents=lt)})},fe=G=>{const{comp:ae,compData:Z}=Ce.value||{};if(ae==="Table"){L.value.formItems=[];let re=we();re=re.filter(Re=>{const{prop:lt}=Re;return lt!=="formItems"}),Xe(re,Z),F.value=re}},z=async G=>{const ae=xe.value[G];Ce.value=ae,await fe()};e.watch(()=>{var G;return(G=L==null?void 0:L.value)==null?void 0:G.group},async(G,ae)=>{G!=ae&&z(G)});const X=async()=>{var Z,re;const G=(Z=L.value)==null?void 0:Z.menu;await qe(G);const ae=(re=L.value)==null?void 0:re.group;await z(ae)},pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:L.value},{key:"chartDetailConfig",contents:y.value}]}),ce=()=>{d.visible=!1,V.visible=!1,le.visible=!1};return e.onMounted(async()=>{var ae,Z,re;F.value=Y(),w.value=R();const G=s==null?void 0:s.itemContents;g.value=((ae=G==null?void 0:G.find(Re=>Re.key==="chartBaseConfig"))==null?void 0:ae.contents)??{},L.value=((Z=G==null?void 0:G.find(Re=>Re.key==="chartDataConfig"))==null?void 0:Z.contents)??{},await X(),y.value=((re=G==null?void 0:G.find(Re=>Re.key==="chartDetailConfig"))==null?void 0:re.contents)??{},await J()}),(G,ae)=>{const Z=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[ae[4]||(ae[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Z,{id:"themeButton",onClick:ae[0]||(ae[0]=re=>f())},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[ae[6]||(ae[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Z,{id:"themeButton",onClick:ae[1]||(ae[1]=re=>K())},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[ae[8]||(ae[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Z,{id:"themeButton",onClick:ae[2]||(ae[2]=re=>ye())},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Zt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ce,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Lu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(Z,{class:"cancel-button button",onClick:ce,id:"themeBorderButton"},{default:e.withCtx(()=>ae[9]||(ae[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Z,{class:"ok-button button",onClick:C,id:"themeButton"},{default:e.withCtx(()=>ae[10]||(ae[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Zt.ssDialog,{visible:V.visible,title:V.title,onBeforeDestroy:ce,width:V.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:q},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(Z,{class:"cancel-button button",onClick:ce,id:"themeBorderButton"},{default:e.withCtx(()=>ae[11]||(ae[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Z,{class:"ok-button button",onClick:ce,id:"themeButton"},{default:e.withCtx(()=>ae[12]||(ae[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Zt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:ce,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(Z,{class:"cancel-button button",onClick:ce,id:"themeBorderButton"},{default:e.withCtx(()=>ae[13]||(ae[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Z,{class:"ok-button button",onClick:ce,id:"themeButton"},{default:e.withCtx(()=>ae[14]||(ae[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=Kt._export_sfc(Ku,[["__scopeId","data-v-fe119645"]]);var Fn={exports:{}},Uu=Fn.exports,Fo;function Wu(){return Fo||(Fo=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(D,C){return typeof C>"u"?C={autoBom:!1}:typeof C!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),C={autoBom:!C}),C.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function r(D,C,V){var F=new XMLHttpRequest;F.open("GET",D),F.responseType="blob",F.onload=function(){f(F.response,C,V)},F.onerror=function(){console.error("could not download file")},F.send()}function d(D){var C=new XMLHttpRequest;C.open("HEAD",D,!1);try{C.send()}catch{}return 200<=C.status&&299>=C.status}function u(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var C=document.createEvent("MouseEvents");C.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(C)}}var k=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Be.commonjsGlobal=="object"&&Be.commonjsGlobal.global===Be.commonjsGlobal?Be.commonjsGlobal:void 0,g=k.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=k.saveAs||(typeof window!="object"||window!==k?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(D,C,V){var F=k.URL||k.webkitURL,Y=document.createElement("a");C=C||D.name||"download",Y.download=C,Y.rel="noopener",typeof D=="string"?(Y.href=D,Y.origin===location.origin?u(Y):d(Y.href)?r(D,C,V):u(Y,Y.target="_blank")):(Y.href=F.createObjectURL(D),setTimeout(function(){F.revokeObjectURL(Y.href)},4e4),setTimeout(function(){u(Y)},0))}:"msSaveOrOpenBlob"in navigator?function(D,C,V){if(C=C||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(s(D,V),C);else if(d(D))r(D,C,V);else{var F=document.createElement("a");F.href=D,F.target="_blank",setTimeout(function(){u(F)})}}:function(D,C,V,F){if(F=F||open("","_blank"),F&&(F.document.title=F.document.body.innerText="downloading..."),typeof D=="string")return r(D,C,V);var Y=D.type==="application/octet-stream",L=/constructor/i.test(k.HTMLElement)||k.safari,we=/CriOS\/[\d]+/.test(navigator.userAgent);if((we||Y&&L||g)&&typeof FileReader<"u"){var q=new FileReader;q.onloadend=function(){var w=q.result;w=we?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),F?F.location.href=w:location=w,F=null},q.readAsDataURL(D)}else{var K=k.URL||k.webkitURL,le=K.createObjectURL(D);F?F.location=le:location.href=le,F=null,setTimeout(function(){K.revokeObjectURL(le)},4e4)}});k.saveAs=f.saveAs=f,n.exports=f})}(Fn)),Fn.exports}Wu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BQRQ125X.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Sr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Tr=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),k=d==null?void 0:d.filter(C=>C!==(u==null?void 0:u[s])),g=s+1,f=Tr(k,u,g),D=[];D.push(d==null?void 0:d[0]),f==null||f.forEach(C=>{D.push(C)}),d=D}return d})),r},eo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(k=>k===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let k=v.cloneDeep(i),g=u==null?void 0:u.filter(V=>V!==(k==null?void 0:k[r])),f=r+1,D=eo(g,k,s,f),C=[];C.push(u==null?void 0:u[0]),D==null||D.forEach(V=>{C.push(V)}),u=C}return u})),d},go=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(k=>Array.isArray(k))&&(u!=null&&u.every(k=>Array.isArray(k)&&k.length===1)?u=u==null?void 0:u.map(k=>((k==null?void 0:k[0])===s&&(k=[r]),k)):u=u==null?void 0:u.map(k=>{if(k!=null&&k.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=k==null?void 0:k.filter(F=>F!==(g==null?void 0:g[d])),D=d+1,C=go(f,g,s,r,D),V=[];V.push(k==null?void 0:k[0]),C==null||C.forEach(F=>{V.push(F)}),k=V}return k})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Zt.ssDialog,ssInput:Bt._sfc_main$2},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=Ut.useMenuState(),k=Ut.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),D=e.ref(0),C=Pl.useRouter(),V=e.ref(),{asideMenus:F,menuTriggerType:Y,platform:L}=v.storeToRefs(u),{fixMenuStatus:we}=v.storeToRefs(k),q=e.computed(()=>r==null?void 0:r.mode),K=fe=>fe==null?void 0:fe.map(X=>{var pe,ce;return!(X!=null&&X.children)||((pe=X==null?void 0:X.children)==null?void 0:pe.length)===0?X.config=d.value:X!=null&&X.children&&((ce=X==null?void 0:X.children)==null?void 0:ce.length)>0&&(X.children=K(X.children)),X}),le=e.computed(()=>{let fe=[...F.value];if((fe==null?void 0:fe.length)===0)return C.push("/"),[];const z=Ze(fe,S.value);return z.isFlag||(fe=z==null?void 0:z.data),fe=fe==null?void 0:fe.map(X=>{var pe,ce;return!(X!=null&&X.children)||((pe=X==null?void 0:X.children)==null?void 0:pe.length)===0?X.config=d.value:X!=null&&X.children&&((ce=X==null?void 0:X.children)==null?void 0:ce.length)>0&&(X.children=K(X.children)),X}),fe}),w=async(fe,z)=>{k.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(fe==null?void 0:fe.path),u.setActiveAsideMenu(fe),fe.isRouter?C.push(fe.path):C.push("/"),s("node-click",fe,z)},R=async fe=>{const z=v.findNodeByPropInTree(le.value,"path",fe);u.setActiveAsideMenu(z),k.setRouteToChildPath(""),we.value?k.setFixMenuStatus(!1):(qe.value&&(Y.value="open"),Y.value==="click"?D.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(fe):qe.value||(u.setMenuTriggerType("click"),u.setActiveMenuPath(fe))),fe!=null&&fe.startsWith("/")?C.push(fe):C.push("/"),D.value++},y=fe=>{qe.value||u.setActiveMenuPath(fe)},B=fe=>{const z=document.documentElement;fe==null||fe.forEach(X=>{z.style.setProperty(X.name,X.value)})};e.onMounted(()=>{D.value=1});const S=e.computed(()=>{const fe=sessionStorage.getItem("authority");return fe?JSON.parse(fe):[]});e.watch(()=>L.value,fe=>{fe==="browser"?B(yn.browserVerticalMenuClasses):fe==="client"?(B(yn.clientHorizontalMenuClasses),B(yn.clientVerticalMenuClasses)):fe==="three"&&(B(yn.threeHorizontalMenuClasses),B(yn.threeVerticalMenuClasses))},{immediate:!0});const ye=(fe,z)=>{function X(pe){pe==null||pe.forEach(ce=>{var ae,Z;const G=(ae=ce==null?void 0:ce.path)!=null&&ae.startsWith("/")?(Z=ce==null?void 0:ce.path)==null?void 0:Z.substring(1):ce==null?void 0:ce.path;ce.show=z==null?void 0:z.some(re=>re==null?void 0:re.includes(G)),ce.children&&X(ce.children)})}return X(fe),fe},Ze=(fe,z)=>{if(Array.isArray(z)){const X=Array.from(new Set(z==null?void 0:z.map(pe=>pe.substring(0,pe.lastIndexOf("/")))));return{data:ye(fe,X),isFlag:!1}}else return{isFlag:(z==null?void 0:z.toUpperCase())==="SUPERADMIN"}},rt=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Ae=fe=>rn(fe),je=e.ref({}),Ie=e.ref([]),O=e.ref({}),ee=e.ref({}),se=fe=>{switch(fe){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},he=e.ref({}),Ge=fe=>{u.setCacheInputMenu({type:rt.type,data:fe}),u.setIsRefreshMenus(!0)},it=async(fe,z,X)=>{var pe,ce,G,ae,Z,re,Re,lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et,Ye,ze;if(z==="create"){let at=(X==null?void 0:X.title)+"(1)",ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(ce=(pe=ve==null?void 0:ve.data)==null?void 0:pe.result)==null?void 0:ce[0],Me=(G=Se==null?void 0:Se.value)==null?void 0:G.pageData;Me.compData=(ae=Me.compData)==null?void 0:ae.map(ue=>{var He;return(ue==null?void 0:ue.key)==="menuContents"&&(ue.contents=eo(ue.contents,(He=X==null?void 0:X.path)==null?void 0:He.split("/"),at)),ue}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:Me}});let Qe=(re=(Z=X==null?void 0:X.path)==null?void 0:Z.split("/"))==null?void 0:re.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}),A=await Be.getItemData((h=(lt=(Re=X==null?void 0:X.path)==null?void 0:Re.split("/"))==null?void 0:lt.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(Qe.push(at),Qe=Qe==null?void 0:Qe.join("/"),(A==null?void 0:A.length)>0){let ue=A==null?void 0:A[0],He=(I=(_=ue==null?void 0:ue.compData)==null?void 0:_.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:I.contents;if(((W=He==null?void 0:He[0])==null?void 0:W.directiveLabel)==="#isMain"){let me=(x=He==null?void 0:He[0])==null?void 0:x.prop,nt=(_e=(ie=ue==null?void 0:ue.compData)==null?void 0:ie.find(yt=>(yt==null?void 0:yt.key)==="tableContents"))==null?void 0:_e.contents,kt;nt==null||nt.forEach(yt=>{var ht,dt;if(yt.length===1)((ht=yt==null?void 0:yt[0])==null?void 0:ht[me])===(X==null?void 0:X.title)&&(kt=yt==null?void 0:yt[0],kt[me]=at);else{let ft=(dt=He==null?void 0:He.filter(Vt=>Vt!=="操作"))==null?void 0:dt.map(Vt=>Vt==null?void 0:Vt.prop),_t=yt==null?void 0:yt.filter(Vt=>!(Vt!=null&&Vt.id)),Mt=Be.getValueToObjectValue(_t,ft);Mt[me]=at,kt=Mt}}),await v.createInsofDataApi({key:{type:"data",pageKey:($=(te=(E=X==null?void 0:X.path)==null?void 0:E.split("/"))==null?void 0:te.filter((yt,ht)=>{var dt,ft;return ht!==((ft=(dt=X==null?void 0:X.path)==null?void 0:dt.split("/"))==null?void 0:ft.length)-1}))==null?void 0:$.join("/"),tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Ee=f.value)==null?void 0:Ee.dept)||((ne=f.value)==null?void 0:ne.部门名称)},value:{tableData:kt}})}}await Be.newLoadingConstruct(X==null?void 0:X.path,Qe),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((de=(Q=(H=X==null?void 0:X.path)==null?void 0:H.split("/"))==null?void 0:Q.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:de.join("/")),u.setActiveTopMenuPath((be=(De=X==null?void 0:X.path)==null?void 0:De.split("/"))==null?void 0:be[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(z==="update")V.value=X;else if(z==="delete"){let at=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:X==null?void 0:X.path}}),ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(j=(ke=ve==null?void 0:ve.data)==null?void 0:ke.result)==null?void 0:j[0],Me=(Ne=Se==null?void 0:Se.value)==null?void 0:Ne.pageData;if(Me.compData=(ge=Me.compData)==null?void 0:ge.map(ue=>{var He;return(ue==null?void 0:ue.key)==="menuContents"&&(ue.contents=Tr(ue.contents,(He=X==null?void 0:X.path)==null?void 0:He.split("/"))),ue}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:Me}}),((ct=(Le=at==null?void 0:at.data)==null?void 0:Le.result)==null?void 0:ct.length)>0){let ue=(ot=(Ue=at==null?void 0:at.data)==null?void 0:Ue.result)==null?void 0:ot.map(He=>He==null?void 0:He.id);(ue==null?void 0:ue.length)>0&&await v.batchDeleteInsofDataApi({ids:ue})}let Qe=await Be.getItemData((tt=(gt=(Oe=X==null?void 0:X.path)==null?void 0:Oe.split("/"))==null?void 0:gt.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:tt.join("/"),sessionStorage.getItem("systemKey"),""),A=[];(Qe==null?void 0:Qe.length)>0&&(Qe==null||Qe.forEach(ue=>{var me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt;let He=(yt=(kt=(nt=(me=ue==null?void 0:ue.compData)==null?void 0:me.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:nt.contents)==null?void 0:kt[0])==null?void 0:yt.prop;((_t=(ft=(dt=(ht=ue==null?void 0:ue.compData)==null?void 0:ht.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:dt.contents)==null?void 0:ft[0])==null?void 0:_t.directiveLabel)==="#isMain"&&((Lt=(Vt=(Mt=ue==null?void 0:ue.compData)==null?void 0:Mt.find(bt=>(bt==null?void 0:bt.key)==="tableContents"))==null?void 0:Vt.contents)==null||Lt.forEach(bt=>{var jt,qt,Gt;(bt==null?void 0:bt.length)>1?(bt==null?void 0:bt[1])===(X==null?void 0:X.title)&&A.push((jt=bt==null?void 0:bt[0])==null?void 0:jt.id):((qt=bt==null?void 0:bt[0])==null?void 0:qt[He])===(X==null?void 0:X.title)&&A.push((Gt=bt==null?void 0:bt[0])==null?void 0:Gt.id)}))})),(A==null?void 0:A.length)>0&&await v.batchDeleteInsofDataApi({ids:A}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((et=($e=(Ve=X==null?void 0:X.path)==null?void 0:Ve.split("/"))==null?void 0:$e.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:et.join("/")),u.setActiveTopMenuPath((ze=(Ye=X==null?void 0:X.path)==null?void 0:Ye.split("/"))==null?void 0:ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},J=async(fe,z)=>{var lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve;let X=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),pe=(h=(lt=X==null?void 0:X.data)==null?void 0:lt.result)==null?void 0:h[0],ce=(_=pe==null?void 0:pe.value)==null?void 0:_.pageData;ce.compData=(I=ce.compData)==null?void 0:I.map($e=>{var et,Ye;return($e==null?void 0:$e.key)==="menuContents"&&($e.contents=go($e.contents,(et=z==null?void 0:z.path)==null?void 0:et.split("/"),z==null?void 0:z.title,(Ye=fe==null?void 0:fe.target)==null?void 0:Ye.value)),$e}),pe!=null&&pe.id&&await v.updateInsofDataApi({id:pe==null?void 0:pe.id,value:{pageData:ce}});let G=(x=(W=z==null?void 0:z.path)==null?void 0:W.split("/"))==null?void 0:x.filter(($e,et)=>{var Ye,ze;return et!==((ze=(Ye=z==null?void 0:z.path)==null?void 0:Ye.split("/"))==null?void 0:ze.length)-1}),ae=G==null?void 0:G.join("/");G.push((ie=fe==null?void 0:fe.target)==null?void 0:ie.value),G=G==null?void 0:G.join("/");let Z=await Be.getItemData(ae,sessionStorage.getItem("systemKey"),"");if(((P=($=(te=(E=(_e=Z==null?void 0:Z[0])==null?void 0:_e.compData)==null?void 0:E.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:te.contents)==null?void 0:$[0])==null?void 0:P.directiveLabel)==="#isMain"){let $e=(de=(Q=(H=(ne=(Ee=Z==null?void 0:Z[0])==null?void 0:Ee.compData)==null?void 0:ne.find(at=>(at==null?void 0:at.key)==="header"))==null?void 0:H.contents)==null?void 0:Q[0])==null?void 0:de.prop,et=(ke=(be=(De=Z==null?void 0:Z[0])==null?void 0:De.compData)==null?void 0:be.find(at=>(at==null?void 0:at.key)==="tableContents"))==null?void 0:ke.contents,Ye=(Le=(ge=(Ne=(j=Z==null?void 0:Z[0])==null?void 0:j.compData)==null?void 0:Ne.find(at=>(at==null?void 0:at.key)==="header"))==null?void 0:ge.contents)==null?void 0:Le.map(at=>at==null?void 0:at.prop),ze;if(et==null||et.forEach(at=>{var Se;let ve=Be.getValueToObjectValue(at,Ye);(ve==null?void 0:ve[$e])===z.title&&(ze=ve,ze[$e]=(Se=fe==null?void 0:fe.target)==null?void 0:Se.value)}),ze){let at={};for(let Se in ze)Se!=="id"&&(at[Se]=ze==null?void 0:ze[Se]);let ve=[{id:ze==null?void 0:ze.id,value:{tableData:at}}];await v.batchUpdateInsofDataApi({dataList:ve})}}let re=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:z==null?void 0:z.path}}),Re=(Ue=(ct=re==null?void 0:re.data)==null?void 0:ct.result)==null?void 0:Ue.map($e=>({id:$e==null?void 0:$e.id,key:$e==null?void 0:$e.key}));Re=Re==null?void 0:Re.map($e=>($e.key.pageKey=G,$e)),(Re==null?void 0:Re.length)>0&&await v.batchUpdateInsofDataApi({dataList:Re}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((gt=(Oe=(ot=z==null?void 0:z.path)==null?void 0:ot.split("/"))==null?void 0:Oe.filter(($e,et)=>{var Ye,ze;return et!==((ze=(Ye=z==null?void 0:z.path)==null?void 0:Ye.split("/"))==null?void 0:ze.length)-1}))==null?void 0:gt.join("/")),u.setActiveTopMenuPath((Ve=(tt=z==null?void 0:z.path)==null?void 0:tt.split("/"))==null?void 0:Ve[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),V.value=void 0},M=async(fe,z)=>{rt.type=se(z==null?void 0:z.operateType),await it(z,rt.type,fe),ee.value=fe,he.value=z},xe=()=>{rt.show=!1},Ce=fe=>fe==null?void 0:fe.filter(z=>z.allowInherit),Pe=()=>{var X,pe,ce,G,ae;let fe;rt.type==="create"&&(fe=((X=ee.value)==null?void 0:X.path)+"/"+O.value[(pe=O.value)==null?void 0:pe.prop]),rt.type==="update"&&(fe=(ce=ee.value)==null?void 0:ce.path);const z={...ee.value,config:Ce((G=ee.value)==null?void 0:G.config),children:[],childMenus:[],title:O.value[(ae=O.value)==null?void 0:ae.prop],path:fe};console.log("clickSubmitForm",he.value,ee.value,z),Ge(z),rt.show=!1},Fe=fe=>{var X,pe;const z=(X=fe==null?void 0:fe.contents)==null?void 0:X.find(ce=>ce.key==="formContent");z&&(O.value=(pe=z==null?void 0:z.contents)==null?void 0:pe.reduce((ce,G)=>(ce[G.key]=G.value,ce.prop=G.key,ce),{}))},qe=e.ref(!1);return{isCollapse:qe,handleMenuCollapse:()=>{qe.value=!qe.value},handleCompChange:Fe,dialogForm:je,dialogRenderComps:Ie,getComponents:Ae,clickSubmitForm:Pe,dialogInfo:rt,beforeDialogDestroy:xe,clickMenuIcon:M,mode:q,renderMenuList:le,clickMenu:w,openMenu:R,closeMenu:y,changeMenuStyle:B,fixElement:V,onBlur:J}}}}e.defineComponent(Ir());const Ta=v.useLoginState(),{loginUserInfo:Vn}=v.storeToRefs(Ta),Pt=Ut.useModelComp(v.pinia),Rn=e.ref(!1),{itemData:Hu,itemGridData:tn,curStructureCompIds:Ro,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:Po,routeToChildPath:Xu,payloadTypes:mo,pageMapState:Un,itemExtendData:On}=v.storeToRefs(Pt),Ht=Ut.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:vt,platform:Up,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(Ht),fa=Be.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Jt}=v.storeToRefs(fa),ed=Be.useOriginalState(v.pinia),{originalPath:to}=v.storeToRefs(ed),Qt=e.ref(),$o=Ut.useAuthorityState(v.pinia),Wn=e.ref(!0),fn=e.ref(0),Hn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=vt.value)!=null&&i.startsWith("/")?(s=vt.value)==null?void 0:s.substring(1):vt.value;return(n==null?void 0:n.includes(to.value))||await dd(n)}),td=()=>{Pt.setItemGridData([]),Pt.setIsEdit("edit"),Pt.setSubmitCurStructure(vt.value!=="/平台管理/菜单管理")},ad=()=>{Pt.setIsEdit("view"),Pt.setRefreshCurStructure(!0)},nd=async n=>{const i=sessionStorage.getItem("systemKey"),s=await Be.getItemData(n,i,"");return s&&s.length>0},od=async n=>{var g,f,D;let i=Qu.value,s=i==null?void 0:i.findIndex(C=>(C==null?void 0:C.value)===(n==null?void 0:n.value)),r=(g=i==null?void 0:i.filter(C=>(C==null?void 0:C.condition)==="parent"))==null?void 0:g.map(C=>C==null?void 0:C.value),d=r==null?void 0:r[0],u=(D=(f=i==null?void 0:i.filter((C,V)=>!(C!=null&&C.condition)&&V<=s))==null?void 0:f.map(C=>C.value))==null?void 0:D.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(C=>(C==null?void 0:C.condition)!=="child"),fa.setSelectTitle(i),fa.setChooseTitle([])),await nd(d)&&Ht.setActiveMenuPath(d)},lo=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,k;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var D;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(D=f==null?void 0:f.compData)==null?void 0:D.filter(C=>(C==null?void 0:C.key)!=="tableContents")}}}})},k=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var D;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(D=f==null?void 0:f.compData)==null?void 0:D.filter(C=>(C==null?void 0:C.key)!=="tableContents")}}}})},k=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},k=v.batchDeleteInsofDataApi);const g=await k(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},Ko=async(n,i,s,r)=>{var d,u,k,g,f,D,C,V,F,Y,L;try{const we=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),q=(g=(k=n==null?void 0:n.results)==null?void 0:k.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),le=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let w;s?w=(V=(C=(D=Un.value)==null?void 0:D[vt.value])==null?void 0:C.filter(y=>{var B,S,ye;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i&&((ye=(S=y==null?void 0:y.key)==null?void 0:S.relatedInfo)==null?void 0:ye.target)===r}))==null?void 0:V.map(y=>y==null?void 0:y.id):w=(L=(Y=(F=Un.value)==null?void 0:F[vt.value])==null?void 0:Y.filter(y=>{var B;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i}))==null?void 0:L.map(y=>y==null?void 0:y.id);const R=w==null?void 0:w.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(we==null?void 0:we.length)>0&&await v.batchAddInsofDataApi({dataList:we}),(q==null?void 0:q.length)>0&&await v.batchUpdateInsofDataApi({dataList:q}),(R==null?void 0:R.length)>0&&await v.batchDeleteInsofDataApi({ids:R})}catch(we){throw new Error(we)}},rd=async n=>{var D,C,V,F,Y,L,we,q,K,le;Ht.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return Ht.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(w=>w.id),r=s.filter(w=>{var R;return!((R=Ro.value)!=null&&R.includes(w))}),d=(D=Ro.value)==null?void 0:D.filter(w=>!s.includes(w)),u=[...r,...d].filter(w=>typeof w!==null&&typeof w<"u"),k=i==null?void 0:i.filter(w=>!w.id),g=i==null?void 0:i.filter(w=>w.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(lo(u,"delete",n)),k&&(k==null?void 0:k.length)>0&&f.push(lo(k,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(lo(g,"update",n)),tn.value&&((C=tn.value)!=null&&C.isDelete&&((F=(V=tn.value)==null?void 0:V.results)==null?void 0:F.length)>0&&((L=(Y=tn.value)==null?void 0:Y.results)!=null&&L.every(w=>typeof w=="number"))?await v.batchDeleteInsofDataApi({ids:(we=tn.value)==null?void 0:we.results}):(console.log("itemGridData.value",tn.value),f.push(await Ko(tn.value,"gridLayout")))),On.value)for(const w in On.value)f.push(await Ko((q=On.value)==null?void 0:q[w],"extend",{target:w,compId:(le=(K=On.value)==null?void 0:K[w])==null?void 0:le.compId},w));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),Pt.setRefreshCurStructure(!0)}).catch(w=>{v.ElMessage.success(w)}),Ht.setContentLoading(!1)},qn=n=>rn(n),pt=e.ref([]),ld=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),id=async n=>{var r,d,u,k,g,f;let i=v.cloneDeep(vt).value;i=i+to.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const D=(g=(k=s==null?void 0:s.data)==null?void 0:k.result)==null?void 0:g.map(V=>V==null?void 0:V.id),C=await v.batchDeleteInsofDataApi({ids:D});((f=C==null?void 0:C.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await Ta.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),Pt.setTableLoading(!1)}},jo=async n=>{var i,s;try{let r=v.cloneDeep(vt).value,d=[];if(Array.isArray(n)){n==null||n.forEach(k=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+to.value+((g=Object.values(k==null?void 0:k.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(k=>{var g;return((g=k==null?void 0:k.data)==null?void 0:g.code)===200}))){const k=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var D;return(D=f==null?void 0:f.data)==null?void 0:D.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:k});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await Ta.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await id(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{Pt.setTableLoading(!1)}},sd=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:vt.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const k=await Promise.all([u]);(k==null?void 0:k.every(f=>{var D;return((D=f==null?void 0:f.data)==null?void 0:D.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),wn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je,Ie,O,ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt;wn.value=null;let r=vt.value;if((d=Qt.value)!=null&&d.compData&&((u=Qt.value)==null?void 0:u.compData)!==vt.value&&(r=r+"/"+((g=(k=Jt.value)==null?void 0:k[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await jo(n):await Be.deleteTableContents((D=n==null?void 0:n.singleContent)==null?void 0:D.id,n),await Ta.setLogRecordAsync({type:"删除",data:n},vt.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((C=n==null?void 0:n.selectItems)!=null&&C.every(Ve=>typeof(Ve==null?void 0:Ve.id)=="string")){const Ve=(V=n==null?void 0:n.selectItems)==null?void 0:V.map($e=>({content:n==null?void 0:n.content,singleContent:$e,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await jo(Ve)}else{const Ve=(F=n==null?void 0:n.selectItems)==null?void 0:F.map($e=>$e==null?void 0:$e.id);await v.batchDeleteInsofDataApi({ids:Ve}),await Ta.setLogRecordAsync({type:"删除",data:Ve},vt.value)}else if((n==null?void 0:n.buttonName)==="OCR批量新增"){if(Array.isArray(n==null?void 0:n.ocrRows)&&((Y=n==null?void 0:n.ocrRows)==null?void 0:Y.length)>0){Pt.setTableLoading(n==null?void 0:n.index);const Ve=sessionStorage.getItem("systemKey"),$e=[],et=[];let Ye=r,ze=n==null?void 0:n.index;if(n!=null&&n.parentTableId&&(n==null?void 0:n.parentTableId)!==0){const at=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId}),ve=(we=(L=at==null?void 0:at.data)==null?void 0:L.result)==null?void 0:we[0];(q=ve==null?void 0:ve.key)!=null&&q.pageKey&&(Ye=ve.key.pageKey),ze=n==null?void 0:n.parentTableId}for(const at of n.ocrRows){const ve={};for(const Se in at)Se!=="id"&&Se!=="index"&&!(typeof Se=="string"&&Se.startsWith("_"))&&(ve[Se]=at[Se]);try{const Se=await v.createInsofDataApi({key:{type:i,pageKey:Ye,tableId:ze,systemKey:Ve},value:{tableData:ve}});if(((K=Se==null?void 0:Se.data)==null?void 0:K.code)===200){const Me=(le=Se==null?void 0:Se.data)==null?void 0:le.result;$e.push({resId:Me,compId:n==null?void 0:n.index,data:at}),et.push(Me)}}catch(Se){console.error("OCR数据保存失败:",Se)}}wn.value=$e,sessionStorage.setItem("ocr_last_saved_ids",JSON.stringify(et)),sessionStorage.setItem("ocr_last_saved_table",JSON.stringify({pageKey:Ye,tableId:ze,parentTableId:n==null?void 0:n.parentTableId,compIndex:n==null?void 0:n.index})),et.length>0?v.ElMessage.success(`成功保存 ${et.length} 条OCR识别数据`):v.ElMessage.warning("OCR数据保存失败,请重试"),await Ta.setLogRecordAsync({type:"新增",data:n==null?void 0:n.ocrRows},vt.value)}Pt.setCacheUpdatingData(null),Pt.setTableLoading(!1),Pt.setRefreshCurStructure(!0);return}else if((n==null?void 0:n.buttonName)==="新增"){let Ve={};for(let et in n==null?void 0:n.singleContent)et!=="id"&&et!=="index"&&(Ve[et]=n==null?void 0:n.singleContent[et]);const $e=await Be.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(Ve),n==null?void 0:n.column,n,{param:s});if(wn.value={resId:$e,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((R=(w=n==null?void 0:n.column)==null?void 0:w[0])==null?void 0:R.directiveLabel)==="#isMain"&&((B=(y=n==null?void 0:n.column)==null?void 0:y[0])==null?void 0:B.directiveColor)!==!0){let et=(Ze=n==null?void 0:n.singleContent)==null?void 0:Ze[(ye=(S=n==null?void 0:n.column)==null?void 0:S[0])==null?void 0:ye.prop],Ye=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ze=vt.value+"/"+(et==null?void 0:et.slice(0,(et==null?void 0:et.length)-3)),at=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ze}}),ve=(Ae=(rt=Ye==null?void 0:Ye.data)==null?void 0:rt.result)==null?void 0:Ae[0],Se=(je=ve==null?void 0:ve.value)==null?void 0:je.pageData;if(Se.compData=(Ie=Se.compData)==null?void 0:Ie.map(Me=>((Me==null?void 0:Me.key)==="menuContents"&&(Me.contents=eo(Me.contents,ze==null?void 0:ze.split("/"),et)),Me)),await v.updateInsofDataApi({id:ve==null?void 0:ve.id,value:{pageData:Se}}),((ee=(O=at==null?void 0:at.data)==null?void 0:O.result)==null?void 0:ee.length)>0)await Be.newLoadingConstruct(ze,vt.value+"/"+et);else{let Me=await v.getInsofDataApi({key:{pageKey:vt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((he=(se=Me==null?void 0:Me.data)==null?void 0:se.result)==null?void 0:he.length)>=1?await Be.newLoadingCutFirstConstruct(vt.value+"/",vt.value+"/"+et):await Be.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+et)}Ht.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Ht.setIsRefreshMenus(!1),Ht.setIsRefreshMenus(!0),Ht.setActiveMenuPath((it=(Ge=ze==null?void 0:ze.split("/"))==null?void 0:Ge.filter((Me,Qe)=>{var A;return Qe!==((A=ze==null?void 0:ze.split("/"))==null?void 0:A.length)-1}))==null?void 0:it.join("/"))}Pt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((M=(J=n==null?void 0:n.column)==null?void 0:J[0])==null?void 0:M.directiveLabel)==="#isMain"&&((Ce=(xe=n==null?void 0:n.column)==null?void 0:xe[0])==null?void 0:Ce.directiveColor)!==!0){let Ve=(qe=n==null?void 0:n.singleContent)==null?void 0:qe[(Fe=(Pe=n==null?void 0:n.column)==null?void 0:Pe[0])==null?void 0:Fe.prop];if(Bt.isNumber((Xe=n==null?void 0:n.singleContent)==null?void 0:Xe.id)){let $e=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),et=await v.getInsofDataApi({id:(fe=n==null?void 0:n.singleContent)==null?void 0:fe.id}),Ye=(Z=(ce=(pe=(X=(z=et==null?void 0:et.data)==null?void 0:z.result)==null?void 0:X[0])==null?void 0:pe.value)==null?void 0:ce.tableData)==null?void 0:Z[(ae=(G=n==null?void 0:n.column)==null?void 0:G[0])==null?void 0:ae.prop],ze=vt.value+"/"+Ye,at=(Re=(re=$e==null?void 0:$e.data)==null?void 0:re.result)==null?void 0:Re[0],ve=(lt=at==null?void 0:at.value)==null?void 0:lt.pageData;ve.compData=(h=ve.compData)==null?void 0:h.map(Se=>((Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=go(Se.contents,ze==null?void 0:ze.split("/"),Ye,Ve)),Se)),await v.updateInsofDataApi({id:at==null?void 0:at.id,value:{pageData:ve}}),Ht.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Ht.setIsRefreshMenus(!1),Ht.setIsRefreshMenus(!0),Ht.setActiveMenuPath((I=(_=ze==null?void 0:ze.split("/"))==null?void 0:_.filter((Se,Me)=>{var Qe;return Me!==((Qe=ze==null?void 0:ze.split("/"))==null?void 0:Qe.length)-1}))==null?void 0:I.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let Ve=[],$e=[],et=((x=(W=n==null?void 0:n.content)==null?void 0:W[0])==null?void 0:x.id)??"",Ye=s==null?void 0:s.url,ze="",at="";if((n==null?void 0:n.parentTableId)!==void 0&&(n==null?void 0:n.parentTableId)!==null&&(n==null?void 0:n.parentTableId)!==0){const ve=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId});ze=((te=(E=(_e=(ie=ve==null?void 0:ve.data)==null?void 0:ie.result)==null?void 0:_e[0])==null?void 0:E.key)==null?void 0:te.tableId)??(n==null?void 0:n.parentTableId),at=((ne=(Ee=(P=($=ve==null?void 0:ve.data)==null?void 0:$.result)==null?void 0:P[0])==null?void 0:Ee.key)==null?void 0:ne.pageKey)??""}else if(et!==""&&((H=n==null?void 0:n.content)==null?void 0:H.length)>1&&typeof((de=(Q=n==null?void 0:n.content)==null?void 0:Q[0])==null?void 0:de.id)!="string"){const ve=await v.getInsofDataApi({id:et});ze=((j=(ke=(be=(De=ve==null?void 0:ve.data)==null?void 0:De.result)==null?void 0:be[0])==null?void 0:ke.key)==null?void 0:j.tableId)??"",at=((ct=(Le=(ge=(Ne=ve==null?void 0:ve.data)==null?void 0:Ne.result)==null?void 0:ge[0])==null?void 0:Le.key)==null?void 0:ct.pageKey)??""}(Ue=n==null?void 0:n.singleContent)==null||Ue.forEach(ve=>{let Se={};for(let Me in ve)Me!=="id"&&Me!=="index"&&(Se[Me]=ve[Me]);typeof(ve==null?void 0:ve.id)=="number"?Ve.push({id:ve==null?void 0:ve.id,value:{tableData:Se}}):$e.push({key:{type:i,pageKey:Ye||at||vt.value,tableId:ze||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Se}})}),($e==null?void 0:$e.length)>0&&await v.batchAddInsofDataApi({dataList:$e}),(Ve==null?void 0:Ve.length)>0&&await v.batchUpdateInsofDataApi({dataList:Ve})}else{let Ve={},$e=(ot=n==null?void 0:n.singleContent)==null?void 0:ot.id;for(let et in n==null?void 0:n.singleContent)et!=="id"&&et!=="index"&&(Ve[et]=n==null?void 0:n.singleContent[et]);await Be.fixTableContents(i,r,n==null?void 0:n.index,$e,sessionStorage.getItem("systemKey"),Object.values(Ve),n==null?void 0:n.column,n)}Pt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await sd(n==null?void 0:n.value);Pt.setTableLoading(!1),(Oe=n==null?void 0:n.column)!=null&&Oe.some(Ve=>Ve==null?void 0:Ve.isMainKey),pt.value=await Be.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),pt.value=(gt=pt.value)==null?void 0:gt.filter(Ve=>{var $e;return(($e=Ve==null?void 0:Ve.compData)==null?void 0:$e.length)>0}),pt.value=(tt=pt.value)==null?void 0:tt.filter(Ve=>(Ve==null?void 0:Ve.comp)!==""),pt.value=await Be.getDeepDiffItems(pt.value),bo.value&&(n==null?void 0:n.buttonName)!=="删除"&&Pt.setRefreshCurStructure(!0)},cd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,k;if(Rn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await cd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Be.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(k=s==null?void 0:s.pageData)==null?void 0:k.isShow}),i&&(Ht.setActiveMenuPath(null),Ht.setActiveMenuPath(i))},Yn=async n=>{pt.value=await Be.getDeepDiffItems(n),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value)},ud=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},dd=async n=>{var u,k,g,f,D,C;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((V,F)=>{var Y;((Y=n==null?void 0:n.split("/"))==null?void 0:Y.length)-2>F&&(i=i===""?i+V:i+"/"+V)}),(k=n==null?void 0:n.split("/"))==null||k.forEach((V,F)=>{var Y;((Y=n==null?void 0:n.split("/"))==null?void 0:Y.length)-1>F&&(s=s===""?s+V:s+"/"+V)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((C=(D=d==null?void 0:d.data)==null?void 0:D.result)==null?void 0:C.length)>0},pd=e.ref(),Ea=e.ref(null),fd=n=>{var D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je;const i=(C=(D=Un.value)==null?void 0:D[n])==null?void 0:C.filter(Ie=>{var O;return((O=Ie==null?void 0:Ie.key)==null?void 0:O.type)==="extend"});if((i==null?void 0:i.length)===0)return Ea.value=null;pd.value=i;const s=(F=(V=i==null?void 0:i.find(Ie=>{var O,ee,se;return(se=(ee=(O=Ie==null?void 0:Ie.value)==null?void 0:O.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:V.value)==null?void 0:F.tableData;if(!s)return Ea.value=null;const r=(we=(L=(Y=i==null?void 0:i.find(Ie=>{var O,ee,se;return(se=(ee=(O=Ie==null?void 0:Ie.value)==null?void 0:O.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:Y.key)==null?void 0:L.relatedInfo)==null?void 0:we.compId,d=(q=pt.value)==null?void 0:q.find(Ie=>(Ie==null?void 0:Ie.id)===r);if(!d)return Ea.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],k=(y=(R=(w=d==null?void 0:d.compData)==null?void 0:w.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:R.contents)==null?void 0:y.findIndex(Ie=>(Ie==null?void 0:Ie.prop)===u),g=(Ze=(ye=(S=(B=d==null?void 0:d.compData)==null?void 0:B.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:S.contents)==null?void 0:ye.find(Ie=>Ie==null?void 0:Ie.isMainKey))==null?void 0:Ze.prop,f=(je=(Ae=(rt=d==null?void 0:d.compData)==null?void 0:rt.find(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"))==null?void 0:Ae.contents)==null?void 0:je[k];Ea.value={prop:u,value:f,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:g},console.log("getPageExtendData:",s,i)},vd=()=>{var n,i;console.log("倒计时结束时"),Ut.ElMessageBox.alert(`超时未提交,【${(i=(n=vt.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=vt.value)!=null&&n.includes(to.value)))return;const d=(i=pt.value)==null?void 0:i.find(f=>{var D;return((D=f==null?void 0:f.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},k=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=k==null?void 0:k.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Pt.setLockingPage(vt.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},yo=e.ref([]),hd=e.computed(()=>{var n,i;return(i=(n=Un.value)==null?void 0:n[vt.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{fa.setSelectTitle([]),fa.setChooseTitle([])},{deep:!0});e.watch(()=>[Jt.value],async()=>{var r,d,u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je,Ie,O,ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X;if(((r=Qt.value)==null?void 0:r.compData)===vt.value||((d=Jt.value)==null?void 0:d.length)===0)return;Ht.setContentLoading(!0);let n=new WeakMap;if((k=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:u.filter(pe=>{var ce,G;return((ce=pe==null?void 0:pe.key)==null?void 0:ce.pageKey)!=="menu"&&((G=pe==null?void 0:pe.key)==null?void 0:G.pageKey)!=="secret"}))==null||k.forEach(pe=>{n[pe.key.pageKey]?n[pe.key.pageKey]=[...n[pe.key.pageKey],pe]:n[pe.key.pageKey]=[pe]}),pt.value=await Be.getItemData(vt.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=pt.value)!=null&&g.find(pe=>(pe==null?void 0:pe.comp)==="")),Qt.value=(f=pt.value)==null?void 0:f.find(pe=>(pe==null?void 0:pe.comp)===""),((D=Qt.value)==null?void 0:D.compData)===vt.value){let pe=(C=vt.value)==null?void 0:C.split("/").map(ce=>({value:ce.trim()}));pe=[...pe,...Jt.value??[]]}else{let pe=(F=(V=Qt.value)==null?void 0:V.compData)==null?void 0:F.split("/").map(ce=>({value:ce.trim(),condition:"parent"}));if(!(!pe||(pe==null?void 0:pe.length)===0)){let ce=await Be.getItemData((Y=Qt.value)==null?void 0:Y.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);ce=ce==null?void 0:ce.filter(re=>{var Re,lt,h;return Array.isArray(re==null?void 0:re.compData)&&((h=(lt=(Re=re==null?void 0:re.compData)==null?void 0:Re.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:lt.contents)==null?void 0:h.find(_=>(_==null?void 0:_.directiveLabel)==="#isMain"))});let G=(le=(K=(q=(we=(L=ce==null?void 0:ce[0])==null?void 0:L.compData)==null?void 0:we.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:q.contents)==null?void 0:K.find(re=>(re==null?void 0:re.directiveLabel)==="#isMain"))==null?void 0:le.prop,ae=(B=(y=(R=(w=ce==null?void 0:ce[0])==null?void 0:w.compData)==null?void 0:R.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:y.contents)==null?void 0:B.findIndex(re=>(re==null?void 0:re.directiveLabel)==="#isMain"),Z=(rt=(Ze=(ye=(S=ce==null?void 0:ce[0])==null?void 0:S.compData)==null?void 0:ye.find(re=>(re==null?void 0:re.key)==="tableContents"))==null?void 0:Ze.contents)==null?void 0:rt.map(re=>{var Re;return(re==null?void 0:re.length)>1?re==null?void 0:re[ae+1]:(Re=re==null?void 0:re[0])==null?void 0:Re[G]});if(Z=Z==null?void 0:Z.map(re=>({label:re,value:re})),(Ae=Jt.value)==null||Ae.length,((Ie=(je=Jt.value)==null?void 0:je[0])==null?void 0:Ie.value)!==""){let re=await Be.getItemData(vt.value+"/"+((ee=(O=Jt.value)==null?void 0:O[0])==null?void 0:ee.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value);re||(await Be.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((he=(se=Jt.value)==null?void 0:se[0])==null?void 0:he.value)),re=await Be.getItemData(vt.value+"/"+((it=(Ge=Jt.value)==null?void 0:Ge[0])==null?void 0:it.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=re}}(pe==null?void 0:pe.length)>0&&((M=(J=Jt.value)==null?void 0:J[0])==null?void 0:M.value)===""&&(pt.value=[])}pt.value=(xe=pt.value)==null?void 0:xe.filter(pe=>(pe==null?void 0:pe.comp)!=="");let s="";if(!pt.value){let pe=(Fe=(Pe=(Ce=vt.value)==null?void 0:Ce.split("/"))==null?void 0:Pe.filter((ce,G)=>{var ae,Z;return G!==((Z=(ae=vt.value)==null?void 0:ae.split("/"))==null?void 0:Z.length)-1}))==null?void 0:Fe.join("/");pt.value=await Be.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(z=(qe=vt.value)==null?void 0:qe.split("/"))==null?void 0:z[((fe=(Xe=vt.value)==null?void 0:Xe.split("/"))==null?void 0:fe.length)-1]}await Ta.setLogRecordAsync({type:"查询",data:pt.value},vt.value),s!==""&&(pt.value=(X=pt.value)==null?void 0:X.map(pe=>{var ce;return pe!=null&&pe.isShow&&(pe.compData=(ce=pe==null?void 0:pe.compData)==null?void 0:ce.map(G=>{var ae,Z,re,Re,lt;if((G==null?void 0:G.key)==="tableContents"){let h=[],_="";_=(Re=(re=(Z=(ae=pe==null?void 0:pe.compData)==null?void 0:ae.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:Z.contents)==null?void 0:re[0])==null?void 0:Re.prop,h=(lt=G.contents)==null?void 0:lt.filter(I=>(I==null?void 0:I[_])===s||(I==null?void 0:I[1])===s),G.contents=h}return G})),pe})),pt.value=await Be.getDeepDiffItems(pt.value),Ht.setContentLoading(!1)},{deep:!0});const gd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(k=>{var g,f,D;if((k==null?void 0:k.title)===(u==null?void 0:u[0])){let C=u.slice(1);Array.isArray(k==null?void 0:k.childMenus)&&((g=k==null?void 0:k.childMenus)==null?void 0:g.length)===0||(C!=null&&C[0]&&(C==null?void 0:C.length)!==0?r(k==null?void 0:k.childMenus,C):s=(D=(f=k==null?void 0:k.childMenus)==null?void 0:f[0])==null?void 0:D.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[vt.value,Gu.value],async n=>{var u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je,Ie,O,ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt;if(!vt.value)return;Pt.setLockingPage(""),pt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Wn.value=!1,Rn.value=!0;const s=(k=n==null?void 0:n[0])!=null&&k.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((D=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:f.filter(h=>{var _,I;return((_=h==null?void 0:h.key)==null?void 0:_.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||D.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Hn.value=r,s){Ht.setContentLoading(!0),sessionStorage.setItem("pageKey",vt.value),fa.setSelectTitle([]),pt.value=await Be.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((C=pt.value)!=null&&C.find(I=>(I==null?void 0:I.comp)==="")),Qt.value=(V=pt.value)==null?void 0:V.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((F=Qt.value)!=null&&F.compData)){let I=gd(Zu.value,(Y=vt.value)==null?void 0:Y.split("/")),W=await Be.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);W!=null&&W.find(x=>(x==null?void 0:x.comp)==="")?h=(we=(L=W==null?void 0:W.find(x=>(x==null?void 0:x.comp)===""))==null?void 0:L.compData)==null?void 0:we.split("/").map(x=>({value:x.trim(),condition:"parent"})):fa.setChooseTitle([])}if(((q=Qt.value)==null?void 0:q.compData)===vt.value){let I=(K=vt.value)==null?void 0:K.split("/").map(W=>({value:W.trim()}));I=[...I,...Jt.value??[]],fa.setSelectTitle(I)}else{let I=[],W=(w=(le=Qt.value)==null?void 0:le.compData)==null?void 0:w.split("/").map(_e=>({value:_e.trim(),condition:"parent"}));if(!W||(W==null?void 0:W.length)===0)W=h,(W==null?void 0:W.length)===0&&(Qt.value={compData:vt.value});else{let _e=await Be.getItemData((R=Qt.value)==null?void 0:R.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);_e=_e==null?void 0:_e.filter(P=>{var Ee,ne,H;return Array.isArray(P==null?void 0:P.compData)&&((H=(ne=(Ee=P==null?void 0:P.compData)==null?void 0:Ee.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:ne.contents)==null?void 0:H.find(Q=>(Q==null?void 0:Q.directiveLabel)==="#isMain"))});let E=(Ze=(ye=(S=(B=(y=_e==null?void 0:_e[0])==null?void 0:y.compData)==null?void 0:B.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:S.contents)==null?void 0:ye.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Ze.prop,te=(Ie=(je=(Ae=(rt=_e==null?void 0:_e[0])==null?void 0:rt.compData)==null?void 0:Ae.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:je.contents)==null?void 0:Ie.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),$=(he=(se=(ee=(O=_e==null?void 0:_e[0])==null?void 0:O.compData)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:he.map(P=>{var Ee;return(P==null?void 0:P.length)>1?P==null?void 0:P[te+1]:(Ee=P==null?void 0:P[0])==null?void 0:Ee[E]});if($=$==null?void 0:$.map(P=>({label:P,value:P})),((Ge=Jt.value)==null?void 0:Ge.length)===0&&fa.setChooseTitle([{value:"",condition:"child",options:$,parentContent:(it=Qt.value)==null?void 0:it.compData}]),((M=(J=Jt.value)==null?void 0:J[0])==null?void 0:M.value)!==""){let P=await Be.getItemData(vt.value+"/"+((Ce=(xe=Jt.value)==null?void 0:xe[0])==null?void 0:Ce.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Be.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((Fe=(Pe=Jt.value)==null?void 0:Pe[0])==null?void 0:Fe.value)),P=await Be.getItemData(vt.value+"/"+((Xe=(qe=Jt.value)==null?void 0:qe[0])==null?void 0:Xe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=P}}(W==null?void 0:W.length)>0&&((z=(fe=Jt.value)==null?void 0:fe[0])==null?void 0:z.value)===""&&(pt.value=[]),I=[...I,...W??[]],I=[...I,...Jt.value??[]];let x=(X=vt.value)==null?void 0:X.split("/").map(_e=>({value:_e.trim()})),ie=x==null?void 0:x.filter(_e=>!(I!=null&&I.find(E=>(E==null?void 0:E.value)===(_e==null?void 0:_e.value))));I=[...I,...ie??[]],fa.setSelectTitle(I)}pt.value=(pe=pt.value)==null?void 0:pe.filter(I=>(I==null?void 0:I.comp)!=="");let _="";if(!pt.value){let I=(G=(ce=s==null?void 0:s.split("/"))==null?void 0:ce.filter((W,x)=>{var ie;return x!==((ie=s==null?void 0:s.split("/"))==null?void 0:ie.length)-1}))==null?void 0:G.join("/");pt.value=await Be.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),_=(Z=s==null?void 0:s.split("/"))==null?void 0:Z[((ae=s==null?void 0:s.split("/"))==null?void 0:ae.length)-1]}await Ta.setLogRecordAsync({type:"查询",data:pt.value},vt.value),_!==""&&(pt.value=(re=pt.value)==null?void 0:re.map(I=>{var W;return I!=null&&I.isShow&&(I.compData=(W=I==null?void 0:I.compData)==null?void 0:W.map(x=>{var ie,_e,E,te,$;if((x==null?void 0:x.key)==="tableContents"){let P=[],Ee="";Ee=(te=(E=(_e=(ie=I==null?void 0:I.compData)==null?void 0:ie.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:_e.contents)==null?void 0:E[0])==null?void 0:te.prop,P=($=x.contents)==null?void 0:$.filter(ne=>(ne==null?void 0:ne[Ee])===_||(ne==null?void 0:ne[1])===_),x.contents=P}return x})),I})),pt.value=await Be.getDeepDiffItems(pt.value),await ud(pt.value),Or(),fd(s),yo.value=(Re=pt.value)==null?void 0:Re.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),Pt.setExtraContents([]),fa.setSelectIndex(""),fa.setSelectMenu(""),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value),Pt.setCurStructureCompIds((lt=pt.value)==null?void 0:lt.map(I=>I==null?void 0:I.id)),Pt.setRefreshCurStructure(!1),Ht.setChildMenu(""),Ht.setContentLoading(!1),Pt.setTableLoading(!1),Rn.value=!1}else pt.value=[],Rn.value=!1;e.nextTick(()=>{fn.value=fn.value++,Wn.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,k,g,f,D,C,V,F,Y,L;if(Po.value){let we=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:n.filter(y=>{var B,S;return((B=y==null?void 0:y.key)==null?void 0:B.pageKey)!=="menu"&&((S=y==null?void 0:y.key)==null?void 0:S.pageKey)!=="secret"}))==null||i.forEach(y=>{we[y.key.pageKey]?we[y.key.pageKey]=[...we[y.key.pageKey],y]:we[y.key.pageKey]=[y]});let K=vt.value;(s=Qt.value)!=null&&s.compData&&((r=Qt.value)==null?void 0:r.compData)!==vt.value&&(K=K+"/"+((u=(d=Jt.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(k=vt.value)==null?void 0:k[0])!=null&&g.startsWith("/")?(D=(f=vt.value)==null?void 0:f[0])==null?void 0:D.substring(1):(C=vt.value)==null?void 0:C[0];let w=await Be.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),R="";if(!pt.value){let y=(F=(V=le==null?void 0:le.split("/"))==null?void 0:V.filter((B,S)=>{var ye;return S!==((ye=le==null?void 0:le.split("/"))==null?void 0:ye.length)-1}))==null?void 0:F.join("/");w=await Be.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,we),R=(L=le==null?void 0:le.split("/"))==null?void 0:L[((Y=le==null?void 0:le.split("/"))==null?void 0:Y.length)-1]}R!==""&&(w=w==null?void 0:w.map(y=>{var B;return y!=null&&y.isShow&&(y.compData=(B=y==null?void 0:y.compData)==null?void 0:B.map(S=>{var ye,Ze,rt,Ae,je;if((S==null?void 0:S.key)==="tableContents"){let Ie=[],O="";O=(Ae=(rt=(Ze=(ye=y==null?void 0:y.compData)==null?void 0:ye.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Ze.contents)==null?void 0:rt[0])==null?void 0:Ae.prop,Ie=(je=S.contents)==null?void 0:je.filter(ee=>(ee==null?void 0:ee[O])===R||(ee==null?void 0:ee[1])===R),S.contents=Ie}return S})),y})),w=w==null?void 0:w.filter(y=>(y==null?void 0:y.comp)!==""),pt.value=await Be.getDeepDiffItems(w),Pt.setFreshContent(!1),Or()}},{deep:!0});const md=async()=>{var d,u,k,g,f,D,C,V;Ht.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=Vn.value)==null?void 0:d.account)||((u=Vn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((k=Vn.value)==null?void 0:k.account)||((g=Vn.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:D.map(F=>F==null?void 0:F.id);const r=(V=(C=i==null?void 0:i.data)==null?void 0:C.result)==null?void 0:V.map(F=>F==null?void 0:F.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(F=>F!==null&&F))&&(await v.batchDeleteInsofDataApi({ids:s}),await Ta.setLogRecordAsync({type:"删除",data:s},vt.value)),Ht.setActiveMenuPath(Xu.value),pt.value=null,Pt.setRouteToChildPath(""),Ht.setChildMenu("")},yd=n=>new RegExp("button","i").test(n),bd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(bd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&Ht.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Lr=n=>{var i;Ea.value&&(Ea.value={...Ea.value,mainKeyPropValue:n==null?void 0:n[(i=Ea.value)==null?void 0:i.mainKeyProp]})},kd=n=>{Vr.value=n},dn=e.reactive({index:0,comp:null}),xd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:wd(i,s)}))}),zr=(n,i)=>{var f,D,C,V,F;const s=i?n:n-2,r=(f=pt.value)==null?void 0:f[s],d=(C=(D=r==null?void 0:r.compData)==null?void 0:D.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:C.contents,u=d==null?void 0:d.findIndex(Y=>(Y==null?void 0:Y.isMainKey)&&(Y==null?void 0:Y.label)!=="操作"),k=u===-1?0:u,g=(F=(V=r==null?void 0:r.compData)==null?void 0:V.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:F.contents;return{valid:g==null?void 0:g.every(Y=>Y==null?void 0:Y[k+1]),length:(g==null?void 0:g.length)||0}},wd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=zr(i,!0);dn.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,k;const i=n+1;if(i>1&&((d=(r=(s=pt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=zr(i);g?(dn.index=i,dn.comp=(u=pt.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else dn.index=i,dn.comp=(k=pt.value)==null?void 0:k[n]},bo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>bo.value,n=>{n&&Fr(0)},{immediate:!0});const Dd={class:"layout"},Cd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var C;const D=(C=d==null?void 0:d.value)==null?void 0:C.find(V=>{const{key:F}=V;return F==="baseConfig"});return D==null?void 0:D.contents}),k=e.computed(()=>{var C;const D=(C=d==null?void 0:d.value)==null?void 0:C.find(V=>{const{key:F}=V;return F==="children"});return D==null?void 0:D.contents}),g=e.computed(()=>{let D=v.cloneDeep(k.value)||[];const C=D.length;let V=0;const F=[];if(D=D.map(Y=>{const L=Y.span;return L?(Y.span=Number(L),V=V+Y.span):F.push(Y),Y}),V<24){const Y=Math.floor((24-V)/C);F.forEach(L=>{L.span=Y})}return D}),f=D=>{s("rowClick",D)};return(D,C)=>{var Y;const V=e.resolveComponent("el-col"),F=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Dd,[e.createVNode(F,{style:e.normalizeStyle({height:(Y=u.value)==null?void 0:Y.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(L,we)=>(e.openBlock(),e.createBlock(V,{span:L==null?void 0:L.span},{default:e.withCtx(()=>{var q;return[e.unref(Wn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(L.comp)),{key:e.unref(fn),compName:L.name,index:(L==null?void 0:L.id)??we,height:(q=u.value)==null?void 0:q.height,itemData:L==null?void 0:L.compData,childItemData:L==null?void 0:L.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),_d=Kt._export_sfc(Cd,[["__scopeId","data-v-ab9a36ed"]]),Ed={class:"layout-operate"},Sd={class:"layout-module"},Td={class:"collapse-title-item"},Id={class:"collapse-title"},Bd={class:"icon-content"},Nd=["onClick"],Ad={class:"comp-child"},Vd=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{we()});const d=e.ref({}),u=e.ref({}),k=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",R(),!0)},D=e.ref([]),C=e.ref([]),V=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],F=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),Y=e.computed(()=>{const y=F==null?void 0:F.value,B=y==null?void 0:y.find(S=>{const{key:ye}=S;return ye==="baseConfig"});return B==null?void 0:B.contents}),L=e.computed(()=>{const y=F==null?void 0:F.value,B=y==null?void 0:y.find(S=>{const{key:ye}=S;return ye==="children"});return B==null?void 0:B.contents}),we=()=>{var y;d.value=F.value||{},D.value=(L==null?void 0:L.value)||[],k.value=g(),k.value=(y=k.value)==null?void 0:y.map(B=>{var ye;const{prop:S}=B;return B.value=(ye=Y.value)==null?void 0:ye[S],B})};e.watch(()=>{var y;return(y=L==null?void 0:L.value)==null?void 0:y.length},()=>{var y;D.value=(L==null?void 0:L.value)||[],C.value=(y=L.value)==null?void 0:y.map(B=>V(B))},{immediate:!0});const q=(y,B)=>{const S=v.cloneDeep(L==null?void 0:L.value);S[B].span=y.span,D.value=S,r("change",R(),!0)},K=y=>rn(y),le=(y,B,S)=>{if(!y)return;const ye=v.cloneDeep(L==null?void 0:L.value);ye[S]&&(ye[S].compData=y,D.value=ye,r("change",R(),!0))},w=y=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let B=v.cloneDeep(L==null?void 0:L.value);B=B==null?void 0:B.filter((S,ye)=>y!==ye),D.value=B,r("change",R(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:D==null?void 0:D.value}]});return(y,B)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ed,[e.createElementVNode("div",Sd,[B[1]||(B[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:k.value,isEnableWrap:!0,onChange:B[0]||(B[0]=ye=>f(ye))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:L.value},{title:e.withCtx(({item:ye,index:Ze})=>[e.createElementVNode("div",Td,[e.createElementVNode("div",Id,e.toDisplayString(ye.name),1),e.createElementVNode("div",Bd,[e.createElementVNode("div",{onClick:e.withModifiers(rt=>w(Ze),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Nd)])])]),content:e.withCtx(({item:ye,index:Ze})=>[e.createElementVNode("div",Ad,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value[Ze],key:Ze,isEnableWrap:!0,onChange:rt=>q(rt,Ze)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(ye.comp+"Operate")),{itemContents:ye==null?void 0:ye.compData,originalItemContents:ye.compData,onChange:rt=>le(rt,ye,Ze)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Od=Kt._export_sfc(Vd,[["__scopeId","data-v-ba05456e"]]),Md=typeof window<"u";var Uo;Md&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ua(n){return n==null}function Rr(){}const Ld=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(Ld)));function zd(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Wo(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const k=Date.now(),g=k-r;clearTimeout(d),g>=i?(r=k,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function Fd(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const Dn=new Set,$r=new WeakMap;function Rd(){Dn.forEach(n=>{n(...$r.get(n))}),Dn.clear()}function oa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!Dn.has(n)&&(Dn.add(n),Dn.size===1&&Promise.resolve().then(Rd))}const Kr=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function Pd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=$d(n[s]);return i}function $d(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function un(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let k=0,g=d.length;k<g;k++){let f=d[k];f.static||(f=Kd(r,f,i,s),r.push(f)),u[n.findIndex(D=>D.i===f.i)]=f,f.moved=!1}return u}function Kd(n,i,s,r){if(s)for(;i.y>0&&!Cn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Cn(n,i);)i.y--}let d;for(;d=Cn(n,i);)i.y=d.y+d.h;return i}function jd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Cn(s,u);)u.y++}return n}function Ho(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Cn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const k=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let D=qr(n);f&&(D=D.reverse());const C=Wr(D,i);if(u&&C.length)return i.x=k,i.y=g,i.moved=!1,n;for(let V=0,F=C.length;V<F;V++){const Y=C[V];Y.moved||i.y>Y.y&&i.y-Y.y>Y.h/4||(Y.static?n=qo(n,Y,i,d):n=qo(n,i,Y,d))}return n}function qo(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Cn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function Ud(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).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 Gd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const k=n[d];for(let g=0;g<s.length;g++)if(typeof k[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(k.i===void 0||k.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof k.i!="number"&&typeof k.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(k.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(k.i),k.static!==void 0&&typeof k.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Xd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Go(n){return Yd(n)}function Yd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Xo(n,i,s,r){return Jd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Jd(n){return typeof n=="number"&&!Number.isNaN(n)}function Zd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const k=s[d];i>n[k]&&(r=k)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Qd(n,i,s,r,d,u,k){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),D=f.slice(f.indexOf(r));for(let C=0,V=D.length;C<V;C++){const F=D[C];if(i[F]){g=i[F];break}}return g=uo(g||[]),un(jd(g,{cols:u}),k)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let ep="auto";function tp(){return typeof document<"u"}function Yo(){return tp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):ep}var kn={exports:{}},ap=kn.exports,Jo;function np(){return Jo||(Jo=1,function(n,i){(function(s,r){n.exports=r()})(ap,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=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},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function k(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,we(l.key),l)}}function g(a,t,o){return t&&k(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=we(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function D(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&V(a,t)}function C(a){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(a)}function V(a,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},V(a,t)}function F(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Y(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,l=C(a);if(t){var c=C(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(p)}(this,o)}}function L(){return L=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=C(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},L.apply(this,arguments)}function we(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var q=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,le=void 0;function w(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),le=a}function R(a){return q(a)?a:(a.ownerDocument||a).defaultView||le.window}typeof window<"u"&&window&&w(window);var y=function(a){return!!a&&d(a)==="object"},B=function(a){return typeof a=="function"},S={window:function(a){return a===le||q(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:B,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=R(a)||le;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&B(a.splice)}};function ye(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Ze(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var rt={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=rt.draggable,t.map.drag=rt,t.methodDict.drag="draggable",l.actions.drag=rt.defaults},listeners:{"interactions:before-action-move":ye,"interactions:action-resume":ye,"interactions:action-move":Ze,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return S.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):S.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ye,move:Ze,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Ae=rt,je={init:function(a){var t=a;je.document=t.document,je.DocumentFragment=t.DocumentFragment||Ie,je.SVGElement=t.SVGElement||Ie,je.SVGSVGElement=t.SVGSVGElement||Ie,je.SVGElementInstance=t.SVGElementInstance||Ie,je.Element=t.Element||Ie,je.HTMLElement=t.HTMLElement||je.Element,je.Event=t.Event,je.Touch=t.Touch||Ie,je.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 Ie(){}var O=je,ee={init:function(a){var t=O.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||S.func(a.DocumentTouch)&&O.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!O.PointerEvent,ee.isIOS=/iP(hone|od|ad)/.test(o.platform),ee.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ee.isIe9=/MSIE 9/.test(o.userAgent),ee.isOperaMobile=o.appName==="Opera"&&ee.supportsTouch&&/Presto/.test(o.userAgent),ee.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ee.pEventTypes=ee.supportsPointerEvent?O.PointerEvent===a.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ee.wheelEvent=O.document&&"onmousewheel"in O.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},se=ee;function he(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ge(a,t){for(;S.element(a);){if(J(a,t))return a;a=it(a)}return null}function it(a){var t=a.parentNode;if(S.docFrag(t)){for(;(t=t.host)&&S.docFrag(t););return t}return t}function J(a,t){return le!==K&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var M=function(a){return a.parentNode||a.host};function xe(a,t){for(var o,l=[],c=a;(o=M(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function Ce(a,t,o){for(;S.element(a);){if(J(a,t))return!0;if((a=it(a))===o)return J(a,t)}return!1}function Pe(a){return a.correspondingUseElement||a}function Fe(a){var t=a instanceof O.SVGElement?a.getBoundingClientRect():a.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function qe(a){var t,o=Fe(a);if(!se.isIOS7&&o){var l={x:(t=(t=R(a))||le).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function Xe(a){for(var t=[];a;)t.push(a),a=it(a);return t}function fe(a){return!!S.string(a)&&(O.document.querySelector(a),!0)}function z(a,t){for(var o in t)a[o]=t[o];return a}function X(a,t,o){return a==="parent"?it(o):a==="self"?t.getRect(o):Ge(o,a)}function pe(a,t,o,l){var c=a;return S.string(c)?c=X(c,t,o):S.func(c)&&(c=c.apply(void 0,l)),S.element(c)&&(c=qe(c)),c}function ce(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function G(a){return!a||"x"in a&&"y"in a||((a=z({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function ae(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function Z(a,t,o){var l=o&&a.options[o];return ce(pe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function re(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},S.string(a)&&a.search(" ")!==-1&&(a=Re(a)),S.array(a))return a.forEach(function(T){return re(T,t,o,l)}),l;if(S.object(a)&&(t=a,a=""),S.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(S.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];re(a,m,o,l)}else if(S.object(t))for(var b in t)re(Re(b).map(function(T){return"".concat(a).concat(T)}),t[b],o,l);return l}function Re(a){return a.trim().split(/ +/)}var lt=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function _(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function W(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function x(a){return a instanceof O.Event||a instanceof O.Touch}function ie(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function _e(a,t){return t=t||{x:0,y:0},se.isOperaMobile&&x(a)?(ie("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):ie("page",a,t),t}function E(a){return S.number(a.pointerId)?a.pointerId:a.identifier}function te(a,t,o){var l=t.length>1?P(t):t[0];_e(l,a.page),function(c,p){p=p||{},se.isOperaMobile&&x(c)?ie("screen",c,p):ie("client",c,p)}(l,a.client),a.timeStamp=o}function $(a){var t=[];return S.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Ee(a){if(!a.length)return null;var t=$(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function ne(a,t){var o=t+"X",l=t+"Y",c=$(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return lt(p,m)}function H(a,t){var o=t+"X",l=t+"Y",c=$(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function Q(a){return S.string(a.pointerType)?a.pointerType:S.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof O.Touch?"touch":"mouse"}function de(a){var t=S.func(a.composedPath)?a.composedPath():a.path;return[Pe(t?t[0]:a.target),Pe(a.currentTarget)]}var De=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(De.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var be=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},ke=function(a){return be([],a)},j=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ne=function(a,t){return a[j(a,t)]},ge=function(a){D(o,a);var t=Y(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var b=p==="dragleave"?l.prev:l.cur,T=b.element,U=b.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=U,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=j(p,function(T){var U=T.dropzone,N=T.element;return U===l.dropzone&&N===l.target});c.activeDrops.splice(m,1);var b=new o(c,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(De);function Le(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function ct(a,t){for(var o=function(p,m){for(var b=[],T=0,U=p.interactables.list;T<U.length;T++){var N=U[T];if(N.options.drop.enabled){var oe=N.options.drop.accept;if(!(S.element(oe)&&oe!==m||S.string(oe)&&!J(m,oe)||S.func(oe)&&!oe({dropzone:N,draggableElement:m})))for(var Te=0,We=N.getAllElements();Te<We.length;Te++){var Ke=We[Te];Ke!==m&&b.push({dropzone:N,element:Ke,rect:N.getRect(Ke)})}}}return b}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function Ue(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],b=0,T=l.activeDrops;b<T.length;b++){var U=T[b],N=U.dropzone,oe=U.element,Te=U.rect,We=N.dropCheck(t,o,c,p,oe,Te);m.push(We?oe:null)}var Ke=function(Je){for(var ut,st,mt,Tt=[],Nt=0;Nt<Je.length;Nt++){var Dt=Je[Nt],It=Je[ut];if(Dt&&Nt!==ut)if(It){var na=M(Dt),Wt=M(It);if(na!==Dt.ownerDocument)if(Wt!==Dt.ownerDocument)if(na!==Wt){Tt=Tt.length?Tt:xe(It);var ca=void 0;if(It instanceof O.HTMLElement&&Dt instanceof O.SVGElement&&!(Dt instanceof O.SVGSVGElement)){if(Dt===Wt)continue;ca=Dt.ownerSVGElement}else ca=Dt;for(var ha=xe(ca,It.ownerDocument),Da=0;ha[Da]&&ha[Da]===Tt[Da];)Da++;var An=[ha[Da-1],ha[Da],Tt[Da]];if(An[0])for(var mn=An[0].lastChild;mn;){if(mn===An[1]){ut=Nt,Tt=ha;break}if(mn===An[2])break;mn=mn.previousSibling}}else mt=It,(parseInt(R(st=Dt).getComputedStyle(st).zIndex,10)||0)>=(parseInt(R(mt).getComputedStyle(mt).zIndex,10)||0)&&(ut=Nt);else ut=Nt}else ut=Nt}return ut}(m);return l.activeDrops[Ke]||null}function ot(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new ge(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new ge(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new ge(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new ge(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new ge(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new ge(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Oe(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&Le(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function gt(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=ct(t,o.element));var m=l,b=Ue(o,m,c);p.rejected=p.rejected&&!!b&&b.dropzone===p.cur.dropzone&&b.element===p.cur.element,p.cur.dropzone=b&&b.dropzone,p.cur.element=b&&b.element,p.events=ot(o,0,m)}}var tt={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(Ae),l.prototype.dropzone=function(p){return function(m,b){if(S.object(b)){if(m.options.drop.enabled=b.enabled!==!1,b.listeners){var T=re(b.listeners),U=Object.keys(T).reduce(function(oe,Te){return oe[/^(enter|leave)/.test(Te)?"drag".concat(Te):/^(activate|deactivate|move)/.test(Te)?"drop".concat(Te):Te]=T[Te],oe},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(U),m.options.drop.listeners=U}return S.func(b.ondrop)&&m.on("drop",b.ondrop),S.func(b.ondropactivate)&&m.on("dropactivate",b.ondropactivate),S.func(b.ondropdeactivate)&&m.on("dropdeactivate",b.ondropdeactivate),S.func(b.ondragenter)&&m.on("dragenter",b.ondragenter),S.func(b.ondragleave)&&m.on("dragleave",b.ondragleave),S.func(b.ondropmove)&&m.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?m.options.drop.overlap=b.overlap:S.number(b.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(m.options.drop.accept=b.accept),"checker"in b&&(m.options.drop.checker=b.checker),m}return S.bool(b)?(m.options.drop.enabled=b,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,b,T,U,N){return function(oe,Te,We,Ke,Je,ut,st){var mt=!1;if(!(st=st||oe.getRect(ut)))return!!oe.options.drop.checker&&oe.options.drop.checker(Te,We,mt,oe,ut,Ke,Je);var Tt=oe.options.drop.overlap;if(Tt==="pointer"){var Nt=Z(Ke,Je,"drag"),Dt=_e(Te);Dt.x+=Nt.x,Dt.y+=Nt.y;var It=Dt.x>st.left&&Dt.x<st.right,na=Dt.y>st.top&&Dt.y<st.bottom;mt=It&&na}var Wt=Ke.getRect(Je);if(Wt&&Tt==="center"){var ca=Wt.left+Wt.width/2,ha=Wt.top+Wt.height/2;mt=ca>=st.left&&ca<=st.right&&ha>=st.top&&ha<=st.bottom}return Wt&&S.number(Tt)&&(mt=Math.max(0,Math.min(st.right,Wt.right)-Math.max(st.left,Wt.left))*Math.max(0,Math.min(st.bottom,Wt.bottom)-Math.max(st.top,Wt.top))/(Wt.width*Wt.height)>=Tt),oe.options.drop.checker&&(mt=oe.options.drop.checker(Te,We,mt,oe,ut,Ke,Je)),mt}(this,p,m,b,T,U,N)},o.dynamicDrop=function(p){return S.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},z(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=tt.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(a,t){var o=a.interaction,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=ct(t,o.element),c.events=ot(o,0,l),c.events.activate&&(Le(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":gt,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Oe(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;gt(a,t),Oe(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:ct,getDrop:Ue,getDropEvents:ot,fireDropEvents:Oe,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ve=tt;function $e(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(U){return U.pointer}),p=l==="start",m=l==="end",b=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ne(c,b),o.box=Ee(c),o.scale=1,o.ds=0,o.angle=H(c,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=ne(c,b),o.box=Ee(c),o.scale=o.distance/t.gesture.startDistance,o.angle=H(c,b),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,S.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var et={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return S.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):S.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=et,t.methodDict.gesture="gesturable",l.actions.gesture=et.defaults},listeners:{"interactions:action-start":$e,"interactions:action-move":$e,"interactions:action-end":$e,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},Ye=et;function ze(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var b=S.number(p.width)?p.width:p.right-p.left,T=S.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?b:T)/2)),b<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var U=b>=0?p.left:p.right;return o.x<U+m}if(a==="top"){var N=T>=0?p.top:p.bottom;return o.y<N+m}if(a==="right")return o.x>(b>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!S.element(l)&&(S.element(t)?t===l:Ce(l,t,c))}function at(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var ve,Se,Me={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;Me.cursors=function(p){return p.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),Me.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,b,T){return S.object(b)?(m.options.resize.enabled=b.enabled!==!1,m.setPerAction("resize",b),m.setOnEvents("resize",b),S.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?m.options.resize.axis=b.axis:b.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),S.bool(b.preserveAspectRatio)?m.options.resize.preserveAspectRatio=b.preserveAspectRatio:S.bool(b.square)&&(m.options.resize.square=b.square),m):S.bool(b)?(m.options.resize.enabled=b,m):m.options.resize}(this,p,a)},t.map.resize=Me,t.methodDict.resize="resizable",c.actions.resize=Me.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:z({},p),corrected:z({},p),previous:z({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),at(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",b=l.rect,T=l._rects,U=T.start,N=T.corrected,oe=T.delta,Te=T.previous;if(z(Te,N),m){if(z(N,b),p==="reposition"){if(N.top>N.bottom){var We=N.top;N.top=N.bottom,N.bottom=We}if(N.left>N.right){var Ke=N.left;N.left=N.right,N.right=Ke}}}else N.top=Math.min(b.top,U.bottom),N.bottom=Math.max(b.bottom,U.top),N.left=Math.min(b.left,U.right),N.right=Math.max(b.right,U.left);for(var Je in N.width=N.right-N.left,N.height=N.bottom-N.top,N)oe[Je]=N[Je]-Te[Je];c.edges=l.prepared.edges,c.rect=N,c.deltaRect=oe}})(a),at(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=z({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&b.mouseButtons)!=0)){if(S.object(b.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var U in T)T[U]=ze(U,b.edges[U],m,t._latestPointer.eventTarget,l,c,b.margin||Me.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var N=b.axis!=="y"&&m.x>c.right-Me.defaultMargin,oe=b.axis!=="x"&&m.y>c.bottom-Me.defaultMargin;(N||oe)&&(a.action={name:"resize",axes:(N?"x":"")+(oe?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=Me.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",b=0,T=["top","bottom","left","right"];b<T.length;b++){var U=T[b];t[U]&&(m+=U)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Qe=Me,A={id:"actions",install:function(a){a.usePlugin(Ye),a.usePlugin(Qe),a.usePlugin(Ae),a.usePlugin(Ve)}},ue=0,He={request:function(a){return ve(a)},cancel:function(a){return Se(a)},init:function(a){if(ve=a.requestAnimationFrame,Se=a.cancelAnimationFrame,!ve)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];ve=a["".concat(l,"RequestAnimationFrame")],Se=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}ve=ve&&ve.bind(a),Se=Se&&Se.bind(a),ve||(ve=function(c){var p=Date.now(),m=Math.max(0,16-(p-ue)),b=a.setTimeout(function(){c(p+m)},m);return ue=p+m,b},Se=function(c){return clearTimeout(c)})}},me={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){me.isScrolling=!0,He.cancel(me.i),a.autoScroll=me,me.interaction=a,me.prevTime=me.now(),me.i=He.request(me.scroll)},stop:function(){me.isScrolling=!1,me.interaction&&(me.interaction.autoScroll=null),He.cancel(me.i)},scroll:function(){var a=me.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=nt(c.container,t,o),m=me.now(),b=(m-me.prevTime)/1e3,T=c.speed*b;if(T>=1){var U={x:me.x*T,y:me.y*T};if(U.x||U.y){var N=kt(p);S.window(p)?p.scrollBy(U.x,U.y):p&&(p.scrollLeft+=U.x,p.scrollTop+=U.y);var oe=kt(p),Te={x:oe.x-N.x,y:oe.y-N.y};(Te.x||Te.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Te,interaction:a,container:p})}me.prevTime=m}me.isScrolling&&(He.cancel(me.i),me.i=He.request(me.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&me.check(t.interactable,t.prepared.name))if(t.simulation)me.x=me.y=0;else{var l,c,p,m,b=t.interactable,T=t.element,U=t.prepared.name,N=b.options[U].autoScroll,oe=nt(N.container,b,T);if(S.window(oe))m=o.clientX<me.margin,l=o.clientY<me.margin,c=o.clientX>oe.innerWidth-me.margin,p=o.clientY>oe.innerHeight-me.margin;else{var Te=Fe(oe);m=o.clientX<Te.left+me.margin,l=o.clientY<Te.top+me.margin,c=o.clientX>Te.right-me.margin,p=o.clientY>Te.bottom-me.margin}me.x=c?1:m?-1:0,me.y=p?1:l?-1:0,me.isScrolling||(me.margin=N.margin,me.speed=N.speed,me.start(t))}}};function nt(a,t,o){return(S.string(a)?X(a,t,o):a)||R(o)}function kt(a){return S.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var yt={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=me,me.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=me.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,me.stop(),me.interaction&&(me.interaction=null)},"interactions:stop":me.stop,"interactions:action-move":function(a){return me.onInteractionMove(a)}}},ht=yt;function dt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function ft(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function _t(a){return S.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Mt(a){return S.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Vt={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(b,T,U,N,oe){var Te=b.getRect(N),We=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Ke={action:null,interactable:b,interaction:U,element:N,rect:Te,buttons:We};return oe.fire("auto-start:check",Ke),Ke.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=dt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=dt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Mt,t.prototype.styleCursor=_t}};function Lt(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Gt(t,o,a,c)?a:null}function bt(a,t,o,l,c,p,m){for(var b=0,T=l.length;b<T;b++){var U=l[b],N=c[b],oe=U.getAction(t,o,a,N);if(oe){var Te=Lt(oe,U,N,p,m);if(Te)return{action:Te,interactable:U,element:N}}}return{action:null,interactable:null,element:null}}function jt(a,t,o,l,c){var p=[],m=[],b=l;function T(N){p.push(N),m.push(b)}for(;S.element(b);){p=[],m=[],c.interactables.forEachMatch(b,T);var U=bt(a,t,o,p,m,l,c);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;b=it(b)}return{action:null,interactable:null,element:null}}function qt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,ft(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Ia(a,o),o.fire("autoStart:prepared",{interaction:a})}function Gt(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,b=l.autoStart.maxInteractions,T=0,U=0,N=0;if(!(p&&m&&b))return!1;for(var oe=0,Te=l.interactions.list;oe<Te.length;oe++){var We=Te[oe],Ke=We.prepared.name;if(We.interacting()&&(++T>=b||We.interactable===a&&((U+=Ke===o.name?1:0)>=p||We.element===t&&(N++,Ke===o.name&&N>=m))))return!1}return b>0}function ta(a,t){return S.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function $t(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Ia(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=S.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}$t(a.element,p||"",t)}else t.autoStart.cursorElement&&$t(t.autoStart.cursorElement,"",t)}var Ra={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(Vt),o.base.actionChecker=null,o.base.styleCursor=!0,z(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return ta(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Gt,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||qt(o,jt(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,b=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||qt(c,jt(c,p,m,b,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Gt(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Ia(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&$t(o.element,"",t)}},maxInteractions:ta,withinInteractionLimit:Gt,validateAction:Lt},ba=Ra,Pa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),b=Math.abs(p),T=o.interactable.options.drag,U=T.startAxis,N=m>b?"x":m<b?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&U!=="xy"&&U!==N){o.prepared.name=null;for(var oe=l,Te=function(Ke){if(Ke!==o.interactable){var Je=o.interactable.options.drag;if(!Je.manualStart&&Ke.testIgnoreAllow(Je,oe,l)){var ut=Ke.getAction(o.downPointer,o.downEvent,o,oe);if(ut&&ut.name==="drag"&&function(st,mt){if(!mt)return!1;var Tt=mt.options.drag.startAxis;return st==="xy"||Tt==="xy"||Tt===st}(N,Ke)&&ba.validateAction(ut,Ke,oe,l,t))return Ke}}};S.element(oe);){var We=t.interactables.forEachMatch(oe,Te);if(We){o.prepared.name="drag",o.interactable=We,o.element=oe;break}oe=it(oe)}}}}}};function ka(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var $a={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(ba),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=ka(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;ka(t)>0&&(t.prepared.name=null)}},getHoldDuration:ka},Ka=$a,ja={id:"auto-start",install:function(a){a.usePlugin(ba),a.usePlugin(Ka),a.usePlugin(Pa)}},Ua=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):S.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Wa(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Ba={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=Ua,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var b=R(p.target).document,T=c.getDocOptions(b);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||S.element(p.target)&&J(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||he(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Wa,a},{})};function ga(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function da(a){var t={};for(var o in a){var l=a[o];S.plainObject(l)?t[o]=da(l):S.array(l)?t[o]=ke(l):t[o]=l}return t}var xa=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ma(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,b=function(U){var N=U.interactable.options[U.prepared.name],oe=N.modifiers;return oe&&oe.length?oe:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Te){var We=N[Te];return We&&We.enabled&&{options:We,methods:We._methods}}).filter(function(Te){return!!Te})}(m);this.prepareStates(b),this.startEdges=z({},m.edges),this.edges=z({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ma(),this.startAll(T),this.result=this.setAll(T)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=z({},t.pageCoords),t.rect=z({},p),t.edges=z({},m);for(var b=c?this.states.slice(c):this.states,T=ma(t.coords,t.rect),U=0;U<b.length;U++){var N,oe=b[U],Te=oe.options,We=z({},t.coords),Ke=null;(N=oe.methods)!=null&&N.set&&this.shouldDo(Te,l,o)&&(t.state=oe,Ke=oe.methods.set(t),ae(t.edges,t.rect,{x:t.coords.x-We.x,y:t.coords.y-We.y})),T.eventProps.push(Ke)}z(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Je=this.result.coords,ut=this.result.rect;if(Je&&ut){var st=T.rect.left!==ut.left||T.rect.right!==ut.right||T.rect.top!==ut.top||T.rect.bottom!==ut.bottom;T.changed=st||Je.x!==T.coords.x||Je.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,b=this.startDelta,T=m.delta;l==="start"&&z(this.startDelta,m.delta);for(var U=0,N=[[p,b],[c,T]];U<N.length;U++){var oe=N[U],Te=oe[0],We=oe[1];Te.page.x+=We.x,Te.page.y+=We.y,Te.client.x+=We.x,Te.client.y+=We.y}var Ke=this.result.rectDelta,Je=t.rect||o.rect;Je.left+=Ke.left,Je.right+=Ke.right,Je.top+=Ke.top,Je.bottom+=Ke.bottom,Je.width=Je.right-Je.left,Je.height=Je.bottom-Je.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,T={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var b=c[m];t.state=b;var T=b.options,U=b.methods,N=U.beforeEnd&&U.beforeEnd(t);if(N)return this.endResult=N,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=z({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,b=p.result,T=b.delta,U=b.rectDelta,N=0,oe=[[l.start,m],[l.cur,T]];N<oe.length;N++){var Te=oe[N],We=Te[0],Ke=Te[1];We.page.x-=Ke.x,We.page.y-=Ke.y,We.client.x-=Ke.x,We.client.y-=Ke.y}c.left-=U.left,c.right-=U.right,c.top-=U.top,c.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="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 da(o)}),this.result=ma(z({},t.result.coords),z({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ma(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ra(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var b in m.enabled=m.enabled!==!1,o)b in m||(m[b]=o[b]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function va(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Ha={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new xa(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":va,"interactions:action-move":va,"interactions:action-end":va,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},Na=Ha,Aa={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},wa=function(a){D(o,a);var t=Y(o);function o(l,c,p,m,b,T,U){var N;u(this,o),(N=t.call(this,l)).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,b=b||l.element;var oe=l.interactable,Te=(oe&&oe.options||Aa).deltaSource,We=Z(oe,b,p),Ke=m==="start",Je=m==="end",ut=Ke?F(N):l.prevEvent,st=Ke?l.coords.start:Je?{page:ut.page,client:ut.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return N.page=z({},st.page),N.client=z({},st.client),N.rect=z({},l.rect),N.timeStamp=st.timeStamp,Je||(N.page.x-=We.x,N.page.y-=We.y,N.client.x-=We.x,N.client.y-=We.y),N.ctrlKey=c.ctrlKey,N.altKey=c.altKey,N.shiftKey=c.shiftKey,N.metaKey=c.metaKey,N.button=c.button,N.buttons=c.buttons,N.target=b,N.currentTarget=b,N.preEnd=T,N.type=U||p+(m||""),N.interactable=oe,N.t0=Ke?l.pointers[l.pointers.length-1].downTime:ut.t0,N.x0=l.coords.start.page.x-We.x,N.y0=l.coords.start.page.y-We.y,N.clientX0=l.coords.start.client.x-We.x,N.clientY0=l.coords.start.client.y-We.y,N.delta=Ke||Je?{x:0,y:0}:{x:N[Te].x-ut[Te].x,y:N[Te].y-ut[Te].y},N.dt=l.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=z({},l.coords.velocity[Te]),N.speed=lt(N.velocity.x,N.velocity.y),N.swipe=Je||m==="inertiastart"?N.getSwipe():null,N}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(De);Object.defineProperties(wa.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var qa=g(function a(t,o,l,c,p){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=l,this.downTime=c,this.downTarget=p}),Ga=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),Va=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Xa=0,Ya=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=dt(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=Xa++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return p[N]}})};for(var b in Ga)m(b);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return p[N].apply(p,arguments)}})};for(var U in Va)T(U);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?z({},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,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=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&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=lt(c,p)>this.pointerMoveTolerance);var b,T,U,N=this.getPointerIndex(t),oe={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(b=this.coords.velocity,T=this.coords.delta,U=Math.max(T.timeStamp/1e3,.001),b.page.x=T.page.x/U,b.page.y=T.page.y/U,b.client.x=T.client.x/U,b.client.y=T.client.y/U,b.timeStamp=U),this._scopeFire("interactions:move",oe),m||this.simulation||(this.interacting()&&(oe.type=null,this.move(oe)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||W(this.coords.delta),(t=z({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,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=E(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:j(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,b,T=E(t),U=this.getPointerIndex(t),N=this.pointers[U];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new qa(T,t,o,null,null),U=this.pointers.length,this.pointers.push(N)),te(this.coords.cur,this.pointers.map(function(oe){return oe.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,b=this.coords.cur,p.page.x=b.page.x-m.page.x,p.page.y=b.page.y-m.page.y,p.client.x=b.client.x-m.client.x,p.client.y=b.client.y-m.client.y,p.timeStamp=b.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=l,_(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:N,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new wa(this,t,this.prepared.name,o,this.element,l,c)}},{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,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(ae(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function St(a){ea(a.interaction)}function ea(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return zt(a.coords.cur,t),zt(a.coords.delta,t),ae(a.edges,a.rect,t),t.x=0,t.y=0,!0}function xt(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function zt(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}Va.offsetBy="";var wt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=xt},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":St,"interactions:before-action-move":St,"interactions:before-action-end":function(a){var t=a.interaction;if(ea(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},Xt=wt,Et=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(a,[{key:"start",value:function(t){var o=this.interaction,l=Ct(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=lt(c.x,c.y),m=this.modification||(this.modification=new xa(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.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,l=Ct(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(b),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.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=He.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,b,T=this,U=this.interaction,N=Ct(U).resistance,oe=(U._now()-this.t0)/1e3;if(oe<this.te){var Te,We=1-(Math.exp(-N*oe)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,Te={x:Ot(b=We,t,l,p),y:Ot(b,o,c,m)}):Te={x:this.targetOffset.x*We,y:this.targetOffset.y*We};var Ke={x:Te.x-this.currentOffset.x,y:Te.y-this.currentOffset.y};this.currentOffset.x+=Ke.x,this.currentOffset.y+=Ke.y,U.offsetBy(Ke),U.move(),this.onNextFrame(function(){return T.inertiaTick()})}else U.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,l=o._now()-this.t0,c=Ct(o).smoothEndDuration;if(l<c){var p={x:Rt(l,0,this.targetOffset.x,c),y:Rt(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),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,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.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,He.cancel(this.timeout)}}]),a}();function Ct(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ft={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(Xt),a.usePlugin(Na),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;S.element(c);){if(c===t.element){l.resume(a);break}c=it(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":va,"interactions:action-inertiastart":va,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Ot(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Rt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var Yt=Ft;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var Oa=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=z({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=re(t,o);for(t in l)this.types[t]=be(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=re(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var b=m[p],T=c.indexOf(b);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ja=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,_(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Ma(a){return S.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Za(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var Sn={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:b,addDelegate:function(N,oe,Te,We,Ke){var Je=Ma(Ke);if(!l[Te]){l[Te]=[];for(var ut=0;ut<c.length;ut++){var st=c[ut];m(st,Te,T),m(st,Te,U,!0)}}var mt=l[Te],Tt=Ne(mt,function(Nt){return Nt.selector===N&&Nt.context===oe});Tt||(Tt={selector:N,context:oe,listeners:[]},mt.push(Tt)),Tt.listeners.push({func:We,options:Je})},removeDelegate:function(N,oe,Te,We,Ke){var Je,ut=Ma(Ke),st=l[Te],mt=!1;if(st)for(Je=st.length-1;Je>=0;Je--){var Tt=st[Je];if(Tt.selector===N&&Tt.context===oe){for(var Nt=Tt.listeners,Dt=Nt.length-1;Dt>=0;Dt--){var It=Nt[Dt];if(It.func===We&&Za(It.options,ut)){Nt.splice(Dt,1),Nt.length||(st.splice(Je,1),b(oe,Te,T),b(oe,Te,U,!0)),mt=!0;break}}if(mt)break}}},delegateListener:T,delegateUseCapture:U,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,oe,Te,We){if(N.addEventListener){var Ke=Ma(We),Je=Ne(o,function(ut){return ut.eventTarget===N});Je||(Je={eventTarget:N,events:{}},o.push(Je)),Je.events[oe]||(Je.events[oe]=[]),Ne(Je.events[oe],function(ut){return ut.func===Te&&Za(ut.options,Ke)})||(N.addEventListener(oe,Te,p.supportsOptions?Ke:Ke.capture),Je.events[oe].push({func:Te,options:Ke}))}}function b(N,oe,Te,We){if(N.addEventListener&&N.removeEventListener){var Ke=j(o,function(na){return na.eventTarget===N}),Je=o[Ke];if(Je&&Je.events)if(oe!=="all"){var ut=!1,st=Je.events[oe];if(st){if(Te==="all"){for(var mt=st.length-1;mt>=0;mt--){var Tt=st[mt];b(N,oe,Tt.func,Tt.options)}return}for(var Nt=Ma(We),Dt=0;Dt<st.length;Dt++){var It=st[Dt];if(It.func===Te&&Za(It.options,Nt)){N.removeEventListener(oe,Te,p.supportsOptions?Nt:Nt.capture),st.splice(Dt,1),st.length===0&&(delete Je.events[oe],ut=!0);break}}}ut&&!Object.keys(Je.events).length&&o.splice(Ke,1)}else for(oe in Je.events)Je.events.hasOwnProperty(oe)&&b(N,oe,"all")}}function T(N,oe){for(var Te=Ma(oe),We=new Ja(N),Ke=l[N.type],Je=de(N)[0],ut=Je;S.element(ut);){for(var st=0;st<Ke.length;st++){var mt=Ke[st],Tt=mt.selector,Nt=mt.context;if(J(ut,Tt)&&he(Nt,Je)&&he(Nt,ut)){var Dt=mt.listeners;We.currentTarget=ut;for(var It=0;It<Dt.length;It++){var na=Dt[It];Za(na.options,Te)&&na.func(We)}}}ut=it(ut)}}function U(N){return T(N,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},ln={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=ln.methodOrder;t<o.length;t++){var l=o[t],c=ln[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var b=m[p],T=l;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;T;){if(T===b.element)return b;T=it(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,b=p.interactions.list;m<b.length;m++){var T=b[m];if(T.pointerType===l){if(T.simulation&&!vn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var U=0,N=p.interactions.list;U<N.length;U++){var oe=N[U];if(!(oe.pointerType!==l||/down/i.test(c)&&oe.simulation))return oe}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(vn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function vn(a,t){return a.pointers.some(function(o){return o.id===t})}var sn=ln,pa=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Qa(a,t){return function(o){var l=t.interactions.list,c=Q(o),p=de(o),m=p[0],b=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,N=o.changedTouches;U<N.length;U++){var oe=N[U],Te={pointer:oe,pointerId:E(oe),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:b,scope:t},We=cn(Te);T.push([Te.pointer,Te.eventTarget,Te.curEventTarget,We])}}else{var Ke=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var Je=0;Je<l.length&&!Ke;Je++)Ke=l[Je].pointerType!=="mouse"&&l[Je].pointerIsDown;Ke=Ke||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Ke){var ut={pointer:o,pointerId:E(o),pointerType:c,eventType:o.type,curEventTarget:b,eventTarget:m,scope:t},st=cn(ut);T.push([ut.pointer,ut.eventTarget,ut.curEventTarget,st])}}for(var mt=0;mt<T.length;mt++){var Tt=T[mt],Nt=Tt[0],Dt=Tt[1],It=Tt[2];Tt[3][a](Nt,o,Dt,It)}}}function cn(a){var t=a.pointerType,o=a.scope,l={interaction:sn.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,b=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)b(o,T,m.delegateListener),b(o,T,m.delegateUseCapture,!0);for(var U=c&&c.events,N=0;N<p.length;N++){var oe=p[N];b(o,oe.type,oe.listener,U)}}var Tn={id:"core/interactions",install:function(a){for(var t={},o=0;o<pa.length;o++){var l=pa[o];t[l]=Qa(l,a)}var c,p=se.pEventTypes;function m(){for(var b=0,T=a.interactions.list;b<T.length;b++){var U=T[b];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var N=function(){var We=Te[oe];a.documents.some(function(Ke){return he(Ke.doc,We.downTarget)})||U.removePointer(We.pointer,We.event)},oe=0,Te=U.pointers;oe<Te.length;oe++)N()}}(c=O.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{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(b){for(var T=0,U=a.interactions.list;T<U.length;T++)U[T].documentBlur(b)}}),a.prevTouchTime=0,a.Interaction=function(b){D(U,b);var T=Y(U);function U(){return u(this,U),T.apply(this,arguments)}return g(U,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(N){a.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return a.now()}}]),U}(Ya),a.interactions={list:[],new:function(b){b.scopeFire=function(U,N){return a.fire(U,N)};var T=new a.Interaction(b);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Ba)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Qa,methodNames:pa},La=Tn,za=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(za||{}),ll=function(){function a(t,o,l,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Oa,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||l,this._win=R(fe(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return S.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),S.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),S.func(o.onend)&&this.on("".concat(t,"end"),o.onend),S.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,b=function(T){return(m==null||m(T))&&ga(T,p._actions)};(S.array(o)||S.object(o))&&this._onOff(za.Off,t,o,void 0,b),(S.array(l)||S.object(l))&&this._onOff(za.On,t,l,void 0,b)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],b=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,b),S.array(b)?m[p]=ke(b):S.plainObject(b)?(m[p]=z(m[p]||{},da(b)),S.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=b.enabled!==!1)):S.bool(b)&&S.object(l.perAction[p])?m[p].enabled=b:m[p]=b}}},{key:"getRect",value:function(t){return t=t||(S.element(this.target)?this.target:null),S.string(this.target)&&(t=t||this._context.querySelector(this.target)),qe(t)}},{key:"rectChecker",value:function(t){var o=this;return S.func(t)?(this.getRect=function(l){var c=z({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(fe(o)||S.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][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 S.string(t)?Array.from(this._context.querySelectorAll(t)):S.func(t)&&t.getAllElements?t.getAllElements():S.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||he(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!S.element(l)&&(S.string(t)?Ce(l,t,o):!!S.element(t)&&he(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!S.element(l))&&(S.string(t)?Ce(l,t,o):!!S.element(t)&&he(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){S.object(o)&&!S.array(o)&&(c=l,l=null);var m=re(o,l,p);for(var b in m){b==="wheel"&&(b=se.wheelEvent);for(var T=0,U=m[b];T<U.length;T++){var N=U[T];ga(b,this._actions)?this.events[t===za.On?"on":"off"](b,N):S.string(this.target)?this._scopeEvents[t===za.On?"addDelegate":"removeDelegate"](this.target,this._context,b,N,c):this._scopeEvents[t===za.On?"add":"remove"](this.target,b,N,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(za.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(za.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in S.object(t)||(t={}),this.options=da(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,z(z({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?S.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,b=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=b.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[T][0],b[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=S.string(p)?o.selectorMap[p]:p[o.scope.id],b=j(m,function(T){return T===c});m.splice(b,1)}})}return g(a,[{key:"new",value:function(t,o){o=z(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),S.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=S.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Ne(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((S.string(p.target)?S.element(t)&&J(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=da(Aa),this.Eventable=Oa,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,b){var T=l.interactables.getExisting(m,b);return T||((T=l.interactables.new(m,b)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Ee,c.getTouchDistance=ne,c.getTouchAngle=H,c.getElementRect=qe,c.getElementClientRect=Fe,c.matchesSelector=J,c.closest=Ge,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=dt(function(p,m,b){if(S.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),S.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.on(N,m,b)}return this}if(S.object(p)){for(var oe in p)this.on(oe,p[oe],m);return this}return ga(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:b}),this},"The interact.on() method is being deprecated"),c.off=dt(function(p,m,b){if(S.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),S.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.off(N,m,b)}return this}if(S.object(p)){for(var oe in p)this.off(oe,p[oe],m);return this}var Te;return ga(p,this.scope.actions)?p in this.globalEvents&&(Te=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(Te,1):this.scope.events.remove(this.scope.document,p,m,b),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return se.supportsTouch},c.supportsPointerEvent=function(){return se.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return S.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=wa,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){D(p,l);var c=Y(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return L(C(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){L(C(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,S.window(l)&&w(l),O.init(l),se.init(l),He.init(l),o.window=l,o.document=l.document,o.usePlugin(La),o.usePlugin(Sn),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 l=0,c=this.listenerMaps.length,p=t.before.reduce(function(b,T){return b[T]=!0,b[xo(T)]=!0,b},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[xo(m)]))break}this.listenerMaps.splice(l,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 l=R(t);o=o?z({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=R(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function xo(a){return a&&a.replace(/\/.*$/,"")}var wo=new sl,aa=wo.interactStatic,cl=typeof globalThis<"u"?globalThis:window;wo.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,b=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,U=T===void 0?{x:0,y:0}:T,N={range:p,grid:a,x:null,y:null},oe=0;oe<t.length;oe++){var Te=t[oe],We=Te[0],Ke=Te[1],Je=Math.round((l-U.x)/a[We]),ut=Math.round((c-U.y)/a[Ke]);N[We]=Math.max(b.left,Math.min(b.right,Je*a[We]+U.x)),N[Ke]=Math.max(b.top,Math.min(b.bottom,ut*a[Ke]+U.y))}return N};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=z(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,b=p.enabled,T=t.options,U=T.equalDelta,N=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=z({},c),t.startRect=z({},o),t.ratio=m,t.equalDelta=U;var oe=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var Te=(oe.left?1:-1)*(oe.top?1:-1);t.edgeSign={x:Te,y:Te}}else t.edgeSign={x:oe.left?-1:1,y:oe.top?-1:1};if(b!==!1&&z(l,oe),N!=null&&N.length){var We=new xa(a.interaction);We.copyFrom(a.interaction.modification),We.prepareStates(N),t.subModification=We,We.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=z({},l),m=t.equalDelta?vl:hl;if(z(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var b=z({},o);ae(c,b,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:b,edges:c,pageCoords:l,prevCoords:l,prevRect:b})),U=T.delta;return T.changed&&(m(t,Math.abs(U.x)>Math.abs(U.y),T.coords,T.rect),z(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,b=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*b.y}else{var U=l.height*m;o.x=p.x+(U-c.width)*b.x}}var gl=ra(fl,"aspectRatio"),Do=function(){};Do._defaults={};var In=Do;function en(a,t,o){return S.func(a)?pe(a,t.interactable,t.element,[o.x,o.y,t]):pe(a,t.interactable,t.element)}var Bn={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,b=m.elementRect,T=z({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&b){var U=en(m.restriction,c,p);if(U){var N=U.right-U.left-t.width,oe=U.bottom-U.top-t.height;N<0&&(T.left+=N,T.right+=N),oe<0&&(T.top+=oe,T.bottom+=oe)}T.left+=o.left-t.width*b.left,T.top+=o.top-t.height*b.top,T.right+=o.right-t.width*(1-b.right),T.bottom+=o.bottom-t.height*(1-b.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=en(c.restriction,o,t);if(m){var b=function(T){return!T||"left"in T&&"top"in T||((T=z({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(b.right-p.right,t.x),b.left+p.left),t.y=Math.max(Math.min(b.bottom-p.bottom,t.y),b.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=ra(Bn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var hn={noInner:Co,noOuter:_o,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=ce(en(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var b=z({},t),T=en(m.inner,l,b)||{},U=en(m.outer,l,b)||{};Eo(T,Co),Eo(U,_o),o.top?t.y=Math.min(Math.max(U.top+p.top,b.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+p.bottom,b.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(U.left+p.left,b.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(U.right+p.right,b.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=ra(hn,"restrictEdges"),bl=z({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Bn.defaults),kl=ra({start:Bn.start,set:Bn.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=ra({start:function(a){return hn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=G(en(p.min,t,a.coords))||xl,b=G(en(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:z({},hn.noInner),outer:z({},hn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-b.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+b.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-b.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+b.width),hn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ao={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,b=a.startOffset,T=m.options,U=T.offsetWithOrigin?function(Te){var We=Te.interaction.element,Ke=ce(pe(Te.state.options.origin,null,null,[We])),Je=Ke||Z(Te.interactable,We,Te.interaction.prepared.name);return Je}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=pe(T.offset,l,c,[o]);(t=ce(N)||{x:0,y:0}).x+=U.x,t.y+=U.y}var oe=T.relativePoints;m.offsets=p&&oe&&oe.length?oe.map(function(Te,We){return{index:We,relativePoint:Te,x:b.left-p.width*Te.x+t.x,y:b.top-p.height*Te.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=Z(t.interactable,t.element,t.prepared.name),b=z({},o),T=[];c.offsetWithOrigin||(b.x-=m.x,b.y-=m.y);for(var U=0,N=p;U<N.length;U++)for(var oe=N[U],Te=b.x-oe.x,We=b.y-oe.y,Ke=0,Je=c.targets.length;Ke<Je;Ke++){var ut=c.targets[Ke],st=void 0;(st=S.func(ut)?ut(Te,We,t._proxy,oe,Ke):ut)&&T.push({x:(S.number(st.x)?st.x:Te)+oe.x,y:(S.number(st.y)?st.y:We)+oe.y,range:S.number(st.range)?st.range:c.range,source:ut,index:Ke,offset:oe})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Tt=0;Tt<T.length;Tt++){var Nt=T[Tt],Dt=Nt.range,It=Nt.x-b.x,na=Nt.y-b.y,Wt=lt(It,na),ca=Wt<=Dt;Dt===1/0&&mt.inRange&&mt.range!==1/0&&(ca=!1),mt.target&&!(ca?mt.inRange&&Dt!==1/0?Wt/Dt<mt.distance/mt.range:Dt===1/0&&mt.range!==1/0||Wt<mt.distance:!mt.inRange&&Wt<mt.distance)||(mt.target=Nt,mt.distance=Wt,mt.range=Dt,mt.inRange=ca,mt.delta.x=It,mt.delta.y=na)}return mt.inRange&&(o.x=mt.target.x,o.y=mt.target.y),l.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=ra(ao,"snap"),Nn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ao.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=z({},c),o.options.targets=[];for(var b=0,T=c.targets||[];b<T.length;b++){var U=T[b],N=void 0;if(N=S.func(U)?U(m.x,m.y,t):U){for(var oe=0,Te=o.targetFields;oe<Te.length;oe++){var We=Te[oe],Ke=We[0],Je=We[1];if(Ke in N||Je in N){N.x=N[Ke],N.y=N[Je];break}}o.options.targets.push(N)}}var ut=ao.set(a);return o.options=c,ut},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=ra(Nn,"snapSize"),no={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:ra({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Nn.start(a)):null},set:Nn.set,defaults:z(da(Nn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:In,avoid:In,transform:In,rubberband:In},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(Na),a.usePlugin(pl),t.modifiers=no,no){var l=no[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,So=function(a){D(o,a);var t=Y(o);function o(l,c,p,m,b,T){var U;if(u(this,o),_(F(U=t.call(this,b)),p),p!==c&&_(F(U),c),U.timeStamp=T,U.originalEvent=p,U.type=l,U.pointerId=E(c),U.pointerType=Q(c),U.target=m,U.currentTarget=null,l==="tap"){var N=b.getPointerIndex(c);U.dt=U.timeStamp-b.pointers[N].downTime;var oe=U.timeStamp-b.tapTime;U.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===U.target&&oe<500}else l==="doubletap"&&(U.dt=c.timeStamp-b.tapTime,U.double=!0);return U}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(De),gn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=gn,a.defaults.actions.pointerEvents=gn.defaults,z(a.actions.phaselessTypes,gn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&oo(a),Fa({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,b=o.eventTarget,T=o.pointerIndex,U=c.pointers[T].hold,N=Xe(b),oe={interaction:c,pointer:p,event:m,eventTarget:b,type:"hold",targets:[],path:N,node:null},Te=0;Te<N.length;Te++){var We=N[Te];oe.node=We,l.fire("pointerEvents:collect-targets",oe)}if(oe.targets.length){for(var Ke=1/0,Je=0,ut=oe.targets;Je<ut.length;Je++){var st=ut[Je].eventable.options.holdDuration;st<Ke&&(Ke=st)}U.duration=Ke,U.timeout=setTimeout(function(){Fa({interaction:c,eventTarget:b,pointer:p,event:m,type:"hold"},l)},Ke)}})(a,t),Fa(a,t)},"interactions:up":function(a,t){oo(a),Fa(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,b=o.eventTarget;c.pointerWasMoved||Fa({interaction:c,eventTarget:b,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){oo(a),Fa(a,t)}},PointerEvent:So,fire:Fa,collectEventTargets:To,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 Fa(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,b=a.targets,T=b===void 0?To(a,t):b,U=new So(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var N={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:U},oe=0;oe<T.length;oe++){var Te=T[oe];for(var We in Te.props||{})U[We]=Te.props[We];var Ke=Z(Te.eventable,Te.node);if(U._subtractOrigin(Ke),U.eventable=Te.eventable,U.currentTarget=Te.node,Te.eventable.fire(U),U._addOrigin(Ke),U.immediatePropagationStopped||U.propagationStopped&&oe+1<T.length&&T[oe+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var Je=U.double?Fa({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):U;o.prevTap=Je,o.tapTime=Je.timeStamp}return U}function To(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,b=o.getPointerIndex(l),T=o.pointers[b];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var U=Xe(p),N={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:U,targets:[],node:null},oe=0;oe<U.length;oe++){var Te=U[oe];N.node=Te,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(We){var Ke,Je;return We.eventable.options.holdDuration===((Ke=o.pointers[b])==null||(Je=Ke.hold)==null?void 0:Je.duration)})),N.targets}function oo(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:gn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(gn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Il,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return z(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var b=m.events,T=b.options;b.types[c]&&b.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:b,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,l=a.options;z(o.events.options,t.pointerEvents.defaults),z(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,Ll={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),b=p.window.Promise,T=b?[]:null,U=function(){var oe=m[N],Te=l.getRect(oe);if(!Te)return 1;var We,Ke=Ne(p.interactions.list,function(st){return st.interacting()&&st.interactable===l&&st.element===oe&&st.prepared.name===c.name});if(Ke)Ke.move(),T&&(We=Ke._reflowPromise||new b(function(st){Ke._reflowResolve=st}));else{var Je=G(Te),ut=function(st){return{coords:st,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:Je.x,y:Je.y},client:{x:Je.x,y:Je.y},timeStamp:p.now()});We=function(st,mt,Tt,Nt,Dt){var It=st.interactions.new({pointerType:"reflow"}),na={interaction:It,event:Dt,pointer:Dt,eventTarget:Tt,phase:"reflow"};It.interactable=mt,It.element=Tt,It.prevEvent=Dt,It.updatePointer(Dt,Dt,Tt,!0),W(It.coords.delta),ft(It.prepared,Nt),It._doPhase(na);var Wt=st.window,ca=Wt.Promise,ha=ca?new ca(function(Da){It._reflowResolve=Da}):void 0;return It._reflowPromise=ha,It.start(Nt,mt,Tt),It._interacting?(It.move(na),It.end(Dt)):(It.stop(),It._reflowResolve()),It.removePointer(Dt,Dt),ha}(p,l,oe,c,ut)}T&&T.push(We)},N=0;N<m.length&&!U();N++);return T&&b.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},zl=Ll;if(aa.use(Ba),aa.use(Xt),aa.use(Ml),aa.use(Yt),aa.use(Sl),aa.use(ja),aa.use(A),aa.use(ht),aa.use(zl),aa.default=aa,d(n)==="object"&&n)try{n.exports=aa}catch{}return aa.default=aa,aa})}(kn,kn.exports)),kn.exports}var op=np();const Zo=Be.getDefaultExportFromCjs(op),Jn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.inject(Kr),k=e.inject(jr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let D=!1,C=!1,V=NaN,F=NaN,Y=NaN,L=NaN,we=-1,q=-1,K=-1,le=-1,w=r.x,R=r.y,y=r.w,B=r.h;const S=e.ref(),ye=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:S,calcXY:pe});function Ze(x){re(x)}function rt(){Re()}function Ae(x){ua(r.isDraggable)&&(f.draggable=x)}function je(x){ua(r.isResizable)&&(f.resizable=x)}function Ie(x){ua(r.isBounded)&&(f.bounded=x)}function O(x){f.transformScale=x}function ee(x){f.rowHeight=x}function se(x){f.maxRows=x}function he(){f.rtl=Yo()==="rtl",Re()}function Ge(x){f.cols=Math.floor(x)}u.increaseItem(ye),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,ua(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,ua(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,ua(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{w=r.x,R=r.y,B=r.h,y=r.w,oa(qe)}),k.on("updateWidth",Ze),k.on("compact",rt),k.on("setDraggable",Ae),k.on("setResizable",je),k.on("setBounded",Ie),k.on("setTransformScale",O),k.on("setRowHeight",ee),k.on("setMaxRows",se),k.on("directionchange",he),k.on("setColNum",Ge)}),e.onBeforeUnmount(()=>{k.off("updateWidth",Ze),k.off("compact",rt),k.off("setDraggable",Ae),k.off("setResizable",je),k.off("setBounded",Ie),k.off("setTransformScale",O),k.off("setRowHeight",ee),k.off("setMaxRows",se),k.off("directionchange",he),k.off("setColNum",Ge),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ye)}),i({state:f,wrapper:S});const it=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,J=e.computed(()=>f.resizable&&!r.static),M=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),xe=e.computed(()=>(f.draggable||f.resizable)&&!r.static),Ce=Xd("item"),Pe=e.computed(()=>({[Ce.b()]:!0,[Ce.bm("resizable")]:J.value,[Ce.bm("static")]:r.static,[Ce.bm("resizing")]:f.isResizing,[Ce.bm("dragging")]:f.isDragging,[Ce.bm("transform")]:f.useCssTransforms,[Ce.bm("rtl")]:M.value,[Ce.bm("no-touch")]:it&&xe.value})),Fe=e.computed(()=>[Ce.be("resizer"),M.value&&Ce.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,x=>{f.draggable=x}),e.watch(()=>r.static,()=>{oa(_),oa(W)}),e.watch(()=>f.draggable,()=>{oa(_)}),e.watch(()=>r.isResizable,x=>{f.resizable=x}),e.watch(()=>r.isBounded,x=>{f.bounded=x}),e.watch(()=>f.resizable,()=>{oa(W)}),e.watch(()=>f.rowHeight,()=>{oa(qe),oa(Xe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{oa(W),oa(qe),oa(Xe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{oa(W)}),e.watch(M,()=>{oa(W),oa(qe)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const x=u.margin;!x||x[0]===f.margin[0]&&x[1]===f.margin[1]||(f.margin=x.map(Number),oa(qe),oa(Xe))});function qe(){r.x+r.w>f.cols?(w=0,y=r.w>f.cols?f.cols:r.w):(w=r.x,y=r.w);const x=X(w,R,y,B);f.isDragging&&(x.top=f.dragging.top,M.value?x.right=f.dragging.left:x.left=f.dragging.left),f.isResizing&&(x.width=f.resizing.width,x.height=f.resizing.height);let ie;f.useCssTransforms?M.value?ie=Wd(x.top,x.right,x.width,x.height):ie=Ud(x.top,x.left,x.width,x.height):M.value?ie=qd(x.top,x.right,x.width,x.height):ie=Hd(x.top,x.left,x.width,x.height),f.style=ie}function Xe(){const x={};for(const ie of["width","height"]){const _e=f.style[ie].match(/^(\d+)px$/);if(!_e)return;x[ie]=_e[1]}d("container-resized",r.i,r.h,r.w,x.height,x.width)}function fe(x){if(r.static)return;const ie=x.type;if(ie==="resizestart"&&f.isResizing||ie!=="resizestart"&&!f.isResizing)return;const _e=Go(x);if(ua(_e))return;const{x:E,y:te}=_e,$={width:0,height:0};let P;switch(ie){case"resizestart":{W(),we=y,q=B,P=X(w,R,y,B),$.width=P.width,$.height=P.height,f.resizing=$,f.isResizing=!0;break}case"resizemove":{!x.edges.right&&!x.edges.left&&(Y=E),!x.edges.top&&!x.edges.bottom&&(L=te);const Ee=Xo(Y,L,E,te);M.value?$.width=f.resizing.width-Ee.deltaX/f.transformScale:$.width=f.resizing.width+Ee.deltaX/f.transformScale,$.height=f.resizing.height+Ee.deltaY/f.transformScale,f.resizing=$;break}case"resizeend":{P=X(w,R,y,B),$.width=P.width,$.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=Z($.height,$.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),Y=E,L=te,(y!==P.w||B!==P.h)&&d("resize",r.i,P.h,P.w,$.height,$.width),x.type==="resizeend"&&(we!==y||q!==B)&&d("resized",r.i,P.h,P.w,$.height,$.width),k.emit("resizeEvent",x.type,r.i,w,R,P.h,P.w)}function z(x){if(r.static||f.isResizing)return;const ie=x.type;if(ie==="dragstart"&&f.isDragging||ie!=="dragstart"&&!f.isDragging)return;const _e=Go(x);if(ua(_e))return;const{x:E,y:te}=_e,$=x.target;if(!$.offsetParent)return;const P={top:0,left:0};switch(ie){case"dragstart":{K=w,le=R;const ne=$.offsetParent.getBoundingClientRect(),H=$.getBoundingClientRect(),Q=H.left/f.transformScale,de=ne.left/f.transformScale,De=H.right/f.transformScale,be=ne.right/f.transformScale,ke=H.top/f.transformScale,j=ne.top/f.transformScale;M.value?P.left=(De-be)*-1:P.left=Q-de,P.top=ke-j,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const ne=Xo(V,F,E,te);if(M.value?P.left=f.dragging.left-ne.deltaX/f.transformScale:P.left=f.dragging.left+ne.deltaX/f.transformScale,P.top=f.dragging.top+ne.deltaY/f.transformScale,f.bounded){const H=$.offsetParent.clientHeight-G(r.h,f.rowHeight,f.margin[1]);P.top=ae(P.top,0,H);const Q=ce(),de=f.containerWidth-G(r.w,Q,f.margin[0]);P.left=ae(P.left,0,de)}f.dragging=P;break}case"dragend":{const ne=$.offsetParent.getBoundingClientRect(),H=$.getBoundingClientRect(),Q=H.left/f.transformScale,de=ne.left/f.transformScale,De=H.right/f.transformScale,be=ne.right/f.transformScale,ke=H.top/f.transformScale,j=ne.top/f.transformScale;M.value?P.left=(De-be)*-1:P.left=Q-de,P.top=ke-j,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ee;M.value,Ee=pe(P.top,P.left),V=E,F=te,(w!==Ee.x||R!==Ee.y)&&d("move",r.i,Ee.x,Ee.y),x.type==="dragend"&&(K!==w||le!==R)&&d("moved",r.i,Ee.x,Ee.y),k.emit("dragEvent",x.type,r.i,Ee.x,Ee.y,B,y)}function X(x,ie,_e,E){const te=ce();let $;return M.value?$={right:Math.round(te*x+(x+1)*f.margin[0]),top:Math.round(f.rowHeight*ie+(ie+1)*f.margin[1]),width:_e===1/0?_e:Math.round(te*_e+Math.max(0,_e-1)*f.margin[0]),height:E===1/0?E:Math.round(f.rowHeight*E+Math.max(0,E-1)*f.margin[1])}:$={left:Math.round(te*x+(x+1)*f.margin[0]),top:Math.round(f.rowHeight*ie+(ie+1)*f.margin[1]),width:_e===1/0?_e:Math.round(te*_e+Math.max(0,_e-1)*f.margin[0]),height:E===1/0?E:Math.round(f.rowHeight*E+Math.max(0,E-1)*f.margin[1])},$}function pe(x,ie){const _e=ce();let E=Math.round((ie-f.margin[0])/(_e+f.margin[0])),te=Math.round((x-f.margin[1])/(f.rowHeight+f.margin[1]));return E=Math.max(Math.min(E,f.cols-y),0),te=Math.max(Math.min(te,f.maxRows-B),0),{x:E,y:te}}function ce(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function G(x,ie,_e){return Number.isFinite(x)?Math.round(ie*x+Math.max(0,x-1)*_e):x}function ae(x,ie,_e){return Math.max(Math.min(x,_e),ie)}function Z(x,ie,_e=!1){const E=ce();let te=Math.round((ie+f.margin[0])/(E+f.margin[0])),$=0;return _e?$=Math.ceil((x+f.margin[1])/(f.rowHeight+f.margin[1])):$=Math.round((x+f.margin[1])/(f.rowHeight+f.margin[1])),te=Math.max(Math.min(te,f.cols-w),0),$=Math.max(Math.min($,f.maxRows-R),0),{w:te,h:$}}function re(x,ie){f.containerWidth=x}function Re(){qe()}function lt(){!g.value&&S.value&&(g.value=Zo(S.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Wo(z);function _(){if(lt(),!!g.value)if(f.draggable&&!r.static){const x={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(x),D||(D=!0,g.value.on("dragstart dragmove dragend",ie=>{ie.type==="dragmove"?h(ie):z(ie)}))}else g.value.draggable({enabled:!1})}const I=Wo(fe);function W(){if(lt(),!!g.value)if(f.resizable&&!r.static){const x=X(0,0,r.maxW,r.maxH),ie=X(0,0,r.minW,r.minH),_e={edges:{left:M.value?`.${Fe.value[0]}`:!1,right:M.value?!1:`.${Fe.value[0]}`,bottom:`.${Fe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:ie.height*f.transformScale,width:ie.width*f.transformScale},max:{height:x.height*f.transformScale,width:x.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(_e.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(_e),C||(C=!0,g.value.on("resizestart resizemove resizeend",E=>{E.type==="resizemove"?I(E):fe(E)}))}else g.value.resizable({enabled:!1})}return(x,ie)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(Pe.value),style:e.normalizeStyle(f.style)},[e.renderSlot(x.$slots,"default"),J.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Fe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),on=typeof window<"u";var Qo;on&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function er(n){return n!=null}function tr(){}const rp=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(rp)));const lp=on&&("ontouchstart"in window||sp()>0),ip=lp?"pointerdown":"click";function sp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function cp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...k}=i;if(!er(r)||r==="")return!1;let g;return er(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,k),n.dispatchEvent(g)}const up="clickoutside",dp=new Set;on&&document.addEventListener(ip,n=>{const i=n.target,s=n.composedPath&&n.composedPath();dp.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&cp(r,{type:up})})},!0);const pp=[["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 Pn;if(on){for(const n of pp)if(n[1]in document){Pn=n;break}}e.computed(()=>!1);const fp=new Set,vp=new WeakMap;if(on&&Pn){const n=Pn[2],i=Pn[4];document.addEventListener(i,()=>{if(fp.forEach(s=>{s.value=!1}),document[n]){const s=vp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var an=[],hp=function(){return an.some(function(n){return n.activeTargets.length>0})},gp=function(){return an.some(function(n){return n.skippedTargets.length>0})},ar="ResizeObserver loop completed with undelivered notifications.",mp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ar}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ar),window.dispatchEvent(n)},En;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(En||(En={}));var nn=function(n){return Object.freeze(n)},yp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,nn(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,nn(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,k=i.bottom,g=i.left,f=i.width,D=i.height;return{x:s,y:r,top:d,right:u,bottom:k,left:g,width:f,height:D}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),ko=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(ko(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,k=d.offsetHeight;return!(u||k||n.getClientRects().length)},nr=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},bp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},_n=typeof window<"u"?window:{},Mn=new WeakMap,or=/auto|scroll/,kp=/^tb|vertical/,xp=/msie|trident/i.test(_n.navigator&&_n.navigator.userAgent),ya=function(n){return parseFloat(n||"0")},pn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new yp((s?i:n)||0,(s?n:i)||0)},rr=nn({devicePixelContentBoxSize:pn(),borderBoxSize:pn(),contentBoxSize:pn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),Mn.has(n)&&!i)return Mn.get(n);if(Zr(n))return Mn.set(n,rr),rr;var s=getComputedStyle(n),r=ko(n)&&n.ownerSVGElement&&n.getBBox(),d=!xp&&s.boxSizing==="border-box",u=kp.test(s.writingMode||""),k=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:ya(s.paddingTop),D=r?0:ya(s.paddingRight),C=r?0:ya(s.paddingBottom),V=r?0:ya(s.paddingLeft),F=r?0:ya(s.borderTopWidth),Y=r?0:ya(s.borderRightWidth),L=r?0:ya(s.borderBottomWidth),we=r?0:ya(s.borderLeftWidth),q=V+D,K=f+C,le=we+Y,w=F+L,R=g?n.offsetHeight-w-n.clientHeight:0,y=k?n.offsetWidth-le-n.clientWidth:0,B=d?q+le:0,S=d?K+w:0,ye=r?r.width:ya(s.width)-B-y,Ze=r?r.height:ya(s.height)-S-R,rt=ye+q+y+le,Ae=Ze+K+R+w,je=nn({devicePixelContentBoxSize:pn(Math.round(ye*devicePixelRatio),Math.round(Ze*devicePixelRatio),u),borderBoxSize:pn(rt,Ae,u),contentBoxSize:pn(ye,Ze,u),contentRect:new Jr(V,f,ye,Ze)});return Mn.set(n,je),je},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,k=r.devicePixelContentBoxSize;switch(i){case En.DEVICE_PIXEL_CONTENT_BOX:return k;case En.BORDER_BOX:return d;default:return u}},wp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=nn([s.borderBoxSize]),this.contentBoxSize=nn([s.contentBoxSize]),this.devicePixelContentBoxSize=nn([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},Dp=function(){var n=1/0,i=[];an.forEach(function(u){if(u.activeTargets.length!==0){var k=[];u.activeTargets.forEach(function(g){var f=new wp(g.target),D=tl(g.target);k.push(f),g.lastReportedSize=el(g.target,g.observedBox),D<n&&(n=D)}),i.push(function(){u.callback.call(u.observer,k,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},lr=function(n){an.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Cp=function(){var n=0;for(lr(n);hp();)n=Dp(),lr(n);return gp()&&mp(),n>0},io,al=[],_p=function(){return al.splice(0).forEach(function(n){return n()})},Ep=function(n){if(!io){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return _p()}).observe(s,r),io=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),io()},Sp=function(n){Ep(function(){requestAnimationFrame(n)})},$n=0,Tp=function(){return!!$n},Ip=250,Bp={attributes:!0,characterData:!0,childList:!0,subtree:!0},ir=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sr=function(n){return n===void 0&&(n=0),Date.now()+n},so=!1,Np=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Ip),!so){so=!0;var r=sr(i);Sp(function(){var d=!1;try{d=Cp()}finally{if(so=!1,i=r-sr(),!Tp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Bp)};document.body?s():_n.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ir.forEach(function(s){return _n.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return _n.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Np,cr=function(n){!$n&&n>0&&fo.start(),$n+=n,!$n&&fo.stop()},Ap=function(n){return!ko(n)&&!bp(n)&&getComputedStyle(n).display==="inline"},Vp=function(){function n(i,s){this.target=i,this.observedBox=s||En.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Ap(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Op=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Ln=new WeakMap,ur=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Op(i,s);Ln.set(i,r)},n.observe=function(i,s,r){var d=Ln.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&an.push(d),d.observationTargets.push(new Vp(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Ln.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&an.splice(an.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Ln.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Mp=function(){function n(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.");zn.connect(this,i)}return n.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(!nr(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.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(!nr(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Lp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:k,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:D}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:D,width:k??f,height:g??D}))}}}const nl=new(on&&window.ResizeObserver||Mp)(Lp);function dr(n,i){Zn.set(n,i),nl.observe(n)}function pr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function zp(n={}){let i=tr;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(dr(d,n.onResize),i=()=>{pr(d),i=tr})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:dr,unobserveResize:pr,unobserve:r}}const Fp=e.ref(!1);e.computed(()=>Fp.value);const fr="__theme_style__",co="__theme_observer__",vr=e.reactive(new Map),hr=new Map;e.watch(vr,()=>{if(!on)return;hr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${co} { width: 1px }`,r=1;for(const[d,[u,k]]of vr.entries())s+=` html.${u} .${co}, .${k} .${co} { width: ${++r}px }`,hr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const ol=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),k=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:D,unobserveResize:C}=zp(),V=zd();V.on("resizeEvent",F),V.on("dragEvent",Y),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{Gd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Ze(),f.value&&D(f.value,Fd(w,16)),un(g.value,r.verticalCompact),d("layout-updated",g.value),le(),w()})})}),e.onBeforeUnmount(()=>{V.clearAll(),f.value&&C(f.value)});function F(Ae,je,Ie,O,ee,se){S(Ae,je,Ie,O,ee,se)}function Y(Ae,je,Ie,O,ee,se){B(Ae,je,Ie,O,ee,se)}e.watch(()=>u.width,(Ae,je)=>{e.nextTick(()=>{V.emit("updateWidth",Ae),je===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,Ae=>{V.emit("setColNum",Ae)}),e.watch(()=>r.rowHeight,Ae=>{V.emit("setRowHeight",Ae)}),e.watch(()=>r.isDraggable,Ae=>{V.emit("setDraggable",Ae)}),e.watch(()=>r.isResizable,Ae=>{V.emit("setResizable",Ae)}),e.watch(()=>r.isBounded,Ae=>{V.emit("setBounded",Ae)}),e.watch(()=>r.transformScale,Ae=>{V.emit("setTransformScale",Ae)}),e.watch(()=>r.responsive,Ae=>{Ae||(d("update:layout",u.originalLayout),V.emit("setColNum",r.colNum)),w()}),e.watch(()=>r.maxRows,Ae=>{V.emit("setMaxRows",Ae)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide(Kr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:L,decreaseItem:we})),e.provide(jr,V),i({state:u,getItem:q,resizeEvent:S,dragEvent:B,layoutUpdate:K});function L(Ae){k.set(Ae.i,Ae)}function we(Ae){k.delete(Ae.i)}function q(Ae){return k.get(Ae)}function K(){if(!ua(g.value)&&!ua(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Ae=rt(g.value,u.originalLayout);if(Ae.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Ae);else{const je=new Set(Ae.map(Ie=>Ie.i));u.originalLayout=u.originalLayout.filter(Ie=>!je.has(Ie.i))}u.lastLayoutLength=g.value.length,Ze()}un(g.value,r.verticalCompact),V.emit("updateWidth",u.width),le(),d("layout-updated",g.value)}}function le(){u.mergedStyle={height:R()}}function w(){f.value&&(u.width=f.value.offsetWidth),V.emit("resizeEvent")}function R(){if(!r.autoSize)return;const Ae=parseFloat(r.margin[1]);return Pd(g.value)*(r.rowHeight+Ae)+Ae+"px"}let y;function B(Ae,je,Ie,O,ee,se){let he=Ho(g.value,je);ua(he)&&(he={h:0,w:0,x:0,y:0,i:""}),Ae==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Ge,{i:it,x:J,y:M})=>({...Ge,[it]:{x:J,y:M}}),{})),Ae==="dragmove"||Ae==="dragstart"?(u.placeholder.i=je,u.placeholder.x=he.x,u.placeholder.y=he.y,u.placeholder.w=se,u.placeholder.h=ee,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,he,Ie,O,!0,r.preventCollision),r.restoreOnDrag?(he.static=!0,un(g.value,r.verticalCompact,y),he.static=!1):un(g.value,r.verticalCompact),V.emit("compact"),le(),Ae==="dragend"&&(y=void 0,d("layout-updated",g.value))}function S(Ae,je,Ie,O,ee,se){let he=Ho(g.value,je);ua(he)&&(he={h:0,w:0,x:0,y:0,i:""});let Ge;if(r.preventCollision){const it=Wr(g.value,{...he,w:se,h:ee}).filter(J=>J.i!==he.i);if(Ge=it.length>0,Ge){let J=1/0,M=1/0;it.forEach(xe=>{xe.x>he.x&&(J=Math.min(J,xe.x)),xe.y>he.y&&(M=Math.min(M,xe.y))}),Number.isFinite(J)&&(he.w=J-he.x),Number.isFinite(M)&&(he.h=M-he.y)}}Ge||(he.w=se,he.h=ee),Ae==="resizestart"||Ae==="resizemove"?(u.placeholder.i=je,u.placeholder.x=Ie,u.placeholder.y=O,u.placeholder.w=he.w,u.placeholder.h=he.h,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):Ae&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ye(),un(g.value,r.verticalCompact),V.emit("compact"),le(),Ae==="resizeend"&&d("layout-updated",g.value)}function ye(){const Ae=Zd(r.breakpoints,u.width);if(Ae===u.lastBreakpoint)return;const je=Gr(Ae,r.cols);!ua(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const Ie=Qd(u.originalLayout,u.layouts,r.breakpoints,Ae,u.lastBreakpoint,je,r.verticalCompact);u.layouts[Ae]=Ie,u.lastBreakpoint!==Ae&&d("breakpoint-changed",Ae,Ie),g.value=Ie,d("update:layout",Ie),u.lastBreakpoint=Ae,V.emit("setColNum",je)}function Ze(){u.layouts=Object.assign({},r.responsiveLayouts)}function rt(Ae,je){const Ie=new Set(je.map(he=>he.i)),O=new Set(Ae.map(he=>he.i)),ee=Ae.filter(he=>!Ie.has(he.i)),se=je.filter(he=>!O.has(he.i));return ee.concat(se)}return(Ae,je)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Ae.$slots.default?e.renderSlot(Ae.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,Ie=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:Ie.i,ref_for:!0},Ie),{default:e.withCtx(()=>[e.renderSlot(Ae.$slots,"item",{item:Ie})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Rp={key:0,class:"item-view-group"},Pp={key:0,class:"item-view-group"},$p=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=Ut.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,k=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var F,Y,L,we;return((F=u==null?void 0:u.children)==null?void 0:F.length)>0&&((Y=u==null?void 0:u.children)!=null&&Y.every(q=>q==null?void 0:q.layout))?(we=(L=u==null?void 0:u.children)==null?void 0:L[0])==null?void 0:we.layout:"vertical"}),f=e.computed(()=>{var F,Y;return((Y=(F=u==null?void 0:u.children)==null?void 0:F[0])==null?void 0:Y.isGridLayout)||!1}),D=e.ref((u==null?void 0:u.level)+1),C=F=>{d("rowClick",F)},V=(F,Y)=>{d("routeUrl",F,Y)};return(F,Y)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:k.value,"onUpdate:layout":Y[0]||(Y[0]=L=>k.value=L),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(L,we)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:L.i,x:L.x,y:L.y,"min-h":L.minH,"max-h":L.maxH,"min-w":L.minW,w:L.w,h:L.h,i:L.i},{default:e.withCtx(()=>{var q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:we===((q=u==null?void 0:u.children)==null?void 0:q.length)-1?"0px":"24px"})},[((le=(K=L==null?void 0:L.component)==null?void 0:K.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((w=L==null?void 0:L.component)!=null&&w.name)?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((R=L==null?void 0:L.component)==null?void 0:R.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)((y=L==null?void 0:L.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(B=e.unref(pt)[we])==null?void 0:B.showIndex,allowMove:(S=e.unref(pt)[we])==null?void 0:S.allowMove,viewport:(ye=e.unref(pt)[we])==null?void 0:ye.viewport},compName:L==null?void 0:L.component.name,compNames:e.unref(yo),itemData:(Ze=L==null?void 0:L.component)==null?void 0:Ze.compData,childItemData:(rt=L==null?void 0:L.component)==null?void 0:rt.itemChildData,key:e.unref(fn),cacheNewData:e.unref(wn),onChange:e.unref(Gn),index:(L==null?void 0:L.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(Ae=L==null?void 0:L.component)==null?void 0:Ae.tableId,allMapContents:e.unref(Hn),children:(je=L==null?void 0:L.component)==null?void 0:je.children,level:D.value,onRowClick:C,onRouteUrl:V,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(Lr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(L,we)=>{var q,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(L==null?void 0:L.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(we)===((q=u==null?void 0:u.children)==null?void 0:q.length)-1?"0px":"24px"})},[((K=L==null?void 0:L.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&L.name?(e.openBlock(),e.createElementBlock("div",Pp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"12px":"0px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(L.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(L.comp)),{compName:L.name,itemData:L==null?void 0:L.compData,childItemData:L==null?void 0:L.itemChildData,key:e.unref(fn),onChange:e.unref(Gn),index:(L==null?void 0:L.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:L==null?void 0:L.tableId,allMapContents:e.unref(Hn),children:L==null?void 0:L.children,level:D.value,onRowClick:C,onRouteUrl:V},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Kp=Kt._export_sfc($p,[["__scopeId","data-v-e672653d"]]),rl=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"}]),jp={TABLE:bn.ssTable,FORM:Mo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:Lo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Ao.ssAvatar,SIGNATURE:Ao.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:Lo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:ju,LAYOUT:_d,LAYOUTOPERATE:Od,PARENTITEM:Kp};function rn(n){return jp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Sr;exports.activeStepInfo=dn;exports.addSelectMenu=eo;exports.affixItems=ld;exports.allMapContents=Hn;exports.cacheNewData=wn;exports.clickMainKey=Lr;exports.clickSavePage=rd;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=fn;exports.compNames=yo;exports.compShow=Wn;exports.debounce=vo;exports.existLayouts=hd;exports.generateLayouts=ys;exports.getComponent=rn;exports.getComponents=qn;exports.getSliceContLength=kd;exports.gridRowHeight=fs;exports.isStepLayout=bo;exports.isUndefined=yr;exports.onBack=ad;exports.onChange=Gn;exports.onClick=od;exports.onContentChange=Xn;exports.onExtendTaskEnd=vd;exports.onPageBack=md;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Qt;exports.setComponent=Ir;exports.showItems=pt;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=xd;exports.toolBar=Ea;exports.verifyButton=yd;
1
+ "use strict";const bn=require("./index-CGRBbwNI.cjs"),e=require("vue"),v=require("./index-DOItJqcJ.cjs"),Bt=require("./index-DfsfEirQ.cjs"),Be=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkIBFS4N.cjs"),Zt=require("./index-0yP57X4c.cjs"),Io=require("./threeViewerHost-C2KsZZYX.cjs"),Ut=require("./index-CXC0u8pm.cjs"),Kt=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Bo=require("./isString-Do5yyRUw.cjs"),No=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Ao=require("./index-DOCv-LZh.cjs"),gr=require("./index-BVaHwt5f.cjs"),Fl=require("./index-D49CORoN.cjs"),Rl=require("./index-BpPyaNFa.cjs"),Pl=require("vue-router"),yn=require("./index-9hspBVrQ.cjs"),xn=require("./index-DaRuwvRP.cjs");var $l=/\s/;function Kl(n){for(var i=n.length;i--&&$l.test(n.charAt(i)););return i}var jl=/^\s+/;function Ul(n){return n&&n.slice(0,Kl(n)+1).replace(jl,"")}var Vo=NaN,Wl=/^[-+]0x[0-9a-f]+$/i,Hl=/^0b[01]+$/i,ql=/^0o[0-7]+$/i,Gl=parseInt;function Oo(n){if(typeof n=="number")return n;if(v.isSymbol(n))return Vo;if(v.isObject(n)){var i=typeof n.valueOf=="function"?n.valueOf():n;n=v.isObject(i)?i+"":i}if(typeof n!="string")return n===0?n:+n;n=Ul(n);var s=Hl.test(n);return s||ql.test(n)?Gl(n.slice(2),s?2:8):Wl.test(n)?Vo:+n}var ro=function(){return v.root.Date.now()},Xl="Expected a function",Yl=Math.max,Jl=Math.min;function vo(n,i,s){var r,d,u,k,g,f,D=0,C=!1,V=!1,F=!0;if(typeof n!="function")throw new TypeError(Xl);i=Oo(i)||0,v.isObject(s)&&(C=!!s.leading,V="maxWait"in s,u=V?Yl(Oo(s.maxWait)||0,i):u,F="trailing"in s?!!s.trailing:F);function Y(B){var S=r,ye=d;return r=d=void 0,D=B,k=n.apply(ye,S),k}function L(B){return D=B,g=setTimeout(K,i),C?Y(B):k}function we(B){var S=B-f,ye=B-D,Ze=i-S;return V?Jl(Ze,u-ye):Ze}function q(B){var S=B-f,ye=B-D;return f===void 0||S>=i||S<0||V&&ye>=u}function K(){var B=ro();if(q(B))return le(B);g=setTimeout(K,we(B))}function le(B){return g=void 0,F&&r?Y(B):(r=d=void 0,k)}function w(){g!==void 0&&clearTimeout(g),D=0,r=f=d=g=void 0}function R(){return g===void 0?k:le(ro())}function y(){var B=ro(),S=q(B);if(r=arguments,d=this,f=B,S){if(g===void 0)return L(f);if(V)return clearTimeout(g),g=setTimeout(K,i),Y(f)}return g===void 0&&(g=setTimeout(K,i)),k}return y.cancel=w,y.flush=R,y}var Zl="[object Boolean]";function mr(n){return n===!0||n===!1||v.isObjectLike(n)&&v.baseGetTag(n)==Zl}function yr(n){return n===void 0}const Ql={class:"form-content"},ei={title:"选择标签"},ti={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},ai={class:"col-operate-wrap"},ni={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},oi={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(n,{emit:i}){const s=()=>{k.value=!1,g.value=!1,f.value=[]},r=n;e.computed(()=>{var $;const E=($=M.value)==null?void 0:$.split("/");return(E==null?void 0:E.some(P=>(P==null?void 0:P.includes("updateLoading"))||(P==null?void 0:P.includes("loading"))))?!1:O.value==="view"});const d=i,u=e.ref([]),k=e.ref(!1),g=e.ref(!1),f=e.ref([]),{getFileExtension:D}=Io.useThreeSystem(),C=e.ref(),V=e.ref(!1),F=e.ref(!1),Y=Be.useUnit(v.pinia),{chooseTitle:L}=v.storeToRefs(Y),we=e.ref([]),q=e.ref(),K=e.ref(!1),le=e.ref([]),w=bn.useFormToTableComp(v.pinia),R=bn.useFormComp(v.pinia),y=e.ref(!1),B=e.ref(),S=v.useLoginState(v.pinia),{loginUserInfo:ye}=v.storeToRefs(S),Ze=e.ref(),rt=e.ref(!0),Ae=Ut.useModelComp(v.pinia),{tableViewContents:je,itemData:Ie,isEdit:O,routeToChildPath:ee,lockingPage:se}=v.storeToRefs(Ae),he=e.ref(null),Ge=e.ref(!1),it=e.ref(!1),J=Ut.useMenuState(),{activeMenuPath:M}=v.storeToRefs(J),xe=Be.useOriginalState(v.pinia),{originalPath:Ce}=v.storeToRefs(xe),Pe=e.ref([]),Fe=e.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),qe=async E=>{it.value=E,await G("disabled",null,E,!0)},Xe=async E=>{await G("operable",null,E,!0)};e.watch(()=>M.value,async()=>{u.value=[],f.value=[]},{deep:!0,immediate:!0});const fe=()=>{e.nextTick(()=>{ce()})},z=E=>{var te;u.value=(te=u.value)==null?void 0:te.map($=>({...$,isFormColHidden:!(E!=null&&E.includes($.label))}))};e.onUnmounted(()=>{he.value=null});const X=E=>{d("clickTrigger",E)},pe=async E=>{var te,$,P,Ee,ne,H;if(E===""){let Q="";(te=u.value)==null||te.forEach(ke=>{ke!=null&&ke.isMain&&(Q=ke==null?void 0:ke.value)});let de=await Be.getItemData(ee.value,sessionStorage.getItem("systemKey"),"");Q=((H=(ne=(Ee=(P=($=de==null?void 0:de[0])==null?void 0:$.compData)==null?void 0:P.find(ke=>(ke==null?void 0:ke.key)==="mainRouters"))==null?void 0:Ee.contents)==null?void 0:ne[0])==null?void 0:H.routerContent)+Ce.value+Q;let be=await Be.getItemData(Q,sessionStorage.getItem("systemKey"),"");K.value=!0,le.value=be==null?void 0:be.filter(ke=>(ke==null?void 0:ke.comp)!=="methodButton"),d("routeUrl",le.value)}},ce=()=>{var te;const E=(te=he.value)==null?void 0:te.$el;E&&Be.Sortable.create(E,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:$=>{const{oldIndex:P,newIndex:Ee}=$;if(P===Ee)return;const ne=u.value.splice(P,1)[0];u.value.splice(Ee,0,ne)}})},G=async(E,te,$,P=!1)=>{var Ee,ne,H,Q,de,De,be,ke;try{Ae.setRefreshCurStructure(!1);const j=await v.getInsofDataApi({id:r==null?void 0:r.index});if(((Ee=j==null?void 0:j.data)==null?void 0:Ee.code)===200){let Ne=(de=(Q=(H=(ne=j==null?void 0:j.data)==null?void 0:ne.result)==null?void 0:H[0])==null?void 0:Q.value)==null?void 0:de.pageData;P?Ne={...Ne,compData:(be=Ne==null?void 0:Ne.compData)==null?void 0:be.map(Le=>{var ct;return(Le==null?void 0:Le.key)==="formContent"?{...Le,contents:(ct=Le==null?void 0:Le.contents)==null?void 0:ct.map(Ue=>({...Ue,[E]:$}))}:Le})}:Ne={...Ne,compData:(De=Ne==null?void 0:Ne.compData)==null?void 0:De.map(Le=>{var ct;return(Le==null?void 0:Le.key)==="formContent"?{...Le,contents:(ct=Le==null?void 0:Le.contents)==null?void 0:ct.map(Ue=>(Ue==null?void 0:Ue.prop)===(te==null?void 0:te.prop)?{...Ue,[E]:$}:Ue)}:Le})};const ge=await v.updateInsofDataApi({id:r==null?void 0:r.index,value:{pageData:Ne}});((ke=ge==null?void 0:ge.data)==null?void 0:ke.code)===200?(v.ElMessage.success("编辑成功"),Ae.setRefreshCurStructure(!0)):v.ElMessage.error("编辑响应失败")}}catch{v.ElMessage.error("编辑处理失败")}},ae=async(E,te)=>{await G("label",te,E)},Z=async(E,te)=>{E&&await G("type",te,E)},re=async(E,te,$)=>{await G(te,$,E,!1)},Re=(E,te)=>{Ze.value===te?rt.value=!1:rt.value=!0,Ze.value=te==null?void 0:te.changeProp},lt=async E=>{var $,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct;let te=[];if(($=E==null?void 0:E.toString())!=null&&$.includes(".urdf")){if(E.includes(",")){v.ElMessage.error("当前版本仅允许单个urdf预览!");return}f.value=[{url:E,extension:D(E)}],g.value=!0,k.value=!0;return}if((P=E==null?void 0:E.toString())!=null&&P.includes(".stl")||(Ee=E==null?void 0:E.toString())!=null&&Ee.includes(".STL")||(ne=E==null?void 0:E.toString())!=null&&ne.includes(".obj")||(H=E==null?void 0:E.toString())!=null&&H.includes(".mtl")){const ot=((Q=E==null?void 0:E.toString())==null?void 0:Q.split(",")).map(Oe=>({url:Oe,extension:D(Oe)}));f.value=ot,g.value=!1,k.value=!0;return}if((de=E==null?void 0:E.toString())!=null&&de.includes(".stl")||(De=E==null?void 0:E.toString())!=null&&De.includes(".STL")||(be=E==null?void 0:E.toString())!=null&&be.includes(".obj")||(ke=E==null?void 0:E.toString())!=null&&ke.includes(".mtl")){let Ue,ot=[],Oe={};if(Array.isArray(E)?Ue=E:Ue=E==null?void 0:E.split(","),Ue==null||Ue.forEach(gt=>{gt.includes(".mtl")?ot.push(gt):Oe.blob=Oe.blob?Oe.blob+","+gt:gt}),(ot==null?void 0:ot.length)>0&&(Oe.mtlBlobs=ot),(Ne=(j=Object.values(Oe))==null?void 0:j[0])!=null&&Ne.includes("http:"))te.push(Oe);else{const gt=new Blob([Oe.blob],{type:"application/octet-stream;charset=UTF-8"});let tt=URL.createObjectURL(gt),Ve="";(ge=E==null?void 0:E.split("/"))==null||ge.forEach(($e,et)=>{var Ye;et===((Ye=E==null?void 0:E.split("/"))==null?void 0:Ye.length)-1&&(Ve=$e)}),(Le=Oe.blob)!=null&&Le.includes(".stl")&&(Ve=(Ve==null?void 0:Ve.replaceAll(">",""))+".urdf"),q.value=[{name:Ve,blobUrl:tt}],F.value=!0}}else{const Ue=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),ot=await v.axios.get(E,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{Ue.close()}),Oe=new Blob([ot.data],{type:"application/octet-stream;charset=UTF-8"});let gt=URL.createObjectURL(Oe),tt="";(ct=E==null?void 0:E.split("/"))==null||ct.forEach((Ve,$e)=>{var et;$e===((et=E==null?void 0:E.split("/"))==null?void 0:et.length)-1&&(tt=Ve)}),q.value=[{name:tt,blobUrl:gt}],F.value=!0}(te==null?void 0:te.length)>0&&R.setBlobUrls(te)},h=()=>{F.value=!1},_=E=>{var ne,H,Q,de;const te=(H=(ne=v.cloneDeep(r.itemData))==null?void 0:ne.find(De=>(De==null?void 0:De.key)==="formContent"))==null?void 0:H.contents,$=v.cloneDeep(E.content);let P={};$&&((Q=Object.values($))==null?void 0:Q.length)>0&&((de=Object.values($))==null||de.forEach((De,be)=>{P[te[be].key]=De}));const Ee={content:P,index:r==null?void 0:r.index,buttonName:E==null?void 0:E.buttonName};d("change",Ee)},I=e.computed(()=>"http://222.92.178.198:62001"),W=async E=>{var j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et,Ye,ze,at;if(!E)return;(Ne=(j=r==null?void 0:r.itemData)==null?void 0:j.find(ve=>(ve==null?void 0:ve.key)==="parentFormPath"))==null||Ne.contents;let te=je.value;(te==null?void 0:te.length)>0&&(te=te==null?void 0:te.map(ve=>{var Me,Qe,A,ue;let Se=(Me=ve==null?void 0:ve.key)==null?void 0:Me.split("/");return(r==null?void 0:r.compName)===(Se==null?void 0:Se[0])&&(Qe=u.value)!=null&&Qe.find(He=>(He==null?void 0:He.prop)===(Se==null?void 0:Se[1]))&&(ve.value=(ue=(A=u.value)==null?void 0:A.find(He=>(He==null?void 0:He.prop)===(Se==null?void 0:Se[1])))==null?void 0:ue.value),ve}),Ae.setTableViewContents(te));const $=v.cloneDeep(r.itemData);let P=$==null?void 0:$.map(ve=>{var Se;return(ve==null?void 0:ve.key)==="formContent"&&((Se=ve.contents)==null||Se.map((Me,Qe)=>{var A,ue,He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt,bt,jt,qt,Gt,ta;return Me.type=(ue=(A=u.value)==null?void 0:A.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:ue.type,Me.options=Me!=null&&Me.options?Me.options:((nt=(me=(He=Me==null?void 0:Me.key)==null?void 0:He.split("$"))==null?void 0:me[1])==null?void 0:nt.length)>0?(dt=(ht=bn.formGetOptions((yt=(kt=Me==null?void 0:Me.key)==null?void 0:kt.split("$"))==null?void 0:yt[1]))==null?void 0:ht.split(","))==null?void 0:dt.map($t=>({label:$t,value:$t})):[],(ft=Me==null?void 0:Me.key)!=null&&ft.includes("$")&&(Me.key=(Mt=(_t=Me==null?void 0:Me.key)==null?void 0:_t.split("$"))==null?void 0:Mt[0]),Me.signature=(Lt=(Vt=u.value)==null?void 0:Vt.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:Lt.signature,Me.isLoginUser=(jt=(bt=u.value)==null?void 0:bt.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:jt.isLoginUser,Me.value=(qt=Object.values(E))==null?void 0:qt[Qe],Me.isFormColHidden=(ta=(Gt=u.value)==null?void 0:Gt.find($t=>($t==null?void 0:$t.prop)===(Me==null?void 0:Me.prop)))==null?void 0:ta.isFormColHidden,Me})),ve}),Ee=u.value,ne=(Le=(ge=v.cloneDeep(P))==null?void 0:ge.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Le.contents;if(Ee=Ee==null?void 0:Ee.map(ve=>{var Se;return ve.value=(Se=ne==null?void 0:ne.find((Me,Qe)=>((Me==null?void 0:Me.id)??Qe)===(ve==null?void 0:ve.id)))==null?void 0:Se.value,ve}),!rt.value){d("contentChange",{contents:P,index:r.index});return}let H="",Q=(ot=(Ue=(ct=v.cloneDeep(P))==null?void 0:ct.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Ue.contents)==null?void 0:ot.find((ve,Se)=>{var Me,Qe,A;return(ve==null?void 0:ve.label)===Ze.value||Se.toString()===((A=(Qe=(Me=Ze.value)==null?void 0:Me.split("t"))==null?void 0:Qe[1])==null?void 0:A.toString())}),de=(Oe=Q==null?void 0:Q.optionUrl)==null?void 0:Oe.menuSelect,De=!0;if((Ve=(tt=(gt=v.cloneDeep(P))==null?void 0:gt.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:tt.contents)==null||Ve.forEach(ve=>{var Se,Me,Qe,A,ue,He;De&&((Qe=(Me=(Se=ve==null?void 0:ve.optionUrl)==null?void 0:Se.groupSelect)==null?void 0:Me[1])!=null&&Qe.includes("["))&&(H=(ue=(A=ve==null?void 0:ve.optionUrl)==null?void 0:A.groupSelect)==null?void 0:ue[1],JSON.stringify(de)===JSON.stringify((He=ve==null?void 0:ve.optionUrl)==null?void 0:He.menuSelect)&&(De=!1))}),($e=Q==null?void 0:Q.optionUrl)!=null&&$e.menuSelect&&rt.value){let ve=await bn.getSelectRow(Q),Se,Me=(et=Q==null?void 0:Q.optionUrl)==null?void 0:et.menuSelect;if(ve==null||ve.forEach(Qe=>{var A,ue,He,me,nt,kt,yt,ht,dt,ft;H===((ue=(A=Q==null?void 0:Q.optionUrl)==null?void 0:A.groupSelect)==null?void 0:ue[1])&&((nt=(me=(He=Q==null?void 0:Q.optionUrl)==null?void 0:He.groupSelect)==null?void 0:me[1])!=null&&nt.includes("["))&&((ft=v.cloneDeep(Qe))==null?void 0:ft[(dt=(ht=(yt=(kt=Q==null?void 0:Q.optionUrl)==null?void 0:kt.groupSelect)==null?void 0:yt[1])==null?void 0:ht.replaceAll("[",""))==null?void 0:dt.replaceAll("]","")])===(Q==null?void 0:Q.value)&&(Se=Qe)}),Se){let Qe=v.cloneDeep(Ee);Qe=Qe==null?void 0:Qe.map(ue=>{var He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt;return(Se!=null&&Se[ue==null?void 0:ue.label]||Se!=null&&Se[(kt=(nt=(me=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.groupSelect)==null?void 0:me[1])==null?void 0:nt.replaceAll("[",""))==null?void 0:kt.replaceAll("]","")])&&((dt=(ht=(yt=ue==null?void 0:ue.optionUrl)==null?void 0:yt.groupSelect)==null?void 0:ht[1])!=null&&dt.includes("["))&&Me!=null&&Me.every(Lt=>{var bt,jt;return(jt=(bt=ue==null?void 0:ue.optionUrl)==null?void 0:bt.menuSelect)==null?void 0:jt.includes(Lt)})&&(ue.value=(Se==null?void 0:Se[ue==null?void 0:ue.label])||(Se==null?void 0:Se[(Vt=(Mt=(_t=(ft=ue==null?void 0:ue.optionUrl)==null?void 0:ft.groupSelect)==null?void 0:_t[1])==null?void 0:Mt.replaceAll("[",""))==null?void 0:Vt.replaceAll("]","")]),Array.isArray(ue.value)&&ue.value.every(Lt=>(Lt==null?void 0:Lt.url)&&(Lt==null?void 0:Lt.name))&&(ue.type="Upload")),ue}),Qe=Qe==null?void 0:Qe.map(ue=>{var He,me,nt;return(He=ue==null?void 0:ue.optionUrl)!=null&&He.oldMenuSelect&&(ue.optionUrl.menuSelect=(nt=(me=v.cloneDeep(ue))==null?void 0:me.optionUrl)==null?void 0:nt.oldMenuSelect),ue}),u.value=v.cloneDeep(Qe);let A=v.cloneDeep(Qe);A=A==null?void 0:A.map(ue=>{var He,me,nt,kt,yt,ht;return(me=(He=ue==null?void 0:ue.optionUrl)==null?void 0:He.menuSelect)!=null&&me.some(dt=>dt==null?void 0:dt.includes("["))&&(ue.optionUrl.oldMenuSelect=(kt=(nt=v.cloneDeep(ue))==null?void 0:nt.optionUrl)==null?void 0:kt.menuSelect,ue.optionUrl.menuSelect=(ht=(yt=ue==null?void 0:ue.optionUrl)==null?void 0:yt.menuSelect)==null?void 0:ht.map(dt=>{var ft,_t,Mt,Vt;if(dt!=null&&dt.includes("[")){let Lt=(_t=(ft=dt==null?void 0:dt.replaceAll("[","").replaceAll("]",""))==null?void 0:ft.split(":"))==null?void 0:_t[1];dt=(Vt=(Mt=v.cloneDeep(Qe))==null?void 0:Mt.find(bt=>(bt==null?void 0:bt.label)===Lt))==null?void 0:Vt.value}return dt})),ue}),u.value=A}else u.value=Ee;P=P==null?void 0:P.map(Qe=>{var A;return(Qe==null?void 0:Qe.key)==="formContent"&&(Qe.contents=(A=Qe.contents)==null?void 0:A.map(ue=>{var He,me,nt,kt;return ue.value=((me=(He=u.value)==null?void 0:He.find(yt=>(yt==null?void 0:yt.label)===(ue==null?void 0:ue.key)))==null?void 0:me.value)??(ue==null?void 0:ue.value),ue.type=((kt=(nt=u.value)==null?void 0:nt.find(yt=>(yt==null?void 0:yt.prop)===(ue==null?void 0:ue.key)))==null?void 0:kt.type)??(ue==null?void 0:ue.type),ue})),Qe})}rt.value=!1,d("contentChange",{contents:P,index:r.index});let be=[],ke=[];if((ze=v.cloneDeep((Ye=P==null?void 0:P.find(ve=>(ve==null?void 0:ve.key)==="formContent"))==null?void 0:Ye.contents))==null||ze.forEach(ve=>{var Se;Array.isArray(ve==null?void 0:ve.value)&&((Se=ve==null?void 0:ve.value)!=null&&Se.find(Me=>{var Qe;return(Qe=Me==null?void 0:Me.url)==null?void 0:Qe.includes(".obj")}))&&(ke=ve==null?void 0:ve.value)}),(ke==null?void 0:ke.length)>0){const ve=(at=v.cloneDeep(ke))==null?void 0:at.filter(Se=>{var Me;return(Me=Se==null?void 0:Se.url)==null?void 0:Me.includes(".obj")});ve==null||ve.forEach(Se=>{var Qe,A,ue,He;const Me=(Qe=ke==null?void 0:ke.filter(me=>{var nt;return(me==null?void 0:me.name)===(Se==null?void 0:Se.name)&&((nt=me==null?void 0:me.url)==null?void 0:nt.includes(".mtl"))}))==null?void 0:Qe.map(me=>me==null?void 0:me.url);be.push({objUrl:Se==null?void 0:Se.url,mtlUrls:((A=ke==null?void 0:ke.filter(me=>{var nt;return(me==null?void 0:me.name)===(Se==null?void 0:Se.name)&&((nt=me==null?void 0:me.url)==null?void 0:nt.includes(".mtl"))}))==null?void 0:A.length)===1?(He=(ue=ke==null?void 0:ke.filter(me=>{var nt;return(me==null?void 0:me.name)===(Se==null?void 0:Se.name)&&((nt=me==null?void 0:me.url)==null?void 0:nt.includes(".mtl"))}))==null?void 0:ue[0])==null?void 0:He.url:Me})}),R.setObjUrl(be)}},x=E=>{if(!E)return;const te=[];let $="";for(let P of E)(P.includes("[")||$.includes("["))&&($+=P.trim(),v.cloneDeep($).split("【").length-1===v.cloneDeep($).split("】").length-1&&v.cloneDeep($).split("[").length-1===v.cloneDeep($).split("]").length-1&&(te.push($.replace(/\/\*[\s\S]*?\*\//g,"")),$=""));return te},ie=(E,te,$)=>{let P="";const Ee=te==null?void 0:te.map(ne=>{var H;return(H=ne==null?void 0:ne.value)==null?void 0:H.pageData});return Ee==null||Ee.forEach(ne=>{var H;(ne==null?void 0:ne.name)===(E==null?void 0:E[0])&&((H=ne==null?void 0:ne.compData)==null||H.forEach(Q=>{var de;(Q==null?void 0:Q.key)==="formContent"&&((de=Q==null?void 0:Q.contents)==null||de.forEach(De=>{var be;(De==null?void 0:De.prop)===(E==null?void 0:E[1])&&(P=(De==null?void 0:De.value)===""?Be.judgeContents((be=v.cloneDeep(De))==null?void 0:be.optionUrl,$):De==null?void 0:De.value)}))}))}),P},_e=(E,te,$,P)=>{var Q,de;let Ee="",ne="";(Q=v.cloneDeep(te))==null||Q.forEach((De,be)=>{De!=null&&De.includes("[")?ne=ne+Ce.value+E[be]:ne=ne===""?ne+De:ne+"/"+De});let H=(de=P[ne])==null?void 0:de.map(De=>{var be;return(be=De==null?void 0:De.value)==null?void 0:be.pageData});return H==null||H.forEach(De=>{var be;(De==null?void 0:De.name)===($==null?void 0:$[0])&&((be=De==null?void 0:De.compData)==null||be.forEach(ke=>{var j;(ke==null?void 0:ke.key)==="formContent"&&((j=ke==null?void 0:ke.contents)==null||j.forEach(Ne=>{(Ne==null?void 0:Ne.prop)===($==null?void 0:$[1])&&(Ee=Ne==null?void 0:Ne.value)}))}))}),Ee};return e.watch(()=>r.itemData,async()=>{var H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et;const E=(H=r.itemData)==null?void 0:H.find(Ye=>(Ye==null?void 0:Ye.key)==="formContent"),te=(Q=v.cloneDeep(r.itemData))==null?void 0:Q.find(Ye=>(Ye==null?void 0:Ye.key)==="formButton"),$=(de=v.cloneDeep(r.itemData))==null?void 0:de.find(Ye=>(Ye==null?void 0:Ye.key)==="formFlex"),P=(De=v.cloneDeep(r.itemData))==null?void 0:De.find(Ye=>(Ye==null?void 0:Ye.key)==="formWrap"),Ee=(be=v.cloneDeep(r.itemData))==null?void 0:be.find(Ye=>(Ye==null?void 0:Ye.key)==="enableWrap");if((P==null?void 0:P.contents)==="纵向"?V.value=!1:V.value=!0,y.value=(Ee==null?void 0:Ee.contents)===void 0?!1:Ee==null?void 0:Ee.contents,B.value=typeof($==null?void 0:$.contents)!="boolean"?!(!($!=null&&$.contents)===""||((ke=$==null?void 0:$.contents)==null?void 0:ke.toUpperCase())==="VERTICAL"):$==null?void 0:$.contents,((j=E==null?void 0:E.contents)==null?void 0:j.length)>0&&Array.isArray(E==null?void 0:E.contents)){let Ye=r.allMapContents;const ze=(ge=(Ne=v.cloneDeep(E))==null?void 0:Ne.contents)==null?void 0:ge.map((A,ue)=>{var Lt,bt,jt,qt,Gt,ta,$t,Ia,Ra,ba,Pa,ka,$a,Ka,ja,Ua,Wa,Ba,ga,da,xa,ma,ra,va,Ha,Na,Aa,wa,qa,Ga,Va,Xa,Ya;let He=(A==null?void 0:A.label)??(A==null?void 0:A.key)??"",me=(A==null?void 0:A.type)??"",nt=(A==null?void 0:A.options)??[];if((Lt=A==null?void 0:A.key)!=null&&Lt.includes("$")&&(He=(bt=v.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:bt[0],((qt=(jt=v.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:jt[1])==null?void 0:qt.length)>0)){const[St,ea]=(ta=(Gt=v.cloneDeep(A==null?void 0:A.key).split("$"))==null?void 0:Gt[1])==null?void 0:ta.split(/[()]/);me=(($t=Be.FormType.find(xt=>(xt==null?void 0:xt.key)===St))==null?void 0:$t.value)??"",((Ia=ea==null?void 0:ea.split(","))==null?void 0:Ia.length)>0&&(nt=(Ra=ea==null?void 0:ea.split(","))==null?void 0:Ra.map(xt=>({label:xt,value:xt})))}let kt=[];A!=null&&A.contents&&!Array.isArray(A==null?void 0:A.contents)&&(kt=(Pa=(ba=A==null?void 0:A.contents)==null?void 0:ba.split(","))==null?void 0:Pa.map(St=>({label:St,value:St}))),((ka=A==null?void 0:A.optionUrl)==null?void 0:ka.selectRelateType)==="自定义绑定"&&(kt=(Ka=($a=A==null?void 0:A.optionUrl)==null?void 0:$a.defaultSelect)==null?void 0:Ka.map(St=>({label:St,value:St})));let yt=!1,ht=(A==null?void 0:A.isFormColHidden)??!1,dt=Be.judgeContents((ja=v.cloneDeep(A))==null?void 0:ja.optionUrl,Ye),ft=dt!==void 0&&dt!==""?dt:A!=null&&A.originalContent&&(A==null?void 0:A.originalContent)!==""?A.originalContent:A!=null&&A.value?A.value:(nt==null?void 0:nt.length)>0?(Ua=nt==null?void 0:nt[0])==null?void 0:Ua.value:(A==null?void 0:A.value)??"",_t=!1,Mt=dt!==void 0||me===""?"Input":me;if((Array.isArray(dt)&&(dt!=null&&dt.every(St=>(St==null?void 0:St.name)&&(St==null?void 0:St.url)))||Array.isArray(ft)&&(ft!=null&&ft.every(St=>(St==null?void 0:St.name)&&(St==null?void 0:St.url))))&&(Mt="upload"),typeof ft=="string"&&(ft!=null&&ft.includes("loginUser"))&&!(ft!=null&&ft.includes("loginUserSign"))||A!=null&&A.isLoginUser)yt=!0,ft=((Wa=ye.value)==null?void 0:Wa.姓名)||((Ba=ye.value)==null?void 0:Ba.account)||((ga=ye.value)==null?void 0:ga.账号)||((da=ye.value)==null?void 0:da.userName);else if(typeof ft=="string"&&(ft!=null&&ft.includes("loginUserSign"))||A!=null&&A.signature||A!=null&&A.isShow)if(_t=!0,(A==null?void 0:A.isShow)==="originalSignature")Mt="image",ft=I.value+"/"+((xa=ye.value)==null?void 0:xa.signature);else{let St=[...new Set(x(A.isShow))].map(wt=>{var Et,Ct,Ft,Ot;return{key:(Ot=(Ft=(Ct=(Et=wt==null?void 0:wt.split("["))==null?void 0:Et[1])==null?void 0:Ct.split("]"))==null?void 0:Ft[0])==null?void 0:Ot.split(":"),value:""}});(ma=Ie.value)==null||ma.forEach(wt=>{St==null||St.forEach((Xt,Et)=>{var Ft;let Ct=Xt==null?void 0:Xt.key;(wt==null?void 0:wt.name)===(Ct==null?void 0:Ct[0].replaceAll("'",""))&&((Ft=wt==null?void 0:wt.compData)==null||Ft.forEach(Ot=>{var Rt;(Ot==null?void 0:Ot.key)==="formContent"&&((Rt=Ot==null?void 0:Ot.contents)==null||Rt.forEach(Yt=>{(Yt==null?void 0:Yt.prop)===(Ct==null?void 0:Ct[1].replaceAll("'",""))&&(St[Et].value=Yt==null?void 0:Yt.value)}))}))})});let ea=St==null?void 0:St.map(wt=>{var Xt;return wt.key="["+((Xt=wt.key)==null?void 0:Xt.join(":"))+"]",wt}),xt=A==null?void 0:A.isShow;ea==null||ea.forEach(wt=>{wt!=null&&wt.value?xt=xt.replaceAll(wt==null?void 0:wt.key,"'"+(wt==null?void 0:wt.value)+"'"):xt=xt.replaceAll(wt==null?void 0:wt.key,"undefined")}),xt!=null&&xt.includes("(")||(xt!=null&&xt.includes("==")?xt=((ra=xt==null?void 0:xt.split("==="))==null?void 0:ra[0])+"==='"+((va=xt==null?void 0:xt.split("==="))==null?void 0:va[1])+"'":xt=((Ha=xt==null?void 0:xt.split("="))==null?void 0:Ha[0])+"='"+((Na=xt==null?void 0:xt.split("="))==null?void 0:Na[1])+"'"),xt!=null&&xt.includes("=")&&!(xt!=null&&xt.includes("=="))&&!(xt!=null&&xt.includes("==="))&&(xt=xt==null?void 0:xt.replaceAll("=","==")),new Function(`if (${xt}) { return true } else { return false }`)()?(ht=!1,Mt="image",ft=I.value+"/"+((Aa=ye.value)==null?void 0:Aa.signature)):ft=""}return Array.isArray(ft)&&ft.every(St=>(St==null?void 0:St.url)&&(St==null?void 0:St.name))&&(A.type="Upload"),A!=null&&A.isMainUrl&&(Mt="Url"),{label:He??"",name:"t"+ue,prop:v.cloneDeep(A==null?void 0:A.key),type:Mt,value:A!=null&&A.isSync?((qa=(wa=L.value)==null?void 0:wa[0])==null?void 0:qa.value)??((Ya=(Ga=M==null?void 0:M.value)==null?void 0:Ga.split("/"))==null?void 0:Ya[((Xa=(Va=M==null?void 0:M.value)==null?void 0:Va.split("/"))==null?void 0:Xa.length)-1]):A!=null&&A.isNewDate&&ft===""?new Date:ft,id:(A==null?void 0:A.id)??ue,contents:(kt==null?void 0:kt.length)>0?kt:nt??[],width:(A==null?void 0:A.width)??1,isLoginUser:yt,config:A==null?void 0:A.config,optionUrl:(A==null?void 0:A.optionUrl)??A,isFormColHidden:ht,signature:_t,isMain:A==null?void 0:A.isMain,isMainUrl:A==null?void 0:A.isMainUrl,operable:(A==null?void 0:A.operable)??!1,disabled:(A==null?void 0:A.disabled)??!1,isSync:A==null?void 0:A.isSync}}),at=ze==null?void 0:ze.map(A=>A==null?void 0:A.value);let ve="";at==null||at.forEach(A=>{A!==""&&A!==void 0&&(ve=ve===""?A:ve+"/"+A)}),w.setSelectArray(at),w.setSelectString(ve);let Se=(Le=v.cloneDeep(ze))==null?void 0:Le.map(A=>(A!=null&&A.value&&Be.IsJson(A==null?void 0:A.value)&&Array.isArray(JSON.parse(A==null?void 0:A.value))&&(A.value=JSON.parse(A.value)),A));Se=Se==null?void 0:Se.map(A=>{var ue,He,me,nt,kt,yt,ht,dt;if((He=(ue=A==null?void 0:A.optionUrl)==null?void 0:ue.menuSelect)!=null&&He.some(ft=>ft==null?void 0:ft.includes("["))){let ft="";A.optionUrl.oldMenuSelect=(nt=(me=v.cloneDeep(A))==null?void 0:me.optionUrl)==null?void 0:nt.menuSelect,A.optionUrl.menuSelect=(yt=(kt=A==null?void 0:A.optionUrl)==null?void 0:kt.menuSelect)==null?void 0:yt.map(_t=>{var Mt,Vt,Lt,bt,jt,qt;if(_t!=null&&_t.includes("[")){let Gt=(Vt=(Mt=_t==null?void 0:_t.replaceAll("[","").replaceAll("]",""))==null?void 0:Mt.split(":"))==null?void 0:Vt[1];ft=ie((Lt=_t==null?void 0:_t.replaceAll("[","").replaceAll("]",""))==null?void 0:Lt.split(":"),Ye==null?void 0:Ye[M.value],Ye),_t=((jt=(bt=v.cloneDeep(Se))==null?void 0:bt.find(ta=>(ta==null?void 0:ta.label)===Gt))==null?void 0:jt.value)||ie((qt=_t==null?void 0:_t.replaceAll("[","").replaceAll("]",""))==null?void 0:qt.split(":"),Ye==null?void 0:Ye[M.value],Ye)}return _t}),ft!==""&&A.value===""&&(A.value=_e(A.optionUrl.menuSelect,A.optionUrl.oldMenuSelect,(ht=A==null?void 0:A.optionUrl)==null?void 0:ht.groupSelect,Ye),Array.isArray(A.value)&&((dt=A.value)!=null&&dt.every(_t=>_t==null?void 0:_t.url))&&(A.type="UPLOAD"))}return A}),u.value=Se,it.value=((ct=u.value)==null?void 0:ct.every(A=>A==null?void 0:A.disabled))||se.value===M.value,Ge.value=(Ue=u.value)==null?void 0:Ue.every(A=>A==null?void 0:A.operable),Pe.value=(ot=u.value)==null?void 0:ot.map(A=>A==null?void 0:A.label);let Me=[],Qe=[];if((Oe=v.cloneDeep(u.value))==null||Oe.forEach(A=>{var ue;Array.isArray(A==null?void 0:A.value)&&((ue=A==null?void 0:A.value)!=null&&ue.find(He=>{var me;return(me=He==null?void 0:He.url)==null?void 0:me.includes(".obj")}))&&(Qe=A==null?void 0:A.value)}),(Qe==null?void 0:Qe.length)>0){const A=(gt=v.cloneDeep(Qe))==null?void 0:gt.filter(ue=>{var He;return(He=ue==null?void 0:ue.url)==null?void 0:He.includes(".obj")});A==null||A.forEach(ue=>{var me,nt,kt,yt;const He=(me=Qe==null?void 0:Qe.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ue==null?void 0:ue.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:me.map(ht=>ht==null?void 0:ht.url);Me.push({objUrl:ue==null?void 0:ue.url,mtlUrls:((nt=Qe==null?void 0:Qe.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ue==null?void 0:ue.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:nt.length)===1?(yt=(kt=Qe==null?void 0:Qe.filter(ht=>{var dt;return(ht==null?void 0:ht.name)===(ue==null?void 0:ue.name)&&((dt=ht==null?void 0:ht.url)==null?void 0:dt.includes(".mtl"))}))==null?void 0:kt[0])==null?void 0:yt.url:He})}),R.setObjUrl(Me)}(tt=v.cloneDeep(u.value))==null||tt.forEach(A=>{var ue,He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt;if((He=(ue=A==null?void 0:A.value)==null?void 0:ue.toString())!=null&&He.includes(".stl")||(nt=(me=A==null?void 0:A.value)==null?void 0:me.toString())!=null&&nt.includes(".STL")||(yt=(kt=A==null?void 0:A.value)==null?void 0:kt.toString())!=null&&yt.includes(".obj")||(dt=(ht=A==null?void 0:A.value)==null?void 0:ht.toString())!=null&&dt.includes(".mtl")||(_t=(ft=A==null?void 0:A.value)==null?void 0:ft.toString())!=null&&_t.includes(".urdf")){let bt={},jt=[],qt;Array.isArray(A==null?void 0:A.value)?qt=A==null?void 0:A.value:qt=(Mt=A==null?void 0:A.value)==null?void 0:Mt.split(","),qt==null||qt.forEach(Gt=>{Gt.includes(".mtl")?jt.push(Gt):bt.blob=bt.blob==="undefined"?Gt:bt.blob+","+Gt}),(jt==null?void 0:jt.length)>0&&(bt.mtlBlobs=jt),(Lt=(Vt=Object.values(bt))==null?void 0:Vt[0])!=null&&Lt.includes("http:")}})}else u.value=[];let ne=je.value;if((ne==null?void 0:ne.length)>0&&(ne=ne==null?void 0:ne.map(Ye=>{var at,ve,Se,Me;let ze=(at=Ye==null?void 0:Ye.key)==null?void 0:at.split("/");return(r==null?void 0:r.compName)===(ze==null?void 0:ze[0])&&(ve=u.value)!=null&&ve.find(Qe=>(Qe==null?void 0:Qe.prop)===(ze==null?void 0:ze[1]))&&(Ye.value=(Me=(Se=u.value)==null?void 0:Se.find(Qe=>(Qe==null?void 0:Qe.prop)===(ze==null?void 0:ze[1])))==null?void 0:Me.value),Ye}),Ae.setTableViewContents(ne)),r!=null&&r.formRules)C.value=r==null?void 0:r.formRules;else{let Ye={};(Ve=v.cloneDeep(u).value)==null||Ve.forEach(ze=>{(ze==null?void 0:ze.isMain)===!0&&(Ye[(ze==null?void 0:ze.prop)??(ze==null?void 0:ze.name)]=[{required:!0,message:`${(ze==null?void 0:ze.prop)||(ze==null?void 0:ze.name)}不能为空`}])}),C.value=Ye}if((($e=te==null?void 0:te.contents)==null?void 0:$e.length)>0){const Ye=[];(et=te==null?void 0:te.contents)==null||et.forEach((ze,at)=>{(ze==null?void 0:ze.label)!==""&&Ye.push({label:(ze==null?void 0:ze.label)??"",id:(ze==null?void 0:ze.id)??at,type:(ze==null?void 0:ze.type)??"",background:ze==null?void 0:ze.background})}),we.value=Ye}else we.value=[]},{deep:!0,immediate:!0}),e.watch(()=>se.value,E=>{it.value=E===M.value},{immediate:!0}),(E,te)=>{const $=e.resolveComponent("svg-icon"),P=e.resolveComponent("el-switch"),Ee=e.resolveComponent("el-checkbox"),ne=e.resolveComponent("el-popover"),H=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Ql,[e.createVNode(Bt.ssForm,{rowContents:u.value,formRules:C.value,buttonValue:we.value,isRowFlex:!1,isEnableWrap:y.value,onOnButtonClick:_,onChange:W,formDisabled:it.value,formLabelsOperable:Ge.value,isButtonRow:V.value,onPreview:lt,onBlurChange:Re,onHandleColEditChange:ae,onHandleColTypeChange:Z,onRouteUrl:pe,onClickTrigger:X},{operateCol:e.withCtx(({renderColumns:Q,formDisabled:de,formLabelsOperable:De})=>[e.createVNode(ne,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:fe},{reference:e.withCtx(()=>[e.createElementVNode("span",ei,[e.createVNode($,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:e.withCtx(()=>[e.createElementVNode("div",ti,[te[1]||(te[1]=e.createElementVNode("div",{class:"group-title"},"表单操作",-1)),e.createVNode(P,{"model-value":de,"active-text":"禁用","inactive-text":"",onChange:qe,style:{"margin-right":"8px"}},null,8,["model-value"]),e.createVNode(P,{"model-value":De,"active-text":"编辑所有标签","inactive-text":"",onChange:Xe},null,8,["model-value"]),te[2]||(te[2]=e.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),e.createVNode(H,{modelValue:Pe.value,"onUpdate:modelValue":te[0]||(te[0]=be=>Pe.value=be),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:he,onChange:z},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Q,be=>(e.openBlock(),e.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:be.label},[e.createVNode(Ee,{value:be.label,style:{width:"100%",marginRight:0}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(be.label),1)]),_:2},1032,["value"]),e.createVNode(ne,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:e.withCtx(()=>[e.createVNode($,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:e.withCtx(()=>{var ke;return[e.createElementVNode("div",ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ke=Object.keys(be))==null?void 0:ke.filter(j=>{var Ne;return(Ne=Fe.value)==null?void 0:Ne.find(ge=>(ge==null?void 0:ge.value)===j)}),j=>{var Ne,ge;return e.openBlock(),e.createElementBlock("div",{key:j},[e.createVNode(Bt._sfc_main$1,{value:be==null?void 0:be[j],"active-text":(ge=(Ne=Fe.value)==null?void 0:Ne.find(Le=>(Le==null?void 0:Le.value)===j))==null?void 0:ge.label,inactiveText:"",onChange:Le=>re(Le,j,be)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),e.createElementVNode("span",ni,[e.createVNode($,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","isEnableWrap","formDisabled","formLabelsOperable","isButtonRow"]),F.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:q.value,onDestroy:h},null,8,["fileDataList"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createBlock(Zt.ssDialog,{key:1,visible:k.value,onBeforeDestroy:s,style:{height:"700px",width:"1000px"}},{default:e.withCtx(()=>[e.createVNode(Io.ThreeViewerHost,{files:f.value,onGetAnimationData:E.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):e.createCommentVNode("",!0)])}}},Mo=Kt._export_sfc(oi,[["__scopeId","data-v-3d8dbd5b"]]),Kn=e.ref(0),br=n=>{var i;return!n||(n==null?void 0:n.length)===0?[]:(i=v.cloneDeep(n))==null?void 0:i.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},ri=n=>{var s;return(s=v.cloneDeep(n))==null?void 0:s.map(r=>(Kn.value++,r={label:(r==null?void 0:r.label)??"",prop:(r==null?void 0:r.label)==="操作"?"operate":r==null?void 0:r.prop,width:r!=null&&r.width?parseInt(r.width):"",fixed:(r==null?void 0:r.fixed)??void 0,sortable:(r==null?void 0:r.sortable)??!1,align:(r==null?void 0:r.align)??"left",showOverflowTooltip:(r==null?void 0:r.showOverflowTooltip)??!0,isNotDrag:(r==null?void 0:r.isNotDrag)??!1,isEditCol:(r==null?void 0:r.isEditCol)??!1,isOperate:(r==null?void 0:r.isOperate)??!1,id:(r==null?void 0:r.id)??Kn.value,children:br(r==null?void 0:r.children)},r))},kr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===i)?(s=v.cloneDeep(n))==null?void 0:s.filter(d=>(d==null?void 0:d.id)!==i):(n=n==null?void 0:n.map(r=>(r.children=kr(r==null?void 0:r.children,i),r)),n)},xr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d=i),d)):(n=n==null?void 0:n.map(r=>(r.children=xr(r==null?void 0:r.children,i),r)),n)},wr=(n,i)=>{var s;return n!=null&&n.find(r=>{var d;return(r==null?void 0:r.id)===((d=i==null?void 0:i.contents)==null?void 0:d.id)})?(s=v.cloneDeep(n))==null?void 0:s.map(d=>{var u;return(d==null?void 0:d.id)===((u=i==null?void 0:i.contents)==null?void 0:u.id)&&(d=i==null?void 0:i.contents),d}):(n=n==null?void 0:n.map(r=>(r.children=wr(r==null?void 0:r.children,i),r)),n)},Dr=(n,i)=>{var s;return n!=null&&n.find(r=>(r==null?void 0:r.id)===(i==null?void 0:i.id))?(s=v.cloneDeep(n))==null?void 0:s.map(d=>((d==null?void 0:d.id)===(i==null?void 0:i.id)&&(d!=null&&d.children||(d.children=[]),d.children.push(i.contents)),d)):(n=n==null?void 0:n.map(r=>(r.children=Dr(r==null?void 0:r.children,i),r)),n)},At=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],li=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],ii=[{label:"新增",value:"add"}],Ca=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ii},{key:"background",label:"按钮背景色",type:"Color"}],_a=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:li},{key:"textColor",label:"按钮颜色",type:"Color"}],si={class:"table-header-child"},ci={class:"table-header-child-main"},ui={class:"table-header-child-content"},di={class:"table-header-child-content-item"},pi={class:"fix-button"},fi={key:0},vi={class:"form-content"},hi={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),k=Be.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(k);e.ref(0);const f=e.ref(""),D=e.ref([]),C=e.ref([]),V=w=>{var y;d.value=!0;let R=[];At==null||At.forEach(B=>{let S=v.cloneDeep(g.value)+1;k.setTableIndex(S),R.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:w[B.key],id:g.value,contents:B==null?void 0:B.options})}),w!=null&&w.children&&((y=w==null?void 0:w.children)==null?void 0:y.length)>0&&R.push({children:w==null?void 0:w.children,isFormColHidden:!0}),f.value=w==null?void 0:w.id,D.value=R,C.value=R},F=w=>{r("fixChange",v.cloneDeep(w))},Y=w=>{r("deleteChange",v.cloneDeep(w))},L=w=>{d.value=!0;let R=[];At==null||At.forEach(y=>{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),R.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=w==null?void 0:w.id,D.value=R,C.value=R},we=w=>{let R=v.cloneDeep(C.value);R=R==null?void 0:R.map(y=>(y.children||(y.value=w==null?void 0:w[y.name]),y)),C.value=R},q=()=>{var R,y;D.value=C.value;let w={};if(f.value!=="")w.id=f.value,(R=D.value)==null||R.forEach(B=>{const S=At==null?void 0:At.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));S?w[S.key]=B.value:B!=null&&B.children&&B.children.length>0&&(w.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),w.id="id"+g.value,(y=D.value)==null||y.forEach(S=>{const ye=At==null?void 0:At.find(Ze=>(Ze==null?void 0:Ze.label)===(S==null?void 0:S.label));ye?w[ye.key]=S.value:S!=null&&S.children&&S.children.length>0&&(w.children=S.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"add"})}f.value="",D.value=[],C.value=[]},K=()=>{d.value=!1,f.value="",u.value="",D.value=[],C.value=[]},le=w=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",w),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(w,R)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(B,S)=>(e.openBlock(),e.createElementBlock("div",ci,[e.createElementVNode("div",ui,[e.createElementVNode("div",di,e.toDisplayString(B.label),1),e.createElementVNode("div",pi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>L(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>V(B)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:ye=>le(B)},null,8,["onClick"])])]),B!=null&&B.children&&B.children.length>0?(e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(Cr,{tableChildContents:B==null?void 0:B.children,onDeleteChange:Y,onFixChange:F},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Zt.ssDialog,{visible:d.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",vi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:we},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:q},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gi=Kt._export_sfc(hi,[["__scopeId","data-v-e0fef72d"]]),mi={class:"table-header-child"},yi={class:"table-header-child-main"},bi={class:"table-header-child-content"},ki={class:"table-header-child-content-item"},xi={class:"fix-button"},wi={key:0},Di={class:"form-content"},Ci={class:"dialog-footer"},_i={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref(""),k=Be.useTableComp(v.pinia),{tableIndex:g}=v.storeToRefs(k),f=e.ref(""),D=e.ref([]),C=e.ref([]),V=w=>{r("fixChange",v.cloneDeep(w))},F=w=>{var y;d.value=!0;let R=[];At==null||At.forEach(B=>{let S=v.cloneDeep(g.value)+1;k.setTableIndex(S),R.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:w[B.key],id:g.value,contents:B==null?void 0:B.options})}),w!=null&&w.children&&((y=w==null?void 0:w.children)==null?void 0:y.length)>0&&R.push({children:w==null?void 0:w.children,isFormColHidden:!0}),f.value=w==null?void 0:w.id,D.value=R,C.value=R},Y=w=>{d.value=!0;let R=[];At==null||At.forEach(y=>{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),R.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:"",id:g.value,contents:y==null?void 0:y.options})}),u.value=w==null?void 0:w.id,D.value=R,C.value=R},L=w=>{let R=v.cloneDeep(C.value);R=R==null?void 0:R.map(y=>(y.children||(y.value=w==null?void 0:w[y.name]),y)),C.value=R},we=()=>{var R,y;D.value=C.value;let w={};if(f.value!=="")w.id=f.value,(R=D.value)==null||R.forEach(B=>{const S=At==null?void 0:At.find(ye=>(ye==null?void 0:ye.label)===(B==null?void 0:B.label));S?w[S.key]=B.value:B!=null&&B.children&&B.children.length>0&&(w.children=B.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"fix"});else{let B=v.cloneDeep(g.value)+1;k.setTableIndex(B),w.id="idChild"+g.value,(y=D.value)==null||y.forEach(S=>{const ye=At==null?void 0:At.find(Ze=>(Ze==null?void 0:Ze.label)===(S==null?void 0:S.label));ye?w[ye.key]=S.value:S!=null&&S.children&&S.children.length>0&&(w.children=S.children)}),d.value=!1,r("fixChange",{contents:v.cloneDeep(w),id:u.value,type:"add"})}f.value="",D.value=[],C.value=[]},q=()=>{d.value=!1,f.value="",u.value="",D.value=[],C.value=[]},K=w=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{r("deleteChange",w),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},le=w=>{r("deleteChange",w)};return(w,R)=>{const y=e.resolveComponent("svg-icon"),B=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s==null?void 0:s.tableChildContents,(S,ye)=>(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",bi,[e.createElementVNode("div",ki,e.toDisplayString(S.label),1),e.createElementVNode("div",xi,[e.createVNode(y,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>Y(S)},null,8,["onClick"]),e.createVNode(y,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>F(S)},null,8,["onClick"]),e.createVNode(y,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:Ze=>K(S)},null,8,["onClick"])])]),S!=null&&S.children&&S.children.length>0?(e.openBlock(),e.createElementBlock("div",wi,[e.createVNode(gi,{tableChildContents:S==null?void 0:S.children,onDeleteChange:le,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(Zt.ssDialog,{visible:d.value,onBeforeDestroy:q,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Di,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:L},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ci,[e.createVNode(B,{onClick:q,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(B,{class:"ok-button button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},Cr=Kt._export_sfc(_i,[["__scopeId","data-v-ebd68fa1"]]),Ei={class:"table-operate-content"},Si={class:"table-operate-item"},Ti={class:"operate-title"},Ii={class:"operate-content"},Bi={class:"fix-content"},Ni={class:"fix-content-label"},Ai={class:"fix-button"},Vi={key:0},Oi={class:"operate-title"},Mi={class:"operate-content"},Li={class:"fix-content"},zi={class:"fix-content-label"},Fi={class:"fix-button"},Ri={class:"operate-title"},Pi={class:"operate-content"},$i={class:"fix-content"},Ki={class:"fix-content-label"},ji={class:"fix-button"},Ui={class:"operate-title"},Wi={class:"operate-content"},Hi={class:"fix-content"},qi={class:"fix-content-label"},Gi={class:"fix-button"},Xi={class:"operate-content"},Yi={style:{display:"flex","justify-content":"space-between"}},Ji={class:"form-content"},Zi={class:"dialog-footer"},Qi={class:"form-content"},es={class:"dialog-footer"},ts={class:"form-content"},as={class:"dialog-footer"},ns={class:"form-content"},os={class:"dialog-footer"},rs={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),k=e.ref(!1),g=e.ref([]),f=e.ref(!1),D=e.ref([]),C=e.ref(!1),V=e.ref([]),F=e.ref(""),Y=e.ref(""),L=e.ref([]),we=e.ref([]),q=e.ref([]),K=e.ref([]),le=e.ref(!1),w=e.ref([]),R=e.ref([]),y=e.ref(0),B=e.ref([]),S=e.ref([]),ye=e.ref([]),Ze=()=>{le.value=!0;let h=[];Ca==null||Ca.forEach(_=>{y.value++,h.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:(_==null?void 0:_.key)==="background"?"var(--ssComponent-primary-color)":"",id:y.value,contents:_==null?void 0:_.options})}),w.value=h,R.value=h},rt=()=>{var _,I,W;k.value=!0;let h=[];(W=(I=(_=Be.FormContent)==null?void 0:_.find(x=>(x==null?void 0:x.key)==="Input"))==null?void 0:I.value)==null||W.forEach(x=>{y.value++,h.push({label:x==null?void 0:x.label,name:(x==null?void 0:x.name)||(x==null?void 0:x.label),type:x.type,value:(x==null?void 0:x.label)==="类型"?"Input":"",id:y.value,contents:x==null?void 0:x.options})}),B.value=h,S.value=h},Ae=h=>{h||(B.value=S.value)},je=async h=>{var _,I,W,x,ie,_e,E,te,$,P,Ee,ne;if((h==null?void 0:h.类型)!==((I=(_=S.value)==null?void 0:_.find(H=>(H==null?void 0:H.label)==="类型"))==null?void 0:I.value)){let H=[],Q=await((ie=(x=(W=Be.FormContent)==null?void 0:W.find(de=>(de==null?void 0:de.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:x.value)==null?void 0:ie.value)?await((P=($=(te=Be.FormContent)==null?void 0:te.find(de=>(de==null?void 0:de.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:$.value)==null?void 0:P.value):(E=(_e=Be.FormContent)==null?void 0:_e.find(de=>(de==null?void 0:de.key)===((h==null?void 0:h.类型)===""?"Input":h==null?void 0:h.类型)))==null?void 0:E.value;if(Q==null||Q.forEach(de=>{y.value++,H.push({label:de==null?void 0:de.label,name:(de==null?void 0:de.name)||(de==null?void 0:de.label),type:de.type,value:de!=null&&de.属性名?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):(h==null?void 0:h[de.label])??"",id:y.value,contents:de==null?void 0:de.options,prop:(de==null?void 0:de.prop)||(de==null?void 0:de.name)||(de==null?void 0:de.label)})}),h!=null&&h.菜单选项&&((Ee=h==null?void 0:h.菜单选项)==null?void 0:Ee.length)>0){const de=await Be.menuToContentType(h==null?void 0:h.菜单选项);H=H==null?void 0:H.map(De=>((De==null?void 0:De.name)==="组信息选项"&&(De.contents=de),De))}S.value=await Be.selectToBase(v.cloneDeep(H)),B.value=await Be.selectToBase(v.cloneDeep(H))}else{let H=v.cloneDeep(B.value);if(H=H==null?void 0:H.map(Q=>(Q.value=h==null?void 0:h[Q.name],Q)),h!=null&&h.菜单选项&&((ne=h==null?void 0:h.菜单选项)==null?void 0:ne.length)>0){const Q=await Be.menuToContentType(h==null?void 0:h.菜单选项);H=H==null?void 0:H.map(de=>((de==null?void 0:de.name)==="组信息选项"&&(de.contents=Q),de))}H=Be.formToOptionsContents(H),S.value=await Be.selectToBase(v.cloneDeep(H))}},Ie=async h=>{await je(h),B.value=S.value},O=(h,_)=>{if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="selectRelateType"){const I=_==null?void 0:_.optionUrl;return(I==null?void 0:I.selectRelateType)||_[h.key]}if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="menuSelect"){const I=_==null?void 0:_.optionUrl;return(I==null?void 0:I.menuSelect)||_[h.key]}if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="groupSelect"){const I=_==null?void 0:_.optionUrl;return(I==null?void 0:I.groupSelect)||_[h.key]}if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="originalContent")return(_==null?void 0:_.value)||_[h.key];if((_==null?void 0:_.type)=="Select"&&(h==null?void 0:h.key)==="multiple"){const I=_[h.key];return mr(I)?I:h.default}return(h==null?void 0:h.label)==="类型"&&_[h.key]===""?"Input":(h==null?void 0:h.key)==="isFormColHidden"&&!_[h.key]?!1:_[h.key]},ee=async h=>{var W,x,ie,_e,E,te,$,P,Ee;k.value=!0;let _=[];const I=await((ie=(x=(W=Be.FormContent)==null?void 0:W.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:x.value)==null?void 0:ie.value)?await((P=($=(te=Be.FormContent)==null?void 0:te.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:$.value)==null?void 0:P.value):(E=(_e=Be.FormContent)==null?void 0:_e.find(ne=>(ne==null?void 0:ne.key)===((h==null?void 0:h.type)===""?"Input":h==null?void 0:h.type)))==null?void 0:E.value;if(I==null||I.forEach(ne=>{y.value++,_.push({label:ne==null?void 0:ne.label,name:(ne==null?void 0:ne.name)||(ne==null?void 0:ne.label),type:ne.type,value:(ne==null?void 0:ne.label)==="属性名"?(h==null?void 0:h.prop)||(h==null?void 0:h.name)||(h==null?void 0:h.label):O(ne,h),id:y.value,contents:ne==null?void 0:ne.options})}),h!=null&&h.menuSelect&&((Ee=h==null?void 0:h.menuSelect)==null?void 0:Ee.length)>0){const ne=await Be.menuToContentType(h==null?void 0:h.menuSelect);_=_==null?void 0:_.map(H=>((H==null?void 0:H.name)==="组信息选项"&&(H.contents=ne),H))}F.value=h==null?void 0:h.id,B.value=await Be.selectToBase(Be.formToOptionsContents(_)),S.value=await Be.selectToBase(Be.formToOptionsContents(_))},se=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;ye.value=(_=v.cloneDeep(ye.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="tableToForm"&&(W.contents=ye.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},he=()=>{k.value=!1,B.value=[],F.value=""},Ge=async()=>{var W,x,ie,_e,E,te,$,P,Ee,ne;B.value=S.value;let h={};F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value);let _=await((ie=(x=(W=Be.FormContent)==null?void 0:W.find(H=>{var Q,de;return(H==null?void 0:H.key)===(((de=(Q=B.value)==null?void 0:Q.find(De=>(De==null?void 0:De.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:x.value)==null?void 0:ie.value)??((E=(_e=Be.FormContent)==null?void 0:_e.find(H=>{var Q,de;return(H==null?void 0:H.key)===(((de=(Q=B.value)==null?void 0:Q.find(De=>(De==null?void 0:De.label)==="类型"))==null?void 0:de.value)??"label")}))==null?void 0:E.value);if((te=B.value)==null||te.forEach(H=>{const Q=_==null?void 0:_.find(de=>(de==null?void 0:de.label)===(H==null?void 0:H.label));Q&&(h[Q.key]=H.value)}),h.name=h.label,($=ye.value)!=null&&$.find(H=>H.id===h.id))ye.value=(P=ye.value)==null?void 0:P.map(H=>(H.id===h.id&&(H=h),H));else{let H=v.cloneDeep(ye.value);ye.value||(ye.value=[]),H.push(h),ye.value=H}ye.value=ye.value.map(({id:H,...Q})=>Q),k.value=!1,F.value="";let I=v.cloneDeep(s.originalItemContents);(Ee=v.cloneDeep(s.originalItemContents))!=null&&Ee.find(H=>(H==null?void 0:H.key)==="tableToForm")?I=(ne=v.cloneDeep(s.originalItemContents))==null?void 0:ne.map(H=>((H==null?void 0:H.key)==="tableToForm"&&(H.contents=ye.value),H)):I.push({key:"tableToForm",contents:ye.value}),r("change",I)},it=h=>{le.value=!0;let _=[];Ca==null||Ca.forEach(I=>{y.value++,_.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),F.value=h==null?void 0:h.id,w.value=_,R.value=_};e.watch(()=>C.value,()=>{var _,I;let h=v.cloneDeep(s.originalItemContents);(_=v.cloneDeep(s.originalItemContents))!=null&&_.find(W=>(W==null?void 0:W.key)==="page")?h=(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="page"&&(W.contents=C.value),W)):h.push({key:"page",contents:C.value}),r("change",h)},{deep:!0});const J=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;we.value=(_=v.cloneDeep(we.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="extraButton"&&(W.contents=we.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},M=()=>{var I,W,x,ie,_e;w.value=R.value;let h={};if(F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value),(I=w.value)==null||I.forEach(E=>{const te=Ca==null?void 0:Ca.find($=>($==null?void 0:$.label)===(E==null?void 0:E.label));te?h[te.key]=E.value:E!=null&&E.children&&E.children.length>0&&(h.children=E.children)}),(W=we.value)!=null&&W.find(E=>E.id===h.id))we.value=(x=we.value)==null?void 0:x.map(E=>(E.id===h.id&&(E=h),E));else{let E=v.cloneDeep(we.value)??[];E.push(h),we.value=E}le.value=!1,F.value="";let _=v.cloneDeep(s.originalItemContents);(ie=v.cloneDeep(s.originalItemContents))!=null&&ie.find(E=>(E==null?void 0:E.key)==="extraButton")?_=(_e=v.cloneDeep(s.originalItemContents))==null?void 0:_e.map(E=>((E==null?void 0:E.key)==="extraButton"&&(E.contents=we.value),E)):_.push({key:"extraButton",contents:we.value}),r("change",_)},xe=h=>{let _=v.cloneDeep(R.value);_=_==null?void 0:_.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),R.value=_},Ce=()=>{le.value=!1,w.value=[],F.value=""},Pe=h=>{f.value=!0;let _=[];_a==null||_a.forEach(I=>{y.value++,_.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:h[I.key],id:y.value,contents:I==null?void 0:I.options})}),F.value=h==null?void 0:h.id,q.value=_,K.value=_},Fe=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;L.value=(_=v.cloneDeep(L.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>((W==null?void 0:W.key)==="rowButton"&&(W.contents=L.value),W))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},qe=()=>{u.value=!0;let h=[];At==null||At.forEach(_=>{y.value++,h.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:y.value,contents:_==null?void 0:_.options})}),D.value=h,V.value=h},Xe=()=>{f.value=!0;let h=[];_a==null||_a.forEach(_=>{y.value++,h.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:"",id:y.value,contents:_==null?void 0:_.options})}),q.value=h,K.value=h},fe=h=>{let _=v.cloneDeep(K.value);_=_==null?void 0:_.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),K.value=_},z=()=>{var I,W,x,ie,_e;q.value=K.value;let h={};if(F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value),(I=q.value)==null||I.forEach(E=>{const te=_a==null?void 0:_a.find($=>($==null?void 0:$.label)===(E==null?void 0:E.label));te?h[te.key]=E.value:E!=null&&E.children&&E.children.length>0&&(h.children=E.children)}),(W=L.value)!=null&&W.find(E=>E.id===h.id))L.value=(x=L.value)==null?void 0:x.map(E=>(E.id===h.id&&(E=h),E));else{let E=v.cloneDeep(L.value);E.push(h),L.value=E}f.value=!1,F.value="";let _=v.cloneDeep(s.originalItemContents);(ie=v.cloneDeep(s.originalItemContents))!=null&&ie.find(E=>(E==null?void 0:E.key)==="rowButton")?_=(_e=v.cloneDeep(s.originalItemContents))==null?void 0:_e.map(E=>((E==null?void 0:E.key)==="rowButton"&&(E.contents=L.value),E)):_.push({key:"rowButton",contents:L.value}),r("change",_)},X=()=>{f.value=!1,F.value="",K.value=[],q.value=[]},pe=h=>{u.value=!0;let _=[];At==null||At.forEach(I=>{y.value++,_.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:"",id:y.value,contents:I==null?void 0:I.options})}),D.value=_,Y.value=h==null?void 0:h.id,V.value=_},ce=h=>{var _;g.value=kr(v.cloneDeep(g.value),h==null?void 0:h.id),r("change",(_=v.cloneDeep(s.originalItemContents))==null?void 0:_.map(I=>{var W;return(I==null?void 0:I.key)==="header"&&(I.contents=(W=g.value)!=null&&W.some(x=>x==null?void 0:x.children)?[g.value]:g.value),I}))},G=h=>{var I,W,x;h.type==="fix"?h.id!==""?g.value=wr(g.value,h):g.value=xr(g.value,h==null?void 0:h.contents):g.value=Dr(g.value,h),g.value=(I=g.value)!=null&&I.some(ie=>ie==null?void 0:ie.children)?[g.value]:g.value,F.value="";let _=v.cloneDeep(s.originalItemContents);(W=v.cloneDeep(s.originalItemContents))!=null&&W.find(ie=>(ie==null?void 0:ie.key)==="header")?_=(x=v.cloneDeep(s.originalItemContents))==null?void 0:x.map(ie=>((ie==null?void 0:ie.key)==="header"&&(ie.contents=g.value),ie)):_.push({key:"header",contents:g.value}),r("change",_)},ae=h=>{var I;u.value=!0;let _=[];At==null||At.forEach(W=>{y.value++,_.push({label:W==null?void 0:W.label,name:W==null?void 0:W.label,type:W.type,value:h[W.key],id:y.value,contents:W==null?void 0:W.options})}),h!=null&&h.children&&((I=h==null?void 0:h.children)==null?void 0:I.length)>0&&_.push({children:h==null?void 0:h.children,isFormColHidden:!0}),F.value=h==null?void 0:h.id,Y.value="",D.value=_,V.value=_},Z=h=>{let _=v.cloneDeep(V.value);_=_==null?void 0:_.map(I=>(I.children||(I.value=h==null?void 0:h[I.name]),I)),V.value=_},re=()=>{u.value=!1,F.value="",Y.value="",V.value=[]},Re=()=>{var I,W,x,ie,_e,E;D.value=V.value;let h={};if(F.value!==""?h.id=F.value:(y.value++,h.id="id"+y.value),(I=D.value)==null||I.forEach(te=>{const $=At==null?void 0:At.find(P=>(P==null?void 0:P.label)===(te==null?void 0:te.label));$?h[$.key]=te.value:te!=null&&te.children&&te.children.length>0&&(h.children=te.children)}),(W=g.value)!=null&&W.find(te=>te.id===h.id))g.value=(x=g.value)==null?void 0:x.map(te=>(te.id===h.id&&(te=h),te));else{let te=v.cloneDeep(g.value)??[];Y.value===""?te.push(h):te=te==null?void 0:te.map($=>($.id===Y.value&&($.children||($.children=[]),$.children.push(h)),$)),g.value=te}g.value=(ie=g.value)!=null&&ie.some(te=>te==null?void 0:te.children)?[g.value]:g.value,u.value=!1,F.value="",Y.value="";let _=v.cloneDeep(s.originalItemContents);(_e=v.cloneDeep(s.originalItemContents))!=null&&_e.find(te=>(te==null?void 0:te.key)==="header")?_=(E=v.cloneDeep(s.originalItemContents))==null?void 0:E.map(te=>((te==null?void 0:te.key)==="header"&&(te.contents=g.value),te)):_.push({key:"header",contents:g.value}),r("change",_)},lt=h=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var _,I;g.value=(_=v.cloneDeep(g.value))==null?void 0:_.filter(W=>(W==null?void 0:W.id)!==(h==null?void 0:h.id)),r("change",(I=v.cloneDeep(s.originalItemContents))==null?void 0:I.map(W=>{var x;return(W==null?void 0:W.key)==="header"&&(W.contents=(x=g.value)!=null&&x.some(ie=>ie==null?void 0:ie.children)?[g.value]:g.value),W})),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>s.originalItemContents,()=>{var h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke;if(!(!s.originalItemContents||s.originalItemContents.length===0))if(d.value=v.cloneDeep(s.originalItemContents),g.value=(_=(h=d.value)==null?void 0:h.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:_.contents,L.value=(W=(I=d.value)==null?void 0:I.find(j=>(j==null?void 0:j.key)==="rowButton"))==null?void 0:W.contents,we.value=(ie=(x=d.value)==null?void 0:x.find(j=>(j==null?void 0:j.key)==="extraButton"))==null?void 0:ie.contents,C.value=(E=(_e=d.value)==null?void 0:_e.find(j=>(j==null?void 0:j.key)==="page"))!=null&&E.contents?!!(($=(te=d.value)==null?void 0:te.find(j=>(j==null?void 0:j.key)==="page"))!=null&&$.contents):!1,ye.value=(Ee=(P=d.value)==null?void 0:P.find(j=>(j==null?void 0:j.key)==="tableToForm"))==null?void 0:Ee.contents,g.value=(ne=g.value)==null?void 0:ne.map((j,Ne)=>(Array.isArray(j)?j=ri(j):j={label:(j==null?void 0:j.label)??"",prop:(j==null?void 0:j.label)==="操作"?"operate":j==null?void 0:j.prop,width:j!=null&&j.width?parseInt(j.width):"",fixed:(j==null?void 0:j.fixed)??void 0,sortable:(j==null?void 0:j.sortable)??!1,align:(j==null?void 0:j.align)??"left",showOverflowTooltip:(j==null?void 0:j.showOverflowTooltip)??!0,isNotDrag:(j==null?void 0:j.isNotDrag)??!1,isEditCol:(j==null?void 0:j.isEditCol)??!1,isOperate:(j==null?void 0:j.isOperate)??!1,id:(j==null?void 0:j.id)??Ne,formMenuSelect:(j==null?void 0:j.formMenuSelect)??void 0,groupSelect:(j==null?void 0:j.groupSelect)??void 0},j)),g.value=(H=g.value)!=null&&H.every(j=>Array.isArray(j))?(Q=g.value)==null?void 0:Q[0]:g.value,L.value=(de=L.value)==null?void 0:de.map((j,Ne)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",textColor:(j==null?void 0:j.textColor)??"#000000",id:(j==null?void 0:j.id)??Ne}),we.value=(De=we.value)==null?void 0:De.map((j,Ne)=>j={label:(j==null?void 0:j.label)??"",type:(j==null?void 0:j.type)??"",background:(j==null?void 0:j.background)??"var(--ssComponent-primary-color)",id:(j==null?void 0:j.id)??Ne}),ye.value)ye.value=(ke=ye.value)==null?void 0:ke.map(j=>{y.value++;let Ne=j;return Ne.id=y.value,Ne});else{let j=[];const Ne=(be=Be.getColumnChild(v.cloneDeep(g.value)))==null?void 0:be.filter(ge=>(ge==null?void 0:ge.prop)!=="operate");Ne==null||Ne.forEach(ge=>{var Le;y.value++,j.push({label:ge==null?void 0:ge.label,name:(ge==null?void 0:ge.prop)||(ge==null?void 0:ge.label),type:ge!=null&&ge.groupSelect?"Select":"Input",value:"",id:y.value,contents:ge==null?void 0:ge.options,menuSelect:ge==null?void 0:ge.formMenuSelect,groupSelect:(Le=ge==null?void 0:ge.groupSelect)==null?void 0:Le.split(":"),selectRelateType:"关联绑定列"})}),ye.value=j}},{deep:!0,immediate:!0}),(h,_)=>{const I=e.resolveComponent("svg-icon"),W=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ei,[e.createElementVNode("div",Si,[e.createElementVNode("div",Ti,[_[2]||(_[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createVNode(W,{class:"icon-content",onClick:qe,id:"themeButton"},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[1]||(_[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ii,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",Bi,[e.createElementVNode("div",Ni,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Ai,[e.createVNode(I,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>pe(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>ae(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>lt(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",Vi,[e.createVNode(Cr,{tableChildContents:x==null?void 0:x.children,onDeleteChange:ce,onFixChange:G},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Oi,[_[4]||(_[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Xe},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[3]||(_[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",Li,[e.createElementVNode("div",zi,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Fi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:_e=>Pe(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>Fe(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ri,[_[6]||(_[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:Ze},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[5]||(_[5]=e.createTextVNode(" 新增 "))]),_:1,__:[5]})]),e.createElementVNode("div",Pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(we.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",$i,[e.createElementVNode("div",Ki,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",ji,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:_e=>it(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>J(x)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Ui,[_[8]||(_[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createVNode(W,{class:"icon-content",id:"themeButton",onClick:rt},{icon:e.withCtx(()=>[e.createVNode(I,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[_[7]||(_[7]=e.createTextVNode(" 新增 "))]),_:1,__:[7]})]),e.createElementVNode("div",Wi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ye.value,(x,ie)=>(e.openBlock(),e.createElementBlock("div",{key:ie},[e.createElementVNode("div",Hi,[e.createElementVNode("div",qi,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",Gi,[e.createVNode(I,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:_e=>ee(x)},null,8,["onClick"]),e.createVNode(I,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_e=>se(x)},null,8,["onClick"])])])]))),128))]),_[10]||(_[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",Xi,[e.createElementVNode("div",Yi,[_[9]||(_[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:C.value,"onUpdate:modelValue":_[0]||(_[0]=x=>C.value=x)},null,8,["modelValue"])])])]),e.createVNode(Zt.ssDialog,{visible:u.value,onBeforeDestroy:re,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ji,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:D.value,key:D.value,isEnableWrap:!0,onChange:Z},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Zi,[e.createVNode(W,{onClick:re,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[11]||(_[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(W,{class:"ok-button button",onClick:Re,id:"themeButton"},{default:e.withCtx(()=>_[12]||(_[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:f.value,onBeforeDestroy:X,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Qi,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:q.value,key:q.value,isEnableWrap:!0,onChange:fe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",es,[e.createVNode(W,{onClick:X,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[13]||(_[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(W,{class:"ok-button button",onClick:z,id:"themeButton"},{default:e.withCtx(()=>_[14]||(_[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:le.value,onBeforeDestroy:Ce,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ts,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:xe},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",as,[e.createVNode(W,{onClick:Ce,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[15]||(_[15]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[15]}),e.createVNode(W,{class:"ok-button button",onClick:M,id:"themeButton"},{default:e.withCtx(()=>_[16]||(_[16]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:k.value,onBeforeDestroy:he,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",ns,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:je,onChangeVisible:Ae,onBlurChange:Ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",os,[e.createVNode(W,{onClick:he,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>_[17]||(_[17]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[17]}),e.createVNode(W,{class:"ok-button button",onClick:Ge,id:"themeButton"},{default:e.withCtx(()=>_[18]||(_[18]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},ls=Kt._export_sfc(rs,[["__scopeId","data-v-7a6b87b5"]]),is=Ut.useModelComp(v.pinia),{pageMapState:ss}=v.storeToRefs(is),cs=Ut.useMenuState(v.pinia),{activeMenuPath:us}=v.storeToRefs(cs),ds=e.ref(24),ps=e.ref(6),fs=e.ref(70),vs=e.ref(.18),hs=e.ref(45),gs=(n,i,s,r)=>{var d,u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w;return{x:((u=(d=n==null?void 0:n.value)==null?void 0:d.tableData)==null?void 0:u.x)||i%2*12,y:((g=(k=n==null?void 0:n.value)==null?void 0:k.tableData)==null?void 0:g.y)||i,w:((D=(f=n==null?void 0:n.value)==null?void 0:f.tableData)==null?void 0:D.w)||ds.value,h:((V=(C=n==null?void 0:n.value)==null?void 0:C.tableData)==null?void 0:V.h)||s,minW:((Y=(F=n==null?void 0:n.value)==null?void 0:F.tableData)==null?void 0:Y.minW)||ps.value,minH:((we=(L=n==null?void 0:n.value)==null?void 0:L.tableData)==null?void 0:we.minH)||vs.value,maxH:((K=(q=n==null?void 0:n.value)==null?void 0:q.tableData)==null?void 0:K.maxH)||hs.value,i:((w=(le=n==null?void 0:n.value)==null?void 0:le.tableData)==null?void 0:w.i)||i,id:(n==null?void 0:n.id)||i+"",component:r}},ms=(n,i)=>{var r,d,u,k,g,f,D,C;let s=1;if(n!=null&&n.compData&&Array.isArray(n==null?void 0:n.compData))if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){if(((k=(u=(d=n==null?void 0:n.compData)==null?void 0:d.find(F=>(F==null?void 0:F.key)==="tableContents"))==null?void 0:u.contents)==null?void 0:k.length)===0)return 2}else((g=n==null?void 0:n.comp)==null?void 0:g.toUpperCase())==="FORM"&&(s=((C=(D=(f=n==null?void 0:n.compData)==null?void 0:f.find(F=>(F==null?void 0:F.key)==="formContent"))==null?void 0:D.contents)==null?void 0:C.length)/5);return s*2},_r=(n,i,s)=>{var k,g;const r=(g=(k=ss.value)==null?void 0:k[us.value])==null?void 0:g.filter(f=>{var D;return((D=f==null?void 0:f.key)==null?void 0:D.type)==="gridLayout"}),d=r==null?void 0:r.find(f=>{var D,C,V;return((V=(C=(D=f==null?void 0:f.value)==null?void 0:D.tableData)==null?void 0:C.component)==null?void 0:V.id)===n.id}),u=ms(n);return n!=null&&n.children&&(n==null?void 0:n.children.length)>0&&(n.children=n.children.map((f,D)=>_r(f,D))),{...gs(d,i,u,n)}},ys=(n,i)=>{if((n==null?void 0:n.length)===0)return[];const s=v.cloneDeep(n);return Array.isArray(n)?s==null?void 0:s.map((r,d)=>_r(r,d)):[]},bs=n=>({TABLE:{overall:[{label:"栅格布局",prop:"isGridLayout",type:"switch",value:!1,disabled:!1,activeText:"启用",inactiveText:"默认"},{label:"界面布局",prop:"layout",type:"radio",value:"vertical",options:[{label:"垂直",value:"vertical"},{label:"水平",value:"horizontal"}]},{label:"流程式布局",prop:"isStepLayout",type:"radio",value:!1,options:[{label:"启用",value:!0,disabled:!1},{label:"禁用",value:!1,disabled:!1}]}],alone:[{label:"默认显示序号",prop:"showIndex",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]},{label:"浏览视图配置",prop:"viewport",type:"checkbox",value:["read"],options:[{label:"只读视图",value:"read"},{label:"编辑视图",value:"edit"}]},{label:"是否选择迁移",prop:"allowMove",type:"radio",value:!1,options:[{label:"是",value:!0},{label:"否",value:!1}]}]}}),ks=(n,i)=>n==null?void 0:n.map(s=>{for(const r in i)if(r===(s==null?void 0:s.prop))return{...s,value:i[r]};return s}),xs=e.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]);e.watch(()=>s.compType,g=>{var C;const f=bs(s==null?void 0:s.optionItems),D=g?(C=f[g==null?void 0:g.toUpperCase()])==null?void 0:C[s==null?void 0:s.target]:[];d.value=D==null?void 0:D.map(V=>{for(const[F,Y]of Object.entries((s==null?void 0:s.comp)||{}))if((V==null?void 0:V.prop)===F)return{...V,value:Y};return V})},{immediate:!0});const u=g=>Bt.getComponent(g),k=g=>{var f,D;(g==null?void 0:g.prop)==="layout"&&(g==null?void 0:g.value)==="horizontal"?d.value=(f=d.value)==null?void 0:f.map(C=>{var V;return(C==null?void 0:C.prop)==="isStepLayout"?{...C,options:(V=C==null?void 0:C.options)==null?void 0:V.map(F=>({...F,disabled:!0}))}:(C==null?void 0:C.prop)==="isGridLayout"?{...C,disabled:!0}:C}):d.value=(D=d.value)==null?void 0:D.map(C=>{var V;return(C==null?void 0:C.prop)==="isStepLayout"?{...C,options:(V=C==null?void 0:C.options)==null?void 0:V.map(F=>({...F,disabled:!1}))}:(C==null?void 0:C.prop)==="isGridLayout"?{...C,disabled:!1}:C}),r("change",{target:s==null?void 0:s.target,styleConfigs:d.value,prop:g==null?void 0:g.prop})};return(g,f)=>{const D=e.resolveComponent("el-col"),C=e.resolveComponent("el-row");return e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,V=>(e.openBlock(),e.createBlock(C,{class:"style-row",key:V==null?void 0:V.prop},{default:e.withCtx(()=>[e.createVNode(D,{span:6,class:"style-row-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(V==null?void 0:V.label)+":",1)]),_:2},1024),e.createVNode(D,{span:18,style:{display:"flex"}},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(V.type)),{modelValue:V.value,"onUpdate:modelValue":F=>V.value=F,content:V==null?void 0:V.options,optionUrl:V==null?void 0:V.optionUrl,disabled:V==null?void 0:V.disabled,activeText:V==null?void 0:V.activeText,inactiveText:V==null?void 0:V.inactiveText,onChange:F=>k(V)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),ws=Kt._export_sfc(xs,[["__scopeId","data-v-6c233914"]]),Ds=e.defineComponent({__name:"index",props:{compType:String,activeTabName:String,comp:Object,extendItem:{type:Object,default:{}},target:{type:String,default:"alone"},relatedData:Array},emits:["change","onButtonClick"],setup(n,{emit:i}){const s=n,r=i,d=[{required:!0,message:"输入不能为空",trigger:"blur"}],u=e.ref([]),k=K=>K==null?void 0:K.reduce((le,w)=>(le[w==null?void 0:w.prop]=w==null?void 0:w.rule,le),{}),g=e.computed(()=>({formRules:k(u.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),f=e.ref([]),D=e.ref(""),C=(K,le,w)=>{var B;let R=[];(s==null?void 0:s.activeTabName)==="任务配置"?(R=[{label:"任务名称",prop:"任务名称",key:"任务名称",value:"",width:1,isFormColHidden:!1},{label:"任务关键词",prop:"任务关键词",key:"任务关键词",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"列名称",value:"列名称",children:K},{label:"按钮名称",value:"按钮名称",children:le}]},{label:"执行任务",prop:"执行任务",key:"执行任务",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"进度设置",value:"进度设置",children:[{label:"计时",value:"计时",children:[{label:"倒计时",value:"倒计时"},{label:"进行时",value:"进行时"}]},{label:"进度条",value:"进度条"}]},{label:"统计",value:"统计",children:[{label:"统计规则",value:"统计规则",children:[{label:"求和",value:"求和"},{label:"自定义",value:"自定义"}]}]}]},{label:"执行动作",prop:"执行动作",key:"执行动作",type:"select",value:[],width:1,isFormColHidden:!1,contents:[{label:"点击时",value:"点击时"},{label:"页面加载时",value:"页面加载时"}]},{label:"执行交互",prop:"执行交互",key:"执行交互",type:"cascader",value:[],width:1,isFormColHidden:!1,config:{checkOnClickNode:!0,showPrefix:!1},contents:[{label:"界面显示",value:"界面显示",children:[{label:"主页",value:"主页"},{label:"详情页",value:"详情页"}]},{label:"弹窗提示",value:"弹窗提示"},{label:"后台提交",value:"后台提交"}]},{label:"任务状态",prop:"任务状态",key:"任务状态",type:"radio",value:"启动",width:1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"任务名称",rule:d},{prop:"任务关键词",rule:d},{prop:"执行任务",rule:d},{prop:"执行动作",rule:d},{prop:"执行交互",rule:d}]):(s==null?void 0:s.activeTabName)==="任务关联"&&(R=[{prop:"关联名称",label:"关联名称",key:"关联名称",type:"input",value:"",isTableColHidden:!1,isFormColHidden:!1},{label:"关联形式",prop:"关联形式",key:"关联形式",type:"select",value:"流程式",width:1,isFormColHidden:!1,contents:[{label:"流程式",value:"流程式"}]},{label:"关联任务集合",prop:"关联任务集合",key:"关联任务集合",type:"tag",value:[],width:1,isFormColHidden:!1,contents:(B=s==null?void 0:s.relatedData)==null?void 0:B.map(S=>({label:S==null?void 0:S.任务名称,value:S==null?void 0:S.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],u.value=[{prop:"关联名称",rule:d},{prop:"关联状态",rule:d},{prop:"关联形式",rule:d},{prop:"关联任务集合",rule:d}]);let y;return w&&(w==null?void 0:w.length)>0?y=[...R,...V(K,le,w)]:y=R,y},V=(K,le,w)=>{const R=[{label:"进度关键词",prop:"进度关键词",key:"进度关键词",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计算法源",prop:"统计算法源",key:"统计算法源",type:"input",value:"",width:2,isFormColHidden:!1,contents:[]},{label:"统计是否获取错误集",prop:"统计是否获取错误集",key:"统计是否获取错误集",type:"radio",value:!1,width:2,isFormColHidden:!1,contents:[{label:"是",value:!0},{label:"否",value:!1}]}];return w?R==null?void 0:R.filter(y=>w==null?void 0:w.includes(y==null?void 0:y.prop)):R},F=(K,le)=>{var S,ye,Ze,rt,Ae,je,Ie,O,ee;const w=((Ae=(rt=(Ze=(ye=(S=s==null?void 0:s.comp)==null?void 0:S.compData)==null?void 0:ye.find(se=>(se==null?void 0:se.key)==="header"))==null?void 0:Ze.contents)==null?void 0:rt.filter(se=>(se==null?void 0:se.label)!=="操作"))==null?void 0:Ae.map(se=>({value:se==null?void 0:se.prop,label:se.label})))||[],R=/button/i,y=((ee=(O=(Ie=(je=s==null?void 0:s.comp)==null?void 0:je.compData)==null?void 0:Ie.filter(se=>R.test(se==null?void 0:se.key)))==null?void 0:O.flatMap(se=>se==null?void 0:se.contents))==null?void 0:ee.map(se=>({value:se==null?void 0:se.label,label:se.label})))||[],B=C(w,y,K);f.value=le?ks(B,le):B,K&&(K==null?void 0:K.length)>0&&u.value.push(...K==null?void 0:K.map(se=>({prop:se,rule:d})))};e.onMounted(()=>{F(null,s==null?void 0:s.extendItem)});const Y=K=>{const le=K==null?void 0:K[D.value];if(D.value==="执行任务"){if(!(le!=null&&le.join("/")))return;const w=le==null?void 0:le.join("/");F(w==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:w==="进度设置/进度条"?["进度关键词"]:null,K)}},L=K=>{r("change",{target:s==null?void 0:s.target,extendConfigs:K})},we=(K,le)=>{D.value=le==null?void 0:le.changeProp,Y(K)},q=K=>{r("onButtonClick",K)};return(K,le)=>(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isStartJustify:!1,isEnableWrap:!1,formRules:g.value.formRules,buttonValue:g.value.buttonValue,onChange:L,onBlurChange:we,onOnButtonClick:q},null,8,["rowContents","formRules","buttonValue"]))}}),Cs=Kt._export_sfc(Ds,[["__scopeId","data-v-7c660c1f"]]),_s={};function Es(n,i){return null}const Ss=Kt._export_sfc(_s,[["render",Es]]),Ts={class:"form-operate-content"},Is={class:"form-operate-item"},Bs={class:"operate-title"},Ns={class:"operate-content"},As={class:"fix-content"},Vs={class:"fix-button"},Os={class:"operate-title"},Ms={class:"operate-content"},Ls={class:"fix-content"},zs={class:"fix-button"},Fs={style:{display:"flex","justify-content":"space-between"}},Rs={class:"form-content"},Ps={class:"dialog-footer"},$s={class:"form-content"},Ks={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(!1),u=e.ref([]),k=e.ref([]),g=e.ref(!1),f=e.ref([]),D=e.ref([]),C=e.ref(""),V=e.ref(!1),F=e.ref(0),Y=e.ref([]),L=e.ref([]),we=(O,ee)=>{if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="selectRelateType"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.selectRelateType)||ee[O.key]}if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="menuSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.menuSelect)||ee[O.key]}if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="groupSelect"){const se=ee==null?void 0:ee.optionUrl;return(se==null?void 0:se.groupSelect)||ee[O.key]}if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="originalContent")return(ee==null?void 0:ee.value)||ee[O.key];if((ee==null?void 0:ee.type)=="Select"&&(O==null?void 0:O.key)==="multiple"){const se=ee[O.key];return mr(se)?se:O.default}return(O==null?void 0:O.label)==="类型"&&ee[O.key]===""?"Input":(O==null?void 0:O.key)==="isFormColHidden"&&!ee[O.key]?!1:ee[O.key]},q=async O=>{var he,Ge,it,J,M,xe;d.value=!0;let ee=[];const se=await((it=(Ge=(he=Be.FormContent)==null?void 0:he.find(Ce=>(Ce==null?void 0:Ce.key)===((O==null?void 0:O.type)===""?"Input":O==null?void 0:O.type)))==null?void 0:Ge.value)==null?void 0:it.value)??((M=(J=Be.FormContent)==null?void 0:J.find(Ce=>(Ce==null?void 0:Ce.key)===((O==null?void 0:O.type)===""?"Input":O==null?void 0:O.type)))==null?void 0:M.value);if(se==null||se.forEach(Ce=>{F.value++,ee.push({label:Ce==null?void 0:Ce.label,name:Ce==null?void 0:Ce.label,type:Ce.type,prop:Ce==null?void 0:Ce.prop,value:we(Ce,O),id:F.value,contents:Ce==null?void 0:Ce.options,width:(O==null?void 0:O.width)??1})}),O!=null&&O.menuSelect&&((xe=O==null?void 0:O.menuSelect)==null?void 0:xe.length)>0){const Ce=await Be.menuToContentType(O==null?void 0:O.menuSelect);ee=ee==null?void 0:ee.map(Pe=>((Pe==null?void 0:Pe.name)==="组信息选项"&&(Pe.contents=Ce),Pe))}C.value=O==null?void 0:O.id,u.value=await Be.selectToBase(Be.formToOptionsContents(ee)),k.value=await Be.selectToBase(Be.formToOptionsContents(ee))},K=O=>{var se;g.value=!0;let ee=[];(se=Be.FormButton)==null||se.forEach(he=>{F.value++,ee.push({label:he==null?void 0:he.label,name:he==null?void 0:he.label,type:he.type,value:(he==null?void 0:he.label)==="类型"&&O[he.key]===""?"normal":O[he.key],id:F.value,contents:he==null?void 0:he.options})}),Y.value=ee,L.value=ee,C.value=O==null?void 0:O.id};e.watch(()=>V.value,()=>{var ee,se;let O=v.cloneDeep(s.originalItemContents);(ee=v.cloneDeep(s.originalItemContents))!=null&&ee.find(he=>(he==null?void 0:he.key)==="enableWrap")?O=(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(he=>((he==null?void 0:he.key)==="enableWrap"&&(he.contents=!V.value),he)):O.push({key:"enableWrap",contents:!V.value}),r("change",O)},{deep:!0});const le=()=>{var se,he,Ge,it,J;Y.value=L.value;let O={};if(C.value!==""?O.id=C.value:(F.value++,O.id="id"+F.value),(se=Y.value)==null||se.forEach(M=>{var Ce;const xe=(Ce=Be.FormButton)==null?void 0:Ce.find(Pe=>(Pe==null?void 0:Pe.label)===(M==null?void 0:M.label));xe&&(O[xe.key]=M.value)}),(he=f.value)!=null&&he.find(M=>M.id===O.id))f.value=(Ge=f.value)==null?void 0:Ge.map(M=>(M.id===O.id&&(M=O),M));else{let M=v.cloneDeep(f.value);f.value||(f.value=[]),M.push(O),f.value=M}g.value=!1,C.value="";let ee=v.cloneDeep(s.originalItemContents);(it=v.cloneDeep(s.originalItemContents))!=null&&it.find(M=>(M==null?void 0:M.key)==="formButton")?ee=(J=v.cloneDeep(s.originalItemContents))==null?void 0:J.map(M=>((M==null?void 0:M.key)==="formButton"&&(M.contents=f.value),M)):ee.push({key:"formButton",contents:f.value}),r("change",ee)},w=O=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;D.value=(ee=v.cloneDeep(D.value))==null?void 0:ee.filter(he=>(he==null?void 0:he.id)!==(O==null?void 0:O.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(he=>((he==null?void 0:he.key)==="formContent"&&(he.contents=D.value),he))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=O=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ee,se;f.value=(ee=v.cloneDeep(f.value))==null?void 0:ee.filter(he=>(he==null?void 0:he.id)!==(O==null?void 0:O.id)),r("change",(se=v.cloneDeep(s.originalItemContents))==null?void 0:se.map(he=>((he==null?void 0:he.key)==="formButton"&&(he.contents=f.value),he))),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},y=()=>{var ee;g.value=!0;let O=[];(ee=Be.FormButton)==null||ee.forEach(se=>{F.value++,O.push({label:se==null?void 0:se.label,name:se==null?void 0:se.label,type:se.type,value:(se==null?void 0:se.label)==="类型"?"normal":"",id:F.value,contents:se==null?void 0:se.options})}),Y.value=O,L.value=O},B=()=>{var ee,se,he;d.value=!0;let O=[];(he=(se=(ee=Be.FormContent)==null?void 0:ee.find(Ge=>(Ge==null?void 0:Ge.key)==="Input"))==null?void 0:se.value)==null||he.forEach(Ge=>{F.value++,O.push({label:Ge==null?void 0:Ge.label,name:Ge==null?void 0:Ge.label,type:Ge.type,value:(Ge==null?void 0:Ge.label)==="类型"?"Input":"",id:F.value,contents:Ge==null?void 0:Ge.options})}),u.value=O,k.value=O},S=O=>{let ee=v.cloneDeep(L.value);ee=ee==null?void 0:ee.map(se=>(se.value=O==null?void 0:O[se.name],se)),L.value=ee},ye=O=>{const ee=O.find(Ge=>(Ge==null?void 0:Ge.name)==="类型");if((ee==null?void 0:ee.value)!="Select")return;const se=O.find(Ge=>(Ge==null?void 0:Ge.name)==="多选"),he=O.find(Ge=>(Ge==null?void 0:Ge.name)==="初始值");se!=null&&se.value&&Bo.isString(he.value)&&(he.value=[he.value]),!(se!=null&&se.value)&&!Bo.isString(he.value)&&(he.value="")},Ze=async O=>{var ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe;if((O==null?void 0:O.类型)!==((se=(ee=k.value)==null?void 0:ee.find(Xe=>(Xe==null?void 0:Xe.label)==="类型"))==null?void 0:se.value)){let Xe=[];const fe=await((it=(Ge=(he=Be.FormContent)==null?void 0:he.find(z=>(z==null?void 0:z.key)===((O==null?void 0:O.类型)===""?"Input":O==null?void 0:O.类型)))==null?void 0:Ge.value)==null?void 0:it.value)?await((Pe=(Ce=(xe=Be.FormContent)==null?void 0:xe.find(z=>(z==null?void 0:z.key)===((O==null?void 0:O.类型)===""?"Input":O==null?void 0:O.类型)))==null?void 0:Ce.value)==null?void 0:Pe.value):(M=(J=Be.FormContent)==null?void 0:J.find(z=>(z==null?void 0:z.key)===((O==null?void 0:O.类型)===""?"Input":O==null?void 0:O.类型)))==null?void 0:M.value;if(fe==null||fe.forEach(z=>{var pe,ce;F.value++;const X=yr(z==null?void 0:z.default)?(O==null?void 0:O[z.label])??z.value??"":z==null?void 0:z.default;Xe.push({label:z==null?void 0:z.label,name:z==null?void 0:z.label,type:z.type,value:X,prop:z==null?void 0:z.prop,id:F.value,contents:z==null?void 0:z.options,width:((ce=(pe=k.value)==null?void 0:pe[0])==null?void 0:ce.width)??1})}),O!=null&&O.菜单选项&&((Fe=O==null?void 0:O.菜单选项)==null?void 0:Fe.length)>0){const z=await Be.menuToContentType(O==null?void 0:O.菜单选项);Xe=Xe==null?void 0:Xe.map(X=>((X==null?void 0:X.name)==="组信息选项"&&(X.contents=z),X))}ye(Xe),k.value=await Be.selectToBase(v.cloneDeep(Xe)),u.value=await Be.selectToBase(v.cloneDeep(Xe))}else{let Xe=v.cloneDeep(k.value);if(Xe=Xe==null?void 0:Xe.map(fe=>(fe.value=O==null?void 0:O[fe.name],fe)),O!=null&&O.菜单选项&&((qe=O==null?void 0:O.菜单选项)==null?void 0:qe.length)>0){const fe=await Be.menuToContentType(O==null?void 0:O.菜单选项);Xe=Xe==null?void 0:Xe.map(z=>((z==null?void 0:z.name)==="组信息选项"&&(z.contents=fe),z))}Xe=Be.formToOptionsContents(Xe),ye(Xe),k.value=await Be.selectToBase(v.cloneDeep(Xe))}},rt=O=>{O||(u.value=k.value)},Ae=async O=>{await Ze(O),u.value=k.value},je=vo(async()=>{var he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe;u.value=k.value;let O={};O.width=((Ge=(he=u.value)==null?void 0:he[0])==null?void 0:Ge.width)??1,C.value!==""?O.id=C.value:(F.value++,O.id="id"+F.value);let ee=await((M=(J=(it=Be.FormContent)==null?void 0:it.find(z=>{var X,pe;return(z==null?void 0:z.key)===(((pe=(X=u.value)==null?void 0:X.find(ce=>(ce==null?void 0:ce.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:J.value)==null?void 0:M.value)??((Ce=(xe=Be.FormContent)==null?void 0:xe.find(z=>{var X,pe;return(z==null?void 0:z.key)===(((pe=(X=u.value)==null?void 0:X.find(ce=>(ce==null?void 0:ce.label)==="类型"))==null?void 0:pe.value)??"label")}))==null?void 0:Ce.value);if((Pe=u.value)==null||Pe.forEach(z=>{const X=ee==null?void 0:ee.find(pe=>(pe==null?void 0:pe.label)===(z==null?void 0:z.label));X&&(O[X.key]=z.value)}),O.width=O.width?O.width:1,O.key=O==null?void 0:O.label,O.isFormColHidden=O==null?void 0:O.isFormColHidden,(Fe=D.value)!=null&&Fe.find(z=>z.id===O.id))D.value=(qe=D.value)==null?void 0:qe.map(z=>(z.id===O.id&&(z=O),z));else{let z=v.cloneDeep(D.value);z.push(O),D.value=z}D.value=D.value.map(({id:z,...X})=>X),d.value=!1,C.value="";let se=v.cloneDeep(s.originalItemContents);(Xe=v.cloneDeep(s.originalItemContents))!=null&&Xe.find(z=>(z==null?void 0:z.key)==="formContent")?se=(fe=v.cloneDeep(s.originalItemContents))==null?void 0:fe.map(z=>((z==null?void 0:z.key)==="formContent"&&(z.contents=D.value),z)):se.push({key:"formContent",contents:D.value}),r("change",se)},300),Ie=()=>{d.value=!1,g.value=!1,C.value="",k.value=[],L.value=[]};return e.watch(()=>s.originalItemContents,()=>{var ee,se,he,Ge,it,J;if(!s.originalItemContents||s.originalItemContents.length===0)return;const O=v.cloneDeep(s.originalItemContents);D.value=((ee=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="formContent"))==null?void 0:ee.contents)??[],f.value=((se=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="formButton"))==null?void 0:se.contents)??[],V.value=(he=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&he.contents?!((Ge=O==null?void 0:O.find(M=>(M==null?void 0:M.key)==="enableWrap"))!=null&&Ge.contents):!0,D.value=(it=v.cloneDeep(D.value))==null?void 0:it.map((M,xe)=>{var Pe;let Ce=M;return Ce.id=(M==null?void 0:M.id)??xe,M!=null&&M.label||(M.label=(M==null?void 0:M.key)??(M==null?void 0:M.label)??""),M!=null&&M.type||(M.type=(M==null?void 0:M.type)??""),M.contents=((Pe=M==null?void 0:M.options)==null?void 0:Pe.length)===0?(M==null?void 0:M.contents)??"":M==null?void 0:M.options,Ce}),D.value=Be.formToOptionsContents(D.value),f.value=(J=f.value)==null?void 0:J.map((M,xe)=>M={label:(M==null?void 0:M.label)??"",type:(M==null?void 0:M.type)??"",background:(M==null?void 0:M.background)??"var(--ssComponent-primary-color)",id:xe})},{deep:!0,immediate:!0}),(O,ee)=>{const se=e.resolveComponent("svg-icon"),he=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",Ts,[e.createElementVNode("div",Is,[e.createElementVNode("div",Bs,[ee[2]||(ee[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:B},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[1]||(ee[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))]),_:1,__:[1]})]),e.createElementVNode("div",Ns,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(Ge,it)=>(e.openBlock(),e.createElementBlock("div",{key:it},[e.createElementVNode("div",As,[e.createElementVNode("div",null,e.toDisplayString(Ge.label),1),e.createElementVNode("div",Vs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>q(Ge)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>w(Ge)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Os,[ee[4]||(ee[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createVNode(he,{class:"icon-content",id:"themeButton",onClick:y},{icon:e.withCtx(()=>[e.createVNode(se,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[ee[3]||(ee[3]=e.createTextVNode(" 新增 "))]),_:1,__:[3]})]),e.createElementVNode("div",Ms,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(Ge,it)=>(e.openBlock(),e.createElementBlock("div",{key:it},[e.createElementVNode("div",Ls,[e.createElementVNode("div",null,e.toDisplayString(Ge.label),1),e.createElementVNode("div",zs,[e.createVNode(se,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>K(Ge)},null,8,["onClick"]),e.createVNode(se,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>R(Ge)},null,8,["onClick"])])])]))),128))]),ee[6]||(ee[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Fs,[ee[5]||(ee[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(Bt._sfc_main$1,{modelValue:V.value,"onUpdate:modelValue":ee[0]||(ee[0]=Ge=>V.value=Ge)},null,8,["modelValue"])])]),e.createVNode(Zt.ssDialog,{visible:d.value,onBeforeDestroy:Ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:Ze,onChangeVisible:rt,onBlurChange:Ae},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ps,[e.createVNode(he,{onClick:Ie,class:"cancel-button button",id:"themeBorderButton"},{default:e.withCtx(()=>ee[7]||(ee[7]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[7]}),e.createVNode(he,{class:"ok-button button",onClick:e.unref(je),id:"themeButton"},{default:e.withCtx(()=>ee[8]||(ee[8]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),e.createVNode(Zt.ssDialog,{visible:g.value,onBeforeDestroy:Ie,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",$s,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:Y.value,key:Y.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:Ie,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:le},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Lo=Kt._export_sfc(Ks,[["__scopeId","data-v-20850524"]]),js={class:"step-module content"},Us={class:"module-data"},Ws={class:"step-module layout"},Hs={class:"form-content"},qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),u=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),k=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),D=e.ref({}),C=e.ref([]),V=q=>{var K;D.value=q,r("change",(K=L())==null?void 0:K.compData)},F=(q,K)=>{var le,w;switch(q){case"create":(le=u.value)==null||le.forEach(R=>{R.value=""}),f.value="create",g.visible=!0;break;case"update":(w=u.value)==null||w.forEach(R=>{R.value=K[R==null?void 0:R.prop]}),f.value="update",g.visible=!0;break;case"delete":C.value.splice(K,1),f.value="delete";break}},Y=q=>{var K,le,w;if((q==null?void 0:q.buttonName)==="确认"){const R=v.cloneDeep(q==null?void 0:q.content);switch(Object.keys(R).forEach(y=>{R[y]===""&&delete R[y]}),f.value){case"create":C.value.push({...R,index:((K=C.value)==null?void 0:K.length)+1});break;case"update":C.value=(le=C.value)==null?void 0:le.map(y=>y.index===(R==null?void 0:R.index)?{...y,title:R==null?void 0:R.title,description:R==null?void 0:R.description}:y);break}r("change",(w=L())==null?void 0:w.compData),g.visible=!1}else g.visible=!1},L=()=>({comp:"Step",compData:[{key:"stepList",contents:C.value},{key:"stepConfig",contents:D.value}]}),we=()=>{g.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,le;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="stepConfig"))==null?void 0:K.contents)??{},C.value=((le=q==null?void 0:q.find(w=>w.key==="stepList"))==null?void 0:le.contents)??[])},{immediate:!0}),(q,K)=>{const le=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",js,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Us,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.title),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:B=>F("update",{...R,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:B=>F("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Ws,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:d.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Zt.ssDialog,{visible:g.visible,title:g.title,onBeforeDestroy:we,width:g.width},{default:e.withCtx(()=>[e.createElementVNode("div",Hs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:Y},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gs=Kt._export_sfc(qs,[["__scopeId","data-v-7dbd17f2"]]),Xs={class:"step-module content"},Ys={class:"module-data"},Js={class:"step-module layout"},Zs={class:"form-content"},Qs=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref("create"),u=e.ref({}),k=e.ref([]),g=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),D=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),C=e.reactive({visible:!1,width:"40%",title:"时间线"}),V=q=>{var K;u.value=q,r("change",(K=L())==null?void 0:K.compData)},F=(q,K)=>{var le,w;switch(q){case"create":(le=f.value)==null||le.forEach(R=>{R.value=""}),d.value="create",C.visible=!0;break;case"update":(w=f.value)==null||w.forEach(R=>{R.value=K[R==null?void 0:R.prop]}),d.value="update",C.visible=!0;break;case"delete":k.value.splice(K,1),d.value="delete";break}},Y=q=>{var K,le,w,R;if((q==null?void 0:q.buttonName)==="确认"){const y=v.cloneDeep(q==null?void 0:q.content);switch(Object.keys(y).forEach(B=>{y[B]===""&&delete y[B]}),d.value){case"create":(le=k.value)==null||le.push({...y,index:((K=k.value)==null?void 0:K.length)+1});break;case"update":k.value=(w=k.value)==null?void 0:w.map(B=>B.index===(y==null?void 0:y.index)?{...B,content:y==null?void 0:y.content,timestamp:y==null?void 0:y.timestamp}:B);break}r("change",(R=L())==null?void 0:R.compData),C.visible=!1}else C.visible=!1},L=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:k.value},{key:"timeLineConfig",contents:u.value}]}),we=()=>{C.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,le;q&&(u.value=((K=q==null?void 0:q.find(w=>w.key==="timeLineConfig"))==null?void 0:K.contents)??{},k.value=((le=q==null?void 0:q.find(w=>w.key==="timeLineList"))==null?void 0:le.contents)??[])},{immediate:!0}),(q,K)=>{const le=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Xs,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=R=>F("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",Ys,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.content),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:B=>F("update",{...R,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:B=>F("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Js,[K[5]||(K[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(Bt.ssForm,{rowContents:g.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(Zt.ssDialog,{visible:C.visible,title:C.title,onBeforeDestroy:we,width:C.width},{default:e.withCtx(()=>[e.createElementVNode("div",Zs,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:D.value,onOnButtonClick:Y},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),ec=Kt._export_sfc(Qs,[["__scopeId","data-v-39ffc861"]]),tc={};function ac(n,i){return e.openBlock(),e.createElementBlock("div")}const nc=Kt._export_sfc(tc,[["render",ac]]),oc={class:"extra-content"},rc={key:0},lc={key:1},ic={class:"dialog-footer"},sc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:i}){const s=n,r=e.ref(0),d=e.ref(),u=e.ref(),k=i,g=e.ref(!1),f=e.ref({}),D=e.ref({}),C=e.ref();e.watch(()=>[s.itemData],()=>{var R;const w=v.cloneDeep(s.itemData);d.value=(R=v.cloneDeep(w))==null?void 0:R.map(y=>{var B;if(y.key==="extra"){let S=[];(B=y.value)==null||B.forEach(ye=>{var Ze;S.push((Ze=Object.values(ye))==null?void 0:Ze[0])}),y.value=S}return y})},{deep:!0,immediate:!0});const V=(w,R,y,B)=>{var ye;let S={};((ye=w==null?void 0:w[0])==null?void 0:ye.contents)==="详情"&&(g.value=!0,S[R]=w,u.value=w==null?void 0:w.filter(Ze=>(Ze==null?void 0:Ze.key)!=="tableContentName"),f.value=S,D.value=y,C.value=B.id)},F=w=>{var Ze,rt,Ae,je;const R=(rt=(Ze=Object.values(v.cloneDeep(f.value)))==null?void 0:Ze[0])==null?void 0:rt.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableContentName"),y=(je=(Ae=Object.values(v.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:je.filter(Ie=>(Ie==null?void 0:Ie.key)!=="tableContentName"),B=y==null?void 0:y.map((Ie,O)=>{var ee;return O===w.index&&(Ie==null?void 0:Ie.comp)==="Table"&&(Ie.compData=(ee=Ie.compData)==null?void 0:ee.map(se=>{var he,Ge;return(se==null?void 0:se.key)==="tableContents"&&(se.contents=(Ge=(he=w.content)==null?void 0:he.map(it=>{let J={};for(let M in it)M!=="id"&&(J[M]=it[M]);return J}))==null?void 0:Ge.map(it=>Object.values(it))),se})),Ie});B.unshift(R==null?void 0:R[0]);let S=v.cloneDeep(f.value),ye={};for(let Ie in S)ye[Ie]=B;f.value=ye},Y=()=>{g.value=!1,f.value={},D.value={},C.value=void 0,r.value++},L=w=>{var Ze,rt,Ae,je;const R=(rt=(Ze=Object.values(v.cloneDeep(f.value)))==null?void 0:Ze[0])==null?void 0:rt.filter(Ie=>(Ie==null?void 0:Ie.key)==="tableContentName"),y=(je=(Ae=Object.values(v.cloneDeep(f.value)))==null?void 0:Ae[0])==null?void 0:je.filter(Ie=>(Ie==null?void 0:Ie.key)!=="tableContentName"),B=y==null?void 0:y.map((Ie,O)=>(O===w.index&&(Ie.compData=w.contents),Ie));B.unshift(R==null?void 0:R[0]);let S=v.cloneDeep(f.value),ye={};for(let Ie in S)ye[Ie]=B;f.value=ye},we=()=>{var R,y;let w={};for(let B in D.value)B===((R=Object.keys(f.value))==null?void 0:R[0])?w[B]=(y=Object.values(f.value))==null?void 0:y[0]:w[B]=D.value[B];k("change",{buttonName:"编辑",index:C.value,singleContent:w},"methodData"),g.value=!1,f.value={},D.value={},C.value=void 0},q=()=>{g.value=!1,f.value={},D.value={},C.value=void 0},K=w=>{k("change",w,"methodData")},le=w=>rn(w);return(w,R)=>{const y=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(B,S)=>(e.openBlock(),e.createElementBlock("div",{key:r.value},[(B==null?void 0:B.key)==="extra"?(e.openBlock(),e.createElementBlock("div",rc)):(e.openBlock(),e.createElementBlock("div",lc,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,childItemData:B==null?void 0:B.itemChildData,key:S,index:(B==null?void 0:B.id)??S,onContentClick:V,onChange:K},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(Zt.ssDialog,{visible:g.value,onBeforeDestroy:q},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(B,S)=>(e.openBlock(),e.createElementBlock("div",{key:S,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(le(B.comp)),{itemData:B==null?void 0:B.compData,onChange:F,childItemData:B==null?void 0:B.itemChildData,key:S,onContentChange:L,index:(B==null?void 0:B.id)??S,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",ic,[e.createVNode(y,{class:"cancel-button footer-button",onClick:Y,id:"themeBorderButton"},{default:e.withCtx(()=>R[0]||(R[0]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[0]}),e.createVNode(y,{class:"confirm-button footer-button",onClick:we,id:"themeButton"},{default:e.withCtx(()=>R[1]||(R[1]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},cc=Kt._export_sfc(sc,[["__scopeId","data-v-2d9c5ab2"]]),uc={key:0,class:"method-content"},dc={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const i=e.ref([]),s=Be.useOriginalState(v.pinia),{originalPath:r}=v.storeToRefs(s),d=n,u=e.ref(!1),k=e.ref(),g=Be.useTableComp(v.pinia),{multipleTableConst:f}=v.storeToRefs(g),D=Ut.useModelComp(v.pinia),C=e.ref(!1),V=Ut.useMenuState(v.pinia),F=v.useLoginState(v.pinia),{itemData:Y,isEdit:L,routeToChildPath:we,tableViewContents:q,lockingPage:K,payloadTypes:le}=v.storeToRefs(D),{activeMenuPath:w,platform:R,childMenu:y}=v.storeToRefs(V),{loginUserInfo:B}=v.storeToRefs(F),S=e.ref(!1),ye=async()=>{var J,M;(J=i.value)!=null&&J.find(xe=>(xe==null?void 0:xe.buttonName)==="保存")&&await se((M=i.value)==null?void 0:M.find(xe=>(xe==null?void 0:xe.buttonName)==="保存")),await Be.onSaveBack()};e.watch(()=>Y.value,async()=>{L.value==="view"&&!S.value&&await it(v.cloneDeep(d.itemData)),S.value=!1},{deep:!0});const Ze=()=>{u.value=!1,k.value=void 0},rt=J=>J.map(M=>{const xe={};for(const Ce in M){const Pe=M[Ce];if(Ce.includes(f.value)){const Fe=Ce.split(f.value);let qe=xe;Fe.forEach((Xe,fe)=>{fe===Fe.length-1?qe[Xe]=Pe:(qe[Xe]||(qe[Xe]={}),qe=qe[Xe])})}else xe[Ce]=Pe}return xe}),Ae=async(J,M,xe=[])=>{var Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt;let Ce=(Pe=v.cloneDeep(M))==null?void 0:Pe.filter(h=>(h==null?void 0:h.comp)!=="methodButton");if(J!=null&&J.includes("[")){let h=(z=(fe=(Xe=(qe=(Fe=v.cloneDeep(J))==null?void 0:Fe.split("["))==null?void 0:qe[1])==null?void 0:Xe.split("]"))==null?void 0:fe[0])==null?void 0:z.split(":"),_="";if(h!=null&&h[0]){let I=(X=Ce==null?void 0:Ce.find(W=>(W==null?void 0:W.name)===(h==null?void 0:h[0])))==null?void 0:X.compData;if(!I){let W=(pe=J==null?void 0:J.split("["))==null?void 0:pe[0],x=await Be.getItemData(W,sessionStorage.getItem("systemKey"),"",!1,"","",xe);I=(ce=x==null?void 0:x.find(ie=>(ie==null?void 0:ie.name)===(h==null?void 0:h[0])))==null?void 0:ce.compData}I==null||I.forEach(W=>{var x,ie,_e,E,te,$;if((W==null?void 0:W.key)==="formContent")(x=W==null?void 0:W.contents)==null||x.forEach(P=>{var Ee;(P==null?void 0:P.key)===(h==null?void 0:h[1])&&(Array.isArray(P==null?void 0:P.value)?_=P==null?void 0:P.value:_=(Ee=P==null?void 0:P.value)==null?void 0:Ee.toString())});else if((W==null?void 0:W.key)==="tableContents"){let P=[],Ee=(ie=I==null?void 0:I.find(H=>(H==null?void 0:H.key)==="header"))==null?void 0:ie.contents,ne=(h==null?void 0:h[1])??"";if(Ee!=null&&Ee.every(H=>Array.isArray(H))){let H=Be.getColumnChild((te=Ee==null?void 0:Ee[0])==null?void 0:te.filter(Q=>(Q==null?void 0:Q.label)!=="操作"));($=W.contents)==null||$.forEach(Q=>{let de={};Q=Q==null?void 0:Q.filter(De=>!(De!=null&&De.id)),H==null||H.forEach((De,be)=>{let ke=Q[be];typeof Q[be]=="number"&&(ke=Q[be].toString()),(ne===""||ne===De.prop)&&(de[De.prop]=ke)}),P.push(de)}),P=rt(P)}else{let H=(_e=Ee==null?void 0:Ee.map(Q=>Q==null?void 0:Q.label))==null?void 0:_e.filter(Q=>Q!=="操作");(E=W.contents)==null||E.forEach(Q=>{let de={};Q=Q==null?void 0:Q.filter(De=>!(De!=null&&De.id)),H==null||H.forEach((De,be)=>{let ke=Q[be];typeof Q[be]=="number"&&(ke=Q[be].toString()),(ne===""||ne===De)&&(de[De]=ke)}),P.push(de)})}_=P}})}return _}else if(J!=null&&J.includes("/")){let h={};return(G=v.cloneDeep(Ce))==null||G.forEach((_,I)=>{var W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge;if((_==null?void 0:_.comp)==="Table"){let Le=Array.isArray((ie=(x=(W=_==null?void 0:_.compData)==null?void 0:W.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:x.contents)==null?void 0:ie[0])?($=(te=(E=(_e=_==null?void 0:_.compData)==null?void 0:_e.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:E.contents)==null?void 0:te[0])==null?void 0:$.some(Oe=>Oe==null?void 0:Oe.children):[],ct=(ne=(Ee=(P=_==null?void 0:_.compData)==null?void 0:P.find(Oe=>(Oe==null?void 0:Oe.key)==="tableContents"))==null?void 0:Ee.contents)==null?void 0:ne.map(Oe=>(Oe!=null&&Oe.find(gt=>gt==null?void 0:gt.id)&&(Oe=Oe.slice(1)),Oe)),Ue=(be=(De=(de=(Q=(H=_==null?void 0:_.compData)==null?void 0:H.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:Q.contents)==null?void 0:de[0])==null?void 0:De[0])==null?void 0:be.label,ot=(j=(ke=_==null?void 0:_.compData)==null?void 0:ke.find(Oe=>(Oe==null?void 0:Oe.key)==="header"))==null?void 0:j.contents;if(Le)(Le==null?void 0:Le.length)===0?h[_.name]=h!=null&&h[_.name]?h[_.name]:Be.tableToForm(ct,ot):h[Ue]=Be.tableToForm(ct,ot);else{const Oe=[];ot=ot.slice(1,ot.length-1),ot==null||ot.forEach((gt,tt)=>{ct==null||ct.forEach(Ve=>{Oe.push({key:gt.label+Ve[0],value:Ve[tt+1]})})}),h["form"+I]=Oe}}else{const Le=(ge=(Ne=_.compData)==null?void 0:Ne.find(Ue=>(Ue==null?void 0:Ue.key)==="formContent"))==null?void 0:ge.contents;h!=null&&h.form||(h.form=[]);const ct=[];Le==null||Le.forEach(Ue=>{Ue.key!==""&&(Ue={key:(Ue==null?void 0:Ue.key)??(Ue==null?void 0:Ue.label),value:Ue==null?void 0:Ue.value},ct.push(Ue))}),h.form=[...ct,...v.cloneDeep(h==null?void 0:h.form)]}}),h}else{if(J==="createInsofDataApi"){let h=(ae=v.cloneDeep(M))==null?void 0:ae[0];return h={comp:(Z=v.cloneDeep(h))==null?void 0:Z.comp,compData:(re=v.cloneDeep(h))==null?void 0:re.compData,name:(Re=v.cloneDeep(h))==null?void 0:Re.name,isShow:(lt=v.cloneDeep(h))==null?void 0:lt.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:w.value},value:{pageData:h}}}return J}},je=async(J,M,xe)=>{var Fe,qe,Xe;let Ce=await Be.getItemData(M,sessionStorage.getItem("systemKey"),""),Pe=Ce==null?void 0:Ce.find(fe=>(fe==null?void 0:fe.name)===(xe==null?void 0:xe[0]));if(Pe){if((Pe==null?void 0:Pe.comp)==="Table"){let fe={};for(let Z in v.cloneDeep(J))v.cloneDeep(J)[Z]!=="loginUser"?fe[Z]=v.cloneDeep(J)[Z]:fe[Z]=((Fe=B.value)==null?void 0:Fe.account)||((qe=B.value)==null?void 0:qe.账号);let z=[],X=fe;Array.isArray(J)||(X=[fe]),X==null||X.forEach(Z=>{z.push({[Z[xe[1]]]:Z})});let pe=[],ce=z==null?void 0:z.map(Z=>{var re;return(re=Object.keys(Z))==null?void 0:re[0]});Ce==null||Ce.forEach(Z=>{var re;(Z==null?void 0:Z.name)===(xe==null?void 0:xe[0])&&((re=Z==null?void 0:Z.compData)==null||re.forEach(Re=>{var lt;(Re==null?void 0:Re.key)==="tableContents"&&((lt=Re==null?void 0:Re.contents)==null||lt.forEach(h=>{h!=null&&h.some(_=>ce.includes(_))&&pe.push({[h.find(_=>_.id).id]:h.find(_=>ce.includes(_))})}))}))});let G=pe==null?void 0:pe.map(Z=>{var re;return(re=Object.keys(Z))==null?void 0:re[0]}),ae=[];if(G==null||G.forEach(Z=>{var lt;let re=(lt=pe==null?void 0:pe.find(h=>{var _;return((_=Object.keys(h))==null?void 0:_[0].toString())===Z.toString()}))==null?void 0:lt[Z],Re=z==null?void 0:z.find(h=>{var _;return((_=Object.keys(h))==null?void 0:_[0])===re});ae.push({id:parseInt(Z),value:{tableData:Re[re]}})}),(ae==null?void 0:ae.length)>0)return ae}else if((Pe==null?void 0:Pe.comp)==="Form"){let fe=v.cloneDeep(Pe);fe.compData=(Xe=fe.compData)==null?void 0:Xe.map(pe=>{var ce;return(pe==null?void 0:pe.key)==="formContent"&&(pe.contents=(ce=pe.contents)==null?void 0:ce.map(G=>((G==null?void 0:G.key)===(xe==null?void 0:xe[1])&&(G.value=(J==null?void 0:J[G==null?void 0:G.prop])||J),G))),pe});let z={};for(let pe in fe)pe!=="id"&&(z[pe]=fe[pe]);let X=[];if(X.push({id:Pe==null?void 0:Pe.id,keyType:xe==null?void 0:xe[1],value:{pageData:z}}),(X==null?void 0:X.length)>0)return X}}},Ie=async(J,M,xe)=>{var Fe,qe,Xe,fe,z,X,pe,ce,G,ae;let Ce=await Be.getItemData(M,sessionStorage.getItem("systemKey"),""),Pe=Ce==null?void 0:Ce.find(Z=>(Z==null?void 0:Z.name)===(xe==null?void 0:xe[0]));if(Pe){if((Pe==null?void 0:Pe.comp)==="Table"){let Z={};for(let re in v.cloneDeep(J))v.cloneDeep(J)[re]!=="loginUser"?Z[re]=v.cloneDeep(J)[re]:Z[re]=((Fe=B.value)==null?void 0:Fe.account)||((qe=B.value)==null?void 0:qe.账号);await v.createInsofDataApi({key:{type:"data",pageKey:M,tableId:Pe==null?void 0:Pe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Z}})}else if((Pe==null?void 0:Pe.comp)==="Form"){let Z=v.cloneDeep(Pe),re=Object.keys(J),Re="";(fe=(Xe=v.cloneDeep(Z))==null?void 0:Xe.compData)==null||fe.forEach(x=>{var ie,_e;(x==null?void 0:x.key)==="formContent"&&((_e=(ie=v.cloneDeep(x))==null?void 0:ie.contents)==null||_e.forEach(E=>{var te;re.includes(E==null?void 0:E.key)&&(E==null?void 0:E.value)===((te=B.value)==null?void 0:te.姓名)&&(Re=E==null?void 0:E.key)}))});let lt=[];(z=Object.values(J[Re]))==null||z.forEach(x=>{x!=null&&x.includes("(")&&lt.push(x)}),lt=[...new Set(lt)];const h=lt==null?void 0:lt.map(async x=>{var $,P,Ee,ne,H,Q,de,De,be,ke,j,Ne;let ie="";(Q=(H=(ne=(Ee=(P=($=v.cloneDeep(x))==null?void 0:$.split("("))==null?void 0:P[1])==null?void 0:Ee.split(")"))==null?void 0:ne[0])==null?void 0:H.split(":"))==null||Q.forEach(ge=>{ie=ie===""?ie+ge.replaceAll("'",""):ie+"/"+ge.replaceAll("'","")});let _e=[];(Ne=(j=(ke=(be=(De=(de=v.cloneDeep(x))==null?void 0:de.split("<"))==null?void 0:De[1])==null?void 0:be.split(">"))==null?void 0:ke[0])==null?void 0:j.split(":"))==null||Ne.forEach(ge=>{_e.push(ge.replaceAll("'",""))});const E=await Be.getItemData(ie,sessionStorage.getItem("systemKey"),"");let te="";return E==null||E.forEach(ge=>{var Le;ge.name===(_e==null?void 0:_e[0])&&((Le=ge==null?void 0:ge.compData)==null||Le.forEach(ct=>{var Ue;(ct==null?void 0:ct.key)==="formContent"&&((Ue=ct.contents)==null||Ue.forEach(ot=>{(ot==null?void 0:ot.key)===(_e==null?void 0:_e[1])&&(te=ot==null?void 0:ot.value)}))}))}),{[x]:te}}),_=await Promise.all(h);Z.compData=(pe=(X=v.cloneDeep(Z))==null?void 0:X.compData)==null?void 0:pe.map(x=>{var ie,_e;return(x==null?void 0:x.key)==="formContent"&&(x.contents=(_e=(ie=v.cloneDeep(x))==null?void 0:ie.contents)==null?void 0:_e.map(E=>{var te,$,P,Ee;return(te=J[Re])!=null&&te[E==null?void 0:E.key]&&(J[Re][E==null?void 0:E.key].includes("(")?E.value=($=_==null?void 0:_.find(ne=>{var H;return((H=Object.keys(ne))==null?void 0:H[0])===J[Re][E==null?void 0:E.key]}))==null?void 0:$[J[Re][E==null?void 0:E.key]]:E.value=(Ee=(P=v.cloneDeep(J))==null?void 0:P[Re])==null?void 0:Ee[E==null?void 0:E.key]),E})),x});const I=await v.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let W="";((ce=I==null?void 0:I.data)==null?void 0:ce.type)==="success"&&((ae=(G=I==null?void 0:I.data)==null?void 0:G.result)==null||ae.forEach(x=>{var ie,_e;((_e=(ie=x==null?void 0:x.value)==null?void 0:ie.pageData)==null?void 0:_e.name)===(xe==null?void 0:xe[0])&&(W=x.id)}),await v.updateInsofDataApi({id:W,value:{pageData:Z}}))}}},O=(J,M="",xe={})=>{for(const[Ce,Pe]of Object.entries(J)){const Fe=M?`${M}.${Ce}`:Ce;Pe!==null&&typeof Pe=="object"&&!Array.isArray(Pe)&&Object.prototype.toString.call(Pe)!=="[object Date]"?O(Pe,Fe,xe):xe[Fe]=Pe}return xe},ee=async(J,M,xe,Ce)=>{var qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee;let Pe=await Be.getItemData(M,sessionStorage.getItem("systemKey"),""),Fe=Pe==null?void 0:Pe.find(ne=>(ne==null?void 0:ne.name)===(xe==null?void 0:xe[0]));if(Fe){if(!(xe!=null&&xe[1])&&(Fe==null?void 0:Fe.comp)==="Table"){let ne={},H=[],Q=(Xe=(qe=Fe==null?void 0:Fe.compData)==null?void 0:qe.find(be=>(be==null?void 0:be.key)==="header"))==null?void 0:Xe.contents;Q!=null&&Q.every(be=>Array.isArray(be))?H=(z=Be.getColumnChild((fe=Q==null?void 0:Q[0])==null?void 0:fe.filter(be=>(be==null?void 0:be.label)!=="操作")))==null?void 0:z.map(be=>be==null?void 0:be.prop):H=Q==null?void 0:Q.map(be=>be==null?void 0:be.label);for(let be in v.cloneDeep(J))if(v.cloneDeep(J)[be]!=="loginUser"){let ke=O(v.cloneDeep(J)[be]),j={};for(let Ne in ke)if(H!=null&&H.find(ge=>ge===Ne))j[Ne]=ke[Ne];else if(H!=null&&H.find(ge=>(ge==null?void 0:ge.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()))){let ge=H==null?void 0:H.find(Le=>(Le==null?void 0:Le.toUpperCase())===(Ne==null?void 0:Ne.toUpperCase()));j[ge]=ke[Ne]}ne[be]=j}else ne[be]=((X=B.value)==null?void 0:X.account)||((pe=B.value)==null?void 0:pe.账号);let de=await v.getInsofDataApi({keyLikes:{tableId:Fe==null?void 0:Fe.id}});if(((G=(ce=de==null?void 0:de.data)==null?void 0:ce.result)==null?void 0:G.length)>0){let be=(Z=(ae=de==null?void 0:de.data)==null?void 0:ae.result)==null?void 0:Z.map(ke=>ke==null?void 0:ke.id);(be==null?void 0:be.length)>0&&await v.batchDeleteInsofDataApi({ids:be})}let De=[];if((re=Fe==null?void 0:Fe.compData)!=null&&re.find(be=>(be==null?void 0:be.key)==="pageColumn")&&((h=(lt=(Re=Fe==null?void 0:Fe.compData)==null?void 0:Re.find(be=>(be==null?void 0:be.key)==="pageColumn"))==null?void 0:lt.contents)!=null&&h.includes("["))){const be=await v.getInsofDataApi({id:Fe==null?void 0:Fe.tableId});let ke=((x=(W=(I=(_=be==null?void 0:be.data)==null?void 0:_.result)==null?void 0:I[0])==null?void 0:W.key)==null?void 0:x.pageKey)??"";(ie=Object.values(ne))==null||ie.forEach(j=>{De.push({key:{type:"data",pageKey:ke,tableId:Fe==null?void 0:Fe.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:j}})})}else(_e=Object.values(ne))==null||_e.forEach(be=>{De.push({key:{type:"data",pageKey:M,tableId:Fe==null?void 0:Fe.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:be}})});(De==null?void 0:De.length)>0&&await v.batchAddInsofDataApi({dataList:De})}else if(!(xe!=null&&xe[1])&&(Fe==null?void 0:Fe.comp)==="Form"){let ne=v.cloneDeep(Fe);ne.compData=(te=(E=v.cloneDeep(ne))==null?void 0:E.compData)==null?void 0:te.map(de=>{var De,be;return(de==null?void 0:de.key)==="formContent"&&(de.contents=(be=(De=v.cloneDeep(de))==null?void 0:De.contents)==null?void 0:be.map(ke=>{var j,Ne;return(j=v.cloneDeep(J))!=null&&j[ke==null?void 0:ke.key]&&(ke.value=(Ne=v.cloneDeep(J))==null?void 0:Ne[ke==null?void 0:ke.key]),ke})),de});const H=await v.getInsofDataApi({key:{type:"structure",pageKey:M,systemKey:sessionStorage.getItem("systemKey")}});let Q="";(($=H==null?void 0:H.data)==null?void 0:$.type)==="success"&&((Ee=(P=H==null?void 0:H.data)==null?void 0:P.result)==null||Ee.forEach(de=>{var De,be;((be=(De=de==null?void 0:de.value)==null?void 0:De.pageData)==null?void 0:be.name)===(xe==null?void 0:xe[0])&&(Q=de.id)}),await v.updateInsofDataApi({id:Q,value:{pageData:ne}}))}}},se=async J=>{var M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re;V.setImportLoading(!0);try{if(J.api){let Re=new WeakMap;(xe=(M=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value})).data.result)==null?void 0:M.filter($=>{var P,Ee;return((P=$==null?void 0:$.key)==null?void 0:P.pageKey)!=="menu"&&((Ee=$==null?void 0:$.key)==null?void 0:Ee.pageKey)!=="secret"}))==null||xe.forEach($=>{Re[$.key.pageKey]?Re[$.key.pageKey]=[...Re[$.key.pageKey],$]:Re[$.key.pageKey]=[$]});let h=await Be.getItemData((y==null?void 0:y.value)===""?w.value:y==null?void 0:y.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re),_="";if(h=h==null?void 0:h.map($=>{var P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge;if(($==null?void 0:$.comp)==="Form")$.compData=(P=$.compData)==null?void 0:P.map(Le=>{var ct;return(Le==null?void 0:Le.key)==="formContent"&&(Le.contents=(ct=Le.contents)==null?void 0:ct.map(Ue=>{var ot;if((Ue==null?void 0:Ue.value)===""&&(Ue==null?void 0:Ue.type)==="Select"){let Oe=Be.judgeContents((ot=v.cloneDeep(Ue))==null?void 0:ot.optionUrl,Re);Ue.value=Ue.value||Oe}return Ue})),Le});else if(($==null?void 0:$.comp)==="Table"&&(Ee=$.compData)!=null&&Ee.find(Le=>(Le==null?void 0:Le.key)==="pageColumn")){let Le=(H=(ne=$.compData)==null?void 0:ne.find(Oe=>(Oe==null?void 0:Oe.key)==="pageColumn"))==null?void 0:H.contents,ct=((de=(Q=$.compData)==null?void 0:Q.find(Oe=>(Oe==null?void 0:Oe.key)==="pageGroup"))==null?void 0:de.contents)??"",Ue=(ke=(be=(De=Le==null?void 0:Le.split("["))==null?void 0:De[1])==null?void 0:be.split("]"))==null?void 0:ke[0];_=((j=Le==null?void 0:Le.split("["))==null?void 0:j[0])+((ge=(Ne=q.value)==null?void 0:Ne.find(Oe=>(Oe==null?void 0:Oe.key)===Ue))==null?void 0:ge.value)}return $}),!(_===""||_==="")){const $=await Be.getItemData(_,sessionStorage.getItem("systemKey"),"",!1,"","",Re);h=h==null?void 0:h.map(P=>{var Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct;if((P==null?void 0:P.comp)==="Table"&&(Ee=P.compData)!=null&&Ee.find(Ue=>(Ue==null?void 0:Ue.key)==="pageColumn")){let Ue=(H=(ne=P.compData)==null?void 0:ne.find(Ve=>(Ve==null?void 0:Ve.key)==="pageColumn"))==null?void 0:H.contents,ot=((de=(Q=P.compData)==null?void 0:Q.find(Ve=>(Ve==null?void 0:Ve.key)==="pageGroup"))==null?void 0:de.contents)??"",Oe=(ke=(be=(De=Ue==null?void 0:Ue.split("["))==null?void 0:De[1])==null?void 0:be.split("]"))==null?void 0:ke[0],gt=((j=Ue==null?void 0:Ue.split("["))==null?void 0:j[0])+((ge=(Ne=q.value)==null?void 0:Ne.find(Ve=>(Ve==null?void 0:Ve.key)===Oe))==null?void 0:ge.value),tt=(Le=$==null?void 0:$.find(Ve=>(Ve==null?void 0:Ve.name)===(ot===""?d==null?void 0:d.compName:ot)))==null?void 0:Le.compData;P.compData=(ct=P.compData)==null?void 0:ct.map(Ve=>{var $e;return(Ve==null?void 0:Ve.key)==="tableContents"&&(Ve.contents=($e=tt==null?void 0:tt.find(et=>(et==null?void 0:et.key)==="tableContents"))==null?void 0:$e.contents),Ve})}return P})}let I={};if(((Pe=(Ce=J==null?void 0:J.extraValues)==null?void 0:Ce.input)==null?void 0:Pe.length)>0){const $=(qe=(Fe=J==null?void 0:J.extraValues)==null?void 0:Fe.input)==null?void 0:qe.map(async P=>{var Ee;he!=null&&he.find(ne=>ne===P)?I=await Ae(P,h):I[Object.keys(P)[0]]=await Ae((Ee=Object.values(P))==null?void 0:Ee[0],h,Re)});await Promise.all($)}else I=await Ae("/",h);let W=!1;(fe=(Xe=J==null?void 0:J.extraValues)==null?void 0:Xe.output)==null||fe.forEach($=>{var P,Ee;(Ee=(P=Object.values($))==null?void 0:P[0])!=null&&Ee.includes(".doc")&&(W=!0)});let x;if(W){const $=Bt.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});x=await v.axios.post(J.api,I,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{$.close()})}else x=await v.axios.post(J.api,I,{headers:{"Content-Type":"application/json"}});let ie=(ce=(pe=(X=(z=v.cloneDeep(J))==null?void 0:z.extraValues)==null?void 0:X.output)==null?void 0:pe.map($=>{var P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot;if(!((Ee=(P=Object.values($))==null?void 0:P[0])!=null&&Ee.includes(".doc"))){let Oe=(j=(ke=(be=(H=v.cloneDeep((ne=Object.values($))==null?void 0:ne[0]))==null?void 0:H.split("["))==null?void 0:be[((De=(de=v.cloneDeep((Q=Object.values($))==null?void 0:Q[0]))==null?void 0:de.split("["))==null?void 0:De.length)-1])==null?void 0:ke.split("]"))==null?void 0:j[0],gt=Oe==null?void 0:Oe.split(":"),tt=(Le=v.cloneDeep((Ne=Object.values($))==null?void 0:Ne[0]))==null?void 0:Le.substring(0,v.cloneDeep((ge=Object.values($))==null?void 0:ge[0]).lastIndexOf("["));if(tt=(Ue=v.cloneDeep(tt))==null?void 0:Ue.slice(0,((ct=v.cloneDeep(tt))==null?void 0:ct.length)-1),tt!=null&&tt.includes("[")){let Ve="";if((ot=Be.contentTransArrayToAll(tt,"/"))==null||ot.forEach($e=>{var et,Ye,ze,at,ve,Se,Me;if(!($e!=null&&$e.includes("[")))Ve=Ve===""?Ve+$e.replaceAll("/",""):Ve+"/"+$e.replaceAll("/","");else{let Qe=v.cloneDeep($e).slice(1,((et=v.cloneDeep($e))==null?void 0:et.length)-1),A=(Se=(ve=(at=(ze=(Ye=v.cloneDeep(Qe))==null?void 0:Ye.split("["))==null?void 0:ze[1])==null?void 0:at.split("]"))==null?void 0:ve[0])==null?void 0:Se.split(":"),ue="",He=(Me=h==null?void 0:h.find(me=>(me==null?void 0:me.name)===(A==null?void 0:A[0])))==null?void 0:Me.compData;He==null||He.forEach(me=>{var nt;(me==null?void 0:me.key)==="formContent"&&((nt=me==null?void 0:me.contents)==null||nt.forEach(kt=>{(kt==null?void 0:kt.key)===(A==null?void 0:A[1])&&(ue=kt==null?void 0:kt.value)}))}),Ve=Ve===""?Ve+ue.replaceAll("/",""):Ve+"/"+ue.replaceAll("/","")}}),tt=Ve,tt[(tt==null?void 0:tt.length)-1]!=="/")return tt}}}))==null?void 0:ce.filter($=>$);ie=[...new Set(v.cloneDeep(ie))];let _e=ie==null?void 0:ie.map(async $=>{let P=await Be.getItemData($,sessionStorage.getItem("systemKey"),"",!1,"","",Re);if((P==null?void 0:P.length)===0)return await Be.getParentContents($)});await Promise.all(_e);let E=[],te=(Z=(ae=(G=v.cloneDeep(J))==null?void 0:G.extraValues)==null?void 0:ae.output)==null?void 0:Z.map(async $=>{var be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et,Ye,ze,at,ve,Se,Me,Qe,A,ue,He,me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt,bt,jt,qt,Gt,ta,$t,Ia,Ra,ba,Pa,ka,$a,Ka,ja,Ua,Wa,Ba,ga,da,xa,ma,ra,va,Ha,Na,Aa,wa,qa,Ga,Va,Xa,Ya,St,ea;if((ke=(be=Object.values($))==null?void 0:be[0])!=null&&ke.includes(".doc")){var P=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"}),Ee=x.headers["content-disposition"],ne=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),H=ne.exec(Ee),Q=H==null?void 0:H[1],de=document.createElement("a"),De=window.URL.createObjectURL(P);k.value=[{name:Q,blobUrl:De}],u.value=!0}else{let xt=(Oe=(ot=(Ue=(Ne=v.cloneDeep((j=Object.values($))==null?void 0:j[0]))==null?void 0:Ne.split("["))==null?void 0:Ue[((ct=(Le=v.cloneDeep((ge=Object.values($))==null?void 0:ge[0]))==null?void 0:Le.split("["))==null?void 0:ct.length)-1])==null?void 0:ot.split("]"))==null?void 0:Oe[0],zt=xt==null?void 0:xt.split(":"),wt=(Ve=v.cloneDeep((gt=Object.values($))==null?void 0:gt[0]))==null?void 0:Ve.substring(0,v.cloneDeep((tt=Object.values($))==null?void 0:tt[0]).lastIndexOf("["));if(wt!=null&&wt.includes("[")?wt=(et=v.cloneDeep(wt))==null?void 0:et.slice(0,(($e=v.cloneDeep(wt))==null?void 0:$e.length)-1):wt===""&&(wt=w.value),wt=wt.replaceAll("<","[").replaceAll(">","]"),wt!=null&&wt.includes("[")){let Et="";(Ye=Be.contentTransArrayToAll(wt,"/"))==null||Ye.forEach((Ct,Ft)=>{var Ot,Rt,Yt,la,Oa,Ja,Ma,Za,Sn,ln,vn;if(!(Ct!=null&&Ct.includes("[")))Et=Et===""?Et+Ct.replaceAll("/",""):Et+"/"+Ct.replaceAll("/","");else{let sn="",pa="";(Ot=v.cloneDeep(Ct))!=null&&Ot.includes("]")?(sn=v.cloneDeep(Ct).slice(1,((Rt=v.cloneDeep(Ct))==null?void 0:Rt.length)-1),pa=(Ma=(Ja=(Oa=(la=(Yt=v.cloneDeep(sn))==null?void 0:Yt.split("["))==null?void 0:la[1])==null?void 0:Oa.split("]"))==null?void 0:Ja[0])==null?void 0:Ma.split(":")):(sn=v.cloneDeep(Ct).slice(1,(Za=v.cloneDeep(Ct))==null?void 0:Za.length),pa=(Sn=v.cloneDeep(sn))==null?void 0:Sn.split("/"));let Qa="",cn=(ln=h==null?void 0:h.find(ia=>(ia==null?void 0:ia.name)===(pa==null?void 0:pa[0])))==null?void 0:ln.compData;cn==null||cn.forEach(ia=>{var Tn;(ia==null?void 0:ia.key)==="formContent"&&((Tn=ia==null?void 0:ia.contents)==null||Tn.forEach(La=>{(La==null?void 0:La.key)===(pa==null?void 0:pa[1])&&(Qa=La==null?void 0:La.value)}))}),((vn=Be.contentTransArrayToAll(wt,"/"))==null?void 0:vn.length)-1!==Ft?Et=Et===""?Et+Qa.replaceAll("/",""):Et+"/"+Qa.replaceAll("/",""):Et=Et+r.value+Qa.replaceAll("/","")}}),(ze=w.value)!=null&&ze.includes(Et)?wt=w.value:wt=Et}let Xt=v.cloneDeep((at=Object.keys($))==null?void 0:at[0]);if(((ve=x==null?void 0:x.data)==null?void 0:ve.statusCode)===200||((Se=x==null?void 0:x.data)==null?void 0:Se.code)===200){if(((Qe=(Me=x==null?void 0:x.data)==null?void 0:Me.data)!=null&&Qe[Xt]||(ue=(A=x==null?void 0:x.data)==null?void 0:A.result)!=null&&ue[Xt])&&(zt==null?void 0:zt.length)===1)return await ee(((me=(He=x==null?void 0:x.data)==null?void 0:He.data)==null?void 0:me[Xt])||((kt=(nt=x==null?void 0:x.data)==null?void 0:nt.result)==null?void 0:kt[Xt]),v.cloneDeep(wt),zt,_);if((ht=(yt=x==null?void 0:x.data)==null?void 0:yt.data)!=null&&ht[Xt]||(ft=(dt=x==null?void 0:x.data)==null?void 0:dt.result)!=null&&ft[Xt]){let Et=await je(((Mt=(_t=x==null?void 0:x.data)==null?void 0:_t.data)==null?void 0:Mt[Xt])||((Lt=(Vt=x==null?void 0:x.data)==null?void 0:Vt.result)==null?void 0:Lt[Xt]),v.cloneDeep(wt),zt);return Et&&(E=[...E,...Et]),Et}else{if(!((bt=x==null?void 0:x.data)!=null&&bt.data)){let Et=await Be.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re);Et=Et==null?void 0:Et.map(Ft=>{var Ot;return(Ft==null?void 0:Ft.name)===(zt==null?void 0:zt[0])&&(Ft.compData=(Ot=Ft.compData)==null?void 0:Ot.map(Rt=>{var Yt;return(Rt==null?void 0:Rt.key)==="formContent"&&(Rt.contents=(Yt=Rt.contents)==null?void 0:Yt.map(la=>{var Oa,Ja;return(la==null?void 0:la.key)===(zt==null?void 0:zt[1])&&(la.value=(Ja=(Oa=x==null?void 0:x.data)==null?void 0:Oa.result)==null?void 0:Ja[Xt==null?void 0:Xt.replaceAll(":","")]),la})),Rt})),Ft});let Ct=[];(jt=Et==null?void 0:Et.filter(Ft=>(Ft==null?void 0:Ft.comp)==="Form"))==null||jt.forEach(async Ft=>{let Ot={};for(let Rt in Ft)Rt!=="id"&&(Ot[Rt]=Ft[Rt]);Ct.push({id:Ft==null?void 0:Ft.id,value:{pageData:Ot}})}),(Ct==null?void 0:Ct.length)>0&&await v.batchUpdateInsofDataApi({dataList:Ct});return}if((zt==null?void 0:zt.length)===1){const Et=(ta=(Gt=(qt=x==null?void 0:x.data)==null?void 0:qt.data)==null?void 0:Gt.path)==null?void 0:ta.path;let Ct="";(Pa=(ba=(Ra=(Ia=($t=Et==null?void 0:Et.split("("))==null?void 0:$t[1])==null?void 0:Ia.split(")"))==null?void 0:Ra[0])==null?void 0:ba.split(":"))==null||Pa.forEach(Rt=>{var Yt,la;Ct=Ct===""?Ct+((Yt=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:Yt.trim()):Ct+"/"+((la=Rt==null?void 0:Rt.replaceAll("'",""))==null?void 0:la.trim())});let Ft=[(Ua=(ja=(Ka=($a=(ka=Et==null?void 0:Et.split("<"))==null?void 0:ka[1])==null?void 0:$a.split(">"))==null?void 0:Ka[0])==null?void 0:ja.replaceAll("'",""))==null?void 0:Ua.trim()],Ot;return(ga=(Ba=(Wa=x==null?void 0:x.data)==null?void 0:Wa.data)==null?void 0:Ba.data)!=null&&ga[zt==null?void 0:zt[0]]?Ot=await ee((ma=(xa=(da=x==null?void 0:x.data)==null?void 0:da.data)==null?void 0:xa.data)==null?void 0:ma[zt==null?void 0:zt[0]],Ct,zt,_):Ot=await Ie((va=(ra=x==null?void 0:x.data)==null?void 0:ra.data)==null?void 0:va.data,Ct,Ft,Re),Ot}else{const Et=(Aa=(Na=(Ha=x==null?void 0:x.data)==null?void 0:Ha.data)==null?void 0:Na.path)==null?void 0:Aa.path;let Ct="";return(Xa=(Va=(Ga=(qa=(wa=Et==null?void 0:Et.split("("))==null?void 0:wa[1])==null?void 0:qa.split(")"))==null?void 0:Ga[0])==null?void 0:Va.split(":"))==null||Xa.forEach(Ot=>{var Rt,Yt;Ct=Ct===""?Ct+((Rt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Rt.trim()):Ct+"/"+((Yt=Ot==null?void 0:Ot.replaceAll("'",""))==null?void 0:Yt.trim())}),await je((ea=(St=(Ya=x==null?void 0:x.data)==null?void 0:Ya.data)==null?void 0:St.data)==null?void 0:ea[zt==null?void 0:zt[0]],Ct,zt)}}}}});if(await Promise.all(te),(E==null?void 0:E.length)>0){let $=[];E==null||E.forEach(ne=>{$!=null&&$.find(H=>{var Q,de,De,be;return((de=(Q=H==null?void 0:H.value)==null?void 0:Q.pageData)==null?void 0:de.name)===((be=(De=ne==null?void 0:ne.value)==null?void 0:De.pageData)==null?void 0:be.name)})||$.push(ne)});let P=[];$==null||$.forEach(ne=>{var de,De,be,ke;let H=v.cloneDeep(ne);H.value.pageData.compData=(de=H.value.pageData.compData)==null?void 0:de.map(j=>{var Ne;return(j==null?void 0:j.key)==="formContent"&&(j.contents=(Ne=j.contents)==null?void 0:Ne.map(ge=>{var ct,Ue,ot,Oe;let Le=(ct=v.cloneDeep(E))==null?void 0:ct.find(gt=>(gt==null?void 0:gt.keyType)===(ge==null?void 0:ge.key));if(Le){let gt=(Oe=(ot=(Ue=Le.value.pageData.compData)==null?void 0:Ue.find(tt=>(tt==null?void 0:tt.key)==="formContent"))==null?void 0:ot.contents)==null?void 0:Oe.find(tt=>(tt==null?void 0:tt.key)===(ge==null?void 0:ge.key));ge.value=gt==null?void 0:gt.value}return ge})),j}),P.push({id:H==null?void 0:H.id,value:H==null?void 0:H.value});let Q=[];(ke=(be=(De=H==null?void 0:H.value)==null?void 0:De.pageData)==null?void 0:be.compData)==null||ke.forEach(j=>{var Ne;(j==null?void 0:j.key)==="formContent"&&((Ne=j==null?void 0:j.contents)==null||Ne.forEach(ge=>{var Le,ct,Ue,ot,Oe,gt;if((ct=(Le=ge==null?void 0:ge.optionUrl)==null?void 0:Le.menuSelect)!=null&&ct.find(tt=>tt==null?void 0:tt.includes("[")))if(Q!=null&&Q.find(tt=>{var Ve,$e,et;return((Ve=tt==null?void 0:tt.key)==null?void 0:Ve.join(","))===((et=($e=ge==null?void 0:ge.optionUrl)==null?void 0:$e.menuSelect)==null?void 0:et.join(","))})){let tt=(Ue=Q==null?void 0:Q.find(Ve=>{var $e,et,Ye;return(($e=Ve==null?void 0:Ve.key)==null?void 0:$e.join(","))===((Ye=(et=ge==null?void 0:ge.optionUrl)==null?void 0:et.menuSelect)==null?void 0:Ye.join(","))}))==null?void 0:Ue.value;tt.push({key:ge==null?void 0:ge.prop,groups:(ot=ge==null?void 0:ge.optionUrl)==null?void 0:ot.groupSelect,value:ge==null?void 0:ge.value}),Q=Q==null?void 0:Q.map(Ve=>{var $e,et,Ye;return(($e=Ve==null?void 0:Ve.key)==null?void 0:$e.join(","))===((Ye=(et=ge==null?void 0:ge.optionUrl)==null?void 0:et.menuSelect)==null?void 0:Ye.join(","))&&(Ve.value=tt),Ve})}else Q.push({key:(Oe=ge==null?void 0:ge.optionUrl)==null?void 0:Oe.menuSelect,value:[{key:ge==null?void 0:ge.prop,groups:(gt=ge==null?void 0:ge.optionUrl)==null?void 0:gt.groupSelect,value:ge==null?void 0:ge.value}]})}))}),(Q==null?void 0:Q.length)>0&&(Q=Q==null?void 0:Q.map(j=>{var ge;let Ne="";return(ge=j==null?void 0:j.key)==null||ge.forEach(Le=>{var ct;if(!(Le!=null&&Le.includes("[")))Ne=Ne===""?Ne+Le:Ne+"/"+Le;else{let Ue="",ot=(ct=Le==null?void 0:Le.replaceAll("[","").replaceAll("]",""))==null?void 0:ct.split(":");h==null||h.forEach(Oe=>{var gt;(Oe==null?void 0:Oe.name)===(ot==null?void 0:ot[0])&&((gt=Oe==null?void 0:Oe.compData)==null||gt.forEach(tt=>{var Ve;(tt==null?void 0:tt.key)==="formContent"&&((Ve=tt==null?void 0:tt.contents)==null||Ve.forEach($e=>{($e==null?void 0:$e.prop)===(ot==null?void 0:ot[1])&&(Ue=$e==null?void 0:$e.value)}))}))}),Ne=Ne+r.value+Ue}}),j.key=Ne,j})),Q==null||Q.forEach(j=>{var ct,Ue,ot;let Ne=(ct=Re[j.key])==null?void 0:ct.find(Oe=>{var gt,tt,Ve,$e,et,Ye,ze;return((tt=(gt=Oe==null?void 0:Oe.value)==null?void 0:gt.pageData)==null?void 0:tt.name)===((et=($e=(Ve=j==null?void 0:j.value)==null?void 0:Ve[0])==null?void 0:$e.groups)==null?void 0:et[0])&&((ze=(Ye=Oe==null?void 0:Oe.value)==null?void 0:Ye.pageData)==null?void 0:ze.name)!==void 0}),ge=Ne==null?void 0:Ne.id,Le=(Ue=Ne==null?void 0:Ne.value)==null?void 0:Ue.pageData;Le.compData=(ot=Le.compData)==null?void 0:ot.map(Oe=>{var gt;return(Oe==null?void 0:Oe.key)==="formContent"&&(Oe.contents=(gt=Oe.contents)==null?void 0:gt.map(tt=>{var $e;let Ve=($e=j.value)==null?void 0:$e.find(et=>(et==null?void 0:et.key)===(tt==null?void 0:tt.prop));return Ve&&(tt.value=Ve.value),tt})),Oe}),P.push({id:ge,value:{pageData:Le}})})});let Ee=(re=v.cloneDeep(E))==null?void 0:re[0];(P==null?void 0:P.length)>0&&await v.batchUpdateInsofDataApi({dataList:P})}D.setFreshContent(!0)}V.setImportLoading(!1)}catch{v.ElMessage.error("方法执行错误,请查看方法!"),V.setImportLoading(!1)}S.value=!0},he=["createInsofDataApi"],Ge=vo(async J=>{se(J)},100),it=async J=>{var Xe,fe,z,X,pe;const M=v.cloneDeep(J);let xe,Ce=new WeakMap,Pe=await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:le.value});(fe=(Xe=Pe.data.result)==null?void 0:Xe.filter(ce=>{var G,ae;return((G=ce==null?void 0:ce.key)==null?void 0:G.pageKey)!=="menu"&&((ae=ce==null?void 0:ce.key)==null?void 0:ae.pageKey)!=="secret"}))==null||fe.forEach(ce=>{Ce[ce.key.pageKey]?Ce[ce.key.pageKey]=[...Ce[ce.key.pageKey],ce]:Ce[ce.key.pageKey]=[ce]}),J!=null&&J[0].path&&(xe=await(M==null?void 0:M.map(async(ce,G)=>{var I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be;const Z=(I=Ce[ce==null?void 0:ce.path])==null?void 0:I.filter(ke=>{var j;return((j=ke==null?void 0:ke.key)==null?void 0:j.type)==="data"});let re="";const Re=await Be.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);Z==null||Z.forEach(ke=>{var j,Ne,ge,Le,ct;((Ne=(j=ke==null?void 0:ke.value)==null?void 0:j.tableData)==null?void 0:Ne.算法名称)===((ge=M==null?void 0:M[G])==null?void 0:ge.method)&&(re=(ct=(Le=ke==null?void 0:ke.value)==null?void 0:Le.tableData)==null?void 0:ct.算法体)});const lt=await Be.getItemData(ce==null?void 0:ce.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce);let h="",_=(_e=(ie=(x=(W=lt==null?void 0:lt[0])==null?void 0:W.compData)==null?void 0:x.find(ke=>(ke==null?void 0:ke.key)==="header"))==null?void 0:ie.contents)==null?void 0:_e.findIndex(ke=>(ke==null?void 0:ke.prop)==="算法体");return(te=(E=lt==null?void 0:lt[0])==null?void 0:E.compData)==null||te.forEach(ke=>{var j;(ke==null?void 0:ke.key)==="tableContents"&&((j=ke==null?void 0:ke.contents)==null||j.forEach(Ne=>{Ne!=null&&Ne.find(ge=>ge===(ce==null?void 0:ce.method))&&(h=Ne[_])}))}),{buttonName:(($=M==null?void 0:M[G])==null?void 0:$.method)||((ne=(Ee=(P=Z==null?void 0:Z[0])==null?void 0:P.value)==null?void 0:Ee.tableData)==null?void 0:ne.算法名称),api:(re===""?(de=(Q=(H=Z==null?void 0:Z[0])==null?void 0:H.value)==null?void 0:Q.tableData)==null?void 0:de.算法体:re)||h,content:Re==null?void 0:Re.filter(ke=>ke.comp!=="methodButton"),extraContent:(De=v.cloneDeep(ce.value))==null?void 0:De.slice(1),methodName:(ce==null?void 0:ce.path)??"",extraValues:(be=M==null?void 0:M[G])==null?void 0:be.data}})));const Fe=M==null?void 0:M.map(async ce=>{var lt,h,_,I,W,x;const G=(lt=Pe.data.result)==null?void 0:lt.filter(ie=>{var _e,E,te;return((_e=ie==null?void 0:ie.key)==null?void 0:_e.parentTable)===""&&((E=ie==null?void 0:ie.key)==null?void 0:E.type)==="method"&&((te=ie==null?void 0:ie.key)==null?void 0:te.methodName)===ie.method}),ae=G==null?void 0:G[0],Z=(h=Pe.data.result)==null?void 0:h.filter(ie=>{var _e,E;return((_e=ie==null?void 0:ie.key)==null?void 0:_e.type)==="methodData"&&((E=ie==null?void 0:ie.key)==null?void 0:E.tableId)===(ae==null?void 0:ae.id)}),re=await Be.getItemData(w.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,Ce),Re=Z==null?void 0:Z[0];return{buttonName:(_=ae==null?void 0:ae.key)==null?void 0:_.methodKey,api:(W=(I=Re==null?void 0:Re.value)==null?void 0:I.tableData)==null?void 0:W[0],content:re==null?void 0:re.filter(ie=>ie.comp!=="methodButton"),extraContent:(x=v.cloneDeep(ce.value))==null?void 0:x.slice(1),methodName:(ce==null?void 0:ce.method)??""}}),qe=(z=J==null?void 0:J[0])!=null&&z.path&&((X=J==null?void 0:J[0])==null?void 0:X.path)!==""?await Promise.all(xe):await Promise.all(Fe);i.value=qe==null?void 0:qe.filter(ce=>ce==null?void 0:ce.extraContent),(pe=i.value)==null||pe.forEach(ce=>{var G;ce.api===""&&((G=ce.content)==null||G.forEach(ae=>{var Z;ae.comp=="Table"&&D.setExtraContents(Be.methodTableToContent(ae.compData,(Z=ce.extraContent)==null?void 0:Z[0]))}))})};return e.watch(()=>d.itemData,async()=>{L.value=="view"&&!S.value&&await it(v.cloneDeep(d.itemData)),S.value=!1},{immediate:!0,deep:!0}),(J,M)=>{var xe,Ce,Pe;return e.unref(L)!=="edit"?(e.openBlock(),e.createElementBlock("div",uc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((xe=i.value)==null?void 0:xe.filter(Fe=>(Fe==null?void 0:Fe.buttonName)!=="保存"),Fe=>{var qe;return e.openBlock(),e.createElementBlock("div",null,[Fe.api!==""?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,disabled:e.unref(K)===e.unref(w)&&!((qe=Fe==null?void 0:Fe.buttonName)!=null&&qe.includes("预览")),class:"calculator-content",modelValue:Fe.buttonName,onClickTrigger:Xe=>e.unref(Ge)(Fe),loading:C.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):e.createCommentVNode("",!0)])}),256)),e.createElementVNode("div",null,[e.unref(we)!==""&&((Pe=e.unref(w))==null?void 0:Pe[((Ce=e.unref(w))==null?void 0:Ce.length)-1])!==e.unref(r)?(e.openBlock(),e.createBlock(e.unref(No._sfc_main),{key:0,class:"calculator-content",onClickTrigger:ye,modelValue:"保存"})):e.createCommentVNode("",!0)]),u.value?(e.openBlock(),e.createBlock(Bt.ssFilePreview,{key:0,fileDataList:k.value,onDestroy:Ze},null,8,["fileDataList"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)}}},pc=Kt._export_sfc(dc,[["__scopeId","data-v-11fca7e0"]]),fc={};function vc(n,i){return" 567 "}const hc=Kt._export_sfc(fc,[["render",vc]]),gc={class:"module content"},mc={class:"module data"},yc={class:"module layout"},bc={class:"form-content"},kc=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"40%",title:"签名配置"}),u=e.ref("create"),k=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),g=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),D=e.ref({}),C=e.ref([]),V=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:C.value},{key:"signConfig",contents:D.value}]}),F=q=>{var K;D.value=v.cloneDeep(q),r("change",(K=V())==null?void 0:K.compData)},Y=q=>{var K,le;if((q==null?void 0:q.buttonName)==="确认"){const w=v.cloneDeep(q==null?void 0:q.content);switch(u.value){case"create":C.value.push({...w,index:((K=C.value)==null?void 0:K.length)+1});break}r("change",(le=V())==null?void 0:le.compData),d.visible=!1}else d.visible=!1},L=(q,K)=>{var le,w;switch(q){case"create":(le=f.value)==null||le.forEach(R=>{R.value=""}),u.value="create",d.visible=!0;break;case"update":(w=f.value)==null||w.forEach(R=>{R.value=K[R==null?void 0:R.prop]}),u.value="update",d.visible=!0;break;case"delete":C.value.splice(K,1),u.value="delete";break}},we=()=>{d.visible=!1};return e.watch(()=>s==null?void 0:s.itemContents,q=>{var K,le;q&&(D.value=((K=q==null?void 0:q.find(w=>w.key==="signConfig"))==null?void 0:K.contents)??{},C.value=((le=q==null?void 0:q.find(w=>w.key==="signTypeList"))==null?void 0:le.contents)??[])},{immediate:!0}),(q,K)=>{const le=e.resolveComponent("svg-icon"),w=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",gc,[K[2]||(K[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createVNode(w,{class:"module-icon",id:"themeButton",onClick:K[0]||(K[0]=R=>L("create"))},{icon:e.withCtx(()=>[e.createVNode(le,{name:"Plus",class:"icon-size"})]),default:e.withCtx(()=>[K[1]||(K[1]=e.createTextVNode(" 新增 "))]),_:1,__:[1]})]),e.createElementVNode("div",mc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(R,y)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:y},[e.createElementVNode("span",null,e.toDisplayString(R==null?void 0:R.label),1),e.createElementVNode("div",null,[e.createVNode(w,{type:"primary",size:"small",onClick:B=>L("update",{...R,index:y+1})},{default:e.withCtx(()=>K[3]||(K[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(w,{type:"danger",size:"small",onClick:B=>L("delete",y)},{default:e.withCtx(()=>K[4]||(K[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",yc,[e.createVNode(Bt.ssForm,{rowContents:g.value,onChange:F},null,8,["rowContents"])])]),e.createVNode(Zt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:we,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",bc,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:k.value,onOnButtonClick:Y},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),xc=Kt._export_sfc(kc,[["__scopeId","data-v-487e0536"]]),wc=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:i}){const s=n,r=i,d=e.ref(1),u=e.computed(()=>{var V,F;return(V=s==null?void 0:s.stepConfig)!=null&&V.allowTrigger?d.value:(F=s==null?void 0:s.stepConfig)==null?void 0:F.active}),k=(V,F)=>{d.value=F,r("clickStep",V,F)},g=V=>Bt.getComponent(V),f=()=>{var F;const V=(F=s==null?void 0:s.stepList)==null?void 0:F.find((Y,L)=>L+1===u.value);return console.log("findStep",V),V?V==null?void 0:V.children:[]},D=V=>{r("clickTrigger",V)},C=V=>{r("changeTrigger",V)};return(V,F)=>{var we,q,K,le,w;const Y=e.resolveComponent("el-step"),L=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(L,{direction:(we=n.stepConfig)==null?void 0:we.direction,active:u.value,"finish-status":"success",simple:(q=n.stepConfig)==null?void 0:q.simple,"align-center":((K=n.stepConfig)==null?void 0:K.alignCenter)??!0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,(R,y)=>(e.openBlock(),e.createBlock(Y,{key:y,class:"step-item",onClick:B=>k(R,y+1)},{title:e.withCtx(()=>[e.renderSlot(V.$slots,"title",{title:R==null?void 0:R.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(V.$slots,"description",{description:R==null?void 0:R.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(le=n.stepConfig)!=null&&le.allowTrigger&&((w=n.stepConfig)!=null&&w.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(R,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g(R==null?void 0:R.type)),{modelValue:R.value,"onUpdate:modelValue":B=>R.value=B,onClickTrigger:D,onChangeTrigger:C,content:R==null?void 0:R.content},e.createSlots({_:2},[e.renderList(V.$slots,(B,S)=>({name:S,fn:e.withCtx(ye=>[e.renderSlot(V.$slots,S,e.mergeProps({ref_for:!0},ye||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Dc=Kt._export_sfc(wc,[["__scopeId","data-v-d7c99969"]]),Cc=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:i}){const s=n,r=i,d=e.ref({}),u=e.ref([]),k=(g,f)=>{r("clickStep",g,f)};return e.watch(()=>s==null?void 0:s.itemData,g=>{var f,D;u.value=(f=g==null?void 0:g.find(C=>(C==null?void 0:C.key)==="stepList"))==null?void 0:f.contents,d.value=(D=g==null?void 0:g.find(C=>(C==null?void 0:C.key)==="stepConfig"))==null?void 0:D.contents},{immediate:!0,deep:!0}),(g,f)=>{const D=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Dc,{stepConfig:d.value,stepList:u.value,onClickStep:k},{icon:e.withCtx(()=>[e.createVNode(D,{name:"import"})]),title:e.withCtx(({title:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),description:e.withCtx(({description:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),_:1},8,["stepConfig","stepList"])}}}),_c=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(i,s)=>{const r=e.resolveComponent("el-timeline-item"),d=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(d,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(u,k)=>(e.openBlock(),e.createBlock(r,{key:k,timestamp:u.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"content",{content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Ec=Kt._export_sfc(_c,[["__scopeId","data-v-4172a886"]]),Sc={class:"line-content"},Tc={class:"line-time"},Ic=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const i=n,s=e.ref({}),r=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,d=>{var u,k;r.value=(u=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineList"))==null?void 0:u.contents,s.value=(k=d==null?void 0:d.find(g=>(g==null?void 0:g.key)==="timeLineConfig"))==null?void 0:k.contents},{immediate:!0}),(d,u)=>(e.openBlock(),e.createBlock(Ec,{activities:r.value,timeLineConfig:s.value},{content:e.withCtx(({content:k,timestamp:g})=>[e.createElementVNode("span",Sc,e.toDisplayString(k),1),e.createElementVNode("span",Tc,e.toDisplayString(g),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bc=Kt._export_sfc(Ic,[["__scopeId","data-v-b4d9deed"]]),Nc={class:"tabs-content"},Ac={__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const i=n,s=e.ref([]);return e.watch(()=>i==null?void 0:i.itemData,r=>{const d=r.find(u=>(u==null?void 0:u.key)=="stepList");d?s.value=d.contents.map(u=>({value:u.value||u.title,label:u.label||u.title,children:u.children||[]})):s.value=i==null?void 0:i.tabsData},{immediate:!0,deep:!0}),(r,d)=>(e.openBlock(),e.createElementBlock("div",Nc,[e.createVNode(Bt.ssTab,{tabsContents:s.value},null,8,["tabsContents"])]))}},Vc=Kt._export_sfc(Ac,[["__scopeId","data-v-40865f68"]]),Qn=v.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[]}),actions:{setItemData(n){this.itemData=n},setCurStructureCompIds(n){this.curStructureCompIds=n},setRefreshCurStructure(n){this.isRefreshCurStructure=n},setOriginalData(n){this.originalData=n},setExtraContents(n){this.extraContents=n},setNodeDev(n){this.nodeDev=n},setIsEdit(n){this.isEdit=n}}}),Oc={class:"type-select"},Mc=["onClick"],Lc={class:"list-icon"},zc={__name:"modelSelect",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=d=>{const u=v.cloneDeep(s.value);u.push({comp:d.comp,name:d.name,compData:[]}),i.setItemData(u)};return(d,u)=>{const k=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Oc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(g,f)=>(e.openBlock(),e.createElementBlock("div",{class:"type-list",key:f},[e.createElementVNode("div",{class:"list-content",onClick:D=>r(g)},[e.createElementVNode("div",Lc,[e.createVNode(k,{name:g.icon},null,8,["name"])]),e.createElementVNode("div",null,e.toDisplayString(g.name),1)],8,Mc)]))),128))])}}},Fc=Kt._export_sfc(zc,[["__scopeId","data-v-91799bf8"]]),Rc={class:"fill-content"},Pc={class:"operate-content"},$c={class:"collapse-title-content"},Kc={class:"collapse-title-item"},jc={key:1},Uc=["onClick"],Wc={class:"icon-content"},Hc={key:0,class:"edit-content"},qc=["onClick"],Gc={class:"comp-child"},Xc={__name:"modelFill",setup(n){const i=Qn(v.pinia),{itemData:s,originalData:r}=v.storeToRefs(i),d=e.ref([]);e.ref([]);const u=e.ref([]),k=e.ref([]),g=Y=>{var we;let L=(we=v.cloneDeep(k.value))==null?void 0:we.map((q,K)=>(Y===K&&(q.content=!0),q));k.value=L},f=Y=>{var we;let L=(we=v.cloneDeep(k.value))==null?void 0:we.map((q,K)=>(Y===K&&(q.content=!1),q));k.value=L,d.value=v.cloneDeep(s.value)},D=(Y,L)=>{var le;let we=(le=v.cloneDeep(k.value))==null?void 0:le.map((w,R)=>(Y===R&&(w.content=!1),w));k.value=we;const q=v.cloneDeep(s.value),K=q==null?void 0:q.filter((w,R)=>(R===Y&&(w.name=L),w));i.setOriginalData(K),i.setItemData(K)};e.watch(()=>s.value,()=>{var Y,L,we;!s.value||((Y=s.value)==null?void 0:Y.length)===0?d.value=[]:d.value=(L=v.cloneDeep(s.value))==null?void 0:L.filter(q=>(q==null?void 0:q.comp)!=="methodButton"),u.value=d.value,k.value=(we=v.cloneDeep(u.value))==null?void 0:we.map((q,K)=>({id:K,content:!1}))},{deep:!0,immediate:!0});const C=Y=>rn(Y),V=(Y,L,we)=>{var K,le;if(!Y)return;let q=v.cloneDeep(s.value);q=(K=q==null?void 0:q.map((w,R)=>(R===we&&(w.compData=Y),w)))==null?void 0:K.filter(w=>(w==null?void 0:w.comp)!=="methodButton"),k.value=(le=v.cloneDeep(q))==null?void 0:le.map((w,R)=>({id:R,content:!1})),i.setOriginalData(q),i.setItemData(q)},F=Y=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const L=v.cloneDeep(s.value),we=L==null?void 0:L.filter((q,K)=>K!==Y);i.setOriginalData(we),i.setItemData(we),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(Y,L)=>{const we=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rc,[L[1]||(L[1]=e.createElementVNode("div",{class:"fill-operate"},e.toDisplayString("操作栏"),-1)),e.createElementVNode("div",Pc,[e.createVNode(gr.default,{class:"collapse-content",collapseContents:d.value},{title:e.withCtx(({item:q,index:K})=>{var le,w,R,y,B,S,ye,Ze,rt,Ae;return[e.createElementVNode("div",$c,[e.createElementVNode("div",Kc,[(w=(le=k.value)==null?void 0:le.find(je=>je.id===K))!=null&&w.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"collapse-title",style:e.normalizeStyle({marginRight:q.name&&q.name!==""?"8px":"0px"})},e.toDisplayString(q.name),5)),(y=(R=k.value)==null?void 0:R.find(je=>je.id===K))!=null&&y.content?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(Bt._sfc_main$2,{modelValue:q.name,"onUpdate:modelValue":je=>q.name=je,onClick:L[0]||(L[0]=e.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):e.createCommentVNode("",!0),(S=(B=k.value)==null?void 0:B.find(je=>je.id===K))!=null&&S.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:2,onClick:e.withModifiers(je=>g(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Edit",style:{width:"16px",height:"16px"}})],8,Uc))]),e.createElementVNode("div",Wc,[(Ze=(ye=k.value)==null?void 0:ye.find(je=>je.id===K))!=null&&Ze.content?(e.openBlock(),e.createElementBlock("div",Hc,[e.createVNode(we,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:e.withModifiers(je=>f(K),["stop"])},null,8,["onClick"]),e.createVNode(we,{name:"Save",onClick:e.withModifiers(je=>D(K,q.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):e.createCommentVNode("",!0),(Ae=(rt=k.value)==null?void 0:rt.find(je=>je.id===K))!=null&&Ae.content?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:e.withModifiers(je=>F(K),["stop"]),class:"icon-content"},[e.createVNode(we,{name:"Delete",style:{width:"16px",height:"16px"}})],8,qc))])])]}),content:e.withCtx(({item:q,index:K})=>{var le,w;return[e.createElementVNode("div",Gc,[e.createTextVNode(e.toDisplayString(C(q.comp+"Operate"))+" ",1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C(q.comp+"Operate")),{itemContents:q==null?void 0:q.compData,originalItemContents:(w=(le=u.value)==null?void 0:le.find((R,y)=>y===K))==null?void 0:w.compData,onChange:R=>V(R,q,K)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},Yc=Kt._export_sfc(Xc,[["__scopeId","data-v-a46a44b9"]]),Jc={key:0,class:"show-content"},Zc={style:{display:"flex"}},Qc={__name:"modelShow",setup(n){const i=Qn(v.pinia),{itemData:s}=v.storeToRefs(i),r=e.ref([]);e.watch(()=>s.value,()=>{var u;!s.value||((u=s.value)==null?void 0:u.length)===0?r.value=[]:r.value=v.cloneDeep(s.value)},{deep:!0,immediate:!0});const d=u=>rn(u);return(u,k)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createElementBlock("div",Jc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(f,D)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:D},[e.createElementVNode("div",Zc,e.toDisplayString(f.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(f.comp)),{itemData:f==null?void 0:f.compData,childItemData:f==null?void 0:f.itemChildData,key:D},null,8,["itemData","childItemData"]))]))),128))])):e.createCommentVNode("",!0)}}},eu=Kt._export_sfc(Qc,[["__scopeId","data-v-3f3e863e"]]),tu={class:"tabs-header"},au={class:"tabs-list"},nu={class:"tab-name"},ou={class:"tab-actions"},ru=["onClick"],lu=["onClick"],iu=["onClick"],su={class:"model-operate"},cu={class:"model-select",style:{display:"unset"}},uu={class:"existing-components"},du={class:"component-list"},pu=["onClick"],fu={class:"component-info"},vu={class:"component-type"},hu={class:"component-name"},gu={class:"model-fill"},mu={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.ref([]),u=e.ref(!1),k=e.ref(""),g=e.ref({title:""}),f=e.ref(-1),D=e.ref(!1),C=e.ref(-1),V=e.ref(new WeakMap),F=e.ref(null),Y=Qn(v.pinia),{itemData:L}=v.storeToRefs(Y),we=()=>{k.value="新增标签页",g.value.title="",f.value=-1,u.value=!0},q=J=>{k.value="修改标签页",g.value.title=d.value[J].title,f.value=J,u.value=!0},K=J=>{const M=R(J);V.value.delete(M),d.value.splice(J,1),it()},le=()=>{if(g.value.title.trim()){if(f.value===-1){const J={title:g.value.title,value:g.value.title,label:g.value.title,children:[],id:w()};d.value.push(J)}else d.value[f.value].title=g.value.title,d.value[f.value].value=g.value.title,d.value[f.value].label=g.value.title;u.value=!1,it()}},w=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,R=J=>{const M=d.value[J];return M.id||(M.id=w()),M.id},y=J=>{var Ce;C.value=J;const M=R(J);F.value=v.cloneDeep(L.value);let xe=V.value.get(M);!xe&&((Ce=d.value[J].children)==null?void 0:Ce.length)>0&&(xe=Ze(d.value[J].children)),xe?Y.setItemData(v.cloneDeep(xe)):Y.setItemData([]),D.value=!0},B=e.computed(()=>{const J=Ut.useModelComp(v.pinia),M=v.storeToRefs(J).itemData.value;return console.log("可用组件数据",M),!M||!Array.isArray(M)?[]:M.filter(xe=>{var Ce;if(xe.comp==="Tabs"&&C.value>=0){const Pe=R(C.value);if((Ce=xe.compData)==null?void 0:Ce.some(qe=>{var Xe;return qe.key==="stepList"&&((Xe=qe.contents)==null?void 0:Xe.some(fe=>fe.id===Pe))}))return!1}return!0})}),S=J=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[J]||J,ye=J=>{var M;try{const xe=v.cloneDeep(J);xe.id=Date.now()+Math.random(),xe.comp==="Tabs"&&((M=xe.compData)==null||M.forEach(Pe=>{Pe.key==="stepList"&&Pe.contents&&Pe.contents.forEach(Fe=>{Fe.id=w()})}));const Ce=v.cloneDeep(L.value);Ce.push(xe),Y.setItemData(Ce)}catch(xe){console.error("添加组件失败:",xe)}},Ze=J=>J.map(M=>{var xe;switch(M.type){case"form":return{comp:"Form",name:M.value||"表单",compData:rt(M.content)};case"table":return{comp:"Table",name:M.value||"表格",compData:Ae(M.content)};default:return{comp:"Unknown",name:M.value||"",compData:((xe=M.content)==null?void 0:xe.originalData)||[]}}}),rt=J=>{if(!J)return[];const M=[];return J.rowContents&&M.push({key:"formContent",contents:J.rowContents}),J.buttonValue&&M.push({key:"formButton",contents:J.buttonValue}),typeof J.isEnableWrap<"u"&&M.push({key:"enableWrap",contents:J.isEnableWrap}),M},Ae=J=>[],je=()=>{if(C.value>=0&&C.value<d.value.length){const J=R(C.value);V.value.set(J,v.cloneDeep(L.value)),d.value[C.value].children=ee(L.value),console.log("保存后的数据",ee(L.value))}D.value=!1,C.value=-1,F.value=null,it()},Ie=()=>{F.value&&Y.setItemData(v.cloneDeep(F.value)),D.value=!1,C.value=-1,F.value=null},O=()=>{D.value&&Ie()},ee=J=>{if(!Array.isArray(J))throw new Error("sourceData must be an array");return J.map((M,xe)=>{if(!M||typeof M!="object")return M;const{comp:Ce,name:Pe,compData:Fe}=M;switch(Ce){case"Form":return{type:"form",content:se(Fe||[]),value:"表单"};case"Table":return{type:"table",content:he(Fe||[]),value:"表格"};default:return{type:"xxx",content:Ge(Fe||[]),value:""}}})},se=J=>{const M={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},xe={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return J.forEach((Ce,Pe)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${Pe}:`,Ce);return}const{key:Fe,contents:qe}=Ce,Xe=xe[Fe];if(!Xe){console.warn(`Unknown Form config key: ${Fe}`);return}Fe==="enableWrap"?M[Xe]=!!qe:M[Xe]=Array.isArray(qe)?qe:[]}),M},he=J=>{const M={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},xe={header:"columns",tableContents:"tableData"};return J.forEach((Ce,Pe)=>{if(!Ce||typeof Ce!="object"){console.warn(`Invalid config at index ${Pe}:`,Ce);return}const{key:Fe,contents:qe}=Ce,Xe=xe[Fe];if(!Xe){console.warn(`Unknown Table config key: ${Fe}`);return}M[Xe]=Array.isArray(qe)?qe:[]}),M},Ge=J=>(console.log("Default conversion logic - to be implemented"),{originalData:J,processed:!1,componentType:"unknown"}),it=()=>{const J=[{key:"stepList",contents:d.value}];r("change",J)};return e.watch(()=>s.itemContents,J=>{if(J&&J.length>0){const M=J.find(xe=>xe.key==="stepList");M&&M.contents&&(d.value=M.contents.map(xe=>({title:xe.title||"",value:xe.value||xe.title||"",label:xe.label||xe.title||"",children:xe.children||[],id:xe.id||w()})))}},{immediate:!0,deep:!0}),(J,M)=>{const xe=e.resolveComponent("svg-icon"),Ce=e.resolveComponent("el-input"),Pe=e.resolveComponent("el-form-item"),Fe=e.resolveComponent("el-form");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tu,[M[6]||(M[6]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createElementVNode("button",{onClick:we},[e.createVNode(xe,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),M[5]||(M[5]=e.createTextVNode(" 新增标签页 "))])]),e.createElementVNode("div",au,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(qe,Xe)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:Xe},[e.createElementVNode("span",nu,e.toDisplayString(qe.title),1),e.createElementVNode("div",ou,[e.createElementVNode("button",{onClick:fe=>q(Xe)},"修改标题",8,ru),e.createElementVNode("button",{onClick:fe=>y(Xe)},"布局调整",8,lu),e.createElementVNode("button",{onClick:fe=>K(Xe)},"删除",8,iu)])]))),128))]),e.createVNode(Zt.ssDialog,{modelValue:u.value,"onUpdate:modelValue":M[2]||(M[2]=qe=>u.value=qe),title:k.value,onBeforeDestroy:M[3]||(M[3]=qe=>u.value=!1)},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:M[1]||(M[1]=qe=>u.value=!1)},"取消"),e.createElementVNode("button",{type:"primary",onClick:le},"确定")]),default:e.withCtx(()=>[e.createVNode(Fe,{model:g.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(Pe,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ce,{modelValue:g.value.title,"onUpdate:modelValue":M[0]||(M[0]=qe=>g.value.title=qe),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e.createVNode(Zt.ssDialog,{modelValue:D.value,"onUpdate:modelValue":M[4]||(M[4]=qe=>D.value=qe),title:"布局调整",fullScreen:"",onBeforeDestroy:O},{footer:e.withCtx(()=>[e.createElementVNode("button",{onClick:Ie},"取消"),e.createElementVNode("button",{onClick:je},"确定")]),default:e.withCtx(()=>[e.createElementVNode("div",su,[e.createElementVNode("div",cu,[e.createVNode(Fc),e.createElementVNode("div",uu,[M[8]||(M[8]=e.createElementVNode("h5",null,"添加已有组件",-1)),e.createElementVNode("div",du,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,qe=>(e.openBlock(),e.createElementBlock("div",{key:qe.id,class:"component-item",onClick:Xe=>ye(qe)},[e.createElementVNode("div",fu,[e.createElementVNode("span",vu,e.toDisplayString(S(qe.comp)),1),e.createElementVNode("span",hu,e.toDisplayString(qe.name),1)]),M[7]||(M[7]=e.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,pu))),128))])])]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:J.innerWidth},[e.createVNode(eu)])),e.createElementVNode("div",gu,[e.createVNode(Yc)])])]),_:1},8,["modelValue"])])}}},yu=Kt._export_sfc(mu,[["__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 ku(n){return{type:"line",...n}}function xu(){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 wu(n){return{type:"bar",barWidth:"60%",...n}}function Du(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function Cu(n){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...n}}const Sa={line:{initBaseoptions:bu,initSeries:ku},bar:{initBaseoptions:xu,initSeries:wu},pie:{initBaseoptions:Du,initSeries:Cu}},zo=Ut.useMenuState(v.pinia),Er=(n,i)=>{var C;const s=[],r=[],{group:d,nameCol:u,valueCol:k}=i||{},g=n==null?void 0:n.find(V=>{const{name:F}=V;return F===d});if(!g)return{names:s,values:r};const f=(C=g==null?void 0:g.compData)==null?void 0:C.find(V=>{const{key:F}=V;return F==="tableContents"});return((f==null?void 0:f.contents)||[]).forEach(V=>{const F=V==null?void 0:V[0];let Y=!1;v.isObject(F)&&(F!=null&&F.id)&&(Y=!0);let L=u,we=k;Y&&(L=L+1,we=we+1);const q=V==null?void 0:V[L],K=V==null?void 0:V[we];s.push(q),r.push(K)}),{names:s,values:r}},_u=async n=>{const{menu:i,mainKey:s,detailGroup:r,detailNameCol:d,detailValueCol:u,isSelfDetail:k}=n||{};let g=null;const f=sessionStorage.getItem("systemKey");if(k&&zo.activeMenuPath&&(g=await Be.getItemData(`${zo.activeMenuPath}`,f,"")),!k){const D=i==null?void 0:i.join("/");g=await Be.getItemData(`${D}^${s}`,f,"")}return Er(g,{group:r,nameCol:d,valueCol:u})},Eu=async n=>{const{menu:i,group:s,nameCol:r,valueCol:d}=n||{},u=i==null?void 0:i.join("/"),k=sessionStorage.getItem("systemKey"),g=await Be.getItemData(u,k,"");return Er(g,{group:s,nameCol:r,valueCol:d})},ho=async(n,i)=>{const s={names:[],values:[]},{menu:r,group:d,nameCol:u,valueCol:k}=n||{};if(!r.length||!d)return s;const{mainKey:g,group:f,nameCol:D,valueCol:C,isSelfDetail:V}=i||{};return g&&f&&Bt.isNumber(D)&&Bt.isNumber(C)?await _u({menu:r,mainKey:g,detailGroup:f,detailNameCol:D,detailValueCol:C,isSelfDetail:V}):Bt.isNumber(u)&&Bt.isNumber(k)?await Eu({menu:r,group:d,nameCol:u,valueCol:k}):s},Su=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Sa==null?void 0:Sa[r];if(!u)return;const{initBaseoptions:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:D,values:C}=await ho(i,s);if(!D||!C)return f;f.xAxis.data=D;const V=g({data:C});return f.series.push(V),f},Tu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Sa==null?void 0:Sa[r];if(!u)return;const{initBaseoptions:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:D,values:C}=await ho(i,s);if(!D||!C)return f;f.xAxis.data=D;const V=g({data:C});return f.series.push(V),f},Iu=async({chartBaseConfig:n,chartDataConfig:i,chartDetailConfig:s})=>{const{type:r,title:d}=n||{},u=Sa==null?void 0:Sa[r];if(!u)return;const{initBaseoptions:k,initSeries:g}=u,f=k();f.title.text=d??"";const{names:D,values:C}=await ho(i,s);if(!D||!C)return f;const V=[];for(let Y=0;Y<D.length;Y++){const L=D[Y],we=C[Y];V.push({name:L,value:we})}const F=g({data:V});return f.series.push(F),f},Bu=async(n=[])=>{var k,g,f;const i=((k=n==null?void 0:n.find(D=>D.key==="chartBaseConfig"))==null?void 0:k.contents)??{},s=((g=n==null?void 0:n.find(D=>D.key==="chartDataConfig"))==null?void 0:g.contents)??{},r=((f=n==null?void 0:n.find(D=>D.key==="chartDetailConfig"))==null?void 0:f.contents)??{},{type:d}=i;let u={};return d==="line"&&(u=await Su({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="bar"&&(u=await Tu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),d==="pie"&&(u=await Iu({chartBaseConfig:i,chartDataConfig:s,chartDetailConfig:r})),u},Nu=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(n){const i=n,s=e.ref({});e.onMounted(async()=>{const d=i==null?void 0:i.itemData;s.value=await Bu(d)});const r=e.computed(()=>(i==null?void 0:i.height)||"300px");return(d,u)=>(e.openBlock(),e.createElementBlock("div",{class:"eCharts",style:e.normalizeStyle({height:r.value})},[e.createVNode(Fl.ssChart,{optionContents:s.value},null,8,["optionContents"])],4))}}),Au=Kt._export_sfc(Nu,[["__scopeId","data-v-d4c081e8"]]),Vu={class:"chart-module layout"},Ou={class:"chart-module content"},Mu={class:"chart-module content"},Lu={class:"form-content"},zu={class:"dialog-footer"},Fu={class:"form-content"},Ru={class:"dialog-footer"},Pu={class:"form-content"},$u={class:"dialog-footer"},Ku=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i,d=e.reactive({visible:!1,width:"840",title:"基础配置"}),u=e.ref([]),k=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],g=e.ref({}),f=()=>{var G;u.value=k(),(G=u.value)==null||G.forEach(ae=>{var re;const Z=ae==null?void 0:ae.prop;ae.value=(re=g==null?void 0:g.value)==null?void 0:re[Z]}),d.visible=!0},D=G=>{g.value=G},C=()=>{var G;d.visible=!1,r("change",(G=pe())==null?void 0:G.compData)},V=e.reactive({visible:!1,width:"840",title:"数据配置"}),F=e.ref([]),Y=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],L=e.ref({}),we=()=>{const G=F.value,ae=v.cloneDeep(G);return ae==null||ae.forEach(Z=>{var Re;const re=Z==null?void 0:Z.prop;Z.value=(Re=L.value)==null?void 0:Re[re]}),ae},q=G=>{var Z;L.value=G;const ae=we();F.value=ae,r("change",(Z=pe())==null?void 0:Z.compData)},K=async()=>{const G=await Be.getMenusContent(),ae=we();ae==null||ae.forEach(Z=>{(Z==null?void 0:Z.prop)==="menu"&&(Z.contents=G)}),F.value=ae,V.visible=!0,await qe(L.value.menu),await z(L.value.group)},le=e.reactive({visible:!1,width:"840",title:"详情页配置"}),w=e.ref([]),R=()=>[{label:"详情页主键",prop:"mainKey",type:"select",contents:[]},{label:"使用当前详情页内容",prop:"isSelfDetail",type:"switch"},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],y=e.ref({}),B=()=>{const G=w.value,ae=v.cloneDeep(G);return ae==null||ae.forEach(Z=>{var Re;const re=Z==null?void 0:Z.prop;Z.value=(Re=y.value)==null?void 0:Re[re]}),ae},S=G=>{var Z;y.value=G;const ae=B();w.value=ae,r("change",(Z=pe())==null?void 0:Z.compData)},ye=async()=>{await O();const G=v.cloneDeep(Ze.value),ae=B();ae==null||ae.forEach(Z=>{var Re;const re=Z==null?void 0:Z.prop;Z.value=(Re=y==null?void 0:y.value)==null?void 0:Re[re],re==="mainKey"&&(Z.contents=G)}),w.value=ae,le.visible=!0},Ze=e.ref([]),rt=e.ref([]),Ae=e.ref({}),je=e.ref({}),Ie=()=>{const{compData:G}=Ce.value||{},ae=G==null?void 0:G.find(I=>{const{key:W}=I;return W==="header"}),Z=(ae==null?void 0:ae.contents)||[],re=Z==null?void 0:Z.filter((I,W)=>{const{label:x}=I;return x!=="操作"}),Re=re==null?void 0:re.findIndex((I,W)=>{const{isMainKey:x}=I;return x});if(Re<0)return[];const lt=G==null?void 0:G.find(I=>{const{key:W}=I;return W==="tableContents"}),h=(lt==null?void 0:lt.contents)||[];return h==null?void 0:h.map(I=>{const W=I==null?void 0:I[0];let x=Re;v.isObject(W)&&(W!=null&&W.id)&&(x=x+1);const ie=I==null?void 0:I[x];return{label:ie,value:ie}})},O=async()=>{const G=await Ie();Ze.value=G},ee=async G=>{const ae=sessionStorage.getItem("systemKey");return await Be.getItemData(G,ae,"")},se=async G=>{const ae=G;rt.value=ae==null?void 0:ae.map(Z=>{const{name:re}=Z;return Ae.value[re]=Z,{label:re,value:re}})},he=G=>{const{comp:ae,compData:Z}=je.value||{};if(ae==="Table"){let re=B();re=re.filter(Re=>{const{prop:lt}=Re;return lt!=="formItems"}),Xe(re,Z),w.value=re}},Ge=async()=>{var Z,re;const G=(Z=y==null?void 0:y.value)==null?void 0:Z.mainKey,ae=(re=L==null?void 0:L.value)==null?void 0:re.menu;if(G){const lt=`${ae==null?void 0:ae.join("/")}^${G}`,h=await ee(lt);await se(h);const _=B();_==null||_.forEach(I=>{(I==null?void 0:I.prop)==="group"&&(I.contents=rt.value)}),w.value=_}};e.watch(()=>{var G;return(G=y==null?void 0:y.value)==null?void 0:G.mainKey},async(G,ae)=>{G!=ae&&G&&await Ge()});const it=async G=>{const ae=Ae.value[G];je.value=ae,await he()};e.watch(()=>{var G;return(G=y==null?void 0:y.value)==null?void 0:G.group},async(G,ae)=>{G!=ae&&G&&it(G)});const J=async()=>{var ae;await Ge();const G=(ae=y.value)==null?void 0:ae.group;await it(G)},M=e.ref([]),xe=e.ref({}),Ce=e.ref({}),Pe=async G=>{const ae=G==null?void 0:G.join("/"),Z=sessionStorage.getItem("systemKey");return await Be.getItemData(ae,Z,"")},Fe=async G=>{const ae=await Pe(G);M.value=ae==null?void 0:ae.map(Z=>{const{name:re}=Z;return xe.value[re]=Z,{label:re,value:re}})},qe=async(G,ae)=>{await Fe(G);const Z=we();Z==null||Z.forEach(re=>{(re==null?void 0:re.prop)==="group"&&(re.contents=M.value)}),F.value=Z};e.watch(()=>{var G;return(G=L==null?void 0:L.value)==null?void 0:G.menu},async(G,ae)=>{const Z=G==null?void 0:G.join("/"),re=ae==null?void 0:ae.join("/");Z!=re&&await qe(G)});const Xe=(G,ae)=>{const Z=ae==null?void 0:ae.find(h=>{const{key:_}=h;return _==="header"}),re=(Z==null?void 0:Z.contents)||[],Re=re==null?void 0:re.filter((h,_)=>{const{label:I}=h;return I!=="操作"}),lt=Re==null?void 0:Re.map((h,_)=>{const{label:I}=h;return{label:I,value:_}});G==null||G.forEach(h=>{const _=h==null?void 0:h.prop;(_==="nameCol"||_==="valueCol")&&(h.contents=lt)})},fe=G=>{const{comp:ae,compData:Z}=Ce.value||{};if(ae==="Table"){L.value.formItems=[];let re=we();re=re.filter(Re=>{const{prop:lt}=Re;return lt!=="formItems"}),Xe(re,Z),F.value=re}},z=async G=>{const ae=xe.value[G];Ce.value=ae,await fe()};e.watch(()=>{var G;return(G=L==null?void 0:L.value)==null?void 0:G.group},async(G,ae)=>{G!=ae&&z(G)});const X=async()=>{var Z,re;const G=(Z=L.value)==null?void 0:Z.menu;await qe(G);const ae=(re=L.value)==null?void 0:re.group;await z(ae)},pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:g.value},{key:"chartDataConfig",contents:L.value},{key:"chartDetailConfig",contents:y.value}]}),ce=()=>{d.visible=!1,V.visible=!1,le.visible=!1};return e.onMounted(async()=>{var ae,Z,re;F.value=Y(),w.value=R();const G=s==null?void 0:s.itemContents;g.value=((ae=G==null?void 0:G.find(Re=>Re.key==="chartBaseConfig"))==null?void 0:ae.contents)??{},L.value=((Z=G==null?void 0:G.find(Re=>Re.key==="chartDataConfig"))==null?void 0:Z.contents)??{},await X(),y.value=((re=G==null?void 0:G.find(Re=>Re.key==="chartDetailConfig"))==null?void 0:re.contents)??{},await J()}),(G,ae)=>{const Z=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Vu,[ae[4]||(ae[4]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createVNode(Z,{id:"themeButton",onClick:ae[0]||(ae[0]=re=>f())},{default:e.withCtx(()=>ae[3]||(ae[3]=[e.createTextVNode(" 修改 ")])),_:1,__:[3]})]),e.createElementVNode("div",Ou,[ae[6]||(ae[6]=e.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),e.createVNode(Z,{id:"themeButton",onClick:ae[1]||(ae[1]=re=>K())},{default:e.withCtx(()=>ae[5]||(ae[5]=[e.createTextVNode(" 修改 ")])),_:1,__:[5]})]),e.createElementVNode("div",Mu,[ae[8]||(ae[8]=e.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),e.createVNode(Z,{id:"themeButton",onClick:ae[2]||(ae[2]=re=>ye())},{default:e.withCtx(()=>ae[7]||(ae[7]=[e.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),e.createVNode(Zt.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:ce,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",Lu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:u.value,key:u.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",zu,[e.createVNode(Z,{class:"cancel-button button",onClick:ce,id:"themeBorderButton"},{default:e.withCtx(()=>ae[9]||(ae[9]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[9]}),e.createVNode(Z,{class:"ok-button button",onClick:C,id:"themeButton"},{default:e.withCtx(()=>ae[10]||(ae[10]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),e.createVNode(Zt.ssDialog,{visible:V.visible,title:V.title,onBeforeDestroy:ce,width:V.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:F.value,key:F.value,isEnableWrap:!0,onChange:q},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",Ru,[e.createVNode(Z,{class:"cancel-button button",onClick:ce,id:"themeBorderButton"},{default:e.withCtx(()=>ae[11]||(ae[11]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[11]}),e.createVNode(Z,{class:"ok-button button",onClick:ce,id:"themeButton"},{default:e.withCtx(()=>ae[12]||(ae[12]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),e.createVNode(Zt.ssDialog,{visible:le.visible,title:le.title,onBeforeDestroy:ce,width:le.width},{default:e.withCtx(()=>[e.createElementVNode("div",Pu,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:w.value,key:w.value,isEnableWrap:!0,onChange:S},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",$u,[e.createVNode(Z,{class:"cancel-button button",onClick:ce,id:"themeBorderButton"},{default:e.withCtx(()=>ae[13]||(ae[13]=[e.createTextVNode(e.toDisplayString("取消"))])),_:1,__:[13]}),e.createVNode(Z,{class:"ok-button button",onClick:ce,id:"themeButton"},{default:e.withCtx(()=>ae[14]||(ae[14]=[e.createTextVNode(e.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),ju=Kt._export_sfc(Ku,[["__scopeId","data-v-fe119645"]]);var Fn={exports:{}},Uu=Fn.exports,Fo;function Wu(){return Fo||(Fo=1,function(n,i){(function(s,r){r()})(Uu,function(){function s(D,C){return typeof C>"u"?C={autoBom:!1}:typeof C!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),C={autoBom:!C}),C.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(D.type)?new Blob(["\uFEFF",D],{type:D.type}):D}function r(D,C,V){var F=new XMLHttpRequest;F.open("GET",D),F.responseType="blob",F.onload=function(){f(F.response,C,V)},F.onerror=function(){console.error("could not download file")},F.send()}function d(D){var C=new XMLHttpRequest;C.open("HEAD",D,!1);try{C.send()}catch{}return 200<=C.status&&299>=C.status}function u(D){try{D.dispatchEvent(new MouseEvent("click"))}catch{var C=document.createEvent("MouseEvents");C.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),D.dispatchEvent(C)}}var k=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Be.commonjsGlobal=="object"&&Be.commonjsGlobal.global===Be.commonjsGlobal?Be.commonjsGlobal:void 0,g=k.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=k.saveAs||(typeof window!="object"||window!==k?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(D,C,V){var F=k.URL||k.webkitURL,Y=document.createElement("a");C=C||D.name||"download",Y.download=C,Y.rel="noopener",typeof D=="string"?(Y.href=D,Y.origin===location.origin?u(Y):d(Y.href)?r(D,C,V):u(Y,Y.target="_blank")):(Y.href=F.createObjectURL(D),setTimeout(function(){F.revokeObjectURL(Y.href)},4e4),setTimeout(function(){u(Y)},0))}:"msSaveOrOpenBlob"in navigator?function(D,C,V){if(C=C||D.name||"download",typeof D!="string")navigator.msSaveOrOpenBlob(s(D,V),C);else if(d(D))r(D,C,V);else{var F=document.createElement("a");F.href=D,F.target="_blank",setTimeout(function(){u(F)})}}:function(D,C,V,F){if(F=F||open("","_blank"),F&&(F.document.title=F.document.body.innerText="downloading..."),typeof D=="string")return r(D,C,V);var Y=D.type==="application/octet-stream",L=/constructor/i.test(k.HTMLElement)||k.safari,we=/CriOS\/[\d]+/.test(navigator.userAgent);if((we||Y&&L||g)&&typeof FileReader<"u"){var q=new FileReader;q.onloadend=function(){var w=q.result;w=we?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),F?F.location.href=w:location=w,F=null},q.readAsDataURL(D)}else{var K=k.URL||k.webkitURL,le=K.createObjectURL(D);F?F.location=le:location.href=le,F=null,setTimeout(function(){K.revokeObjectURL(le)},4e4)}});k.saveAs=f.saveAs=f,n.exports=f})}(Fn)),Fn.exports}Wu();const jn=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DfsfEirQ.cjs")).then(n=>n.index));jn.install=n=>{n.component("ssMenu",jn)};const Sr={__name:"index",props:{name:String},setup(n){const i=n,s=e.computed(()=>v.ElIcons[i.name]);return e.onMounted(()=>{}),(r,d)=>{const u=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(u,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.value)))]),_:1})}}},Tr=(n,i,s=0)=>{let r=n;return r!=null&&r.every(d=>Array.isArray(d))&&(r!=null&&r.every(d=>Array.isArray(d)&&d.length===1)?r=r==null?void 0:r.filter(d=>(d==null?void 0:d[0])!==(i==null?void 0:i[s])):r=r==null?void 0:r.map(d=>{if(d!=null&&d.find(u=>u===(i==null?void 0:i[s]))&&(i==null?void 0:i.length)!==1){let u=v.cloneDeep(i),k=d==null?void 0:d.filter(C=>C!==(u==null?void 0:u[s])),g=s+1,f=Tr(k,u,g),D=[];D.push(d==null?void 0:d[0]),f==null||f.forEach(C=>{D.push(C)}),d=D}return d})),r},eo=(n,i,s,r=0)=>{let d=n;return d!=null&&d.every(u=>Array.isArray(u))&&(d!=null&&d.every(u=>Array.isArray(u)&&u.length===1)?d.push([s]):d=d==null?void 0:d.map(u=>{if(u!=null&&u.find(k=>k===(i==null?void 0:i[r]))&&(i==null?void 0:i.length)!==1){let k=v.cloneDeep(i),g=u==null?void 0:u.filter(V=>V!==(k==null?void 0:k[r])),f=r+1,D=eo(g,k,s,f),C=[];C.push(u==null?void 0:u[0]),D==null||D.forEach(V=>{C.push(V)}),u=C}return u})),d},go=(n,i,s,r,d=0)=>{let u=n;return u!=null&&u.every(k=>Array.isArray(k))&&(u!=null&&u.every(k=>Array.isArray(k)&&k.length===1)?u=u==null?void 0:u.map(k=>((k==null?void 0:k[0])===s&&(k=[r]),k)):u=u==null?void 0:u.map(k=>{if(k!=null&&k.find(g=>g===(i==null?void 0:i[d]))&&(i==null?void 0:i.length)!==1){let g=v.cloneDeep(i),f=k==null?void 0:k.filter(F=>F!==(g==null?void 0:g[d])),D=d+1,C=go(f,g,s,r,D),V=[];V.push(k==null?void 0:k[0]),C==null||C.forEach(F=>{V.push(F)}),k=V}return k})),u};function Ir(n="menu"){return{name:n,components:{SvgIcon:Rl.SvgIcon,ssMenu:jn,DynamicIcon:Sr,ssDialog:Zt.ssDialog,ssInput:Bt._sfc_main$2},setup(i,{emit:s}){const r=e.defineProps({mode:{type:String,default:"vertical"}}),d=e.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),u=Ut.useMenuState(),k=Ut.useModelComp(v.pinia),g=v.useLoginState(v.pinia),{loginUserInfo:f}=v.storeToRefs(g),D=e.ref(0),C=Pl.useRouter(),V=e.ref(),{asideMenus:F,menuTriggerType:Y,platform:L}=v.storeToRefs(u),{fixMenuStatus:we}=v.storeToRefs(k),q=e.computed(()=>r==null?void 0:r.mode),K=fe=>fe==null?void 0:fe.map(X=>{var pe,ce;return!(X!=null&&X.children)||((pe=X==null?void 0:X.children)==null?void 0:pe.length)===0?X.config=d.value:X!=null&&X.children&&((ce=X==null?void 0:X.children)==null?void 0:ce.length)>0&&(X.children=K(X.children)),X}),le=e.computed(()=>{let fe=[...F.value];if((fe==null?void 0:fe.length)===0)return C.push("/"),[];const z=Ze(fe,S.value);return z.isFlag||(fe=z==null?void 0:z.data),fe=fe==null?void 0:fe.map(X=>{var pe,ce;return!(X!=null&&X.children)||((pe=X==null?void 0:X.children)==null?void 0:pe.length)===0?X.config=d.value:X!=null&&X.children&&((ce=X==null?void 0:X.children)==null?void 0:ce.length)>0&&(X.children=K(X.children)),X}),fe}),w=async(fe,z)=>{k.setRouteToChildPath(""),u.setMenuTriggerType("click"),u.setActiveMenuPath(fe==null?void 0:fe.path),u.setActiveAsideMenu(fe),fe.isRouter?C.push(fe.path):C.push("/"),s("node-click",fe,z)},R=async fe=>{const z=v.findNodeByPropInTree(le.value,"path",fe);u.setActiveAsideMenu(z),k.setRouteToChildPath(""),we.value?k.setFixMenuStatus(!1):(qe.value&&(Y.value="open"),Y.value==="click"?D.value===1?u.setActiveMenuPath(sessionStorage.getItem("pageKey")):u.setActiveMenuPath(fe):qe.value||(u.setMenuTriggerType("click"),u.setActiveMenuPath(fe))),fe!=null&&fe.startsWith("/")?C.push(fe):C.push("/"),D.value++},y=fe=>{qe.value||u.setActiveMenuPath(fe)},B=fe=>{const z=document.documentElement;fe==null||fe.forEach(X=>{z.style.setProperty(X.name,X.value)})};e.onMounted(()=>{D.value=1});const S=e.computed(()=>{const fe=sessionStorage.getItem("authority");return fe?JSON.parse(fe):[]});e.watch(()=>L.value,fe=>{fe==="browser"?B(yn.browserVerticalMenuClasses):fe==="client"?(B(yn.clientHorizontalMenuClasses),B(yn.clientVerticalMenuClasses)):fe==="three"&&(B(yn.threeHorizontalMenuClasses),B(yn.threeVerticalMenuClasses))},{immediate:!0});const ye=(fe,z)=>{function X(pe){pe==null||pe.forEach(ce=>{var ae,Z;const G=(ae=ce==null?void 0:ce.path)!=null&&ae.startsWith("/")?(Z=ce==null?void 0:ce.path)==null?void 0:Z.substring(1):ce==null?void 0:ce.path;ce.show=z==null?void 0:z.some(re=>re==null?void 0:re.includes(G)),ce.children&&X(ce.children)})}return X(fe),fe},Ze=(fe,z)=>{if(Array.isArray(z)){const X=Array.from(new Set(z==null?void 0:z.map(pe=>pe.substring(0,pe.lastIndexOf("/")))));return{data:ye(fe,X),isFlag:!1}}else return{isFlag:(z==null?void 0:z.toUpperCase())==="SUPERADMIN"}},rt=e.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Ae=fe=>rn(fe),je=e.ref({}),Ie=e.ref([]),O=e.ref({}),ee=e.ref({}),se=fe=>{switch(fe){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},he=e.ref({}),Ge=fe=>{u.setCacheInputMenu({type:rt.type,data:fe}),u.setIsRefreshMenus(!0)},it=async(fe,z,X)=>{var pe,ce,G,ae,Z,re,Re,lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve,$e,et,Ye,ze;if(z==="create"){let at=(X==null?void 0:X.title)+"(1)",ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(ce=(pe=ve==null?void 0:ve.data)==null?void 0:pe.result)==null?void 0:ce[0],Me=(G=Se==null?void 0:Se.value)==null?void 0:G.pageData;Me.compData=(ae=Me.compData)==null?void 0:ae.map(ue=>{var He;return(ue==null?void 0:ue.key)==="menuContents"&&(ue.contents=eo(ue.contents,(He=X==null?void 0:X.path)==null?void 0:He.split("/"),at)),ue}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:Me}});let Qe=(re=(Z=X==null?void 0:X.path)==null?void 0:Z.split("/"))==null?void 0:re.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}),A=await Be.getItemData((h=(lt=(Re=X==null?void 0:X.path)==null?void 0:Re.split("/"))==null?void 0:lt.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:h.join("/"),sessionStorage.getItem("systemKey"),"");if(Qe.push(at),Qe=Qe==null?void 0:Qe.join("/"),(A==null?void 0:A.length)>0){let ue=A==null?void 0:A[0],He=(I=(_=ue==null?void 0:ue.compData)==null?void 0:_.find(me=>(me==null?void 0:me.key)==="header"))==null?void 0:I.contents;if(((W=He==null?void 0:He[0])==null?void 0:W.directiveLabel)==="#isMain"){let me=(x=He==null?void 0:He[0])==null?void 0:x.prop,nt=(_e=(ie=ue==null?void 0:ue.compData)==null?void 0:ie.find(yt=>(yt==null?void 0:yt.key)==="tableContents"))==null?void 0:_e.contents,kt;nt==null||nt.forEach(yt=>{var ht,dt;if(yt.length===1)((ht=yt==null?void 0:yt[0])==null?void 0:ht[me])===(X==null?void 0:X.title)&&(kt=yt==null?void 0:yt[0],kt[me]=at);else{let ft=(dt=He==null?void 0:He.filter(Vt=>Vt!=="操作"))==null?void 0:dt.map(Vt=>Vt==null?void 0:Vt.prop),_t=yt==null?void 0:yt.filter(Vt=>!(Vt!=null&&Vt.id)),Mt=Be.getValueToObjectValue(_t,ft);Mt[me]=at,kt=Mt}}),await v.createInsofDataApi({key:{type:"data",pageKey:($=(te=(E=X==null?void 0:X.path)==null?void 0:E.split("/"))==null?void 0:te.filter((yt,ht)=>{var dt,ft;return ht!==((ft=(dt=X==null?void 0:X.path)==null?void 0:dt.split("/"))==null?void 0:ft.length)-1}))==null?void 0:$.join("/"),tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(P=f.value)==null?void 0:P.id,createUserLayer:((Ee=f.value)==null?void 0:Ee.dept)||((ne=f.value)==null?void 0:ne.部门名称)},value:{tableData:kt}})}}await Be.newLoadingConstruct(X==null?void 0:X.path,Qe),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((de=(Q=(H=X==null?void 0:X.path)==null?void 0:H.split("/"))==null?void 0:Q.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:de.join("/")),u.setActiveTopMenuPath((be=(De=X==null?void 0:X.path)==null?void 0:De.split("/"))==null?void 0:be[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}else if(z==="update")V.value=X;else if(z==="delete"){let at=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:X==null?void 0:X.path}}),ve=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),Se=(j=(ke=ve==null?void 0:ve.data)==null?void 0:ke.result)==null?void 0:j[0],Me=(Ne=Se==null?void 0:Se.value)==null?void 0:Ne.pageData;if(Me.compData=(ge=Me.compData)==null?void 0:ge.map(ue=>{var He;return(ue==null?void 0:ue.key)==="menuContents"&&(ue.contents=Tr(ue.contents,(He=X==null?void 0:X.path)==null?void 0:He.split("/"))),ue}),await v.updateInsofDataApi({id:Se==null?void 0:Se.id,value:{pageData:Me}}),((ct=(Le=at==null?void 0:at.data)==null?void 0:Le.result)==null?void 0:ct.length)>0){let ue=(ot=(Ue=at==null?void 0:at.data)==null?void 0:Ue.result)==null?void 0:ot.map(He=>He==null?void 0:He.id);(ue==null?void 0:ue.length)>0&&await v.batchDeleteInsofDataApi({ids:ue})}let Qe=await Be.getItemData((tt=(gt=(Oe=X==null?void 0:X.path)==null?void 0:Oe.split("/"))==null?void 0:gt.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:tt.join("/"),sessionStorage.getItem("systemKey"),""),A=[];(Qe==null?void 0:Qe.length)>0&&(Qe==null||Qe.forEach(ue=>{var me,nt,kt,yt,ht,dt,ft,_t,Mt,Vt,Lt;let He=(yt=(kt=(nt=(me=ue==null?void 0:ue.compData)==null?void 0:me.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:nt.contents)==null?void 0:kt[0])==null?void 0:yt.prop;((_t=(ft=(dt=(ht=ue==null?void 0:ue.compData)==null?void 0:ht.find(bt=>(bt==null?void 0:bt.key)==="header"))==null?void 0:dt.contents)==null?void 0:ft[0])==null?void 0:_t.directiveLabel)==="#isMain"&&((Lt=(Vt=(Mt=ue==null?void 0:ue.compData)==null?void 0:Mt.find(bt=>(bt==null?void 0:bt.key)==="tableContents"))==null?void 0:Vt.contents)==null||Lt.forEach(bt=>{var jt,qt,Gt;(bt==null?void 0:bt.length)>1?(bt==null?void 0:bt[1])===(X==null?void 0:X.title)&&A.push((jt=bt==null?void 0:bt[0])==null?void 0:jt.id):((qt=bt==null?void 0:bt[0])==null?void 0:qt[He])===(X==null?void 0:X.title)&&A.push((Gt=bt==null?void 0:bt[0])==null?void 0:Gt.id)}))})),(A==null?void 0:A.length)>0&&await v.batchDeleteInsofDataApi({ids:A}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((et=($e=(Ve=X==null?void 0:X.path)==null?void 0:Ve.split("/"))==null?void 0:$e.filter((ue,He)=>{var me,nt;return He!==((nt=(me=X==null?void 0:X.path)==null?void 0:me.split("/"))==null?void 0:nt.length)-1}))==null?void 0:et.join("/")),u.setActiveTopMenuPath((ze=(Ye=X==null?void 0:X.path)==null?void 0:Ye.split("/"))==null?void 0:ze[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0)}},J=async(fe,z)=>{var lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt,Ve;let X=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),pe=(h=(lt=X==null?void 0:X.data)==null?void 0:lt.result)==null?void 0:h[0],ce=(_=pe==null?void 0:pe.value)==null?void 0:_.pageData;ce.compData=(I=ce.compData)==null?void 0:I.map($e=>{var et,Ye;return($e==null?void 0:$e.key)==="menuContents"&&($e.contents=go($e.contents,(et=z==null?void 0:z.path)==null?void 0:et.split("/"),z==null?void 0:z.title,(Ye=fe==null?void 0:fe.target)==null?void 0:Ye.value)),$e}),pe!=null&&pe.id&&await v.updateInsofDataApi({id:pe==null?void 0:pe.id,value:{pageData:ce}});let G=(x=(W=z==null?void 0:z.path)==null?void 0:W.split("/"))==null?void 0:x.filter(($e,et)=>{var Ye,ze;return et!==((ze=(Ye=z==null?void 0:z.path)==null?void 0:Ye.split("/"))==null?void 0:ze.length)-1}),ae=G==null?void 0:G.join("/");G.push((ie=fe==null?void 0:fe.target)==null?void 0:ie.value),G=G==null?void 0:G.join("/");let Z=await Be.getItemData(ae,sessionStorage.getItem("systemKey"),"");if(((P=($=(te=(E=(_e=Z==null?void 0:Z[0])==null?void 0:_e.compData)==null?void 0:E.find($e=>($e==null?void 0:$e.key)==="header"))==null?void 0:te.contents)==null?void 0:$[0])==null?void 0:P.directiveLabel)==="#isMain"){let $e=(de=(Q=(H=(ne=(Ee=Z==null?void 0:Z[0])==null?void 0:Ee.compData)==null?void 0:ne.find(at=>(at==null?void 0:at.key)==="header"))==null?void 0:H.contents)==null?void 0:Q[0])==null?void 0:de.prop,et=(ke=(be=(De=Z==null?void 0:Z[0])==null?void 0:De.compData)==null?void 0:be.find(at=>(at==null?void 0:at.key)==="tableContents"))==null?void 0:ke.contents,Ye=(Le=(ge=(Ne=(j=Z==null?void 0:Z[0])==null?void 0:j.compData)==null?void 0:Ne.find(at=>(at==null?void 0:at.key)==="header"))==null?void 0:ge.contents)==null?void 0:Le.map(at=>at==null?void 0:at.prop),ze;if(et==null||et.forEach(at=>{var Se;let ve=Be.getValueToObjectValue(at,Ye);(ve==null?void 0:ve[$e])===z.title&&(ze=ve,ze[$e]=(Se=fe==null?void 0:fe.target)==null?void 0:Se.value)}),ze){let at={};for(let Se in ze)Se!=="id"&&(at[Se]=ze==null?void 0:ze[Se]);let ve=[{id:ze==null?void 0:ze.id,value:{tableData:at}}];await v.batchUpdateInsofDataApi({dataList:ve})}}let re=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:z==null?void 0:z.path}}),Re=(Ue=(ct=re==null?void 0:re.data)==null?void 0:ct.result)==null?void 0:Ue.map($e=>({id:$e==null?void 0:$e.id,key:$e==null?void 0:$e.key}));Re=Re==null?void 0:Re.map($e=>($e.key.pageKey=G,$e)),(Re==null?void 0:Re.length)>0&&await v.batchUpdateInsofDataApi({dataList:Re}),u.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),u.setActiveMenuPath((gt=(Oe=(ot=z==null?void 0:z.path)==null?void 0:ot.split("/"))==null?void 0:Oe.filter(($e,et)=>{var Ye,ze;return et!==((ze=(Ye=z==null?void 0:z.path)==null?void 0:Ye.split("/"))==null?void 0:ze.length)-1}))==null?void 0:gt.join("/")),u.setActiveTopMenuPath((Ve=(tt=z==null?void 0:z.path)==null?void 0:tt.split("/"))==null?void 0:Ve[0]),u.setIsRefreshMenus(!1),u.setIsRefreshMenus(!0),V.value=void 0},M=async(fe,z)=>{rt.type=se(z==null?void 0:z.operateType),await it(z,rt.type,fe),ee.value=fe,he.value=z},xe=()=>{rt.show=!1},Ce=fe=>fe==null?void 0:fe.filter(z=>z.allowInherit),Pe=()=>{var X,pe,ce,G,ae;let fe;rt.type==="create"&&(fe=((X=ee.value)==null?void 0:X.path)+"/"+O.value[(pe=O.value)==null?void 0:pe.prop]),rt.type==="update"&&(fe=(ce=ee.value)==null?void 0:ce.path);const z={...ee.value,config:Ce((G=ee.value)==null?void 0:G.config),children:[],childMenus:[],title:O.value[(ae=O.value)==null?void 0:ae.prop],path:fe};console.log("clickSubmitForm",he.value,ee.value,z),Ge(z),rt.show=!1},Fe=fe=>{var X,pe;const z=(X=fe==null?void 0:fe.contents)==null?void 0:X.find(ce=>ce.key==="formContent");z&&(O.value=(pe=z==null?void 0:z.contents)==null?void 0:pe.reduce((ce,G)=>(ce[G.key]=G.value,ce.prop=G.key,ce),{}))},qe=e.ref(!1);return{isCollapse:qe,handleMenuCollapse:()=>{qe.value=!qe.value},handleCompChange:Fe,dialogForm:je,dialogRenderComps:Ie,getComponents:Ae,clickSubmitForm:Pe,dialogInfo:rt,beforeDialogDestroy:xe,clickMenuIcon:M,mode:q,renderMenuList:le,clickMenu:w,openMenu:R,closeMenu:y,changeMenuStyle:B,fixElement:V,onBlur:J}}}}e.defineComponent(Ir());const Ta=v.useLoginState(),{loginUserInfo:Vn}=v.storeToRefs(Ta),Pt=Ut.useModelComp(v.pinia),Rn=e.ref(!1),{itemData:Hu,itemGridData:tn,curStructureCompIds:Ro,isSubmitCurStructure:qu,isRefreshCurStructure:Gu,freshContent:Po,routeToChildPath:Xu,payloadTypes:mo,pageMapState:Un,itemExtendData:On}=v.storeToRefs(Pt),Ht=Ut.useMenuState(v.pinia),{activeTopMenuPath:Br,activeMenuPath:vt,platform:Up,activeAsideMenu:Yu,buttonTriggerType:Ju,menus:Zu}=v.storeToRefs(Ht),fa=Be.useUnit(v.pinia),{selectTitle:Qu,chooseTitle:Jt}=v.storeToRefs(fa),ed=Be.useOriginalState(v.pinia),{originalPath:to}=v.storeToRefs(ed),Qt=e.ref(),$o=Ut.useAuthorityState(v.pinia),Wn=e.ref(!0),fn=e.ref(0),Hn=e.ref([]),Nr=e.ref(!1),sa=e.computed(async()=>{var i,s;const n=(i=vt.value)!=null&&i.startsWith("/")?(s=vt.value)==null?void 0:s.substring(1):vt.value;return(n==null?void 0:n.includes(to.value))||await dd(n)}),td=()=>{Pt.setItemGridData([]),Pt.setIsEdit("edit"),Pt.setSubmitCurStructure(vt.value!=="/平台管理/菜单管理")},ad=()=>{Pt.setIsEdit("view"),Pt.setRefreshCurStructure(!0)},nd=async n=>{const i=sessionStorage.getItem("systemKey"),s=await Be.getItemData(n,i,"");return s&&s.length>0},od=async n=>{var g,f,D;let i=Qu.value,s=i==null?void 0:i.findIndex(C=>(C==null?void 0:C.value)===(n==null?void 0:n.value)),r=(g=i==null?void 0:i.filter(C=>(C==null?void 0:C.condition)==="parent"))==null?void 0:g.map(C=>C==null?void 0:C.value),d=r==null?void 0:r[0],u=(D=(f=i==null?void 0:i.filter((C,V)=>!(C!=null&&C.condition)&&V<=s))==null?void 0:f.map(C=>C.value))==null?void 0:D.join("/");d?(u==null?void 0:u.length)>0?d=d+"/"+u:d=r==null?void 0:r.join("/"):(u==null?void 0:u.length)>0&&(d=u,i=i==null?void 0:i.filter(C=>(C==null?void 0:C.condition)!=="child"),fa.setSelectTitle(i),fa.setChooseTitle([])),await nd(d)&&Ht.setActiveMenuPath(d)},lo=async(n,i,s,r="contentConfig")=>{var d;try{if(!Array.isArray(n))return;let u,k;i==="create"?(u={dataList:n==null?void 0:n.map(f=>{var D;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:s!=null&&s.startsWith("/")?s==null?void 0:s.substring(1):s,type:"structure",structureBelong:r,parentTable:"",version:1},value:{pageData:{...f,compData:(D=f==null?void 0:f.compData)==null?void 0:D.filter(C=>(C==null?void 0:C.key)!=="tableContents")}}}})},k=v.batchAddInsofDataApi):i==="update"?(u={dataList:n==null?void 0:n.map(f=>{var D;return{id:f==null?void 0:f.id,value:{pageData:{...f,compData:(D=f==null?void 0:f.compData)==null?void 0:D.filter(C=>(C==null?void 0:C.key)!=="tableContents")}}}})},k=v.batchUpdateInsofDataApi):i==="delete"&&(u={ids:n},k=v.batchDeleteInsofDataApi);const g=await k(u);if(((d=g==null?void 0:g.data)==null?void 0:d.code)===200)return g.data.result;throw v.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{v.ElMessage.error("保存响应失败")}},Ko=async(n,i,s,r)=>{var d,u,k,g,f,D,C,V,F,Y,L;try{const we=(u=(d=n==null?void 0:n.results)==null?void 0:d.filter(y=>!(y!=null&&y.id)||typeof(y==null?void 0:y.id)=="string"))==null?void 0:u.map(y=>({key:{pageKey:n==null?void 0:n.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:i,relatedInfo:s},value:{tableData:y}})),q=(g=(k=n==null?void 0:n.results)==null?void 0:k.filter(y=>(y==null?void 0:y.id)&&typeof(y==null?void 0:y.id)=="number"))==null?void 0:g.map(y=>({id:y==null?void 0:y.id,value:{tableData:y}})),K=JSON.parse(v.cloneDeep(JSON.stringify(n))),le=(f=K==null?void 0:K.results)==null?void 0:f.map(y=>y.id);let w;s?w=(V=(C=(D=Un.value)==null?void 0:D[vt.value])==null?void 0:C.filter(y=>{var B,S,ye;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i&&((ye=(S=y==null?void 0:y.key)==null?void 0:S.relatedInfo)==null?void 0:ye.target)===r}))==null?void 0:V.map(y=>y==null?void 0:y.id):w=(L=(Y=(F=Un.value)==null?void 0:F[vt.value])==null?void 0:Y.filter(y=>{var B;return((B=y==null?void 0:y.key)==null?void 0:B.type)===i}))==null?void 0:L.map(y=>y==null?void 0:y.id);const R=w==null?void 0:w.filter(y=>!(le!=null&&le.includes(y))&&typeof y=="number");(we==null?void 0:we.length)>0&&await v.batchAddInsofDataApi({dataList:we}),(q==null?void 0:q.length)>0&&await v.batchUpdateInsofDataApi({dataList:q}),(R==null?void 0:R.length)>0&&await v.batchDeleteInsofDataApi({ids:R})}catch(we){throw new Error(we)}},rd=async n=>{var D,C,V,F,Y,L,we,q,K,le;Ht.setContentLoading(!0);const i=JSON.parse(v.cloneDeep(JSON.stringify(Hu.value)));if(!qu.value)return Ht.setCacheStructures({key:Ju.value,data:i}),v.ElMessage.success("已暂存");const s=i==null?void 0:i.map(w=>w.id),r=s.filter(w=>{var R;return!((R=Ro.value)!=null&&R.includes(w))}),d=(D=Ro.value)==null?void 0:D.filter(w=>!s.includes(w)),u=[...r,...d].filter(w=>typeof w!==null&&typeof w<"u"),k=i==null?void 0:i.filter(w=>!w.id),g=i==null?void 0:i.filter(w=>w.id);let f=[];if(u&&(u==null?void 0:u.length)>0&&f.push(lo(u,"delete",n)),k&&(k==null?void 0:k.length)>0&&f.push(lo(k,"create",n)),g&&(g==null?void 0:g.length)>0&&f.push(lo(g,"update",n)),tn.value&&((C=tn.value)!=null&&C.isDelete&&((F=(V=tn.value)==null?void 0:V.results)==null?void 0:F.length)>0&&((L=(Y=tn.value)==null?void 0:Y.results)!=null&&L.every(w=>typeof w=="number"))?await v.batchDeleteInsofDataApi({ids:(we=tn.value)==null?void 0:we.results}):(console.log("itemGridData.value",tn.value),f.push(await Ko(tn.value,"gridLayout")))),On.value)for(const w in On.value)f.push(await Ko((q=On.value)==null?void 0:q[w],"extend",{target:w,compId:(le=(K=On.value)==null?void 0:K[w])==null?void 0:le.compId},w));await Promise.all(f).then(()=>{v.ElMessage.success("保存成功"),Pt.setRefreshCurStructure(!0)}).catch(w=>{v.ElMessage.success(w)}),Ht.setContentLoading(!1)},qn=n=>rn(n),pt=e.ref([]),ld=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>(i==null?void 0:i.affix)&&(i==null?void 0:i.affix)!=="default")}),Ar=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.filter(i=>!(i!=null&&i.affix)||(i==null?void 0:i.affix)==="default")}),id=async n=>{var r,d,u,k,g,f;let i=v.cloneDeep(vt).value;i=i+to.value+((r=Object.values(n==null?void 0:n.singleContent))==null?void 0:r[0]);const s=await v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:i}});if(((u=(d=s==null?void 0:s.data)==null?void 0:d.result)==null?void 0:u.length)>0){const D=(g=(k=s==null?void 0:s.data)==null?void 0:k.result)==null?void 0:g.map(V=>V==null?void 0:V.id),C=await v.batchDeleteInsofDataApi({ids:D});((f=C==null?void 0:C.data)==null?void 0:f.code)===200?(v.ElMessage.success("删除成功"),await Ta.setLogRecordAsync({type:"删除",data:n},i)):v.ElMessage.error("删除响应失败"),Pt.setTableLoading(!1)}},jo=async n=>{var i,s;try{let r=v.cloneDeep(vt).value,d=[];if(Array.isArray(n)){n==null||n.forEach(k=>{var g;d.push(v.getInsofDataApi({keyLikes:{systemKey:sessionStorage.getItem("systemKey"),pageKey:r+to.value+((g=Object.values(k==null?void 0:k.singleContent))==null?void 0:g[0])}}))});const u=await Promise.all(d);if((u==null?void 0:u.length)>0&&(u!=null&&u.every(k=>{var g;return((g=k==null?void 0:k.data)==null?void 0:g.code)===200}))){const k=Array.from(new Set((i=u==null?void 0:u.flatMap(f=>{var D;return(D=f==null?void 0:f.data)==null?void 0:D.result}))==null?void 0:i.map(f=>f==null?void 0:f.id))),g=await v.batchDeleteInsofDataApi({ids:k});((s=g==null?void 0:g.data)==null?void 0:s.code)===200?(v.ElMessage.success("删除成功"),await Ta.setLogRecordAsync({type:"删除",data:n},r)):v.ElMessage.error("删除响应失败")}else throw new Error("删除时获取数据出错了")}else await id(n)}catch{v.ElMessage.error("删除数据时处理失败")}finally{Pt.setTableLoading(!1)}},sd=async n=>{var i,s;try{if(!n||!(n!=null&&n.data))return;const{id:r,...d}=v.cloneDeep(n==null?void 0:n.data),u=await v.createInsofDataApi({key:{type:"data",pageKey:vt.value,tableId:(i=n==null?void 0:n.to)==null?void 0:i.groupName,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:d}});if(!((s=n==null?void 0:n.data)!=null&&s.id))return;const k=await Promise.all([u]);(k==null?void 0:k.every(f=>{var D;return((D=f==null?void 0:f.data)==null?void 0:D.code)===200}))?v.ElMessage.success("迁移成功"):v.ElMessage.error("迁移响应失败")}catch(r){throw v.ElMessage.error(r),new Error(r)}},Vr=e.ref(0),wn=e.ref(null),Gn=async(n,i="data",s)=>{var d,u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je,Ie,O,ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt,h,_,I,W,x,ie,_e,E,te,$,P,Ee,ne,H,Q,de,De,be,ke,j,Ne,ge,Le,ct,Ue,ot,Oe,gt,tt;wn.value=null;let r=vt.value;if((d=Qt.value)!=null&&d.compData&&((u=Qt.value)==null?void 0:u.compData)!==vt.value&&(r=r+"/"+((g=(k=Jt.value)==null?void 0:k[0])==null?void 0:g.value)),(n==null?void 0:n.buttonName)==="删除")typeof((f=n==null?void 0:n.singleContent)==null?void 0:f.id)=="string"?await jo(n):await Be.deleteTableContents((D=n==null?void 0:n.singleContent)==null?void 0:D.id,n),await Ta.setLogRecordAsync({type:"删除",data:n},vt.value);else if((n==null?void 0:n.buttonName)==="批量删除")if((C=n==null?void 0:n.selectItems)!=null&&C.every(Ve=>typeof(Ve==null?void 0:Ve.id)=="string")){const Ve=(V=n==null?void 0:n.selectItems)==null?void 0:V.map($e=>({content:n==null?void 0:n.content,singleContent:$e,index:n==null?void 0:n.index,type:n==null?void 0:n.type,buttonName:n==null?void 0:n.buttonName,column:n==null?void 0:n.column}));await jo(Ve)}else{const Ve=(F=n==null?void 0:n.selectItems)==null?void 0:F.map($e=>$e==null?void 0:$e.id);await v.batchDeleteInsofDataApi({ids:Ve}),await Ta.setLogRecordAsync({type:"删除",data:Ve},vt.value)}else if((n==null?void 0:n.buttonName)==="OCR批量新增"){if(Array.isArray(n==null?void 0:n.ocrRows)&&((Y=n==null?void 0:n.ocrRows)==null?void 0:Y.length)>0){Pt.setTableLoading(n==null?void 0:n.index);const Ve=sessionStorage.getItem("systemKey"),$e=[],et=[];let Ye=r,ze=n==null?void 0:n.index;if(n!=null&&n.parentTableId&&(n==null?void 0:n.parentTableId)!==0){const at=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId}),ve=(we=(L=at==null?void 0:at.data)==null?void 0:L.result)==null?void 0:we[0];(q=ve==null?void 0:ve.key)!=null&&q.pageKey&&(Ye=ve.key.pageKey),ze=n==null?void 0:n.parentTableId}for(const at of n.ocrRows){const ve={};for(const Se in at)Se!=="id"&&Se!=="index"&&!(typeof Se=="string"&&Se.startsWith("_"))&&(ve[Se]=at[Se]);try{const Se=await v.createInsofDataApi({key:{type:i,pageKey:Ye,tableId:ze,systemKey:Ve},value:{tableData:ve}});if(((K=Se==null?void 0:Se.data)==null?void 0:K.code)===200){const Me=(le=Se==null?void 0:Se.data)==null?void 0:le.result;$e.push({resId:Me,compId:n==null?void 0:n.index,data:at}),et.push(Me)}}catch(Se){console.error("OCR数据保存失败:",Se)}}wn.value=$e,sessionStorage.setItem("ocr_last_saved_ids",JSON.stringify(et)),sessionStorage.setItem("ocr_last_saved_table",JSON.stringify({pageKey:Ye,tableId:ze,parentTableId:n==null?void 0:n.parentTableId,compIndex:n==null?void 0:n.index})),et.length>0?v.ElMessage.success(`成功保存 ${et.length} 条OCR识别数据`):v.ElMessage.warning("OCR数据保存失败,请重试"),await Ta.setLogRecordAsync({type:"新增",data:n==null?void 0:n.ocrRows},vt.value)}Pt.setCacheUpdatingData(null),Pt.setTableLoading(!1),Pt.setRefreshCurStructure(!0);return}else if((n==null?void 0:n.buttonName)==="新增"){let Ve={};for(let et in n==null?void 0:n.singleContent)et!=="id"&&et!=="index"&&(Ve[et]=n==null?void 0:n.singleContent[et]);const $e=await Be.addTableContents(i,r,n==null?void 0:n.index,sessionStorage.getItem("systemKey"),Object.values(Ve),n==null?void 0:n.column,n,{param:s});if(wn.value={resId:$e,compId:n==null?void 0:n.index,data:n==null?void 0:n.singleContent},((R=(w=n==null?void 0:n.column)==null?void 0:w[0])==null?void 0:R.directiveLabel)==="#isMain"&&((B=(y=n==null?void 0:n.column)==null?void 0:y[0])==null?void 0:B.directiveColor)!==!0){let et=(Ze=n==null?void 0:n.singleContent)==null?void 0:Ze[(ye=(S=n==null?void 0:n.column)==null?void 0:S[0])==null?void 0:ye.prop],Ye=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),ze=vt.value+"/"+(et==null?void 0:et.slice(0,(et==null?void 0:et.length)-3)),at=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:ze}}),ve=(Ae=(rt=Ye==null?void 0:Ye.data)==null?void 0:rt.result)==null?void 0:Ae[0],Se=(je=ve==null?void 0:ve.value)==null?void 0:je.pageData;if(Se.compData=(Ie=Se.compData)==null?void 0:Ie.map(Me=>((Me==null?void 0:Me.key)==="menuContents"&&(Me.contents=eo(Me.contents,ze==null?void 0:ze.split("/"),et)),Me)),await v.updateInsofDataApi({id:ve==null?void 0:ve.id,value:{pageData:Se}}),((ee=(O=at==null?void 0:at.data)==null?void 0:O.result)==null?void 0:ee.length)>0)await Be.newLoadingConstruct(ze,vt.value+"/"+et);else{let Me=await v.getInsofDataApi({key:{pageKey:vt.value+"/",systemKey:sessionStorage.getItem("systemKey")}});((he=(se=Me==null?void 0:Me.data)==null?void 0:se.result)==null?void 0:he.length)>=1?await Be.newLoadingCutFirstConstruct(vt.value+"/",vt.value+"/"+et):await Be.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+et)}Ht.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Ht.setIsRefreshMenus(!1),Ht.setIsRefreshMenus(!0),Ht.setActiveMenuPath((it=(Ge=ze==null?void 0:ze.split("/"))==null?void 0:Ge.filter((Me,Qe)=>{var A;return Qe!==((A=ze==null?void 0:ze.split("/"))==null?void 0:A.length)-1}))==null?void 0:it.join("/"))}Pt.setCacheUpdatingData(null)}else if((n==null?void 0:n.buttonName)==="编辑"){if(((M=(J=n==null?void 0:n.column)==null?void 0:J[0])==null?void 0:M.directiveLabel)==="#isMain"&&((Ce=(xe=n==null?void 0:n.column)==null?void 0:xe[0])==null?void 0:Ce.directiveColor)!==!0){let Ve=(qe=n==null?void 0:n.singleContent)==null?void 0:qe[(Fe=(Pe=n==null?void 0:n.column)==null?void 0:Pe[0])==null?void 0:Fe.prop];if(Bt.isNumber((Xe=n==null?void 0:n.singleContent)==null?void 0:Xe.id)){let $e=await v.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),et=await v.getInsofDataApi({id:(fe=n==null?void 0:n.singleContent)==null?void 0:fe.id}),Ye=(Z=(ce=(pe=(X=(z=et==null?void 0:et.data)==null?void 0:z.result)==null?void 0:X[0])==null?void 0:pe.value)==null?void 0:ce.tableData)==null?void 0:Z[(ae=(G=n==null?void 0:n.column)==null?void 0:G[0])==null?void 0:ae.prop],ze=vt.value+"/"+Ye,at=(Re=(re=$e==null?void 0:$e.data)==null?void 0:re.result)==null?void 0:Re[0],ve=(lt=at==null?void 0:at.value)==null?void 0:lt.pageData;ve.compData=(h=ve.compData)==null?void 0:h.map(Se=>((Se==null?void 0:Se.key)==="menuContents"&&(Se.contents=go(Se.contents,ze==null?void 0:ze.split("/"),Ye,Ve)),Se)),await v.updateInsofDataApi({id:at==null?void 0:at.id,value:{pageData:ve}}),Ht.setUpdateMenuStatus(!1),await xn.verifyStructureDataToStore(),Ht.setIsRefreshMenus(!1),Ht.setIsRefreshMenus(!0),Ht.setActiveMenuPath((I=(_=ze==null?void 0:ze.split("/"))==null?void 0:_.filter((Se,Me)=>{var Qe;return Me!==((Qe=ze==null?void 0:ze.split("/"))==null?void 0:Qe.length)-1}))==null?void 0:I.join("/"))}}if(Array.isArray(n==null?void 0:n.singleContent)){let Ve=[],$e=[],et=((x=(W=n==null?void 0:n.content)==null?void 0:W[0])==null?void 0:x.id)??"",Ye=s==null?void 0:s.url,ze="",at="";if((n==null?void 0:n.parentTableId)!==void 0&&(n==null?void 0:n.parentTableId)!==null&&(n==null?void 0:n.parentTableId)!==0){const ve=await v.getInsofDataApi({id:n==null?void 0:n.parentTableId});ze=((te=(E=(_e=(ie=ve==null?void 0:ve.data)==null?void 0:ie.result)==null?void 0:_e[0])==null?void 0:E.key)==null?void 0:te.tableId)??(n==null?void 0:n.parentTableId),at=((ne=(Ee=(P=($=ve==null?void 0:ve.data)==null?void 0:$.result)==null?void 0:P[0])==null?void 0:Ee.key)==null?void 0:ne.pageKey)??""}else if(et!==""&&((H=n==null?void 0:n.content)==null?void 0:H.length)>1&&typeof((de=(Q=n==null?void 0:n.content)==null?void 0:Q[0])==null?void 0:de.id)!="string"){const ve=await v.getInsofDataApi({id:et});ze=((j=(ke=(be=(De=ve==null?void 0:ve.data)==null?void 0:De.result)==null?void 0:be[0])==null?void 0:ke.key)==null?void 0:j.tableId)??"",at=((ct=(Le=(ge=(Ne=ve==null?void 0:ve.data)==null?void 0:Ne.result)==null?void 0:ge[0])==null?void 0:Le.key)==null?void 0:ct.pageKey)??""}(Ue=n==null?void 0:n.singleContent)==null||Ue.forEach(ve=>{let Se={};for(let Me in ve)Me!=="id"&&Me!=="index"&&(Se[Me]=ve[Me]);typeof(ve==null?void 0:ve.id)=="number"?Ve.push({id:ve==null?void 0:ve.id,value:{tableData:Se}}):$e.push({key:{type:i,pageKey:Ye||at||vt.value,tableId:ze||(n==null?void 0:n.index),systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Se}})}),($e==null?void 0:$e.length)>0&&await v.batchAddInsofDataApi({dataList:$e}),(Ve==null?void 0:Ve.length)>0&&await v.batchUpdateInsofDataApi({dataList:Ve})}else{let Ve={},$e=(ot=n==null?void 0:n.singleContent)==null?void 0:ot.id;for(let et in n==null?void 0:n.singleContent)et!=="id"&&et!=="index"&&(Ve[et]=n==null?void 0:n.singleContent[et]);await Be.fixTableContents(i,r,n==null?void 0:n.index,$e,sessionStorage.getItem("systemKey"),Object.values(Ve),n==null?void 0:n.column,n)}Pt.setCacheUpdatingData(null)}else(n==null?void 0:n.buttonName)==="迁移"&&await sd(n==null?void 0:n.value);Pt.setTableLoading(!1),(Oe=n==null?void 0:n.column)!=null&&Oe.some(Ve=>Ve==null?void 0:Ve.isMainKey),pt.value=await Be.getItemData(r,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),pt.value=(gt=pt.value)==null?void 0:gt.filter(Ve=>{var $e;return(($e=Ve==null?void 0:Ve.compData)==null?void 0:$e.length)>0}),pt.value=(tt=pt.value)==null?void 0:tt.filter(Ve=>(Ve==null?void 0:Ve.comp)!==""),pt.value=await Be.getDeepDiffItems(pt.value),bo.value&&(n==null?void 0:n.buttonName)!=="删除"&&Pt.setRefreshCurStructure(!0)},cd=async n=>{var s,r,d;const i=await v.getInsofDataApi({id:n});return(d=(r=(s=i==null?void 0:i.data)==null?void 0:s.result)==null?void 0:r[0])==null?void 0:d.value},Xn=async(n,i)=>{var d,u,k;if(Rn.value||typeof(n==null?void 0:n.index)=="string")return;const s=await cd(n==null?void 0:n.index),r=(d=s==null?void 0:s.pageData)==null?void 0:d.name;await Be.fixFormContents(n==null?void 0:n.index,{comp:"Form",compData:(u=v.cloneDeep(n==null?void 0:n.contents))==null?void 0:u.filter(g=>g.contents),name:r,isShow:(k=s==null?void 0:s.pageData)==null?void 0:k.isShow}),i&&(Ht.setActiveMenuPath(null),Ht.setActiveMenuPath(i))},Yn=async n=>{pt.value=await Be.getDeepDiffItems(n),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value)},ud=async n=>{var i;await e.nextTick(),(i=Yu.value)!=null&&i.isRouter?$o.setRouterPageStructure(n):$o.setRouterPageStructure([])},dd=async n=>{var u,k,g,f,D,C;let i="",s="";(u=n==null?void 0:n.split("/"))==null||u.forEach((V,F)=>{var Y;((Y=n==null?void 0:n.split("/"))==null?void 0:Y.length)-2>F&&(i=i===""?i+V:i+"/"+V)}),(k=n==null?void 0:n.split("/"))==null||k.forEach((V,F)=>{var Y;((Y=n==null?void 0:n.split("/"))==null?void 0:Y.length)-1>F&&(s=s===""?s+V:s+"/"+V)}),i=i+"/",s=s+"/";let r=await v.getInsofDataApi({key:{pageKey:i,systemKey:sessionStorage.getItem("systemKey")}}),d=await v.getInsofDataApi({key:{pageKey:s,systemKey:sessionStorage.getItem("systemKey")}});return((f=(g=r==null?void 0:r.data)==null?void 0:g.result)==null?void 0:f.length)>0||((C=(D=d==null?void 0:d.data)==null?void 0:D.result)==null?void 0:C.length)>0},pd=e.ref(),Ea=e.ref(null),fd=n=>{var D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je;const i=(C=(D=Un.value)==null?void 0:D[n])==null?void 0:C.filter(Ie=>{var O;return((O=Ie==null?void 0:Ie.key)==null?void 0:O.type)==="extend"});if((i==null?void 0:i.length)===0)return Ea.value=null;pd.value=i;const s=(F=(V=i==null?void 0:i.find(Ie=>{var O,ee,se;return(se=(ee=(O=Ie==null?void 0:Ie.value)==null?void 0:O.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:V.value)==null?void 0:F.tableData;if(!s)return Ea.value=null;const r=(we=(L=(Y=i==null?void 0:i.find(Ie=>{var O,ee,se;return(se=(ee=(O=Ie==null?void 0:Ie.value)==null?void 0:O.tableData)==null?void 0:ee.执行任务)==null?void 0:se.includes("计时")}))==null?void 0:Y.key)==null?void 0:L.relatedInfo)==null?void 0:we.compId,d=(q=pt.value)==null?void 0:q.find(Ie=>(Ie==null?void 0:Ie.id)===r);if(!d)return Ea.value=null;const u=(le=s==null?void 0:s.任务关键词)==null?void 0:le[((K=s==null?void 0:s.任务关键词)==null?void 0:K.length)-1],k=(y=(R=(w=d==null?void 0:d.compData)==null?void 0:w.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:R.contents)==null?void 0:y.findIndex(Ie=>(Ie==null?void 0:Ie.prop)===u),g=(Ze=(ye=(S=(B=d==null?void 0:d.compData)==null?void 0:B.find(Ie=>(Ie==null?void 0:Ie.key)==="header"))==null?void 0:S.contents)==null?void 0:ye.find(Ie=>Ie==null?void 0:Ie.isMainKey))==null?void 0:Ze.prop,f=(je=(Ae=(rt=d==null?void 0:d.compData)==null?void 0:rt.find(Ie=>(Ie==null?void 0:Ie.key)==="tableContents"))==null?void 0:Ae.contents)==null?void 0:je[k];Ea.value={prop:u,value:f,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:g},console.log("getPageExtendData:",s,i)},vd=()=>{var n,i;console.log("倒计时结束时"),Ut.ElMessageBox.alert(`超时未提交,【${(i=(n=vt.value)==null?void 0:n.split("/"))==null?void 0:i[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},Or=()=>{var n,i,s,r;try{if(Br.value!=="报告中心"||!((n=vt.value)!=null&&n.includes(to.value)))return;const d=(i=pt.value)==null?void 0:i.find(f=>{var D;return((D=f==null?void 0:f.comp)==null?void 0:D.toUpperCase())==="FORM"});if(!d)return;const u={prop:"状态",value:"编制中"},k=(r=(s=d==null?void 0:d.compData)==null?void 0:s.find(f=>(f==null?void 0:f.key)==="formContent"))==null?void 0:r.contents,g=k==null?void 0:k.find(f=>(f==null?void 0:f.prop)===(u==null?void 0:u.prop));g!=null&&g.value&&(g==null?void 0:g.value)!==(u==null?void 0:u.value)&&Pt.setLockingPage(vt.value)}catch(d){throw v.ElMessage.error(d),new Error(d)}},yo=e.ref([]),hd=e.computed(()=>{var n,i;return(i=(n=Un.value)==null?void 0:n[vt.value])==null?void 0:i.filter(s=>{var r;return((r=s==null?void 0:s.key)==null?void 0:r.type)==="gridLayout"})});e.watch(()=>[Br.value],()=>{fa.setSelectTitle([]),fa.setChooseTitle([])},{deep:!0});e.watch(()=>[Jt.value],async()=>{var r,d,u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je,Ie,O,ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X;if(((r=Qt.value)==null?void 0:r.compData)===vt.value||((d=Jt.value)==null?void 0:d.length)===0)return;Ht.setContentLoading(!0);let n=new WeakMap;if((k=(u=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:u.filter(pe=>{var ce,G;return((ce=pe==null?void 0:pe.key)==null?void 0:ce.pageKey)!=="menu"&&((G=pe==null?void 0:pe.key)==null?void 0:G.pageKey)!=="secret"}))==null||k.forEach(pe=>{n[pe.key.pageKey]?n[pe.key.pageKey]=[...n[pe.key.pageKey],pe]:n[pe.key.pageKey]=[pe]}),pt.value=await Be.getItemData(vt.value,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),Nr.value=!!((g=pt.value)!=null&&g.find(pe=>(pe==null?void 0:pe.comp)==="")),Qt.value=(f=pt.value)==null?void 0:f.find(pe=>(pe==null?void 0:pe.comp)===""),((D=Qt.value)==null?void 0:D.compData)===vt.value){let pe=(C=vt.value)==null?void 0:C.split("/").map(ce=>({value:ce.trim()}));pe=[...pe,...Jt.value??[]]}else{let pe=(F=(V=Qt.value)==null?void 0:V.compData)==null?void 0:F.split("/").map(ce=>({value:ce.trim(),condition:"parent"}));if(!(!pe||(pe==null?void 0:pe.length)===0)){let ce=await Be.getItemData((Y=Qt.value)==null?void 0:Y.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n);ce=ce==null?void 0:ce.filter(re=>{var Re,lt,h;return Array.isArray(re==null?void 0:re.compData)&&((h=(lt=(Re=re==null?void 0:re.compData)==null?void 0:Re.find(_=>(_==null?void 0:_.key)==="header"))==null?void 0:lt.contents)==null?void 0:h.find(_=>(_==null?void 0:_.directiveLabel)==="#isMain"))});let G=(le=(K=(q=(we=(L=ce==null?void 0:ce[0])==null?void 0:L.compData)==null?void 0:we.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:q.contents)==null?void 0:K.find(re=>(re==null?void 0:re.directiveLabel)==="#isMain"))==null?void 0:le.prop,ae=(B=(y=(R=(w=ce==null?void 0:ce[0])==null?void 0:w.compData)==null?void 0:R.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:y.contents)==null?void 0:B.findIndex(re=>(re==null?void 0:re.directiveLabel)==="#isMain"),Z=(rt=(Ze=(ye=(S=ce==null?void 0:ce[0])==null?void 0:S.compData)==null?void 0:ye.find(re=>(re==null?void 0:re.key)==="tableContents"))==null?void 0:Ze.contents)==null?void 0:rt.map(re=>{var Re;return(re==null?void 0:re.length)>1?re==null?void 0:re[ae+1]:(Re=re==null?void 0:re[0])==null?void 0:Re[G]});if(Z=Z==null?void 0:Z.map(re=>({label:re,value:re})),(Ae=Jt.value)==null||Ae.length,((Ie=(je=Jt.value)==null?void 0:je[0])==null?void 0:Ie.value)!==""){let re=await Be.getItemData(vt.value+"/"+((ee=(O=Jt.value)==null?void 0:O[0])==null?void 0:ee.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value);re||(await Be.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((he=(se=Jt.value)==null?void 0:se[0])==null?void 0:he.value)),re=await Be.getItemData(vt.value+"/"+((it=(Ge=Jt.value)==null?void 0:Ge[0])==null?void 0:it.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=re}}(pe==null?void 0:pe.length)>0&&((M=(J=Jt.value)==null?void 0:J[0])==null?void 0:M.value)===""&&(pt.value=[])}pt.value=(xe=pt.value)==null?void 0:xe.filter(pe=>(pe==null?void 0:pe.comp)!=="");let s="";if(!pt.value){let pe=(Fe=(Pe=(Ce=vt.value)==null?void 0:Ce.split("/"))==null?void 0:Pe.filter((ce,G)=>{var ae,Z;return G!==((Z=(ae=vt.value)==null?void 0:ae.split("/"))==null?void 0:Z.length)-1}))==null?void 0:Fe.join("/");pt.value=await Be.getItemData(pe,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,n),s=(z=(qe=vt.value)==null?void 0:qe.split("/"))==null?void 0:z[((fe=(Xe=vt.value)==null?void 0:Xe.split("/"))==null?void 0:fe.length)-1]}await Ta.setLogRecordAsync({type:"查询",data:pt.value},vt.value),s!==""&&(pt.value=(X=pt.value)==null?void 0:X.map(pe=>{var ce;return pe!=null&&pe.isShow&&(pe.compData=(ce=pe==null?void 0:pe.compData)==null?void 0:ce.map(G=>{var ae,Z,re,Re,lt;if((G==null?void 0:G.key)==="tableContents"){let h=[],_="";_=(Re=(re=(Z=(ae=pe==null?void 0:pe.compData)==null?void 0:ae.find(I=>(I==null?void 0:I.key)==="header"))==null?void 0:Z.contents)==null?void 0:re[0])==null?void 0:Re.prop,h=(lt=G.contents)==null?void 0:lt.filter(I=>(I==null?void 0:I[_])===s||(I==null?void 0:I[1])===s),G.contents=h}return G})),pe})),pt.value=await Be.getDeepDiffItems(pt.value),Ht.setContentLoading(!1)},{deep:!0});const gd=(n,i)=>{let s="";const r=(d,u)=>{d=d==null?void 0:d.forEach(k=>{var g,f,D;if((k==null?void 0:k.title)===(u==null?void 0:u[0])){let C=u.slice(1);Array.isArray(k==null?void 0:k.childMenus)&&((g=k==null?void 0:k.childMenus)==null?void 0:g.length)===0||(C!=null&&C[0]&&(C==null?void 0:C.length)!==0?r(k==null?void 0:k.childMenus,C):s=(D=(f=k==null?void 0:k.childMenus)==null?void 0:f[0])==null?void 0:D.title)}})};return n!=null&&n.some(d=>{var u;return Array.isArray(d==null?void 0:d.childMenus)&&((u=d==null?void 0:d.childMenus)==null?void 0:u.length)>0})&&r(n,i),s};e.watch(()=>[vt.value,Gu.value],async n=>{var u,k,g,f,D,C,V,F,Y,L,we,q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je,Ie,O,ee,se,he,Ge,it,J,M,xe,Ce,Pe,Fe,qe,Xe,fe,z,X,pe,ce,G,ae,Z,re,Re,lt;if(!vt.value)return;Pt.setLockingPage(""),pt.value=[];let i=e.getCurrentInstance();(u=i==null?void 0:i.scope)==null||u.stop(),i=null,Wn.value=!1,Rn.value=!0;const s=(k=n==null?void 0:n[0])!=null&&k.startsWith("/")?(g=n==null?void 0:n[0])==null?void 0:g.substring(1):n==null?void 0:n[0];let r=new WeakMap;if((D=(f=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:f.filter(h=>{var _,I;return((_=h==null?void 0:h.key)==null?void 0:_.pageKey)!=="menu"&&((I=h==null?void 0:h.key)==null?void 0:I.pageKey)!=="secret"}))==null||D.forEach(h=>{r[h.key.pageKey]?r[h.key.pageKey]=[...r[h.key.pageKey],h]:r[h.key.pageKey]=[h]}),Hn.value=r,s){Ht.setContentLoading(!0),sessionStorage.setItem("pageKey",vt.value),fa.setSelectTitle([]),pt.value=await Be.getItemData(s,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),Nr.value=!!((C=pt.value)!=null&&C.find(I=>(I==null?void 0:I.comp)==="")),Qt.value=(V=pt.value)==null?void 0:V.find(I=>(I==null?void 0:I.comp)==="");let h=[];if(!((F=Qt.value)!=null&&F.compData)){let I=gd(Zu.value,(Y=vt.value)==null?void 0:Y.split("/")),W=await Be.getItemData(s+"/"+I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);W!=null&&W.find(x=>(x==null?void 0:x.comp)==="")?h=(we=(L=W==null?void 0:W.find(x=>(x==null?void 0:x.comp)===""))==null?void 0:L.compData)==null?void 0:we.split("/").map(x=>({value:x.trim(),condition:"parent"})):fa.setChooseTitle([])}if(((q=Qt.value)==null?void 0:q.compData)===vt.value){let I=(K=vt.value)==null?void 0:K.split("/").map(W=>({value:W.trim()}));I=[...I,...Jt.value??[]],fa.setSelectTitle(I)}else{let I=[],W=(w=(le=Qt.value)==null?void 0:le.compData)==null?void 0:w.split("/").map(_e=>({value:_e.trim(),condition:"parent"}));if(!W||(W==null?void 0:W.length)===0)W=h,(W==null?void 0:W.length)===0&&(Qt.value={compData:vt.value});else{let _e=await Be.getItemData((R=Qt.value)==null?void 0:R.compData,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);_e=_e==null?void 0:_e.filter(P=>{var Ee,ne,H;return Array.isArray(P==null?void 0:P.compData)&&((H=(ne=(Ee=P==null?void 0:P.compData)==null?void 0:Ee.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:ne.contents)==null?void 0:H.find(Q=>(Q==null?void 0:Q.directiveLabel)==="#isMain"))});let E=(Ze=(ye=(S=(B=(y=_e==null?void 0:_e[0])==null?void 0:y.compData)==null?void 0:B.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:S.contents)==null?void 0:ye.find(P=>(P==null?void 0:P.directiveLabel)==="#isMain"))==null?void 0:Ze.prop,te=(Ie=(je=(Ae=(rt=_e==null?void 0:_e[0])==null?void 0:rt.compData)==null?void 0:Ae.find(P=>(P==null?void 0:P.key)==="header"))==null?void 0:je.contents)==null?void 0:Ie.findIndex(P=>(P==null?void 0:P.directiveLabel)==="#isMain"),$=(he=(se=(ee=(O=_e==null?void 0:_e[0])==null?void 0:O.compData)==null?void 0:ee.find(P=>(P==null?void 0:P.key)==="tableContents"))==null?void 0:se.contents)==null?void 0:he.map(P=>{var Ee;return(P==null?void 0:P.length)>1?P==null?void 0:P[te+1]:(Ee=P==null?void 0:P[0])==null?void 0:Ee[E]});if($=$==null?void 0:$.map(P=>({label:P,value:P})),((Ge=Jt.value)==null?void 0:Ge.length)===0&&fa.setChooseTitle([{value:"",condition:"child",options:$,parentContent:(it=Qt.value)==null?void 0:it.compData}]),((M=(J=Jt.value)==null?void 0:J[0])==null?void 0:M.value)!==""){let P=await Be.getItemData(vt.value+"/"+((Ce=(xe=Jt.value)==null?void 0:xe[0])==null?void 0:Ce.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r);P||(await Be.newLoadingCutFirstConstruct(vt.value,vt.value+"/"+((Fe=(Pe=Jt.value)==null?void 0:Pe[0])==null?void 0:Fe.value)),P=await Be.getItemData(vt.value+"/"+((Xe=(qe=Jt.value)==null?void 0:qe[0])==null?void 0:Xe.value),sessionStorage.getItem("systemKey"),"",!1,[],await sa.value)),pt.value=P}}(W==null?void 0:W.length)>0&&((z=(fe=Jt.value)==null?void 0:fe[0])==null?void 0:z.value)===""&&(pt.value=[]),I=[...I,...W??[]],I=[...I,...Jt.value??[]];let x=(X=vt.value)==null?void 0:X.split("/").map(_e=>({value:_e.trim()})),ie=x==null?void 0:x.filter(_e=>!(I!=null&&I.find(E=>(E==null?void 0:E.value)===(_e==null?void 0:_e.value))));I=[...I,...ie??[]],fa.setSelectTitle(I)}pt.value=(pe=pt.value)==null?void 0:pe.filter(I=>(I==null?void 0:I.comp)!=="");let _="";if(!pt.value){let I=(G=(ce=s==null?void 0:s.split("/"))==null?void 0:ce.filter((W,x)=>{var ie;return x!==((ie=s==null?void 0:s.split("/"))==null?void 0:ie.length)-1}))==null?void 0:G.join("/");pt.value=await Be.getItemData(I,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,r),_=(Z=s==null?void 0:s.split("/"))==null?void 0:Z[((ae=s==null?void 0:s.split("/"))==null?void 0:ae.length)-1]}await Ta.setLogRecordAsync({type:"查询",data:pt.value},vt.value),_!==""&&(pt.value=(re=pt.value)==null?void 0:re.map(I=>{var W;return I!=null&&I.isShow&&(I.compData=(W=I==null?void 0:I.compData)==null?void 0:W.map(x=>{var ie,_e,E,te,$;if((x==null?void 0:x.key)==="tableContents"){let P=[],Ee="";Ee=(te=(E=(_e=(ie=I==null?void 0:I.compData)==null?void 0:ie.find(ne=>(ne==null?void 0:ne.key)==="header"))==null?void 0:_e.contents)==null?void 0:E[0])==null?void 0:te.prop,P=($=x.contents)==null?void 0:$.filter(ne=>(ne==null?void 0:ne[Ee])===_||(ne==null?void 0:ne[1])===_),x.contents=P}return x})),I})),pt.value=await Be.getDeepDiffItems(pt.value),await ud(pt.value),Or(),fd(s),yo.value=(Re=pt.value)==null?void 0:Re.map(I=>({label:I==null?void 0:I.name,value:I==null?void 0:I.id})),Pt.setExtraContents([]),fa.setSelectIndex(""),fa.setSelectMenu(""),Pt.setItemData(pt.value),Pt.setOriginalData(pt.value),Pt.setCurStructureCompIds((lt=pt.value)==null?void 0:lt.map(I=>I==null?void 0:I.id)),Pt.setRefreshCurStructure(!1),Ht.setChildMenu(""),Ht.setContentLoading(!1),Pt.setTableLoading(!1),Rn.value=!1}else pt.value=[],Rn.value=!1;e.nextTick(()=>{fn.value=fn.value++,Wn.value=!0})},{immediate:!0});e.watch(()=>Po.value,async()=>{var n,i,s,r,d,u,k,g,f,D,C,V,F,Y,L;if(Po.value){let we=new WeakMap;(i=(n=(await v.getPageInsofDataApi({systemKey:sessionStorage.getItem("systemKey"),type:mo.value})).data.result)==null?void 0:n.filter(y=>{var B,S;return((B=y==null?void 0:y.key)==null?void 0:B.pageKey)!=="menu"&&((S=y==null?void 0:y.key)==null?void 0:S.pageKey)!=="secret"}))==null||i.forEach(y=>{we[y.key.pageKey]?we[y.key.pageKey]=[...we[y.key.pageKey],y]:we[y.key.pageKey]=[y]});let K=vt.value;(s=Qt.value)!=null&&s.compData&&((r=Qt.value)==null?void 0:r.compData)!==vt.value&&(K=K+"/"+((u=(d=Jt.value)==null?void 0:d[0])==null?void 0:u.value));const le=(g=(k=vt.value)==null?void 0:k[0])!=null&&g.startsWith("/")?(D=(f=vt.value)==null?void 0:f[0])==null?void 0:D.substring(1):(C=vt.value)==null?void 0:C[0];let w=await Be.getItemData(K,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value),R="";if(!pt.value){let y=(F=(V=le==null?void 0:le.split("/"))==null?void 0:V.filter((B,S)=>{var ye;return S!==((ye=le==null?void 0:le.split("/"))==null?void 0:ye.length)-1}))==null?void 0:F.join("/");w=await Be.getItemData(y,sessionStorage.getItem("systemKey"),"",!1,[],await sa.value,we),R=(L=le==null?void 0:le.split("/"))==null?void 0:L[((Y=le==null?void 0:le.split("/"))==null?void 0:Y.length)-1]}R!==""&&(w=w==null?void 0:w.map(y=>{var B;return y!=null&&y.isShow&&(y.compData=(B=y==null?void 0:y.compData)==null?void 0:B.map(S=>{var ye,Ze,rt,Ae,je;if((S==null?void 0:S.key)==="tableContents"){let Ie=[],O="";O=(Ae=(rt=(Ze=(ye=y==null?void 0:y.compData)==null?void 0:ye.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:Ze.contents)==null?void 0:rt[0])==null?void 0:Ae.prop,Ie=(je=S.contents)==null?void 0:je.filter(ee=>(ee==null?void 0:ee[O])===R||(ee==null?void 0:ee[1])===R),S.contents=Ie}return S})),y})),w=w==null?void 0:w.filter(y=>(y==null?void 0:y.comp)!==""),pt.value=await Be.getDeepDiffItems(w),Pt.setFreshContent(!1),Or()}},{deep:!0});const md=async()=>{var d,u,k,g,f,D,C,V;Ht.setLinkMenuInfo(null);const n=await v.getInsofDataApi({keyLikes:{pageKey:`loading${((d=Vn.value)==null?void 0:d.account)||((u=Vn.value)==null?void 0:u.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),i=await v.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((k=Vn.value)==null?void 0:k.account)||((g=Vn.value)==null?void 0:g.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let s=(D=(f=n==null?void 0:n.data)==null?void 0:f.result)==null?void 0:D.map(F=>F==null?void 0:F.id);const r=(V=(C=i==null?void 0:i.data)==null?void 0:C.result)==null?void 0:V.map(F=>F==null?void 0:F.id);s=[...v.cloneDeep(s),...r],(s==null?void 0:s.length)>0&&(s!=null&&s.every(F=>F!==null&&F))&&(await v.batchDeleteInsofDataApi({ids:s}),await Ta.setLogRecordAsync({type:"删除",data:s},vt.value)),Ht.setActiveMenuPath(Xu.value),pt.value=null,Pt.setRouteToChildPath(""),Ht.setChildMenu("")},yd=n=>new RegExp("button","i").test(n),bd=n=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(n),Mr=n=>{if(bd(n)){const i=n==null?void 0:n.split("^");(i==null?void 0:i.length)>0&&(i!=null&&i[0])&&Ht.setLinkMenuInfo({path:i==null?void 0:i[0],data:i==null?void 0:i[1]})}},Lr=n=>{var i;Ea.value&&(Ea.value={...Ea.value,mainKeyPropValue:n==null?void 0:n[(i=Ea.value)==null?void 0:i.mainKeyProp]})},kd=n=>{Vr.value=n},dn=e.reactive({index:0,comp:null}),xd=e.computed(()=>{var n;return(n=pt.value)==null?void 0:n.map((i,s)=>({id:i.id,name:i.name,status:wd(i,s)}))}),zr=(n,i)=>{var f,D,C,V,F;const s=i?n:n-2,r=(f=pt.value)==null?void 0:f[s],d=(C=(D=r==null?void 0:r.compData)==null?void 0:D.find(Y=>(Y==null?void 0:Y.key)==="header"))==null?void 0:C.contents,u=d==null?void 0:d.findIndex(Y=>(Y==null?void 0:Y.isMainKey)&&(Y==null?void 0:Y.label)!=="操作"),k=u===-1?0:u,g=(F=(V=r==null?void 0:r.compData)==null?void 0:V.find(Y=>(Y==null?void 0:Y.key)==="tableContents"))==null?void 0:F.contents;return{valid:g==null?void 0:g.every(Y=>Y==null?void 0:Y[k+1]),length:(g==null?void 0:g.length)||0}},wd=(n,i)=>{var r;let s="process";if(((r=n==null?void 0:n.comp)==null?void 0:r.toUpperCase())==="TABLE"){const{valid:d,length:u}=zr(i,!0);dn.index===i?s="process":u===0?s="wait":s=d?"success":"error"}return s},Fr=n=>{var s,r,d,u,k;const i=n+1;if(i>1&&((d=(r=(s=pt.value)==null?void 0:s[n])==null?void 0:r.comp)==null?void 0:d.toUpperCase())==="TABLE"){const{valid:g}=zr(i);g?(dn.index=i,dn.comp=(u=pt.value)==null?void 0:u[n]):v.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else dn.index=i,dn.comp=(k=pt.value)==null?void 0:k[n]},bo=e.computed(()=>{var n,i;return(i=(n=Ar.value)==null?void 0:n[0])==null?void 0:i.isStepLayout});e.watch(()=>bo.value,n=>{n&&Fr(0)},{immediate:!0});const Dd={class:"layout"},Cd=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(n,{emit:i}){const s=i,r=n;e.onMounted(async()=>{});const d=e.computed(()=>v.cloneDeep(r==null?void 0:r.itemData)||[]),u=e.computed(()=>{var C;const D=(C=d==null?void 0:d.value)==null?void 0:C.find(V=>{const{key:F}=V;return F==="baseConfig"});return D==null?void 0:D.contents}),k=e.computed(()=>{var C;const D=(C=d==null?void 0:d.value)==null?void 0:C.find(V=>{const{key:F}=V;return F==="children"});return D==null?void 0:D.contents}),g=e.computed(()=>{let D=v.cloneDeep(k.value)||[];const C=D.length;let V=0;const F=[];if(D=D.map(Y=>{const L=Y.span;return L?(Y.span=Number(L),V=V+Y.span):F.push(Y),Y}),V<24){const Y=Math.floor((24-V)/C);F.forEach(L=>{L.span=Y})}return D}),f=D=>{s("rowClick",D)};return(D,C)=>{var Y;const V=e.resolveComponent("el-col"),F=e.resolveComponent("el-row");return e.openBlock(),e.createElementBlock("div",Dd,[e.createVNode(F,{style:e.normalizeStyle({height:(Y=u.value)==null?void 0:Y.height})},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(L,we)=>(e.openBlock(),e.createBlock(V,{span:L==null?void 0:L.span},{default:e.withCtx(()=>{var q;return[e.unref(Wn)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(L.comp)),{key:e.unref(fn),compName:L.name,index:(L==null?void 0:L.id)??we,height:(q=u.value)==null?void 0:q.height,itemData:L==null?void 0:L.compData,childItemData:L==null?void 0:L.itemChildData,onChange:e.unref(Gn),onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),onRowClick:f},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):e.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),_d=Kt._export_sfc(Cd,[["__scopeId","data-v-ab9a36ed"]]),Ed={class:"layout-operate"},Sd={class:"layout-module"},Td={class:"collapse-title-item"},Id={class:"collapse-title"},Bd={class:"icon-content"},Nd=["onClick"],Ad={class:"comp-child"},Vd=e.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:i}){const s=n,r=i;e.onMounted(()=>{we()});const d=e.ref({}),u=e.ref({}),k=e.ref([]),g=y=>[{label:"高度",prop:"height",type:"input",value:y==null?void 0:y.height}],f=y=>{u.value=y,r("change",R(),!0)},D=e.ref([]),C=e.ref([]),V=y=>[{label:"占比",prop:"span",type:"input",value:y==null?void 0:y.span}],F=e.computed(()=>{const y=s==null?void 0:s.itemContents;return v.cloneDeep(y)}),Y=e.computed(()=>{const y=F==null?void 0:F.value,B=y==null?void 0:y.find(S=>{const{key:ye}=S;return ye==="baseConfig"});return B==null?void 0:B.contents}),L=e.computed(()=>{const y=F==null?void 0:F.value,B=y==null?void 0:y.find(S=>{const{key:ye}=S;return ye==="children"});return B==null?void 0:B.contents}),we=()=>{var y;d.value=F.value||{},D.value=(L==null?void 0:L.value)||[],k.value=g(),k.value=(y=k.value)==null?void 0:y.map(B=>{var ye;const{prop:S}=B;return B.value=(ye=Y.value)==null?void 0:ye[S],B})};e.watch(()=>{var y;return(y=L==null?void 0:L.value)==null?void 0:y.length},()=>{var y;D.value=(L==null?void 0:L.value)||[],C.value=(y=L.value)==null?void 0:y.map(B=>V(B))},{immediate:!0});const q=(y,B)=>{const S=v.cloneDeep(L==null?void 0:L.value);S[B].span=y.span,D.value=S,r("change",R(),!0)},K=y=>rn(y),le=(y,B,S)=>{if(!y)return;const ye=v.cloneDeep(L==null?void 0:L.value);ye[S]&&(ye[S].compData=y,D.value=ye,r("change",R(),!0))},w=y=>{Ut.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let B=v.cloneDeep(L==null?void 0:L.value);B=B==null?void 0:B.filter((S,ye)=>y!==ye),D.value=B,r("change",R(),!0),v.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},R=()=>({compData:[{key:"baseConfig",contents:u.value},{key:"children",contents:D==null?void 0:D.value}]});return(y,B)=>{const S=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ed,[e.createElementVNode("div",Sd,[B[1]||(B[1]=e.createElementVNode("div",{class:"module-title"},"基础配置",-1)),e.createElementVNode("div",null,[e.createVNode(Bt.ssForm,{rowContents:k.value,isEnableWrap:!0,onChange:B[0]||(B[0]=ye=>f(ye))},null,8,["rowContents"])])]),e.createVNode(gr.default,{class:"collapse-content",collapseContents:L.value},{title:e.withCtx(({item:ye,index:Ze})=>[e.createElementVNode("div",Td,[e.createElementVNode("div",Id,e.toDisplayString(ye.name),1),e.createElementVNode("div",Bd,[e.createElementVNode("div",{onClick:e.withModifiers(rt=>w(Ze),["stop"]),class:"icon-content"},[e.createVNode(S,{name:"Delete",style:{width:"16px",height:"16px"}})],8,Nd)])])]),content:e.withCtx(({item:ye,index:Ze})=>[e.createElementVNode("div",Ad,[e.createElementVNode("div",null,[(e.openBlock(),e.createBlock(Bt.ssForm,{rowContents:C.value[Ze],key:Ze,isEnableWrap:!0,onChange:rt=>q(rt,Ze)},null,8,["rowContents","onChange"]))]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(K(ye.comp+"Operate")),{itemContents:ye==null?void 0:ye.compData,originalItemContents:ye.compData,onChange:rt=>le(rt,ye,Ze)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),Od=Kt._export_sfc(Vd,[["__scopeId","data-v-ba05456e"]]),Md=typeof window<"u";var Uo;Md&&((Uo=window==null?void 0:window.navigator)!=null&&Uo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function ua(n){return n==null}function Rr(){}const Ld=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(Ld)));function zd(){const n=new Map;return{on(i,s){const r=n.get(i);r!=null&&r.add(s)||n.set(i,new Set([s]))},off(i,s){const r=n.get(i);r&&r.delete(s)},clear(i){const s=n.get(i);s&&s.clear()},clearAll(){n.clear()},emit(i,...s){const r=n.get(i);r&&r.forEach(d=>{d(...s)})}}}function Wo(n,i=16){if(typeof n!="function")return Rr;const s=(...u)=>{n(...u)};if(i<=0)return Pr(s);let r=0,d;return function(...u){const k=Date.now(),g=k-r;clearTimeout(d),g>=i?(r=k,s(...u)):d=setTimeout(()=>{r=Date.now(),s(...u)},Math.max(0,i-g))}}function Fd(n,i=100){if(typeof n!="function")return Rr;const s=(...d)=>{n(...d)};if(i<=0)return Pr(s);let r;return function(...d){clearTimeout(r),r=setTimeout(()=>{s(...d)},i)}}function Pr(n){if(typeof n!="function")return n;let i=!1,s,r;return function(...d){return s=d,i||(i=!0,r=Promise.resolve().then(()=>(i=!1,r=void 0,n(...s)))),r}}const Dn=new Set,$r=new WeakMap;function Rd(){Dn.forEach(n=>{n(...$r.get(n))}),Dn.clear()}function oa(n,...i){if(typeof n!="function")return n;$r.set(n,i),!Dn.has(n)&&(Dn.add(n),Dn.size===1&&Promise.resolve().then(Rd))}const Kr=Symbol("LAYOUT_KEY"),jr=Symbol("EMITTER_KEY");function Pd(n){let i=0,s;for(let r=0,d=n.length;r<d;r++)s=n[r].y+n[r].h,s>i&&(i=s);return i}function uo(n){const i=Array(n.length);for(let s=0,r=n.length;s<r;s++)i[s]=$d(n[s]);return i}function $d(n){return{...n}}function Ur(n,i){return!(n===i||n.x+n.w<=i.x||n.x>=i.x+i.w||n.y+n.h<=i.y||n.y>=i.y+i.h)}function un(n,i,s){const r=Hr(n),d=qr(n),u=Array(n.length);for(let k=0,g=d.length;k<g;k++){let f=d[k];f.static||(f=Kd(r,f,i,s),r.push(f)),u[n.findIndex(D=>D.i===f.i)]=f,f.moved=!1}return u}function Kd(n,i,s,r){if(s)for(;i.y>0&&!Cn(n,i);)i.y--;else if(r){const u=r[i.i].y;for(;i.y>u&&!Cn(n,i);)i.y--}let d;for(;d=Cn(n,i);)i.y=d.y+d.h;return i}function jd(n,i){const s=Hr(n);for(let r=0,d=n.length;r<d;r++){const u=n[r];if(u.x+u.w>i.cols&&(u.x=i.cols-u.w),u.x<0&&(u.x=0,u.w=i.cols),!u.static)s.push(u);else for(;Cn(s,u);)u.y++}return n}function Ho(n,i){for(let s=0,r=n.length;s<r;s++)if(n[s].i===i)return n[s]}function Cn(n,i){for(let s=0,r=n.length;s<r;s++)if(Ur(n[s],i))return n[s]}function Wr(n,i){return n.filter(s=>Ur(s,i))}function Hr(n){return n.filter(i=>i.static)}function po(n,i,s,r,d=!1,u=!1){if(i.static)return n;const k=i.x,g=i.y,f=r&&i.y>r;typeof s=="number"&&(i.x=s),typeof r=="number"&&(i.y=r),i.moved=!0;let D=qr(n);f&&(D=D.reverse());const C=Wr(D,i);if(u&&C.length)return i.x=k,i.y=g,i.moved=!1,n;for(let V=0,F=C.length;V<F;V++){const Y=C[V];Y.moved||i.y>Y.y&&i.y-Y.y>Y.h/4||(Y.static?n=qo(n,Y,i,d):n=qo(n,i,Y,d))}return n}function qo(n,i,s,r){if(r){const d={x:s.x,y:s.y,w:s.w,h:s.h};if(d.y=Math.max(i.y-s.h,0),!Cn(n,d))return po(n,s,void 0,d.y,!1)}return po(n,s,void 0,s.y+1,!1)}function Ud(n,i,s,r){const d="translate3d("+i+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Wd(n,i,s,r){const d="translate3d("+i*-1+"px,"+n+"px, 0)";return{transform:d,WebkitTransform:d,MozTransform:d,msTransform:d,OTransform:d,width:s+"px",height:r+"px",position:"absolute"}}function Hd(n,i,s,r){return{top:n+"px",left:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qd(n,i,s,r){return{top:n+"px",right:i+"px",width:s+"px",height:r+"px",position:"absolute"}}function qr(n){return Array.from(n).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 Gd(n,i){i=i||"Layout";const s=["x","y","w","h"],r=[];if(!Array.isArray(n))throw new Error(i+" must be an array!");for(let d=0,u=n.length;d<u;d++){const k=n[d];for(let g=0;g<s.length;g++)if(typeof k[s[g]]!="number")throw new Error("VueGridLayout: "+i+"["+d+"]."+s[g]+" must be a number!");if(k.i===void 0||k.i===null)throw new Error("VueGridLayout: "+i+"["+d+"].i cannot be null!");if(typeof k.i!="number"&&typeof k.i!="string")throw new Error("VueGridLayout: "+i+"["+d+"].i must be a string or number!");if(r.indexOf(k.i)>=0)throw new Error("VueGridLayout: "+i+"["+d+"].i must be unique!");if(r.push(k.i),k.static!==void 0&&typeof k.static!="boolean")throw new Error("VueGridLayout: "+i+"["+d+"].static must be a boolean!")}}function Xd(n,i="vgl"){const s=()=>`${i}-${n}`;return{b:s,be:r=>`${s()}__${r}`,bm:r=>`${s()}--${r}`,bem:(r,d)=>`${s()}__${r}--${d}`}}function Go(n){return Yd(n)}function Yd(n){var i;const s=((i=n.target)==null?void 0:i.offsetParent)||document.body,r=n.offsetParent===document.body?{left:0,top:0}:s.getBoundingClientRect(),d=n.clientX+s.scrollLeft-r.left,u=n.clientY+s.scrollTop-r.top;return{x:d,y:u}}function Xo(n,i,s,r){return Jd(n)?{deltaX:s-n,deltaY:r-i,lastX:n,lastY:i,x:s,y:r}:{deltaX:0,deltaY:0,lastX:s,lastY:r,x:s,y:r}}function Jd(n){return typeof n=="number"&&!Number.isNaN(n)}function Zd(n,i){const s=Xr(n);let r=s[0];for(let d=1,u=s.length;d<u;d++){const k=s[d];i>n[k]&&(r=k)}return r}function Gr(n,i){if(!i[n])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+n+" is missing!");return i[n]}function Qd(n,i,s,r,d,u,k){if(i[r])return uo(i[r]);let g=n;const f=Xr(s),D=f.slice(f.indexOf(r));for(let C=0,V=D.length;C<V;C++){const F=D[C];if(i[F]){g=i[F];break}}return g=uo(g||[]),un(jd(g,{cols:u}),k)}function Xr(n){return Object.keys(n).sort((i,s)=>n[i]-n[s])}let ep="auto";function tp(){return typeof document<"u"}function Yo(){return tp()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):ep}var kn={exports:{}},ap=kn.exports,Jo;function np(){return Jo||(Jo=1,function(n,i){(function(s,r){n.exports=r()})(ap,function(){function s(a,t){var o=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);t&&(l=l.filter(function(c){return Object.getOwnPropertyDescriptor(a,c).enumerable})),o.push.apply(o,l)}return o}function r(a){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?s(Object(o),!0).forEach(function(l){f(a,l,o[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(o,l))})}return a}function d(a){return d=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},d(a)}function u(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function k(a,t){for(var o=0;o<t.length;o++){var l=t[o];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,we(l.key),l)}}function g(a,t,o){return t&&k(a.prototype,t),Object.defineProperty(a,"prototype",{writable:!1}),a}function f(a,t,o){return(t=we(t))in a?Object.defineProperty(a,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[t]=o,a}function D(a,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(t&&t.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),t&&V(a,t)}function C(a){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(a)}function V(a,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,l){return o.__proto__=l,o},V(a,t)}function F(a){if(a===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a}function Y(a){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var o,l=C(a);if(t){var c=C(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return function(p,m){if(m&&(typeof m=="object"||typeof m=="function"))return m;if(m!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F(p)}(this,o)}}function L(){return L=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,t,o){var l=function(p,m){for(;!Object.prototype.hasOwnProperty.call(p,m)&&(p=C(p))!==null;);return p}(a,t);if(l){var c=Object.getOwnPropertyDescriptor(l,t);return c.get?c.get.call(arguments.length<3?a:o):c.value}},L.apply(this,arguments)}function we(a){var t=function(o,l){if(typeof o!="object"||o===null)return o;var c=o[Symbol.toPrimitive];if(c!==void 0){var p=c.call(o,l);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(o)}(a,"string");return typeof t=="symbol"?t:t+""}var q=function(a){return!(!a||!a.Window)&&a instanceof a.Window},K=void 0,le=void 0;function w(a){K=a;var t=a.document.createTextNode("");t.ownerDocument!==a.document&&typeof a.wrap=="function"&&a.wrap(t)===t&&(a=a.wrap(a)),le=a}function R(a){return q(a)?a:(a.ownerDocument||a).defaultView||le.window}typeof window<"u"&&window&&w(window);var y=function(a){return!!a&&d(a)==="object"},B=function(a){return typeof a=="function"},S={window:function(a){return a===le||q(a)},docFrag:function(a){return y(a)&&a.nodeType===11},object:y,func:B,number:function(a){return typeof a=="number"},bool:function(a){return typeof a=="boolean"},string:function(a){return typeof a=="string"},element:function(a){if(!a||d(a)!=="object")return!1;var t=R(a)||le;return/object|function/.test(typeof Element>"u"?"undefined":d(Element))?a instanceof Element||a instanceof t.Element:a.nodeType===1&&typeof a.nodeName=="string"},plainObject:function(a){return y(a)&&!!a.constructor&&/function Object\b/.test(a.constructor.toString())},array:function(a){return y(a)&&a.length!==void 0&&B(a.splice)}};function ye(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.prepared.axis;o==="x"?(t.coords.cur.page.y=t.coords.start.page.y,t.coords.cur.client.y=t.coords.start.client.y,t.coords.velocity.client.y=0,t.coords.velocity.page.y=0):o==="y"&&(t.coords.cur.page.x=t.coords.start.page.x,t.coords.cur.client.x=t.coords.start.client.x,t.coords.velocity.client.x=0,t.coords.velocity.page.x=0)}}function Ze(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="drag"){var l=o.prepared.axis;if(l==="x"||l==="y"){var c=l==="x"?"y":"x";t.page[c]=o.coords.start.page[c],t.client[c]=o.coords.start.client[c],t.delta[c]=0}}}var rt={id:"actions/drag",install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.draggable=rt.draggable,t.map.drag=rt,t.methodDict.drag="draggable",l.actions.drag=rt.defaults},listeners:{"interactions:before-action-move":ye,"interactions:action-resume":ye,"interactions:action-move":Ze,"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.buttons,c=o.options.drag;if(c&&c.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(l&o.options.drag.mouseButtons)!=0))return a.action={name:"drag",axis:c.lockAxis==="start"?c.startAxis:c.lockAxis},!1}},draggable:function(a){return S.object(a)?(this.options.drag.enabled=a.enabled!==!1,this.setPerAction("drag",a),this.setOnEvents("drag",a),/^(xy|x|y|start)$/.test(a.lockAxis)&&(this.options.drag.lockAxis=a.lockAxis),/^(xy|x|y)$/.test(a.startAxis)&&(this.options.drag.startAxis=a.startAxis),this):S.bool(a)?(this.options.drag.enabled=a,this):this.options.drag},beforeMove:ye,move:Ze,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(a){return a.search("drag")===0}},Ae=rt,je={init:function(a){var t=a;je.document=t.document,je.DocumentFragment=t.DocumentFragment||Ie,je.SVGElement=t.SVGElement||Ie,je.SVGSVGElement=t.SVGSVGElement||Ie,je.SVGElementInstance=t.SVGElementInstance||Ie,je.Element=t.Element||Ie,je.HTMLElement=t.HTMLElement||je.Element,je.Event=t.Event,je.Touch=t.Touch||Ie,je.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 Ie(){}var O=je,ee={init:function(a){var t=O.Element,o=a.navigator||{};ee.supportsTouch="ontouchstart"in a||S.func(a.DocumentTouch)&&O.document instanceof a.DocumentTouch,ee.supportsPointerEvent=o.pointerEnabled!==!1&&!!O.PointerEvent,ee.isIOS=/iP(hone|od|ad)/.test(o.platform),ee.isIOS7=/iP(hone|od|ad)/.test(o.platform)&&/OS 7[^\d]/.test(o.appVersion),ee.isIe9=/MSIE 9/.test(o.userAgent),ee.isOperaMobile=o.appName==="Opera"&&ee.supportsTouch&&/Presto/.test(o.userAgent),ee.prefixedMatchesSelector="matches"in t.prototype?"matches":"webkitMatchesSelector"in t.prototype?"webkitMatchesSelector":"mozMatchesSelector"in t.prototype?"mozMatchesSelector":"oMatchesSelector"in t.prototype?"oMatchesSelector":"msMatchesSelector",ee.pEventTypes=ee.supportsPointerEvent?O.PointerEvent===a.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,ee.wheelEvent=O.document&&"onmousewheel"in O.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},se=ee;function he(a,t){if(a.contains)return a.contains(t);for(;t;){if(t===a)return!0;t=t.parentNode}return!1}function Ge(a,t){for(;S.element(a);){if(J(a,t))return a;a=it(a)}return null}function it(a){var t=a.parentNode;if(S.docFrag(t)){for(;(t=t.host)&&S.docFrag(t););return t}return t}function J(a,t){return le!==K&&(t=t.replace(/\/deep\//g," ")),a[se.prefixedMatchesSelector](t)}var M=function(a){return a.parentNode||a.host};function xe(a,t){for(var o,l=[],c=a;(o=M(c))&&c!==t&&o!==c.ownerDocument;)l.unshift(c),c=o;return l}function Ce(a,t,o){for(;S.element(a);){if(J(a,t))return!0;if((a=it(a))===o)return J(a,t)}return!1}function Pe(a){return a.correspondingUseElement||a}function Fe(a){var t=a instanceof O.SVGElement?a.getBoundingClientRect():a.getClientRects()[0];return t&&{left:t.left,right:t.right,top:t.top,bottom:t.bottom,width:t.width||t.right-t.left,height:t.height||t.bottom-t.top}}function qe(a){var t,o=Fe(a);if(!se.isIOS7&&o){var l={x:(t=(t=R(a))||le).scrollX||t.document.documentElement.scrollLeft,y:t.scrollY||t.document.documentElement.scrollTop};o.left+=l.x,o.right+=l.x,o.top+=l.y,o.bottom+=l.y}return o}function Xe(a){for(var t=[];a;)t.push(a),a=it(a);return t}function fe(a){return!!S.string(a)&&(O.document.querySelector(a),!0)}function z(a,t){for(var o in t)a[o]=t[o];return a}function X(a,t,o){return a==="parent"?it(o):a==="self"?t.getRect(o):Ge(o,a)}function pe(a,t,o,l){var c=a;return S.string(c)?c=X(c,t,o):S.func(c)&&(c=c.apply(void 0,l)),S.element(c)&&(c=qe(c)),c}function ce(a){return a&&{x:"x"in a?a.x:a.left,y:"y"in a?a.y:a.top}}function G(a){return!a||"x"in a&&"y"in a||((a=z({},a)).x=a.left||0,a.y=a.top||0,a.width=a.width||(a.right||0)-a.x,a.height=a.height||(a.bottom||0)-a.y),a}function ae(a,t,o){a.left&&(t.left+=o.x),a.right&&(t.right+=o.x),a.top&&(t.top+=o.y),a.bottom&&(t.bottom+=o.y),t.width=t.right-t.left,t.height=t.bottom-t.top}function Z(a,t,o){var l=o&&a.options[o];return ce(pe(l&&l.origin||a.options.origin,a,t,[a&&t]))||{x:0,y:0}}function re(a,t){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(T){return!0},l=arguments.length>3?arguments[3]:void 0;if(l=l||{},S.string(a)&&a.search(" ")!==-1&&(a=Re(a)),S.array(a))return a.forEach(function(T){return re(T,t,o,l)}),l;if(S.object(a)&&(t=a,a=""),S.func(t)&&o(a))l[a]=l[a]||[],l[a].push(t);else if(S.array(t))for(var c=0,p=t;c<p.length;c++){var m=p[c];re(a,m,o,l)}else if(S.object(t))for(var b in t)re(Re(b).map(function(T){return"".concat(a).concat(T)}),t[b],o,l);return l}function Re(a){return a.trim().split(/ +/)}var lt=function(a,t){return Math.sqrt(a*a+t*t)},h=["webkit","moz"];function _(a,t){a.__set||(a.__set={});var o=function(c){if(h.some(function(p){return c.indexOf(p)===0}))return 1;typeof a[c]!="function"&&c!=="__set"&&Object.defineProperty(a,c,{get:function(){return c in a.__set?a.__set[c]:a.__set[c]=t[c]},set:function(p){a.__set[c]=p},configurable:!0})};for(var l in t)o(l);return a}function I(a,t){a.page=a.page||{},a.page.x=t.page.x,a.page.y=t.page.y,a.client=a.client||{},a.client.x=t.client.x,a.client.y=t.client.y,a.timeStamp=t.timeStamp}function W(a){a.page.x=0,a.page.y=0,a.client.x=0,a.client.y=0}function x(a){return a instanceof O.Event||a instanceof O.Touch}function ie(a,t,o){return a=a||"page",(o=o||{}).x=t[a+"X"],o.y=t[a+"Y"],o}function _e(a,t){return t=t||{x:0,y:0},se.isOperaMobile&&x(a)?(ie("screen",a,t),t.x+=window.scrollX,t.y+=window.scrollY):ie("page",a,t),t}function E(a){return S.number(a.pointerId)?a.pointerId:a.identifier}function te(a,t,o){var l=t.length>1?P(t):t[0];_e(l,a.page),function(c,p){p=p||{},se.isOperaMobile&&x(c)?ie("screen",c,p):ie("client",c,p)}(l,a.client),a.timeStamp=o}function $(a){var t=[];return S.array(a)?(t[0]=a[0],t[1]=a[1]):a.type==="touchend"?a.touches.length===1?(t[0]=a.touches[0],t[1]=a.changedTouches[0]):a.touches.length===0&&(t[0]=a.changedTouches[0],t[1]=a.changedTouches[1]):(t[0]=a.touches[0],t[1]=a.touches[1]),t}function P(a){for(var t={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},o=0;o<a.length;o++){var l=a[o];for(var c in t)t[c]+=l[c]}for(var p in t)t[p]/=a.length;return t}function Ee(a){if(!a.length)return null;var t=$(a),o=Math.min(t[0].pageX,t[1].pageX),l=Math.min(t[0].pageY,t[1].pageY),c=Math.max(t[0].pageX,t[1].pageX),p=Math.max(t[0].pageY,t[1].pageY);return{x:o,y:l,left:o,top:l,right:c,bottom:p,width:c-o,height:p-l}}function ne(a,t){var o=t+"X",l=t+"Y",c=$(a),p=c[0][o]-c[1][o],m=c[0][l]-c[1][l];return lt(p,m)}function H(a,t){var o=t+"X",l=t+"Y",c=$(a),p=c[1][o]-c[0][o],m=c[1][l]-c[0][l];return 180*Math.atan2(m,p)/Math.PI}function Q(a){return S.string(a.pointerType)?a.pointerType:S.number(a.pointerType)?[void 0,void 0,"touch","pen","mouse"][a.pointerType]:/touch/.test(a.type||"")||a instanceof O.Touch?"touch":"mouse"}function de(a){var t=S.func(a.composedPath)?a.composedPath():a.path;return[Pe(t?t[0]:a.target),Pe(a.currentTarget)]}var De=function(){function a(t){u(this,a),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=t}return g(a,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),a}();Object.defineProperty(De.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var be=function(a,t){for(var o=0;o<t.length;o++){var l=t[o];a.push(l)}return a},ke=function(a){return be([],a)},j=function(a,t){for(var o=0;o<a.length;o++)if(t(a[o],o,a))return o;return-1},Ne=function(a,t){return a[j(a,t)]},ge=function(a){D(o,a);var t=Y(o);function o(l,c,p){var m;u(this,o),(m=t.call(this,c._interaction)).dropzone=void 0,m.dragEvent=void 0,m.relatedTarget=void 0,m.draggable=void 0,m.propagationStopped=!1,m.immediatePropagationStopped=!1;var b=p==="dragleave"?l.prev:l.cur,T=b.element,U=b.dropzone;return m.type=p,m.target=T,m.currentTarget=T,m.dropzone=U,m.dragEvent=c,m.relatedTarget=c.target,m.draggable=c.interactable,m.timeStamp=c.timeStamp,m}return g(o,[{key:"reject",value:function(){var l=this,c=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&c.cur.dropzone===this.dropzone&&c.cur.element===this.target)if(c.prev.dropzone=this.dropzone,c.prev.element=this.target,c.rejected=!0,c.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var p=c.activeDrops,m=j(p,function(T){var U=T.dropzone,N=T.element;return U===l.dropzone&&N===l.target});c.activeDrops.splice(m,1);var b=new o(c,this.dragEvent,"dropdeactivate");b.dropzone=this.dropzone,b.target=this.target,this.dropzone.fire(b)}else this.dropzone.fire(new o(c,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),o}(De);function Le(a,t){for(var o=0,l=a.slice();o<l.length;o++){var c=l[o],p=c.dropzone,m=c.element;t.dropzone=p,t.target=m,p.fire(t),t.propagationStopped=t.immediatePropagationStopped=!1}}function ct(a,t){for(var o=function(p,m){for(var b=[],T=0,U=p.interactables.list;T<U.length;T++){var N=U[T];if(N.options.drop.enabled){var oe=N.options.drop.accept;if(!(S.element(oe)&&oe!==m||S.string(oe)&&!J(m,oe)||S.func(oe)&&!oe({dropzone:N,draggableElement:m})))for(var Te=0,We=N.getAllElements();Te<We.length;Te++){var Ke=We[Te];Ke!==m&&b.push({dropzone:N,element:Ke,rect:N.getRect(Ke)})}}}return b}(a,t),l=0;l<o.length;l++){var c=o[l];c.rect=c.dropzone.getRect(c.element)}return o}function Ue(a,t,o){for(var l=a.dropState,c=a.interactable,p=a.element,m=[],b=0,T=l.activeDrops;b<T.length;b++){var U=T[b],N=U.dropzone,oe=U.element,Te=U.rect,We=N.dropCheck(t,o,c,p,oe,Te);m.push(We?oe:null)}var Ke=function(Je){for(var ut,st,mt,Tt=[],Nt=0;Nt<Je.length;Nt++){var Dt=Je[Nt],It=Je[ut];if(Dt&&Nt!==ut)if(It){var na=M(Dt),Wt=M(It);if(na!==Dt.ownerDocument)if(Wt!==Dt.ownerDocument)if(na!==Wt){Tt=Tt.length?Tt:xe(It);var ca=void 0;if(It instanceof O.HTMLElement&&Dt instanceof O.SVGElement&&!(Dt instanceof O.SVGSVGElement)){if(Dt===Wt)continue;ca=Dt.ownerSVGElement}else ca=Dt;for(var ha=xe(ca,It.ownerDocument),Da=0;ha[Da]&&ha[Da]===Tt[Da];)Da++;var An=[ha[Da-1],ha[Da],Tt[Da]];if(An[0])for(var mn=An[0].lastChild;mn;){if(mn===An[1]){ut=Nt,Tt=ha;break}if(mn===An[2])break;mn=mn.previousSibling}}else mt=It,(parseInt(R(st=Dt).getComputedStyle(st).zIndex,10)||0)>=(parseInt(R(mt).getComputedStyle(mt).zIndex,10)||0)&&(ut=Nt);else ut=Nt}else ut=Nt}return ut}(m);return l.activeDrops[Ke]||null}function ot(a,t,o){var l=a.dropState,c={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return o.type==="dragstart"&&(c.activate=new ge(l,o,"dropactivate"),c.activate.target=null,c.activate.dropzone=null),o.type==="dragend"&&(c.deactivate=new ge(l,o,"dropdeactivate"),c.deactivate.target=null,c.deactivate.dropzone=null),l.rejected||(l.cur.element!==l.prev.element&&(l.prev.dropzone&&(c.leave=new ge(l,o,"dragleave"),o.dragLeave=c.leave.target=l.prev.element,o.prevDropzone=c.leave.dropzone=l.prev.dropzone),l.cur.dropzone&&(c.enter=new ge(l,o,"dragenter"),o.dragEnter=l.cur.element,o.dropzone=l.cur.dropzone)),o.type==="dragend"&&l.cur.dropzone&&(c.drop=new ge(l,o,"drop"),o.dropzone=l.cur.dropzone,o.relatedTarget=l.cur.element),o.type==="dragmove"&&l.cur.dropzone&&(c.move=new ge(l,o,"dropmove"),o.dropzone=l.cur.dropzone)),c}function Oe(a,t){var o=a.dropState,l=o.activeDrops,c=o.cur,p=o.prev;t.leave&&p.dropzone.fire(t.leave),t.enter&&c.dropzone.fire(t.enter),t.move&&c.dropzone.fire(t.move),t.drop&&c.dropzone.fire(t.drop),t.deactivate&&Le(l,t.deactivate),o.prev.dropzone=c.dropzone,o.prev.element=c.element}function gt(a,t){var o=a.interaction,l=a.iEvent,c=a.event;if(l.type==="dragmove"||l.type==="dragend"){var p=o.dropState;t.dynamicDrop&&(p.activeDrops=ct(t,o.element));var m=l,b=Ue(o,m,c);p.rejected=p.rejected&&!!b&&b.dropzone===p.cur.dropzone&&b.element===p.cur.element,p.cur.dropzone=b&&b.dropzone,p.cur.element=b&&b.element,p.events=ot(o,0,m)}}var tt={id:"actions/drop",install:function(a){var t=a.actions,o=a.interactStatic,l=a.Interactable,c=a.defaults;a.usePlugin(Ae),l.prototype.dropzone=function(p){return function(m,b){if(S.object(b)){if(m.options.drop.enabled=b.enabled!==!1,b.listeners){var T=re(b.listeners),U=Object.keys(T).reduce(function(oe,Te){return oe[/^(enter|leave)/.test(Te)?"drag".concat(Te):/^(activate|deactivate|move)/.test(Te)?"drop".concat(Te):Te]=T[Te],oe},{}),N=m.options.drop.listeners;N&&m.off(N),m.on(U),m.options.drop.listeners=U}return S.func(b.ondrop)&&m.on("drop",b.ondrop),S.func(b.ondropactivate)&&m.on("dropactivate",b.ondropactivate),S.func(b.ondropdeactivate)&&m.on("dropdeactivate",b.ondropdeactivate),S.func(b.ondragenter)&&m.on("dragenter",b.ondragenter),S.func(b.ondragleave)&&m.on("dragleave",b.ondragleave),S.func(b.ondropmove)&&m.on("dropmove",b.ondropmove),/^(pointer|center)$/.test(b.overlap)?m.options.drop.overlap=b.overlap:S.number(b.overlap)&&(m.options.drop.overlap=Math.max(Math.min(1,b.overlap),0)),"accept"in b&&(m.options.drop.accept=b.accept),"checker"in b&&(m.options.drop.checker=b.checker),m}return S.bool(b)?(m.options.drop.enabled=b,m):m.options.drop}(this,p)},l.prototype.dropCheck=function(p,m,b,T,U,N){return function(oe,Te,We,Ke,Je,ut,st){var mt=!1;if(!(st=st||oe.getRect(ut)))return!!oe.options.drop.checker&&oe.options.drop.checker(Te,We,mt,oe,ut,Ke,Je);var Tt=oe.options.drop.overlap;if(Tt==="pointer"){var Nt=Z(Ke,Je,"drag"),Dt=_e(Te);Dt.x+=Nt.x,Dt.y+=Nt.y;var It=Dt.x>st.left&&Dt.x<st.right,na=Dt.y>st.top&&Dt.y<st.bottom;mt=It&&na}var Wt=Ke.getRect(Je);if(Wt&&Tt==="center"){var ca=Wt.left+Wt.width/2,ha=Wt.top+Wt.height/2;mt=ca>=st.left&&ca<=st.right&&ha>=st.top&&ha<=st.bottom}return Wt&&S.number(Tt)&&(mt=Math.max(0,Math.min(st.right,Wt.right)-Math.max(st.left,Wt.left))*Math.max(0,Math.min(st.bottom,Wt.bottom)-Math.max(st.top,Wt.top))/(Wt.width*Wt.height)>=Tt),oe.options.drop.checker&&(mt=oe.options.drop.checker(Te,We,mt,oe,ut,Ke,Je)),mt}(this,p,m,b,T,U,N)},o.dynamicDrop=function(p){return S.bool(p)?(a.dynamicDrop=p,o):a.dynamicDrop},z(t.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),t.methodDict.drop="dropzone",a.dynamicDrop=!1,c.actions.drop=tt.defaults},listeners:{"interactions:before-action-start":function(a){var t=a.interaction;t.prepared.name==="drag"&&(t.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(a,t){var o=a.interaction,l=(a.event,a.iEvent);if(o.prepared.name==="drag"){var c=o.dropState;c.activeDrops=[],c.events={},c.activeDrops=ct(t,o.element),c.events=ot(o,0,l),c.events.activate&&(Le(c.activeDrops,c.events.activate),t.fire("actions/drop:start",{interaction:o,dragEvent:l}))}},"interactions:action-move":gt,"interactions:after-action-move":function(a,t){var o=a.interaction,l=a.iEvent;if(o.prepared.name==="drag"){var c=o.dropState;Oe(o,c.events),t.fire("actions/drop:move",{interaction:o,dragEvent:l}),c.events={}}},"interactions:action-end":function(a,t){if(a.interaction.prepared.name==="drag"){var o=a.interaction,l=a.iEvent;gt(a,t),Oe(o,o.dropState.events),t.fire("actions/drop:end",{interaction:o,dragEvent:l})}},"interactions:stop":function(a){var t=a.interaction;if(t.prepared.name==="drag"){var o=t.dropState;o&&(o.activeDrops=null,o.events=null,o.cur.dropzone=null,o.cur.element=null,o.prev.dropzone=null,o.prev.element=null,o.rejected=!1)}}},getActiveDrops:ct,getDrop:Ue,getDropEvents:ot,fireDropEvents:Oe,filterEventType:function(a){return a.search("drag")===0||a.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ve=tt;function $e(a){var t=a.interaction,o=a.iEvent,l=a.phase;if(t.prepared.name==="gesture"){var c=t.pointers.map(function(U){return U.pointer}),p=l==="start",m=l==="end",b=t.interactable.options.deltaSource;if(o.touches=[c[0],c[1]],p)o.distance=ne(c,b),o.box=Ee(c),o.scale=1,o.ds=0,o.angle=H(c,b),o.da=0,t.gesture.startDistance=o.distance,t.gesture.startAngle=o.angle;else if(m||t.pointers.length<2){var T=t.prevEvent;o.distance=T.distance,o.box=T.box,o.scale=T.scale,o.ds=0,o.angle=T.angle,o.da=0}else o.distance=ne(c,b),o.box=Ee(c),o.scale=o.distance/t.gesture.startDistance,o.angle=H(c,b),o.ds=o.scale-t.gesture.scale,o.da=o.angle-t.gesture.angle;t.gesture.distance=o.distance,t.gesture.angle=o.angle,S.number(o.scale)&&o.scale!==1/0&&!isNaN(o.scale)&&(t.gesture.scale=o.scale)}}var et={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(a){var t=a.actions,o=a.Interactable,l=a.defaults;o.prototype.gesturable=function(c){return S.object(c)?(this.options.gesture.enabled=c.enabled!==!1,this.setPerAction("gesture",c),this.setOnEvents("gesture",c),this):S.bool(c)?(this.options.gesture.enabled=c,this):this.options.gesture},t.map.gesture=et,t.methodDict.gesture="gesturable",l.actions.gesture=et.defaults},listeners:{"interactions:action-start":$e,"interactions:action-move":$e,"interactions:action-end":$e,"interactions:new":function(a){a.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(a){if(!(a.interaction.pointers.length<2)){var t=a.interactable.options.gesture;if(t&&t.enabled)return a.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(a){return a.search("gesture")===0}},Ye=et;function ze(a,t,o,l,c,p,m){if(!t)return!1;if(t===!0){var b=S.number(p.width)?p.width:p.right-p.left,T=S.number(p.height)?p.height:p.bottom-p.top;if(m=Math.min(m,Math.abs((a==="left"||a==="right"?b:T)/2)),b<0&&(a==="left"?a="right":a==="right"&&(a="left")),T<0&&(a==="top"?a="bottom":a==="bottom"&&(a="top")),a==="left"){var U=b>=0?p.left:p.right;return o.x<U+m}if(a==="top"){var N=T>=0?p.top:p.bottom;return o.y<N+m}if(a==="right")return o.x>(b>=0?p.right:p.left)-m;if(a==="bottom")return o.y>(T>=0?p.bottom:p.top)-m}return!!S.element(l)&&(S.element(t)?t===l:Ce(l,t,c))}function at(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.resizeAxes){var l=t;o.interactable.options.resize.square?(o.resizeAxes==="y"?l.delta.x=l.delta.y:l.delta.y=l.delta.x,l.axes="xy"):(l.axes=o.resizeAxes,o.resizeAxes==="x"?l.delta.y=0:o.resizeAxes==="y"&&(l.delta.x=0))}}var ve,Se,Me={id:"actions/resize",before:["actions/drag"],install:function(a){var t=a.actions,o=a.browser,l=a.Interactable,c=a.defaults;Me.cursors=function(p){return p.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),Me.defaultMargin=o.supportsTouch||o.supportsPointerEvent?20:10,l.prototype.resizable=function(p){return function(m,b,T){return S.object(b)?(m.options.resize.enabled=b.enabled!==!1,m.setPerAction("resize",b),m.setOnEvents("resize",b),S.string(b.axis)&&/^x$|^y$|^xy$/.test(b.axis)?m.options.resize.axis=b.axis:b.axis===null&&(m.options.resize.axis=T.defaults.actions.resize.axis),S.bool(b.preserveAspectRatio)?m.options.resize.preserveAspectRatio=b.preserveAspectRatio:S.bool(b.square)&&(m.options.resize.square=b.square),m):S.bool(b)?(m.options.resize.enabled=b,m):m.options.resize}(this,p,a)},t.map.resize=Me,t.methodDict.resize="resizable",c.actions.resize=Me.defaults},listeners:{"interactions:new":function(a){a.interaction.resizeAxes="xy"},"interactions:action-start":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.rect;l._rects={start:z({},p),corrected:z({},p),previous:z({},p),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},c.edges=l.prepared.edges,c.rect=l._rects.corrected,c.deltaRect=l._rects.delta}})(a),at(a)},"interactions:action-move":function(a){(function(t){var o=t.iEvent,l=t.interaction;if(l.prepared.name==="resize"&&l.prepared.edges){var c=o,p=l.interactable.options.resize.invert,m=p==="reposition"||p==="negate",b=l.rect,T=l._rects,U=T.start,N=T.corrected,oe=T.delta,Te=T.previous;if(z(Te,N),m){if(z(N,b),p==="reposition"){if(N.top>N.bottom){var We=N.top;N.top=N.bottom,N.bottom=We}if(N.left>N.right){var Ke=N.left;N.left=N.right,N.right=Ke}}}else N.top=Math.min(b.top,U.bottom),N.bottom=Math.max(b.bottom,U.top),N.left=Math.min(b.left,U.right),N.right=Math.max(b.right,U.left);for(var Je in N.width=N.right-N.left,N.height=N.bottom-N.top,N)oe[Je]=N[Je]-Te[Je];c.edges=l.prepared.edges,c.rect=N,c.deltaRect=oe}})(a),at(a)},"interactions:action-end":function(a){var t=a.iEvent,o=a.interaction;if(o.prepared.name==="resize"&&o.prepared.edges){var l=t;l.edges=o.prepared.edges,l.rect=o._rects.corrected,l.deltaRect=o._rects.delta}},"auto-start:check":function(a){var t=a.interaction,o=a.interactable,l=a.element,c=a.rect,p=a.buttons;if(c){var m=z({},t.coords.cur.page),b=o.options.resize;if(b&&b.enabled&&(!t.pointerIsDown||!/mouse|pointer/.test(t.pointerType)||(p&b.mouseButtons)!=0)){if(S.object(b.edges)){var T={left:!1,right:!1,top:!1,bottom:!1};for(var U in T)T[U]=ze(U,b.edges[U],m,t._latestPointer.eventTarget,l,c,b.margin||Me.defaultMargin);T.left=T.left&&!T.right,T.top=T.top&&!T.bottom,(T.left||T.right||T.top||T.bottom)&&(a.action={name:"resize",edges:T})}else{var N=b.axis!=="y"&&m.x>c.right-Me.defaultMargin,oe=b.axis!=="x"&&m.y>c.bottom-Me.defaultMargin;(N||oe)&&(a.action={name:"resize",axes:(N?"x":"")+(oe?"y":"")})}return!a.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(a){var t=a.edges,o=a.axis,l=a.name,c=Me.cursors,p=null;if(o)p=c[l+o];else if(t){for(var m="",b=0,T=["top","bottom","left","right"];b<T.length;b++){var U=T[b];t[U]&&(m+=U)}p=c[m]}return p},filterEventType:function(a){return a.search("resize")===0},defaultMargin:null},Qe=Me,A={id:"actions",install:function(a){a.usePlugin(Ye),a.usePlugin(Qe),a.usePlugin(Ae),a.usePlugin(Ve)}},ue=0,He={request:function(a){return ve(a)},cancel:function(a){return Se(a)},init:function(a){if(ve=a.requestAnimationFrame,Se=a.cancelAnimationFrame,!ve)for(var t=["ms","moz","webkit","o"],o=0;o<t.length;o++){var l=t[o];ve=a["".concat(l,"RequestAnimationFrame")],Se=a["".concat(l,"CancelAnimationFrame")]||a["".concat(l,"CancelRequestAnimationFrame")]}ve=ve&&ve.bind(a),Se=Se&&Se.bind(a),ve||(ve=function(c){var p=Date.now(),m=Math.max(0,16-(p-ue)),b=a.setTimeout(function(){c(p+m)},m);return ue=p+m,b},Se=function(c){return clearTimeout(c)})}},me={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(a){me.isScrolling=!0,He.cancel(me.i),a.autoScroll=me,me.interaction=a,me.prevTime=me.now(),me.i=He.request(me.scroll)},stop:function(){me.isScrolling=!1,me.interaction&&(me.interaction.autoScroll=null),He.cancel(me.i)},scroll:function(){var a=me.interaction,t=a.interactable,o=a.element,l=a.prepared.name,c=t.options[l].autoScroll,p=nt(c.container,t,o),m=me.now(),b=(m-me.prevTime)/1e3,T=c.speed*b;if(T>=1){var U={x:me.x*T,y:me.y*T};if(U.x||U.y){var N=kt(p);S.window(p)?p.scrollBy(U.x,U.y):p&&(p.scrollLeft+=U.x,p.scrollTop+=U.y);var oe=kt(p),Te={x:oe.x-N.x,y:oe.y-N.y};(Te.x||Te.y)&&t.fire({type:"autoscroll",target:o,interactable:t,delta:Te,interaction:a,container:p})}me.prevTime=m}me.isScrolling&&(He.cancel(me.i),me.i=He.request(me.scroll))},check:function(a,t){var o;return(o=a.options[t].autoScroll)==null?void 0:o.enabled},onInteractionMove:function(a){var t=a.interaction,o=a.pointer;if(t.interacting()&&me.check(t.interactable,t.prepared.name))if(t.simulation)me.x=me.y=0;else{var l,c,p,m,b=t.interactable,T=t.element,U=t.prepared.name,N=b.options[U].autoScroll,oe=nt(N.container,b,T);if(S.window(oe))m=o.clientX<me.margin,l=o.clientY<me.margin,c=o.clientX>oe.innerWidth-me.margin,p=o.clientY>oe.innerHeight-me.margin;else{var Te=Fe(oe);m=o.clientX<Te.left+me.margin,l=o.clientY<Te.top+me.margin,c=o.clientX>Te.right-me.margin,p=o.clientY>Te.bottom-me.margin}me.x=c?1:m?-1:0,me.y=p?1:l?-1:0,me.isScrolling||(me.margin=N.margin,me.speed=N.speed,me.start(t))}}};function nt(a,t,o){return(S.string(a)?X(a,t,o):a)||R(o)}function kt(a){return S.window(a)&&(a=window.document.body),{x:a.scrollLeft,y:a.scrollTop}}var yt={id:"auto-scroll",install:function(a){var t=a.defaults,o=a.actions;a.autoScroll=me,me.now=function(){return a.now()},o.phaselessTypes.autoscroll=!0,t.perAction.autoScroll=me.defaults},listeners:{"interactions:new":function(a){a.interaction.autoScroll=null},"interactions:destroy":function(a){a.interaction.autoScroll=null,me.stop(),me.interaction&&(me.interaction=null)},"interactions:stop":me.stop,"interactions:action-move":function(a){return me.onInteractionMove(a)}}},ht=yt;function dt(a,t){var o=!1;return function(){return o||(le.console.warn(t),o=!0),a.apply(this,arguments)}}function ft(a,t){return a.name=t.name,a.axis=t.axis,a.edges=t.edges,a}function _t(a){return S.bool(a)?(this.options.styleCursor=a,this):a===null?(delete this.options.styleCursor,this):this.options.styleCursor}function Mt(a){return S.func(a)?(this.options.actionChecker=a,this):a===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Vt={id:"auto-start/interactableMethods",install:function(a){var t=a.Interactable;t.prototype.getAction=function(o,l,c,p){var m=function(b,T,U,N,oe){var Te=b.getRect(N),We=T.buttons||{0:1,1:4,3:8,4:16}[T.button],Ke={action:null,interactable:b,interaction:U,element:N,rect:Te,buttons:We};return oe.fire("auto-start:check",Ke),Ke.action}(this,l,c,p,a);return this.options.actionChecker?this.options.actionChecker(o,l,m,this,p,c):m},t.prototype.ignoreFrom=dt(function(o){return this._backCompatOption("ignoreFrom",o)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),t.prototype.allowFrom=dt(function(o){return this._backCompatOption("allowFrom",o)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),t.prototype.actionChecker=Mt,t.prototype.styleCursor=_t}};function Lt(a,t,o,l,c){return t.testIgnoreAllow(t.options[a.name],o,l)&&t.options[a.name].enabled&&Gt(t,o,a,c)?a:null}function bt(a,t,o,l,c,p,m){for(var b=0,T=l.length;b<T;b++){var U=l[b],N=c[b],oe=U.getAction(t,o,a,N);if(oe){var Te=Lt(oe,U,N,p,m);if(Te)return{action:Te,interactable:U,element:N}}}return{action:null,interactable:null,element:null}}function jt(a,t,o,l,c){var p=[],m=[],b=l;function T(N){p.push(N),m.push(b)}for(;S.element(b);){p=[],m=[],c.interactables.forEachMatch(b,T);var U=bt(a,t,o,p,m,l,c);if(U.action&&!U.interactable.options[U.action.name].manualStart)return U;b=it(b)}return{action:null,interactable:null,element:null}}function qt(a,t,o){var l=t.action,c=t.interactable,p=t.element;l=l||{name:null},a.interactable=c,a.element=p,ft(a.prepared,l),a.rect=c&&l.name?c.getRect(p):null,Ia(a,o),o.fire("autoStart:prepared",{interaction:a})}function Gt(a,t,o,l){var c=a.options,p=c[o.name].max,m=c[o.name].maxPerElement,b=l.autoStart.maxInteractions,T=0,U=0,N=0;if(!(p&&m&&b))return!1;for(var oe=0,Te=l.interactions.list;oe<Te.length;oe++){var We=Te[oe],Ke=We.prepared.name;if(We.interacting()&&(++T>=b||We.interactable===a&&((U+=Ke===o.name?1:0)>=p||We.element===t&&(N++,Ke===o.name&&N>=m))))return!1}return b>0}function ta(a,t){return S.number(a)?(t.autoStart.maxInteractions=a,this):t.autoStart.maxInteractions}function $t(a,t,o){var l=o.autoStart.cursorElement;l&&l!==a&&(l.style.cursor=""),a.ownerDocument.documentElement.style.cursor=t,a.style.cursor=t,o.autoStart.cursorElement=t?a:null}function Ia(a,t){var o=a.interactable,l=a.element,c=a.prepared;if(a.pointerType==="mouse"&&o&&o.options.styleCursor){var p="";if(c.name){var m=o.options[c.name].cursorChecker;p=S.func(m)?m(c,o,l,a._interacting):t.actions.map[c.name].getCursor(c)}$t(a.element,p||"",t)}else t.autoStart.cursorElement&&$t(t.autoStart.cursorElement,"",t)}var Ra={id:"auto-start/base",before:["actions"],install:function(a){var t=a.interactStatic,o=a.defaults;a.usePlugin(Vt),o.base.actionChecker=null,o.base.styleCursor=!0,z(o.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),t.maxInteractions=function(l){return ta(l,a)},a.autoStart={maxInteractions:1/0,withinInteractionLimit:Gt,cursorElement:null}},listeners:{"interactions:down":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;o.interacting()||qt(o,jt(o,l,c,p,t),t)},"interactions:move":function(a,t){(function(o,l){var c=o.interaction,p=o.pointer,m=o.event,b=o.eventTarget;c.pointerType!=="mouse"||c.pointerIsDown||c.interacting()||qt(c,jt(c,p,m,b,l),l)})(a,t),function(o,l){var c=o.interaction;if(c.pointerIsDown&&!c.interacting()&&c.pointerWasMoved&&c.prepared.name){l.fire("autoStart:before-start",o);var p=c.interactable,m=c.prepared.name;m&&p&&(p.options[m].manualStart||!Gt(p,c.element,c.prepared,l)?c.stop():(c.start(c.prepared,p,c.element),Ia(c,l)))}}(a,t)},"interactions:stop":function(a,t){var o=a.interaction,l=o.interactable;l&&l.options.styleCursor&&$t(o.element,"",t)}},maxInteractions:ta,withinInteractionLimit:Gt,validateAction:Lt},ba=Ra,Pa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(a,t){var o=a.interaction,l=a.eventTarget,c=a.dx,p=a.dy;if(o.prepared.name==="drag"){var m=Math.abs(c),b=Math.abs(p),T=o.interactable.options.drag,U=T.startAxis,N=m>b?"x":m<b?"y":"xy";if(o.prepared.axis=T.lockAxis==="start"?N[0]:T.lockAxis,N!=="xy"&&U!=="xy"&&U!==N){o.prepared.name=null;for(var oe=l,Te=function(Ke){if(Ke!==o.interactable){var Je=o.interactable.options.drag;if(!Je.manualStart&&Ke.testIgnoreAllow(Je,oe,l)){var ut=Ke.getAction(o.downPointer,o.downEvent,o,oe);if(ut&&ut.name==="drag"&&function(st,mt){if(!mt)return!1;var Tt=mt.options.drag.startAxis;return st==="xy"||Tt==="xy"||Tt===st}(N,Ke)&&ba.validateAction(ut,Ke,oe,l,t))return Ke}}};S.element(oe);){var We=t.interactables.forEachMatch(oe,Te);if(We){o.prepared.name="drag",o.interactable=We,o.element=oe;break}oe=it(oe)}}}}}};function ka(a){var t=a.prepared&&a.prepared.name;if(!t)return null;var o=a.interactable.options;return o[t].hold||o[t].delay}var $a={id:"auto-start/hold",install:function(a){var t=a.defaults;a.usePlugin(ba),t.perAction.hold=0,t.perAction.delay=0},listeners:{"interactions:new":function(a){a.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(a){var t=a.interaction,o=ka(t);o>0&&(t.autoStartHoldTimer=setTimeout(function(){t.start(t.prepared,t.interactable,t.element)},o))},"interactions:move":function(a){var t=a.interaction,o=a.duplicate;t.autoStartHoldTimer&&t.pointerWasMoved&&!o&&(clearTimeout(t.autoStartHoldTimer),t.autoStartHoldTimer=null)},"autoStart:before-start":function(a){var t=a.interaction;ka(t)>0&&(t.prepared.name=null)}},getHoldDuration:ka},Ka=$a,ja={id:"auto-start",install:function(a){a.usePlugin(ba),a.usePlugin(Ka),a.usePlugin(Pa)}},Ua=function(a){return/^(always|never|auto)$/.test(a)?(this.options.preventDefault=a,this):S.bool(a)?(this.options.preventDefault=a?"always":"never",this):this.options.preventDefault};function Wa(a){var t=a.interaction,o=a.event;t.interactable&&t.interactable.checkAndPreventDefault(o)}var Ba={id:"core/interactablePreventDefault",install:function(a){var t=a.Interactable;t.prototype.preventDefault=Ua,t.prototype.checkAndPreventDefault=function(o){return function(l,c,p){var m=l.options.preventDefault;if(m!=="never")if(m!=="always"){if(c.events.supportsPassive&&/^touch(start|move)$/.test(p.type)){var b=R(p.target).document,T=c.getDocOptions(b);if(!T||!T.events||T.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(p.type)||S.element(p.target)&&J(p.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||p.preventDefault()}else p.preventDefault()}(this,a,o)},a.interactions.docEvents.push({type:"dragstart",listener:function(o){for(var l=0,c=a.interactions.list;l<c.length;l++){var p=c[l];if(p.element&&(p.element===o.target||he(p.element,o.target)))return void p.interactable.checkAndPreventDefault(o)}}})},listeners:["down","move","up","cancel"].reduce(function(a,t){return a["interactions:".concat(t)]=Wa,a},{})};function ga(a,t){if(t.phaselessTypes[a])return!0;for(var o in t.map)if(a.indexOf(o)===0&&a.substr(o.length)in t.phases)return!0;return!1}function da(a){var t={};for(var o in a){var l=a[o];S.plainObject(l)?t[o]=da(l):S.array(l)?t[o]=ke(l):t[o]=l}return t}var xa=function(){function a(t){u(this,a),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=t,this.result=ma(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return g(a,[{key:"start",value:function(t,o){var l,c,p=t.phase,m=this.interaction,b=function(U){var N=U.interactable.options[U.prepared.name],oe=N.modifiers;return oe&&oe.length?oe:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(Te){var We=N[Te];return We&&We.enabled&&{options:We,methods:We._methods}}).filter(function(Te){return!!Te})}(m);this.prepareStates(b),this.startEdges=z({},m.edges),this.edges=z({},this.startEdges),this.startOffset=(l=m.rect,c=o,l?{left:c.x-l.left,top:c.y-l.top,right:l.right-c.x,bottom:l.bottom-c.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var T=this.fillArg({phase:p,pageCoords:o,preEnd:!1});return this.result=ma(),this.startAll(T),this.result=this.setAll(T)}},{key:"fillArg",value:function(t){var o=this.interaction;return t.interaction=o,t.interactable=o.interactable,t.element=o.element,t.rect||(t.rect=o.rect),t.edges||(t.edges=this.startEdges),t.startOffset=this.startOffset,t}},{key:"startAll",value:function(t){for(var o=0,l=this.states;o<l.length;o++){var c=l[o];c.methods.start&&(t.state=c,c.methods.start(t))}}},{key:"setAll",value:function(t){var o=t.phase,l=t.preEnd,c=t.skipModifiers,p=t.rect,m=t.edges;t.coords=z({},t.pageCoords),t.rect=z({},p),t.edges=z({},m);for(var b=c?this.states.slice(c):this.states,T=ma(t.coords,t.rect),U=0;U<b.length;U++){var N,oe=b[U],Te=oe.options,We=z({},t.coords),Ke=null;(N=oe.methods)!=null&&N.set&&this.shouldDo(Te,l,o)&&(t.state=oe,Ke=oe.methods.set(t),ae(t.edges,t.rect,{x:t.coords.x-We.x,y:t.coords.y-We.y})),T.eventProps.push(Ke)}z(this.edges,t.edges),T.delta.x=t.coords.x-t.pageCoords.x,T.delta.y=t.coords.y-t.pageCoords.y,T.rectDelta.left=t.rect.left-p.left,T.rectDelta.right=t.rect.right-p.right,T.rectDelta.top=t.rect.top-p.top,T.rectDelta.bottom=t.rect.bottom-p.bottom;var Je=this.result.coords,ut=this.result.rect;if(Je&&ut){var st=T.rect.left!==ut.left||T.rect.right!==ut.right||T.rect.top!==ut.top||T.rect.bottom!==ut.bottom;T.changed=st||Je.x!==T.coords.x||Je.y!==T.coords.y}return T}},{key:"applyToInteraction",value:function(t){var o=this.interaction,l=t.phase,c=o.coords.cur,p=o.coords.start,m=this.result,b=this.startDelta,T=m.delta;l==="start"&&z(this.startDelta,m.delta);for(var U=0,N=[[p,b],[c,T]];U<N.length;U++){var oe=N[U],Te=oe[0],We=oe[1];Te.page.x+=We.x,Te.page.y+=We.y,Te.client.x+=We.x,Te.client.y+=We.y}var Ke=this.result.rectDelta,Je=t.rect||o.rect;Je.left+=Ke.left,Je.right+=Ke.right,Je.top+=Ke.top,Je.bottom+=Ke.bottom,Je.width=Je.right-Je.left,Je.height=Je.bottom-Je.top}},{key:"setAndApply",value:function(t){var o=this.interaction,l=t.phase,c=t.preEnd,p=t.skipModifiers,m=this.setAll(this.fillArg({preEnd:c,phase:l,pageCoords:t.modifiedCoords||o.coords.cur.page}));if(this.result=m,!m.changed&&(!p||p<this.states.length)&&o.interacting())return!1;if(t.modifiedCoords){var b=o.coords.cur.page,T={x:t.modifiedCoords.x-b.x,y:t.modifiedCoords.y-b.y};m.coords.x+=T.x,m.coords.y+=T.y,m.delta.x+=T.x,m.delta.y+=T.y}this.applyToInteraction(t)}},{key:"beforeEnd",value:function(t){var o=t.interaction,l=t.event,c=this.states;if(c&&c.length){for(var p=!1,m=0;m<c.length;m++){var b=c[m];t.state=b;var T=b.options,U=b.methods,N=U.beforeEnd&&U.beforeEnd(t);if(N)return this.endResult=N,!1;p=p||!p&&this.shouldDo(T,!0,t.phase,!0)}p&&o.move({event:l,preEnd:!0})}}},{key:"stop",value:function(t){var o=t.interaction;if(this.states&&this.states.length){var l=z({states:this.states,interactable:o.interactable,element:o.element,rect:null},t);this.fillArg(l);for(var c=0,p=this.states;c<p.length;c++){var m=p[c];l.state=m,m.methods.stop&&m.methods.stop(l)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(t){this.states=[];for(var o=0;o<t.length;o++){var l=t[o],c=l.options,p=l.methods,m=l.name;this.states.push({options:c,methods:p,index:o,name:m})}return this.states}},{key:"restoreInteractionCoords",value:function(t){var o=t.interaction,l=o.coords,c=o.rect,p=o.modification;if(p.result){for(var m=p.startDelta,b=p.result,T=b.delta,U=b.rectDelta,N=0,oe=[[l.start,m],[l.cur,T]];N<oe.length;N++){var Te=oe[N],We=Te[0],Ke=Te[1];We.page.x-=Ke.x,We.page.y-=Ke.y,We.client.x-=Ke.x,We.client.y-=Ke.y}c.left-=U.left,c.right-=U.right,c.top-=U.top,c.bottom-=U.bottom}}},{key:"shouldDo",value:function(t,o,l,c){return!(!t||t.enabled===!1||c&&!t.endOnly||t.endOnly&&!o||l==="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 da(o)}),this.result=ma(z({},t.result.coords),z({},t.result.rect))}},{key:"destroy",value:function(){for(var t in this)this[t]=null}}]),a}();function ma(a,t){return{rect:t,coords:a,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function ra(a,t){var o=a.defaults,l={start:a.start,set:a.set,beforeEnd:a.beforeEnd,stop:a.stop},c=function(p){var m=p||{};for(var b in m.enabled=m.enabled!==!1,o)b in m||(m[b]=o[b]);var T={options:m,methods:l,name:t,enable:function(){return m.enabled=!0,T},disable:function(){return m.enabled=!1,T}};return T};return t&&typeof t=="string"&&(c._defaults=o,c._methods=l),c}function va(a){var t=a.iEvent,o=a.interaction.modification.result;o&&(t.modifiers=o.eventProps)}var Ha={id:"modifiers/base",before:["actions"],install:function(a){a.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(a){var t=a.interaction;t.modification=new xa(t)},"interactions:before-action-start":function(a){var t=a.interaction,o=a.interaction.modification;o.start(a,t.coords.start.page),t.edges=o.edges,o.applyToInteraction(a)},"interactions:before-action-move":function(a){var t=a.interaction,o=t.modification,l=o.setAndApply(a);return t.edges=o.edges,l},"interactions:before-action-end":function(a){var t=a.interaction,o=t.modification,l=o.beforeEnd(a);return t.edges=o.startEdges,l},"interactions:action-start":va,"interactions:action-move":va,"interactions:action-end":va,"interactions:after-action-start":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-move":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:stop":function(a){return a.interaction.modification.stop(a)}}},Na=Ha,Aa={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},wa=function(a){D(o,a);var t=Y(o);function o(l,c,p,m,b,T,U){var N;u(this,o),(N=t.call(this,l)).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,b=b||l.element;var oe=l.interactable,Te=(oe&&oe.options||Aa).deltaSource,We=Z(oe,b,p),Ke=m==="start",Je=m==="end",ut=Ke?F(N):l.prevEvent,st=Ke?l.coords.start:Je?{page:ut.page,client:ut.client,timeStamp:l.coords.cur.timeStamp}:l.coords.cur;return N.page=z({},st.page),N.client=z({},st.client),N.rect=z({},l.rect),N.timeStamp=st.timeStamp,Je||(N.page.x-=We.x,N.page.y-=We.y,N.client.x-=We.x,N.client.y-=We.y),N.ctrlKey=c.ctrlKey,N.altKey=c.altKey,N.shiftKey=c.shiftKey,N.metaKey=c.metaKey,N.button=c.button,N.buttons=c.buttons,N.target=b,N.currentTarget=b,N.preEnd=T,N.type=U||p+(m||""),N.interactable=oe,N.t0=Ke?l.pointers[l.pointers.length-1].downTime:ut.t0,N.x0=l.coords.start.page.x-We.x,N.y0=l.coords.start.page.y-We.y,N.clientX0=l.coords.start.client.x-We.x,N.clientY0=l.coords.start.client.y-We.y,N.delta=Ke||Je?{x:0,y:0}:{x:N[Te].x-ut[Te].x,y:N[Te].y-ut[Te].y},N.dt=l.coords.delta.timeStamp,N.duration=N.timeStamp-N.t0,N.velocity=z({},l.coords.velocity[Te]),N.speed=lt(N.velocity.x,N.velocity.y),N.swipe=Je||m==="inertiastart"?N.getSwipe():null,N}return g(o,[{key:"getSwipe",value:function(){var l=this._interaction;if(l.prevEvent.speed<600||this.timeStamp-l.prevEvent.timeStamp>150)return null;var c=180*Math.atan2(l.prevEvent.velocityY,l.prevEvent.velocityX)/Math.PI;c<0&&(c+=360);var p=112.5<=c&&c<247.5,m=202.5<=c&&c<337.5;return{up:m,down:!m&&22.5<=c&&c<157.5,left:p,right:!p&&(292.5<=c||c<67.5),angle:c,speed:l.prevEvent.speed,velocity:{x:l.prevEvent.velocityX,y:l.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),o}(De);Object.defineProperties(wa.prototype,{pageX:{get:function(){return this.page.x},set:function(a){this.page.x=a}},pageY:{get:function(){return this.page.y},set:function(a){this.page.y=a}},clientX:{get:function(){return this.client.x},set:function(a){this.client.x=a}},clientY:{get:function(){return this.client.y},set:function(a){this.client.y=a}},dx:{get:function(){return this.delta.x},set:function(a){this.delta.x=a}},dy:{get:function(){return this.delta.y},set:function(a){this.delta.y=a}},velocityX:{get:function(){return this.velocity.x},set:function(a){this.velocity.x=a}},velocityY:{get:function(){return this.velocity.y},set:function(a){this.velocity.y=a}}});var qa=g(function a(t,o,l,c,p){u(this,a),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=t,this.pointer=o,this.event=l,this.downTime=c,this.downTarget=p}),Ga=function(a){return a.interactable="",a.element="",a.prepared="",a.pointerIsDown="",a.pointerWasMoved="",a._proxy="",a}({}),Va=function(a){return a.start="",a.move="",a.end="",a.stop="",a.interacting="",a}({}),Xa=0,Ya=function(){function a(t){var o=this,l=t.pointerType,c=t.scopeFire;u(this,a),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=dt(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=Xa++,this._scopeFire=c,this.pointerType=l;var p=this;this._proxy={};var m=function(N){Object.defineProperty(o._proxy,N,{get:function(){return p[N]}})};for(var b in Ga)m(b);var T=function(N){Object.defineProperty(o._proxy,N,{value:function(){return p[N].apply(p,arguments)}})};for(var U in Va)T(U);this._scopeFire("interactions:new",{interaction:this})}return g(a,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(t,o,l){var c=this.updatePointer(t,o,l,!0),p=this.pointers[c];this._scopeFire("interactions:down",{pointer:t,event:o,eventTarget:l,pointerIndex:c,pointerInfo:p,type:"down",interaction:this})}},{key:"start",value:function(t,o,l){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(t.name==="gesture"?2:1)||!o.options[t.name].enabled)&&(ft(this.prepared,t),this.interactable=o,this.element=l,this.rect=o.getRect(l),this.edges=this.prepared.edges?z({},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,l){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(t,o,l,!1);var c,p,m=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&&(c=this.coords.cur.client.x-this.coords.start.client.x,p=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=lt(c,p)>this.pointerMoveTolerance);var b,T,U,N=this.getPointerIndex(t),oe={pointer:t,pointerIndex:N,pointerInfo:this.pointers[N],event:o,type:"move",eventTarget:l,dx:c,dy:p,duplicate:m,interaction:this};m||(b=this.coords.velocity,T=this.coords.delta,U=Math.max(T.timeStamp/1e3,.001),b.page.x=T.page.x/U,b.page.y=T.page.y/U,b.client.x=T.client.x/U,b.client.y=T.client.y/U,b.timeStamp=U),this._scopeFire("interactions:move",oe),m||this.simulation||(this.interacting()&&(oe.type=null,this.move(oe)),this.pointerWasMoved&&I(this.coords.prev,this.coords.cur))}},{key:"move",value:function(t){t&&t.event||W(this.coords.delta),(t=z({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,l,c){var p=this.getPointerIndex(t);p===-1&&(p=this.updatePointer(t,o,l,!1));var m=/cancel$/i.test(o.type)?"cancel":"up";this._scopeFire("interactions:".concat(m),{pointer:t,pointerIndex:p,pointerInfo:this.pointers[p],event:o,eventTarget:l,type:m,curEventTarget:c,interaction:this}),this.simulation||this.end(o),this.removePointer(t,o)}},{key:"documentBlur",value:function(t){this.end(t),this._scopeFire("interactions:blur",{event:t,type:"blur",interaction:this})}},{key:"end",value:function(t){var o;this._ending=!0,t=t||this._latestPointer.event,this.interacting()&&(o=this._doPhase({event:t,interaction:this,phase:"end"})),this._ending=!1,o===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(t){var o=E(t);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:j(this.pointers,function(l){return l.id===o})}},{key:"getPointerInfo",value:function(t){return this.pointers[this.getPointerIndex(t)]}},{key:"updatePointer",value:function(t,o,l,c){var p,m,b,T=E(t),U=this.getPointerIndex(t),N=this.pointers[U];return c=c!==!1&&(c||/(down|start)$/i.test(o.type)),N?N.pointer=t:(N=new qa(T,t,o,null,null),U=this.pointers.length,this.pointers.push(N)),te(this.coords.cur,this.pointers.map(function(oe){return oe.pointer}),this._now()),p=this.coords.delta,m=this.coords.prev,b=this.coords.cur,p.page.x=b.page.x-m.page.x,p.page.y=b.page.y-m.page.y,p.client.x=b.client.x-m.client.x,p.client.y=b.client.y-m.client.y,p.timeStamp=b.timeStamp-m.timeStamp,c&&(this.pointerIsDown=!0,N.downTime=this.coords.cur.timeStamp,N.downTarget=l,_(this.downPointer,t),this.interacting()||(I(this.coords.start,this.coords.cur),I(this.coords.prev,this.coords.cur),this.downEvent=o,this.pointerWasMoved=!1)),this._updateLatestPointer(t,o,l),this._scopeFire("interactions:update-pointer",{pointer:t,event:o,eventTarget:l,down:c,pointerInfo:N,pointerIndex:U,interaction:this}),U}},{key:"removePointer",value:function(t,o){var l=this.getPointerIndex(t);if(l!==-1){var c=this.pointers[l];this._scopeFire("interactions:remove-pointer",{pointer:t,event:o,eventTarget:null,pointerIndex:l,pointerInfo:c,interaction:this}),this.pointers.splice(l,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(t,o,l){this._latestPointer.pointer=t,this._latestPointer.event=o,this._latestPointer.eventTarget=l}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(t,o,l,c){return new wa(this,t,this.prepared.name,o,this.element,l,c)}},{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,l=t.phase,c=t.preEnd,p=t.type,m=this.rect;if(m&&l==="move"&&(ae(this.edges,m,this.coords.delta[this.interactable.options.deltaSource]),m.width=m.right-m.left,m.height=m.bottom-m.top),this._scopeFire("interactions:before-action-".concat(l),t)===!1)return!1;var b=t.iEvent=this._createPreparedEvent(o,l,c,p);return this._scopeFire("interactions:action-".concat(l),t),l==="start"&&(this.prevEvent=b),this._fireEvent(b),this._scopeFire("interactions:after-action-".concat(l),t),!0}},{key:"_now",value:function(){return Date.now()}}]),a}();function St(a){ea(a.interaction)}function ea(a){if(!function(o){return!(!o.offset.pending.x&&!o.offset.pending.y)}(a))return!1;var t=a.offset.pending;return zt(a.coords.cur,t),zt(a.coords.delta,t),ae(a.edges,a.rect,t),t.x=0,t.y=0,!0}function xt(a){var t=a.x,o=a.y;this.offset.pending.x+=t,this.offset.pending.y+=o,this.offset.total.x+=t,this.offset.total.y+=o}function zt(a,t){var o=a.page,l=a.client,c=t.x,p=t.y;o.x+=c,o.y+=p,l.x+=c,l.y+=p}Va.offsetBy="";var wt={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(a){a.Interaction.prototype.offsetBy=xt},listeners:{"interactions:new":function(a){a.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(a){return function(t){t.pointerIsDown&&(zt(t.coords.cur,t.offset.total),t.offset.pending.x=0,t.offset.pending.y=0)}(a.interaction)},"interactions:before-action-start":St,"interactions:before-action-move":St,"interactions:before-action-end":function(a){var t=a.interaction;if(ea(t))return t.move({offset:!0}),t.end(),!1},"interactions:stop":function(a){var t=a.interaction;t.offset.total.x=0,t.offset.total.y=0,t.offset.pending.x=0,t.offset.pending.y=0}}},Xt=wt,Et=function(){function a(t){u(this,a),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=t}return g(a,[{key:"start",value:function(t){var o=this.interaction,l=Ct(o);if(!l||!l.enabled)return!1;var c=o.coords.velocity.client,p=lt(c.x,c.y),m=this.modification||(this.modification=new xa(o));if(m.copyFrom(o.modification),this.t0=o._now(),this.allowResume=l.allowResume,this.v0=p,this.currentOffset={x:0,y:0},this.startCoords=o.coords.cur.page,this.modifierArg=m.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-o.coords.cur.timeStamp<50&&p>l.minSpeed&&p>l.endSpeed)this.startInertia();else{if(m.result=m.setAll(this.modifierArg),!m.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,l=Ct(this.interaction),c=l.resistance,p=-Math.log(l.endSpeed/this.v0)/c;this.targetOffset={x:(o.x-p)/c,y:(o.y-p)/c},this.te=p,this.lambda_v0=c/this.v0,this.one_ve_v0=1-l.endSpeed/this.v0;var m=this.modification,b=this.modifierArg;b.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},m.result=m.setAll(b),m.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+m.result.delta.x,y:this.targetOffset.y+m.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=He.request(function(){o.active&&t()})}},{key:"inertiaTick",value:function(){var t,o,l,c,p,m,b,T=this,U=this.interaction,N=Ct(U).resistance,oe=(U._now()-this.t0)/1e3;if(oe<this.te){var Te,We=1-(Math.exp(-N*oe)-this.lambda_v0)/this.one_ve_v0;this.isModified?(t=0,o=0,l=this.targetOffset.x,c=this.targetOffset.y,p=this.modifiedOffset.x,m=this.modifiedOffset.y,Te={x:Ot(b=We,t,l,p),y:Ot(b,o,c,m)}):Te={x:this.targetOffset.x*We,y:this.targetOffset.y*We};var Ke={x:Te.x-this.currentOffset.x,y:Te.y-this.currentOffset.y};this.currentOffset.x+=Ke.x,this.currentOffset.y+=Ke.y,U.offsetBy(Ke),U.move(),this.onNextFrame(function(){return T.inertiaTick()})}else U.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,l=o._now()-this.t0,c=Ct(o).smoothEndDuration;if(l<c){var p={x:Rt(l,0,this.targetOffset.x,c),y:Rt(l,0,this.targetOffset.y,c)},m={x:p.x-this.currentOffset.x,y:p.y-this.currentOffset.y};this.currentOffset.x+=m.x,this.currentOffset.y+=m.y,o.offsetBy(m),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,l=t.event,c=t.eventTarget,p=this.interaction;p.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),p.updatePointer(o,l,c,!0),p._doPhase({interaction:p,event:l,phase:"resume"}),I(p.coords.prev,p.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,He.cancel(this.timeout)}}]),a}();function Ct(a){var t=a.interactable,o=a.prepared;return t&&t.options&&o.name&&t.options[o.name].inertia}var Ft={id:"inertia",before:["modifiers","actions"],install:function(a){var t=a.defaults;a.usePlugin(Xt),a.usePlugin(Na),a.actions.phases.inertiastart=!0,a.actions.phases.resume=!0,t.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(a){var t=a.interaction;t.inertia=new Et(t)},"interactions:before-action-end":function(a){var t=a.interaction,o=a.event;return(!t._interacting||t.simulation||!t.inertia.start(o))&&null},"interactions:down":function(a){var t=a.interaction,o=a.eventTarget,l=t.inertia;if(l.active)for(var c=o;S.element(c);){if(c===t.element){l.resume(a);break}c=it(c)}},"interactions:stop":function(a){var t=a.interaction.inertia;t.active&&t.stop()},"interactions:before-action-resume":function(a){var t=a.interaction.modification;t.stop(a),t.start(a,a.interaction.coords.cur.page),t.applyToInteraction(a)},"interactions:before-action-inertiastart":function(a){return a.interaction.modification.setAndApply(a)},"interactions:action-resume":va,"interactions:action-inertiastart":va,"interactions:after-action-inertiastart":function(a){return a.interaction.modification.restoreInteractionCoords(a)},"interactions:after-action-resume":function(a){return a.interaction.modification.restoreInteractionCoords(a)}}};function Ot(a,t,o,l){var c=1-a;return c*c*t+2*c*a*o+a*a*l}function Rt(a,t,o,l){return-o*(a/=l)*(a-2)+t}var Yt=Ft;function la(a,t){for(var o=0;o<t.length;o++){var l=t[o];if(a.immediatePropagationStopped)break;l(a)}}var Oa=function(){function a(t){u(this,a),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=z({},t||{})}return g(a,[{key:"fire",value:function(t){var o,l=this.global;(o=this.types[t.type])&&la(t,o),!t.propagationStopped&&l&&(o=l[t.type])&&la(t,o)}},{key:"on",value:function(t,o){var l=re(t,o);for(t in l)this.types[t]=be(this.types[t]||[],l[t])}},{key:"off",value:function(t,o){var l=re(t,o);for(t in l){var c=this.types[t];if(c&&c.length)for(var p=0,m=l[t];p<m.length;p++){var b=m[p],T=c.indexOf(b);T!==-1&&c.splice(T,1)}}}},{key:"getRect",value:function(t){return null}}]),a}(),Ja=function(){function a(t){u(this,a),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=t,_(this,t)}return g(a,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),a}();function Ma(a){return S.object(a)?{capture:!!a.capture,passive:!!a.passive}:{capture:!!a,passive:!1}}function Za(a,t){return a===t||(typeof a=="boolean"?!!t.capture===a&&!t.passive:!!a.capture==!!t.capture&&!!a.passive==!!t.passive)}var Sn={id:"events",install:function(a){var t,o=[],l={},c=[],p={add:m,remove:b,addDelegate:function(N,oe,Te,We,Ke){var Je=Ma(Ke);if(!l[Te]){l[Te]=[];for(var ut=0;ut<c.length;ut++){var st=c[ut];m(st,Te,T),m(st,Te,U,!0)}}var mt=l[Te],Tt=Ne(mt,function(Nt){return Nt.selector===N&&Nt.context===oe});Tt||(Tt={selector:N,context:oe,listeners:[]},mt.push(Tt)),Tt.listeners.push({func:We,options:Je})},removeDelegate:function(N,oe,Te,We,Ke){var Je,ut=Ma(Ke),st=l[Te],mt=!1;if(st)for(Je=st.length-1;Je>=0;Je--){var Tt=st[Je];if(Tt.selector===N&&Tt.context===oe){for(var Nt=Tt.listeners,Dt=Nt.length-1;Dt>=0;Dt--){var It=Nt[Dt];if(It.func===We&&Za(It.options,ut)){Nt.splice(Dt,1),Nt.length||(st.splice(Je,1),b(oe,Te,T),b(oe,Te,U,!0)),mt=!0;break}}if(mt)break}}},delegateListener:T,delegateUseCapture:U,delegatedEvents:l,documents:c,targets:o,supportsOptions:!1,supportsPassive:!1};function m(N,oe,Te,We){if(N.addEventListener){var Ke=Ma(We),Je=Ne(o,function(ut){return ut.eventTarget===N});Je||(Je={eventTarget:N,events:{}},o.push(Je)),Je.events[oe]||(Je.events[oe]=[]),Ne(Je.events[oe],function(ut){return ut.func===Te&&Za(ut.options,Ke)})||(N.addEventListener(oe,Te,p.supportsOptions?Ke:Ke.capture),Je.events[oe].push({func:Te,options:Ke}))}}function b(N,oe,Te,We){if(N.addEventListener&&N.removeEventListener){var Ke=j(o,function(na){return na.eventTarget===N}),Je=o[Ke];if(Je&&Je.events)if(oe!=="all"){var ut=!1,st=Je.events[oe];if(st){if(Te==="all"){for(var mt=st.length-1;mt>=0;mt--){var Tt=st[mt];b(N,oe,Tt.func,Tt.options)}return}for(var Nt=Ma(We),Dt=0;Dt<st.length;Dt++){var It=st[Dt];if(It.func===Te&&Za(It.options,Nt)){N.removeEventListener(oe,Te,p.supportsOptions?Nt:Nt.capture),st.splice(Dt,1),st.length===0&&(delete Je.events[oe],ut=!0);break}}}ut&&!Object.keys(Je.events).length&&o.splice(Ke,1)}else for(oe in Je.events)Je.events.hasOwnProperty(oe)&&b(N,oe,"all")}}function T(N,oe){for(var Te=Ma(oe),We=new Ja(N),Ke=l[N.type],Je=de(N)[0],ut=Je;S.element(ut);){for(var st=0;st<Ke.length;st++){var mt=Ke[st],Tt=mt.selector,Nt=mt.context;if(J(ut,Tt)&&he(Nt,Je)&&he(Nt,ut)){var Dt=mt.listeners;We.currentTarget=ut;for(var It=0;It<Dt.length;It++){var na=Dt[It];Za(na.options,Te)&&na.func(We)}}}ut=it(ut)}}function U(N){return T(N,!0)}return(t=a.document)==null||t.createElement("div").addEventListener("test",null,{get capture(){return p.supportsOptions=!0},get passive(){return p.supportsPassive=!0}}),a.events=p,p}},ln={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(a){for(var t=0,o=ln.methodOrder;t<o.length;t++){var l=o[t],c=ln[l](a);if(c)return c}return null},simulationResume:function(a){var t=a.pointerType,o=a.eventType,l=a.eventTarget,c=a.scope;if(!/down|start/i.test(o))return null;for(var p=0,m=c.interactions.list;p<m.length;p++){var b=m[p],T=l;if(b.simulation&&b.simulation.allowResume&&b.pointerType===t)for(;T;){if(T===b.element)return b;T=it(T)}}return null},mouseOrPen:function(a){var t,o=a.pointerId,l=a.pointerType,c=a.eventType,p=a.scope;if(l!=="mouse"&&l!=="pen")return null;for(var m=0,b=p.interactions.list;m<b.length;m++){var T=b[m];if(T.pointerType===l){if(T.simulation&&!vn(T,o))continue;if(T.interacting())return T;t||(t=T)}}if(t)return t;for(var U=0,N=p.interactions.list;U<N.length;U++){var oe=N[U];if(!(oe.pointerType!==l||/down/i.test(c)&&oe.simulation))return oe}return null},hasPointer:function(a){for(var t=a.pointerId,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(vn(c,t))return c}return null},idle:function(a){for(var t=a.pointerType,o=0,l=a.scope.interactions.list;o<l.length;o++){var c=l[o];if(c.pointers.length===1){var p=c.interactable;if(p&&(!p.options.gesture||!p.options.gesture.enabled))continue}else if(c.pointers.length>=2)continue;if(!c.interacting()&&t===c.pointerType)return c}return null}};function vn(a,t){return a.pointers.some(function(o){return o.id===t})}var sn=ln,pa=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Qa(a,t){return function(o){var l=t.interactions.list,c=Q(o),p=de(o),m=p[0],b=p[1],T=[];if(/^touch/.test(o.type)){t.prevTouchTime=t.now();for(var U=0,N=o.changedTouches;U<N.length;U++){var oe=N[U],Te={pointer:oe,pointerId:E(oe),pointerType:c,eventType:o.type,eventTarget:m,curEventTarget:b,scope:t},We=cn(Te);T.push([Te.pointer,Te.eventTarget,Te.curEventTarget,We])}}else{var Ke=!1;if(!se.supportsPointerEvent&&/mouse/.test(o.type)){for(var Je=0;Je<l.length&&!Ke;Je++)Ke=l[Je].pointerType!=="mouse"&&l[Je].pointerIsDown;Ke=Ke||t.now()-t.prevTouchTime<500||o.timeStamp===0}if(!Ke){var ut={pointer:o,pointerId:E(o),pointerType:c,eventType:o.type,curEventTarget:b,eventTarget:m,scope:t},st=cn(ut);T.push([ut.pointer,ut.eventTarget,ut.curEventTarget,st])}}for(var mt=0;mt<T.length;mt++){var Tt=T[mt],Nt=Tt[0],Dt=Tt[1],It=Tt[2];Tt[3][a](Nt,o,Dt,It)}}}function cn(a){var t=a.pointerType,o=a.scope,l={interaction:sn.search(a),searchDetails:a};return o.fire("interactions:find",l),l.interaction||o.interactions.new({pointerType:t})}function ia(a,t){var o=a.doc,l=a.scope,c=a.options,p=l.interactions.docEvents,m=l.events,b=m[t];for(var T in l.browser.isIOS&&!c.events&&(c.events={passive:!1}),m.delegatedEvents)b(o,T,m.delegateListener),b(o,T,m.delegateUseCapture,!0);for(var U=c&&c.events,N=0;N<p.length;N++){var oe=p[N];b(o,oe.type,oe.listener,U)}}var Tn={id:"core/interactions",install:function(a){for(var t={},o=0;o<pa.length;o++){var l=pa[o];t[l]=Qa(l,a)}var c,p=se.pEventTypes;function m(){for(var b=0,T=a.interactions.list;b<T.length;b++){var U=T[b];if(U.pointerIsDown&&U.pointerType==="touch"&&!U._interacting)for(var N=function(){var We=Te[oe];a.documents.some(function(Ke){return he(Ke.doc,We.downTarget)})||U.removePointer(We.pointer,We.event)},oe=0,Te=U.pointers;oe<Te.length;oe++)N()}}(c=O.PointerEvent?[{type:p.down,listener:m},{type:p.down,listener:t.pointerDown},{type:p.move,listener:t.pointerMove},{type:p.up,listener:t.pointerUp},{type:p.cancel,listener:t.pointerUp}]:[{type:"mousedown",listener:t.pointerDown},{type:"mousemove",listener:t.pointerMove},{type:"mouseup",listener:t.pointerUp},{type:"touchstart",listener:m},{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(b){for(var T=0,U=a.interactions.list;T<U.length;T++)U[T].documentBlur(b)}}),a.prevTouchTime=0,a.Interaction=function(b){D(U,b);var T=Y(U);function U(){return u(this,U),T.apply(this,arguments)}return g(U,[{key:"pointerMoveTolerance",get:function(){return a.interactions.pointerMoveTolerance},set:function(N){a.interactions.pointerMoveTolerance=N}},{key:"_now",value:function(){return a.now()}}]),U}(Ya),a.interactions={list:[],new:function(b){b.scopeFire=function(U,N){return a.fire(U,N)};var T=new a.Interaction(b);return a.interactions.list.push(T),T},listeners:t,docEvents:c,pointerMoveTolerance:1},a.usePlugin(Ba)},listeners:{"scope:add-document":function(a){return ia(a,"add")},"scope:remove-document":function(a){return ia(a,"remove")},"interactable:unset":function(a,t){for(var o=a.interactable,l=t.interactions.list.length-1;l>=0;l--){var c=t.interactions.list[l];c.interactable===o&&(c.stop(),t.fire("interactions:destroy",{interaction:c}),c.destroy(),t.interactions.list.length>2&&t.interactions.list.splice(l,1))}}},onDocSignal:ia,doOnInteractions:Qa,methodNames:pa},La=Tn,za=function(a){return a[a.On=0]="On",a[a.Off=1]="Off",a}(za||{}),ll=function(){function a(t,o,l,c){u(this,a),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Oa,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||l,this._win=R(fe(t)?this._context:t),this._doc=this._win.document,this._scopeEvents=c,this.set(o)}return g(a,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(t,o){return S.func(o.onstart)&&this.on("".concat(t,"start"),o.onstart),S.func(o.onmove)&&this.on("".concat(t,"move"),o.onmove),S.func(o.onend)&&this.on("".concat(t,"end"),o.onend),S.func(o.oninertiastart)&&this.on("".concat(t,"inertiastart"),o.oninertiastart),this}},{key:"updatePerActionListeners",value:function(t,o,l){var c,p=this,m=(c=this._actions.map[t])==null?void 0:c.filterEventType,b=function(T){return(m==null||m(T))&&ga(T,p._actions)};(S.array(o)||S.object(o))&&this._onOff(za.Off,t,o,void 0,b),(S.array(l)||S.object(l))&&this._onOff(za.On,t,l,void 0,b)}},{key:"setPerAction",value:function(t,o){var l=this._defaults;for(var c in o){var p=c,m=this.options[t],b=o[p];p==="listeners"&&this.updatePerActionListeners(t,m.listeners,b),S.array(b)?m[p]=ke(b):S.plainObject(b)?(m[p]=z(m[p]||{},da(b)),S.object(l.perAction[p])&&"enabled"in l.perAction[p]&&(m[p].enabled=b.enabled!==!1)):S.bool(b)&&S.object(l.perAction[p])?m[p].enabled=b:m[p]=b}}},{key:"getRect",value:function(t){return t=t||(S.element(this.target)?this.target:null),S.string(this.target)&&(t=t||this._context.querySelector(this.target)),qe(t)}},{key:"rectChecker",value:function(t){var o=this;return S.func(t)?(this.getRect=function(l){var c=z({},t.apply(o,l));return"width"in c||(c.width=c.right-c.left,c.height=c.bottom-c.top),c},this):t===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(t,o){if(fe(o)||S.object(o)){for(var l in this.options[t]=o,this._actions.map)this.options[l][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 S.string(t)?Array.from(this._context.querySelectorAll(t)):S.func(t)&&t.getAllElements?t.getAllElements():S.element(t)?[t]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(t){return this._context===t.ownerDocument||he(this._context,t)}},{key:"testIgnoreAllow",value:function(t,o,l){return!this.testIgnore(t.ignoreFrom,o,l)&&this.testAllow(t.allowFrom,o,l)}},{key:"testAllow",value:function(t,o,l){return!t||!!S.element(l)&&(S.string(t)?Ce(l,t,o):!!S.element(t)&&he(t,l))}},{key:"testIgnore",value:function(t,o,l){return!(!t||!S.element(l))&&(S.string(t)?Ce(l,t,o):!!S.element(t)&&he(t,l))}},{key:"fire",value:function(t){return this.events.fire(t),this}},{key:"_onOff",value:function(t,o,l,c,p){S.object(o)&&!S.array(o)&&(c=l,l=null);var m=re(o,l,p);for(var b in m){b==="wheel"&&(b=se.wheelEvent);for(var T=0,U=m[b];T<U.length;T++){var N=U[T];ga(b,this._actions)?this.events[t===za.On?"on":"off"](b,N):S.string(this.target)?this._scopeEvents[t===za.On?"addDelegate":"removeDelegate"](this.target,this._context,b,N,c):this._scopeEvents[t===za.On?"add":"remove"](this.target,b,N,c)}}return this}},{key:"on",value:function(t,o,l){return this._onOff(za.On,t,o,l)}},{key:"off",value:function(t,o,l){return this._onOff(za.Off,t,o,l)}},{key:"set",value:function(t){var o=this._defaults;for(var l in S.object(t)||(t={}),this.options=da(o.base),this._actions.methodDict){var c=l,p=this._actions.methodDict[c];this.options[c]={},this.setPerAction(c,z(z({},o.perAction),o.actions[c])),this[p](t[c])}for(var m in t)m!=="getRect"?S.func(this[m])&&this[m](t[m]):this.rectChecker(t.getRect);return this}},{key:"unset",value:function(){if(S.string(this.target))for(var t in this._scopeEvents.delegatedEvents)for(var o=this._scopeEvents.delegatedEvents[t],l=o.length-1;l>=0;l--){var c=o[l],p=c.selector,m=c.context,b=c.listeners;p===this.target&&m===this._context&&o.splice(l,1);for(var T=b.length-1;T>=0;T--)this._scopeEvents.removeDelegate(this.target,this._context,t,b[T][0],b[T][1])}else this._scopeEvents.remove(this.target,"all")}}]),a}(),il=function(){function a(t){var o=this;u(this,a),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=t,t.addListeners({"interactable:unset":function(l){var c=l.interactable,p=c.target,m=S.string(p)?o.selectorMap[p]:p[o.scope.id],b=j(m,function(T){return T===c});m.splice(b,1)}})}return g(a,[{key:"new",value:function(t,o){o=z(o||{},{actions:this.scope.actions});var l=new this.scope.Interactable(t,o,this.scope.document,this.scope.events);return this.scope.addDocument(l._doc),this.list.push(l),S.string(t)?(this.selectorMap[t]||(this.selectorMap[t]=[]),this.selectorMap[t].push(l)):(l.target[this.scope.id]||Object.defineProperty(t,this.scope.id,{value:[],configurable:!0}),t[this.scope.id].push(l)),this.scope.fire("interactable:new",{target:t,options:o,interactable:l,win:this.scope._win}),l}},{key:"getExisting",value:function(t,o){var l=o&&o.context||this.scope.document,c=S.string(t),p=c?this.selectorMap[t]:t[this.scope.id];if(p)return Ne(p,function(m){return m._context===l&&(c||m.inContext(t))})}},{key:"forEachMatch",value:function(t,o){for(var l=0,c=this.list;l<c.length;l++){var p=c[l],m=void 0;if((S.string(p.target)?S.element(t)&&J(t,p.target):t===p.target)&&p.inContext(t)&&(m=o(p)),m!==void 0)return m}}}]),a}(),sl=function(){function a(){var t=this;u(this,a),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=da(Aa),this.Eventable=Oa,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(l){var c=function p(m,b){var T=l.interactables.getExisting(m,b);return T||((T=l.interactables.new(m,b)).events.global=p.globalEvents),T};return c.getPointerAverage=P,c.getTouchBBox=Ee,c.getTouchDistance=ne,c.getTouchAngle=H,c.getElementRect=qe,c.getElementClientRect=Fe,c.matchesSelector=J,c.closest=Ge,c.globalEvents={},c.version="1.10.27",c.scope=l,c.use=function(p,m){return this.scope.usePlugin(p,m),this},c.isSet=function(p,m){return!!this.scope.interactables.get(p,m&&m.context)},c.on=dt(function(p,m,b){if(S.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),S.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.on(N,m,b)}return this}if(S.object(p)){for(var oe in p)this.on(oe,p[oe],m);return this}return ga(p,this.scope.actions)?this.globalEvents[p]?this.globalEvents[p].push(m):this.globalEvents[p]=[m]:this.scope.events.add(this.scope.document,p,m,{options:b}),this},"The interact.on() method is being deprecated"),c.off=dt(function(p,m,b){if(S.string(p)&&p.search(" ")!==-1&&(p=p.trim().split(/ +/)),S.array(p)){for(var T=0,U=p;T<U.length;T++){var N=U[T];this.off(N,m,b)}return this}if(S.object(p)){for(var oe in p)this.off(oe,p[oe],m);return this}var Te;return ga(p,this.scope.actions)?p in this.globalEvents&&(Te=this.globalEvents[p].indexOf(m))!==-1&&this.globalEvents[p].splice(Te,1):this.scope.events.remove(this.scope.document,p,m,b),this},"The interact.off() method is being deprecated"),c.debug=function(){return this.scope},c.supportsTouch=function(){return se.supportsTouch},c.supportsPointerEvent=function(){return se.supportsPointerEvent},c.stop=function(){for(var p=0,m=this.scope.interactions.list;p<m.length;p++)m[p].stop();return this},c.pointerMoveTolerance=function(p){return S.number(p)?(this.scope.interactions.pointerMoveTolerance=p,this):this.scope.interactions.pointerMoveTolerance},c.addDocument=function(p,m){this.scope.addDocument(p,m)},c.removeDocument=function(p){this.scope.removeDocument(p)},c}(this),this.InteractEvent=wa,this.Interactable=void 0,this.interactables=new il(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(l){return t.removeDocument(l.target)};var o=this;this.Interactable=function(l){D(p,l);var c=Y(p);function p(){return u(this,p),c.apply(this,arguments)}return g(p,[{key:"_defaults",get:function(){return o.defaults}},{key:"set",value:function(m){return L(C(p.prototype),"set",this).call(this,m),o.fire("interactable:set",{options:m,interactable:this}),this}},{key:"unset",value:function(){L(C(p.prototype),"unset",this).call(this);var m=o.interactables.list.indexOf(this);m<0||(o.interactables.list.splice(m,1),o.fire("interactable:unset",{interactable:this}))}}]),p}(ll)}return g(a,[{key:"addListeners",value:function(t,o){this.listenerMaps.push({id:o,map:t})}},{key:"fire",value:function(t,o){for(var l=0,c=this.listenerMaps;l<c.length;l++){var p=c[l].map[t];if(p&&p(o,this,t)===!1)return!1}}},{key:"init",value:function(t){return this.isInitialized?this:function(o,l){return o.isInitialized=!0,S.window(l)&&w(l),O.init(l),se.init(l),He.init(l),o.window=l,o.document=l.document,o.usePlugin(La),o.usePlugin(Sn),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 l=0,c=this.listenerMaps.length,p=t.before.reduce(function(b,T){return b[T]=!0,b[xo(T)]=!0,b},{});l<c;l++){var m=this.listenerMaps[l].id;if(m&&(p[m]||p[xo(m)]))break}this.listenerMaps.splice(l,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 l=R(t);o=o?z({},o):{},this.documents.push({doc:t,options:o}),this.events.documents.push(t),t!==this.document&&this.events.add(l,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:t,window:l,scope:this,options:o})}},{key:"removeDocument",value:function(t){var o=this.getDocIndex(t),l=R(t),c=this.documents[o].options;this.events.remove(l,"unload",this.onWindowUnload),this.documents.splice(o,1),this.events.documents.splice(o,1),this.fire("scope:remove-document",{doc:t,window:l,scope:this,options:c})}},{key:"getDocIndex",value:function(t){for(var o=0;o<this.documents.length;o++)if(this.documents[o].doc===t)return o;return-1}},{key:"getDocOptions",value:function(t){var o=this.getDocIndex(t);return o===-1?null:this.documents[o].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),a}();function xo(a){return a&&a.replace(/\/.*$/,"")}var wo=new sl,aa=wo.interactStatic,cl=typeof globalThis<"u"?globalThis:window;wo.init(cl);var ul=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(a){var t=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(l){var c=l[0],p=l[1];return c in a||p in a}),o=function(l,c){for(var p=a.range,m=a.limits,b=m===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:m,T=a.offset,U=T===void 0?{x:0,y:0}:T,N={range:p,grid:a,x:null,y:null},oe=0;oe<t.length;oe++){var Te=t[oe],We=Te[0],Ke=Te[1],Je=Math.round((l-U.x)/a[We]),ut=Math.round((c-U.y)/a[Ke]);N[We]=Math.max(b.left,Math.min(b.right,Je*a[We]+U.x)),N[Ke]=Math.max(b.top,Math.min(b.bottom,ut*a[Ke]+U.y))}return N};return o.grid=a,o.coordFields=t,o}}),dl={id:"snappers",install:function(a){var t=a.interactStatic;t.snappers=z(t.snappers||{},ul),t.createSnapGrid=t.snappers.grid}},pl=dl,fl={start:function(a){var t=a.state,o=a.rect,l=a.edges,c=a.pageCoords,p=t.options,m=p.ratio,b=p.enabled,T=t.options,U=T.equalDelta,N=T.modifiers;m==="preserve"&&(m=o.width/o.height),t.startCoords=z({},c),t.startRect=z({},o),t.ratio=m,t.equalDelta=U;var oe=t.linkedEdges={top:l.top||l.left&&!l.bottom,left:l.left||l.top&&!l.right,bottom:l.bottom||l.right&&!l.top,right:l.right||l.bottom&&!l.left};if(t.xIsPrimaryAxis=!(!l.left&&!l.right),t.equalDelta){var Te=(oe.left?1:-1)*(oe.top?1:-1);t.edgeSign={x:Te,y:Te}}else t.edgeSign={x:oe.left?-1:1,y:oe.top?-1:1};if(b!==!1&&z(l,oe),N!=null&&N.length){var We=new xa(a.interaction);We.copyFrom(a.interaction.modification),We.prepareStates(N),t.subModification=We,We.startAll(r({},a))}},set:function(a){var t=a.state,o=a.rect,l=a.coords,c=t.linkedEdges,p=z({},l),m=t.equalDelta?vl:hl;if(z(a.edges,c),m(t,t.xIsPrimaryAxis,l,o),!t.subModification)return null;var b=z({},o);ae(c,b,{x:l.x-p.x,y:l.y-p.y});var T=t.subModification.setAll(r(r({},a),{},{rect:b,edges:c,pageCoords:l,prevCoords:l,prevRect:b})),U=T.delta;return T.changed&&(m(t,Math.abs(U.x)>Math.abs(U.y),T.coords,T.rect),z(l,T.coords)),T.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function vl(a,t,o){var l=a.startCoords,c=a.edgeSign;t?o.y=l.y+(o.x-l.x)*c.y:o.x=l.x+(o.y-l.y)*c.x}function hl(a,t,o,l){var c=a.startRect,p=a.startCoords,m=a.ratio,b=a.edgeSign;if(t){var T=l.width/m;o.y=p.y+(T-c.height)*b.y}else{var U=l.height*m;o.x=p.x+(U-c.width)*b.x}}var gl=ra(fl,"aspectRatio"),Do=function(){};Do._defaults={};var In=Do;function en(a,t,o){return S.func(a)?pe(a,t.interactable,t.element,[o.x,o.y,t]):pe(a,t.interactable,t.element)}var Bn={start:function(a){var t=a.rect,o=a.startOffset,l=a.state,c=a.interaction,p=a.pageCoords,m=l.options,b=m.elementRect,T=z({left:0,top:0,right:0,bottom:0},m.offset||{});if(t&&b){var U=en(m.restriction,c,p);if(U){var N=U.right-U.left-t.width,oe=U.bottom-U.top-t.height;N<0&&(T.left+=N,T.right+=N),oe<0&&(T.top+=oe,T.bottom+=oe)}T.left+=o.left-t.width*b.left,T.top+=o.top-t.height*b.top,T.right+=o.right-t.width*(1-b.right),T.bottom+=o.bottom-t.height*(1-b.bottom)}l.offset=T},set:function(a){var t=a.coords,o=a.interaction,l=a.state,c=l.options,p=l.offset,m=en(c.restriction,o,t);if(m){var b=function(T){return!T||"left"in T&&"top"in T||((T=z({},T)).left=T.x||0,T.top=T.y||0,T.right=T.right||T.left+T.width,T.bottom=T.bottom||T.top+T.height),T}(m);t.x=Math.max(Math.min(b.right-p.right,t.x),b.left+p.left),t.y=Math.max(Math.min(b.bottom-p.bottom,t.y),b.top+p.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},ml=ra(Bn,"restrict"),Co={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_o={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Eo(a,t){for(var o=0,l=["top","left","bottom","right"];o<l.length;o++){var c=l[o];c in a||(a[c]=t[c])}return a}var hn={noInner:Co,noOuter:_o,start:function(a){var t,o=a.interaction,l=a.startOffset,c=a.state,p=c.options;p&&(t=ce(en(p.offset,o,o.coords.start.page))),t=t||{x:0,y:0},c.offset={top:t.y+l.top,left:t.x+l.left,bottom:t.y-l.bottom,right:t.x-l.right}},set:function(a){var t=a.coords,o=a.edges,l=a.interaction,c=a.state,p=c.offset,m=c.options;if(o){var b=z({},t),T=en(m.inner,l,b)||{},U=en(m.outer,l,b)||{};Eo(T,Co),Eo(U,_o),o.top?t.y=Math.min(Math.max(U.top+p.top,b.y),T.top+p.top):o.bottom&&(t.y=Math.max(Math.min(U.bottom+p.bottom,b.y),T.bottom+p.bottom)),o.left?t.x=Math.min(Math.max(U.left+p.left,b.x),T.left+p.left):o.right&&(t.x=Math.max(Math.min(U.right+p.right,b.x),T.right+p.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},yl=ra(hn,"restrictEdges"),bl=z({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(a){}},Bn.defaults),kl=ra({start:Bn.start,set:Bn.set,defaults:bl},"restrictRect"),xl={width:-1/0,height:-1/0},wl={width:1/0,height:1/0},Dl=ra({start:function(a){return hn.start(a)},set:function(a){var t=a.interaction,o=a.state,l=a.rect,c=a.edges,p=o.options;if(c){var m=G(en(p.min,t,a.coords))||xl,b=G(en(p.max,t,a.coords))||wl;o.options={endOnly:p.endOnly,inner:z({},hn.noInner),outer:z({},hn.noOuter)},c.top?(o.options.inner.top=l.bottom-m.height,o.options.outer.top=l.bottom-b.height):c.bottom&&(o.options.inner.bottom=l.top+m.height,o.options.outer.bottom=l.top+b.height),c.left?(o.options.inner.left=l.right-m.width,o.options.outer.left=l.right-b.width):c.right&&(o.options.inner.right=l.left+m.width,o.options.outer.right=l.left+b.width),hn.set(a),o.options=p}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),ao={start:function(a){var t,o=a.interaction,l=a.interactable,c=a.element,p=a.rect,m=a.state,b=a.startOffset,T=m.options,U=T.offsetWithOrigin?function(Te){var We=Te.interaction.element,Ke=ce(pe(Te.state.options.origin,null,null,[We])),Je=Ke||Z(Te.interactable,We,Te.interaction.prepared.name);return Je}(a):{x:0,y:0};if(T.offset==="startCoords")t={x:o.coords.start.page.x,y:o.coords.start.page.y};else{var N=pe(T.offset,l,c,[o]);(t=ce(N)||{x:0,y:0}).x+=U.x,t.y+=U.y}var oe=T.relativePoints;m.offsets=p&&oe&&oe.length?oe.map(function(Te,We){return{index:We,relativePoint:Te,x:b.left-p.width*Te.x+t.x,y:b.top-p.height*Te.y+t.y}}):[{index:0,relativePoint:null,x:t.x,y:t.y}]},set:function(a){var t=a.interaction,o=a.coords,l=a.state,c=l.options,p=l.offsets,m=Z(t.interactable,t.element,t.prepared.name),b=z({},o),T=[];c.offsetWithOrigin||(b.x-=m.x,b.y-=m.y);for(var U=0,N=p;U<N.length;U++)for(var oe=N[U],Te=b.x-oe.x,We=b.y-oe.y,Ke=0,Je=c.targets.length;Ke<Je;Ke++){var ut=c.targets[Ke],st=void 0;(st=S.func(ut)?ut(Te,We,t._proxy,oe,Ke):ut)&&T.push({x:(S.number(st.x)?st.x:Te)+oe.x,y:(S.number(st.y)?st.y:We)+oe.y,range:S.number(st.range)?st.range:c.range,source:ut,index:Ke,offset:oe})}for(var mt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Tt=0;Tt<T.length;Tt++){var Nt=T[Tt],Dt=Nt.range,It=Nt.x-b.x,na=Nt.y-b.y,Wt=lt(It,na),ca=Wt<=Dt;Dt===1/0&&mt.inRange&&mt.range!==1/0&&(ca=!1),mt.target&&!(ca?mt.inRange&&Dt!==1/0?Wt/Dt<mt.distance/mt.range:Dt===1/0&&mt.range!==1/0||Wt<mt.distance:!mt.inRange&&Wt<mt.distance)||(mt.target=Nt,mt.distance=Wt,mt.range=Dt,mt.inRange=ca,mt.delta.x=It,mt.delta.y=na)}return mt.inRange&&(o.x=mt.target.x,o.y=mt.target.y),l.closest=mt,mt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Cl=ra(ao,"snap"),Nn={start:function(a){var t=a.state,o=a.edges,l=t.options;if(!o)return null;a.state={options:{targets:null,relativePoints:[{x:o.left?0:1,y:o.top?0:1}],offset:l.offset||"self",origin:{x:0,y:0},range:l.range}},t.targetFields=t.targetFields||[["width","height"],["x","y"]],ao.start(a),t.offsets=a.state.offsets,a.state=t},set:function(a){var t=a.interaction,o=a.state,l=a.coords,c=o.options,p=o.offsets,m={x:l.x-p[0].x,y:l.y-p[0].y};o.options=z({},c),o.options.targets=[];for(var b=0,T=c.targets||[];b<T.length;b++){var U=T[b],N=void 0;if(N=S.func(U)?U(m.x,m.y,t):U){for(var oe=0,Te=o.targetFields;oe<Te.length;oe++){var We=Te[oe],Ke=We[0],Je=We[1];if(Ke in N||Je in N){N.x=N[Ke],N.y=N[Je];break}}o.options.targets.push(N)}}var ut=ao.set(a);return o.options=c,ut},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},_l=ra(Nn,"snapSize"),no={aspectRatio:gl,restrictEdges:yl,restrict:ml,restrictRect:kl,restrictSize:Dl,snapEdges:ra({start:function(a){var t=a.edges;return t?(a.state.targetFields=a.state.targetFields||[[t.left?"left":"right",t.top?"top":"bottom"]],Nn.start(a)):null},set:Nn.set,defaults:z(da(Nn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Cl,snapSize:_l,spring:In,avoid:In,transform:In,rubberband:In},El={id:"modifiers",install:function(a){var t=a.interactStatic;for(var o in a.usePlugin(Na),a.usePlugin(pl),t.modifiers=no,no){var l=no[o],c=l._defaults,p=l._methods;c._methods=p,a.defaults.perAction[o]=c}}},Sl=El,So=function(a){D(o,a);var t=Y(o);function o(l,c,p,m,b,T){var U;if(u(this,o),_(F(U=t.call(this,b)),p),p!==c&&_(F(U),c),U.timeStamp=T,U.originalEvent=p,U.type=l,U.pointerId=E(c),U.pointerType=Q(c),U.target=m,U.currentTarget=null,l==="tap"){var N=b.getPointerIndex(c);U.dt=U.timeStamp-b.pointers[N].downTime;var oe=U.timeStamp-b.tapTime;U.double=!!b.prevTap&&b.prevTap.type!=="doubletap"&&b.prevTap.target===U.target&&oe<500}else l==="doubletap"&&(U.dt=c.timeStamp-b.tapTime,U.double=!0);return U}return g(o,[{key:"_subtractOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX-=c,this.pageY-=p,this.clientX-=c,this.clientY-=p,this}},{key:"_addOrigin",value:function(l){var c=l.x,p=l.y;return this.pageX+=c,this.pageY+=p,this.clientX+=c,this.clientY+=p,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),o}(De),gn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(a){a.pointerEvents=gn,a.defaults.actions.pointerEvents=gn.defaults,z(a.actions.phaselessTypes,gn.types)},listeners:{"interactions:new":function(a){var t=a.interaction;t.prevTap=null,t.tapTime=0},"interactions:update-pointer":function(a){var t=a.down,o=a.pointerInfo;!t&&o.hold||(o.hold={duration:1/0,timeout:null})},"interactions:move":function(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget;a.duplicate||o.pointerIsDown&&!o.pointerWasMoved||(o.pointerIsDown&&oo(a),Fa({interaction:o,pointer:l,event:c,eventTarget:p,type:"move"},t))},"interactions:down":function(a,t){(function(o,l){for(var c=o.interaction,p=o.pointer,m=o.event,b=o.eventTarget,T=o.pointerIndex,U=c.pointers[T].hold,N=Xe(b),oe={interaction:c,pointer:p,event:m,eventTarget:b,type:"hold",targets:[],path:N,node:null},Te=0;Te<N.length;Te++){var We=N[Te];oe.node=We,l.fire("pointerEvents:collect-targets",oe)}if(oe.targets.length){for(var Ke=1/0,Je=0,ut=oe.targets;Je<ut.length;Je++){var st=ut[Je].eventable.options.holdDuration;st<Ke&&(Ke=st)}U.duration=Ke,U.timeout=setTimeout(function(){Fa({interaction:c,eventTarget:b,pointer:p,event:m,type:"hold"},l)},Ke)}})(a,t),Fa(a,t)},"interactions:up":function(a,t){oo(a),Fa(a,t),function(o,l){var c=o.interaction,p=o.pointer,m=o.event,b=o.eventTarget;c.pointerWasMoved||Fa({interaction:c,eventTarget:b,pointer:p,event:m,type:"tap"},l)}(a,t)},"interactions:cancel":function(a,t){oo(a),Fa(a,t)}},PointerEvent:So,fire:Fa,collectEventTargets:To,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 Fa(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,b=a.targets,T=b===void 0?To(a,t):b,U=new So(m,l,c,p,o,t.now());t.fire("pointerEvents:new",{pointerEvent:U});for(var N={interaction:o,pointer:l,event:c,eventTarget:p,targets:T,type:m,pointerEvent:U},oe=0;oe<T.length;oe++){var Te=T[oe];for(var We in Te.props||{})U[We]=Te.props[We];var Ke=Z(Te.eventable,Te.node);if(U._subtractOrigin(Ke),U.eventable=Te.eventable,U.currentTarget=Te.node,Te.eventable.fire(U),U._addOrigin(Ke),U.immediatePropagationStopped||U.propagationStopped&&oe+1<T.length&&T[oe+1].node!==U.currentTarget)break}if(t.fire("pointerEvents:fired",N),m==="tap"){var Je=U.double?Fa({interaction:o,pointer:l,event:c,eventTarget:p,type:"doubletap"},t):U;o.prevTap=Je,o.tapTime=Je.timeStamp}return U}function To(a,t){var o=a.interaction,l=a.pointer,c=a.event,p=a.eventTarget,m=a.type,b=o.getPointerIndex(l),T=o.pointers[b];if(m==="tap"&&(o.pointerWasMoved||!T||T.downTarget!==p))return[];for(var U=Xe(p),N={interaction:o,pointer:l,event:c,eventTarget:p,type:m,path:U,targets:[],node:null},oe=0;oe<U.length;oe++){var Te=U[oe];N.node=Te,t.fire("pointerEvents:collect-targets",N)}return m==="hold"&&(N.targets=N.targets.filter(function(We){var Ke,Je;return We.eventable.options.holdDuration===((Ke=o.pointers[b])==null||(Je=Ke.hold)==null?void 0:Je.duration)})),N.targets}function oo(a){var t=a.interaction,o=a.pointerIndex,l=t.pointers[o].hold;l&&l.timeout&&(clearTimeout(l.timeout),l.timeout=null)}var Tl=Object.freeze({__proto__:null,default:gn});function Il(a){var t=a.interaction;t.holdIntervalHandle&&(clearInterval(t.holdIntervalHandle),t.holdIntervalHandle=null)}var Bl={id:"pointer-events/holdRepeat",install:function(a){a.usePlugin(gn);var t=a.pointerEvents;t.defaults.holdRepeatInterval=0,t.types.holdrepeat=a.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(a,t){return a["pointerEvents:".concat(t)]=Il,a},{"pointerEvents:new":function(a){var t=a.pointerEvent;t.type==="hold"&&(t.count=(t.count||0)+1)},"pointerEvents:fired":function(a,t){var o=a.interaction,l=a.pointerEvent,c=a.eventTarget,p=a.targets;if(l.type==="hold"&&p.length){var m=p[0].eventable.options.holdRepeatInterval;m<=0||(o.holdIntervalHandle=setTimeout(function(){t.pointerEvents.fire({interaction:o,eventTarget:c,type:"hold",pointer:l,event:l},t)},m))}}})},Nl=Bl,Al={id:"pointer-events/interactableTargets",install:function(a){var t=a.Interactable;t.prototype.pointerEvents=function(l){return z(this.events.options,l),this};var o=t.prototype._backCompatOption;t.prototype._backCompatOption=function(l,c){var p=o.call(this,l,c);return p===this&&(this.events.options[l]=c),p}},listeners:{"pointerEvents:collect-targets":function(a,t){var o=a.targets,l=a.node,c=a.type,p=a.eventTarget;t.interactables.forEachMatch(l,function(m){var b=m.events,T=b.options;b.types[c]&&b.types[c].length&&m.testIgnoreAllow(T,l,p)&&o.push({node:l,eventable:b,props:{interactable:m}})})},"interactable:new":function(a){var t=a.interactable;t.events.getRect=function(o){return t.getRect(o)}},"interactable:set":function(a,t){var o=a.interactable,l=a.options;z(o.events.options,t.pointerEvents.defaults),z(o.events.options,l.pointerEvents||{})}}},Vl=Al,Ol={id:"pointer-events",install:function(a){a.usePlugin(Tl),a.usePlugin(Nl),a.usePlugin(Vl)}},Ml=Ol,Ll={id:"reflow",install:function(a){var t=a.Interactable;a.actions.phases.reflow=!0,t.prototype.reflow=function(o){return function(l,c,p){for(var m=l.getAllElements(),b=p.window.Promise,T=b?[]:null,U=function(){var oe=m[N],Te=l.getRect(oe);if(!Te)return 1;var We,Ke=Ne(p.interactions.list,function(st){return st.interacting()&&st.interactable===l&&st.element===oe&&st.prepared.name===c.name});if(Ke)Ke.move(),T&&(We=Ke._reflowPromise||new b(function(st){Ke._reflowResolve=st}));else{var Je=G(Te),ut=function(st){return{coords:st,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:Je.x,y:Je.y},client:{x:Je.x,y:Je.y},timeStamp:p.now()});We=function(st,mt,Tt,Nt,Dt){var It=st.interactions.new({pointerType:"reflow"}),na={interaction:It,event:Dt,pointer:Dt,eventTarget:Tt,phase:"reflow"};It.interactable=mt,It.element=Tt,It.prevEvent=Dt,It.updatePointer(Dt,Dt,Tt,!0),W(It.coords.delta),ft(It.prepared,Nt),It._doPhase(na);var Wt=st.window,ca=Wt.Promise,ha=ca?new ca(function(Da){It._reflowResolve=Da}):void 0;return It._reflowPromise=ha,It.start(Nt,mt,Tt),It._interacting?(It.move(na),It.end(Dt)):(It.stop(),It._reflowResolve()),It.removePointer(Dt,Dt),ha}(p,l,oe,c,ut)}T&&T.push(We)},N=0;N<m.length&&!U();N++);return T&&b.all(T).then(function(){return l})}(this,o,a)}},listeners:{"interactions:stop":function(a,t){var o=a.interaction;o.pointerType==="reflow"&&(o._reflowResolve&&o._reflowResolve(),function(l,c){l.splice(l.indexOf(c),1)}(t.interactions.list,o))}}},zl=Ll;if(aa.use(Ba),aa.use(Xt),aa.use(Ml),aa.use(Yt),aa.use(Sl),aa.use(ja),aa.use(A),aa.use(ht),aa.use(zl),aa.default=aa,d(n)==="object"&&n)try{n.exports=aa}catch{}return aa.default=aa,aa})}(kn,kn.exports)),kn.exports}var op=np();const Zo=Be.getDefaultExportFromCjs(op),Jn=e.defineComponent({__name:"grid-item",props:{isDraggable:{type:Boolean,default:void 0},isResizable:{type:Boolean,default:void 0},isBounded:{type:Boolean,default:void 0},static:{type:Boolean,default:!1},minH:{default:1},minW:{default:1},maxH:{default:1/0},maxW:{default:1/0},x:{},y:{},w:{},h:{},i:{},dragIgnoreFrom:{default:"a, button"},dragAllowFrom:{default:void 0},resizeIgnoreFrom:{default:"a, button"},preserveAspectRatio:{type:Boolean,default:!1},dragOption:{default:()=>({})},resizeOption:{default:()=>({})}},emits:["container-resized","resize","resized","move","moved"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.inject(Kr),k=e.inject(jr);if(!u)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const g=e.shallowRef(null),f=e.reactive({cols:1,containerWidth:100,rowHeight:30,margin:[10,10],maxRows:1/0,draggable:void 0,resizable:void 0,bounded:void 0,transformScale:1,useCssTransforms:!0,useStyleCursor:!0,isDragging:!1,dragging:{top:-1,left:-1},isResizing:!1,resizing:{width:-1,height:-1},style:{},rtl:!1});let D=!1,C=!1,V=NaN,F=NaN,Y=NaN,L=NaN,we=-1,q=-1,K=-1,le=-1,w=r.x,R=r.y,y=r.w,B=r.h;const S=e.ref(),ye=e.reactive({i:e.toRef(r,"i"),state:f,wrapper:S,calcXY:pe});function Ze(x){re(x)}function rt(){Re()}function Ae(x){ua(r.isDraggable)&&(f.draggable=x)}function je(x){ua(r.isResizable)&&(f.resizable=x)}function Ie(x){ua(r.isBounded)&&(f.bounded=x)}function O(x){f.transformScale=x}function ee(x){f.rowHeight=x}function se(x){f.maxRows=x}function he(){f.rtl=Yo()==="rtl",Re()}function Ge(x){f.cols=Math.floor(x)}u.increaseItem(ye),e.onBeforeMount(()=>{f.rtl=Yo()==="rtl"}),e.onMounted(()=>{u.responsive&&u.lastBreakpoint?f.cols=Gr(u.lastBreakpoint,u.cols):f.cols=u.colNum,f.rowHeight=u.rowHeight,f.containerWidth=u.width!==null?u.width:100,f.margin=u.margin!==void 0?u.margin.map(Number):[10,10],f.maxRows=u.maxRows,ua(r.isDraggable)?f.draggable=u.isDraggable:f.draggable=r.isDraggable,ua(r.isResizable)?f.resizable=u.isResizable:f.resizable=r.isResizable,ua(r.isBounded)?f.bounded=u.isBounded:f.bounded=r.isBounded,f.transformScale=u.transformScale,f.useCssTransforms=u.useCssTransforms,f.useStyleCursor=u.useStyleCursor,e.watchEffect(()=>{w=r.x,R=r.y,B=r.h,y=r.w,oa(qe)}),k.on("updateWidth",Ze),k.on("compact",rt),k.on("setDraggable",Ae),k.on("setResizable",je),k.on("setBounded",Ie),k.on("setTransformScale",O),k.on("setRowHeight",ee),k.on("setMaxRows",se),k.on("directionchange",he),k.on("setColNum",Ge)}),e.onBeforeUnmount(()=>{k.off("updateWidth",Ze),k.off("compact",rt),k.off("setDraggable",Ae),k.off("setResizable",je),k.off("setBounded",Ie),k.off("setTransformScale",O),k.off("setRowHeight",ee),k.off("setMaxRows",se),k.off("directionchange",he),k.off("setColNum",Ge),g.value&&(g.value.unset(),g.value=null),u.decreaseItem(ye)}),i({state:f,wrapper:S});const it=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,J=e.computed(()=>f.resizable&&!r.static),M=e.computed(()=>u.isMirrored?!f.rtl:f.rtl),xe=e.computed(()=>(f.draggable||f.resizable)&&!r.static),Ce=Xd("item"),Pe=e.computed(()=>({[Ce.b()]:!0,[Ce.bm("resizable")]:J.value,[Ce.bm("static")]:r.static,[Ce.bm("resizing")]:f.isResizing,[Ce.bm("dragging")]:f.isDragging,[Ce.bm("transform")]:f.useCssTransforms,[Ce.bm("rtl")]:M.value,[Ce.bm("no-touch")]:it&&xe.value})),Fe=e.computed(()=>[Ce.be("resizer"),M.value&&Ce.bem("resizer","rtl")].filter(Boolean));e.watch(()=>r.isDraggable,x=>{f.draggable=x}),e.watch(()=>r.static,()=>{oa(_),oa(W)}),e.watch(()=>f.draggable,()=>{oa(_)}),e.watch(()=>r.isResizable,x=>{f.resizable=x}),e.watch(()=>r.isBounded,x=>{f.bounded=x}),e.watch(()=>f.resizable,()=>{oa(W)}),e.watch(()=>f.rowHeight,()=>{oa(qe),oa(Xe)}),e.watch([()=>f.cols,()=>f.containerWidth],()=>{oa(W),oa(qe),oa(Xe)}),e.watch([()=>r.minH,()=>r.maxH,()=>r.minW,()=>r.maxW],()=>{oa(W)}),e.watch(M,()=>{oa(W),oa(qe)}),e.watch([()=>u.margin,()=>u.margin[0],()=>u.margin[1]],()=>{const x=u.margin;!x||x[0]===f.margin[0]&&x[1]===f.margin[1]||(f.margin=x.map(Number),oa(qe),oa(Xe))});function qe(){r.x+r.w>f.cols?(w=0,y=r.w>f.cols?f.cols:r.w):(w=r.x,y=r.w);const x=X(w,R,y,B);f.isDragging&&(x.top=f.dragging.top,M.value?x.right=f.dragging.left:x.left=f.dragging.left),f.isResizing&&(x.width=f.resizing.width,x.height=f.resizing.height);let ie;f.useCssTransforms?M.value?ie=Wd(x.top,x.right,x.width,x.height):ie=Ud(x.top,x.left,x.width,x.height):M.value?ie=qd(x.top,x.right,x.width,x.height):ie=Hd(x.top,x.left,x.width,x.height),f.style=ie}function Xe(){const x={};for(const ie of["width","height"]){const _e=f.style[ie].match(/^(\d+)px$/);if(!_e)return;x[ie]=_e[1]}d("container-resized",r.i,r.h,r.w,x.height,x.width)}function fe(x){if(r.static)return;const ie=x.type;if(ie==="resizestart"&&f.isResizing||ie!=="resizestart"&&!f.isResizing)return;const _e=Go(x);if(ua(_e))return;const{x:E,y:te}=_e,$={width:0,height:0};let P;switch(ie){case"resizestart":{W(),we=y,q=B,P=X(w,R,y,B),$.width=P.width,$.height=P.height,f.resizing=$,f.isResizing=!0;break}case"resizemove":{!x.edges.right&&!x.edges.left&&(Y=E),!x.edges.top&&!x.edges.bottom&&(L=te);const Ee=Xo(Y,L,E,te);M.value?$.width=f.resizing.width-Ee.deltaX/f.transformScale:$.width=f.resizing.width+Ee.deltaX/f.transformScale,$.height=f.resizing.height+Ee.deltaY/f.transformScale,f.resizing=$;break}case"resizeend":{P=X(w,R,y,B),$.width=P.width,$.height=P.height,f.resizing={width:-1,height:-1},f.isResizing=!1;break}}P=Z($.height,$.width),P.w<r.minW&&(P.w=r.minW),P.w>r.maxW&&(P.w=r.maxW),P.h<r.minH&&(P.h=r.minH),P.h>r.maxH&&(P.h=r.maxH),P.h<1&&(P.h=1),P.w<1&&(P.w=1),Y=E,L=te,(y!==P.w||B!==P.h)&&d("resize",r.i,P.h,P.w,$.height,$.width),x.type==="resizeend"&&(we!==y||q!==B)&&d("resized",r.i,P.h,P.w,$.height,$.width),k.emit("resizeEvent",x.type,r.i,w,R,P.h,P.w)}function z(x){if(r.static||f.isResizing)return;const ie=x.type;if(ie==="dragstart"&&f.isDragging||ie!=="dragstart"&&!f.isDragging)return;const _e=Go(x);if(ua(_e))return;const{x:E,y:te}=_e,$=x.target;if(!$.offsetParent)return;const P={top:0,left:0};switch(ie){case"dragstart":{K=w,le=R;const ne=$.offsetParent.getBoundingClientRect(),H=$.getBoundingClientRect(),Q=H.left/f.transformScale,de=ne.left/f.transformScale,De=H.right/f.transformScale,be=ne.right/f.transformScale,ke=H.top/f.transformScale,j=ne.top/f.transformScale;M.value?P.left=(De-be)*-1:P.left=Q-de,P.top=ke-j,f.dragging=P,f.isDragging=!0;break}case"dragmove":{const ne=Xo(V,F,E,te);if(M.value?P.left=f.dragging.left-ne.deltaX/f.transformScale:P.left=f.dragging.left+ne.deltaX/f.transformScale,P.top=f.dragging.top+ne.deltaY/f.transformScale,f.bounded){const H=$.offsetParent.clientHeight-G(r.h,f.rowHeight,f.margin[1]);P.top=ae(P.top,0,H);const Q=ce(),de=f.containerWidth-G(r.w,Q,f.margin[0]);P.left=ae(P.left,0,de)}f.dragging=P;break}case"dragend":{const ne=$.offsetParent.getBoundingClientRect(),H=$.getBoundingClientRect(),Q=H.left/f.transformScale,de=ne.left/f.transformScale,De=H.right/f.transformScale,be=ne.right/f.transformScale,ke=H.top/f.transformScale,j=ne.top/f.transformScale;M.value?P.left=(De-be)*-1:P.left=Q-de,P.top=ke-j,f.dragging={top:-1,left:-1},f.isDragging=!1;break}}let Ee;M.value,Ee=pe(P.top,P.left),V=E,F=te,(w!==Ee.x||R!==Ee.y)&&d("move",r.i,Ee.x,Ee.y),x.type==="dragend"&&(K!==w||le!==R)&&d("moved",r.i,Ee.x,Ee.y),k.emit("dragEvent",x.type,r.i,Ee.x,Ee.y,B,y)}function X(x,ie,_e,E){const te=ce();let $;return M.value?$={right:Math.round(te*x+(x+1)*f.margin[0]),top:Math.round(f.rowHeight*ie+(ie+1)*f.margin[1]),width:_e===1/0?_e:Math.round(te*_e+Math.max(0,_e-1)*f.margin[0]),height:E===1/0?E:Math.round(f.rowHeight*E+Math.max(0,E-1)*f.margin[1])}:$={left:Math.round(te*x+(x+1)*f.margin[0]),top:Math.round(f.rowHeight*ie+(ie+1)*f.margin[1]),width:_e===1/0?_e:Math.round(te*_e+Math.max(0,_e-1)*f.margin[0]),height:E===1/0?E:Math.round(f.rowHeight*E+Math.max(0,E-1)*f.margin[1])},$}function pe(x,ie){const _e=ce();let E=Math.round((ie-f.margin[0])/(_e+f.margin[0])),te=Math.round((x-f.margin[1])/(f.rowHeight+f.margin[1]));return E=Math.max(Math.min(E,f.cols-y),0),te=Math.max(Math.min(te,f.maxRows-B),0),{x:E,y:te}}function ce(){return(f.containerWidth-f.margin[0]*(f.cols+1))/f.cols}function G(x,ie,_e){return Number.isFinite(x)?Math.round(ie*x+Math.max(0,x-1)*_e):x}function ae(x,ie,_e){return Math.max(Math.min(x,_e),ie)}function Z(x,ie,_e=!1){const E=ce();let te=Math.round((ie+f.margin[0])/(E+f.margin[0])),$=0;return _e?$=Math.ceil((x+f.margin[1])/(f.rowHeight+f.margin[1])):$=Math.round((x+f.margin[1])/(f.rowHeight+f.margin[1])),te=Math.max(Math.min(te,f.cols-w),0),$=Math.max(Math.min($,f.maxRows-R),0),{w:te,h:$}}function re(x,ie){f.containerWidth=x}function Re(){qe()}function lt(){!g.value&&S.value&&(g.value=Zo(S.value),f.useStyleCursor||g.value.styleCursor(!1))}const h=Wo(z);function _(){if(lt(),!!g.value)if(f.draggable&&!r.static){const x={ignoreFrom:r.dragIgnoreFrom,allowFrom:r.dragAllowFrom,...r.dragOption};g.value.draggable(x),D||(D=!0,g.value.on("dragstart dragmove dragend",ie=>{ie.type==="dragmove"?h(ie):z(ie)}))}else g.value.draggable({enabled:!1})}const I=Wo(fe);function W(){if(lt(),!!g.value)if(f.resizable&&!r.static){const x=X(0,0,r.maxW,r.maxH),ie=X(0,0,r.minW,r.minH),_e={edges:{left:M.value?`.${Fe.value[0]}`:!1,right:M.value?!1:`.${Fe.value[0]}`,bottom:`.${Fe.value[0]}`,top:!1},ignoreFrom:r.resizeIgnoreFrom,restrictSize:{min:{height:ie.height*f.transformScale,width:ie.width*f.transformScale},max:{height:x.height*f.transformScale,width:x.width*f.transformScale}},...r.resizeOption};r.preserveAspectRatio&&(_e.modifiers=[Zo.modifiers.aspectRatio({ratio:"preserve"})]),g.value.resizable(_e),C||(C=!0,g.value.on("resizestart resizemove resizeend",E=>{E.type==="resizemove"?I(E):fe(E)}))}else g.value.resizable({enabled:!1})}return(x,ie)=>(e.openBlock(),e.createElementBlock("section",{ref_key:"wrapper",ref:S,class:e.normalizeClass(Pe.value),style:e.normalizeStyle(f.style)},[e.renderSlot(x.$slots,"default"),J.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(Fe.value)},null,2)):e.createCommentVNode("",!0)],6))}}),on=typeof window<"u";var Qo;on&&(Qo=window==null?void 0:window.navigator)!=null&&Qo.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function er(n){return n!=null}function tr(){}const rp=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(rp)));const lp=on&&("ontouchstart"in window||sp()>0),ip=lp?"pointerdown":"click";function sp(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function cp(n,i,s=window.Event){const{type:r,bubbles:d=!1,cancelable:u=!1,...k}=i;if(!er(r)||r==="")return!1;let g;return er(s)?g=new s(r,{bubbles:d,cancelable:u}):(g=document.createEvent("HTMLEvents"),g.initEvent(r,d,u)),Object.assign(g,k),n.dispatchEvent(g)}const up="clickoutside",dp=new Set;on&&document.addEventListener(ip,n=>{const i=n.target,s=n.composedPath&&n.composedPath();dp.forEach(r=>{r!==i&&(s?!s.includes(r):!r.contains(i))&&(!r.__transferElement||r.__transferElement!==i&&!r.__transferElement.contains(i))&&cp(r,{type:up})})},!0);const pp=[["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 Pn;if(on){for(const n of pp)if(n[1]in document){Pn=n;break}}e.computed(()=>!1);const fp=new Set,vp=new WeakMap;if(on&&Pn){const n=Pn[2],i=Pn[4];document.addEventListener(i,()=>{if(fp.forEach(s=>{s.value=!1}),document[n]){const s=vp.get(document[n]);s&&(s.value=!0)}},!1)}const Yr=new Map;Yr.set("x",0);Yr.set("y",0);var an=[],hp=function(){return an.some(function(n){return n.activeTargets.length>0})},gp=function(){return an.some(function(n){return n.skippedTargets.length>0})},ar="ResizeObserver loop completed with undelivered notifications.",mp=function(){var n;typeof ErrorEvent=="function"?n=new ErrorEvent("error",{message:ar}):(n=document.createEvent("Event"),n.initEvent("error",!1,!1),n.message=ar),window.dispatchEvent(n)},En;(function(n){n.BORDER_BOX="border-box",n.CONTENT_BOX="content-box",n.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(En||(En={}));var nn=function(n){return Object.freeze(n)},yp=function(){function n(i,s){this.inlineSize=i,this.blockSize=s,nn(this)}return n}(),Jr=function(){function n(i,s,r,d){return this.x=i,this.y=s,this.width=r,this.height=d,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,nn(this)}return n.prototype.toJSON=function(){var i=this,s=i.x,r=i.y,d=i.top,u=i.right,k=i.bottom,g=i.left,f=i.width,D=i.height;return{x:s,y:r,top:d,right:u,bottom:k,left:g,width:f,height:D}},n.fromRect=function(i){return new n(i.x,i.y,i.width,i.height)},n}(),ko=function(n){return n instanceof SVGElement&&"getBBox"in n},Zr=function(n){if(ko(n)){var i=n.getBBox(),s=i.width,r=i.height;return!s&&!r}var d=n,u=d.offsetWidth,k=d.offsetHeight;return!(u||k||n.getClientRects().length)},nr=function(n){var i;if(n instanceof Element)return!0;var s=(i=n==null?void 0:n.ownerDocument)===null||i===void 0?void 0:i.defaultView;return!!(s&&n instanceof s.Element)},bp=function(n){switch(n.tagName){case"INPUT":if(n.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},_n=typeof window<"u"?window:{},Mn=new WeakMap,or=/auto|scroll/,kp=/^tb|vertical/,xp=/msie|trident/i.test(_n.navigator&&_n.navigator.userAgent),ya=function(n){return parseFloat(n||"0")},pn=function(n,i,s){return n===void 0&&(n=0),i===void 0&&(i=0),s===void 0&&(s=!1),new yp((s?i:n)||0,(s?n:i)||0)},rr=nn({devicePixelContentBoxSize:pn(),borderBoxSize:pn(),contentBoxSize:pn(),contentRect:new Jr(0,0,0,0)}),Qr=function(n,i){if(i===void 0&&(i=!1),Mn.has(n)&&!i)return Mn.get(n);if(Zr(n))return Mn.set(n,rr),rr;var s=getComputedStyle(n),r=ko(n)&&n.ownerSVGElement&&n.getBBox(),d=!xp&&s.boxSizing==="border-box",u=kp.test(s.writingMode||""),k=!r&&or.test(s.overflowY||""),g=!r&&or.test(s.overflowX||""),f=r?0:ya(s.paddingTop),D=r?0:ya(s.paddingRight),C=r?0:ya(s.paddingBottom),V=r?0:ya(s.paddingLeft),F=r?0:ya(s.borderTopWidth),Y=r?0:ya(s.borderRightWidth),L=r?0:ya(s.borderBottomWidth),we=r?0:ya(s.borderLeftWidth),q=V+D,K=f+C,le=we+Y,w=F+L,R=g?n.offsetHeight-w-n.clientHeight:0,y=k?n.offsetWidth-le-n.clientWidth:0,B=d?q+le:0,S=d?K+w:0,ye=r?r.width:ya(s.width)-B-y,Ze=r?r.height:ya(s.height)-S-R,rt=ye+q+y+le,Ae=Ze+K+R+w,je=nn({devicePixelContentBoxSize:pn(Math.round(ye*devicePixelRatio),Math.round(Ze*devicePixelRatio),u),borderBoxSize:pn(rt,Ae,u),contentBoxSize:pn(ye,Ze,u),contentRect:new Jr(V,f,ye,Ze)});return Mn.set(n,je),je},el=function(n,i,s){var r=Qr(n,s),d=r.borderBoxSize,u=r.contentBoxSize,k=r.devicePixelContentBoxSize;switch(i){case En.DEVICE_PIXEL_CONTENT_BOX:return k;case En.BORDER_BOX:return d;default:return u}},wp=function(){function n(i){var s=Qr(i);this.target=i,this.contentRect=s.contentRect,this.borderBoxSize=nn([s.borderBoxSize]),this.contentBoxSize=nn([s.contentBoxSize]),this.devicePixelContentBoxSize=nn([s.devicePixelContentBoxSize])}return n}(),tl=function(n){if(Zr(n))return 1/0;for(var i=0,s=n.parentNode;s;)i+=1,s=s.parentNode;return i},Dp=function(){var n=1/0,i=[];an.forEach(function(u){if(u.activeTargets.length!==0){var k=[];u.activeTargets.forEach(function(g){var f=new wp(g.target),D=tl(g.target);k.push(f),g.lastReportedSize=el(g.target,g.observedBox),D<n&&(n=D)}),i.push(function(){u.callback.call(u.observer,k,u.observer)}),u.activeTargets.splice(0,u.activeTargets.length)}});for(var s=0,r=i;s<r.length;s++){var d=r[s];d()}return n},lr=function(n){an.forEach(function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach(function(s){s.isActive()&&(tl(s.target)>n?i.activeTargets.push(s):i.skippedTargets.push(s))})})},Cp=function(){var n=0;for(lr(n);hp();)n=Dp(),lr(n);return gp()&&mp(),n>0},io,al=[],_p=function(){return al.splice(0).forEach(function(n){return n()})},Ep=function(n){if(!io){var i=0,s=document.createTextNode(""),r={characterData:!0};new MutationObserver(function(){return _p()}).observe(s,r),io=function(){s.textContent="".concat(i?i--:i++)}}al.push(n),io()},Sp=function(n){Ep(function(){requestAnimationFrame(n)})},$n=0,Tp=function(){return!!$n},Ip=250,Bp={attributes:!0,characterData:!0,childList:!0,subtree:!0},ir=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],sr=function(n){return n===void 0&&(n=0),Date.now()+n},so=!1,Np=function(){function n(){var i=this;this.stopped=!0,this.listener=function(){return i.schedule()}}return n.prototype.run=function(i){var s=this;if(i===void 0&&(i=Ip),!so){so=!0;var r=sr(i);Sp(function(){var d=!1;try{d=Cp()}finally{if(so=!1,i=r-sr(),!Tp())return;d?s.run(1e3):i>0?s.run(i):s.start()}})}},n.prototype.schedule=function(){this.stop(),this.run()},n.prototype.observe=function(){var i=this,s=function(){return i.observer&&i.observer.observe(document.body,Bp)};document.body?s():_n.addEventListener("DOMContentLoaded",s)},n.prototype.start=function(){var i=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ir.forEach(function(s){return _n.addEventListener(s,i.listener,!0)}))},n.prototype.stop=function(){var i=this;this.stopped||(this.observer&&this.observer.disconnect(),ir.forEach(function(s){return _n.removeEventListener(s,i.listener,!0)}),this.stopped=!0)},n}(),fo=new Np,cr=function(n){!$n&&n>0&&fo.start(),$n+=n,!$n&&fo.stop()},Ap=function(n){return!ko(n)&&!bp(n)&&getComputedStyle(n).display==="inline"},Vp=function(){function n(i,s){this.target=i,this.observedBox=s||En.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return n.prototype.isActive=function(){var i=el(this.target,this.observedBox,!0);return Ap(this.target)&&(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},n}(),Op=function(){function n(i,s){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=i,this.callback=s}return n}(),Ln=new WeakMap,ur=function(n,i){for(var s=0;s<n.length;s+=1)if(n[s].target===i)return s;return-1},zn=function(){function n(){}return n.connect=function(i,s){var r=new Op(i,s);Ln.set(i,r)},n.observe=function(i,s,r){var d=Ln.get(i),u=d.observationTargets.length===0;ur(d.observationTargets,s)<0&&(u&&an.push(d),d.observationTargets.push(new Vp(s,r&&r.box)),cr(1),fo.schedule())},n.unobserve=function(i,s){var r=Ln.get(i),d=ur(r.observationTargets,s),u=r.observationTargets.length===1;d>=0&&(u&&an.splice(an.indexOf(r),1),r.observationTargets.splice(d,1),cr(-1))},n.disconnect=function(i){var s=this,r=Ln.get(i);r.observationTargets.slice().forEach(function(d){return s.unobserve(i,d.target)}),r.activeTargets.splice(0,r.activeTargets.length)},n}(),Mp=function(){function n(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.");zn.connect(this,i)}return n.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(!nr(i))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.observe(this,i,s)},n.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(!nr(i))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zn.unobserve(this,i)},n.prototype.disconnect=function(){zn.disconnect(this)},n.toString=function(){return"function ResizeObserver () { [polyfill code] }"},n}();const Zn=new WeakMap;function Lp(n){var i;for(let s=0,r=n.length;s<r;++s){const d=n[s],u=Zn.get(d.target);if(typeof u=="function"){const{inlineSize:k,blockSize:g}=((i=d.borderBoxSize)==null?void 0:i[0])??{},{offsetWidth:f,offsetHeight:D}=d.target;u(Object.assign(d,{offsetWidth:f,offsetHeight:D,width:k??f,height:g??D}))}}}const nl=new(on&&window.ResizeObserver||Mp)(Lp);function dr(n,i){Zn.set(n,i),nl.observe(n)}function pr(n){Zn.has(n)&&(nl.unobserve(n),Zn.delete(n))}function zp(n={}){let i=tr;const s=e.watch(()=>e.unref(n.target),d=>{i(),!(!d||typeof n.onResize!="function")&&(dr(d,n.onResize),i=()=>{pr(d),i=tr})},{immediate:!0}),r=()=>{s(),i()};return e.getCurrentScope()&&e.onScopeDispose(r),{observeResize:dr,unobserveResize:pr,unobserve:r}}const Fp=e.ref(!1);e.computed(()=>Fp.value);const fr="__theme_style__",co="__theme_observer__",vr=e.reactive(new Map),hr=new Map;e.watch(vr,()=>{if(!on)return;hr.clear();const n=document.head.querySelector(`#${fr}`);n&&document.head.removeChild(n);const i=document.createElement("style");let s=`.${co} { width: 1px }`,r=1;for(const[d,[u,k]]of vr.entries())s+=` html.${u} .${co}, .${k} .${co} { width: ${++r}px }`,hr.set(r,d);i.textContent=s,i.id=fr,document.head.appendChild(i)});const ol=e.defineComponent({__name:"grid-layout",props:{autoSize:{type:Boolean,default:!0},colNum:{default:12},rowHeight:{default:150},maxRows:{default:1/0},margin:{default:()=>[10,10]},isDraggable:{type:Boolean,default:!0},isResizable:{type:Boolean,default:!0},isMirrored:{type:Boolean,default:!1},isBounded:{type:Boolean,default:!1},useCssTransforms:{type:Boolean,default:!0},verticalCompact:{type:Boolean,default:!0},restoreOnDrag:{type:Boolean,default:!1},layout:{},responsive:{type:Boolean,default:!1},responsiveLayouts:{default:()=>({})},transformScale:{default:1},breakpoints:{default:()=>({lg:1200,md:996,sm:768,xs:480,xxs:0})},cols:{default:()=>({lg:12,md:10,sm:6,xs:4,xxs:2})},preventCollision:{type:Boolean,default:!1},useStyleCursor:{type:Boolean,default:!0}},emits:["layout-before-mount","layout-mounted","layout-updated","breakpoint-changed","update:layout","layout-ready"],setup(n,{expose:i,emit:s}){const r=n,d=s,u=e.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),k=new Map,g=e.ref(r.layout),f=e.ref(),{observeResize:D,unobserveResize:C}=zp(),V=zd();V.on("resizeEvent",F),V.on("dragEvent",Y),e.onBeforeMount(()=>{d("layout-before-mount",g.value)}),e.onMounted(()=>{d("layout-mounted",g.value),e.nextTick(()=>{Gd(g.value),u.originalLayout=g.value,e.nextTick(()=>{Ze(),f.value&&D(f.value,Fd(w,16)),un(g.value,r.verticalCompact),d("layout-updated",g.value),le(),w()})})}),e.onBeforeUnmount(()=>{V.clearAll(),f.value&&C(f.value)});function F(Ae,je,Ie,O,ee,se){S(Ae,je,Ie,O,ee,se)}function Y(Ae,je,Ie,O,ee,se){B(Ae,je,Ie,O,ee,se)}e.watch(()=>u.width,(Ae,je)=>{e.nextTick(()=>{V.emit("updateWidth",Ae),je===-1&&e.nextTick(()=>{d("layout-ready",g.value)}),le()})}),e.watch(()=>[r.layout,r.layout.length],()=>{g.value=r.layout,K()}),e.watch(()=>r.colNum,Ae=>{V.emit("setColNum",Ae)}),e.watch(()=>r.rowHeight,Ae=>{V.emit("setRowHeight",Ae)}),e.watch(()=>r.isDraggable,Ae=>{V.emit("setDraggable",Ae)}),e.watch(()=>r.isResizable,Ae=>{V.emit("setResizable",Ae)}),e.watch(()=>r.isBounded,Ae=>{V.emit("setBounded",Ae)}),e.watch(()=>r.transformScale,Ae=>{V.emit("setTransformScale",Ae)}),e.watch(()=>r.responsive,Ae=>{Ae||(d("update:layout",u.originalLayout),V.emit("setColNum",r.colNum)),w()}),e.watch(()=>r.maxRows,Ae=>{V.emit("setMaxRows",Ae)}),e.watch([()=>r.margin,()=>r.margin[1]],le),e.provide(Kr,e.reactive({...e.toRefs(r),...e.toRefs(u),increaseItem:L,decreaseItem:we})),e.provide(jr,V),i({state:u,getItem:q,resizeEvent:S,dragEvent:B,layoutUpdate:K});function L(Ae){k.set(Ae.i,Ae)}function we(Ae){k.delete(Ae.i)}function q(Ae){return k.get(Ae)}function K(){if(!ua(g.value)&&!ua(u.originalLayout)){if(g.value.length!==u.originalLayout.length){const Ae=rt(g.value,u.originalLayout);if(Ae.length>0)if(g.value.length>u.originalLayout.length)u.originalLayout=u.originalLayout.concat(Ae);else{const je=new Set(Ae.map(Ie=>Ie.i));u.originalLayout=u.originalLayout.filter(Ie=>!je.has(Ie.i))}u.lastLayoutLength=g.value.length,Ze()}un(g.value,r.verticalCompact),V.emit("updateWidth",u.width),le(),d("layout-updated",g.value)}}function le(){u.mergedStyle={height:R()}}function w(){f.value&&(u.width=f.value.offsetWidth),V.emit("resizeEvent")}function R(){if(!r.autoSize)return;const Ae=parseFloat(r.margin[1]);return Pd(g.value)*(r.rowHeight+Ae)+Ae+"px"}let y;function B(Ae,je,Ie,O,ee,se){let he=Ho(g.value,je);ua(he)&&(he={h:0,w:0,x:0,y:0,i:""}),Ae==="dragstart"&&!r.verticalCompact&&(y=g.value.reduce((Ge,{i:it,x:J,y:M})=>({...Ge,[it]:{x:J,y:M}}),{})),Ae==="dragmove"||Ae==="dragstart"?(u.placeholder.i=je,u.placeholder.x=he.x,u.placeholder.y=he.y,u.placeholder.w=se,u.placeholder.h=ee,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):e.nextTick(()=>{u.isDragging=!1}),g.value=po(g.value,he,Ie,O,!0,r.preventCollision),r.restoreOnDrag?(he.static=!0,un(g.value,r.verticalCompact,y),he.static=!1):un(g.value,r.verticalCompact),V.emit("compact"),le(),Ae==="dragend"&&(y=void 0,d("layout-updated",g.value))}function S(Ae,je,Ie,O,ee,se){let he=Ho(g.value,je);ua(he)&&(he={h:0,w:0,x:0,y:0,i:""});let Ge;if(r.preventCollision){const it=Wr(g.value,{...he,w:se,h:ee}).filter(J=>J.i!==he.i);if(Ge=it.length>0,Ge){let J=1/0,M=1/0;it.forEach(xe=>{xe.x>he.x&&(J=Math.min(J,xe.x)),xe.y>he.y&&(M=Math.min(M,xe.y))}),Number.isFinite(J)&&(he.w=J-he.x),Number.isFinite(M)&&(he.h=M-he.y)}}Ge||(he.w=se,he.h=ee),Ae==="resizestart"||Ae==="resizemove"?(u.placeholder.i=je,u.placeholder.x=Ie,u.placeholder.y=O,u.placeholder.w=he.w,u.placeholder.h=he.h,e.nextTick(()=>{u.isDragging=!0}),V.emit("updateWidth",u.width)):Ae&&e.nextTick(()=>{u.isDragging=!1}),r.responsive&&ye(),un(g.value,r.verticalCompact),V.emit("compact"),le(),Ae==="resizeend"&&d("layout-updated",g.value)}function ye(){const Ae=Zd(r.breakpoints,u.width);if(Ae===u.lastBreakpoint)return;const je=Gr(Ae,r.cols);!ua(u.lastBreakpoint)&&!u.layouts[u.lastBreakpoint]&&(u.layouts[u.lastBreakpoint]=uo(g.value));const Ie=Qd(u.originalLayout,u.layouts,r.breakpoints,Ae,u.lastBreakpoint,je,r.verticalCompact);u.layouts[Ae]=Ie,u.lastBreakpoint!==Ae&&d("breakpoint-changed",Ae,Ie),g.value=Ie,d("update:layout",Ie),u.lastBreakpoint=Ae,V.emit("setColNum",je)}function Ze(){u.layouts=Object.assign({},r.responsiveLayouts)}function rt(Ae,je){const Ie=new Set(je.map(he=>he.i)),O=new Set(Ae.map(he=>he.i)),ee=Ae.filter(he=>!Ie.has(he.i)),se=je.filter(he=>!O.has(he.i));return ee.concat(se)}return(Ae,je)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:f,class:"vgl-layout",style:e.normalizeStyle(u.mergedStyle)},[Ae.$slots.default?e.renderSlot(Ae.$slots,"default",{key:0}):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(g.value,Ie=>(e.openBlock(),e.createBlock(Jn,e.mergeProps({key:Ie.i,ref_for:!0},Ie),{default:e.withCtx(()=>[e.renderSlot(Ae.$slots,"item",{item:Ie})]),_:2},1040))),128)),e.withDirectives(e.createVNode(Jn,{class:"vgl-item--placeholder",x:u.placeholder.x,y:u.placeholder.y,w:u.placeholder.w,h:u.placeholder.h,i:u.placeholder.i},null,8,["x","y","w","h","i"]),[[e.vShow,u.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var n=document.createElement("style");n.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;top:0;right:3px;bottom:3px;left:0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{top:0;right:0;bottom:3px;left:3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(n)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();const Rp={key:0,class:"item-view-group"},Pp={key:0,class:"item-view-group"},$p=e.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl"],setup(n,{emit:i}){const s=Ut.useModelComp(v.pinia),{isEdit:r}=v.storeToRefs(s),d=i,u=n,k=e.computed(()=>u==null?void 0:u.children),g=e.computed(()=>{var F,Y,L,we;return((F=u==null?void 0:u.children)==null?void 0:F.length)>0&&((Y=u==null?void 0:u.children)!=null&&Y.every(q=>q==null?void 0:q.layout))?(we=(L=u==null?void 0:u.children)==null?void 0:L[0])==null?void 0:we.layout:"vertical"}),f=e.computed(()=>{var F,Y;return((Y=(F=u==null?void 0:u.children)==null?void 0:F[0])==null?void 0:Y.isGridLayout)||!1}),D=e.ref((u==null?void 0:u.level)+1),C=F=>{d("rowClick",F)},V=(F,Y)=>{d("routeUrl",F,Y)};return(F,Y)=>f.value?(e.openBlock(),e.createBlock(e.unref(ol),{key:0,layout:k.value,"onUpdate:layout":Y[0]||(Y[0]=L=>k.value=L),"is-draggable":e.unref(r)==="edit","is-resizable":e.unref(r)==="edit","col-num":24,margin:[8,16]},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(L,we)=>(e.openBlock(),e.createBlock(e.unref(Jn),{key:L.i,x:L.x,y:L.y,"min-h":L.minH,"max-h":L.maxH,"min-w":L.minW,w:L.w,h:L.h,i:L.i},{default:e.withCtx(()=>{var q,K,le,w,R,y,B,S,ye,Ze,rt,Ae,je;return[e.createElementVNode("div",{style:e.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:we===((q=u==null?void 0:u.children)==null?void 0:q.length)-1?"0px":"24px"})},[((le=(K=L==null?void 0:L.component)==null?void 0:K.comp)==null?void 0:le.toUpperCase())!=="TABLE"&&((w=L==null?void 0:L.component)!=null&&w.name)?(e.openBlock(),e.createElementBlock("div",Rp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:(parseInt(D.value.toString())-1)*12+"px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString((R=L==null?void 0:L.component)==null?void 0:R.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)((y=L==null?void 0:L.component)==null?void 0:y.comp)),{pageLayout:g.value,config:{showIndex:(B=e.unref(pt)[we])==null?void 0:B.showIndex,allowMove:(S=e.unref(pt)[we])==null?void 0:S.allowMove,viewport:(ye=e.unref(pt)[we])==null?void 0:ye.viewport},compName:L==null?void 0:L.component.name,compNames:e.unref(yo),itemData:(Ze=L==null?void 0:L.component)==null?void 0:Ze.compData,childItemData:(rt=L==null?void 0:L.component)==null?void 0:rt.itemChildData,key:e.unref(fn),cacheNewData:e.unref(wn),onChange:e.unref(Gn),index:(L==null?void 0:L.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:(Ae=L==null?void 0:L.component)==null?void 0:Ae.tableId,allMapContents:e.unref(Hn),children:(je=L==null?void 0:L.component)==null?void 0:je.children,level:D.value,onRowClick:C,onRouteUrl:V,onClickTrigger:e.unref(Mr),onClickMainKey:e.unref(Lr)},null,40,["pageLayout","config","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(u==null?void 0:u.children,(L,we)=>{var q,K;return e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({gap:"16px",display:(L==null?void 0:L.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(we)===((q=u==null?void 0:u.children)==null?void 0:q.length)-1?"0px":"24px"})},[((K=L==null?void 0:L.comp)==null?void 0:K.toUpperCase())!=="TABLE"&&L.name?(e.openBlock(),e.createElementBlock("div",Pp,[e.createElementVNode("div",{class:"group-name-wrap",style:e.normalizeStyle({paddingLeft:parseInt(D.value.toString())>1?"12px":"0px",fontWeight:600-(D.value-1)*100>=400?600-(D.value-1)*100:400,fontSize:17-D.value>=14?17-D.value+"px":"14px"})},e.toDisplayString(L.name),5)])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(qn)(L.comp)),{compName:L.name,itemData:L==null?void 0:L.compData,childItemData:L==null?void 0:L.itemChildData,key:e.unref(fn),onChange:e.unref(Gn),index:(L==null?void 0:L.id)??we,onContentChange:e.unref(Xn),onPageChange:e.unref(Yn),parentTableId:L==null?void 0:L.tableId,allMapContents:e.unref(Hn),children:L==null?void 0:L.children,level:D.value,onRowClick:C,onRouteUrl:V},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),Kp=Kt._export_sfc($p,[["__scopeId","data-v-e672653d"]]),rl=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"}]),jp={TABLE:bn.ssTable,FORM:Mo,TABLEOPERATE:ls,TABLESTYLE:ws,TABLEEXTEND:Cs,TABLEINTERACTION:Ss,FORMOPERATE:Lo,FOLD:nc,CALCULATOR:cc,METHODBUTTON:pc,AVATARUPLOAD:Ao.ssAvatar,SIGNATURE:Ao.ssSignature,FORMTOP:Mo,STEP:Cc,STEPOPERATE:Gs,TIMELINE:Bc,TIMELINEOPERATE:ec,FORMTOPOPERATE:Lo,SIGNATUREOPERATE:xc,AVATARUPLOADOPERATE:hc,TABS:Vc,TABSOPERATE:yu,CHART:Au,CHARTOPERATE:ju,LAYOUT:_d,LAYOUTOPERATE:Od,PARENTITEM:Kp};function rn(n){return jp[n==null?void 0:n.toUpperCase()]||null}exports.De=ol;exports._sfc_main=Sr;exports.activeStepInfo=dn;exports.addSelectMenu=eo;exports.affixItems=ld;exports.allMapContents=Hn;exports.cacheNewData=wn;exports.clickMainKey=Lr;exports.clickSavePage=rd;exports.clickStep=Fr;exports.clickTrigger=Mr;exports.compId=fn;exports.compNames=yo;exports.compShow=Wn;exports.debounce=vo;exports.existLayouts=hd;exports.generateLayouts=ys;exports.getComponent=rn;exports.getComponents=qn;exports.getSliceContLength=kd;exports.gridRowHeight=fs;exports.isStepLayout=bo;exports.isUndefined=yr;exports.onBack=ad;exports.onChange=Gn;exports.onClick=od;exports.onContentChange=Xn;exports.onExtendTaskEnd=vd;exports.onPageBack=md;exports.onPageChange=Yn;exports.onSelectFixContent=td;exports.renderShowItems=Ar;exports.selectFilterItem=Qt;exports.setComponent=Ir;exports.showItems=pt;exports.sliceTableLength=Vr;exports.slotContent=rl;exports.ssMenu=jn;exports.st=Jn;exports.stepItems=xd;exports.toolBar=Ea;exports.verifyButton=yd;