ss-component-new 1.3.280 → 1.3.281

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 (91) hide show
  1. package/dist/{MTLLoader-DXYhvEjE.cjs → MTLLoader-CvINB_3K.cjs} +1 -1
  2. package/dist/{MTLLoader-DLRLyLMt.js → MTLLoader-DVywhJ5Q.js} +1 -1
  3. package/dist/{OrbitControls-nAgVKLNJ.cjs → OrbitControls-D671ekNZ.cjs} +1 -1
  4. package/dist/{OrbitControls-CQvx5QMJ.js → OrbitControls-Dw-kijDo.js} +1 -1
  5. package/dist/{URDFLoader-BWQ_OscV.cjs → URDFLoader-BgcTSOZ6.cjs} +1 -1
  6. package/dist/{URDFLoader-D22KzIth.js → URDFLoader-Dk8lOGc-.js} +2 -2
  7. package/dist/{animationData-VUxOUVgD.js → animationData-BtgtSqTz.js} +3 -3
  8. package/dist/{animationData-LLOehaOQ.cjs → animationData-CTbEmb_V.cjs} +1 -1
  9. package/dist/{array-D45MU204.js → array-B0PFrdFL.js} +3 -3
  10. package/dist/{array-D1GUCNsq.cjs → array-D2bK6Jvr.cjs} +1 -1
  11. package/dist/{clone-BbOj9TCH.js → clone-BRg3D_Io.js} +1 -1
  12. package/dist/{iconfont-BE1hzmDc.cjs → iconfont-DHYDXPkZ.cjs} +1 -1
  13. package/dist/{iconfont-Cr38i46d.js → iconfont-DNwVgv2S.js} +2 -2
  14. package/dist/{index-BOvPjR0D.js → index-0aWnJT_L.js} +3 -3
  15. package/dist/{index-DR_WyjvT.cjs → index-9m_Dfg-a.cjs} +1 -1
  16. package/dist/{index-BHMoo7bB.cjs → index-AbAAedWL.cjs} +1 -1
  17. package/dist/{index-9wGZ-4hR.js → index-B8ltduvS.js} +8 -8
  18. package/dist/{index-BoTE32ut.js → index-BB2tyXr9.js} +2 -2
  19. package/dist/{index-Cy9bsuL2.js → index-BCFmSGbB.js} +4 -4
  20. package/dist/{index-BT46HAHZ.js → index-BGTs360b.js} +8 -8
  21. package/dist/{index-B-l84C54.cjs → index-BRVviKxo.cjs} +1 -1
  22. package/dist/index-BWlTDVnR.cjs +2 -0
  23. package/dist/{index-BuAbzlq5.js → index-BY0Eh6RU.js} +2 -2
  24. package/dist/{index-SbZQQ-X8.js → index-BYTKbNYi.js} +3 -3
  25. package/dist/{index-C24Ew8DS.js → index-BctOhDwk.js} +2 -2
  26. package/dist/{index-CsQXBNEB.cjs → index-BdTJc6uN.cjs} +1 -1
  27. package/dist/{index-R_Xkgk81.cjs → index-BhSZE-7O.cjs} +1 -1
  28. package/dist/{index--m3WLt7S.cjs → index-BjkhIjV4.cjs} +1 -1
  29. package/dist/{index-xXJ9MTXI.cjs → index-BlELLGzz.cjs} +1 -1
  30. package/dist/{index-CC_Uf7i5.js → index-Bsr7LwqB.js} +2 -2
  31. package/dist/{index-Bshw7NTp.js → index-C5gP1spi.js} +1 -1
  32. package/dist/{index-BIUUO2hj.cjs → index-C5xqTd6I.cjs} +2 -2
  33. package/dist/index-CO_A9nyT.js +9005 -0
  34. package/dist/{index-C13U-0Jy.js → index-Cduqeukn.js} +12 -12
  35. package/dist/index-CqxMQr74.js +89 -0
  36. package/dist/{index-CDD6K64i.js → index-CvhlEfJz.js} +8 -8
  37. package/dist/{index-CgLR8M0W.js → index-Cw6dRC9A.js} +1 -1
  38. package/dist/{index-DJX7B_Ea.js → index-D8nK6HAn.js} +2 -2
  39. package/dist/{index-jyKnojfp.js → index-DCbu7ri3.js} +12 -12
  40. package/dist/{index-CUsNZcCU.js → index-DHmofmrZ.js} +5 -5
  41. package/dist/{index-DRfgsNa8.cjs → index-DQ7U_hjn.cjs} +1 -1
  42. package/dist/{index-Di7ZA2ve.js → index-DSAzufvO.js} +4 -4
  43. package/dist/{index-Cwqd3RTR.cjs → index-DVVFpoVc.cjs} +1 -1
  44. package/dist/{index-Dj7DdBZy.js → index-DejOuWvy.js} +1 -1
  45. package/dist/{index-Cf3xpk_1.js → index-DfIVee_H.js} +1 -1
  46. package/dist/{index-kmcOGXlU.cjs → index-FHHw49g0.cjs} +12 -12
  47. package/dist/{index-BgCFgQ5g.cjs → index-GMl49hXt.cjs} +1 -1
  48. package/dist/{index-Bt-uJfVZ.js → index-GNblQpLl.js} +3 -3
  49. package/dist/{index-CpzY9Gec.js → index-HLvtE9S0.js} +1 -1
  50. package/dist/{index-Dl2gLoFM.js → index-KcQ75YNd.js} +12 -12
  51. package/dist/{index-Ck622048.js → index-VVDo149k.js} +1 -1
  52. package/dist/{index-FyAkELn9.cjs → index-YMw8o9ul.cjs} +1 -1
  53. package/dist/{index-SGvs3h4A.js → index-llBnmaQK.js} +1 -1
  54. package/dist/{index-DLnb0ZNj.js → index-oJ-Mr4ev.js} +2 -2
  55. package/dist/{index-QR3l4OPP.js → index-qw8yMlIi.js} +2 -2
  56. package/dist/{index-Cz5U7Uzq.cjs → index-r6zzzKaL.cjs} +1 -1
  57. package/dist/{index-BhWJA_dI.js → index-wflbf1ZT.js} +3930 -3864
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BTrmx-PC.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DFdOquZV.cjs} +61 -61
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BwC3ERgZ.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Ds0kFEYt.js} +1842 -1847
  60. package/dist/{main-Bu-O08vQ.js → main-CwmmmDaX.js} +4 -4
  61. package/dist/{main-DvfGrAf_.cjs → main-D2rxq0Ih.cjs} +1 -1
  62. package/dist/{menuIndex-eRkWyS7P.js → menuIndex-DC3FlB82.js} +1 -1
  63. package/dist/ss-component.cjs +1 -1
  64. package/dist/ss-component.css +1 -1
  65. package/dist/ss-component.js +11 -11
  66. package/dist/ss-component2.cjs +1 -1
  67. package/dist/ss-component2.js +12 -12
  68. package/dist/{threeModel-2YOXSdLB.js → threeModel-BLHSvchi.js} +4 -4
  69. package/dist/{threeModel-BSgxEX3n.cjs → threeModel-ByNKj--n.cjs} +1 -1
  70. package/dist/{threePreview-CP3tcYAR.js → threePreview-DpiQX9ju.js} +4 -4
  71. package/dist/{threePreview-xhUkoXh6.cjs → threePreview-dtaXzjbO.cjs} +1 -1
  72. package/dist/{threeSceneView-DgoFm4DY.js → threeSceneView-BBaDsVGP.js} +12 -12
  73. package/dist/{threeSceneView-BhgJudfb.cjs → threeSceneView-BKBBYjDi.cjs} +1 -1
  74. package/dist/{threeSceneViewForCPMPIP-BnaXAowO.cjs → threeSceneViewForCPMPIP-DpUJIRom.cjs} +1 -1
  75. package/dist/{threeSceneViewForCPMPIP-CXHwBGw9.js → threeSceneViewForCPMPIP-yggkD4cL.js} +8 -8
  76. package/dist/{threeTrackPathView-CQaLFS7p.cjs → threeTrackPathView-BV0cv7WJ.cjs} +1 -1
  77. package/dist/{threeTrackPathView-DY3M_Buc.js → threeTrackPathView-mPB-okP7.js} +4 -4
  78. package/dist/{threeViewerHost-DEBZc9iA.js → threeViewerHost-BMA3etU6.js} +3 -3
  79. package/dist/{threeViewerHost-B8oZFaZa.cjs → threeViewerHost-JJLjuhNP.cjs} +1 -1
  80. package/dist/{urdfTree-5F2tOi3x.cjs → urdfTree-KlxvBQMs.cjs} +1 -1
  81. package/dist/{urdfTree-CckwVSYW.js → urdfTree-wRqFFqa9.js} +1 -1
  82. package/dist/{workpieceTreePanel-Cv5nNG_k.cjs → workpieceTreePanel-BUEpyjQH.cjs} +1 -1
  83. package/dist/{workpieceTreePanel-BweOcV6q.js → workpieceTreePanel-C6doIKHS.js} +4 -4
  84. package/package.json +1 -1
  85. package/dist/index-BpSJ4bpK.js +0 -8480
  86. package/dist/index-CQ7VqTEa.js +0 -89
  87. package/dist/index-DbliwBS9.cjs +0 -1
  88. package/dist/obj/model.mtl +0 -42
  89. package/dist/obj/model.obj +0 -26110
  90. package/public/obj/model.mtl +0 -42
  91. package/public/obj/model.obj +0 -26110
@@ -1,4 +1,4 @@
1
- "use strict";var mu=Object.defineProperty;var yu=(l,r,n)=>r in l?mu(l,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[r]=n;var Rr=(l,r,n)=>yu(l,typeof r!="symbol"?r+"":r,n);const a=require("vue"),el=require("./request-BC2w2vGr.cjs"),I=require("./index-3XgooQs8.cjs"),pl=require("./index-kmcOGXlU.cjs"),Ul=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),La=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BTrmx-PC.cjs"),vr=require("./index-CUw6nGTo.cjs"),go=require("./threeViewerHost-B8oZFaZa.cjs"),sa=require("./index-CUQMKXQP.cjs"),yr=require("./index-CW4qJdP8.cjs"),Gi=require("./index-DR_WyjvT.cjs");require("./index-yCcLiwx1.cjs");const js=require("./index-CisojooA.cjs");;/* empty css */const bo=require("./isString-DNBlKLZH.cjs"),Ji=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Hs=require("./index-BVaHwt5f.cjs"),gu=require("./index-FyAkELn9.cjs"),An=require("./MTLLoader-DXYhvEjE.cjs"),bu=require("./URDFLoader-BWQ_OscV.cjs");var ku="[object Boolean]";function Us(l){return l===!0||l===!1||el.isObjectLike(l)&&el.baseGetTag(l)==ku}function xu(l){return l===void 0}const _u=l=>l.match(/\((.*)\)/)[1],wu={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(l){const r=l,n=a.ref(null),t=a.ref(!1),s=a.ref(null);return a.watch(()=>r==null?void 0:r.isVisible,()=>{t.value=r==null?void 0:r.isVisible},{deep:!0,immediate:!0}),a.watch(()=>s.value,()=>{a.nextTick(()=>{var c,g;(g=(c=n.value)==null?void 0:c.updatePopper)==null||g.call(c)})},{deep:!0,immediate:!0}),(c,g)=>{const h=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(h,{visible:t.value,"onUpdate:visible":g[0]||(g[0]=v=>t.value=v),trigger:r.trigger,title:r==null?void 0:r.title,placement:r==null?void 0:r.placement,width:r==null?void 0:r.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"reference",{ref_key:"referenceRef",ref:s})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Cu={__name:"index",props:{value:{type:[String,Number],default:""}},setup(l){const r=l,n=a.computed(()=>{const t=String(r.value??"");return t==="已完成"?"task-status-completed":t==="进行中"?"task-status-running":t==="终止"||t==="暂停"?"task-status-stopped":""});return(t,s)=>l.value!==void 0&&l.value!==null?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["task-status-tag",n.value])},a.toDisplayString(l.value===0?"0":l.value),3)):a.createCommentVNode("",!0)}},Su=Ul._export_sfc(Cu,[["__scopeId","data-v-d81f59b4"]]);function Eu(l,r,n,t={}){if(!l||!r||!n||n.length!==4)return;const s=l.getContext("2d");if(!s)return;const{color:c="rgba(255, 235, 59, 0.3)",strokeWidth:g=2,fillOpacity:h=.2}=t,v=l.getBoundingClientRect(),m=r.getBoundingClientRect(),u=r.naturalWidth,_=r.naturalHeight,S=m.width/u,z=m.height/_,w=Math.min(S,z),j=u*w,A=_*w,N=(v.width-j)/2,Y=(v.height-A)/2,b=n.map(([T,x])=>{const k=N+T*j,$=Y+x*A;return{x:k,y:$}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(b[0].x,b[0].y);for(let T=1;T<b.length;T++)s.lineTo(b[T].x,b[T].y);s.closePath();const L=c.replace(/[\d.]+\)$/,`${h})`);s.fillStyle=L,s.fill(),s.strokeStyle=c.replace(/[\d.]+\)$/,"1)"),s.lineWidth=g,s.stroke()}function mt(l){if(!l)return;const r=l.getContext("2d");r&&r.clearRect(0,0,l.width,l.height)}function Xi(l,r){if(!l||!r)return null;const n=l[r];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const Du={key:0,class:"ocr-img-preview-root"},Bu={class:"ocr-img-preview-window"},Nu={key:0,class:"img-preview-body"},Tu={class:"img-preview-header"},Au={class:"img-header-left"},zu={class:"img-name"},Mu={key:0,class:"img-header-right"},Ou={class:"img-index"},Iu={key:0,class:"img-thumb-list"},Lu=["onClick"],Vu={key:1,class:"thumb-placeholder"},Ru={class:"thumb-name"},$u={class:"img-preview-container"},Pu={key:0,class:"img-placeholder"},Fu={key:2,class:"img-placeholder"},ju={key:0},Hu={key:1},Uu={key:1,class:"img-placeholder"},qu=a.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(l,{emit:r}){const n=l,t=r,s=a.computed({get:()=>n.visible,set:D=>t("update:visible",D)});let c=!1,g="",h=0,v=0,m=0,u=0,_=0,S=0,z=null;const w=D=>{var ye,ue;const le=(ue=(ye=D==null?void 0:D.target)==null?void 0:ye.closest)==null?void 0:ue.call(ye,".ocr-img-preview-window");return le||document.querySelector(".ocr-img-preview-window")},j=D=>{if(!D||D==="none")return{tx:0,ty:0};let le=D.match(/matrix\(([^)]+)\)/);if(le){const ye=le[1].split(",").map(ue=>Number(ue.trim()));return{tx:(ye==null?void 0:ye[4])||0,ty:(ye==null?void 0:ye[5])||0}}if(le=D.match(/matrix3d\(([^)]+)\)/),le){const ye=le[1].split(",").map(ue=>Number(ue.trim()));return{tx:(ye==null?void 0:ye[12])||0,ty:(ye==null?void 0:ye[13])||0}}return le=D.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),le?{tx:Number(le[1])||0,ty:Number(le[2])||0}:{tx:0,ty:0}},A=(D,le,ye)=>{D.style.transform=`translate(${le}px, ${ye}px)`},N=D=>{const le=w(D);if(!le)return;c=!0,z=le,g="move",h=D.clientX,v=D.clientY;const ye=window.getComputedStyle(le),{tx:ue,ty:Ne}=j(ye.transform);_=ue,S=Ne,document.addEventListener("mousemove",b),document.addEventListener("mouseup",L)},Y=(D,le)=>{const ye=w(D);if(!ye)return;c=!0,z=ye,g=le,h=D.clientX,v=D.clientY;const ue=ye.getBoundingClientRect();m=ue.width,u=ue.height;const Ne=window.getComputedStyle(ye),{tx:pa,ty:wa}=j(Ne.transform);_=pa,S=wa,document.addEventListener("mousemove",b),document.addEventListener("mouseup",L)},b=D=>{if(!c||!z)return;const le=D.clientX-h,ye=D.clientY-v,ue=360,Ne=420;let pa=m,wa=u,ja=_,ee=S;if(g==="move"){ja=_+le,ee=S+ye,A(z,ja,ee);return}if(g.includes("right")&&(pa=Math.max(ue,m+le)),g.includes("bottom")&&(wa=Math.max(Ne,u+ye)),g.includes("left")){const ea=m-le;ea<ue?(pa=ue,ja=_+(m-ue)):(pa=ea,ja=_+le)}if(g.includes("top")){const ea=u-ye;ea<Ne?(wa=Ne,ee=S+(u-Ne)):(wa=ea,ee=S+ye)}z.style.width=`${pa}px`,z.style.height=`${wa}px`,A(z,ja,ee)},L=()=>{c=!1,g="",z=null,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",L)},T=a.ref([]),x=a.ref(!1);a.watch(()=>n.images,async D=>{if(!Array.isArray(D)||D.length===0){T.value=[];return}x.value=!0;const le=[];for(const ye of D)if(ye.url&&!ye.url.startsWith("blob:")&&!ye.url.startsWith("http"))try{const ue=await La.downloadFile(ye.url),Ne=URL.createObjectURL(ue);le.push({...ye,blobUrl:Ne})}catch(ue){console.error(`Failed to load image for preview: ${ye.url}`,ue),le.push({...ye,blobUrl:""})}else le.push({...ye,blobUrl:ye.url});T.value=le,x.value=!1},{deep:!0,immediate:!0});const k=a.ref(0),$=a.ref(null),U=a.ref(null),X=a.computed(()=>T.value[k.value]||null),be=()=>{if(!T.value.length){k.value=0;return}if(n.defaultImageName){const D=T.value.findIndex(le=>(le==null?void 0:le.name)===n.defaultImageName);k.value=D>=0?D:0}else k.value=0},ze=D=>{if(!T.value.length)return;const le=Math.max(0,Math.min(D,T.value.length-1));k.value=le},Ee=()=>ze(k.value-1),ne=()=>ze(k.value+1),ke=D=>{if(!D)return;const le=T.value.findIndex(ye=>(ye==null?void 0:ye.name)===D);le>=0&&(k.value=le)},Z=()=>{if(!U.value)return;const D=U.value.parentElement;if(!D)return;const le=D.getBoundingClientRect();U.value.width=le.width,U.value.height=le.height},de=()=>{var ue,Ne;if(!U.value||!$.value||!n.focusedFieldName){U.value&&mt(U.value);return}const D=(ue=$.value.$el)==null?void 0:ue.querySelector("img");if(!D)return;if(!D.complete||D.naturalWidth===0){D.onload=()=>{a.nextTick(()=>{de()})};return}const le=((Ne=X.value)==null?void 0:Ne.name)||"",ye=Xi(n.fieldMeta,n.focusedFieldName);if(!ye){mt(U.value);return}if(ye.imageName!==le){mt(U.value);return}Z(),Eu(U.value,D,ye.bboxNorm)},Ke=()=>{a.nextTick(()=>{Z(),de()})};a.watch(()=>n.focusedFieldName,()=>{if(!s.value)return;const D=Xi(n.fieldMeta,n.focusedFieldName);D!=null&&D.imageName&&ke(D.imageName),a.nextTick(()=>{de()})}),a.watch(()=>{var D;return(D=X.value)==null?void 0:D.name},()=>{s.value&&a.nextTick(()=>{U.value&&mt(U.value),de()})}),a.watch(()=>n.visible,D=>{D?(be(),a.nextTick(()=>{Z(),de()})):U.value&&mt(U.value)}),a.watch(()=>n.defaultImageName,()=>{s.value&&be()});let Na=null;a.onMounted(()=>{var D;typeof ResizeObserver<"u"&&(Na=new ResizeObserver(()=>{Z(),a.nextTick(()=>{de()})}),(D=U.value)!=null&&D.parentElement&&Na.observe(U.value.parentElement))}),a.onUnmounted(()=>{Na&&(Na.disconnect(),Na=null),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",L)});const te=()=>{U.value&&mt(U.value),t("update:visible",!1),t("close")};return(D,le)=>{var wa,ja;const ye=a.resolveComponent("el-button"),ue=a.resolveComponent("el-image"),Ne=a.resolveComponent("Loading"),pa=a.resolveComponent("el-icon");return s.value?(a.openBlock(),a.createElementBlock("div",Du,[le[12]||(le[12]=a.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),a.createElementVNode("div",Bu,[a.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:a.withModifiers(N,["stop"])},[le[8]||(le[8]=a.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),a.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:te},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:le[0]||(le[0]=a.withModifiers(ee=>Y(ee,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:le[1]||(le[1]=a.withModifiers(ee=>Y(ee,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:le[2]||(le[2]=a.withModifiers(ee=>Y(ee,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:le[3]||(le[3]=a.withModifiers(ee=>Y(ee,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:le[4]||(le[4]=a.withModifiers(ee=>Y(ee,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:le[5]||(le[5]=a.withModifiers(ee=>Y(ee,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:le[6]||(le[6]=a.withModifiers(ee=>Y(ee,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:le[7]||(le[7]=a.withModifiers(ee=>Y(ee,"bottom-right"),["stop"]))},null,32),X.value?(a.openBlock(),a.createElementBlock("div",Nu,[a.createElementVNode("div",Tu,[a.createElementVNode("div",Au,[a.createElementVNode("span",zu,a.toDisplayString(X.value.name?X.value.name+(X.value.url&&X.value.url.lastIndexOf(".")!==-1?X.value.url.substring(X.value.url.lastIndexOf(".")):""):""),1)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",Mu,[a.createVNode(ye,{size:"small",disabled:k.value===0,onClick:Ee},{default:a.withCtx(()=>le[9]||(le[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Ou,a.toDisplayString(k.value+1)+" / "+a.toDisplayString(T.value.length),1),a.createVNode(ye,{size:"small",disabled:k.value===T.value.length-1,onClick:ne},{default:a.withCtx(()=>le[10]||(le[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",Iu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.value,(ee,ea)=>(a.openBlock(),a.createElementBlock("div",{key:(ee.name||"")+"-"+ea,class:a.normalizeClass(["img-thumb-item",{active:ea===k.value}]),onClick:Pe=>ze(ea)},[ee!=null&&ee.blobUrl?(a.openBlock(),a.createBlock(ue,{key:0,src:ee.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ee.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",Vu,"加载失败")),a.createElementVNode("div",Ru,a.toDisplayString(ee.name||"-"),1)],10,Lu))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",$u,[x.value?(a.openBlock(),a.createElementBlock("div",Pu,[a.createVNode(pa,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(Ne)]),_:1}),le[11]||(le[11]=a.createElementVNode("span",null,"图片加载中...",-1))])):(wa=X.value)!=null&&wa.blobUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(ue,{ref_key:"imageRef",ref:$,src:X.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[X.value.blobUrl],onLoad:Ke},null,8,["src","preview-src-list"]),a.createElementVNode("canvas",{ref_key:"canvasRef",ref:U,class:"highlight-canvas"},null,512)],64)):(a.openBlock(),a.createElementBlock("div",Fu,[(ja=X.value)!=null&&ja.url?(a.openBlock(),a.createElementBlock("span",ju,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",Hu,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",Uu,"暂无图片"))])])):a.createCommentVNode("",!0)}}}),Wu=Ul._export_sfc(qu,[["__scopeId","data-v-48a4ecb1"]]),Ku={class:"cert-preview-body"},Yu={key:0,class:"pdf-preview-container"},Gu={class:"thumbs"},Ju=["onClick"],Xu={class:"thumb-img"},Zu=["src"],Qu={key:1,class:"thumb-loading"},ed={class:"thumb-title"},ad={class:"viewer"},ld={key:0,class:"viewer-img-wrap"},rd=["src"],nd={key:1,class:"viewer-loading"},td=a.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(""),c=a.ref(""),g=a.computed(()=>(n.versions||[]).find(w=>String(w.versionId)===String(s.value))),h=a.ref({}),v=a.ref(""),m=a.ref("证书附件.pdf"),u=()=>{try{Object.values(h.value||{}).forEach(w=>{w&&URL.revokeObjectURL(w)}),v.value&&URL.revokeObjectURL(v.value)}catch{}h.value={},v.value=""},_=async w=>{if(!w||w.fileType==="pdf")return;const j=Array.isArray(w.images)?w.images:[];for(const A of j){const N=A==null?void 0:A.url;if(!(!N||h.value[N]))try{const Y=await I.platformDownloadFile({url:N}),b=URL.createObjectURL(Y.data);h.value={...h.value,[N]:b}}catch{}}},S=async w=>{var A;if(!w||w.fileType!=="pdf"){v.value="";return}const j=w.sourceUrl||"";if(!j){v.value="";return}if(v.value){try{URL.revokeObjectURL(v.value)}catch{}v.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:j,versionId:w==null?void 0:w.versionId,certNo:w==null?void 0:w.certNo});const N=await I.platformDownloadFile({url:j});console.log("[CertificatePreview] PDF响应:",{url:j,status:N==null?void 0:N.status,size:(A=N==null?void 0:N.data)==null?void 0:A.size});const Y=URL.createObjectURL(N.data);v.value=Y;const b=w.certNo?String(w.certNo):"";m.value=b?`${b}.pdf`:"证书附件.pdf"}catch(N){console.error("[CertificatePreview] PDF加载失败:",{url:j,error:N}),v.value=""}};a.watch(()=>n.visible,async w=>{var A;if(!w){u();return}const j=(A=n.versions)==null?void 0:A[0];s.value=(j==null?void 0:j.versionId)||"",await _(j),await S(j)},{immediate:!0}),a.watch(()=>s.value,async()=>{var j,A;const w=g.value;if(!w){c.value="",v.value="";return}if(w.fileType==="pdf"){c.value="",await S(w);return}v.value="",c.value=((A=(j=w.images)==null?void 0:j[0])==null?void 0:A.url)||"",await _(w)},{immediate:!0});const z=()=>{t("update:visible",!1),u()};return a.onBeforeUnmount(()=>{u()}),(w,j)=>{const A=a.resolveComponent("el-empty"),N=a.resolveComponent("el-tab-pane"),Y=a.resolveComponent("el-tabs"),b=a.resolveComponent("el-button"),L=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(L,{"model-value":w.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:z},{footer:a.withCtx(()=>[a.createVNode(b,{id:"themeBorderButton",onClick:z},{default:a.withCtx(()=>j[1]||(j[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[w.versions&&w.versions.length>0?(a.openBlock(),a.createBlock(Y,{key:0,modelValue:s.value,"onUpdate:modelValue":j[0]||(j[0]=T=>s.value=T),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(w.versions,T=>(a.openBlock(),a.createBlock(N,{key:T.versionId,name:T.versionId,label:T.label},{default:a.withCtx(()=>[a.createElementVNode("div",Ku,[T.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",Yu,[v.value?(a.openBlock(),a.createBlock(pl.SsFilePreview,{key:1,fileName:m.value,blobUrl:v.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(A,{key:0,description:"加载中"}))])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",Gu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.images||[],x=>(a.openBlock(),a.createElementBlock("div",{key:x.url,class:a.normalizeClass(["thumb",{active:x.url===c.value}]),onClick:k=>c.value=x.url},[a.createElementVNode("div",Xu,[h.value[x.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:h.value[x.url]},null,8,Zu)):(a.openBlock(),a.createElementBlock("div",Qu,"加载中"))]),a.createElementVNode("div",ed,a.toDisplayString(x.name),1)],10,Ju))),128))]),a.createElementVNode("div",ad,[c.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[h.value[c.value]?(a.openBlock(),a.createElementBlock("div",ld,[a.createElementVNode("img",{class:"viewer-img",src:h.value[c.value]},null,8,rd)])):(a.openBlock(),a.createElementBlock("div",nd,"加载中"))],64)):(a.openBlock(),a.createBlock(A,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(A,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),od=Ul._export_sfc(td,[["__scopeId","data-v-220703c0"]]),id={class:"ocr-candidate-wrap"},sd={class:"ocr-candidate-left"},cd={key:1},ud={key:0},dd={key:1},pd={key:2},fd={key:3},hd={key:0,class:"ocr-candidate-right"},vd={class:"ocr-candidate-actions"},md={key:1},yd={class:"dialog-footer"},gd={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(l,{emit:r}){const n=(k=[])=>{const $=[],U=X=>{(X||[]).forEach(be=>{if(!be)return;const ze=be.children||be.childrens||be.columns;Array.isArray(ze)&&ze.length>0?U(ze):$.push(be)})};return U(k),$},t=l,s=r,c=a.computed(()=>{var k;return((k=S.value)==null?void 0:k.allowAdd)!==!1}),g=a.computed(()=>{var k;return((k=S.value)==null?void 0:k.allowReplace)!==!1}),h=k=>{if(!k)return[];if(Array.isArray(k))return k;if(typeof k=="string")try{const $=JSON.parse(k);return Array.isArray($)?$:[]}catch{return[]}return[]},v=k=>{s("preview-file",k)},m=a.ref([]),u=a.ref(0),_=a.ref("");a.watch(()=>t.candidates,k=>{var $,U;m.value=(k||[]).map(X=>({...X,...(X==null?void 0:X.ocrRow)||{},selectedTargetId:(X==null?void 0:X.selectedTargetId)||"",__decision:X==null?void 0:X.__decision})),u.value=0,_.value=((U=($=m.value)==null?void 0:$[0])==null?void 0:U.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>t.visible,k=>{var $,U;k&&(u.value=0,_.value=((U=($=m.value)==null?void 0:$[0])==null?void 0:U.selectedTargetId)||"")});const S=a.computed(()=>{var $;const k=Number(u.value||0);return(($=m.value||[])==null?void 0:$[k])||null}),z=a.computed(()=>(n(t.columns||[])||[]).filter(U=>U&&U.prop).filter(U=>U.type!=="operate"&&U.label!=="操作"&&U.prop!=="operate")),w=a.computed(()=>z.value.filter(k=>k.label!=="证书附件"&&k.prop!=="证书附件")),j=k=>{if(!k)return;const $=(m.value||[]).findIndex(U=>(U==null?void 0:U.idx)===(k==null?void 0:k.idx));$>-1&&(u.value=$,_.value=(k==null?void 0:k.selectedTargetId)||"")},A=k=>{if(!k){_.value="";return}_.value=String((k==null?void 0:k.id)??"")},N=(k,$="")=>{const U=Number(u.value||0),X=m.value||[],be=X[U];be&&(be.__decision=k,be.selectedTargetId=$,_.value=$,m.value=[...X])},Y=()=>N("skip",""),b=()=>N("add",""),L=()=>{if(!_.value){el.ElMessage.warning("请先选择要替换的目标记录");return}N("replace",_.value)},T=()=>{s("update:visible",!1)},x=()=>{const k=m.value||[];if(k.find(U=>(U==null?void 0:U.__decision)==="replace"&&!(U!=null&&U.selectedTargetId))){el.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",k),s("update:visible",!1)};return(k,$)=>{const U=a.resolveComponent("el-table-column"),X=a.resolveComponent("svg-icon"),be=a.resolveComponent("el-table"),ze=a.resolveComponent("el-button"),Ee=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(vr.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:T},{default:a.withCtx(()=>{var ne,ke;return[a.createElementVNode("div",id,[a.createElementVNode("div",sd,[$[0]||($[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(be,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:j},{default:a.withCtx(()=>[a.createVNode(U,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(w.value,Z=>(a.openBlock(),a.createBlock(U,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:a.withCtx(({row:de})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Z.prop]).length>0?(a.openBlock(),a.createBlock(X,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",cd,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),a.createVNode(U,{label:"候选数",width:"90",fixed:"right"},{default:a.withCtx(({row:Z})=>[a.createTextVNode(a.toDisplayString(((Z==null?void 0:Z.candidates)||[]).length),1)]),_:1}),a.createVNode(U,{label:"处理状态",width:"120",fixed:"right"},{default:a.withCtx(({row:Z})=>[(Z==null?void 0:Z.__decision)==="replace"?(a.openBlock(),a.createElementBlock("span",ud,"替换")):(Z==null?void 0:Z.__decision)==="add"?(a.openBlock(),a.createElementBlock("span",dd,"新增")):(Z==null?void 0:Z.__decision)==="skip"?(a.openBlock(),a.createElementBlock("span",pd,"跳过")):(a.openBlock(),a.createElementBlock("span",fd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(a.openBlock(),a.createElementBlock("div",hd,[$[4]||($[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",vd,[a.createVNode(ze,{id:"themeBorderButton",onClick:Y},{default:a.withCtx(()=>$[1]||($[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(ze,{id:"themeBorderButton",onClick:b,disabled:!c.value},{default:a.withCtx(()=>$[2]||($[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:L,disabled:!g.value||!_.value},{default:a.withCtx(()=>$[3]||($[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((ne=S.value)==null?void 0:ne.candidates)||[]).length===0?(a.openBlock(),a.createBlock(Ee,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(be,{data:((ke=S.value)==null?void 0:ke.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:A,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode(U,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(z.value,Z=>(a.openBlock(),a.createBlock(U,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:a.withCtx(({row:de})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Z.prop]).length>0?(a.openBlock(),a.createBlock(X,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",md,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):a.createCommentVNode("",!0)])]}),footer:a.withCtx(()=>[a.createElementVNode("div",yd,[a.createVNode(ze,{id:"themeBorderButton",onClick:T},{default:a.withCtx(()=>$[5]||($[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:x},{default:a.withCtx(()=>$[6]||($[6]=[a.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},bd=Ul._export_sfc(gd,[["__scopeId","data-v-89e0489c"]]),kd={class:"ocr-preview-content"},xd={class:"ocr-preview-tip"},_d={class:"ocr-preview-table"},wd={style:{display:"flex","align-items":"center",gap:"8px"}},Cd={class:"dialog-footer"},Sd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]),c=a.ref([]),g=a.ref([]);a.watch(()=>n.visible,z=>{z&&(s.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),c.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),g.value=[...n.ocrSelectedFields])});const h=(z,w)=>{const j=[...g.value];if(w)j.includes(z)||j.push(z);else{const A=j.indexOf(z);A>-1&&j.splice(A,1)}g.value=j,t("update:ocrSelectedFields",j)},v=(z,w,j)=>{t("fieldChange",{rowIndex:z,prop:w,value:j})},m=()=>{t("update:ocrPreviewData",s.value),t("confirm",s.value),t("update:visible",!1)},u=()=>{t("update:visible",!1)},_=z=>typeof z!="number"?"-":`${(z*100).toFixed(1)}%`,S=z=>typeof z!="number"?"#606266":z>=.9?"#67c23a":z>=.7?"#e6a23c":"#f56c6c";return(z,w)=>{const j=a.resolveComponent("el-alert"),A=a.resolveComponent("el-table-column"),N=a.resolveComponent("el-checkbox"),Y=a.resolveComponent("el-input"),b=a.resolveComponent("el-table"),L=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(vr.ssDialog,{title:"OCR识别结果预览",visible:l.visible,onBeforeDestroy:u,width:"90%",style:{maxWidth:"1200px"}},{default:a.withCtx(()=>[a.createElementVNode("div",kd,[a.createElementVNode("div",xd,[a.createVNode(j,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",_d,[a.createVNode(b,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(A,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,T=>(a.openBlock(),a.createBlock(A,{key:T.prop,prop:T.prop,"min-width":T.minWidth||230,"class-name":T.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",wd,[T.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(N,{key:0,"model-value":g.value.includes(T.prop),onChange:x=>h(T.prop,x),onClick:w[0]||(w[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(T.label),1)])]),default:a.withCtx(({row:x,$index:k})=>[T.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:S(x[T.prop]),fontWeight:500})},a.toDisplayString(_(x[T.prop])),5)):(a.openBlock(),a.createBlock(Y,{key:1,modelValue:x[T.prop],"onUpdate:modelValue":$=>x[T.prop]=$,size:"small",placeholder:"请输入"+T.label,onChange:$=>v(k,T.prop,$)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Cd,[a.createVNode(L,{onClick:u,id:"themeBorderButton"},{default:a.withCtx(()=>w[1]||(w[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode(L,{class:"ok-button",onClick:m,id:"themeButton"},{default:a.withCtx(()=>w[2]||(w[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Ed=Ul._export_sfc(Sd,[["__scopeId","data-v-df66eb1f"]]),kt=l=>{var t;let r=l;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let n=(t=La.analyzeSplitToContent(r,","))==null?void 0:t.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),ci(s)));return n=n==null?void 0:n.join(","),n};let Oa="$R",ko="[Any]";const Dd=l=>{var g,h;let r={},n=l==null?void 0:l[0],t=(h=(g=n==null?void 0:n.replace("{",Oa))==null?void 0:g.split(Oa))==null?void 0:h[0];(t==null?void 0:t[0])==="*"&&(t=t==null?void 0:t.slice(1,t==null?void 0:t.length)),t=t==null?void 0:t.split(":"),r.group=t;let s=l==null?void 0:l[1],c=s==null?void 0:s.replaceAll(ko,"");return(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),r.filter=c,r},Bd=l=>{var u,_,S,z,w,j,A;let r=[],n=[],t=l==null?void 0:l.map(N=>{var b;let Y=(b=La.analyzeSplitToContent(N,"@"))==null?void 0:b[0];return(Y==null?void 0:Y[(Y==null?void 0:Y.length)-1])==="@"&&(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1)),Y}),s="",c=La.analyzeSplitToContent(t==null?void 0:t[0],":");n=(u=c==null?void 0:c.filter(N=>!(N!=null&&N.includes("{"))&&!(N!=null&&N.includes("["))))==null?void 0:u.join(""),(n==null?void 0:n[(n==null?void 0:n.length)-1])===":"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),n=n==null?void 0:n.split(":");let g=c==null?void 0:c.filter(N=>(N==null?void 0:N.includes("{"))||(N==null?void 0:N.includes("["))),h=(S=g==null?void 0:g[0])==null?void 0:S.slice(1,((_=g==null?void 0:g[0])==null?void 0:_.length)-1);h=(z=La.analyzeSplitToContent(h,","))==null?void 0:z.map(N=>((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),N));let v="@"+((w=La.analyzeSplitToContent(l==null?void 0:l[0],"@"))==null?void 0:w[1]);((j=La.analyzeSplitToContent(v,":"))==null?void 0:j.length)>1&&(r=wt((A=La.analyzeSplitToContent(v,":"))==null?void 0:A[1]),r=[r]);let m=[];return h==null||h.forEach((N,Y)=>{var ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K;let b=(ze=N==null?void 0:N.split("=="))==null?void 0:ze[0],L=(Ee=N==null?void 0:N.split("=="))==null?void 0:Ee[1],T=[],x=[],k=[],$=[],U="Input",X=[],be=[];if((N==null?void 0:N[0])!=="{"){if((L==null?void 0:L[0])==="$")L=L==null?void 0:L.slice(1,L==null?void 0:L.length),T=(ke=(ne=L==null?void 0:L.split("*"))==null?void 0:ne[0])==null?void 0:ke.split(":"),x=(D=(te=(Na=(Ke=(de=(Z=L==null?void 0:L.split("*"))==null?void 0:Z[1])==null?void 0:de.replace("{",Oa))==null?void 0:Ke.split(Oa))==null?void 0:Na[0])==null?void 0:te.split(":"))==null?void 0:D.filter(je=>je!==""),k=(ye=(le=L==null?void 0:L.replace("{",Oa))==null?void 0:le.split(Oa))==null?void 0:ye[1],k=k==null?void 0:k.replaceAll("}",""),k=k==null?void 0:k.split(":"),U="Select";else if(((ue=La.analyzeSplitToContent(N,"="))==null?void 0:ue.length)>1){let je=(Ne=b==null?void 0:b.split("="))==null?void 0:Ne[1];if(b=(pa=b==null?void 0:b.split("="))==null?void 0:pa[0],U="Select",!(N!=null&&N.includes("||")))je=(wa=je==null?void 0:je.split("/"))==null?void 0:wa.map(De=>((De==null?void 0:De[(De==null?void 0:De.length)-1])==="/"&&(De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1)),De)),$=je==null?void 0:je.map(De=>({label:De==null?void 0:De.replaceAll("'",""),value:De==null?void 0:De.replaceAll("'","")}));else{let De=[];(Pe=(ea=(ee=(ja=N==null?void 0:N.replace("=",Oa))==null?void 0:ja.split(Oa))==null?void 0:ee[1])==null?void 0:ea.split("||"))==null||Pe.forEach(Ma=>{var Ba,Ua,Aa;X.push((Ua=(Ba=Ma==null?void 0:Ma.split("@Filter"))==null?void 0:Ba[0])==null?void 0:Ua.split("/")),De.push((Aa=Ma==null?void 0:Ma.split("@Filter"))==null?void 0:Aa[1])}),be=De==null?void 0:De.map(Ma=>(Ma=Ma==null?void 0:Ma.slice(1,(Ma==null?void 0:Ma.length)-1),Ma))}}else if(N!=null&&N.includes("@")&&!(N!=null&&N.includes("||"))){b=(Ye=(Re=(Te=(He=(xa=b==null?void 0:b.replace("(@",Oa))==null?void 0:xa.split(Oa))==null?void 0:He[0])==null?void 0:Te.replace("@",Oa))==null?void 0:Re.split(Oa))==null?void 0:Ye[0];let je=N!=null&&N.includes("(@")?"(@"+((Va=(qa=N==null?void 0:N.replace("(@",Oa))==null?void 0:qa.split(Oa))==null?void 0:Va[1]):"@"+((F=(P=N==null?void 0:N.replace("@",Oa))==null?void 0:P.split(Oa))==null?void 0:F[1]);if(je=(J=kt(je))==null?void 0:J.split(","),je!=null&&je.find(De=>De==null?void 0:De.includes("@Type"))){let De=(ie=je==null?void 0:je.find(Ma=>Ma==null?void 0:Ma.includes("@Type")))==null?void 0:ie.split("=");De!=null&&De.includes("File")&&(U="Upload"),De!=null&&De.includes("Date")&&(U="Date"),De!=null&&De.includes("DateTime")&&(U="DateTime"),De!=null&&De.includes("Time")&&(U="Time")}}m.push({prop:b,label:b,value:"",menuPath:T,groups:x,columns:k,width:h==null?void 0:h.length,options:$,type:U,allContents:X,filterContents:be})}else{s=s+"@"+((ce=La.analyzeSplitToContent(N,"@"))==null?void 0:ce[1]);let je=(ma=La.analyzeSplitToContent(N,"@"))==null?void 0:ma[0];(je==null?void 0:je[(je==null?void 0:je.length)-1])==="@"&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1));let De=(na=je==null?void 0:je.split("=="))==null?void 0:na[0],Ma=(Ie=je==null?void 0:je.split("=="))==null?void 0:Ie[1],Ba=(Ca=(_e=Ma==null?void 0:Ma.split("*"))==null?void 0:_e[0])==null?void 0:Ca.replace(ko,"");(Ba==null?void 0:Ba[0])==="$"&&(Ba=Ba==null?void 0:Ba.slice(1,Ba==null?void 0:Ba.length)),Ba=La.analyzeSplitToContent(Ba,"$"),Ba=(ve=Ba==null?void 0:Ba.map((Ua,Aa)=>{var Ae;return Aa===0&&(Ba==null?void 0:Ba.length)>1&&(Ua=(Ae=Ua==null?void 0:Ua.split(":"))==null?void 0:Ae[0]),(Ba==null?void 0:Ba.length)>1&&Aa===(Ba==null?void 0:Ba.length)-1&&(Ua=Ua+":"),Ua}))==null?void 0:ve.join(":"),T=Ba==null?void 0:Ba.split(":"),x=(va=(Le=(_a=(Fe=(Qe=(Je=Ma==null?void 0:Ma.split("*"))==null?void 0:Je[1])==null?void 0:Qe.replace("{",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[0])==null?void 0:Le.split(":"))==null?void 0:va.filter(Ua=>Ua!==""),k=(Se=(re=Ma==null?void 0:Ma.replace("{",Oa))==null?void 0:re.split(Oa))==null?void 0:Se[1],k=k==null?void 0:k.replaceAll("}",""),De=De==null?void 0:De.slice(1,(De==null?void 0:De.length)-1),k=k==null?void 0:k.split(","),U="Select",(K=De==null?void 0:De.split(","))==null||K.forEach((Ua,Aa)=>{var Ae,we;m.push({prop:Ua,label:Ua,value:"",menuPath:T,groups:x,columns:(Ae=k==null?void 0:k[Aa])==null?void 0:Ae.split(":"),width:(we=De==null?void 0:De.split(","))==null?void 0:we.length,type:U})})}}),{groupName:n,formContents:m,contents:r,filter:s}},wt=l=>{var t,s;let r=[],n=l.slice(1,(l==null?void 0:l.length)-1);if((n==null?void 0:n[0])!=="[")(t=La.analyzeSplitToContent(n,","))==null||t.forEach(c=>{(c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c.slice(0,(c==null?void 0:c.length)-1)),r.push(c??"")});else{let c=[];(s=La.analyzeSplitToContent(n,","))==null||s.forEach(g=>{(g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),c.push(wt(g))}),r=c}return r},si=(l,r)=>{var A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa;let n,t=[],s=[],c=[],g=[],h=[],v=[],m=[],u="Input",_,S="",z="",w=[],j="";if(l!=null&&l.includes("@Pam")||l!=null&&l.includes("==")||l!=null&&l.includes("="))if(l!=null&&l.includes("@Pam")){let Ae=La.analyzeSplitToContent(l,"=");if((Ae==null?void 0:Ae.length)>1){l=Ae==null?void 0:Ae[0],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1);let Ge=Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1];(Ge==null?void 0:Ge[0])==="&"&&(Ge=Ge==null?void 0:Ge.slice(1,Ge==null?void 0:Ge.length)),z=(N=(A=Ge==null?void 0:Ge.replace("(",Oa))==null?void 0:A.split(Oa))==null?void 0:N[0];let ol=(b=(Y=Ge==null?void 0:Ge.replace(")",Oa))==null?void 0:Y.split(Oa))==null?void 0:b[0];ol=(T=(L=ol==null?void 0:ol.replace("(",Oa))==null?void 0:L.split(Oa))==null?void 0:T[1],(ol==null?void 0:ol[0])==="{"&&(ol=ol==null?void 0:ol.slice(1,ol==null?void 0:ol.length)),(ol==null?void 0:ol[(ol==null?void 0:ol.length)-1])==="}"&&(ol=ol==null?void 0:ol.slice(0,(ol==null?void 0:ol.length)-1)),w=ol==null?void 0:ol.split(",");let Sl=(k=(x=Ge==null?void 0:Ge.replace(")",Oa))==null?void 0:x.split(Oa))==null?void 0:k[1];Sl&&Sl!==""&&(j=kt(Sl))}n=(U=($=l==null?void 0:l.replace("@Pam",Oa))==null?void 0:$.split(Oa))==null?void 0:U[0];let we=(be=(X=l==null?void 0:l.replace("@Pam",Oa))==null?void 0:X.split(Oa))==null?void 0:be[1];we=we==null?void 0:we.slice(1,(we==null?void 0:we.length)-1),we=(ze=La.analyzeSplitToContent(we,","))==null?void 0:ze.map(Ge=>(Ge="@"+Ge,Ge));let Ea=we==null?void 0:we.find(Ge=>Ge==null?void 0:Ge.includes("@Type"));Ea!=null&&Ea.includes("File")&&(u="Upload"),Ea!=null&&Ea.includes("Date")&&(u="Date"),Ea!=null&&Ea.includes("DateTime")&&(u="DateTime"),Ea!=null&&Ea.includes("Time")&&(u="Time"),_=we==null?void 0:we.find(Ge=>Ge==null?void 0:Ge.includes("@IdentName")),_=_?(ne=(Ee=_==null?void 0:_.replace("=",Oa))==null?void 0:Ee.split(Oa))==null?void 0:ne[1]:n}else{if(n=(ke=l==null?void 0:l.split("=="))==null?void 0:ke[0],_=(Z=l==null?void 0:l.split("=="))==null?void 0:Z[0],l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((Na=(Ke=(de=l==null?void 0:l.replace("=",Oa))==null?void 0:de.split(Oa))==null?void 0:Ke[1])!=null&&Na.includes("||")))if(n=(te=l==null?void 0:l.split("="))==null?void 0:te[0],_=n,l!=null&&l.includes("(@")||l!=null&&l.includes("@")){if(l!=null&&l.includes("(@")){let we=(D=l==null?void 0:l.split("(@"))==null?void 0:D[1];we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),we=(ye=(le=we==null?void 0:we.replace("(",Oa))==null?void 0:le.split(Oa))==null?void 0:ye[1],we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),c==null||c.push(we),l=(ue=l==null?void 0:l.split("(@"))==null?void 0:ue[0]}else{let we=(Ne=l==null?void 0:l.split("@"))==null?void 0:Ne[1];we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),we=(wa=(pa=we==null?void 0:we.replace("(",Oa))==null?void 0:pa.split(Oa))==null?void 0:wa[1],we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),c==null||c.push(we),l=(ja=l==null?void 0:l.split("@"))==null?void 0:ja[0]}let Ae=(ea=(ee=l==null?void 0:l.split("="))==null?void 0:ee[1])==null?void 0:ea.split("/");s.push(Ae)}else t=(xa=La.analyzeSplitToContent((Pe=l==null?void 0:l.split("="))==null?void 0:Pe[1],"/"))==null?void 0:xa.map(Ae=>((Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])==="/"&&(Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1)),Ae)),t=t==null?void 0:t.map(Ae=>({label:Ae==null?void 0:Ae.replaceAll("'",""),value:Ae==null?void 0:Ae.replaceAll("'","")}));else if((Re=(Te=(He=l==null?void 0:l.replace("=",Oa))==null?void 0:He.split(Oa))==null?void 0:Te[1])!=null&&Re.includes("||")){n=(Ye=l==null?void 0:l.split("="))==null?void 0:Ye[0],_=(qa=l==null?void 0:l.split("="))==null?void 0:qa[0];let Ae=[];(J=(F=(P=(Va=l==null?void 0:l.replace("=",Oa))==null?void 0:Va.split(Oa))==null?void 0:P[1])==null?void 0:F.split("||"))==null||J.forEach(we=>{var Ea,Ge,ol;s.push((Ge=(Ea=we==null?void 0:we.split("@Filter"))==null?void 0:Ea[0])==null?void 0:Ge.split("/")),Ae.push((ol=we==null?void 0:we.split("@Filter"))==null?void 0:ol[1])}),c=Ae==null?void 0:Ae.map(we=>(we=we==null?void 0:we.slice(1,(we==null?void 0:we.length)-1),we))}else{let Ae=l==null?void 0:l.split("=="),we=(ie=Ae==null?void 0:Ae.filter(Ea=>(Ea==null?void 0:Ea[0])==="$"))==null?void 0:ie[0];if(we&&!(we!=null&&we.includes("&"))){let Ea=(ce=we==null?void 0:we.replace("*",Oa))==null?void 0:ce.split(Oa),Ge=(Ea==null?void 0:Ea[0])===""?r==null?void 0:r.value:Ea==null?void 0:Ea[0];Ge=Ge==null?void 0:Ge.replaceAll("[Any]",""),(Ge==null?void 0:Ge[0])==="$"&&(Ge=(ma=Ge==null?void 0:Ge.slice(1,Ge==null?void 0:Ge.length))==null?void 0:ma.replaceAll(":","/")),g=Ge==null?void 0:Ge.split("/");let ol=(Ie=(na=Ea==null?void 0:Ea[1])==null?void 0:na.replace("{",Oa))==null?void 0:Ie.split(Oa),Sl=ol==null?void 0:ol[0];(Sl==null?void 0:Sl[(Sl==null?void 0:Sl.length)-1])===":"&&(Sl=Sl==null?void 0:Sl.slice(0,(Sl==null?void 0:Sl.length)-1)),h=Sl==null?void 0:Sl.split(":"),v=(Je=(ve=(Ca=(_e=ol==null?void 0:ol[1])==null?void 0:_e.replace("}",Oa))==null?void 0:Ca.split(Oa))==null?void 0:ve[0])==null?void 0:Je.split(":");let Nl=(_a=(Fe=(Qe=ol==null?void 0:ol[(ol==null?void 0:ol.length)-1])==null?void 0:Qe.replace("}",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[1];Nl&&Nl!==""&&(S=kt(Nl))}if(Ae!=null&&Ae.some(Ea=>(Ea==null?void 0:Ea[0])==="&")){let Ea=(Le=Ae==null?void 0:Ae.filter(Sl=>(Sl==null?void 0:Sl[0])==="&"))==null?void 0:Le[0];(Ea==null?void 0:Ea[0])==="&"&&(Ea=Ea==null?void 0:Ea.slice(1,Ea==null?void 0:Ea.length)),z=(re=(va=Ea==null?void 0:Ea.replace("(",Oa))==null?void 0:va.split(Oa))==null?void 0:re[0];let Ge=(K=(Se=Ea==null?void 0:Ea.replace(")",Oa))==null?void 0:Se.split(Oa))==null?void 0:K[0];Ge=(De=(je=Ge==null?void 0:Ge.replace("(",Oa))==null?void 0:je.split(Oa))==null?void 0:De[1],(Ge==null?void 0:Ge[0])==="{"&&(Ge=Ge==null?void 0:Ge.slice(1,Ge==null?void 0:Ge.length)),(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="}"&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),w=Ge==null?void 0:Ge.split(",");let ol=(Ba=(Ma=Ea==null?void 0:Ea.replace(")",Oa))==null?void 0:Ma.split(Oa))==null?void 0:Ba[1];ol&&ol!==""&&(j=kt(ol))}else if(!we){let Ea=Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1];Ea=Ea==null?void 0:Ea.slice(1,(Ea==null?void 0:Ea.length)-1),Ea=La.analyzeSplitToContent(Ea,","),Ea=Ea==null?void 0:Ea.map(Ge=>((Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])===","&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),Ge)),Ea=Ea==null?void 0:Ea.map(Ge=>{var ol,Sl;if(Ge=Ge==null?void 0:Ge.replaceAll("$",""),Ge!=null&&Ge.includes(ko)){let Nl="",Ra=Ge==null?void 0:Ge.split(ko);Nl=((Sl=(ol=Ra==null?void 0:Ra[0])==null?void 0:ol.split(":"))==null?void 0:Sl[0])+":"+(Ra==null?void 0:Ra[1]),Ge=Nl,Ge=Ge+":"}return Ge=Ge==null?void 0:Ge.replaceAll(":","/"),Ge}),m=Ea}}u="Select"}else n=l,_=l;return n!=null&&n.includes("@Pam")&&(n=(Aa=(Ua=l==null?void 0:l.replace("@Pam",Oa))==null?void 0:Ua.split(Oa))==null?void 0:Aa[0],_=n),{label:n,prop:_,options:t,allContents:s,filterContents:c,menus:g,groups:h,words:v,align:"center",formType:u,filter:S,functionName:z,functionRelatedWords:w,calculatorFilter:j,relatedPages:m}},xo=(l,r)=>{var t,s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke;let n=[];if((l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&!((g=(c=(s=(t=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:t.replace(":",Oa))==null?void 0:s.split(Oa))==null?void 0:c[0])!=null&&g.includes(","))){let Z=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),de=(h=Z==null?void 0:Z.replace(":",Oa))==null?void 0:h.split(Oa);if(((v=La.analyzeSplitToContent(de==null?void 0:de[1],"="))==null?void 0:v.length)===1){let Ke=de==null?void 0:de[0],Na=[];(_=La.analyzeSplitToContent((u=de==null?void 0:de[1])==null?void 0:u.slice(1,((m=de==null?void 0:de[1])==null?void 0:m.length)-1),","))==null||_.forEach(te=>{var D,le;((D=La.analyzeSplitToContent(te,"="))==null?void 0:D.length)>1?((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),Na=[...Na,...xo(te,r)]):((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),Na.push((le=xo(te,r))==null?void 0:le[0]))}),n==null||n.push({label:Ke,prop:Ke,children:Na,align:"center"})}else{let Ke=[];if(((S=La.analyzeSplitToContent(Z,"="))==null?void 0:S.length)>=2){let te=(z=La.analyzeSplitToContent(Z,"="))==null?void 0:z[1],D=(w=La.analyzeSplitToContent(te,"/"))==null?void 0:w.map(le=>((le==null?void 0:le[(le==null?void 0:le.length)-1])==="/"&&(le=le==null?void 0:le.slice(0,(le==null?void 0:le.length)-1)),le));Ke=D==null?void 0:D.map(le=>(le=wt(le),le))}let Na=(L=(b=(Y=(N=(A=(j=Z==null?void 0:Z.replace("{",Oa))==null?void 0:j.split(Oa))==null?void 0:A[1])==null?void 0:N.replace("}",Oa))==null?void 0:Y.split(Oa))==null?void 0:b[0])==null?void 0:L.split(",");Na==null||Na.forEach((te,D)=>{(Ke==null?void 0:Ke.length)>0&&D===0?n==null||n.push({label:te,prop:te,align:"center",formType:"Select",relatedContents:Ke==null?void 0:Ke.map(le=>{let ye={};return Na==null||Na.forEach((ue,Ne)=>{ye[ue]=le==null?void 0:le[Ne]}),ye}),options:Ke==null?void 0:Ke.map(le=>({label:le==null?void 0:le[0],value:le==null?void 0:le[0]})),mainKey:!0}):n==null||n.push({label:te,prop:te,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((T=La.analyzeSplitToContent(l,"="))==null?void 0:T.length)===2&&((k=(x=La.analyzeSplitToContent(l,"="))==null?void 0:x[1])==null?void 0:k[0])==="["){let Z=[];if((($=La.analyzeSplitToContent(l,"="))==null?void 0:$.length)>=2){let Ke=(U=La.analyzeSplitToContent(l,"="))==null?void 0:U[1],Na=(X=La.analyzeSplitToContent(Ke,"/"))==null?void 0:X.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])==="/"&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te));Z=Na==null?void 0:Na.map(te=>(te=wt(te),te))}let de=(ze=(be=l==null?void 0:l.replace("}",Oa))==null?void 0:be.split(Oa))==null?void 0:ze[0];de=(Ee=de==null?void 0:de.slice(1,de==null?void 0:de.length))==null?void 0:Ee.split(","),de==null||de.forEach((Ke,Na)=>{(Z==null?void 0:Z.length)>0&&Na===0?n==null||n.push({label:Ke,prop:Ke,align:"center",formType:"Select",relatedContents:Z==null?void 0:Z.map(te=>{let D={};return de==null||de.forEach((le,ye)=>{D[le]=te==null?void 0:te[ye]}),D}),options:Z==null?void 0:Z.map(te=>({label:te==null?void 0:te[0],value:te==null?void 0:te[0]})),mainKey:!0}):n==null||n.push({label:Ke,prop:Ke,align:"center"})})}else(ne=La.analyzeSplitToContent(l,","))==null||ne.forEach(Z=>{var de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se;if((Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])===","&&(Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1)),(Z==null?void 0:Z[0])==="{"){let K=La.analyzeSplitToContent(Z,"="),je=K==null?void 0:K[(K==null?void 0:K.length)-1],De=[],Ma=[],Ba=[],Ua=[],Aa=[],Ae=(de=je==null?void 0:je.replace("*",Oa))==null?void 0:de.split(Oa),we=(Ae==null?void 0:Ae[0])===""?r==null?void 0:r.value:Ae==null?void 0:Ae[0];if(we=we==null?void 0:we.replaceAll("[Any]",""),(we==null?void 0:we[(we==null?void 0:we.length)-1])===":"&&(we=we!=null&&we.includes("(@")?((Ke=we==null?void 0:we.split("(@"))==null?void 0:Ke[0])+":":((Na=we==null?void 0:we.split("@"))==null?void 0:Na[0])+":"),(we==null?void 0:we[0])==="$"&&(we=(te=we==null?void 0:we.slice(1,we==null?void 0:we.length))==null?void 0:te.replaceAll(":","/")),we!=null&&we.includes("$")){let Ra=(D=we==null?void 0:we.split("$"))==null?void 0:D[0];Ra=(le=Ra==null?void 0:Ra.split("/"))==null?void 0:le[0],we=Ra+"/"+((ye=we==null?void 0:we.split("$"))==null?void 0:ye[1])+"/"}(we==null?void 0:we[(we==null?void 0:we.length)-1])==="/"&&(we==null?void 0:we[(we==null?void 0:we.length)-2])==="/"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),De=we==null?void 0:we.split("/");let Ea=(Ne=(ue=Ae==null?void 0:Ae[1])==null?void 0:ue.replace("{",Oa))==null?void 0:Ne.split(Oa);if((ja=(wa=(pa=Ae==null?void 0:Ae[1])==null?void 0:pa.split("(@"))==null?void 0:wa[0])!=null&&ja.includes("&&")||(Pe=(ea=(ee=Ae==null?void 0:Ae[1])==null?void 0:ee.split("@"))==null?void 0:ea[0])!=null&&Pe.includes("&&")){let Ra=(xa=Ae==null?void 0:Ae[1])!=null&&xa.includes("(@")?(Re=(Te=(He=Ae==null?void 0:Ae[1])==null?void 0:He.split("(@"))==null?void 0:Te[0])==null?void 0:Re.split("&&"):(Va=(qa=(Ye=Ae==null?void 0:Ae[1])==null?void 0:Ye.split("@"))==null?void 0:qa[0])==null?void 0:Va.split("&&");Ua=Ra==null?void 0:Ra.map(ga=>{var qe,rl;return(ga==null?void 0:ga[0])==="*"&&(ga=ga==null?void 0:ga.slice(1,ga==null?void 0:ga.length)),ga=(rl=(qe=ga==null?void 0:ga.replace("{",Oa))==null?void 0:qe.split(Oa))==null?void 0:rl[0],(ga==null?void 0:ga[(ga==null?void 0:ga.length)-1])===":"&&(ga=ga==null?void 0:ga.slice(0,(ga==null?void 0:ga.length)-1)),ga=ga==null?void 0:ga.split(":"),ga});let al=[];Ra==null||Ra.forEach((ga,qe)=>{var rl,da;(ga==null?void 0:ga[0])==="*"&&(ga=ga==null?void 0:ga.slice(1,ga==null?void 0:ga.length)),ga=(da=(rl=ga==null?void 0:ga.replace("{",Oa))==null?void 0:rl.split(Oa))==null?void 0:da[1],(ga==null?void 0:ga[(ga==null?void 0:ga.length)-1])==="}"&&(ga=ga==null?void 0:ga.slice(0,(ga==null?void 0:ga.length)-1)),ga=ga==null?void 0:ga.split(","),al.push(qe===0?(ga==null?void 0:ga.length)-1:ga==null?void 0:ga.length),Aa=[...Aa,...ga]}),al=(P=La.prefixSum(al))==null?void 0:P.map(ga=>ga==null?void 0:ga.total),Ua=Ua==null?void 0:Ua.map((ga,qe)=>({number:al==null?void 0:al[qe],contents:ga}))}let Ge=Ea==null?void 0:Ea[0];(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])===":"&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),Ma=Ge==null?void 0:Ge.split(":"),Ba=(ce=(ie=(J=(F=Ea==null?void 0:Ea[1])==null?void 0:F.replace("}",Oa))==null?void 0:J.split(Oa))==null?void 0:ie[0])==null?void 0:ce.split(",");let ol=(na=K==null?void 0:K[0])==null?void 0:na.slice(1,((ma=K==null?void 0:K[0])==null?void 0:ma.length)-2),Sl="",Nl="";if((Ie=K==null?void 0:K[(K==null?void 0:K.length)-1])!=null&&Ie.includes("(@")?(Nl=(ve=(Ca=(_e=K==null?void 0:K[(K==null?void 0:K.length)-1])==null?void 0:_e.replace("(@",Oa))==null?void 0:Ca.split(Oa))==null?void 0:ve[1],Nl="(@"+Nl):(Je=K==null?void 0:K[(K==null?void 0:K.length)-1])!=null&&Je.includes("@")&&(Nl=(_a=(Fe=(Qe=K==null?void 0:K[(K==null?void 0:K.length)-1])==null?void 0:Qe.replace("@",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[1],Nl="@"+Nl),((Le=La.analyzeSplitToContent(Nl,"&"))==null?void 0:Le.length)>1){let Ra=(re=(va=La.analyzeSplitToContent(Nl,"}"))==null?void 0:va.map(al=>{var ga;return al!=null&&al.includes("@")||(al=""),al!=null&&al.includes("@")&&(al=(ga=La.analyzeSplitToContent(al,":"))==null?void 0:ga[0],(al==null?void 0:al[(al==null?void 0:al.length)-1])===":"&&(al=al==null?void 0:al.slice(0,(al==null?void 0:al.length)-1)),(al==null?void 0:al[0])==="("&&(al=al==null?void 0:al.slice(1,(al==null?void 0:al.length)-1))),al}))==null?void 0:re.filter(al=>al!=="");Nl=(Nl==null?void 0:Nl.length)===1?Ra:"("+(Ra==null?void 0:Ra.join(","))+")"}Nl&&Nl!==""&&(Sl=kt(Nl)),(Se=ol==null?void 0:ol.split(","))==null||Se.forEach((Ra,al)=>{var ga,qe,rl;n.push({label:Ra,prop:Ra,align:"center",menus:De,groups:(Ua==null?void 0:Ua.length)===0?Ma:(ga=Ua==null?void 0:Ua.find(da=>(da==null?void 0:da.number)>=al))==null?void 0:ga.contents,words:(Aa==null?void 0:Aa.length)===0?(qe=Ba==null?void 0:Ba[al])==null?void 0:qe.split(":"):(rl=Aa==null?void 0:Aa[al])==null?void 0:rl.split(":"),formType:(De==null?void 0:De.length)>0?"Select":"Input",mainKey:al===0,filter:Sl,isMainPath:(Ua==null?void 0:Ua.findIndex(da=>(da==null?void 0:da.number)>=al))===0})})}else n.push({label:Z,prop:Z,align:"center"})});else{let Z=(ke=La.analyzeSplitToContent(l,","))==null?void 0:ke.map(de=>((de==null?void 0:de[(de==null?void 0:de.length)-1])===","&&(de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)),de));Z==null||Z.forEach(de=>{n.push(si(de,r))})}return n},Nd=(l,r)=>{var g,h,v,m,u;let n=l;if(!l)return;let t="";((g=La.analyzeSplitToContent(l,"}"))==null?void 0:g.length)>1&&(n=(h=La.analyzeSplitToContent(l,"}"))==null?void 0:h[0],t=(v=La.analyzeSplitToContent(l,"}"))==null?void 0:v[1]),(l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let s=[],c=[];return s.push({label:"排序",prop:"sort"}),s.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=La.analyzeSplitToContent(n,","))==null||m.forEach(_=>{var S;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(S=xo(_,r))==null||S.forEach(z=>{s.push(z)}):s.push(si(_,r))}),t!==""&&((t==null?void 0:t[0])=="{"&&(t=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)),(u=La.analyzeSplitToContent(t,","))==null||u.forEach(_=>{var S;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(S=xo(_,r))==null||S.forEach(z=>{c.push(z)}):c.push(si(_,r))})),{columns:s,secondColumns:c}},ci=l=>{var r,n,t;if(l!=null&&l.includes("@Filter")||l!=null&&l.includes("@Condition"))return l;{let s=(n=(r=l==null?void 0:l.replace("(",Oa))==null?void 0:r.split(Oa))==null?void 0:n[1];return s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1),s=(t=La.analyzeSplitToContent(s,","))==null?void 0:t.map(c=>((c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),"@"+c)),s=s==null?void 0:s.join(","),l!=null&&l.includes("@Quote")&&(s!=null&&s.includes("@Type")||(s=s===""?s+"@Type=Manual":s+",@Type=Manual"),s!=null&&s.includes("@SonSync")||(s=s===""?s+"@SonSync=No":s+",@SonSync=No"),s!=null&&s.includes("@FatherSync")||(s=s===""?s+"@FatherSync=Yes":s+",@FatherSync=Yes")),s}},Zi=l=>{let r=l==null?void 0:l.map(n=>{var t,s;return{menus:n==null?void 0:n.menus,content:((t=n==null?void 0:n.menus)==null?void 0:t.join("/"))+Oa+((s=n==null?void 0:n.groups)==null?void 0:s.join("/"))}});return r=r==null?void 0:r.filter(n=>{var t;return(n==null?void 0:n.menus)&&((t=n==null?void 0:n.menus)==null?void 0:t.length)>0}),r=r==null?void 0:r.map(n=>n==null?void 0:n.content),r=[...new Set(r)],r=r==null?void 0:r.map(n=>{var t,s;return{menus:(t=n==null?void 0:n.split(Oa))==null?void 0:t[0],groups:((s=n==null?void 0:n.split(Oa))==null?void 0:s[1])??[]}}),r},Td=(l,r,n="")=>{var N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va;let t=[];if(((N=l==null?void 0:l[0])==null?void 0:N[0])!=="*"&&((Y=l==null?void 0:l[0])==null?void 0:Y[0])!=="$")return;let s=La.analyzeSplitToContent(l==null?void 0:l[0],":"),c=s==null?void 0:s.filter(re=>!((re==null?void 0:re[0])!=="{"&&(re==null?void 0:re[0])!=="["));t=(b=s==null?void 0:s.filter(re=>(re==null?void 0:re[0])!=="{"&&(re==null?void 0:re[0])!=="["))==null?void 0:b.join("");let g="",h="";if((t==null?void 0:t[(t==null?void 0:t.length)-1])===":"&&(t=t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1)),t!=null&&t.includes("(@")&&(t==null?void 0:t[0])==="*"&&(g="(@"+((L=t==null?void 0:t.split("(@"))==null?void 0:L[1]),t=(T=t==null?void 0:t.split("(@"))==null?void 0:T[0]),t!=null&&t.includes("@")&&(t==null?void 0:t[0])==="*"&&(g="@"+((k=(x=t==null?void 0:t.replace("@",Oa))==null?void 0:x.split(Oa))==null?void 0:k[1]),t=(U=($=t==null?void 0:t.replace("@",Oa))==null?void 0:$.split(Oa))==null?void 0:U[0]),(t==null?void 0:t[0])==="*"?(t=t==null?void 0:t.slice(1,t==null?void 0:t.length),t=t==null?void 0:t.split(":")):(h=I.cloneDeep(t)+":",t=[]),h=h+((c==null?void 0:c[0])??""),(h==null?void 0:h[(h==null?void 0:h.length)-1])===":"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),g!==""&&h!=="")if((h==null?void 0:h[(h==null?void 0:h.length)-1])===")")if(h!=null&&h.includes("(@")){let re=(X=h==null?void 0:h.split("(@"))==null?void 0:X[0],Se=(be=h==null?void 0:h.split("(@"))==null?void 0:be[1];Se="(@"+(Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1))+g,h=re+Se}else{let re=(Ee=(ze=h==null?void 0:h.replace("@",Oa))==null?void 0:ze.split(Oa))==null?void 0:Ee[0],Se=(ke=(ne=h==null?void 0:h.replace("@",Oa))==null?void 0:ne.split(Oa))==null?void 0:ke[1];Se="(@"+Se+g,h=re+Se}else h=h+g;let v=c==null?void 0:c[1];(h==null?void 0:h[0])==="["&&(v=I.cloneDeep(h)+(v??""),h="");let m=v?wt(v):[];!(m!=null&&m.every(re=>Array.isArray(re)))&&(m==null?void 0:m.length)>0&&(m=[m]);let u=(Z=La.analyzeSplitToContent(h,"@"))!=null&&Z[1]?"@"+((de=La.analyzeSplitToContent(h,"@"))==null?void 0:de[1]):"";if(h=(Ke=La.analyzeSplitToContent(h,"@"))==null?void 0:Ke[0],(h==null?void 0:h[0])==="$"&&(u=I.cloneDeep(h)+(u??""),h=""),n!=="")if(g!=="")u=(n==null?void 0:n[(n==null?void 0:n.length)-1])!==")"?n+g:(n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1))+","+g;else{let re="";if(n!=null&&n.includes("(@")){let Se=(ye=(le=(D=(te=(Na=n==null?void 0:n.replace("(@",Oa))==null?void 0:Na.split(Oa))==null?void 0:te[0])==null?void 0:D.replace("{",Oa))==null?void 0:le.split(Oa))==null?void 0:ye[0];re=((Se==null?void 0:Se[(Se==null?void 0:Se.length)-1])===":"?Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1):Se)+"(@"+((Ne=(ue=n==null?void 0:n.replace("(@",Oa))==null?void 0:ue.split(Oa))==null?void 0:Ne[1])}else if(n!=null&&n.includes("@")){let Se=(ea=(ee=(ja=(wa=(pa=n==null?void 0:n.replace("@",Oa))==null?void 0:pa.split(Oa))==null?void 0:wa[0])==null?void 0:ja.replace("{",Oa))==null?void 0:ee.split(Oa))==null?void 0:ea[0];re=((Se==null?void 0:Se[(Se==null?void 0:Se.length)-1])===":"?Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1):Se)+"@"+((xa=(Pe=n==null?void 0:n.replace("@",Oa))==null?void 0:Pe.split(Oa))==null?void 0:xa[1])}u=re===""?n:re}if(u!==""){(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),(u==null?void 0:u[(u==null?void 0:u.length)-1])===":"&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1));let re="";if(u!=null&&u.includes("(@")){re=(Te=(He=u==null?void 0:u.replace("(@",Oa))==null?void 0:He.split(Oa))==null?void 0:Te[0];let Se=(Ye=(Re=u==null?void 0:u.replace("(@",Oa))==null?void 0:Re.split(Oa))==null?void 0:Ye[1];Se="@"+(Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1));let K=(qa=La.analyzeSplitToContent(Se,","))==null?void 0:qa.map(je=>((je==null?void 0:je[(je==null?void 0:je.length)-1])===","&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)),(je==null?void 0:je[(je==null?void 0:je.length)-1])!==")"&&(je=je+")"),ci(je)));u=re+"("+(K==null?void 0:K.join(","))+")"}else{re=(P=(Va=u==null?void 0:u.replace("@",Oa))==null?void 0:Va.split(Oa))==null?void 0:P[0];let Se=(J=(F=u==null?void 0:u.replace("@",Oa))==null?void 0:F.split(Oa))==null?void 0:J[1];if(Se){Se="@"+Se;let K=(ie=La.analyzeSplitToContent(Se,","))==null?void 0:ie.map(je=>((je==null?void 0:je[(je==null?void 0:je.length)-1])!==")"&&(je=je+")"),ci(je)));u=re+"("+(K==null?void 0:K.join(","))+")"}else u=re}}(h==null?void 0:h[(h==null?void 0:h.length)-1])==="@"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1));let _=Nd(h,r),S=h===""?[]:(_==null?void 0:_.columns)??[],z=sa.getColumnChild(S),w=z;w=w==null?void 0:w.filter(re=>{var Se,K;return(re==null?void 0:re.filter)&&(re==null?void 0:re.filter)!==""&&(((Se=re==null?void 0:re.filter)==null?void 0:Se.includes("@SonSync"))||((K=re==null?void 0:re.filter)==null?void 0:K.includes("@FatherSync")))});let j=w==null?void 0:w.filter(re=>{var Se,K,je;return((Se=re==null?void 0:re.filter)==null?void 0:Se.includes("@SonSync"))&&((je=(K=re==null?void 0:re.filter)==null?void 0:K.split(","))==null?void 0:je.find(De=>(De==null?void 0:De.includes("@SonSync"))&&(De==null?void 0:De.includes("Yes"))))}),A=w==null?void 0:w.filter(re=>{var Se,K,je;return((Se=re==null?void 0:re.filter)==null?void 0:Se.includes("@FatherSync"))&&((je=(K=re==null?void 0:re.filter)==null?void 0:K.split(","))==null?void 0:je.find(De=>(De==null?void 0:De.includes("@FatherSync"))&&(De==null?void 0:De.includes("Yes"))))});if(z=z==null?void 0:z.map(re=>{var Se,K;return{menus:re==null?void 0:re.menus,content:((Se=re==null?void 0:re.menus)==null?void 0:Se.join("/"))+Oa+((K=re==null?void 0:re.groups)==null?void 0:K.join("/"))}}),A=Zi(A),j=Zi(j),z=z==null?void 0:z.filter(re=>{var Se;return(re==null?void 0:re.menus)&&((Se=re==null?void 0:re.menus)==null?void 0:Se.length)>0}),z=z==null?void 0:z.map(re=>re==null?void 0:re.content),z=[...new Set(z)],z=z==null?void 0:z.map(re=>{var Se,K;return{menus:(Se=re==null?void 0:re.split(Oa))==null?void 0:Se[0],groups:((K=re==null?void 0:re.split(Oa))==null?void 0:K[1])??[]}}),S!=null&&S.some(re=>{var Se;return Array.isArray(re==null?void 0:re.children)&&((Se=re==null?void 0:re.children)==null?void 0:Se.length)>0})&&(S=[S]),(m==null?void 0:m.length)>0&&(Array.isArray(m==null?void 0:m[0])&&((ce=m==null?void 0:m[0])!=null&&ce.every(re=>Array.isArray(re)))?m=m==null?void 0:m.map((re,Se)=>(re=re.map((K,je)=>(K.unshift("{}"),K.unshift((je+1).toString()),K)),re)):m=m==null?void 0:m.map((re,Se)=>(re.unshift("{}"),re.unshift((Se+1).toString()),re))),_!=null&&_.secondColumns&&((ma=_==null?void 0:_.secondColumns)==null?void 0:ma.length)>0&&((m==null?void 0:m.length)>0?m=m==null?void 0:m.map((re,Se)=>{var K,je;return Array.isArray(re==null?void 0:re[0])?re=re==null?void 0:re.map((De,Ma)=>{var Ba,Ua;return De.unshift((Ua=(Ba=_==null?void 0:_.secondColumns)==null?void 0:Ba[Ma])==null?void 0:Ua.prop),De}):re.unshift((je=(K=_==null?void 0:_.secondColumns)==null?void 0:K[Se])==null?void 0:je.prop),re}):m=(na=_==null?void 0:_.secondColumns)==null?void 0:na.map((re,Se)=>(re=[re==null?void 0:re.label],re.push(Se),re)),S.unshift({label:"",prop:"disabled",sortable:!1})),(S==null?void 0:S.length)>0){let re=I.cloneDeep(S);Array.isArray(re==null?void 0:re[0])&&(re=re==null?void 0:re[0]);let Se=sa.getColumnChild(re);Se=Se==null?void 0:Se.map(K=>K==null?void 0:K.filter),Se=Se==null?void 0:Se.filter(K=>K&&K!==""),Se=[...new Set(Se)],(Se==null?void 0:Se.length)>0&&(u=Oa+(u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1))+(u!=null&&u.slice(1,(u==null?void 0:u.length)-1)?",":"")+((Ie=I.cloneDeep(Se))==null?void 0:Ie.join(";")))}if((u==null?void 0:u[0])!=="("&&(u!=null&&u.includes("(@"))){let re=(Ca=(_e=u==null?void 0:u.replace("(",Oa))==null?void 0:_e.split(Oa))==null?void 0:Ca[0],Se=[{menus:(Je=(ve=re==null?void 0:re.split("*"))==null?void 0:ve[0])==null?void 0:Je.replaceAll(":","/"),groups:(Qe=re==null?void 0:re.split("*"))==null?void 0:Qe[1]}],K=(_a=(Fe=u==null?void 0:u.replace("(",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[1];(K==null?void 0:K[(K==null?void 0:K.length)-1])===")"&&(K=K==null?void 0:K.slice(0,(K==null?void 0:K.length)-1)),K=La.analyzeSplitToContent(K,","),(Le=K==null?void 0:K.find(je=>je==null?void 0:je.includes("@FatherSync")))!=null&&Le.includes("Yes")&&(A=[...A,...Se]),(va=K==null?void 0:K.find(je=>je==null?void 0:je.includes("@SonSync")))!=null&&va.includes("Yes")&&(j=[...j,...Se])}return{groupName:t,tableColumns:S,tableFilter:u,tableContents:m,columns:(_==null?void 0:_.secondColumns)??[],relatedQuotes:z,fatherSyncContents:A,sonSyncContents:j}},qs=(l,r)=>(l=l==null?void 0:l.map((n,t)=>{var s,c,g,h;if(Array.isArray(n))n=n==null?void 0:n.map(v=>{var m,u,_,S;return v!=null&&v.isMainPath||(((m=v==null?void 0:v.children)==null?void 0:m.length)>0?v.children=qs(v.children,r):((u=v==null?void 0:v.menus)==null?void 0:u.length)>0&&!((_=n==null?void 0:n[0])!=null&&_.isMainPath)&&(v.menus=(S=v.menus)==null?void 0:S.map((z,w)=>{var j,A;return((j=v.menus)==null?void 0:j.length)-1===w&&z===""&&(r==null?void 0:r.parentContent)+"/"!==((A=v.menus)==null?void 0:A.join("/"))&&(z=r==null?void 0:r.value),v}),v.bindMenus=v.menus)),v});else{if(t===0&&((s=n.menus)==null?void 0:s.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((c=n.menus)==null?void 0:c.length)>0&&!((g=l==null?void 0:l[0])!=null&&g.isMainPath)&&(n.menus=(h=n.menus)==null?void 0:h.map((v,m)=>{var u,_;return((u=n.menus)==null?void 0:u.length)-1===m&&v===""&&(r==null?void 0:r.parentContent)+"/"!==((_=n.menus)==null?void 0:_.join("/"))&&(v=r==null?void 0:r.value),v}),n.bindMenus=n.menus)}return n}),l),Ad=(l,r)=>(l=l==null?void 0:l.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=qs(n.contents,r)),n)),l),ui=(l,r)=>{let n=l;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(t=>(t=ui(t,r),t)):n=n==null?void 0:n.map(t=>{var s,c;return t!=null&&t.children&&((s=t==null?void 0:t.children)==null?void 0:s.length)>0?t.children=ui(t==null?void 0:t.children,r):t!=null&&t.words&&((c=t==null?void 0:t.words)==null?void 0:c.length)>0&&(r!=null&&r.find(g=>{var h,v,m,u;return((u=(h=t==null?void 0:t.prop)==null?void 0:h.split("."))==null?void 0:u[((m=(v=t==null?void 0:t.prop)==null?void 0:v.split("."))==null?void 0:m.length)-1])===g}))&&(t.mainKey=!0),t}),n};let tr="$R";const zd=I.useUnit(I.pinia),{selectTitle:sn}=I.storeToRefs(zd),cn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1},{key:"@TextSize",value:"onTextSize",order:1},{key:"@TextRGBA",value:"onTextRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@Size",value:"onSize",order:4},{key:"@ShowType",value:"onShowType",order:1},{key:"@StepName",value:"onStepName",order:1},{key:"@Step",value:"onStep",order:1}];var at=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(at||{});const Ws=l=>{if(l==null)return null;const r=String(l).trim();if(!r.startsWith("[")||!r.endsWith("]"))return null;const n=r.slice(1,-1).split(",").map(t=>Number(t.trim()));return n.length<2||n.some(t=>Number.isNaN(t))?null:[n[0],n[1]]},Ks=(l,r)=>{var j,A,N,Y,b;const n=Array.isArray(l)?l:[],t=n.find(L=>(L==null?void 0:L.key)==="formContent"),s=Array.isArray(t==null?void 0:t.contents)?t.contents:[],c=((j=n.find(L=>(L==null?void 0:L.key)==="_gridLayoutMeta"))==null?void 0:j.contents)??{},g=(s==null?void 0:s[0])??{};let h=((A=r==null?void 0:r.position)==null?void 0:A[0])??(c==null?void 0:c._positionStartRow)??(g==null?void 0:g._positionStartRow),v=((N=r==null?void 0:r.position)==null?void 0:N[1])??(c==null?void 0:c._positionRowSpan)??(g==null?void 0:g._positionRowSpan);(!h||Number.isNaN(h)||h<1)&&(h=1),(!v||Number.isNaN(v)||v<1)&&(v=1);let m=((Y=r==null?void 0:r.size)==null?void 0:Y[0])??(c==null?void 0:c._sizeStart)??(g==null?void 0:g._sizeStart),u=((b=r==null?void 0:r.size)==null?void 0:b[1])??(c==null?void 0:c._sizeEnd)??(g==null?void 0:g._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(u===void 0||Number.isNaN(u))&&(u=1),m=Math.max(0,Math.min(1,m)),u=Math.max(0,Math.min(1,u)),u<=m&&(m=0,u=1);const _=u-m,S=Math.max(1,Math.round(1/_));let z=n.map(L=>{if((L==null?void 0:L.key)!=="formContent")return L;const T=Array.isArray(L==null?void 0:L.contents)?L.contents:[];return{...L,contents:T.map(x=>({...x,width:S,_positionStartRow:h,_positionRowSpan:v,_sizeStart:m,_sizeEnd:u}))}});const w={_positionStartRow:h,_positionRowSpan:v,_sizeStart:m,_sizeEnd:u};return z.some(L=>(L==null?void 0:L.key)==="_gridLayoutMeta")?z=z.map(L=>(L==null?void 0:L.key)==="_gridLayoutMeta"?{...L,contents:w}:L):z.push({key:"_gridLayoutMeta",contents:w}),z},Md=l=>{const r=Ws(l==null?void 0:l.filter);return r?Ks(l==null?void 0:l.contents,{position:r}):l==null?void 0:l.contents},Od=l=>{const r=Ws(l==null?void 0:l.filter);return r?Ks(l==null?void 0:l.contents,{size:r}):l==null?void 0:l.contents},Id=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;const n=Number(l==null?void 0:l.filter);return r.push({key:"textSize",contents:Number.isNaN(n)?l==null?void 0:l.filter:n}),r}return l==null?void 0:l.contents},Ld=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;return r.push({key:"textRGBA",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Vd=l=>{var n;return(l==null?void 0:l.filter.toUpperCase())==="ALL"||(l==null?void 0:l.filter.toUpperCase())==="NONE"?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(t=>{var s;return(t==null?void 0:t.key)==="tableContents"&&(t.contents=(s=t.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),t})},Rd=async l=>{var r,n,t,s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne;if((l==null?void 0:l.filter)==="Random")return(r=l==null?void 0:l.contents)==null?void 0:r.map(Z=>((Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=La.shuffle(Z.contents)),Z));if((l==null?void 0:l.filter)==="Ordin"){let ke=l==null?void 0:l.contents;return ke.push({key:"enableWrap",contents:1}),ke}if((l==null?void 0:l.filter)==="Block"){let ke=l==null?void 0:l.contents;return ke.push({key:"enableWrap",contents:2}),ke}if((l==null?void 0:l.filter)==="Auto"){let ke=(t=(n=l==null?void 0:l.contents)==null?void 0:n.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:t.contents;Array.isArray(ke==null?void 0:ke[0])&&(ke=ke==null?void 0:ke[0]),ke=sa.getColumnChild(ke);let Z=ke==null?void 0:ke.filter(ue=>(ue==null?void 0:ue.filter)&&(ue==null?void 0:ue.filter)!==""),de=new Map,Ke=[];Z==null||Z.forEach(ue=>{var Ne,pa;de.get((Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.join("/"))||(de.set((pa=ue==null?void 0:ue.menus)==null?void 0:pa.join("/"),ue),Ke.push(ue))});let Na=(c=(s=sn==null?void 0:sn.value)==null?void 0:s.find(ue=>(ue==null?void 0:ue.condition)==="child"))==null?void 0:c.value,te=Ke==null?void 0:Ke.map(ue=>{var Ne,pa,wa;return ue=(Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.join("/"),(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&((wa=(pa=sn==null?void 0:sn.value)==null?void 0:pa.find(ja=>(ja==null?void 0:ja.condition)==="child"))==null?void 0:wa.parentContent)+"/"!==ue?ue=ue+Na:(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&(ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1)),ue}),D=Ke==null?void 0:Ke.map(ue=>ue==null?void 0:ue.groups),le=te==null?void 0:te.map(async ue=>{let Ne=await $r(ue,!1);return{path:ue,contents:Ne}});le=await Promise.all(le);let ye=le==null?void 0:le.map((ue,Ne)=>{var wa,ja,ee,ea,Pe,xa,He;let pa=(wa=ue==null?void 0:ue.contents)==null?void 0:wa.filter(Te=>{var Re,Ye;return(Te==null?void 0:Te.name)===((Ye=D==null?void 0:D[Ne])==null?void 0:Ye[((Re=D==null?void 0:D[Ne])==null?void 0:Re.length)-1])});return pa=(ea=(ee=(ja=pa==null?void 0:pa[0])==null?void 0:ja.compData)==null?void 0:ee.find(Te=>(Te==null?void 0:Te.key)==="tableContents"))==null?void 0:ea.contents,(ue==null?void 0:ue.path)===((xa=(Pe=sn==null?void 0:sn.value)==null?void 0:Pe.find(Te=>(Te==null?void 0:Te.condition)==="child"))==null?void 0:xa.parentContent)&&(pa=((He=pa==null?void 0:pa.map(Te=>{for(let Re in Te)if(Te[Re]===Na)return Te}))==null?void 0:He.filter(Te=>Te))??[]),pa??[]});if(ye=ye==null?void 0:ye.map(ue=>(ue=ue==null?void 0:ue.map(Ne=>{var wa;let pa={};for(let ja in Ne)if(Z!=null&&Z.find(ee=>{var ea,Pe;return((Pe=(ea=ee==null?void 0:ee.words)==null?void 0:ea[0])==null?void 0:Pe.replaceAll("'",""))===ja})){let ee=(wa=Z==null?void 0:Z.find(ea=>{var Pe,xa;return((xa=(Pe=ea==null?void 0:ea.words)==null?void 0:Pe[0])==null?void 0:xa.replaceAll("'",""))===ja}))==null?void 0:wa.prop;pa[ee]=Ne==null?void 0:Ne[ja]}return pa}),ue)),ye=La.cartesianProduct(ye),Array.isArray(ye==null?void 0:ye[0])&&(ye=ye==null?void 0:ye[0]),(ye==null?void 0:ye.length)>0&&((_=(h=(g=Z==null?void 0:Z[0])==null?void 0:g.menus)==null?void 0:h.join("/"))==null?void 0:_[((u=(m=(v=Z==null?void 0:Z[0])==null?void 0:v.menus)==null?void 0:m.join("/"))==null?void 0:u.length)-1])==="/")return(S=l==null?void 0:l.contents)==null?void 0:S.map(Ne=>{var pa;return(Ne==null?void 0:Ne.key)==="tableContents"&&(ye==null?void 0:ye.length)>0&&(Ne.contents=((pa=Ne.contents)==null?void 0:pa.length)>0?Ne.contents:ye),Ne})}if((l==null?void 0:l.filter)==="Text"){let ke=l==null?void 0:l.contents;return ke.push({key:"enableWrap",contents:3}),ke}if((l==null?void 0:l.filter)==="Manual"){let ke=[],Z=[],de=(w=(z=l==null?void 0:l.contents)==null?void 0:z.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:w.contents;(de==null?void 0:de[(de==null?void 0:de.length)-1])===")"?de=(A=(j=de==null?void 0:de.replace("(",tr))==null?void 0:j.split(tr))==null?void 0:A[0]:de="",de!==""&&(ke=((Y=(N=de==null?void 0:de.split("*"))==null?void 0:N[0])==null?void 0:Y.split(":"))??[],Z=((k=(x=(T=(L=(b=de==null?void 0:de.split("*"))==null?void 0:b[1])==null?void 0:L.replace("{",tr))==null?void 0:T.split(tr))==null?void 0:x[0])==null?void 0:k.split(":"))??[]);let Ke=(U=($=l==null?void 0:l.contents)==null?void 0:$.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:U.contents;Ke=(be=(X=Ke==null?void 0:Ke.replace("(",tr))==null?void 0:X.split(tr))==null?void 0:be[1],Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1);let Na=(ze=l==null?void 0:l.contents)==null?void 0:ze.map(D=>{var le,ye,ue,Ne,pa,wa,ja,ee,ea;return(D==null?void 0:D.key)==="header"&&((le=D==null?void 0:D.contents)!=null&&le.every(Pe=>(Pe==null?void 0:Pe.mainKey)!==!0)&&Array.isArray(D==null?void 0:D.contents)&&!Array.isArray((ye=D==null?void 0:D.contents)==null?void 0:ye[0])?D.contents=(ue=D==null?void 0:D.contents)==null?void 0:ue.map((Pe,xa)=>{var He,Te,Re;return Pe!=null&&Pe.isMainPath||(xa===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=ke,Pe.groups=((He=Pe.groups)==null?void 0:He.length)===0?Z:Pe.groups,Pe.words=((Te=Pe.words)==null?void 0:Te.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=Ke,(!(Pe!=null&&Pe.menus)||((Re=Pe==null?void 0:Pe.menus)==null?void 0:Re.length)===0)&&(Pe.menus=ke)):(Pe.mainKey=!1,Pe.bindMenus=ke)),Pe}):Array.isArray((Ne=D==null?void 0:D.contents)==null?void 0:Ne[0])&&((ja=(wa=(pa=D==null?void 0:D.contents)==null?void 0:pa[0])==null?void 0:wa.filter(()=>(ke==null?void 0:ke.length)>0))==null?void 0:ja.length)>0&&(D.contents[0]=(ea=(ee=D==null?void 0:D.contents)==null?void 0:ee[0])==null?void 0:ea.map((Pe,xa)=>{var He,Te,Re;return Pe!=null&&Pe.isMainPath||(xa===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=ke,Pe.groups=((He=Pe.groups)==null?void 0:He.length)===0?Z:Pe.groups,Pe.words=((Te=Pe.words)==null?void 0:Te.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=Ke,(!(Pe!=null&&Pe.menus)||Array.isArray(Pe==null?void 0:Pe.menus)&&((Re=Pe==null?void 0:Pe.menus)==null?void 0:Re.length)===0)&&(ke==null?void 0:ke.length)>0&&(Pe.menus=ke)):(Pe.mainKey=!1,Pe.bindMenus=ke)),Pe}))),D}),te=(Ee=Na==null?void 0:Na.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:Ee.contents;if(Array.isArray(te==null?void 0:te[0])&&(te=te==null?void 0:te[0]),te=sa.getColumnChild(te),te!=null&&te.some(D=>{var le,ye;return((ye=D==null?void 0:D.menus)==null?void 0:ye[((le=D==null?void 0:D.menus)==null?void 0:le.length)-1])===""})){let D=(ne=sn==null?void 0:sn.value)==null?void 0:ne.find(le=>(le==null?void 0:le.condition)==="child");Na=Ad(Na,D)}return Na}return l==null?void 0:l.contents},$d=l=>{var t,s,c,g;let r=l==null?void 0:l.filter;if(r!=null&&r.includes("*")&&(r="({"+((s=(t=r==null?void 0:r.replace("{",tr))==null?void 0:t.split(tr))==null?void 0:s[1])),r=(c=r==null?void 0:r.replaceAll("{",""))==null?void 0:c.replaceAll("}",""),(r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return l==null?void 0:l.contents;let n=sa.calculatorAndToOr(r);if((n==null?void 0:n.length)>0){let h=[];return n==null||n.forEach(m=>{let u={};for(let _ in m){let S=_;S!=null&&S.includes("[")||(u[S]=m[_])}h.push(u)}),(g=l==null?void 0:l.contents)==null?void 0:g.map(m=>{var _,S,z;let u=(S=(_=l==null?void 0:l.contents)==null?void 0:_.find(w=>(w==null?void 0:w.key)==="header"))==null?void 0:S.contents;if(u=(z=sa.getEqualChild(u))==null?void 0:z.filter(w=>(w==null?void 0:w.label)!=="操作"),(m==null?void 0:m.key)==="tableContents"){let j=sa.tableToForm(m==null?void 0:m.contents,u);h==null||h.forEach(A=>{var N,Y;for(let b in A)!((N=j==null?void 0:j[0])!=null&&N.find(L=>{var T;return(L==null?void 0:L.key)===b||((T=L==null?void 0:L.key)==null?void 0:T.includes(b))}))&&!(j!=null&&j.find(L=>{var T;return(L==null?void 0:L.key)===b||((T=L==null?void 0:L.key)==null?void 0:T.includes(b))}))||(((Y=A[b])==null?void 0:Y[0])!=="!"?j=j==null?void 0:j.filter(L=>{var T,x;return((T=L==null?void 0:L.find(k=>{var $;return(k==null?void 0:k.key)===b||(($=k==null?void 0:k.key)==null?void 0:$.includes(b))}))==null?void 0:T.value)===A[b]||Array.isArray(A==null?void 0:A[b])&&((x=A==null?void 0:A[b])==null?void 0:x.find(k=>{var $;return(($=L==null?void 0:L.find(U=>{var X;return(U==null?void 0:U.key)===b||((X=U==null?void 0:U.key)==null?void 0:X.includes(b))}))==null?void 0:$.value)===k}))}):j=j==null?void 0:j.filter(L=>{var T;return((T=L==null?void 0:L.find(x=>{var k;return(x==null?void 0:x.key)===b||((k=x==null?void 0:x.key)==null?void 0:k.includes(b))}))==null?void 0:T.value)!==A[b]}))}),(j==null?void 0:j.length)===0?m.contents=[]:m.contents=j==null?void 0:j.map(A=>{let N={};return A==null||A.forEach(Y=>{N[Y==null?void 0:Y.key]=Y==null?void 0:Y.value}),N})}return m})}return l==null?void 0:l.contents},Pd=l=>l==null?void 0:l.contents,Fd=l=>l==null?void 0:l.contents,jd=l=>{var r,n,t,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let c=(t=(n=l==null?void 0:l.filter)==null?void 0:n.slice(1,((r=l==null?void 0:l.filter)==null?void 0:r.length)-1))==null?void 0:t.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(h=>((h==null?void 0:h.key)==="header"&&(h.contents=ui(h.contents,c)),h))}return l==null?void 0:l.contents},Hd=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(g=>({label:g,prop:g}))),s}):l==null?void 0:l.contents},Ud=l=>l==null?void 0:l.contents,qd=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(g=>({label:g,prop:g}))),s}):l==null?void 0:l.contents},Wd=l=>{var n;let r=(l==null?void 0:l.filter)??"";if((r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""){let t=l==null?void 0:l.contents,s=(n=r==null?void 0:r.split(","))==null?void 0:n.map(c=>({label:c,prop:c}));return t.push({key:"bottomButton",contents:s}),t}return l==null?void 0:l.contents},Kd=l=>{var r,n,t,s;if(((r=l==null?void 0:l.filter)==null?void 0:r[0])!=="["){const c=parseInt(l==null?void 0:l.filter);return!c||Number.isNaN(c)?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(h=>{var v;return(h==null?void 0:h.key)==="formContent"&&(h.contents=(v=h.contents)==null?void 0:v.map(m=>(m.width=c,m))),h})}if(((t=l==null?void 0:l.filter)==null?void 0:t[0])==="["){let c=wt(l==null?void 0:l.filter),g=Array.isArray(c)?c.map(v=>parseInt(v)).filter(v=>!!v&&!Number.isNaN(v)):[];return g.length?(s=l==null?void 0:l.contents)==null?void 0:s.map(v=>{if((v==null?void 0:v.key)==="formContent"){const m=v.contents??[];v.contents=m.map((u,_)=>{const S=_+1;let z=0,w=0;for(let A=0;A<g.length;A++){if(w+=g[A],S<=w){z=A;break}A===g.length-1&&(z=g.length-1)}const j=g[z]||g[g.length-1]||1;return u.width=j,u})}return v}):l==null?void 0:l.contents}return l==null?void 0:l.contents},Yd=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var c,g,h;return(s==null?void 0:s.key)==="header"&&(Array.isArray((c=s==null?void 0:s.contents)==null?void 0:c[0])?s.contents[0]=(h=s.contents[0])==null?void 0:h.map(v=>(n!=null&&n.find(m=>m===(v==null?void 0:v.prop))&&(v.fixed="left"),v)):s.contents=(g=s.contents)==null?void 0:g.map(v=>(n!=null&&n.find(m=>m===(v==null?void 0:v.prop))&&(v.fixed="left"),v))),s})}return l==null?void 0:l.contents},Gd=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const t=c=>(n!=null&&n.find(g=>g===(c==null?void 0:c.prop))&&(c.required=!0),c!=null&&c.children&&Array.isArray(c.children)&&(c.children=c.children.map(g=>t(g))),c);return(r=l==null?void 0:l.contents)==null?void 0:r.map(c=>{var g,h,v;return(c==null?void 0:c.key)==="header"&&(Array.isArray((g=c==null?void 0:c.contents)==null?void 0:g[0])?c.contents[0]=(v=c.contents[0])==null?void 0:v.map(m=>t(m)):c.contents=(h=c.contents)==null?void 0:h.map(m=>t(m))),c})}return l==null?void 0:l.contents},Jd=async l=>{var t,s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b;const r=I.useUnit(I.pinia),{chooseTitle:n}=I.storeToRefs(r);if((l==null?void 0:l.filter)==="true"){let L=await $r(((s=(t=n==null?void 0:n.value)==null?void 0:t[0])==null?void 0:s.parentContent)??((g=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:g.relatedContent),!1),T=(v=(h=n==null?void 0:n.value)==null?void 0:h[0])==null?void 0:v.value;(u=(m=L==null?void 0:L[0])==null?void 0:m.compData)!=null&&u.find(U=>(U==null?void 0:U.key)==="header")?L=(_=L==null?void 0:L[0])==null?void 0:_.compData:L=(z=(S=L==null?void 0:L.filter(U=>{var X;return(X=U==null?void 0:U.compData)==null?void 0:X.find(be=>(be==null?void 0:be.key)==="header")}))==null?void 0:S[0])==null?void 0:z.compData;let x=(w=L==null?void 0:L.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:w.contents;Array.isArray(x==null?void 0:x[0])&&(x=x==null?void 0:x[0]),x=((j=x==null?void 0:x.find(U=>U==null?void 0:U.isMainKey))==null?void 0:j.prop)??((A=x==null?void 0:x[0])==null?void 0:A.prop);let k=(Y=(N=L==null?void 0:L.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:N.contents)==null?void 0:Y.find(U=>(U==null?void 0:U[x])===T);return(b=l==null?void 0:l.contents)==null?void 0:b.map(U=>{var X;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(X=U.contents)==null?void 0:X.map(be=>(be.value=k==null?void 0:k[be==null?void 0:be.prop],be))),U})}return l==null?void 0:l.contents},Xd=l=>{var r,n,t,s,c;if((r=l==null?void 0:l.extra)!=null&&r.row){let g=l==null?void 0:l.filter;if(g!=null&&g.includes("*")&&(g="({"+((t=(n=g==null?void 0:g.replace("{",tr))==null?void 0:n.split(tr))==null?void 0:t[1])),g=(s=g==null?void 0:g.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(g==null?void 0:g[0])!=="("&&(g="("+g+")"),g.slice(1,(g==null?void 0:g.length)-1)==="undefined")return l==null?void 0:l.contents;let h=sa.calculatorAndToOr(g),v=h==null?void 0:h[0],m=(c=l==null?void 0:l.extra)==null?void 0:c.row,u=[];for(let _ in v)(v==null?void 0:v[_])===(m==null?void 0:m[_])?u.push(!0):u.push(!1);return u!=null&&u.every(_=>_===!0)?l==null?void 0:l.contents:[]}else return l==null?void 0:l.contents},Zd=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"tab",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Qd=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"choice",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},ep=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"fixType",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},ap=l=>{var r;if(l!=null&&l.filter){let n=l==null?void 0:l.contents,t=l==null?void 0:l.filter;return(t==null?void 0:t[0])==="{"&&(t=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)),t=(r=La.analyzeSplitToContent(t,","))==null?void 0:r.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),s)),n.push({key:"stepName",contents:t}),n}return l==null?void 0:l.contents},lp=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"step",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Ys={onNumSlice:Vd,onRandomContents:Rd,onConditionContents:$d,onFatherPaceContents:Pd,onPaceContents:Fd,onMainTagContents:jd,onButtonContents:Hd,onPamButtonContents:Ud,onRowButtonContents:qd,onRelated:Jd,onRowNum:Kd,onFixRow:Yd,onReqItem:Gd,onBottomButtonContents:Wd,onConditionContent:Xd,onTabs:Zd,onSinChoice:Qd,onTextSize:Id,onTextRGBA:Ld,onPosition:Md,onSize:Od,onShowType:ep,onStepName:ap,onStep:lp},rp=async(l,r)=>{var c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k;let n="";if(((c=l==null?void 0:l.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(g=l==null?void 0:l.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:g.contents),n===""||!n)return l;(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n=(v=(h=n==null?void 0:n.replace("(",tr))==null?void 0:h.split(tr))==null?void 0:v[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let t=(m=La.analyzeSplitToContent(n,","))==null?void 0:m.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$!=null&&$.includes("(")||($=$==null?void 0:$.replaceAll(":","=")),$)),s=l;for(let $ in t){let U,X="";(u=t==null?void 0:t[$])!=null&&u.includes("(")?(U=(z=(S=(_=t==null?void 0:t[$])==null?void 0:_.replace("(",tr))==null?void 0:S.split(tr))==null?void 0:z[0],X="("+((A=(j=(w=t==null?void 0:t[$])==null?void 0:w.replace("(",tr))==null?void 0:j.split(tr))==null?void 0:A[1])):(U=(b=(Y=(N=t==null?void 0:t[$])==null?void 0:N.replace("=",tr))==null?void 0:Y.split(tr))==null?void 0:b[0],X=(x=(T=(L=t==null?void 0:t[$])==null?void 0:L.replace("=",tr))==null?void 0:T.split(tr))==null?void 0:x[1]);let be=(k=cn==null?void 0:cn.find(ze=>(ze==null?void 0:ze.key)===U))==null?void 0:k.value;if(be){const ze=Ys[be];s=await ze({contents:s,filter:X})}}return s},_o=async(l,r)=>{var g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U;let n="";if(((g=l==null?void 0:l.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:g.contents)!==""&&(n=(h=l==null?void 0:l.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:h.contents),n===""||!n)return l;(n==null?void 0:n[0])===","&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n==null?void 0:n[0])==="@"||(n=(m=(v=n==null?void 0:n.replace("(",tr))==null?void 0:v.split(tr))==null?void 0:m[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let t=(u=La.analyzeSplitToContent(n,","))==null?void 0:u.map(X=>((X==null?void 0:X[(X==null?void 0:X.length)-1])===","&&(X=X==null?void 0:X.slice(0,(X==null?void 0:X.length)-1)),X!=null&&X.includes("(")||(X=X==null?void 0:X.replaceAll(":","=")),X)),s=l,c=new Map;t==null||t.forEach(X=>{var ze,Ee,ne;let be=(ze=X==null?void 0:X.split("="))==null?void 0:ze[0];if(be==="@MainPam"&&c.get(be)){let ke=c.get(be);ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1);let Z=(ne=(Ee=X==null?void 0:X.replace("{",tr))==null?void 0:Ee.split(tr))==null?void 0:ne[1];Z=ke+","+Z,c.set(be,Z)}else c.set(be,X)}),t=Array.from(c.values()),t=t==null?void 0:t.sort((X,be)=>{var ze,Ee;return((ze=cn==null?void 0:cn.find(ne=>be==null?void 0:be.includes(ne==null?void 0:ne.key)))==null?void 0:ze.order)-((Ee=cn==null?void 0:cn.find(ne=>X==null?void 0:X.includes(ne==null?void 0:ne.key)))==null?void 0:Ee.order)});for(let X in t){let be,ze="";(_=t==null?void 0:t[X])!=null&&_.includes("(")&&((S=t==null?void 0:t[X])!=null&&S.includes("@Filter"))?(be=(j=(w=(z=t==null?void 0:t[X])==null?void 0:z.replace("(",tr))==null?void 0:w.split(tr))==null?void 0:j[0],ze="("+((Y=(N=(A=t==null?void 0:t[X])==null?void 0:A.replace("(",tr))==null?void 0:N.split(tr))==null?void 0:Y[1])):(be=(T=(L=(b=t==null?void 0:t[X])==null?void 0:b.replace("=",tr))==null?void 0:L.split(tr))==null?void 0:T[0],ze=($=(k=(x=t==null?void 0:t[X])==null?void 0:x.replace("=",tr))==null?void 0:k.split(tr))==null?void 0:$[1]);let Ee=(U=cn==null?void 0:cn.find(ne=>(ne==null?void 0:ne.key)===be))==null?void 0:U.value;if(Ee){const ne=Ys[Ee];s=await ne({contents:s,filter:ze,extra:r})}}return s};let to="$R";const np=I.useUnit(I.pinia),{selectTitle:tp}=I.storeToRefs(np);let op=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],ip=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],sp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],cp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const Qi=async(l,r,n=!0)=>{let t=[],s=l==null?void 0:l.map(async c=>{var _,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl;let g=(w=(z=(S=(_=c==null?void 0:c.contents)==null?void 0:_.find(Ra=>{var al;return(al=Ra==null?void 0:Ra.key)==null?void 0:al.includes("struct")}))==null?void 0:S.value)==null?void 0:z[0])==null?void 0:w.类型,h=Object.values(c==null?void 0:c.name);h=h==null?void 0:h.reverse();let v=(j=c==null?void 0:c.contents)==null?void 0:j.map(Ra=>Ra==null?void 0:Ra.key),m={comp:g,isShow:c==null?void 0:c.is_show,name:h==null?void 0:h[0],id:c==null?void 0:c.object_id,relatedTables:v,menuFilter:(A=c==null?void 0:c.filter)==null?void 0:A.menuFilter,status:c==null?void 0:c.status,fatherSyncContents:(N=c==null?void 0:c.filter)==null?void 0:N.fatherSyncs,relatedQuotes:(Y=c==null?void 0:c.filter)==null?void 0:Y.quotes,sonSyncContents:(b=c==null?void 0:c.filter)==null?void 0:b.sonSyncs};for(let Ra in h)parseInt(Ra)>=1&&(m[`name${parseInt(Ra)-1}`]=h[Ra]);let u=(T=(L=c==null?void 0:c.filter)==null?void 0:L.menuFilter)==null?void 0:T.split(",");if(((x=u==null?void 0:u.filter(Ra=>Ra==null?void 0:Ra.includes("@Filter")))==null?void 0:x.length)>0){let Ra=u==null?void 0:u.filter(Xe=>Xe==null?void 0:Xe.includes("@Filter"));Ra=Ra==null?void 0:Ra[0],Ra=($=(k=Ra==null?void 0:Ra.replace("(",to))==null?void 0:k.split(to))==null?void 0:$[1],Ra=Ra==null?void 0:Ra.slice(0,(Ra==null?void 0:Ra.length)-1),Ra!=null&&Ra.includes("*")&&(Ra=(X=(U=Ra==null?void 0:Ra.replace("{",to))==null?void 0:U.split(to))==null?void 0:X[1],Ra=Ra==null?void 0:Ra.replace("}","")),Ra=sa.calculatorAndToOr(Ra);let al=(r==null?void 0:r.originPath)??"";(al==null?void 0:al[(al==null?void 0:al.length)-1])==="/"&&(al=al==null?void 0:al.slice(0,(al==null?void 0:al.length)-1));let ga=await $r(al,!1),qe=(be=ga==null?void 0:ga.filter(Xe=>(Xe==null?void 0:Xe.comp)==="Table"))==null?void 0:be[0];qe=(Ee=(ze=qe==null?void 0:qe.compData)==null?void 0:ze.find(Xe=>(Xe==null?void 0:Xe.key)==="tableContents"))==null?void 0:Ee.contents;let rl=(ke=(ne=tp.value)==null?void 0:ne.find(Xe=>(Xe==null?void 0:Xe.condition)==="child"))==null?void 0:ke.value;qe=(Z=qe==null?void 0:qe.map(Xe=>{for(let oa in Xe)if((Xe==null?void 0:Xe[oa])===rl)return Xe}))==null?void 0:Z.filter(Xe=>Xe),qe=qe==null?void 0:qe[0],Ra=Ra==null?void 0:Ra[0];let da=[];for(let Xe in Ra){let oa="";el.isObject(qe)&&(oa=(Ke=(de=Object.keys(qe))==null?void 0:de.filter(aa=>aa==null?void 0:aa.includes("."+Xe)))==null?void 0:Ke[0]),oa!==""&&(qe!=null&&qe[oa])&&(Ra==null?void 0:Ra[Xe])===(qe==null?void 0:qe[oa])||qe!=null&&qe[Xe]&&(Ra==null?void 0:Ra[Xe])===(qe==null?void 0:qe[Xe])?da.push(!0):da.push(!1)}if(da!=null&&da.some(Xe=>Xe===!1)&&((te=r==null?void 0:r.originPath)==null?void 0:te[((Na=r==null?void 0:r.originPath)==null?void 0:Na.length)-1])!=="/")return}if(g==="Table"||g==="Method"){let Ra=((D=c==null?void 0:c.contents)==null?void 0:D.find(W=>{var la;return(la=W==null?void 0:W.key)==null?void 0:la.includes("content")}))||[],al=[];m.comp="Table",Ra.value=(le=Ra==null?void 0:Ra.value)==null?void 0:le.sort((W,la)=>parseInt(W==null?void 0:W.id)-parseInt(la==null?void 0:la.id)),Ra.value=(ye=Ra==null?void 0:Ra.value)==null?void 0:ye.map(W=>{let la={};for(let ka in W)JSON.stringify(W==null?void 0:W[ka])==="{}"?la[ka]="":la[ka]=W==null?void 0:W[ka];return la}),al.push({key:"tableContents",contents:Ra==null?void 0:Ra.value});let ga=(ja=(wa=(pa=(Ne=(ue=c==null?void 0:c.contents)==null?void 0:ue.find(W=>{var la;return(la=W==null?void 0:W.key)==null?void 0:la.includes("struct")}))==null?void 0:Ne.value)==null?void 0:pa[0])==null?void 0:wa.结构)==null?void 0:ja.contents;Array.isArray(ga==null?void 0:ga[0])?ga[0]=(ee=ga==null?void 0:ga[0])==null?void 0:ee.filter(W=>(W==null?void 0:W.prop)!=="sort"&&(W==null?void 0:W.prop)!=="relatedId"):ga=ga==null?void 0:ga.filter(W=>(W==null?void 0:W.prop)!=="sort"&&(W==null?void 0:W.prop)!=="relatedId"),al.push({key:"header",contents:ga}),al.push({key:"filter",contents:(Te=(He=(xa=(Pe=(ea=c==null?void 0:c.contents)==null?void 0:ea.find(W=>{var la;return(la=W==null?void 0:W.key)==null?void 0:la.includes("struct")}))==null?void 0:Pe.value)==null?void 0:xa[0])==null?void 0:He.引用)==null?void 0:Te.contents});let qe=op,rl=I.cloneDeep(ip);g==="Method"&&rl.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(ga==null?void 0:ga[0])&&((Re=ga==null?void 0:ga[0])==null?void 0:Re.prop)==="disabled"&&(qe=sp,rl=cp);const da=["推力","真空","压力","温度","流量"],Xe=m.name;Xe&&da.includes(Xe)&&(qe=[...qe],qe.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let oa=[];if(!Array.isArray(ga==null?void 0:ga[0])&&(ga!=null&&ga.some(W=>{var la;return(W==null?void 0:W.calculatorFilter)&&((la=W==null?void 0:W.calculatorFilter)==null?void 0:la.includes("Manual"))}))){let W=(Ye=ga==null?void 0:ga.map(la=>la==null?void 0:la.calculatorFilter))==null?void 0:Ye.filter(la=>la&&(la==null?void 0:la.includes("Manual")));W==null||W.forEach(la=>{var Ce;let ka=La.analyzeSplitToContent(la,",");if(ka=ka==null?void 0:ka.map(Be=>((Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===","&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Be)),ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Extent"))&&(Be==null?void 0:Be.includes("Row")))&&(ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Button"))&&(Be==null?void 0:Be.includes(","))))){let Be=ka==null?void 0:ka.find(Fa=>Fa==null?void 0:Fa.includes("@Button"));Be=(Ce=Be==null?void 0:Be.split("="))==null?void 0:Ce[1],Be=Be==null?void 0:Be.slice(1,(Be==null?void 0:Be.length)-1),Be=Be==null?void 0:Be.split(","),Be=Be==null?void 0:Be[(Be==null?void 0:Be.length)-1],oa.push(Be)}}),oa=[...new Set(oa)],oa=oa==null?void 0:oa.map(la=>({label:la,prop:la,type:"methodButton"}))}else if(Array.isArray(ga==null?void 0:ga[0])&&((qa=sa.getColumnChild(ga==null?void 0:ga[0]))!=null&&qa.some(W=>{var la;return(W==null?void 0:W.calculatorFilter)&&((la=W==null?void 0:W.calculatorFilter)==null?void 0:la.includes("Manual"))}))){let W=(P=(Va=sa.getColumnChild(ga==null?void 0:ga[0]))==null?void 0:Va.map(la=>la==null?void 0:la.calculatorFilter))==null?void 0:P.filter(la=>la&&(la==null?void 0:la.includes("Manual")));W==null||W.forEach(la=>{var Ce;let ka=La.analyzeSplitToContent(la,",");if(ka=ka==null?void 0:ka.map(Be=>((Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===","&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Be)),ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Extent"))&&(Be==null?void 0:Be.includes("Row")))&&(ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Button"))&&(Be==null?void 0:Be.includes(","))))){let Be=ka==null?void 0:ka.find(Fa=>Fa==null?void 0:Fa.includes("@Button"));Be=(Ce=Be==null?void 0:Be.split("="))==null?void 0:Ce[1],Be=Be==null?void 0:Be.slice(1,(Be==null?void 0:Be.length)-1),Be=Be==null?void 0:Be.split(","),Be=Be==null?void 0:Be[(Be==null?void 0:Be.length)-1],oa.push(Be)}}),oa=[...new Set(oa)],oa=oa==null?void 0:oa.map(la=>({label:la,prop:la,type:"methodButton"}))}al.push({key:"extraButton",contents:qe}),al.push({key:"rowButton",contents:[...rl,...oa]}),m.compData=await _o(al,r),(F=m.compData)!=null&&F.find(W=>(W==null?void 0:W.key)==="tab")&&(m.tab=(ie=(J=m.compData)==null?void 0:J.find(W=>(W==null?void 0:W.key)==="tab"))==null?void 0:ie.contents),(ce=m.compData)!=null&&ce.find(W=>(W==null?void 0:W.key)==="step")&&(m.step=(na=(ma=m.compData)==null?void 0:ma.find(W=>(W==null?void 0:W.key)==="step"))==null?void 0:na.contents),(Ie=m.compData)!=null&&Ie.find(W=>(W==null?void 0:W.key)==="choice")&&(m.choice=(Ca=(_e=m.compData)==null?void 0:_e.find(W=>(W==null?void 0:W.key)==="choice"))==null?void 0:Ca.contents);let aa="",ca=(ve=m==null?void 0:m.compData)==null?void 0:ve.filter(W=>(W==null?void 0:W.key)==="fixType");(ca==null?void 0:ca.length)>0&&n&&(aa=(Je=ca==null?void 0:ca[0])==null?void 0:Je.contents,m.comp=aa)}else if(g==="Form"){let Ra=[],al=(_a=(Fe=(Qe=c==null?void 0:c.contents)==null?void 0:Qe.find(qe=>{var rl;return(rl=qe==null?void 0:qe.key)==null?void 0:rl.includes("content")}))==null?void 0:Fe.value)==null?void 0:_a[0],ga=(De=(je=(K=(Se=(re=(va=(Le=c==null?void 0:c.contents)==null?void 0:Le.find(qe=>{var rl;return(rl=qe==null?void 0:qe.key)==null?void 0:rl.includes("struct")}))==null?void 0:va.value)==null?void 0:re[0])==null?void 0:Se.结构)==null?void 0:K.contents)==null?void 0:je.map(qe=>(qe.value=al==null?void 0:al[qe==null?void 0:qe.prop],qe)))==null?void 0:De.filter(qe=>(qe==null?void 0:qe.prop)!=="sort"&&(qe==null?void 0:qe.prop)!=="relatedId");Ra.push({key:"filter",contents:(Ae=(Aa=(Ua=(Ba=(Ma=c==null?void 0:c.contents)==null?void 0:Ma.find(qe=>{var rl;return(rl=qe==null?void 0:qe.key)==null?void 0:rl.includes("struct")}))==null?void 0:Ba.value)==null?void 0:Ua[0])==null?void 0:Aa.引用)==null?void 0:Ae.contents}),Ra.push({key:"formContent",contents:ga}),m.compData=await rp(Ra),(we=m.compData)!=null&&we.find(qe=>(qe==null?void 0:qe.key)==="tab")&&(m.tab=(Ge=(Ea=m.compData)==null?void 0:Ea.find(qe=>(qe==null?void 0:qe.key)==="tab"))==null?void 0:Ge.contents),(ol=m.compData)!=null&&ol.find(qe=>(qe==null?void 0:qe.key)==="step")&&(m.step=(Nl=(Sl=m.compData)==null?void 0:Sl.find(qe=>(qe==null?void 0:qe.key)==="step"))==null?void 0:Nl.contents)}return m});return t=await Promise.all(s),t},up=I.useLoginState(I.pinia),{loginUserInfo:yt}=I.storeToRefs(up),di=async(l,r,n="Manual",t=[])=>{var v;let s=l,c;Array.isArray(r==null?void 0:r[0])?c=sa.getColumnChild(r==null?void 0:r[0]):c=r;let g=(v=c==null?void 0:c.filter(m=>{var u;return(m==null?void 0:m.calculatorFilter)&&((u=m==null?void 0:m.calculatorFilter)==null?void 0:u.includes(n))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:v.map(m=>({prop:m==null?void 0:m.prop,label:m==null?void 0:m.label,methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),h=s==null?void 0:s.map(async m=>(m=await mp(m,g,c,n,s,t),m));return h=await Promise.all(h),h},dp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c;return Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(g=>{var h;if(r!=null&&r[g]){let v=r==null?void 0:r[g];c=c?v?La.isEqual(v.toString(),c.toString()):void 0:v}else{let v=(h=s==null?void 0:s.find(u=>(u==null?void 0:u.label)===g))==null?void 0:h.prop,m=(r==null?void 0:r[v])??0;c=c?m?La.isEqual(m.toString(),c.toString()):void 0:m}}),r[t]=c===void 0?void 0:c?1:0,r},fr=l=>{const[r,n,t]=I.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(r??0)*3600+(n??0)*60+(t??0)},Un=l=>{const r=c=>c.toString().padStart(2,"0"),n=Math.floor(l/3600),t=Math.floor(l%3600/60),s=l%60;return`${r(n)}:${r(t)}:${parseInt(r(s))}`},pp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j,A,N;if(r!=null&&r[v]){if(c==="Row")if(!((u=((m=r==null?void 0:r[v])==null?void 0:m.toString())??"")!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let Y=+(r==null?void 0:r[v]);h=h+Y}else h=fr(h.toString())+fr((S=r==null?void 0:r[v])==null?void 0:S.toString()),h=Un(h)}else if(c==="Row"){let Y=(z=s==null?void 0:s.find(b=>(b==null?void 0:b.label)===v))==null?void 0:z.prop;if(!((j=Number.isNaN(r==null?void 0:r[Y])?"":(w=r==null?void 0:r[Y])==null?void 0:w.toString())!=null&&j.includes(":"))&&!((A=h==null?void 0:h.toString())!=null&&A.includes(":"))){let b=+((r==null?void 0:r[Y])??0);h=h+b}else h=fr(h==null?void 0:h.toString())+fr((N=(r==null?void 0:r[Y])??0)==null?void 0:N.toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_+S},0)}return r[t]=h,r},fp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j;if(r!=null&&r[v]){if(c==="Row")if(!((u=(m=r==null?void 0:r[v])==null?void 0:m.toString())!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let A=+(r==null?void 0:r[v]);h=h===0?h+A:h-A}else h=h===0?fr(h.toString())+fr(r==null?void 0:r[v].toString()):fr(h.toString())-fr(r==null?void 0:r[v].toString()),h=Un(h)}else if(c==="Row"){let A=(S=s==null?void 0:s.find(N=>(N==null?void 0:N.label)===v))==null?void 0:S.prop;if(!((w=Number.isNaN(r==null?void 0:r[A])?"":(z=r==null?void 0:r[A])==null?void 0:z.toString())!=null&&w.includes(":"))&&!((j=h==null?void 0:h.toString())!=null&&j.includes(":"))){let N=+((r==null?void 0:r[A])??0);h=h===0?h+N:h-N}else h=h===0?fr(h.toString())+fr(((r==null?void 0:r[A])??0).toString()):fr(h.toString())-fr(((r==null?void 0:r[A])??0).toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_-S},0)}return r[t]=h,r},hp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j;if(r!=null&&r[v]){if(c==="Row")if(!((u=(m=r==null?void 0:r[v])==null?void 0:m.toString())!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let A=+(r==null?void 0:r[v]);h=h===0?h+A:h*A}else h=h===0?fr(h.toString())+fr(r==null?void 0:r[v].toString()):fr(h.toString())*fr(r==null?void 0:r[v].toString()),h=Un(h)}else if(c==="Row"){let A=(S=s==null?void 0:s.find(N=>(N==null?void 0:N.label)===v))==null?void 0:S.prop;if(!(r!=null&&r[A]))h=void 0;else if(!((w=Number.isNaN(r==null?void 0:r[A])?"":(z=r==null?void 0:r[A])==null?void 0:z.toString())!=null&&w.includes(":"))&&!((j=h==null?void 0:h.toString())!=null&&j.includes(":"))){let N=+((r==null?void 0:r[A])??0);h=h===0?h+N:h*N}else h=h===0?fr(h.toString())+fr(((r==null?void 0:r[A])??0).toString()):fr(h.toString())*fr(((r==null?void 0:r[A])??0).toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_*S},0)}return r[t]=h,r},vp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j;if(r!=null&&r[v]){if(c==="Row")if(!((u=(m=r==null?void 0:r[v])==null?void 0:m.toString())!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let A=+(r==null?void 0:r[v]);h=h===0?h+A:h/A}else h=h===0?fr(h.toString())+fr(r==null?void 0:r[v].toString()):fr(h.toString())/fr(r==null?void 0:r[v].toString()),h=Un(h)}else if(c==="Row"){let A=(S=s==null?void 0:s.find(N=>(N==null?void 0:N.label)===v))==null?void 0:S.prop;if(!((w=Number.isNaN(r==null?void 0:r[A])?"":(z=r==null?void 0:r[A])==null?void 0:z.toString())!=null&&w.includes(":"))&&!((j=h==null?void 0:h.toString())!=null&&j.includes(":"))){let N=+((r==null?void 0:r[A])??0);h=h===0?h+N:h/N}else h=h===0?fr(h.toString())+fr(((r==null?void 0:r[A])??0).toString()):fr(h.toString())/fr(((r==null?void 0:r[A])??0).toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_/S},0)}return r[t]=h.toFixed(2),r},oo={Sum:pp,Substract:fp,Multiple:hp,Divide:vp,Compare:dp},mp=async(l,r,n,t="Auto",s,c=[])=>{var u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne;let g=l,h=[],v=await I.getPageDataApi({platId:parseInt((u=yt==null?void 0:yt.value)==null?void 0:u.plat_id),pageName:"menu"});v=(z=(S=(_=v==null?void 0:v.data)==null?void 0:_.result)==null?void 0:S.filter(ke=>(ke==null?void 0:ke.property_name)===""))==null?void 0:z[0];let m=[];if(v!=null&&v.object_name){v=v==null?void 0:v.object_name;let ke=await I.getPageDataApi({platId:parseInt((w=yt==null?void 0:yt.value)==null?void 0:w.plat_id),pageName:v});ke=(b=(Y=(N=(A=(j=ke==null?void 0:ke.data)==null?void 0:j.result)==null?void 0:A[0])==null?void 0:N.contents)==null?void 0:Y.find(Z=>{var de;return(de=Z==null?void 0:Z.key)==null?void 0:de.includes("content")}))==null?void 0:b.value,h=(L=ke==null?void 0:ke.map(Z=>({functionName:Z==null?void 0:Z.函数名称,functionContent:Z==null?void 0:Z.输出值})))==null?void 0:L.filter(Z=>(Z==null?void 0:Z.functionContent)!==""),h==null||h.forEach(Z=>{m.push(Z.functionName),oo[Z.functionName]=new Function("return "+Z.functionContent)()})}if((r==null?void 0:r.length)===0)return g;for(let ke in r){let Z=(T=r==null?void 0:r[ke])==null?void 0:T.functionName;const de=oo==null?void 0:oo[Z];let Ke=(x=r==null?void 0:r[ke])==null?void 0:x.methods;if(Ke=La.analyzeSplitToContent(Ke,","),(k=Ke==null?void 0:Ke.find(Na=>Na==null?void 0:Na.includes("@Type")))!=null&&k.includes(t)||(Ke==null?void 0:Ke.length)===0){let Na=((X=(U=($=Ke==null?void 0:Ke.find(te=>te==null?void 0:te.includes("@Extent")))==null?void 0:$.replace(":","="))==null?void 0:U.split("="))==null?void 0:X[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(te=>te===Z)){let te="";try{let le=(be=r==null?void 0:r[ke])==null?void 0:be.functionRelatedWords,ye=(c==null?void 0:c.length)>0?c==null?void 0:c.map(Ne=>{var pa;return Ne==null?void 0:Ne[(pa=r==null?void 0:r[ke])==null?void 0:pa.prop]}):["0"];ye=ye==null?void 0:ye.map(Ne=>Ne==null?void 0:Ne.slice((Ne==null?void 0:Ne.length)-5,Ne==null?void 0:Ne.length)),ye=ye==null?void 0:ye.map(Ne=>La.isNumber(parseInt(Ne))&&parseInt(Ne)?parseInt(Ne):0);let ue=Math.max(...ye);le=le==null?void 0:le.map(Ne=>{if(Ne!=null&&Ne.includes("'"))return Ne==null?void 0:Ne.replaceAll("'","");if(Ne!=null&&Ne.includes("@"))return ue+1;{let pa=Object.keys(g);return Ne=(g==null?void 0:g[Ne])??(g==null?void 0:g[pa==null?void 0:pa.find(wa=>wa==null?void 0:wa.includes("."+Ne))]),Ne}}),te=de(...le)}catch(le){el.ElMessage.warning("关联数据出现错误,"+le.message)}let D=(ze=r==null?void 0:r[ke])==null?void 0:ze.prop;g[D]=te}else g=de({contents:g,valueString:(Ee=r==null?void 0:r[ke])==null?void 0:Ee.functionRelatedWords,prop:(ne=r==null?void 0:r[ke])==null?void 0:ne.prop,headers:n,typeString:Na,allContents:s})}}return g},yp=I.useLoginState(I.pinia),{loginUserInfo:Hr}=I.storeToRefs(yp),gp=I.useMenuState(I.pinia),{activeMenuPath:es,currentMenuPath:io}=I.storeToRefs(gp),Gs=I.useUnit(I.pinia);let as="$R";const{selectTitle:xt}=I.storeToRefs(Gs),Js=async(l,r)=>{var g,h,v,m,u,_,S,z,w,j,A,N,Y;let n=es.value,t="",s=((g=xt==null?void 0:xt.value)==null?void 0:g.find(b=>(b==null?void 0:b.condition)==="child"&&!(b!=null&&b.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(n=r?n:(h=l==null?void 0:l[0])==null?void 0:h.object_name,t=(v=l==null?void 0:l[0])==null?void 0:v.father_name);let c=[];if(t!==""){let b=t;(b==null?void 0:b[(b==null?void 0:b.length)-1])==="/"&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1));let L=await $r(b,!1);L=(m=L==null?void 0:L[0])==null?void 0:m.compData;let T=(u=L==null?void 0:L.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:u.contents;T=((_=T==null?void 0:T.find(k=>k==null?void 0:k.isMainKey))==null?void 0:_.prop)??((S=T==null?void 0:T[0])==null?void 0:S.prop);let x=(w=(z=L==null?void 0:L.find(k=>(k==null?void 0:k.key)==="tableContents"))==null?void 0:z.contents)==null?void 0:w.map(k=>({label:k==null?void 0:k[T],value:k==null?void 0:k[T]}));c=(j=t==null?void 0:t.split("/"))==null?void 0:j.map(k=>(k===""?s?(s.isShow=!0,k=s):k={value:k,condition:"child",options:x,parentContent:(t==null?void 0:t[(t==null?void 0:t.length)-1])==="/"?t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1):t,isShow:!0}:k={condition:"parent",value:k.trim(),isShow:!0},k))}if(n!==""){let b=(A=n==null?void 0:n.split("/"))==null?void 0:A.map(L=>(L={condition:"normal",value:L.trim(),isShow:!0},L));((N=b==null?void 0:b[0])==null?void 0:N.value)===((Y=c==null?void 0:c[0])==null?void 0:Y.value)&&(b=b==null?void 0:b.filter((L,T)=>T!==0)),c=[...c??[],...b??[]]}t===""&&s&&((s==null?void 0:s.parentContent)!==es.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&c.push(s)),Gs.setSelectTitle(c)},bp=async l=>{var c,g,h,v,m,u,_,S,z;let r=await I.getPageDataApi({platId:parseInt((c=Hr==null?void 0:Hr.value)==null?void 0:c.plat_id),pageName:"menu"}),n=(g=r==null?void 0:r.data)==null?void 0:g.result,t=(u=(m=(v=(h=l==null?void 0:l.filter(w=>(w==null?void 0:w.comp)==="Table"))==null?void 0:h[0])==null?void 0:v.compData)==null?void 0:m.find(w=>(w==null?void 0:w.key)==="filter"))==null?void 0:u.contents;t=(z=(S=(_=t==null?void 0:t.replace("(",as))==null?void 0:_.split(as))==null?void 0:S[0])==null?void 0:z.replaceAll(":","/");let s=n==null?void 0:n.filter(w=>{var j;return(w==null?void 0:w.object_name)===io.value+"/"||((j=io.value)==null?void 0:j.includes(t))&&t+"/"===(w==null?void 0:w.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(w=>{var j;return(w==null?void 0:w.comp)==="Table"&&(w.compData=(j=w==null?void 0:w.compData)==null?void 0:j.map(A=>{var N,Y,b;return(A==null?void 0:A.key)==="header"&&(Array.isArray((N=A.contents)==null?void 0:N[0])?A.contents[0]=(b=A.contents[0])==null?void 0:b.map((L,T)=>{var x;return T===0&&(L.isExistChild=!0,(x=io.value)!=null&&x.includes(t)&&(L.fatherPath=t)),L}):A.contents=(Y=A.contents)==null?void 0:Y.map((L,T)=>{var x;return T===0&&(L.isExistChild=!0,(x=io.value)!=null&&x.includes(t)&&(L.fatherPath=t)),L})),A})),w})),l},$r=async(l,r,n={})=>{var g,h,v,m,u,_,S,z,w,j,A,N;let t=await I.getPageDataApi({platId:parseInt((g=Hr==null?void 0:Hr.value)==null?void 0:g.plat_id),pageName:l}),s=(h=t==null?void 0:t.data)==null?void 0:h.result;if((s==null?void 0:s.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==l){let Y=await I.getPageDataApi({platId:parseInt((v=Hr==null?void 0:Hr.value)==null?void 0:v.plat_id),pageName:n==null?void 0:n.originPath});if(((u=(m=Y==null?void 0:Y.data)==null?void 0:m.result)==null?void 0:u.length)>0){let b=await Qi((_=Y==null?void 0:Y.data)==null?void 0:_.result,n,!1);b=b==null?void 0:b.map(async x=>{var U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va;let k=[],$=(U=Object.keys(x))==null?void 0:U.filter(P=>P==null?void 0:P.includes("name"));for(let P in x)$!=null&&$.find(F=>F===P)&&k.push(x==null?void 0:x[P]);if(k=k.reverse(),(x==null?void 0:x.comp)==="Table"){let P=(ze=(be=(X=x==null?void 0:x.compData)==null?void 0:X.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:ze.map(J=>{let ie={};for(let ce in J)ce!=="id"&&ce!=="create_time"&&ce!=="update_time"&&ce!=="sort"&&ce!=="create_user_id"&&ce!=="update_user_id"&&ce!=="department_id"&&ce!=="relatedId"&&(ie[ce]=J==null?void 0:J[ce]);return J=Object.values(ie),J}),F=(ne=(Ee=x==null?void 0:x.compData)==null?void 0:Ee.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:ne.contents;if(Array.isArray(F==null?void 0:F[0])?(F[0].push({label:"排序",prop:"sort"}),F[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(ke=F[0])!=null&&ke.find(J=>(J==null?void 0:J.prop)==="disabled")&&(F[0]=(Z=F[0])==null?void 0:Z.filter(J=>(J==null?void 0:J.prop)!=="disabled"),F[0].unshift({label:"",prop:"disabled",sortable:!1}))):(F.push({label:"排序",prop:"sort"}),F.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),F!=null&&F.find(J=>(J==null?void 0:J.prop)==="disabled")&&(F=F==null?void 0:F.filter(J=>(J==null?void 0:J.prop)!=="disabled"),F.unshift({label:"",prop:"disabled",sortable:!1}))),F!=null&&F.some(J=>{var ie;return(J==null?void 0:J.calculatorFilter)&&((ie=J==null?void 0:J.calculatorFilter)==null?void 0:ie.includes("Auto"))})&&(P=await di(P,F,"Auto"),P=P==null?void 0:P.map(J=>Object.values(J))),x!=null&&x.fatherSyncContents){Array.isArray((de=x==null?void 0:x.fatherSyncContents)==null?void 0:de[0])&&(x.fatherSyncContents=(Ke=x==null?void 0:x.fatherSyncContents)==null?void 0:Ke[0]);let J=(Na=xt.value)==null?void 0:Na.find(ie=>(ie==null?void 0:ie.condition)==="child");x.fatherSyncContents=(te=x==null?void 0:x.fatherSyncContents)==null?void 0:te.map(ie=>{var ce,ma,na,Ie,_e,Ca;return((ma=ie==null?void 0:ie.menus)==null?void 0:ma[((ce=ie==null?void 0:ie.menus)==null?void 0:ce.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"!==(ie==null?void 0:ie.menus)?ie.menus=(ie==null?void 0:ie.menus)+(J==null?void 0:J.value):((Ie=ie==null?void 0:ie.menus)==null?void 0:Ie[((na=ie==null?void 0:ie.menus)==null?void 0:na.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"===(ie==null?void 0:ie.menus)&&(ie.menus=(Ca=ie.menus)==null?void 0:Ca.slice(0,((_e=ie.menus)==null?void 0:_e.length)-1)),ie})}if(x!=null&&x.sonSyncContents){Array.isArray((D=x==null?void 0:x.sonSyncContents)==null?void 0:D[0])&&(x.sonSyncContents=(le=x==null?void 0:x.sonSyncContents)==null?void 0:le[0]);let J=(ye=xt.value)==null?void 0:ye.find(ie=>(ie==null?void 0:ie.condition)==="child");x.sonSyncContents=(ue=x==null?void 0:x.sonSyncContents)==null?void 0:ue.map(ie=>{var ce,ma,na,Ie,_e,Ca;return((ma=ie==null?void 0:ie.menus)==null?void 0:ma[((ce=ie==null?void 0:ie.menus)==null?void 0:ce.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"!==(ie==null?void 0:ie.menus)?ie.menus=(ie==null?void 0:ie.menus)+(J==null?void 0:J.value):((Ie=ie==null?void 0:ie.menus)==null?void 0:Ie[((na=ie==null?void 0:ie.menus)==null?void 0:na.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"===(ie==null?void 0:ie.menus)&&(ie.menus=(Ca=ie.menus)==null?void 0:Ca.slice(0,((_e=ie.menus)==null?void 0:_e.length)-1)),ie})}if(x!=null&&x.relatedQuotes){Array.isArray((Ne=x==null?void 0:x.relatedQuotes)==null?void 0:Ne[0])&&(x.relatedQuotes=(pa=x==null?void 0:x.relatedQuotes)==null?void 0:pa[0]);let J=(wa=xt.value)==null?void 0:wa.find(ie=>(ie==null?void 0:ie.condition)==="child");x.relatedQuotes=(ja=x==null?void 0:x.relatedQuotes)==null?void 0:ja.map(ie=>{var ce,ma,na,Ie,_e,Ca;return((ma=ie==null?void 0:ie.menus)==null?void 0:ma[((ce=ie==null?void 0:ie.menus)==null?void 0:ce.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"!==(ie==null?void 0:ie.menus)?ie.menus=(ie==null?void 0:ie.menus)+(J==null?void 0:J.value):((Ie=ie==null?void 0:ie.menus)==null?void 0:Ie[((na=ie==null?void 0:ie.menus)==null?void 0:na.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"===(ie==null?void 0:ie.menus)&&(ie.menus=(Ca=ie.menus)==null?void 0:Ca.slice(0,((_e=ie.menus)==null?void 0:_e.length)-1)),ie})}x={filter:(ea=(ee=x==null?void 0:x.compData)==null?void 0:ee.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:ea.contents,key:x==null?void 0:x.comp,name:k,tableColumns:F,tableContents:P,menuFilter:x==null?void 0:x.menuFilter,fatherSyncContents:x==null?void 0:x.fatherSyncContents,relatedQuotes:x==null?void 0:x.relatedQuotes,sonSyncContents:x==null?void 0:x.sonSyncContents}}else{let P=(He=(xa=(Pe=x==null?void 0:x.compData)==null?void 0:Pe.find(J=>(J==null?void 0:J.key)==="formContent"))==null?void 0:xa.contents)==null?void 0:He.map(J=>(J==null?void 0:J.value)??"");P=[P];let F=(Ye=(Re=(Te=x==null?void 0:x.compData)==null?void 0:Te.find(J=>(J==null?void 0:J.key)==="formContent"))==null?void 0:Re.contents)==null?void 0:Ye.map(J=>(J.value="",J));x={contents:P,filter:(Va=(qa=x==null?void 0:x.compData)==null?void 0:qa.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:Va.contents,key:x==null?void 0:x.comp,name:k,value:F,fatherSyncContents:x==null?void 0:x.fatherSyncContents,relatedQuotes:x==null?void 0:x.relatedQuotes,sonSyncContents:x==null?void 0:x.sonSyncContents}}return x.isShow=!1,x}),b=await Promise.all(b);let L=[{key:"menuPath",contents:[{path:l,fatherPath:(w=(z=(S=Y==null?void 0:Y.data)==null?void 0:S.result)==null?void 0:z[0])==null?void 0:w.father_name,isShow:!1}]},{key:l,contents:b}];await I.createPlatFormDataApi({platId:parseInt((j=Hr==null?void 0:Hr.value)==null?void 0:j.plat_id),changeData:L});let T=await I.getPageDataApi({platId:parseInt((A=Hr==null?void 0:Hr.value)==null?void 0:A.plat_id),pageName:l});s=(N=T==null?void 0:T.data)==null?void 0:N.result}}r&&await Js(s,!!(n!=null&&n.originPath));let c=await Qi(s,n);return r&&(c=await bp(c)),c},ls=async l=>{var t,s,c,g,h,v,m,u,_,S,z;let r=(t=l==null?void 0:l.menus)==null?void 0:t.join("/");l!=null&&l.endChildMenu&&(l==null?void 0:l.endChildMenu)!==""&&(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+(l==null?void 0:l.endChildMenu)),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((c=(s=l.value)==null?void 0:s.split(" "))==null?void 0:c[0]));let n=await $r(r,!1);if(n=(g=n==null?void 0:n.filter(w=>{var j,A;return(w==null?void 0:w.name)===((A=l==null?void 0:l.groups)==null?void 0:A[((j=l==null?void 0:l.groups)==null?void 0:j.length)-1])}))==null?void 0:g[0],(v=(h=n==null?void 0:n.compData)==null?void 0:h.find(w=>(w==null?void 0:w.key)==="tableContents"))!=null&&v.contents){n=(u=(m=n==null?void 0:n.compData)==null?void 0:m.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:u.contents;let w=((_=l==null?void 0:l.words)==null?void 0:_[0])??(l==null?void 0:l.prop);return n=n==null?void 0:n.filter(j=>{var A,N,Y,b;return(j==null?void 0:j[l!=null&&l.endChildMenu?w:(A=l==null?void 0:l.words)==null?void 0:A[0]])===(l!=null&&l.relatedWords&&((N=l==null?void 0:l.relatedWords)==null?void 0:N.length)>0?(b=(Y=l.value)==null?void 0:Y.split(" "))==null?void 0:b[0]:l.value)}),n==null?void 0:n[0]}else{let w=(z=(S=n==null?void 0:n.compData)==null?void 0:S.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:z.contents,j={};return w==null||w.forEach(A=>{j[A.prop]=A.value}),j}},kp={key:0,class:"extra-button-content"},xp={class:"table-operator-wrap"},_p={key:0,class:"extra-button-filter"},wp={key:1,class:"extra-header"},Cp=["onClick"],Sp={class:"table-op-text"},Ep={class:"table-op-text"},Dp={class:"drop-menu",style:{width:"120px"}},Bp=["onClick"],Np={key:0},Tp={key:1},Ap=["onClick"],zp={class:"table-op-text"},Mp={key:1,class:"extra-button-content tabs-button-wrapper"},Op={class:"table-operator-wrap"},Ip={class:"extra-button-filter"},Lp={key:0,class:"extra-header"},Vp={class:"table-op-action"},Rp={class:"table-op-text"},$p={class:"drop-menu",style:{width:"120px"}},Pp={key:0},Fp={key:1},jp=["onClick"],Hp={class:"table-op-text"},Up={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(l,{emit:r}){const n=r,t=l,s=a.ref(""),c=a.ref(!1),g=a.ref([]),h=a.ref([{label:"清空",background:"#999999"},{label:"确认"}]),v=[{label:"新增",icon:"new"},{label:"导入",icon:"import_101"},{label:"导出",icon:"export_101"},{label:"导出paraform",icon:"export_101"},{label:"OCR识别",icon:"OCR识别"},{label:"切换视图",icon:"cardViewport_101"}];function m(x,k){return x.map($=>{const U={...$};return k.forEach(X=>{delete U[X]}),U})}function u(x){if(!x||x.t!=="n")return(x==null?void 0:x.v)??"";const k=x.v;if(x.z){const $=String(x.z).toLowerCase(),U=["yyyy/mm/dd","yyyy-mm-dd","yyyy.mm.dd","yy/mm/dd","yy-mm-dd","yy.mm.dd","mm/dd/yy","mm-dd-yy","mm.dd.yy","dd/mm/yy","dd-mm-yy","dd.mm.yy","m/d/yy","m/d/yyyy","d/m/yy","d/m/yyyy","yyyy年","yy年","m月","d日","yyyy年m月d日","yy年m月d日","[$-f800]","[$-f400]"];for(const ze of U)if($.includes(ze))return _(k);const X=/[ymdhms]/.test($),be=/^[0#\.\,\s]+$/.test($.replace(/[\\\/\-:]/g,""));if(X&&!be)return _(k)}if(k>=1&&k<=73050){if(k<5e3)return k;if(k>=5e3&&k<4e4){const $=Math.floor((k-25569)/365.25)+1970;return $>=1970&&$<=2e3&&x.z&&/[ymd]/.test(String(x.z).toLowerCase())?_(k):k}if(k>=4e4)return _(k)}return k}function _(x){if(typeof x!="number")return x;try{const k=new Date((x-25569)*86400*1e3);if(isNaN(k.getTime()))return x;const $=k.getFullYear(),U=String(k.getMonth()+1).padStart(2,"0"),X=String(k.getDate()).padStart(2,"0");return`${$}-${U}-${X}`}catch{return x}}const S=x=>{const k=x.raw;if(!k)return;const $=new FileReader;$.onload=U=>{try{const X=new Uint8Array(U.target.result),be=sa.readSync(X,{type:"array"}),ze=be.SheetNames[0],Ee=be.Sheets[ze],ke=sa.utils.decode_range(Ee["!ref"]).e.c+1,Z=new Array(ke).fill(""),de=[];for(const le in Ee){if(le[0]==="!")continue;const{r:ye,c:ue}=sa.utils.decode_cell(le),Ne=Ee[le];let pa=u(Ne);if((pa==null||pa==="")&&(pa=""),ye===0)Z[ue]=pa;else{if(!de[ye-1]){de[ye-1]={};for(let wa=0;wa<ke;wa++)de[ye-1][`col_${wa}`]=""}de[ye-1][`col_${ue}`]=pa}}for(let le=0;le<ke;le++)Z[le]===void 0&&(Z[le]="");const Ke=[];for(let le=0;le<Z.length;le++)(!Z[le]||Z[le].toString().trim()==="")&&Ke.push(le);let Na,te;(Ke==null?void 0:Ke.length)>0?(el.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),Na=Z.filter((le,ye)=>!Ke.includes(ye)),te=m(de,Ke==null?void 0:Ke.map(le=>`col_${le}`))):(Na=Z,te=de);const D=de==null?void 0:de[0];if(!(D!=null&&D.hasOwnProperty("col_0")))return el.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",Na,te)}catch(X){throw el.ElMessage.error(X.message),new Error(X.message)}},$.readAsArrayBuffer(k)},z=x=>{var $;const k=($=g.value)==null?void 0:$.reduce((U,X,be)=>(be===0?U[X.label]=x:U[X.label]=X==null?void 0:X.value,U),{});n("filter",k,x,!0)},w=(x,k={})=>{n("buttonClick",x,"",k)},j=x=>{var k,$;g.value=($=(k=sa.getColumnChild(I.cloneDeep(x)))==null?void 0:k.filter(U=>(U==null?void 0:U.label)!==""&&(U==null?void 0:U.label)!=="操作"))==null?void 0:$.map(U=>({label:(U==null?void 0:U.label)??"",value:"",name:(U==null?void 0:U.prop)??"",isFormColHidden:U==null?void 0:U.isTableColHidden,width:2,prop:(U==null?void 0:U.prop)??""}))},A=a.ref(!1),N=x=>{var k;if((x==null?void 0:x.buttonName)==="确认"&&(n("filter",x==null?void 0:x.content),A.value=(x==null?void 0:x.content)&&Object.values(x==null?void 0:x.content).length>0),(x==null?void 0:x.buttonName)==="清空"){const $=I.cloneDeep(x==null?void 0:x.content);for(const U in $)$[U]="";g.value=(k=g.value)==null?void 0:k.map(U=>({...U,value:""})),n("filter",$),A.value=!1}c.value=!1},Y=()=>{c.value=!c.value},b=()=>{var k,$;g.value=(k=g.value)==null?void 0:k.map(U=>({...U,value:""}));const x=($=g.value)==null?void 0:$.reduce((U,X)=>(U[X.label]=X.value,U),{});n("filter",x)},L=a.ref(null);let T;return T=x=>{var X;if(!c.value)return;const k=(X=L==null?void 0:L.value)==null?void 0:X.$el,$=k==null?void 0:k.contains(x.target);let U=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(be=>{be.contains(x.target)&&(U=!0)}),!$&&!U&&(c.value=!1)},a.onMounted(()=>{document.addEventListener("click",T),j(t.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",T)}),a.watch(()=>t.columns,()=>{j(t.columns)},{deep:!0,immediate:!0}),(x,k)=>{var Ee,ne,ke,Z,de,Ke,Na,te;const $=a.resolveComponent("el-icon"),U=a.resolveComponent("svg-icon"),X=a.resolveComponent("el-input"),be=a.resolveComponent("el-upload"),ze=a.resolveComponent("el-button");return l.pageLayout==="vertical"?(a.openBlock(),a.createElementBlock("div",kp,[a.createElementVNode("div",{class:a.normalizeClass(l.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(t==null?void 0:t.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((t==null?void 0:t.level)-1)*12+"px",fontWeight:600-((t==null?void 0:t.level)-1)*100>=400?600-((t==null?void 0:t.level)-1)*100:400,fontSize:17-(t==null?void 0:t.level)>=14?17-(t==null?void 0:t.level)+"px":"14px"})},a.toDisplayString(l.compName),7),a.createElementVNode("div",xp,[t!=null&&t.filterShow?(a.openBlock(),a.createElementBlock("div",_p,[a.createVNode(wu,{trigger:"contextmenu",ref_key:"popOverRef",ref:L,title:"",width:800,placement:"bottom-start",isVisible:c.value,"onUpdate:isVisible":k[4]||(k[4]=D=>c.value=D)},{reference:a.withCtx(()=>{var D,le,ye,ue;return[a.createVNode(X,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=Ne=>s.value=Ne),style:{"min-width":"80px"},placeholder:A.value?(ye=(le=(D=l.filterValues)==null?void 0:D.filter(Ne=>Ne))==null?void 0:le.slice(0,3))==null?void 0:ye.join("/"):"搜索","prefix-icon":a.unref(el.search_default),clearable:"",onInput:z,disabled:((ue=g.value)==null?void 0:ue.length)===0},{suffix:a.withCtx(()=>{var Ne,pa;return[!s.value&&((pa=(Ne=l.filterValues)==null?void 0:Ne.filter(wa=>wa))!=null&&pa.join("/"))?(a.openBlock(),a.createBlock($,{key:0,style:{cursor:"pointer"},onClick:b},{default:a.withCtx(()=>[a.createVNode(a.unref(el.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(Y,["stop"])},[a.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",{class:"form-content-value",onKeydown:k[1]||(k[1]=a.withModifiers(()=>{},["stop"])),onKeyup:k[2]||(k[2]=a.withModifiers(()=>{},["stop"])),onKeypress:k[3]||(k[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:g.value,buttonValue:h.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:h.value,isStartJustify:!1,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):a.createCommentVNode("",!0),l.buttons&&((Ee=l.buttons)==null?void 0:Ee.length)>0?(a.openBlock(),a.createElementBlock("div",wp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ne=l.buttons)==null?void 0:ne.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,le)=>{var ye;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:le},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(be,{key:0,class:"upload-button-wrap","on-change":S,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var ue;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:Ne=>w(D==null?void 0:D.label)},[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"]),a.createElementVNode("span",Sp,a.toDisplayString(D==null?void 0:D.label),1)],10,Cp)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var ue;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"]),a.createElementVNode("span",Ep,a.toDisplayString(D==null?void 0:D.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",Dp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,ue=>{var Ne,pa;return a.openBlock(),a.createElementBlock("div",{key:ue==null?void 0:ue.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:wa=>!l.lockingPage&&w(ue==null?void 0:ue.label)},[a.createTextVNode(a.toDisplayString(ue==null?void 0:ue.label),1),(Ne=ue==null?void 0:ue.label)!=null&&Ne.includes("选中")?(a.openBlock(),a.createElementBlock("span",Np,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(pa=ue==null?void 0:ue.label)!=null&&pa.includes("全部")?(a.openBlock(),a.createElementBlock("span",Tp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,Bp)}),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,id:"themeButton",class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:ue=>!l.lockingPage&&w(D==null?void 0:D.label,D)},[a.createVNode(U,{class:"table-op-icon",name:(ye=v==null?void 0:v.find(ue=>(ue==null?void 0:ue.label)===(D==null?void 0:D.label)))==null?void 0:ye.icon},null,8,["name"]),a.createElementVNode("span",zp,a.toDisplayString(D==null?void 0:D.label),1)],10,Ap)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",Mp,[a.createElementVNode("div",Op,[a.createElementVNode("div",Ip,[a.createVNode(X,{modelValue:s.value,"onUpdate:modelValue":k[5]||(k[5]=D=>s.value=D),style:{"min-width":"80px"},placeholder:A.value?(de=(Z=(ke=l.filterValues)==null?void 0:ke.filter(D=>D))==null?void 0:Z.slice(0,3))==null?void 0:de.join("/"):"搜索","prefix-icon":a.unref(el.search_default),clearable:"",onInput:z,disabled:((Ke=g.value)==null?void 0:Ke.length)===0},{suffix:a.withCtx(()=>{var D,le;return[!s.value&&((le=(D=l.filterValues)==null?void 0:D.filter(ye=>ye))!=null&&le.join("/"))?(a.openBlock(),a.createBlock($,{key:0,style:{cursor:"pointer"},onClick:b},{default:a.withCtx(()=>[a.createVNode(a.unref(el.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(Y,["stop"])},[a.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((Na=l.buttons)==null?void 0:Na.length)>0?(a.openBlock(),a.createElementBlock("div",Lp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((te=l.buttons)==null?void 0:te.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,le)=>{var ye;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:le},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(be,{key:0,class:"upload-button-wrap","on-change":S,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var ue;return[a.createElementVNode("div",Vp,[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"]),a.createElementVNode("span",Rp,a.toDisplayString(D==null?void 0:D.label),1)])]}),_:2},1024)):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(ze,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var ue;return[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"])]}),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(D==null?void 0:D.label),1)]),_:2},1024)):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",$p,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,ue=>(a.openBlock(),a.createBlock(ze,{key:ue==null?void 0:ue.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ne=>w(ue==null?void 0:ue.label)},{default:a.withCtx(()=>{var Ne,pa;return[a.createTextVNode(a.toDisplayString(ue==null?void 0:ue.label),1),(Ne=ue==null?void 0:ue.label)!=null&&Ne.includes("选中")?(a.openBlock(),a.createElementBlock("span",Pp,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(pa=ue==null?void 0:ue.label)!=null&&pa.includes("全部")?(a.openBlock(),a.createElementBlock("span",Fp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),id:"themeButton",onClick:ue=>!l.lockingPage&&w(D==null?void 0:D.label,D)},[a.createVNode(U,{class:"table-op-icon",name:(ye=v==null?void 0:v.find(ue=>(ue==null?void 0:ue.label)===(D==null?void 0:D.label)))==null?void 0:ye.icon},null,8,["name"]),a.createElementVNode("span",Hp,a.toDisplayString(D==null?void 0:D.label),1)],10,jp)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},qp=Ul._export_sfc(Up,[["__scopeId","data-v-3a44c010"]]),Wp={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(r,n)=>{const t=a.resolveComponent("el-table-column"),s=a.resolveComponent("el-table");return a.openBlock(),a.createBlock(s,{data:l.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.columns,c=>{var g;return a.openBlock(),a.createBlock(t,{key:c==null?void 0:c.prop,label:c==null?void 0:c.label,prop:c==null?void 0:c.prop,fixed:(c==null?void 0:c.prop)==="operate"?"right":c==null?void 0:c.fixed,align:(c==null?void 0:c.align)??"left","show-overflow-tooltip":(c==null?void 0:c.showOverflowTooltip)??!0,width:c==null?void 0:c.width,"min-width":(c==null?void 0:c.minWidth)||((c==null?void 0:c.prop)==="operate"?80:(((g=c==null?void 0:c.label)==null?void 0:g.length)*2||4)*27)},{default:a.withCtx(h=>[a.renderSlot(r.$slots,"content",{row:h.row,column:h.column,$index:h.$index,scope:h}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.children,(v,m)=>(a.openBlock(),a.createBlock(pl._sfc_main$2,{key:m,column:v,tableData:l.tableData},a.createSlots({_:2},[a.renderList(r.$slots,(u,_)=>({name:_,fn:a.withCtx(({row:S,slotData:z,item:w,column:j})=>[a.renderSlot(r.$slots,_,a.mergeProps({ref_for:!0},z??S,{item:w??v,slotData:z??S,row:S,column:j,columnProp:v}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class Kp extends La.Loader{constructor(r){super(r),this.littleEndian=!0}load(r,n,t,s){const c=this,g=new La.FileLoader(c.manager);g.setPath(c.path),g.setResponseType("arraybuffer"),g.setRequestHeader(c.requestHeader),g.setWithCredentials(c.withCredentials),g.load(r,function(h){try{n(c.parse(h))}catch(v){s?s(v):console.error(v),c.manager.itemError(r)}},t,s)}_getDataView(r,n,t,s){switch(t){case"F":return s===8?r.getFloat64(n,this.littleEndian):r.getFloat32(n,this.littleEndian);case"I":return s===1?r.getInt8(n):s===2?r.getInt16(n,this.littleEndian):r.getInt32(n,this.littleEndian);case"U":return s===1?r.getUint8(n):s===2?r.getUint16(n,this.littleEndian):r.getUint32(n,this.littleEndian)}}parse(r){function n(z,w){const j=z.length,A=new Uint8Array(w);let N=0,Y=0,b,L,T;do if(b=z[N++],b<32){if(b++,Y+b>w)throw new Error("Output buffer is not large enough");if(N+b>j)throw new Error("Invalid compressed data");do A[Y++]=z[N++];while(--b)}else{if(L=b>>5,T=Y-((b&31)<<8)-1,N>=j)throw new Error("Invalid compressed data");if(L===7&&(L+=z[N++],N>=j))throw new Error("Invalid compressed data");if(T-=z[N++],Y+L+2>w)throw new Error("Output buffer is not large enough");if(T<0)throw new Error("Invalid compressed data");if(T>=Y)throw new Error("Invalid compressed data");do A[Y++]=A[T++];while(--L+2)}while(N<j);return A}function t(z){const w={},j=new Uint8Array(z);let A="",N="",Y=0,b=!1;const L=j.length;for(;Y<L&&b===!1;){const $=String.fromCharCode(j[Y++]);$===`
1
+ "use strict";var mu=Object.defineProperty;var yu=(l,r,n)=>r in l?mu(l,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[r]=n;var Rr=(l,r,n)=>yu(l,typeof r!="symbol"?r+"":r,n);const a=require("vue"),el=require("./request-BC2w2vGr.cjs"),I=require("./index-3XgooQs8.cjs"),pl=require("./index-FHHw49g0.cjs"),Ul=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),La=require("./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-DFdOquZV.cjs"),vr=require("./index-CUw6nGTo.cjs"),go=require("./threeViewerHost-JJLjuhNP.cjs"),sa=require("./index-CUQMKXQP.cjs"),yr=require("./index-CW4qJdP8.cjs"),Gi=require("./index-9m_Dfg-a.cjs");require("./index-yCcLiwx1.cjs");const js=require("./index-CisojooA.cjs");;/* empty css */const bo=require("./isString-DNBlKLZH.cjs"),Ji=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),Hs=require("./index-BVaHwt5f.cjs"),gu=require("./index-YMw8o9ul.cjs"),An=require("./MTLLoader-CvINB_3K.cjs"),bu=require("./URDFLoader-BgcTSOZ6.cjs");var ku="[object Boolean]";function Us(l){return l===!0||l===!1||el.isObjectLike(l)&&el.baseGetTag(l)==ku}function xu(l){return l===void 0}const _u=l=>l.match(/\((.*)\)/)[1],wu={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200},trigger:{type:String,default:"click"}},setup(l){const r=l,n=a.ref(null),t=a.ref(!1),s=a.ref(null);return a.watch(()=>r==null?void 0:r.isVisible,()=>{t.value=r==null?void 0:r.isVisible},{deep:!0,immediate:!0}),a.watch(()=>s.value,()=>{a.nextTick(()=>{var c,g;(g=(c=n.value)==null?void 0:c.updatePopper)==null||g.call(c)})},{deep:!0,immediate:!0}),(c,g)=>{const h=a.resolveComponent("el-popover");return a.openBlock(),a.createBlock(h,{visible:t.value,"onUpdate:visible":g[0]||(g[0]=v=>t.value=v),trigger:r.trigger,title:r==null?void 0:r.title,placement:r==null?void 0:r.placement,width:r==null?void 0:r.width,ref_key:"popOverRef",ref:n,"trigger-keys":"[]"},{reference:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"reference",{ref_key:"referenceRef",ref:s})])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.renderSlot(c.$slots,"content")])]),_:3},8,["visible","trigger","title","placement","width"])}}},Cu={__name:"index",props:{value:{type:[String,Number],default:""}},setup(l){const r=l,n=a.computed(()=>{const t=String(r.value??"");return t==="已完成"?"task-status-completed":t==="进行中"?"task-status-running":t==="终止"||t==="暂停"?"task-status-stopped":""});return(t,s)=>l.value!==void 0&&l.value!==null?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["task-status-tag",n.value])},a.toDisplayString(l.value===0?"0":l.value),3)):a.createCommentVNode("",!0)}},Su=Ul._export_sfc(Cu,[["__scopeId","data-v-d81f59b4"]]);function Eu(l,r,n,t={}){if(!l||!r||!n||n.length!==4)return;const s=l.getContext("2d");if(!s)return;const{color:c="rgba(255, 235, 59, 0.3)",strokeWidth:g=2,fillOpacity:h=.2}=t,v=l.getBoundingClientRect(),m=r.getBoundingClientRect(),u=r.naturalWidth,_=r.naturalHeight,S=m.width/u,z=m.height/_,w=Math.min(S,z),j=u*w,A=_*w,N=(v.width-j)/2,Y=(v.height-A)/2,b=n.map(([T,x])=>{const k=N+T*j,$=Y+x*A;return{x:k,y:$}});s.clearRect(0,0,l.width,l.height),s.beginPath(),s.moveTo(b[0].x,b[0].y);for(let T=1;T<b.length;T++)s.lineTo(b[T].x,b[T].y);s.closePath();const L=c.replace(/[\d.]+\)$/,`${h})`);s.fillStyle=L,s.fill(),s.strokeStyle=c.replace(/[\d.]+\)$/,"1)"),s.lineWidth=g,s.stroke()}function mt(l){if(!l)return;const r=l.getContext("2d");r&&r.clearRect(0,0,l.width,l.height)}function Xi(l,r){if(!l||!r)return null;const n=l[r];return!n||!n.bboxNorm||!Array.isArray(n.bboxNorm)||n.bboxNorm.length!==4?null:{bboxNorm:n.bboxNorm,imageName:n.imageName||""}}const Du={key:0,class:"ocr-img-preview-root"},Bu={class:"ocr-img-preview-window"},Nu={key:0,class:"img-preview-body"},Tu={class:"img-preview-header"},Au={class:"img-header-left"},zu={class:"img-name"},Mu={key:0,class:"img-header-right"},Ou={class:"img-index"},Iu={key:0,class:"img-thumb-list"},Lu=["onClick"],Vu={key:1,class:"thumb-placeholder"},Ru={class:"thumb-name"},$u={class:"img-preview-container"},Pu={key:0,class:"img-placeholder"},Fu={key:2,class:"img-placeholder"},ju={key:0},Hu={key:1},Uu={key:1,class:"img-placeholder"},qu=a.defineComponent({__name:"imgPreview",props:{visible:{type:Boolean,default:!1},images:{type:Array,default:()=>[]},defaultImageName:{type:String,default:""},fieldMeta:{type:Object,default:()=>({})},focusedFieldName:{type:String,default:""}},emits:["update:visible","close"],setup(l,{emit:r}){const n=l,t=r,s=a.computed({get:()=>n.visible,set:D=>t("update:visible",D)});let c=!1,g="",h=0,v=0,m=0,u=0,_=0,S=0,z=null;const w=D=>{var ye,ue;const le=(ue=(ye=D==null?void 0:D.target)==null?void 0:ye.closest)==null?void 0:ue.call(ye,".ocr-img-preview-window");return le||document.querySelector(".ocr-img-preview-window")},j=D=>{if(!D||D==="none")return{tx:0,ty:0};let le=D.match(/matrix\(([^)]+)\)/);if(le){const ye=le[1].split(",").map(ue=>Number(ue.trim()));return{tx:(ye==null?void 0:ye[4])||0,ty:(ye==null?void 0:ye[5])||0}}if(le=D.match(/matrix3d\(([^)]+)\)/),le){const ye=le[1].split(",").map(ue=>Number(ue.trim()));return{tx:(ye==null?void 0:ye[12])||0,ty:(ye==null?void 0:ye[13])||0}}return le=D.match(/translate\(\s*([-\d.]+)px\s*,\s*([-\d.]+)px\s*\)/),le?{tx:Number(le[1])||0,ty:Number(le[2])||0}:{tx:0,ty:0}},A=(D,le,ye)=>{D.style.transform=`translate(${le}px, ${ye}px)`},N=D=>{const le=w(D);if(!le)return;c=!0,z=le,g="move",h=D.clientX,v=D.clientY;const ye=window.getComputedStyle(le),{tx:ue,ty:Ne}=j(ye.transform);_=ue,S=Ne,document.addEventListener("mousemove",b),document.addEventListener("mouseup",L)},Y=(D,le)=>{const ye=w(D);if(!ye)return;c=!0,z=ye,g=le,h=D.clientX,v=D.clientY;const ue=ye.getBoundingClientRect();m=ue.width,u=ue.height;const Ne=window.getComputedStyle(ye),{tx:pa,ty:wa}=j(Ne.transform);_=pa,S=wa,document.addEventListener("mousemove",b),document.addEventListener("mouseup",L)},b=D=>{if(!c||!z)return;const le=D.clientX-h,ye=D.clientY-v,ue=360,Ne=420;let pa=m,wa=u,ja=_,ee=S;if(g==="move"){ja=_+le,ee=S+ye,A(z,ja,ee);return}if(g.includes("right")&&(pa=Math.max(ue,m+le)),g.includes("bottom")&&(wa=Math.max(Ne,u+ye)),g.includes("left")){const ea=m-le;ea<ue?(pa=ue,ja=_+(m-ue)):(pa=ea,ja=_+le)}if(g.includes("top")){const ea=u-ye;ea<Ne?(wa=Ne,ee=S+(u-Ne)):(wa=ea,ee=S+ye)}z.style.width=`${pa}px`,z.style.height=`${wa}px`,A(z,ja,ee)},L=()=>{c=!1,g="",z=null,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",L)},T=a.ref([]),x=a.ref(!1);a.watch(()=>n.images,async D=>{if(!Array.isArray(D)||D.length===0){T.value=[];return}x.value=!0;const le=[];for(const ye of D)if(ye.url&&!ye.url.startsWith("blob:")&&!ye.url.startsWith("http"))try{const ue=await La.downloadFile(ye.url),Ne=URL.createObjectURL(ue);le.push({...ye,blobUrl:Ne})}catch(ue){console.error(`Failed to load image for preview: ${ye.url}`,ue),le.push({...ye,blobUrl:""})}else le.push({...ye,blobUrl:ye.url});T.value=le,x.value=!1},{deep:!0,immediate:!0});const k=a.ref(0),$=a.ref(null),U=a.ref(null),X=a.computed(()=>T.value[k.value]||null),be=()=>{if(!T.value.length){k.value=0;return}if(n.defaultImageName){const D=T.value.findIndex(le=>(le==null?void 0:le.name)===n.defaultImageName);k.value=D>=0?D:0}else k.value=0},ze=D=>{if(!T.value.length)return;const le=Math.max(0,Math.min(D,T.value.length-1));k.value=le},Ee=()=>ze(k.value-1),ne=()=>ze(k.value+1),ke=D=>{if(!D)return;const le=T.value.findIndex(ye=>(ye==null?void 0:ye.name)===D);le>=0&&(k.value=le)},Z=()=>{if(!U.value)return;const D=U.value.parentElement;if(!D)return;const le=D.getBoundingClientRect();U.value.width=le.width,U.value.height=le.height},de=()=>{var ue,Ne;if(!U.value||!$.value||!n.focusedFieldName){U.value&&mt(U.value);return}const D=(ue=$.value.$el)==null?void 0:ue.querySelector("img");if(!D)return;if(!D.complete||D.naturalWidth===0){D.onload=()=>{a.nextTick(()=>{de()})};return}const le=((Ne=X.value)==null?void 0:Ne.name)||"",ye=Xi(n.fieldMeta,n.focusedFieldName);if(!ye){mt(U.value);return}if(ye.imageName!==le){mt(U.value);return}Z(),Eu(U.value,D,ye.bboxNorm)},Ke=()=>{a.nextTick(()=>{Z(),de()})};a.watch(()=>n.focusedFieldName,()=>{if(!s.value)return;const D=Xi(n.fieldMeta,n.focusedFieldName);D!=null&&D.imageName&&ke(D.imageName),a.nextTick(()=>{de()})}),a.watch(()=>{var D;return(D=X.value)==null?void 0:D.name},()=>{s.value&&a.nextTick(()=>{U.value&&mt(U.value),de()})}),a.watch(()=>n.visible,D=>{D?(be(),a.nextTick(()=>{Z(),de()})):U.value&&mt(U.value)}),a.watch(()=>n.defaultImageName,()=>{s.value&&be()});let Na=null;a.onMounted(()=>{var D;typeof ResizeObserver<"u"&&(Na=new ResizeObserver(()=>{Z(),a.nextTick(()=>{de()})}),(D=U.value)!=null&&D.parentElement&&Na.observe(U.value.parentElement))}),a.onUnmounted(()=>{Na&&(Na.disconnect(),Na=null),document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",L)});const te=()=>{U.value&&mt(U.value),t("update:visible",!1),t("close")};return(D,le)=>{var wa,ja;const ye=a.resolveComponent("el-button"),ue=a.resolveComponent("el-image"),Ne=a.resolveComponent("Loading"),pa=a.resolveComponent("el-icon");return s.value?(a.openBlock(),a.createElementBlock("div",Du,[le[12]||(le[12]=a.createElementVNode("div",{class:"ocr-img-preview-backdrop"},null,-1)),a.createElementVNode("div",Bu,[a.createElementVNode("div",{class:"ocr-img-preview-header",onMousedown:a.withModifiers(N,["stop"])},[le[8]||(le[8]=a.createElementVNode("span",{class:"ocr-img-preview-title"},"文件预览",-1)),a.createElementVNode("button",{type:"button",class:"ocr-img-preview-close",onClick:te},"×")],32),a.createElementVNode("div",{class:"resizable-handle top",onMousedown:le[0]||(le[0]=a.withModifiers(ee=>Y(ee,"top"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle right",onMousedown:le[1]||(le[1]=a.withModifiers(ee=>Y(ee,"right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom",onMousedown:le[2]||(le[2]=a.withModifiers(ee=>Y(ee,"bottom"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle left",onMousedown:le[3]||(le[3]=a.withModifiers(ee=>Y(ee,"left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-left",onMousedown:le[4]||(le[4]=a.withModifiers(ee=>Y(ee,"top-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle top-right",onMousedown:le[5]||(le[5]=a.withModifiers(ee=>Y(ee,"top-right"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-left",onMousedown:le[6]||(le[6]=a.withModifiers(ee=>Y(ee,"bottom-left"),["stop"]))},null,32),a.createElementVNode("div",{class:"resizable-handle bottom-right",onMousedown:le[7]||(le[7]=a.withModifiers(ee=>Y(ee,"bottom-right"),["stop"]))},null,32),X.value?(a.openBlock(),a.createElementBlock("div",Nu,[a.createElementVNode("div",Tu,[a.createElementVNode("div",Au,[a.createElementVNode("span",zu,a.toDisplayString(X.value.name?X.value.name+(X.value.url&&X.value.url.lastIndexOf(".")!==-1?X.value.url.substring(X.value.url.lastIndexOf(".")):""):""),1)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",Mu,[a.createVNode(ye,{size:"small",disabled:k.value===0,onClick:Ee},{default:a.withCtx(()=>le[9]||(le[9]=[a.createTextVNode("上一张")])),_:1,__:[9]},8,["disabled"]),a.createElementVNode("span",Ou,a.toDisplayString(k.value+1)+" / "+a.toDisplayString(T.value.length),1),a.createVNode(ye,{size:"small",disabled:k.value===T.value.length-1,onClick:ne},{default:a.withCtx(()=>le[10]||(le[10]=[a.createTextVNode("下一张")])),_:1,__:[10]},8,["disabled"])])):a.createCommentVNode("",!0)]),T.value.length>1?(a.openBlock(),a.createElementBlock("div",Iu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.value,(ee,ea)=>(a.openBlock(),a.createElementBlock("div",{key:(ee.name||"")+"-"+ea,class:a.normalizeClass(["img-thumb-item",{active:ea===k.value}]),onClick:Pe=>ze(ea)},[ee!=null&&ee.blobUrl?(a.openBlock(),a.createBlock(ue,{key:0,src:ee.blobUrl,fit:"cover",class:"thumb-image","preview-src-list":[ee.blobUrl],"initial-index":0},null,8,["src","preview-src-list"])):(a.openBlock(),a.createElementBlock("div",Vu,"加载失败")),a.createElementVNode("div",Ru,a.toDisplayString(ee.name||"-"),1)],10,Lu))),128))])):a.createCommentVNode("",!0),a.createElementVNode("div",$u,[x.value?(a.openBlock(),a.createElementBlock("div",Pu,[a.createVNode(pa,{class:"is-loading"},{default:a.withCtx(()=>[a.createVNode(Ne)]),_:1}),le[11]||(le[11]=a.createElementVNode("span",null,"图片加载中...",-1))])):(wa=X.value)!=null&&wa.blobUrl?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(ue,{ref_key:"imageRef",ref:$,src:X.value.blobUrl,fit:"contain",class:"preview-image","preview-src-list":[X.value.blobUrl],onLoad:Ke},null,8,["src","preview-src-list"]),a.createElementVNode("canvas",{ref_key:"canvasRef",ref:U,class:"highlight-canvas"},null,512)],64)):(a.openBlock(),a.createElementBlock("div",Fu,[(ja=X.value)!=null&&ja.url?(a.openBlock(),a.createElementBlock("span",ju,"图片加载失败")):(a.openBlock(),a.createElementBlock("span",Hu,"暂无图片"))]))])])):(a.openBlock(),a.createElementBlock("div",Uu,"暂无图片"))])])):a.createCommentVNode("",!0)}}}),Wu=Ul._export_sfc(qu,[["__scopeId","data-v-48a4ecb1"]]),Ku={class:"cert-preview-body"},Yu={key:0,class:"pdf-preview-container"},Gu={class:"thumbs"},Ju=["onClick"],Xu={class:"thumb-img"},Zu=["src"],Qu={key:1,class:"thumb-loading"},ed={class:"thumb-title"},ad={class:"viewer"},ld={key:0,class:"viewer-img-wrap"},rd=["src"],nd={key:1,class:"viewer-loading"},td=a.defineComponent({__name:"CertificatePreview",props:{visible:{type:Boolean},versions:{}},emits:["update:visible"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(""),c=a.ref(""),g=a.computed(()=>(n.versions||[]).find(w=>String(w.versionId)===String(s.value))),h=a.ref({}),v=a.ref(""),m=a.ref("证书附件.pdf"),u=()=>{try{Object.values(h.value||{}).forEach(w=>{w&&URL.revokeObjectURL(w)}),v.value&&URL.revokeObjectURL(v.value)}catch{}h.value={},v.value=""},_=async w=>{if(!w||w.fileType==="pdf")return;const j=Array.isArray(w.images)?w.images:[];for(const A of j){const N=A==null?void 0:A.url;if(!(!N||h.value[N]))try{const Y=await I.platformDownloadFile({url:N}),b=URL.createObjectURL(Y.data);h.value={...h.value,[N]:b}}catch{}}},S=async w=>{var A;if(!w||w.fileType!=="pdf"){v.value="";return}const j=w.sourceUrl||"";if(!j){v.value="";return}if(v.value){try{URL.revokeObjectURL(v.value)}catch{}v.value=""}try{console.log("[CertificatePreview] 下载PDF附件:",{url:j,versionId:w==null?void 0:w.versionId,certNo:w==null?void 0:w.certNo});const N=await I.platformDownloadFile({url:j});console.log("[CertificatePreview] PDF响应:",{url:j,status:N==null?void 0:N.status,size:(A=N==null?void 0:N.data)==null?void 0:A.size});const Y=URL.createObjectURL(N.data);v.value=Y;const b=w.certNo?String(w.certNo):"";m.value=b?`${b}.pdf`:"证书附件.pdf"}catch(N){console.error("[CertificatePreview] PDF加载失败:",{url:j,error:N}),v.value=""}};a.watch(()=>n.visible,async w=>{var A;if(!w){u();return}const j=(A=n.versions)==null?void 0:A[0];s.value=(j==null?void 0:j.versionId)||"",await _(j),await S(j)},{immediate:!0}),a.watch(()=>s.value,async()=>{var j,A;const w=g.value;if(!w){c.value="",v.value="";return}if(w.fileType==="pdf"){c.value="",await S(w);return}v.value="",c.value=((A=(j=w.images)==null?void 0:j[0])==null?void 0:A.url)||"",await _(w)},{immediate:!0});const z=()=>{t("update:visible",!1),u()};return a.onBeforeUnmount(()=>{u()}),(w,j)=>{const A=a.resolveComponent("el-empty"),N=a.resolveComponent("el-tab-pane"),Y=a.resolveComponent("el-tabs"),b=a.resolveComponent("el-button"),L=a.resolveComponent("el-dialog");return a.openBlock(),a.createBlock(L,{"model-value":w.visible,title:"证书附件预览",width:"1100px","close-on-click-modal":!1,onClose:z},{footer:a.withCtx(()=>[a.createVNode(b,{id:"themeBorderButton",onClick:z},{default:a.withCtx(()=>j[1]||(j[1]=[a.createTextVNode("关闭")])),_:1,__:[1]})]),default:a.withCtx(()=>[w.versions&&w.versions.length>0?(a.openBlock(),a.createBlock(Y,{key:0,modelValue:s.value,"onUpdate:modelValue":j[0]||(j[0]=T=>s.value=T),type:"card",class:"cert-version-tabs"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(w.versions,T=>(a.openBlock(),a.createBlock(N,{key:T.versionId,name:T.versionId,label:T.label},{default:a.withCtx(()=>[a.createElementVNode("div",Ku,[T.fileType==="pdf"?(a.openBlock(),a.createElementBlock("div",Yu,[v.value?(a.openBlock(),a.createBlock(pl.SsFilePreview,{key:1,fileName:m.value,blobUrl:v.value},null,8,["fileName","blobUrl"])):(a.openBlock(),a.createBlock(A,{key:0,description:"加载中"}))])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createElementVNode("div",Gu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(T.images||[],x=>(a.openBlock(),a.createElementBlock("div",{key:x.url,class:a.normalizeClass(["thumb",{active:x.url===c.value}]),onClick:k=>c.value=x.url},[a.createElementVNode("div",Xu,[h.value[x.url]?(a.openBlock(),a.createElementBlock("img",{key:0,src:h.value[x.url]},null,8,Zu)):(a.openBlock(),a.createElementBlock("div",Qu,"加载中"))]),a.createElementVNode("div",ed,a.toDisplayString(x.name),1)],10,Ju))),128))]),a.createElementVNode("div",ad,[c.value?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[h.value[c.value]?(a.openBlock(),a.createElementBlock("div",ld,[a.createElementVNode("img",{class:"viewer-img",src:h.value[c.value]},null,8,rd)])):(a.openBlock(),a.createElementBlock("div",nd,"加载中"))],64)):(a.openBlock(),a.createBlock(A,{key:0,description:"暂无图片"}))])],64))])]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])):(a.openBlock(),a.createBlock(A,{key:1,description:"暂无可预览的证书附件"}))]),_:1},8,["model-value"])}}}),od=Ul._export_sfc(td,[["__scopeId","data-v-220703c0"]]),id={class:"ocr-candidate-wrap"},sd={class:"ocr-candidate-left"},cd={key:1},ud={key:0},dd={key:1},pd={key:2},fd={key:3},hd={key:0,class:"ocr-candidate-right"},vd={class:"ocr-candidate-actions"},md={key:1},yd={class:"dialog-footer"},gd={__name:"OCRCandidateDialog",props:{visible:{type:Boolean,default:!1},candidates:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]},nameProp:{type:String,default:""},mfrProp:{type:String,default:""}},emits:["update:visible","submit","preview-file"],setup(l,{emit:r}){const n=(k=[])=>{const $=[],U=X=>{(X||[]).forEach(be=>{if(!be)return;const ze=be.children||be.childrens||be.columns;Array.isArray(ze)&&ze.length>0?U(ze):$.push(be)})};return U(k),$},t=l,s=r,c=a.computed(()=>{var k;return((k=S.value)==null?void 0:k.allowAdd)!==!1}),g=a.computed(()=>{var k;return((k=S.value)==null?void 0:k.allowReplace)!==!1}),h=k=>{if(!k)return[];if(Array.isArray(k))return k;if(typeof k=="string")try{const $=JSON.parse(k);return Array.isArray($)?$:[]}catch{return[]}return[]},v=k=>{s("preview-file",k)},m=a.ref([]),u=a.ref(0),_=a.ref("");a.watch(()=>t.candidates,k=>{var $,U;m.value=(k||[]).map(X=>({...X,...(X==null?void 0:X.ocrRow)||{},selectedTargetId:(X==null?void 0:X.selectedTargetId)||"",__decision:X==null?void 0:X.__decision})),u.value=0,_.value=((U=($=m.value)==null?void 0:$[0])==null?void 0:U.selectedTargetId)||""},{immediate:!0,deep:!0}),a.watch(()=>t.visible,k=>{var $,U;k&&(u.value=0,_.value=((U=($=m.value)==null?void 0:$[0])==null?void 0:U.selectedTargetId)||"")});const S=a.computed(()=>{var $;const k=Number(u.value||0);return(($=m.value||[])==null?void 0:$[k])||null}),z=a.computed(()=>(n(t.columns||[])||[]).filter(U=>U&&U.prop).filter(U=>U.type!=="operate"&&U.label!=="操作"&&U.prop!=="operate")),w=a.computed(()=>z.value.filter(k=>k.label!=="证书附件"&&k.prop!=="证书附件")),j=k=>{if(!k)return;const $=(m.value||[]).findIndex(U=>(U==null?void 0:U.idx)===(k==null?void 0:k.idx));$>-1&&(u.value=$,_.value=(k==null?void 0:k.selectedTargetId)||"")},A=k=>{if(!k){_.value="";return}_.value=String((k==null?void 0:k.id)??"")},N=(k,$="")=>{const U=Number(u.value||0),X=m.value||[],be=X[U];be&&(be.__decision=k,be.selectedTargetId=$,_.value=$,m.value=[...X])},Y=()=>N("skip",""),b=()=>N("add",""),L=()=>{if(!_.value){el.ElMessage.warning("请先选择要替换的目标记录");return}N("replace",_.value)},T=()=>{s("update:visible",!1)},x=()=>{const k=m.value||[];if(k.find(U=>(U==null?void 0:U.__decision)==="replace"&&!(U!=null&&U.selectedTargetId))){el.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}s("submit",k),s("update:visible",!1)};return(k,$)=>{const U=a.resolveComponent("el-table-column"),X=a.resolveComponent("svg-icon"),be=a.resolveComponent("el-table"),ze=a.resolveComponent("el-button"),Ee=a.resolveComponent("el-alert");return a.openBlock(),a.createBlock(vr.ssDialog,{title:"OCR候选匹配",visible:l.visible,"close-on-click-modal":!1,width:"90%",style:{maxWidth:"1200px"},onBeforeDestroy:T},{default:a.withCtx(()=>{var ne,ke;return[a.createElementVNode("div",id,[a.createElementVNode("div",sd,[$[0]||($[0]=a.createElementVNode("div",{class:"ocr-candidate-title"},"待处理OCR行(可跳过)",-1)),a.createVNode(be,{data:m.value,border:"",stripe:"","max-height":"300",style:{width:"100%"},"highlight-current-row":"",onCurrentChange:j},{default:a.withCtx(()=>[a.createVNode(U,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(w.value,Z=>(a.openBlock(),a.createBlock(U,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:a.withCtx(({row:de})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Z.prop]).length>0?(a.openBlock(),a.createBlock(X,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",cd,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128)),a.createVNode(U,{label:"候选数",width:"90",fixed:"right"},{default:a.withCtx(({row:Z})=>[a.createTextVNode(a.toDisplayString(((Z==null?void 0:Z.candidates)||[]).length),1)]),_:1}),a.createVNode(U,{label:"处理状态",width:"120",fixed:"right"},{default:a.withCtx(({row:Z})=>[(Z==null?void 0:Z.__decision)==="replace"?(a.openBlock(),a.createElementBlock("span",ud,"替换")):(Z==null?void 0:Z.__decision)==="add"?(a.openBlock(),a.createElementBlock("span",dd,"新增")):(Z==null?void 0:Z.__decision)==="skip"?(a.openBlock(),a.createElementBlock("span",pd,"跳过")):(a.openBlock(),a.createElementBlock("span",fd,"未处理"))]),_:1})]),_:1},8,["data"])]),m.value&&m.value.length>0?(a.openBlock(),a.createElementBlock("div",hd,[$[4]||($[4]=a.createElementVNode("div",{class:"ocr-candidate-title"},"当前行候选记录(同编号)",-1)),a.createElementVNode("div",vd,[a.createVNode(ze,{id:"themeBorderButton",onClick:Y},{default:a.withCtx(()=>$[1]||($[1]=[a.createTextVNode("跳过本行")])),_:1,__:[1]}),a.createVNode(ze,{id:"themeBorderButton",onClick:b,disabled:!c.value},{default:a.withCtx(()=>$[2]||($[2]=[a.createTextVNode("新增本行")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:L,disabled:!g.value||!_.value},{default:a.withCtx(()=>$[3]||($[3]=[a.createTextVNode("替换选中记录")])),_:1,__:[3]},8,["disabled"])]),(((ne=S.value)==null?void 0:ne.candidates)||[]).length===0?(a.openBlock(),a.createBlock(Ee,{key:0,title:"该编号暂无候选记录,可选择“新增本行”或“跳过本行”。",type:"info",closable:!1,"show-icon":"",style:{margin:"8px 0"}})):a.createCommentVNode("",!0),a.createVNode(be,{data:((ke=S.value)==null?void 0:ke.candidates)||[],border:"",stripe:"","max-height":"300",style:{width:"100%"},onCurrentChange:A,"highlight-current-row":""},{default:a.withCtx(()=>[a.createVNode(U,{type:"index",label:"序号",width:"60"}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(z.value,Z=>(a.openBlock(),a.createBlock(U,{key:Z.prop,label:Z.label,prop:Z.prop,"min-width":Z.minWidth||160},{default:a.withCtx(({row:de})=>[Z.label==="证书附件"||Z.prop==="证书附件"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[h(de==null?void 0:de[Z.prop]).length>0?(a.openBlock(),a.createBlock(X,{key:0,name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ke=>v({row:de,prop:Z.prop}),["stop"]),title:"浏览"},null,8,["onClick"])):(a.openBlock(),a.createElementBlock("span",md,"-"))],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString((de==null?void 0:de[Z.prop])??"-"),1)],64))]),_:2},1032,["label","prop","min-width"]))),128))]),_:1},8,["data"])])):a.createCommentVNode("",!0)])]}),footer:a.withCtx(()=>[a.createElementVNode("div",yd,[a.createVNode(ze,{id:"themeBorderButton",onClick:T},{default:a.withCtx(()=>$[5]||($[5]=[a.createTextVNode("取消")])),_:1,__:[5]}),a.createVNode(ze,{class:"ok-button",id:"themeButton",onClick:x},{default:a.withCtx(()=>$[6]||($[6]=[a.createTextVNode("提交已处理")])),_:1,__:[6]})])]),_:1},8,["visible"])}}},bd=Ul._export_sfc(gd,[["__scopeId","data-v-89e0489c"]]),kd={class:"ocr-preview-content"},xd={class:"ocr-preview-tip"},_d={class:"ocr-preview-table"},wd={style:{display:"flex","align-items":"center",gap:"8px"}},Cd={class:"dialog-footer"},Sd={__name:"OCRResultPreviewDialog",props:{visible:{type:Boolean,default:!1},ocrPreviewData:{type:Array,default:()=>[]},ocrPreviewColumns:{type:Array,default:()=>[]},ocrSelectedFields:{type:Array,default:()=>[]}},emits:["update:visible","update:ocrPreviewData","update:ocrSelectedFields","confirm","fieldChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]),c=a.ref([]),g=a.ref([]);a.watch(()=>n.visible,z=>{z&&(s.value=JSON.parse(JSON.stringify(n.ocrPreviewData)),c.value=JSON.parse(JSON.stringify(n.ocrPreviewColumns)),g.value=[...n.ocrSelectedFields])});const h=(z,w)=>{const j=[...g.value];if(w)j.includes(z)||j.push(z);else{const A=j.indexOf(z);A>-1&&j.splice(A,1)}g.value=j,t("update:ocrSelectedFields",j)},v=(z,w,j)=>{t("fieldChange",{rowIndex:z,prop:w,value:j})},m=()=>{t("update:ocrPreviewData",s.value),t("confirm",s.value),t("update:visible",!1)},u=()=>{t("update:visible",!1)},_=z=>typeof z!="number"?"-":`${(z*100).toFixed(1)}%`,S=z=>typeof z!="number"?"#606266":z>=.9?"#67c23a":z>=.7?"#e6a23c":"#f56c6c";return(z,w)=>{const j=a.resolveComponent("el-alert"),A=a.resolveComponent("el-table-column"),N=a.resolveComponent("el-checkbox"),Y=a.resolveComponent("el-input"),b=a.resolveComponent("el-table"),L=a.resolveComponent("el-button");return a.openBlock(),a.createBlock(vr.ssDialog,{title:"OCR识别结果预览",visible:l.visible,onBeforeDestroy:u,width:"90%",style:{maxWidth:"1200px"}},{default:a.withCtx(()=>[a.createElementVNode("div",kd,[a.createElementVNode("div",xd,[a.createVNode(j,{title:"请核对识别结果。系统将按 编号+名称+制造厂 规则匹配并替换;未唯一命中但有编号的,将进入候选选择;无编号则直接新增。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",_d,[a.createVNode(b,{data:s.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(A,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,T=>(a.openBlock(),a.createBlock(A,{key:T.prop,prop:T.prop,"min-width":T.minWidth||230,"class-name":T.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",wd,[T.isAccuracy?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(N,{key:0,"model-value":g.value.includes(T.prop),onChange:x=>h(T.prop,x),onClick:w[0]||(w[0]=a.withModifiers(()=>{},["stop"]))},null,8,["model-value","onChange"])),a.createElementVNode("span",null,a.toDisplayString(T.label),1)])]),default:a.withCtx(({row:x,$index:k})=>[T.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:S(x[T.prop]),fontWeight:500})},a.toDisplayString(_(x[T.prop])),5)):(a.openBlock(),a.createBlock(Y,{key:1,modelValue:x[T.prop],"onUpdate:modelValue":$=>x[T.prop]=$,size:"small",placeholder:"请输入"+T.label,onChange:$=>v(k,T.prop,$)},null,8,["modelValue","onUpdate:modelValue","placeholder","onChange"]))]),_:2},1032,["prop","min-width","class-name"]))),128))]),_:1},8,["data"])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",Cd,[a.createVNode(L,{onClick:u,id:"themeBorderButton"},{default:a.withCtx(()=>w[1]||(w[1]=[a.createTextVNode("取消")])),_:1,__:[1]}),a.createVNode(L,{class:"ok-button",onClick:m,id:"themeButton"},{default:a.withCtx(()=>w[2]||(w[2]=[a.createTextVNode("确认")])),_:1,__:[2]})])]),_:1},8,["visible"])}}},Ed=Ul._export_sfc(Sd,[["__scopeId","data-v-df66eb1f"]]),kt=l=>{var t;let r=l;(r==null?void 0:r[0])==="("&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1));let n=(t=La.analyzeSplitToContent(r,","))==null?void 0:t.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),ci(s)));return n=n==null?void 0:n.join(","),n};let Oa="$R",ko="[Any]";const Dd=l=>{var g,h;let r={},n=l==null?void 0:l[0],t=(h=(g=n==null?void 0:n.replace("{",Oa))==null?void 0:g.split(Oa))==null?void 0:h[0];(t==null?void 0:t[0])==="*"&&(t=t==null?void 0:t.slice(1,t==null?void 0:t.length)),t=t==null?void 0:t.split(":"),r.group=t;let s=l==null?void 0:l[1],c=s==null?void 0:s.replaceAll(ko,"");return(c==null?void 0:c[0])==="$"&&(c=c==null?void 0:c.slice(1,c==null?void 0:c.length)),r.filter=c,r},Bd=l=>{var u,_,S,z,w,j,A;let r=[],n=[],t=l==null?void 0:l.map(N=>{var b;let Y=(b=La.analyzeSplitToContent(N,"@"))==null?void 0:b[0];return(Y==null?void 0:Y[(Y==null?void 0:Y.length)-1])==="@"&&(Y=Y==null?void 0:Y.slice(0,(Y==null?void 0:Y.length)-1)),Y}),s="",c=La.analyzeSplitToContent(t==null?void 0:t[0],":");n=(u=c==null?void 0:c.filter(N=>!(N!=null&&N.includes("{"))&&!(N!=null&&N.includes("["))))==null?void 0:u.join(""),(n==null?void 0:n[(n==null?void 0:n.length)-1])===":"&&(n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1)),(n==null?void 0:n[0])==="*"&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),n=n==null?void 0:n.split(":");let g=c==null?void 0:c.filter(N=>(N==null?void 0:N.includes("{"))||(N==null?void 0:N.includes("["))),h=(S=g==null?void 0:g[0])==null?void 0:S.slice(1,((_=g==null?void 0:g[0])==null?void 0:_.length)-1);h=(z=La.analyzeSplitToContent(h,","))==null?void 0:z.map(N=>((N==null?void 0:N[(N==null?void 0:N.length)-1])===","&&(N=N==null?void 0:N.slice(0,(N==null?void 0:N.length)-1)),N));let v="@"+((w=La.analyzeSplitToContent(l==null?void 0:l[0],"@"))==null?void 0:w[1]);((j=La.analyzeSplitToContent(v,":"))==null?void 0:j.length)>1&&(r=wt((A=La.analyzeSplitToContent(v,":"))==null?void 0:A[1]),r=[r]);let m=[];return h==null||h.forEach((N,Y)=>{var ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K;let b=(ze=N==null?void 0:N.split("=="))==null?void 0:ze[0],L=(Ee=N==null?void 0:N.split("=="))==null?void 0:Ee[1],T=[],x=[],k=[],$=[],U="Input",X=[],be=[];if((N==null?void 0:N[0])!=="{"){if((L==null?void 0:L[0])==="$")L=L==null?void 0:L.slice(1,L==null?void 0:L.length),T=(ke=(ne=L==null?void 0:L.split("*"))==null?void 0:ne[0])==null?void 0:ke.split(":"),x=(D=(te=(Na=(Ke=(de=(Z=L==null?void 0:L.split("*"))==null?void 0:Z[1])==null?void 0:de.replace("{",Oa))==null?void 0:Ke.split(Oa))==null?void 0:Na[0])==null?void 0:te.split(":"))==null?void 0:D.filter(je=>je!==""),k=(ye=(le=L==null?void 0:L.replace("{",Oa))==null?void 0:le.split(Oa))==null?void 0:ye[1],k=k==null?void 0:k.replaceAll("}",""),k=k==null?void 0:k.split(":"),U="Select";else if(((ue=La.analyzeSplitToContent(N,"="))==null?void 0:ue.length)>1){let je=(Ne=b==null?void 0:b.split("="))==null?void 0:Ne[1];if(b=(pa=b==null?void 0:b.split("="))==null?void 0:pa[0],U="Select",!(N!=null&&N.includes("||")))je=(wa=je==null?void 0:je.split("/"))==null?void 0:wa.map(De=>((De==null?void 0:De[(De==null?void 0:De.length)-1])==="/"&&(De=De==null?void 0:De.slice(0,(De==null?void 0:De.length)-1)),De)),$=je==null?void 0:je.map(De=>({label:De==null?void 0:De.replaceAll("'",""),value:De==null?void 0:De.replaceAll("'","")}));else{let De=[];(Pe=(ea=(ee=(ja=N==null?void 0:N.replace("=",Oa))==null?void 0:ja.split(Oa))==null?void 0:ee[1])==null?void 0:ea.split("||"))==null||Pe.forEach(Ma=>{var Ba,Ua,Aa;X.push((Ua=(Ba=Ma==null?void 0:Ma.split("@Filter"))==null?void 0:Ba[0])==null?void 0:Ua.split("/")),De.push((Aa=Ma==null?void 0:Ma.split("@Filter"))==null?void 0:Aa[1])}),be=De==null?void 0:De.map(Ma=>(Ma=Ma==null?void 0:Ma.slice(1,(Ma==null?void 0:Ma.length)-1),Ma))}}else if(N!=null&&N.includes("@")&&!(N!=null&&N.includes("||"))){b=(Ye=(Re=(Te=(He=(xa=b==null?void 0:b.replace("(@",Oa))==null?void 0:xa.split(Oa))==null?void 0:He[0])==null?void 0:Te.replace("@",Oa))==null?void 0:Re.split(Oa))==null?void 0:Ye[0];let je=N!=null&&N.includes("(@")?"(@"+((Va=(qa=N==null?void 0:N.replace("(@",Oa))==null?void 0:qa.split(Oa))==null?void 0:Va[1]):"@"+((F=(P=N==null?void 0:N.replace("@",Oa))==null?void 0:P.split(Oa))==null?void 0:F[1]);if(je=(J=kt(je))==null?void 0:J.split(","),je!=null&&je.find(De=>De==null?void 0:De.includes("@Type"))){let De=(ie=je==null?void 0:je.find(Ma=>Ma==null?void 0:Ma.includes("@Type")))==null?void 0:ie.split("=");De!=null&&De.includes("File")&&(U="Upload"),De!=null&&De.includes("Date")&&(U="Date"),De!=null&&De.includes("DateTime")&&(U="DateTime"),De!=null&&De.includes("Time")&&(U="Time")}}m.push({prop:b,label:b,value:"",menuPath:T,groups:x,columns:k,width:h==null?void 0:h.length,options:$,type:U,allContents:X,filterContents:be})}else{s=s+"@"+((ce=La.analyzeSplitToContent(N,"@"))==null?void 0:ce[1]);let je=(ma=La.analyzeSplitToContent(N,"@"))==null?void 0:ma[0];(je==null?void 0:je[(je==null?void 0:je.length)-1])==="@"&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1));let De=(na=je==null?void 0:je.split("=="))==null?void 0:na[0],Ma=(Ie=je==null?void 0:je.split("=="))==null?void 0:Ie[1],Ba=(Ca=(_e=Ma==null?void 0:Ma.split("*"))==null?void 0:_e[0])==null?void 0:Ca.replace(ko,"");(Ba==null?void 0:Ba[0])==="$"&&(Ba=Ba==null?void 0:Ba.slice(1,Ba==null?void 0:Ba.length)),Ba=La.analyzeSplitToContent(Ba,"$"),Ba=(ve=Ba==null?void 0:Ba.map((Ua,Aa)=>{var Ae;return Aa===0&&(Ba==null?void 0:Ba.length)>1&&(Ua=(Ae=Ua==null?void 0:Ua.split(":"))==null?void 0:Ae[0]),(Ba==null?void 0:Ba.length)>1&&Aa===(Ba==null?void 0:Ba.length)-1&&(Ua=Ua+":"),Ua}))==null?void 0:ve.join(":"),T=Ba==null?void 0:Ba.split(":"),x=(va=(Le=(_a=(Fe=(Qe=(Je=Ma==null?void 0:Ma.split("*"))==null?void 0:Je[1])==null?void 0:Qe.replace("{",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[0])==null?void 0:Le.split(":"))==null?void 0:va.filter(Ua=>Ua!==""),k=(Se=(re=Ma==null?void 0:Ma.replace("{",Oa))==null?void 0:re.split(Oa))==null?void 0:Se[1],k=k==null?void 0:k.replaceAll("}",""),De=De==null?void 0:De.slice(1,(De==null?void 0:De.length)-1),k=k==null?void 0:k.split(","),U="Select",(K=De==null?void 0:De.split(","))==null||K.forEach((Ua,Aa)=>{var Ae,we;m.push({prop:Ua,label:Ua,value:"",menuPath:T,groups:x,columns:(Ae=k==null?void 0:k[Aa])==null?void 0:Ae.split(":"),width:(we=De==null?void 0:De.split(","))==null?void 0:we.length,type:U})})}}),{groupName:n,formContents:m,contents:r,filter:s}},wt=l=>{var t,s;let r=[],n=l.slice(1,(l==null?void 0:l.length)-1);if((n==null?void 0:n[0])!=="[")(t=La.analyzeSplitToContent(n,","))==null||t.forEach(c=>{(c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c.slice(0,(c==null?void 0:c.length)-1)),r.push(c??"")});else{let c=[];(s=La.analyzeSplitToContent(n,","))==null||s.forEach(g=>{(g==null?void 0:g[(g==null?void 0:g.length)-1])===","&&(g=g==null?void 0:g.slice(0,(g==null?void 0:g.length)-1)),c.push(wt(g))}),r=c}return r},si=(l,r)=>{var A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa;let n,t=[],s=[],c=[],g=[],h=[],v=[],m=[],u="Input",_,S="",z="",w=[],j="";if(l!=null&&l.includes("@Pam")||l!=null&&l.includes("==")||l!=null&&l.includes("="))if(l!=null&&l.includes("@Pam")){let Ae=La.analyzeSplitToContent(l,"=");if((Ae==null?void 0:Ae.length)>1){l=Ae==null?void 0:Ae[0],l=l==null?void 0:l.slice(0,(l==null?void 0:l.length)-1);let Ge=Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1];(Ge==null?void 0:Ge[0])==="&"&&(Ge=Ge==null?void 0:Ge.slice(1,Ge==null?void 0:Ge.length)),z=(N=(A=Ge==null?void 0:Ge.replace("(",Oa))==null?void 0:A.split(Oa))==null?void 0:N[0];let ol=(b=(Y=Ge==null?void 0:Ge.replace(")",Oa))==null?void 0:Y.split(Oa))==null?void 0:b[0];ol=(T=(L=ol==null?void 0:ol.replace("(",Oa))==null?void 0:L.split(Oa))==null?void 0:T[1],(ol==null?void 0:ol[0])==="{"&&(ol=ol==null?void 0:ol.slice(1,ol==null?void 0:ol.length)),(ol==null?void 0:ol[(ol==null?void 0:ol.length)-1])==="}"&&(ol=ol==null?void 0:ol.slice(0,(ol==null?void 0:ol.length)-1)),w=ol==null?void 0:ol.split(",");let Sl=(k=(x=Ge==null?void 0:Ge.replace(")",Oa))==null?void 0:x.split(Oa))==null?void 0:k[1];Sl&&Sl!==""&&(j=kt(Sl))}n=(U=($=l==null?void 0:l.replace("@Pam",Oa))==null?void 0:$.split(Oa))==null?void 0:U[0];let we=(be=(X=l==null?void 0:l.replace("@Pam",Oa))==null?void 0:X.split(Oa))==null?void 0:be[1];we=we==null?void 0:we.slice(1,(we==null?void 0:we.length)-1),we=(ze=La.analyzeSplitToContent(we,","))==null?void 0:ze.map(Ge=>(Ge="@"+Ge,Ge));let Ea=we==null?void 0:we.find(Ge=>Ge==null?void 0:Ge.includes("@Type"));Ea!=null&&Ea.includes("File")&&(u="Upload"),Ea!=null&&Ea.includes("Date")&&(u="Date"),Ea!=null&&Ea.includes("DateTime")&&(u="DateTime"),Ea!=null&&Ea.includes("Time")&&(u="Time"),_=we==null?void 0:we.find(Ge=>Ge==null?void 0:Ge.includes("@IdentName")),_=_?(ne=(Ee=_==null?void 0:_.replace("=",Oa))==null?void 0:Ee.split(Oa))==null?void 0:ne[1]:n}else{if(n=(ke=l==null?void 0:l.split("=="))==null?void 0:ke[0],_=(Z=l==null?void 0:l.split("=="))==null?void 0:Z[0],l!=null&&l.includes("=")&&!(l!=null&&l.includes("=="))&&!((Na=(Ke=(de=l==null?void 0:l.replace("=",Oa))==null?void 0:de.split(Oa))==null?void 0:Ke[1])!=null&&Na.includes("||")))if(n=(te=l==null?void 0:l.split("="))==null?void 0:te[0],_=n,l!=null&&l.includes("(@")||l!=null&&l.includes("@")){if(l!=null&&l.includes("(@")){let we=(D=l==null?void 0:l.split("(@"))==null?void 0:D[1];we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),we=(ye=(le=we==null?void 0:we.replace("(",Oa))==null?void 0:le.split(Oa))==null?void 0:ye[1],we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),c==null||c.push(we),l=(ue=l==null?void 0:l.split("(@"))==null?void 0:ue[0]}else{let we=(Ne=l==null?void 0:l.split("@"))==null?void 0:Ne[1];we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),we=(wa=(pa=we==null?void 0:we.replace("(",Oa))==null?void 0:pa.split(Oa))==null?void 0:wa[1],we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1),c==null||c.push(we),l=(ja=l==null?void 0:l.split("@"))==null?void 0:ja[0]}let Ae=(ea=(ee=l==null?void 0:l.split("="))==null?void 0:ee[1])==null?void 0:ea.split("/");s.push(Ae)}else t=(xa=La.analyzeSplitToContent((Pe=l==null?void 0:l.split("="))==null?void 0:Pe[1],"/"))==null?void 0:xa.map(Ae=>((Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1])==="/"&&(Ae=Ae==null?void 0:Ae.slice(0,(Ae==null?void 0:Ae.length)-1)),Ae)),t=t==null?void 0:t.map(Ae=>({label:Ae==null?void 0:Ae.replaceAll("'",""),value:Ae==null?void 0:Ae.replaceAll("'","")}));else if((Re=(Te=(He=l==null?void 0:l.replace("=",Oa))==null?void 0:He.split(Oa))==null?void 0:Te[1])!=null&&Re.includes("||")){n=(Ye=l==null?void 0:l.split("="))==null?void 0:Ye[0],_=(qa=l==null?void 0:l.split("="))==null?void 0:qa[0];let Ae=[];(J=(F=(P=(Va=l==null?void 0:l.replace("=",Oa))==null?void 0:Va.split(Oa))==null?void 0:P[1])==null?void 0:F.split("||"))==null||J.forEach(we=>{var Ea,Ge,ol;s.push((Ge=(Ea=we==null?void 0:we.split("@Filter"))==null?void 0:Ea[0])==null?void 0:Ge.split("/")),Ae.push((ol=we==null?void 0:we.split("@Filter"))==null?void 0:ol[1])}),c=Ae==null?void 0:Ae.map(we=>(we=we==null?void 0:we.slice(1,(we==null?void 0:we.length)-1),we))}else{let Ae=l==null?void 0:l.split("=="),we=(ie=Ae==null?void 0:Ae.filter(Ea=>(Ea==null?void 0:Ea[0])==="$"))==null?void 0:ie[0];if(we&&!(we!=null&&we.includes("&"))){let Ea=(ce=we==null?void 0:we.replace("*",Oa))==null?void 0:ce.split(Oa),Ge=(Ea==null?void 0:Ea[0])===""?r==null?void 0:r.value:Ea==null?void 0:Ea[0];Ge=Ge==null?void 0:Ge.replaceAll("[Any]",""),(Ge==null?void 0:Ge[0])==="$"&&(Ge=(ma=Ge==null?void 0:Ge.slice(1,Ge==null?void 0:Ge.length))==null?void 0:ma.replaceAll(":","/")),g=Ge==null?void 0:Ge.split("/");let ol=(Ie=(na=Ea==null?void 0:Ea[1])==null?void 0:na.replace("{",Oa))==null?void 0:Ie.split(Oa),Sl=ol==null?void 0:ol[0];(Sl==null?void 0:Sl[(Sl==null?void 0:Sl.length)-1])===":"&&(Sl=Sl==null?void 0:Sl.slice(0,(Sl==null?void 0:Sl.length)-1)),h=Sl==null?void 0:Sl.split(":"),v=(Je=(ve=(Ca=(_e=ol==null?void 0:ol[1])==null?void 0:_e.replace("}",Oa))==null?void 0:Ca.split(Oa))==null?void 0:ve[0])==null?void 0:Je.split(":");let Nl=(_a=(Fe=(Qe=ol==null?void 0:ol[(ol==null?void 0:ol.length)-1])==null?void 0:Qe.replace("}",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[1];Nl&&Nl!==""&&(S=kt(Nl))}if(Ae!=null&&Ae.some(Ea=>(Ea==null?void 0:Ea[0])==="&")){let Ea=(Le=Ae==null?void 0:Ae.filter(Sl=>(Sl==null?void 0:Sl[0])==="&"))==null?void 0:Le[0];(Ea==null?void 0:Ea[0])==="&"&&(Ea=Ea==null?void 0:Ea.slice(1,Ea==null?void 0:Ea.length)),z=(re=(va=Ea==null?void 0:Ea.replace("(",Oa))==null?void 0:va.split(Oa))==null?void 0:re[0];let Ge=(K=(Se=Ea==null?void 0:Ea.replace(")",Oa))==null?void 0:Se.split(Oa))==null?void 0:K[0];Ge=(De=(je=Ge==null?void 0:Ge.replace("(",Oa))==null?void 0:je.split(Oa))==null?void 0:De[1],(Ge==null?void 0:Ge[0])==="{"&&(Ge=Ge==null?void 0:Ge.slice(1,Ge==null?void 0:Ge.length)),(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])==="}"&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),w=Ge==null?void 0:Ge.split(",");let ol=(Ba=(Ma=Ea==null?void 0:Ea.replace(")",Oa))==null?void 0:Ma.split(Oa))==null?void 0:Ba[1];ol&&ol!==""&&(j=kt(ol))}else if(!we){let Ea=Ae==null?void 0:Ae[(Ae==null?void 0:Ae.length)-1];Ea=Ea==null?void 0:Ea.slice(1,(Ea==null?void 0:Ea.length)-1),Ea=La.analyzeSplitToContent(Ea,","),Ea=Ea==null?void 0:Ea.map(Ge=>((Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])===","&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),Ge)),Ea=Ea==null?void 0:Ea.map(Ge=>{var ol,Sl;if(Ge=Ge==null?void 0:Ge.replaceAll("$",""),Ge!=null&&Ge.includes(ko)){let Nl="",Ra=Ge==null?void 0:Ge.split(ko);Nl=((Sl=(ol=Ra==null?void 0:Ra[0])==null?void 0:ol.split(":"))==null?void 0:Sl[0])+":"+(Ra==null?void 0:Ra[1]),Ge=Nl,Ge=Ge+":"}return Ge=Ge==null?void 0:Ge.replaceAll(":","/"),Ge}),m=Ea}}u="Select"}else n=l,_=l;return n!=null&&n.includes("@Pam")&&(n=(Aa=(Ua=l==null?void 0:l.replace("@Pam",Oa))==null?void 0:Ua.split(Oa))==null?void 0:Aa[0],_=n),{label:n,prop:_,options:t,allContents:s,filterContents:c,menus:g,groups:h,words:v,align:"center",formType:u,filter:S,functionName:z,functionRelatedWords:w,calculatorFilter:j,relatedPages:m}},xo=(l,r)=>{var t,s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke;let n=[];if((l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&!((g=(c=(s=(t=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1))==null?void 0:t.replace(":",Oa))==null?void 0:s.split(Oa))==null?void 0:c[0])!=null&&g.includes(","))){let Z=l==null?void 0:l.slice(1,(l==null?void 0:l.length)-1),de=(h=Z==null?void 0:Z.replace(":",Oa))==null?void 0:h.split(Oa);if(((v=La.analyzeSplitToContent(de==null?void 0:de[1],"="))==null?void 0:v.length)===1){let Ke=de==null?void 0:de[0],Na=[];(_=La.analyzeSplitToContent((u=de==null?void 0:de[1])==null?void 0:u.slice(1,((m=de==null?void 0:de[1])==null?void 0:m.length)-1),","))==null||_.forEach(te=>{var D,le;((D=La.analyzeSplitToContent(te,"="))==null?void 0:D.length)>1?((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),Na=[...Na,...xo(te,r)]):((te==null?void 0:te[(te==null?void 0:te.length)-1])===","&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),Na.push((le=xo(te,r))==null?void 0:le[0]))}),n==null||n.push({label:Ke,prop:Ke,children:Na,align:"center"})}else{let Ke=[];if(((S=La.analyzeSplitToContent(Z,"="))==null?void 0:S.length)>=2){let te=(z=La.analyzeSplitToContent(Z,"="))==null?void 0:z[1],D=(w=La.analyzeSplitToContent(te,"/"))==null?void 0:w.map(le=>((le==null?void 0:le[(le==null?void 0:le.length)-1])==="/"&&(le=le==null?void 0:le.slice(0,(le==null?void 0:le.length)-1)),le));Ke=D==null?void 0:D.map(le=>(le=wt(le),le))}let Na=(L=(b=(Y=(N=(A=(j=Z==null?void 0:Z.replace("{",Oa))==null?void 0:j.split(Oa))==null?void 0:A[1])==null?void 0:N.replace("}",Oa))==null?void 0:Y.split(Oa))==null?void 0:b[0])==null?void 0:L.split(",");Na==null||Na.forEach((te,D)=>{(Ke==null?void 0:Ke.length)>0&&D===0?n==null||n.push({label:te,prop:te,align:"center",formType:"Select",relatedContents:Ke==null?void 0:Ke.map(le=>{let ye={};return Na==null||Na.forEach((ue,Ne)=>{ye[ue]=le==null?void 0:le[Ne]}),ye}),options:Ke==null?void 0:Ke.map(le=>({label:le==null?void 0:le[0],value:le==null?void 0:le[0]})),mainKey:!0}):n==null||n.push({label:te,prop:te,align:"center"})})}}else if((l==null?void 0:l[0])==="{")if(((T=La.analyzeSplitToContent(l,"="))==null?void 0:T.length)===2&&((k=(x=La.analyzeSplitToContent(l,"="))==null?void 0:x[1])==null?void 0:k[0])==="["){let Z=[];if((($=La.analyzeSplitToContent(l,"="))==null?void 0:$.length)>=2){let Ke=(U=La.analyzeSplitToContent(l,"="))==null?void 0:U[1],Na=(X=La.analyzeSplitToContent(Ke,"/"))==null?void 0:X.map(te=>((te==null?void 0:te[(te==null?void 0:te.length)-1])==="/"&&(te=te==null?void 0:te.slice(0,(te==null?void 0:te.length)-1)),te));Z=Na==null?void 0:Na.map(te=>(te=wt(te),te))}let de=(ze=(be=l==null?void 0:l.replace("}",Oa))==null?void 0:be.split(Oa))==null?void 0:ze[0];de=(Ee=de==null?void 0:de.slice(1,de==null?void 0:de.length))==null?void 0:Ee.split(","),de==null||de.forEach((Ke,Na)=>{(Z==null?void 0:Z.length)>0&&Na===0?n==null||n.push({label:Ke,prop:Ke,align:"center",formType:"Select",relatedContents:Z==null?void 0:Z.map(te=>{let D={};return de==null||de.forEach((le,ye)=>{D[le]=te==null?void 0:te[ye]}),D}),options:Z==null?void 0:Z.map(te=>({label:te==null?void 0:te[0],value:te==null?void 0:te[0]})),mainKey:!0}):n==null||n.push({label:Ke,prop:Ke,align:"center"})})}else(ne=La.analyzeSplitToContent(l,","))==null||ne.forEach(Z=>{var de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se;if((Z==null?void 0:Z[(Z==null?void 0:Z.length)-1])===","&&(Z=Z==null?void 0:Z.slice(0,(Z==null?void 0:Z.length)-1)),(Z==null?void 0:Z[0])==="{"){let K=La.analyzeSplitToContent(Z,"="),je=K==null?void 0:K[(K==null?void 0:K.length)-1],De=[],Ma=[],Ba=[],Ua=[],Aa=[],Ae=(de=je==null?void 0:je.replace("*",Oa))==null?void 0:de.split(Oa),we=(Ae==null?void 0:Ae[0])===""?r==null?void 0:r.value:Ae==null?void 0:Ae[0];if(we=we==null?void 0:we.replaceAll("[Any]",""),(we==null?void 0:we[(we==null?void 0:we.length)-1])===":"&&(we=we!=null&&we.includes("(@")?((Ke=we==null?void 0:we.split("(@"))==null?void 0:Ke[0])+":":((Na=we==null?void 0:we.split("@"))==null?void 0:Na[0])+":"),(we==null?void 0:we[0])==="$"&&(we=(te=we==null?void 0:we.slice(1,we==null?void 0:we.length))==null?void 0:te.replaceAll(":","/")),we!=null&&we.includes("$")){let Ra=(D=we==null?void 0:we.split("$"))==null?void 0:D[0];Ra=(le=Ra==null?void 0:Ra.split("/"))==null?void 0:le[0],we=Ra+"/"+((ye=we==null?void 0:we.split("$"))==null?void 0:ye[1])+"/"}(we==null?void 0:we[(we==null?void 0:we.length)-1])==="/"&&(we==null?void 0:we[(we==null?void 0:we.length)-2])==="/"&&(we=we==null?void 0:we.slice(0,(we==null?void 0:we.length)-1)),De=we==null?void 0:we.split("/");let Ea=(Ne=(ue=Ae==null?void 0:Ae[1])==null?void 0:ue.replace("{",Oa))==null?void 0:Ne.split(Oa);if((ja=(wa=(pa=Ae==null?void 0:Ae[1])==null?void 0:pa.split("(@"))==null?void 0:wa[0])!=null&&ja.includes("&&")||(Pe=(ea=(ee=Ae==null?void 0:Ae[1])==null?void 0:ee.split("@"))==null?void 0:ea[0])!=null&&Pe.includes("&&")){let Ra=(xa=Ae==null?void 0:Ae[1])!=null&&xa.includes("(@")?(Re=(Te=(He=Ae==null?void 0:Ae[1])==null?void 0:He.split("(@"))==null?void 0:Te[0])==null?void 0:Re.split("&&"):(Va=(qa=(Ye=Ae==null?void 0:Ae[1])==null?void 0:Ye.split("@"))==null?void 0:qa[0])==null?void 0:Va.split("&&");Ua=Ra==null?void 0:Ra.map(ga=>{var qe,rl;return(ga==null?void 0:ga[0])==="*"&&(ga=ga==null?void 0:ga.slice(1,ga==null?void 0:ga.length)),ga=(rl=(qe=ga==null?void 0:ga.replace("{",Oa))==null?void 0:qe.split(Oa))==null?void 0:rl[0],(ga==null?void 0:ga[(ga==null?void 0:ga.length)-1])===":"&&(ga=ga==null?void 0:ga.slice(0,(ga==null?void 0:ga.length)-1)),ga=ga==null?void 0:ga.split(":"),ga});let al=[];Ra==null||Ra.forEach((ga,qe)=>{var rl,da;(ga==null?void 0:ga[0])==="*"&&(ga=ga==null?void 0:ga.slice(1,ga==null?void 0:ga.length)),ga=(da=(rl=ga==null?void 0:ga.replace("{",Oa))==null?void 0:rl.split(Oa))==null?void 0:da[1],(ga==null?void 0:ga[(ga==null?void 0:ga.length)-1])==="}"&&(ga=ga==null?void 0:ga.slice(0,(ga==null?void 0:ga.length)-1)),ga=ga==null?void 0:ga.split(","),al.push(qe===0?(ga==null?void 0:ga.length)-1:ga==null?void 0:ga.length),Aa=[...Aa,...ga]}),al=(P=La.prefixSum(al))==null?void 0:P.map(ga=>ga==null?void 0:ga.total),Ua=Ua==null?void 0:Ua.map((ga,qe)=>({number:al==null?void 0:al[qe],contents:ga}))}let Ge=Ea==null?void 0:Ea[0];(Ge==null?void 0:Ge[(Ge==null?void 0:Ge.length)-1])===":"&&(Ge=Ge==null?void 0:Ge.slice(0,(Ge==null?void 0:Ge.length)-1)),Ma=Ge==null?void 0:Ge.split(":"),Ba=(ce=(ie=(J=(F=Ea==null?void 0:Ea[1])==null?void 0:F.replace("}",Oa))==null?void 0:J.split(Oa))==null?void 0:ie[0])==null?void 0:ce.split(",");let ol=(na=K==null?void 0:K[0])==null?void 0:na.slice(1,((ma=K==null?void 0:K[0])==null?void 0:ma.length)-2),Sl="",Nl="";if((Ie=K==null?void 0:K[(K==null?void 0:K.length)-1])!=null&&Ie.includes("(@")?(Nl=(ve=(Ca=(_e=K==null?void 0:K[(K==null?void 0:K.length)-1])==null?void 0:_e.replace("(@",Oa))==null?void 0:Ca.split(Oa))==null?void 0:ve[1],Nl="(@"+Nl):(Je=K==null?void 0:K[(K==null?void 0:K.length)-1])!=null&&Je.includes("@")&&(Nl=(_a=(Fe=(Qe=K==null?void 0:K[(K==null?void 0:K.length)-1])==null?void 0:Qe.replace("@",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[1],Nl="@"+Nl),((Le=La.analyzeSplitToContent(Nl,"&"))==null?void 0:Le.length)>1){let Ra=(re=(va=La.analyzeSplitToContent(Nl,"}"))==null?void 0:va.map(al=>{var ga;return al!=null&&al.includes("@")||(al=""),al!=null&&al.includes("@")&&(al=(ga=La.analyzeSplitToContent(al,":"))==null?void 0:ga[0],(al==null?void 0:al[(al==null?void 0:al.length)-1])===":"&&(al=al==null?void 0:al.slice(0,(al==null?void 0:al.length)-1)),(al==null?void 0:al[0])==="("&&(al=al==null?void 0:al.slice(1,(al==null?void 0:al.length)-1))),al}))==null?void 0:re.filter(al=>al!=="");Nl=(Nl==null?void 0:Nl.length)===1?Ra:"("+(Ra==null?void 0:Ra.join(","))+")"}Nl&&Nl!==""&&(Sl=kt(Nl)),(Se=ol==null?void 0:ol.split(","))==null||Se.forEach((Ra,al)=>{var ga,qe,rl;n.push({label:Ra,prop:Ra,align:"center",menus:De,groups:(Ua==null?void 0:Ua.length)===0?Ma:(ga=Ua==null?void 0:Ua.find(da=>(da==null?void 0:da.number)>=al))==null?void 0:ga.contents,words:(Aa==null?void 0:Aa.length)===0?(qe=Ba==null?void 0:Ba[al])==null?void 0:qe.split(":"):(rl=Aa==null?void 0:Aa[al])==null?void 0:rl.split(":"),formType:(De==null?void 0:De.length)>0?"Select":"Input",mainKey:al===0,filter:Sl,isMainPath:(Ua==null?void 0:Ua.findIndex(da=>(da==null?void 0:da.number)>=al))===0})})}else n.push({label:Z,prop:Z,align:"center"})});else{let Z=(ke=La.analyzeSplitToContent(l,","))==null?void 0:ke.map(de=>((de==null?void 0:de[(de==null?void 0:de.length)-1])===","&&(de=de==null?void 0:de.slice(0,(de==null?void 0:de.length)-1)),de));Z==null||Z.forEach(de=>{n.push(si(de,r))})}return n},Nd=(l,r)=>{var g,h,v,m,u;let n=l;if(!l)return;let t="";((g=La.analyzeSplitToContent(l,"}"))==null?void 0:g.length)>1&&(n=(h=La.analyzeSplitToContent(l,"}"))==null?void 0:h[0],t=(v=La.analyzeSplitToContent(l,"}"))==null?void 0:v[1]),(l==null?void 0:l[0])==="{"&&(l==null?void 0:l[(l==null?void 0:l.length)-1])==="}"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1));let s=[],c=[];return s.push({label:"排序",prop:"sort"}),s.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(m=La.analyzeSplitToContent(n,","))==null||m.forEach(_=>{var S;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(S=xo(_,r))==null||S.forEach(z=>{s.push(z)}):s.push(si(_,r))}),t!==""&&((t==null?void 0:t[0])=="{"&&(t=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)),(u=La.analyzeSplitToContent(t,","))==null||u.forEach(_=>{var S;(_==null?void 0:_[(_==null?void 0:_.length)-1])===","&&(_=_==null?void 0:_.slice(0,(_==null?void 0:_.length)-1)),(_==null?void 0:_[0])==="{"?(S=xo(_,r))==null||S.forEach(z=>{c.push(z)}):c.push(si(_,r))})),{columns:s,secondColumns:c}},ci=l=>{var r,n,t;if(l!=null&&l.includes("@Filter")||l!=null&&l.includes("@Condition"))return l;{let s=(n=(r=l==null?void 0:l.replace("(",Oa))==null?void 0:r.split(Oa))==null?void 0:n[1];return s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1),s=(t=La.analyzeSplitToContent(s,","))==null?void 0:t.map(c=>((c==null?void 0:c[(c==null?void 0:c.length)-1])===","&&(c=c==null?void 0:c.slice(0,(c==null?void 0:c.length)-1)),"@"+c)),s=s==null?void 0:s.join(","),l!=null&&l.includes("@Quote")&&(s!=null&&s.includes("@Type")||(s=s===""?s+"@Type=Manual":s+",@Type=Manual"),s!=null&&s.includes("@SonSync")||(s=s===""?s+"@SonSync=No":s+",@SonSync=No"),s!=null&&s.includes("@FatherSync")||(s=s===""?s+"@FatherSync=Yes":s+",@FatherSync=Yes")),s}},Zi=l=>{let r=l==null?void 0:l.map(n=>{var t,s;return{menus:n==null?void 0:n.menus,content:((t=n==null?void 0:n.menus)==null?void 0:t.join("/"))+Oa+((s=n==null?void 0:n.groups)==null?void 0:s.join("/"))}});return r=r==null?void 0:r.filter(n=>{var t;return(n==null?void 0:n.menus)&&((t=n==null?void 0:n.menus)==null?void 0:t.length)>0}),r=r==null?void 0:r.map(n=>n==null?void 0:n.content),r=[...new Set(r)],r=r==null?void 0:r.map(n=>{var t,s;return{menus:(t=n==null?void 0:n.split(Oa))==null?void 0:t[0],groups:((s=n==null?void 0:n.split(Oa))==null?void 0:s[1])??[]}}),r},Td=(l,r,n="")=>{var N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va;let t=[];if(((N=l==null?void 0:l[0])==null?void 0:N[0])!=="*"&&((Y=l==null?void 0:l[0])==null?void 0:Y[0])!=="$")return;let s=La.analyzeSplitToContent(l==null?void 0:l[0],":"),c=s==null?void 0:s.filter(re=>!((re==null?void 0:re[0])!=="{"&&(re==null?void 0:re[0])!=="["));t=(b=s==null?void 0:s.filter(re=>(re==null?void 0:re[0])!=="{"&&(re==null?void 0:re[0])!=="["))==null?void 0:b.join("");let g="",h="";if((t==null?void 0:t[(t==null?void 0:t.length)-1])===":"&&(t=t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1)),t!=null&&t.includes("(@")&&(t==null?void 0:t[0])==="*"&&(g="(@"+((L=t==null?void 0:t.split("(@"))==null?void 0:L[1]),t=(T=t==null?void 0:t.split("(@"))==null?void 0:T[0]),t!=null&&t.includes("@")&&(t==null?void 0:t[0])==="*"&&(g="@"+((k=(x=t==null?void 0:t.replace("@",Oa))==null?void 0:x.split(Oa))==null?void 0:k[1]),t=(U=($=t==null?void 0:t.replace("@",Oa))==null?void 0:$.split(Oa))==null?void 0:U[0]),(t==null?void 0:t[0])==="*"?(t=t==null?void 0:t.slice(1,t==null?void 0:t.length),t=t==null?void 0:t.split(":")):(h=I.cloneDeep(t)+":",t=[]),h=h+((c==null?void 0:c[0])??""),(h==null?void 0:h[(h==null?void 0:h.length)-1])===":"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1)),g!==""&&h!=="")if((h==null?void 0:h[(h==null?void 0:h.length)-1])===")")if(h!=null&&h.includes("(@")){let re=(X=h==null?void 0:h.split("(@"))==null?void 0:X[0],Se=(be=h==null?void 0:h.split("(@"))==null?void 0:be[1];Se="(@"+(Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1))+g,h=re+Se}else{let re=(Ee=(ze=h==null?void 0:h.replace("@",Oa))==null?void 0:ze.split(Oa))==null?void 0:Ee[0],Se=(ke=(ne=h==null?void 0:h.replace("@",Oa))==null?void 0:ne.split(Oa))==null?void 0:ke[1];Se="(@"+Se+g,h=re+Se}else h=h+g;let v=c==null?void 0:c[1];(h==null?void 0:h[0])==="["&&(v=I.cloneDeep(h)+(v??""),h="");let m=v?wt(v):[];!(m!=null&&m.every(re=>Array.isArray(re)))&&(m==null?void 0:m.length)>0&&(m=[m]);let u=(Z=La.analyzeSplitToContent(h,"@"))!=null&&Z[1]?"@"+((de=La.analyzeSplitToContent(h,"@"))==null?void 0:de[1]):"";if(h=(Ke=La.analyzeSplitToContent(h,"@"))==null?void 0:Ke[0],(h==null?void 0:h[0])==="$"&&(u=I.cloneDeep(h)+(u??""),h=""),n!=="")if(g!=="")u=(n==null?void 0:n[(n==null?void 0:n.length)-1])!==")"?n+g:(n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1))+","+g;else{let re="";if(n!=null&&n.includes("(@")){let Se=(ye=(le=(D=(te=(Na=n==null?void 0:n.replace("(@",Oa))==null?void 0:Na.split(Oa))==null?void 0:te[0])==null?void 0:D.replace("{",Oa))==null?void 0:le.split(Oa))==null?void 0:ye[0];re=((Se==null?void 0:Se[(Se==null?void 0:Se.length)-1])===":"?Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1):Se)+"(@"+((Ne=(ue=n==null?void 0:n.replace("(@",Oa))==null?void 0:ue.split(Oa))==null?void 0:Ne[1])}else if(n!=null&&n.includes("@")){let Se=(ea=(ee=(ja=(wa=(pa=n==null?void 0:n.replace("@",Oa))==null?void 0:pa.split(Oa))==null?void 0:wa[0])==null?void 0:ja.replace("{",Oa))==null?void 0:ee.split(Oa))==null?void 0:ea[0];re=((Se==null?void 0:Se[(Se==null?void 0:Se.length)-1])===":"?Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1):Se)+"@"+((xa=(Pe=n==null?void 0:n.replace("@",Oa))==null?void 0:Pe.split(Oa))==null?void 0:xa[1])}u=re===""?n:re}if(u!==""){(u==null?void 0:u[0])==="$"&&(u=u==null?void 0:u.slice(1,u==null?void 0:u.length)),(u==null?void 0:u[(u==null?void 0:u.length)-1])===":"&&(u=u==null?void 0:u.slice(0,(u==null?void 0:u.length)-1));let re="";if(u!=null&&u.includes("(@")){re=(Te=(He=u==null?void 0:u.replace("(@",Oa))==null?void 0:He.split(Oa))==null?void 0:Te[0];let Se=(Ye=(Re=u==null?void 0:u.replace("(@",Oa))==null?void 0:Re.split(Oa))==null?void 0:Ye[1];Se="@"+(Se==null?void 0:Se.slice(0,(Se==null?void 0:Se.length)-1));let K=(qa=La.analyzeSplitToContent(Se,","))==null?void 0:qa.map(je=>((je==null?void 0:je[(je==null?void 0:je.length)-1])===","&&(je=je==null?void 0:je.slice(0,(je==null?void 0:je.length)-1)),(je==null?void 0:je[(je==null?void 0:je.length)-1])!==")"&&(je=je+")"),ci(je)));u=re+"("+(K==null?void 0:K.join(","))+")"}else{re=(P=(Va=u==null?void 0:u.replace("@",Oa))==null?void 0:Va.split(Oa))==null?void 0:P[0];let Se=(J=(F=u==null?void 0:u.replace("@",Oa))==null?void 0:F.split(Oa))==null?void 0:J[1];if(Se){Se="@"+Se;let K=(ie=La.analyzeSplitToContent(Se,","))==null?void 0:ie.map(je=>((je==null?void 0:je[(je==null?void 0:je.length)-1])!==")"&&(je=je+")"),ci(je)));u=re+"("+(K==null?void 0:K.join(","))+")"}else u=re}}(h==null?void 0:h[(h==null?void 0:h.length)-1])==="@"&&(h=h==null?void 0:h.slice(0,(h==null?void 0:h.length)-1));let _=Nd(h,r),S=h===""?[]:(_==null?void 0:_.columns)??[],z=sa.getColumnChild(S),w=z;w=w==null?void 0:w.filter(re=>{var Se,K;return(re==null?void 0:re.filter)&&(re==null?void 0:re.filter)!==""&&(((Se=re==null?void 0:re.filter)==null?void 0:Se.includes("@SonSync"))||((K=re==null?void 0:re.filter)==null?void 0:K.includes("@FatherSync")))});let j=w==null?void 0:w.filter(re=>{var Se,K,je;return((Se=re==null?void 0:re.filter)==null?void 0:Se.includes("@SonSync"))&&((je=(K=re==null?void 0:re.filter)==null?void 0:K.split(","))==null?void 0:je.find(De=>(De==null?void 0:De.includes("@SonSync"))&&(De==null?void 0:De.includes("Yes"))))}),A=w==null?void 0:w.filter(re=>{var Se,K,je;return((Se=re==null?void 0:re.filter)==null?void 0:Se.includes("@FatherSync"))&&((je=(K=re==null?void 0:re.filter)==null?void 0:K.split(","))==null?void 0:je.find(De=>(De==null?void 0:De.includes("@FatherSync"))&&(De==null?void 0:De.includes("Yes"))))});if(z=z==null?void 0:z.map(re=>{var Se,K;return{menus:re==null?void 0:re.menus,content:((Se=re==null?void 0:re.menus)==null?void 0:Se.join("/"))+Oa+((K=re==null?void 0:re.groups)==null?void 0:K.join("/"))}}),A=Zi(A),j=Zi(j),z=z==null?void 0:z.filter(re=>{var Se;return(re==null?void 0:re.menus)&&((Se=re==null?void 0:re.menus)==null?void 0:Se.length)>0}),z=z==null?void 0:z.map(re=>re==null?void 0:re.content),z=[...new Set(z)],z=z==null?void 0:z.map(re=>{var Se,K;return{menus:(Se=re==null?void 0:re.split(Oa))==null?void 0:Se[0],groups:((K=re==null?void 0:re.split(Oa))==null?void 0:K[1])??[]}}),S!=null&&S.some(re=>{var Se;return Array.isArray(re==null?void 0:re.children)&&((Se=re==null?void 0:re.children)==null?void 0:Se.length)>0})&&(S=[S]),(m==null?void 0:m.length)>0&&(Array.isArray(m==null?void 0:m[0])&&((ce=m==null?void 0:m[0])!=null&&ce.every(re=>Array.isArray(re)))?m=m==null?void 0:m.map((re,Se)=>(re=re.map((K,je)=>(K.unshift("{}"),K.unshift((je+1).toString()),K)),re)):m=m==null?void 0:m.map((re,Se)=>(re.unshift("{}"),re.unshift((Se+1).toString()),re))),_!=null&&_.secondColumns&&((ma=_==null?void 0:_.secondColumns)==null?void 0:ma.length)>0&&((m==null?void 0:m.length)>0?m=m==null?void 0:m.map((re,Se)=>{var K,je;return Array.isArray(re==null?void 0:re[0])?re=re==null?void 0:re.map((De,Ma)=>{var Ba,Ua;return De.unshift((Ua=(Ba=_==null?void 0:_.secondColumns)==null?void 0:Ba[Ma])==null?void 0:Ua.prop),De}):re.unshift((je=(K=_==null?void 0:_.secondColumns)==null?void 0:K[Se])==null?void 0:je.prop),re}):m=(na=_==null?void 0:_.secondColumns)==null?void 0:na.map((re,Se)=>(re=[re==null?void 0:re.label],re.push(Se),re)),S.unshift({label:"",prop:"disabled",sortable:!1})),(S==null?void 0:S.length)>0){let re=I.cloneDeep(S);Array.isArray(re==null?void 0:re[0])&&(re=re==null?void 0:re[0]);let Se=sa.getColumnChild(re);Se=Se==null?void 0:Se.map(K=>K==null?void 0:K.filter),Se=Se==null?void 0:Se.filter(K=>K&&K!==""),Se=[...new Set(Se)],(Se==null?void 0:Se.length)>0&&(u=Oa+(u==null?void 0:u.slice(1,(u==null?void 0:u.length)-1))+(u!=null&&u.slice(1,(u==null?void 0:u.length)-1)?",":"")+((Ie=I.cloneDeep(Se))==null?void 0:Ie.join(";")))}if((u==null?void 0:u[0])!=="("&&(u!=null&&u.includes("(@"))){let re=(Ca=(_e=u==null?void 0:u.replace("(",Oa))==null?void 0:_e.split(Oa))==null?void 0:Ca[0],Se=[{menus:(Je=(ve=re==null?void 0:re.split("*"))==null?void 0:ve[0])==null?void 0:Je.replaceAll(":","/"),groups:(Qe=re==null?void 0:re.split("*"))==null?void 0:Qe[1]}],K=(_a=(Fe=u==null?void 0:u.replace("(",Oa))==null?void 0:Fe.split(Oa))==null?void 0:_a[1];(K==null?void 0:K[(K==null?void 0:K.length)-1])===")"&&(K=K==null?void 0:K.slice(0,(K==null?void 0:K.length)-1)),K=La.analyzeSplitToContent(K,","),(Le=K==null?void 0:K.find(je=>je==null?void 0:je.includes("@FatherSync")))!=null&&Le.includes("Yes")&&(A=[...A,...Se]),(va=K==null?void 0:K.find(je=>je==null?void 0:je.includes("@SonSync")))!=null&&va.includes("Yes")&&(j=[...j,...Se])}return{groupName:t,tableColumns:S,tableFilter:u,tableContents:m,columns:(_==null?void 0:_.secondColumns)??[],relatedQuotes:z,fatherSyncContents:A,sonSyncContents:j}},qs=(l,r)=>(l=l==null?void 0:l.map((n,t)=>{var s,c,g,h;if(Array.isArray(n))n=n==null?void 0:n.map(v=>{var m,u,_,S;return v!=null&&v.isMainPath||(((m=v==null?void 0:v.children)==null?void 0:m.length)>0?v.children=qs(v.children,r):((u=v==null?void 0:v.menus)==null?void 0:u.length)>0&&!((_=n==null?void 0:n[0])!=null&&_.isMainPath)&&(v.menus=(S=v.menus)==null?void 0:S.map((z,w)=>{var j,A;return((j=v.menus)==null?void 0:j.length)-1===w&&z===""&&(r==null?void 0:r.parentContent)+"/"!==((A=v.menus)==null?void 0:A.join("/"))&&(z=r==null?void 0:r.value),v}),v.bindMenus=v.menus)),v});else{if(t===0&&((s=n.menus)==null?void 0:s.length)>0&&(n.mainKey=!0),n!=null&&n.isMainPath)return n;((c=n.menus)==null?void 0:c.length)>0&&!((g=l==null?void 0:l[0])!=null&&g.isMainPath)&&(n.menus=(h=n.menus)==null?void 0:h.map((v,m)=>{var u,_;return((u=n.menus)==null?void 0:u.length)-1===m&&v===""&&(r==null?void 0:r.parentContent)+"/"!==((_=n.menus)==null?void 0:_.join("/"))&&(v=r==null?void 0:r.value),v}),n.bindMenus=n.menus)}return n}),l),Ad=(l,r)=>(l=l==null?void 0:l.map(n=>((n==null?void 0:n.key)==="header"&&(n.contents=qs(n.contents,r)),n)),l),ui=(l,r)=>{let n=l;return Array.isArray(n==null?void 0:n[0])?n=n==null?void 0:n.map(t=>(t=ui(t,r),t)):n=n==null?void 0:n.map(t=>{var s,c;return t!=null&&t.children&&((s=t==null?void 0:t.children)==null?void 0:s.length)>0?t.children=ui(t==null?void 0:t.children,r):t!=null&&t.words&&((c=t==null?void 0:t.words)==null?void 0:c.length)>0&&(r!=null&&r.find(g=>{var h,v,m,u;return((u=(h=t==null?void 0:t.prop)==null?void 0:h.split("."))==null?void 0:u[((m=(v=t==null?void 0:t.prop)==null?void 0:v.split("."))==null?void 0:m.length)-1])===g}))&&(t.mainKey=!0),t}),n};let tr="$R";const zd=I.useUnit(I.pinia),{selectTitle:sn}=I.storeToRefs(zd),cn=[{key:"@MaxRow",value:"onNumSlice",order:1},{key:"@Type",value:"onRandomContents",order:2},{key:"@Filter",value:"onConditionContents",order:4},{key:"@FatherSync",value:"onFatherPaceContents",order:1},{key:"@SonSync",value:"onPaceContents",order:1},{key:"@MainPam",value:"onMainTagContents",order:3},{key:"@TopButton",value:"onButtonContents",order:1},{key:"@ColumnButton",value:"onPamButtonContents",order:1},{key:"@RowButton",value:"onRowButtonContents",order:1},{key:"@BottomButton",value:"onBottomButtonContents",order:1},{key:"@Related",value:"onRelated",order:1},{key:"@RowNum",value:"onRowNum",order:1},{key:"@FixRow",value:"onFixRow",order:1},{key:"@ReqItem",value:"onReqItem",order:1},{key:"@Condition",value:"onConditionContent",order:1},{key:"@Tab",value:"onTabs",order:1},{key:"@SinChoice",value:"onSinChoice",order:1},{key:"@TextSize",value:"onTextSize",order:1},{key:"@TextRGBA",value:"onTextRGBA",order:1},{key:"@Position",value:"onPosition",order:4},{key:"@Size",value:"onSize",order:4},{key:"@ShowType",value:"onShowType",order:1},{key:"@StepName",value:"onStepName",order:1},{key:"@Step",value:"onStep",order:1}];var at=(l=>(l[l.ORDINARY=1]="ORDINARY",l[l.BLOCK=2]="BLOCK",l[l.TEXT=3]="TEXT",l))(at||{});const Ws=l=>{if(l==null)return null;const r=String(l).trim();if(!r.startsWith("[")||!r.endsWith("]"))return null;const n=r.slice(1,-1).split(",").map(t=>Number(t.trim()));return n.length<2||n.some(t=>Number.isNaN(t))?null:[n[0],n[1]]},Ks=(l,r)=>{var j,A,N,Y,b;const n=Array.isArray(l)?l:[],t=n.find(L=>(L==null?void 0:L.key)==="formContent"),s=Array.isArray(t==null?void 0:t.contents)?t.contents:[],c=((j=n.find(L=>(L==null?void 0:L.key)==="_gridLayoutMeta"))==null?void 0:j.contents)??{},g=(s==null?void 0:s[0])??{};let h=((A=r==null?void 0:r.position)==null?void 0:A[0])??(c==null?void 0:c._positionStartRow)??(g==null?void 0:g._positionStartRow),v=((N=r==null?void 0:r.position)==null?void 0:N[1])??(c==null?void 0:c._positionRowSpan)??(g==null?void 0:g._positionRowSpan);(!h||Number.isNaN(h)||h<1)&&(h=1),(!v||Number.isNaN(v)||v<1)&&(v=1);let m=((Y=r==null?void 0:r.size)==null?void 0:Y[0])??(c==null?void 0:c._sizeStart)??(g==null?void 0:g._sizeStart),u=((b=r==null?void 0:r.size)==null?void 0:b[1])??(c==null?void 0:c._sizeEnd)??(g==null?void 0:g._sizeEnd);(m===void 0||Number.isNaN(m))&&(m=0),(u===void 0||Number.isNaN(u))&&(u=1),m=Math.max(0,Math.min(1,m)),u=Math.max(0,Math.min(1,u)),u<=m&&(m=0,u=1);const _=u-m,S=Math.max(1,Math.round(1/_));let z=n.map(L=>{if((L==null?void 0:L.key)!=="formContent")return L;const T=Array.isArray(L==null?void 0:L.contents)?L.contents:[];return{...L,contents:T.map(x=>({...x,width:S,_positionStartRow:h,_positionRowSpan:v,_sizeStart:m,_sizeEnd:u}))}});const w={_positionStartRow:h,_positionRowSpan:v,_sizeStart:m,_sizeEnd:u};return z.some(L=>(L==null?void 0:L.key)==="_gridLayoutMeta")?z=z.map(L=>(L==null?void 0:L.key)==="_gridLayoutMeta"?{...L,contents:w}:L):z.push({key:"_gridLayoutMeta",contents:w}),z},Md=l=>{const r=Ws(l==null?void 0:l.filter);return r?Ks(l==null?void 0:l.contents,{position:r}):l==null?void 0:l.contents},Od=l=>{const r=Ws(l==null?void 0:l.filter);return r?Ks(l==null?void 0:l.contents,{size:r}):l==null?void 0:l.contents},Id=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;const n=Number(l==null?void 0:l.filter);return r.push({key:"textSize",contents:Number.isNaN(n)?l==null?void 0:l.filter:n}),r}return l==null?void 0:l.contents},Ld=l=>{if((l==null?void 0:l.filter)!==void 0&&(l==null?void 0:l.filter)!==null&&(l==null?void 0:l.filter)!==""){let r=l==null?void 0:l.contents;return r.push({key:"textRGBA",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Vd=l=>{var n;return(l==null?void 0:l.filter.toUpperCase())==="ALL"||(l==null?void 0:l.filter.toUpperCase())==="NONE"?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(t=>{var s;return(t==null?void 0:t.key)==="tableContents"&&(t.contents=(s=t.contents)==null?void 0:s.slice(0,parseInt(l==null?void 0:l.filter))),t})},Rd=async l=>{var r,n,t,s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne;if((l==null?void 0:l.filter)==="Random")return(r=l==null?void 0:l.contents)==null?void 0:r.map(Z=>((Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=La.shuffle(Z.contents)),Z));if((l==null?void 0:l.filter)==="Ordin"){let ke=l==null?void 0:l.contents;return ke.push({key:"enableWrap",contents:1}),ke}if((l==null?void 0:l.filter)==="Block"){let ke=l==null?void 0:l.contents;return ke.push({key:"enableWrap",contents:2}),ke}if((l==null?void 0:l.filter)==="Auto"){let ke=(t=(n=l==null?void 0:l.contents)==null?void 0:n.find(ue=>(ue==null?void 0:ue.key)==="header"))==null?void 0:t.contents;Array.isArray(ke==null?void 0:ke[0])&&(ke=ke==null?void 0:ke[0]),ke=sa.getColumnChild(ke);let Z=ke==null?void 0:ke.filter(ue=>(ue==null?void 0:ue.filter)&&(ue==null?void 0:ue.filter)!==""),de=new Map,Ke=[];Z==null||Z.forEach(ue=>{var Ne,pa;de.get((Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.join("/"))||(de.set((pa=ue==null?void 0:ue.menus)==null?void 0:pa.join("/"),ue),Ke.push(ue))});let Na=(c=(s=sn==null?void 0:sn.value)==null?void 0:s.find(ue=>(ue==null?void 0:ue.condition)==="child"))==null?void 0:c.value,te=Ke==null?void 0:Ke.map(ue=>{var Ne,pa,wa;return ue=(Ne=ue==null?void 0:ue.menus)==null?void 0:Ne.join("/"),(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&((wa=(pa=sn==null?void 0:sn.value)==null?void 0:pa.find(ja=>(ja==null?void 0:ja.condition)==="child"))==null?void 0:wa.parentContent)+"/"!==ue?ue=ue+Na:(ue==null?void 0:ue[(ue==null?void 0:ue.length)-1])==="/"&&(ue=ue==null?void 0:ue.slice(0,(ue==null?void 0:ue.length)-1)),ue}),D=Ke==null?void 0:Ke.map(ue=>ue==null?void 0:ue.groups),le=te==null?void 0:te.map(async ue=>{let Ne=await $r(ue,!1);return{path:ue,contents:Ne}});le=await Promise.all(le);let ye=le==null?void 0:le.map((ue,Ne)=>{var wa,ja,ee,ea,Pe,xa,He;let pa=(wa=ue==null?void 0:ue.contents)==null?void 0:wa.filter(Te=>{var Re,Ye;return(Te==null?void 0:Te.name)===((Ye=D==null?void 0:D[Ne])==null?void 0:Ye[((Re=D==null?void 0:D[Ne])==null?void 0:Re.length)-1])});return pa=(ea=(ee=(ja=pa==null?void 0:pa[0])==null?void 0:ja.compData)==null?void 0:ee.find(Te=>(Te==null?void 0:Te.key)==="tableContents"))==null?void 0:ea.contents,(ue==null?void 0:ue.path)===((xa=(Pe=sn==null?void 0:sn.value)==null?void 0:Pe.find(Te=>(Te==null?void 0:Te.condition)==="child"))==null?void 0:xa.parentContent)&&(pa=((He=pa==null?void 0:pa.map(Te=>{for(let Re in Te)if(Te[Re]===Na)return Te}))==null?void 0:He.filter(Te=>Te))??[]),pa??[]});if(ye=ye==null?void 0:ye.map(ue=>(ue=ue==null?void 0:ue.map(Ne=>{var wa;let pa={};for(let ja in Ne)if(Z!=null&&Z.find(ee=>{var ea,Pe;return((Pe=(ea=ee==null?void 0:ee.words)==null?void 0:ea[0])==null?void 0:Pe.replaceAll("'",""))===ja})){let ee=(wa=Z==null?void 0:Z.find(ea=>{var Pe,xa;return((xa=(Pe=ea==null?void 0:ea.words)==null?void 0:Pe[0])==null?void 0:xa.replaceAll("'",""))===ja}))==null?void 0:wa.prop;pa[ee]=Ne==null?void 0:Ne[ja]}return pa}),ue)),ye=La.cartesianProduct(ye),Array.isArray(ye==null?void 0:ye[0])&&(ye=ye==null?void 0:ye[0]),(ye==null?void 0:ye.length)>0&&((_=(h=(g=Z==null?void 0:Z[0])==null?void 0:g.menus)==null?void 0:h.join("/"))==null?void 0:_[((u=(m=(v=Z==null?void 0:Z[0])==null?void 0:v.menus)==null?void 0:m.join("/"))==null?void 0:u.length)-1])==="/")return(S=l==null?void 0:l.contents)==null?void 0:S.map(Ne=>{var pa;return(Ne==null?void 0:Ne.key)==="tableContents"&&(ye==null?void 0:ye.length)>0&&(Ne.contents=((pa=Ne.contents)==null?void 0:pa.length)>0?Ne.contents:ye),Ne})}if((l==null?void 0:l.filter)==="Text"){let ke=l==null?void 0:l.contents;return ke.push({key:"enableWrap",contents:3}),ke}if((l==null?void 0:l.filter)==="Manual"){let ke=[],Z=[],de=(w=(z=l==null?void 0:l.contents)==null?void 0:z.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:w.contents;(de==null?void 0:de[(de==null?void 0:de.length)-1])===")"?de=(A=(j=de==null?void 0:de.replace("(",tr))==null?void 0:j.split(tr))==null?void 0:A[0]:de="",de!==""&&(ke=((Y=(N=de==null?void 0:de.split("*"))==null?void 0:N[0])==null?void 0:Y.split(":"))??[],Z=((k=(x=(T=(L=(b=de==null?void 0:de.split("*"))==null?void 0:b[1])==null?void 0:L.replace("{",tr))==null?void 0:T.split(tr))==null?void 0:x[0])==null?void 0:k.split(":"))??[]);let Ke=(U=($=l==null?void 0:l.contents)==null?void 0:$.find(D=>(D==null?void 0:D.key)==="filter"))==null?void 0:U.contents;Ke=(be=(X=Ke==null?void 0:Ke.replace("(",tr))==null?void 0:X.split(tr))==null?void 0:be[1],Ke=Ke==null?void 0:Ke.slice(0,(Ke==null?void 0:Ke.length)-1);let Na=(ze=l==null?void 0:l.contents)==null?void 0:ze.map(D=>{var le,ye,ue,Ne,pa,wa,ja,ee,ea;return(D==null?void 0:D.key)==="header"&&((le=D==null?void 0:D.contents)!=null&&le.every(Pe=>(Pe==null?void 0:Pe.mainKey)!==!0)&&Array.isArray(D==null?void 0:D.contents)&&!Array.isArray((ye=D==null?void 0:D.contents)==null?void 0:ye[0])?D.contents=(ue=D==null?void 0:D.contents)==null?void 0:ue.map((Pe,xa)=>{var He,Te,Re;return Pe!=null&&Pe.isMainPath||(xa===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=ke,Pe.groups=((He=Pe.groups)==null?void 0:He.length)===0?Z:Pe.groups,Pe.words=((Te=Pe.words)==null?void 0:Te.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=Ke,(!(Pe!=null&&Pe.menus)||((Re=Pe==null?void 0:Pe.menus)==null?void 0:Re.length)===0)&&(Pe.menus=ke)):(Pe.mainKey=!1,Pe.bindMenus=ke)),Pe}):Array.isArray((Ne=D==null?void 0:D.contents)==null?void 0:Ne[0])&&((ja=(wa=(pa=D==null?void 0:D.contents)==null?void 0:pa[0])==null?void 0:wa.filter(()=>(ke==null?void 0:ke.length)>0))==null?void 0:ja.length)>0&&(D.contents[0]=(ea=(ee=D==null?void 0:D.contents)==null?void 0:ee[0])==null?void 0:ea.map((Pe,xa)=>{var He,Te,Re;return Pe!=null&&Pe.isMainPath||(xa===0?(Pe.mainKey=!0,Pe.formType="Select",Pe.bindMenus=ke,Pe.groups=((He=Pe.groups)==null?void 0:He.length)===0?Z:Pe.groups,Pe.words=((Te=Pe.words)==null?void 0:Te.length)===0?[Pe==null?void 0:Pe.prop]:Pe.words,Pe.filter=Ke,(!(Pe!=null&&Pe.menus)||Array.isArray(Pe==null?void 0:Pe.menus)&&((Re=Pe==null?void 0:Pe.menus)==null?void 0:Re.length)===0)&&(ke==null?void 0:ke.length)>0&&(Pe.menus=ke)):(Pe.mainKey=!1,Pe.bindMenus=ke)),Pe}))),D}),te=(Ee=Na==null?void 0:Na.find(D=>(D==null?void 0:D.key)==="header"))==null?void 0:Ee.contents;if(Array.isArray(te==null?void 0:te[0])&&(te=te==null?void 0:te[0]),te=sa.getColumnChild(te),te!=null&&te.some(D=>{var le,ye;return((ye=D==null?void 0:D.menus)==null?void 0:ye[((le=D==null?void 0:D.menus)==null?void 0:le.length)-1])===""})){let D=(ne=sn==null?void 0:sn.value)==null?void 0:ne.find(le=>(le==null?void 0:le.condition)==="child");Na=Ad(Na,D)}return Na}return l==null?void 0:l.contents},$d=l=>{var t,s,c,g;let r=l==null?void 0:l.filter;if(r!=null&&r.includes("*")&&(r="({"+((s=(t=r==null?void 0:r.replace("{",tr))==null?void 0:t.split(tr))==null?void 0:s[1])),r=(c=r==null?void 0:r.replaceAll("{",""))==null?void 0:c.replaceAll("}",""),(r==null?void 0:r[0])!=="("&&(r="("+r+")"),r.slice(1,(r==null?void 0:r.length)-1)==="undefined")return l==null?void 0:l.contents;let n=sa.calculatorAndToOr(r);if((n==null?void 0:n.length)>0){let h=[];return n==null||n.forEach(m=>{let u={};for(let _ in m){let S=_;S!=null&&S.includes("[")||(u[S]=m[_])}h.push(u)}),(g=l==null?void 0:l.contents)==null?void 0:g.map(m=>{var _,S,z;let u=(S=(_=l==null?void 0:l.contents)==null?void 0:_.find(w=>(w==null?void 0:w.key)==="header"))==null?void 0:S.contents;if(u=(z=sa.getEqualChild(u))==null?void 0:z.filter(w=>(w==null?void 0:w.label)!=="操作"),(m==null?void 0:m.key)==="tableContents"){let j=sa.tableToForm(m==null?void 0:m.contents,u);h==null||h.forEach(A=>{var N,Y;for(let b in A)!((N=j==null?void 0:j[0])!=null&&N.find(L=>{var T;return(L==null?void 0:L.key)===b||((T=L==null?void 0:L.key)==null?void 0:T.includes(b))}))&&!(j!=null&&j.find(L=>{var T;return(L==null?void 0:L.key)===b||((T=L==null?void 0:L.key)==null?void 0:T.includes(b))}))||(((Y=A[b])==null?void 0:Y[0])!=="!"?j=j==null?void 0:j.filter(L=>{var T,x;return((T=L==null?void 0:L.find(k=>{var $;return(k==null?void 0:k.key)===b||(($=k==null?void 0:k.key)==null?void 0:$.includes(b))}))==null?void 0:T.value)===A[b]||Array.isArray(A==null?void 0:A[b])&&((x=A==null?void 0:A[b])==null?void 0:x.find(k=>{var $;return(($=L==null?void 0:L.find(U=>{var X;return(U==null?void 0:U.key)===b||((X=U==null?void 0:U.key)==null?void 0:X.includes(b))}))==null?void 0:$.value)===k}))}):j=j==null?void 0:j.filter(L=>{var T;return((T=L==null?void 0:L.find(x=>{var k;return(x==null?void 0:x.key)===b||((k=x==null?void 0:x.key)==null?void 0:k.includes(b))}))==null?void 0:T.value)!==A[b]}))}),(j==null?void 0:j.length)===0?m.contents=[]:m.contents=j==null?void 0:j.map(A=>{let N={};return A==null||A.forEach(Y=>{N[Y==null?void 0:Y.key]=Y==null?void 0:Y.value}),N})}return m})}return l==null?void 0:l.contents},Pd=l=>l==null?void 0:l.contents,Fd=l=>l==null?void 0:l.contents,jd=l=>{var r,n,t,s;if((l==null?void 0:l.filter)!==""&&(l!=null&&l.filter)){let c=(t=(n=l==null?void 0:l.filter)==null?void 0:n.slice(1,((r=l==null?void 0:l.filter)==null?void 0:r.length)-1))==null?void 0:t.split(",");return(s=l==null?void 0:l.contents)==null?void 0:s.map(h=>((h==null?void 0:h.key)==="header"&&(h.contents=ui(h.contents,c)),h))}return l==null?void 0:l.contents},Hd=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="extraButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(g=>({label:g,prop:g}))),s}):l==null?void 0:l.contents},Ud=l=>l==null?void 0:l.contents,qd=l=>{var n;let r=(l==null?void 0:l.filter)??"";return(r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""?(n=l==null?void 0:l.contents)==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.key)==="rowButton"&&(s.contents=(c=r==null?void 0:r.split(","))==null?void 0:c.map(g=>({label:g,prop:g}))),s}):l==null?void 0:l.contents},Wd=l=>{var n;let r=(l==null?void 0:l.filter)??"";if((r==null?void 0:r[0])==="{"&&(r=r==null?void 0:r.slice(1,(r==null?void 0:r.length)-1)),r!==""){let t=l==null?void 0:l.contents,s=(n=r==null?void 0:r.split(","))==null?void 0:n.map(c=>({label:c,prop:c}));return t.push({key:"bottomButton",contents:s}),t}return l==null?void 0:l.contents},Kd=l=>{var r,n,t,s;if(((r=l==null?void 0:l.filter)==null?void 0:r[0])!=="["){const c=parseInt(l==null?void 0:l.filter);return!c||Number.isNaN(c)?l==null?void 0:l.contents:(n=l==null?void 0:l.contents)==null?void 0:n.map(h=>{var v;return(h==null?void 0:h.key)==="formContent"&&(h.contents=(v=h.contents)==null?void 0:v.map(m=>(m.width=c,m))),h})}if(((t=l==null?void 0:l.filter)==null?void 0:t[0])==="["){let c=wt(l==null?void 0:l.filter),g=Array.isArray(c)?c.map(v=>parseInt(v)).filter(v=>!!v&&!Number.isNaN(v)):[];return g.length?(s=l==null?void 0:l.contents)==null?void 0:s.map(v=>{if((v==null?void 0:v.key)==="formContent"){const m=v.contents??[];v.contents=m.map((u,_)=>{const S=_+1;let z=0,w=0;for(let A=0;A<g.length;A++){if(w+=g[A],S<=w){z=A;break}A===g.length-1&&(z=g.length-1)}const j=g[z]||g[g.length-1]||1;return u.width=j,u})}return v}):l==null?void 0:l.contents}return l==null?void 0:l.contents},Yd=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;return(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(","),(r=l==null?void 0:l.contents)==null?void 0:r.map(s=>{var c,g,h;return(s==null?void 0:s.key)==="header"&&(Array.isArray((c=s==null?void 0:s.contents)==null?void 0:c[0])?s.contents[0]=(h=s.contents[0])==null?void 0:h.map(v=>(n!=null&&n.find(m=>m===(v==null?void 0:v.prop))&&(v.fixed="left"),v)):s.contents=(g=s.contents)==null?void 0:g.map(v=>(n!=null&&n.find(m=>m===(v==null?void 0:v.prop))&&(v.fixed="left"),v))),s})}return l==null?void 0:l.contents},Gd=l=>{var r;if((l==null?void 0:l.filter)!==""){let n=l==null?void 0:l.filter;(n==null?void 0:n[0])==="{"&&(n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1)),n=n==null?void 0:n.split(",");const t=c=>(n!=null&&n.find(g=>g===(c==null?void 0:c.prop))&&(c.required=!0),c!=null&&c.children&&Array.isArray(c.children)&&(c.children=c.children.map(g=>t(g))),c);return(r=l==null?void 0:l.contents)==null?void 0:r.map(c=>{var g,h,v;return(c==null?void 0:c.key)==="header"&&(Array.isArray((g=c==null?void 0:c.contents)==null?void 0:g[0])?c.contents[0]=(v=c.contents[0])==null?void 0:v.map(m=>t(m)):c.contents=(h=c.contents)==null?void 0:h.map(m=>t(m))),c})}return l==null?void 0:l.contents},Jd=async l=>{var t,s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b;const r=I.useUnit(I.pinia),{chooseTitle:n}=I.storeToRefs(r);if((l==null?void 0:l.filter)==="true"){let L=await $r(((s=(t=n==null?void 0:n.value)==null?void 0:t[0])==null?void 0:s.parentContent)??((g=(c=n==null?void 0:n.value)==null?void 0:c[0])==null?void 0:g.relatedContent),!1),T=(v=(h=n==null?void 0:n.value)==null?void 0:h[0])==null?void 0:v.value;(u=(m=L==null?void 0:L[0])==null?void 0:m.compData)!=null&&u.find(U=>(U==null?void 0:U.key)==="header")?L=(_=L==null?void 0:L[0])==null?void 0:_.compData:L=(z=(S=L==null?void 0:L.filter(U=>{var X;return(X=U==null?void 0:U.compData)==null?void 0:X.find(be=>(be==null?void 0:be.key)==="header")}))==null?void 0:S[0])==null?void 0:z.compData;let x=(w=L==null?void 0:L.find(U=>(U==null?void 0:U.key)==="header"))==null?void 0:w.contents;Array.isArray(x==null?void 0:x[0])&&(x=x==null?void 0:x[0]),x=((j=x==null?void 0:x.find(U=>U==null?void 0:U.isMainKey))==null?void 0:j.prop)??((A=x==null?void 0:x[0])==null?void 0:A.prop);let k=(Y=(N=L==null?void 0:L.find(U=>(U==null?void 0:U.key)==="tableContents"))==null?void 0:N.contents)==null?void 0:Y.find(U=>(U==null?void 0:U[x])===T);return(b=l==null?void 0:l.contents)==null?void 0:b.map(U=>{var X;return(U==null?void 0:U.key)==="formContent"&&(U.contents=(X=U.contents)==null?void 0:X.map(be=>(be.value=k==null?void 0:k[be==null?void 0:be.prop],be))),U})}return l==null?void 0:l.contents},Xd=l=>{var r,n,t,s,c;if((r=l==null?void 0:l.extra)!=null&&r.row){let g=l==null?void 0:l.filter;if(g!=null&&g.includes("*")&&(g="({"+((t=(n=g==null?void 0:g.replace("{",tr))==null?void 0:n.split(tr))==null?void 0:t[1])),g=(s=g==null?void 0:g.replaceAll("{",""))==null?void 0:s.replaceAll("}",""),(g==null?void 0:g[0])!=="("&&(g="("+g+")"),g.slice(1,(g==null?void 0:g.length)-1)==="undefined")return l==null?void 0:l.contents;let h=sa.calculatorAndToOr(g),v=h==null?void 0:h[0],m=(c=l==null?void 0:l.extra)==null?void 0:c.row,u=[];for(let _ in v)(v==null?void 0:v[_])===(m==null?void 0:m[_])?u.push(!0):u.push(!1);return u!=null&&u.every(_=>_===!0)?l==null?void 0:l.contents:[]}else return l==null?void 0:l.contents},Zd=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"tab",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Qd=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"choice",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},ep=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"fixType",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},ap=l=>{var r;if(l!=null&&l.filter){let n=l==null?void 0:l.contents,t=l==null?void 0:l.filter;return(t==null?void 0:t[0])==="{"&&(t=t==null?void 0:t.slice(1,(t==null?void 0:t.length)-1)),t=(r=La.analyzeSplitToContent(t,","))==null?void 0:r.map(s=>((s==null?void 0:s[(s==null?void 0:s.length)-1])===","&&(s=s==null?void 0:s.slice(0,(s==null?void 0:s.length)-1)),s)),n.push({key:"stepName",contents:t}),n}return l==null?void 0:l.contents},lp=l=>{if(l!=null&&l.filter){let r=l==null?void 0:l.contents;return r.push({key:"step",contents:l==null?void 0:l.filter}),r}return l==null?void 0:l.contents},Ys={onNumSlice:Vd,onRandomContents:Rd,onConditionContents:$d,onFatherPaceContents:Pd,onPaceContents:Fd,onMainTagContents:jd,onButtonContents:Hd,onPamButtonContents:Ud,onRowButtonContents:qd,onRelated:Jd,onRowNum:Kd,onFixRow:Yd,onReqItem:Gd,onBottomButtonContents:Wd,onConditionContent:Xd,onTabs:Zd,onSinChoice:Qd,onTextSize:Id,onTextRGBA:Ld,onPosition:Md,onSize:Od,onShowType:ep,onStepName:ap,onStep:lp},rp=async(l,r)=>{var c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k;let n="";if(((c=l==null?void 0:l.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:c.contents)!==""&&(n=(g=l==null?void 0:l.find($=>($==null?void 0:$.key)==="filter"))==null?void 0:g.contents),n===""||!n)return l;(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n=(v=(h=n==null?void 0:n.replace("(",tr))==null?void 0:h.split(tr))==null?void 0:v[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let t=(m=La.analyzeSplitToContent(n,","))==null?void 0:m.map($=>(($==null?void 0:$[($==null?void 0:$.length)-1])===","&&($=$==null?void 0:$.slice(0,($==null?void 0:$.length)-1)),$!=null&&$.includes("(")||($=$==null?void 0:$.replaceAll(":","=")),$)),s=l;for(let $ in t){let U,X="";(u=t==null?void 0:t[$])!=null&&u.includes("(")?(U=(z=(S=(_=t==null?void 0:t[$])==null?void 0:_.replace("(",tr))==null?void 0:S.split(tr))==null?void 0:z[0],X="("+((A=(j=(w=t==null?void 0:t[$])==null?void 0:w.replace("(",tr))==null?void 0:j.split(tr))==null?void 0:A[1])):(U=(b=(Y=(N=t==null?void 0:t[$])==null?void 0:N.replace("=",tr))==null?void 0:Y.split(tr))==null?void 0:b[0],X=(x=(T=(L=t==null?void 0:t[$])==null?void 0:L.replace("=",tr))==null?void 0:T.split(tr))==null?void 0:x[1]);let be=(k=cn==null?void 0:cn.find(ze=>(ze==null?void 0:ze.key)===U))==null?void 0:k.value;if(be){const ze=Ys[be];s=await ze({contents:s,filter:X})}}return s},_o=async(l,r)=>{var g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U;let n="";if(((g=l==null?void 0:l.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:g.contents)!==""&&(n=(h=l==null?void 0:l.find(X=>(X==null?void 0:X.key)==="filter"))==null?void 0:h.contents),n===""||!n)return l;(n==null?void 0:n[0])===","&&(n=n==null?void 0:n.slice(1,n==null?void 0:n.length)),(n==null?void 0:n[0])==="("?n=n==null?void 0:n.slice(1,(n==null?void 0:n.length)-1):(n==null?void 0:n[0])==="@"||(n=(m=(v=n==null?void 0:n.replace("(",tr))==null?void 0:v.split(tr))==null?void 0:m[1],n=n==null?void 0:n.slice(0,(n==null?void 0:n.length)-1));let t=(u=La.analyzeSplitToContent(n,","))==null?void 0:u.map(X=>((X==null?void 0:X[(X==null?void 0:X.length)-1])===","&&(X=X==null?void 0:X.slice(0,(X==null?void 0:X.length)-1)),X!=null&&X.includes("(")||(X=X==null?void 0:X.replaceAll(":","=")),X)),s=l,c=new Map;t==null||t.forEach(X=>{var ze,Ee,ne;let be=(ze=X==null?void 0:X.split("="))==null?void 0:ze[0];if(be==="@MainPam"&&c.get(be)){let ke=c.get(be);ke=ke==null?void 0:ke.slice(0,(ke==null?void 0:ke.length)-1);let Z=(ne=(Ee=X==null?void 0:X.replace("{",tr))==null?void 0:Ee.split(tr))==null?void 0:ne[1];Z=ke+","+Z,c.set(be,Z)}else c.set(be,X)}),t=Array.from(c.values()),t=t==null?void 0:t.sort((X,be)=>{var ze,Ee;return((ze=cn==null?void 0:cn.find(ne=>be==null?void 0:be.includes(ne==null?void 0:ne.key)))==null?void 0:ze.order)-((Ee=cn==null?void 0:cn.find(ne=>X==null?void 0:X.includes(ne==null?void 0:ne.key)))==null?void 0:Ee.order)});for(let X in t){let be,ze="";(_=t==null?void 0:t[X])!=null&&_.includes("(")&&((S=t==null?void 0:t[X])!=null&&S.includes("@Filter"))?(be=(j=(w=(z=t==null?void 0:t[X])==null?void 0:z.replace("(",tr))==null?void 0:w.split(tr))==null?void 0:j[0],ze="("+((Y=(N=(A=t==null?void 0:t[X])==null?void 0:A.replace("(",tr))==null?void 0:N.split(tr))==null?void 0:Y[1])):(be=(T=(L=(b=t==null?void 0:t[X])==null?void 0:b.replace("=",tr))==null?void 0:L.split(tr))==null?void 0:T[0],ze=($=(k=(x=t==null?void 0:t[X])==null?void 0:x.replace("=",tr))==null?void 0:k.split(tr))==null?void 0:$[1]);let Ee=(U=cn==null?void 0:cn.find(ne=>(ne==null?void 0:ne.key)===be))==null?void 0:U.value;if(Ee){const ne=Ys[Ee];s=await ne({contents:s,filter:ze,extra:r})}}return s};let to="$R";const np=I.useUnit(I.pinia),{selectTitle:tp}=I.storeToRefs(np);let op=[{label:"新增",prop:"新增"},{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],ip=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"},{label:"复制新增",prop:"复制新增"},{label:"删除",prop:"删除"}],sp=[{label:"导入",prop:"导入",type:"upload"},{label:"导出",prop:"导出",type:"popover",contents:[{label:"导出选中"},{label:"导出全部"}]}],cp=[{label:"查看",prop:"查看"},{label:"编辑",prop:"编辑"}];const Qi=async(l,r,n=!0)=>{let t=[],s=l==null?void 0:l.map(async c=>{var _,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl;let g=(w=(z=(S=(_=c==null?void 0:c.contents)==null?void 0:_.find(Ra=>{var al;return(al=Ra==null?void 0:Ra.key)==null?void 0:al.includes("struct")}))==null?void 0:S.value)==null?void 0:z[0])==null?void 0:w.类型,h=Object.values(c==null?void 0:c.name);h=h==null?void 0:h.reverse();let v=(j=c==null?void 0:c.contents)==null?void 0:j.map(Ra=>Ra==null?void 0:Ra.key),m={comp:g,isShow:c==null?void 0:c.is_show,name:h==null?void 0:h[0],id:c==null?void 0:c.object_id,relatedTables:v,menuFilter:(A=c==null?void 0:c.filter)==null?void 0:A.menuFilter,status:c==null?void 0:c.status,fatherSyncContents:(N=c==null?void 0:c.filter)==null?void 0:N.fatherSyncs,relatedQuotes:(Y=c==null?void 0:c.filter)==null?void 0:Y.quotes,sonSyncContents:(b=c==null?void 0:c.filter)==null?void 0:b.sonSyncs};for(let Ra in h)parseInt(Ra)>=1&&(m[`name${parseInt(Ra)-1}`]=h[Ra]);let u=(T=(L=c==null?void 0:c.filter)==null?void 0:L.menuFilter)==null?void 0:T.split(",");if(((x=u==null?void 0:u.filter(Ra=>Ra==null?void 0:Ra.includes("@Filter")))==null?void 0:x.length)>0){let Ra=u==null?void 0:u.filter(Xe=>Xe==null?void 0:Xe.includes("@Filter"));Ra=Ra==null?void 0:Ra[0],Ra=($=(k=Ra==null?void 0:Ra.replace("(",to))==null?void 0:k.split(to))==null?void 0:$[1],Ra=Ra==null?void 0:Ra.slice(0,(Ra==null?void 0:Ra.length)-1),Ra!=null&&Ra.includes("*")&&(Ra=(X=(U=Ra==null?void 0:Ra.replace("{",to))==null?void 0:U.split(to))==null?void 0:X[1],Ra=Ra==null?void 0:Ra.replace("}","")),Ra=sa.calculatorAndToOr(Ra);let al=(r==null?void 0:r.originPath)??"";(al==null?void 0:al[(al==null?void 0:al.length)-1])==="/"&&(al=al==null?void 0:al.slice(0,(al==null?void 0:al.length)-1));let ga=await $r(al,!1),qe=(be=ga==null?void 0:ga.filter(Xe=>(Xe==null?void 0:Xe.comp)==="Table"))==null?void 0:be[0];qe=(Ee=(ze=qe==null?void 0:qe.compData)==null?void 0:ze.find(Xe=>(Xe==null?void 0:Xe.key)==="tableContents"))==null?void 0:Ee.contents;let rl=(ke=(ne=tp.value)==null?void 0:ne.find(Xe=>(Xe==null?void 0:Xe.condition)==="child"))==null?void 0:ke.value;qe=(Z=qe==null?void 0:qe.map(Xe=>{for(let oa in Xe)if((Xe==null?void 0:Xe[oa])===rl)return Xe}))==null?void 0:Z.filter(Xe=>Xe),qe=qe==null?void 0:qe[0],Ra=Ra==null?void 0:Ra[0];let da=[];for(let Xe in Ra){let oa="";el.isObject(qe)&&(oa=(Ke=(de=Object.keys(qe))==null?void 0:de.filter(aa=>aa==null?void 0:aa.includes("."+Xe)))==null?void 0:Ke[0]),oa!==""&&(qe!=null&&qe[oa])&&(Ra==null?void 0:Ra[Xe])===(qe==null?void 0:qe[oa])||qe!=null&&qe[Xe]&&(Ra==null?void 0:Ra[Xe])===(qe==null?void 0:qe[Xe])?da.push(!0):da.push(!1)}if(da!=null&&da.some(Xe=>Xe===!1)&&((te=r==null?void 0:r.originPath)==null?void 0:te[((Na=r==null?void 0:r.originPath)==null?void 0:Na.length)-1])!=="/")return}if(g==="Table"||g==="Method"){let Ra=((D=c==null?void 0:c.contents)==null?void 0:D.find(W=>{var la;return(la=W==null?void 0:W.key)==null?void 0:la.includes("content")}))||[],al=[];m.comp="Table",Ra.value=(le=Ra==null?void 0:Ra.value)==null?void 0:le.sort((W,la)=>parseInt(W==null?void 0:W.id)-parseInt(la==null?void 0:la.id)),Ra.value=(ye=Ra==null?void 0:Ra.value)==null?void 0:ye.map(W=>{let la={};for(let ka in W)JSON.stringify(W==null?void 0:W[ka])==="{}"?la[ka]="":la[ka]=W==null?void 0:W[ka];return la}),al.push({key:"tableContents",contents:Ra==null?void 0:Ra.value});let ga=(ja=(wa=(pa=(Ne=(ue=c==null?void 0:c.contents)==null?void 0:ue.find(W=>{var la;return(la=W==null?void 0:W.key)==null?void 0:la.includes("struct")}))==null?void 0:Ne.value)==null?void 0:pa[0])==null?void 0:wa.结构)==null?void 0:ja.contents;Array.isArray(ga==null?void 0:ga[0])?ga[0]=(ee=ga==null?void 0:ga[0])==null?void 0:ee.filter(W=>(W==null?void 0:W.prop)!=="sort"&&(W==null?void 0:W.prop)!=="relatedId"):ga=ga==null?void 0:ga.filter(W=>(W==null?void 0:W.prop)!=="sort"&&(W==null?void 0:W.prop)!=="relatedId"),al.push({key:"header",contents:ga}),al.push({key:"filter",contents:(Te=(He=(xa=(Pe=(ea=c==null?void 0:c.contents)==null?void 0:ea.find(W=>{var la;return(la=W==null?void 0:W.key)==null?void 0:la.includes("struct")}))==null?void 0:Pe.value)==null?void 0:xa[0])==null?void 0:He.引用)==null?void 0:Te.contents});let qe=op,rl=I.cloneDeep(ip);g==="Method"&&rl.push({label:"生成方法",prop:"生成方法"}),!Array.isArray(ga==null?void 0:ga[0])&&((Re=ga==null?void 0:ga[0])==null?void 0:Re.prop)==="disabled"&&(qe=sp,rl=cp);const da=["推力","真空","压力","温度","流量"],Xe=m.name;Xe&&da.includes(Xe)&&(qe=[...qe],qe.push({label:"导出paraform",prop:"导出paraform",type:"methodButton"}));let oa=[];if(!Array.isArray(ga==null?void 0:ga[0])&&(ga!=null&&ga.some(W=>{var la;return(W==null?void 0:W.calculatorFilter)&&((la=W==null?void 0:W.calculatorFilter)==null?void 0:la.includes("Manual"))}))){let W=(Ye=ga==null?void 0:ga.map(la=>la==null?void 0:la.calculatorFilter))==null?void 0:Ye.filter(la=>la&&(la==null?void 0:la.includes("Manual")));W==null||W.forEach(la=>{var Ce;let ka=La.analyzeSplitToContent(la,",");if(ka=ka==null?void 0:ka.map(Be=>((Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===","&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Be)),ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Extent"))&&(Be==null?void 0:Be.includes("Row")))&&(ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Button"))&&(Be==null?void 0:Be.includes(","))))){let Be=ka==null?void 0:ka.find(Fa=>Fa==null?void 0:Fa.includes("@Button"));Be=(Ce=Be==null?void 0:Be.split("="))==null?void 0:Ce[1],Be=Be==null?void 0:Be.slice(1,(Be==null?void 0:Be.length)-1),Be=Be==null?void 0:Be.split(","),Be=Be==null?void 0:Be[(Be==null?void 0:Be.length)-1],oa.push(Be)}}),oa=[...new Set(oa)],oa=oa==null?void 0:oa.map(la=>({label:la,prop:la,type:"methodButton"}))}else if(Array.isArray(ga==null?void 0:ga[0])&&((qa=sa.getColumnChild(ga==null?void 0:ga[0]))!=null&&qa.some(W=>{var la;return(W==null?void 0:W.calculatorFilter)&&((la=W==null?void 0:W.calculatorFilter)==null?void 0:la.includes("Manual"))}))){let W=(P=(Va=sa.getColumnChild(ga==null?void 0:ga[0]))==null?void 0:Va.map(la=>la==null?void 0:la.calculatorFilter))==null?void 0:P.filter(la=>la&&(la==null?void 0:la.includes("Manual")));W==null||W.forEach(la=>{var Ce;let ka=La.analyzeSplitToContent(la,",");if(ka=ka==null?void 0:ka.map(Be=>((Be==null?void 0:Be[(Be==null?void 0:Be.length)-1])===","&&(Be=Be==null?void 0:Be.slice(0,(Be==null?void 0:Be.length)-1)),Be)),ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Extent"))&&(Be==null?void 0:Be.includes("Row")))&&(ka!=null&&ka.find(Be=>(Be==null?void 0:Be.includes("Button"))&&(Be==null?void 0:Be.includes(","))))){let Be=ka==null?void 0:ka.find(Fa=>Fa==null?void 0:Fa.includes("@Button"));Be=(Ce=Be==null?void 0:Be.split("="))==null?void 0:Ce[1],Be=Be==null?void 0:Be.slice(1,(Be==null?void 0:Be.length)-1),Be=Be==null?void 0:Be.split(","),Be=Be==null?void 0:Be[(Be==null?void 0:Be.length)-1],oa.push(Be)}}),oa=[...new Set(oa)],oa=oa==null?void 0:oa.map(la=>({label:la,prop:la,type:"methodButton"}))}al.push({key:"extraButton",contents:qe}),al.push({key:"rowButton",contents:[...rl,...oa]}),m.compData=await _o(al,r),(F=m.compData)!=null&&F.find(W=>(W==null?void 0:W.key)==="tab")&&(m.tab=(ie=(J=m.compData)==null?void 0:J.find(W=>(W==null?void 0:W.key)==="tab"))==null?void 0:ie.contents),(ce=m.compData)!=null&&ce.find(W=>(W==null?void 0:W.key)==="step")&&(m.step=(na=(ma=m.compData)==null?void 0:ma.find(W=>(W==null?void 0:W.key)==="step"))==null?void 0:na.contents),(Ie=m.compData)!=null&&Ie.find(W=>(W==null?void 0:W.key)==="choice")&&(m.choice=(Ca=(_e=m.compData)==null?void 0:_e.find(W=>(W==null?void 0:W.key)==="choice"))==null?void 0:Ca.contents);let aa="",ca=(ve=m==null?void 0:m.compData)==null?void 0:ve.filter(W=>(W==null?void 0:W.key)==="fixType");(ca==null?void 0:ca.length)>0&&n&&(aa=(Je=ca==null?void 0:ca[0])==null?void 0:Je.contents,m.comp=aa)}else if(g==="Form"){let Ra=[],al=(_a=(Fe=(Qe=c==null?void 0:c.contents)==null?void 0:Qe.find(qe=>{var rl;return(rl=qe==null?void 0:qe.key)==null?void 0:rl.includes("content")}))==null?void 0:Fe.value)==null?void 0:_a[0],ga=(De=(je=(K=(Se=(re=(va=(Le=c==null?void 0:c.contents)==null?void 0:Le.find(qe=>{var rl;return(rl=qe==null?void 0:qe.key)==null?void 0:rl.includes("struct")}))==null?void 0:va.value)==null?void 0:re[0])==null?void 0:Se.结构)==null?void 0:K.contents)==null?void 0:je.map(qe=>(qe.value=al==null?void 0:al[qe==null?void 0:qe.prop],qe)))==null?void 0:De.filter(qe=>(qe==null?void 0:qe.prop)!=="sort"&&(qe==null?void 0:qe.prop)!=="relatedId");Ra.push({key:"filter",contents:(Ae=(Aa=(Ua=(Ba=(Ma=c==null?void 0:c.contents)==null?void 0:Ma.find(qe=>{var rl;return(rl=qe==null?void 0:qe.key)==null?void 0:rl.includes("struct")}))==null?void 0:Ba.value)==null?void 0:Ua[0])==null?void 0:Aa.引用)==null?void 0:Ae.contents}),Ra.push({key:"formContent",contents:ga}),m.compData=await rp(Ra),(we=m.compData)!=null&&we.find(qe=>(qe==null?void 0:qe.key)==="tab")&&(m.tab=(Ge=(Ea=m.compData)==null?void 0:Ea.find(qe=>(qe==null?void 0:qe.key)==="tab"))==null?void 0:Ge.contents),(ol=m.compData)!=null&&ol.find(qe=>(qe==null?void 0:qe.key)==="step")&&(m.step=(Nl=(Sl=m.compData)==null?void 0:Sl.find(qe=>(qe==null?void 0:qe.key)==="step"))==null?void 0:Nl.contents)}return m});return t=await Promise.all(s),t},up=I.useLoginState(I.pinia),{loginUserInfo:yt}=I.storeToRefs(up),di=async(l,r,n="Manual",t=[])=>{var v;let s=l,c;Array.isArray(r==null?void 0:r[0])?c=sa.getColumnChild(r==null?void 0:r[0]):c=r;let g=(v=c==null?void 0:c.filter(m=>{var u;return(m==null?void 0:m.calculatorFilter)&&((u=m==null?void 0:m.calculatorFilter)==null?void 0:u.includes(n))||(m==null?void 0:m.calculatorFilter)===""&&(m==null?void 0:m.functionName)}))==null?void 0:v.map(m=>({prop:m==null?void 0:m.prop,label:m==null?void 0:m.label,methods:m==null?void 0:m.calculatorFilter,functionName:m==null?void 0:m.functionName,functionRelatedWords:m==null?void 0:m.functionRelatedWords})),h=s==null?void 0:s.map(async m=>(m=await mp(m,g,c,n,s,t),m));return h=await Promise.all(h),h},dp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c;return Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(g=>{var h;if(r!=null&&r[g]){let v=r==null?void 0:r[g];c=c?v?La.isEqual(v.toString(),c.toString()):void 0:v}else{let v=(h=s==null?void 0:s.find(u=>(u==null?void 0:u.label)===g))==null?void 0:h.prop,m=(r==null?void 0:r[v])??0;c=c?m?La.isEqual(m.toString(),c.toString()):void 0:m}}),r[t]=c===void 0?void 0:c?1:0,r},fr=l=>{const[r,n,t]=I.cloneDeep(l).split(":").map(Number);let s=+l;return!l||!(l!=null&&l.includes(":"))?s:(r??0)*3600+(n??0)*60+(t??0)},Un=l=>{const r=c=>c.toString().padStart(2,"0"),n=Math.floor(l/3600),t=Math.floor(l%3600/60),s=l%60;return`${r(n)}:${r(t)}:${parseInt(r(s))}`},pp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j,A,N;if(r!=null&&r[v]){if(c==="Row")if(!((u=((m=r==null?void 0:r[v])==null?void 0:m.toString())??"")!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let Y=+(r==null?void 0:r[v]);h=h+Y}else h=fr(h.toString())+fr((S=r==null?void 0:r[v])==null?void 0:S.toString()),h=Un(h)}else if(c==="Row"){let Y=(z=s==null?void 0:s.find(b=>(b==null?void 0:b.label)===v))==null?void 0:z.prop;if(!((j=Number.isNaN(r==null?void 0:r[Y])?"":(w=r==null?void 0:r[Y])==null?void 0:w.toString())!=null&&j.includes(":"))&&!((A=h==null?void 0:h.toString())!=null&&A.includes(":"))){let b=+((r==null?void 0:r[Y])??0);h=h+b}else h=fr(h==null?void 0:h.toString())+fr((N=(r==null?void 0:r[Y])??0)==null?void 0:N.toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_+S},0)}return r[t]=h,r},fp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j;if(r!=null&&r[v]){if(c==="Row")if(!((u=(m=r==null?void 0:r[v])==null?void 0:m.toString())!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let A=+(r==null?void 0:r[v]);h=h===0?h+A:h-A}else h=h===0?fr(h.toString())+fr(r==null?void 0:r[v].toString()):fr(h.toString())-fr(r==null?void 0:r[v].toString()),h=Un(h)}else if(c==="Row"){let A=(S=s==null?void 0:s.find(N=>(N==null?void 0:N.label)===v))==null?void 0:S.prop;if(!((w=Number.isNaN(r==null?void 0:r[A])?"":(z=r==null?void 0:r[A])==null?void 0:z.toString())!=null&&w.includes(":"))&&!((j=h==null?void 0:h.toString())!=null&&j.includes(":"))){let N=+((r==null?void 0:r[A])??0);h=h===0?h+N:h-N}else h=h===0?fr(h.toString())+fr(((r==null?void 0:r[A])??0).toString()):fr(h.toString())-fr(((r==null?void 0:r[A])??0).toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_-S},0)}return r[t]=h,r},hp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j;if(r!=null&&r[v]){if(c==="Row")if(!((u=(m=r==null?void 0:r[v])==null?void 0:m.toString())!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let A=+(r==null?void 0:r[v]);h=h===0?h+A:h*A}else h=h===0?fr(h.toString())+fr(r==null?void 0:r[v].toString()):fr(h.toString())*fr(r==null?void 0:r[v].toString()),h=Un(h)}else if(c==="Row"){let A=(S=s==null?void 0:s.find(N=>(N==null?void 0:N.label)===v))==null?void 0:S.prop;if(!(r!=null&&r[A]))h=void 0;else if(!((w=Number.isNaN(r==null?void 0:r[A])?"":(z=r==null?void 0:r[A])==null?void 0:z.toString())!=null&&w.includes(":"))&&!((j=h==null?void 0:h.toString())!=null&&j.includes(":"))){let N=+((r==null?void 0:r[A])??0);h=h===0?h+N:h*N}else h=h===0?fr(h.toString())+fr(((r==null?void 0:r[A])??0).toString()):fr(h.toString())*fr(((r==null?void 0:r[A])??0).toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_*S},0)}return r[t]=h,r},vp=l=>{let r=l==null?void 0:l.contents,n=l==null?void 0:l.valueString,t=l==null?void 0:l.prop,s=l==null?void 0:l.headers,c=l==null?void 0:l.typeString,g=l==null?void 0:l.allContents,h=0;if(Array.isArray(r)&&(r==null?void 0:r.length)!==1&&(r=sa.getValueToObjectValue(r,sa.getColumnContents(s))),n==null||n.forEach(v=>{var m,u,_,S,z,w,j;if(r!=null&&r[v]){if(c==="Row")if(!((u=(m=r==null?void 0:r[v])==null?void 0:m.toString())!=null&&u.includes(":"))&&!((_=h==null?void 0:h.toString())!=null&&_.includes(":"))){let A=+(r==null?void 0:r[v]);h=h===0?h+A:h/A}else h=h===0?fr(h.toString())+fr(r==null?void 0:r[v].toString()):fr(h.toString())/fr(r==null?void 0:r[v].toString()),h=Un(h)}else if(c==="Row"){let A=(S=s==null?void 0:s.find(N=>(N==null?void 0:N.label)===v))==null?void 0:S.prop;if(!((w=Number.isNaN(r==null?void 0:r[A])?"":(z=r==null?void 0:r[A])==null?void 0:z.toString())!=null&&w.includes(":"))&&!((j=h==null?void 0:h.toString())!=null&&j.includes(":"))){let N=+((r==null?void 0:r[A])??0);h=h===0?h+N:h/N}else h=h===0?fr(h.toString())+fr(((r==null?void 0:r[A])??0).toString()):fr(h.toString())/fr(((r==null?void 0:r[A])??0).toString()),h=Un(h)}}),c==="Column"){let v=[];n==null||n.forEach(m=>{let u=g==null?void 0:g.map(_=>{var S;return(_==null?void 0:_[m])??(_==null?void 0:_[(S=s==null?void 0:s.find(z=>(z==null?void 0:z.label)===m))==null?void 0:S.prop])});v=[...v,...u]}),h=v.reduce((m,u)=>{let _=0;Number.isNaN(m)||(_=+m);let S=0;return Number.isNaN(u)||(S=+u),_/S},0)}return r[t]=h.toFixed(2),r},oo={Sum:pp,Substract:fp,Multiple:hp,Divide:vp,Compare:dp},mp=async(l,r,n,t="Auto",s,c=[])=>{var u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne;let g=l,h=[],v=await I.getPageDataApi({platId:parseInt((u=yt==null?void 0:yt.value)==null?void 0:u.plat_id),pageName:"menu"});v=(z=(S=(_=v==null?void 0:v.data)==null?void 0:_.result)==null?void 0:S.filter(ke=>(ke==null?void 0:ke.property_name)===""))==null?void 0:z[0];let m=[];if(v!=null&&v.object_name){v=v==null?void 0:v.object_name;let ke=await I.getPageDataApi({platId:parseInt((w=yt==null?void 0:yt.value)==null?void 0:w.plat_id),pageName:v});ke=(b=(Y=(N=(A=(j=ke==null?void 0:ke.data)==null?void 0:j.result)==null?void 0:A[0])==null?void 0:N.contents)==null?void 0:Y.find(Z=>{var de;return(de=Z==null?void 0:Z.key)==null?void 0:de.includes("content")}))==null?void 0:b.value,h=(L=ke==null?void 0:ke.map(Z=>({functionName:Z==null?void 0:Z.函数名称,functionContent:Z==null?void 0:Z.输出值})))==null?void 0:L.filter(Z=>(Z==null?void 0:Z.functionContent)!==""),h==null||h.forEach(Z=>{m.push(Z.functionName),oo[Z.functionName]=new Function("return "+Z.functionContent)()})}if((r==null?void 0:r.length)===0)return g;for(let ke in r){let Z=(T=r==null?void 0:r[ke])==null?void 0:T.functionName;const de=oo==null?void 0:oo[Z];let Ke=(x=r==null?void 0:r[ke])==null?void 0:x.methods;if(Ke=La.analyzeSplitToContent(Ke,","),(k=Ke==null?void 0:Ke.find(Na=>Na==null?void 0:Na.includes("@Type")))!=null&&k.includes(t)||(Ke==null?void 0:Ke.length)===0){let Na=((X=(U=($=Ke==null?void 0:Ke.find(te=>te==null?void 0:te.includes("@Extent")))==null?void 0:$.replace(":","="))==null?void 0:U.split("="))==null?void 0:X[1])??[];if(await new Function("return ")(),(m==null?void 0:m.length)>0&&m.find(te=>te===Z)){let te="";try{let le=(be=r==null?void 0:r[ke])==null?void 0:be.functionRelatedWords,ye=(c==null?void 0:c.length)>0?c==null?void 0:c.map(Ne=>{var pa;return Ne==null?void 0:Ne[(pa=r==null?void 0:r[ke])==null?void 0:pa.prop]}):["0"];ye=ye==null?void 0:ye.map(Ne=>Ne==null?void 0:Ne.slice((Ne==null?void 0:Ne.length)-5,Ne==null?void 0:Ne.length)),ye=ye==null?void 0:ye.map(Ne=>La.isNumber(parseInt(Ne))&&parseInt(Ne)?parseInt(Ne):0);let ue=Math.max(...ye);le=le==null?void 0:le.map(Ne=>{if(Ne!=null&&Ne.includes("'"))return Ne==null?void 0:Ne.replaceAll("'","");if(Ne!=null&&Ne.includes("@"))return ue+1;{let pa=Object.keys(g);return Ne=(g==null?void 0:g[Ne])??(g==null?void 0:g[pa==null?void 0:pa.find(wa=>wa==null?void 0:wa.includes("."+Ne))]),Ne}}),te=de(...le)}catch(le){el.ElMessage.warning("关联数据出现错误,"+le.message)}let D=(ze=r==null?void 0:r[ke])==null?void 0:ze.prop;g[D]=te}else g=de({contents:g,valueString:(Ee=r==null?void 0:r[ke])==null?void 0:Ee.functionRelatedWords,prop:(ne=r==null?void 0:r[ke])==null?void 0:ne.prop,headers:n,typeString:Na,allContents:s})}}return g},yp=I.useLoginState(I.pinia),{loginUserInfo:Hr}=I.storeToRefs(yp),gp=I.useMenuState(I.pinia),{activeMenuPath:es,currentMenuPath:io}=I.storeToRefs(gp),Gs=I.useUnit(I.pinia);let as="$R";const{selectTitle:xt}=I.storeToRefs(Gs),Js=async(l,r)=>{var g,h,v,m,u,_,S,z,w,j,A,N,Y;let n=es.value,t="",s=((g=xt==null?void 0:xt.value)==null?void 0:g.find(b=>(b==null?void 0:b.condition)==="child"&&!(b!=null&&b.relatedContent)))??void 0;(l==null?void 0:l.length)===0||(n=r?n:(h=l==null?void 0:l[0])==null?void 0:h.object_name,t=(v=l==null?void 0:l[0])==null?void 0:v.father_name);let c=[];if(t!==""){let b=t;(b==null?void 0:b[(b==null?void 0:b.length)-1])==="/"&&(b=b==null?void 0:b.slice(0,(b==null?void 0:b.length)-1));let L=await $r(b,!1);L=(m=L==null?void 0:L[0])==null?void 0:m.compData;let T=(u=L==null?void 0:L.find(k=>(k==null?void 0:k.key)==="header"))==null?void 0:u.contents;T=((_=T==null?void 0:T.find(k=>k==null?void 0:k.isMainKey))==null?void 0:_.prop)??((S=T==null?void 0:T[0])==null?void 0:S.prop);let x=(w=(z=L==null?void 0:L.find(k=>(k==null?void 0:k.key)==="tableContents"))==null?void 0:z.contents)==null?void 0:w.map(k=>({label:k==null?void 0:k[T],value:k==null?void 0:k[T]}));c=(j=t==null?void 0:t.split("/"))==null?void 0:j.map(k=>(k===""?s?(s.isShow=!0,k=s):k={value:k,condition:"child",options:x,parentContent:(t==null?void 0:t[(t==null?void 0:t.length)-1])==="/"?t==null?void 0:t.slice(0,(t==null?void 0:t.length)-1):t,isShow:!0}:k={condition:"parent",value:k.trim(),isShow:!0},k))}if(n!==""){let b=(A=n==null?void 0:n.split("/"))==null?void 0:A.map(L=>(L={condition:"normal",value:L.trim(),isShow:!0},L));((N=b==null?void 0:b[0])==null?void 0:N.value)===((Y=c==null?void 0:c[0])==null?void 0:Y.value)&&(b=b==null?void 0:b.filter((L,T)=>T!==0)),c=[...c??[],...b??[]]}t===""&&s&&((s==null?void 0:s.parentContent)!==es.value&&(s.isShow=!1),(s==null?void 0:s.value)!==""&&c.push(s)),Gs.setSelectTitle(c)},bp=async l=>{var c,g,h,v,m,u,_,S,z;let r=await I.getPageDataApi({platId:parseInt((c=Hr==null?void 0:Hr.value)==null?void 0:c.plat_id),pageName:"menu"}),n=(g=r==null?void 0:r.data)==null?void 0:g.result,t=(u=(m=(v=(h=l==null?void 0:l.filter(w=>(w==null?void 0:w.comp)==="Table"))==null?void 0:h[0])==null?void 0:v.compData)==null?void 0:m.find(w=>(w==null?void 0:w.key)==="filter"))==null?void 0:u.contents;t=(z=(S=(_=t==null?void 0:t.replace("(",as))==null?void 0:_.split(as))==null?void 0:S[0])==null?void 0:z.replaceAll(":","/");let s=n==null?void 0:n.filter(w=>{var j;return(w==null?void 0:w.object_name)===io.value+"/"||((j=io.value)==null?void 0:j.includes(t))&&t+"/"===(w==null?void 0:w.object_name)});return(s==null?void 0:s.length)>0&&(l=l==null?void 0:l.map(w=>{var j;return(w==null?void 0:w.comp)==="Table"&&(w.compData=(j=w==null?void 0:w.compData)==null?void 0:j.map(A=>{var N,Y,b;return(A==null?void 0:A.key)==="header"&&(Array.isArray((N=A.contents)==null?void 0:N[0])?A.contents[0]=(b=A.contents[0])==null?void 0:b.map((L,T)=>{var x;return T===0&&(L.isExistChild=!0,(x=io.value)!=null&&x.includes(t)&&(L.fatherPath=t)),L}):A.contents=(Y=A.contents)==null?void 0:Y.map((L,T)=>{var x;return T===0&&(L.isExistChild=!0,(x=io.value)!=null&&x.includes(t)&&(L.fatherPath=t)),L})),A})),w})),l},$r=async(l,r,n={})=>{var g,h,v,m,u,_,S,z,w,j,A,N;let t=await I.getPageDataApi({platId:parseInt((g=Hr==null?void 0:Hr.value)==null?void 0:g.plat_id),pageName:l}),s=(h=t==null?void 0:t.data)==null?void 0:h.result;if((s==null?void 0:s.length)===0&&(n!=null&&n.originPath)&&(n==null?void 0:n.originPath)!==l){let Y=await I.getPageDataApi({platId:parseInt((v=Hr==null?void 0:Hr.value)==null?void 0:v.plat_id),pageName:n==null?void 0:n.originPath});if(((u=(m=Y==null?void 0:Y.data)==null?void 0:m.result)==null?void 0:u.length)>0){let b=await Qi((_=Y==null?void 0:Y.data)==null?void 0:_.result,n,!1);b=b==null?void 0:b.map(async x=>{var U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va;let k=[],$=(U=Object.keys(x))==null?void 0:U.filter(P=>P==null?void 0:P.includes("name"));for(let P in x)$!=null&&$.find(F=>F===P)&&k.push(x==null?void 0:x[P]);if(k=k.reverse(),(x==null?void 0:x.comp)==="Table"){let P=(ze=(be=(X=x==null?void 0:x.compData)==null?void 0:X.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:be.contents)==null?void 0:ze.map(J=>{let ie={};for(let ce in J)ce!=="id"&&ce!=="create_time"&&ce!=="update_time"&&ce!=="sort"&&ce!=="create_user_id"&&ce!=="update_user_id"&&ce!=="department_id"&&ce!=="relatedId"&&(ie[ce]=J==null?void 0:J[ce]);return J=Object.values(ie),J}),F=(ne=(Ee=x==null?void 0:x.compData)==null?void 0:Ee.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:ne.contents;if(Array.isArray(F==null?void 0:F[0])?(F[0].push({label:"排序",prop:"sort"}),F[0].push({label:"relatedId",prop:"relatedId",formType:"Upload"}),(ke=F[0])!=null&&ke.find(J=>(J==null?void 0:J.prop)==="disabled")&&(F[0]=(Z=F[0])==null?void 0:Z.filter(J=>(J==null?void 0:J.prop)!=="disabled"),F[0].unshift({label:"",prop:"disabled",sortable:!1}))):(F.push({label:"排序",prop:"sort"}),F.push({label:"relatedId",prop:"relatedId",formType:"Upload"}),F!=null&&F.find(J=>(J==null?void 0:J.prop)==="disabled")&&(F=F==null?void 0:F.filter(J=>(J==null?void 0:J.prop)!=="disabled"),F.unshift({label:"",prop:"disabled",sortable:!1}))),F!=null&&F.some(J=>{var ie;return(J==null?void 0:J.calculatorFilter)&&((ie=J==null?void 0:J.calculatorFilter)==null?void 0:ie.includes("Auto"))})&&(P=await di(P,F,"Auto"),P=P==null?void 0:P.map(J=>Object.values(J))),x!=null&&x.fatherSyncContents){Array.isArray((de=x==null?void 0:x.fatherSyncContents)==null?void 0:de[0])&&(x.fatherSyncContents=(Ke=x==null?void 0:x.fatherSyncContents)==null?void 0:Ke[0]);let J=(Na=xt.value)==null?void 0:Na.find(ie=>(ie==null?void 0:ie.condition)==="child");x.fatherSyncContents=(te=x==null?void 0:x.fatherSyncContents)==null?void 0:te.map(ie=>{var ce,ma,na,Ie,_e,Ca;return((ma=ie==null?void 0:ie.menus)==null?void 0:ma[((ce=ie==null?void 0:ie.menus)==null?void 0:ce.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"!==(ie==null?void 0:ie.menus)?ie.menus=(ie==null?void 0:ie.menus)+(J==null?void 0:J.value):((Ie=ie==null?void 0:ie.menus)==null?void 0:Ie[((na=ie==null?void 0:ie.menus)==null?void 0:na.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"===(ie==null?void 0:ie.menus)&&(ie.menus=(Ca=ie.menus)==null?void 0:Ca.slice(0,((_e=ie.menus)==null?void 0:_e.length)-1)),ie})}if(x!=null&&x.sonSyncContents){Array.isArray((D=x==null?void 0:x.sonSyncContents)==null?void 0:D[0])&&(x.sonSyncContents=(le=x==null?void 0:x.sonSyncContents)==null?void 0:le[0]);let J=(ye=xt.value)==null?void 0:ye.find(ie=>(ie==null?void 0:ie.condition)==="child");x.sonSyncContents=(ue=x==null?void 0:x.sonSyncContents)==null?void 0:ue.map(ie=>{var ce,ma,na,Ie,_e,Ca;return((ma=ie==null?void 0:ie.menus)==null?void 0:ma[((ce=ie==null?void 0:ie.menus)==null?void 0:ce.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"!==(ie==null?void 0:ie.menus)?ie.menus=(ie==null?void 0:ie.menus)+(J==null?void 0:J.value):((Ie=ie==null?void 0:ie.menus)==null?void 0:Ie[((na=ie==null?void 0:ie.menus)==null?void 0:na.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"===(ie==null?void 0:ie.menus)&&(ie.menus=(Ca=ie.menus)==null?void 0:Ca.slice(0,((_e=ie.menus)==null?void 0:_e.length)-1)),ie})}if(x!=null&&x.relatedQuotes){Array.isArray((Ne=x==null?void 0:x.relatedQuotes)==null?void 0:Ne[0])&&(x.relatedQuotes=(pa=x==null?void 0:x.relatedQuotes)==null?void 0:pa[0]);let J=(wa=xt.value)==null?void 0:wa.find(ie=>(ie==null?void 0:ie.condition)==="child");x.relatedQuotes=(ja=x==null?void 0:x.relatedQuotes)==null?void 0:ja.map(ie=>{var ce,ma,na,Ie,_e,Ca;return((ma=ie==null?void 0:ie.menus)==null?void 0:ma[((ce=ie==null?void 0:ie.menus)==null?void 0:ce.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"!==(ie==null?void 0:ie.menus)?ie.menus=(ie==null?void 0:ie.menus)+(J==null?void 0:J.value):((Ie=ie==null?void 0:ie.menus)==null?void 0:Ie[((na=ie==null?void 0:ie.menus)==null?void 0:na.length)-1])==="/"&&(J==null?void 0:J.parentContent)+"/"===(ie==null?void 0:ie.menus)&&(ie.menus=(Ca=ie.menus)==null?void 0:Ca.slice(0,((_e=ie.menus)==null?void 0:_e.length)-1)),ie})}x={filter:(ea=(ee=x==null?void 0:x.compData)==null?void 0:ee.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:ea.contents,key:x==null?void 0:x.comp,name:k,tableColumns:F,tableContents:P,menuFilter:x==null?void 0:x.menuFilter,fatherSyncContents:x==null?void 0:x.fatherSyncContents,relatedQuotes:x==null?void 0:x.relatedQuotes,sonSyncContents:x==null?void 0:x.sonSyncContents}}else{let P=(He=(xa=(Pe=x==null?void 0:x.compData)==null?void 0:Pe.find(J=>(J==null?void 0:J.key)==="formContent"))==null?void 0:xa.contents)==null?void 0:He.map(J=>(J==null?void 0:J.value)??"");P=[P];let F=(Ye=(Re=(Te=x==null?void 0:x.compData)==null?void 0:Te.find(J=>(J==null?void 0:J.key)==="formContent"))==null?void 0:Re.contents)==null?void 0:Ye.map(J=>(J.value="",J));x={contents:P,filter:(Va=(qa=x==null?void 0:x.compData)==null?void 0:qa.find(J=>(J==null?void 0:J.key)==="filter"))==null?void 0:Va.contents,key:x==null?void 0:x.comp,name:k,value:F,fatherSyncContents:x==null?void 0:x.fatherSyncContents,relatedQuotes:x==null?void 0:x.relatedQuotes,sonSyncContents:x==null?void 0:x.sonSyncContents}}return x.isShow=!1,x}),b=await Promise.all(b);let L=[{key:"menuPath",contents:[{path:l,fatherPath:(w=(z=(S=Y==null?void 0:Y.data)==null?void 0:S.result)==null?void 0:z[0])==null?void 0:w.father_name,isShow:!1}]},{key:l,contents:b}];await I.createPlatFormDataApi({platId:parseInt((j=Hr==null?void 0:Hr.value)==null?void 0:j.plat_id),changeData:L});let T=await I.getPageDataApi({platId:parseInt((A=Hr==null?void 0:Hr.value)==null?void 0:A.plat_id),pageName:l});s=(N=T==null?void 0:T.data)==null?void 0:N.result}}r&&await Js(s,!!(n!=null&&n.originPath));let c=await Qi(s,n);return r&&(c=await bp(c)),c},ls=async l=>{var t,s,c,g,h,v,m,u,_,S,z;let r=(t=l==null?void 0:l.menus)==null?void 0:t.join("/");l!=null&&l.endChildMenu&&(l==null?void 0:l.endChildMenu)!==""&&(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+(l==null?void 0:l.endChildMenu)),(r==null?void 0:r[(r==null?void 0:r.length)-1])==="/"&&(r=r+((c=(s=l.value)==null?void 0:s.split(" "))==null?void 0:c[0]));let n=await $r(r,!1);if(n=(g=n==null?void 0:n.filter(w=>{var j,A;return(w==null?void 0:w.name)===((A=l==null?void 0:l.groups)==null?void 0:A[((j=l==null?void 0:l.groups)==null?void 0:j.length)-1])}))==null?void 0:g[0],(v=(h=n==null?void 0:n.compData)==null?void 0:h.find(w=>(w==null?void 0:w.key)==="tableContents"))!=null&&v.contents){n=(u=(m=n==null?void 0:n.compData)==null?void 0:m.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:u.contents;let w=((_=l==null?void 0:l.words)==null?void 0:_[0])??(l==null?void 0:l.prop);return n=n==null?void 0:n.filter(j=>{var A,N,Y,b;return(j==null?void 0:j[l!=null&&l.endChildMenu?w:(A=l==null?void 0:l.words)==null?void 0:A[0]])===(l!=null&&l.relatedWords&&((N=l==null?void 0:l.relatedWords)==null?void 0:N.length)>0?(b=(Y=l.value)==null?void 0:Y.split(" "))==null?void 0:b[0]:l.value)}),n==null?void 0:n[0]}else{let w=(z=(S=n==null?void 0:n.compData)==null?void 0:S.find(A=>(A==null?void 0:A.key)==="formContent"))==null?void 0:z.contents,j={};return w==null||w.forEach(A=>{j[A.prop]=A.value}),j}},kp={key:0,class:"extra-button-content"},xp={class:"table-operator-wrap"},_p={key:0,class:"extra-button-filter"},wp={key:1,class:"extra-header"},Cp=["onClick"],Sp={class:"table-op-text"},Ep={class:"table-op-text"},Dp={class:"drop-menu",style:{width:"120px"}},Bp=["onClick"],Np={key:0},Tp={key:1},Ap=["onClick"],zp={class:"table-op-text"},Mp={key:1,class:"extra-button-content tabs-button-wrapper"},Op={class:"table-operator-wrap"},Ip={class:"extra-button-filter"},Lp={key:0,class:"extra-header"},Vp={class:"table-op-action"},Rp={class:"table-op-text"},$p={class:"drop-menu",style:{width:"120px"}},Pp={key:0},Fp={key:1},jp=["onClick"],Hp={class:"table-op-text"},Up={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},filterShow:{type:Boolean,default:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(l,{emit:r}){const n=r,t=l,s=a.ref(""),c=a.ref(!1),g=a.ref([]),h=a.ref([{label:"清空",background:"#999999"},{label:"确认"}]),v=[{label:"新增",icon:"new"},{label:"导入",icon:"import_101"},{label:"导出",icon:"export_101"},{label:"导出paraform",icon:"export_101"},{label:"OCR识别",icon:"OCR识别"},{label:"切换视图",icon:"cardViewport_101"}];function m(x,k){return x.map($=>{const U={...$};return k.forEach(X=>{delete U[X]}),U})}function u(x){if(!x||x.t!=="n")return(x==null?void 0:x.v)??"";const k=x.v;if(x.z){const $=String(x.z).toLowerCase(),U=["yyyy/mm/dd","yyyy-mm-dd","yyyy.mm.dd","yy/mm/dd","yy-mm-dd","yy.mm.dd","mm/dd/yy","mm-dd-yy","mm.dd.yy","dd/mm/yy","dd-mm-yy","dd.mm.yy","m/d/yy","m/d/yyyy","d/m/yy","d/m/yyyy","yyyy年","yy年","m月","d日","yyyy年m月d日","yy年m月d日","[$-f800]","[$-f400]"];for(const ze of U)if($.includes(ze))return _(k);const X=/[ymdhms]/.test($),be=/^[0#\.\,\s]+$/.test($.replace(/[\\\/\-:]/g,""));if(X&&!be)return _(k)}if(k>=1&&k<=73050){if(k<5e3)return k;if(k>=5e3&&k<4e4){const $=Math.floor((k-25569)/365.25)+1970;return $>=1970&&$<=2e3&&x.z&&/[ymd]/.test(String(x.z).toLowerCase())?_(k):k}if(k>=4e4)return _(k)}return k}function _(x){if(typeof x!="number")return x;try{const k=new Date((x-25569)*86400*1e3);if(isNaN(k.getTime()))return x;const $=k.getFullYear(),U=String(k.getMonth()+1).padStart(2,"0"),X=String(k.getDate()).padStart(2,"0");return`${$}-${U}-${X}`}catch{return x}}const S=x=>{const k=x.raw;if(!k)return;const $=new FileReader;$.onload=U=>{try{const X=new Uint8Array(U.target.result),be=sa.readSync(X,{type:"array"}),ze=be.SheetNames[0],Ee=be.Sheets[ze],ke=sa.utils.decode_range(Ee["!ref"]).e.c+1,Z=new Array(ke).fill(""),de=[];for(const le in Ee){if(le[0]==="!")continue;const{r:ye,c:ue}=sa.utils.decode_cell(le),Ne=Ee[le];let pa=u(Ne);if((pa==null||pa==="")&&(pa=""),ye===0)Z[ue]=pa;else{if(!de[ye-1]){de[ye-1]={};for(let wa=0;wa<ke;wa++)de[ye-1][`col_${wa}`]=""}de[ye-1][`col_${ue}`]=pa}}for(let le=0;le<ke;le++)Z[le]===void 0&&(Z[le]="");const Ke=[];for(let le=0;le<Z.length;le++)(!Z[le]||Z[le].toString().trim()==="")&&Ke.push(le);let Na,te;(Ke==null?void 0:Ke.length)>0?(el.ElMessage.warning("存在键为空的列,已自动过滤,请检查补充"),Na=Z.filter((le,ye)=>!Ke.includes(ye)),te=m(de,Ke==null?void 0:Ke.map(le=>`col_${le}`))):(Na=Z,te=de);const D=de==null?void 0:de[0];if(!(D!=null&&D.hasOwnProperty("col_0")))return el.ElMessage.error("导入的数据列不匹配,请检查是否错位");n("getImportData",Na,te)}catch(X){throw el.ElMessage.error(X.message),new Error(X.message)}},$.readAsArrayBuffer(k)},z=x=>{var $;const k=($=g.value)==null?void 0:$.reduce((U,X,be)=>(be===0?U[X.label]=x:U[X.label]=X==null?void 0:X.value,U),{});n("filter",k,x,!0)},w=(x,k={})=>{n("buttonClick",x,"",k)},j=x=>{var k,$;g.value=($=(k=sa.getColumnChild(I.cloneDeep(x)))==null?void 0:k.filter(U=>(U==null?void 0:U.label)!==""&&(U==null?void 0:U.label)!=="操作"))==null?void 0:$.map(U=>({label:(U==null?void 0:U.label)??"",value:"",name:(U==null?void 0:U.prop)??"",isFormColHidden:U==null?void 0:U.isTableColHidden,width:2,prop:(U==null?void 0:U.prop)??""}))},A=a.ref(!1),N=x=>{var k;if((x==null?void 0:x.buttonName)==="确认"&&(n("filter",x==null?void 0:x.content),A.value=(x==null?void 0:x.content)&&Object.values(x==null?void 0:x.content).length>0),(x==null?void 0:x.buttonName)==="清空"){const $=I.cloneDeep(x==null?void 0:x.content);for(const U in $)$[U]="";g.value=(k=g.value)==null?void 0:k.map(U=>({...U,value:""})),n("filter",$),A.value=!1}c.value=!1},Y=()=>{c.value=!c.value},b=()=>{var k,$;g.value=(k=g.value)==null?void 0:k.map(U=>({...U,value:""}));const x=($=g.value)==null?void 0:$.reduce((U,X)=>(U[X.label]=X.value,U),{});n("filter",x)},L=a.ref(null);let T;return T=x=>{var X;if(!c.value)return;const k=(X=L==null?void 0:L.value)==null?void 0:X.$el,$=k==null?void 0:k.contains(x.target);let U=!1;document.querySelectorAll(".el-popover, .el-popper").forEach(be=>{be.contains(x.target)&&(U=!0)}),!$&&!U&&(c.value=!1)},a.onMounted(()=>{document.addEventListener("click",T),j(t.columns)}),a.onBeforeUnmount(()=>{document.removeEventListener("click",T)}),a.watch(()=>t.columns,()=>{j(t.columns)},{deep:!0,immediate:!0}),(x,k)=>{var Ee,ne,ke,Z,de,Ke,Na,te;const $=a.resolveComponent("el-icon"),U=a.resolveComponent("svg-icon"),X=a.resolveComponent("el-input"),be=a.resolveComponent("el-upload"),ze=a.resolveComponent("el-button");return l.pageLayout==="vertical"?(a.openBlock(),a.createElementBlock("div",kp,[a.createElementVNode("div",{class:a.normalizeClass(l.compName?"table-name-wrap":""),style:a.normalizeStyle({background:(t==null?void 0:t.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((t==null?void 0:t.level)-1)*12+"px",fontWeight:600-((t==null?void 0:t.level)-1)*100>=400?600-((t==null?void 0:t.level)-1)*100:400,fontSize:17-(t==null?void 0:t.level)>=14?17-(t==null?void 0:t.level)+"px":"14px"})},a.toDisplayString(l.compName),7),a.createElementVNode("div",xp,[t!=null&&t.filterShow?(a.openBlock(),a.createElementBlock("div",_p,[a.createVNode(wu,{trigger:"contextmenu",ref_key:"popOverRef",ref:L,title:"",width:800,placement:"bottom-start",isVisible:c.value,"onUpdate:isVisible":k[4]||(k[4]=D=>c.value=D)},{reference:a.withCtx(()=>{var D,le,ye,ue;return[a.createVNode(X,{modelValue:s.value,"onUpdate:modelValue":k[0]||(k[0]=Ne=>s.value=Ne),style:{"min-width":"80px"},placeholder:A.value?(ye=(le=(D=l.filterValues)==null?void 0:D.filter(Ne=>Ne))==null?void 0:le.slice(0,3))==null?void 0:ye.join("/"):"搜索","prefix-icon":a.unref(el.search_default),clearable:"",onInput:z,disabled:((ue=g.value)==null?void 0:ue.length)===0},{suffix:a.withCtx(()=>{var Ne,pa;return[!s.value&&((pa=(Ne=l.filterValues)==null?void 0:Ne.filter(wa=>wa))!=null&&pa.join("/"))?(a.openBlock(),a.createBlock($,{key:0,style:{cursor:"pointer"},onClick:b},{default:a.withCtx(()=>[a.createVNode(a.unref(el.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(Y,["stop"])},[a.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:a.withCtx(()=>[a.createElementVNode("div",{class:"form-content-value",onKeydown:k[1]||(k[1]=a.withModifiers(()=>{},["stop"])),onKeyup:k[2]||(k[2]=a.withModifiers(()=>{},["stop"])),onKeypress:k[3]||(k[3]=a.withModifiers(()=>{},["stop"]))},[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:g.value,buttonValue:h.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:h.value,isStartJustify:!1,onOnButtonClick:N},null,8,["rowContents","buttonValue"]))],32)]),_:1},8,["isVisible"])])):a.createCommentVNode("",!0),l.buttons&&((Ee=l.buttons)==null?void 0:Ee.length)>0?(a.openBlock(),a.createElementBlock("div",wp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((ne=l.buttons)==null?void 0:ne.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,le)=>{var ye;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:le},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(be,{key:0,class:"upload-button-wrap","on-change":S,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!l.lockingPage},{default:a.withCtx(()=>{var ue;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:Ne=>w(D==null?void 0:D.label)},[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"]),a.createElementVNode("span",Sp,a.toDisplayString(D==null?void 0:D.label),1)],10,Cp)]}),_:2},1032,["disabled"])):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>{var ue;return[a.createElementVNode("div",{class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}])},[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"]),a.createElementVNode("span",Ep,a.toDisplayString(D==null?void 0:D.label),1)],2)]}),dropMenu:a.withCtx(()=>[a.createElementVNode("div",Dp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,ue=>{var Ne,pa;return a.openBlock(),a.createElementBlock("div",{key:ue==null?void 0:ue.label,class:a.normalizeClass(["table-op-drop-item",{"is-disabled":!!l.lockingPage}]),onClick:wa=>!l.lockingPage&&w(ue==null?void 0:ue.label)},[a.createTextVNode(a.toDisplayString(ue==null?void 0:ue.label),1),(Ne=ue==null?void 0:ue.label)!=null&&Ne.includes("选中")?(a.openBlock(),a.createElementBlock("span",Np,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(pa=ue==null?void 0:ue.label)!=null&&pa.includes("全部")?(a.openBlock(),a.createElementBlock("span",Tp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)],10,Bp)}),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,id:"themeButton",class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),onClick:ue=>!l.lockingPage&&w(D==null?void 0:D.label,D)},[a.createVNode(U,{class:"table-op-icon",name:(ye=v==null?void 0:v.find(ue=>(ue==null?void 0:ue.label)===(D==null?void 0:D.label)))==null?void 0:ye.icon},null,8,["name"]),a.createElementVNode("span",zp,a.toDisplayString(D==null?void 0:D.label),1)],10,Ap)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])])):(a.openBlock(),a.createElementBlock("div",Mp,[a.createElementVNode("div",Op,[a.createElementVNode("div",Ip,[a.createVNode(X,{modelValue:s.value,"onUpdate:modelValue":k[5]||(k[5]=D=>s.value=D),style:{"min-width":"80px"},placeholder:A.value?(de=(Z=(ke=l.filterValues)==null?void 0:ke.filter(D=>D))==null?void 0:Z.slice(0,3))==null?void 0:de.join("/"):"搜索","prefix-icon":a.unref(el.search_default),clearable:"",onInput:z,disabled:((Ke=g.value)==null?void 0:Ke.length)===0},{suffix:a.withCtx(()=>{var D,le;return[!s.value&&((le=(D=l.filterValues)==null?void 0:D.filter(ye=>ye))!=null&&le.join("/"))?(a.openBlock(),a.createBlock($,{key:0,style:{cursor:"pointer"},onClick:b},{default:a.withCtx(()=>[a.createVNode(a.unref(el.circle_close_default))]),_:1})):a.createCommentVNode("",!0)]}),append:a.withCtx(()=>[a.createElementVNode("span",{title:"条件查询",onClick:a.withModifiers(Y,["stop"])},[a.createVNode(U,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]),l.buttons&&((Na=l.buttons)==null?void 0:Na.length)>0?(a.openBlock(),a.createElementBlock("div",Lp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((te=l.buttons)==null?void 0:te.filter(D=>l.isDevMode||(D==null?void 0:D.label)!=="修改模板"),(D,le)=>{var ye;return a.openBlock(),a.createElementBlock("div",{class:"extra-contents",key:le},[(D==null?void 0:D.type)==="upload"?(a.openBlock(),a.createBlock(be,{key:0,class:"upload-button-wrap","on-change":S,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:a.withCtx(()=>{var ue;return[a.createElementVNode("div",Vp,[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"]),a.createElementVNode("span",Rp,a.toDisplayString(D==null?void 0:D.label),1)])]}),_:2},1024)):a.createCommentVNode("",!0),(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(pl._sfc_main,{key:1},{dropTitle:a.withCtx(()=>[(D==null?void 0:D.type)==="popover"?(a.openBlock(),a.createBlock(ze,{key:0,style:{background:"transparent",color:"#000000"}},{icon:a.withCtx(()=>{var ue;return[a.createVNode(U,{class:"table-op-icon",name:(ue=v==null?void 0:v.find(Ne=>(Ne==null?void 0:Ne.label)===(D==null?void 0:D.label)))==null?void 0:ue.icon},null,8,["name"])]}),default:a.withCtx(()=>[a.createTextVNode(" "+a.toDisplayString(D==null?void 0:D.label),1)]),_:2},1024)):a.createCommentVNode("",!0)]),dropMenu:a.withCtx(()=>[a.createElementVNode("div",$p,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(D==null?void 0:D.contents,ue=>(a.openBlock(),a.createBlock(ze,{key:ue==null?void 0:ue.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:Ne=>w(ue==null?void 0:ue.label)},{default:a.withCtx(()=>{var Ne,pa;return[a.createTextVNode(a.toDisplayString(ue==null?void 0:ue.label),1),(Ne=ue==null?void 0:ue.label)!=null&&Ne.includes("选中")?(a.openBlock(),a.createElementBlock("span",Pp,"("+a.toDisplayString(l.selectNums)+")",1)):a.createCommentVNode("",!0),(pa=ue==null?void 0:ue.label)!=null&&pa.includes("全部")?(a.openBlock(),a.createElementBlock("span",Fp,"("+a.toDisplayString(l.dataNums)+")",1)):a.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):a.createCommentVNode("",!0),!(D!=null&&D.type)||(D==null?void 0:D.type)==="methodButton"?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(["table-op-action",{"is-disabled":!!l.lockingPage}]),id:"themeButton",onClick:ue=>!l.lockingPage&&w(D==null?void 0:D.label,D)},[a.createVNode(U,{class:"table-op-icon",name:(ye=v==null?void 0:v.find(ue=>(ue==null?void 0:ue.label)===(D==null?void 0:D.label)))==null?void 0:ye.icon},null,8,["name"]),a.createElementVNode("span",Hp,a.toDisplayString(D==null?void 0:D.label),1)],10,jp)):a.createCommentVNode("",!0)])}),128))])):a.createCommentVNode("",!0)])]))}}},qp=Ul._export_sfc(Up,[["__scopeId","data-v-3a44c010"]]),Wp={__name:"index",props:{columns:Array,tableData:Array},setup(l){return(r,n)=>{const t=a.resolveComponent("el-table-column"),s=a.resolveComponent("el-table");return a.openBlock(),a.createBlock(s,{data:l.tableData,style:{width:"100%"},stripe:"","max-height":"500"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.columns,c=>{var g;return a.openBlock(),a.createBlock(t,{key:c==null?void 0:c.prop,label:c==null?void 0:c.label,prop:c==null?void 0:c.prop,fixed:(c==null?void 0:c.prop)==="operate"?"right":c==null?void 0:c.fixed,align:(c==null?void 0:c.align)??"left","show-overflow-tooltip":(c==null?void 0:c.showOverflowTooltip)??!0,width:c==null?void 0:c.width,"min-width":(c==null?void 0:c.minWidth)||((c==null?void 0:c.prop)==="operate"?80:(((g=c==null?void 0:c.label)==null?void 0:g.length)*2||4)*27)},{default:a.withCtx(h=>[a.renderSlot(r.$slots,"content",{row:h.row,column:h.column,$index:h.$index,scope:h}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.children,(v,m)=>(a.openBlock(),a.createBlock(pl._sfc_main$2,{key:m,column:v,tableData:l.tableData},a.createSlots({_:2},[a.renderList(r.$slots,(u,_)=>({name:_,fn:a.withCtx(({row:S,slotData:z,item:w,column:j})=>[a.renderSlot(r.$slots,_,a.mergeProps({ref_for:!0},z??S,{item:w??v,slotData:z??S,row:S,column:j,columnProp:v}))])}))]),1032,["column","tableData"]))),128))]),_:2},1032,["label","prop","fixed","align","show-overflow-tooltip","width","min-width"])}),128))]),_:3},8,["data"])}}};class Kp extends La.Loader{constructor(r){super(r),this.littleEndian=!0}load(r,n,t,s){const c=this,g=new La.FileLoader(c.manager);g.setPath(c.path),g.setResponseType("arraybuffer"),g.setRequestHeader(c.requestHeader),g.setWithCredentials(c.withCredentials),g.load(r,function(h){try{n(c.parse(h))}catch(v){s?s(v):console.error(v),c.manager.itemError(r)}},t,s)}_getDataView(r,n,t,s){switch(t){case"F":return s===8?r.getFloat64(n,this.littleEndian):r.getFloat32(n,this.littleEndian);case"I":return s===1?r.getInt8(n):s===2?r.getInt16(n,this.littleEndian):r.getInt32(n,this.littleEndian);case"U":return s===1?r.getUint8(n):s===2?r.getUint16(n,this.littleEndian):r.getUint32(n,this.littleEndian)}}parse(r){function n(z,w){const j=z.length,A=new Uint8Array(w);let N=0,Y=0,b,L,T;do if(b=z[N++],b<32){if(b++,Y+b>w)throw new Error("Output buffer is not large enough");if(N+b>j)throw new Error("Invalid compressed data");do A[Y++]=z[N++];while(--b)}else{if(L=b>>5,T=Y-((b&31)<<8)-1,N>=j)throw new Error("Invalid compressed data");if(L===7&&(L+=z[N++],N>=j))throw new Error("Invalid compressed data");if(T-=z[N++],Y+L+2>w)throw new Error("Output buffer is not large enough");if(T<0)throw new Error("Invalid compressed data");if(T>=Y)throw new Error("Invalid compressed data");do A[Y++]=A[T++];while(--L+2)}while(N<j);return A}function t(z){const w={},j=new Uint8Array(z);let A="",N="",Y=0,b=!1;const L=j.length;for(;Y<L&&b===!1;){const $=String.fromCharCode(j[Y++]);$===`
2
2
  `||$==="\r"?(N.trim().toLowerCase().startsWith("data")&&(b=!0),N=""):N+=$,A+=$}const T=A.search(/[\r\n]DATA\s(\S*)\s/i),x=/[\r\n]DATA\s(\S*)\s/i.exec(A.slice(T-1));if(w.data=x[1],w.headerLen=x[0].length+T,w.str=A.slice(0,w.headerLen),w.str=w.str.replace(/#.*/gi,""),w.version=/^VERSION (.*)/im.exec(w.str),w.fields=/^FIELDS (.*)/im.exec(w.str),w.size=/^SIZE (.*)/im.exec(w.str),w.type=/^TYPE (.*)/im.exec(w.str),w.count=/^COUNT (.*)/im.exec(w.str),w.width=/^WIDTH (.*)/im.exec(w.str),w.height=/^HEIGHT (.*)/im.exec(w.str),w.viewpoint=/^VIEWPOINT (.*)/im.exec(w.str),w.points=/^POINTS (.*)/im.exec(w.str),w.version!==null&&(w.version=parseFloat(w.version[1])),w.fields=w.fields!==null?w.fields[1].split(" "):[],w.type!==null&&(w.type=w.type[1].split(" ")),w.width!==null&&(w.width=parseInt(w.width[1])),w.height!==null&&(w.height=parseInt(w.height[1])),w.viewpoint!==null&&(w.viewpoint=w.viewpoint[1]),w.points!==null&&(w.points=parseInt(w.points[1],10)),w.points===null&&(w.points=w.width*w.height),w.size!==null&&(w.size=w.size[1].split(" ").map(function($){return parseInt($,10)})),w.count!==null)w.count=w.count[1].split(" ").map(function($){return parseInt($,10)});else{w.count=[];for(let $=0,U=w.fields.length;$<U;$++)w.count.push(1)}w.offset={};let k=0;for(let $=0,U=w.fields.length;$<U;$++)w.data==="ascii"?w.offset[w.fields[$]]=$:(w.offset[w.fields[$]]=k,k+=w.size[$]*w.count[$]);return w.rowSize=k,w}const s=t(r),c=[],g=[],h=[],v=[],m=[],u=new La.Color;if(s.data==="ascii"){const z=s.offset,A=new TextDecoder().decode(r).slice(s.headerLen).split(`
3
3
  `);for(let N=0,Y=A.length;N<Y;N++){if(A[N]==="")continue;const b=A[N].split(" ");if(z.x!==void 0&&(c.push(parseFloat(b[z.x])),c.push(parseFloat(b[z.y])),c.push(parseFloat(b[z.z]))),z.rgb!==void 0){const L=s.fields.findIndex(be=>be==="rgb"),T=s.type[L],x=parseFloat(b[z.rgb]);let k=x;if(T==="F"){const be=new Float32Array(1);be[0]=x,k=new Int32Array(be.buffer)[0]}const $=(k>>16&255)/255,U=(k>>8&255)/255,X=(k>>0&255)/255;u.setRGB($,U,X,La.SRGBColorSpace),h.push(u.r,u.g,u.b)}z.normal_x!==void 0&&(g.push(parseFloat(b[z.normal_x])),g.push(parseFloat(b[z.normal_y])),g.push(parseFloat(b[z.normal_z]))),z.intensity!==void 0&&v.push(parseFloat(b[z.intensity])),z.label!==void 0&&m.push(parseInt(b[z.label]))}}if(s.data==="binary_compressed"){const z=new Uint32Array(r.slice(s.headerLen,s.headerLen+8)),w=z[0],j=z[1],A=n(new Uint8Array(r,s.headerLen+8,w),j),N=new DataView(A.buffer),Y=s.offset;for(let b=0;b<s.points;b++){if(Y.x!==void 0){const L=s.fields.indexOf("x"),T=s.fields.indexOf("y"),x=s.fields.indexOf("z");c.push(this._getDataView(N,s.points*Y.x+s.size[L]*b,s.type[L],s.size[L])),c.push(this._getDataView(N,s.points*Y.y+s.size[T]*b,s.type[T],s.size[T])),c.push(this._getDataView(N,s.points*Y.z+s.size[x]*b,s.type[x],s.size[x]))}if(Y.rgb!==void 0){const L=s.fields.indexOf("rgb"),T=N.getUint8(s.points*Y.rgb+s.size[L]*b+2)/255,x=N.getUint8(s.points*Y.rgb+s.size[L]*b+1)/255,k=N.getUint8(s.points*Y.rgb+s.size[L]*b+0)/255;u.setRGB(T,x,k,La.SRGBColorSpace),h.push(u.r,u.g,u.b)}if(Y.normal_x!==void 0){const L=s.fields.indexOf("normal_x"),T=s.fields.indexOf("normal_y"),x=s.fields.indexOf("normal_z");g.push(this._getDataView(N,s.points*Y.normal_x+s.size[L]*b,s.type[L],s.size[L])),g.push(this._getDataView(N,s.points*Y.normal_y+s.size[T]*b,s.type[T],s.size[T])),g.push(this._getDataView(N,s.points*Y.normal_z+s.size[x]*b,s.type[x],s.size[x]))}if(Y.intensity!==void 0){const L=s.fields.indexOf("intensity");v.push(this._getDataView(N,s.points*Y.intensity+s.size[L]*b,s.type[L],s.size[L]))}if(Y.label!==void 0){const L=s.fields.indexOf("label");m.push(N.getInt32(s.points*Y.label+s.size[L]*b,this.littleEndian))}}}if(s.data==="binary"){const z=new DataView(r,s.headerLen),w=s.offset;for(let j=0,A=0;j<s.points;j++,A+=s.rowSize){if(w.x!==void 0){const N=s.fields.indexOf("x"),Y=s.fields.indexOf("y"),b=s.fields.indexOf("z");c.push(this._getDataView(z,A+w.x,s.type[N],s.size[N])),c.push(this._getDataView(z,A+w.y,s.type[Y],s.size[Y])),c.push(this._getDataView(z,A+w.z,s.type[b],s.size[b]))}if(w.rgb!==void 0){const N=z.getUint8(A+w.rgb+2)/255,Y=z.getUint8(A+w.rgb+1)/255,b=z.getUint8(A+w.rgb+0)/255;u.setRGB(N,Y,b,La.SRGBColorSpace),h.push(u.r,u.g,u.b)}if(w.normal_x!==void 0){const N=s.fields.indexOf("normal_x"),Y=s.fields.indexOf("normal_y"),b=s.fields.indexOf("normal_z");g.push(this._getDataView(z,A+w.normal_x,s.type[N],s.size[N])),g.push(this._getDataView(z,A+w.normal_y,s.type[Y],s.size[Y])),g.push(this._getDataView(z,A+w.normal_z,s.type[b],s.size[b]))}if(w.intensity!==void 0){const N=s.fields.indexOf("intensity");v.push(this._getDataView(z,A+w.intensity,s.type[N],s.size[N]))}w.label!==void 0&&m.push(z.getInt32(A+w.label,this.littleEndian))}}const _=new La.BufferGeometry;c.length>0&&_.setAttribute("position",new La.Float32BufferAttribute(c,3)),g.length>0&&_.setAttribute("normal",new La.Float32BufferAttribute(g,3)),h.length>0&&_.setAttribute("color",new La.Float32BufferAttribute(h,3)),v.length>0&&_.setAttribute("intensity",new La.Float32BufferAttribute(v,1)),m.length>0&&_.setAttribute("label",new La.Int32BufferAttribute(m,1)),_.computeBoundingSphere();const S=new La.PointsMaterial({size:.005});return h.length>0&&(S.vertexColors=!0),new La.Points(_,S)}}const Yp=I.useModelComp(I.pinia),{systemPath:rs}=I.storeToRefs(Yp),so=a.ref(),ns=new WeakMap;function Gp(l,r,n,t,s){const c=async S=>{try{const z=await I.platformDownloadFile({url:S});if(z.status!==200)throw new Error(`下载失败: ${z.status}`);return z.data}catch(z){throw console.error("addModelFromUrl失败:",z),z}},g=S=>new Promise((z,w)=>{const j=new FileReader;j.onload=A=>{try{const N=A.target.result,b=new An.MTLLoader().parse(N);b.preload(),z(b)}catch(N){w(N)}},j.onerror=()=>{w(new Error("MTL文件读取失败"))},j.readAsText(S)}),h=async S=>{const z={materials:{},create:function(w){return this.materials[w]?this.materials[w]:(console.warn(`Material '${w}' not found, using default material`),new La.MeshPhongMaterial({color:8947848,side:La.DoubleSide}))},getAsArray:function(){const w=[];for(const j in this.materials)w.push(this.materials[j]);return w},preload:function(){for(const w in this.materials)this.materials[w].map&&(this.materials[w].map.needsUpdate=!0)}};for(const w of S){const j=await g(w);Object.assign(z.materials,j.materials)}return z.preload(),z},v=async(S,z=[])=>new Promise((w,j)=>{const A=new FileReader;A.onload=async N=>{try{const Y=N.target.result;let b=null;z&&z.length>0&&(z.length===1?b=await g(z[0]):b=await h(z));const L=new An.OBJLoader;b&&L.setMaterials(b);const T=L.parse(Y);b||T.traverse(x=>{x.isMesh&&(x.material=new La.MeshPhongMaterial({color:8947848,side:La.DoubleSide}))}),w(T)}catch(Y){j(Y)}},A.onerror=()=>{j(new Error("OBJ文件读取失败"))},A.readAsText(S)}),m=async S=>{var z;try{n.value=!0;const{scene:w}=l();if(!w)throw new Error("Scene not initialized");s();const j=[];for(let A=0;A<S.length;A++){const N=S[A];t.value=`正在加载模型 ${A+1}/${S.length}...`;const Y=await c(N.objUrl),b=((z=N.objUrl)==null?void 0:z.split("/").pop())||`model_${A}.obj`,L=new File([Y],b,{type:Y.type});let T=[];if(N.mtlUrls){const k=Array.isArray(N.mtlUrls)?N.mtlUrls:[N.mtlUrls];for(let $=0;$<k.length;$++){const U=k[$],X=await c(U),be=(U==null?void 0:U.split("/").pop())||`material_${A}_${$}.mtl`,ze=new File([X],be,{type:X.type});T.push(ze)}}const x=await v(L,T);w.add(x),r.value.push(x),j.push(x)}return n.value=!1,j}catch(w){throw console.error("加载模型失败:",w),n.value=!1,w}},u=async(S,z,w=[],j=[])=>{let A;const N=S.toLowerCase();switch(N){case".txt":case".cpt":case".obj":const Y=await z.text();if(N===".txt"||N===".cpt"){const ee=/^(?!.*\bf\b)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?(-?\d*\.?\d+)[^\n]*?$/gm,Pe=[...Y.matchAll(ee)].map(Te=>({x:parseFloat(Te[1]),y:parseFloat(Te[2]),z:parseFloat(Te[3])})),xa=new La.BufferGeometry,He=Pe.flatMap(Te=>[Te.x,Te.y,Te.z]);if(xa.setAttribute("position",new La.Float32BufferAttribute(He,3)),N===".txt"){const Te=new La.PointsMaterial({color:"#5B5C99",size:1,sizeAttenuation:!1});A=new La.Points(xa,Te)}else if(N===".cpt"){const Te=new La.LineBasicMaterial({color:"#5B5C99",linewidth:100});A=new La.Line(xa,Te)}}else if(N===".obj"){const ee=new An.OBJLoader;if(w&&w.length>0){const ea=new An.MTLLoader;for(const Pe of w){const xa=await Pe.text(),He=ea.parse(xa);He.preload(),ee.setMaterials(He);break}}A=ee.parse(Y),(!w||w.length===0)&&A.traverse(ea=>{ea.isMesh&&(ea.material=new La.MeshPhongMaterial({color:"#B3B3D4"})),ea instanceof La.Mesh&&(ea.material.side=La.DoubleSide)})}break;case".stl":const b=await z.arrayBuffer(),T=new An.STLLoader().parse(b),x=new La.MeshPhongMaterial({color:"#B3B3D4",side:La.DoubleSide});A=new La.Mesh(T,x);break;case".nc":const k=["Mach_B_Axis_0.STL","Mach_C_Axis_0.STL","Mach_X_Axis_0.STL","Mach_Y_Axis_0.STL","Mach_Z_Axis_0.STL","Mach_Spindle_0.STL"],$={"Mach_Y_Axis_0.STL":"rgb(128,118,152)","Mach_B_Axis_0.STL":"rgb(204,143,89)","Mach_C_Axis_0.STL":"rgb(145,245,251)","Mach_X_Axis_0.STL":"rgb(125,158,192)","Mach_Z_Axis_0.STL":"rgb(248,228,118)","Mach_Spindle_0.STL":"rgb(145,145,145)"},U=new La.Group,X=k.map(ee=>new Promise((ea,Pe)=>{new An.STLLoader().load(rs.value===""?`/model/${ee}`:`${rs.value}\\${ee}`,He=>{const Te=new La.MeshPhongMaterial({color:$[ee]||"#B3B3D4",side:La.DoubleSide}),Re=new La.Mesh(He,Te);ea(Re)},void 0,Pe)}));try{(await Promise.all(X)).forEach(ea=>U.add(ea)),A=U}catch(ee){throw console.error("加载NC文件对应的STL文件失败:",ee),new Error("无法加载.NC文件对应的STL文件")}break;case".pcd":const be=new Kp,ze=new La.Group;try{const ee=await el.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/target.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),ea=new Blob([ee.data],{type:"application/octet-stream;charset=UTF-8"}),Pe=await el.axios.get("http://139.196.154.85:20026/chfs/shared/重大专项/重大专项文件/final.pcd",{responseType:"blob",headers:{"Content-Type":"application/json"}}),xa=new Blob([Pe.data],{type:"application/octet-stream;charset=UTF-8"}),He=await new Promise((Re,Ye)=>{const qa=URL.createObjectURL(ea);be.load(qa,Va=>{const P=new Float32Array(Va.geometry.attributes.position.count*3);for(let F=0;F<Va.geometry.attributes.position.count;F++)P[F*3]=1,P[F*3+1]=0,P[F*3+2]=0;Va.geometry.setAttribute("color",new La.BufferAttribute(P,3)),Va.material.vertexColors=!0,Va.scale.set(.3,.3,.3),URL.revokeObjectURL(qa),Re(Va)},void 0,Ye)}),Te=await new Promise((Re,Ye)=>{const qa=URL.createObjectURL(xa);be.load(qa,Va=>{const P=new Float32Array(Va.geometry.attributes.position.count*3);for(let F=0;F<Va.geometry.attributes.position.count;F++)P[F*3]=0,P[F*3+1]=1,P[F*3+2]=0;Va.geometry.setAttribute("color",new La.BufferAttribute(P,3)),Va.material.vertexColors=!0,Va.scale.set(.3,.3,.3),URL.revokeObjectURL(qa),Re(Va)},void 0,Ye)});ze.add(He),ze.add(Te),A=ze}catch(ee){throw console.error("PCD文件加载失败:",ee),new Error("无法加载PCD文件")}break;case".urdf":const Ee=URL.createObjectURL(z),ne=new bu.URDFLoader,ke="http://139.196.154.85:20026/chfs/shared/机器人/urdf/SmallBender_R-2000iC-165F/meshes",Z={maxConcurrentLoads:4,enableCache:!0,enableLOD:!0,simplifyGeometry:!0,shareMaterials:!0,enableInstancing:!0},de=new WeakMap,Ke=new WeakMap,Na=new WeakMap,te=async ee=>{if(de.has(ee))return console.log(`从缓存加载: ${ee}`),de.get(ee);try{const ea=await el.axios.get(`${ke}/${ee}`,{responseType:"blob",headers:{"Content-Type":"application/json"},timeout:6e5}),Pe=new Blob([ea.data],{type:"application/octet-stream;charset=UTF-8"});return Z.enableCache&&de.set(ee,Pe),Pe}catch(ea){throw console.error(`加载文件失败: ${ee}`,ea),new Error(`无法加载文件: ${ee}`)}},D=(ee="default")=>{if(Ke.has(ee))return Ke.get(ee);const ea=new La.MeshPhongMaterial({color:12303291,shininess:30,transparent:!1,alphaTest:.1,side:La.FrontSide});return Ke.set(ee,ea),ea},le=ee=>{try{ee.isBufferGeometry&&ee.mergeVertices&&ee.mergeVertices(),ee.computeVertexNormals&&ee.computeVertexNormals(),ee.computeBoundingSphere&&ee.computeBoundingSphere(),ee.deleteAttribute&&ee.deleteAttribute("uv2")}catch(ea){console.warn("几何体优化失败,使用原始几何体:",ea)}return ee},ye=async(ee,ea,Pe)=>{const xa=`stl_${ea}`;if(Na.has(xa)){const Ye=Na.get(xa);return new La.Mesh(Ye,D())}const He=await ee.arrayBuffer();let Re=new An.STLLoader(Pe).parse(He);return Re=le(Re),Na.set(xa,Re),new La.Mesh(Re,D())},ue=async(ee,ea,Pe)=>{const xa=`obj_${ea}`;if(de.has(xa))return de.get(xa).clone();const He=await ee.text(),Te=new An.OBJLoader(Pe),Re=ea.replace(".obj",".mtl");try{const Va=await(await te(Re)).text(),F=new An.MTLLoader(Pe).parse(Va);F.preload(),Te.setMaterials(F)}catch{console.warn(`MTL文件加载失败,使用默认材质: ${Re}`)}const Ye=Te.parse(He);return Ye.traverse(qa=>{qa.isMesh&&(qa.geometry=le(qa.geometry),qa.castShadow=!0,qa.receiveShadow=!0,qa.renderOrder=1)}),de.set(xa,Ye),Ye},Ne=(ee,ea)=>{const Pe=new La.LOD;if(Pe.addLevel(ee,0),ee.geometry){const xa=ee.geometry.clone(),He=new La.Mesh(xa,ee.material);Pe.addLevel(He,50)}return Pe};let pa=0,wa=0;const ja=[];ne.loadMeshCb=async(ee,ea,Pe,xa,He)=>{const Te=ee.split("/").pop(),Re=Pe||(()=>{});pa++;const Ye=new Promise(async(qa,Va)=>{try{const P=await te(Te);if(!P||P.size===0)throw new Error(`文件为空: ${Te}`);const F=Te.split(".").pop().toLowerCase();let J;switch(F){case"stl":J=await ye(P,Te,ea);break;case"obj":J=await ue(P,Te,ea);break;default:throw new Error(`不支持的文件格式: ${F}`)}Z.enableLOD&&J.isMesh&&(J=Ne(J,Te)),Re(J),wa++,xa&&xa({loaded:wa,total:pa,progress:wa/pa}),qa(J)}catch(P){console.error(`mesh文件加载失败: ${Te}`,P);const F=new La.Group;Re(F),qa(F);const J=new La.BoxGeometry(.1,.1,.1),ie=new La.MeshStandardMaterial({color:16711680,wireframe:!0});return new La.Mesh(J,ie)}});ja.push(Ye)};try{if(!Ee){so.value=void 0;break}if(A=await ne.loadAsync(Ee),console.log(`URDF文件加载完成,等待${pa}个mesh文件加载...`),ja.length>0)try{await Promise.allSettled(ja),console.log(`所有mesh文件处理完成,成功加载: ${wa}/${pa}`)}catch(Pe){console.warn("部分mesh文件加载失败,但继续显示模型",Pe)}A.traverse(Pe=>{Pe.isMesh&&(Pe.castShadow=!0,Pe.receiveShadow=!0,Pe.renderOrder=1,Pe.material&&(Pe.material.needsUpdate=!0))}),console.time("计算包围盒");const ee=new La.Box3;ee.expandByObject(A);const ea=`urdf_${Date.now()}`;A.userData.boundingBox=ee.clone(),A.userData.modelId=ea,ns.set(ea,{box:ee.clone(),center:ee.getCenter(new La.Vector3),size:ee.getSize(new La.Vector3),maxSize:Math.max(...ee.getSize(new La.Vector3).toArray())}),so.value=A,console.log("URDF模型加载完成并优化")}catch(ee){console.error("URDF加载失败:",ee),so.value=void 0}finally{Ee&&URL.revokeObjectURL(Ee)}break;default:throw new Error(`不支持的文件格式: ${S}`)}return A};return{addModelsFromUrls:m,loadModelByDefaultPath:async S=>{console.log(S);try{n.value=!0,t.value="正在加载模型...";const{scene:z}=l();if(!z)throw new Error("Scene not initialized");s(),await new Promise(j=>setTimeout(j,100));const w=[];for(let j=0;j<S.length;j++){const A=S[j],N=await u(A.suffix,A.blob,A.mtlBlobs||[],A.meshFiles||[]);N&&(z.add(N),r.value.push(N),w.push(N))}return n.value=!1,t.value="",w}catch(z){throw console.error("加载模型失败:",z),n.value=!1,t.value="",z}},urdfModel:so,modelBoundingBoxes:ns}}window._iconfont_svg_string_4827314='<svg><symbol id="icon-chart-new" viewBox="0 0 1024 1024"><path d="M960 768V448h-64v320h-64v64H192v-64h-64V256h64v-64h256v-64H192V64H0v192h64v512H0v192h192v-64h640v64h192V768h-64zM64 128h64v64H64v-64z m0 768v-64h64v64H64z m896 0h-64v-64h64v64zM256 768V256h128v512H256z m192-320h128v320H448V448z m192 192h128v128H640V640zM512 288c0-17.664 14.336-32 32-32h160V96c0-17.664 14.336-32 32-32s32 14.336 32 32v160h160c17.664 0 32 14.336 32 32s-14.336 32-32 32H768v160c0 17.664-14.336 32-32 32s-32-14.336-32-32V320H544c-17.664 0-32-14.336-32-32z" ></path></symbol><symbol id="icon-ai13" viewBox="0 0 1024 1024"><path d="M863.719038 159.366637l-705.295378 0c-48.443315 0-88.129176 39.690978-88.129176 88.161922l0 528.943904c0 48.474015 39.685861 88.161922 88.129176 88.161922l705.295378 0c48.443315 0 88.134293-39.687908 88.134293-88.161922l0-528.943904C951.853331 199.056592 912.162354 159.366637 863.719038 159.366637M643.272277 776.472464l-484.84964 0 0-176.324868 484.84964 0L643.272277 776.472464zM643.272277 556.053332l-484.84964 0 0-176.296215 484.84964 0L643.272277 556.053332zM863.719038 776.472464 687.394171 776.472464l0-396.659065 176.324868 0L863.719038 776.472464z" ></path></symbol><symbol id="icon-qiehuanwenjianjia" viewBox="0 0 1024 1024"><path d="M409.6 102.4L512 204.8h307.2a102.4 102.4 0 0 1 102.144 94.72l0.256 7.68v512a102.4 102.4 0 0 1-94.72 102.144l-7.68 0.256H512v-76.8h281.6a51.2 51.2 0 0 0 50.842-45.21l0.358-5.99V332.8a51.2 51.2 0 0 0-45.21-50.842l-5.99-0.358H486.4L384 179.2H230.4a51.2 51.2 0 0 0-50.842 45.21l-0.358 5.99v179.2h-76.8V204.8a102.4 102.4 0 0 1 94.72-102.144l7.68-0.256h204.8z m217.6 588.8a38.4 38.4 0 1 1 0 76.8H358.4v99.584a25.6 25.6 0 0 1-41.83 19.814L132.3 736.614a25.6 25.6 0 0 1 16.231-45.414zM447.59 389.99l3.84 2.612L635.7 543.386a25.6 25.6 0 0 1-11.623 45.004l-4.608 0.41H140.8a38.4 38.4 0 0 1-5.222-76.442L140.8 512h268.8v-99.584a25.6 25.6 0 0 1 37.99-22.426z" ></path></symbol><symbol id="icon-baogao" viewBox="0 0 1104 1024"><path d="M265.401 1024a174.066 174.066 0 0 1-173.56-173.56V315.3a4.194 4.194 0 0 0-4.338-4.34H41.22A39.63 39.63 0 0 1 0 273.356V123.66C0 55.684 59.3 0 132.339 0h648.678a132.411 132.411 0 0 1 132.339 132.339v553.22a4.194 4.194 0 0 0 4.339 4.34h146.079a40.714 40.714 0 0 1 41.22 41.22v159.819a132.411 132.411 0 0 1-132.339 132.339l-707.254 0.723z m653.017-260.339A4.194 4.194 0 0 0 914.08 768v123.661a59.3 59.3 0 0 0 118.599 0V768a4.194 4.194 0 0 0-4.339-4.339z m-749.198-452.7a4.194 4.194 0 0 0-4.339 4.338v534.419a100.737 100.737 0 0 0 100.52 100.52h582.147a3.977 3.977 0 0 0 3.616-2.17 4.628 4.628 0 0 0 0-4.34 132.7 132.7 0 0 1-10.848-52.79V133.062a59.3 59.3 0 0 0-118.598 0v140.294a39.195 39.195 0 0 1-41.22 37.604zM132.34 73.762c-32.542 0-59.3 22.418-59.3 49.898v109.92a4.194 4.194 0 0 0 4.34 4.34h566.237a4.194 4.194 0 0 0 4.339-4.34V133.063a132.7 132.7 0 0 1 10.847-52.79c0.723-1.447 0-2.893 0-4.34a3.977 3.977 0 0 0-3.616-2.17z m169.22 692.068a36.881 36.881 0 0 1 0-73.763h402.08a36.881 36.881 0 0 1 0 73.763z m0-196.701a36.881 36.881 0 1 1 0-73.763h402.08a36.881 36.881 0 1 1 0 73.763z" ></path></symbol><symbol id="icon-xinghao" viewBox="0 0 1024 1024"><path d="M580.583 425.004c52.988-24.574 104.44-49.276 152.82-73.594 48.381-24.703 87.034-42.877 115.704-54.268 28.67-11.136 51.58-17.023 69.115-17.023a104.952 104.952 0 0 1 74.235 28.798 93.177 93.177 0 0 1 31.485 71.802c0 16.383-5.12 33.534-15.358 51.069-10.24 17.534-21.247 28.926-32.638 33.79-105.976 41.468-222.832 72.058-350.054 90.872 23.038 20.99 51.452 49.405 85.113 84.474 33.79 35.582 51.453 54.268 52.86 56.7 12.416 17.023 29.566 38.397 51.837 63.74 22.142 25.597 37.501 45.18 46.076 59.643a99.833 99.833 0 0 1 13.055 52.092 93.817 93.817 0 0 1-29.693 68.731 103.16 103.16 0 0 1-76.41 29.694c-31.23 0-66.172-24.318-105.337-72.443-39.037-48.124-89.465-135.158-151.029-260.46A12540.003 12540.003 0 0 1 386.677 862.22a387.3 387.3 0 0 1-61.563 81.53 96.889 96.889 0 0 1-67.835 27.774 101.625 101.625 0 0 1-76.026-31.358c-19.711-20.862-30.078-43.517-30.078-66.939 0-22.142 4.095-38.909 12.287-50.172 75.514-102.393 154.356-191.602 236.782-266.605a2401.103 2401.103 0 0 1-184.818-35.709 1163.818 1163.818 0 0 1-172.531-57.724c-9.984-5.12-19.583-16.382-29.054-33.917A104.696 104.696 0 0 1 0.018 380.72a93.433 93.433 0 0 1 31.358-71.675 102.648 102.648 0 0 1 72.186-28.926c19.839 0 44.285 5.887 73.979 17.79 29.438 11.904 67.067 29.054 112.632 51.453 45.564 22.526 97.656 47.74 155.892 75.514a1833.849 1833.849 0 0 1-26.494-177.267 1574.54 1574.54 0 0 1-10.367-137.078c0-30.205 9.599-56.06 28.798-78.074A95.481 95.481 0 0 1 512.62 0.076c29.822 0 54.012 10.75 73.339 32.51 19.454 21.886 29.054 50.683 29.054 86.649 0 9.855-1.664 29.182-4.48 58.491-2.56 29.182-7.04 64.252-12.16 105.465-5.375 41.34-11.39 88.697-17.79 141.813z" fill="#FF4444" ></path></symbol><symbol id="icon-mima" viewBox="0 0 1024 1024"><path d="M776.86 376.04c-22.05 0-40.16-16.24-43.91-37.98-18.08-104.98-109.79-185.1-219.84-185.1s-201.76 80.13-219.84 185.1c-3.74 21.73-21.85 37.98-43.91 37.98-27.05 0-48.82-24.04-44.44-50.73 24.3-148.16 153.25-261.58 308.19-261.58S796.99 177.15 821.3 325.31c4.38 26.69-17.39 50.73-44.44 50.73zM850.18 418.32H180.33c-37.98 0-68.76 30.79-68.76 68.76v403.71c0 37.98 30.79 68.76 68.76 68.76h665.36c37.97 0 68.75-30.77 68.77-68.74l0.19-408c0.02-35.61-28.85-64.49-64.47-64.49zM557.73 762.56c0 24.64-19.97 44.62-44.62 44.62-24.64 0-44.62-19.97-44.62-44.62v-89.23c0-24.64 19.97-44.62 44.62-44.62 24.64 0 44.62 19.98 44.62 44.62v89.23z" ></path></symbol><symbol id="icon-zhanghao" viewBox="0 0 1024 1024"><path d="M407.61 578.87c-174.46 0-304.73 113.04-304.73 277.2v17.69c0 85.81 139.6 85.81 316.37 85.81h187.73c169.75 0 316.37 0 316.37-85.81v-17.69c0-164.16-130.28-277.2-304.73-277.2H407.61zM503.71 535.67c138.19 0 250.63-105.81 250.63-235.94 0-130.06-112.44-235.86-250.63-235.86-138.11 0-250.56 105.81-250.56 235.86 0 130.13 112.45 235.94 250.56 235.94z" ></path></symbol><symbol id="icon-xiangqingye-37" viewBox="0 0 1024 1024"><path d="M368.64 34.133333H112.64C68.266667 34.133333 34.133333 68.266667 34.133333 112.64v256c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V116.053333h252.586667c23.893333 0 40.96-17.066667 40.96-40.96S389.12 34.133333 368.64 34.133333zM911.36 34.133333h-256c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h252.586667v252.586667c0 23.893333 17.066667 40.96 40.96 40.96s40.96-17.066667 40.96-40.96V112.64C989.866667 68.266667 955.733333 34.133333 911.36 34.133333zM368.64 907.946667H116.053333v-252.586667c0-23.893333-17.066667-40.96-40.96-40.96S34.133333 634.88 34.133333 655.36v256C34.133333 955.733333 68.266667 989.866667 112.64 989.866667h256c23.893333 0 40.96-17.066667 40.96-40.96s-20.48-40.96-40.96-40.96zM948.906667 617.813333c-23.893333 0-40.96 17.066667-40.96 40.96v252.586667h-252.586667c-23.893333 0-40.96 17.066667-40.96 40.96s17.066667 40.96 40.96 40.96h256c40.96 0 78.506667-34.133333 78.506667-78.506667v-256c0-23.893333-17.066667-40.96-40.96-40.96z" fill="#3366CC" ></path><path d="M416.426667 488.106667L307.2 344.746667c-13.653333-17.066667-34.133333-20.48-51.2-6.826667-17.066667 13.653333-20.48 34.133333-6.826667 51.2L337.92 512l-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653333l112.64-146.773334c10.24-17.066667 10.24-34.133333 3.413334-47.786666z" fill="#F4A914" ></path><path d="M597.333333 488.106667L488.106667 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826667 51.2l92.16 122.88-95.573333 126.293333c-13.653333 17.066667-10.24 37.546667 6.826666 51.2 6.826667 3.413333 13.653333 6.826667 20.48 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c10.24-13.653333 10.24-30.72 0-44.373333z" fill="#F4A914" ></path><path d="M778.24 488.106667L669.013333 341.333333c-13.653333-17.066667-34.133333-20.48-51.2-6.826666-17.066667 13.653333-20.48 34.133333-6.826666 51.2l92.16 122.88-95.573334 126.293333c-6.826667 6.826667-6.826667 17.066667-6.826666 27.306667 0 10.24 6.826667 17.066667 13.653333 23.893333 6.826667 3.413333 13.653333 6.826667 23.893333 6.826667 10.24 0 23.893333-6.826667 30.72-13.653334l112.64-146.773333c6.826667-13.653333 6.826667-30.72-3.413333-44.373333z" fill="#F4A914" ></path></symbol><symbol id="icon-gongzhuangmoju" viewBox="0 0 1024 1024"><path d="M192 170.666667A106.965333 106.965333 0 0 0 85.333333 277.333333V426.666667h256l42.666667 85.333333h256l42.666667-85.333333h256V277.333333A106.965333 106.965333 0 0 0 832 170.666667z" fill="#3B709C" ></path><path d="M384 512l-42.666667-85.333333h341.333334l-42.666667 85.333333z m-298.666667-85.333333V256a85.333333 85.333333 0 0 1 85.333334-85.333333h682.666666a85.333333 85.333333 0 0 1 85.333334 85.333333v170.666667zM853.333333 853.333333H170.666667a85.333333 85.333333 0 0 1-85.333334-85.333333v-256h213.333334l42.666666 85.333333h341.333334l42.666666-85.333333h213.333334v256a85.333333 85.333333 0 0 1-85.333334 85.333333z" fill="#2C6798" ></path></symbol><symbol id="icon-jiagongguochengxinxi" viewBox="0 0 1024 1024"><path d="M345.216 664.192a315.84 315.84 0 0 1 93.12-224.64 315.84 315.84 0 0 1 100.992-68.16 315.392 315.392 0 0 1 123.648-24.96 315.392 315.392 0 0 1 158.72 42.368v-264a24.768 24.768 0 0 0-24.768-24.768H559.296a32.64 32.64 0 0 1 0.704 6.976v133.184c0 19.2-15.616 34.816-34.816 34.816H395.072a34.816 34.816 0 0 1-34.752-34.816v-133.12a32.64 32.64 0 0 1 0.64-6.976H123.456a24.768 24.768 0 0 0-24.768 24.832v676.544c0 13.76 11.072 24.832 24.768 24.832h266.24a316.224 316.224 0 0 1-44.416-162.112zM662.976 406.4a257.792 257.792 0 1 0 0 515.52 257.792 257.792 0 0 0 0-515.52z m112.256 293.376a104.704 104.704 0 0 1-107.328 25.216l-68.48 68.48a46.528 46.528 0 0 1-65.728-65.664l68.48-68.48a104.512 104.512 0 0 1 140.8-129.28l-67.072 67.072 10.88 42.88 43.328 11.328 67.072-67.136c16.64 38.336 9.216 84.416-21.952 115.584z m-220.16 51.456a20.928 20.928 0 1 0 41.856 0 20.928 20.928 0 0 0-41.856 0z" ></path></symbol><symbol id="icon-pingtaiguanli" viewBox="0 0 1024 1024"><path d="M1024 806.4V25.6c0-12.8-12.8-25.6-25.6-25.6H25.6C12.8 0 0 12.8 0 25.6v780.8h435.2v166.4H236.8v51.2h556.8v-51.2H588.8v-166.4H1024zM320 281.6c-12.8-12.8-19.2-25.6-32-32l44.8-76.8c44.8 25.6 96 12.8 121.6-32 12.8-12.8 12.8-32 12.8-44.8h89.6c0 51.2 38.4 83.2 89.6 83.2 12.8 0 32-6.4 44.8-12.8l44.8 76.8c-44.8 25.6-57.6 76.8-32 115.2 12.8 12.8 19.2 25.6 32 32l-44.8 76.8c-44.8-19.2-96-6.4-121.6 38.4-12.8 12.8-12.8 25.6-12.8 44.8H467.2c0-44.8-38.4-83.2-89.6-83.2-12.8 0-32 6.4-44.8 12.8l-44.8-83.2c38.4-25.6 51.2-76.8 32-115.2zM102.4 704v-51.2h825.6v51.2H102.4zM512 416c51.2 0 96-38.4 96-89.6S569.6 236.8 512 236.8c-51.2 0-96 38.4-96 89.6 0 51.2 44.8 89.6 96 89.6z" ></path></symbol><symbol id="icon-zhucaidanguanli" viewBox="0 0 1169 1024"><path d="M787.333831 588.946093a75.189984 75.189984 0 0 0-75.093984 75.092984 75.189984 75.189984 0 0 0 75.093984 75.093984 75.165984 75.165984 0 0 0 75.067984-75.093984 75.165984 75.165984 0 0 0-75.067984-75.092984m0 222.841953a147.919968 147.919968 0 0 1-147.748968-147.748969c0-81.455982 66.291986-147.747968 147.748968-147.747968 81.431983 0 147.747968 66.291986 147.747968 147.747968 0 81.480982-66.315986 147.748968-147.747968 147.748969m89.452981 102.106978c0.342 0.244 1.317 0.585 2.315999 0.585h0.122l71.484985-39.496992c-1.706-4.022999-9.605998-23.478995-9.605998-43.739991a113.858976 113.858976 0 0 1 107.739977-113.613975c0.853-4.729999 5.557999-31.524993 5.557998-51.639989s-4.704999-46.88399-5.558998-51.637989a113.858976 113.858976 0 0 1-107.738977-113.565976c0-20.357996 7.923998-39.813991 9.605998-43.81299l-70.313985-39.057992-0.293-0.025a5.339999 5.339999 0 0 0-2.706 0.732 196.753958 196.753958 0 0 1-26.014994 21.819995c-21.698995 15.238997-42.153991 22.967995-60.951987 22.967995-18.919996 0-39.594991-7.874998-61.390987-23.405995a194.705958 194.705958 0 0 1-26.160994-22.283995 5.777999 5.777999 0 0 0-2.729999-0.707h-0.245l-72.824985 40.032992c1.706 4.046999 9.580998 23.479995 9.580998 43.73999A113.858976 113.858976 0 0 1 528.895886 614.350088c-0.854 4.729999-5.509999 31.524993-5.509998 51.638989s4.655999 46.90899 5.533998 51.662989a113.858976 113.858976 0 0 1 107.763977 113.589975c0 20.334996-7.972998 39.863991-9.679998 43.788991l68.973985 38.545992h0.146c1.024 0 1.95-0.365 2.317-0.585a200.849957 200.849957 0 0 1 26.428994-23.161995c22.088995-16.188997 43.079991-24.429995 62.414987-24.429995 19.552996 0 40.715991 8.387998 62.950986 24.917995 14.920997 11.068998 25.258995 22.185995 26.550995 23.575995m22.673995 108.397976c-13.774997-0.025-27.135994-5.704999-35.765993-15.213996-11.775997-12.896997-49.005989-46.44599-79.530982-46.44599-30.280993 0-68.119985 33.767993-78.993984 45.54399-8.606998 9.386998-21.869995 14.969997-35.498992 14.969997-6.484999 0-12.604997-1.243-18.187996-3.706l-0.975-0.414-92.69698-51.833988-0.926-0.683a44.46999 44.46999 0 0 1-14.920996-53.735989c0.049-0.146 8.532998-19.699996 8.532998-37.594992a98.376979 98.376979 0 0 0-98.254979-98.254978h-3.900999c-15.505997 0-28.159994-13.799997-32.182993-35.108993-0.341-1.706-7.923998-42.178991-7.923999-74.044984 0-31.913993 7.557998-72.361984 7.899999-74.117984 4.119999-21.576995 16.992996-35.449992 32.816993-35.083993h3.266999a98.400979 98.400979 0 0 0 98.279979-98.303978c0-17.846996-8.484998-37.399992-8.558998-37.619992a44.34899 44.34899 0 0 1 15.067996-53.661989l0.95-0.658 97.840979-53.759988 1.024-0.415c5.485999-2.364999 11.507998-3.534999 17.895996-3.534999 13.604997 0 26.891994 5.436999 35.595992 14.628997 11.580998 12.116997 48.17699 43.641991 77.774984 43.64199 29.354994 0 65.755986-30.914993 77.287983-42.812991 8.654998-8.996998 21.844995-14.335997 35.302992-14.335997 6.509999 0 12.653997 1.219 18.285997 3.657l0.974999 0.414 94.47698 52.516988 0.95 0.658c16.895996 11.751997 23.332995 34.889993 14.945997 53.735989-0.049 0.146-8.532998 19.699996-8.532999 37.545992a98.400979 98.400979 0 0 0 98.254979 98.279978h3.291c15.774997-0.341 28.719994 13.506997 32.816993 35.107993 0.317 1.707 7.899998 42.203991 7.899998 74.069984 0 31.889993-7.582998 72.410984-7.948998 74.117984-4.046999 21.551995-16.992996 35.424992-32.767993 35.059993h-3.291a98.400979 98.400979 0 0 0-98.254979 98.278978c0 17.846996 8.483998 37.449992 8.556999 37.619992a44.42199 44.42199 0 0 1-15.017997 53.710989l-0.927 0.683-96.133979 53.100988-0.975 0.415a44.88499 44.88499 0 0 1-17.846996 3.583999z m222.061952-705.339848a48.76199 48.76199 0 1 1-97.523979 0V121.977194c0-13.457997-10.873998-24.453995-24.307995-24.453995h-877.859811c-13.262997 0-24.306995 10.970998-24.306995 24.453995v584.995874c0 13.457997 10.873998 24.453995 24.307995 24.453995h219.500953a48.76199 48.76199 0 1 1 0 97.523979H48.907989A48.76199 48.76199 0 0 1 0 780.190052V48.76221C0 21.822215 21.893995 0.00022 48.907989 0.00022h1023.706781a48.76199 48.76199 0 0 1 48.907989 48.76199v268.189942zM219.427953 975.23701c0-26.940994 21.991995-48.76199 48.981989-48.761989h194.607959a48.76199 48.76199 0 1 1 0 97.523979H268.433942a48.76199 48.76199 0 0 1-49.005989-48.76199z" ></path></symbol><symbol id="icon-caidanguanli" viewBox="0 0 1024 1024"><path d="M414.2 78H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V153.3c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V153.3c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM414.2 544.8H158.6c-41.5 0-75.3 33.8-75.3 75.3v255.5c0 41.5 33.8 75.3 75.3 75.3h255.5c41.5 0 75.3-33.8 75.3-75.3V620.1c0-41.5-33.7-75.3-75.2-75.3z m5.2 330.8c0 2.9-2.4 5.3-5.3 5.3H158.6c-2.9 0-5.3-2.4-5.3-5.3V620.1c0-2.9 2.4-5.3 5.3-5.3h255.5c2.9 0 5.3 2.4 5.3 5.3v255.5zM908.8 119.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 343.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 568.3H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35zM908.8 792.8H607.2c-19.3 0-35 15.7-35 35s15.7 35 35 35h301.6c19.3 0 35-15.7 35-35s-15.7-35-35-35z" ></path></symbol><symbol id="icon-jueseguanli" viewBox="0 0 1024 1024"><path d="M874.9 577.3c-26.1-27.2-56.8-48.9-90.3-64.1 5.4-4.6 10.6-9.6 15.5-14.8 32.3-34.7 50.1-79.8 50.1-127.2 0-102.9-83.7-186.7-186.7-186.7-11 0-21.8 0.9-32.5 2.8-7.1-9.6-14.9-18.7-23.4-27.2-44.6-44.6-103.9-69.2-167-69.2s-122.4 24.6-167 69.2-69.2 103.9-69.2 167 24.6 122.4 69.2 167c10.8 10.8 22.4 20.4 34.8 28.7-4.9 1.8-9.7 3.8-14.5 5.8-44.9 19-85.2 46.2-119.9 80.8-34.6 34.6-61.8 75-80.8 119.9-19.7 46.5-29.6 95.9-29.6 146.8 0 17.7 1.2 35.5 3.7 52.9l69.3-9.7c-2-14.2-3-28.7-3-43.1 0-169.4 137.8-307.1 307.1-307.1s307.1 137.8 307.1 307.1c0 14.4-1 28.9-3 43.1l69.3 9.7c2.4-17.4 3.7-35.2 3.7-52.9 0-50.9-10-100.3-29.6-146.8-19-44.9-46.2-85.2-80.8-119.9-34.6-34.6-74.9-61.8-119.9-80.8-4.8-2-9.7-4-14.6-5.8 12.3-8.4 24-18 34.8-28.7 44.6-44.6 69.2-103.9 69.2-167 0-25-3.9-49.4-11.3-72.6 63.4 1.1 114.7 53 114.7 116.6 0 45.5-26.6 85.6-65.3 104.7-16.3 8.1-26.8 24.4-26.8 42.6v1c0 21.2 14.1 40 34.6 45.5 94.9 25.8 163.8 112.4 163.8 215 0 10.5-0.7 21-2.2 31.3l69.3 9.7c1.9-13.5 2.9-27.3 2.9-41-0.1-75.8-29.1-147.8-81.7-202.6z m-434.3-84c-91.6 0-166.2-74.6-166.2-166.2S349 160.9 440.6 160.9s166.2 74.6 166.2 166.2-74.5 166.2-166.2 166.2z" ></path></symbol><symbol id="icon-zhiweiguanli" viewBox="0 0 1024 1024"><path d="M878.4 243.5h-91.2v-41.2c0-58.6-47.7-106.2-106.2-106.2H354.2c-58.6 0-106.2 47.7-106.2 106.2v41.2h-91.2c-43.2 0-78.4 35.1-78.4 78.4V856c0 43.2 35.1 78.4 78.4 78.4h721.5c43.2 0 78.4-35.1 78.4-78.4V321.8c0-43.2-35.1-78.3-78.3-78.3zM318 202.3c0-20 16.2-36.2 36.2-36.2H681c20 0 36.2 16.3 36.2 36.2v41.2H318v-41.2zM156.8 313.5h721.5c4.6 0 8.4 3.7 8.4 8.4V554H692.4c-14.8-45.3-57.4-78.2-107.6-78.2H450.4c-50.2 0-92.9 32.9-107.6 78.2H148.5V321.8c0-4.6 3.7-8.3 8.3-8.3zM628 588.9c0 23.8-19.4 43.2-43.2 43.2H450.4c-23.8 0-43.2-19.4-43.2-43.2 0-23.8 19.4-43.2 43.2-43.2h134.3c23.9 0 43.3 19.4 43.3 43.2z m250.4 275.5H156.8c-4.6 0-8.4-3.7-8.4-8.4V623.9h194.3c14.8 45.3 57.4 78.2 107.6 78.2h134.3c50.2 0 92.9-32.9 107.6-78.2h194.3V856c0.2 4.6-3.5 8.4-8.1 8.4z" ></path></symbol><symbol id="icon-bumenguanli" viewBox="0 0 1024 1024"><path d="M322.5 62h384.6v70H322.5z" ></path><path d="M870.2 62h-59.3v70h59.3c7.2 0 13 5.8 13 13v733.9c0 7.2-5.8 13-13 13h-720c-7.2 0-13-5.8-13-13V145c0-7.2 5.8-13 13-13h68.6V62h-68.6c-45.8 0-83 37.2-83 83v733.9c0 45.8 37.2 83 83 83h720c45.8 0 83-37.2 83-83V145c0-45.8-37.3-83-83-83z" ></path><path d="M295 806.2c-0.5-5.7-0.7-11.6-0.7-17.3 0-119 96.8-215.8 215.8-215.8S726 669.8 726 788.8c0 5.8-0.2 11.6-0.7 17.3l69.8 5.6c0.6-7.6 0.9-15.3 0.9-22.9 0-76.4-29.7-148.1-83.7-202.1-29.7-29.8-64.9-52.1-103.3-66.2 45.6-31.5 75.5-84.1 75.5-143.5 0-96.1-78.2-174.4-174.4-174.4-96.1 0-174.4 78.2-174.4 174.4 0 59.5 29.9 112 75.5 143.5C373 534.6 337.8 557 308 586.7c-54 54-83.7 125.8-83.7 202.1 0 7.6 0.3 15.3 0.9 22.9l69.8-5.5z m215.2-533.6c57.5 0 104.4 46.8 104.4 104.4 0 57.5-46.8 104.4-104.4 104.4-57.5 0-104.4-46.8-104.4-104.4 0-57.6 46.8-104.4 104.4-104.4z" ></path></symbol><symbol id="icon-gerenzhongxin" viewBox="0 0 1024 1024"><path d="M930.4 337.3c-22.7-53.7-55.2-101.9-96.6-143.3-41.4-41.4-89.6-73.9-143.3-96.6C634.9 73.9 575.9 62 515.1 62c-60.8 0-119.9 11.9-175.5 35.4-53.7 22.7-101.9 55.2-143.3 96.6-41.4 41.4-73.9 89.6-96.6 143.3-23.5 55.6-35.4 114.6-35.4 175.5 0 50.5 8.3 100.1 24.7 147.4l66.1-22.9c-13.8-39.9-20.8-81.8-20.8-124.5 0-209.9 170.8-380.7 380.7-380.7 209.9 0 380.8 170.8 380.8 380.7 0 41.6-6.7 82.5-19.8 121.5l66.3 22.3c15.6-46.2 23.5-94.7 23.5-143.9 0-60.8-11.9-119.8-35.4-175.4z" ></path><path d="M656.9 422.2c0-76.9-62.6-139.5-139.5-139.5s-139.5 62.6-139.5 139.5 62.6 139.5 139.5 139.5 139.5-62.6 139.5-139.5z m-209 0c0-38.3 31.2-69.5 69.5-69.5s69.5 31.2 69.5 69.5-31.2 69.5-69.5 69.5-69.5-31.2-69.5-69.5zM713.8 627.8c-62-27.2-128.1-40.9-196.4-40.9-69 0-135.7 14-198.2 41.7-60.4 26.7-114.1 64.9-159.5 113.3l-20.3 21.7 18.1 23.6c41.2 53.6 94.8 98 155 128.3 63.2 31.8 131.3 48 202.6 48 71.9 0 140.6-16.4 204.2-48.8 60.7-30.9 114.5-76 155.6-130.4l17.9-23.7-20.5-21.6c-45.3-47.6-98.6-85-158.5-111.2zM515.1 893.5c-109 0-210.3-45.3-282.5-125.4 77.7-71.9 177.7-111.2 284.8-111.2 105.8 0 204.9 38.4 282.2 108.8-72.2 81.6-174.3 127.8-284.5 127.8z" ></path></symbol><symbol id="icon-yonghuguanli" viewBox="0 0 1024 1024"><path d="M751.4 553.2c-42.5-38.5-92.1-67.1-145.5-84.6 53.2-38.9 87.8-101.8 87.8-172.7C693.7 178 597.7 82 479.8 82c-57.1 0-110.8 22.2-151.2 62.6C288.2 185 266 238.7 266 295.8s22.2 110.8 62.6 151.2c7.8 7.8 16.2 15 25 21.4-10.5 3.5-20.9 7.3-31.2 11.7-48.2 20.4-91.4 49.5-128.5 86.7s-66.3 80.4-86.7 128.5c-21.1 49.9-31.8 102.9-31.8 157.4 0 24.8 2.3 49.7 6.8 73.9l68.8-12.7c-3.7-20-5.6-40.6-5.6-61.2 0-184.4 150-334.4 334.4-334.4 83.2 0 163 30.8 224.5 86.6l47.1-51.7zM479.8 152c79.3 0 143.9 64.5 143.9 143.9s-64.5 143.9-143.9 143.9S336 375.2 336 295.9 400.5 152 479.8 152zM726.3 665.3h213.8v70H726.3zM503 831.6h437.1v70H503z" ></path></symbol><symbol id="icon-app" viewBox="0 0 1024 1024"><path d="M363.485867 865.117867h305.5616c21.6576 0 39.2192-17.194667 39.2192-38.4s-17.5616-38.4-39.2192-38.4H363.485867c-21.6576 0-39.2192 17.194667-39.2192 38.4s17.5616 38.4 39.2192 38.4z" fill="#A6ADB4" ></path><path d="M945.288533 699.835733a40.448 40.448 0 0 0-43.195733 43.1872v147.037867a46.865067 46.865067 0 0 1-45.960533 48.708267H166.766933a46.882133 46.882133 0 0 1-45.038933-48.708267v-147.029333a40.439467 40.439467 0 1 0-80.887467 0v147.029333a125.883733 125.883733 0 0 0 125.9264 128.657067h693.0432c70.203733-1.006933 126.4384-58.461867 125.9264-128.657067v-147.029333a40.430933 40.430933 0 0 0-40.448-43.195734zM40.840533 127.735467v147.959466a39.517867 39.517867 0 0 0 79.044267 0V127.735467a45.943467 45.943467 0 0 1 46.882133-47.786667h693.0432a46.882133 46.882133 0 0 1 45.960534 47.786667v147.959466a39.509333 39.509333 0 0 0 39.517866 39.509334 40.448 40.448 0 0 0 40.448-39.509334V127.735467C986.248533 58.052267 930.423467 1.024 860.7232 0H166.775467A125.934933 125.934933 0 0 0 40.840533 127.744z m168.4992 427.972266H326.229333L357.316267 640H418.133333L295.150933 315.733333h-52.701866L119.466667 640h60.817066l29.056-84.292267zM269.124267 392.533333L307.2 503.466667h-76.8l38.724267-110.933334z m231.552 131.959467h32.631466a123.246933 123.246933 0 0 0 88.192-28.535467c23.389867-19.959467 36.394667-49.134933 35.413334-79.488 1.6384-28.245333-9.838933-55.722667-31.249067-74.743466a127.573333 127.573333 0 0 0-84.0192-25.813334H443.733333V640h56.942934V524.4928zM503.466667 366.933333h32.136533c42.180267 0 61.602133 17.493333 61.602133 53.162667 1.092267 16.0256-4.8128 31.701333-16.068266 42.666667a71.364267 71.364267 0 0 1-51.5584 14.677333H503.466667V366.933333z m286.293333-51.0976H691.2V640h57.3184V524.4672h32.853333c31.837867 1.928533 63.189333-8.311467 87.381334-28.544 23.543467-19.959467 36.625067-49.152 35.643733-79.505067 1.536-28.100267-9.710933-55.441067-30.754133-74.752a131.84 131.84 0 0 0-83.882667-25.8304z m39.4752 147.131734a73.813333 73.813333 0 0 1-49.527467 14.72H750.933333V366.933333h32.119467c42.1632 0 61.576533 17.527467 61.576533 53.2736 1.262933 15.957333-4.394667 31.650133-15.394133 42.752z" fill="#A6ADB4" ></path></symbol><symbol id="icon-yepian" viewBox="0 0 1024 1024"><path d="M807.936 99.328c-17.408 0-32.256 9.216-40.448 23.552h-348.16L284.672 355.84l35.84 35.84 126.976-219.648h321.536c8.192 12.8 22.528 20.992 38.912 20.992 25.6 0 46.592-20.992 46.592-46.592s-20.992-47.104-46.592-47.104z" ></path><path d="M301.056 50.688c-8.704 14.848-7.68 32.768 0 46.592L127.488 399.36l134.656 232.448 48.64-13.312L183.808 399.36l160.256-279.04c15.36-1.024 29.696-9.216 37.888-23.04 12.8-22.528 5.12-50.688-17.408-63.488s-50.688-5.632-63.488 16.896z" ></path><path d="M15.872 467.456c8.704 14.848 24.064 23.552 40.448 23.552L228.352 793.6l268.8 1.536 13.312-48.64-253.44-1.536-159.232-279.552c6.656-13.312 7.168-30.208-1.024-44.032-12.8-22.528-40.96-30.208-63.488-17.408-22.528 12.8-30.208 40.96-17.408 63.488z" ></path><path d="M216.064 924.672c17.408 0 32.256-9.216 40.448-23.552h348.16l134.144-232.448-35.84-35.84-126.976 219.648H254.976c-8.192-12.8-22.528-20.992-38.912-20.992-25.6 0-46.592 20.992-46.592 46.592s20.992 46.592 46.592 46.592z" ></path><path d="M722.944 973.312c8.704-14.848 7.68-32.768 0-46.592l173.568-302.08-134.656-232.448-48.64 13.312 127.488 219.136-160.256 279.04c-15.36 1.024-29.696 9.216-37.888 23.04-12.8 22.528-5.12 50.688 17.408 63.488 22.016 13.312 50.176 5.632 62.976-16.896z" ></path><path d="M1008.128 556.544c-8.704-14.848-24.064-23.552-40.448-23.552L795.648 230.4l-268.8-1.536-13.312 48.64 253.44 1.536 159.232 279.552c-6.656 13.312-7.168 30.208 1.024 44.032 12.8 22.528 40.96 30.208 63.488 17.408 22.528-12.8 30.208-40.96 17.408-63.488zM512 391.168C445.44 391.168 391.168 445.44 391.168 512S445.44 632.832 512 632.832s120.832-54.272 120.832-120.832S578.56 391.168 512 391.168z m0 196.096c-41.472 0-75.264-33.792-75.264-75.264s33.792-75.264 75.264-75.264 75.264 33.792 75.264 75.264-33.792 75.264-75.264 75.264z" ></path></symbol><symbol id="icon-left-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m104 316.9c0 10.2-4.9 19.9-13.2 25.9L457.4 512l145.4 105.2c8.3 6 13.2 15.6 13.2 25.9V690c0 6.5-7.4 10.3-12.7 6.5l-246-178c-4.4-3.2-4.4-9.7 0-12.9l246-178c5.3-3.8 12.7-0.1 12.7 6.5v46.8z" ></path></symbol><symbol id="icon-right-circle-fill" viewBox="0 0 1024 1024"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m154.7 454.5l-246 178c-5.3 3.8-12.7 0-12.7-6.5v-46.9c0-10.2 4.9-19.9 13.2-25.9L566.6 512 421.2 406.8c-8.3-6-13.2-15.6-13.2-25.9V334c0-6.5 7.4-10.3 12.7-6.5l246 178c4.4 3.2 4.4 9.8 0 13z" ></path></symbol><symbol id="icon-xitongguanli" viewBox="0 0 1026 1024"><path d="M400.896 67.072H140.8c-24.064 0-46.592 11.264-59.392 29.696-9.216 12.8-14.848 27.648-14.848 44.544v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24V141.312c0.512-40.96-33.28-74.24-73.728-74.24z m0 361.984v9.216-9.216z m335.872 83.456c18.432 0 35.328-7.168 48.128-20.48L939.008 337.92c12.8-12.8 20.48-29.696 20.48-48.128s-7.168-35.328-20.48-48.128l-154.112-155.648c-26.112-26.112-70.656-26.112-96.256 0l-154.112 154.112c-12.8 12.8-20.48 29.696-20.48 48.128 0 18.432 7.168 35.328 20.48 48.128l154.112 154.112c12.8 14.336 29.184 22.016 48.128 22.016z m0-369.152l146.432 146.432-146.432 146.432-144.896-146.432L736.768 143.36z m-335.872 406.016H140.8c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0.512-40.448-33.28-74.24-73.728-74.24z m0 352.768v18.432-18.432z m484.352-352.768h-259.584c-40.96 0-74.24 33.28-74.24 74.24v259.584c0 40.96 33.28 74.24 74.24 74.24h259.584c40.96 0 74.24-33.28 74.24-74.24v-259.584c0-40.448-33.792-74.24-74.24-74.24z" ></path></symbol><symbol id="icon-gongjianku" viewBox="0 0 1024 1024"><path d="M798.72 320v446.976H223.232V320H63.488v532.48c0 41.472 33.792 75.264 75.264 75.264h745.472c41.472 0 75.264-33.792 75.264-75.264v-532.48H798.72z" ></path><path d="M608.256 494.592z m-10.24-4.608z" ></path><path d="M819.2 96.256H203.776c-41.472 0-75.264 33.792-75.264 75.264V286.72h128v448h510.464V286.72h128V171.008c-0.512-41.472-34.304-74.752-75.776-74.752z m-154.112 493.056l-12.8 12.8c-12.8 12.8-33.28 12.8-46.08 0L477.184 473.088c-33.792 11.776-72.704 4.608-99.328-22.528-27.136-27.136-34.304-66.048-22.528-99.84l38.4 38.4c12.8 12.8 33.28 12.8 46.08 0l12.8-12.8c12.8-12.8 12.8-33.28 0-46.08L414.208 291.84c33.792-11.776 72.704-4.096 99.84 22.528 27.136 27.136 34.304 66.048 22.528 99.84l128.512 128.512c12.288 13.312 12.288 33.792 0 46.592z" ></path></symbol><symbol id="icon-fangfaku" viewBox="0 0 1024 1024"><path d="M256 170.496v170.496h512V170.496h85.504c23.552 0 42.496 18.944 42.496 42.496V896c0 23.552-18.944 42.496-42.496 42.496H170.496c-23.552 0-42.496-18.944-42.496-42.496V212.992c0-23.552 18.944-42.496 42.496-42.496H256z m256 513.024H256v83.456h256v-83.456zM768 491.52H256v83.456h512V491.52zM341.504 85.504h341.504V256H341.504V85.504z" ></path></symbol><symbol id="icon-shebeiku" viewBox="0 0 1024 1024"><path d="M960 491.52v380.416c0 26.112-23.04 47.616-52.224 47.616H116.224c-29.184 0-52.224-21.504-52.224-47.616V491.52c0-26.112 23.04-47.616 52.224-47.616h791.552c28.672 0 52.224 21.504 52.224 47.616z m-149.504 156.16H213.504V783.36h596.992v-135.68z m149.504-500.736v186.88c0 23.04-20.992 42.496-46.592 42.496H110.592c-25.6 0-46.592-18.944-46.592-42.496V146.944c0-23.04 20.992-42.496 46.592-42.496h802.304c26.112 0 47.104 18.944 47.104 42.496z m-671.744 25.6c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096S363.008 278.528 363.008 240.64s-33.792-68.096-74.752-68.096z m224.256 0c-41.472 0-74.752 30.208-74.752 68.096s33.792 68.096 74.752 68.096 74.752-30.208 74.752-68.096-33.792-68.096-74.752-68.096z" ></path></symbol><symbol id="icon-wenjian" viewBox="0 0 1024 1024"><path d="M273.54647 325.996013h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-10.234057-0.511703-19.956411-4.605326-26.608548-11.257463-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.956411 17.397897-35.307497 37.866011-34.284091v1.023406z m0 209.286467h476.395357c19.444708-2.046811 36.842605 11.769166 39.40112 30.702171 2.046811 19.444708-11.769166 36.330903-31.213874 38.377714-2.558514 0.511703-5.117029 0.511703-7.675543 0H273.54647c-9.722354 0-19.444708-3.58192-26.608548-10.234057-6.652137-6.652137-10.74576-15.351086-10.74576-24.561737 0.511703-19.444708 17.397897-35.307497 37.354308-34.284091z m0 185.748136h324.931312c19.444708 0 35.307497 15.862788 35.307497 34.795794 0 19.444708-15.862788 34.795794-35.307497 34.795794H273.54647c-9.722354-0.511703-19.444708-4.093623-26.608548-10.74576-6.652137-6.140434-10.74576-14.839383-10.74576-24.050034 0.511703-19.444708 17.397897-35.307497 37.354308-34.795794zM135.898402 0.041294h96.71184c17.397897-0.511703 33.772388 8.187246 43.494742 22.514926l53.217097 82.38416c4.605326 7.16384 12.792571 11.769166 20.979817 11.257462h322.884501c8.698949 0 16.886194-4.093623 21.49152-11.257462l53.217097-82.38416c9.722354-14.32768 26.096846-23.026628 43.494742-22.514926h97.223543c53.7288-1.535109 98.246948 39.912823 100.293759 93.12992v837.657572c-2.046811 52.705394-46.56496 94.153325-100.293759 93.12992h-752.203196c-53.7288 1.535109-98.758651-39.912823-100.293759-92.618217V93.171214C37.139751 39.954117 82.169603-1.493814 135.898402 0.041294z m82.895863 70.103291H135.898402c-6.652137 0-13.304274 2.558514-18.421303 6.652138-4.605326 4.093623-7.16384 10.234057-7.16384 16.374491v837.657572c0.511703 13.304274 11.769166 23.538331 25.07344 23.026629h752.203196c6.652137 0 13.304274-2.558514 18.421303-6.652138 4.605326-4.093623 7.16384-10.234057 7.16384-16.374491V93.171214c0.511703-6.140434-2.046811-12.280868-7.16384-16.374491-5.117029-4.605326-11.257463-6.652137-18.421303-6.652138h-82.895862l-46.053257 70.614994c-18.933006 28.65536-51.681988 45.541554-86.477783 45.029851H350.813601c-34.795794 0.511703-67.544777-16.374491-86.477782-45.029851l-45.541554-70.614994zM399.425372 0.041294h225.149256c19.956411-0.511703 36.842605 15.351086 37.866011 34.795795-0.511703 19.956411-17.397897 35.307497-37.866011 34.795794H399.425372c-10.234057-0.511703-19.956411-4.093623-27.120251-10.74576-6.652137-6.140434-10.74576-15.351086-10.234057-24.050034C362.582767 15.39238 378.957258-0.470408 399.425372 0.041294z" ></path></symbol><symbol id="icon-bianjimoban" viewBox="0 0 1025 1024"><path d="M127.110228 701.648461q0 26.438928 18.812314 45.251241t46.268123 18.812314l253.203575 0 0 128.12711-318.284012 0q-26.438928 0-49.82721-9.660377t-40.675273-26.947368-26.947368-40.675273-9.660377-50.844091l0-637.584906q0-26.438928 9.660377-49.82721t26.947368-40.675273 40.675273-27.455809 49.82721-10.168818l766.728898 0q26.438928 0 49.82721 10.168818t40.675273 27.455809 27.455809 40.675273 10.168818 49.82721l0 187.106256-128.12711 1.016882q-2.033764-25.422046-19.829196-43.217478t-44.234359-17.795432l-637.584906 0q-27.455809 0-46.268123 18.812314t-18.812314 45.251241l0 382.347567zM1016.881827 501.322741q6.101291 9.151936 7.626614 23.388282t-10.677259 28.472691q-11.1857 14.236346-18.303873 21.354518l-8.135055 8.135055-105.75571-95.586892q5.084409-6.101291 14.236346-14.744786t14.236346-13.727905q14.236346-14.236346 30.506455-12.711023t27.455809 6.609732q12.202582 5.084409 26.438928 18.812314t22.3714 29.998014zM613.179742 789.100298q3.050645-3.050645 14.236346-16.270109t27.96425-32.540218 37.116187-42.200596 40.675273-46.268123q48.810328-54.911619 108.806356-122.025819l107.789474 95.586892q-59.996028 68.131082-108.806356 123.042701-20.337637 23.388282-40.675273 46.268123t-37.116187 41.183714-27.455809 29.998014-12.711023 13.727905q-9.151936 12.202582-25.422046 20.337637-7.118173 5.084409-21.354518 11.1857t-29.998014 12.202582-29.489573 10.677259-20.846077 5.59285q-26.438928 5.084409-23.388282-22.3714 1.016882-7.118173 4.067527-21.862959t6.609732-30.506455 7.118173-28.981132 5.59285-18.303873q5.084409-13.219464 17.286991-28.472691z" ></path></symbol><symbol id="icon-shanchu1" viewBox="0 0 1024 1024"><path d="M78.768011 168.230165c0-30.999918 24.230644-56.076722 54.15419-56.076722L403.692131 112.153443 403.692131 56.076722c0-30.999918 24.230644-56.076722 54.15419-56.076722l108.306335 0c29.923546 0 54.155214 25.076803 54.155214 56.076722l0 56.077745 270.768906 0c29.923546 0 54.15419 25.076803 54.15419 56.076722l0 56.076722L78.768011 224.307909 78.768011 168.230165zM891.076776 336.461352l0 112.153443 0 519.30746c0 30.923181-24.231667 56.077745-54.153167 56.077745L187.076392 1024c-29.923546 0-54.15419-25.154564-54.15419-56.077745L132.922201 448.614796 132.922201 336.461352l0-56.077745 758.154574 0L891.076776 336.461352zM349.53794 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L349.53794 448.614796zM566.153679 448.614796c0-30.923181-24.230644-56.076722-54.15419-56.076722-29.922523 0-54.153167 25.153541-54.153167 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.153167 56.077745 29.923546 0 54.15419-25.154564 54.15419-56.077745L566.153679 448.614796zM782.770441 448.614796c0-30.923181-24.231667-56.076722-54.155214-56.076722s-54.15419 25.153541-54.15419 56.076722l0 407.154017c0 30.923181 24.230644 56.077745 54.15419 56.077745s54.155214-25.154564 54.155214-56.077745L782.770441 448.614796z" ></path></symbol><symbol id="icon-edit" viewBox="0 0 1024 1024"><path d="M923.9 335.8c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.8-35.2-174.3-35.2S392.2 74.1 337 97.5c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3C75.3 391 63.5 449.7 63.5 510.1c0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c35.9-15.2 69.3-34.8 99.8-58.5l-0.1-0.1c9.1-7.4 14.8-18.6 14.8-31.2 0-22.3-18-40.3-40.3-40.3-9.2 0-17.7 3.1-24.5 8.3l-0.2-0.3c-62 47.9-139.7 76.4-223.9 76.4-202.3 0-366.9-164.6-366.9-366.9s164.7-366.9 367-366.9 366.9 164.6 366.9 366.9c0 66.2-17.6 128.3-48.4 182l0.4 0.2c-4.4 6.5-7 14.2-7 22.6 0 22.3 18 40.3 40.3 40.3 16 0 29.8-9.3 36.3-22.8l0.2 0.1c8.9-15.5 16.8-31.5 23.8-48.1 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.7-119.1-35.1-174.3z" ></path><path d="M693.7 626.5H507.6l-57.1 66.1h243.2zM663.2 411.4c7.5-7.6 7.5-23.5 0-31.3l-45.4-46.8c-7.7-7.6-22.9-7.6-30.4 0l-45.7 46.8 76.1 78.1 45.4-46.8zM328.8 614.5v78.1h76.1l197.5-218.7-76-77.9z" ></path></symbol><symbol id="icon-new" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M695.7 469.2h-139v-139c0-23.6-19.3-43-43-43-23.6 0-43 19.3-43 43v139h-139c-23.6 0-43 19.3-43 43s19.3 43 43 43h139v139c0 23.7 19.3 43 43 43 23.6 0 43-19.3 43-43v-139h139c23.6 0 43-19.3 43-43s-19.4-43-43-43z" ></path></symbol><symbol id="icon-biaoqianye1" viewBox="0 0 1024 1024"><path d="M345.557333 128l110.677334 168.405333H938.666667V896H85.333333V128h260.224zM299.52 213.333333H170.666667v597.333334h682.666666V381.738667H410.197333L299.52 213.333333z" fill="#222222" ></path><path d="M597.333333 136.533333c0-4.693333 3.541333-8.533333 7.893334-8.533333h325.546666c4.352 0 7.893333 3.84 7.893334 8.533333v68.266667c0 4.693333-3.541333 8.533333-7.893334 8.533333h-325.546666C600.874667 213.333333 597.333333 209.493333 597.333333 204.8V136.533333z" fill="#222222" ></path></symbol><symbol id="icon-biaoqianye" viewBox="0 0 1024 1024"><path d="M376.6 494.8c5.1 4.8 7.9 11.7 7.6 18.7 0.4 7.1-2.5 14-7.6 18.7-5.3 4.7-12.3 7.2-19.3 6.9h-69.6v235.1c0.2 7.4-2.9 14.4-8.4 19.1-5.5 5.4-12.9 8.3-20.5 8.1-7.6 0.3-15.1-2.7-20.5-8.1-5.3-4.9-8.2-11.9-8.1-19.1v-235H161c-7.2 0.3-14.2-2.3-19.3-7.3-5.2-4.8-8-11.7-7.6-18.7-0.3-7 2.5-13.7 7.6-18.3 5.3-4.8 12.2-7.3 19.3-7h198.4c6.3 0 12.4 2.5 17.2 6.9z m215.7 70.1c5.2 5.1 8 12.2 7.7 19.6v189.9c0.3 7.2-2.5 14.2-7.7 19.1-4.8 5.3-11.7 8.3-18.9 8.1-7.1 0.1-13.9-2.7-18.9-7.7-4.8-5.2-7.6-12-7.6-19.1-18 19.5-42.9 30.8-69.2 31.4-19.7 0.3-38.9-5.3-55.5-15.9-17.2-10.7-31.2-26.1-40.3-44.4-19.3-40.4-19.3-87.6 0-128 8.9-18.4 22.9-33.8 40.3-44.4 16-10.5 34.8-16.1 53.9-15.9 26.3-0.1 51.8 9.8 71.2 27.7-0.2-7.3 2.6-14.4 7.7-19.6 10.6-10.2 27.2-10.2 37.8 0l-0.5-0.8z m-61.2 168.7c24.1-31.6 24.1-75.6 0-107.2-11.5-14.3-28.9-22.3-47.1-21.6-17.9-0.5-35.1 7.4-46.3 21.6-12.1 15-18.5 34-18.1 53.4-0.6 19.5 5.7 38.6 17.7 53.8 11.6 13.9 28.8 21.7 46.7 21.2 18.1 0.4 35.3-7.4 47.1-21.2zM835.4 573c17.1 10.7 31 25.9 40.3 44 9.9 19.8 14.9 41.8 14.5 64 0.4 22.3-4.6 44.4-14.5 64.4-9 18.3-23 33.7-40.3 44.4-16 10.6-34.8 16.1-53.9 15.9-13.9 0.2-27.7-2.9-40.3-9-11.6-5-22.1-12.2-31-21.2v2.8c0.2 7.2-2.5 14.2-7.5 19.4-5 5.1-11.9 8-19.1 7.9-7.1 0.3-14-2.5-18.9-7.7-5.2-5.1-8-12.2-7.6-19.6V497.2c-0.2-7.3 2.5-14.4 7.6-19.6 10.6-10.3 27.2-10.3 37.8 0 5.1 5.2 7.9 12.2 7.6 19.6v93.3c8-9.8 18-17.7 29.4-23.2 12.4-6.8 26.2-10.3 40.3-10.2 19.7-0.2 39 5.3 55.6 15.9z m-15.7 163c12.2-15.1 18.6-34.3 18.1-53.8 0.6-19.4-5.7-38.3-17.7-53.4-12-13.4-29-21.1-46.9-21.1s-34.9 7.7-46.9 21.1c-24.1 31.6-24.1 75.6 0 107.2 11.6 14.1 29 22.1 47.1 21.6 18.3-0.2 35.4-9.1 46.3-24v2.4zM708.1 253.5c-15.5 0-28-12.5-28-28V113.4c-0.1-8 0-15.9 0-23.8V77.9c0-15.5 12.5-28 28-28H886c17 0 32.9 6.6 45 18.6 11.3 11.3 17.8 26 18.6 41.8 0.1 0.7 0.1 1.4 0.1 2.1v113.2c0 15.5-12.5 28-28 28H708.1z m28-56h157.4v-84.1c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.4-2.2-5.4-2.2H736.1v91.7zM371.9 254.6c-15.5 0-28-12.5-28-28V78.9c0-15.4 12.5-27.9 27.9-28l213.4-1.1h0.1c17 0 32.9 6.6 45 18.6 12 12.1 18.6 28 18.6 45v113.2c0 15.5-12.5 28-28 28h-249z m28-56.1h193v-85.2c0-2-0.8-3.9-2.2-5.4-1.4-1.4-3.3-2.2-5.3-2.2l-185.5 0.9v91.9z" fill="#595959" ></path><path d="M72.4 974.2c-17.3 0-33.5-6.7-45.7-18.7-12.2-12.1-18.9-28.1-18.9-45.1V113.6c0-35.2 29-63.8 64.6-63.8h169c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28.1 18.9 45.1V283c0 2 0.8 3.9 2.3 5.4 1.5 1.4 3.4 2.2 5.4 2.2h637.9c17.3 0 33.5 6.6 45.7 18.7 12.2 12 18.9 28 18.9 45.1v556c0 17.1-6.7 33.1-18.9 45.1s-28.4 18.7-45.7 18.7H72.4z m7.7-860.6c-4.3 0-7.7 3.4-7.7 7.6v788.7c0 2 0.8 4 2.3 5.4 1.4 1.4 3.4 2.2 5.4 2.2h871.5c2.1 0 4-0.8 5.4-2.2 1.5-1.4 2.3-3.3 2.3-5.4V350.6c0-2-0.8-3.9-2.2-5.3-1.5-1.5-3.4-2.3-5.4-2.3h-638c-17.3 0-33.5-6.7-45.7-18.7-12.2-12-18.9-28.1-18.9-45.1V121.1c0-2-0.8-3.9-2.3-5.4-1.4-1.4-3.4-2.2-5.4-2.2H80.1z" fill="#595959" ></path></symbol><symbol id="icon-buzhou" viewBox="0 0 1024 1024"><path d="M488.106667 792.462222h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444444 28.444444 28.444444 0 0 0-28.444445-28.444445H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444445 28.444444 28.444444 0 0 0 28.444445 28.444444zM242.346667 764.017778A80.782222 80.782222 0 1 0 341.333333 686.08v-96.142222a80.213333 80.213333 0 0 0 0-155.875556V337.92a80.782222 80.782222 0 1 0-39.822222 0v96.142222a80.213333 80.213333 0 0 0 0 155.875556v96.142222a80.782222 80.782222 0 0 0-59.164444 77.937778zM284.444444 259.982222a40.96 40.96 0 0 1 81.92 0 40.391111 40.391111 0 0 1-40.391111 40.96 40.391111 40.391111 0 0 1-41.528889-40.96zM284.444444 512a40.96 40.96 0 1 1 40.96 40.96A40.96 40.96 0 0 1 284.444444 512z m40.391112 211.057778a40.391111 40.391111 0 0 1 40.391111 40.96 40.96 40.96 0 0 1-81.92 0 40.391111 40.391111 0 0 1 39.253333-40.96zM488.106667 540.444444h257.137777a28.444444 28.444444 0 1 0 0-56.888888H488.106667a28.444444 28.444444 0 1 0 0 56.888888zM488.106667 288.426667h257.137777a28.444444 28.444444 0 0 0 28.444445-28.444445 28.444444 28.444444 0 0 0-28.444445-28.444444H488.106667a28.444444 28.444444 0 0 0-28.444445 28.444444 28.444444 28.444444 0 0 0 28.444445 28.444445z" fill="#151515" ></path><path d="M859.022222 79.644444H164.977778a22.755556 22.755556 0 0 0-22.755556 22.755556v819.2a22.755556 22.755556 0 0 0 22.755556 22.755556h694.044444a22.755556 22.755556 0 0 0 22.755556-22.755556V102.4a22.755556 22.755556 0 0 0-22.755556-22.755556z m-22.755555 819.2H187.733333V125.155556h648.533334z" fill="#151515" ></path></symbol><symbol id="icon-ok" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M715.6 371.6c-15.7-15.7-41.4-15.7-57 0l-196 196-95.9-95.9c-15.7-15.7-41.4-15.7-57 0-15.7 15.7-15.7 41.4 0 57l124.5 124.5c15.7 15.7 41.4 15.7 57 0l224.5-224.5c15.6-15.7 15.6-41.4-0.1-57.1z" ></path></symbol><symbol id="icon-cancel" viewBox="0 0 1024 1024"><path d="M926.3 337.9c-22.6-53.3-54.8-101.2-96-142.3-41.1-41.1-89-73.4-142.3-96-55.2-23.4-113.9-35.2-174.3-35.2S394.6 76.2 339.3 99.6c-53.3 22.6-101.2 54.8-142.3 96-41.1 41.1-73.4 89-96 142.3-23.4 55.2-35.2 113.9-35.2 174.3 0 60.4 11.8 119.1 35.2 174.3 22.6 53.3 54.8 101.2 96 142.3 41.1 41.1 89 73.4 142.3 96 55.2 23.4 113.9 35.2 174.3 35.2s119.1-11.8 174.3-35.2c53.3-22.6 101.2-54.8 142.3-96 41.1-41.1 73.4-89 96-142.3 23.4-55.2 35.2-113.9 35.2-174.3 0.1-60.4-11.8-119.1-35.1-174.3zM513.7 879.1c-202.3 0-366.9-164.6-366.9-366.9s164.6-366.9 366.9-366.9c202.3 0 366.9 164.6 366.9 366.9S716 879.1 513.7 879.1z" ></path><path d="M697.9 329.1c-15.6-15.6-41-15.6-56.6 0L513 457.4 384.7 329.1c-15.6-15.6-41-15.6-56.6 0-15.6 15.6-15.6 41 0 56.6L456.4 514 328.1 642.3c-15.6 15.6-15.6 41 0 56.6 15.6 15.6 41 15.6 56.6 0L513 570.6l128.3 128.3c15.6 15.6 41 15.6 56.6 0 15.6-15.6 15.6-41 0-56.6L569.6 514l128.3-128.3c15.6-15.6 15.6-41.1 0-56.6z" ></path></symbol><symbol id="icon-savebaocun" viewBox="0 0 1024 1024"><path d="M778.7 97.2H247.3C165 97.2 98 164.3 98 246.7v532.2c0 82.4 67 149.4 149.3 149.4h531.5c82.3 0 149.3-67 149.3-149.4V246.7C928 164.3 861 97.2 778.7 97.2z m-452.2 79.9h373.1v83.7H331.9c-2.9 0-5.5-2.6-5.5-5.5v-78.2z m373 671.3h-373v-225h373.1v225z m148.7-69.6c0 38.1-30.8 69.2-68.8 69.5V612.9c0-38.3-31.1-69.4-69.3-69.4H316c-38.2 0-69.3 31.1-69.3 69.4v235.4c-38-0.3-68.8-31.4-68.8-69.5V246.7c0-38.1 30.8-69.2 68.8-69.5v78.2c0 47.1 38.3 85.4 85.3 85.4h378c38.2 0 69.3-31.1 69.3-69.4v-94.2c38 0.3 68.8 31.4 68.8 69.5v532.1z" ></path></symbol><symbol id="icon-shijianxian2" viewBox="0 0 1024 1024"><path d="M171.52 924.16v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-322.56v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z m0-394.24v-107.52c0-19.968 15.872-35.84 35.84-35.84s35.84 15.872 35.84 35.84v107.52c0 19.968-15.872 35.84-35.84 35.84s-35.84-15.872-35.84-35.84z" ></path><path d="M350.72 350.72c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m143.36 430.08c0 79.36-64 143.36-143.36 143.36s-143.36-64-143.36-143.36 64-143.36 143.36-143.36 143.36 64 143.36 143.36z m-143.36-71.68c-39.424 0-71.68 32.256-71.68 71.68s32.256 71.68 71.68 71.68 71.68-32.256 71.68-71.68-32.256-71.68-71.68-71.68z m716.8-286.72h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z m284.672 250.88h-501.76c-19.968 0-35.84-15.872-35.84-35.84s15.872-35.84 35.84-35.84h501.76c19.968 0 35.84 15.872 35.84 35.84s-15.872 35.84-35.84 35.84z m-284.672 107.52H420.352c-18.432 0-33.792-15.36-33.792-33.792v-4.096c0-18.432 15.36-33.792 33.792-33.792h219.136c18.432 0 33.792 15.36 33.792 33.792v4.096c0 18.432-15.36 33.792-33.792 33.792z" ></path></symbol><symbol id="icon-buzhoutiao" viewBox="0 0 1024 1024"><path d="M0 0h1024v1024H0z" fill="#FFFFFF" fill-opacity="0" ></path><path d="M204 372c66.31 0 121.852 46.1 136.326 108h137.53c12.901-33.907 45.71-58 84.144-58 38.435 0 71.243 24.093 84.145 58h139.71c12.902-33.907 45.71-58 84.145-58 49.706 0 90 40.294 90 90s-40.294 90-90 90c-38.434 0-71.242-24.092-84.144-57.998H646.144C633.242 577.908 600.434 602 562 602c-38.434 0-71.242-24.092-84.144-57.998h-137.53C325.852 605.9 270.309 652 204 652c-77.32 0-140-62.68-140-140s62.68-140 140-140z m0 64c-41.974 0-76 34.026-76 76s34.026 76 76 76 76-34.026 76-76-34.026-76-76-76z m358 50c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z m308 0c-14.36 0-26 11.64-26 26s11.64 26 26 26 26-11.64 26-26-11.64-26-26-26z" fill="#666666" ></path></symbol><symbol id="icon-m-qianming" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M573.44 646.656l-3.072 6.144c-8.192 12.288-14.336 25.088-19.456 38.912-6.656 18.944-3.072 36.352 16.896 43.008 34.816 11.264 72.704 9.216 106.496-4.608 9.216-3.072 11.264-4.096 34.304-12.8 16.384-6.656 33.792-12.8 51.2-17.408 1.024 0 2.048-0.512 3.072-1.024 10.24-2.048 6.656-5.632 16.896 1.024 3.584 3.072 8.704 4.096 13.312 3.072 4.608-1.024 5.632-3.072 8.192-7.68 5.632-8.192 3.584-19.456-4.608-25.088-18.944-12.8-22.528-10.24-41.472-6.144-1.536 0.512-3.072 0.512-4.096 1.024-18.944 5.12-37.376 11.264-55.808 18.432-22.016 8.704-24.064 9.728-32.768 12.288-24.576 10.24-52.224 12.8-78.336 6.144 4.608-11.264 10.24-22.016 16.896-32.256 1.536-2.048 2.56-4.096 3.584-6.144 8.704-13.824 15.36-29.184 18.432-45.056 4.096-19.456-7.68-38.4-27.136-42.496-0.512 0-1.536-0.512-2.048-0.512-27.648-6.656-59.392 3.072-148.992 37.888-81.92 32.256-117.76 41.984-129.024 35.84-4.096-2.56-8.704-3.072-13.312-1.536-9.728 2.56-15.36 12.8-12.8 22.016 1.024 4.608 4.096 8.192 8.192 10.752 23.04 8.704 48.64 7.68 71.168-2.048 29.696-9.216 59.392-19.456 88.064-32.256 77.824-30.72 111.104-40.448 126.976-36.352 3.072 1.024 3.072 0 2.56 3.072-2.56 12.288-7.168 23.552-13.312 33.792zM665.088 235.52c-19.456-17.92-49.664-17.408-68.608 1.024L312.32 519.68c-2.048 2.048-3.584 4.608-4.608 7.68l-22.528 80.896c-2.56 9.728 3.072 19.456 12.8 21.504 3.584 1.024 7.68 0.512 11.264-0.512l71.168-29.696c5.632-2.56 10.752-5.632 15.36-10.24l283.648-269.824 2.56-2.56c18.432-19.456 17.92-50.176-2.048-68.608l-1.024-1.024-13.824-11.776z" ></path></symbol><symbol id="icon-touxiang_avatar" viewBox="0 0 1024 1024"><path d="M925.866667 797.866667c-12.8-25.6-34.133333-46.933333-64-64-29.866667-21.333333-68.266667-34.133333-119.466667-42.666667-4.266667 0-29.866667-4.266667-59.733333-12.8-21.333333-4.266667-34.133333-8.533333-38.4-12.8v-17.066667c4.266667-51.2 29.866667-76.8 55.466666-106.666666 8.533333-8.533333 17.066667-21.333333 25.6-29.866667 29.866667-42.666667 34.133333-89.6 34.133334-98.133333 0-8.533333 0-17.066667-4.266667-21.333334-4.266667-8.533333-8.533333-12.8-12.8-21.333333 0-12.8 4.266667-21.333333 4.266667-29.866667 0-21.333333 4.266667-55.466667-4.266667-89.6 0-8.533333-4.266667-12.8-4.266667-21.333333-8.533333-25.6-17.066667-46.933333-34.133333-68.266667-4.266667-12.8-64-72.533333-234.666667-85.333333H401.066667c-4.266667 0-17.066667 0-25.6 4.266667-21.333333 4.266667-38.4 21.333333-42.666667 42.666666v21.333334c-8.533333 8.533333-55.466667 51.2-55.466667 102.4-4.266667 34.133333-4.266667 85.333333 0 123.733333-8.533333 8.533333-17.066667 21.333333-12.8 42.666667 0 12.8 4.266667 55.466667 34.133334 98.133333 8.533333 8.533333 17.066667 17.066667 25.6 29.866667 25.6 29.866667 51.2 55.466667 55.466666 106.666666v17.066667c-4.266667 4.266667-17.066667 8.533333-38.4 12.8-29.866667 8.533333-59.733333 12.8-64 12.8-46.933333 8.533333-85.333333 21.333333-115.2 42.666667-25.6 17.066667-46.933333 38.4-64 64-25.6 38.4-25.6 76.8-25.6 85.333333v21.333333c0 25.6 21.333333 46.933333 46.933334 46.933334H896c25.6 0 46.933333-21.333333 46.933333-46.933334v-17.066666c8.533333-12.8 8.533333-51.2-17.066666-89.6z m-546.133334-128c0 4.266667 0 4.266667 0 0v4.266666c-4.266667 0-4.266667 0 0-4.266666z m503.466667 213.333333l-742.4 4.266667v-4.266667s0-25.6 12.8-51.2c8.533333-17.066667 25.6-29.866667 42.666667-42.666667 25.6-17.066667 55.466667-25.6 89.6-34.133333 4.266667 0 34.133333-4.266667 68.266666-12.8 51.2-12.8 76.8-29.866667 85.333334-46.933333 0-4.266667 0-4.266667 4.266666-8.533334v-42.666666c-8.533333-72.533333-42.666667-115.2-72.533333-145.066667-8.533333-8.533333-12.8-17.066667-21.333333-21.333333-21.333333-29.866667-21.333333-59.733333-21.333334-64l4.266667-4.266667 8.533333-8.533333c4.266667-17.066667 0-25.6 0-29.866667-4.266667-34.133333-4.266667-81.066667 0-119.466667 0-29.866667 29.866667-55.466667 29.866667-55.466666 8.533333-4.266667 17.066667-12.8 21.333333-21.333334 0-4.266667 4.266667-4.266667 4.266667-8.533333v-25.6H465.066667c140.8 8.533333 192 59.733333 192 59.733333 8.533333 12.8 17.066667 25.6 21.333333 42.666667 4.266667 4.266667 4.266667 8.533333 4.266667 12.8 4.266667 29.866667 4.266667 55.466667 4.266666 76.8 0 12.8 0 21.333333-4.266666 38.4 0 12.8 0 25.6 8.533333 29.866667l4.266667 4.266666 4.266666 4.266667s0 34.133333-21.333333 64c-4.266667 8.533333-12.8 12.8-21.333333 21.333333-29.866667 29.866667-64 72.533333-72.533334 145.066667v42.666667c0 4.266667 0 4.266667 4.266667 8.533333 8.533333 21.333333 34.133333 34.133333 85.333333 46.933333 34.133333 8.533333 64 12.8 68.266667 12.8 38.4 8.533333 68.266667 17.066667 93.866667 34.133334 17.066667 12.8 34.133333 25.6 42.666666 42.666666 8.533333 25.6 8.533333 51.2 4.266667 55.466667z" ></path></symbol><symbol id="icon-m-mianban" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M884.15744 348.01152v49.152h-745.984v-49.152z" ></path><path d="M356.43392 846.99136h-49.152v-450.048h49.152z" ></path></symbol><symbol id="icon-m-xialakuang" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M510.464 639.488l207.872-254.976H302.08z" ></path></symbol><symbol id="icon-m-biaodan" viewBox="0 0 1024 1024"><path d="M122.88 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384H122.88c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H137.216c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M244.224 279.04h142.848v49.152H244.224zM244.224 425.472h142.848v49.152H244.224zM436.736 279.04h342.528v49.152H436.736zM436.736 425.472h342.528v49.152H436.736zM244.224 572.416h142.848v49.152H244.224zM436.736 572.416h342.528v172.544H436.736z" ></path></symbol><symbol id="icon-m-biaoge" viewBox="0 0 1024 1024"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" ></path><path d="M249.344 347.648h49.152v499.2h-49.152zM584.704 347.648h49.152v499.2h-49.152zM137.728 165.888h746.496v181.76H137.728z" ></path><path d="M137.728 481.792h746.496v49.152H137.728zM137.728 664.576h746.496v49.152H137.728z" ></path></symbol><symbol id="icon-dashboard-o" viewBox="0 0 1024 1024"><path d="M880 622c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V654c0-17.673 14.327-32 32-32h298zM442 476c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V508c0-17.673 14.327-32 32-32h298z m406 210H614v162h234V686zM410 540H176v308h234V540z m470-428c17.673 0 32 14.327 32 32v372c0 17.673-14.327 32-32 32H582c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H614v308h234V176z m-406-64c17.673 0 32 14.327 32 32v226c0 17.673-14.327 32-32 32H144c-17.673 0-32-14.327-32-32V144c0-17.673 14.327-32 32-32h298z m-32 64H176v162h234V176z" fill="#000000" fill-opacity=".65" ></path></symbol><symbol id="icon-line-layoutmasonryfensanbuju" viewBox="0 0 1024 1024"><path d="M896 128H128c-25.6 0-42.666667 17.066667-42.666667 42.666667v682.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h768c25.6 0 42.666667-17.066667 42.666667-42.666667V170.666667c0-25.6-17.066667-42.666667-42.666667-42.666667zM170.666667 213.333333h298.666666v341.333334H170.666667V213.333333z m0 597.333334v-170.666667h298.666666v170.666667H170.666667z m682.666666 0h-298.666666v-341.333334h298.666666v341.333334z m0-426.666667h-298.666666V213.333333h298.666666v170.666667z" fill="#09121F" ></path></symbol><symbol id="icon-zidingyibuju" viewBox="0 0 1024 1024"><path d="M0 0v256h1024V0z m960 192H64V64h896zM0 1024h512V320H0z m64-640h384v576H64zM576 576h448v-256H576z m64-192h320v128H640zM576 1024h448V640H576z m64-320h320v256H640z" fill="#575869" ></path></symbol><symbol id="icon-daochu" viewBox="0 0 1024 1024"><path d="M394.6 689.8c-13.2 3.2-27.4-9.5-31.7-23.2-8.4-28.5-12.7-58.6-12.7-88.1 0-159.4 151.5-325.1 314.1-352.1v-5.3c0-1.6 0-3.7 0.5-5.3l0.5-2.1c1.6-11.6 5.8-38.5 32.2-55.4 10.6-6.9 22.2-10 34.3-10 14.8 0 26.9 5.3 34.3 9.5 1.6 0.5 2.6 1.6 4.2 2.6L929.2 286c17.4 13.2 28 34.8 28 57 0 22.7-10.6 44.3-28.5 57.5L770.5 525.7c-11.6 9-25.3 13.7-39.1 13.7-12.1 0-23.8-3.7-34.8-10.6-21.1-13.7-31.7-34.8-31.7-64.4v-1.1C559.3 475 442.2 569 416.3 657.6c-4.8 14.3-13.7 32.2-21.7 32.2z m335.7-466.6V256c0 17.4-13.7 31.7-31.1 32.7-125.6 6.9-257.6 131.4-279.7 254.4C486 458.7 595.2 390 699.7 397.4c17.4 1.1 30.6 15.3 30.6 32.7V465c0 4.7 0.5 6.9 0.5 7.9l157.3-124.6c2.1-1.6 2.6-3.2 2.6-5.3 0-2.1-1.1-4.2-2.6-5.3L731.9 214.3c-1.1 1.6-1.6 5.8-2.1 8.4l0.5 0.5z m0 0" ></path><path d="M715.6 916.3H188.3c-67 0-121.9-54.9-121.9-121.9v-568c0-67 54.9-121.9 121.9-121.9h436.5v69.7H188.3c-28.5 0-52.3 23.2-52.3 52.3V795c0 28.5 23.2 52.3 52.3 52.3h527.3c28.5 0 52.3-23.2 52.3-52.3V593.2H837v201.6c0 66.6-54.4 121.5-121.4 121.5z m0 0" ></path><path d="M183 566.9h112.4V626H183v-59.1z m0 154.1h296.1v59.1H183V721z m0-425.4h237v59.1H183v-59.1z m0 140.9h112.4v59.1H183v-59.1z m0 0" ></path></symbol><symbol id="icon-daoru" viewBox="0 0 1024 1024"><path d="M111.6 148.8c7.9 0 16.9 17.9 21.6 32.2 25.9 88.7 143 182.6 248.6 194.2v-1.1c0-29.6 10.6-50.7 31.7-64.4 11.1-6.9 22.7-10.6 34.8-10.6 13.7 0 27.4 4.8 39.1 13.7L645.8 438c17.9 13.2 28.5 34.8 28.5 57.5 0 22.2-10.6 43.8-28 57L487.4 678.2c-1.6 1.1-2.6 2.1-4.2 2.6-7.4 4.2-19.5 9.5-34.3 9.5-12.1 0-23.7-3.2-34.3-10-26.4-16.9-30.6-43.8-32.2-55.4l-0.5-2.1c-0.5-1.6-0.5-3.7-0.5-5.3v-5.3c-162.6-26.9-314.1-192.6-314.1-352 0-29.6 4.2-59.6 12.7-88.1 4.2-13.8 18.4-26.5 31.6-23.3z m335.2 467.1c0.5 2.6 1.1 6.9 2.1 8.4l156.2-123.5c1.6-1.1 2.6-3.2 2.6-5.3 0-2.1-0.5-3.7-2.6-5.3L447.8 365.7c0 1.1-0.5 3.2-0.5 7.9v34.8c0 17.4-13.2 31.7-30.6 32.7-104.5 7.4-213.8-61.2-280.3-145.7 22.2 123 154.1 247.5 279.7 254.4 17.4 1.1 31.1 15.3 31.1 32.7v32.7l-0.4 0.7z m0.5-0.5" ></path><path d="M309 916.3c-67 0-121.4-54.9-121.4-121.4V593.2h69.1v201.6c0 29 23.8 52.3 52.3 52.3h527.3c29 0 52.3-23.8 52.3-52.3V226.4c0-29-23.8-52.3-52.3-52.3H399.8v-69.7h436.5c67 0 121.9 54.9 121.9 121.9v567.9c0 67-54.9 121.9-121.9 121.9H309v0.2z m0 0" ></path><path d="M841.6 626H729.1v-59.1h112.4V626z m0 154.1H545.5V721h296.1v59.1z m0-425.4h-237v-59.1h237v59.1z m0 140.9H729.1v-59.1h112.4v59.1z m0-59.1" ></path></symbol><symbol id="icon-a-juxing1851" viewBox="0 0 1024 1024"><path d="M0 0h438.857143v1024H0V0z m512 0h512v438.857143H512V0z m0 512h219.428571v219.428571H512V512z m292.571429 0h219.428571v219.428571h-219.428571V512z m-292.571429 292.571429h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m-146.285714 146.285714h73.142857v73.142857H512v-73.142857z m146.285714 0h73.142857v73.142857H658.285714v-73.142857z m146.285715 0h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z m-146.285714-146.285714h73.142857v73.142857h-73.142857v-73.142857z m146.285714 0h73.142857v73.142857h-73.142857v-73.142857z" ></path></symbol><symbol id="icon-sxsz" viewBox="0 0 1024 1024"><path d="M304.5 152.6h415L927 512 719.5 871.4h-415L97 512z" fill="#386BF3" ></path><path d="M512 512m-145.25 0a145.25 145.25 0 1 0 290.5 0 145.25 145.25 0 1 0-290.5 0Z" fill="#3D4265" ></path></symbol><symbol id="icon-mx" viewBox="0 0 1024 1024"><path d="M511.9 325.12v248.55L727.15 449.4l-0.01-248.55z" fill="#C3D2FB" ></path><path d="M296.65 200.85L511.9 325.12v248.56L296.65 449.4z" fill="#3D4265" ></path><path d="M511.9 325.12l215.25-124.27L511.9 76.57 296.65 200.85z" fill="#386BF3" ></path><path d="M296.62 698.02v248.55L511.87 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M81.37 573.74l215.25 124.28v248.55L81.37 822.3z" fill="#3D4265" ></path><path d="M296.62 698.02l215.25-124.28-215.25-124.27L81.37 573.74z" fill="#386BF3" ></path><path d="M727.03 698.02v248.55L942.28 822.3l-0.01-248.56z" fill="#C3D2FB" ></path><path d="M511.78 573.74l215.25 124.28v248.55L511.78 822.3z" fill="#3D4265" ></path><path d="M727.03 698.02l215.25-124.28-215.25-124.27-215.25 124.27z" fill="#386BF3" ></path></symbol><symbol id="icon-al" viewBox="0 0 1024 1024"><path d="M192 132h440v640H192z" fill="#386BF3" ></path><path d="M632 260h200v512H632z" fill="#C3D2FB" ></path><path d="M398.86 612L512 725.14 625.14 612H912v280H112V612z" fill="#3D4265" ></path></symbol><symbol id="icon-sf" viewBox="0 0 1024 1024"><path d="M511.82 512.5v435L888.54 730l-0.02-435z" fill="#C3D2FB" ></path><path d="M135.1 295l376.72 217.5v435L135.1 730z" fill="#3D4265" ></path><path d="M511.82 512.5L888.54 295 511.82 77.5 135.1 295z" fill="#386BF3" ></path></symbol><symbol id="icon-moxing" viewBox="0 0 1061 1024"><path d="M447.122 467.332L49.24 268.162A33.501 33.501 0 0 0 0.136 300.745v441.02a33.042 33.042 0 0 0 16.062 27.994l396.965 248.275a33.96 33.96 0 0 0 17.438 5.507 33.042 33.042 0 0 0 33.043-33.042V497.162a33.042 33.042 0 0 0-16.522-29.83z m598.889-203.76a33.042 33.042 0 0 0-31.666 0l-463.507 203.76a33.042 33.042 0 0 0-19.733 30.289v493.337a33.042 33.042 0 0 0 49.563 28.453l463.048-265.255a33.042 33.042 0 0 0 16.521-28.453V291.566a33.042 33.042 0 0 0-14.226-27.994z m-54.611-84.9a33.042 33.042 0 0 0-22.487-29.83L550.838 1.53a32.583 32.583 0 0 0-19.733 0L83.659 158.021a33.042 33.042 0 0 0-4.13 61.036l397.882 199.17a33.501 33.501 0 0 0 14.685 3.213 33.96 33.96 0 0 0 13.31 0L969.37 215.845a33.042 33.042 0 0 0 22.029-37.173z" fill="#5E5C5C" ></path></symbol><symbol id="icon-yanzhengyanzhengma" viewBox="0 0 1024 1024"><path d="M943.1 172c-2.4-0.2-245.1-25.3-413.8-147.8-5.1-3.7-11-5.6-17.3-5.6-6.2 0-12.2 1.9-17.3 5.6C326.9 146 83.3 171.8 80.9 172c-15.2 1.4-26.6 14.1-26.6 29.3 0 6.7 0.6 165.8 54.8 344.4 32.1 105.8 76.4 196.4 131.9 269.2 70.3 92.3 158.5 156 262 189.2 2.9 0.9 5.9 1.4 9 1.4s6.1-0.5 8.9-1.4c103.6-33.2 191.7-96.8 262-189.2 55.4-72.7 99.8-163.2 131.9-269.2 54.1-178.6 54.8-337.7 54.8-344.4C969.7 186.1 958.3 173.5 943.1 172zM910.1 227.2l-0.1 1.6c-2.9 58.1-13.4 174.4-51.4 299.9-66.7 220.1-183.1 360.1-346 416.1L512 945l-0.6-0.2C349 888.9 232.7 749.4 165.8 530.1c-39.8-130.5-49.4-254.2-51.8-301.4l-0.1-1.6 1.5-0.2c70.6-10.3 250.5-44.8 395.5-142.4l0.9-0.7 1 0.7C658 182.1 837.9 216.6 908.5 227L910.1 227.2z" ></path><path d="M641.8 351 467 580.3l-89-76.1c-5.3-4.5-12.1-7-19.1-7-8.6 0-16.8 3.7-22.4 10.3-10.5 12.3-9.1 31 3.3 41.5l112.7 96.4c5.2 4.4 12.4 7 19.6 7 0.9 0 1.8 0 2.7-0.1 8-0.8 15.4-5 20.3-11.4l193.7-254c4.8-6.3 6.8-14 5.7-21.8-1-7.8-5.1-14.7-11.3-19.5C670.1 335.6 651.6 338.1 641.8 351z" ></path></symbol><symbol id="icon-verify" viewBox="0 0 1024 1024"><path d="M713.856 93.44c44.672 9.344 79.36 15.488 105.024 18.944a332.8 332.8 0 0 0 28.864 3.008A110.08 110.08 0 0 1 944 223.36v348.672c0 71.232-36.288 168.32-80.704 219.328a737.216 737.216 0 0 1-100.672 106.496C683.264 966.208 599.232 1008 512 1008s-171.328-41.792-250.624-110.144c-26.88-23.168-51.2-47.808-72.832-72.512a409.152 409.152 0 0 1-24.768-30.208c-47.68-52.928-83.776-150.4-83.776-223.104V223.36c0-54.72 42.752-102.528 99.264-108.096 5.76-0.32 17.536-1.408 34.432-3.648a953.6 953.6 0 0 0 95.168-17.92c19.392-4.608 34.944-12.16 65.92-30.4l9.984-5.888C434.048 28.416 466.432 16 512 16c39.296 0 68.288 11.84 127.488 43.968l2.304 1.28c38.784 21.056 55.296 28.672 72.064 32.192z m-19.712 93.952c-29.376-6.144-50.688-16-98.176-41.856l-2.304-1.216C549.312 120.32 529.088 112 512 112c-24.192 0-42.88 7.168-78.656 28.16-4.736 2.88-4.736 2.88-9.728 5.76-38.784 22.912-61.12 33.664-92.48 41.216-37.76 8.96-72.96 15.36-104.768 19.648a556.8 556.8 0 0 1-39.68 4.16c-5.12 0.512-10.688 6.784-10.688 12.416v348.672c0 49.344 27.52 123.84 62.08 162.56a642.176 642.176 0 0 0 85.952 90.56c63.552 54.72 128.192 86.848 187.968 86.848 59.776 0 124.416-32.128 187.968-86.848a642.176 642.176 0 0 0 88.32-93.632c31.808-36.608 59.712-111.36 59.712-159.488V223.36c0-5.44-5.888-12.032-6.656-12.288-20.288-0.448-66.112-6.72-147.2-23.68zM400.128 488.704L487.68 576.256l185.088-185.088a48 48 0 0 1 67.84 67.84L521.6 678.144a48 48 0 0 1-67.84 0l-121.6-121.536a48 48 0 1 1 67.968-67.84z" fill="#768893" ></path></symbol><symbol id="icon-preview" viewBox="0 0 1024 1024"><path d="M854.36155804 32.02835121a114.60838884 114.60838884 0 0 1 114.21544637 105.17775738l0.39294247 9.43063278v170.60277392a49.1178817 49.1178817 0 0 1-97.77732893 6.68003145l-0.45843311-6.68003145V146.63674137a16.37262679 16.37262679 0 0 0-12.63966726-15.9796843l-3.73295954-0.39294246H130.1675186a16.37262679 16.37262679 0 0 0-15.91419368 12.57417659l-0.45843312 3.79845017v732.18388095a16.37262679 16.37262679 0 0 0 12.63966859 15.91419369l3.73295821 0.4584331h275.4530781a49.1178817 49.1178817 0 0 1 6.68003143 97.77732894l-6.68003143 0.4584331H130.1675186a114.60838884 114.60838884 0 0 1-114.21544639-105.24324667l-0.39294246-9.36514216V146.63674137a114.60838884 114.60838884 0 0 1 105.24324669-114.28093698l9.36514216-0.32745318h724.19403944z m-286.32450218 495.1082417a235.76582919 235.76582919 0 0 1 358.88798459 303.35203402l80.61881587 80.55332523a39.29430509 39.29430509 0 0 1-55.53595059 55.66693187l-80.61881589-80.61881587a235.83131983 235.83131983 0 0 1-303.35203398-358.88798459z m277.87622625 55.60144257a157.17721902 157.17721902 0 1 0-222.27478502 222.2747837 157.17721902 157.17721902 0 0 0 222.27478502-222.2747837z m-450.70567639-33.26917864a42.56883017 42.56883017 0 1 1 0 85.13766035H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766035h184.81421508z m0-158.68350096a42.56883017 42.56883017 0 1 1 0 85.13766036H210.39339064a42.56883017 42.56883017 0 1 1 0-85.13766036h184.81421508z m233.67013285-158.68350095a42.56883017 42.56883017 0 1 1 0 85.13766036h-418.48434793a42.56883017 42.56883017 0 1 1 0-85.13766036h418.48434793z" fill="#7f7f7f" ></path></symbol><symbol id="icon-yunshangchuan-xian" viewBox="0 0 1039 1024"><path d="M711.40656 345.248C667.88656 248.448 594.91056 208 481.83856 208c-118.848 0-219.328 96.512-256.736 267.76l-4.96 22.752-23.2 2.256c-83.744 8.192-120.176 54.176-131.36 144.4C54.30256 736.528 103.18256 816 193.85456 816h190.672a32 32 0 1 1 0 64H193.83856C58.68656 880-13.44144 762.72 2.07856 637.296 15.61456 528 65.80656 458.416 167.75856 440.224 215.27856 254.704 335.99856 144 481.83856 144c143.072 0 241.184 58.72 294.24 189.808 3.328-0.176 6.576-0.272 9.76-0.272 125.184 0 223.68 93.696 239.84 252.768 0.896 8.96 1.36 17.952 1.36 26.96C1027.03856 760.576 907.61456 880 760.30256 880h-120.064a32 32 0 1 1 0-64h120.064c111.968 0 202.72-90.768 202.72-202.736 0-6.848-0.32-13.68-1.024-20.48-12.912-127.088-84.544-195.248-176.16-195.248-23.136 0-55.68 7.232-96.928 22.032a32 32 0 1 1-21.616-60.224c15.584-5.6 30.288-10.304 44.112-14.08zM544.23856 598.512V848a32 32 0 0 1-64 0V598.512l-39.712 46.32a32 32 0 1 1-48.592-41.664l95.632-111.552a32.032 32.032 0 0 1 49.344 0l95.616 111.552a32 32 0 0 1-48.592 41.664l-39.696-46.32z" ></path></symbol><symbol id="icon-yulan" viewBox="0 0 1024 1024"><path d="M897.28 85.333333h-750.933333c-28.16 0-51.2 23.04-51.2 51.2v750.933334c0 28.16 23.04 51.2 51.2 51.2h276.906666c18.773333 0 34.133333-15.36 34.133334-34.133334s-15.36-34.133333-34.133334-34.133333H163.413333V153.6h716.8v275.626667c0 18.773333 15.36 34.133333 34.133334 34.133333s34.133333-15.36 34.133333-34.133333V136.533333c0-28.16-22.613333-51.2-51.2-51.2z" fill="#4C4C4C" ></path><path d="M649.813333 315.733333h-324.266666c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133333h324.266666c18.773333 0 34.133333 15.36 34.133334 34.133333s-14.933333 34.133333-34.133334 34.133333zM564.48 452.266667h-238.933333c-18.773333 0-34.133333-15.36-34.133334-34.133334s15.36-34.133333 34.133334-34.133333h238.933333c18.773333 0 34.133333 15.36 34.133333 34.133333s-14.933333 34.133333-34.133333 34.133334zM479.146667 588.8h-153.6c-18.773333 0-34.133333-15.36-34.133334-34.133333s15.36-34.133333 34.133334-34.133334h153.6c18.773333 0 34.133333 15.36 34.133333 34.133334s-14.933333 34.133333-34.133333 34.133333zM724.48 544c-94.293333 0-170.666667 76.373333-170.666667 170.666667s76.373333 170.666667 170.666667 170.666666 170.666667-76.373333 170.666667-170.666666-76.373333-170.666667-170.666667-170.666667z m0 273.066667c-56.32 0-102.4-46.08-102.4-102.4s46.08-102.4 102.4-102.4 102.4 46.08 102.4 102.4-45.653333 102.4-102.4 102.4z" fill="#4C4C4C" ></path><path d="M938.666667 928.853333c-13.226667 13.226667-34.986667 13.226667-48.213334 0l-72.533333-72.533333c-13.226667-13.226667-13.226667-34.986667 0-48.213333 13.226667-13.226667 34.986667-13.226667 48.213333 0l72.533334 72.533333c13.226667 13.226667 13.226667 34.56 0 48.213333z" fill="#4C4C4C" ></path></symbol><symbol id="icon-sousuo" viewBox="0 0 1024 1024"><path d="M1004.8 915.2l-243.2-243.2c0 0-6.4-6.4-6.4-6.4C800 595.2 832 505.6 832 416 832 185.6 646.4 0 416 0S0 185.6 0 416 185.6 832 416 832c89.6 0 179.2-32 243.2-83.2 0 6.4 6.4 6.4 6.4 6.4l243.2 243.2c25.6 25.6 70.4 25.6 96 6.4C1030.4 979.2 1030.4 940.8 1004.8 915.2zM64 416C64 224 224 64 416 64S768 224 768 416 608 768 416 768 64 608 64 416z" fill="#231815" ></path></symbol><symbol id="icon-ziliucheng" viewBox="0 0 1024 1024"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" ></path><path d="M813.056 768l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-53.248 0-96.256-43.008-96.256-96.256L659.456 614.4l-96.256 0 0 192.512c0 20.48-16.384 38.912-38.912 38.912L120.832 845.824c-20.48 0-38.912-16.384-38.912-38.912L81.92 401.408c0-20.48 16.384-38.912 38.912-38.912l192.512 0L313.344 190.464 120.832 190.464C98.304 190.464 81.92 174.08 81.92 151.552L81.92 112.64c0-20.48 16.384-38.912 38.912-38.912l788.48 0c20.48 0 38.912 16.384 38.912 38.912l0 38.912c0 20.48-16.384 38.912-38.912 38.912L331.776 190.464l0 174.08 192.512 0c20.48 0 38.912 16.384 38.912 38.912L563.2 593.92l96.256 0 0-153.6c0-53.248 43.008-96.256 96.256-96.256l18.432 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912l0-38.912-18.432 0c-43.008 0-77.824 34.816-77.824 77.824L677.888 593.92l96.256 0 0-38.912c0-20.48 16.384-38.912 38.912-38.912l96.256 0c20.48 0 38.912 16.384 38.912 38.912l0 96.256c0 20.48-16.384 38.912-38.912 38.912l-96.256 0c-20.48 0-38.912-16.384-38.912-38.912L774.144 614.4l-96.256 0 0 153.6c0 43.008 34.816 77.824 77.824 77.824l18.432 0 0-38.912C774.144 784.384 792.576 768 813.056 768z" ></path></symbol><symbol id="icon-danyuange" viewBox="0 0 1024 1024"><path d="M467.970999 661.248453h-184.831769a70.655912 70.655912 0 0 0-54.527932 25.599968A82.431897 82.431897 0 0 0 204.803328 744.19235v196.607754A82.687897 82.687897 0 0 0 228.611298 998.400032a71.423911 71.423911 0 0 0 54.527932 25.599968h184.831769a73.727908 73.727908 0 0 0 55.039931-25.599968 81.919898 81.919898 0 0 0 23.551971-58.623927v-195.583755a81.919898 81.919898 0 0 0-23.551971-58.367927 72.959909 72.959909 0 0 0-55.039931-25.599968z m5.887993-84.991893A118.015852 118.015852 0 0 0 512.002944 549.376593 127.99984 127.99984 0 0 0 545.538902 460.800704V126.465122A133.119834 133.119834 0 0 0 537.602912 76.801184a123.391846 123.391846 0 0 0-25.599968-40.447949 118.015852 118.015852 0 0 0-37.119954-25.599968A104.703869 104.703869 0 0 0 428.547048 0.00128H116.995438A105.471868 105.471868 0 0 0 71.683494 9.985268a121.087849 121.087849 0 0 0-37.119953 25.599968A127.99984 127.99984 0 0 0 9.219572 76.801184 133.119834 133.119834 0 0 0 0.003584 126.465122V460.800704a127.99984 127.99984 0 0 0 34.559957 88.31989 121.087849 121.087849 0 0 0 37.119953 27.135966 105.471868 105.471868 0 0 0 45.311944 9.983987h311.55161a106.239867 106.239867 0 0 0 45.311944-9.983987z m527.35934-329.215589a71.67991 71.67991 0 0 0-54.783931-25.599968h-184.575769a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v195.583756a83.199896 83.199896 0 0 0 23.551971 59.647925 73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 84.991894 84.991894 0 0 0 22.015972-59.647925v-195.583756a82.943896 82.943896 0 0 0-22.783972-58.367927zM947.2024 661.248453h-185.343768a72.959909 72.959909 0 0 0-55.295931 25.599968 81.919898 81.919898 0 0 0-23.551971 58.367927v196.607755A81.919898 81.919898 0 0 0 706.562701 998.400032a73.983908 73.983908 0 0 0 55.295931 25.599968H947.2024a72.447909 72.447909 0 0 0 54.783932-25.599968 83.455896 83.455896 0 0 0 22.015972-57.599928v-196.607754a83.199896 83.199896 0 0 0-22.783972-58.367927 71.67991 71.67991 0 0 0-54.783931-25.599968z m0 0" ></path></symbol><symbol id="icon-rengongzhineng_filledbeifen" viewBox="0 0 1024 1024"><path d="M913.678222 374.556444c0-175.431111-160.782222-317.653333-359.139555-317.653333a382.577778 382.577778 0 0 0-254.663111 93.767111 270.108444 270.108444 0 0 0-91.335112 118.840889 318.350222 318.350222 0 0 0-20.849777 98.773333c-0.597333 38.840889 18.389333 76.871111 1.664 114.688-11.633778 26.453333-41.870222 48.824889-61.312 69.916445 0 0-54.442667 36.224 49.436444 41.173333 2.929778 0.142222 16.071111 62.222222 19.342222 76.430222a16.753778 16.753778 0 0 0-3.271111 10.752c0 11.904 15.004444 21.617778 33.450667 21.617778h11.278222c-24.362667 3.313778-41.955556 12.8-41.955555 26.026667 0 9.102222 11.562667 21.105778 28.842666 28.302222 0 0-21.333333 66.744889 10.296889 81.962667a36.977778 36.977778 0 0 0 21.333333 1.564444c44.856889 2.446222 125.155556-0.739556 169.784889-0.739555 0-0.810667 23.466667 127.146667 23.466667 127.146666h403.299556c0 0.64-38.769778-289.265778-38.769778-289.265777 70.968889-101.632 95.544889-192.611556 96.881778-268.643556 1.422222-11.491556 2.161778-23.068444 2.176-34.659556h0.042666zM701.155556 320.711111a72.632889 72.632889 0 0 1-65.706667-42.055111l-54.471111 31.544889a108.344889 108.344889 0 0 1-7.509334 107.975111l102.172445 59.192889a36.508444 36.508444 0 1 1-10.894222 25.984 35.555556 35.555556 0 0 1 2.019555-10.026667L561.777778 432.512a109.511111 109.511111 0 1 1 10.168889-138.154667l57.728-33.422222a72.718222 72.718222 0 1 1 71.466666 59.733333v0.042667z" fill="#323233" ></path></symbol><symbol id="icon-fuhao-huizhi" viewBox="0 0 1024 1024"><path d="M254.4 82.624L82.624 254.4a60.704 60.704 0 0 0 0 85.92L254.4 512l128.8-128.8-42.88-42.88-85.92 85.888-42.88-42.88 85.888-85.92-42.88-42.88-85.92 85.888-42.88-42.88 171.776-171.84 171.584 171.616L512 254.4l-171.776-171.84a60.576 60.576 0 0 0-85.76 0z m644.096 644.064l-171.808 171.808-42.88-42.912 85.888-85.888-42.88-42.88-85.92 85.856-42.88-42.88 85.888-85.888-42.912-42.912L512 769.6l171.776 171.776a60.704 60.704 0 0 0 85.92 0l171.776-171.776a60.704 60.704 0 0 0 0-85.92L769.6 512l-42.912 42.88 171.808 171.808zM680.8 211.328l131.968 131.872-43.968 44L636.8 255.2l44-43.872zM240.96 650.976l131.968 131.872-44 44-131.968-131.872 44-44zM680.704 123.424a124.544 124.544 0 0 1 176.288 0.096l43.584 43.52a124.704 124.704 0 0 1 0.096 176.16L355.264 888.416l-268.352 48.384 48.384-268.288L680.704 123.424zM334.4 821.344L857.472 298.656c23.84-23.872 23.552-63.264-0.8-87.52L813.12 167.616c-24.544-24.544-63.552-24.832-87.584-0.8L202.432 689.6l-27.52 159.424 159.52-27.616z" fill="#0A8CF0" ></path></symbol><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M799.2 874.4c0 34.4-28.001 62.4-62.4 62.4H287.2c-34.4 0-62.4-28-62.4-62.4V212h574.4v662.4zM349.6 100c0-7.2 5.6-12.8 12.8-12.8h300c7.2 0 12.8 5.6 12.8 12.8v37.6H349.6V100z m636.8 37.6H749.6V100c0-48.001-39.2-87.2-87.2-87.2h-300c-48 0-87.2 39.199-87.2 87.2v37.6H37.6C16.8 137.6 0 154.4 0 175.2s16.8 37.6 37.6 37.6h112v661.6c0 76 61.6 137.6 137.6 137.6h449.6c76 0 137.6-61.6 137.6-137.6V212h112c20.8 0 37.6-16.8 37.6-37.6s-16.8-36.8-37.6-36.8zM512 824c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6m-175.2 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0.8 20.8 17.6 37.6 37.6 37.6m350.4 0c20.8 0 37.6-16.8 37.6-37.6v-400c0-20.8-16.8-37.6-37.6-37.6s-37.6 16.8-37.6 37.6v400c0 20.8 16.8 37.6 37.6 37.6" fill="#8A8A8A" ></path></symbol><symbol id="icon-jurassic_import-form" viewBox="0 0 1024 1024"><path d="M764.9 64H225.4l1.4 224.2 64-0.4-1-159.8h383.6v224H896v544H289.8l1-159.8-64-0.4-1.4 224.2H960V277.7L764.9 64z m-27.6 64.7L882.8 288H737.3V128.7z" fill="#707070" ></path><path d="M356.5 224h255.9v64H356.5z" fill="#707070" ></path><path d="M576.4 416h255.9v64H576.4zM512.5 576h319.8v64H512.5zM384.5 736h447.8v64H384.5z" fill="#707070" ></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#707070" ></path></symbol><symbol id="icon-kaoheweidufenxi" viewBox="0 0 1024 1024"><path d="M815.542857 212.943238l118.296381 68.266667v168.033524l-201.532952 116.345904-0.487619-163.352381-125.366857-72.46019 209.091047-116.833524z m-89.673143-51.736381L519.314286 279.454476 305.785905 156.233143 511.561143 37.449143l214.308571 123.757714zM294.619429 887.466667L89.234286 768.877714V546.133333l205.677714 118.00381-0.292571 223.329524z m85.333333 49.249523l-0.097524-223.914666 133.607619 76.653714 132.632381-76.604952-1.024 222.744381-133.558857 77.043809-131.510857-75.922286zM434.468571 328.021333L295.253333 407.747048l-0.195047 156.672L89.234286 444.318476V281.258667l132.047238-76.263619 213.089524 123.026285z m86.113524 49.737143l126.780953 73.191619-0.780191 164.08381-133.12 76.897524-133.656381-78.019048-0.097524-157.403429 140.921905-78.750476z m413.257143 169.008762v222.110476l-200.655238 115.809524-0.633905-221.769143 201.289143-116.150857z" fill="#82529d" ></path></symbol><symbol id="icon-wenjianjia" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol><symbol id="icon-biaoqian" viewBox="0 0 1024 1024"><path d="M934.912 516.096q23.552 26.624 19.456 49.664t-26.624 46.592l-324.608 327.68q-8.192 7.168-19.456 11.264t-23.04 4.608-23.04-2.56-18.432-10.24q-121.856-122.88-218.112-220.16l-80.896-80.896q-39.936-39.936-71.168-71.68t-51.2-51.2-20.992-21.504q-3.072-4.096-10.752-14.848t-6.656-25.088l0-19.456 0-40.96q0-23.552 0.512-52.736t0.512-58.88q1.024-70.656 2.048-156.672 2.048-13.312 6.144-24.064t15.36-22.016q10.24-11.264 22.016-16.384t22.016-5.12l329.728 0q2.048 0 9.216 0.512t10.24 1.536q6.144 2.048 11.264 5.12t10.24 8.192zM217.088 317.44q40.96 0 69.12-28.672t28.16-69.632-28.16-69.632-69.12-28.672q-20.48 0-37.888 7.68t-30.72 20.992-20.992 31.232-7.68 38.4 7.68 38.4 20.992 31.232 30.72 20.992 37.888 7.68z" fill="#ea9518" ></path></symbol><symbol id="icon-wenben" viewBox="0 0 1024 1024"><path d="M823.296 60.416q65.536 0 99.328 38.4t33.792 93.696l0 543.744q0 25.6-21.504 46.08l-171.008 163.84q-13.312 11.264-22.528 14.336t-23.552 3.072l-459.776 0q-23.552 0-47.104-9.728t-41.984-27.648-30.208-43.008-11.776-55.808l0-634.88q0-60.416 33.28-96.256t94.72-35.84l568.32 0zM608.256 702.464q13.312 0 22.528-9.216t9.216-22.528q0-14.336-9.216-23.04t-22.528-8.704l-320.512 0q-13.312 0-22.528 8.704t-9.216 23.04q0 13.312 9.216 22.528t22.528 9.216l320.512 0zM736.256 509.952q13.312 0 22.528-9.216t9.216-22.528-9.216-22.528-22.528-9.216l-448.512 0q-13.312 0-22.528 9.216t-9.216 22.528 9.216 22.528 22.528 9.216l448.512 0zM799.744 318.464q13.312 0 22.528-9.216t9.216-23.552q0-13.312-9.216-22.528t-22.528-9.216l-512 0q-13.312 0-22.528 9.216t-9.216 22.528q0 14.336 9.216 23.552t22.528 9.216l512 0z" fill="#db639b" ></path></symbol><symbol id="icon-yingyong" viewBox="0 0 1026 1024"><path d="M371.732817 94.172314q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 247.821878q0 25.773475-18.338819 44.112294t-44.112294 18.338819l-247.821878 0q-25.773475 0-43.616651-18.338819t-17.843175-44.112294l0-247.821878q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM371.732817 589.81607q25.773475 0 44.112294 17.843175t18.338819 43.616651l0 248.813166q0 25.773475-18.338819 43.616651t-44.112294 17.843175l-247.821878 0q-25.773475 0-43.616651-17.843175t-17.843175-43.616651l0-248.813166q0-25.773475 17.843175-43.616651t43.616651-17.843175l247.821878 0zM868.367861 589.81607q25.773475 0 43.616651 17.843175t17.843175 43.616651l0 248.813166q0 25.773475-17.843175 43.616651t-43.616651 17.843175l-247.821878 0q-25.773475 0-44.112294-17.843175t-18.338819-43.616651l0-248.813166q0-25.773475 18.338819-43.616651t44.112294-17.843175l247.821878 0zM1006.156825 203.21394q19.82575 19.82575 19.82575 46.590513t-19.82575 45.599226l-184.379477 184.379477q-19.82575 19.82575-46.094869 19.82575t-46.094869-19.82575l-184.379477-184.379477q-18.834463-18.834463-18.834463-45.599226t18.834463-46.590513l184.379477-184.379477q19.82575-18.834463 46.094869-18.834463t46.094869 18.834463z" fill="#0061b2" ></path></symbol><symbol id="icon-wenjianjia-copy" viewBox="0 0 1024 1024"><path d="M855.04 385.024q19.456 2.048 38.912 10.24t33.792 23.04 21.504 37.376 2.048 54.272q-2.048 8.192-8.192 40.448t-14.336 74.24-18.432 86.528-19.456 76.288q-5.12 18.432-14.848 37.888t-25.088 35.328-36.864 26.112-51.2 10.24l-567.296 0q-21.504 0-44.544-9.216t-42.496-26.112-31.744-40.96-12.288-53.76l0-439.296q0-62.464 33.792-97.792t95.232-35.328l503.808 0q22.528 0 46.592 8.704t43.52 24.064 31.744 35.84 12.288 44.032l0 11.264-53.248 0q-40.96 0-95.744-0.512t-116.736-0.512-115.712-0.512-92.672-0.512l-47.104 0q-26.624 0-41.472 16.896t-23.04 44.544q-8.192 29.696-18.432 62.976t-18.432 61.952q-10.24 33.792-20.48 65.536-2.048 8.192-2.048 13.312 0 17.408 11.776 29.184t29.184 11.776q31.744 0 43.008-39.936l54.272-198.656q133.12 1.024 243.712 1.024l286.72 0z" ></path></symbol></svg>',(l=>{var r=(n=(n=document.getElementsByTagName("script"))[n.length-1]).getAttribute("data-injectcss"),n=n.getAttribute("data-disable-injectsvg");if(!n){var t,s,c,g,h,v=function(_,S){S.parentNode.insertBefore(_,S)};if(r&&!l.__iconfont__svg__cssinject__){l.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(_){console&&console.log(_)}}t=function(){var _,S=document.createElement("div");S.innerHTML=l._iconfont_svg_string_4827314,(S=S.getElementsByTagName("svg")[0])&&(S.setAttribute("aria-hidden","true"),S.style.position="absolute",S.style.width=0,S.style.height=0,S.style.overflow="hidden",S=S,(_=document.body).firstChild?v(S,_.firstChild):_.appendChild(S))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(s=function(){document.removeEventListener("DOMContentLoaded",s,!1),t()},document.addEventListener("DOMContentLoaded",s,!1)):document.attachEvent&&(c=t,g=l.document,h=!1,u(),g.onreadystatechange=function(){g.readyState=="complete"&&(g.onreadystatechange=null,m())})}function m(){h||(h=!0,c())}function u(){try{g.documentElement.doScroll("left")}catch{return void setTimeout(u,50)}m()}})(window);const Jp={class:"statistics-cards-container"},Xp=["onClick"],Zp=a.defineComponent({__name:"index",props:{items:{default:()=>[]},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0}},setup(l){const r=l,n=a.ref(null),t=_=>{if(Array.isArray(_)&&_.length>=3){const[S,z,w,j]=_;return j!==void 0?`rgba(${S}, ${z}, ${w}, ${j})`:`rgb(${S}, ${z}, ${w})`}if(typeof _=="string"){const S=_.trim();if(S.startsWith("[")&&S.endsWith("]")){const z=S.slice(1,-1).split(",").map(w=>Number(w.trim()));if(z.length>=3&&z.every(w=>!Number.isNaN(w))){const[w,j,A,N]=z;return N!==void 0?`rgba(${w}, ${j}, ${A}, ${N})`:`rgb(${w}, ${j}, ${A})`}}return S}},s=a.computed(()=>{const _=Number(r==null?void 0:r.textSize),S=t(r==null?void 0:r.textColor),z={},w={};return!Number.isNaN(_)&&_&&(z.fontSize=`${_}px`,w.fontSize=`${_}px`),S&&(z.color=S,w.color=S),{label:z,value:w}}),c=_=>pl.getComponent(_),g=_=>{if(!_)return;const S=_.querySelector("input, textarea, .el-input__inner");S&&typeof S.focus=="function"&&S.focus()},h=(_,S,z)=>{r.disabled||_.field&&(n.value=S,a.nextTick(()=>{g(z.currentTarget)}))},v=()=>{n.value=null},m=_=>{var z;const S=((z=_==null?void 0:_.field)==null?void 0:z.value)??(_==null?void 0:_.value);return S==null||S===""?"-":S},u=_=>{const S=_!=null&&_.width&&_.width>0?_.width:1,w=`calc((100% - ${(S-1)*16}px) / ${S})`;return{flex:`0 0 ${w}`,maxWidth:w,minWidth:"140px",boxSizing:"border-box"}};return(_,S)=>(a.openBlock(),a.createElementBlock("div",Jp,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(_.items,(z,w)=>{var j,A,N,Y,b,L,T,x;return a.openBlock(),a.createElementBlock("div",{class:"statistics-card",key:w,style:a.normalizeStyle(u(z))},[a.createElementVNode("div",{class:"statistics-label",style:a.normalizeStyle(s.value.label)},a.toDisplayString(z==null?void 0:z.label),5),a.createElementVNode("div",{class:"statistics-value",style:a.normalizeStyle(s.value.value),onClick:k=>h(z,w,k)},[n.value===w&&z.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(((j=z.field)==null?void 0:j.type)??"Input")),{key:0,modelValue:z.field.value,"onUpdate:modelValue":k=>z.field.value=k,isEdit:!0,disabled:(A=z.field)==null?void 0:A.disabled,content:((N=z.field)==null?void 0:N.contents)??[],optionUrl:z.field,originalValue:(Y=z.field)==null?void 0:Y.value,config:(b=z.field)==null?void 0:b.config,configModel:((L=z.field)==null?void 0:L.prop)??((T=z.field)==null?void 0:T.name),selectedTagList:((x=z.field)==null?void 0:x.selectValue)??[],onBlur:v,onBlurChange:v},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createTextVNode(a.toDisplayString(m(z)),1)],64))],12,Xp)],4)}),128))]))}}),Qp=Ul._export_sfc(Zp,[["__scopeId","data-v-bc3dcbbb"]]),Xs=I.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(l){this.selectArray=l},setSelectString(l){this.selectString=l}}}),ef={class:"calculator-content"},af={class:"calculator-child"},lf={class:"calculator-child"},rf=a.defineComponent({__name:"calculator",setup(l){const r=a.ref(),n=a.ref();return a.onMounted(()=>{r.value=[{type:"Upload",label:"输入",name:"input"}],n.value=[{type:"Upload",label:"输出",name:"output"}]}),(t,s)=>(a.openBlock(),a.createElementBlock("div",ef,[a.createElementVNode("div",af,[a.createVNode(pl.ssForm,{rowContents:r.value,isRowFlex:!0},null,8,["rowContents"])]),a.createElementVNode("div",lf,[a.createVNode(pl.ssForm,{rowContents:n.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),nf=Ul._export_sfc(rf,[["__scopeId","data-v-73db0fe7"]]),pi=(l,r)=>{let n=l,t=r;return Array.isArray(n)&&(n=n==null?void 0:n.map((s,c)=>{if(Array.isArray(s)){let g={};return s=s==null?void 0:s.forEach((h,v)=>{var m;(m=t==null?void 0:t[v])!=null&&m.prop?g[t[v].prop]=h:Array.isArray(h)&&(g.children=pi(h,t))}),Object.assign(g,{id:c})}else return s})),n},Zs=(l,r,n)=>{let t=l,s=r;return t=t==null?void 0:t.map((c,g)=>{var h,v;return!Array.isArray(c)||!((h=s==null?void 0:s[g])!=null&&h.label)&&!n||(c.unshift(((v=s==null?void 0:s[g])==null?void 0:v.label)??""),c.some(m=>Array.isArray(m))&&(c=c==null?void 0:c.map(m=>{var u;return Array.isArray(m)&&(m=Zs(m,(u=s==null?void 0:s[g])==null?void 0:u.children,n)),m}))),c}),t},tf=(l,r,n)=>{if(r==="")return l==null?void 0:l.filter(t=>(t==null?void 0:t.id)!==n);{const t=r.split("-");return of(l,t,n)}},of=(l,r,n)=>{let t=l,s=r;return(s==null?void 0:s.length)===0?t=t==null?void 0:t.filter(c=>c.id!==n):t=t==null?void 0:t.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=Qs(c,s,n)),c)),t},Qs=(l,r,n)=>{var c,g;let t=l,s=r;return(s==null?void 0:s.length)===0?t.children=(c=t.children)==null?void 0:c.filter(h=>h.id!==n):t.children=(g=t.children)==null?void 0:g.map(h=>(h.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),h=Qs(h,s,n)),h)),t},sf=(l,r,n)=>{if(r==="")return n;{const t=r.split("-");return cf(l,t,n)}},cf=(l,r,n)=>{let t=l,s=r;return(s==null?void 0:s.length)===0?t=n:t=t==null?void 0:t.map(c=>(c.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),c=ec(c,s,n)),c)),t},ec=(l,r,n)=>{var c;let t=l,s=r;return(s==null?void 0:s.length)===0?t.children=n:t.children=(c=t.children)==null?void 0:c.map(g=>(g.id.toString()===(s==null?void 0:s[0])&&(s==null||s.shift(),g=ec(g,s,n)),g)),t};class uf{constructor(r={}){Rr(this,"url");Rr(this,"heartbeatInterval");Rr(this,"socket",null);Rr(this,"isConnected",!1);Rr(this,"heartTimer",null);Rr(this,"canvas",null);Rr(this,"ctx",null);Rr(this,"mainCamCutMode",0);Rr(this,"pMainShowStartX",0);Rr(this,"pMainShowStartY",0);Rr(this,"onLog");Rr(this,"onDevCount");Rr(this,"onResolution");Rr(this,"onCameraStatus");Rr(this,"onPhoto");this.url=r.url??"ws://127.0.0.1:22225",this.heartbeatInterval=r.heartbeatInterval??3e3}init(r,n,t){var g;(g=this.canvas)!=null&&g.parentNode&&this.canvas.parentNode.removeChild(this.canvas);const s=document.createElement("canvas");s.style.border="solid 1px #A0A0A0",s.id="MainCamCanvas",s.width=n,s.height=t;const c=s.getContext("2d");if(!c)throw new Error("无法获取 CanvasRenderingContext2D");r.appendChild(s),this.canvas=s,this.ctx=c}async connect(){this.socket&&(this.socket.readyState===WebSocket.OPEN||this.socket.readyState===WebSocket.CONNECTING)||await new Promise((r,n)=>{const t=new WebSocket(this.url);t.binaryType="arraybuffer",t.onopen=()=>{this.socket=t,this.isConnected=!0,this.startHeartbeat(),this.log("socket.onopen"),r()},t.onerror=s=>{this.isConnected=!1,this.log("socket.onerror"),n(s)},t.onclose=()=>{this.isConnected=!1,this.stopHeartbeat(),this.log("socket.onclose")},t.onmessage=s=>{this.handleMessage(s)}})}destroy(){var r;this.stopHeartbeat();try{this.closeCamera()}catch{}if(this.socket){try{this.socket.onmessage=null}catch{}try{this.socket.onopen=null}catch{}try{this.socket.onerror=null}catch{}try{this.socket.onclose=null}catch{}try{this.socket.close()}catch{}this.socket=null}this.isConnected=!1,(r=this.canvas)!=null&&r.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.ctx=null}getDevCount(){this.sendBytes(new Uint8Array([119,136,80]))}getResolution(r=0){this.sendBytes(new Uint8Array([119,136,81,r]))}chooseResolution(r){if(!Array.isArray(r)||r.length===0)return null;const n=r.find(s=>s.width===2592&&s.height===1944);return n||[...r].sort((s,c)=>c.width*c.height-s.width*s.height)[0]||null}openCamera(r=0,n=1280,t=720){if(!this.canvas)throw new Error("请先 init() 传入容器并创建 canvas");const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=1,s[3]=r,s[4]=this.canvas.width>>8&255,s[5]=this.canvas.width&255,s[6]=this.canvas.height>>8&255,s[7]=this.canvas.height&255,s[8]=n>>8&255,s[9]=n&255,s[10]=t>>8&255,s[11]=t&255,this.sendBytes(s)}closeCamera(){this.sendBytes(new Uint8Array([119,136,2,0]))}photo(){const s=new Uint8Array(12);s[0]=119,s[1]=136,s[2]=16,s[3]=0,s[4]=0,s[5]=0,s[6]=0,s[7]=0,s[8]=1,s[9]=0,s[10]=0,s[11]=0,this.sendBytes(s)}bestSize(){this.sendBytes(new Uint8Array([119,136,5,0]))}rotateLeft(){this.sendBytes(new Uint8Array([119,136,7,0]))}rotateRight(){this.sendBytes(new Uint8Array([119,136,8,0]))}focus(){this.sendBytes(new Uint8Array([119,136,48,0]))}log(r){var n;(n=this.onLog)==null||n.call(this,r)}sendBytes(r){if(!this.socket||this.socket.readyState!==WebSocket.OPEN||!this.isConnected)throw new Error("socket 未连接");this.socket.send(r.buffer)}startHeartbeat(){this.stopHeartbeat(),this.heartTimer=window.setInterval(()=>{this.log("heartCheck...........")},this.heartbeatInterval)}stopHeartbeat(){this.heartTimer&&(clearInterval(this.heartTimer),this.heartTimer=null)}handleMessage(r){var s,c,g,h,v,m;const n=new Uint8Array(r.data);if(n.length<=0)return;if(n[0]===17&&n[1]===17&&n[2]===17){this.log("heart socket!!!!");return}if(n[0]!==85||n[1]!==102)return;const t=n[2];if(t===80){const u=n[3],_=n.length-4,S=new Uint8Array(_);for(let j=0;j<_;j++)S[j]=n[4+j];const w=decodeURIComponent(this.byteToString(S)).split("|");(s=this.onDevCount)==null||s.call(this,u,w);return}if(t===81){const u=n[3]||0,_=[];for(let S=0;S<u;S++){const z=(n[4+S*4+0]||0)*256+(n[4+S*4+1]||0),w=(n[4+S*4+2]||0)*256+(n[4+S*4+3]||0);_.push({width:z,height:w,text:`${z}*${w}`})}(c=this.onResolution)==null||c.call(this,u,_);return}if(t===1){n[3]===1&&((g=this.onCameraStatus)==null||g.call(this,"opened")),n[3]===3&&((h=this.onCameraStatus)==null||h.call(this,"closed"));return}if(t===16){if(n[3]===1){const _=n[4]*256+n[5],S=n[6]*65536+n[7]*256+n[8];let z="";if(_>0){const A=new Uint8Array(_);for(let N=0;N<_;N++)A[N]=n[9+N];z=decodeURIComponent(this.byteToString(A))}const w=new Uint8Array(S);for(let A=0;A<S;A++)w[A]=n[9+_+A];const j=this.uint8ArrayToString(w);(v=this.onPhoto)==null||v.call(this,{flag:0,imgPath:z,base64:j})}n[3]===2&&((m=this.onPhoto)==null||m.call(this,{flag:2,imgPath:"",base64:""}));return}if(t===204){if(!this.canvas||!this.ctx)return;const u=n[3]*256+n[4],_=n[5]*256+n[6];this.pMainShowStartX=n[7]*256+n[8],this.pMainShowStartY=n[9]*256+n[10],this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);const S=this.ctx.createImageData(u,_);let z=11;for(let w=0;w<S.data.length;w+=4)S.data[w+0]=n[z],S.data[w+1]=n[z+1],S.data[w+2]=n[z+2],S.data[w+3]=255,z+=3;this.ctx.putImageData(S,this.pMainShowStartX,this.pMainShowStartY),this.mainCamCutMode;return}}uint8ArrayToString(r){let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return n}byteToString(r){let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return n}}const df={style:{display:"flex",gap:"16px",height:"100%"}},pf={key:0,style:{color:"var(--el-text-color-secondary)"}},ff={style:{width:"420px",display:"flex","flex-direction":"column",gap:"16px"}},hf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px"}},vf={ref:"pictureBox",style:{height:"220px",border:"1px dashed var(--el-border-color)","border-radius":"4px",background:"var(--el-fill-color-lighter)",position:"relative",overflow:"auto",padding:"8px"}},mf={key:0,style:{height:"100%",display:"flex","align-items":"center","justify-content":"center",color:"var(--el-text-color-secondary)"}},yf={key:1,style:{display:"grid","grid-template-columns":"repeat(2, minmax(0, 1fr))",gap:"8px"}},gf=["src","onClick"],bf=["onClick"],kf={style:{border:"1px solid var(--el-border-color)","border-radius":"4px",padding:"12px",flex:"1","min-height":"0",display:"flex","flex-direction":"column"}},xf={class:"dialog-footer"},_f=a.defineComponent({__name:"index",props:{visible:{type:Boolean,default:!1}},emits:["confirm","cancel"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(null),c=a.ref(!1),g=a.ref([]),h=a.ref(""),v=a.ref(!1),m=a.ref([]),u=new uf({url:"ws://127.0.0.1:22225"});function _(U,X){var Z;const be=U.split(","),ze=((Z=be[0].match(/:(.*?);/))==null?void 0:Z[1])??"image/jpeg",Ee=atob(be[1]);let ne=Ee.length;const ke=new Uint8Array(ne);for(;ne--;)ke[ne]=Ee.charCodeAt(ne);return new File([ke],X,{type:ze})}function S(){u.onLog=U=>{console.log("[GPY]",U)},u.onDevCount=(U,X)=>{if(h.value+=`设备数量=${U},设备=${X.join(",")}
4
4
  `,U>0){h.value+=`检测到设备,正在获取分辨率...
@@ -22,4 +22,4 @@
22
22
  `}},L=()=>{g.value.length>0?t("confirm",g.value.map(U=>U.file)):t("confirm",[])},T=U=>{U<0||U>=g.value.length||(g.value.splice(U,1),h.value+=`已删除一张图片(剩余 ${g.value.length} 张)
23
23
  `)},x=U=>{if(!U)return;const X=`gpy-preview-${Date.now()}.jpg`;m.value=[{name:X,blobUrl:U}],v.value=!0},k=()=>{v.value=!1},$=()=>{w(),t("cancel")};return(U,X)=>{const be=a.resolveComponent("el-input"),ze=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(vr.ssDialog,{title:"扫描录入",visible:n.visible,onBeforeDestroy:$,width:"1200px",style:{height:"80%"}},{default:a.withCtx(()=>[a.createElementVNode("div",df,[a.createElementVNode("div",{ref_key:"cameraBox",ref:s,style:{flex:"1","min-width":"0",border:"1px solid var(--el-border-color)","border-radius":"4px",position:"relative",overflow:"hidden",display:"flex","align-items":"center","justify-content":"center",background:"var(--el-fill-color-lighter)"}},[c.value?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",pf,"初始化摄像头..."))],512),a.createElementVNode("div",ff,[a.createElementVNode("div",hf,[X[0]||(X[0]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"拍照图片",-1)),a.createElementVNode("div",vf,[g.value.length===0?(a.openBlock(),a.createElementBlock("div",mf,"暂无图片")):(a.openBlock(),a.createElementBlock("div",yf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(Ee,ne)=>(a.openBlock(),a.createElementBlock("div",{key:Ee.uid,style:{position:"relative",border:"1px solid var(--el-border-color)","border-radius":"4px",overflow:"hidden",background:"#fafafa"}},[a.createElementVNode("img",{src:Ee.url,onClick:ke=>x(Ee.url),style:{width:"100%",height:"94px","object-fit":"contain",display:"block",background:"#fafafa",cursor:"zoom-in"},alt:"captured image",title:"点击放大"},null,8,gf),a.createElementVNode("div",{onClick:ke=>T(ne),style:{position:"absolute",top:"4px",right:"4px",width:"18px",height:"18px","border-radius":"50%",background:"rgba(0,0,0,0.55)",color:"#fff",display:"flex","align-items":"center","justify-content":"center",cursor:"pointer","font-size":"12px"},title:"删除"},"×",8,bf)]))),128))]))],512)]),a.createElementVNode("div",kf,[X[1]||(X[1]=a.createElementVNode("div",{style:{"font-weight":"600","margin-bottom":"8px"}},"操作记录",-1)),a.createVNode(be,{type:"textarea",value:h.value,readonly:"",rows:10,placeholder:"设备操作记录...",style:{flex:"1"}},null,8,["value"])])])])]),footer:a.withCtx(()=>[a.createElementVNode("div",xf,[a.createVNode(ze,{onClick:j,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>X[2]||(X[2]=[a.createTextVNode("适屏")])),_:1,__:[2]},8,["disabled"]),a.createVNode(ze,{onClick:A,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>X[3]||(X[3]=[a.createTextVNode("左旋")])),_:1,__:[3]},8,["disabled"]),a.createVNode(ze,{onClick:N,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>X[4]||(X[4]=[a.createTextVNode("右旋")])),_:1,__:[4]},8,["disabled"]),a.createVNode(ze,{onClick:Y,disabled:!c.value,id:"themeBorderButton"},{default:a.withCtx(()=>X[5]||(X[5]=[a.createTextVNode("对焦")])),_:1,__:[5]},8,["disabled"]),a.createVNode(ze,{onClick:b,disabled:!c.value,id:"themeButton"},{default:a.withCtx(()=>X[6]||(X[6]=[a.createTextVNode("拍照")])),_:1,__:[6]},8,["disabled"]),X[9]||(X[9]=a.createElementVNode("div",{style:{flex:"1"}},null,-1)),a.createVNode(ze,{onClick:L,disabled:g.value.length===0,id:"themeButton"},{default:a.withCtx(()=>X[7]||(X[7]=[a.createTextVNode("确认")])),_:1,__:[7]},8,["disabled"]),a.createVNode(ze,{onClick:$,id:"themeBorderButton"},{default:a.withCtx(()=>X[8]||(X[8]=[a.createTextVNode("取消")])),_:1,__:[8]})])]),_:1},8,["visible"]),v.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:0,fileDataList:m.value,onDestroy:k},null,8,["fileDataList"])):a.createCommentVNode("",!0)],64)}}}),wf=Ul._export_sfc(_f,[["__scopeId","data-v-24a2050a"]]);function ac(l){return el.axios.post("http://222.92.178.198:8000/api/v1/excel-chat",l)}function Cf(l){return el.axios.get(l,{responseType:"blob"})}const ts=I.useMenuState(I.pinia),Sf=async l=>{var c,g,h,v,m,u;let r=l==null?void 0:l.导入文件,n=l==null?void 0:l.函数参数,t=(c=r==null?void 0:r[0])==null?void 0:c.url,s="";if(!(t!=null&&t.includes("http"))||!(t!=null&&t.includes("https"))){ts.setContentLoading(!0);const _=await I.platformDownloadFile({url:t});let S=_==null?void 0:_.data;const z=new FormData;z.append("file",S,((g=r==null?void 0:r[0])==null?void 0:g.name)+"."+((h=t==null?void 0:t.split("."))==null?void 0:h[1])),z.append("query",n);let w=await ac(z);w=(u=(m=(v=w==null?void 0:w.data)==null?void 0:v.data)==null?void 0:m.response)==null?void 0:u.replace("generateResult",l==null?void 0:l.函数名称),s=w,ts.setContentLoading(!1)}return s},ki=I.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(l){this.objUrl=l},setBlobUrls(l){this.blobUrls=l}}}),wo={检校类型:["检校类型","证书类别"],证书编号:["证书编号"],设备名称:["设备名称","器具名称","样品名称","仪器名称","被校设备"],型号规格:["型号规格","型号/规格","型号"],出厂编号:["出厂编号","器具/管理编号","器具编号","管理编号","仪器编号"],制造厂:["制造厂","制造单位","制造厂商","制造商"],检校结果:["检校结果","检定结论","校准结果","校准/检定结果","检定结果"],依据文件:["依据文件","检定依据","检定所依据的技术文件","所依据/参照技术文件(代号/名称)","检定所依据的技术文件(编号/名称)","检定方法说明"],检校日期:["检校日期","校准日期","校验日期","检定日期","发证日期","发布日期","接收日期","签证日期"],有效日期:["有效日期","有效期","有效期至"]},os={columnName:"OCR图片",acceptTypes:"image/*",maxSize:10,maxFiles:20,apiUrl:"http://139.196.154.85:20015/api/public/paddleOCR"};class Ef{constructor(r){Rr(this,"config");this.config={...os,...r}}updateConfig(r){this.config={...this.config,...r}}getConfig(){return{...this.config}}validateFileSize(r){const n=this.config.maxSize*1024*1024;return r.size<=n}validateFileType(r){return r.type.startsWith("image/")||r.type==="application/pdf"}getAuthorizationToken(){const r=el.Local.get(el.accessTokenKey);return r?`Bearer ${r}`:""}buildOCRRequest(r,n){return{title:n,form:{OCR图片文件:r}}}async recognize(r,n){const t=this.getAuthorizationToken(),s=this.buildOCRRequest(r,n),c=this.config.apiUrl||os.apiUrl;return(await el.axios.post(c,s,{headers:{"Content-Type":"application/json",Authorization:t}})).data}getFieldAliases(r){return wo[r]?wo[r]:[r]}extractTableHeaders(r){const n=[],t=new Set,s=g=>{const h=g==null?void 0:g.label;return!(!h||h==="操作"||h===this.config.columnName||(g==null?void 0:g.type)==="operate"||(g==null?void 0:g.prop)==="operate")},c=g=>{(g||[]).forEach(h=>{if(!h)return;const v=(h==null?void 0:h.children)||(h==null?void 0:h.child)||(h==null?void 0:h.columns);if(Array.isArray(v)&&v.length>0){c(v);return}if(s(h)){const m=h.label;if(!t.has(m)){t.add(m);const u=this.getFieldAliases(m);n.push(u)}}})};return c(r||[]),n}}function lc(l){return new Ef(l)}lc();const fi=async(l,r)=>{var g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x;let n=(h=(g=I.cloneDeep(l))==null?void 0:g.optionUrl)==null?void 0:h.menuSelect,t=[];n==null||n.forEach(k=>{});let s="",c=await sa.menuToParent(n);if(c==null||c.forEach(k=>{var $,U,X,be;(k==null?void 0:k.name)===(((be=(X=(U=($=I.cloneDeep(l))==null?void 0:$.optionUrl)==null?void 0:U.groupSelect)==null?void 0:X[0])==null?void 0:be.replaceAll("'",""))??"")&&(s=k==null?void 0:k.id)}),r){s=r;const k=await yr.getInsofDataApi({id:s}),$=(_=(u=(m=(v=k==null?void 0:k.data)==null?void 0:v.result)==null?void 0:m[0])==null?void 0:u.key)==null?void 0:_.pageKey;c=await sa.getItemData($,sessionStorage.getItem("systemKey"),"")}if(s!==""){let k;r?k=(S=c==null?void 0:c.find(X=>(X==null?void 0:X.id)===r))==null?void 0:S.compData:k=(z=c==null?void 0:c.find(X=>{var be,ze,Ee,ne;return(X==null?void 0:X.name)===(((ze=(be=l==null?void 0:l.groupSelect)==null?void 0:be.split(":"))==null?void 0:ze[0])||((ne=(Ee=l==null?void 0:l.optionUrl)==null?void 0:Ee.groupSelect)==null?void 0:ne[0]))}))==null?void 0:z.compData;let $=(j=(w=k==null?void 0:k.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:w.contents)==null?void 0:j.map(X=>X==null?void 0:X.label);(N=(A=k==null?void 0:k.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:A.contents)!=null&&N.every(X=>Array.isArray(X))&&($=(L=sa.getColumnChild((b=(Y=k==null?void 0:k.find(X=>(X==null?void 0:X.key)==="header"))==null?void 0:Y.contents)==null?void 0:b[0]))==null?void 0:L.map(X=>X==null?void 0:X.prop));let U=(x=(T=k==null?void 0:k.find(X=>(X==null?void 0:X.key)==="tableContents"))==null?void 0:T.contents)==null?void 0:x.map(X=>{if(Array.isArray(X))X=X==null?void 0:X.filter(be=>!(be!=null&&be.id));else{let be={};for(let ze in X)ze!=="id"&&(be[ze]=X==null?void 0:X[ze]);X=be}return X});U==null||U.forEach(X=>{Array.isArray(X)?t.push(sa.getValueToObjectValue(X,$)):t.push(X)})}return t},Df=I.useMenuState(I.pinia),{activeMenuPath:M6}=I.storeToRefs(Df),Bf=I.useUnit(I.pinia),{chooseTitle:O6}=I.storeToRefs(Bf),Nf="col-operate",xi=l=>`${Nf}-${l}`,Tf=(l,r)=>{const n=new Map;l.forEach(s=>{const{prop:c}=s;n.set(c,s)});const t=s=>{Array.isArray(s)&&s.forEach(c=>{const{prop:g}=c||{},h=n.get(g);Af(h,c),Array.isArray(c==null?void 0:c.children)&&c.children.length>0&&t(c.children)})};return t(r),r},Af=(l,r)=>(l&&(r.sortable=l==null?void 0:l.sortable,r.filterable=l==null?void 0:l.filterable,r.showSummary=l==null?void 0:l.showSummary,r.operable=l==null?void 0:l.operable,r.fixed=l==null?void 0:l.fixed),r),zf=(l,r)=>{const{sortable:n=!1,filterable:t=!1,showSummary:s=!1,operable:c=!1,fixed:g=!1}=r||{};return{prop:l,sortable:n,filterable:t,showSummary:s,operable:c,fixed:g}},Mf=async l=>{var c,g;if(!l)return;const r=xi(l),n=await yr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r}}),t=(c=n==null?void 0:n.data)==null?void 0:c.code,s=(g=n==null?void 0:n.data)==null?void 0:g.result;if(t==200)return s==null?void 0:s[0]},Of=async l=>{var c,g,h,v;if(!l)return;const r=xi(l),n=await yr.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:r}}),t=(c=n==null?void 0:n.data)==null?void 0:c.code,s=(g=n==null?void 0:n.data)==null?void 0:g.result;return t==200?(v=(h=s==null?void 0:s[0])==null?void 0:h.value)==null?void 0:v.columns:[]},If=async(l,r)=>{if(!l||!r)return;const n=xi(l);return await yr.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),uniqueKey:n},value:{columns:r}})},Lf=async(l,r)=>!l||!r?void 0:await yr.updateInsofDataApi({id:l,value:{columns:r}}),is=async(l,r)=>{const n=sessionStorage.getItem("systemKey");if(!l||!r||!n)return;const t=await Mf(l);return t?await Lf(t==null?void 0:t.id,r):await If(l,r)};var vo={exports:{}},Vf=vo.exports,ss;function Rf(){return ss||(ss=1,function(l,r){(function(n,t){t()})(Vf,function(){function n(m,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(m.type)?new Blob(["\uFEFF",m],{type:m.type}):m}function t(m,u,_){var S=new XMLHttpRequest;S.open("GET",m),S.responseType="blob",S.onload=function(){v(S.response,u,_)},S.onerror=function(){console.error("could not download file")},S.send()}function s(m){var u=new XMLHttpRequest;u.open("HEAD",m,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function c(m){try{m.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),m.dispatchEvent(u)}}var g=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof I.commonjsGlobal=="object"&&I.commonjsGlobal.global===I.commonjsGlobal?I.commonjsGlobal:void 0,h=g.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),v=g.saveAs||(typeof window!="object"||window!==g?function(){}:"download"in HTMLAnchorElement.prototype&&!h?function(m,u,_){var S=g.URL||g.webkitURL,z=document.createElement("a");u=u||m.name||"download",z.download=u,z.rel="noopener",typeof m=="string"?(z.href=m,z.origin===location.origin?c(z):s(z.href)?t(m,u,_):c(z,z.target="_blank")):(z.href=S.createObjectURL(m),setTimeout(function(){S.revokeObjectURL(z.href)},4e4),setTimeout(function(){c(z)},0))}:"msSaveOrOpenBlob"in navigator?function(m,u,_){if(u=u||m.name||"download",typeof m!="string")navigator.msSaveOrOpenBlob(n(m,_),u);else if(s(m))t(m,u,_);else{var S=document.createElement("a");S.href=m,S.target="_blank",setTimeout(function(){c(S)})}}:function(m,u,_,S){if(S=S||open("","_blank"),S&&(S.document.title=S.document.body.innerText="downloading..."),typeof m=="string")return t(m,u,_);var z=m.type==="application/octet-stream",w=/constructor/i.test(g.HTMLElement)||g.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||z&&w||h)&&typeof FileReader<"u"){var A=new FileReader;A.onloadend=function(){var b=A.result;b=j?b:b.replace(/^data:[^;]*;/,"data:attachment/file;"),S?S.location.href=b:location=b,S=null},A.readAsDataURL(m)}else{var N=g.URL||g.webkitURL,Y=N.createObjectURL(m);S?S.location=Y:location.href=Y,S=null,setTimeout(function(){N.revokeObjectURL(Y)},4e4)}});g.saveAs=v.saveAs=v,l.exports=v})}(vo)),vo.exports}Rf();const Wn=I.defineStore("tabComp",{state:()=>({itemData:[],originalData:[],extraContents:[],nodeDev:"",isEdit:"view",isRefreshCurStructure:!1,isSubmitCurStructure:!1,curStructureCompIds:[],itemGridData:[],itemExtendData:void 0,payloadTypes:"",lockingPage:"",systemPath:void 0,pageMapState:void 0,cacheUpdatingData:void 0,freshContent:!1,tableLoading:!1,routeToChildPath:"",tableViewContents:[],activeItemIndex:0,fixMenuStatus:!1,refreshTable:!1,selectTab:""}),actions:{setItemData(l){this.itemData=l},setCurStructureCompIds(l){this.curStructureCompIds=l},setRefreshCurStructure(l){this.isRefreshCurStructure=l},setOriginalData(l){this.originalData=l},setExtraContents(l){this.extraContents=l},setNodeDev(l){this.nodeDev=l},setIsEdit(l){this.isEdit=l},setSelectTab(l){this.selectTab=l}}}),$f=I.useLoginState(I.pinia),{loginUserInfo:ri}=I.storeToRefs($f),Pf=async l=>{var t,s,c;let r=await I.getAllTables({platId:parseInt((t=ri==null?void 0:ri.value)==null?void 0:t.plat_id),tableNames:[l]});return r=(c=(s=r==null?void 0:r.data)==null?void 0:s.result)==null?void 0:c[0],await Js(r,!1),[{comp:"Table",isShow:!0,name:"日志管理",compData:[{key:"extraButton",contents:[]},{key:"rowButton",contents:[]},{key:"header",contents:[{label:"请求类型",prop:"request_method",formType:"Input",align:"center"},{label:"请求路径",prop:"request_url",formType:"Input",align:"center"},{label:"请求参数",prop:"request_param",formType:"Upload",align:"center"},{label:"返回结果",prop:"request_result",formType:"Upload",align:"center"},{label:"返回信息",prop:"request_message",formType:"Input",align:"center"},{label:"请求表格",prop:"request_table",formType:"Input",align:"center"},{label:"请求种类",prop:"request_type",formType:"Input",align:"center"},{label:"请求创建时间",prop:"create_time",formType:"Date",align:"center"},{label:"请求创建人",prop:"create_user_id",formType:"Input",align:"center"}]},{key:"tableContents",contents:r}]}]},Ff=I.useLoginState(),{loginUserInfo:gl}=I.storeToRefs(Ff);let co="$R";const _r=I.useModelComp(I.pinia),rc=a.ref(!1),{itemData:jf,itemGridData:et,curStructureCompIds:cs,isSubmitCurStructure:Hf,routeToChildPath:Uf,pageMapState:hi,itemExtendData:uo,refreshTable:us}=I.storeToRefs(_r),Ao=Wn(I.pinia),Er=I.useMenuState(I.pinia),Yl=a.shallowRef([]),{asideMenus:qf,activeTopMenuPath:Wf,activeMenuPath:bl,platform:I6,buttonTriggerType:Kf,currentMenuPath:Ur}=I.storeToRefs(Er),nn=I.useUnit(I.pinia),{selectTitle:Hn,chooseTitle:Co}=I.storeToRefs(nn);a.ref();const Ct=a.ref(!0),qn=a.ref(0),vi=a.ref([]);a.ref(!1);const _i=a.ref(!1),Rt=a.ref(),nc=a.ref(),tc=a.ref(),Yf=()=>{_r.setItemGridData([]),_r.setIsEdit("edit"),_r.setSubmitCurStructure(bl.value!=="/平台管理/菜单管理")},Gf=()=>{_r.setIsEdit("view"),_r.setRefreshCurStructure(!0)},Jf=async l=>{var s;let r=Hn.value,n=r==null?void 0:r.findIndex(c=>(c==null?void 0:c.value)===(l==null?void 0:l.value)),t=r==null?void 0:r.filter((c,g)=>g<=n);nn.setSelectTitle(pl.safeClone(t)),t=(s=t==null?void 0:t.map(c=>c==null?void 0:c.value))==null?void 0:s.join("/"),Er.setActiveMenuPath(null),Er.setActiveMenuPath(t)},ni=async(l,r,n,t="contentConfig")=>{var s;try{if(!Array.isArray(l))return;let c,g;r==="create"?(c={dataList:l==null?void 0:l.map(v=>{var m;return{key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:n!=null&&n.startsWith("/")?n==null?void 0:n.substring(1):n,type:"structure",structureBelong:t,parentTable:"",version:1},value:{pageData:{...v,compData:(m=v==null?void 0:v.compData)==null?void 0:m.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},g=yr.batchAddInsofDataApi):r==="update"?(c={dataList:l==null?void 0:l.map(v=>{var m;return{id:v==null?void 0:v.id,value:{pageData:{...v,compData:(m=v==null?void 0:v.compData)==null?void 0:m.filter(u=>(u==null?void 0:u.key)!=="tableContents")}}}})},g=yr.batchUpdateInsofDataApi):r==="delete"&&(c={ids:l},g=yr.batchDeleteInsofDataApi);const h=await g(c);if(((s=h==null?void 0:h.data)==null?void 0:s.code)===200)return h.data.result;throw el.ElMessage.error("保存响应失败"),new Error("保存响应失败")}catch{el.ElMessage.error("保存响应失败")}},ds=async(l,r,n,t)=>{var s,c,g,h,v,m,u,_,S,z,w;try{const j=(c=(s=l==null?void 0:l.results)==null?void 0:s.filter(T=>!(T!=null&&T.id)||typeof(T==null?void 0:T.id)=="string"))==null?void 0:c.map(T=>({key:{pageKey:l==null?void 0:l.pageKey,systemKey:sessionStorage.getItem("systemKey"),type:r,relatedInfo:n},value:{tableData:T}})),A=(h=(g=l==null?void 0:l.results)==null?void 0:g.filter(T=>(T==null?void 0:T.id)&&typeof(T==null?void 0:T.id)=="number"))==null?void 0:h.map(T=>({id:T==null?void 0:T.id,value:{tableData:T}})),N=JSON.parse(JSON.stringify(l)),Y=(v=N==null?void 0:N.results)==null?void 0:v.map(T=>T.id);let b;n?b=(_=(u=(m=hi.value)==null?void 0:m[bl.value])==null?void 0:u.filter(T=>{var x,k,$;return((x=T==null?void 0:T.key)==null?void 0:x.type)===r&&(($=(k=T==null?void 0:T.key)==null?void 0:k.relatedInfo)==null?void 0:$.target)===t}))==null?void 0:_.map(T=>T==null?void 0:T.id):b=(w=(z=(S=hi.value)==null?void 0:S[bl.value])==null?void 0:z.filter(T=>{var x;return((x=T==null?void 0:T.key)==null?void 0:x.type)===r}))==null?void 0:w.map(T=>T==null?void 0:T.id);const L=b==null?void 0:b.filter(T=>!(Y!=null&&Y.includes(T))&&typeof T=="number");(j==null?void 0:j.length)>0&&await yr.batchAddInsofDataApi({dataList:j}),(A==null?void 0:A.length)>0&&await yr.batchUpdateInsofDataApi({dataList:A}),(L==null?void 0:L.length)>0&&await yr.batchDeleteInsofDataApi({ids:L})}catch(j){throw new Error(j)}},Xf=async l=>{var m,u,_,S,z,w,j,A,N,Y;Er.setContentLoading(!0);const r=JSON.parse(JSON.stringify(jf.value));if(!Hf.value)return Er.setCacheStructures({key:Kf.value,data:r}),el.ElMessage.success("已暂存");const n=r==null?void 0:r.map(b=>b.id),t=n.filter(b=>{var L;return!((L=cs.value)!=null&&L.includes(b))}),s=(m=cs.value)==null?void 0:m.filter(b=>!n.includes(b)),c=[...t,...s].filter(b=>typeof b!==null&&typeof b<"u"),g=r==null?void 0:r.filter(b=>!b.id),h=r==null?void 0:r.filter(b=>b.id);let v=[];if(c&&(c==null?void 0:c.length)>0&&v.push(ni(c,"delete",l)),g&&(g==null?void 0:g.length)>0&&v.push(ni(g,"create",l)),h&&(h==null?void 0:h.length)>0&&v.push(ni(h,"update",l)),et.value&&((u=et.value)!=null&&u.isDelete&&((S=(_=et.value)==null?void 0:_.results)==null?void 0:S.length)>0&&((w=(z=et.value)==null?void 0:z.results)!=null&&w.every(b=>typeof b=="number"))?await yr.batchDeleteInsofDataApi({ids:(j=et.value)==null?void 0:j.results}):(console.log("itemGridData.value",et.value),v.push(await ds(et.value,"gridLayout")))),uo.value)for(const b in uo.value)v.push(await ds((A=uo.value)==null?void 0:A[b],"extend",{target:b,compId:(Y=(N=uo.value)==null?void 0:N[b])==null?void 0:Y.compId},b));await Promise.all(v).then(()=>{el.ElMessage.success("保存成功"),_r.setRefreshCurStructure(!0)}).catch(b=>{el.ElMessage.success(b)}),Er.setContentLoading(!1)},$t=l=>St(l),Zf=a.computed(()=>{var l;return(l=Yl.value)==null?void 0:l.filter(r=>(r==null?void 0:r.affix)&&(r==null?void 0:r.affix)!=="default")}),oc=a.computed(()=>{var l;return(l=Yl.value)==null?void 0:l.filter(r=>!(r!=null&&r.affix)||(r==null?void 0:r.affix)==="default")}),ic=a.ref(0),sc=a.ref(null),Qf="ocr_committed_temp_ids_v1",e0=(l,r)=>`${Qf}:${String(l??"")}:${String(r??"")}`,a0=(l,r,n)=>{try{const t=e0(l,r),s=sessionStorage.getItem(t),c=s?JSON.parse(s):[],g=Array.isArray(c)?c:[],h=Array.from(new Set([...g,...n||[]].map(v=>String(v)))).slice(-200);sessionStorage.setItem(t,JSON.stringify(h))}catch{}},So=async(l,r="data",n)=>{var s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl,Ra,al,ga;let t=((g=(c=(s=Hn.value)==null?void 0:s.filter(qe=>(qe==null?void 0:qe.condition)==="child"))==null?void 0:c[0])==null?void 0:g.value)??"";if((l==null?void 0:l.buttonName)==="新增"){let qe=(h=l==null?void 0:l.fixContent)==null?void 0:h.map(W=>{let la={};for(let ka in W)Array.isArray(W==null?void 0:W[ka])?la[ka]=JSON.stringify(W==null?void 0:W[ka]):la[ka]=W==null?void 0:W[ka];return la}),rl=await I.quoteApi({platId:parseInt((v=gl==null?void 0:gl.value)==null?void 0:v.plat_id),type:"fatherSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});rl=(m=rl==null?void 0:rl.data)==null?void 0:m.result,rl=rl==null?void 0:rl.filter(W=>{var la,ka;return!((W==null?void 0:W.fatherPath)!==""&&((ka=(la=W==null?void 0:W.quote)==null?void 0:la[0])==null?void 0:ka.menus)===(bl==null?void 0:bl.value))});let da=rl==null?void 0:rl.map(W=>{var Be,Fa;let la={},ka=qe==null?void 0:qe[0],Ce;return Array.isArray((Be=W==null?void 0:W.struct)==null?void 0:Be[0])?Ce=sa.getColumnChild((Fa=W==null?void 0:W.struct)==null?void 0:Fa[0]):Ce=W==null?void 0:W.struct,Ce==null||Ce.forEach(me=>{var fl,Ja;la[me.prop]=((fl=me==null?void 0:me.words)!=null&&fl[0]?ka==null?void 0:ka[(Ja=me==null?void 0:me.words)==null?void 0:Ja[0]]:ka==null?void 0:ka[me==null?void 0:me.prop])??""}),la.id="1",la.relatedId=`[${la.id}]`,delete la.sort,{tableName:"content_"+(W==null?void 0:W.id),tableContents:[la]}}),Xe=[{tableName:(u=l==null?void 0:l.relatedContents)==null?void 0:u.find(W=>W==null?void 0:W.includes("content")),tableContents:qe}];Xe=[...Xe,...da];let oa=await I.quoteApi({platId:parseInt((_=gl==null?void 0:gl.value)==null?void 0:_.plat_id),type:"sonSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});oa=(z=(S=oa==null?void 0:oa.data)==null?void 0:S.result)==null?void 0:z.filter(W=>!(Xe!=null&&Xe.find(la=>(la==null?void 0:la.tableName)==="content_"+(W==null?void 0:W.id)))),oa=oa==null?void 0:oa.filter(W=>{var la,ka;return!((W==null?void 0:W.fatherPath)!==""&&((ka=(la=W==null?void 0:W.quote)==null?void 0:la[0])==null?void 0:ka.menus)===(bl==null?void 0:bl.value))});let aa=oa==null?void 0:oa.map(W=>{var Be,Fa,me,fl,Ja,kl,Ha;let la={},ka=qe==null?void 0:qe[0],Ce;return Array.isArray((Be=W==null?void 0:W.struct)==null?void 0:Be[0])?Ce=sa.getColumnChild((Fa=W==null?void 0:W.struct)==null?void 0:Fa[0]):Ce=W==null?void 0:W.struct,((fl=(me=Ce==null?void 0:Ce[0])==null?void 0:me.words)!=null&&fl[0]?ka!=null&&ka[(kl=(Ja=Ce==null?void 0:Ce[0])==null?void 0:Ja.words)==null?void 0:kl[0]]:ka!=null&&ka[(Ha=Ce==null?void 0:Ce[0])==null?void 0:Ha.prop])?(Ce==null||Ce.forEach(tl=>{var Za,cl;la[tl.prop]=((Za=tl==null?void 0:tl.words)!=null&&Za[0]?ka==null?void 0:ka[(cl=tl==null?void 0:tl.words)==null?void 0:cl[0]]:ka==null?void 0:ka[tl==null?void 0:tl.prop])??""}),la.id="1",la.relatedId=`[${la.id}]`,delete la.sort):la=void 0,{tableName:"content_"+(W==null?void 0:W.id),tableContents:[la]}});aa=aa==null?void 0:aa.filter(W=>{var la;return!((la=W==null?void 0:W.tableContents)!=null&&la.every(ka=>ka===void 0))}),Xe=[...Xe,...aa],await I.pageBatchAddApi({platId:parseInt((w=gl==null?void 0:gl.value)==null?void 0:w.plat_id),changeContents:Xe});let ca=[];Xe==null||Xe.forEach(W=>{var la;(la=W==null?void 0:W.tableContents)==null||la.forEach(ka=>{ca.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ka),request_result:"{}",is_delete:!1,request_table:W==null?void 0:W.tableName,request_type:"add"})})}),await I.pageBatchAddApi({platId:parseInt((j=gl==null?void 0:gl.value)==null?void 0:j.plat_id),changeContents:[{tableName:"log",tableContents:ca}]})}if((l==null?void 0:l.buttonName)==="OCR批量新增"){const qe=((l==null?void 0:l.ocrRows)||[]).map(oa=>oa==null?void 0:oa.id).filter(oa=>oa!=null),rl=((l==null?void 0:l.ocrRows)||[]).map(oa=>{const aa={...oa};return delete aa._isOCRRow,delete aa._ocrTableId,Object.keys(aa).forEach(ca=>{/(^|\.)证书附件$/.test(ca)&&Array.isArray(aa[ca])&&(aa[ca]=JSON.stringify(aa[ca].map(W=>({url:(W==null?void 0:W.url)||"",name:(W==null?void 0:W.name)||(W==null?void 0:W.fileName)||"",fileName:(W==null?void 0:W.fileName)||(W==null?void 0:W.name)||""})).filter(W=>W.url||W.name)))}),aa});let da=[{tableName:(A=l==null?void 0:l.relatedContents)==null?void 0:A.find(oa=>oa==null?void 0:oa.includes("content")),tableContents:rl}];await I.pageBatchAddApi({platId:parseInt((N=gl==null?void 0:gl.value)==null?void 0:N.plat_id),changeContents:da});let Xe=[];da==null||da.forEach(oa=>{var aa;(aa=oa==null?void 0:oa.tableContents)==null||aa.forEach(ca=>{Xe.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ca),request_result:"{}",is_delete:!1,request_table:oa==null?void 0:oa.tableName,request_type:"ocrBatchAdd"})})}),await I.pageBatchAddApi({platId:parseInt((Y=gl==null?void 0:gl.value)==null?void 0:Y.plat_id),changeContents:[{tableName:"log",tableContents:Xe}]}),a0(l==null?void 0:l.parentTableId,l==null?void 0:l.index,qe)}if((l==null?void 0:l.buttonName)==="编辑"){const rl=((l==null?void 0:l.fixContent)||(l==null?void 0:l.singleContent)||[]||[]).map(Ce=>{const Be={...Ce};return delete Be._isOCRRow,delete Be._ocrTableId,delete Be._isTemp,delete Be.tableEditType,delete Be.index,Be});let da=rl==null?void 0:rl.map(Ce=>{let Be={};for(let Fa in Ce)Array.isArray(Ce==null?void 0:Ce[Fa])?Be[Fa]=JSON.stringify(Ce==null?void 0:Ce[Fa]):Be[Fa]=Ce==null?void 0:Ce[Fa];return Be}),Xe=await I.quoteApi({platId:parseInt((b=gl==null?void 0:gl.value)==null?void 0:b.plat_id),type:"fatherSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});Xe=(L=Xe==null?void 0:Xe.data)==null?void 0:L.result,Xe=Xe==null?void 0:Xe.filter(Ce=>{var Be,Fa;return!((Ce==null?void 0:Ce.fatherPath)!==""&&((Fa=(Be=Ce==null?void 0:Ce.quote)==null?void 0:Be[0])==null?void 0:Fa.menus)===(bl==null?void 0:bl.value))});let oa=(T=da==null?void 0:da[0])==null?void 0:T.id,aa=[{tableName:(x=l==null?void 0:l.relatedContents)==null?void 0:x.find(Ce=>Ce==null?void 0:Ce.includes("content")),tableContents:da}],ca=(k=Xe==null?void 0:Xe.map(Ce=>{var Fa,me,fl,Ja,kl;let Be=(Fa=Ce==null?void 0:Ce.contents)==null?void 0:Fa.filter(Ha=>{var tl,Za;return JSON.stringify(Ha==null?void 0:Ha.relatedId)!=="{}"&&(Ha==null?void 0:Ha.relatedId)!==""&&(Ha!=null&&Ha.relatedId)?(tl=Ha==null?void 0:Ha.relatedId)==null?void 0:tl.includes(parseInt(oa)):(Ha==null?void 0:Ha.sort)===((Za=da==null?void 0:da[0])==null?void 0:Za.sort)});if((Be==null?void 0:Be.length)>0){let Ha=da==null?void 0:da[0];Ha={...Ha,id:(me=Be==null?void 0:Be[0])==null?void 0:me.id};let tl={},Za=Ha,cl;return Array.isArray((fl=Ce==null?void 0:Ce.struct)==null?void 0:fl[0])?cl=sa.getColumnChild((Ja=Ce==null?void 0:Ce.struct)==null?void 0:Ja[0]):cl=Ce==null?void 0:Ce.struct,cl==null||cl.forEach(ul=>{var Wl,ql;tl[ul.prop]=((Wl=ul==null?void 0:ul.words)!=null&&Wl[0]?Za==null?void 0:Za[(ql=ul==null?void 0:ul.words)==null?void 0:ql[0]]:Za==null?void 0:Za[ul==null?void 0:ul.prop])??""}),tl.id=(kl=Be==null?void 0:Be[0])==null?void 0:kl.id,delete tl.sort,delete tl.relatedId,{tableName:"content_"+(Ce==null?void 0:Ce.id),tableContents:[tl]}}else return}))==null?void 0:k.filter(Ce=>Ce);aa=[...aa,...ca];let W=await I.quoteApi({platId:parseInt(($=gl==null?void 0:gl.value)==null?void 0:$.plat_id),type:"sonSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});W=(X=(U=W==null?void 0:W.data)==null?void 0:U.result)==null?void 0:X.filter(Ce=>!(aa!=null&&aa.find(Be=>(Be==null?void 0:Be.tableName)==="content_"+(Ce==null?void 0:Ce.id)))),W=W==null?void 0:W.filter(Ce=>{var Be,Fa;return!((Ce==null?void 0:Ce.fatherPath)!==""&&((Fa=(Be=Ce==null?void 0:Ce.quote)==null?void 0:Be[0])==null?void 0:Fa.menus)===(bl==null?void 0:bl.value))});let la=(be=W==null?void 0:W.map(Ce=>{var Fa,me,fl,Ja,kl;let Be=(Fa=Ce==null?void 0:Ce.contents)==null?void 0:Fa.filter(Ha=>{var tl,Za;return JSON.stringify(Ha==null?void 0:Ha.relatedId)!=="{}"&&(Ha==null?void 0:Ha.relatedId)!==""&&(Ha!=null&&Ha.relatedId)?(tl=Ha==null?void 0:Ha.relatedId)==null?void 0:tl.includes(parseInt(oa)):(Ha==null?void 0:Ha.sort)===((Za=da==null?void 0:da[0])==null?void 0:Za.sort)});if((Be==null?void 0:Be.length)>0){let Ha=da==null?void 0:da[0];Ha={...Ha,id:(me=Be==null?void 0:Be[0])==null?void 0:me.id};let tl={},Za=Ha,cl;return Array.isArray((fl=Ce==null?void 0:Ce.struct)==null?void 0:fl[0])?cl=sa.getColumnChild((Ja=Ce==null?void 0:Ce.struct)==null?void 0:Ja[0]):cl=Ce==null?void 0:Ce.struct,cl==null||cl.forEach(ul=>{var Wl,ql;tl[ul.prop]=((Wl=ul==null?void 0:ul.words)!=null&&Wl[0]?Za==null?void 0:Za[(ql=ul==null?void 0:ul.words)==null?void 0:ql[0]]:Za==null?void 0:Za[ul==null?void 0:ul.prop])??""}),tl.id=(kl=Be==null?void 0:Be[0])==null?void 0:kl.id,delete tl.sort,delete tl.relatedId,{tableName:"content_"+(Ce==null?void 0:Ce.id),tableContents:[tl]}}else return}))==null?void 0:be.filter(Ce=>Ce);aa=[...aa,...la],await I.pageBatchUpdateApi({platId:parseInt((ze=gl==null?void 0:gl.value)==null?void 0:ze.plat_id),changeContents:aa});let ka=[];aa==null||aa.forEach(Ce=>{var Be;(Be=Ce==null?void 0:Ce.tableContents)==null||Be.forEach(Fa=>{ka.push({id:"1",request_method:"Post",request_url:"/platform/page/update",request_param:JSON.stringify(Fa),request_result:"{}",is_delete:!1,request_table:Ce==null?void 0:Ce.tableName,request_type:"update"})})}),await I.pageBatchAddApi({platId:parseInt((Ee=gl==null?void 0:gl.value)==null?void 0:Ee.plat_id),changeContents:[{tableName:"log",tableContents:ka}]})}if((l==null?void 0:l.buttonName)==="删除"){let qe=[{tableName:(ne=l==null?void 0:l.relatedContents)==null?void 0:ne.find(W=>W==null?void 0:W.includes("content")),tableContents:l==null?void 0:l.fixContent}],rl=await I.quoteApi({platId:parseInt((ke=gl==null?void 0:gl.value)==null?void 0:ke.plat_id),type:"fatherSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});rl=(Z=rl==null?void 0:rl.data)==null?void 0:Z.result,rl=rl==null?void 0:rl.filter(W=>{var la,ka;return!((W==null?void 0:W.fatherPath)!==""&&((ka=(la=W==null?void 0:W.quote)==null?void 0:la[0])==null?void 0:ka.menus)===(bl==null?void 0:bl.value))});let da=(Ke=(de=l==null?void 0:l.fixContent)==null?void 0:de[0])==null?void 0:Ke.id,Xe=(Na=rl==null?void 0:rl.map(W=>{var ka,Ce,Be,Fa,me,fl;let la=(ka=W==null?void 0:W.contents)==null?void 0:ka.filter(Ja=>{var kl,Ha,tl;return JSON.stringify(Ja==null?void 0:Ja.relatedId)!=="{}"&&(Ja==null?void 0:Ja.relatedId)!==""&&(Ja!=null&&Ja.relatedId)?(kl=Ja==null?void 0:Ja.relatedId)==null?void 0:kl.includes(parseInt(da)):(Ja==null?void 0:Ja.sort)===((tl=(Ha=l==null?void 0:l.fixContent)==null?void 0:Ha[0])==null?void 0:tl.sort)});if((la==null?void 0:la.length)>0){let Ja=(Ce=l==null?void 0:l.fixContent)==null?void 0:Ce[0];Ja={...Ja,id:(Be=la==null?void 0:la[0])==null?void 0:Be.id};let kl={},Ha=Ja,tl;return Array.isArray((Fa=W==null?void 0:W.struct)==null?void 0:Fa[0])?tl=sa.getColumnChild((me=W==null?void 0:W.struct)==null?void 0:me[0]):tl=W==null?void 0:W.struct,tl==null||tl.forEach(Za=>{var cl,ul;kl[Za.prop]=((cl=Za==null?void 0:Za.words)!=null&&cl[0]?Ha==null?void 0:Ha[(ul=Za==null?void 0:Za.words)==null?void 0:ul[0]]:Ha==null?void 0:Ha[Za==null?void 0:Za.prop])??""}),kl.id=(fl=la==null?void 0:la[0])==null?void 0:fl.id,delete kl.sort,delete kl.relatedId,{tableName:"content_"+(W==null?void 0:W.id),tableContents:[kl]}}else return}))==null?void 0:Na.filter(W=>W);qe=[...qe,...Xe];let oa=await I.quoteApi({platId:parseInt((te=gl==null?void 0:gl.value)==null?void 0:te.plat_id),type:"sonSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});oa=(le=(D=oa==null?void 0:oa.data)==null?void 0:D.result)==null?void 0:le.filter(W=>!(qe!=null&&qe.find(la=>(la==null?void 0:la.tableName)==="content_"+(W==null?void 0:W.id)))),oa=oa==null?void 0:oa.filter(W=>{var la,ka;return!((W==null?void 0:W.fatherPath)!==""&&((ka=(la=W==null?void 0:W.quote)==null?void 0:la[0])==null?void 0:ka.menus)===(bl==null?void 0:bl.value))});let aa=(ye=oa==null?void 0:oa.map(W=>{var ka,Ce,Be,Fa,me,fl;let la=(ka=W==null?void 0:W.contents)==null?void 0:ka.filter(Ja=>{var kl,Ha,tl;return JSON.stringify(Ja==null?void 0:Ja.relatedId)!=="{}"&&(Ja==null?void 0:Ja.relatedId)!==""&&(Ja!=null&&Ja.relatedId)?(kl=Ja==null?void 0:Ja.relatedId)==null?void 0:kl.includes(parseInt(da)):(Ja==null?void 0:Ja.sort)===((tl=(Ha=l==null?void 0:l.fixContent)==null?void 0:Ha[0])==null?void 0:tl.sort)});if((la==null?void 0:la.length)>0){let Ja=(Ce=l==null?void 0:l.fixContent)==null?void 0:Ce[0];Ja={...Ja,id:(Be=la==null?void 0:la[0])==null?void 0:Be.id};let kl={},Ha=Ja,tl;return Array.isArray((Fa=W==null?void 0:W.struct)==null?void 0:Fa[0])?tl=sa.getColumnChild((me=W==null?void 0:W.struct)==null?void 0:me[0]):tl=W==null?void 0:W.struct,tl==null||tl.forEach(Za=>{var cl,ul;kl[Za.prop]=((cl=Za==null?void 0:Za.words)!=null&&cl[0]?Ha==null?void 0:Ha[(ul=Za==null?void 0:Za.words)==null?void 0:ul[0]]:Ha==null?void 0:Ha[Za==null?void 0:Za.prop])??""}),kl.id=(fl=la==null?void 0:la[0])==null?void 0:fl.id,delete kl.sort,delete kl.relatedId,{tableName:"content_"+(W==null?void 0:W.id),tableContents:[kl]}}else return}))==null?void 0:ye.filter(W=>W);qe=[...qe,...aa],await I.pageBatchDeleteApi({platId:parseInt((ue=gl==null?void 0:gl.value)==null?void 0:ue.plat_id),changeContents:qe});let ca=[];qe==null||qe.forEach(W=>{var la;(la=W==null?void 0:W.tableContents)==null||la.forEach(ka=>{ca.push({id:"1",request_method:"Post",request_url:"/platform/page/delete",request_param:JSON.stringify(ka),request_result:"{}",is_delete:!1,request_table:W==null?void 0:W.tableName,request_type:"delete"})})}),await I.pageBatchAddApi({platId:parseInt((Ne=gl==null?void 0:gl.value)==null?void 0:Ne.plat_id),changeContents:[{tableName:"log",tableContents:ca}]})}if((l==null?void 0:l.buttonName)==="复制新增"){let qe=await I.getPageDataApi({platId:parseInt((pa=gl==null?void 0:gl.value)==null?void 0:pa.plat_id),pageName:"menu"});if(qe=(wa=qe==null?void 0:qe.data)==null?void 0:wa.result,qe!=null&&qe.find(rl=>(rl==null?void 0:rl.father_name)===bl.value+"/")){tc.value=l,nc.value=qe==null?void 0:qe.filter(Xe=>(Xe==null?void 0:Xe.father_name)===bl.value+"/");let rl=(ee=(ja=l==null?void 0:l.columns)==null?void 0:ja.find(Xe=>Xe==null?void 0:Xe.mainKey))==null?void 0:ee.prop,da=(Pe=(ea=l==null?void 0:l.fixContent)==null?void 0:ea[0])==null?void 0:Pe[rl];_i.value=!0,Rt.value=[{prop:rl,label:rl,name:rl,value:da}]}else{let rl=(xa=l==null?void 0:l.fixContent)==null?void 0:xa.map(oa=>{let aa={};for(let ca in oa)Array.isArray(oa==null?void 0:oa[ca])?aa[ca]=JSON.stringify(oa==null?void 0:oa[ca]):aa[ca]=oa==null?void 0:oa[ca];return aa.relatedId="",aa}),da=[{tableName:(He=l==null?void 0:l.relatedContents)==null?void 0:He.find(oa=>oa==null?void 0:oa.includes("content")),tableContents:rl}];await I.pageBatchAddApi({platId:parseInt((Te=gl==null?void 0:gl.value)==null?void 0:Te.plat_id),changeContents:da});let Xe=[];da==null||da.forEach(oa=>{var aa;(aa=oa==null?void 0:oa.tableContents)==null||aa.forEach(ca=>{Xe.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ca),request_result:"{}",is_delete:!1,request_table:oa==null?void 0:oa.tableName,request_type:"copyAdd"})})}),await I.pageBatchAddApi({platId:parseInt((Re=gl==null?void 0:gl.value)==null?void 0:Re.plat_id),changeContents:[{tableName:"log",tableContents:Xe}]})}}if((l==null?void 0:l.buttonName)==="methodButton"){let qe=((Va=(qa=(Ye=l==null?void 0:l.columns)==null?void 0:Ye.map(Ce=>Ce==null?void 0:Ce.filter))==null?void 0:qa.filter(Ce=>Ce!==""))==null?void 0:Va[0])??"";qe=La.analyzeSplitToContent(qe,","),qe=(qe==null?void 0:qe.find(Ce=>Ce==null?void 0:Ce.includes("@Filter")))??"";let rl=(P=l==null?void 0:l.fixContent)==null?void 0:P.map(Ce=>{let Be={};for(let Fa in Ce)Array.isArray(Ce==null?void 0:Ce[Fa])?Be[Fa]=JSON.stringify(Ce==null?void 0:Ce[Fa]):Be[Fa]=Ce==null?void 0:Ce[Fa];return Be}),da=await I.quoteApi({platId:parseInt((F=gl==null?void 0:gl.value)==null?void 0:F.plat_id),type:"fatherSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});da=(J=da==null?void 0:da.data)==null?void 0:J.result,da=da==null?void 0:da.filter(Ce=>{var Be,Fa;return!((Ce==null?void 0:Ce.fatherPath)!==""&&((Fa=(Be=Ce==null?void 0:Ce.quote)==null?void 0:Be[0])==null?void 0:Fa.menus)===(bl==null?void 0:bl.value))});let Xe=(ce=(ie=l==null?void 0:l.columns)==null?void 0:ie[0])==null?void 0:ce.prop,oa=(ma=rl==null?void 0:rl[0])==null?void 0:ma[Xe],aa=[{tableName:(na=l==null?void 0:l.relatedContents)==null?void 0:na.find(Ce=>Ce==null?void 0:Ce.includes("content")),tableContents:rl}],ca=(Ie=da==null?void 0:da.map(Ce=>{var Fa,me,fl,Ja,kl;let Be=(Fa=Ce==null?void 0:Ce.contents)==null?void 0:Fa.filter(Ha=>{var tl;return(tl=Object.values(Ha))==null?void 0:tl.find(Za=>Za===oa)});if((Be==null?void 0:Be.length)>0){let Ha=rl==null?void 0:rl[0];Ha={...Ha,id:(me=Be==null?void 0:Be[0])==null?void 0:me.id};let tl={},Za=Ha,cl;return Array.isArray((fl=Ce==null?void 0:Ce.struct)==null?void 0:fl[0])?cl=sa.getColumnChild((Ja=Ce==null?void 0:Ce.struct)==null?void 0:Ja[0]):cl=Ce==null?void 0:Ce.struct,cl==null||cl.forEach(ul=>{var Wl,ql;tl[ul.prop]=((Wl=ul==null?void 0:ul.words)!=null&&Wl[0]?Za==null?void 0:Za[(ql=ul==null?void 0:ul.words)==null?void 0:ql[0]]:Za==null?void 0:Za[ul==null?void 0:ul.prop])??""}),tl.id=(kl=Be==null?void 0:Be[0])==null?void 0:kl.id,delete tl.sort,{tableName:"content_"+(Ce==null?void 0:Ce.id),tableContents:[tl]}}else return}))==null?void 0:Ie.filter(Ce=>Ce);aa=[...aa,...ca];let W=await I.quoteApi({platId:parseInt((_e=gl==null?void 0:gl.value)==null?void 0:_e.plat_id),type:"sonSyncs",related:[{menus:t!==""?bl.value+"/"+t:bl.value,groups:l==null?void 0:l.name}]});if(W=(ve=(Ca=W==null?void 0:W.data)==null?void 0:Ca.result)==null?void 0:ve.filter(Ce=>!(aa!=null&&aa.find(Be=>(Be==null?void 0:Be.tableName)==="content_"+(Ce==null?void 0:Ce.id)))),W=W==null?void 0:W.filter(Ce=>{var Be,Fa;return!((Ce==null?void 0:Ce.fatherPath)!==""&&((Fa=(Be=Ce==null?void 0:Ce.quote)==null?void 0:Be[0])==null?void 0:Fa.menus)===(bl==null?void 0:bl.value))}),qe&&qe!==""){(qe==null?void 0:qe[(qe==null?void 0:qe.length)-1])===","&&(qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1)),qe=(Qe=(Je=qe==null?void 0:qe.replace("(",co))==null?void 0:Je.split(co))==null?void 0:Qe[1],qe=qe==null?void 0:qe.slice(0,(qe==null?void 0:qe.length)-1),(qe==null?void 0:qe[0])==="*"&&(qe="{"+((_a=(Fe=qe==null?void 0:qe.replace("{",co))==null?void 0:Fe.split(co))==null?void 0:_a[1])),qe=(Le=qe==null?void 0:qe.replaceAll("{",""))==null?void 0:Le.replaceAll("}","");let Ce=sa.calculatorAndToOr(qe);Ce=Ce==null?void 0:Ce[0];let Be;if((va=Object.values(Ce))!=null&&va.some(Fa=>(Fa==null?void 0:Fa[0])==="*")){let Fa=(Se=(re=Hn.value)==null?void 0:re.find(me=>(me==null?void 0:me.condition)==="child"))!=null&&Se.value?(Ur==null?void 0:Ur.value)+"/"+((je=(K=Hn.value)==null?void 0:K.find(me=>(me==null?void 0:me.condition)==="child"))==null?void 0:je.value):Ur==null?void 0:Ur.value;Be=await $r(Fa,!1)}for(let Fa in Ce)if(((De=Ce==null?void 0:Ce[Fa])==null?void 0:De[0])==="*"){let me=(Aa=(Ua=(Ba=Ce[Fa])==null?void 0:Ba.slice(1,(Ma=Ce[Fa])==null?void 0:Ma.length))==null?void 0:Ua.split(":"))==null?void 0:Aa[0],fl=(we=(Ae=Ce[Fa])==null?void 0:Ae.split(":"))==null?void 0:we[1],Ja=(Ea=Be==null?void 0:Be.filter(kl=>(kl==null?void 0:kl.name)===me))==null?void 0:Ea[0];Ja=(ol=(Ge=Ja==null?void 0:Ja.compData)==null?void 0:Ge.find(kl=>(kl==null?void 0:kl.key)==="tableContents"))==null?void 0:ol.contents,Ja=(Sl=Ja==null?void 0:Ja[0])==null?void 0:Sl[fl],Ce[Fa]=Ja}qe=((Nl=Object.values(Ce))==null?void 0:Nl[0])??""}let la=(Ra=W==null?void 0:W.map(Ce=>{var Fa,me,fl,Ja,kl;let Be=(Fa=Ce==null?void 0:Ce.contents)==null?void 0:Fa.filter(Ha=>{var tl;return(tl=Object.values(Ha))==null?void 0:tl.find(Za=>Za===(qe===""?oa:qe))});if((Be==null?void 0:Be.length)>0){let Ha=rl==null?void 0:rl[0];Ha={...Ha,id:(me=Be==null?void 0:Be[0])==null?void 0:me.id};let tl={},Za=Ha,cl;return Array.isArray((fl=Ce==null?void 0:Ce.struct)==null?void 0:fl[0])?cl=sa.getColumnChild((Ja=Ce==null?void 0:Ce.struct)==null?void 0:Ja[0]):cl=Ce==null?void 0:Ce.struct,cl==null||cl.forEach(ul=>{var ql,Pl,Hl,gr;let Wl=(ql=l==null?void 0:l.columns)==null?void 0:ql.find(rr=>{var kr,wr,Sr;return((wr=(kr=rr==null?void 0:rr.words)==null?void 0:kr[0])==null?void 0:wr.replaceAll("'",""))===(ul==null?void 0:ul.prop)&&((Sr=rr==null?void 0:rr.functionRelatedWords)==null?void 0:Sr.length)>0});Wl=(Pl=Wl==null?void 0:Wl.prop)==null?void 0:Pl.replaceAll("'",""),tl[ul.prop]=((Hl=ul==null?void 0:ul.words)!=null&&Hl[0]?Za==null?void 0:Za[(gr=ul==null?void 0:ul.words)==null?void 0:gr[0]]:(Za==null?void 0:Za[ul==null?void 0:ul.prop])??(Za==null?void 0:Za[Wl]))??void 0}),tl.id=(kl=Be==null?void 0:Be[0])==null?void 0:kl.id,delete tl.sort,{tableName:"content_"+(Ce==null?void 0:Ce.id),tableContents:[tl]}}else return}))==null?void 0:Ra.filter(Ce=>Ce);aa=[...aa,...la],await I.pageBatchUpdateApi({platId:parseInt((al=gl==null?void 0:gl.value)==null?void 0:al.plat_id),changeContents:aa});let ka=[];aa==null||aa.forEach(Ce=>{var Be;(Be=Ce==null?void 0:Ce.tableContents)==null||Be.forEach(Fa=>{ka.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Fa),request_result:"{}",is_delete:!1,request_table:Ce==null?void 0:Ce.tableName,request_type:"method"})})}),await I.pageBatchAddApi({platId:parseInt((ga=gl==null?void 0:gl.value)==null?void 0:ga.plat_id),changeContents:[{tableName:"log",tableContents:ka}]})}_r.setRefreshCurStructure(!0),await mi(l)},mi=async l=>{var c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b,L,T,x;let r=(c=l==null?void 0:l.relatedContents)==null?void 0:c.filter(k=>k==null?void 0:k.includes("content_")),n=await I.getAllTables({platId:parseInt((g=gl==null?void 0:gl.value)==null?void 0:g.plat_id),tableNames:r});if(n=(v=(h=n==null?void 0:n.data)==null?void 0:h.result)==null?void 0:v[0],!n||!Array.isArray(n))return;n=n==null?void 0:n.map(k=>{k==null||delete k.source_table;const $={};for(let U in k){const X=k==null?void 0:k[U],be=X&&Object.prototype.toString.call(X)==="[object Object]"&&Object.keys(X).length===0,ze=Array.isArray(X)&&X.length===0;X==null||X==="{}"||be||ze?$[U]="":$[U]=X}return $});let t=(u=(m=r==null?void 0:r[0])==null?void 0:m.split("_"))==null?void 0:u[1],s=(_=Yl.value)==null?void 0:_.find(k=>(k==null?void 0:k.id)===t);if(s&&(s==null?void 0:s.comp)!=="Tabs"){let k=(S=s.compData)==null?void 0:S.map($=>{var U;if(($==null?void 0:$.key)==="tableContents"){let X={...$,contents:n};return X.contents=(U=(X==null?void 0:X.contents)??[])==null?void 0:U.map(be=>{let ze={};for(let Ee in be)JSON.stringify(be==null?void 0:be[Ee])==="{}"?ze[Ee]="":ze[Ee]=be==null?void 0:be[Ee];return ze}),X}return $});s.compData=await _o(k,{}),Yl.value=(z=Yl.value)==null?void 0:z.map($=>(($==null?void 0:$.id)===(s==null?void 0:s.id)&&($=s),$))}else{let k=(w=Yl.value)==null?void 0:w.filter($=>($==null?void 0:$.comp)==="Tabs"||($==null?void 0:$.comp)==="ParentItem");if(k=(j=k==null?void 0:k.filter($=>{var U,X;return((U=$==null?void 0:$.compData)==null?void 0:U.find(be=>(be==null?void 0:be.id)===t))||((X=$==null?void 0:$.children)==null?void 0:X.find(be=>(be==null?void 0:be.id)===t))}))==null?void 0:j[0],k){const $=((A=k==null?void 0:k.compData)==null?void 0:A.find(U=>(U==null?void 0:U.id)===t))??((N=k==null?void 0:k.children)==null?void 0:N.find(U=>(U==null?void 0:U.id)===t));if($){let U;$!=null&&$.compData&&((Y=$.compData)==null?void 0:Y.length)>0?U=(b=$.compData)==null?void 0:b.map(X=>(X==null?void 0:X.key)==="tableContents"?{...X,contents:n}:X):U=(L=$.children)==null?void 0:L.map(X=>(X==null?void 0:X.key)==="tableContents"?{...X,contents:n}:X),$.compData=await _o(U,{}),k.compData=(T=k.compData)==null?void 0:T.map(X=>((X==null?void 0:X.id)===($==null?void 0:$.id)&&(X=$),X)),Yl.value=(x=Yl.value)==null?void 0:x.map(X=>((k!=null&&k.tabInform?(X==null?void 0:X.tabInform)===(k==null?void 0:k.tabInform):(X==null?void 0:X.name)===(k==null?void 0:k.name))&&(X=k),X))}}}},l0=l=>{let r=Rt.value;Rt.value=r==null?void 0:r.map(n=>(n.value=l==null?void 0:l[n==null?void 0:n.prop],n))},r0=async()=>{var S,z,w,j,A,N,Y,b,L,T;let l=tc.value,r=nc.value,n=(z=(S=l==null?void 0:l.columns)==null?void 0:S.find(x=>x==null?void 0:x.mainKey))==null?void 0:z.prop,t=(j=(w=Rt.value)==null?void 0:w[0])==null?void 0:j.value,s=(A=l==null?void 0:l.fixContent)==null?void 0:A.map(x=>{var $;let k={};for(let U in x)Array.isArray(x==null?void 0:x[U])?k[U]=JSON.stringify(x==null?void 0:x[U]):k[U]=x==null?void 0:x[U];return($=l==null?void 0:l.columns)==null||$.forEach(U=>{(U==null?void 0:U.formType)==="Upload"&&(k==null?void 0:k[U==null?void 0:U.prop])===""&&(k[U==null?void 0:U.prop]="{}")}),k[n]=t,k}),c=[{tableName:(N=l==null?void 0:l.relatedContents)==null?void 0:N.find(x=>x==null?void 0:x.includes("content")),tableContents:s}];await I.pageBatchAddApi({platId:parseInt((Y=gl==null?void 0:gl.value)==null?void 0:Y.plat_id),changeContents:c}),r=r==null?void 0:r.filter(x=>{var k,$,U;return(U=x==null?void 0:x.object_name)==null?void 0:U.includes(($=(k=l==null?void 0:l.fixContent)==null?void 0:k[0])==null?void 0:$[n])});let g=[],h=new Map;r==null||r.forEach(x=>{g.push(`content_${x==null?void 0:x.object_id}`),g.push(`struct_${x==null?void 0:x.object_id}`),h.set(x==null?void 0:x.object_id,x)});let v=await I.getAllTables({platId:parseInt((b=gl==null?void 0:gl.value)==null?void 0:b.plat_id),tableNames:g});v=(L=v==null?void 0:v.data)==null?void 0:L.result;let m=[],u=[];v=La.chunk(v,2),v==null||v.forEach(x=>{var U,X,be,ze,Ee,ne,ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja,ee;let k=h.get((ze=(be=(X=(U=x==null?void 0:x[1])==null?void 0:U[0])==null?void 0:X.source_table)==null?void 0:be.split("_"))==null?void 0:ze[1]),$=(ke=(ne=(Ee=k==null?void 0:k.object_name)==null?void 0:Ee.split("/"))==null?void 0:ne.filter((ea,Pe)=>{var xa,He;return((He=(xa=k==null?void 0:k.object_name)==null?void 0:xa.split("/"))==null?void 0:He.length)-1!==Pe}))==null?void 0:ke.join("/");if($=$+"/"+t,u!=null&&u.find(ea=>(ea==null?void 0:ea.path)===$)||u.push({fatherPath:k==null?void 0:k.father_name,isShow:k==null?void 0:k.is_show,path:$}),((de=(Z=x==null?void 0:x[1])==null?void 0:Z[0])==null?void 0:de.类型)==="Table"){let ea=((te=(Na=(Ke=x==null?void 0:x[1])==null?void 0:Ke[0])==null?void 0:Na.结构)==null?void 0:te.contents)??[],Pe=pl.safeClone(ea);Array.isArray(Pe==null?void 0:Pe[0])&&(Pe=sa.getColumnChild(Pe==null?void 0:Pe[0]));let xa=[];if(((D=x==null?void 0:x[0])==null?void 0:D.length)>0&&(xa=(le=x==null?void 0:x[0])==null?void 0:le.map(He=>Pe==null?void 0:Pe.map(Re=>(Re=(He==null?void 0:He[Re==null?void 0:Re.prop])??"",Re)))),m!=null&&m.find(He=>(He==null?void 0:He.key)===$)){let He=(ye=m==null?void 0:m.find(Re=>(Re==null?void 0:Re.key)===$))==null?void 0:ye.contents;He.push({isShow:k==null?void 0:k.is_show,filter:((pa=(Ne=(ue=x==null?void 0:x[1])==null?void 0:ue[0])==null?void 0:Ne.引用)==null?void 0:pa.contents)??"",key:"Table",name:Object.values(k==null?void 0:k.name),tableColumns:ea,tableContents:xa});let Te=m==null?void 0:m.findIndex(Re=>(Re==null?void 0:Re.key)===$);m[Te].contents=He}else m.push({key:$,contents:[{isShow:k==null?void 0:k.is_show,filter:((ee=(ja=(wa=x==null?void 0:x[1])==null?void 0:wa[0])==null?void 0:ja.引用)==null?void 0:ee.contents)??"",key:"Table",name:Object.values(k==null?void 0:k.name),tableColumns:ea,tableContents:xa}]})}});let _=[];_.push({key:"menuPath",contents:u}),_=[..._,...m],await I.createPlatFormDataApi({platId:parseInt((T=gl==null?void 0:gl.value)==null?void 0:T.plat_id),changeData:_}),_i.value=!1,_r.setRefreshTable(!0)},Eo=async(l,r)=>{},Do=async l=>{Yl.value=await sa.getDeepDiffItems(l),_r.setItemData(Yl.value),_r.setOriginalData(Yl.value)};a.ref();const n0=a.ref(null),t0=()=>{var l,r;console.log("倒计时结束时"),I.ElMessageBox.alert(`超时未提交,【${(r=(l=bl.value)==null?void 0:l.split("/"))==null?void 0:r[0]}】失败`,"告警",{confirmButtonText:"确认",type:"error"})},cc=a.ref([]),o0=a.computed(()=>{var l,r;return(r=(l=hi.value)==null?void 0:l[bl.value])==null?void 0:r.filter(n=>{var t;return((t=n==null?void 0:n.key)==null?void 0:t.type)==="gridLayout"})});a.watch(()=>[Wf.value],()=>{nn.setSelectTitle([]),nn.setChooseTitle([])},{deep:!0});a.watch(()=>Co.value,async(l,r)=>{var t,s,c,g,h,v;if(JSON.stringify(l)===JSON.stringify(r))return;let n=(t=Co.value)==null?void 0:t.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==Ur.value);if((n==null?void 0:n.length)>0){Er.setContentLoading(!0);let m=((s=n==null?void 0:n[0])==null?void 0:s.relatedContent)??(bl==null?void 0:bl.value),u=m+"/"+((c=n==null?void 0:n[0])==null?void 0:c.value),_=!!((g=n==null?void 0:n[0])!=null&&g.parentContent),S=await $r(u,_,{originPath:m});S=(h=S==null?void 0:S.filter(j=>j))==null?void 0:h.map(j=>(j.isShow=!0,j)),console.log(S,"loadingContents");let z=await sa.getDeepDiffItems(S),w=z==null?void 0:z.filter(j=>j==null?void 0:j.choice);Ao.setSelectTab((v=w==null?void 0:w[0])==null?void 0:v.choiceName),z=z==null?void 0:z.filter(j=>{var A;return!(j!=null&&j.choiceName)||(j==null?void 0:j.choiceName)===((A=w==null?void 0:w[0])==null?void 0:A.choiceName)}),Yl.value=z,Er.setContentLoading(!1)}});const i0=(l,r)=>{setTimeout(async()=>{var h,v,m;let n=(h=Co.value)==null?void 0:h.filter(u=>(u==null?void 0:u.condition)==="child"&&(u==null?void 0:u.value)!==""&&(u==null?void 0:u.parentContent)!==Ur.value),t=bl==null?void 0:bl.value,s=bl==null?void 0:bl.value;(n==null?void 0:n.length)>0&&(s=((v=n==null?void 0:n[0])==null?void 0:v.relatedContent)??(bl==null?void 0:bl.value),t=s+"/"+((m=n==null?void 0:n[0])==null?void 0:m.value));let c=await $r(t,!1,{originPath:s});c=c==null?void 0:c.map(u=>(u.isShow=!0,u));let g=await sa.getDeepDiffItems(c);Yl.value=g==null?void 0:g.filter(u=>!(u!=null&&u.step)||(u==null?void 0:u.step)===(l==null?void 0:l.title))},10)},s0=l=>{setTimeout(async()=>{var g,h,v;let r=(g=Co.value)==null?void 0:g.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==Ur.value),n=bl==null?void 0:bl.value,t=bl==null?void 0:bl.value;(r==null?void 0:r.length)>0&&(t=((h=r==null?void 0:r[0])==null?void 0:h.relatedContent)??(bl==null?void 0:bl.value),n=t+"/"+((v=r==null?void 0:r[0])==null?void 0:v.value));let s=await $r(n,!1,{originPath:t});s=s==null?void 0:s.map(m=>(m.isShow=!0,m)),Ao.setSelectTab(l);let c=await sa.getDeepDiffItems(s);Yl.value=c==null?void 0:c.filter(m=>!(m!=null&&m.choiceName)||(m==null?void 0:m.choiceName)===l)},10)};a.watch(()=>qf.value,l=>{l!=null&&l.length||(Yl.value=[])},{immediate:!0});a.watch(()=>[bl.value],async l=>{var c,g,h,v;if(!bl.value)return;if(bl.value==="/"){Yl.value=[];return}Er.setCurrentMenuPath(bl.value),_r.setLockingPage(""),Yl.value=[];let r=a.getCurrentInstance();(c=r==null?void 0:r.scope)==null||c.stop(),r=null,Ct.value=!1,Er.setContentLoading(!0),rc.value=!0;let n=l==null?void 0:l[0],t=n,s=(g=Hn.value)==null?void 0:g.filter(m=>(m==null?void 0:m.condition)==="child"&&(m==null?void 0:m.value)!==""&&(m==null?void 0:m.parentContent)!==bl.value&&!(m!=null&&m.relatedContent));if((s==null?void 0:s.length)>0&&(n=n+"/"+((h=s==null?void 0:s[0])==null?void 0:h.value)),n==="系统管理/日志管理")Yl.value=await Pf("log");else{let m=await $r(n,!0,{originPath:t});m=m==null?void 0:m.map(S=>(S.isShow=!0,S));let u=await sa.getDeepDiffItems(m),_=u==null?void 0:u.filter(S=>S==null?void 0:S.choice);Ao.setSelectTab((v=_==null?void 0:_[0])==null?void 0:v.choiceName),Yl.value=u==null?void 0:u.filter(S=>{var z;return!(S!=null&&S.choiceName)||(S==null?void 0:S.choiceName)===((z=_==null?void 0:_[0])==null?void 0:z.choiceName)})}Er.setContentLoading(!1),_r.setExtraContents([]),nn.setSelectIndex(""),nn.setSelectMenu(""),_r.setItemData(Yl.value),_r.setOriginalData(Yl.value),_r.setRefreshTable(!1),a.nextTick(()=>{qn.value=qn.value++,Ct.value=!0})},{immediate:!0});a.watch(()=>[us.value],async()=>{var l,r,n,t;if(us.value){Yl.value=[];let s=a.getCurrentInstance();(l=s==null?void 0:s.scope)==null||l.stop(),s=null,Ct.value=!1,Er.setContentLoading(!0),rc.value=!0;let c=Ur==null?void 0:Ur.value,g=c,h=(r=Hn.value)==null?void 0:r.filter(_=>(_==null?void 0:_.condition)==="child"&&(_==null?void 0:_.value)!==""&&(_==null?void 0:_.parentContent)!==(Ur==null?void 0:Ur.value));(h==null?void 0:h.length)>0&&(c=c+"/"+((n=h==null?void 0:h[0])==null?void 0:n.value));let v=await $r(c,!0,{originPath:g});v=v==null?void 0:v.map(_=>(_.isShow=!0,_));let m=await sa.getDeepDiffItems(v),u=m==null?void 0:m.filter(_=>_==null?void 0:_.choice);if(Ao.setSelectTab((t=u==null?void 0:u[0])==null?void 0:t.choiceName),Yl.value=m==null?void 0:m.filter(_=>{var S;return!(_!=null&&_.choiceName)||(_==null?void 0:_.choiceName)===((S=u==null?void 0:u[0])==null?void 0:S.choiceName)}),Er.setContentLoading(!1),_r.setExtraContents([]),nn.setSelectIndex(""),nn.setSelectMenu(""),_r.setItemData(Yl.value),_r.setOriginalData(Yl.value),_r.setRefreshTable(!1),(h==null?void 0:h.length)>0){let _=[...Hn.value,...h];nn.setSelectTitle(_)}a.nextTick(()=>{qn.value=qn.value++,Ct.value=!0})}},{immediate:!0,deep:!0});const c0=async()=>{Er.setLinkMenuInfo(null),Er.setActiveMenuPath(Uf.value),Yl.value=null,_r.setRouteToChildPath(""),Er.setChildMenu("")},u0=l=>new RegExp("button","i").test(l),d0=l=>/^[\u4e00-\u9fa5]+\/[\u4e00-\u9fa5]+\^(.+)$/.test(l),uc=l=>{if(d0(l)){const r=l==null?void 0:l.split("^");(r==null?void 0:r.length)>0&&(r!=null&&r[0])&&Er.setLinkMenuInfo({path:r==null?void 0:r[0],data:r==null?void 0:r[1]})}},dc=async(l,r,n)=>{var S,z,w,j,A,N,Y,b,L,T,x,k;let t="",s="";for(let $ in r)(r==null?void 0:r[$])===l&&(s=$);n==null||n.forEach($=>{($==null?void 0:$.prop)===s&&(t=$==null?void 0:$.fatherPath)});let c=t===""?bl.value:t;t!==""&&Er.setCurrentMenuPath(c),Er.setCurrentMenuPath(c+"/"+l),Er.setContentLoading(!0),await $r(c+"/"+l,!0,{originPath:c+"/",row:r});let g=await $r(c,!1),h=(S=g==null?void 0:g.filter($=>($==null?void 0:$.comp)==="Table"))==null?void 0:S[0],v=((A=(j=(w=(z=h==null?void 0:h.compData)==null?void 0:z.find($=>($==null?void 0:$.key)==="header"))==null?void 0:w.contents)==null?void 0:j[0])==null?void 0:A.prop)??((T=(L=(b=(Y=(N=h==null?void 0:h.compData)==null?void 0:N.find($=>($==null?void 0:$.key)==="header"))==null?void 0:Y.contents)==null?void 0:b[0])==null?void 0:L[0])==null?void 0:T.prop),m=(k=(x=h==null?void 0:h.compData)==null?void 0:x.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:k.contents;m=m==null?void 0:m.map($=>({label:$==null?void 0:$[v],value:$==null?void 0:$[v]}));let u=Hn.value,_={value:l,condition:"child",options:m,relatedContent:c,isShow:!0};u.push(_),nn.setSelectTitle(u),nn.setChooseTitle([_]),Er.setContentLoading(!1),_r.setExtraContents([]),nn.setSelectIndex(""),nn.setSelectMenu(""),_r.setItemData(Yl.value),_r.setOriginalData(Yl.value)},p0=l=>{ic.value=l},bt=a.reactive({index:0,comp:null}),f0=a.computed(()=>{var l;return(l=Yl.value)==null?void 0:l.map((r,n)=>({id:r.id,name:r.name,status:h0(r,n)}))}),pc=(l,r)=>{var v,m,u,_,S;const n=r?l:l-2,t=(v=Yl.value)==null?void 0:v[n],s=(u=(m=t==null?void 0:t.compData)==null?void 0:m.find(z=>(z==null?void 0:z.key)==="header"))==null?void 0:u.contents,c=s==null?void 0:s.findIndex(z=>(z==null?void 0:z.isMainKey)&&(z==null?void 0:z.label)!=="操作"),g=c===-1?0:c,h=(S=(_=t==null?void 0:t.compData)==null?void 0:_.find(z=>(z==null?void 0:z.key)==="tableContents"))==null?void 0:S.contents;return{valid:h==null?void 0:h.every(z=>z==null?void 0:z[g+1]),length:(h==null?void 0:h.length)||0}},h0=(l,r)=>{var t;let n="process";if(((t=l==null?void 0:l.comp)==null?void 0:t.toUpperCase())==="TABLE"){const{valid:s,length:c}=pc(r,!0);bt.index===r?n="process":c===0?n="wait":n=s?"success":"error"}return n},fc=l=>{var n,t,s,c,g;const r=l+1;if(r>1&&((s=(t=(n=Yl.value)==null?void 0:n[l])==null?void 0:t.comp)==null?void 0:s.toUpperCase())==="TABLE"){const{valid:h}=pc(r);h?(bt.index=r,bt.comp=(c=Yl.value)==null?void 0:c[l]):el.ElMessage({showClose:!0,type:"warning",message:"当前流程有输入未完成"})}else bt.index=r,bt.comp=(g=Yl.value)==null?void 0:g[l]},hc=a.computed(()=>{var l,r;return(r=(l=oc.value)==null?void 0:l[0])==null?void 0:r.isStepLayout});a.watch(()=>hc.value,l=>{l&&fc(0)},{immediate:!0});const v0={class:"table-content"},m0={class:"menu-config-wrap"},y0=["onClick"],g0={key:0,class:"viewport-wrap"},b0=["onClick"],k0={title:"选择显示列信息"},x0={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},_0=["title"],w0={class:"col-operate-wrap"},C0={key:0,class:"col-operate-radio-wrapper"},S0={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},E0={key:0,style:{display:"flex","justify-content":"center","align-items":"center"}},D0={class:"pop-view"},B0={class:"pop-wrapper"},N0={class:"file-list-pop"},T0=["title","onClick"],A0=["onClick"],z0=["onClick"],M0={key:1,style:{display:"flex","justify-content":"flex-end",gap:"8px","margin-top":"8px"}},O0={class:"form-content"},I0={key:0,class:"dialog-footer"},L0={class:"dialog-footer"},V0={class:"ocr-dialog-content"},R0={class:"ocr-steps"},$0={key:0,class:"ocr-action-buttons"},P0={key:1,class:"ocr-preview-area"},F0={class:"ocr-file-grid"},j0={class:"file-thumbnail"},H0=["src"],U0={key:1,class:"thumbnail-placeholder"},q0={class:"progress-svg",viewBox:"0 0 36 36"},W0=["stroke","stroke-width","stroke-dasharray"],K0={key:0,class:"progress-icon"},Y0={key:1,class:"progress-icon"},G0=["onClick"],J0={class:"file-name"},X0={key:0,class:"ocr-recognize-button"},Z0={key:2,class:"ocr-progress-section"},Q0={key:3,class:"ocr-confirm-area"},e3={class:"ocr-preview-tip"},a3={class:"ocr-preview-table"},l3={style:{display:"flex","align-items":"center",gap:"8px"}},r3={key:0},n3={key:4,class:"ocr-success-area"},t3={key:0,class:"ocr-dialog-footer"},o3={class:"form-content"},i3={style:{display:"flex","justify-content":"space-between",gap:"8px"}},s3={style:{display:"flex"}},ps="ss-ocr-upload-history",c3="ss-ocr-cert-history-v1",u3={__name:"index",props:{pageLayout:{type:String,default:"vertical"},related:{type:Array,default:[]},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!0},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(l,{emit:r}){var Oi;const n=a.ref([]),t=ki(I.pinia),s=a.ref(null),c=a.ref(new Set),g=a.ref(new Map),h=a.ref(new Map),v=new Map,m=a.ref(new Map),u=l,_=a.ref((u==null?void 0:u.allowSelect)??!0),S=a.ref(((Oi=u==null?void 0:u.config)==null?void 0:Oi.showIndex)??!0),z=a.ref(),w=a.ref(!0),j=a.ref(!1),A=a.ref([]),N={sortable:"switch",filterable:"switch",showSummary:"switch",operable:"switch",fixed:"radio"},Y=a.ref([{label:"排序",value:"sortable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{type:"radio",label:"固定",value:"fixed",checked:"",options:[{label:"无",value:!1},{label:"左",value:"left"},{label:"右",value:"right"}]}]),b=sa.useOriginalState(I.pinia);let L="$R";const{originalPath:T}=I.storeToRefs(b),x=T.value,k=a.computed(()=>{var f;const d=(f=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:f.filter(M=>(M==null?void 0:M.type)!=="operate"&&(M==null?void 0:M.label)!=="操作"&&(M==null?void 0:M.prop)!=="operate");return d.length>0?d.every(M=>!!(M!=null&&M.sortable)):!1});a.computed(()=>{var f;return(f=Ee.value)==null?void 0:f.every(M=>M==null?void 0:M.filterable)}),a.computed(()=>{var f;return(f=Ee.value)==null?void 0:f.every(M=>M==null?void 0:M.operable)});const $=a.ref(!0),U=a.ref([]),X=a.reactive({column:{},status:!1,text:"合计"}),be=a.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20]}),ze=r,Ee=a.ref([]),ne=a.ref([]),ke=a.ref([]),Z=a.reactive({prop:"",order:null}),de=a.ref([]),Ke=a.ref(!1),Na=a.ref(!1),te=a.ref(null),{isUseBackdrop:D,initTrackFileType:le,getFileExtension:ye,setData:ue,getFileInfo:Ne,getFilesInfo:pa}=go.useThreeSystem(),wa=a.ref([]),ja=a.ref(!1),ee=a.ref(),ea=I.useMenuState(),{importLoading:Pe,activeMenuPath:xa,contentLoading:He,linkMenuInfo:Te}=I.storeToRefs(ea),Re=sa.useTableComp(I.pinia),Ye=I.useModelComp(I.pinia),qa=Wn(I.pinia),{extraContents:Va,cacheUpdatingData:P,tableViewContents:F,tableLoading:J,pageMapState:ie,lockingPage:ce}=I.storeToRefs(Ye),{selectTab:ma}=I.storeToRefs(qa),{compType:na,hasEditable:Ie}=js.useRole(),_e=a.ref([]),Ca=a.ref([]),ve=a.ref(new Map);a.ref(!1);const Je=a.ref("");a.ref();const Qe=a.ref(!0),Fe=a.ref(0),_a=a.ref(!0),Le=a.ref(""),va=a.ref(!1),re=a.ref(null);a.ref([]);const Se=a.ref({label:"查看三维模型"}),K=a.ref(!1),je=a.ref(),De=a.ref([]),Ma=a.ref([]),Ba=a.ref(!1),Ua=a.ref([]),Aa=a.ref([]),Ae=a.ref([]),we=a.ref([]),Ea=a.ref([]),Ge=()=>{try{const d=localStorage.getItem(ps),f=d?JSON.parse(d):[];Ea.value=Array.isArray(f)?f:[]}catch{Ea.value=[]}},ol=()=>{try{localStorage.setItem(ps,JSON.stringify(Ea.value||[]))}catch{}},Sl=d=>{var Q,ae,H;if(!d)return;const f=d.url||((Q=d==null?void 0:d.uploadResult)==null?void 0:Q.url)||"",M=d.name||((ae=d==null?void 0:d.uploadResult)==null?void 0:ae.name)||((H=d==null?void 0:d.uploadResult)==null?void 0:H.fileName)||"";if(!f&&!M)return;const O={name:M,url:f,ts:Date.now()},R=String(O.name||"").trim().toLowerCase(),B=(Ea.value||[]).findIndex(he=>String((he==null?void 0:he.name)||"").trim().toLowerCase()===R);B>-1&&Ea.value.splice(B,1),Ea.value.unshift(O),Ea.value.length>20&&(Ea.value=Ea.value.slice(0,20)),ol()};Ge();const Nl=(d,f)=>`${c3}:${String(d??"")}:${String(f??"")}`,Ra=(d,f)=>{try{const M=sessionStorage.getItem(Nl(d,f)),O=M?JSON.parse(M):[];return Array.isArray(O)?O:[]}catch{return[]}},al=(d,f,M)=>{try{sessionStorage.setItem(Nl(d,f),JSON.stringify(Array.isArray(M)?M:[]))}catch{}},ga=(d,f,M)=>{if(!f)return;const O=Ra(d,f),R=[M,...O||[]].filter(Boolean).slice(0,1);return al(d,f,R),R},qe=(d,f,M)=>{if(!f||!M)return;const O=Nl(d,f),R=Nl(d,M);try{const B=sessionStorage.getItem(O);if(!B)return;const Q=(()=>{try{const he=JSON.parse(B);return Array.isArray(he)?he:[]}catch{return[]}})(),ae=Ra(d,M),H=[...Q,...ae||[]].filter(Boolean).sort((he,xe)=>Number((xe==null?void 0:xe.ts)||0)-Number((he==null?void 0:he.ts)||0)).slice(0,1);sessionStorage.setItem(R,JSON.stringify(H)),sessionStorage.removeItem(O)}catch{}},rl=a.ref(!1),da=a.ref(!1),Xe=a.ref([]),oa=a.ref(null);a.ref(!1),a.ref([]),a.ref(""),a.ref("");const aa=a.ref(!1),ca=a.ref([]),W=a.ref(1),la=a.ref(new Map),ka=a.ref(new Map),Ce=a.ref(0),Be=a.ref(!1),Fa=a.ref([]),me=a.ref([]),fl=d=>{var f;try{const M=(f=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:f.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate");return(M==null?void 0:M.find(O=>(O==null?void 0:O.prop)===d||(O==null?void 0:O.label)===d))||null}catch{return null}},Ja=d=>{const f=fl(d),M=(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)||"Input";return pl.getComponent(M)||pl.getComponent("Input")},kl=a.ref([]),Ha=a.ref(null),tl=a.ref([]),Za=a.ref(null),cl=a.ref(""),ul=a.ref(!1),Wl=a.ref([]),ql=a.ref(""),Pl=a.ref(!1),Hl=a.ref([]),gr=a.ref([]),rr=a.ref([]),kr=a.ref(null),wr=a.ref([]),Sr=a.ref("");a.computed(()=>{var d;try{const f=(d=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:d.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),M=new Map;return f==null||f.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&M.set(O.label,O.prop)}),M.get("编号")||""}catch{return""}});const un=a.computed(()=>{var d;try{const f=(d=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:d.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),M=new Map;return f==null||f.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&M.set(O.label,O.prop)}),M.get("名称")||""}catch{return""}}),Jr=a.computed(()=>{var d;try{const f=(d=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:d.filter(O=>(O==null?void 0:O.type)!=="operate"&&(O==null?void 0:O.label)!=="操作"&&(O==null?void 0:O.prop)!=="operate"),M=new Map;return f==null||f.forEach(O=>{O!=null&&O.label&&(O!=null&&O.prop)&&M.set(O.label,O.prop)}),M.get("制造厂")||""}catch{return""}}),dn=()=>{Pl.value=!1,Hl.value=[],gr.value=[],rr.value=[],kr.value=null,wr.value=[],Sr.value=""},Xr=d=>d==null?!1:typeof d=="string"?d.trim()!=="":Array.isArray(d)?d.length>0:!0,qr=(d,f)=>{const M=(d==null?void 0:d.ocrRow)||{};for(const R of Object.keys(M))R==="id"||R==="_isOCRRow"||R==="_ocrTableId"||Xr(M[R])&&(f[R]=M[R]);const O=Ca.value.find(R=>R.id===f.id);if(O)for(const R of Object.keys(M))R==="id"||R==="_isOCRRow"||R==="_ocrTableId"||Xr(M[R])&&(O[R]=M[R]);ve.value&&ve.value.set(f.id,f),ga(u==null?void 0:u.index,f.id,d==null?void 0:d.versionItem),gr.value=[...gr.value||[],JSON.parse(JSON.stringify(f))]},pn=async(d,f=null)=>{var M,O,R,B,Q,ae,H;try{const he=(M=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:M.filter(ta=>(ta==null?void 0:ta.type)!=="operate"&&(ta==null?void 0:ta.label)!=="操作"&&(ta==null?void 0:ta.prop)!=="operate"),xe=new Map;he==null||he.forEach(ta=>{ta!=null&&ta.label&&(ta!=null&&ta.prop)&&xe.set(ta.label,ta.prop)});const Ve=xe.get("系统编号")||xe.get("编号");if(!Ve){console.warn("未找到系统编号字段,跳过向检校记录表插入数据");return}const Me=f||kr.value;if((Array.isArray(Me==null?void 0:Me.result)?Me.result:[]).length===0){console.warn("OCR识别结果为空,跳过向检校记录表插入数据");return}for(let ta=0;ta<d.length;ta++){const $a=d[ta],Ta=$a[Ve];if(!Ta){console.warn(`第 ${ta+1} 条匹配行缺少系统编号,跳过`);continue}const ra=`设备管理/试验设备/${Ta}`,Ya=await I.getPageDataApi({platId:parseInt((O=Vl.value)==null?void 0:O.plat_id),pageName:ra});if(!((R=Ya==null?void 0:Ya.data)!=null&&R.result)||!Array.isArray(Ya.data.result)){console.warn(`未找到详情页数据: ${ra}`);continue}const ia=Ya.data.result.find(ba=>(ba==null?void 0:ba.property_name)==="校检记录");if(!ia){console.warn(`详情页 ${ra} 中未找到校检记录表`);continue}const Pa=(B=ia.contents)==null?void 0:B.find(ba=>(ba==null?void 0:ba.key)&&ba.key.startsWith("content_"));if(!Pa||!Pa.key){console.warn("校检记录表中未找到 content item");continue}const se=Pa.key,Da=Array.isArray(Pa.value)?Pa.value:[];if(Da.length>=5){const fa=[...Da].sort((ya,Ia)=>{const dl=Number((ya==null?void 0:ya.create_time)||0),Xa=Number((Ia==null?void 0:Ia.create_time)||0);return dl-Xa})[0];fa!=null&&fa.id&&await I.pageBatchDeleteApi({platId:parseInt((Q=Vl.value)==null?void 0:Q.plat_id),changeContents:[{tableName:se,tableContents:[{id:fa.id}]}]})}const ua=(ae=he==null?void 0:he.find(ba=>(ba==null?void 0:ba.label)==="证书附件"))==null?void 0:ae.prop,Sa=String(Date.now()),oe={id:Sa},E=Da[0]||{},$e=new Date().toISOString().split("T")[0];if(Object.keys(E||{}).forEach(ba=>{if(ba!=="id"){if(ba==="证书附件"){oe[ba]="";return}if(ba==="校检日期"||ba==="检校日期"){oe[ba]=$a[ba]||$a.校检日期||$a.检校日期||$e;return}if(["校检周期","检校周期","校检结果","检校结果","计量状态","依据文件","证书编号"].includes(ba)){oe[ba]=$a[ba]??"";return}oe[ba]=$a[ba]??""}}),ua&&$a[ua]){const ba=$a[ua];if(Array.isArray(ba)&&ba.length>0)oe.证书附件=JSON.stringify(ba.map(fa=>({url:(fa==null?void 0:fa.url)||"",name:(fa==null?void 0:fa.name)||(fa==null?void 0:fa.fileName)||"",fileName:(fa==null?void 0:fa.fileName)||(fa==null?void 0:fa.name)||""})).filter(fa=>fa.url||fa.name));else if(typeof ba=="string")try{const fa=JSON.parse(ba);oe.证书附件=ba}catch{oe.证书附件=JSON.stringify([{url:ba,name:ba,fileName:ba}])}}console.log(se,"tableName","inspectionRecordRow",oe),await I.pageBatchAddApi({platId:parseInt((H=Vl.value)==null?void 0:H.plat_id),changeContents:[{tableName:se,tableContents:[oe]}]});const fe=ia==null?void 0:ia.object_id;if(fe&&Sa){const ba=ua&&$a[ua]?$a[ua]:null;let fa=[],ya="",Ia=!1;if(Array.isArray(ba)&&ba.length>0){fa=ba.map(yl=>({name:(yl==null?void 0:yl.name)||(yl==null?void 0:yl.fileName)||"",url:(yl==null?void 0:yl.url)||""})).filter(yl=>yl.url||yl.name);const Xa=ba[0];ya=(Xa==null?void 0:Xa.url)||"";const ml=(Xa==null?void 0:Xa.name)||(Xa==null?void 0:Xa.fileName)||"";Ia=String(ml).toLowerCase().endsWith(".pdf")||String(ya).toLowerCase().endsWith(".pdf")}else if(typeof ba=="string")try{const Xa=JSON.parse(ba);Array.isArray(Xa)?(fa=Xa.map(ml=>({name:(ml==null?void 0:ml.name)||(ml==null?void 0:ml.fileName)||"",url:(ml==null?void 0:ml.url)||""})).filter(ml=>ml.url||ml.name),fa.length>0&&(ya=fa[0].url||"",Ia=String(fa[0].name).toLowerCase().endsWith(".pdf")||String(ya).toLowerCase().endsWith(".pdf"))):(ya=ba,Ia=String(ba).toLowerCase().endsWith(".pdf"))}catch{ya=ba,Ia=String(ba).toLowerCase().endsWith(".pdf")}const dl={ts:Date.now(),versionId:String(Date.now())+"_"+String(ta),label:new Date().toLocaleString(),certType:$a.证书类型||"",certNo:$a.证书编号||"",fileType:Ia?"pdf":"image",sourceUrl:Ia?ya:"",images:fa};ga(fe,Sa,dl)}}}catch(he){console.error("向校检记录表插入OCR识别结果失败:",he),el.ElMessage.error("向校检记录表插入数据失败,请查看控制台")}},tn=d=>{const f=Array.isArray(d)?d:Hl.value||[];if(f.length===0){dn();return}if(f.find(B=>(B==null?void 0:B.__decision)==="replace"&&!(B!=null&&B.selectedTargetId))){el.ElMessage.warning("存在“替换”但未选择目标记录的条目,请处理后再提交");return}f.forEach(B=>{var ae;const Q=B==null?void 0:B.__decision;if(!(!Q||Q==="skip")){if(Q==="add"){ga(u==null?void 0:u.index,(ae=B==null?void 0:B.ocrRow)==null?void 0:ae.id,B==null?void 0:B.versionItem),rr.value=[...rr.value||[],B.ocrRow];return}if(Q==="replace"){const H=B==null?void 0:B.selectedTargetId,he=(_e.value||[]).find(xe=>String(xe==null?void 0:xe.id)===String(H));if(!he)return;qr(B,he)}}}),(gr.value||[]).length>0&&(_e.value=[..._e.value||[]]),(rr.value||[]).length>0&&(_e.value=[..._e.value||[],...rr.value||[]],Ca.value=[...Ca.value||[],...rr.value||[]],(rr.value||[]).forEach(B=>{var Q,ae;return(ae=(Q=ve.value)==null?void 0:Q.set)==null?void 0:ae.call(Q,B.id,B)})),Nr.value=_e.value;const O=gr.value||[],R=rr.value||[];if(O.length>0&&(ze("change",{buttonName:"编辑",singleContent:O,content:_e.value,relatedContents:u==null?void 0:u.related,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,columns:Ee.value,name:u==null?void 0:u.compName}),pn(O)),R.length>0){const B=kr.value;ze("change",{buttonName:"OCR批量新增",content:_e.value,index:u==null?void 0:u.index,parentTableId:u==null?void 0:u.parentTableId,column:Ee.value,ocrRows:R,relatedContents:u==null?void 0:u.related,uploadedFiles:(Array.isArray(B==null?void 0:B.result)?B.result:[]).map(Q=>(Array.isArray(Q==null?void 0:Q.图片信息)?Q.图片信息:[]).map(ae=>({url:(ae==null?void 0:ae.url)||"",name:(ae==null?void 0:ae.name)||"",fileName:(ae==null?void 0:ae.name)||""})).filter(ae=>ae.url)),ocrResult:B,matchedCount:(O||[]).length,newCount:(R||[]).length})}el.ElMessage.success("已提交候选处理结果"),dn()},Dr=lc(),Zr=a.computed(()=>Dr.getConfig()),Br=a.ref(),Il=a.ref(),Wr=Xs(I.pinia),Nr=a.ref(),vn=a.ref(0),tt=I.useUnit(I.pinia),{selectIndex:Kn,selectMenu:In,selectTitle:mn}=I.storeToRefs(tt),{selectString:Zl}=I.storeToRefs(Wr),xr=I.useLoginState(I.pinia),{loginUserInfo:Vl}=I.storeToRefs(xr),jl=a.ref(720),zl=a.ref(!1),cr=a.ref(!1),ar=a.ref([]),$l=a.ref(),zr=a.ref(!0),Mr=a.ref(!0);a.ref([]);const yn=a.inject("contentRef");a.provide("contentRef",yn),a.provide("getSuggestListForCell",cu),a.provide("getSuggestLoadingForCell",(d,f)=>{const M=`${d==null?void 0:d.id}:${(f==null?void 0:f.prop)||(f==null?void 0:f.property)}`;return m.value.get(M)||!1}),a.watch(()=>{var d;return(d=_e.value)==null?void 0:d.length},d=>{be.total=d}),a.watch(()=>F.value,async()=>{var f,M,O,R,B,Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra;if(((f=F.value)==null?void 0:f.length)===0||!((M=u==null?void 0:u.itemData)!=null&&M.find(Ya=>(Ya==null?void 0:Ya.key)==="columnPath"))||!((O=u==null?void 0:u.itemData)!=null&&O.find(Ya=>(Ya==null?void 0:Ya.key)==="pageColumn")))return;let d=(he=(H=(ae=(Q=(B=(R=u==null?void 0:u.itemData)==null?void 0:R.find(Ya=>(Ya==null?void 0:Ya.key)==="pageColumn"))==null?void 0:B.contents)==null?void 0:Q.split("["))==null?void 0:ae[1])==null?void 0:H.split("]"))==null?void 0:he[0];((Ue=(Me=(Ve=(xe=u==null?void 0:u.itemData)==null?void 0:xe.find(Ya=>(Ya==null?void 0:Ya.key)==="pageColumn"))==null?void 0:Ve.contents)==null?void 0:Me.split("["))==null?void 0:Ue[0])+(($a=(ta=F.value)==null?void 0:ta.find(Ya=>(Ya==null?void 0:Ya.key)===d))==null?void 0:$a.value),(ra=(Ta=u==null?void 0:u.itemData)==null?void 0:Ta.find(Ya=>(Ya==null?void 0:Ya.key)==="pageGroup"))==null||ra.contents,Mi(compData,u.allMapContents)},{deep:!0});const Qr=d=>{var M,O,R,B,Q;const f=(O=(M=Ee.value)==null?void 0:M.filter(ae=>ae==null?void 0:ae.mainKey))==null?void 0:O.map(ae=>ae==null?void 0:ae.prop);if(f.length===0){const ae=(R=Ee.value)==null?void 0:R.map(H=>H==null?void 0:H.prop);return(B=ae==null?void 0:ae.map(H=>d==null?void 0:d[H]))==null?void 0:B.join("|")}return(Q=f==null?void 0:f.map(ae=>d==null?void 0:d[ae]))==null?void 0:Q.join("|")},Yn=d=>{var ae,H,he,xe,Ve;const f=(H=(ae=Ee.value)==null?void 0:ae.filter(Me=>Me==null?void 0:Me.required))==null?void 0:H.map(Me=>Me==null?void 0:Me.prop),M=[];if(d==null||d.forEach(Me=>{f==null||f.forEach(Ue=>{const ta=Me[Ue];(ta==null||ta==="")&&(M.includes(Ue)||M.push(Ue))})}),M.length>0)return el.ElMessage.warning(`请填写必填项:${M.join("、")}`);const O=new Map,R=new Map;(he=_e.value)==null||he.forEach(Me=>{const Ue=Qr(Me);O.set(Ue,Me)}),d==null||d.forEach(Me=>{const Ue=Qr(Me);R.set(Ue,Me)});const B=d==null?void 0:d.filter(Me=>O.has(Qr(Me))),Q=(xe=_e.value)==null?void 0:xe.filter(Me=>R.has(Qr(Me)));return(B==null?void 0:B.length)>0&&(o.columns=(Ve=Ee.value)==null?void 0:Ve.filter(Me=>(Me==null?void 0:Me.label)!=="操作"),o.existRows=Q,o.tableData=B,o.show=!0),d==null?void 0:d.filter(Me=>{const Ue=Qr(Me);return!O.has(Ue)})},En=a.ref(""),Gn=a.ref(null),gn=async()=>{var d,f,M,O,R,B;try{const Q=await I.quoteApi({related:[{menus:xa.value,groups:u==null?void 0:u.compName}],platId:parseInt((d=Vl.value)==null?void 0:d.plat_id)});if(((f=Q==null?void 0:Q.data)==null?void 0:f.code)===200){Gn.value=(M=Q==null?void 0:Q.data)==null?void 0:M.result;const ae=(O=Ee.value)==null?void 0:O.map(xe=>(xe==null?void 0:xe.prop)||(xe==null?void 0:xe.label)),H=Dn(ae,(R=Q==null?void 0:Q.data)==null?void 0:R.result),he=H==null?void 0:H.flatMap(xe=>xe==null?void 0:xe.quote);(he==null?void 0:he.length)>0&&(En.value=(B=he==null?void 0:he.map(xe=>xe==null?void 0:xe.menus))==null?void 0:B.join("、"))}}catch(Q){throw new Error(Q)}};function Dn(d,f){var M;return(M=f.filter(O=>O.struct&&Array.isArray(O.struct)?O.struct.some(R=>R.words&&Array.isArray(R.words)?R.words.some(B=>d.includes(B)):!1):!1))==null?void 0:M.map(O=>{const R={...O};return R.struct&&Array.isArray(R.struct)&&(R.struct=R.struct.filter(B=>B.words&&Array.isArray(B.words)?B.words.some(Q=>d.includes(Q)):!1)),R})}const Ln=async(d,f)=>{var M,O,R,B,Q,ae,H,he,xe,Ve;try{Gn.value||await gn();const Me=f==null?void 0:f.map(Pa=>{const se=Object.keys(Pa),Da={};return se.forEach((ua,Sa)=>{Da[d[Sa]]=Pa[ua]}),Da}),Ue=Yn(Me);if(!Ue||(Ue==null?void 0:Ue.length)===0)return;const ta=[];let $a=(_e.value||[]).slice();(Ue||[]).forEach(Pa=>{const se={...Pa};try{se.sort=Nn(0,$a)}catch{}ta.push(se),$a.unshift(se)});let Ta=await I.quoteApi({platId:parseInt((M=Vl==null?void 0:Vl.value)==null?void 0:M.plat_id),type:"fatherSyncs",related:[{menus:xa.value,groups:""},{menus:xa.value,groups:u==null?void 0:u.compName}]});Ta=(O=Ta==null?void 0:Ta.data)==null?void 0:O.result;let ra=Ta==null?void 0:Ta.map(Pa=>({tableName:"content_"+(Pa==null?void 0:Pa.id),tableContents:ta==null?void 0:ta.map((se,Da)=>({id:Da,...se}))})),Ya=[{tableName:(R=u==null?void 0:u.related)==null?void 0:R.find(Pa=>Pa==null?void 0:Pa.includes("content")),tableContents:ta==null?void 0:ta.map((Pa,se)=>({id:se,...Pa}))}];Ya=[...Ya,...ra];const ia=await I.pageBatchAddApi({platId:parseInt((B=Vl.value)==null?void 0:B.plat_id),changeContents:Ya});if(((Q=ia==null?void 0:ia.data)==null?void 0:Q.code)===200){const Pa={buttonName:"新增",columns:Ee.value,fixContent:ta==null?void 0:ta.map((Da,ua)=>({id:ua,...Da})),relatedContents:u==null?void 0:u.related};await mi(Pa),((ae=o==null?void 0:o.existRows)==null?void 0:ae.length)>0?el.ElMessage.success("部分数据导入成功"):el.ElMessage.success("数据导入成功");let se=[];Ya==null||Ya.forEach(Da=>{var ua;(ua=Da==null?void 0:Da.tableContents)==null||ua.forEach(Sa=>{se.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(Sa),request_result:"{}",is_delete:!1,request_table:Da==null?void 0:Da.tableName,request_type:"export"})})}),await I.pageBatchAddApi({platId:parseInt((H=Vl==null?void 0:Vl.value)==null?void 0:H.plat_id),changeContents:[{tableName:"log",tableContents:se}]})}else{let Pa=[];Ya==null||Ya.forEach(se=>{var Da;(Da=se==null?void 0:se.tableContents)==null||Da.forEach(ua=>{Pa.push({id:"1",request_method:"Post",request_url:"/platform/page/add",request_param:JSON.stringify(ua),request_result:"{}",is_delete:!1,request_table:se==null?void 0:se.tableName,request_type:"error"})})}),await I.pageBatchAddApi({platId:parseInt((he=Vl==null?void 0:Vl.value)==null?void 0:he.plat_id),changeContents:[{tableName:"log",tableContents:Pa}]}),el.ElMessage.error("数据导入响应失败")}}catch(Me){throw el.ElMessage.error("数据导入处理失败"),await I.pageBatchAddApi({platId:parseInt((xe=Vl==null?void 0:Vl.value)==null?void 0:xe.plat_id),changeContents:[{tableName:"log",tableContents:[{id:"1",request_method:"Post",request_url:"",request_param:JSON.stringify(t1),request_result:JSON.stringify(Me),is_delete:!1,request_table:(Ve=u==null?void 0:u.related)==null?void 0:Ve.find(Ue=>Ue==null?void 0:Ue.includes("content")),request_type:"error"}]}]}),new Error(Me)}},Kr=async d=>{var B,Q,ae,H,he,xe,Ve;let f=ke.value;f!=null&&f.find(Me=>(d==null?void 0:d.key)===(Me==null?void 0:Me.key))&&(f=f==null?void 0:f.filter(Me=>(d==null?void 0:d.key)!==(Me==null?void 0:Me.key))),f.push({key:d==null?void 0:d.key,value:[(Q=d==null?void 0:d.value)==null?void 0:Q[((B=d==null?void 0:d.value)==null?void 0:B.length)-1]]});let M=we.value;M=M==null?void 0:M.map(Me=>{var Ue,ta;return(Me==null?void 0:Me.type)==="Select"&&(d==null?void 0:d.key)===(Me==null?void 0:Me.prop)&&Array.isArray(Me.value)&&(Ue=Me.value)!=null&&Ue.every($a=>typeof $a=="string")&&(Me.selectValue=(ta=f==null?void 0:f.find($a=>($a==null?void 0:$a.key)===(Me==null?void 0:Me.prop)))==null?void 0:ta.value),Me});let O=(H=(ae=M==null?void 0:M.find(Me=>(Me==null?void 0:Me.prop)===(d==null?void 0:d.key)))==null?void 0:ae.optionUrl)==null?void 0:H.menuId,R=M==null?void 0:M.find(Me=>(Me==null?void 0:Me.prop)===(d==null?void 0:d.key));if(O){let Me=await fi(R==null?void 0:R.optionUrl,O),Ue,ta=U.value,$a=(Ve=(xe=(he=we.value)==null?void 0:he.find(Ta=>{var ra;return(ra=R==null?void 0:R.optionUrl)==null?void 0:ra.menuId}))==null?void 0:xe.selectValue)==null?void 0:Ve[0];if(Me==null||Me.forEach(Ta=>{var ra,Ya,ia,Pa,se,Da,ua,Sa,oe,E;if(O){let $e=(Ya=(ra=we.value)==null?void 0:ra.find(ba=>{var fa,ya;return((fa=R==null?void 0:R.optionUrl)==null?void 0:fa.menuId)===((ya=ba==null?void 0:ba.optionUrl)==null?void 0:ya.menuId)}))==null?void 0:Ya.prop,fe=(Pa=(ia=M==null?void 0:M.find(ba=>(ba==null?void 0:ba.prop)===$e))==null?void 0:ia.selectValue)==null?void 0:Pa[0];$e!=null&&$e.includes("·")&&($e=(se=$e==null?void 0:$e.split("·"))==null?void 0:se[0],fe=(oe=(Sa=(ua=d==null?void 0:d.value)==null?void 0:ua[((Da=d==null?void 0:d.value)==null?void 0:Da.length)-1])==null?void 0:Sa.split(" "))==null?void 0:oe[0]),ta!=null&&ta.find(ba=>(ba==null?void 0:ba.value)===$a)?Ue=(E=ta==null?void 0:ta.find(ba=>(ba==null?void 0:ba.value)===$a))==null?void 0:E.objectValue:Ta[$e]===fe&&(Ue=Ta)}}),Ue){let Ta=M;Ta=Ta==null?void 0:Ta.map(ra=>{var Ya,ia,Pa,se,Da,ua;return O&&(Ue!=null&&Ue[ra==null?void 0:ra.prop])&&Le.value==="新增"&&(ra==null?void 0:ra.prop)!==(R==null?void 0:R.prop)?ra.value=(Ue==null?void 0:Ue[ra==null?void 0:ra.prop])||(Ue==null?void 0:Ue[(se=(Pa=(ia=(Ya=ra==null?void 0:ra.optionUrl)==null?void 0:Ya.groupSelect)==null?void 0:ia[1])==null?void 0:Pa.replaceAll("[",""))==null?void 0:se.replaceAll("]","")]):ra.value=(ua=(Da=we.value)==null?void 0:Da.find(Sa=>(Sa==null?void 0:Sa.prop)===(ra==null?void 0:ra.prop)))==null?void 0:ua.value,ra}),we.value=Ta}}ke.value=f},Bn=async(d,f)=>{var M,O,R,B,Q;if((M=d==null?void 0:d.toString())!=null&&M.includes(".txt")||(O=d==null?void 0:d.toString())!=null&&O.includes(".cpt")||(R=d==null?void 0:d.toString())!=null&&R.includes(".cyd")){const ae=await el.axios.get(d,{responseType:"blob",headers:{"Content-Type":"application/json"}}),H=new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"});let he=URL.createObjectURL(H);ee.value=[{name:(Q=d==null?void 0:d.split("/"))==null?void 0:Q[((B=d==null?void 0:d.split("/"))==null?void 0:B.length)-1],blobUrl:he}],ja.value=!0}else Array.isArray(f)&&(f==null?void 0:f.length)>0&&ze("routeUrl",{isEdit:!1,routerUrl:f})};a.onBeforeUnmount(()=>{Mr.value=!1;let d=vn.value;vn.value=d+1});const bn=a.reactive({prop:"",order:null}),Pr=a.computed(()=>{const d=(_e.value??[]).slice(),f=bn.prop||Z.prop,M=bn.order||Z.order;if(!f||!M)return d;const O=M==="ascending",R=Q=>{if(f)return Q&&Object.prototype.hasOwnProperty.call(Q,f)?Q[f]:f.includes(".")?f.split(".").reduce((ae,H)=>ae==null?ae:ae[H],Q):Q==null?void 0:Q[f]},B=Q=>{if(Q==null)return{ok:!1,value:NaN};if(typeof Q=="number")return{ok:Number.isFinite(Q),value:Q};const ae=String(Q).trim();if(ae==="")return{ok:!1,value:NaN};const H=ae.replace(/[,\s]/g,"");if(!/^[+-]?(\d+\.?\d*|\.\d+)$/.test(H))return{ok:!1,value:NaN};const he=Number(H);return{ok:Number.isFinite(he),value:he}};return d.sort((Q,ae)=>{const H=R(Q),he=R(ae);if(H==null&&he==null)return 0;if(H==null)return O?-1:1;if(he==null)return O?1:-1;const xe=B(H),Ve=B(he);if(xe.ok&&Ve.ok)return O?xe.value-Ve.value:Ve.value-xe.value;const Me=se=>{if(se==null)return{ok:!1,value:NaN};const Da=String(se).trim();if(Da==="")return{ok:!1,value:NaN};const ua=Da.match(/^(-)?(\d+):(\d{1,2}):(\d{1,2})$/);if(!ua)return{ok:!1,value:NaN};const Sa=ua[1]?-1:1,oe=Number(ua[2]),E=Number(ua[3]),$e=Number(ua[4]);return[oe,E,$e].some(fe=>Number.isNaN(fe))?{ok:!1,value:NaN}:E>=60||$e>=60?{ok:!1,value:NaN}:{ok:!0,value:Sa*(oe*3600+E*60+$e)}},Ue=Me(H),ta=Me(he);if(Ue.ok&&ta.ok)return O?Ue.value-ta.value:ta.value-Ue.value;const $a=new Date(H).getTime(),Ta=new Date(he).getTime(),ra=!Number.isNaN($a),Ya=!Number.isNaN(Ta);if(ra&&Ya)return O?$a-Ta:Ta-$a;const ia=String(H),Pa=String(he);return O?ia.localeCompare(Pa):Pa.localeCompare(ia)})}),Vn=a.computed(()=>{var M;const d=(be.currentPage-1)*be.pageSize,f=d+be.pageSize;return ze("getSliceContLength",be),(M=Pr.value)==null?void 0:M.slice(d,f)}),fn=d=>{be.currentPage=d,ze("getSliceContLength",be)},Et=d=>{var O;be.pageSize=d;const f=((O=_e.value)==null?void 0:O.length)??0,M=d>0?Math.ceil(f/d):1;be.currentPage>M&&(be.currentPage=M||1,el.ElMessage.warning("当前页超出范围,已自动跳转到最后一页")),ze("getSliceContLength",be)},zo=({prop:d,order:f})=>{bn.prop=d,bn.order=f,be.currentPage=1};function Mo(d){const f=[];function M(O,R=""){O.forEach(B=>{B.children&&B.children.length>0?M(B.children,B.prop):f.push(B.prop)})}return M(d),f}const kn=(d,f)=>{var ae,H,he,xe;let M=(H=(ae=Ee.value)==null?void 0:ae.map(Ve=>Ve==null?void 0:Ve.prop))==null?void 0:H.filter(Ve=>Ve!=="operate");((he=Ee.value)==null?void 0:he.some(Ve=>{var Me;return((Me=Ve==null?void 0:Ve.children)==null?void 0:Me.length)>0}))&&(M=Mo((xe=Ee.value)==null?void 0:xe.filter(Ve=>(Ve==null?void 0:Ve.prop)!=="operate")));let R;if(R=(d==null?void 0:d.length)===(M==null?void 0:M.length)?d:d.slice(0,M==null?void 0:M.length),!(R==null?void 0:R.every(Ve=>M==null?void 0:M.find(Me=>Ve===Me))))return el.ElMessage.error("导入的数据表头不匹配");Ln(R,f)},Oo=(d,f)=>{var R;const M=d==null?void 0:d.filter(B=>B!=="序号"),O=f==null?void 0:f.map(B=>{const Q=Object.entries(B);return Q.shift(),Object.fromEntries(Q)});Ye.setRefreshCurStructure(!1),((R=Ee.value)==null?void 0:R.length)===0||kn(M,O)},Io=(d,f,M,O)=>{const R=[],B=[],Q=he=>Object.keys(he).length;for(const he in d)if(d[he]!==void 0){const xe=d[he],Ve=[];for(const[Me,Ue]of Object.entries(xe))Ve.push(Ue),B.length<Q(xe)&&B.push(Me);R.push(Ve)}R.unshift(B);const ae=sa.utils.aoa_to_sheet(R),H=sa.utils.book_new();sa.utils.book_append_sheet(H,ae,O),sa.writeFileSync(H,`${f}.xlsx`),ar.value=[]},Ft=async(d,f,M,O=!1,R)=>{var B,Q,ae,H,he,xe,Ve,Me;try{Ye.setRefreshCurStructure(!1);const Ue=await yr.getInsofDataApi({id:u==null?void 0:u.index});if(((B=Ue==null?void 0:Ue.data)==null?void 0:B.code)===200){let ta=(he=(H=(ae=(Q=Ue==null?void 0:Ue.data)==null?void 0:Q.result)==null?void 0:ae[0])==null?void 0:H.value)==null?void 0:he.pageData;O?ta={...ta,compData:(Ve=ta==null?void 0:ta.compData)==null?void 0:Ve.map(Ta=>{var ra;return(Ta==null?void 0:Ta.key)==="header"?{...Ta,contents:(ra=Ta==null?void 0:Ta.contents)==null?void 0:ra.map(Ya=>({...Ya,[d]:M}))}:Ta})}:ta={...ta,compData:(xe=ta==null?void 0:ta.compData)==null?void 0:xe.map(Ta=>{var ra,Ya;return(Ta==null?void 0:Ta.key)==="header"?{...Ta,contents:(ra=Ta==null?void 0:Ta.contents)==null?void 0:ra.map(ia=>{if(Array.isArray(ia))ia=ia==null?void 0:ia.map(Pa=>(Pa==null?void 0:Pa.prop)===(f==null?void 0:f.prop)?{...Pa,[d]:M}:Pa);else if((ia==null?void 0:ia.prop)===(f==null?void 0:f.prop))return{...ia,[d]:M};return ia})}:(Ta==null?void 0:Ta.key)==="tableToForm"&&R?{...Ta,contents:(Ya=Ta==null?void 0:Ta.contents)==null?void 0:Ya.map(ia=>(ia==null?void 0:ia.prop)===(f==null?void 0:f.prop)?{...ia,[R]:M}:ia)}:Ta})};const $a=await yr.updateInsofDataApi({id:u==null?void 0:u.index,value:{pageData:ta}});((Me=$a==null?void 0:$a.data)==null?void 0:Me.code)===200?(el.ElMessage.success("编辑成功"),Ye.setRefreshCurStructure(!0)):el.ElMessage.error("编辑响应失败")}}catch(Ue){el.ElMessage.error(Ue)}},jt=async(d,f)=>{await Ft("label",f,d)},Ht=async(d,f)=>{await Ft("columnType",f,d,!1,"type")},Or=async({newRow:d,targetIndex:f})=>{var R;if(!Ie(u.config,{type:na.TABLE}))return;const O=(be.currentPage-1)*be.pageSize+(f??0);d._isTemp=!0;try{(d.sort===void 0||d.sort===null||String(d.sort).trim()==="")&&(d.sort=Nn(O,_e.value||[]))}catch{}_e.value.splice(O,0,d),await a.nextTick(),g.value.has(d.id)||g.value.set(d.id,I.cloneDeep(d)),_e.value=(R=_e.value)==null?void 0:R.map(B=>({...B,tableEditType:(B==null?void 0:B.id)===d.id?"edit":(B==null?void 0:B.tableEditType)??"text"})),c.value.add(d.id),zl.value=!0},Lo=(d,f,M,O=[])=>(!Array.isArray(f)||f.length===0||f.forEach(R=>{const B=R==null?void 0:R.prop;if(!B)return;let Q=d==null?void 0:d[B];if(Q==null||String(Q).trim()==="")return;Q=String(Q);const ae=new Set([...(Array.isArray(M)?M:[]).filter(xe=>(xe==null?void 0:xe.id)!==(d==null?void 0:d.id)).map(xe=>xe==null?void 0:xe[B]).filter(xe=>xe!=null).map(xe=>String(xe)),...(Array.isArray(O)?O:[]).map(xe=>xe==null?void 0:xe[B]).filter(xe=>xe!=null).map(xe=>String(xe))]);if(!ae.has(Q))return;let H=1,he="";for(;he=`${Q}(${H})`,!!ae.has(he);)H++;d[B]=he}),d),Dt=async()=>{var R,B,Q,ae,H,he,xe,Ve;const d=Array.from(c.value||[]);if(d.length===0)return;const f=(B=sa.getColumnChild((R=I.cloneDeep(Ee.value))==null?void 0:R.filter(Me=>(Me==null?void 0:Me.label)!=="操作")))==null?void 0:B.filter(Me=>(Me==null?void 0:Me.required)===!0);if((f==null?void 0:f.length)>0)for(let Me=0;Me<d.length;Me++){const Ue=d[Me],ta=(Q=_e.value)==null?void 0:Q.find($a=>($a==null?void 0:$a.id)===Ue);if(ta)for(let $a=0;$a<f.length;$a++){const Ta=f[$a],ra=Ta==null?void 0:Ta.prop,Ya=(Ta==null?void 0:Ta.label)??ra,ia=ta==null?void 0:ta[ra];if(ia===""||ia===null||ia===void 0||Array.isArray(ia)&&ia.length===0){el.ElMessage.error(`${Ya}不能为空`);return}}}const M=[],O=[];if(d.forEach(Me=>{var Ya;const Ue=(Ya=_e.value)==null?void 0:Ya.find(ia=>(ia==null?void 0:ia.id)===Me);if(!Ue)return;if(Ue!=null&&Ue._isTemp){const Pa=(sa.getAllLeafNodes(Ee.value)||[]).filter(E=>(E==null?void 0:E.mainKey)===!0||(E==null?void 0:E.isMainKey)===!0),se=_e.value.findIndex(E=>(E==null?void 0:E.id)===Me),Da=se>=0?se+1:_e.value.length+1;Lo(Ue,Pa,_e.value,M);const ua={id:Da.toString()};(Ue==null?void 0:Ue.sort)!==void 0&&(Ue==null?void 0:Ue.sort)!==null&&String(Ue.sort).trim()!==""?ua.sort=String(Ue.sort):ua.sort=Nn(se>=0?se:_e.value.length-1,_e.value||[]),(sa.getAllLeafNodes(Ee.value)||[]).filter(E=>(E==null?void 0:E.type)!=="operate"&&(E==null?void 0:E.label)!=="操作"&&(E==null?void 0:E.prop)!=="operate").forEach(E=>{const $e=E==null?void 0:E.prop;if($e){const fe=Ue[$e];fe!==void 0?ua[$e]=fe??"":ua[$e]=""}}),M.push(ua);return}const $a=(sa.getAllLeafNodes(Ee.value)||[]).filter(ia=>(ia==null?void 0:ia.type)!=="operate"&&(ia==null?void 0:ia.label)!=="操作"&&(ia==null?void 0:ia.prop)!=="operate"),Ta=new Set($a.map(ia=>ia==null?void 0:ia.prop).filter(Boolean)),ra={};for(const ia of Ta)Object.prototype.hasOwnProperty.call(Ue,ia)&&(ra[ia]=Ue[ia]);O.push({id:Ue.id,value:{tableData:ra}})}),Ye.setTableLoading(u==null?void 0:u.index),O.length>0){const Me=O.map(ta=>{const $a={id:ta.id,...ta.value.tableData};return delete $a._isOCRRow,delete $a._ocrTableId,delete $a._isTemp,delete $a.tableEditType,delete $a.index,$a}),Ue=[{tableName:(ae=u==null?void 0:u.related)==null?void 0:ae.find(ta=>ta==null?void 0:ta.includes("content")),tableContents:Me}];try{await I.pageBatchUpdateApi({platId:parseInt((H=Vl.value)==null?void 0:H.plat_id),changeContents:Ue})}catch(ta){el.ElMessage.error(((xe=(he=ta==null?void 0:ta.response)==null?void 0:he.data)==null?void 0:xe.message)||(ta==null?void 0:ta.message)||"保存失败"),Ye.setTableLoading(!1);return}}if(M.length>0){const Me={fixContent:M,buttonName:"新增",relatedContents:u==null?void 0:u.related,name:u==null?void 0:u.compName,columns:Ee.value};ze("change",Me)}el.ElMessage.success("保存成功"),c.value.clear(),g.value.clear(),_e.value=(Ve=_e.value)==null?void 0:Ve.map(Me=>({...Me,tableEditType:"text"})),zl.value=!1,Ye.setRefreshCurStructure(!0)},Vo=()=>{var f;const d=Array.from(c.value||[]);if(d.length===0){zl.value=!1;return}d.forEach(M=>{var B,Q;const O=g.value.get(M),R=(B=_e.value)==null?void 0:B.find(ae=>(ae==null?void 0:ae.id)===M);if(R!=null&&R._isTemp){_e.value=_e.value.filter(ae=>(ae==null?void 0:ae.id)!==R.id);return}if(O){const ae=(Q=_e.value)==null?void 0:Q.findIndex(H=>(H==null?void 0:H.id)===M);ae!==-1&&(_e.value[ae]={..._e.value[ae],...O})}}),c.value.clear(),g.value.clear(),_e.value=(f=_e.value)==null?void 0:f.map(M=>({...M,tableEditType:"text"})),zl.value=!1},Bt=a.ref(!1),Ut=async d=>{var R,B,Q,ae;if(!zl.value||d!=null&&d.isComposing||(d==null?void 0:d.key)!=="Enter")return;const f=d==null?void 0:d.target;if(((B=(R=f==null?void 0:f.tagName)==null?void 0:R.toLowerCase)==null?void 0:B.call(R))==="textarea")return;const O=document.getElementById("excel-table");O&&!O.contains(f)||((Q=f==null?void 0:f.blur)==null||Q.call(f),(ae=d.preventDefault)==null||ae.call(d),await a.nextTick(),await qt())},qt=async()=>{if(P.value){zl.value=!1;return}if(!Bt.value){Bt.value=!0;try{Array.from(c.value||[]).length>0?await Dt():zl.value=!1}finally{Promise.resolve().then(()=>{Bt.value=!1})}}},Ro=d=>{ar.value=d},$o=(d,f)=>{$l.value===f?zr.value=!1:zr.value=!0,$l.value=f==null?void 0:f.changeProp},Wt=d=>{if(!d)return;const{item:f,value:M}=d,O=we.value.find(R=>R.prop==f.prop);O&&O.contents.push({label:M,value:M})},xn=a.computed(()=>{var M,O,R;const d=(M=Ee.value)==null?void 0:M.some(B=>B==null?void 0:B.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",d?"inline-block":"none"),(R=(O=Ee.value)==null?void 0:O.filter(B=>(B==null?void 0:B.label)!=="操作"))==null?void 0:R.map(B=>({...B,filterable:!!(B!=null&&B.filterable),showSummary:!!(B!=null&&B.showSummary),operable:!!(B!=null&&B.operable),fixed:B==null?void 0:B.fixed}))}),_n=async(d,f,M)=>{const O=I.cloneDeep(Ee.value);await a.nextTick();const R=O==null?void 0:O.map(Q=>(M==null?void 0:M.label)===(Q==null?void 0:Q.label)?{...Q,[f]:d}:Q),B=Rn(R);await is(u.index,B),Ee.value=R,ne.value=B},Rn=d=>{var R;const f=d||[];return((R=sa.getAllLeafNodes(f)||[])==null?void 0:R.filter(B=>(B==null?void 0:B.prop)&&(B==null?void 0:B.type)!=="operate"&&(B==null?void 0:B.label)!=="操作"&&(B==null?void 0:B.prop)!=="operate")).map(B=>{const{prop:Q}=B;return zf(Q,B)})},Po=async d=>{let f=await Of(u.index);f||(f=Rn(d)),ne.value=f},Kt=async(d,f)=>{const M=I.cloneDeep(Ee.value),O=Q=>Array.isArray(Q)?Q.map(ae=>{const H=Array.isArray(ae==null?void 0:ae.children)&&ae.children.length>0,he={...ae};return(he==null?void 0:he.prop)==="operate"||(he==null?void 0:he.label)==="操作"||(he==null?void 0:he.type)==="operate"?(he.sortable=!1,he.filterable=!1,he.operable=!1):he.sortable=H?!1:!!d,H&&(he.children=O(he.children)),he}):Q,R=O(M),B=Rn(R);await is(u.index,B),Ee.value=R,ne.value=B,await a.nextTick(),vn.value=vn.value+1},Yt=()=>{va.value=!1},Gt=d=>{ze("clickTrigger",d)},$n=async d=>{var B,Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia;const f=d==null?void 0:d.row,M=d==null?void 0:d.rowData,O=d==null?void 0:d.suffix;if((B=f==null?void 0:f.toString())!=null&&B.includes(".urdf")||d!=null&&d.isUrdf||O!=null&&O.includes(".urdf")){if(f.includes(",")){el.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(D(f)){const se={files:[Ne(f)],data:{}};ue(se);return}Ua.value=[{url:f,extension:ye(f)}],Na.value=!0,te.value={data:I.cloneDeep(M)},Ke.value=!0;return}let R=[];if((Q=f==null?void 0:f.toString())!=null&&Q.includes(".stl")||(ae=f==null?void 0:f.toString())!=null&&ae.includes(".STL")||(H=f==null?void 0:f.toString())!=null&&H.includes(".obj")||(he=f==null?void 0:f.toString())!=null&&he.includes(".mtl")){const Pa=(xe=f==null?void 0:f.toString())==null?void 0:xe.split(","),se=pa(Pa),Da=se==null?void 0:se[0];if(D(Da==null?void 0:Da.extension)){ue({files:se,data:{}});return}Ua.value=se,Na.value=!1,Ke.value=!0;return}if((Ve=f==null?void 0:f.toString())!=null&&Ve.includes(".stl")||(Me=f==null?void 0:f.toString())!=null&&Me.includes(".STL")||(Ue=f==null?void 0:f.toString())!=null&&Ue.includes(".obj")||(ta=f==null?void 0:f.toString())!=null&&ta.includes(".mtl")||O!=null&&O.includes(".stl")||O!=null&&O.includes(".STL")||O!=null&&O.includes(".obj")||O!=null&&O.includes(".mtl")){let Pa,se=[],Da={};if(Array.isArray(f)?Pa=f:Pa=f==null?void 0:f.split(","),Pa==null||Pa.forEach(ua=>{ua.includes(".mtl")?se.push(ua):Da.blob=Da.blob?Da.blob+","+ua:ua}),(se==null?void 0:se.length)>0&&(Da.mtlBlobs=se),O&&(Da.suffix=O),(Ta=($a=Object.values(Da))==null?void 0:$a[0])!=null&&Ta.includes("http:"))R.push(Da);else{const ua=new Blob([Da.blob],{type:"application/octet-stream;charset=UTF-8"});let Sa=URL.createObjectURL(ua),oe="";(ra=f==null?void 0:f.split("/"))==null||ra.forEach((E,$e)=>{var fe;$e===((fe=f==null?void 0:f.split("/"))==null?void 0:fe.length)-1&&(oe=E)}),(Ya=Da.blob)!=null&&Ya.includes(".stl")&&(oe=(oe==null?void 0:oe.replaceAll(">",""))+".urdf"),ee.value=[{name:oe,blobUrl:Sa}],ja.value=!0}}else{const Pa=await el.axios.get(f,{responseType:"blob",headers:{"Content-Type":"application/json"}}),se=new Blob([Pa.data],{type:"application/octet-stream;charset=UTF-8"});let Da=URL.createObjectURL(se),ua="";if((ia=f==null?void 0:f.split("/"))==null||ia.forEach((Sa,oe)=>{var E;oe===((E=f==null?void 0:f.split("/"))==null?void 0:E.length)-1&&(ua=Sa)}),D(ua)){const Sa=le(ua),oe=Ne(f);ue({files:[oe],data:{trackFileType:Sa}});return}ee.value=[{name:ua,blobUrl:Da}],ja.value=!0}(R==null?void 0:R.length)>0&&t.setBlobUrls(R)},Jn=d=>{var O,R,B,Q;if(d!=null&&d.downloadUrl)return d==null?void 0:d.name;const f=(Q=(O=d==null?void 0:d.url)==null?void 0:O.split("."))==null?void 0:Q[((B=(R=d==null?void 0:d.url)==null?void 0:R.split("."))==null?void 0:B.length)-1];return(d==null?void 0:d.name)+"."+f},Jt=d=>{if(!d)return"未知文件";try{const O=Jn(d);if(typeof O=="string"&&O.includes("."))return O}catch{}const f=(d==null?void 0:d.fileName)||(d==null?void 0:d.name)||"未知文件",M=(d==null?void 0:d.suffix)||"";return f.includes(".")?f:`${f}${M}`},Xt=d=>{if(d==null||typeof d=="number"||typeof d!="string")return d;const f=d.match(/^(\d+)\_(\d+)$/);if(!f)return d;const M=Number(f[1]),O=Number(f[2]);return!Number.isFinite(M)||!Number.isFinite(O)?d:String(M*1e3+O)},Xn=d=>{if(d==null)return null;const f=String(d).trim();if(!f)return null;const M=Number(f);return Number.isFinite(M)?M:null},Fo=d=>{if(d==null)return null;const f=String(d).trim();if(!f)return null;if(/^\d+$/.test(f)){const R=Number(f);return Number.isFinite(R)?f.length<=10?R*1e3:R:null}const M=f.includes("T")?f:f.replace(" ","T"),O=Date.parse(M);return Number.isFinite(O)?O:null},Zt=(d,f=[])=>{const M=Array.isArray(d)?d.slice():[];if(M.length<=1)return M;const O=new Map((f||[]).map((Q,ae)=>[String(Q),ae])),R=M.some(Q=>Xn(Q==null?void 0:Q.sort)!==null),B=M.map((Q,ae)=>({r:Q,idx:ae,id:String((Q==null?void 0:Q.id)??""),sortVal:Xn(Q==null?void 0:Q.sort),createTimeMs:Fo(Q==null?void 0:Q.create_time),prevIdx:O.has(String(Q==null?void 0:Q.id))?O.get(String(Q==null?void 0:Q.id)):Number.POSITIVE_INFINITY}));return B.sort((Q,ae)=>{if(R){const xe=Q.sortVal,Ve=ae.sortVal;if(xe===null&&Ve!==null)return 1;if(xe!==null&&Ve===null)return-1;if(xe!==null&&Ve!==null&&xe!==Ve)return xe-Ve}const H=Q.createTimeMs,he=ae.createTimeMs;return H!==null&&he!==null&&H!==he?he-H:H!==null&&he===null?-1:H===null&&he!==null?1:Q.prevIdx!==ae.prevIdx?Q.prevIdx-ae.prevIdx:Q.idx-ae.idx}),B.map(Q=>Q.r)},Nn=(d,f=[])=>{const M=f==null?void 0:f[d-1],O=f==null?void 0:f[d],R=Xn(M==null?void 0:M.sort),B=Xn(O==null?void 0:O.sort);let Q=null;R!==null&&B!==null&&B>R?Q=(R+B)/2:R!==null?Q=R+1:B!==null?Q=Math.max(B-1,0):Q=(d??0)+1;const ae=Number(Q.toFixed(6));return String(Number.isFinite(ae)?ae:Q)},jo=async d=>{let f=null,M=null;if(d!=null&&d.id){const R=I.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});try{const B=await I.platformDownloadFile(d);f=URL.createObjectURL(B.data),M=Jt(d)}finally{R.close()}}else if(d!=null&&d.downloadUrl){const R=await it(),B=I.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Q=await el.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:R,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{B.close()}),ae=new Blob([Q.data],{type:"application/octet-stream;charset=UTF-8"});f=URL.createObjectURL(ae),M=d==null?void 0:d.name}else{const R=await I.platformDownloadFile({url:d==null?void 0:d.url});!d.url.toUpperCase().includes(".OBJ")&&!d.url.toUpperCase().includes(".STL")&&!d.url.toUpperCase().includes(".MTL")&&!d.url.toUpperCase().includes(".URDF")?(f=URL.createObjectURL(R.data),M=Jn(d)):f=d==null?void 0:d.url}if(D(f)){const R={row:`${f}`,suffix:ye(M)};$n(R);return}const O={name:M,blobUrl:f};ee.value=[O],ja.value=!0},ot=async d=>{let f=null,M=null;if(d!=null&&d.id){const B=await I.platformDownloadFile(d);f=URL.createObjectURL(B.data),M=Jt(d)}else if(d!=null&&d.downloadUrl){const B=await it(),Q=await el.axios.post(d==null?void 0:d.url,null,{responseType:"blob",headers:{Authorization:B,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),ae=new Blob([Q.data],{type:"application/octet-stream;charset=UTF-8"});f=URL.createObjectURL(ae),M=d==null?void 0:d.name}else{const B=await I.platformDownloadFile({url:d==null?void 0:d.url});f=URL.createObjectURL(B.data),M=Jn(d)}const O={name:M,blobUrl:f},R=document.createElement("a");R.href=O.blobUrl,R.download=O.name,R.style.display="none",document.body.appendChild(R),R.click(),setTimeout(()=>{document.body.removeChild(R)},100)},Ho=(d,f)=>{var O;if(Object.values(f).length===0)return;let M=d;return Object.values(f).find(R=>{var B,Q,ae;return((B=R==null?void 0:R.toString())==null?void 0:B.includes(".txt"))||((Q=R==null?void 0:R.toString())==null?void 0:Q.includes(".cpt"))||((ae=R==null?void 0:R.toString())==null?void 0:ae.includes(".obj"))})?M=[...d,Se.value]:(O=u==null?void 0:u.config)!=null&&O.allowMove&&(M=[...d,{label:"迁移"}]),M},Nt=()=>{j.value=!0},Uo=a.ref([]),qo=async(d,f,M=!1)=>{var Q,ae,H,he;if(!d)return;if(M){_e.value=[...ve.value.values()].filter(xe=>Object.values(xe).some(Ve=>typeof Ve=="string"?Ve==null?void 0:Ve.toLowerCase().includes(f==null?void 0:f.toLowerCase()):!1));return}let O={};for(let xe in d)(d==null?void 0:d[xe])!==""&&(O[xe]=d==null?void 0:d[xe]);if(JSON.stringify(O)==="{}"){_e.value=Array.from(((Q=ve.value)==null?void 0:Q.values())??[]);return}let R=(ae=u==null?void 0:u.related)==null?void 0:ae.find(xe=>xe==null?void 0:xe.includes("content_")),B=await I.getFillFind({platId:parseInt((H=Vl==null?void 0:Vl.value)==null?void 0:H.plat_id),tableName:R,params:O});B=(he=B==null?void 0:B.data)==null?void 0:he.result,_e.value=B,Ye.setTableLoading(!1)},Qt=async d=>{var M,O;if(!Ie(u.config,{type:na.TABLE})||!d)return;((M=Array.from(c.value))==null?void 0:M.length)>0&&await Dt();const f=d==null?void 0:d.id;f!=null&&(c.value.clear(),g.value.clear(),g.value.has(f)||g.value.set(f,I.cloneDeep(d)),_e.value=(O=_e.value)==null?void 0:O.map(R=>({...R,tableEditType:(R==null?void 0:R.id)===f?"edit":"text"})),c.value.add(f),zl.value=!0)},Pn=async(d,f,M,O)=>{O!=null&&O.isExistChild&&ze("clickMainKey",d,M,Ee.value)},wn=()=>{ja.value=!1},eo=d=>{ze("rowClick",d)};a.watch(()=>u.changedContent,()=>{var M,O;if(!u.changedContent)return;let d=(M=_e.value)==null?void 0:M.map(R=>{var B;return R.id===((B=u.changedContent)==null?void 0:B.id)&&(R={...u.changedContent,id:u.changedContent.newId?u.changedContent.newId:u.changedContent.id},delete R.newId),R});const f=(O=u.itemData)==null?void 0:O.map(R=>((R==null?void 0:R.key)==="tableContents"&&(R.contents=d),R));_e.value=d,ze("contentChange",{contents:f,index:u.index}),ze("change",{content:d,index:u==null?void 0:u.index,buttonName:"",id:u==null?void 0:u.index})},{deep:!0,immediate:!0});const Tt=()=>{},Wo=async()=>{const d=xa.value,f=sessionStorage.getItem("systemKey"),M=await sa.getItemData(d,f,""),O=(M==null?void 0:M.find(ae=>(ae==null?void 0:ae.name)==="方法明细"))||(M==null?void 0:M[0]),R=(O==null?void 0:O.compData)||[],B=R==null?void 0:R.find(ae=>{const H=ae==null?void 0:ae.key;return H==="formContent"||H==="tableContents"});return B==null?void 0:B.contents},it=async()=>{const f=el.Local.get("access-token");return f?`Bearer ${f}`:""},Ko=async(d,{token:f,inputData:M}={})=>await el.axios.post(d,M,{headers:{Authorization:f}}).catch(R=>(ea.setImportLoading(!1),Promise.reject(R))),Yo=d=>{var O;let f={};const M=[];return f.form={},(O=I.cloneDeep(d))==null||O.forEach((R,B)=>{var Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia;if((R==null?void 0:R.comp)==="Table"){(ae=(Q=R==null?void 0:R.compData)==null?void 0:Q.find(ua=>(ua==null?void 0:ua.key)==="header"))==null||ae.contents;let Pa=(xe=(he=(H=R==null?void 0:R.compData)==null?void 0:H.find(ua=>(ua==null?void 0:ua.key)==="tableContents"))==null?void 0:he.contents)==null?void 0:xe.map(ua=>ua.slice(1));($a=(ta=(Ue=(Me=(Ve=R==null?void 0:R.compData)==null?void 0:Ve.find(ua=>(ua==null?void 0:ua.key)==="header"))==null?void 0:Me.contents)==null?void 0:Ue[0])==null?void 0:ta[0])==null||$a.label;let se=(ra=(Ta=R==null?void 0:R.compData)==null?void 0:Ta.find(ua=>(ua==null?void 0:ua.key)==="header"))==null?void 0:ra.contents,Da=[];Pa==null||Pa.forEach(ua=>{let Sa=[];ua==null||ua.forEach((oe,E)=>{var fe;let $e={};((fe=se[E])==null?void 0:fe.label)!=="操作"&&($e[se[E].label]=oe,Sa.push($e))}),Da.push(Sa)}),f[R.name]=Da}else{const Pa=(ia=(Ya=R.compData)==null?void 0:Ya.find(se=>(se==null?void 0:se.key)==="formContent"))==null?void 0:ia.contents;Pa==null||Pa.forEach(se=>{var Da,ua;if(se.prop!==""){let Sa=se==null?void 0:se.value;Array.isArray(Sa)?Sa=((Da=Sa==null?void 0:Sa[0])==null?void 0:Da.oldUrl)||"http://222.92.178.198:62001/"+((ua=Sa==null?void 0:Sa[0])==null?void 0:ua.url):Sa=Sa.toString(),se={key:(se==null?void 0:se.prop)??(se==null?void 0:se.label),value:Sa},M.push(se)}})}}),f.form=sa.getFormContents(M),f},Go=d=>{const f=[],M=O=>{O&&typeof O=="object"&&!Array.isArray(O)?Object.values(O).forEach(M):f.push(O)};return M(d),f},Jo=async(d,f,M)=>{var se,Da,ua,Sa,oe,E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl;ea.setImportLoading(!0),Ye.setFreshContent(!1);let O=await Wo().catch(Ka=>(ea.setImportLoading(!1),Promise.reject(Ka)));O=O==null?void 0:O.filter(Ka=>{var wl;return((wl=Ka==null?void 0:Ka.find(Wa=>Wa==null?void 0:Wa.id))==null?void 0:wl.id)===(f==null?void 0:f.id)});let R=sa.getEqualChild([(se=Ee.value)==null?void 0:se.filter(Ka=>(Ka==null?void 0:Ka.label)!=="操作")]);const B=(ua=(Da=sa.tableToForm(O,R))==null?void 0:Da[0])==null?void 0:ua.find(Ka=>{const wl=Ka==null?void 0:Ka.key;return wl==="Interface"||wl==="方法体"}),Q=B==null?void 0:B.value;if(!Q){console.log("未搜索到isMain, 缺少算法执行接口"),ea.setImportLoading(!1);return}const ae=Ee.value?sa.getEqualChild([Ee.value]):[],H=ae.find(Ka=>{const wl=Ka==null?void 0:Ka.prop;return wl==="Input1"||wl==="输入数据.输入1"||wl==="样本输入数据"}),he=H==null?void 0:H.prop;let xe=f==null?void 0:f[he];const Ve=await it().catch(Ka=>(ea.setImportLoading(!1),Promise.reject(Ka)));let Me=!0,Ue="";(Sa=Ee.value)==null||Sa.forEach(Ka=>{(Ka==null?void 0:Ka.prop)===he&&(Me=!!(Ka!=null&&Ka.childPath),Ue=Ka==null?void 0:Ka.childPath)});let ta="";if(Me){let Ka=(E=(oe=Ee.value)==null?void 0:oe.find(vl=>(vl==null?void 0:vl.isMainKey)===!0))==null?void 0:E.prop;ta=f==null?void 0:f[Ka];let wl=Ue==null?void 0:Ue.split(x),Wa=[];wl==null||wl.forEach((vl,Tl)=>{(wl==null?void 0:wl.length)-1===Tl&&Wa.push(ta),Wa.push(vl)}),Wa=Wa==null?void 0:Wa[0];let hl=await sa.getItemData(Wa,sessionStorage.getItem("systemKey"),""),Ga=hl==null?void 0:hl.filter(vl=>(vl==null?void 0:vl.name)===he);Ga=Ga==null?void 0:Ga.map(vl=>{var Tl;return vl.compData=(Tl=vl==null?void 0:vl.compData)==null?void 0:Tl.map(Bl=>{var hr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(hr=Bl==null?void 0:Bl.contents)==null?void 0:hr.filter(Ll=>(Ll==null?void 0:Ll[1])===(f==null?void 0:f[he]))),Bl}),vl}),(!Ga||(Ga==null?void 0:Ga.length)===0)&&(Ga=hl,Ga=Ga==null?void 0:Ga.map(vl=>{var Tl;return vl.compData=(Tl=vl==null?void 0:vl.compData)==null?void 0:Tl.map(Bl=>{var hr;return(Bl==null?void 0:Bl.key)==="tableContents"&&(Bl.contents=(hr=Bl==null?void 0:Bl.contents)==null?void 0:hr.filter(Ll=>{var xl,Al;return(Ll==null?void 0:Ll[1])===(f==null?void 0:f[(Al=(xl=Ee==null?void 0:Ee.value)==null?void 0:xl[0])==null?void 0:Al.prop])})),Bl}),vl})),xe=Yo(Ga)}const $a=await Ko(Q,{token:Ve,inputData:xe}).catch(Ka=>(ea.setImportLoading(!1),Promise.reject(Ka))),Ta=($e=$a==null?void 0:$a.data)==null?void 0:$e.data,ra=ae.find(Ka=>(Ka==null?void 0:Ka.prop)==="Output1"),Ya=ra==null?void 0:ra.prop;let ia=[],Pa=[];if(Ta&&((fe=Object.values(Ta))==null?void 0:fe.length)>0){let Ka=[];const wl=new FormData,Wa=(ba=Go(Ta))==null?void 0:ba.map(async Ga=>{var vl,Tl;if(!Array.isArray(Ga)&&(Ga!=null&&Ga.includes("http"))){let Bl=await el.axios.get(Ga,{responseType:"blob"}),hr=(Tl=Ga==null?void 0:Ga.split("/"))==null?void 0:Tl[((vl=Ga==null?void 0:Ga.split("/"))==null?void 0:vl.length)-1];wl.append("files",Bl.data,hr)}else Ka.push(Ga)});if(await Promise.all(Wa),!sa.isFormDataEmpty(wl)){let Ga=await I.uploadAmountApi(wl),vl=(ya=(fa=Ga==null?void 0:Ga.data)==null?void 0:fa.result)==null?void 0:ya.map(Tl=>{var Bl,hr,Ll,xl,Al,Gl;return{name:(Gl=(Al=(xl=(Bl=Tl==null?void 0:Tl.url)==null?void 0:Bl.split("/"))==null?void 0:xl[((Ll=(hr=Tl==null?void 0:Tl.url)==null?void 0:hr.split("/"))==null?void 0:Ll.length)-1])==null?void 0:Al.split("."))==null?void 0:Gl[0],url:Tl==null?void 0:Tl.url}});Ka=[...Ka,...vl]}let hl={};for(let Ga in f)Ga!=="id"&&(hl[Ga]=f[Ga]);hl[Ya]=Ka,Pa.push({id:f==null?void 0:f.id,value:{tableData:hl}})}if((Pa==null?void 0:Pa.length)>0){const Ka=Pa.map(Wa=>{const hl={id:Wa.id,...Wa.value.tableData};return delete hl._isOCRRow,delete hl._ocrTableId,delete hl._isTemp,delete hl.tableEditType,delete hl.index,hl}),wl=[{tableName:(Ia=u==null?void 0:u.related)==null?void 0:Ia.find(Wa=>Wa==null?void 0:Wa.includes("content")),tableContents:Ka}];await I.pageBatchUpdateApi({platId:parseInt((dl=Vl.value)==null?void 0:dl.plat_id),changeContents:wl})}if((ia==null?void 0:ia.length)>0)try{await I.pageBatchAddApi({platId:parseInt((Xa=Vl.value)==null?void 0:Xa.plat_id),changeContents:[{tableName:(ml=u==null?void 0:u.related)==null?void 0:ml.find(Ka=>Ka==null?void 0:Ka.includes("content")),tableContents:ia.map(Ka=>{var Wa,hl,Ga;const wl={id:((Wa=Ka==null?void 0:Ka.key)==null?void 0:Wa.id)??((hl=Ka==null?void 0:Ka.key)==null?void 0:hl.rowId)??(Ka==null?void 0:Ka.id),...((Ga=Ka==null?void 0:Ka.value)==null?void 0:Ga.tableData)||{}};return delete wl._isOCRRow,delete wl._ocrTableId,delete wl._isTemp,delete wl.tableEditType,delete wl.index,Object.keys(wl).forEach(vl=>{vl==="证书附件"&&Array.isArray(wl[vl])&&(wl[vl]=JSON.stringify(wl[vl]))}),wl})}]})}catch(Ka){el.ElMessage.error(((Rl=(yl=Ka==null?void 0:Ka.response)==null?void 0:yl.data)==null?void 0:Rl.message)||(Ka==null?void 0:Ka.message)||"保存失败"),Ye.setTableLoading(!1);return}Mt(!0),ea.setImportLoading(!1),Ye.setFreshContent(!0)},ao=(d,f)=>(d=d==null?void 0:d.map(M=>{var O,R;return M!=null&&M.children&&((O=M.children)!=null&&O.find(B=>B.id===(f==null?void 0:f.id))?M.children=(R=M.children)==null?void 0:R.filter(B=>(B==null?void 0:B.id)!==(f==null?void 0:f.id)):M.children=ao(M.children,f)),M}),d),st=a.ref(!1),Xo=()=>{st.value=!0},Zo=async d=>{var M,O,R,B;st.value=!1;const f=Array.isArray(d)?d:d?[d]:[];if(f.length!==0)for(const Q of f){const ae={name:Q.name||`capture-${Date.now()}.jpg`,url:URL.createObjectURL(Q),raw:Q,uid:Date.now()+Math.random()};Xe.value.push(ae),El(ae,"uploading"),Ml(ae,0);try{const H=new FormData;H.append("file",Q,ae.name);const he=await I.platformUploadFile(H);ae.uploadResult=((M=he==null?void 0:he.data)==null?void 0:M.result)||{name:ae.name,url:"",fileName:ae.name},Sl({name:((O=ae.uploadResult)==null?void 0:O.name)||ae.name,url:((R=ae.uploadResult)==null?void 0:R.url)||"",id:(B=ae.uploadResult)==null?void 0:B.id}),El(ae,"uploaded"),Ml(ae,100)}catch(H){console.error("文件上传失败:",H),el.ElMessage.error(`文件 ${ae.name} 上传失败,请重试`),El(ae,"pending"),Ml(ae,0);const he=Xe.value.findIndex(xe=>xe.uid===ae.uid);he>-1&&Xe.value.splice(he,1)}}},i=a.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:u==null?void 0:u.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(d,f,M)=>{f===(u==null?void 0:u.index)?M(new Error("选择源不能和目标源一致")):M()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),o=a.reactive({title:"温馨提示:检测到导入的以下数据,系统中已存在,请选择操作",show:!1,width:"70%",columns:[],tableData:[],existRows:[],buttonValue:[{label:"取消",value:"cancel",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"覆盖",render:"popover",value:"replace",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}],result:""}),p=()=>{o.show=!1},y=async d=>{var f,M,O,R,B,Q,ae,H;try{if(d==="cancel"&&(o.show=!1),d==="replace"&&((f=o==null?void 0:o.existRows)==null?void 0:f.length)>0){await I.pageBatchDeleteApi({platId:parseInt((M=Vl.value)==null?void 0:M.plat_id),changeContents:[{tableName:((O=u==null?void 0:u.related)==null?void 0:O.find(xe=>xe==null?void 0:xe.includes("content_")))||((R=u==null?void 0:u.related)==null?void 0:R.find(xe=>xe==null?void 0:xe.includes("content"))),tableContents:o==null?void 0:o.existRows}]});const he=await I.pageBatchAddApi({platId:parseInt((B=Vl.value)==null?void 0:B.plat_id),changeContents:[{tableName:(Q=u==null?void 0:u.related)==null?void 0:Q.find(xe=>xe==null?void 0:xe.includes("content")),tableContents:(()=>{const xe=(_e.value||[]).filter(ta=>!((o==null?void 0:o.existRows)||[]).some($a=>String($a==null?void 0:$a.id)===String(ta==null?void 0:ta.id))),Ve=(o==null?void 0:o.tableData)||[],Me=[];let Ue=xe.slice();return Ve.forEach(ta=>{const $a={...ta};try{$a.sort=Nn(0,Ue)}catch{}Me.push($a),Ue.unshift($a)}),Me.map((ta,$a)=>({id:$a,...ta}))})()}]});((ae=he==null?void 0:he.data)==null?void 0:ae.code)===200&&(await mi({buttonName:"新增",columns:Ee.value,fixContent:(H=o==null?void 0:o.tableData)==null?void 0:H.map((xe,Ve)=>({id:Ve,...xe})),relatedContents:u==null?void 0:u.related}),el.ElMessage.success("数据导入替换成功"))}}catch{throw new Error(e)}finally{o.show=!1,o.columns=[],o.tableData=[],o.existRows=[]}},C=()=>{i.show=!1},V=d=>{var f,M;if((d==null?void 0:d.buttonName)==="取消")return i.show=!1;i.to=d==null?void 0:d.content,!(!(u!=null&&u.index)||!((f=i.to)!=null&&f.groupName))&&(u==null?void 0:u.index)!==((M=i.to)==null?void 0:M.groupName)&&(ze("change",{buttonName:"迁移",value:{from:i.from,to:i.to,data:i.selectRow}}),i.show=!1)},q=async d=>{var f,M,O,R;if(d){if(!Dr.validateFileSize(d.raw)){el.ElMessage.warning(`文件大小不能超过 ${Zr.value.maxSize}MB`);const B=Xe.value.findIndex(Q=>Q.uid===d.uid);B>-1&&Xe.value.splice(B,1),G();return}if(!Dr.validateFileType(d.raw)){el.ElMessage.warning("请上传图片文件");const B=Xe.value.findIndex(Q=>Q.uid===d.uid);B>-1&&Xe.value.splice(B,1),G();return}El(d,"uploading"),Ml(d,0);try{const B=new FormData;B.append("file",d.raw,d.name);const Q=await I.platformUploadFile(B);d.uploadResult=((f=Q==null?void 0:Q.data)==null?void 0:f.result)||{name:d.name,url:"",fileName:d.name},Sl({name:((M=d.uploadResult)==null?void 0:M.name)||d.name,url:((O=d.uploadResult)==null?void 0:O.url)||"",id:(R=d.uploadResult)==null?void 0:R.id}),El(d,"uploaded"),Ml(d,100)}catch(B){console.error("文件上传失败:",B),el.ElMessage.error(`文件 ${d.name} 上传失败,请重试`),El(d,"pending"),Ml(d,0);const Q=Xe.value.findIndex(ae=>ae.uid===d.uid);Q>-1&&Xe.value.splice(Q,1)}finally{G()}}},G=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');d&&(d.value="")})},pe=async()=>{var M,O;if(sessionStorage.setItem("ocr_root_table_id",String((u==null?void 0:u.index)??"")),Xe.value.length===0){el.ElMessage.warning("请先选择要上传的图片");return}if(Xe.value.filter(R=>{const B=sl(R);return B!=="uploaded"&&B!=="completed"&&B!=="failed"}).length>0){el.ElMessage.warning("请等待所有文件上传完成后再开始识别");return}da.value=!0,Ce.value=0;let f=null;try{Xe.value.forEach(ra=>{El(ra,"processing")});const R=Math.floor(Math.random()*10)+90;f=setInterval(()=>{Ce.value<R?Ce.value+=1:clearInterval(f)},50);const B=Xe.value.map(ra=>{var Ya,ia,Pa;return{name:((Ya=ra.uploadResult)==null?void 0:Ya.name)||ra.name,url:((ia=ra.uploadResult)==null?void 0:ia.url)||"",fileName:((Pa=ra.uploadResult)==null?void 0:Pa.fileName)||ra.name}}),Q=Dr.extractTableHeaders(Ee.value),ae=B.map(ra=>({name:(ra==null?void 0:ra.fileName)||(ra==null?void 0:ra.name),url:(ra==null?void 0:ra.url)||""})),H=await Dr.recognize(ae,Q);if(console.log(H,"ocrResult"),clearInterval(f),f=null,(H==null?void 0:H.code)===500||(H==null?void 0:H.type)==="error"||!(H!=null&&H.result)){Ce.value=0,Xe.value.forEach(ra=>{El(ra,"failed"),Ml(ra,0)}),el.ElMessage.error((H==null?void 0:H.message)||"OCR识别失败,请重试"),da.value=!1;return}Ce.value=R;const he=Array.isArray(H==null?void 0:H.result)?H.result:[];if(he.length===0){Ce.value=0,Xe.value.forEach(ra=>{El(ra,"failed"),Ml(ra,0)}),el.ElMessage.warning("OCR识别未返回有效数据"),da.value=!1;return}const xe=new Set,Ve=[];he.forEach((ra,Ya)=>{const ia=ra!=null&&ra.数据&&typeof(ra==null?void 0:ra.数据)=="object"?ra.数据:{},Pa=Array.isArray(ra==null?void 0:ra.图片信息)?ra.图片信息:[],se=new Map;Pa.forEach(ua=>{ua!=null&&ua.name&&se.set(ua.name,ua.url||"")});const Da={_index:Ya,_certType:(ra==null?void 0:ra.证书类型)||"",_certNo:(ra==null?void 0:ra.证书编号)||"",_ocrImages:Pa,__ocrFieldMeta:{}};Object.entries(ia).forEach(([ua,Sa])=>{let oe="",E=0,$e=[],fe="";Sa&&typeof Sa=="object"&&!Array.isArray(Sa)?(oe=(Sa==null?void 0:Sa.value)??"",E=(Sa==null?void 0:Sa.score)??0,$e=Array.isArray(Sa==null?void 0:Sa.bboxNorm)?Sa==null?void 0:Sa.bboxNorm:[],fe=(Sa==null?void 0:Sa.imageName)||""):Array.isArray(Sa)&&Sa.length>=2?(oe=Sa[0]??"",E=Sa[1]??0):(oe=Sa??"",E=0),Da[ua]=oe,Da[`${ua}_accuracy`]=E,xe.add(ua),Da.__ocrFieldMeta[ua]={value:oe,score:E,bboxNorm:$e,imageName:fe,imageUrl:fe&&se.get(fe)||"",images:Pa}}),Ve.push(Da)});const Me=[],Ue=new Set;Ve.forEach(ra=>{ra&&xe.forEach(Ya=>{const ia=ra[`${Ya}_accuracy`];(typeof ia=="number"?ia>0:ia!=null&&String(ia).trim()!==""&&String(ia)!=="0")&&Ue.add(Ya)})}),xe.forEach(ra=>{Me.push({prop:ra,label:ra,editable:!0,minWidth:230}),Ue.has(ra)&&Me.push({prop:`${ra}_accuracy`,label:"准确率",editable:!1,minWidth:100,isAccuracy:!0})}),Xe.value.forEach(ra=>{El(ra,"completed")}),Ce.value=100,me.value=Me,Fa.value=Ve,kl.value=B,Ha.value=H;const ta=["出厂编号","设备名称","制造厂"],$a=Me.filter(ra=>ra&&!ra.isAccuracy&&typeof ra.prop=="string").map(ra=>ra.prop),Ta=["出厂编号","设备名称","制造厂"];tl.value=$a.filter(ra=>Ta.includes(ra)),console.log("[OCR] 默认勾选字段 props:",tl.value),W.value=2,da.value=!1,Be.value=!1}catch(R){console.error("OCR处理失败:",R),f&&(clearInterval(f),f=null),el.ElMessage.error(((O=(M=R==null?void 0:R.response)==null?void 0:M.data)==null?void 0:O.message)||"OCR识别失败,请重试"),da.value=!1,Ce.value=0,Xe.value.forEach(B=>{El(B,"pending"),Ml(B,0)})}},Oe=d=>{if(d==null)return"";let f=String(d);return f=f.replace(/\s+/g," ").trim(),f=f.replace(/[!-~]/g,M=>String.fromCharCode(M.charCodeAt(0)-65248)),f=f.replace(/ /g," "),f=f.replace(/^(编号|No\.?|NO\.?|no\.?|SN\.?|sn\.?|序列号)\s*[::]?\s*/i,""),f},ge=()=>{var ra,Ya;const d=kl.value,f=Ha.value,M=Fa.value;if(!M||M.length===0){el.ElMessage.warning("暂无数据可添加");return}const O=(ra=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:ra.filter(ia=>(ia==null?void 0:ia.type)!=="operate"&&(ia==null?void 0:ia.label)!=="操作"&&(ia==null?void 0:ia.prop)!=="operate"),R=new Map,B=new Map,Q=(Ya=O==null?void 0:O.find(ia=>(ia==null?void 0:ia.label)==="证书附件"))==null?void 0:Ya.prop;O==null||O.forEach(ia=>{ia!=null&&ia.label&&(ia!=null&&ia.prop)&&(R.set(ia.label,ia.prop),B.set(ia.prop,ia.label))});const ae=Date.now(),H=ia=>String(ae*1e3+ia),he=[],xe=[],Ve=ia=>{const Pa=wo&&wo[ia]||[ia];for(const se of Pa){const Da=R.get(se);if(Da)return Da}return""},Me=Ve("出厂编号"),Ue=Ve("设备名称"),ta=Ve("制造厂"),$a=[],Ta=ia=>{var oe,E;if(!Q)return[];const Pa=(Array.isArray(d)?d[ia]:null)||null,se=(Pa==null?void 0:Pa.url)||"",Da=(Pa==null?void 0:Pa.fileName)||(Pa==null?void 0:Pa.name)||"";return(String(Da).toLowerCase().endsWith(".pdf")||String(se).toLowerCase().endsWith(".pdf"))&&se?[{url:se,name:Da,fileName:Da}]:(Array.isArray((E=(oe=f==null?void 0:f.result)==null?void 0:oe[ia])==null?void 0:E.图片信息)?f.result[ia].图片信息:[]).map($e=>({url:($e==null?void 0:$e.url)||"",name:($e==null?void 0:$e.name)||"",fileName:($e==null?void 0:$e.name)||""})).filter($e=>$e.url)};if(M.forEach((ia,Pa)=>{var dl;const se={id:H(Pa),_isOCRRow:!0,_ocrTableId:u==null?void 0:u.index};for(const[Xa,ml]of R.entries())Object.prototype.hasOwnProperty.call(ia,Xa)&&(se[ml]=ia[Xa]);Q&&(se[Q]=Ta(Pa));const Da=(Array.isArray(f==null?void 0:f.result)?f.result[Pa]:null)||null,ua=(Array.isArray(d)?d[Pa]:null)||null,Sa=(ua==null?void 0:ua.url)||"",oe=(ua==null?void 0:ua.fileName)||(ua==null?void 0:ua.name)||"",E=String(oe).toLowerCase().endsWith(".pdf")||String(Sa).toLowerCase().endsWith(".pdf"),$e={ts:Date.now(),versionId:String(Date.now())+"_"+String(Pa),label:new Date().toLocaleString(),certType:(Da==null?void 0:Da.证书类型)||"",certNo:(Da==null?void 0:Da.证书编号)||"",fileType:E?"pdf":"image",sourceUrl:E?Sa:"",images:Array.isArray(Da==null?void 0:Da.图片信息)?Da.图片信息.map(Xa=>({name:(Xa==null?void 0:Xa.name)||"",url:(Xa==null?void 0:Xa.url)||""})).filter(Xa=>Xa.url):[]},fe=Xa=>Oe(Xa?se==null?void 0:se[Xa]:""),ba=fe(Me),fa=fe(Ue),ya=fe(ta);if(!!(Me&&Ue&&ta&&ba&&fa&&ya)){const Xa=(_e.value||[]).find(ml=>{const yl=Oe(Me?ml==null?void 0:ml[Me]:""),Rl=Oe(Ue?ml==null?void 0:ml[Ue]:""),Ka=Oe(ta?ml==null?void 0:ml[ta]:"");return yl&&Rl&&Ka&&yl===ba&&Rl===fa&&Ka===ya});if(Xa){$a.push({idx:Pa,ocrRow:se,versionItem:$e,ocrNo:ba,candidates:[Xa],selectedTargetId:String((Xa==null?void 0:Xa.id)??""),__decision:"replace",allowAdd:!1,allowReplace:!0});return}}if(ba&&Me){const Xa=(_e.value||[]).filter(ml=>{const yl=Oe(Me?ml==null?void 0:ml[Me]:"");return yl&&yl===ba});if(Xa.length>0){$a.push({idx:Pa,ocrRow:se,versionItem:$e,ocrNo:ba,candidates:Xa,selectedTargetId:"",__decision:"",allowAdd:!0,allowReplace:!0});return}}try{if(se.sort===void 0||se.sort===null||String(se.sort).trim()===""){const Xa=(_e.value||[]).map(yl=>Xn(yl==null?void 0:yl.sort)).filter(yl=>yl!==null),ml=Xa.length>0?Math.max(...Xa):((dl=_e.value)==null?void 0:dl.length)??0;se.sort=String(Number((ml+1).toFixed(6)))}}catch{}ga(u==null?void 0:u.index,se.id,$e),$a.push({idx:Pa,ocrRow:se,versionItem:$e,ocrNo:ba,candidates:[],selectedTargetId:"",__decision:"add",allowAdd:!0,allowReplace:!1})}),($a||[]).length>0){Hl.value=($a||[]).map(ia=>({...ia,selectedTargetId:(ia==null?void 0:ia.selectedTargetId)||""})),Pl.value=!0,gr.value=xe,rr.value=he,kr.value=f,wr.value=d,Sr.value=Q||"";return}},Ze=(d,f,M)=>{Fa.value[d]&&(Fa.value[d][f]=M)},za=d=>d==null||d===0?"-":`${(Number(d)*100).toFixed(1)}%`,nl=d=>{if(d==null||d===0)return"#909399";const f=Number(d);return f>=.9?"#67c23a":f>=.7?"#e6a23c":"#f56c6c"},Qa=d=>{var M,O,R,B;if(Za.value===d){Za.value=null,ul.value=!1,cl.value="";return}Za.value=d,cl.value="";const f=(M=Fa.value)==null?void 0:M[d];if(f&&Array.isArray(f._ocrImages)&&f._ocrImages.length>0){Wl.value=f._ocrImages.map(H=>({name:(H==null?void 0:H.name)||"",url:(H==null?void 0:H.url)||""})).filter(H=>H.name||H.url);const Q=f.__ocrFieldMeta||{},ae=(O=Object.values(Q))==null?void 0:O.find(H=>H==null?void 0:H.imageName);ql.value=(ae==null?void 0:ae.imageName)||((B=(R=Wl.value)==null?void 0:R[0])==null?void 0:B.name)||"",ul.value=Wl.value.length>0}else Wl.value=[],ul.value=!1,ql.value=""},il=()=>{rl.value=!1,Xe.value=[],oa.value=null,W.value=1,la.value.clear(),ka.value.clear(),Ce.value=0,ul.value=!1},_l=d=>d.raw?URL.createObjectURL(d.raw):d.url?d.url:"",sl=d=>{const f=d.uid||d.name;return la.value.get(f)||"pending"},Dl=d=>{const f=d.uid||d.name;return ka.value.get(f)||0},Ml=(d,f)=>{const M=d.uid||d.name;ka.value.set(M,Math.min(100,Math.max(0,f)))},Kl=d=>{const f=sl(d),M=100.53;if(f==="completed"||f==="uploaded")return`${M} ${M}`;if(f==="failed")return`${M} ${M}`;if(f==="uploading"){const O=Dl(d);return`${M*(O/100)} ${M}`}else if(f==="processing")return`${M*.5} ${M}`;return`0 ${M}`},El=(d,f)=>{const M=d.uid||d.name;la.value.set(M,f),(f==="completed"||f==="uploaded")&&Ml(d,100)},Fl=()=>{a.nextTick(()=>{const d=document.querySelector('.ocr-upload-input input[type="file"]');if(d)d.value="",d.click();else{const f=document.createElement("input");f.type="file",f.multiple=!0,f.accept="image/*,application/pdf",f.style.display="none",f.onchange=async M=>{const O=Array.from(M.target.files||[]);for(const R of O){const B={name:R.name,raw:R,uid:Date.now()+Math.random()};Xe.value.push(B),await q(B)}M.target.value="",document.body.removeChild(f)},document.body.appendChild(f),f.click()}})},Ir=()=>{W.value>1&&W.value--},mr=()=>{W.value===1?Xe.value.length>0&&!da.value&&pe():W.value===2&&(ge(),W.value=3)},Fr=async d=>{await on(d==null?void 0:d.row)},en=async({row:d,prop:f})=>{!d||!f||await on(d,f)},on=async(d,f)=>{var R,B;const M=d==null?void 0:d.id;if(!M){el.ElMessage.warning("暂无可预览数据");return}let O=Ra(u==null?void 0:u.index,M);if(!O||O.length===0){const Q=sessionStorage.getItem("ocr_root_table_id"),ae=Q!==null?Number(Q):null;if(ae!=null&&ae!==""&&!Number.isNaN(ae)){const H=Ra(ae,M);Array.isArray(H)&&H.length>0&&(al(u==null?void 0:u.index,M,H),O=H)}}if(!O||O.length===0){const Q=(R=sa.getAllLeafNodes(Ee.value)||[])==null?void 0:R.filter(H=>(H==null?void 0:H.type)!=="operate"&&(H==null?void 0:H.label)!=="操作"&&(H==null?void 0:H.prop)!=="operate"),ae=f||((B=Q==null?void 0:Q.find(H=>(H==null?void 0:H.label)==="证书附件"))==null?void 0:B.prop);if(ae&&d[ae]){const H=d[ae];let he=[],xe="",Ve=!1;if(typeof H=="string")try{const Me=JSON.parse(H);Array.isArray(Me)&&(he=Me.map(Ue=>({name:(Ue==null?void 0:Ue.name)||(Ue==null?void 0:Ue.fileName)||"",url:(Ue==null?void 0:Ue.url)||""})).filter(Ue=>Ue.url||Ue.name),he.length>0&&(xe=he[0].url||"",Ve=String(he[0].name).toLowerCase().endsWith(".pdf")||String(xe).toLowerCase().endsWith(".pdf")))}catch{xe=H,Ve=String(H).toLowerCase().endsWith(".pdf"),he=[{name:H,url:H}]}else Array.isArray(H)&&(he=H.map(Me=>({name:(Me==null?void 0:Me.name)||(Me==null?void 0:Me.fileName)||"",url:(Me==null?void 0:Me.url)||""})).filter(Me=>Me.url||Me.name),he.length>0&&(xe=he[0].url||"",Ve=String(he[0].name).toLowerCase().endsWith(".pdf")||String(xe).toLowerCase().endsWith(".pdf")));if(he.length>0||xe){const Me={ts:Date.now(),versionId:String(Date.now()),label:new Date().toLocaleString(),certType:d.证书类型||"",certNo:d.证书编号||"",fileType:Ve?"pdf":"image",sourceUrl:Ve?xe:"",images:he};O=[Me],ga(u==null?void 0:u.index,M,Me)}}}if(!O||O.length===0){el.ElMessage.warning("暂无可预览数据");return}ca.value=O,aa.value=!0},ct=d=>{Xe.value=Xe.value.filter((f,M)=>M!==d)},Tn=async(d,f,M)=>{var O,R,B,Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua;if(Ie(u.config,{type:na.TABLE,tableOperate:d})){if(Je.value="",Ba.value=!0,Qe.value=!0,ze("onButtonClick",d,f),U.value=[],d==="删除")I.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var Sa,oe,E,$e;(Sa=_e.value)!=null&&Sa.find(fe=>(fe==null?void 0:fe.id)===(f==null?void 0:f.id))?_e.value=(oe=I.cloneDeep(_e.value))==null?void 0:oe.filter(fe=>(fe==null?void 0:fe.id)!==(f==null?void 0:f.id)):_e.value=ao(I.cloneDeep(_e.value),f);try{f!=null&&f.id&&(($e=(E=ve.value)==null?void 0:E.has)!=null&&$e.call(E,f==null?void 0:f.id))&&ve.value.delete(f.id)}catch{}tf(Nr.value,In.value,f==null?void 0:f.id),Ye.setTableLoading(u==null?void 0:u.index),ze("change",{content:_e.value,fixContent:[f],index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:d,columns:Ee.value,relatedContents:u==null?void 0:u.related}),console.log(f,"item")});else if(d==="批量删除"){if(((O=ar.value)==null?void 0:O.length)===0)return el.ElMessage.warning("请先勾选操作的数据");I.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(async()=>{var E,$e,fe,ba,fa;const Sa=(E=ar.value)==null?void 0:E.map(ya=>ya.id);_e.value=($e=I.cloneDeep(_e.value))==null?void 0:$e.filter(ya=>!(Sa!=null&&Sa.includes(ya.id))),Ye.setTableLoading(u==null?void 0:u.index),ze("change",{content:_e.value,fixContent:ar.value,index:u==null?void 0:u.index,type:"delete",name:u==null?void 0:u.compName,buttonName:d,relatedContents:u==null?void 0:u.related,columns:Ee.value});const oe=(Sa||[]).filter(Boolean);if(oe.length>0&&oe.every(ya=>ya!=null&&ya!=="")){const ya=(ar.value||[]).map(Ia=>{const dl={...Ia};return delete dl._isOCRRow,delete dl._ocrTableId,delete dl._isTemp,delete dl.tableEditType,delete dl.index,dl});await I.pageBatchDeleteApi({platId:parseInt((fe=Vl.value)==null?void 0:fe.plat_id),changeContents:[{tableName:((ba=u==null?void 0:u.related)==null?void 0:ba.find(Ia=>Ia==null?void 0:Ia.includes("content_")))||((fa=u==null?void 0:u.related)==null?void 0:fa.find(Ia=>Ia==null?void 0:Ia.includes("content"))),tableContents:ya}]})}})}else if(d==="复制新增"){Le.value="复制新增",I.cloneDeep(f);const Sa=(R=Ee.value)==null?void 0:R.find(oe=>oe==null?void 0:oe.isMainKey);Sa||((B=Ee.value)==null||B[0]),Il.value=f,Mt(!0)}else if(d==="新增")Le.value="新增",At(""),va.value=!0;else if(d==="编辑")Le.value="编辑",At(f),va.value=!0;else if(d==="查看")Le.value="查看",At(f),Ba.value=!1,Qe.value=!1,va.value=!0;else if(d==="查看三维模型"){const Sa={};for(let E in f)E!=="id"&&(Sa[E]=f[E]);let oe=(Q=Object.values(Sa))==null?void 0:Q[1];Re.setTableShowThree(oe)}else if(d==="切换视图")ru();else if(((ae=M==null?void 0:M.extra)==null?void 0:ae.type)==="modelExample")Le.value=d,K.value=!0;else if(d==="新建"){let Sa=ie.value,oe=[];for(let fa in Sa)fa!=null&&fa.includes(`loading${((H=Vl.value)==null?void 0:H.account)||((he=Vl.value)==null?void 0:he.账号)}`)&&(oe=[...oe,...fa]);let E=[];for(let fa in Sa)fa!=null&&fa.includes(`updateLoading${((xe=Vl.value)==null?void 0:xe.account)||((Ve=Vl.value)==null?void 0:Ve.账号)}`)&&(E=[...E,...fa]);let $e=oe==null?void 0:oe.map(fa=>fa==null?void 0:fa.id);const fe=E==null?void 0:E.map(fa=>fa==null?void 0:fa.id);$e=[...I.cloneDeep($e),...fe],($e==null?void 0:$e.length)>0&&($e!=null&&$e.every(fa=>fa!==null&&fa))&&await yr.batchDeleteInsofDataApi({ids:$e});const ba=(Me=Ae.value)==null?void 0:Me.find(fa=>(fa==null?void 0:fa.label)==="新建");await Yc(!1,ba)}else if(d==="修改模板"){let Sa=I.cloneDeep(xa).value;Ye.setRouteToChildPath(Sa),ea.setActiveMenuPath(Sa+x)}else if(d==="执行")Jo(d,f);else if(d==="导出paraform"){const Sa=I.ElLoading.service({lock:!0,text:"正在导出paraform...",background:"rgba(0, 0, 0, 0.7)"});try{const oe=["推力","真空","压力","温度","流量"],E=xl=>{var Al,Gl,Ol;return xl?typeof(xl==null?void 0:xl.value)=="string"?xl.value:((Ol=(Gl=(Al=xl==null?void 0:xl._custom)==null?void 0:Al.value)==null?void 0:Gl.value)==null?void 0:Ol.value)||"":""},$e=Array.isArray(mn.value)?mn.value:[],fe=E($e.find(xl=>(xl==null?void 0:xl.condition)==="child")),ba=String(fe||"").slice(0,8),fa=xl=>{if(xl==null)return"";const Al=String(xl).trim();if(!Al)return"";if(/^\d{8}$/.test(Al))return Al;const Gl=Al.match(/^(\d{4})[-\/.](\d{1,2})[-\/.](\d{1,2})$/);if(Gl){const ur=Gl[1],dr=Gl[2].padStart(2,"0"),Jl=Gl[3].padStart(2,"0");return`${ur}${dr}${Jl}`}const Ol=Al.replace(/\D/g,"");return Ol.length>=8?Ol.slice(0,8):""},ya=async xl=>{var Al,Gl;if(!xl)return"";try{const Ol=await $r("试验任务/任务管理",!1),ur=(ir,lr=[])=>{if(!Array.isArray(ir))return lr;for(const nr of ir)(nr==null?void 0:nr.comp)==="Table"&&(nr!=null&&nr.name)&&lr.push(nr),Array.isArray(nr==null?void 0:nr.children)&&ur(nr.children,lr),Array.isArray(nr==null?void 0:nr.tab)&&ur(nr.tab,lr),Array.isArray(nr==null?void 0:nr.choice)&&ur(nr.choice,lr);return lr},Jl=ur(Ol||[]).find(ir=>(ir==null?void 0:ir.name)==="任务列表"),or=((Gl=(Al=Jl==null?void 0:Jl.compData)==null?void 0:Al.find(ir=>(ir==null?void 0:ir.key)==="tableContents"))==null?void 0:Gl.contents)||[];if(!Array.isArray(or)||or.length===0)return"";const Vr=or.find(ir=>String((ir==null?void 0:ir["试验代号(名称)"])||"").slice(0,8)===xl);return fa(Vr==null?void 0:Vr.计划试验时间)}catch(Ol){return console.warn("获取任务列表计划试验时间失败:",Ol),""}},Ia=(xa.value||"").replace(/\/+$/,""),dl=fe?`${Ia}/${fe}`:Ia,Xa=await $r(dl||xa.value,!1),ml=String(ma.value||"").trim(),yl=xl=>String(xl||"").trim(),Rl=(xl,Al=[],Gl="")=>{if(!Array.isArray(xl))return Al;for(const Ol of xl){const ur=yl((Ol==null?void 0:Ol.choiceName)||(Ol==null?void 0:Ol.name0)||Gl);(Ol==null?void 0:Ol.comp)==="Table"&&(Ol==null?void 0:Ol.name)&&oe.includes(Ol.name)&&(!ml||ur===ml)&&Al.push(Ol),Array.isArray(Ol==null?void 0:Ol.children)&&Rl(Ol.children,Al,ur),Array.isArray(Ol==null?void 0:Ol.tab)&&Rl(Ol.tab,Al,ur),Array.isArray(Ol==null?void 0:Ol.choice)&&Rl(Ol.choice,Al,ur)}return Al},Ka=Rl(Xa||[]),wl=new Map;for(const xl of Ka)xl!=null&&xl.name&&!wl.has(xl.name)&&wl.set(xl.name,xl);const Wa=oe.map(xl=>wl.get(xl)).filter(Boolean);if(!Wa||Wa.length===0)return el.ElMessage.warning("未找到需要导出的表(推力、真空、压力、温度、流量)");const hl=xl=>{const Al=new Map,Gl=(Ol,ur=[])=>{if(Array.isArray(Ol))for(const dr of Ol){const Jl=((dr==null?void 0:dr.label)??"").toString().trim(),or=Jl?[...ur,Jl]:[...ur];if(Array.isArray(dr==null?void 0:dr.children)&&dr.children.length>0)Gl(dr.children,or);else{const ir=((dr==null?void 0:dr.prop)??"").toString();if(!ir)continue;const lr=Jl||ir,nr=(or.length>0?[...ur,lr]:[lr]).join(".");Al.set(ir,nr)}}};return Gl(xl,[]),Al},Ga=(xl,Al)=>{const Gl=hl(xl||[]),ur=(sa.getAllLeafNodes(xl||[])||[]).filter(Jl=>(Jl==null?void 0:Jl.prop)&&(Jl==null?void 0:Jl.type)!=="operate"&&(Jl==null?void 0:Jl.label)!=="操作"&&(Jl==null?void 0:Jl.prop)!=="operate"),dr=Array.isArray(Al)?Al:[];return dr.length===0?[]:dr.map(Jl=>{const or={};return ur.forEach(Vr=>{const ir=String(Vr.prop),lr=Gl.get(ir)||String(Vr.label||Vr.prop);or[lr]=(Jl==null?void 0:Jl[ir])??""}),or})},vl=Wa.map(xl=>{var dr,Jl;const Al=(xl==null?void 0:xl.compData)||[];let Gl=(dr=Al==null?void 0:Al.find(or=>(or==null?void 0:or.key)==="header"))==null?void 0:dr.contents;Array.isArray(Gl==null?void 0:Gl[0])&&(Gl=Gl[0]);const Ol=((Jl=Al==null?void 0:Al.find(or=>(or==null?void 0:or.key)==="tableContents"))==null?void 0:Jl.contents)||[];if(!Array.isArray(Gl)||Gl.length===0||!Array.isArray(Ol)||Ol.length===0)return null;const ur=Ga(Gl||[],Ol||[]);return!Array.isArray(ur)||ur.length===0?null:{类型:xl==null?void 0:xl.name,数据:ur}}).filter(Boolean);if(!vl||vl.length===0)return el.ElMessage.warning("没有可导出的数据(推力、真空、压力、温度、流量均为空)");const Tl=await ya(ba),Bl={试验代号:ba,试验日期:Tl,ParaForm:vl},hr=await it().catch(()=>""),Ll=await I.exportParaformApi(Bl,hr);if(((Ue=Ll==null?void 0:Ll.data)==null?void 0:Ue.code)===200&&(($a=(ta=Ll==null?void 0:Ll.data)==null?void 0:ta.result)!=null&&$a.Excel文件)){const xl=Ll.data.result.Excel文件,Al=await I.platformDownloadFile({url:xl}),Gl=new Blob([Al.data],{type:"application/vnd.ms-excel"}),Ol=URL.createObjectURL(Gl),ur=I.dayjs().format("YYYYMMDD"),Jl=`${(ba||"UNKNOWN").trim()||"UNKNOWN"}_${ur}_paraform.xls`,or=document.createElement("a");or.href=Ol,or.download=Jl,or.style.display="none",document.body.appendChild(or),or.click(),setTimeout(()=>{document.body.removeChild(or),URL.revokeObjectURL(Ol)},100);const Vr=Array.isArray((ra=(Ta=Ll==null?void 0:Ll.data)==null?void 0:Ta.result)==null?void 0:ra.warnings)?Ll.data.result.warnings:[];if(Vr.length>0){const ir=Vr.map((lr,nr)=>`${nr+1}. ${(lr==null?void 0:lr.field)||"未知字段"}:${(lr==null?void 0:lr.message)||""}`).join(`
24
24
  `);el.ElMessage.warning({message:`导出成功,但存在以下提示:
25
- ${ir}`,duration:5e3,showClose:!0})}else el.ElMessage.success("导出成功")}else el.ElMessage.error(((Ya=Ll==null?void 0:Ll.data)==null?void 0:Ya.message)||"导出失败")}catch(oe){console.error("导出paraform失败:",oe),el.ElMessage.error("导出失败:"+((oe==null?void 0:oe.message)||"未知错误"))}finally{Sa.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ia=ar.value)==null?void 0:ia.length)===0)return el.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((Pa=_e.value)==null?void 0:Pa.length)===0)return el.ElMessage.warning("暂无数据导出");let Sa=["序号",...(Da=(se=Ee.value)==null?void 0:se.map(fe=>fe==null?void 0:fe.prop))==null?void 0:Da.filter(fe=>fe!=="操作")],oe=d==="导出全部"?_e.value:ar.value;const E=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];oe=oe==null?void 0:oe.map(fe=>Object.fromEntries(Object.entries(fe).filter(([ba])=>!E.includes(ba)))),Sa=["序号",...Sa],oe=oe==null?void 0:oe.map((fe,ba)=>({序号:ba+1,...fe}));let $e=(u==null?void 0:u.compName)||"表格信息";Io(oe,$e,Sa,$e)}else if(d==="OCR识别")rl.value=!0,Xe.value=[],W.value=1,la.value.clear(),ka.value.clear(),Ce.value=0;else if(d==="迁移")i.selectRow=f,i.show=!0;else if(d==="生成方法"){let Sa=await Sf(f),oe;f!==""?oe=[f]:oe=I.cloneDeep(_e.value),oe=oe==null?void 0:oe.map($e=>($e.输出值=Sa,$e));const E={fixContent:oe,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:Ee.value,name:u==null?void 0:u.compName};ze("change",E)}else if(((ua=M==null?void 0:M.extra)==null?void 0:ua.type)==="methodButton"){let Sa;f!==""?Sa=[f]:Sa=I.cloneDeep(_e.value);const E={fixContent:await di(Sa,Ee==null?void 0:Ee.value,"Manual",_e.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:Ee.value,name:u==null?void 0:u.compName};ze("change",E)}}},Wc=async(d,f)=>{var M,O,R,B,Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia,Pa,se;try{let Da,ua;const Sa=(M=ie.value[xa.value+x])==null?void 0:M.filter(Ia=>{var dl;return((dl=Ia==null?void 0:Ia.key)==null?void 0:dl.type)==="structureMethod"}),oe=(O=ie.value[xa.value+x])==null?void 0:O.filter(Ia=>{var dl;return((dl=Ia==null?void 0:Ia.key)==null?void 0:dl.type)==="structure"}),E=Sa==null?void 0:Sa.find(Ia=>{var dl,Xa;return((Xa=(dl=Ia==null?void 0:Ia.value)==null?void 0:dl.pageData)==null?void 0:Xa.method)==="保存"});if(!E)return;const $e=(ae=(Q=ie.value[(B=(R=E==null?void 0:E.value)==null?void 0:R.pageData)==null?void 0:B.path])==null?void 0:Q.filter(Ia=>{var dl;return((dl=Ia==null?void 0:Ia.key)==null?void 0:dl.type)==="data"}))==null?void 0:ae.find(Ia=>{var dl,Xa,ml,yl;return((Xa=(dl=Ia==null?void 0:Ia.value)==null?void 0:dl.tableData)==null?void 0:Xa.算法名称)===((yl=(ml=E==null?void 0:E.value)==null?void 0:ml.pageData)==null?void 0:yl.method)});if(!$e)return;const fe={buttonName:(he=(H=E==null?void 0:E.value)==null?void 0:H.pageData)==null?void 0:he.method,api:(Ve=(xe=$e==null?void 0:$e.value)==null?void 0:xe.tableData)==null?void 0:Ve.算法体,content:oe==null?void 0:oe.map(Ia=>{var dl;return(dl=Ia==null?void 0:Ia.value)==null?void 0:dl.pageData}),extraContent:[],extraValues:(Ue=(Me=E==null?void 0:E.value)==null?void 0:Me.pageData)==null?void 0:Ue.data,methodName:($a=(ta=E==null?void 0:E.value)==null?void 0:ta.pageData)==null?void 0:$a.path};if(!d)return;const ba={...d,compData:(Ta=d==null?void 0:d.compData)==null?void 0:Ta.map(Ia=>{var dl;return(Ia==null?void 0:Ia.key)==="formContent"?{...Ia,contents:(dl=Ia==null?void 0:Ia.contents)==null?void 0:dl.map(Xa=>(Xa==null?void 0:Xa.prop)===f?{...Xa,value:""}:Xa)}:Ia})},fa={key:{pageKey:xa.value+x,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ba}},ya=await el.axios.post(fe.api,fa,{headers:{"Content-Type":"application/json"}});return((ra=ya==null?void 0:ya.data)==null?void 0:ra.code)===200&&(Da=(ia=(Ya=ya==null?void 0:ya.data)==null?void 0:Ya.result)==null?void 0:ia.latestReportCode,ua=(se=(Pa=ya==null?void 0:ya.data)==null?void 0:Pa.result)==null?void 0:se.status),{newMainKeyValue:Da,newStatus:ua}}catch(Da){throw el.ElMessage.error(Da),new Error(Da)}},Si=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const Kc=async(d,f,M)=>{var H,he;let O=d==null?void 0:d[f==null?void 0:f.prop],R=1,B,Q;const ae=I.cloneDeep(xa).value+x+O;if(ae){Si.value="",B=(H=ie.value[ae])==null?void 0:H.filter(Me=>{var Ue;return((Ue=Me==null?void 0:Me.key)==null?void 0:Ue.type)==="structure"});const xe=B==null?void 0:B.find(Me=>{var Ue,ta,$a;return(($a=(ta=(Ue=Me==null?void 0:Me.value)==null?void 0:Ue.pageData)==null?void 0:ta.comp)==null?void 0:$a.toUpperCase())==="FORM"});Q={...(he=xe==null?void 0:xe.value)==null?void 0:he.pageData,id:xe==null?void 0:xe.id};const Ve=await Wc(Q,f==null?void 0:f.prop);if(Si.value=Ve==null?void 0:Ve.newStatus,Ve!=null&&Ve.newMainKeyValue)return Ve==null?void 0:Ve.newMainKeyValue}if(_e.value.some(xe=>(xe==null?void 0:xe[f==null?void 0:f.prop])===O)){const xe=O;for(;_e.value.some(Ve=>(Ve==null?void 0:Ve[f==null?void 0:f.prop])===`${xe}(${R})`);)R++;O=`${xe}(${R})`}return O},Yc=async(d,f,M)=>{var B,Q,ae,H;let O,R;if(await Kc(M==null?void 0:M.data,M==null?void 0:M.firstCol),O=I.cloneDeep(xa).value+x,R=I.cloneDeep(O)+`loading${((B=Vl.value)==null?void 0:B.account)||((Q=Vl.value)==null?void 0:Q.账号)}`,f){const he=(H=(ae=ie.value[R])==null?void 0:ae.filter(xe=>{var Ve;return((Ve=xe==null?void 0:xe.key)==null?void 0:Ve.parentTable)===""}))==null?void 0:H.map(xe=>{var Ve;return{id:xe==null?void 0:xe.id,...(Ve=xe==null?void 0:xe.value)==null?void 0:Ve.pageData}});(he==null?void 0:he.length)>0||await sa.loadingConstruct(O,R,null,null,null),Ye.setRouteToChildPath(I.cloneDeep(xa).value),ea.setActiveMenuPath(R)}else Ye.setRouteToChildPath(I.cloneDeep(xa).value),ea.setActiveMenuPath(R)},Gc=()=>{Ke.value=!1,Ua.value=[],Na.value=!1},At=d=>{var B,Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe;const f=[];de.value=I.cloneDeep(Ee.value),(Q=sa.getColumnChild((B=I.cloneDeep(Ee.value))==null?void 0:B.filter(E=>(E==null?void 0:E.label)!=="操作")))==null||Q.forEach((E,$e)=>{var fe,ba,fa;E!=null&&E.formType&&((fe=E==null?void 0:E.formType)==null?void 0:fe.toUpperCase())==="SELECT"||E!=null&&E.menuId?f.push({label:(ba=E==null?void 0:E.prop)!=null&&ba.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",name:(E==null?void 0:E.prop)??"t"+$e,prop:E==null?void 0:E.prop,type:"Select",value:(d==null?void 0:d[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??$e,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,relatedValueId:E==null?void 0:E.relatedValueId,disabled:E==null?void 0:E.disabled,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,allSelectionContents:(E==null?void 0:E.allSelectionContents)??[],filterContent:E==null?void 0:E.filterContent,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter}):f.push({label:(fa=E==null?void 0:E.prop)!=null&&fa.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",prop:E==null?void 0:E.prop,name:(E==null?void 0:E.prop)??"t"+$e,type:!(E!=null&&E.formType)||(E==null?void 0:E.formType)===""?"Input":E==null?void 0:E.formType,value:(E==null?void 0:E.formType)==="Upload"?(d==null?void 0:d[E==null?void 0:E.prop])??"{}":(d==null?void 0:d[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??$e,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,relatedValueId:E==null?void 0:E.relatedValueId,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter})}),d===""||!d||(Je.value=(d==null?void 0:d.id)??"");let M=sa.getColumnChild((ae=I.cloneDeep(Ee.value))==null?void 0:ae.filter(E=>(E==null?void 0:E.label)!=="操作"));De.value&&((H=De.value)==null?void 0:H.length)>0&&(De.value=(he=I.cloneDeep(De).value)==null?void 0:he.map(E=>{var fe;let $e=(E==null?void 0:E.prop)||((fe=M==null?void 0:M.find(ba=>(ba==null?void 0:ba.label)===(E==null?void 0:E.label)))==null?void 0:fe.prop);return $e&&(E.value=d[$e]),E})),we.value=De.value&&((xe=De.value)==null?void 0:xe.length)>0?sa.getTableFormToForm(De.value):f,we.value=((Ve=we.value)==null?void 0:Ve.map(E=>({...E,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled})))??we.value;let O=[],R=((ta=(Ue=(Me=u.itemData)==null?void 0:Me.filter(E=>(E==null?void 0:E.key)==="filter"))==null?void 0:Ue[0])==null?void 0:ta.contents)??"";if(R=La.analyzeSplitToContent(R,","),(R==null?void 0:R.length)>0&&(O=R.flat()),(O==null?void 0:O.length)>0){let E=O==null?void 0:O.filter(ya=>ya==null?void 0:ya.includes("@Type"));if(E=E==null?void 0:E[(E==null?void 0:E.length)-1],(E==null?void 0:E[(E==null?void 0:E.length)-1])===","&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1)),E){let ya=(Ta=($a=E==null?void 0:E.replace("=",L))==null?void 0:$a.split(L))==null?void 0:Ta[1];((ra=ya==null?void 0:ya.trim())==null?void 0:ra.toUpperCase())==="MANUAL"&&(u==null||u.index,we.value=(Ya=we.value)==null?void 0:Ya.map((Ia,dl)=>Ia))}let $e=(ia=we.value)==null?void 0:ia.filter(ya=>ya==null?void 0:ya.mainKey),fe;$e==null||$e.forEach(ya=>{var dl;if(fe!==void 0)return;let Ia=ya==null?void 0:ya.menus;((dl=$e==null?void 0:$e.filter(Xa=>Xa==null?void 0:Xa.mainKey))==null?void 0:dl.length)>1&&(fe=Ia,ya==null||ya.groups)});let ba=[],fa=new Map;if($e==null||$e.forEach(ya=>{var Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl;if((Ia=ya==null?void 0:ya.prop)!=null&&Ia.includes(".")){let Bl=[];fa.get(((Xa=(dl=ya==null?void 0:ya.prop)==null?void 0:dl.split("."))==null?void 0:Xa[0])+(ya!=null&&ya.isMainPath?0:1)+((ml=ya==null?void 0:ya.groups)==null?void 0:ml[0]))&&(Bl=fa.get(((Rl=(yl=ya==null?void 0:ya.prop)==null?void 0:yl.split("."))==null?void 0:Rl[0])+(ya!=null&&ya.isMainPath?0:1)+((Ka=ya==null?void 0:ya.groups)==null?void 0:Ka[0]))),Bl.push(ya),fa.set(((Wa=(wl=ya==null?void 0:ya.prop)==null?void 0:wl.split("."))==null?void 0:Wa[0])+(ya!=null&&ya.isMainPath?0:1)+((hl=ya==null?void 0:ya.groups)==null?void 0:hl[0]),Bl)}else{let Bl=[];fa.get("normal"+(ya!=null&&ya.isMainPath?0:1)+((Ga=ya==null?void 0:ya.groups)==null?void 0:Ga[0]))&&(Bl=fa.get("normal"+(ya!=null&&ya.isMainPath?0:1)+((vl=ya==null?void 0:ya.groups)==null?void 0:vl[0]))),Bl.push(ya),fa.set("normal"+(ya!=null&&ya.isMainPath?0:1)+((Tl=ya==null?void 0:ya.groups)==null?void 0:Tl[0]),Bl)}}),ba=Array.from(fa.values()),(ba==null?void 0:ba.length)>0)for(let ya in ba){let Ia=ba==null?void 0:ba[ya];if((Ia==null?void 0:Ia.length)!==1){if((Ia==null?void 0:Ia.length)>1){let dl=Ia==null?void 0:Ia.map(hl=>hl==null?void 0:hl.prop),Xa=Ia==null?void 0:Ia.map(hl=>hl==null?void 0:hl.label),ml=Ia==null?void 0:Ia.map(hl=>hl==null?void 0:hl.value),yl=(Pa=I.cloneDeep(Ia))==null?void 0:Pa[0],Rl=(se=we.value)==null?void 0:se.findIndex(hl=>(hl==null?void 0:hl.prop)===(yl==null?void 0:yl.prop)),Ka=(Da=we.value)==null?void 0:Da.slice(0,Rl),wl=(Sa=we.value)==null?void 0:Sa.slice(Rl,(ua=we.value)==null?void 0:ua.length);yl.label=Xa==null?void 0:Xa.join("·"),yl.value=ml==null?void 0:ml.join(" "),yl.value.trim()===""&&(yl.value=""),yl.prop=dl==null?void 0:dl.join("·");let Wa=Ia==null?void 0:Ia.map(hl=>{var Ga;return(Ga=hl==null?void 0:hl.words)==null?void 0:Ga.join(".")});yl.relatedWords=Wa,yl.usingType="parent",wl.unshift(yl),we.value=[...Ka,...wl],we.value=(oe=we.value)==null?void 0:oe.map(hl=>(dl!=null&&dl.find(Ga=>Ga===(hl==null?void 0:hl.prop))&&(hl.isFormColHidden=!0,hl.relatedWords=Wa),hl))}}}}},Jc=()=>{var f;const d=(f=s.value)==null?void 0:f.$el;d&&La.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:M=>{var Q;const{oldIndex:O,newIndex:R}=M;if(O===R)return;const B=xn.value.splice(O,1)[0];xn.value.splice(R,0,B),Ee.value=(Q=Ee.value)==null?void 0:Q.slice().sort((ae,H)=>{if(ae.label==="操作")return 1;if(H.label==="操作")return-1;const he=xn.value.findIndex(Ve=>Ve.label===ae.label),xe=xn.value.findIndex(Ve=>Ve.label===H.label);return he-xe})}})};a.onMounted(()=>{je.value=window.innerWidth-240*2,window.addEventListener("keydown",Ut)});const Xc=()=>{a.nextTick(()=>{Jc()})},Qo=(d,f)=>{var O;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let M;return d.children=(O=d.children)==null?void 0:O.map(R=>{var B,Q;if((R==null?void 0:R.id)===Je.value){let ae={};for(let H in R){let he=(B=f==null?void 0:f.find(xe=>(xe==null?void 0:xe.prop)===H))==null?void 0:B.label;he?ae[H]=(Q=Il.value)==null?void 0:Q[he]:ae[H]=R[H]??""}R=Object.assign(ae,Il.value),M=R}else{let ae=Qo(R,f);R=ae==null?void 0:ae.contents,M=ae==null?void 0:ae.currentSelectContents}return R}),{contents:d,currentSelectContents:M}},Ei=(d,f)=>{let M,O;return d!=null&&d.find(R=>(R==null?void 0:R.id)===Je.value)?M=d==null?void 0:d.map(R=>{var B,Q,ae;if((R==null?void 0:R.id)===Je.value){let H={};for(let xe in R){let Ve=(B=f==null?void 0:f.find(Me=>(Me==null?void 0:Me.prop)===xe))==null?void 0:B.label;Ve?H[xe]=((Q=Il.value)==null?void 0:Q[Ve])??"":H[xe]=R[xe]??""}let he=Il.value;for(let xe in H)(ae=Il.value)!=null&&ae[xe]||(he[xe]=(H==null?void 0:H[xe])??"");R=he,O=R}return R}):M=d==null?void 0:d.map(R=>{var B,Q,ae,H;if((R==null?void 0:R.id)===Je.value){let he={};for(let xe in R){let Ve=(B=f==null?void 0:f.find(Me=>(Me==null?void 0:Me.prop)===xe))==null?void 0:B.label;Ve?he[xe]=(Q=Il.value)==null?void 0:Q[Ve]:he[xe]=R[xe]??""}R=Object.assign(he,Il.value),O=R}else R=(ae=Qo(R,f))==null?void 0:ae.contents,O=(H=Qo(R,f))==null?void 0:H.currentSelectContents;return R}),{newContents:M,currentSelectContents:O}},Di=(d,f,M)=>{var O,R;return d[f==null?void 0:f.prop]=M,typeof d.id=="number"&&(d.id=(O=d.id)==null?void 0:O.toString()),d.children&&((R=d.children)==null?void 0:R.length)>0&&(d.children=d.children.map(Di)),d},Bi=d=>{var M;const f=[];return f.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((M=d.children)==null||M.forEach(O=>{f.push(...Bi(O))})),(f==null?void 0:f.length)>0?f==null?void 0:f.map(O=>{const R={...O};return delete R.children,R}):[]},lo=["Pacific6000数据采集装置.通道号","通道号"],zt=d=>{if(!d)return"";const f=lo.map(M=>d==null?void 0:d[M]).find(M=>M!=null&&String(M).trim()!=="");return f==null?"":String(f).trim()},ei=async(d,f=void 0)=>{if(!d)return!1;try{const M=Ue=>{var ta,$a,Ta;return Ue?typeof(Ue==null?void 0:Ue.value)=="string"?Ue.value:((Ta=($a=(ta=Ue==null?void 0:Ue._custom)==null?void 0:ta.value)==null?void 0:$a.value)==null?void 0:Ta.value)||"":""},O=Array.isArray(mn.value)?mn.value:[],R=M(O.find(Ue=>(Ue==null?void 0:Ue.condition)==="child")),B=(xa.value||"").replace(/\/+$/,""),Q=R?`${B}/${R}`:B,ae=await $r(Q||xa.value,!1),H=String(ma.value||"").trim(),he=Ue=>String(Ue||"").trim(),xe=(Ue,ta=[],$a="")=>{if(!Array.isArray(Ue))return ta;for(const Ta of Ue){const ra=he((Ta==null?void 0:Ta.choiceName)||(Ta==null?void 0:Ta.name0)||$a);(Ta==null?void 0:Ta.comp)==="Table"&&(!H||ra===H)&&ta.push(Ta),Array.isArray(Ta==null?void 0:Ta.children)&&xe(Ta.children,ta,ra),Array.isArray(Ta==null?void 0:Ta.tab)&&xe(Ta.tab,ta,ra),Array.isArray(Ta==null?void 0:Ta.choice)&&xe(Ta.choice,ta,ra)}return ta},Ve=xe(ae||[]),Me=String((u==null?void 0:u.compName)||"");return Ve.some(Ue=>{var $a,Ta;const ta=((Ta=($a=Ue==null?void 0:Ue.compData)==null?void 0:$a.find(ra=>(ra==null?void 0:ra.key)==="tableContents"))==null?void 0:Ta.contents)||[];return!Array.isArray(ta)||ta.length===0?!1:ta.some(ra=>{if(String((Ue==null?void 0:Ue.name)||"")===Me&&(ra==null?void 0:ra.id)===f)return!1;const ia=zt(ra);return!!ia&&ia===d})})}catch{return(_e.value||[]).some(O=>{if((O==null?void 0:O.id)===f)return!1;const R=zt(O);return!!R&&R===d})}},Mt=async(d=!0,f,M)=>{var he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe,E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl;if(Il.value){const Wa=(xe=sa.getColumnChild((he=I.cloneDeep(Ee.value))==null?void 0:he.filter(Ga=>(Ga==null?void 0:Ga.label)!=="操作")))==null?void 0:xe.filter(Ga=>(Ga==null?void 0:Ga.required)===!0);for(let Ga=0;Ga<((Wa==null?void 0:Wa.length)??0);Ga++){const vl=Wa[Ga],Tl=vl==null?void 0:vl.prop,Bl=(vl==null?void 0:vl.label)??Tl,hr=(Ve=Il.value)==null?void 0:Ve[Tl];if(hr===""||hr===null||hr===void 0||Array.isArray(hr)&&hr.length===0){el.ElMessage.error(`${Bl}不能为空`);return}}const hl=zt(Il.value);if(hl&&await ei(hl,Je.value||void 0)){el.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let O=sa.getColumnChild((Me=I.cloneDeep(Ee.value))==null?void 0:Me.filter(Wa=>(Wa==null?void 0:Wa.label)!=="操作")),R,B=I.cloneDeep(_e.value);if(!Il.value){va.value=!1;return}if(Je.value===""){Fe.value++;let Wa;Wa={id:Fe.value.toString()};try{Wa.sort=Nn(0,_e.value||[])}catch{}Wa!=null&&Wa.children&&(Wa={...Wa,children:(Ue=Wa.children)==null?void 0:Ue.map(Ga=>Di(Ga,f,M))});const hl=Object.assign(Il.value,Wa);B.unshift(hl),R=hl}else B=(ta=Ei(B,O))==null?void 0:ta.newContents,R=($a=Ei(B,O))==null?void 0:$a.currentSelectContents;const Q=(Ta=u.itemData)==null?void 0:Ta.filter(Wa=>(Wa==null?void 0:Wa.key)==="childTree")[0];if(((ra=Q==null?void 0:Q.contents)==null?void 0:ra.length)>0){Le.value="编辑";const Wa=[];B==null||B.forEach((vl,Tl)=>{var hr;let Bl={};if(Array.isArray(vl)){let Ll=[];vl==null||vl.filter(xl=>!(xl!=null&&xl.id)).forEach((xl,Al)=>{var Gl,Ol,ur,dr,Jl,or,Vr;if((Ol=(Gl=Br.value)==null?void 0:Gl[Al])!=null&&Ol.prop&&!Array.isArray(xl)){let ir={};ir[Br.value[Al].column]=xl,Va!=null&&Va.value&&((ur=Va==null?void 0:Va.value)==null?void 0:ur.length)>0&&((dr=Va==null?void 0:Va.value)!=null&&dr.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(ir)))&&(Ll=(Jl=Va==null?void 0:Va.value)==null?void 0:Jl.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(ir))),Ll&&Ll.length>0?Bl[Br.value[Al].prop]=Ll!=null&&Ll.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===Br.value[Al].column})?(or=Ll==null?void 0:Ll.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===Br.value[Al].column}))==null?void 0:or[Br.value[Al].column]:xl:Bl[Br.value[Al].prop]=xl}else Array.isArray(xl)&&((Vr=Br.value[Al])!=null&&Vr.prop?Bl[Br.value[Al].prop]=xl:Bl.children=pi(xl,Br.value))})}else Bl=vl;if(Array.isArray(vl)&&vl.some(Ll=>Ll==null?void 0:Ll.id)){const Ll=(hr=vl==null?void 0:vl.find(xl=>xl.id))==null?void 0:hr.id;Wa.push(Object.assign(Bl,{id:Xt(Ll)}))}else Bl.id?Wa.push(Bl):Wa.push(Object.assign(Bl,{id:Tl.toString()}))});const hl=(_e.value||[]).map(vl=>String(vl==null?void 0:vl.id)),Ga=Zt(Wa,hl);_e.value=zi(Ga,Q,Ee.value)}Ti(_e.value),Nr.value=_e.value;const ae=sf(Nr.value,In.value,B);let H=[];if(P.value?(H=(Ya=I.cloneDeep(P).value.singleContent)==null?void 0:Ya.filter(Wa=>(Wa==null?void 0:Wa.id)!==(R==null?void 0:R.id)),H.push(R)):H=[R],zl.value){const Wa={content:ae,singleContent:((ia=Q==null?void 0:Q.contents)==null?void 0:ia.length)>0?H==null?void 0:H.flatMap(Bi):H,index:u==null?void 0:u.index,buttonName:"编辑",column:Ee.value,parentTableId:u==null?void 0:u.parentTableId};Ye.setCacheUpdatingData(Wa)}if((Pa=Ee.value)==null||Pa.forEach(Wa=>{(Wa==null?void 0:Wa.formType)==="Upload"&&(R[Wa.prop]=R[Wa.prop]===""?"{}":typeof R[Wa.prop]!="string"?JSON.stringify(R[Wa.prop]):R[Wa.prop])}),d){(Sa=(ua=(Da=(se=u.itemData)==null?void 0:se.find(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType"))==null?void 0:Da.value)==null?void 0:ua.find(Ga=>(Ga==null?void 0:Ga.value)==="onConditionContents"))==null||Sa.content;let Wa=(oe=u.itemData)==null?void 0:oe.filter(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType");Wa=Array.from(new Map(Wa.filter(Boolean).map((Ga,vl)=>[Ga.value,{...Ga,_idx:vl}])).values()).sort((Ga,vl)=>Ga._idx-vl._idx).map(({_idx:Ga,...vl})=>vl),Wa=(E=Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])==null?void 0:E.value;const hl={fixContent:[R],buttonName:Le.value,relatedContents:u==null?void 0:u.related,columns:Ee.value,name:u==null?void 0:u.compName};Ye.setTableLoading(u==null?void 0:u.index),va.value=!1,Il.value=void 0,ze("change",hl)}if((ba=(fe=($e=we.value)==null?void 0:$e[0])==null?void 0:fe.optionUrl)!=null&&ba.menuId){va.value=!1;let Wa=(fa=u.itemData)==null?void 0:fa.filter(hl=>(hl==null?void 0:hl.key)==="filterAllType");if((Wa==null?void 0:Wa.length)>0){let hl=Wa==null?void 0:Wa.map(Tl=>Tl==null?void 0:Tl.value),Ga=(dl=(Ia=(ya=hl.flat().find(Tl=>{var Bl;return(Bl=Tl==null?void 0:Tl.content)==null?void 0:Bl.includes("@Num")}))==null?void 0:ya.content)==null?void 0:Ia.split(":"))==null?void 0:dl[1];((yl=(ml=(Xa=hl.flat().find(Tl=>{var Bl;return(Bl=Tl==null?void 0:Tl.content)==null?void 0:Bl.includes("@Type:")}))==null?void 0:Xa.content)==null?void 0:ml.split(":"))==null?void 0:yl[1])!=="Manual"&&(Ga=parseInt(Ga),_e.value=(wl=_e.value)==null?void 0:wl.slice(((Rl=_e.value)==null?void 0:Rl.length)-Ga,(Ka=_e.value)==null?void 0:Ka.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Ut),Ee.value=[],_e.value=[],de.value=[],wa.value=[],De.value=[],Ma.value=[],Ua.value=[],Aa.value=[],we.value=[],ar.value=[],s.value=null,En.value=""});const ro=async(d,f,M)=>{var Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe;$l.value=(M==null?void 0:M.prop)??(M==null?void 0:M.property);const O=I.cloneDeep(u.itemData),R=((Ue=O==null?void 0:O.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:Ue.contents)??[];let B=R==null?void 0:R.find((E,$e)=>{var fe,ba,fa;return(E==null?void 0:E.prop)===$l.value||(E==null?void 0:E.label)===$l.value||($e==null?void 0:$e.toString())===((fa=(ba=(fe=$l.value)==null?void 0:fe.split("a"))==null?void 0:ba[1])==null?void 0:fa.toString())});const Q=sa.getColumnChild((ta=I.cloneDeep(Ee.value))==null?void 0:ta.filter(E=>(E==null?void 0:E.label)!=="操作"));if(B||(B=Q==null?void 0:Q.find(E=>(E==null?void 0:E.prop)===$l.value||(E==null?void 0:E.label)===$l.value)),B&&!(($a=B==null?void 0:B.menus)!=null&&$a.length)&&!((Ta=B==null?void 0:B.groups)!=null&&Ta.length)&&!((ra=B==null?void 0:B.words)!=null&&ra.length)){const E=(Ya=we.value)==null?void 0:Ya.find($e=>($e==null?void 0:$e.prop)===$l.value);E&&(B={...B,menus:(E==null?void 0:E.menus)??(B==null?void 0:B.menus),groups:(E==null?void 0:E.groups)??(B==null?void 0:B.groups),words:(E==null?void 0:E.words)??(B==null?void 0:B.words),bindMenus:(E==null?void 0:E.bindMenus)??(B==null?void 0:B.bindMenus),isMainPath:(E==null?void 0:E.isMainPath)??(B==null?void 0:B.isMainPath),relatedContents:(E==null?void 0:E.relatedContents)??(B==null?void 0:B.relatedContents),endChildMenu:(E==null?void 0:E.endChildMenu)??(B==null?void 0:B.endChildMenu)})}if(B&&((ia=we==null?void 0:we.value)==null||ia.forEach(E=>{var $e,fe,ba,fa,ya;(E==null?void 0:E.prop)===(B==null?void 0:B.prop)&&(E!=null&&E.endChildMenu)&&(($e=B==null?void 0:B.prop)!=null&&$e.includes(".")&&((ba=(fe=B==null?void 0:B.prop)==null?void 0:fe.split("."))==null?void 0:ba[0])!==((ya=(fa=E==null?void 0:E.prop)==null?void 0:fa.split("."))==null?void 0:ya[0])?B.endChildMenu=E==null?void 0:E.value:B.endChildMenu=E==null?void 0:E.endChildMenu)})),!B)return;const ae=$l.value,H=(Pa=_e.value)==null?void 0:Pa.findIndex(E=>(E==null?void 0:E.id)===(f==null?void 0:f.id));H!==-1&&ae&&(_e.value[H]={..._e.value[H],[ae]:d});const he=E=>{Array.isArray(E)&&E.forEach($e=>{Array.isArray($e==null?void 0:$e.allSelectionContents)&&$e.allSelectionContents.length>0&&($e.contactValue=_e.value[H]??f),Array.isArray($e==null?void 0:$e.children)&&$e.children.length>0&&he($e.children)})};he(Ee.value),B.value=d,B.endChildMenu=B.endChildMenu||"";let xe=B!=null&&B.isMainPath&&(B!=null&&B.mainKey)?B==null?void 0:B.value:"";const Ve=E=>{Array.isArray(E)&&E.forEach($e=>{var ba,fa;if((($e==null?void 0:$e.type)==="Select"||($e==null?void 0:$e.formType)&&$e.formType.toUpperCase()==="SELECT"||($e==null?void 0:$e.columnType)&&$e.columnType.toUpperCase()==="SELECT")&&Array.isArray($e==null?void 0:$e.menus)&&$e.menus.length>0&&$e.menus[$e.menus.length-1]===""&&(B!=null&&B.isMainPath)&&(B!=null&&B.mainKey)){const ya=(ba=$e==null?void 0:$e.prop)!=null&&ba.includes(".")?$e.prop.split(".")[0]:null,Ia=(fa=B==null?void 0:B.prop)!=null&&fa.includes(".")?B.prop.split(".")[0]:null;(!ya||!Ia||ya===Ia)&&($e.endChildMenu=xe)}Array.isArray($e==null?void 0:$e.children)&&$e.children.length>0&&Ve($e.children)})};if(Ve(Ee.value),!!(B!=null&&B.mainKey)&&Array.isArray(B==null?void 0:B.menus)&&(B==null?void 0:B.menus.length)>0&&(B!=null&&B.value)&&(B==null?void 0:B.value)!==""){let E=B!=null&&B.relatedContents&&((se=B==null?void 0:B.relatedContents)==null?void 0:se.length)>0?(Da=B==null?void 0:B.relatedContents)==null?void 0:Da.find($e=>{var fe,ba,fa,ya;return($e==null?void 0:$e[(ya=(fe=B==null?void 0:B.prop)==null?void 0:fe.split("."))==null?void 0:ya[((fa=(ba=B==null?void 0:B.prop)==null?void 0:ba.split("."))==null?void 0:fa.length)-1]])===(B==null?void 0:B.value)}):await ls(B);if(E){const $e={...f};Q==null||Q.forEach(fe=>{var ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl;(fe==null?void 0:fe.prop)!==(B==null?void 0:B.prop)&&(B!=null&&B.relatedContents&&((ba=B==null?void 0:B.relatedContents)==null?void 0:ba.length)>0?(fa=fe==null?void 0:fe.prop)!=null&&fa.includes(".")&&((Ia=(ya=fe==null?void 0:fe.prop)==null?void 0:ya.split("."))==null?void 0:Ia[0])===((Xa=(dl=B==null?void 0:B.prop)==null?void 0:dl.split("."))==null?void 0:Xa[0])?$e[fe.prop]=E[(Ka=(ml=fe==null?void 0:fe.prop)==null?void 0:ml.split("."))==null?void 0:Ka[((Rl=(yl=fe==null?void 0:fe.prop)==null?void 0:yl.split("."))==null?void 0:Rl.length)-1]]??$e[fe.prop]:$e[fe.prop]=(E==null?void 0:E[fe.prop])??$e[fe.prop]:La.same((B==null?void 0:B.menus)??[],(fe==null?void 0:fe.menus)??[])&&La.same((B==null?void 0:B.groups)??[],(fe==null?void 0:fe.groups)??[])&&!La.same((B==null?void 0:B.words)??[],(fe==null?void 0:fe.words)??[])?(wl=fe==null?void 0:fe.prop)!=null&&wl.includes(".")&&((hl=(Wa=fe==null?void 0:fe.prop)==null?void 0:Wa.split("."))==null?void 0:hl[0])!==((vl=(Ga=B==null?void 0:B.prop)==null?void 0:Ga.split("."))==null?void 0:vl[0])||($e[fe.prop]=(E==null?void 0:E[(Tl=fe==null?void 0:fe.words)==null?void 0:Tl.join(".")])??(E==null?void 0:E[fe.prop])??$e[fe.prop]):(!(fe!=null&&fe.isMainPath)&&La.same((B==null?void 0:B.bindMenus)??[],(fe==null?void 0:fe.bindMenus)??[]),$e[fe.prop]=(E==null?void 0:E[fe.prop])??$e[fe.prop]))}),_e.value=(ua=I.cloneDeep(_e.value))==null?void 0:ua.map(fe=>(fe==null?void 0:fe.id)===(f==null?void 0:f.id)?{...$e,id:fe==null?void 0:fe.id}:fe)}}if((Sa=B==null?void 0:B.optionUrl)!=null&&Sa.menuSelect){let E="";Q==null||Q.forEach(ba=>{var fa,ya,Ia,dl,Xa;E===""&&((Ia=(ya=(fa=ba==null?void 0:ba.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:ya[1])!=null&&Ia.includes("["))&&(E=(Xa=(dl=ba==null?void 0:ba.optionUrl)==null?void 0:dl.groupSelect)==null?void 0:Xa[1])});let $e=await fi(B),fe;if($e==null||$e.forEach(ba=>{var fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl;E===((ya=(fa=B==null?void 0:B.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:ya[1])&&((Xa=(dl=(Ia=B==null?void 0:B.optionUrl)==null?void 0:Ia.groupSelect)==null?void 0:dl[1])!=null&&Xa.includes("["))&&((wl=I.cloneDeep(ba))==null?void 0:wl[(Ka=(Rl=(yl=(ml=B==null?void 0:B.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])==null?void 0:Rl.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])===(B==null?void 0:B.value)&&(fe=ba)}),fe){const ba={...f};Q==null||Q.forEach(fa=>{var ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl;(fe!=null&&fe[fa==null?void 0:fa.label]||fe!=null&&fe[(Xa=(dl=(Ia=(ya=fa==null?void 0:fa.optionUrl)==null?void 0:ya.groupSelect)==null?void 0:Ia[1])==null?void 0:dl.replaceAll("[",""))==null?void 0:Xa.replaceAll("]","")])&&((Rl=(yl=(ml=fa==null?void 0:fa.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])!=null&&Rl.includes("["))&&(ba[fa.prop]=(fe==null?void 0:fe[fa==null?void 0:fa.label])||(fe==null?void 0:fe[(hl=(Wa=(wl=(Ka=fa==null?void 0:fa.optionUrl)==null?void 0:Ka.groupSelect)==null?void 0:wl[1])==null?void 0:Wa.replaceAll("[",""))==null?void 0:hl.replaceAll("]","")]))}),_e.value=(oe=I.cloneDeep(_e.value))==null?void 0:oe.map(fa=>(fa==null?void 0:fa.id)===(f==null?void 0:f.id)?{...ba,id:fa==null?void 0:fa.id}:fa)}}},Zc=async d=>{var Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa;if(!d)return;const f=I.cloneDeep(Il.value||{});Il.value=d;const M=zt(f),O=zt(Il.value);if(O&&O!==M&&await ei(O,Je.value||void 0)){el.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),lo.forEach(E=>{if(Object.prototype.hasOwnProperty.call(Il.value||{},E)||Object.prototype.hasOwnProperty.call(f||{},E)){const $e=(f==null?void 0:f[E])??"";Il.value[E]=$e,d[E]=$e}}),we.value=(we.value||[]).map(E=>{if(!(E!=null&&E.prop)||!lo.includes(E.prop))return E;const $e=(f==null?void 0:f[E.prop])??"";return{...E,value:$e,selectValue:$e===""?[]:[$e]}});return}let R=I.cloneDeep(u.itemData);R==null||R.map(oe=>{var E,$e,fe,ba;return(oe==null?void 0:oe.key)==="header"&&(Array.isArray((E=oe.contents)==null?void 0:E[0])?oe.contents=(fe=sa.getColumnChild(($e=oe.contents)==null?void 0:$e[0]))==null?void 0:fe.map((fa,ya)=>{var Ia,dl,Xa,ml,yl,Rl;return((Xa=(dl=(Ia=we.value)==null?void 0:Ia.find(Ka=>(Ka==null?void 0:Ka.prop)===(fa==null?void 0:fa.prop)))==null?void 0:dl.optionUrl)==null?void 0:Xa.multiple)===!0&&!Array.isArray((ml=Object.values(d))==null?void 0:ml[ya])?fa.value=[(yl=Object.values(d))==null?void 0:yl[ya]]:fa.value=(Rl=Object.values(d))==null?void 0:Rl[ya],fa}):oe.contents=(ba=oe.contents)==null?void 0:ba.map((fa,ya)=>{var Ia,dl,Xa,ml,yl,Rl;return((Xa=(dl=(Ia=we.value)==null?void 0:Ia.find(Ka=>(Ka==null?void 0:Ka.prop)===(fa==null?void 0:fa.prop)))==null?void 0:dl.optionUrl)==null?void 0:Xa.multiple)===!0&&!Array.isArray((ml=Object.values(d))==null?void 0:ml[ya])?fa.value=[(yl=Object.values(d))==null?void 0:yl[ya]]:fa.value=(Rl=Object.values(d))==null?void 0:Rl[ya],fa})),oe});let B=we.value,Q=(Ue=R==null?void 0:R.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:Ue.contents;if($l.value||(B=B==null?void 0:B.map(oe=>{var E;return oe.value=oe.value??((E=Q==null?void 0:Q.find(($e,fe)=>($e==null?void 0:$e.prop)===(oe==null?void 0:oe.name)))==null?void 0:E.value),oe})),!zr.value)return;let ae=I.cloneDeep($l.value);(ta=$l.value)!=null&&ta.includes("·")&&($l.value=(Ta=($a=$l.value)==null?void 0:$a.split("·"))==null?void 0:Ta[0]);let H=(Ya=(ra=R==null?void 0:R.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:ra.contents)==null?void 0:Ya.find((oe,E)=>(oe==null?void 0:oe.prop)===$l.value);(ia=we==null?void 0:we.value)==null||ia.forEach(oe=>{var E,$e,fe,ba,fa,ya,Ia,dl,Xa;(oe==null?void 0:oe.prop)===(H==null?void 0:H.prop)&&(oe!=null&&oe.endChildMenu)&&((E=H==null?void 0:H.prop)!=null&&E.includes(".")&&((fe=($e=H==null?void 0:H.prop)==null?void 0:$e.split("."))==null?void 0:fe[0])!==((fa=(ba=oe==null?void 0:oe.prop)==null?void 0:ba.split("."))==null?void 0:fa[0])?H.endChildMenu=(Ia=(ya=oe==null?void 0:oe.value)==null?void 0:ya.split(" "))==null?void 0:Ia[0]:H.endChildMenu=(Xa=(dl=oe==null?void 0:oe.endChildMenu)==null?void 0:dl.split(" "))==null?void 0:Xa[0])});let he=H!=null&&H.isMainPath&&(H!=null&&H.mainKey)?H==null?void 0:H.value:"",xe=B,Ve=ke.value;if(Ve!=null&&Ve.find(oe=>(H==null?void 0:H.prop)===(oe==null?void 0:oe.key))&&(Ve=Ve==null?void 0:Ve.filter(oe=>(H==null?void 0:H.prop)!==(oe==null?void 0:oe.key))),Ve!=null&&Ve.find(oe=>ae===(oe==null?void 0:oe.key))&&(Ve=Ve==null?void 0:Ve.filter(oe=>ae!==(oe==null?void 0:oe.key))),(H==null?void 0:H.formType)==="Select"&&(xe=xe==null?void 0:xe.map(oe=>{var E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl;return(oe==null?void 0:oe.type)==="Select"&&(((E=oe==null?void 0:oe.allSelectionContents)==null?void 0:E.length)>0&&(oe.contactValue=d),((H==null?void 0:H.prop)===(oe==null?void 0:oe.prop)||ae===(oe==null?void 0:oe.prop))&&H&&(Array.isArray(H.value)&&(($e=H.value)==null?void 0:$e.length)>0&&((fe=H.value)!=null&&fe.every(Ga=>typeof Ga=="string"))?(Ve.push({key:oe==null?void 0:oe.prop,value:[(fa=H.value)==null?void 0:fa[((ba=H.value)==null?void 0:ba.length)-1]]}),oe.selectValue=(ya=Ve==null?void 0:Ve.find(Ga=>(Ga==null?void 0:Ga.key)===(oe==null?void 0:oe.prop)))==null?void 0:ya.value):Array.isArray(H.value)&&((Ia=H.value)==null?void 0:Ia.length)===0?(Ve=[],oe.selectValue=[],d[oe==null?void 0:oe.prop]=""):Array.isArray(oe.value)&&Ve.push({key:oe==null?void 0:oe.prop,value:[(dl=oe.value)==null?void 0:dl[(oe==null?void 0:oe.length)-1]]})),((ml=oe==null?void 0:oe.menus)==null?void 0:ml[((Xa=oe==null?void 0:oe.menus)==null?void 0:Xa.length)-1])===""&&(H!=null&&H.isMainPath)&&(H!=null&&H.mainKey)&&((yl=oe==null?void 0:oe.prop)!=null&&yl.includes(".")&&((Ka=(Rl=oe==null?void 0:oe.prop)==null?void 0:Rl.split("."))==null?void 0:Ka[0])!==((Wa=(wl=H==null?void 0:H.prop)==null?void 0:wl.split("."))==null?void 0:Wa[0])||(oe.endChildMenu=(hl=he==null?void 0:he.split(" "))==null?void 0:hl[0]))),oe.value=(d==null?void 0:d[oe==null?void 0:oe.prop])??(oe==null?void 0:oe.value),oe})),ke.value=Ve,xe!=null&&xe.some(oe=>(oe==null?void 0:oe.functionName)&&(oe==null?void 0:oe.functionName)!=="")){let oe=await di([d],Ee==null?void 0:Ee.value,"Auto",_e.value);xe=xe==null?void 0:xe.map(E=>{var $e;return E.value=(($e=oe==null?void 0:oe[0])==null?void 0:$e[E==null?void 0:E.prop])??E.value,E}),Il.value=oe==null?void 0:oe[0]}if(we.value=xe,H=Object.assign({},H??{},{relatedWords:(se=(Pa=we==null?void 0:we.value)==null?void 0:Pa.find(oe=>(oe==null?void 0:oe.prop)===(H==null?void 0:H.prop)))==null?void 0:se.relatedWords}),(H==null?void 0:H.mainKey)&&(H!=null&&H.value)&&(H==null?void 0:H.value)!==""){let oe=H!=null&&H.relatedContents&&((Da=H==null?void 0:H.relatedContents)==null?void 0:Da.length)>0?(ua=H==null?void 0:H.relatedContents)==null?void 0:ua.find(E=>{var $e,fe,ba,fa;return(E==null?void 0:E[(fa=($e=H==null?void 0:H.prop)==null?void 0:$e.split("."))==null?void 0:fa[((ba=(fe=H==null?void 0:H.prop)==null?void 0:fe.split("."))==null?void 0:ba.length)-1]])===(H==null?void 0:H.value)}):await ls(H);if(oe&&JSON.stringify(oe)!=="{}"){let E=xe;E=E==null?void 0:E.map(fe=>{var ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl,Bl,hr,Ll,xl,Al;return(H==null?void 0:H.prop)===(fe==null?void 0:fe.prop)?fe.value=(oe==null?void 0:oe[(ba=fe==null?void 0:fe.words)==null?void 0:ba.join(".")])??(oe==null?void 0:oe[fe==null?void 0:fe.prop])??oe[(dl=(fa=fe==null?void 0:fe.prop)==null?void 0:fa.split("."))==null?void 0:dl[((Ia=(ya=fe==null?void 0:fe.prop)==null?void 0:ya.split("."))==null?void 0:Ia.length)-1]]:H!=null&&H.relatedContents&&((Xa=H==null?void 0:H.relatedContents)==null?void 0:Xa.length)>0?fe.value=(ml=fe==null?void 0:fe.prop)!=null&&ml.includes(".")&&((Rl=(yl=fe==null?void 0:fe.prop)==null?void 0:yl.split("."))==null?void 0:Rl[0])===((wl=(Ka=H==null?void 0:H.prop)==null?void 0:Ka.split("."))==null?void 0:wl[0])?oe[(vl=(Wa=fe==null?void 0:fe.prop)==null?void 0:Wa.split("."))==null?void 0:vl[((Ga=(hl=fe==null?void 0:fe.prop)==null?void 0:hl.split("."))==null?void 0:Ga.length)-1]]:(oe==null?void 0:oe[fe==null?void 0:fe.prop])??(fe==null?void 0:fe.value):La.same((H==null?void 0:H.menus)??[],(fe==null?void 0:fe.menus)??[])&&La.same((H==null?void 0:H.groups)??[],(fe==null?void 0:fe.groups)??[])&&!La.same((H==null?void 0:H.words)??[],(fe==null?void 0:fe.words)??[])?(Tl=fe==null?void 0:fe.prop)!=null&&Tl.includes(".")&&((hr=(Bl=fe==null?void 0:fe.prop)==null?void 0:Bl.split("."))==null?void 0:hr[0])!==((xl=(Ll=H==null?void 0:H.prop)==null?void 0:Ll.split("."))==null?void 0:xl[0])||(fe.value=(oe==null?void 0:oe[(Al=fe==null?void 0:fe.words)==null?void 0:Al.join(".")])??(oe==null?void 0:oe[fe==null?void 0:fe.prop])??fe.value):(!(fe!=null&&fe.isMainPath)&&La.same((H==null?void 0:H.bindMenus)??[],(fe==null?void 0:fe.bindMenus)??[]),fe.value=(oe==null?void 0:oe[fe==null?void 0:fe.prop])??fe.value),fe}),we.value=E;let $e={};(Sa=we.value)==null||Sa.forEach(fe=>{$e[fe.prop]=fe==null?void 0:fe.value}),Il.value=$e}}zr.value=!0,j.value=!1},Qc=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",eu=d=>{var B,Q;const f=(Q=(B=De.value)==null?void 0:B.find(ae=>(ae==null?void 0:ae.label)===(d==null?void 0:d.label)))==null?void 0:Q.multiple,M=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;_e.value.forEach(ae=>{const H=ae==null?void 0:ae[M];f&&bo.isString(H)&&(ae[M]=[H]),!f&&!bo.isString(H)&&(ae[M]="")})},Ni=(d,f)=>{var M;return f==null||f.forEach(O=>{d[O==null?void 0:O.prop]=O==null?void 0:O.value}),d.children&&((M=d.children)==null?void 0:M.length)>0&&(d.children=d.children.map(O=>Ni(O,f))),d},ai=d=>{var M,O,R,B,Q,ae;At("");const f=(M=we.value)==null?void 0:M.reduce((H,he)=>(H[he.name]=he.value,H),{});if(((O=Object.keys(f))==null?void 0:O.length)>0){Il.value=f,Je.value="",Fe.value=(R=_e.value)==null?void 0:R.length,Aa.value=(B=Ae.value)==null?void 0:B.filter(he=>(he==null?void 0:he.label)!=="新增");const H=(ae=(Q=de.value)==null?void 0:Q.filter(he=>(he==null?void 0:he.label)!=="操作"))==null?void 0:ae.map(he=>{var Ve,Me,Ue;const xe=(Me=(Ve=De.value)==null?void 0:Ve.find(ta=>(ta==null?void 0:ta.label)===(he==null?void 0:he.label)))==null?void 0:Me.multiple;return eu(he),{...he,contents:(he==null?void 0:he.options)??[],optionUrl:he!=null&&he.formMenuSelect&&((Ue=he==null?void 0:he.formMenuSelect)==null?void 0:Ue.length)>0?{groupSelect:he==null?void 0:he.groupSelect,menuSelect:he==null?void 0:he.formMenuSelect,selectRelateType:"",type:he==null?void 0:he.formType,multiple:xe}:null}});Ee.value=H==null?void 0:H.map(he=>Ni(he,[{prop:"type",value:"edit"},{prop:"columnType",value:Qc(he==null?void 0:he.formType)||(he==null?void 0:he.columnType)}])),d==="createClick"&&(Le.value="新增",Mt(!0))}},ut={START:"开始时间",END:"结束时间",HOURS:"工时"},au=(d,f)=>Number(I.dayjs(f).diff(I.dayjs(d),"day",!0).toFixed(1)),Ti=d=>{var B;const f=u.itemData,M=(B=f==null?void 0:f.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:B.contents,O=new Map;return M==null||M.forEach((Q,ae)=>{const{label:H}=Q;O.set(H,ae)}),!O.has(ut.START)||!O.has(ut.END)||!O.has(ut.HOURS)?d:d==null?void 0:d.map(Q=>{const ae=Q==null?void 0:Q[ut.START],H=Q==null?void 0:Q[ut.END],he=au(ae,H);return ae&&H&&(Q[ut.HOURS]=`${he}天`),Q})},Ai=(d,f,M=0)=>{if(M>((f==null?void 0:f.length)??""))return d;const O=f==null?void 0:f[M],R=new Map;for(const Q of d){const ae=Q[O];R.has(ae)||R.set(ae,[]),R.get(ae)&&R.get(ae).push(Q)}const B=[];for(const[Q,ae]of R){const[H,...he]=ae,xe={...H};M+1===((f==null?void 0:f.length)??"")?xe.children=ae==null?void 0:ae.map(Ve=>(Ve.level=I.cloneDeep(M)+1,Ve)).filter((Ve,Me)=>Me!==0):he.length>0&&(xe.children=Ai(he,f,M+1)),xe.level=M,B.push(xe)}return B},zi=(d,f,M)=>{var R;if(!(f!=null&&f.contents)||((R=f==null?void 0:f.contents)==null?void 0:R.length)===0)return d;let O=[];return O=Ai(d,f==null?void 0:f.contents,0),O},Mi=async(d,f)=>{var Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe,E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl,Bl,hr,Ll,xl,Al,Gl,Ol,ur,dr,Jl,or,Vr,ir,lr,nr,Ii,Li,Vi;const M=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="header");d==null||d.filter(ha=>(ha==null?void 0:ha.key)==="tableIndexColumn")[0];const O=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="childTree")[0];let R=!0;if((Ya=(ra=(Ta=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:Ta.value)==null?void 0:ra.find(ha=>(ha==null?void 0:ha.value)==="onPamButtonContents"))!=null&&Ya.content){let ha=(se=(Pa=(ia=d==null?void 0:d.find(Cl=>(Cl==null?void 0:Cl.key)==="filterAllType"))==null?void 0:ia.value)==null?void 0:Pa.find(Cl=>(Cl==null?void 0:Cl.value)==="onPamButtonContents"))==null?void 0:se.content;ha=(Da=ha==null?void 0:ha.split(":"))==null?void 0:Da[1],ha=(ua=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:ua.split(","),R=!!(ha!=null&&ha.find(Cl=>Cl==="操作"))}const B=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="page"),Q=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="rowButton"),ae=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="extraButton"),H=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="tableContents"),he=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="bottomButton"),xe=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="tableIndex");De.value=(oe=(Sa=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="tableToForm"))==null?void 0:Sa[0])==null?void 0:oe.contents,_a.value=(B==null?void 0:B.contents)??!0;let Ve=[];Zl.value===""?Ve=M==null?void 0:M[0]:Ve=(M==null?void 0:M.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+Zl.value+")"))??(M==null?void 0:M.find(ha=>!(ha!=null&&ha.selectLabel)));let Me=[];Zl.value===""?Me=xe==null?void 0:xe[0]:Me=(xe==null?void 0:xe.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+Zl.value+")"))??(xe==null?void 0:xe.find(ha=>!(ha!=null&&ha.selectLabel)));let Ue=[],ta=[];if(((E=Ve==null?void 0:Ve.contents)==null?void 0:E.length)>0){let ha=[],Cl=Ve==null?void 0:Ve.contents;if(Array.isArray(Cl==null?void 0:Cl[0])&&(($e=Cl==null?void 0:Cl[0])!=null&&$e.every(ll=>!(ll!=null&&ll.children)))&&(Cl=Cl==null?void 0:Cl[0]),Cl.some(ll=>Array.isArray(ll)&&(ll==null?void 0:ll.find(We=>We.children))))ha=(fe=sa.getGradeColumns(Cl,R))==null?void 0:fe[0],ha!=null&&ha.find(ll=>(ll==null?void 0:ll.label)==="操作")||ha.push({label:"操作",prop:"operate",type:"operate"});else{let ll=Cl.some(We=>Array.isArray(We))?Cl==null?void 0:Cl[0]:Cl;ll!=null&&ll.find(We=>(We==null?void 0:We.label)==="操作")||ll.push({label:"操作",prop:"operate",type:"operate"}),ll==null||ll.forEach((We,Xl)=>{var Tr,Cr,Ar,br,Qn,ft,ht,pr,hn,Fn,vt,Gr,jn,Fi,ji,Hi,Ui,qi,Wi,Ki;if((Cr=(Tr=xa.value)==null?void 0:Tr.split("/"))==null||Cr.forEach(Ql=>{var sr,Cn,Yi;Ql!==""&&((Yi=(Cn=(sr=Ql==null?void 0:Ql.split(x+"updateLoading"))==null?void 0:sr[0])==null?void 0:Cn.split(x+"loading"))==null||Yi[0])}),We!=null&&We.methodContent){let Ql=(Qn=(br=(Ar=We==null?void 0:We.methodContent)==null?void 0:Ar.replace("@","%%#"))==null?void 0:br.split("%%#"))==null?void 0:Qn[1];if(Ql=Ql==null?void 0:Ql.slice(0,(Ql==null?void 0:Ql.length)-1),Ql=sa.contentTransArrayToAllNoExtra(Ql??"",","),(ft=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("@Button")))!=null&&ft.includes("Prop")&&((ht=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("Type")))!=null&&ht.includes("Manual"))){let sr=(hn=(pr=Ql==null?void 0:Ql.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:pr.split(":"))==null?void 0:hn[1];sr=((Gr=(vt=(Fn=sr==null?void 0:sr.replaceAll("[",""))==null?void 0:Fn.replaceAll("]",""))==null?void 0:vt.split(","))==null?void 0:Gr[1])??"算法执行",Ue.push(sr)}else if((jn=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("@Button")))!=null&&jn.includes("Row")&&((Fi=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("Type")))!=null&&Fi.includes("Manual"))){let sr=(Hi=(ji=Ql==null?void 0:Ql.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:ji.split(":"))==null?void 0:Hi[1];sr=((Wi=(qi=(Ui=sr==null?void 0:sr.replaceAll("[",""))==null?void 0:Ui.replaceAll("]",""))==null?void 0:qi.split(","))==null?void 0:Wi[1])??"算法执行",ta.push(sr)}}(Ki=De.value)==null||Ki.find(Ql=>(Ql==null?void 0:Ql.prop)===(We==null?void 0:We.prop)),ha.push({label:(We==null?void 0:We.label)==="操作"?R?"操作":"":(We==null?void 0:We.label)??"",prop:(We==null?void 0:We.label)==="操作"?"operate":(We==null?void 0:We.prop)??"a"+Xl,width:We!=null&&We.width?parseInt(We.width):"",fixed:(We==null?void 0:We.fixed)??void 0,sortable:(We==null?void 0:We.sortable)??!1,filterable:(We==null?void 0:We.filterable)??!1,operable:(We==null?void 0:We.operable)??!1,showSummary:(We==null?void 0:We.showSummary)??!1,align:(We==null?void 0:We.align)??"left",showOverflowTooltip:(We==null?void 0:We.showOverflowTooltip)??!0,isNotDrag:(We==null?void 0:We.isNotDrag)??!1,isEditCol:(We==null?void 0:We.isEditCol)??!1,isOperate:(We==null?void 0:We.isOperate)??!1,id:(We==null?void 0:We.id)??Xl,type:(We==null?void 0:We.label)==="操作"?"operate":void 0,formType:(We==null?void 0:We.formType)??(We!=null&&We.groupSelect?"Select":""),disabled:We==null?void 0:We.disabled,options:(We==null?void 0:We.options)??[],value:(We==null?void 0:We.value)??"",isExistChild:(We==null?void 0:We.isExistChild)??!1,mainKey:(We==null?void 0:We.mainKey)??Xl===0,allSelectionContents:(We==null?void 0:We.allContents)??[],filterContent:We==null?void 0:We.filterContents,menus:We==null?void 0:We.menus,groups:We==null?void 0:We.groups,words:We==null?void 0:We.words,filter:We==null?void 0:We.filter,bindMenus:We==null?void 0:We.bindMenus,fatherPath:We==null?void 0:We.fatherPath,isMainPath:We==null?void 0:We.isMainPath,required:(We==null?void 0:We.required)??!1,relatedContents:We==null?void 0:We.relatedContents,functionName:We==null?void 0:We.functionName,functionRelatedWords:We==null?void 0:We.functionRelatedWords,calculatorFilter:We==null?void 0:We.calculatorFilter,relatedPages:We==null?void 0:We.relatedPages})})}A.value=(ba=he==null?void 0:he[0])==null?void 0:ba.contents;const an=sa.getNewColumnChild(ha),Ri=ll=>Array.isArray(ll)?ll.map(We=>(Array.isArray(We==null?void 0:We.children)&&We.children.length>0?(We.sortable=!1,Ri(We.children)):(We==null?void 0:We.prop)==="operate"||(We==null?void 0:We.label)==="操作"||(We==null?void 0:We.type)==="operate"||(We.sortable=!1),We)):ll;Ri(an),await Po(an),Tf(ne.value,an),Ee.value=an,wa.value=an,n.value=(fa=Ee.value)==null?void 0:fa.map(ll=>ll==null?void 0:ll.label);let ln=(Ia=(ya=sa.getAllLeafNodes(Ee.value))==null?void 0:ya.filter(ll=>(ll==null?void 0:ll.type)!=="operate"))==null?void 0:Ia.map((ll,We)=>({prop:(ll==null?void 0:ll.prop)??"a"+We,column:ll.label}));Br.value=ln;let Yr=[];Zl.value===""?Yr=H==null?void 0:H[0]:Yr=(H==null?void 0:H.find(ll=>(ll==null?void 0:ll.selectLabel)==="("+Zl.value+")"))??(H==null?void 0:H.find(ll=>!(ll!=null&&ll.selectLabel)));let Zn=Array.isArray((dl=Yr==null?void 0:Yr.contents)==null?void 0:dl[0])&&((Xa=Yr==null?void 0:Yr.contents)!=null&&Xa[0].every(ll=>Array.isArray(ll)))?(ml=Yr==null?void 0:Yr.contents)==null?void 0:ml[0]:Yr==null?void 0:Yr.contents;Me!=null&&Me.contents&&((yl=Me==null?void 0:Me.contents)==null?void 0:yl.length)!==0&&(Zn=(Rl=I.cloneDeep(Zn))==null?void 0:Rl.map((ll,We)=>{if(!Array.isArray(ll)){let Xl={};for(let Tr in ll)Tr!=="id"&&Tr!=="index"&&(Xl[Tr]=ll[Tr]);ll=Object.values(Xl)}return ll}));const hu=!!((Ka=Ee.value)!=null&&Ka.find(ll=>ll.prop==="index"));Zn=Zs(Zn,Me==null?void 0:Me.contents,hu);const dt=[];Zn==null||Zn.forEach((ll,We)=>{var Tr;let Xl={};if(Array.isArray(ll)){let Cr=[];ll==null||ll.filter(Ar=>!(Ar!=null&&Ar.id)).forEach((Ar,br)=>{var Qn,ft,ht,pr,hn,Fn;if((Qn=ln==null?void 0:ln[br])!=null&&Qn.prop&&!Array.isArray(Ar)){let vt={};vt[ln[br].column]=Ar,Va!=null&&Va.value&&((ft=Va==null?void 0:Va.value)==null?void 0:ft.length)>0&&((ht=Va==null?void 0:Va.value)!=null&&ht.find(Gr=>JSON.stringify(Gr==null?void 0:Gr[0])===JSON.stringify(vt)))&&(Cr=(pr=Va==null?void 0:Va.value)==null?void 0:pr.find(Gr=>JSON.stringify(Gr==null?void 0:Gr[0])===JSON.stringify(vt))),Cr&&Cr.length>0?Xl[ln[br].prop]=Cr!=null&&Cr.find(Gr=>{var jn;return((jn=Object.keys(Gr))==null?void 0:jn[0])===ln[br].column})?(hn=Cr==null?void 0:Cr.find(Gr=>{var jn;return((jn=Object.keys(Gr))==null?void 0:jn[0])===ln[br].column}))==null?void 0:hn[ln[br].column]:Ar:Xl[ln[br].prop]=Ar}else Array.isArray(Ar)&&((Fn=ln[br])!=null&&Fn.prop?Xl[ln[br].prop]=Ar:Xl.children=pi(Ar,ln))})}else Xl=ll;if(Array.isArray(ll)&&ll.some(Cr=>Cr==null?void 0:Cr.id)){const Cr=(Tr=ll==null?void 0:ll.find(Ar=>Ar.id))==null?void 0:Tr.id;dt.push(Object.assign(Xl,{id:Xt(Cr)}))}else Xl.id?dt.push(Xl):dt.push(Object.assign(Xl,{id:We.toString()}))});try{const ll=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),We=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),Xl=ll==null?void 0:ll.tableId,Tr=ll==null?void 0:ll.compIndex;if(Xl&&Array.isArray(We)&&We.length>0&&String(Xl)===String(u==null?void 0:u.parentTableId)&&String(Tr)===String(u==null?void 0:u.index)){const Cr=new Set(dt.map(br=>String(br==null?void 0:br.id))),Ar=We.filter(br=>!Cr.has(String(br)));if(Ar.length>0){const br=ll==null?void 0:ll.pageKey,Qn=br!=null&&br.startsWith("/")?br.substring(1):br;((f==null?void 0:f[br])||(f==null?void 0:f[Qn])||[]).filter(pr=>{var hn,Fn;return((hn=pr==null?void 0:pr.key)==null?void 0:hn.type)==="data"&&String((Fn=pr==null?void 0:pr.key)==null?void 0:Fn.tableId)===String(Xl)&&Ar.includes(pr==null?void 0:pr.id)}).forEach(pr=>{var hn;Cr.has(String(pr==null?void 0:pr.id))||(dt.push({id:pr==null?void 0:pr.id,...((hn=pr==null?void 0:pr.value)==null?void 0:hn.tableData)||{}}),Cr.add(String(pr==null?void 0:pr.id)))})}}}catch{}let pt=null;try{const ll=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,We=JSON.parse(sessionStorage.getItem(ll)||"null");Array.isArray(We)&&We.length>0&&(pt=new Set(We.map(Xl=>String(Xl))))}catch{}const $i=Array.from(((wl=ve.value)==null?void 0:wl.values())||[]).filter(ll=>!(!(ll!=null&&ll._isOCRRow&&(ll==null?void 0:ll._ocrTableId)===(u==null?void 0:u.index))||pt&&pt.has(String(ll==null?void 0:ll.id)))),vu=(_e.value||[]).map(ll=>String(ll==null?void 0:ll.id)),Pi=Zt(dt,vu);if(_e.value=zi(Pi,O,Ee.value),Ca.value=Pi,(Wa=Ca.value)==null||Wa.forEach(ll=>{var We;(We=ve.value)==null||We.set(ll.id,ll)}),pt&&pt.size>0)try{const ll=new Set(Array.from(pt.values()));_e.value=(_e.value||[]).filter(We=>!ll.has(String(We==null?void 0:We.id))),Ca.value=(Ca.value||[]).filter(We=>!ll.has(String(We==null?void 0:We.id))),ll.forEach(We=>{var Xl,Tr;try{(Tr=(Xl=ve.value)==null?void 0:Xl.delete)==null||Tr.call(Xl,We)}catch{}})}catch{}const no=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),li=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(no&&Array.isArray(li)&&li.length>0&&String(no==null?void 0:no.compIndex)===String(u==null?void 0:u.index)){const ll=new Set((Ca.value||[]).map(We=>String(We==null?void 0:We.id)));li.filter(We=>!ll.has(String(We)))}if($i.length>0){const ll=new Set((_e.value||[]).map(Xl=>Xl==null?void 0:Xl.id)),We=$i.filter(Xl=>!ll.has(Xl.id));We.length>0&&(_e.value=[..._e.value||[],...We],Ca.value=[...Ca.value||[],...We],We.forEach(Xl=>{var Tr;return(Tr=ve.value)==null?void 0:Tr.set(Xl.id,Xl)}))}}else Ee.value=[],de.value=[],_e.value=[],Ca.value=[],ve.value=new Map;if(ta=[...new Set(ta)],ta=ta==null?void 0:ta.map(ha=>({label:ha,type:"methodButton"})),((hl=Q==null?void 0:Q.contents)==null?void 0:hl.length)>0?Ma.value=Q==null?void 0:Q.contents:Ma.value=[],Ma.value=[...Ma.value,...ta],Ue=[...new Set(Ue)],Ue=Ue==null?void 0:Ue.map(ha=>({label:ha,type:"methodButton"})),((Ga=ae==null?void 0:ae.contents)==null?void 0:Ga.length)>0)if((Bl=(Tl=(vl=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:vl.value)==null?void 0:Tl.find(ha=>(ha==null?void 0:ha.value)==="onButtonContents"))!=null&&Bl.content){let ha=(xl=(Ll=(hr=d==null?void 0:d.find(Cl=>(Cl==null?void 0:Cl.key)==="filterAllType"))==null?void 0:hr.value)==null?void 0:Ll.find(Cl=>(Cl==null?void 0:Cl.value)==="onButtonContents"))==null?void 0:xl.content;if(ha=(Al=ha==null?void 0:ha.split(":"))==null?void 0:Al[1],ha=(Gl=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:Gl.split(","),Aa.value=(Ol=ae==null?void 0:ae.contents)==null?void 0:Ol.filter(Cl=>ha==null?void 0:ha.find(an=>an===(Cl==null?void 0:Cl.label))),Ae.value=(ur=ae==null?void 0:ae.contents)==null?void 0:ur.filter(Cl=>ha==null?void 0:ha.find(an=>an===(Cl==null?void 0:Cl.label))),(dr=ae==null?void 0:ae.contents)!=null&&dr.some(Cl=>(Cl==null?void 0:Cl.label)==="OCR识别")&&!((Jl=Aa.value)!=null&&Jl.some(Cl=>(Cl==null?void 0:Cl.label)==="OCR识别"))){const Cl=(or=ae==null?void 0:ae.contents)==null?void 0:or.find(an=>(an==null?void 0:an.label)==="OCR识别");Aa.value=[...Aa.value,Cl],Ae.value=[...Ae.value,Cl]}w.value=!!(ha!=null&&ha.find(Cl=>Cl==="搜索")),$.value=!!(ha!=null&&ha.find(Cl=>Cl==="块状显示"))}else Aa.value=ae==null?void 0:ae.contents,Ae.value=ae==null?void 0:ae.contents;else Aa.value=[],Ae.value=[];Aa.value=[...Aa.value,...Ue],Ae.value=[...Ae.value,...Ue],typeof xa.value=="string"&&xa.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((Vr=Aa.value)!=null&&Vr.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(Aa.value=[...Aa.value||[],{label:"OCR识别"}]),(ir=Ae.value)!=null&&ir.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(Ae.value=[...Ae.value||[],{label:"OCR识别"}])):(Aa.value=(Aa.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别"),Ae.value=(Ae.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别")),(lr=Aa.value)!=null&&lr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(Aa.value=[...Aa.value||[],{label:"切换视图"}]),(nr=Ae.value)!=null&&nr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(Ae.value=[...Ae.value||[],{label:"切换视图"}]),Fe.value=((Ii=_e==null?void 0:_e.value)==null?void 0:Ii.length)??0,Ti(_e.value),Nr.value=_e.value,zl.value&&(Ee.value=(Vi=(Li=de.value)==null?void 0:Li.filter(ha=>(ha==null?void 0:ha.label)!=="操作"))==null?void 0:Vi.map(ha=>{var Cl;return{...ha,type:"edit",optionUrl:ha!=null&&ha.formMenuSelect&&((Cl=ha==null?void 0:ha.formMenuSelect)==null?void 0:Cl.length)>0?{groupSelect:ha==null?void 0:ha.groupSelect,menuSelect:ha==null?void 0:ha.formMenuSelect,selectRelateType:"",type:ha==null?void 0:ha.formType}:null}}),ai())};a.watch(()=>[u.itemData,Zl.value,Kn.value,In.value,Va==null?void 0:Va.value],async()=>{var d,f,M,O,R,B;if((d=u==null?void 0:u.itemData)!=null&&d.find(Q=>(Q==null?void 0:Q.key)==="columnPath")&&!((f=F.value)!=null&&f.find(Q=>{var ae,H;return(Q==null?void 0:Q.key)===((H=(ae=u==null?void 0:u.itemData)==null?void 0:ae.find(he=>(he==null?void 0:he.key)==="columnPath"))==null?void 0:H.contents)}))){let Q=F.value,ae={key:(O=(M=u==null?void 0:u.itemData)==null?void 0:M.find(H=>(H==null?void 0:H.key)==="columnPath"))==null?void 0:O.contents,value:(B=(R=u==null?void 0:u.itemData)==null?void 0:R.find(H=>(H==null?void 0:H.key)==="columnUsingPath"))==null?void 0:B.contents};Q!=null&&Q.find(H=>(H==null?void 0:H.key)===(ae==null?void 0:ae.key))?Q=Q==null?void 0:Q.map(H=>((H==null?void 0:H.key)===(ae==null?void 0:ae.key)&&(H.value=ae.value),H)):Q.push(ae),Ye.setTableViewContents(Q)}await Mi(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.operatingForm,d=>{d!=null&&d.form&&(At(d==null?void 0:d.form),Le.value=d==null?void 0:d.dialogTitle,Ba.value=!0,va.value=!0)},{immediate:!0,deep:!0});const lu=()=>{var d;(d=z.value)!=null&&d.includes("read")&&(zl.value=!zl.value)},ru=()=>{cr.value=!cr.value};a.watch(()=>{var d;return(d=u==null?void 0:u.config)==null?void 0:d.viewport},d=>{var f;z.value=d,(d==null?void 0:d.length)===0?zl.value=!1:(d!=null&&d.includes("read")||(zl.value=!0),d!=null&&d.includes("edit")||(zl.value=!1)),S.value=((f=u==null?void 0:u.config)==null?void 0:f.showIndex)||zl.value},{immediate:!0}),a.watch(()=>zl.value,d=>{var f;d?(ai("viewChange"),Ye.setCacheUpdatingData(null)):(Aa.value=Ae.value,Ee.value=wa.value,P.value&&(Ye.setTableLoading(u==null?void 0:u.index),ze("change",P.value))),S.value=d||((f=u==null?void 0:u.config)==null?void 0:f.showIndex),ar.value=[]},{immediate:!0}),a.watch(()=>{var d;return(d=Vn.value)==null?void 0:d.length},d=>{d===0&&(be.currentPage=1)}),a.watch(()=>u==null?void 0:u.compNames,d=>{i.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),a.ref(!1);const nu=(d,f)=>{var M;ai("createClick"),f===be.pageSize&&(be.currentPage=Math.ceil(((M=_e.value)==null?void 0:M.length)/be.pageSize))},tu=async(d,f,M)=>{var R,B,Q,ae,H;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop);if(O&&lo.includes(O)&&M!==void 0&&M!==null&&String(M).trim()!==""){const he=String(M).trim();if(await ei(he,d==null?void 0:d.id)){el.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ve=(R=_e.value)==null?void 0:R.findIndex(Ue=>(Ue==null?void 0:Ue.id)===(d==null?void 0:d.id)),Me=Ve!==-1?(Q=(B=_e.value)==null?void 0:B[Ve])==null?void 0:Q[O]:void 0;O&&(d[O]=Me??"");return}}if(zl.value){const he=d==null?void 0:d.id;he!=null&&(g.value.has(he)||g.value.set(he,I.cloneDeep(d)),c.value.add(he));const xe=(ae=_e.value)==null?void 0:ae.findIndex(Ve=>(Ve==null?void 0:Ve.id)===(d==null?void 0:d.id));xe!==-1&&O&&(_e.value[xe]={..._e.value[xe],[O]:M}),ro(M,d,f);return}ro(M,d,f),Il.value=I.cloneDeep(d),Je.value=d==null?void 0:d.id,Fe.value=(H=_e.value)==null?void 0:H.length,Le.value=d!=null&&d._isTemp?"新增":"编辑",Mt(!1)},ou=async()=>{var d,f;try{const M=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(O=>{if(typeof O=="string"&&O.includes("content_")){const R=O.split("_")[1];R&&(M.push(`content_${R}`),M.push(`struct_${R}`))}})),M.length===0&&(u!=null&&u.itemData)){const O=(f=(d=u.itemData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="contentTableId"))==null?void 0:f.contents;O&&(M.push(`content_${O}`),M.push(`struct_${O}`))}return M}catch(M){return console.error("获取 tableNames 失败:",M),[]}},iu=async(d,f,M)=>{var B,Q;if(!M||typeof M!="string"||M.trim()===""){const ae=(f==null?void 0:f.property)??(f==null?void 0:f.prop),H=`${d==null?void 0:d.id}:${ae}`;h.value.delete(H),m.value.set(H,!1);return}const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),R=`${d==null?void 0:d.id}:${O}`;m.value.set(R,!0);try{const ae=await ou();if(ae.length===0){console.warn("未找到同名表,跳过全局搜索"),h.value.delete(R),m.value.set(R,!1);return}const H=parseInt((B=Vl.value)==null?void 0:B.plat_id);if(!H){console.warn("platId 无效,跳过全局搜索"),h.value.delete(R),m.value.set(R,!1);return}const he=await I.getAllTables({platId:H,tableNames:ae}),xe=((Q=he==null?void 0:he.data)==null?void 0:Q.result)||[],Ve=[],Me=[];for(let Ue=0;Ue<xe.length;Ue+=2)Ue+1<xe.length&&Me.push([xe[Ue],xe[Ue+1]]);Me.forEach(([Ue,ta])=>{var Pa;if(!Array.isArray(Ue)||Ue.length===0||!Array.isArray(ta)||ta.length===0)return;const $a=ta[0];let Ta=((Pa=$a==null?void 0:$a.结构)==null?void 0:Pa.contents)??[];if(!Array.isArray(Ta)||Ta.length===0)return;let ra=I.cloneDeep(Ta);if(Array.isArray(ra==null?void 0:ra[0])&&(ra=sa.getColumnChild(ra[0])),!Array.isArray(ra)||ra.length===0||!ra.some(se=>(se==null?void 0:se.prop)===O))return;[...Ue].sort((se,Da)=>{const ua=Number((se==null?void 0:se.update_time)??0);return Number((Da==null?void 0:Da.update_time)??0)-ua}).slice(0,20).forEach(se=>{const Da=se[O];if(Da!=null){const ua=String(Da);ua.toLowerCase().includes(M.toLowerCase())&&Ve.findIndex(oe=>{var E;return se.id&&((E=oe.rowData)==null?void 0:E.id)===se.id?!0:oe.label===ua})===-1&&Ve.push({label:ua,rowData:I.cloneDeep(se),sourceTable:($a==null?void 0:$a.source_table)||""})}})}),h.value.set(R,Ve)}catch(ae){console.error("全局搜索建议失败:",ae),h.value.delete(R)}finally{m.value.set(R,!1)}},su=(d,f,M)=>{if(!zl.value)return;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),R=(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)||"";if(R&&R.toUpperCase()!=="INPUT"&&R!=="")return;const B=`${d==null?void 0:d.id}:${O}`;if(v.has(B)&&clearTimeout(v.get(B)),!M||M.trim()===""){h.value.delete(B),m.value.set(B,!1);return}const Q=setTimeout(()=>{iu(d,{prop:O,property:O},M),v.delete(B)},300);v.set(B,Q)};function cu(d,f){const M=`${d==null?void 0:d.id}:${(f==null?void 0:f.property)??(f==null?void 0:f.prop)}`;return h.value.get(M)||[]}const uu=(d,f,M)=>{var xe;if(!M||!M.rowData)return;const O=M.rowData,R=d==null?void 0:d.id,B=(f==null?void 0:f.property)??(f==null?void 0:f.prop),ae=(sa.getAllLeafNodes(Ee.value)||[]).filter(Ve=>(Ve==null?void 0:Ve.type)!=="operate"&&(Ve==null?void 0:Ve.label)!=="操作"&&(Ve==null?void 0:Ve.prop)!=="operate");ae.forEach(Ve=>{const Me=Ve==null?void 0:Ve.prop;Me&&O[Me]!==void 0&&(d[Me]=O[Me])});const H=(xe=_e.value)==null?void 0:xe.findIndex(Ve=>(Ve==null?void 0:Ve.id)===R);H!==-1&&ae.forEach(Ve=>{const Me=Ve==null?void 0:Ve.prop;Me&&O[Me]!==void 0&&(_e.value[H][Me]=O[Me])}),R!=null&&(g.value.has(R)||g.value.set(R,I.cloneDeep(d)),c.value.add(R));const he=`${R}:${B}`;h.value.delete(he),m.value.set(he,!1),ro(d[B],d,f)},Lr=d=>{var H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya;const{row:f,column:M,item:O,slotData:R}=d;let B=f!=null&&f[M==null?void 0:M.prop]||(f==null?void 0:f[M==null?void 0:M.prop])===0?((he=(H=f==null?void 0:f[M==null?void 0:M.prop])==null?void 0:H[0])==null?void 0:he.contents)??((f==null?void 0:f[M==null?void 0:M.prop])===0?"0":f==null?void 0:f[M==null?void 0:M.prop]):((Ve=(xe=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:xe[0])==null?void 0:Ve.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((Ue=(Me=R==null?void 0:R[O==null?void 0:O.prop])==null?void 0:Me[0])==null?void 0:Ue.contents)??(R==null?void 0:R[O==null?void 0:O.prop])??((Ta=($a=f==null?void 0:f[(ta=O==null?void 0:O.child)==null?void 0:ta.prop])==null?void 0:$a[0])==null?void 0:Ta.contents)??(f==null?void 0:f[(ra=O==null?void 0:O.child)==null?void 0:ra.prop]),ae=Array.isArray(B)&&!(B!=null&&B.every(ia=>typeof ia=="string"||typeof ia=="number"))?"查看":B;if(ae=Array.isArray(ae)?ae.join(","):ae,(M==null?void 0:M.formType)==="Date")if(!ae||ae===""||ae===null||ae===void 0)ae="";else{const ia=I.dayjs(ae,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ae=ia.isValid()?ia.format("YYYYMMDD"):ae??""}return Array.isArray(M==null?void 0:M.relatedPages)&&((Ya=M==null?void 0:M.relatedPages)==null?void 0:Ya.length)>0&&(ae="详情页"),ae},du=d=>{var he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya;const{row:f,column:M,item:O,slotData:R}=d;let B=f!=null&&f[M==null?void 0:M.prop]?((xe=(he=f==null?void 0:f[M==null?void 0:M.prop])==null?void 0:he[0])==null?void 0:xe.contents)??(f==null?void 0:f[M==null?void 0:M.prop]):((Me=(Ve=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:Ve[0])==null?void 0:Me.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((ta=(Ue=R==null?void 0:R[O==null?void 0:O.prop])==null?void 0:Ue[0])==null?void 0:ta.contents)??(R==null?void 0:R[O==null?void 0:O.prop])??((ra=(Ta=f==null?void 0:f[($a=O==null?void 0:O.child)==null?void 0:$a.prop])==null?void 0:Ta[0])==null?void 0:ra.contents)??(f==null?void 0:f[(Ya=O==null?void 0:O.child)==null?void 0:Ya.prop]);const ae=Array.isArray(B)&&!(B!=null&&B.every(ia=>typeof ia=="string"||typeof ia=="number")),H=Array.isArray(B)&&(B==null?void 0:B.find(ia=>ia==null?void 0:ia.url));return ae&&H},pu=d=>{var R,B;if(!(d!=null&&d.column))return!1;const f=xa.value==="试验任务/任务管理",M=(u==null?void 0:u.compName)==="任务列表",O=((R=d==null?void 0:d.column)==null?void 0:R.label)==="任务状态"||((B=d==null?void 0:d.column)==null?void 0:B.prop)==="任务状态";return f&&M&&O},fu=(d,f)=>d.find(M=>Object.values(M).some(O=>O===f));return a.watch(()=>Te.value,async d=>{if(d){ea.setContentLoading(!0),await a.nextTick();const f=fu(_e.value,d==null?void 0:d.data);if(!f)return ea.setContentLoading(!1);await Pn(d==null?void 0:d.data,null,f,{data:d==null?void 0:d.data}),ea.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.cacheNewData,d=>{var f;d&&(Array.isArray(d)?d.forEach(M=>{var O,R,B,Q,ae;if(换,String(M==null?void 0:M.compId)===String(u==null?void 0:u.index)&&(M!=null&&M.resId)&&((O=M==null?void 0:M.data)!=null&&O.id)){const H=(R=M==null?void 0:M.data)==null?void 0:R.id,he=M==null?void 0:M.resId;if(_e.value=(B=_e.value)==null?void 0:B.map(xe=>{if((xe==null?void 0:xe.id)===H){const Ve={...xe,id:he};return delete Ve._isOCRRow,delete Ve._ocrTableId,Ve}return xe}),(ae=(Q=ve.value)==null?void 0:Q.has)!=null&&ae.call(Q,H)){const Ve={...ve.value.get(H)||{},id:he};delete Ve._isOCRRow,delete Ve._ocrTableId,ve.value.delete(H),ve.value.set(he,Ve)}qe(u==null?void 0:u.index,H,he)}}):String(d==null?void 0:d.compId)===String(u==null?void 0:u.index)&&(_e.value=(f=_e.value)==null?void 0:f.map(M=>{var O;if((M==null?void 0:M.id)===((O=d==null?void 0:d.data)==null?void 0:O.id)){const R={...M,id:d==null?void 0:d.resId};return delete R._isOCRRow,delete R._ocrTableId,R}return M})))},{immediate:!0,deep:!0}),(d,f)=>{var ra,Ya,ia,Pa;const M=a.resolveComponent("svg-icon"),O=a.resolveComponent("el-popover"),R=a.resolveComponent("el-switch"),B=a.resolveComponent("el-checkbox"),Q=a.resolveComponent("el-radio"),ae=a.resolveComponent("el-radio-group"),H=a.resolveComponent("el-checkbox-group"),he=a.resolveComponent("el-button"),xe=a.resolveComponent("el-icon"),Ve=a.resolveComponent("el-progress"),Me=a.resolveComponent("el-alert"),Ue=a.resolveComponent("el-table-column"),ta=a.resolveComponent("el-table"),$a=a.resolveComponent("el-upload"),Ta=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",v0,[Mr.value?(a.openBlock(),a.createBlock(pl.ssTable,{id:"excel-table",pageObj:be,showIndex:S.value,isTree:(ra=l.compItem)==null?void 0:ra.isTree,summaryInfo:X,columns:Ee.value,defaultSort:Z,isCardViewport:cr.value,checkedColumns:n.value,key:vn.value+Ee.value,tableData:Vn.value,isEditViewport:zl.value,isShowPagination:_a.value,isShowEdit:!1,isShowDelete:!1,allowSelect:_.value,onDbClickRow:Qt,extraButton:Aa.value,rowButton:Ma.value,cacheExtraButtons:Ae.value,isClearSelection:((Ya=ar.value)==null?void 0:Ya.length)===0,onDoCurrentChange:fn,onDoSizeChange:Et,onSortChange:zo,onContentClick:Pn,onRowClick:eo,onSelectChange:Ro,onCellChange:tu,onCellInput:su,onSelectSuggest:uu,onChange:ro,onPreview:$n,onSubmitEditingTable:qt,onHandleColEditChange:jt,onHandleColTypeChange:Ht,onClickButton:Tn,onAddNewRow:Or,bottomButton:A.value},a.createSlots({headerButton:a.withCtx(se=>{var Da,ua;return[l.showHeader?(a.openBlock(),a.createBlock(qp,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(ce)===a.unref(xa),filterValues:Uo.value,selectNums:(Da=ar.value)==null?void 0:Da.length,dataNums:(ua=_e.value)==null?void 0:ua.length,compName:l.compName,isDevMode:l.isDevMode,buttons:se.buttons,onButtonClick:f[1]||(f[1]=(Sa,oe,E)=>Tn(Sa,oe,{extra:E})),columns:Ee.value,onFilter:qo,onGetImportData:Oo,level:l.level,filterShow:w.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var se,Da,ua,Sa;return[((se=_e.value)==null?void 0:se.length)>0&&l.allowOperate&&$.value?(a.openBlock(),a.createElementBlock("div",g0,[(Da=z.value)!=null&&Da.includes("read")&&((ua=z.value)!=null&&ua.includes("edit"))&&((Sa=Ma.value)!=null&&Sa.some(oe=>(oe==null?void 0:oe.label)==="编辑"))&&!cr.value&&a.unref(ce)!==a.unref(xa)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:lu},[a.createVNode(M,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:se,index:Da})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ua=>nu(se,Da)},[a.createVNode(M,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,b0)]),operateCol:a.withCtx(()=>[a.createVNode(O,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Xc},{reference:a.withCtx(()=>[a.createElementVNode("span",k0,[a.createVNode(M,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",x0,[f[20]||(f[20]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(R,{"model-value":k.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:f[2]||(f[2]=se=>Kt(se))},null,8,["model-value"]),f[21]||(f[21]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(H,{modelValue:n.value,"onUpdate:modelValue":f[3]||(f[3]=se=>n.value=se),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:s},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(xn.value,se=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:se.label},[a.createVNode(B,{value:se.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:se.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(se.label),9,_0)]),_:2},1032,["value"]),a.createVNode(O,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(M,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Da;return[a.createElementVNode("div",w0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Da=Object.keys(se))==null?void 0:Da.filter(ua=>{var Sa;return(Sa=Y.value)==null?void 0:Sa.find(oe=>(oe==null?void 0:oe.value)===ua)}),ua=>{var Sa,oe;return a.openBlock(),a.createElementBlock("div",{key:ua},[N[ua]=="radio"?(a.openBlock(),a.createElementBlock("div",C0,[f[19]||(f[19]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(ae,{"model-value":se==null?void 0:se[ua],onChange:E=>_n(E,ua,se)},{default:a.withCtx(()=>{var E,$e;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(($e=(E=Y.value)==null?void 0:E.find(fe=>(fe==null?void 0:fe.value)===ua))==null?void 0:$e.options,fe=>(a.openBlock(),a.createBlock(Q,{key:fe==null?void 0:fe.value,label:fe==null?void 0:fe.value,value:fe==null?void 0:fe.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(fe==null?void 0:fe.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),N[ua]=="switch"?(a.openBlock(),a.createBlock(R,{key:1,"model-value":se==null?void 0:se[ua],"active-text":(oe=(Sa=Y.value)==null?void 0:Sa.find(E=>(E==null?void 0:E.value)===ua))==null?void 0:oe.label,onChange:E=>_n(E,ua,se)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",S0,[a.createVNode(M,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(se=>{var Da,ua,Sa,oe,E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl;return[((Da=se==null?void 0:se.column)==null?void 0:Da.label)==="证书附件"||((ua=se==null?void 0:se.column)==null?void 0:ua.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",E0,[a.createVNode(M,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ga=>Fr(se),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):du(se)?(a.openBlock(),a.createBlock(O,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",D0,a.toDisplayString(Lr(se)),1)]),default:a.withCtx(()=>{var Ga,vl;return[a.createElementVNode("div",B0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((vl=se==null?void 0:se.row)==null?void 0:vl[(Ga=se==null?void 0:se.column)==null?void 0:Ga.prop],Tl=>(a.openBlock(),a.createElementBlock("div",N0,[a.createElementVNode("div",{class:"prop-url",title:Jn(Tl),onClick:Bl=>jo(Tl)},a.toDisplayString(Jn(Tl)),9,T0),a.createElementVNode("div",{class:"prop-download",onClick:Bl=>ot(Tl)}," 下载 ",8,A0)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[pu(se)?(a.openBlock(),a.createBlock(Su,{key:0,value:Lr(se)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Lr(se))&&((oe=(Sa=Lr(se))==null?void 0:Sa.toString())!=null&&oe.includes(".txt")||($e=(E=Lr(se))==null?void 0:E.toString())!=null&&$e.includes(".cpt")||(ba=(fe=Lr(se))==null?void 0:fe.toString())!=null&&ba.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Lr(se))&&((ya=(fa=Lr(se))==null?void 0:fa.toString())!=null&&ya.includes(".txt")||(dl=(Ia=Lr(se))==null?void 0:Ia.toString())!=null&&dl.includes(".cpt")||(ml=(Xa=Lr(se))==null?void 0:Xa.toString())!=null&&ml.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Lr(se))&&((Rl=(yl=Lr(se))==null?void 0:yl.toString())!=null&&Rl.includes(".txt")||(wl=(Ka=Lr(se))==null?void 0:Ka.toString())!=null&&wl.includes(".cpt")||(hl=(Wa=Lr(se))==null?void 0:Wa.toString())!=null&&hl.includes(".cyd"))?"pointer":"",marginLeft:(se==null?void 0:se.colIndex)===0?`${((se==null?void 0:se.level)??0)*20}px`:0}),onClick:Ga=>{var vl;return Bn(Lr(se),((vl=se==null?void 0:se.column)==null?void 0:vl.relatedPages)??[])}},a.toDisplayString(Lr(se)===0?"0":Lr(se)),13,z0))],64))]}),_:2},[((ia=Ma.value)==null?void 0:ia.length)>0?{name:"actions",fn:a.withCtx(({item:se,fIndex:Da})=>[a.createVNode(O,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(M,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:f[0]||(f[0]=a.withModifiers(()=>{},["stop"]))})]),default:a.withCtx(()=>[a.createElementVNode("div",m0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ho(Ma.value,se),(ua,Sa)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:Sa,onClick:a.withModifiers(oe=>Tn(ua==null?void 0:ua.label,se,{extra:ua}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:ua==null?void 0:ua.textColor}),class:"extra-button-label"},a.toDisplayString(ua==null?void 0:ua.label),5)],8,y0))),128))])]),_:2},1024)]),key:"0"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection","bottomButton"])):a.createCommentVNode("",!0),zl.value?(a.openBlock(),a.createElementBlock("div",M0,[a.createVNode(he,{id:"themeBorderButton",onClick:Vo},{default:a.withCtx(()=>f[22]||(f[22]=[a.createTextVNode("取消")])),_:1,__:[22]}),a.createVNode(he,{class:"ok-button",id:"themeButton",onClick:Dt},{default:a.withCtx(()=>f[23]||(f[23]=[a.createTextVNode("保存")])),_:1,__:[23]})])):a.createCommentVNode("",!0),a.createVNode(vr.ssDialog,{title:Le.value,visible:va.value,width:jl.value,onBeforeDestroy:Yt,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",O0,[a.createVNode(pl.ssForm,{ref_key:"formRef",ref:re,rowContents:we.value,showOperator:!1,onChange:Zc,isEnableWrap:!1,onFixChangeValue:Nt,onClickTrigger:Gt,isEdit:Qe.value,onBlurChange:$o,onCreate:Wt,onTagChange:Kr},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Ba.value?(a.openBlock(),a.createElementBlock("div",I0,[a.createVNode(he,{onClick:f[4]||(f[4]=se=>va.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>f[24]||(f[24]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[24]}),a.createVNode(he,{class:"ok-button",onClick:f[5]||(f[5]=se=>Mt(!0)),id:"themeButton"},{default:a.withCtx(()=>f[25]||(f[25]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[25]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(vr.ssDialog,{title:Le.value,visible:K.value,width:je.value,onBeforeDestroy:f[7]||(f[7]=se=>K.value=!1)},{default:a.withCtx(()=>[a.createVNode(nf)]),footer:a.withCtx(()=>[a.createElementVNode("div",L0,[a.createVNode(he,{onClick:f[6]||(f[6]=se=>K.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>f[26]||(f[26]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[26]}),a.createVNode(he,{class:"ok-button",onClick:Tt,id:"themeButton"},{default:a.withCtx(()=>f[27]||(f[27]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ja.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:2,fileDataList:ee.value,onDestroy:wn},null,8,["fileDataList"])):a.createCommentVNode("",!0),Ke.value?(a.openBlock(),a.createBlock(vr.ssDialog,{key:3,visible:Ke.value,onBeforeDestroy:Gc,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(go.ThreeViewerHost,{files:Ua.value,threeData:te.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(vr.ssDialog,{title:"OCR扫描录入",visible:rl.value,"close-on-click-modal":!1,onBeforeDestroy:il,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:a.withCtx(()=>[f[38]||(f[38]=a.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),a.createElementVNode("div",V0,[a.createElementVNode("div",R0,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:W.value===1}])},f[28]||(f[28]=[a.createElementVNode("div",{class:"step-circle"},"1",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),f[31]||(f[31]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:W.value===2}])},f[29]||(f[29]=[a.createElementVNode("div",{class:"step-circle"},"2",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),f[32]||(f[32]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:W.value===3}])},f[30]||(f[30]=[a.createElementVNode("div",{class:"step-circle"},"3",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),W.value===1?(a.openBlock(),a.createElementBlock("div",$0,[a.createVNode(he,{onClick:Xo,class:"ocr-action-btn",disabled:da.value,size:"default"},{default:a.withCtx(()=>f[33]||(f[33]=[a.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),a.createVNode(he,{onClick:Fl,class:"ocr-action-btn",disabled:da.value,size:"default"},{default:a.withCtx(()=>f[34]||(f[34]=[a.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):a.createCommentVNode("",!0),W.value===1?(a.openBlock(),a.createElementBlock("div",P0,[a.createElementVNode("div",F0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Xe.value,(se,Da)=>{var ua;return a.openBlock(),a.createElementBlock("div",{key:Da,class:"ocr-file-item"},[a.createElementVNode("div",j0,[se.raw&&((ua=se.raw.type)!=null&&ua.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:_l(se),alt:"预览",class:"thumbnail-image"},null,8,H0)):(a.openBlock(),a.createElementBlock("div",U0,[a.createVNode(xe,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(el.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:sl(se)==="uploading",processing:sl(se)==="processing",completed:sl(se)==="completed"||sl(se)==="uploaded",failed:sl(se)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",q0,[f[35]||(f[35]=a.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),a.createElementVNode("circle",{class:a.normalizeClass(["progress-ring-fill",{completed:sl(se)==="completed"||sl(se)==="uploaded",uploading:sl(se)==="uploading",processing:sl(se)==="processing",failed:sl(se)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:sl(se)==="failed"?"#f56c6c":sl(se)==="completed"||sl(se)==="uploaded"?"#67c23a":"#409eff","stroke-width":sl(se)==="completed"||sl(se)==="uploaded"||sl(se)==="failed"?3:2,"stroke-dasharray":Kl(se),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,W0)])),sl(se)==="completed"||sl(se)==="uploaded"?(a.openBlock(),a.createElementBlock("div",K0,[a.createVNode(xe,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(el.check_default))]),_:1})])):a.createCommentVNode("",!0),sl(se)==="failed"?(a.openBlock(),a.createElementBlock("div",Y0,[a.createVNode(xe,{class:"error-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(el.close_default))]),_:1})])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:"file-delete-btn",onClick:Sa=>ct(Da)},[a.createVNode(xe,null,{default:a.withCtx(()=>[a.createVNode(a.unref(el.close_default))]),_:1})],8,G0)]),a.createElementVNode("div",J0,a.toDisplayString(se.name||"文件名123"),1)])}),128))]),Xe.value.length>0?(a.openBlock(),a.createElementBlock("div",X0,[a.createVNode(he,{onClick:pe,class:"ocr-start-recognize-btn",disabled:da.value||Xe.value.length===0,size:"default"},{default:a.withCtx(()=>f[36]||(f[36]=[a.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),W.value===1?(a.openBlock(),a.createElementBlock("div",Z0,[a.createVNode(Ve,{percentage:Ce.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),W.value===2?(a.openBlock(),a.createElementBlock("div",Q0,[a.createElementVNode("div",e3,[a.createVNode(Me,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",a3,[a.createVNode(ta,{data:Fa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(Ue,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(me.value,se=>(a.openBlock(),a.createBlock(Ue,{key:se.prop,prop:se.prop,"min-width":se.minWidth||230,"class-name":se.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",l3,[a.createElementVNode("span",null,a.toDisplayString(se.label),1)])]),default:a.withCtx(({row:Da,$index:ua})=>{var Sa,oe,E;return[se.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:nl(Da[se.prop]),fontWeight:500})},a.toDisplayString(za(Da[se.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Za.value!==ua?(a.openBlock(),a.createElementBlock("span",r3,a.toDisplayString(Da[se.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Ja(se.prop)),{key:1,modelValue:Da[se.prop],"onUpdate:modelValue":$e=>Da[se.prop]=$e,size:"small",placeholder:"请输入"+se.label,content:((Sa=fl(se.prop))==null?void 0:Sa.contents)??((oe=fl(se.prop))==null?void 0:oe.options)??[],optionUrl:(E=fl(se.prop))==null?void 0:E.optionUrl,onChange:$e=>Ze(ua,se.prop,$e),onFocus:$e=>cl.value=se.prop,onBlur:f[8]||(f[8]=$e=>cl.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(Ue,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:se})=>[Za.value===se?(a.openBlock(),a.createBlock(xe,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(Da=>Qa(se),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(el.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(M,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(Da=>Qa(se),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),W.value===3?(a.openBlock(),a.createElementBlock("div",n3,[a.createVNode(xe,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(el.check_default))]),_:1}),f[37]||(f[37]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode($a,{ref:"ocrUploadRef","file-list":Xe.value,"onUpdate:fileList":f[9]||(f[9]=se=>Xe.value=se),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":q,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[W.value!==3?(a.openBlock(),a.createElementBlock("div",t3,[a.createVNode(he,{onClick:Ir,class:"ocr-start-recognize-btn",disabled:W.value===1||da.value},{default:a.withCtx(()=>f[39]||(f[39]=[a.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),a.createVNode(he,{onClick:mr,class:"ocr-start-recognize-btn",disabled:da.value},{default:a.withCtx(()=>f[40]||(f[40]=[a.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(wf,{visible:st.value,onConfirm:Zo,onCancel:f[10]||(f[10]=se=>st.value=!1)},null,8,["visible"]),a.createVNode(od,{visible:aa.value,"onUpdate:visible":f[11]||(f[11]=se=>aa.value=se),versions:ca.value},null,8,["visible","versions"]),a.createVNode(Wu,{visible:ul.value,"onUpdate:visible":f[12]||(f[12]=se=>ul.value=se),images:Wl.value,"default-image-name":ql.value,"field-meta":Za.value!==null?((Pa=Fa.value[Za.value])==null?void 0:Pa.__ocrFieldMeta)||{}:{},"focused-field-name":cl.value,onClose:f[13]||(f[13]=se=>ul.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(bd,{visible:Pl.value,"onUpdate:visible":f[14]||(f[14]=se=>Pl.value=se),candidates:Hl.value,"name-prop":un.value,"mfr-prop":Jr.value,columns:Ee.value,onSubmit:tn,onPreviewFile:en},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(Ed,{visible:Be.value,"onUpdate:visible":f[15]||(f[15]=se=>Be.value=se),ocrPreviewData:Fa.value,"onUpdate:ocrPreviewData":f[16]||(f[16]=se=>Fa.value=se),ocrSelectedFields:tl.value,"onUpdate:ocrSelectedFields":f[17]||(f[17]=se=>tl.value=se),ocrPreviewColumns:me.value,onConfirm:ge,onFieldChange:f[18]||(f[18]=({rowIndex:se,prop:Da,value:ua})=>Ze(se,Da,ua))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(vr.ssDialog,{title:i.title,visible:i.show,width:i.width,onBeforeDestroy:C},{default:a.withCtx(()=>[a.createElementVNode("div",o3,[a.createVNode(pl.ssForm,{rowContents:i==null?void 0:i.contents,formRules:i==null?void 0:i.formRules,showOperator:!1,buttonValue:i.buttonValue,isEdit:Qe.value,isStartJustify:!1,onOnButtonClick:V},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(vr.ssDialog,{title:o.title,visible:o.show,width:o.width,alignCenter:!0,onBeforeDestroy:p},{header:a.withCtx(()=>[a.createVNode(Ta,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>f[41]||(f[41]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[41]})]),footer:a.withCtx(()=>[a.createElementVNode("div",i3,[a.createVNode(Ta,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(En.value||"暂无"),1)]),_:1}),a.createElementVNode("div",s3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o==null?void 0:o.buttonValue,se=>(a.openBlock(),a.createBlock(he,{key:se==null?void 0:se.label,style:a.normalizeStyle({background:se==null?void 0:se.background,color:se==null?void 0:se.color}),onClick:Da=>y(se==null?void 0:se.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(se==null?void 0:se.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(Wp,{columns:o==null?void 0:o.columns,tableData:o==null?void 0:o.tableData},{content:a.withCtx(({row:se,item:Da,slotData:ua,scope:Sa,column:oe,columnProp:E,$index:$e})=>[a.createTextVNode(a.toDisplayString((se==null?void 0:se[(oe==null?void 0:oe.prop)||(oe==null?void 0:oe.label)])||(ua==null?void 0:ua[oe==null?void 0:oe.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},vc=Ul._export_sfc(u3,[["__scopeId","data-v-c5039ec7"]]),d3={class:"static-form-card"},p3={key:0,class:"static-form-body"},f3=["onClick"],h3={key:1},v3=a.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0}},setup(l){const r=l,n=S=>{switch(S){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},t=a.computed(()=>{var j;const S=(j=r.itemData)==null?void 0:j.find(A=>(A==null?void 0:A.key)==="formContent"),z=(S==null?void 0:S.contents)||[];return(r.fields&&r.fields.length>0?r.fields:z).filter(A=>!(A!=null&&A.isFormColHidden)&&(A==null?void 0:A.label)).map(A=>{let N=A==null?void 0:A.value;Array.isArray(N)&&(N=N.map(T=>T==null?"":typeof T=="object"?T.label??T.value??T.name??JSON.stringify(T):String(T)).filter(Boolean).join(",")),N!=null&&typeof N=="object"&&(N=N.label??N.value??N.name??JSON.stringify(N));const Y=A.label??"",b=N==null||N===""?"-":String(N),L=Y==="使用状态";return{label:Y,value:b,isStatus:L,tagType:L?n(b):"",width:A.width??1,field:A}})}),s=a.ref(null),c=S=>{if(Array.isArray(S)&&S.length>=3){const[z,w,j,A]=S;return A!==void 0?`rgba(${z}, ${w}, ${j}, ${A})`:`rgb(${z}, ${w}, ${j})`}if(typeof S=="string"){const z=S.trim();if(z.startsWith("[")&&z.endsWith("]")){const w=z.slice(1,-1).split(",").map(j=>Number(j.trim()));if(w.length>=3&&w.every(j=>!Number.isNaN(j))){const[j,A,N,Y]=w;return Y!==void 0?`rgba(${j}, ${A}, ${N}, ${Y})`:`rgb(${j}, ${A}, ${N})`}}return z}},g=a.computed(()=>{const S=Number(r==null?void 0:r.textSize),z=c(r==null?void 0:r.textColor),w={},j={},A={},N={};return!Number.isNaN(S)&&S&&(w.fontSize=`${S}px`,j.fontSize=`${S+1}px`,A.fontSize=`${S}px`,N.fontSize=`${S}px`),z&&(j.color=z,A.color=z,N.color=z),{item:w,label:j,value:A,empty:N}}),h=S=>pl.getComponent(S),v=S=>{if(!S)return;const z=S.querySelector("input, textarea, .el-input__inner");z&&typeof z.focus=="function"&&z.focus()},m=(S,z,w)=>{r.disabled||(s.value=z,a.nextTick(()=>{v(w.currentTarget)}))},u=()=>{s.value=null},_=S=>{const z=S!=null&&S.width&&S.width>0?S.width:1,j=`calc((100% - ${(z-1)*48}px) / ${z})`;return{flex:`0 0 ${j}`,maxWidth:j,minWidth:"0",boxSizing:"border-box"}};return(S,z)=>{const w=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",d3,[t.value.length?(a.openBlock(),a.createElementBlock("div",p3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(j,A)=>{var N,Y,b,L,T,x,k,$;return a.openBlock(),a.createElementBlock("div",{key:A,class:"static-form-item",style:a.normalizeStyle({..._(j),...g.value.item})},[a.createElementVNode("div",{class:"static-form-label",style:a.normalizeStyle(g.value.label)},a.toDisplayString(j.label)+": ",5),a.createElementVNode("div",{class:"static-form-value",style:a.normalizeStyle(g.value.value),onClick:U=>m(j,A,U)},[s.value===A&&j.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(h(((N=j.field)==null?void 0:N.type)??"Input")),{key:0,modelValue:j.field.value,"onUpdate:modelValue":U=>j.field.value=U,isEdit:!0,disabled:(Y=j.field)==null?void 0:Y.disabled,content:((b=j.field)==null?void 0:b.contents)??[],optionUrl:j.field,originalValue:(L=j.field)==null?void 0:L.value,config:(T=j.field)==null?void 0:T.config,configModel:((x=j.field)==null?void 0:x.prop)??((k=j.field)==null?void 0:k.name),selectedTagList:(($=j.field)==null?void 0:$.selectValue)??[],onBlur:u,onBlurChange:u},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[j.isStatus?(a.openBlock(),a.createBlock(w,{key:0,type:j.tagType,size:"Default",effect:"plain"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(j.value??"-"),1)]),_:2},1032,["type"])):(a.openBlock(),a.createElementBlock("span",h3,a.toDisplayString(j.value??"-"),1))],64))],12,f3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"static-form-empty",style:a.normalizeStyle(g.value.empty)}," 暂无数据 ",4))])}}}),mc=Ul._export_sfc(v3,[["__scopeId","data-v-351e0bf9"]]),m3={class:"form-content"},y3={title:"选择标签"},g3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},b3={class:"col-operate-wrap"},k3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},x3={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(l,{emit:r}){const n=()=>{g.value=!1,h.value=!1,v.value=[]},t=l;a.computed(()=>{var Qe;const ve=(Qe=ye.value)==null?void 0:Qe.split("/");return(ve==null?void 0:ve.some(Fe=>(Fe==null?void 0:Fe.includes("updateLoading"))||(Fe==null?void 0:Fe.includes("loading"))))?!1:Z.value==="view"});const s=r,c=a.ref([]),g=a.ref(!1),h=a.ref(!1),v=a.ref([]),{getFileExtension:m}=go.useThreeSystem(),u=a.ref(),_=a.ref(!1),S=a.ref(!1),z=I.useUnit(I.pinia),{chooseTitle:w}=I.storeToRefs(z),j=a.ref([]),A=a.ref(),N=a.ref(!1),Y=a.ref([]),b=Xs(I.pinia),L=ki(I.pinia),T=a.ref(!1),x=a.ref(),k=a.ref(),$=a.ref(),U=I.useLoginState(I.pinia),{loginUserInfo:X}=I.storeToRefs(U),be=a.ref(),ze=a.ref(!0),Ee=I.useModelComp(I.pinia),{tableViewContents:ne,itemData:ke,isEdit:Z,routeToChildPath:de,lockingPage:Ke}=I.storeToRefs(Ee),Na=a.ref(null),te=a.ref(!1),D=a.ref(!1),le=I.useMenuState(),{activeMenuPath:ye}=I.storeToRefs(le),ue=sa.useOriginalState(I.pinia),{originalPath:Ne}=I.storeToRefs(ue),{compType:pa,hasEditable:wa}=js.useRole(),ja=()=>!wa(t.config,{type:pa.FORM});a.computed(()=>ye.value==="设备管理/试验设备"&&t.compName==="设备概要");const ee=a.ref([]),ea=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Pe=async ve=>{D.value=ve,await Va("disabled",null,ve,!0)},xa=async ve=>{await Va("operable",null,ve,!0)};a.watch(()=>ye.value,async()=>{c.value=[],v.value=[]},{deep:!0,immediate:!0});const He=()=>{a.nextTick(()=>{qa()})},Te=ve=>{var Je;c.value=(Je=c.value)==null?void 0:Je.map(Qe=>({...Qe,isFormColHidden:!(ve!=null&&ve.includes(Qe.label))}))};a.onUnmounted(()=>{Na.value=null});const Re=ve=>{s("clickTrigger",ve)},Ye=async ve=>{var Je,Qe,Fe,_a,Le,va;if(ve===""){let re="";(Je=c.value)==null||Je.forEach(De=>{De!=null&&De.isMain&&(re=De==null?void 0:De.value)});let Se=await sa.getItemData(de.value,sessionStorage.getItem("systemKey"),"");re=((va=(Le=(_a=(Fe=(Qe=Se==null?void 0:Se[0])==null?void 0:Qe.compData)==null?void 0:Fe.find(De=>(De==null?void 0:De.key)==="mainRouters"))==null?void 0:_a.contents)==null?void 0:Le[0])==null?void 0:va.routerContent)+Ne.value+re;let je=await sa.getItemData(re,sessionStorage.getItem("systemKey"),"");N.value=!0,Y.value=je==null?void 0:je.filter(De=>(De==null?void 0:De.comp)!=="methodButton"),s("routeUrl",Y.value)}},qa=()=>{var Je;const ve=(Je=Na.value)==null?void 0:Je.$el;ve&&La.Sortable.create(ve,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Qe=>{const{oldIndex:Fe,newIndex:_a}=Qe;if(Fe===_a)return;const Le=c.value.splice(Fe,1)[0];c.value.splice(_a,0,Le)}})},Va=async(ve,Je,Qe,Fe=!1)=>{try{Ee.setRefreshCurStructure(!1)}catch{el.ElMessage.error("编辑处理失败")}},P=async(ve,Je)=>{await Va()},F=async(ve,Je)=>{ve&&await Va()},J=async(ve,Je,Qe)=>{await Va(Je,Qe,ve,!1)},ie=(ve,Je)=>{be.value===Je?ze.value=!1:ze.value=!0,be.value=Je==null?void 0:Je.changeProp},ce=async ve=>{var Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa,Ae;let Je=[];if((Qe=ve==null?void 0:ve.toString())!=null&&Qe.includes(".urdf")){if(ve.includes(",")){el.ElMessage.error("当前版本仅允许单个urdf预览!");return}v.value=[{url:ve,extension:m(ve)}],h.value=!0,g.value=!0;return}if((Fe=ve==null?void 0:ve.toString())!=null&&Fe.includes(".stl")||(_a=ve==null?void 0:ve.toString())!=null&&_a.includes(".STL")||(Le=ve==null?void 0:ve.toString())!=null&&Le.includes(".obj")||(va=ve==null?void 0:ve.toString())!=null&&va.includes(".mtl")){const Ea=((re=ve==null?void 0:ve.toString())==null?void 0:re.split(",")).map(Ge=>({url:Ge,extension:m(Ge)}));v.value=Ea,h.value=!1,g.value=!0;return}if((Se=ve==null?void 0:ve.toString())!=null&&Se.includes(".stl")||(K=ve==null?void 0:ve.toString())!=null&&K.includes(".STL")||(je=ve==null?void 0:ve.toString())!=null&&je.includes(".obj")||(De=ve==null?void 0:ve.toString())!=null&&De.includes(".mtl")){let we,Ea=[],Ge={};if(Array.isArray(ve)?we=ve:we=ve==null?void 0:ve.split(","),we==null||we.forEach(ol=>{ol.includes(".mtl")?Ea.push(ol):Ge.blob=Ge.blob?Ge.blob+","+ol:ol}),(Ea==null?void 0:Ea.length)>0&&(Ge.mtlBlobs=Ea),(Ba=(Ma=Object.values(Ge))==null?void 0:Ma[0])!=null&&Ba.includes("http:"))Je.push(Ge);else{const ol=new Blob([Ge.blob],{type:"application/octet-stream;charset=UTF-8"});let Sl=URL.createObjectURL(ol),Nl="";(Ua=ve==null?void 0:ve.split("/"))==null||Ua.forEach((Ra,al)=>{var ga;al===((ga=ve==null?void 0:ve.split("/"))==null?void 0:ga.length)-1&&(Nl=Ra)}),(Aa=Ge.blob)!=null&&Aa.includes(".stl")&&(Nl=(Nl==null?void 0:Nl.replaceAll(">",""))+".urdf"),A.value=[{name:Nl,blobUrl:Sl}],S.value=!0}}else{const we=I.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ea=await el.axios.get(ve,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{we.close()}),Ge=new Blob([Ea.data],{type:"application/octet-stream;charset=UTF-8"});let ol=URL.createObjectURL(Ge),Sl="";(Ae=ve==null?void 0:ve.split("/"))==null||Ae.forEach((Nl,Ra)=>{var al;Ra===((al=ve==null?void 0:ve.split("/"))==null?void 0:al.length)-1&&(Sl=Nl)}),A.value=[{name:Sl,blobUrl:ol}],S.value=!0}(Je==null?void 0:Je.length)>0&&L.setBlobUrls(Je)},ma=()=>{S.value=!1},na=ve=>{var Le,va,re,Se;const Je=(va=(Le=pl.safeClone(t.itemData))==null?void 0:Le.find(K=>(K==null?void 0:K.key)==="formContent"))==null?void 0:va.contents,Qe=pl.safeClone(ve.content);let Fe={};Qe&&((re=Object.values(Qe))==null?void 0:re.length)>0&&((Se=Object.values(Qe))==null||Se.forEach((K,je)=>{Fe[Je[je].key]=K}));const _a={content:Fe,index:t==null?void 0:t.index,buttonName:ve==null?void 0:ve.buttonName};s("change",_a)};a.computed(()=>"http://222.92.178.198:62001");const Ie=async ve=>{var Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl,Ra,al,ga,qe,rl;if(!ve)return;(Ba=(Ma=t==null?void 0:t.itemData)==null?void 0:Ma.find(da=>(da==null?void 0:da.key)==="parentFormPath"))==null||Ba.contents;let Je=ne.value;(Je==null?void 0:Je.length)>0&&(Je=Je==null?void 0:Je.map(da=>{var oa,aa,ca,W;let Xe=(oa=da==null?void 0:da.key)==null?void 0:oa.split("/");return(t==null?void 0:t.compName)===(Xe==null?void 0:Xe[0])&&(aa=c.value)!=null&&aa.find(la=>(la==null?void 0:la.prop)===(Xe==null?void 0:Xe[1]))&&(da.value=(W=(ca=c.value)==null?void 0:ca.find(la=>(la==null?void 0:la.prop)===(Xe==null?void 0:Xe[1])))==null?void 0:W.value),da}),Ee.setTableViewContents(Je));const Qe=pl.safeClone(t.itemData);let Fe=Qe==null?void 0:Qe.map(da=>{var Xe;return(da==null?void 0:da.key)==="formContent"&&((Xe=da.contents)==null||Xe.map((oa,aa)=>{var ca,W,la,ka,Ce,Be,Fa,me,fl,Ja,kl,Ha,tl,Za,cl,ul,Wl,ql,Pl;return oa.type=(W=(ca=c.value)==null?void 0:ca.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:W.type,oa.options=oa!=null&&oa.options?oa.options:((Ce=(ka=(la=oa==null?void 0:oa.key)==null?void 0:la.split("$"))==null?void 0:ka[1])==null?void 0:Ce.length)>0?(fl=(me=_u((Fa=(Be=oa==null?void 0:oa.key)==null?void 0:Be.split("$"))==null?void 0:Fa[1]))==null?void 0:me.split(","))==null?void 0:fl.map(Hl=>({label:Hl,value:Hl})):[],(Ja=oa==null?void 0:oa.key)!=null&&Ja.includes("$")&&(oa.key=(Ha=(kl=oa==null?void 0:oa.key)==null?void 0:kl.split("$"))==null?void 0:Ha[0]),oa.signature=(Za=(tl=c.value)==null?void 0:tl.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:Za.signature,oa.isLoginUser=(ul=(cl=c.value)==null?void 0:cl.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:ul.isLoginUser,oa.value=(Wl=Object.values(ve))==null?void 0:Wl[aa],oa.isFormColHidden=(Pl=(ql=c.value)==null?void 0:ql.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:Pl.isFormColHidden,oa})),da}),_a=c.value,Le=(Aa=(Ua=pl.safeClone(Fe))==null?void 0:Ua.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:Aa.contents;if(_a=_a==null?void 0:_a.map(da=>{var Xe,oa;return(da==null?void 0:da.type)==="Select"&&((Xe=da==null?void 0:da.allSelectionContents)==null?void 0:Xe.length)>0&&(da.contactValue=ve),da.value=(oa=Le==null?void 0:Le.find((aa,ca)=>((aa==null?void 0:aa.id)??ca)===(da==null?void 0:da.id)))==null?void 0:oa.value,da}),!ze.value){s("contentChange",{contents:Fe,index:t.index});return}let va="",re=(Ea=(we=(Ae=pl.safeClone(Fe))==null?void 0:Ae.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:we.contents)==null?void 0:Ea.find((da,Xe)=>{var oa,aa,ca;return(da==null?void 0:da.label)===be.value||Xe.toString()===((ca=(aa=(oa=be.value)==null?void 0:oa.split("t"))==null?void 0:aa[1])==null?void 0:ca.toString())}),Se=(Ge=re==null?void 0:re.optionUrl)==null?void 0:Ge.menuSelect,K=!0;if((Nl=(Sl=(ol=pl.safeClone(Fe))==null?void 0:ol.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:Sl.contents)==null||Nl.forEach(da=>{var Xe,oa,aa,ca,W,la;K&&((aa=(oa=(Xe=da==null?void 0:da.optionUrl)==null?void 0:Xe.groupSelect)==null?void 0:oa[1])!=null&&aa.includes("["))&&(va=(W=(ca=da==null?void 0:da.optionUrl)==null?void 0:ca.groupSelect)==null?void 0:W[1],JSON.stringify(Se)===JSON.stringify((la=da==null?void 0:da.optionUrl)==null?void 0:la.menuSelect)&&(K=!1))}),(Ra=re==null?void 0:re.optionUrl)!=null&&Ra.menuSelect&&ze.value){let da=await fi(re),Xe,oa=(al=re==null?void 0:re.optionUrl)==null?void 0:al.menuSelect;if(da==null||da.forEach(aa=>{var ca,W,la,ka,Ce,Be,Fa,me,fl,Ja;va===((W=(ca=re==null?void 0:re.optionUrl)==null?void 0:ca.groupSelect)==null?void 0:W[1])&&((Ce=(ka=(la=re==null?void 0:re.optionUrl)==null?void 0:la.groupSelect)==null?void 0:ka[1])!=null&&Ce.includes("["))&&((Ja=pl.safeClone(aa))==null?void 0:Ja[(fl=(me=(Fa=(Be=re==null?void 0:re.optionUrl)==null?void 0:Be.groupSelect)==null?void 0:Fa[1])==null?void 0:me.replaceAll("[",""))==null?void 0:fl.replaceAll("]","")])===(re==null?void 0:re.value)&&(Xe=aa)}),Xe){let aa=pl.safeClone(_a);aa=aa==null?void 0:aa.map(W=>{var la,ka,Ce,Be,Fa,me,fl,Ja,kl,Ha,tl;return(Xe!=null&&Xe[W==null?void 0:W.label]||Xe!=null&&Xe[(Be=(Ce=(ka=(la=W==null?void 0:W.optionUrl)==null?void 0:la.groupSelect)==null?void 0:ka[1])==null?void 0:Ce.replaceAll("[",""))==null?void 0:Be.replaceAll("]","")])&&((fl=(me=(Fa=W==null?void 0:W.optionUrl)==null?void 0:Fa.groupSelect)==null?void 0:me[1])!=null&&fl.includes("["))&&oa!=null&&oa.every(Za=>{var cl,ul;return(ul=(cl=W==null?void 0:W.optionUrl)==null?void 0:cl.menuSelect)==null?void 0:ul.includes(Za)})&&(W.value=(Xe==null?void 0:Xe[W==null?void 0:W.label])||(Xe==null?void 0:Xe[(tl=(Ha=(kl=(Ja=W==null?void 0:W.optionUrl)==null?void 0:Ja.groupSelect)==null?void 0:kl[1])==null?void 0:Ha.replaceAll("[",""))==null?void 0:tl.replaceAll("]","")]),Array.isArray(W.value)&&W.value.every(Za=>(Za==null?void 0:Za.url)&&(Za==null?void 0:Za.name))&&(W.type="Upload")),W}),aa=aa==null?void 0:aa.map(W=>{var la,ka,Ce;return(la=W==null?void 0:W.optionUrl)!=null&&la.oldMenuSelect&&(W.optionUrl.menuSelect=(Ce=(ka=pl.safeClone(W))==null?void 0:ka.optionUrl)==null?void 0:Ce.oldMenuSelect),W}),c.value=pl.safeClone(aa);let ca=pl.safeClone(aa);ca=ca==null?void 0:ca.map(W=>{var la,ka,Ce,Be,Fa,me;return(ka=(la=W==null?void 0:W.optionUrl)==null?void 0:la.menuSelect)!=null&&ka.some(fl=>fl==null?void 0:fl.includes("["))&&(W.optionUrl.oldMenuSelect=(Be=(Ce=pl.safeClone(W))==null?void 0:Ce.optionUrl)==null?void 0:Be.menuSelect,W.optionUrl.menuSelect=(me=(Fa=W==null?void 0:W.optionUrl)==null?void 0:Fa.menuSelect)==null?void 0:me.map(fl=>{var Ja,kl,Ha,tl;if(fl!=null&&fl.includes("[")){let Za=(kl=(Ja=fl==null?void 0:fl.replaceAll("[","").replaceAll("]",""))==null?void 0:Ja.split(":"))==null?void 0:kl[1];fl=(tl=(Ha=pl.safeClone(aa))==null?void 0:Ha.find(cl=>(cl==null?void 0:cl.label)===Za))==null?void 0:tl.value}return fl})),W}),c.value=ca}else c.value=_a;Fe=Fe==null?void 0:Fe.map(aa=>{var ca;return(aa==null?void 0:aa.key)==="formContent"&&(aa.contents=(ca=aa.contents)==null?void 0:ca.map(W=>{var la,ka,Ce,Be;return W.value=((ka=(la=c.value)==null?void 0:la.find(Fa=>(Fa==null?void 0:Fa.label)===(W==null?void 0:W.key)))==null?void 0:ka.value)??(W==null?void 0:W.value),W.type=((Be=(Ce=c.value)==null?void 0:Ce.find(Fa=>(Fa==null?void 0:Fa.prop)===(W==null?void 0:W.key)))==null?void 0:Be.type)??(W==null?void 0:W.type),W})),aa})}ze.value=!1,s("contentChange",{contents:Fe,index:t.index});let je=[],De=[];if((qe=pl.safeClone((ga=Fe==null?void 0:Fe.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:ga.contents))==null||qe.forEach(da=>{var Xe;Array.isArray(da==null?void 0:da.value)&&((Xe=da==null?void 0:da.value)!=null&&Xe.find(oa=>{var aa;return(aa=oa==null?void 0:oa.url)==null?void 0:aa.includes(".obj")}))&&(De=da==null?void 0:da.value)}),(De==null?void 0:De.length)>0){const da=(rl=pl.safeClone(De))==null?void 0:rl.filter(Xe=>{var oa;return(oa=Xe==null?void 0:Xe.url)==null?void 0:oa.includes(".obj")});da==null||da.forEach(Xe=>{var aa,ca,W,la;const oa=(aa=De==null?void 0:De.filter(ka=>{var Ce;return(ka==null?void 0:ka.name)===(Xe==null?void 0:Xe.name)&&((Ce=ka==null?void 0:ka.url)==null?void 0:Ce.includes(".mtl"))}))==null?void 0:aa.map(ka=>ka==null?void 0:ka.url);je.push({objUrl:Xe==null?void 0:Xe.url,mtlUrls:((ca=De==null?void 0:De.filter(ka=>{var Ce;return(ka==null?void 0:ka.name)===(Xe==null?void 0:Xe.name)&&((Ce=ka==null?void 0:ka.url)==null?void 0:Ce.includes(".mtl"))}))==null?void 0:ca.length)===1?(la=(W=De==null?void 0:De.filter(ka=>{var Ce;return(ka==null?void 0:ka.name)===(Xe==null?void 0:Xe.name)&&((Ce=ka==null?void 0:ka.url)==null?void 0:Ce.includes(".mtl"))}))==null?void 0:W[0])==null?void 0:la.url:oa})}),L.setObjUrl(je)}},_e=(ve,Je,Qe)=>{let Fe="";const _a=Je==null?void 0:Je.map(Le=>{var va;return(va=Le==null?void 0:Le.value)==null?void 0:va.pageData});return _a==null||_a.forEach(Le=>{var va;(Le==null?void 0:Le.name)===(ve==null?void 0:ve[0])&&((va=Le==null?void 0:Le.compData)==null||va.forEach(re=>{var Se;(re==null?void 0:re.key)==="formContent"&&((Se=re==null?void 0:re.contents)==null||Se.forEach(K=>{var je;(K==null?void 0:K.prop)===(ve==null?void 0:ve[1])&&(Fe=(K==null?void 0:K.value)===""?sa.judgeContents((je=pl.safeClone(K))==null?void 0:je.optionUrl,Qe):K==null?void 0:K.value)}))}))}),Fe},Ca=(ve,Je,Qe,Fe)=>{var re,Se;let _a="",Le="";(re=pl.safeClone(Je))==null||re.forEach((K,je)=>{K!=null&&K.includes("[")?Le=Le+Ne.value+ve[je]:Le=Le===""?Le+K:Le+"/"+K});let va=(Se=Fe[Le])==null?void 0:Se.map(K=>{var je;return(je=K==null?void 0:K.value)==null?void 0:je.pageData});return va==null||va.forEach(K=>{var je;(K==null?void 0:K.name)===(Qe==null?void 0:Qe[0])&&((je=K==null?void 0:K.compData)==null||je.forEach(De=>{var Ma;(De==null?void 0:De.key)==="formContent"&&((Ma=De==null?void 0:De.contents)==null||Ma.forEach(Ba=>{(Ba==null?void 0:Ba.prop)===(Qe==null?void 0:Qe[1])&&(_a=Ba==null?void 0:Ba.value)}))}))}),_a};return a.watch(()=>t.itemData,async()=>{var je,De,Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl,Ra,al,ga,qe,rl,da,Xe,oa;const ve=(je=t.itemData)==null?void 0:je.find(aa=>(aa==null?void 0:aa.key)==="formContent"),Je=(De=pl.safeClone(t.itemData))==null?void 0:De.find(aa=>(aa==null?void 0:aa.key)==="formButton"),Qe=(Ma=pl.safeClone(t.itemData))==null?void 0:Ma.find(aa=>(aa==null?void 0:aa.key)==="formFlex"),Fe=(Ba=pl.safeClone(t.itemData))==null?void 0:Ba.find(aa=>(aa==null?void 0:aa.key)==="formWrap"),_a=(Ua=pl.safeClone(t.itemData))==null?void 0:Ua.find(aa=>(aa==null?void 0:aa.key)==="enableWrap"),Le=(Aa=pl.safeClone(t.itemData))==null?void 0:Aa.find(aa=>(aa==null?void 0:aa.key)==="textSize"),va=(Ae=pl.safeClone(t.itemData))==null?void 0:Ae.find(aa=>(aa==null?void 0:aa.key)==="textRGBA");(Fe==null?void 0:Fe.contents)==="纵向"?_.value=!1:_.value=!0;const re=Number(Le==null?void 0:Le.contents);x.value=Number.isNaN(re)?void 0:re,k.value=va==null?void 0:va.contents;const Se=_a==null?void 0:_a.contents;if(Se===void 0?T.value=at.BLOCK:typeof Se=="boolean"?T.value=Se?at.ORDINARY:at.BLOCK:T.value=Se,$.value=typeof(Qe==null?void 0:Qe.contents)!="boolean"?!(!(Qe!=null&&Qe.contents)===""||((we=Qe==null?void 0:Qe.contents)==null?void 0:we.toUpperCase())==="VERTICAL"):Qe==null?void 0:Qe.contents,((Ea=ve==null?void 0:ve.contents)==null?void 0:Ea.length)>0&&Array.isArray(ve==null?void 0:ve.contents)){let aa=t.allMapContents;const ca=(ol=(Ge=pl.safeClone(ve))==null?void 0:Ge.contents)==null?void 0:ol.map((me,fl)=>{var kr,wr,Sr,un,Jr,dn,Xr,qr,pn,tn,Dr,Zr,Br;let Ja=(me==null?void 0:me.label)??(me==null?void 0:me.key)??"";me==null||me.type;let kl=(me==null?void 0:me.options)??[];if((kr=me==null?void 0:me.key)!=null&&kr.includes("$")&&(Ja=(wr=pl.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:wr[0],((un=(Sr=pl.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:Sr[1])==null?void 0:un.length)>0)){const[Il,Wr]=(dn=(Jr=pl.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:Jr[1])==null?void 0:dn.split(/[()]/);(Xr=sa.FormType.find(Nr=>(Nr==null?void 0:Nr.key)===Il))==null||Xr.value,((qr=Wr==null?void 0:Wr.split(","))==null?void 0:qr.length)>0&&(kl=(pn=Wr==null?void 0:Wr.split(","))==null?void 0:pn.map(Nr=>({label:Nr,value:Nr})))}let Ha=me==null?void 0:me.options;((tn=me==null?void 0:me.optionUrl)==null?void 0:tn.selectRelateType)==="自定义绑定"&&(Ha=(Zr=(Dr=me==null?void 0:me.optionUrl)==null?void 0:Dr.defaultSelect)==null?void 0:Zr.map(Il=>({label:Il,value:Il})));let tl=(me==null?void 0:me.menuPath)??[],Za=(me==null?void 0:me.groups)??[],cl=(me==null?void 0:me.columns)??[],ul=!1,Wl=(me==null?void 0:me.isFormColHidden)??!1,ql="",Pl=me!=null&&me.value?me.value:(Ha==null?void 0:Ha.length)>0?(Br=Ha==null?void 0:Ha[0])==null?void 0:Br.value:(me==null?void 0:me.value)??"",Hl=!1,gr="Input";return((Ha==null?void 0:Ha.length)>0||(tl==null?void 0:tl.length)>0)&&(gr="Select"),(Array.isArray(ql)&&(ql!=null&&ql.every(Il=>(Il==null?void 0:Il.name)&&(Il==null?void 0:Il.url)))||Array.isArray(Pl)&&(Pl!=null&&Pl.every(Il=>(Il==null?void 0:Il.name)&&(Il==null?void 0:Il.url))))&&(gr="upload"),me!=null&&me.isMainUrl&&(gr="Url"),{label:Ja??"",name:Ja??"t"+fl,prop:Ja??pl.safeClone(me==null?void 0:me.key),type:(me==null?void 0:me.type)??gr,value:(me==null?void 0:me.type)==="Date"&&Pl===""?new Date:Pl,id:(me==null?void 0:me.id)??fl,contents:(Ha==null?void 0:Ha.length)>0?Ha:kl??[],width:(me==null?void 0:me.width)??1,isLoginUser:ul,config:me==null?void 0:me.config,optionUrl:(me==null?void 0:me.optionUrl)??me,isFormColHidden:Wl,signature:Hl,isMain:me==null?void 0:me.isMain,required:(me==null?void 0:me.required)??!1,isMainUrl:me==null?void 0:me.isMainUrl,operable:(me==null?void 0:me.operable)??!1,disabled:(me==null?void 0:me.disabled)??!1,isSync:me==null?void 0:me.isSync,menus:tl,groups:Za,words:cl,allSelectionContents:me==null?void 0:me.allContents,filterContent:me==null?void 0:me.filterContents}}),W=ca==null?void 0:ca.map(me=>me==null?void 0:me.value);let la="";W==null||W.forEach(me=>{me!==""&&me!==void 0&&(la=la===""?me:la+"/"+me)}),b.setSelectArray(W),b.setSelectString(la);let ka=(Sl=pl.safeClone(ca))==null?void 0:Sl.map(me=>(me!=null&&me.value&&sa.IsJson(me==null?void 0:me.value)&&Array.isArray(JSON.parse(me==null?void 0:me.value))&&(me.value=JSON.parse(me.value)),me)),Ce={};ka==null||ka.forEach(me=>{Ce[me.label]=me==null?void 0:me.value}),ka=ka==null?void 0:ka.map(me=>{var fl,Ja,kl,Ha,tl,Za,cl,ul,Wl;if((me==null?void 0:me.type)==="Select"&&((fl=me==null?void 0:me.allSelectionContents)==null?void 0:fl.length)>0&&(me.contactValue=Ce),(kl=(Ja=me==null?void 0:me.optionUrl)==null?void 0:Ja.menuSelect)!=null&&kl.some(ql=>ql==null?void 0:ql.includes("["))){let ql="";me.optionUrl.oldMenuSelect=(tl=(Ha=pl.safeClone(me))==null?void 0:Ha.optionUrl)==null?void 0:tl.menuSelect,me.optionUrl.menuSelect=(cl=(Za=me==null?void 0:me.optionUrl)==null?void 0:Za.menuSelect)==null?void 0:cl.map(Pl=>{var Hl,gr,rr,kr,wr,Sr;if(Pl!=null&&Pl.includes("[")){let un=(gr=(Hl=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Hl.split(":"))==null?void 0:gr[1];ql=_e((rr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:rr.split(":"),aa==null?void 0:aa[ye.value],aa),Pl=((wr=(kr=pl.safeClone(ka))==null?void 0:kr.find(Jr=>(Jr==null?void 0:Jr.label)===un))==null?void 0:wr.value)||_e((Sr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Sr.split(":"),aa==null?void 0:aa[ye.value],aa)}return Pl}),ql!==""&&me.value===""&&(me.value=Ca(me.optionUrl.menuSelect,me.optionUrl.oldMenuSelect,(ul=me==null?void 0:me.optionUrl)==null?void 0:ul.groupSelect,aa),Array.isArray(me.value)&&((Wl=me.value)!=null&&Wl.every(Pl=>Pl==null?void 0:Pl.url))&&(me.type="UPLOAD"))}return me}),c.value=ka,D.value=((Nl=c.value)==null?void 0:Nl.every(me=>me==null?void 0:me.disabled))||Ke.value===ye.value,te.value=(Ra=c.value)==null?void 0:Ra.every(me=>me==null?void 0:me.operable),ee.value=(al=c.value)==null?void 0:al.map(me=>me==null?void 0:me.label);let Be=[],Fa=[];if((ga=pl.safeClone(c.value))==null||ga.forEach(me=>{var fl;Array.isArray(me==null?void 0:me.value)&&((fl=me==null?void 0:me.value)!=null&&fl.find(Ja=>{var kl;return(kl=Ja==null?void 0:Ja.url)==null?void 0:kl.includes(".obj")}))&&(Fa=me==null?void 0:me.value)}),(Fa==null?void 0:Fa.length)>0){const me=(qe=pl.safeClone(Fa))==null?void 0:qe.filter(fl=>{var Ja;return(Ja=fl==null?void 0:fl.url)==null?void 0:Ja.includes(".obj")});me==null||me.forEach(fl=>{var kl,Ha,tl,Za;const Ja=(kl=Fa==null?void 0:Fa.filter(cl=>{var ul;return(cl==null?void 0:cl.name)===(fl==null?void 0:fl.name)&&((ul=cl==null?void 0:cl.url)==null?void 0:ul.includes(".mtl"))}))==null?void 0:kl.map(cl=>cl==null?void 0:cl.url);Be.push({objUrl:fl==null?void 0:fl.url,mtlUrls:((Ha=Fa==null?void 0:Fa.filter(cl=>{var ul;return(cl==null?void 0:cl.name)===(fl==null?void 0:fl.name)&&((ul=cl==null?void 0:cl.url)==null?void 0:ul.includes(".mtl"))}))==null?void 0:Ha.length)===1?(Za=(tl=Fa==null?void 0:Fa.filter(cl=>{var ul;return(cl==null?void 0:cl.name)===(fl==null?void 0:fl.name)&&((ul=cl==null?void 0:cl.url)==null?void 0:ul.includes(".mtl"))}))==null?void 0:tl[0])==null?void 0:Za.url:Ja})}),L.setObjUrl(Be)}(rl=pl.safeClone(c.value))==null||rl.forEach(me=>{var fl,Ja,kl,Ha,tl,Za,cl,ul,Wl,ql,Pl,Hl,gr;if((Ja=(fl=me==null?void 0:me.value)==null?void 0:fl.toString())!=null&&Ja.includes(".stl")||(Ha=(kl=me==null?void 0:me.value)==null?void 0:kl.toString())!=null&&Ha.includes(".STL")||(Za=(tl=me==null?void 0:me.value)==null?void 0:tl.toString())!=null&&Za.includes(".obj")||(ul=(cl=me==null?void 0:me.value)==null?void 0:cl.toString())!=null&&ul.includes(".mtl")||(ql=(Wl=me==null?void 0:me.value)==null?void 0:Wl.toString())!=null&&ql.includes(".urdf")){let rr={},kr=[],wr;Array.isArray(me==null?void 0:me.value)?wr=me==null?void 0:me.value:wr=(Pl=me==null?void 0:me.value)==null?void 0:Pl.split(","),wr==null||wr.forEach(Sr=>{Sr.includes(".mtl")?kr.push(Sr):rr.blob=rr.blob==="undefined"?Sr:rr.blob+","+Sr}),(kr==null?void 0:kr.length)>0&&(rr.mtlBlobs=kr),(gr=(Hl=Object.values(rr))==null?void 0:Hl[0])!=null&&gr.includes("http:")}})}else c.value=[];let K=ne.value;if((K==null?void 0:K.length)>0&&(K=K==null?void 0:K.map(aa=>{var W,la,ka,Ce;let ca=(W=aa==null?void 0:aa.key)==null?void 0:W.split("/");return(t==null?void 0:t.compName)===(ca==null?void 0:ca[0])&&(la=c.value)!=null&&la.find(Be=>(Be==null?void 0:Be.prop)===(ca==null?void 0:ca[1]))&&(aa.value=(Ce=(ka=c.value)==null?void 0:ka.find(Be=>(Be==null?void 0:Be.prop)===(ca==null?void 0:ca[1])))==null?void 0:Ce.value),aa}),Ee.setTableViewContents(K)),t!=null&&t.formRules)u.value=t==null?void 0:t.formRules;else{let aa={};(da=pl.safeClone(c).value)==null||da.forEach(ca=>{((ca==null?void 0:ca.isMain)===!0||(ca==null?void 0:ca.required)===!0)&&(aa[(ca==null?void 0:ca.prop)??(ca==null?void 0:ca.name)]=[{required:!0,message:`${(ca==null?void 0:ca.label)||(ca==null?void 0:ca.prop)||(ca==null?void 0:ca.name)}不能为空`}])}),u.value=aa}if(((Xe=Je==null?void 0:Je.contents)==null?void 0:Xe.length)>0){const aa=[];(oa=Je==null?void 0:Je.contents)==null||oa.forEach((ca,W)=>{(ca==null?void 0:ca.label)!==""&&aa.push({label:(ca==null?void 0:ca.label)??"",id:(ca==null?void 0:ca.id)??W,type:(ca==null?void 0:ca.type)??"",background:ca==null?void 0:ca.background})}),j.value=aa}else j.value=[]},{deep:!0,immediate:!0}),a.watch(()=>Ke.value,ve=>{D.value=ve===ye.value},{immediate:!0}),(ve,Je)=>{var re,Se;const Qe=a.resolveComponent("svg-icon"),Fe=a.resolveComponent("el-switch"),_a=a.resolveComponent("el-checkbox"),Le=a.resolveComponent("el-popover"),va=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",m3,[T.value===a.unref(at).TEXT?(a.openBlock(),a.createBlock(mc,{key:0,itemData:l.itemData,compName:l.compName,fields:c.value,textSize:x.value,textColor:k.value,disabled:D.value||ja()},null,8,["itemData","compName","fields","textSize","textColor","disabled"])):T.value===a.unref(at).BLOCK?(a.openBlock(),a.createBlock(Qp,{key:1,items:(Se=(re=c.value)==null?void 0:re.filter(K=>!(K!=null&&K.isFormColHidden)))==null?void 0:Se.map(K=>({label:K==null?void 0:K.label,value:K==null?void 0:K.value,width:(K==null?void 0:K.width)??1,field:K})),textSize:x.value,textColor:k.value,disabled:D.value||ja()},null,8,["items","textSize","textColor","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":T.value===a.unref(at).ORDINARY})},[a.createVNode(pl.ssForm,{rowContents:c.value,formRules:u.value,buttonValue:j.value,isRowFlex:!1,isEnableWrap:!0,textSize:x.value,textColor:k.value,onOnButtonClick:na,onChange:Ie,formDisabled:D.value||ja(),formLabelsOperable:te.value,isButtonRow:_.value,onPreview:ce,onBlurChange:ie,onHandleColEditChange:P,onHandleColTypeChange:F,onRouteUrl:Ye,onClickTrigger:Re},{operateCol:a.withCtx(({renderColumns:K,formDisabled:je,formLabelsOperable:De})=>[a.createVNode(Le,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:He},{reference:a.withCtx(()=>[a.createElementVNode("span",y3,[a.createVNode(Qe,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",g3,[Je[1]||(Je[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(Fe,{"model-value":je,"active-text":"禁用","inactive-text":"",onChange:Pe,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(Fe,{"model-value":De,"active-text":"编辑所有标签","inactive-text":"",onChange:xa},null,8,["model-value"]),Je[2]||(Je[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(va,{modelValue:ee.value,"onUpdate:modelValue":Je[0]||(Je[0]=Ma=>ee.value=Ma),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:Na,onChange:Te},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K,Ma=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Ma.label},[a.createVNode(_a,{value:Ma.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(Ma.label),1)]),_:2},1032,["value"]),a.createVNode(Le,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(Qe,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Ba;return[a.createElementVNode("div",b3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ba=Object.keys(Ma))==null?void 0:Ba.filter(Ua=>{var Aa;return(Aa=ea.value)==null?void 0:Aa.find(Ae=>(Ae==null?void 0:Ae.value)===Ua)}),Ua=>{var Aa,Ae;return a.openBlock(),a.createElementBlock("div",{key:Ua},[a.createVNode(pl._sfc_main$1,{value:Ma==null?void 0:Ma[Ua],"active-text":(Ae=(Aa=ea.value)==null?void 0:Aa.find(we=>(we==null?void 0:we.value)===Ua))==null?void 0:Ae.label,inactiveText:"",onChange:we=>J(we,Ua,Ma)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",k3,[a.createVNode(Qe,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","formDisabled","formLabelsOperable","isButtonRow"])],2)),S.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:3,fileDataList:A.value,onDestroy:ma},null,8,["fileDataList"])):a.createCommentVNode("",!0),g.value?(a.openBlock(),a.createBlock(vr.ssDialog,{key:4,visible:g.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(go.ThreeViewerHost,{files:v.value,onGetAnimationData:ve.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},fs=Ul._export_sfc(x3,[["__scopeId","data-v-c4708f41"]]),Bo=a.ref(0),yc=l=>{var r;return!l||(l==null?void 0:l.length)===0?[]:(r=I.cloneDeep(l))==null?void 0:r.map(t=>(Bo.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??Bo.value,children:yc(t==null?void 0:t.children)},t))},_3=l=>{var n;return(n=I.cloneDeep(l))==null?void 0:n.map(t=>(Bo.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??Bo.value,children:yc(t==null?void 0:t.children)},t))},gc=(l,r)=>{var n;return l!=null&&l.find(t=>(t==null?void 0:t.id)===r)?(n=I.cloneDeep(l))==null?void 0:n.filter(s=>(s==null?void 0:s.id)!==r):(l=l==null?void 0:l.map(t=>(t.children=gc(t==null?void 0:t.children,r),t)),l)},bc=(l,r)=>{var n;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(r==null?void 0:r.id))?(n=I.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s=r),s)):(l=l==null?void 0:l.map(t=>(t.children=bc(t==null?void 0:t.children,r),t)),l)},kc=(l,r)=>{var n;return l!=null&&l.find(t=>{var s;return(t==null?void 0:t.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)})?(n=I.cloneDeep(l))==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.id)===((c=r==null?void 0:r.contents)==null?void 0:c.id)&&(s=r==null?void 0:r.contents),s}):(l=l==null?void 0:l.map(t=>(t.children=kc(t==null?void 0:t.children,r),t)),l)},xc=(l,r)=>{var n;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(r==null?void 0:r.id))?(n=I.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(r.contents)),s)):(l=l==null?void 0:l.map(t=>(t.children=xc(t==null?void 0:t.children,r),t)),l)},er=[{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"}],w3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],C3=[{label:"新增",value:"add"}],zn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:C3},{key:"background",label:"按钮背景色",type:"Color"}],Mn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:w3},{key:"textColor",label:"按钮颜色",type:"Color"}],S3={class:"table-header-child"},E3={class:"table-header-child-main"},D3={class:"table-header-child-content"},B3={class:"table-header-child-content-item"},N3={class:"fix-button"},T3={key:0},A3={class:"form-content"},z3={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(!1),c=a.ref(""),g=sa.useTableComp(I.pinia),{tableIndex:h}=I.storeToRefs(g);a.ref(0);const v=a.ref(""),m=a.ref([]),u=a.ref([]),_=b=>{var T;s.value=!0;let L=[];er==null||er.forEach(x=>{let k=I.cloneDeep(h.value)+1;g.setTableIndex(k),L.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:b[x.key],id:h.value,contents:x==null?void 0:x.options})}),b!=null&&b.children&&((T=b==null?void 0:b.children)==null?void 0:T.length)>0&&L.push({children:b==null?void 0:b.children,isFormColHidden:!0}),v.value=b==null?void 0:b.id,m.value=L,u.value=L},S=b=>{t("fixChange",I.cloneDeep(b))},z=b=>{t("deleteChange",I.cloneDeep(b))},w=b=>{s.value=!0;let L=[];er==null||er.forEach(T=>{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),L.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),c.value=b==null?void 0:b.id,m.value=L,u.value=L},j=b=>{let L=I.cloneDeep(u.value);L=L==null?void 0:L.map(T=>(T.children||(T.value=b==null?void 0:b[T.name]),T)),u.value=L},A=()=>{var L,T;m.value=u.value;let b={};if(v.value!=="")b.id=v.value,(L=m.value)==null||L.forEach(x=>{const k=er==null?void 0:er.find($=>($==null?void 0:$.label)===(x==null?void 0:x.label));k?b[k.key]=x.value:x!=null&&x.children&&x.children.length>0&&(b.children=x.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"fix"});else{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),b.id="id"+h.value,(T=m.value)==null||T.forEach(k=>{const $=er==null?void 0:er.find(U=>(U==null?void 0:U.label)===(k==null?void 0:k.label));$?b[$.key]=k.value:k!=null&&k.children&&k.children.length>0&&(b.children=k.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"add"})}v.value="",m.value=[],u.value=[]},N=()=>{s.value=!1,v.value="",c.value="",m.value=[],u.value=[]},Y=b=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",b),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(b,L)=>{const T=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",S3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(x,k)=>(a.openBlock(),a.createElementBlock("div",E3,[a.createElementVNode("div",D3,[a.createElementVNode("div",B3,a.toDisplayString(x.label),1),a.createElementVNode("div",N3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>w(x)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>_(x)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>Y(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(a.openBlock(),a.createElementBlock("div",T3,[a.createVNode(_c,{tableChildContents:x==null?void 0:x.children,onDeleteChange:z,onFixChange:S},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(vr.ssDialog,{visible:s.value,onBeforeDestroy:N,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",A3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:j},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:N,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:A},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},M3=Ul._export_sfc(z3,[["__scopeId","data-v-e0fef72d"]]),O3={class:"table-header-child"},I3={class:"table-header-child-main"},L3={class:"table-header-child-content"},V3={class:"table-header-child-content-item"},R3={class:"fix-button"},$3={key:0},P3={class:"form-content"},F3={class:"dialog-footer"},j3={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(!1),c=a.ref(""),g=sa.useTableComp(I.pinia),{tableIndex:h}=I.storeToRefs(g),v=a.ref(""),m=a.ref([]),u=a.ref([]),_=b=>{t("fixChange",I.cloneDeep(b))},S=b=>{var T;s.value=!0;let L=[];er==null||er.forEach(x=>{let k=I.cloneDeep(h.value)+1;g.setTableIndex(k),L.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:b[x.key],id:h.value,contents:x==null?void 0:x.options})}),b!=null&&b.children&&((T=b==null?void 0:b.children)==null?void 0:T.length)>0&&L.push({children:b==null?void 0:b.children,isFormColHidden:!0}),v.value=b==null?void 0:b.id,m.value=L,u.value=L},z=b=>{s.value=!0;let L=[];er==null||er.forEach(T=>{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),L.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),c.value=b==null?void 0:b.id,m.value=L,u.value=L},w=b=>{let L=I.cloneDeep(u.value);L=L==null?void 0:L.map(T=>(T.children||(T.value=b==null?void 0:b[T.name]),T)),u.value=L},j=()=>{var L,T;m.value=u.value;let b={};if(v.value!=="")b.id=v.value,(L=m.value)==null||L.forEach(x=>{const k=er==null?void 0:er.find($=>($==null?void 0:$.label)===(x==null?void 0:x.label));k?b[k.key]=x.value:x!=null&&x.children&&x.children.length>0&&(b.children=x.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"fix"});else{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),b.id="idChild"+h.value,(T=m.value)==null||T.forEach(k=>{const $=er==null?void 0:er.find(U=>(U==null?void 0:U.label)===(k==null?void 0:k.label));$?b[$.key]=k.value:k!=null&&k.children&&k.children.length>0&&(b.children=k.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"add"})}v.value="",m.value=[],u.value=[]},A=()=>{s.value=!1,v.value="",c.value="",m.value=[],u.value=[]},N=b=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",b),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Y=b=>{t("deleteChange",b)};return(b,L)=>{const T=a.resolveComponent("svg-icon"),x=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",O3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(k,$)=>(a.openBlock(),a.createElementBlock("div",I3,[a.createElementVNode("div",L3,[a.createElementVNode("div",V3,a.toDisplayString(k.label),1),a.createElementVNode("div",R3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>z(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>S(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>N(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",$3,[a.createVNode(M3,{tableChildContents:k==null?void 0:k.children,onDeleteChange:Y,onFixChange:_},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(vr.ssDialog,{visible:s.value,onBeforeDestroy:A,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",P3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",F3,[a.createVNode(x,{onClick:A,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>L[0]||(L[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(x,{class:"ok-button button",onClick:j,id:"themeButton"},{default:a.withCtx(()=>L[1]||(L[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},_c=Ul._export_sfc(j3,[["__scopeId","data-v-ebd68fa1"]]),H3={class:"table-operate-content"},U3={class:"table-operate-item"},q3={class:"operate-title"},W3={class:"operate-content"},K3={class:"fix-content"},Y3={class:"fix-content-label"},G3={class:"fix-button"},J3={key:0},X3={class:"operate-title"},Z3={class:"operate-content"},Q3={class:"fix-content"},e1={class:"fix-content-label"},a1={class:"fix-button"},l1={class:"operate-title"},r1={class:"operate-content"},n1={class:"fix-content"},o1={class:"fix-content-label"},i1={class:"fix-button"},s1={class:"operate-title"},c1={class:"operate-content"},u1={class:"fix-content"},d1={class:"fix-content-label"},p1={class:"fix-button"},f1={class:"operate-content"},h1={style:{display:"flex","justify-content":"space-between"}},v1={class:"form-content"},m1={class:"dialog-footer"},y1={class:"form-content"},g1={class:"dialog-footer"},b1={class:"form-content"},k1={class:"dialog-footer"},x1={class:"form-content"},_1={class:"dialog-footer"},w1={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]),c=a.ref(!1),g=a.ref(!1),h=a.ref([]),v=a.ref(!1),m=a.ref([]),u=a.ref(!1),_=a.ref([]),S=a.ref(""),z=a.ref(""),w=a.ref([]),j=a.ref([]),A=a.ref([]),N=a.ref([]),Y=a.ref(!1),b=a.ref([]),L=a.ref([]),T=a.ref(0),x=a.ref([]),k=a.ref([]),$=a.ref([]),U=()=>{Y.value=!0;let P=[];zn==null||zn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:(F==null?void 0:F.key)==="background"?"var(--ssComponent-primary-color)":"",id:T.value,contents:F==null?void 0:F.options})}),b.value=P,L.value=P},X=()=>{var F,J,ie;g.value=!0;let P=[];(ie=(J=(F=sa.FormContent)==null?void 0:F.find(ce=>(ce==null?void 0:ce.key)==="Input"))==null?void 0:J.value)==null||ie.forEach(ce=>{T.value++,P.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:(ce==null?void 0:ce.label)==="类型"?"Input":"",id:T.value,contents:ce==null?void 0:ce.options})}),x.value=P,k.value=P},be=P=>{P||(x.value=k.value)},ze=async P=>{var F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe;if((P==null?void 0:P.类型)!==((J=(F=k.value)==null?void 0:F.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:J.value)){let Fe=[],_a=await((ma=(ce=(ie=sa.FormContent)==null?void 0:ie.find(Le=>(Le==null?void 0:Le.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:ce.value)==null?void 0:ma.value)?await((ve=(Ca=(_e=sa.FormContent)==null?void 0:_e.find(Le=>(Le==null?void 0:Le.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ca.value)==null?void 0:ve.value):(Ie=(na=sa.FormContent)==null?void 0:na.find(Le=>(Le==null?void 0:Le.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ie.value;if(_a==null||_a.forEach(Le=>{T.value++,Fe.push({label:Le==null?void 0:Le.label,name:(Le==null?void 0:Le.name)||(Le==null?void 0:Le.label),type:Le.type,value:Le!=null&&Le.属性名?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):(P==null?void 0:P[Le.label])??"",id:T.value,contents:Le==null?void 0:Le.options,prop:(Le==null?void 0:Le.prop)||(Le==null?void 0:Le.name)||(Le==null?void 0:Le.label)})}),P!=null&&P.菜单选项&&((Je=P==null?void 0:P.菜单选项)==null?void 0:Je.length)>0){const Le=await sa.menuToContentType(P==null?void 0:P.菜单选项);Fe=Fe==null?void 0:Fe.map(va=>((va==null?void 0:va.name)==="组信息选项"&&(va.contents=Le),va))}k.value=await sa.selectToBase(I.cloneDeep(Fe)),x.value=await sa.selectToBase(I.cloneDeep(Fe))}else{let Fe=I.cloneDeep(x.value);if(Fe=Fe==null?void 0:Fe.map(_a=>(_a.value=P==null?void 0:P[_a.name],_a)),P!=null&&P.菜单选项&&((Qe=P==null?void 0:P.菜单选项)==null?void 0:Qe.length)>0){const _a=await sa.menuToContentType(P==null?void 0:P.菜单选项);Fe=Fe==null?void 0:Fe.map(Le=>((Le==null?void 0:Le.name)==="组信息选项"&&(Le.contents=_a),Le))}Fe=sa.formToOptionsContents(Fe),k.value=await sa.selectToBase(I.cloneDeep(Fe))}},Ee=async P=>{await ze(P),x.value=k.value},ne=(P,F)=>{if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const J=F==null?void 0:F.optionUrl;return(J==null?void 0:J.selectRelateType)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const J=F==null?void 0:F.optionUrl;return(J==null?void 0:J.menuSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const J=F==null?void 0:F.optionUrl;return(J==null?void 0:J.groupSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(F==null?void 0:F.value)||F[P.key];if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const J=F[P.key];return Us(J)?J:P.default}return(P==null?void 0:P.label)==="类型"&&F[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!F[P.key]?!1:F[P.key]},ke=async P=>{var ie,ce,ma,na,Ie,_e,Ca,ve,Je;g.value=!0;let F=[];const J=await((ma=(ce=(ie=sa.FormContent)==null?void 0:ie.find(Qe=>(Qe==null?void 0:Qe.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:ce.value)==null?void 0:ma.value)?await((ve=(Ca=(_e=sa.FormContent)==null?void 0:_e.find(Qe=>(Qe==null?void 0:Qe.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ca.value)==null?void 0:ve.value):(Ie=(na=sa.FormContent)==null?void 0:na.find(Qe=>(Qe==null?void 0:Qe.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ie.value;if(J==null||J.forEach(Qe=>{T.value++,F.push({label:Qe==null?void 0:Qe.label,name:(Qe==null?void 0:Qe.name)||(Qe==null?void 0:Qe.label),type:Qe.type,value:(Qe==null?void 0:Qe.label)==="属性名"?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):ne(Qe,P),id:T.value,contents:Qe==null?void 0:Qe.options})}),P!=null&&P.menuSelect&&((Je=P==null?void 0:P.menuSelect)==null?void 0:Je.length)>0){const Qe=await sa.menuToContentType(P==null?void 0:P.menuSelect);F=F==null?void 0:F.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=Qe),Fe))}S.value=P==null?void 0:P.id,x.value=await sa.selectToBase(sa.formToOptionsContents(F)),k.value=await sa.selectToBase(sa.formToOptionsContents(F))},Z=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;$.value=(F=I.cloneDeep($.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="tableToForm"&&(ie.contents=$.value),ie))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{g.value=!1,x.value=[],S.value=""},Ke=async()=>{var ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe;x.value=k.value;let P={};S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value);let F=await((ma=(ce=(ie=sa.FormContent)==null?void 0:ie.find(Fe=>{var _a,Le;return(Fe==null?void 0:Fe.key)===(((Le=(_a=x.value)==null?void 0:_a.find(va=>(va==null?void 0:va.label)==="类型"))==null?void 0:Le.value)??"label")}))==null?void 0:ce.value)==null?void 0:ma.value)??((Ie=(na=sa.FormContent)==null?void 0:na.find(Fe=>{var _a,Le;return(Fe==null?void 0:Fe.key)===(((Le=(_a=x.value)==null?void 0:_a.find(va=>(va==null?void 0:va.label)==="类型"))==null?void 0:Le.value)??"label")}))==null?void 0:Ie.value);if((_e=x.value)==null||_e.forEach(Fe=>{const _a=F==null?void 0:F.find(Le=>(Le==null?void 0:Le.label)===(Fe==null?void 0:Fe.label));_a&&(P[_a.key]=Fe.value)}),P.name=P.label,(Ca=$.value)!=null&&Ca.find(Fe=>Fe.id===P.id))$.value=(ve=$.value)==null?void 0:ve.map(Fe=>(Fe.id===P.id&&(Fe=P),Fe));else{let Fe=I.cloneDeep($.value);$.value||($.value=[]),Fe.push(P),$.value=Fe}$.value=$.value.map(({id:Fe,..._a})=>_a),g.value=!1,S.value="";let J=I.cloneDeep(n.originalItemContents);(Je=I.cloneDeep(n.originalItemContents))!=null&&Je.find(Fe=>(Fe==null?void 0:Fe.key)==="tableToForm")?J=(Qe=I.cloneDeep(n.originalItemContents))==null?void 0:Qe.map(Fe=>((Fe==null?void 0:Fe.key)==="tableToForm"&&(Fe.contents=$.value),Fe)):J.push({key:"tableToForm",contents:$.value}),t("change",J)},Na=P=>{Y.value=!0;let F=[];zn==null||zn.forEach(J=>{T.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:P[J.key],id:T.value,contents:J==null?void 0:J.options})}),S.value=P==null?void 0:P.id,b.value=F,L.value=F};a.watch(()=>u.value,()=>{var F,J;let P=I.cloneDeep(n.originalItemContents);(F=I.cloneDeep(n.originalItemContents))!=null&&F.find(ie=>(ie==null?void 0:ie.key)==="page")?P=(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="page"&&(ie.contents=u.value),ie)):P.push({key:"page",contents:u.value}),t("change",P)},{deep:!0});const te=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;j.value=(F=I.cloneDeep(j.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="extraButton"&&(ie.contents=j.value),ie))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},D=()=>{var J,ie,ce,ma,na;b.value=L.value;let P={};if(S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value),(J=b.value)==null||J.forEach(Ie=>{const _e=zn==null?void 0:zn.find(Ca=>(Ca==null?void 0:Ca.label)===(Ie==null?void 0:Ie.label));_e?P[_e.key]=Ie.value:Ie!=null&&Ie.children&&Ie.children.length>0&&(P.children=Ie.children)}),(ie=j.value)!=null&&ie.find(Ie=>Ie.id===P.id))j.value=(ce=j.value)==null?void 0:ce.map(Ie=>(Ie.id===P.id&&(Ie=P),Ie));else{let Ie=I.cloneDeep(j.value)??[];Ie.push(P),j.value=Ie}Y.value=!1,S.value="";let F=I.cloneDeep(n.originalItemContents);(ma=I.cloneDeep(n.originalItemContents))!=null&&ma.find(Ie=>(Ie==null?void 0:Ie.key)==="extraButton")?F=(na=I.cloneDeep(n.originalItemContents))==null?void 0:na.map(Ie=>((Ie==null?void 0:Ie.key)==="extraButton"&&(Ie.contents=j.value),Ie)):F.push({key:"extraButton",contents:j.value}),t("change",F)},le=P=>{let F=I.cloneDeep(L.value);F=F==null?void 0:F.map(J=>(J.children||(J.value=P==null?void 0:P[J.name]),J)),L.value=F},ye=()=>{Y.value=!1,b.value=[],S.value=""},ue=P=>{v.value=!0;let F=[];Mn==null||Mn.forEach(J=>{T.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:P[J.key],id:T.value,contents:J==null?void 0:J.options})}),S.value=P==null?void 0:P.id,A.value=F,N.value=F},Ne=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;w.value=(F=I.cloneDeep(w.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="rowButton"&&(ie.contents=w.value),ie))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pa=()=>{c.value=!0;let P=[];er==null||er.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),m.value=P,_.value=P},wa=()=>{v.value=!0;let P=[];Mn==null||Mn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),A.value=P,N.value=P},ja=P=>{let F=I.cloneDeep(N.value);F=F==null?void 0:F.map(J=>(J.children||(J.value=P==null?void 0:P[J.name]),J)),N.value=F},ee=()=>{var J,ie,ce,ma,na;A.value=N.value;let P={};if(S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value),(J=A.value)==null||J.forEach(Ie=>{const _e=Mn==null?void 0:Mn.find(Ca=>(Ca==null?void 0:Ca.label)===(Ie==null?void 0:Ie.label));_e?P[_e.key]=Ie.value:Ie!=null&&Ie.children&&Ie.children.length>0&&(P.children=Ie.children)}),(ie=w.value)!=null&&ie.find(Ie=>Ie.id===P.id))w.value=(ce=w.value)==null?void 0:ce.map(Ie=>(Ie.id===P.id&&(Ie=P),Ie));else{let Ie=I.cloneDeep(w.value);Ie.push(P),w.value=Ie}v.value=!1,S.value="";let F=I.cloneDeep(n.originalItemContents);(ma=I.cloneDeep(n.originalItemContents))!=null&&ma.find(Ie=>(Ie==null?void 0:Ie.key)==="rowButton")?F=(na=I.cloneDeep(n.originalItemContents))==null?void 0:na.map(Ie=>((Ie==null?void 0:Ie.key)==="rowButton"&&(Ie.contents=w.value),Ie)):F.push({key:"rowButton",contents:w.value}),t("change",F)},ea=()=>{v.value=!1,S.value="",N.value=[],A.value=[]},Pe=P=>{c.value=!0;let F=[];er==null||er.forEach(J=>{T.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:"",id:T.value,contents:J==null?void 0:J.options})}),m.value=F,z.value=P==null?void 0:P.id,_.value=F},xa=P=>{var F;h.value=gc(I.cloneDeep(h.value),P==null?void 0:P.id),t("change",(F=I.cloneDeep(n.originalItemContents))==null?void 0:F.map(J=>{var ie;return(J==null?void 0:J.key)==="header"&&(J.contents=(ie=h.value)!=null&&ie.some(ce=>ce==null?void 0:ce.children)?[h.value]:h.value),J}))},He=P=>{var J,ie,ce;P.type==="fix"?P.id!==""?h.value=kc(h.value,P):h.value=bc(h.value,P==null?void 0:P.contents):h.value=xc(h.value,P),h.value=(J=h.value)!=null&&J.some(ma=>ma==null?void 0:ma.children)?[h.value]:h.value,S.value="";let F=I.cloneDeep(n.originalItemContents);(ie=I.cloneDeep(n.originalItemContents))!=null&&ie.find(ma=>(ma==null?void 0:ma.key)==="header")?F=(ce=I.cloneDeep(n.originalItemContents))==null?void 0:ce.map(ma=>((ma==null?void 0:ma.key)==="header"&&(ma.contents=h.value),ma)):F.push({key:"header",contents:h.value}),t("change",F)},Te=P=>{var J;c.value=!0;let F=[];er==null||er.forEach(ie=>{T.value++,F.push({label:ie==null?void 0:ie.label,name:ie==null?void 0:ie.label,type:ie.type,value:P[ie.key],id:T.value,contents:ie==null?void 0:ie.options})}),P!=null&&P.children&&((J=P==null?void 0:P.children)==null?void 0:J.length)>0&&F.push({children:P==null?void 0:P.children,isFormColHidden:!0}),S.value=P==null?void 0:P.id,z.value="",m.value=F,_.value=F},Re=P=>{let F=I.cloneDeep(_.value);F=F==null?void 0:F.map(J=>(J.children||(J.value=P==null?void 0:P[J.name]),J)),_.value=F},Ye=()=>{c.value=!1,S.value="",z.value="",_.value=[]},qa=()=>{var J,ie,ce,ma,na,Ie;m.value=_.value;let P={};if(S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value),(J=m.value)==null||J.forEach(_e=>{const Ca=er==null?void 0:er.find(ve=>(ve==null?void 0:ve.label)===(_e==null?void 0:_e.label));Ca?P[Ca.key]=_e.value:_e!=null&&_e.children&&_e.children.length>0&&(P.children=_e.children)}),(ie=h.value)!=null&&ie.find(_e=>_e.id===P.id))h.value=(ce=h.value)==null?void 0:ce.map(_e=>(_e.id===P.id&&(_e=P),_e));else{let _e=I.cloneDeep(h.value)??[];z.value===""?_e.push(P):_e=_e==null?void 0:_e.map(Ca=>(Ca.id===z.value&&(Ca.children||(Ca.children=[]),Ca.children.push(P)),Ca)),h.value=_e}h.value=(ma=h.value)!=null&&ma.some(_e=>_e==null?void 0:_e.children)?[h.value]:h.value,c.value=!1,S.value="",z.value="";let F=I.cloneDeep(n.originalItemContents);(na=I.cloneDeep(n.originalItemContents))!=null&&na.find(_e=>(_e==null?void 0:_e.key)==="header")?F=(Ie=I.cloneDeep(n.originalItemContents))==null?void 0:Ie.map(_e=>((_e==null?void 0:_e.key)==="header"&&(_e.contents=h.value),_e)):F.push({key:"header",contents:h.value}),t("change",F)},Va=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;h.value=(F=I.cloneDeep(h.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>{var ce;return(ie==null?void 0:ie.key)==="header"&&(ie.contents=(ce=h.value)!=null&&ce.some(ma=>ma==null?void 0:ma.children)?[h.value]:h.value),ie})),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>n.originalItemContents,()=>{var P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(s.value=I.cloneDeep(n.originalItemContents),h.value=(F=(P=s.value)==null?void 0:P.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:F.contents,w.value=(ie=(J=s.value)==null?void 0:J.find(K=>(K==null?void 0:K.key)==="rowButton"))==null?void 0:ie.contents,j.value=(ma=(ce=s.value)==null?void 0:ce.find(K=>(K==null?void 0:K.key)==="extraButton"))==null?void 0:ma.contents,u.value=(Ie=(na=s.value)==null?void 0:na.find(K=>(K==null?void 0:K.key)==="page"))!=null&&Ie.contents?!!((Ca=(_e=s.value)==null?void 0:_e.find(K=>(K==null?void 0:K.key)==="page"))!=null&&Ca.contents):!1,$.value=(Je=(ve=s.value)==null?void 0:ve.find(K=>(K==null?void 0:K.key)==="tableToForm"))==null?void 0:Je.contents,h.value=(Qe=h.value)==null?void 0:Qe.map((K,je)=>(Array.isArray(K)?K=_3(K):K={label:(K==null?void 0:K.label)??"",prop:(K==null?void 0:K.label)==="操作"?"operate":K==null?void 0:K.prop,width:K!=null&&K.width?parseInt(K.width):"",fixed:(K==null?void 0:K.fixed)??void 0,sortable:(K==null?void 0:K.sortable)??!1,align:(K==null?void 0:K.align)??"left",showOverflowTooltip:(K==null?void 0:K.showOverflowTooltip)??!0,isNotDrag:(K==null?void 0:K.isNotDrag)??!1,isEditCol:(K==null?void 0:K.isEditCol)??!1,isOperate:(K==null?void 0:K.isOperate)??!1,id:(K==null?void 0:K.id)??je,formMenuSelect:(K==null?void 0:K.formMenuSelect)??void 0,groupSelect:(K==null?void 0:K.groupSelect)??void 0},K)),h.value=(Fe=h.value)!=null&&Fe.every(K=>Array.isArray(K))?(_a=h.value)==null?void 0:_a[0]:h.value,w.value=(Le=w.value)==null?void 0:Le.map((K,je)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",textColor:(K==null?void 0:K.textColor)??"#000000",id:(K==null?void 0:K.id)??je}),j.value=(va=j.value)==null?void 0:va.map((K,je)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",background:(K==null?void 0:K.background)??"var(--ssComponent-primary-color)",id:(K==null?void 0:K.id)??je}),$.value)$.value=(Se=$.value)==null?void 0:Se.map(K=>{T.value++;let je=K;return je.id=T.value,je});else{let K=[];const je=(re=sa.getColumnChild(I.cloneDeep(h.value)))==null?void 0:re.filter(De=>(De==null?void 0:De.prop)!=="operate");je==null||je.forEach(De=>{var Ma;T.value++,K.push({label:De==null?void 0:De.label,name:(De==null?void 0:De.prop)||(De==null?void 0:De.label),type:De!=null&&De.groupSelect?"Select":"Input",value:"",id:T.value,contents:De==null?void 0:De.options,menuSelect:De==null?void 0:De.formMenuSelect,groupSelect:(Ma=De==null?void 0:De.groupSelect)==null?void 0:Ma.split(":"),selectRelateType:"关联绑定列"})}),$.value=K}},{deep:!0,immediate:!0}),(P,F)=>{const J=a.resolveComponent("svg-icon"),ie=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",H3,[a.createElementVNode("div",U3,[a.createElementVNode("div",q3,[F[2]||(F[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(ie,{class:"icon-content",onClick:pa,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[1]||(F[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",W3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",K3,[a.createElementVNode("div",Y3,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",G3,[a.createVNode(J,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Pe(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Te(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Va(ce)},null,8,["onClick"])])]),ce!=null&&ce.children&&ce.children.length>0?(a.openBlock(),a.createElementBlock("div",J3,[a.createVNode(_c,{tableChildContents:ce==null?void 0:ce.children,onDeleteChange:xa,onFixChange:He},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",X3,[F[4]||(F[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:wa},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[3]||(F[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",Z3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(w.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",Q3,[a.createElementVNode("div",e1,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",a1,[a.createVNode(J,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>ue(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Ne(ce)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",l1,[F[6]||(F[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:U},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[5]||(F[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",r1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",n1,[a.createElementVNode("div",o1,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",i1,[a.createVNode(J,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>Na(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>te(ce)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",s1,[F[8]||(F[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:X},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[7]||(F[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",c1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList($.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",u1,[a.createElementVNode("div",d1,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",p1,[a.createVNode(J,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>ke(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Z(ce)},null,8,["onClick"])])])]))),128))]),F[10]||(F[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",f1,[a.createElementVNode("div",h1,[F[9]||(F[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":F[0]||(F[0]=ce=>u.value=ce)},null,8,["modelValue"])])])]),a.createVNode(vr.ssDialog,{visible:c.value,onBeforeDestroy:Ye,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",v1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Re},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",m1,[a.createVNode(ie,{onClick:Ye,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[11]||(F[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(ie,{class:"ok-button button",onClick:qa,id:"themeButton"},{default:a.withCtx(()=>F[12]||(F[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:v.value,onBeforeDestroy:ea,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",y1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:ja},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",g1,[a.createVNode(ie,{onClick:ea,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[13]||(F[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(ie,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:a.withCtx(()=>F[14]||(F[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:Y.value,onBeforeDestroy:ye,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",b1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:le},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",k1,[a.createVNode(ie,{onClick:ye,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[15]||(F[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(ie,{class:"ok-button button",onClick:D,id:"themeButton"},{default:a.withCtx(()=>F[16]||(F[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:g.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",x1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ze,onChangeVisible:be,onBlurChange:Ee},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",_1,[a.createVNode(ie,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[17]||(F[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(ie,{class:"ok-button button",onClick:Ke,id:"themeButton"},{default:a.withCtx(()=>F[18]||(F[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},C1=Ul._export_sfc(w1,[["__scopeId","data-v-7a6b87b5"]]),S1=I.useModelComp(I.pinia),{pageMapState:E1}=I.storeToRefs(S1),D1=I.useMenuState(I.pinia),{activeMenuPath:B1}=I.storeToRefs(D1),N1=a.ref(24),T1=a.ref(6),A1=a.ref(70),z1=a.ref(.18),M1=a.ref(45),O1=(l,r,n,t)=>{var s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b;return{x:((c=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:c.x)||r%2*12,y:((h=(g=l==null?void 0:l.value)==null?void 0:g.tableData)==null?void 0:h.y)||r,w:((m=(v=l==null?void 0:l.value)==null?void 0:v.tableData)==null?void 0:m.w)||N1.value,h:((_=(u=l==null?void 0:l.value)==null?void 0:u.tableData)==null?void 0:_.h)||n,minW:((z=(S=l==null?void 0:l.value)==null?void 0:S.tableData)==null?void 0:z.minW)||T1.value,minH:((j=(w=l==null?void 0:l.value)==null?void 0:w.tableData)==null?void 0:j.minH)||z1.value,maxH:((N=(A=l==null?void 0:l.value)==null?void 0:A.tableData)==null?void 0:N.maxH)||M1.value,i:((b=(Y=l==null?void 0:l.value)==null?void 0:Y.tableData)==null?void 0:b.i)||r,id:(l==null?void 0:l.id)||r+"",component:t}},I1=(l,r)=>{var t,s,c,g,h,v,m,u;let n=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((t=l==null?void 0:l.comp)==null?void 0:t.toUpperCase())==="TABLE"){if(((g=(c=(s=l==null?void 0:l.compData)==null?void 0:s.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:g.length)===0)return 2}else((h=l==null?void 0:l.comp)==null?void 0:h.toUpperCase())==="FORM"&&(n=((u=(m=(v=l==null?void 0:l.compData)==null?void 0:v.find(S=>(S==null?void 0:S.key)==="formContent"))==null?void 0:m.contents)==null?void 0:u.length)/5);return n*2},wc=(l,r,n)=>{var g,h;const t=(h=(g=E1.value)==null?void 0:g[B1.value])==null?void 0:h.filter(v=>{var m;return((m=v==null?void 0:v.key)==null?void 0:m.type)==="gridLayout"}),s=t==null?void 0:t.find(v=>{var m,u,_;return((_=(u=(m=v==null?void 0:v.value)==null?void 0:m.tableData)==null?void 0:u.component)==null?void 0:_.id)===l.id}),c=I1(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((v,m)=>wc(v,m))),{...O1(s,r,c,l)}},L1=(l,r)=>{if((l==null?void 0:l.length)===0)return[];const n=I.cloneDeep(l);return Array.isArray(l)?n==null?void 0:n.map((t,s)=>wc(t,s)):[]},V1=l=>({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}]}]}}),R1=(l,r)=>l==null?void 0:l.map(n=>{for(const t in r)if(t===(n==null?void 0:n.prop))return{...n,value:r[t]};return n}),$1=a.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]);a.watch(()=>n.compType,h=>{var u;const v=V1(n==null?void 0:n.optionItems),m=h?(u=v[h==null?void 0:h.toUpperCase()])==null?void 0:u[n==null?void 0:n.target]:[];s.value=m==null?void 0:m.map(_=>{for(const[S,z]of Object.entries((n==null?void 0:n.comp)||{}))if((_==null?void 0:_.prop)===S)return{..._,value:z};return _})},{immediate:!0});const c=h=>pl.getComponent(h),g=h=>{var v,m;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?s.value=(v=s.value)==null?void 0:v.map(u=>{var _;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(_=u==null?void 0:u.options)==null?void 0:_.map(S=>({...S,disabled:!0}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!0}:u}):s.value=(m=s.value)==null?void 0:m.map(u=>{var _;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(_=u==null?void 0:u.options)==null?void 0:_.map(S=>({...S,disabled:!1}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!1}:u}),t("change",{target:n==null?void 0:n.target,styleConfigs:s.value,prop:h==null?void 0:h.prop})};return(h,v)=>{const m=a.resolveComponent("el-col"),u=a.resolveComponent("el-row");return a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,_=>(a.openBlock(),a.createBlock(u,{class:"style-row",key:_==null?void 0:_.prop},{default:a.withCtx(()=>[a.createVNode(m,{span:6,class:"style-row-title"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),a.createVNode(m,{span:18,style:{display:"flex"}},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(_.type)),{modelValue:_.value,"onUpdate:modelValue":S=>_.value=S,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:S=>g(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),P1=Ul._export_sfc($1,[["__scopeId","data-v-6c233914"]]),F1=a.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(l,{emit:r}){const n=l,t=r,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=a.ref([]),g=N=>N==null?void 0:N.reduce((Y,b)=>(Y[b==null?void 0:b.prop]=b==null?void 0:b.rule,Y),{}),h=a.computed(()=>({formRules:g(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),v=a.ref([]),m=a.ref(""),u=(N,Y,b)=>{var x;let L=[];(n==null?void 0:n.activeTabName)==="任务配置"?(L=[{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:N},{label:"按钮名称",value:"按钮名称",children:Y}]},{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:"暂停"}]}],c.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(L=[{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:(x=n==null?void 0:n.relatedData)==null?void 0:x.map(k=>({label:k==null?void 0:k.任务名称,value:k==null?void 0:k.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let T;return b&&(b==null?void 0:b.length)>0?T=[...L,..._(N,Y,b)]:T=L,T},_=(N,Y,b)=>{const L=[{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 b?L==null?void 0:L.filter(T=>b==null?void 0:b.includes(T==null?void 0:T.prop)):L},S=(N,Y)=>{var k,$,U,X,be,ze,Ee,ne,ke;const b=((be=(X=(U=($=(k=n==null?void 0:n.comp)==null?void 0:k.compData)==null?void 0:$.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:U.contents)==null?void 0:X.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:be.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],L=/button/i,T=((ke=(ne=(Ee=(ze=n==null?void 0:n.comp)==null?void 0:ze.compData)==null?void 0:Ee.filter(Z=>L.test(Z==null?void 0:Z.key)))==null?void 0:ne.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:ke.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],x=u(b,T,N);v.value=Y?R1(x,Y):x,N&&(N==null?void 0:N.length)>0&&c.value.push(...N==null?void 0:N.map(Z=>({prop:Z,rule:s})))};a.onMounted(()=>{S(null,n==null?void 0:n.extendItem)});const z=N=>{const Y=N==null?void 0:N[m.value];if(m.value==="执行任务"){if(!(Y!=null&&Y.join("/")))return;const b=Y==null?void 0:Y.join("/");S(b==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:b==="进度设置/进度条"?["进度关键词"]:null,N)}},w=N=>{t("change",{target:n==null?void 0:n.target,extendConfigs:N})},j=(N,Y)=>{m.value=Y==null?void 0:Y.changeProp,z(N)},A=N=>{t("onButtonClick",N)};return(N,Y)=>(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:w,onBlurChange:j,onOnButtonClick:A},null,8,["rowContents","formRules","buttonValue"]))}}),j1=Ul._export_sfc(F1,[["__scopeId","data-v-7c660c1f"]]),H1={};function U1(l,r){return null}const q1=Ul._export_sfc(H1,[["render",U1]]),W1={class:"form-operate-content"},K1={class:"form-operate-item"},Y1={class:"operate-title"},G1={class:"operate-content"},J1={class:"fix-content"},X1={class:"fix-button"},Z1={class:"operate-title"},Q1={class:"operate-content"},e2={class:"fix-content"},a2={class:"fix-button"},l2={style:{display:"flex","justify-content":"space-between"}},r2={class:"form-content"},n2={class:"dialog-footer"},t2={class:"form-content"},o2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(!1),c=a.ref([]),g=a.ref([]),h=a.ref(!1),v=a.ref([]),m=a.ref([]),u=a.ref(""),_=a.ref(!1),S=a.ref(0),z=a.ref([]),w=a.ref([]),j=(ne,ke)=>{if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="selectRelateType"){const Z=ke==null?void 0:ke.optionUrl;return(Z==null?void 0:Z.selectRelateType)||ke[ne.key]}if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="menuSelect"){const Z=ke==null?void 0:ke.optionUrl;return(Z==null?void 0:Z.menuSelect)||ke[ne.key]}if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="groupSelect"){const Z=ke==null?void 0:ke.optionUrl;return(Z==null?void 0:Z.groupSelect)||ke[ne.key]}if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="originalContent")return(ke==null?void 0:ke.value)||ke[ne.key];if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="multiple"){const Z=ke[ne.key];return Us(Z)?Z:ne.default}return(ne==null?void 0:ne.label)==="类型"&&ke[ne.key]===""?"Input":(ne==null?void 0:ne.key)==="isFormColHidden"&&!ke[ne.key]?!1:ke[ne.key]},A=async ne=>{var de,Ke,Na,te,D,le;s.value=!0;let ke=[];const Z=await((Na=(Ke=(de=sa.FormContent)==null?void 0:de.find(ye=>(ye==null?void 0:ye.key)===((ne==null?void 0:ne.type)===""?"Input":ne==null?void 0:ne.type)))==null?void 0:Ke.value)==null?void 0:Na.value)??((D=(te=sa.FormContent)==null?void 0:te.find(ye=>(ye==null?void 0:ye.key)===((ne==null?void 0:ne.type)===""?"Input":ne==null?void 0:ne.type)))==null?void 0:D.value);if(Z==null||Z.forEach(ye=>{S.value++,ke.push({label:ye==null?void 0:ye.label,name:ye==null?void 0:ye.label,type:ye.type,prop:ye==null?void 0:ye.prop,value:j(ye,ne),id:S.value,contents:ye==null?void 0:ye.options,width:(ne==null?void 0:ne.width)??1})}),ne!=null&&ne.menuSelect&&((le=ne==null?void 0:ne.menuSelect)==null?void 0:le.length)>0){const ye=await sa.menuToContentType(ne==null?void 0:ne.menuSelect);ke=ke==null?void 0:ke.map(ue=>((ue==null?void 0:ue.name)==="组信息选项"&&(ue.contents=ye),ue))}u.value=ne==null?void 0:ne.id,c.value=await sa.selectToBase(sa.formToOptionsContents(ke)),g.value=await sa.selectToBase(sa.formToOptionsContents(ke))},N=ne=>{var Z;h.value=!0;let ke=[];(Z=sa.FormButton)==null||Z.forEach(de=>{S.value++,ke.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&ne[de.key]===""?"normal":ne[de.key],id:S.value,contents:de==null?void 0:de.options})}),z.value=ke,w.value=ke,u.value=ne==null?void 0:ne.id};a.watch(()=>_.value,()=>{var ke,Z;let ne=I.cloneDeep(n.originalItemContents);(ke=I.cloneDeep(n.originalItemContents))!=null&&ke.find(de=>(de==null?void 0:de.key)==="enableWrap")?ne=(Z=I.cloneDeep(n.originalItemContents))==null?void 0:Z.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!_.value),de)):ne.push({key:"enableWrap",contents:!_.value}),t("change",ne)},{deep:!0});const Y=()=>{var Z,de,Ke,Na,te;z.value=w.value;let ne={};if(u.value!==""?ne.id=u.value:(S.value++,ne.id="id"+S.value),(Z=z.value)==null||Z.forEach(D=>{var ye;const le=(ye=sa.FormButton)==null?void 0:ye.find(ue=>(ue==null?void 0:ue.label)===(D==null?void 0:D.label));le&&(ne[le.key]=D.value)}),(de=v.value)!=null&&de.find(D=>D.id===ne.id))v.value=(Ke=v.value)==null?void 0:Ke.map(D=>(D.id===ne.id&&(D=ne),D));else{let D=I.cloneDeep(v.value);v.value||(v.value=[]),D.push(ne),v.value=D}h.value=!1,u.value="";let ke=I.cloneDeep(n.originalItemContents);(Na=I.cloneDeep(n.originalItemContents))!=null&&Na.find(D=>(D==null?void 0:D.key)==="formButton")?ke=(te=I.cloneDeep(n.originalItemContents))==null?void 0:te.map(D=>((D==null?void 0:D.key)==="formButton"&&(D.contents=v.value),D)):ke.push({key:"formButton",contents:v.value}),t("change",ke)},b=ne=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ke,Z;m.value=(ke=I.cloneDeep(m.value))==null?void 0:ke.filter(de=>(de==null?void 0:de.id)!==(ne==null?void 0:ne.id)),t("change",(Z=I.cloneDeep(n.originalItemContents))==null?void 0:Z.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=m.value),de))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=ne=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ke,Z;v.value=(ke=I.cloneDeep(v.value))==null?void 0:ke.filter(de=>(de==null?void 0:de.id)!==(ne==null?void 0:ne.id)),t("change",(Z=I.cloneDeep(n.originalItemContents))==null?void 0:Z.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=v.value),de))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},T=()=>{var ke;h.value=!0;let ne=[];(ke=sa.FormButton)==null||ke.forEach(Z=>{S.value++,ne.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:(Z==null?void 0:Z.label)==="类型"?"normal":"",id:S.value,contents:Z==null?void 0:Z.options})}),z.value=ne,w.value=ne},x=()=>{var ke,Z,de;s.value=!0;let ne=[];(de=(Z=(ke=sa.FormContent)==null?void 0:ke.find(Ke=>(Ke==null?void 0:Ke.key)==="Input"))==null?void 0:Z.value)==null||de.forEach(Ke=>{S.value++,ne.push({label:Ke==null?void 0:Ke.label,name:Ke==null?void 0:Ke.label,type:Ke.type,value:(Ke==null?void 0:Ke.label)==="类型"?"Input":"",id:S.value,contents:Ke==null?void 0:Ke.options})}),c.value=ne,g.value=ne},k=ne=>{let ke=I.cloneDeep(w.value);ke=ke==null?void 0:ke.map(Z=>(Z.value=ne==null?void 0:ne[Z.name],Z)),w.value=ke},$=ne=>{const ke=ne.find(Ke=>(Ke==null?void 0:Ke.name)==="类型");if((ke==null?void 0:ke.value)!="Select")return;const Z=ne.find(Ke=>(Ke==null?void 0:Ke.name)==="多选"),de=ne.find(Ke=>(Ke==null?void 0:Ke.name)==="初始值");Z!=null&&Z.value&&bo.isString(de.value)&&(de.value=[de.value]),!(Z!=null&&Z.value)&&!bo.isString(de.value)&&(de.value="")},U=async ne=>{var ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa;if((ne==null?void 0:ne.类型)!==((Z=(ke=g.value)==null?void 0:ke.find(wa=>(wa==null?void 0:wa.label)==="类型"))==null?void 0:Z.value)){let wa=[];const ja=await((Na=(Ke=(de=sa.FormContent)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)===((ne==null?void 0:ne.类型)===""?"Input":ne==null?void 0:ne.类型)))==null?void 0:Ke.value)==null?void 0:Na.value)?await((ue=(ye=(le=sa.FormContent)==null?void 0:le.find(ee=>(ee==null?void 0:ee.key)===((ne==null?void 0:ne.类型)===""?"Input":ne==null?void 0:ne.类型)))==null?void 0:ye.value)==null?void 0:ue.value):(D=(te=sa.FormContent)==null?void 0:te.find(ee=>(ee==null?void 0:ee.key)===((ne==null?void 0:ne.类型)===""?"Input":ne==null?void 0:ne.类型)))==null?void 0:D.value;if(ja==null||ja.forEach(ee=>{var Pe,xa;S.value++;const ea=xu(ee==null?void 0:ee.default)?(ne==null?void 0:ne[ee.label])??ee.value??"":ee==null?void 0:ee.default;wa.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:ea,prop:ee==null?void 0:ee.prop,id:S.value,contents:ee==null?void 0:ee.options,width:((xa=(Pe=g.value)==null?void 0:Pe[0])==null?void 0:xa.width)??1})}),ne!=null&&ne.菜单选项&&((Ne=ne==null?void 0:ne.菜单选项)==null?void 0:Ne.length)>0){const ee=await sa.menuToContentType(ne==null?void 0:ne.菜单选项);wa=wa==null?void 0:wa.map(ea=>((ea==null?void 0:ea.name)==="组信息选项"&&(ea.contents=ee),ea))}$(wa),g.value=await sa.selectToBase(I.cloneDeep(wa)),c.value=await sa.selectToBase(I.cloneDeep(wa))}else{let wa=I.cloneDeep(g.value);if(wa=wa==null?void 0:wa.map(ja=>(ja.value=ne==null?void 0:ne[ja.name],ja)),ne!=null&&ne.菜单选项&&((pa=ne==null?void 0:ne.菜单选项)==null?void 0:pa.length)>0){const ja=await sa.menuToContentType(ne==null?void 0:ne.菜单选项);wa=wa==null?void 0:wa.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=ja),ee))}wa=sa.formToOptionsContents(wa),$(wa),g.value=await sa.selectToBase(I.cloneDeep(wa))}},X=ne=>{ne||(c.value=g.value)},be=async ne=>{await U(ne),c.value=g.value},ze=La.debounce(async()=>{var de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja;c.value=g.value;let ne={};ne.width=((Ke=(de=c.value)==null?void 0:de[0])==null?void 0:Ke.width)??1,u.value!==""?ne.id=u.value:(S.value++,ne.id="id"+S.value);let ke=await((D=(te=(Na=sa.FormContent)==null?void 0:Na.find(ee=>{var ea,Pe;return(ee==null?void 0:ee.key)===(((Pe=(ea=c.value)==null?void 0:ea.find(xa=>(xa==null?void 0:xa.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:te.value)==null?void 0:D.value)??((ye=(le=sa.FormContent)==null?void 0:le.find(ee=>{var ea,Pe;return(ee==null?void 0:ee.key)===(((Pe=(ea=c.value)==null?void 0:ea.find(xa=>(xa==null?void 0:xa.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:ye.value);if((ue=c.value)==null||ue.forEach(ee=>{const ea=ke==null?void 0:ke.find(Pe=>(Pe==null?void 0:Pe.label)===(ee==null?void 0:ee.label));ea&&(ne[ea.key]=ee.value)}),ne.width=ne.width?ne.width:1,ne.key=ne==null?void 0:ne.label,ne.isFormColHidden=ne==null?void 0:ne.isFormColHidden,(Ne=m.value)!=null&&Ne.find(ee=>ee.id===ne.id))m.value=(pa=m.value)==null?void 0:pa.map(ee=>(ee.id===ne.id&&(ee=ne),ee));else{let ee=I.cloneDeep(m.value);ee.push(ne),m.value=ee}m.value=m.value.map(({id:ee,...ea})=>ea),s.value=!1,u.value="";let Z=I.cloneDeep(n.originalItemContents);(wa=I.cloneDeep(n.originalItemContents))!=null&&wa.find(ee=>(ee==null?void 0:ee.key)==="formContent")?Z=(ja=I.cloneDeep(n.originalItemContents))==null?void 0:ja.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee)):Z.push({key:"formContent",contents:m.value}),t("change",Z)},300),Ee=()=>{s.value=!1,h.value=!1,u.value="",g.value=[],w.value=[]};return a.watch(()=>n.originalItemContents,()=>{var ke,Z,de,Ke,Na,te;if(!n.originalItemContents||n.originalItemContents.length===0)return;const ne=I.cloneDeep(n.originalItemContents);m.value=((ke=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:ke.contents)??[],v.value=((Z=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="formButton"))==null?void 0:Z.contents)??[],_.value=(de=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&de.contents?!((Ke=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&Ke.contents):!0,m.value=(Na=I.cloneDeep(m.value))==null?void 0:Na.map((D,le)=>{var ue;let ye=D;return ye.id=(D==null?void 0:D.id)??le,D!=null&&D.label||(D.label=(D==null?void 0:D.key)??(D==null?void 0:D.label)??""),D!=null&&D.type||(D.type=(D==null?void 0:D.type)??""),D.contents=((ue=D==null?void 0:D.options)==null?void 0:ue.length)===0?(D==null?void 0:D.contents)??"":D==null?void 0:D.options,ye}),m.value=sa.formToOptionsContents(m.value),v.value=(te=v.value)==null?void 0:te.map((D,le)=>D={label:(D==null?void 0:D.label)??"",type:(D==null?void 0:D.type)??"",background:(D==null?void 0:D.background)??"var(--ssComponent-primary-color)",id:le})},{deep:!0,immediate:!0}),(ne,ke)=>{const Z=a.resolveComponent("svg-icon"),de=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",W1,[a.createElementVNode("div",K1,[a.createElementVNode("div",Y1,[ke[2]||(ke[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:x},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[ke[1]||(ke[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",G1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(Ke,Na)=>(a.openBlock(),a.createElementBlock("div",{key:Na},[a.createElementVNode("div",J1,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",X1,[a.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>A(Ke)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>b(Ke)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",Z1,[ke[4]||(ke[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:T},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[ke[3]||(ke[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",Q1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(Ke,Na)=>(a.openBlock(),a.createElementBlock("div",{key:Na},[a.createElementVNode("div",e2,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",a2,[a.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>N(Ke)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>L(Ke)},null,8,["onClick"])])])]))),128))]),ke[6]||(ke[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",l2,[ke[5]||(ke[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":ke[0]||(ke[0]=Ke=>_.value=Ke)},null,8,["modelValue"])])]),a.createVNode(vr.ssDialog,{visible:s.value,onBeforeDestroy:Ee,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",r2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:U,onChangeVisible:X,onBlurChange:be},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",n2,[a.createVNode(de,{onClick:Ee,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>ke[7]||(ke[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(de,{class:"ok-button button",onClick:a.unref(ze),id:"themeButton"},{default:a.withCtx(()=>ke[8]||(ke[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:h.value,onBeforeDestroy:Ee,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",t2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:z.value,key:z.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:Ee,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:Y},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hs=Ul._export_sfc(o2,[["__scopeId","data-v-20850524"]]),i2={class:"step-module content"},s2={class:"module-data"},c2={class:"step-module layout"},u2={class:"form-content"},d2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.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}]),c=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),g=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.reactive({visible:!1,width:"40%",title:"步骤条"}),v=a.ref("create"),m=a.ref({}),u=a.ref([]),_=A=>{var N;m.value=A,t("change",(N=w())==null?void 0:N.compData)},S=(A,N)=>{var Y,b;switch(A){case"create":(Y=c.value)==null||Y.forEach(L=>{L.value=""}),v.value="create",h.visible=!0;break;case"update":(b=c.value)==null||b.forEach(L=>{L.value=N[L==null?void 0:L.prop]}),v.value="update",h.visible=!0;break;case"delete":u.value.splice(N,1),v.value="delete";break}},z=A=>{var N,Y,b;if((A==null?void 0:A.buttonName)==="确认"){const L=I.cloneDeep(A==null?void 0:A.content);switch(Object.keys(L).forEach(T=>{L[T]===""&&delete L[T]}),v.value){case"create":u.value.push({...L,index:((N=u.value)==null?void 0:N.length)+1});break;case"update":u.value=(Y=u.value)==null?void 0:Y.map(T=>T.index===(L==null?void 0:L.index)?{...T,title:L==null?void 0:L.title,description:L==null?void 0:L.description}:T);break}t("change",(b=w())==null?void 0:b.compData),h.visible=!1}else h.visible=!1},w=()=>({comp:"Step",compData:[{key:"stepList",contents:u.value},{key:"stepConfig",contents:m.value}]}),j=()=>{h.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,A=>{var N,Y;A&&(m.value=((N=A==null?void 0:A.find(b=>b.key==="stepConfig"))==null?void 0:N.contents)??{},u.value=((Y=A==null?void 0:A.find(b=>b.key==="stepList"))==null?void 0:Y.contents)??[])},{immediate:!0}),(A,N)=>{const Y=a.resolveComponent("svg-icon"),b=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",i2,[N[2]||(N[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(b,{class:"module-icon",id:"themeButton",onClick:N[0]||(N[0]=L=>S("create"))},{icon:a.withCtx(()=>[a.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[N[1]||(N[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",s2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(L,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString(L==null?void 0:L.title),1),a.createElementVNode("div",null,[a.createVNode(b,{type:"primary",size:"small",onClick:x=>S("update",{...L,index:T+1})},{default:a.withCtx(()=>N[3]||(N[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(b,{type:"danger",size:"small",onClick:x=>S("delete",T)},{default:a.withCtx(()=>N[4]||(N[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",c2,[N[5]||(N[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:s.value,onChange:_},null,8,["rowContents"])])]),a.createVNode(vr.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:j,width:h.width},{default:a.withCtx(()=>[a.createElementVNode("div",u2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),p2=Ul._export_sfc(d2,[["__scopeId","data-v-7dbd17f2"]]),f2={class:"step-module content"},h2={class:"module-data"},v2={class:"step-module layout"},m2={class:"form-content"},y2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref("create"),c=a.ref({}),g=a.ref([]),h=a.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}]),v=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),u=a.reactive({visible:!1,width:"40%",title:"时间线"}),_=A=>{var N;c.value=A,t("change",(N=w())==null?void 0:N.compData)},S=(A,N)=>{var Y,b;switch(A){case"create":(Y=v.value)==null||Y.forEach(L=>{L.value=""}),s.value="create",u.visible=!0;break;case"update":(b=v.value)==null||b.forEach(L=>{L.value=N[L==null?void 0:L.prop]}),s.value="update",u.visible=!0;break;case"delete":g.value.splice(N,1),s.value="delete";break}},z=A=>{var N,Y,b,L;if((A==null?void 0:A.buttonName)==="确认"){const T=I.cloneDeep(A==null?void 0:A.content);switch(Object.keys(T).forEach(x=>{T[x]===""&&delete T[x]}),s.value){case"create":(Y=g.value)==null||Y.push({...T,index:((N=g.value)==null?void 0:N.length)+1});break;case"update":g.value=(b=g.value)==null?void 0:b.map(x=>x.index===(T==null?void 0:T.index)?{...x,content:T==null?void 0:T.content,timestamp:T==null?void 0:T.timestamp}:x);break}t("change",(L=w())==null?void 0:L.compData),u.visible=!1}else u.visible=!1},w=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:g.value},{key:"timeLineConfig",contents:c.value}]}),j=()=>{u.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,A=>{var N,Y;A&&(c.value=((N=A==null?void 0:A.find(b=>b.key==="timeLineConfig"))==null?void 0:N.contents)??{},g.value=((Y=A==null?void 0:A.find(b=>b.key==="timeLineList"))==null?void 0:Y.contents)??[])},{immediate:!0}),(A,N)=>{const Y=a.resolveComponent("svg-icon"),b=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",f2,[N[2]||(N[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(b,{class:"module-icon",id:"themeButton",onClick:N[0]||(N[0]=L=>S("create"))},{icon:a.withCtx(()=>[a.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[N[1]||(N[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",h2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(L,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString(L==null?void 0:L.content),1),a.createElementVNode("div",null,[a.createVNode(b,{type:"primary",size:"small",onClick:x=>S("update",{...L,index:T+1})},{default:a.withCtx(()=>N[3]||(N[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(b,{type:"danger",size:"small",onClick:x=>S("delete",T)},{default:a.withCtx(()=>N[4]||(N[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",v2,[N[5]||(N[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:h.value,onChange:_},null,8,["rowContents"])])]),a.createVNode(vr.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:j,width:u.width},{default:a.withCtx(()=>[a.createElementVNode("div",m2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),g2=Ul._export_sfc(y2,[["__scopeId","data-v-39ffc861"]]),b2={};function k2(l,r){return a.openBlock(),a.createElementBlock("div")}const x2=Ul._export_sfc(b2,[["render",k2]]),_2={class:"extra-content"},w2={key:0},C2={key:1},S2={class:"dialog-footer"},E2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(l,{emit:r}){const n=l,t=a.ref(0),s=a.ref(),c=a.ref(),g=r,h=a.ref(!1),v=a.ref({}),m=a.ref({}),u=a.ref();a.watch(()=>[n.itemData],()=>{var L;const b=I.cloneDeep(n.itemData);s.value=(L=I.cloneDeep(b))==null?void 0:L.map(T=>{var x;if(T.key==="extra"){let k=[];(x=T.value)==null||x.forEach($=>{var U;k.push((U=Object.values($))==null?void 0:U[0])}),T.value=k}return T})},{deep:!0,immediate:!0});const _=(b,L,T,x)=>{var $;let k={};(($=b==null?void 0:b[0])==null?void 0:$.contents)==="详情"&&(h.value=!0,k[L]=b,c.value=b==null?void 0:b.filter(U=>(U==null?void 0:U.key)!=="tableContentName"),v.value=k,m.value=T,u.value=x.id)},S=b=>{var U,X,be,ze;const L=(X=(U=Object.values(I.cloneDeep(v.value)))==null?void 0:U[0])==null?void 0:X.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),T=(ze=(be=Object.values(I.cloneDeep(v.value)))==null?void 0:be[0])==null?void 0:ze.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),x=T==null?void 0:T.map((Ee,ne)=>{var ke;return ne===b.index&&(Ee==null?void 0:Ee.comp)==="Table"&&(Ee.compData=(ke=Ee.compData)==null?void 0:ke.map(Z=>{var de,Ke;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(Ke=(de=b.content)==null?void 0:de.map(Na=>{let te={};for(let D in Na)D!=="id"&&(te[D]=Na[D]);return te}))==null?void 0:Ke.map(Na=>Object.values(Na))),Z})),Ee});x.unshift(L==null?void 0:L[0]);let k=I.cloneDeep(v.value),$={};for(let Ee in k)$[Ee]=x;v.value=$},z=()=>{h.value=!1,v.value={},m.value={},u.value=void 0,t.value++},w=b=>{var U,X,be,ze;const L=(X=(U=Object.values(I.cloneDeep(v.value)))==null?void 0:U[0])==null?void 0:X.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),T=(ze=(be=Object.values(I.cloneDeep(v.value)))==null?void 0:be[0])==null?void 0:ze.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),x=T==null?void 0:T.map((Ee,ne)=>(ne===b.index&&(Ee.compData=b.contents),Ee));x.unshift(L==null?void 0:L[0]);let k=I.cloneDeep(v.value),$={};for(let Ee in k)$[Ee]=x;v.value=$},j=()=>{var L,T;let b={};for(let x in m.value)x===((L=Object.keys(v.value))==null?void 0:L[0])?b[x]=(T=Object.values(v.value))==null?void 0:T[0]:b[x]=m.value[x];g("change",{buttonName:"编辑",index:u.value,singleContent:b},"methodData"),h.value=!1,v.value={},m.value={},u.value=void 0},A=()=>{h.value=!1,v.value={},m.value={},u.value=void 0},N=b=>{g("change",b,"methodData")},Y=b=>St(b);return(b,L)=>{const T=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",_2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(x,k)=>(a.openBlock(),a.createElementBlock("div",{key:t.value},[(x==null?void 0:x.key)==="extra"?(a.openBlock(),a.createElementBlock("div",w2)):(a.openBlock(),a.createElementBlock("div",C2,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Y(x.comp)),{itemData:x==null?void 0:x.compData,childItemData:x==null?void 0:x.itemChildData,key:k,index:(x==null?void 0:x.id)??k,onContentClick:_,onChange:N},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(vr.ssDialog,{visible:h.value,onBeforeDestroy:A},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,(x,k)=>(a.openBlock(),a.createElementBlock("div",{key:k,class:"extra-dialog"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Y(x.comp)),{itemData:x==null?void 0:x.compData,onChange:S,childItemData:x==null?void 0:x.itemChildData,key:k,onContentChange:w,index:(x==null?void 0:x.id)??k,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",S2,[a.createVNode(T,{class:"cancel-button footer-button",onClick:z,id:"themeBorderButton"},{default:a.withCtx(()=>L[0]||(L[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(T,{class:"confirm-button footer-button",onClick:j,id:"themeButton"},{default:a.withCtx(()=>L[1]||(L[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},D2=Ul._export_sfc(E2,[["__scopeId","data-v-2d9c5ab2"]]),B2={key:0,class:"method-content"},N2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(l){const r=a.ref([]),n=sa.useOriginalState(I.pinia),{originalPath:t}=I.storeToRefs(n),s=l,c=a.ref(!1),g=a.ref(),h=sa.useTableComp(I.pinia),{multipleTableConst:v}=I.storeToRefs(h),m=I.useModelComp(I.pinia),u=a.ref(!1),_=I.useMenuState(I.pinia),S=I.useLoginState(I.pinia),{itemData:z,isEdit:w,routeToChildPath:j,tableViewContents:A,lockingPage:N,payloadTypes:Y}=I.storeToRefs(m),{activeMenuPath:b,platform:L,childMenu:T}=I.storeToRefs(_),{loginUserInfo:x}=I.storeToRefs(S),k=a.ref(!1),$=async()=>{var te,D;(te=r.value)!=null&&te.find(le=>(le==null?void 0:le.buttonName)==="保存")&&await Z((D=r.value)==null?void 0:D.find(le=>(le==null?void 0:le.buttonName)==="保存")),await sa.onSaveBack()};a.watch(()=>z.value,async()=>{w.value==="view"&&!k.value&&await Na(I.cloneDeep(s.itemData)),k.value=!1},{deep:!0});const U=()=>{c.value=!1,g.value=void 0},X=te=>te.map(D=>{const le={};for(const ye in D){const ue=D[ye];if(ye.includes(v.value)){const Ne=ye.split(v.value);let pa=le;Ne.forEach((wa,ja)=>{ja===Ne.length-1?pa[wa]=ue:(pa[wa]||(pa[wa]={}),pa=pa[wa])})}else le[ye]=ue}return le}),be=async(te,D,le=[])=>{var ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va;let ye=(ue=I.cloneDeep(D))==null?void 0:ue.filter(P=>(P==null?void 0:P.comp)!=="methodButton");if(te!=null&&te.includes("[")){let P=(ee=(ja=(wa=(pa=(Ne=I.cloneDeep(te))==null?void 0:Ne.split("["))==null?void 0:pa[1])==null?void 0:wa.split("]"))==null?void 0:ja[0])==null?void 0:ee.split(":"),F="";if(P!=null&&P[0]){let J=(ea=ye==null?void 0:ye.find(ie=>(ie==null?void 0:ie.name)===(P==null?void 0:P[0])))==null?void 0:ea.compData;if(!J){let ie=(Pe=te==null?void 0:te.split("["))==null?void 0:Pe[0],ce=await sa.getItemData(ie,sessionStorage.getItem("systemKey"),"",!1,"","",le);J=(xa=ce==null?void 0:ce.find(ma=>(ma==null?void 0:ma.name)===(P==null?void 0:P[0])))==null?void 0:xa.compData}J==null||J.forEach(ie=>{var ce,ma,na,Ie,_e,Ca;if((ie==null?void 0:ie.key)==="formContent")(ce=ie==null?void 0:ie.contents)==null||ce.forEach(ve=>{var Je;(ve==null?void 0:ve.key)===(P==null?void 0:P[1])&&(Array.isArray(ve==null?void 0:ve.value)?F=ve==null?void 0:ve.value:F=(Je=ve==null?void 0:ve.value)==null?void 0:Je.toString())});else if((ie==null?void 0:ie.key)==="tableContents"){let ve=[],Je=(ma=J==null?void 0:J.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:ma.contents,Qe=(P==null?void 0:P[1])??"";if(Je!=null&&Je.every(Fe=>Array.isArray(Fe))){let Fe=sa.getColumnChild((_e=Je==null?void 0:Je[0])==null?void 0:_e.filter(_a=>(_a==null?void 0:_a.label)!=="操作"));(Ca=ie.contents)==null||Ca.forEach(_a=>{let Le={};_a=_a==null?void 0:_a.filter(va=>!(va!=null&&va.id)),Fe==null||Fe.forEach((va,re)=>{let Se=_a[re];typeof _a[re]=="number"&&(Se=_a[re].toString()),(Qe===""||Qe===va.prop)&&(Le[va.prop]=Se)}),ve.push(Le)}),ve=X(ve)}else{let Fe=(na=Je==null?void 0:Je.map(_a=>_a==null?void 0:_a.label))==null?void 0:na.filter(_a=>_a!=="操作");(Ie=ie.contents)==null||Ie.forEach(_a=>{let Le={};_a=_a==null?void 0:_a.filter(va=>!(va!=null&&va.id)),Fe==null||Fe.forEach((va,re)=>{let Se=_a[re];typeof _a[re]=="number"&&(Se=_a[re].toString()),(Qe===""||Qe===va)&&(Le[va]=Se)}),ve.push(Le)})}F=ve}})}return F}else if(te!=null&&te.includes("/")){let P={};return(He=I.cloneDeep(ye))==null||He.forEach((F,J)=>{var ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De;if((F==null?void 0:F.comp)==="Table"){let Ma=Array.isArray((ma=(ce=(ie=F==null?void 0:F.compData)==null?void 0:ie.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:ce.contents)==null?void 0:ma[0])?(Ca=(_e=(Ie=(na=F==null?void 0:F.compData)==null?void 0:na.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:Ie.contents)==null?void 0:_e[0])==null?void 0:Ca.some(Ae=>Ae==null?void 0:Ae.children):[],Ba=(Qe=(Je=(ve=F==null?void 0:F.compData)==null?void 0:ve.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:Je.contents)==null?void 0:Qe.map(Ae=>(Ae!=null&&Ae.find(we=>we==null?void 0:we.id)&&(Ae=Ae.slice(1)),Ae)),Ua=(re=(va=(Le=(_a=(Fe=F==null?void 0:F.compData)==null?void 0:Fe.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:_a.contents)==null?void 0:Le[0])==null?void 0:va[0])==null?void 0:re.label,Aa=(K=(Se=F==null?void 0:F.compData)==null?void 0:Se.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:K.contents;if(Ma)(Ma==null?void 0:Ma.length)===0?P[F.name]=P!=null&&P[F.name]?P[F.name]:sa.tableToForm(Ba,Aa):P[Ua]=sa.tableToForm(Ba,Aa);else{const Ae=[];Aa=Aa.slice(1,Aa.length-1),Aa==null||Aa.forEach((we,Ea)=>{Ba==null||Ba.forEach(Ge=>{Ae.push({key:we.label+Ge[0],value:Ge[Ea+1]})})}),P["form"+J]=Ae}}else{const Ma=(De=(je=F.compData)==null?void 0:je.find(Ua=>(Ua==null?void 0:Ua.key)==="formContent"))==null?void 0:De.contents;P!=null&&P.form||(P.form=[]);const Ba=[];Ma==null||Ma.forEach(Ua=>{Ua.key!==""&&(Ua={key:(Ua==null?void 0:Ua.key)??(Ua==null?void 0:Ua.label),value:Ua==null?void 0:Ua.value},Ba.push(Ua))}),P.form=[...Ba,...I.cloneDeep(P==null?void 0:P.form)]}}),P}else{if(te==="createInsofDataApi"){let P=(Te=I.cloneDeep(D))==null?void 0:Te[0];return P={comp:(Re=I.cloneDeep(P))==null?void 0:Re.comp,compData:(Ye=I.cloneDeep(P))==null?void 0:Ye.compData,name:(qa=I.cloneDeep(P))==null?void 0:qa.name,isShow:(Va=I.cloneDeep(P))==null?void 0:Va.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:b.value},value:{pageData:P}}}return te}},ze=async(te,D,le)=>{var Ne,pa,wa;let ye=await sa.getItemData(D,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(ja=>(ja==null?void 0:ja.name)===(le==null?void 0:le[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let ja={};for(let Re in I.cloneDeep(te))I.cloneDeep(te)[Re]!=="loginUser"?ja[Re]=I.cloneDeep(te)[Re]:ja[Re]=((Ne=x.value)==null?void 0:Ne.account)||((pa=x.value)==null?void 0:pa.账号);let ee=[],ea=ja;Array.isArray(te)||(ea=[ja]),ea==null||ea.forEach(Re=>{ee.push({[Re[le[1]]]:Re})});let Pe=[],xa=ee==null?void 0:ee.map(Re=>{var Ye;return(Ye=Object.keys(Re))==null?void 0:Ye[0]});ye==null||ye.forEach(Re=>{var Ye;(Re==null?void 0:Re.name)===(le==null?void 0:le[0])&&((Ye=Re==null?void 0:Re.compData)==null||Ye.forEach(qa=>{var Va;(qa==null?void 0:qa.key)==="tableContents"&&((Va=qa==null?void 0:qa.contents)==null||Va.forEach(P=>{P!=null&&P.some(F=>xa.includes(F))&&Pe.push({[P.find(F=>F.id).id]:P.find(F=>xa.includes(F))})}))}))});let He=Pe==null?void 0:Pe.map(Re=>{var Ye;return(Ye=Object.keys(Re))==null?void 0:Ye[0]}),Te=[];if(He==null||He.forEach(Re=>{var Va;let Ye=(Va=Pe==null?void 0:Pe.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0].toString())===Re.toString()}))==null?void 0:Va[Re],qa=ee==null?void 0:ee.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0])===Ye});Te.push({id:parseInt(Re),value:{tableData:qa[Ye]}})}),(Te==null?void 0:Te.length)>0)return Te}else if((ue==null?void 0:ue.comp)==="Form"){let ja=I.cloneDeep(ue);ja.compData=(wa=ja.compData)==null?void 0:wa.map(Pe=>{var xa;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(xa=Pe.contents)==null?void 0:xa.map(He=>((He==null?void 0:He.key)===(le==null?void 0:le[1])&&(He.value=(te==null?void 0:te[He==null?void 0:He.prop])||te),He))),Pe});let ee={};for(let Pe in ja)Pe!=="id"&&(ee[Pe]=ja[Pe]);let ea=[];if(ea.push({id:ue==null?void 0:ue.id,keyType:le==null?void 0:le[1],value:{pageData:ee}}),(ea==null?void 0:ea.length)>0)return ea}}},Ee=async(te,D,le)=>{var Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te;let ye=await sa.getItemData(D,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(Re=>(Re==null?void 0:Re.name)===(le==null?void 0:le[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let Re={};for(let Ye in I.cloneDeep(te))I.cloneDeep(te)[Ye]!=="loginUser"?Re[Ye]=I.cloneDeep(te)[Ye]:Re[Ye]=((Ne=x.value)==null?void 0:Ne.account)||((pa=x.value)==null?void 0:pa.账号);await yr.createInsofDataApi({key:{type:"data",pageKey:D,tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Re}})}else if((ue==null?void 0:ue.comp)==="Form"){let Re=I.cloneDeep(ue),Ye=Object.keys(te),qa="";(ja=(wa=I.cloneDeep(Re))==null?void 0:wa.compData)==null||ja.forEach(ce=>{var ma,na;(ce==null?void 0:ce.key)==="formContent"&&((na=(ma=I.cloneDeep(ce))==null?void 0:ma.contents)==null||na.forEach(Ie=>{var _e;Ye.includes(Ie==null?void 0:Ie.key)&&(Ie==null?void 0:Ie.value)===((_e=x.value)==null?void 0:_e.姓名)&&(qa=Ie==null?void 0:Ie.key)}))});let Va=[];(ee=Object.values(te[qa]))==null||ee.forEach(ce=>{ce!=null&&ce.includes("(")&&Va.push(ce)}),Va=[...new Set(Va)];const P=Va==null?void 0:Va.map(async ce=>{var Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je;let ma="";(_a=(Fe=(Qe=(Je=(ve=(Ca=I.cloneDeep(ce))==null?void 0:Ca.split("("))==null?void 0:ve[1])==null?void 0:Je.split(")"))==null?void 0:Qe[0])==null?void 0:Fe.split(":"))==null||_a.forEach(De=>{ma=ma===""?ma+De.replaceAll("'",""):ma+"/"+De.replaceAll("'","")});let na=[];(je=(K=(Se=(re=(va=(Le=I.cloneDeep(ce))==null?void 0:Le.split("<"))==null?void 0:va[1])==null?void 0:re.split(">"))==null?void 0:Se[0])==null?void 0:K.split(":"))==null||je.forEach(De=>{na.push(De.replaceAll("'",""))});const Ie=await sa.getItemData(ma,sessionStorage.getItem("systemKey"),"");let _e="";return Ie==null||Ie.forEach(De=>{var Ma;De.name===(na==null?void 0:na[0])&&((Ma=De==null?void 0:De.compData)==null||Ma.forEach(Ba=>{var Ua;(Ba==null?void 0:Ba.key)==="formContent"&&((Ua=Ba.contents)==null||Ua.forEach(Aa=>{(Aa==null?void 0:Aa.key)===(na==null?void 0:na[1])&&(_e=Aa==null?void 0:Aa.value)}))}))}),{[ce]:_e}}),F=await Promise.all(P);Re.compData=(Pe=(ea=I.cloneDeep(Re))==null?void 0:ea.compData)==null?void 0:Pe.map(ce=>{var ma,na;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(na=(ma=I.cloneDeep(ce))==null?void 0:ma.contents)==null?void 0:na.map(Ie=>{var _e,Ca,ve,Je;return(_e=te[qa])!=null&&_e[Ie==null?void 0:Ie.key]&&(te[qa][Ie==null?void 0:Ie.key].includes("(")?Ie.value=(Ca=F==null?void 0:F.find(Qe=>{var Fe;return((Fe=Object.keys(Qe))==null?void 0:Fe[0])===te[qa][Ie==null?void 0:Ie.key]}))==null?void 0:Ca[te[qa][Ie==null?void 0:Ie.key]]:Ie.value=(Je=(ve=I.cloneDeep(te))==null?void 0:ve[qa])==null?void 0:Je[Ie==null?void 0:Ie.key]),Ie})),ce});const J=await yr.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let ie="";((xa=J==null?void 0:J.data)==null?void 0:xa.type)==="success"&&((Te=(He=J==null?void 0:J.data)==null?void 0:He.result)==null||Te.forEach(ce=>{var ma,na;((na=(ma=ce==null?void 0:ce.value)==null?void 0:ma.pageData)==null?void 0:na.name)===(le==null?void 0:le[0])&&(ie=ce.id)}),await yr.updateInsofDataApi({id:ie,value:{pageData:Re}}))}}},ne=(te,D="",le={})=>{for(const[ye,ue]of Object.entries(te)){const Ne=D?`${D}.${ye}`:ye;ue!==null&&typeof ue=="object"&&!Array.isArray(ue)&&Object.prototype.toString.call(ue)!=="[object Date]"?ne(ue,Ne,le):le[Ne]=ue}return le},ke=async(te,D,le,ye)=>{var pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je;let ue=await sa.getItemData(D,sessionStorage.getItem("systemKey"),""),Ne=ue==null?void 0:ue.find(Qe=>(Qe==null?void 0:Qe.name)===(le==null?void 0:le[0]));if(Ne){if(!(le!=null&&le[1])&&(Ne==null?void 0:Ne.comp)==="Table"){let Qe={},Fe=[],_a=(wa=(pa=Ne==null?void 0:Ne.compData)==null?void 0:pa.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:wa.contents;_a!=null&&_a.every(re=>Array.isArray(re))?Fe=(ee=sa.getColumnChild((ja=_a==null?void 0:_a[0])==null?void 0:ja.filter(re=>(re==null?void 0:re.label)!=="操作")))==null?void 0:ee.map(re=>re==null?void 0:re.prop):Fe=_a==null?void 0:_a.map(re=>re==null?void 0:re.label);for(let re in I.cloneDeep(te))if(I.cloneDeep(te)[re]!=="loginUser"){let Se=ne(I.cloneDeep(te)[re]),K={};for(let je in Se)if(Fe!=null&&Fe.find(De=>De===je))K[je]=Se[je];else if(Fe!=null&&Fe.find(De=>(De==null?void 0:De.toUpperCase())===(je==null?void 0:je.toUpperCase()))){let De=Fe==null?void 0:Fe.find(Ma=>(Ma==null?void 0:Ma.toUpperCase())===(je==null?void 0:je.toUpperCase()));K[De]=Se[je]}Qe[re]=K}else Qe[re]=((ea=x.value)==null?void 0:ea.account)||((Pe=x.value)==null?void 0:Pe.账号);let Le=await yr.getInsofDataApi({keyLikes:{tableId:Ne==null?void 0:Ne.id}});if(((He=(xa=Le==null?void 0:Le.data)==null?void 0:xa.result)==null?void 0:He.length)>0){let re=(Re=(Te=Le==null?void 0:Le.data)==null?void 0:Te.result)==null?void 0:Re.map(Se=>Se==null?void 0:Se.id);(re==null?void 0:re.length)>0&&await yr.batchDeleteInsofDataApi({ids:re})}let va=[];if((Ye=Ne==null?void 0:Ne.compData)!=null&&Ye.find(re=>(re==null?void 0:re.key)==="pageColumn")&&((P=(Va=(qa=Ne==null?void 0:Ne.compData)==null?void 0:qa.find(re=>(re==null?void 0:re.key)==="pageColumn"))==null?void 0:Va.contents)!=null&&P.includes("["))){const re=await yr.getInsofDataApi({id:Ne==null?void 0:Ne.tableId});let Se=((ce=(ie=(J=(F=re==null?void 0:re.data)==null?void 0:F.result)==null?void 0:J[0])==null?void 0:ie.key)==null?void 0:ce.pageKey)??"";(ma=Object.values(Qe))==null||ma.forEach(K=>{va.push({key:{type:"data",pageKey:Se,tableId:Ne==null?void 0:Ne.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:K}})})}else(na=Object.values(Qe))==null||na.forEach(re=>{va.push({key:{type:"data",pageKey:D,tableId:Ne==null?void 0:Ne.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})});(va==null?void 0:va.length)>0&&await yr.batchAddInsofDataApi({dataList:va})}else if(!(le!=null&&le[1])&&(Ne==null?void 0:Ne.comp)==="Form"){let Qe=I.cloneDeep(Ne);Qe.compData=(_e=(Ie=I.cloneDeep(Qe))==null?void 0:Ie.compData)==null?void 0:_e.map(Le=>{var va,re;return(Le==null?void 0:Le.key)==="formContent"&&(Le.contents=(re=(va=I.cloneDeep(Le))==null?void 0:va.contents)==null?void 0:re.map(Se=>{var K,je;return(K=I.cloneDeep(te))!=null&&K[Se==null?void 0:Se.key]&&(Se.value=(je=I.cloneDeep(te))==null?void 0:je[Se==null?void 0:Se.key]),Se})),Le});const Fe=await yr.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let _a="";((Ca=Fe==null?void 0:Fe.data)==null?void 0:Ca.type)==="success"&&((Je=(ve=Fe==null?void 0:Fe.data)==null?void 0:ve.result)==null||Je.forEach(Le=>{var va,re;((re=(va=Le==null?void 0:Le.value)==null?void 0:va.pageData)==null?void 0:re.name)===(le==null?void 0:le[0])&&(_a=Le.id)}),await yr.updateInsofDataApi({id:_a,value:{pageData:Qe}}))}}},Z=async te=>{var D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te;_.setImportLoading(!0);try{if(te.api){let Re=new WeakMap,Ye=await sa.getItemData((T==null?void 0:T.value)===""?b.value:T==null?void 0:T.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re),qa="";if(Ye=Ye==null?void 0:Ye.map(na=>{var Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se;if((na==null?void 0:na.comp)==="Form")na.compData=(Ie=na.compData)==null?void 0:Ie.map(K=>{var je;return(K==null?void 0:K.key)==="formContent"&&(K.contents=(je=K.contents)==null?void 0:je.map(De=>{var Ma;if((De==null?void 0:De.value)===""&&(De==null?void 0:De.type)==="Select"){let Ba=sa.judgeContents((Ma=I.cloneDeep(De))==null?void 0:Ma.optionUrl,Re);De.value=De.value||Ba}return De})),K});else if((na==null?void 0:na.comp)==="Table"&&(_e=na.compData)!=null&&_e.find(K=>(K==null?void 0:K.key)==="pageColumn")){let K=(ve=(Ca=na.compData)==null?void 0:Ca.find(Ba=>(Ba==null?void 0:Ba.key)==="pageColumn"))==null?void 0:ve.contents,je=((Qe=(Je=na.compData)==null?void 0:Je.find(Ba=>(Ba==null?void 0:Ba.key)==="pageGroup"))==null?void 0:Qe.contents)??"",De=(Le=(_a=(Fe=K==null?void 0:K.split("["))==null?void 0:Fe[1])==null?void 0:_a.split("]"))==null?void 0:Le[0];qa=((va=K==null?void 0:K.split("["))==null?void 0:va[0])+((Se=(re=A.value)==null?void 0:re.find(Ba=>(Ba==null?void 0:Ba.key)===De))==null?void 0:Se.value)}return na}),!(qa===""||qa==="")){const na=await sa.getItemData(qa,sessionStorage.getItem("systemKey"),"",!1,"","",Re);Ye=Ye==null?void 0:Ye.map(Ie=>{var _e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je;if((Ie==null?void 0:Ie.comp)==="Table"&&(_e=Ie.compData)!=null&&_e.find(De=>(De==null?void 0:De.key)==="pageColumn")){let De=(ve=(Ca=Ie.compData)==null?void 0:Ca.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn"))==null?void 0:ve.contents,Ma=((Qe=(Je=Ie.compData)==null?void 0:Je.find(Ae=>(Ae==null?void 0:Ae.key)==="pageGroup"))==null?void 0:Qe.contents)??"",Ba=(Le=(_a=(Fe=De==null?void 0:De.split("["))==null?void 0:Fe[1])==null?void 0:_a.split("]"))==null?void 0:Le[0],Ua=((va=De==null?void 0:De.split("["))==null?void 0:va[0])+((Se=(re=A.value)==null?void 0:re.find(Ae=>(Ae==null?void 0:Ae.key)===Ba))==null?void 0:Se.value),Aa=(K=na==null?void 0:na.find(Ae=>(Ae==null?void 0:Ae.name)===(Ma===""?s==null?void 0:s.compName:Ma)))==null?void 0:K.compData;Ie.compData=(je=Ie.compData)==null?void 0:je.map(Ae=>{var we;return(Ae==null?void 0:Ae.key)==="tableContents"&&(Ae.contents=(we=Aa==null?void 0:Aa.find(Ea=>(Ea==null?void 0:Ea.key)==="tableContents"))==null?void 0:we.contents),Ae})}return Ie})}let Va={};if(((le=(D=te==null?void 0:te.extraValues)==null?void 0:D.input)==null?void 0:le.length)>0){const na=(ue=(ye=te==null?void 0:te.extraValues)==null?void 0:ye.input)==null?void 0:ue.map(async Ie=>{var _e;de!=null&&de.find(Ca=>Ca===Ie)?Va=await be(Ie,Ye):Va[Object.keys(Ie)[0]]=await be((_e=Object.values(Ie))==null?void 0:_e[0],Ye,Re)});await Promise.all(na)}else Va=await be("/",Ye);let P=!1;(pa=(Ne=te==null?void 0:te.extraValues)==null?void 0:Ne.output)==null||pa.forEach(na=>{var Ie,_e;(_e=(Ie=Object.values(na))==null?void 0:Ie[0])!=null&&_e.includes(".doc")&&(P=!0)});let F;if(P){const na=I.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});F=await el.axios.post(te.api,Va,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{na.close()})}else F=await el.axios.post(te.api,Va,{headers:{"Content-Type":"application/json"}});let J=(ea=(ee=(ja=(wa=I.cloneDeep(te))==null?void 0:wa.extraValues)==null?void 0:ja.output)==null?void 0:ee.map(na=>{var Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma;if(!((_e=(Ie=Object.values(na))==null?void 0:Ie[0])!=null&&_e.includes(".doc"))){let Ba=(va=(Le=(_a=(ve=I.cloneDeep((Ca=Object.values(na))==null?void 0:Ca[0]))==null?void 0:ve.split("["))==null?void 0:_a[((Fe=(Qe=I.cloneDeep((Je=Object.values(na))==null?void 0:Je[0]))==null?void 0:Qe.split("["))==null?void 0:Fe.length)-1])==null?void 0:Le.split("]"))==null?void 0:va[0],Ua=Ba==null?void 0:Ba.split(":"),Aa=(K=I.cloneDeep((re=Object.values(na))==null?void 0:re[0]))==null?void 0:K.substring(0,I.cloneDeep((Se=Object.values(na))==null?void 0:Se[0]).lastIndexOf("["));if(Aa=(De=I.cloneDeep(Aa))==null?void 0:De.slice(0,((je=I.cloneDeep(Aa))==null?void 0:je.length)-1),Aa!=null&&Aa.includes("[")){let Ae="";if((Ma=sa.contentTransArrayToAll(Aa,"/"))==null||Ma.forEach(we=>{var Ea,Ge,ol,Sl,Nl,Ra,al;if(!(we!=null&&we.includes("[")))Ae=Ae===""?Ae+we.replaceAll("/",""):Ae+"/"+we.replaceAll("/","");else{let ga=I.cloneDeep(we).slice(1,((Ea=I.cloneDeep(we))==null?void 0:Ea.length)-1),qe=(Ra=(Nl=(Sl=(ol=(Ge=I.cloneDeep(ga))==null?void 0:Ge.split("["))==null?void 0:ol[1])==null?void 0:Sl.split("]"))==null?void 0:Nl[0])==null?void 0:Ra.split(":"),rl="",da=(al=Ye==null?void 0:Ye.find(Xe=>(Xe==null?void 0:Xe.name)===(qe==null?void 0:qe[0])))==null?void 0:al.compData;da==null||da.forEach(Xe=>{var oa;(Xe==null?void 0:Xe.key)==="formContent"&&((oa=Xe==null?void 0:Xe.contents)==null||oa.forEach(aa=>{(aa==null?void 0:aa.key)===(qe==null?void 0:qe[1])&&(rl=aa==null?void 0:aa.value)}))}),Ae=Ae===""?Ae+rl.replaceAll("/",""):Ae+"/"+rl.replaceAll("/","")}}),Aa=Ae,Aa[(Aa==null?void 0:Aa.length)-1]!=="/")return Aa}}}))==null?void 0:ea.filter(na=>na);J=[...new Set(I.cloneDeep(J))];let ie=J==null?void 0:J.map(async na=>{let Ie=await sa.getItemData(na,sessionStorage.getItem("systemKey"),"",!1,"","",Re);if((Ie==null?void 0:Ie.length)===0)return await sa.getParentContents(na)});await Promise.all(ie);let ce=[],ma=(He=(xa=(Pe=I.cloneDeep(te))==null?void 0:Pe.extraValues)==null?void 0:xa.output)==null?void 0:He.map(async na=>{var _a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl,Ra,al,ga,qe,rl,da,Xe,oa,aa,ca,W,la,ka,Ce,Be,Fa,me,fl,Ja,kl,Ha,tl,Za,cl,ul,Wl,ql,Pl,Hl,gr,rr,kr,wr,Sr,un,Jr,dn,Xr,qr,pn,tn,Dr,Zr,Br,Il,Wr,Nr,vn,tt,Kn,In;if((Le=(_a=Object.values(na))==null?void 0:_a[0])!=null&&Le.includes(".doc")){var Ie=new Blob([F.data],{type:"application/octet-stream;charset=UTF-8"}),_e=F.headers["content-disposition"],Ca=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ve=Ca.exec(_e),Je=ve==null?void 0:ve[1],Qe=document.createElement("a"),Fe=window.URL.createObjectURL(Ie);g.value=[{name:Je,blobUrl:Fe}],c.value=!0}else{let mn=(Ba=(Ma=(De=(re=I.cloneDeep((va=Object.values(na))==null?void 0:va[0]))==null?void 0:re.split("["))==null?void 0:De[((je=(K=I.cloneDeep((Se=Object.values(na))==null?void 0:Se[0]))==null?void 0:K.split("["))==null?void 0:je.length)-1])==null?void 0:Ma.split("]"))==null?void 0:Ba[0],Zl=mn==null?void 0:mn.split(":"),xr=(Ae=I.cloneDeep((Ua=Object.values(na))==null?void 0:Ua[0]))==null?void 0:Ae.substring(0,I.cloneDeep((Aa=Object.values(na))==null?void 0:Aa[0]).lastIndexOf("["));if(xr!=null&&xr.includes("[")?xr=(Ea=I.cloneDeep(xr))==null?void 0:Ea.slice(0,((we=I.cloneDeep(xr))==null?void 0:we.length)-1):xr===""&&(xr=b.value),xr=xr.replaceAll("<","[").replaceAll(">","]"),xr!=null&&xr.includes("[")){let jl="";(Ge=sa.contentTransArrayToAll(xr,"/"))==null||Ge.forEach((zl,cr)=>{var ar,$l,zr,Mr,yn,Qr,Yn,En,Gn,gn,Dn;if(!(zl!=null&&zl.includes("[")))jl=jl===""?jl+zl.replaceAll("/",""):jl+"/"+zl.replaceAll("/","");else{let Ln="",Kr="";(ar=I.cloneDeep(zl))!=null&&ar.includes("]")?(Ln=I.cloneDeep(zl).slice(1,(($l=I.cloneDeep(zl))==null?void 0:$l.length)-1),Kr=(Yn=(Qr=(yn=(Mr=(zr=I.cloneDeep(Ln))==null?void 0:zr.split("["))==null?void 0:Mr[1])==null?void 0:yn.split("]"))==null?void 0:Qr[0])==null?void 0:Yn.split(":")):(Ln=I.cloneDeep(zl).slice(1,(En=I.cloneDeep(zl))==null?void 0:En.length),Kr=(Gn=I.cloneDeep(Ln))==null?void 0:Gn.split("/"));let Bn="",bn=(gn=Ye==null?void 0:Ye.find(Pr=>(Pr==null?void 0:Pr.name)===(Kr==null?void 0:Kr[0])))==null?void 0:gn.compData;bn==null||bn.forEach(Pr=>{var Vn;(Pr==null?void 0:Pr.key)==="formContent"&&((Vn=Pr==null?void 0:Pr.contents)==null||Vn.forEach(fn=>{(fn==null?void 0:fn.key)===(Kr==null?void 0:Kr[1])&&(Bn=fn==null?void 0:fn.value)}))}),((Dn=sa.contentTransArrayToAll(xr,"/"))==null?void 0:Dn.length)-1!==cr?jl=jl===""?jl+Bn.replaceAll("/",""):jl+"/"+Bn.replaceAll("/",""):jl=jl+t.value+Bn.replaceAll("/","")}}),(ol=b.value)!=null&&ol.includes(jl)?xr=b.value:xr=jl}let Vl=I.cloneDeep((Sl=Object.keys(na))==null?void 0:Sl[0]);if(((Nl=F==null?void 0:F.data)==null?void 0:Nl.statusCode)===200||((Ra=F==null?void 0:F.data)==null?void 0:Ra.code)===200){if(((ga=(al=F==null?void 0:F.data)==null?void 0:al.data)!=null&&ga[Vl]||(rl=(qe=F==null?void 0:F.data)==null?void 0:qe.result)!=null&&rl[Vl])&&(Zl==null?void 0:Zl.length)===1)return await ke(((Xe=(da=F==null?void 0:F.data)==null?void 0:da.data)==null?void 0:Xe[Vl])||((aa=(oa=F==null?void 0:F.data)==null?void 0:oa.result)==null?void 0:aa[Vl]),I.cloneDeep(xr),Zl,qa);if((W=(ca=F==null?void 0:F.data)==null?void 0:ca.data)!=null&&W[Vl]||(ka=(la=F==null?void 0:F.data)==null?void 0:la.result)!=null&&ka[Vl]){let jl=await ze(((Be=(Ce=F==null?void 0:F.data)==null?void 0:Ce.data)==null?void 0:Be[Vl])||((me=(Fa=F==null?void 0:F.data)==null?void 0:Fa.result)==null?void 0:me[Vl]),I.cloneDeep(xr),Zl);return jl&&(ce=[...ce,...jl]),jl}else{if(!((fl=F==null?void 0:F.data)!=null&&fl.data)){let jl=await sa.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re);jl=jl==null?void 0:jl.map(cr=>{var ar;return(cr==null?void 0:cr.name)===(Zl==null?void 0:Zl[0])&&(cr.compData=(ar=cr.compData)==null?void 0:ar.map($l=>{var zr;return($l==null?void 0:$l.key)==="formContent"&&($l.contents=(zr=$l.contents)==null?void 0:zr.map(Mr=>{var yn,Qr;return(Mr==null?void 0:Mr.key)===(Zl==null?void 0:Zl[1])&&(Mr.value=(Qr=(yn=F==null?void 0:F.data)==null?void 0:yn.result)==null?void 0:Qr[Vl==null?void 0:Vl.replaceAll(":","")]),Mr})),$l})),cr});let zl=[];(Ja=jl==null?void 0:jl.filter(cr=>(cr==null?void 0:cr.comp)==="Form"))==null||Ja.forEach(async cr=>{let ar={};for(let $l in cr)$l!=="id"&&(ar[$l]=cr[$l]);zl.push({id:cr==null?void 0:cr.id,value:{pageData:ar}})}),(zl==null?void 0:zl.length)>0&&await yr.batchUpdateInsofDataApi({dataList:zl});return}if((Zl==null?void 0:Zl.length)===1){const jl=(tl=(Ha=(kl=F==null?void 0:F.data)==null?void 0:kl.data)==null?void 0:Ha.path)==null?void 0:tl.path;let zl="";(ql=(Wl=(ul=(cl=(Za=jl==null?void 0:jl.split("("))==null?void 0:Za[1])==null?void 0:cl.split(")"))==null?void 0:ul[0])==null?void 0:Wl.split(":"))==null||ql.forEach($l=>{var zr,Mr;zl=zl===""?zl+((zr=$l==null?void 0:$l.replaceAll("'",""))==null?void 0:zr.trim()):zl+"/"+((Mr=$l==null?void 0:$l.replaceAll("'",""))==null?void 0:Mr.trim())});let cr=[(kr=(rr=(gr=(Hl=(Pl=jl==null?void 0:jl.split("<"))==null?void 0:Pl[1])==null?void 0:Hl.split(">"))==null?void 0:gr[0])==null?void 0:rr.replaceAll("'",""))==null?void 0:kr.trim()],ar;return(un=(Sr=(wr=F==null?void 0:F.data)==null?void 0:wr.data)==null?void 0:Sr.data)!=null&&un[Zl==null?void 0:Zl[0]]?ar=await ke((Xr=(dn=(Jr=F==null?void 0:F.data)==null?void 0:Jr.data)==null?void 0:dn.data)==null?void 0:Xr[Zl==null?void 0:Zl[0]],zl,Zl,qa):ar=await Ee((pn=(qr=F==null?void 0:F.data)==null?void 0:qr.data)==null?void 0:pn.data,zl,cr,Re),ar}else{const jl=(Zr=(Dr=(tn=F==null?void 0:F.data)==null?void 0:tn.data)==null?void 0:Dr.path)==null?void 0:Zr.path;let zl="";return(vn=(Nr=(Wr=(Il=(Br=jl==null?void 0:jl.split("("))==null?void 0:Br[1])==null?void 0:Il.split(")"))==null?void 0:Wr[0])==null?void 0:Nr.split(":"))==null||vn.forEach(ar=>{var $l,zr;zl=zl===""?zl+(($l=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:$l.trim()):zl+"/"+((zr=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:zr.trim())}),await ze((In=(Kn=(tt=F==null?void 0:F.data)==null?void 0:tt.data)==null?void 0:Kn.data)==null?void 0:In[Zl==null?void 0:Zl[0]],zl,Zl)}}}}});if(await Promise.all(ma),(ce==null?void 0:ce.length)>0){let na=[];ce==null||ce.forEach(Ca=>{na!=null&&na.find(ve=>{var Je,Qe,Fe,_a;return((Qe=(Je=ve==null?void 0:ve.value)==null?void 0:Je.pageData)==null?void 0:Qe.name)===((_a=(Fe=Ca==null?void 0:Ca.value)==null?void 0:Fe.pageData)==null?void 0:_a.name)})||na.push(Ca)});let Ie=[];na==null||na.forEach(Ca=>{var Qe,Fe,_a,Le;let ve=I.cloneDeep(Ca);ve.value.pageData.compData=(Qe=ve.value.pageData.compData)==null?void 0:Qe.map(va=>{var re;return(va==null?void 0:va.key)==="formContent"&&(va.contents=(re=va.contents)==null?void 0:re.map(Se=>{var je,De,Ma,Ba;let K=(je=I.cloneDeep(ce))==null?void 0:je.find(Ua=>(Ua==null?void 0:Ua.keyType)===(Se==null?void 0:Se.key));if(K){let Ua=(Ba=(Ma=(De=K.value.pageData.compData)==null?void 0:De.find(Aa=>(Aa==null?void 0:Aa.key)==="formContent"))==null?void 0:Ma.contents)==null?void 0:Ba.find(Aa=>(Aa==null?void 0:Aa.key)===(Se==null?void 0:Se.key));Se.value=Ua==null?void 0:Ua.value}return Se})),va}),Ie.push({id:ve==null?void 0:ve.id,value:ve==null?void 0:ve.value});let Je=[];(Le=(_a=(Fe=ve==null?void 0:ve.value)==null?void 0:Fe.pageData)==null?void 0:_a.compData)==null||Le.forEach(va=>{var re;(va==null?void 0:va.key)==="formContent"&&((re=va==null?void 0:va.contents)==null||re.forEach(Se=>{var K,je,De,Ma,Ba,Ua;if((je=(K=Se==null?void 0:Se.optionUrl)==null?void 0:K.menuSelect)!=null&&je.find(Aa=>Aa==null?void 0:Aa.includes("[")))if(Je!=null&&Je.find(Aa=>{var Ae,we,Ea;return((Ae=Aa==null?void 0:Aa.key)==null?void 0:Ae.join(","))===((Ea=(we=Se==null?void 0:Se.optionUrl)==null?void 0:we.menuSelect)==null?void 0:Ea.join(","))})){let Aa=(De=Je==null?void 0:Je.find(Ae=>{var we,Ea,Ge;return((we=Ae==null?void 0:Ae.key)==null?void 0:we.join(","))===((Ge=(Ea=Se==null?void 0:Se.optionUrl)==null?void 0:Ea.menuSelect)==null?void 0:Ge.join(","))}))==null?void 0:De.value;Aa.push({key:Se==null?void 0:Se.prop,groups:(Ma=Se==null?void 0:Se.optionUrl)==null?void 0:Ma.groupSelect,value:Se==null?void 0:Se.value}),Je=Je==null?void 0:Je.map(Ae=>{var we,Ea,Ge;return((we=Ae==null?void 0:Ae.key)==null?void 0:we.join(","))===((Ge=(Ea=Se==null?void 0:Se.optionUrl)==null?void 0:Ea.menuSelect)==null?void 0:Ge.join(","))&&(Ae.value=Aa),Ae})}else Je.push({key:(Ba=Se==null?void 0:Se.optionUrl)==null?void 0:Ba.menuSelect,value:[{key:Se==null?void 0:Se.prop,groups:(Ua=Se==null?void 0:Se.optionUrl)==null?void 0:Ua.groupSelect,value:Se==null?void 0:Se.value}]})}))}),(Je==null?void 0:Je.length)>0&&(Je=Je==null?void 0:Je.map(va=>{var Se;let re="";return(Se=va==null?void 0:va.key)==null||Se.forEach(K=>{var je;if(!(K!=null&&K.includes("[")))re=re===""?re+K:re+"/"+K;else{let De="",Ma=(je=K==null?void 0:K.replaceAll("[","").replaceAll("]",""))==null?void 0:je.split(":");Ye==null||Ye.forEach(Ba=>{var Ua;(Ba==null?void 0:Ba.name)===(Ma==null?void 0:Ma[0])&&((Ua=Ba==null?void 0:Ba.compData)==null||Ua.forEach(Aa=>{var Ae;(Aa==null?void 0:Aa.key)==="formContent"&&((Ae=Aa==null?void 0:Aa.contents)==null||Ae.forEach(we=>{(we==null?void 0:we.prop)===(Ma==null?void 0:Ma[1])&&(De=we==null?void 0:we.value)}))}))}),re=re+t.value+De}}),va.key=re,va})),Je==null||Je.forEach(va=>{var je,De,Ma;let re=(je=Re[va.key])==null?void 0:je.find(Ba=>{var Ua,Aa,Ae,we,Ea,Ge,ol;return((Aa=(Ua=Ba==null?void 0:Ba.value)==null?void 0:Ua.pageData)==null?void 0:Aa.name)===((Ea=(we=(Ae=va==null?void 0:va.value)==null?void 0:Ae[0])==null?void 0:we.groups)==null?void 0:Ea[0])&&((ol=(Ge=Ba==null?void 0:Ba.value)==null?void 0:Ge.pageData)==null?void 0:ol.name)!==void 0}),Se=re==null?void 0:re.id,K=(De=re==null?void 0:re.value)==null?void 0:De.pageData;K.compData=(Ma=K.compData)==null?void 0:Ma.map(Ba=>{var Ua;return(Ba==null?void 0:Ba.key)==="formContent"&&(Ba.contents=(Ua=Ba.contents)==null?void 0:Ua.map(Aa=>{var we;let Ae=(we=va.value)==null?void 0:we.find(Ea=>(Ea==null?void 0:Ea.key)===(Aa==null?void 0:Aa.prop));return Ae&&(Aa.value=Ae.value),Aa})),Ba}),Ie.push({id:Se,value:{pageData:K}})})});let _e=(Te=I.cloneDeep(ce))==null?void 0:Te[0];(Ie==null?void 0:Ie.length)>0&&await yr.batchUpdateInsofDataApi({dataList:Ie})}m.setFreshContent(!0)}_.setImportLoading(!1)}catch{el.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}k.value=!0},de=["createInsofDataApi"],Ke=La.debounce(async te=>{Z(te)},100),Na=async te=>{var pa,wa,ja;const D=I.cloneDeep(te);let le,ye=new WeakMap;te!=null&&te[0].path&&(le=await(D==null?void 0:D.map(async(ee,ea)=>{var Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a;const xa=(Va=ye[ee==null?void 0:ee.path])==null?void 0:Va.filter(Le=>{var va;return((va=Le==null?void 0:Le.key)==null?void 0:va.type)==="data"});let He="";const Te=await sa.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);xa==null||xa.forEach(Le=>{var va,re,Se,K,je;((re=(va=Le==null?void 0:Le.value)==null?void 0:va.tableData)==null?void 0:re.算法名称)===((Se=D==null?void 0:D[ea])==null?void 0:Se.method)&&(He=(je=(K=Le==null?void 0:Le.value)==null?void 0:K.tableData)==null?void 0:je.算法体)});const Re=await sa.getItemData(ee==null?void 0:ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);let Ye="",qa=(ie=(J=(F=(P=Re==null?void 0:Re[0])==null?void 0:P.compData)==null?void 0:F.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:J.contents)==null?void 0:ie.findIndex(Le=>(Le==null?void 0:Le.prop)==="算法体");return(ma=(ce=Re==null?void 0:Re[0])==null?void 0:ce.compData)==null||ma.forEach(Le=>{var va;(Le==null?void 0:Le.key)==="tableContents"&&((va=Le==null?void 0:Le.contents)==null||va.forEach(re=>{re!=null&&re.find(Se=>Se===(ee==null?void 0:ee.method))&&(Ye=re[qa])}))}),{buttonName:((na=D==null?void 0:D[ea])==null?void 0:na.method)||((Ca=(_e=(Ie=xa==null?void 0:xa[0])==null?void 0:Ie.value)==null?void 0:_e.tableData)==null?void 0:Ca.算法名称),api:(He===""?(Qe=(Je=(ve=xa==null?void 0:xa[0])==null?void 0:ve.value)==null?void 0:Je.tableData)==null?void 0:Qe.算法体:He)||Ye,content:Te==null?void 0:Te.filter(Le=>Le.comp!=="methodButton"),extraContent:(Fe=I.cloneDeep(ee.value))==null?void 0:Fe.slice(1),methodName:(ee==null?void 0:ee.path)??"",extraValues:(_a=D==null?void 0:D[ea])==null?void 0:_a.data}})));const ue=D==null?void 0:D.map(async ee=>{var Re,Ye,qa,Va,P,F;const ea=(Re=resAll.data.result)==null?void 0:Re.filter(J=>{var ie,ce,ma;return((ie=J==null?void 0:J.key)==null?void 0:ie.parentTable)===""&&((ce=J==null?void 0:J.key)==null?void 0:ce.type)==="method"&&((ma=J==null?void 0:J.key)==null?void 0:ma.methodName)===J.method}),Pe=ea==null?void 0:ea[0],xa=(Ye=resAll.data.result)==null?void 0:Ye.filter(J=>{var ie,ce;return((ie=J==null?void 0:J.key)==null?void 0:ie.type)==="methodData"&&((ce=J==null?void 0:J.key)==null?void 0:ce.tableId)===(Pe==null?void 0:Pe.id)}),He=await sa.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye),Te=xa==null?void 0:xa[0];return{buttonName:(qa=Pe==null?void 0:Pe.key)==null?void 0:qa.methodKey,api:(P=(Va=Te==null?void 0:Te.value)==null?void 0:Va.tableData)==null?void 0:P[0],content:He==null?void 0:He.filter(J=>J.comp!=="methodButton"),extraContent:(F=I.cloneDeep(ee.value))==null?void 0:F.slice(1),methodName:(ee==null?void 0:ee.method)??""}}),Ne=(pa=te==null?void 0:te[0])!=null&&pa.path&&((wa=te==null?void 0:te[0])==null?void 0:wa.path)!==""?await Promise.all(le):await Promise.all(ue);r.value=Ne==null?void 0:Ne.filter(ee=>ee==null?void 0:ee.extraContent),(ja=r.value)==null||ja.forEach(ee=>{var ea;ee.api===""&&((ea=ee.content)==null||ea.forEach(Pe=>{var xa;Pe.comp=="Table"&&m.setExtraContents(sa.methodTableToContent(Pe.compData,(xa=ee.extraContent)==null?void 0:xa[0]))}))})};return a.watch(()=>s.itemData,async()=>{w.value=="view"&&!k.value&&await Na(I.cloneDeep(s.itemData)),k.value=!1},{immediate:!0,deep:!0}),(te,D)=>{var le,ye,ue;return a.unref(w)!=="edit"?(a.openBlock(),a.createElementBlock("div",B2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((le=r.value)==null?void 0:le.filter(Ne=>(Ne==null?void 0:Ne.buttonName)!=="保存"),Ne=>{var pa;return a.openBlock(),a.createElementBlock("div",null,[Ne.api!==""?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,disabled:a.unref(N)===a.unref(b)&&!((pa=Ne==null?void 0:Ne.buttonName)!=null&&pa.includes("预览")),class:"calculator-content",modelValue:Ne.buttonName,onClickTrigger:wa=>a.unref(Ke)(Ne),loading:u.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(j)!==""&&((ue=a.unref(b))==null?void 0:ue[((ye=a.unref(b))==null?void 0:ye.length)-1])!==a.unref(t)?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,class:"calculator-content",onClickTrigger:$,modelValue:"保存"})):a.createCommentVNode("",!0)]),c.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:0,fileDataList:g.value,onDestroy:U},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},T2=Ul._export_sfc(N2,[["__scopeId","data-v-063aa9af"]]),A2={};function z2(l,r){return" 567 "}const M2=Ul._export_sfc(A2,[["render",z2]]),O2={class:"module content"},I2={class:"module data"},L2={class:"module layout"},V2={class:"form-content"},R2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),c=a.ref("create"),g=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.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}]),v=a.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:""}]),m=a.ref({}),u=a.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:u.value},{key:"signConfig",contents:m.value}]}),S=A=>{var N;m.value=I.cloneDeep(A),t("change",(N=_())==null?void 0:N.compData)},z=A=>{var N,Y;if((A==null?void 0:A.buttonName)==="确认"){const b=I.cloneDeep(A==null?void 0:A.content);switch(c.value){case"create":u.value.push({...b,index:((N=u.value)==null?void 0:N.length)+1});break}t("change",(Y=_())==null?void 0:Y.compData),s.visible=!1}else s.visible=!1},w=(A,N)=>{var Y,b;switch(A){case"create":(Y=v.value)==null||Y.forEach(L=>{L.value=""}),c.value="create",s.visible=!0;break;case"update":(b=v.value)==null||b.forEach(L=>{L.value=N[L==null?void 0:L.prop]}),c.value="update",s.visible=!0;break;case"delete":u.value.splice(N,1),c.value="delete";break}},j=()=>{s.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,A=>{var N,Y;A&&(m.value=((N=A==null?void 0:A.find(b=>b.key==="signConfig"))==null?void 0:N.contents)??{},u.value=((Y=A==null?void 0:A.find(b=>b.key==="signTypeList"))==null?void 0:Y.contents)??[])},{immediate:!0}),(A,N)=>{const Y=a.resolveComponent("svg-icon"),b=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",O2,[N[2]||(N[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(b,{class:"module-icon",id:"themeButton",onClick:N[0]||(N[0]=L=>w("create"))},{icon:a.withCtx(()=>[a.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[N[1]||(N[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",I2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(L,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString(L==null?void 0:L.label),1),a.createElementVNode("div",null,[a.createVNode(b,{type:"primary",size:"small",onClick:x=>w("update",{...L,index:T+1})},{default:a.withCtx(()=>N[3]||(N[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(b,{type:"danger",size:"small",onClick:x=>w("delete",T)},{default:a.withCtx(()=>N[4]||(N[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",L2,[a.createVNode(pl.ssForm,{rowContents:h.value,onChange:S},null,8,["rowContents"])])]),a.createVNode(vr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:j,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",V2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),$2=Ul._export_sfc(R2,[["__scopeId","data-v-487e0536"]]),P2=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(0),c=a.computed(()=>{var _,S;return(_=n==null?void 0:n.stepConfig)!=null&&_.allowTrigger?s.value:(S=n==null?void 0:n.stepConfig)==null?void 0:S.active}),g=(_,S)=>{s.value=S-1,t("clickStep",_,S)};a.onMounted(()=>{var _;t("clickStep",(_=n==null?void 0:n.stepList)==null?void 0:_[0],0)});const h=_=>pl.getComponent(_),v=()=>{var S;const _=(S=n==null?void 0:n.stepList)==null?void 0:S.find((z,w)=>w+1===c.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},m=_=>{t("clickTrigger",_)},u=_=>{t("changeTrigger",_)};return(_,S)=>{var j,A,N,Y,b;const z=a.resolveComponent("el-step"),w=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(w,{direction:(j=l.stepConfig)==null?void 0:j.direction,active:c.value,"finish-status":"success",simple:(A=l.stepConfig)==null?void 0:A.simple,"align-center":((N=l.stepConfig)==null?void 0:N.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,(L,T)=>(a.openBlock(),a.createBlock(z,{key:T,class:"step-item",onClick:x=>g(L,T+1)},{title:a.withCtx(()=>[a.renderSlot(_.$slots,"title",{title:L==null?void 0:L.title},void 0,!0)]),description:a.withCtx(()=>[a.renderSlot(_.$slots,"description",{descriptions:L==null?void 0:L.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(Y=l.stepConfig)!=null&&Y.allowTrigger&&((b=l.stepConfig)!=null&&b.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(v(),(L,T)=>(a.openBlock(),a.createElementBlock("div",{key:T,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(h(L==null?void 0:L.type)),{modelValue:L.value,"onUpdate:modelValue":x=>L.value=x,onClickTrigger:m,onChangeTrigger:u,content:L==null?void 0:L.content},a.createSlots({_:2},[a.renderList(_.$slots,(x,k)=>({name:k,fn:a.withCtx($=>[a.renderSlot(_.$slots,k,a.mergeProps({ref_for:!0},$||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),F2=Ul._export_sfc(P2,[["__scopeId","data-v-fdbd6832"]]),j2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:r}){const n=l,t=r,s=a.ref({}),c=a.ref([]),g=(h,v)=>{t("clickStep",h,v)};return a.watch(()=>n==null?void 0:n.itemData,h=>{var _,S,z,w;s.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let v=((_=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="stepName"))==null?void 0:_.contents)??[],m=[];(z=(S=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:S.contents)==null||z.forEach(j=>{m.push({label:j==null?void 0:j.label,prop:j==null?void 0:j.prop,name:j==null?void 0:j.prop,type:"text",disabled:!0})});let u=((w=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:w.contents)??[];v=v==null?void 0:v.map((j,A)=>{let N=m==null?void 0:m.map(Y=>{var b;return{...Y,value:(b=u==null?void 0:u[A])==null?void 0:b[Y==null?void 0:Y.prop]}});return{title:j,description:N}}),c.value=v},{immediate:!0,deep:!0}),(h,v)=>{const m=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(F2,{stepConfig:s.value,stepList:c.value,onClickStep:g},{icon:a.withCtx(()=>[a.createVNode(m,{name:"import"})]),title:a.withCtx(({title:u})=>[a.createTextVNode(a.toDisplayString(u),1)]),description:a.withCtx(({descriptions:u})=>[a.createVNode(pl.ssForm,{ref:"formRef",rowContents:u,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),H2=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(r,n)=>{const t=a.resolveComponent("el-timeline-item"),s=a.resolveComponent("el-timeline");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.activities,(c,g)=>(a.openBlock(),a.createBlock(t,{key:g,timestamp:c.timestamp,placement:l.timeLineConfig.placement,center:l.timeLineConfig.isCenter,"hide-timestamp":!0,type:l.timeLineConfig.type,color:l.timeLineConfig.color,size:l.timeLineConfig.size,icon:l.timeLineConfig.icon,hollow:l.timeLineConfig.isHollow},{default:a.withCtx(()=>[a.renderSlot(r.$slots,"content",{content:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),U2=Ul._export_sfc(H2,[["__scopeId","data-v-4172a886"]]),q2={class:"line-content"},W2={class:"line-time"},K2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const r=l,n=a.ref({}),t=a.ref([]);return a.watch(()=>r==null?void 0:r.itemData,s=>{var c,g;t.value=(c=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:c.contents,n.value=(g=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:g.contents},{immediate:!0}),(s,c)=>(a.openBlock(),a.createBlock(U2,{activities:t.value,timeLineConfig:n.value},{content:a.withCtx(({content:g,timestamp:h})=>[a.createElementVNode("span",q2,a.toDisplayString(g),1),a.createElementVNode("span",W2,a.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),Y2=Ul._export_sfc(K2,[["__scopeId","data-v-b4d9deed"]]),G2={class:"tabs-content"},J2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(l,{emit:r}){const n=l,t=r,s=a.ref();a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const c=S=>{t("change",S)},g=(S,z)=>{t("contentChange",S,z)},h=S=>{t("pageChange",S)},v=S=>{t("rowClick",S)},m=(S,z)=>{t("routeUrl",S,z)},u=S=>{t("clickTrigger",S)},_=(S,z)=>{t("clickMainKey",S,z)};return(S,z)=>{var w,j;return a.openBlock(),a.createElementBlock("div",G2,[(w=s.value)!=null&&w.length?(a.openBlock(),a.createBlock(pl.ssTab,{tabsContents:s.value,key:(j=s.value)==null?void 0:j.length},{pane:a.withCtx(({tab:A,index:N})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)(A==null?void 0:A.comp)),{related:A==null?void 0:A.relatedTables,compNames:n==null?void 0:n.compNames,compName:A==null?void 0:A.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:l.isDevMode,itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,onChange:c,index:(A==null?void 0:A.id)??N,config:{showIndex:A==null?void 0:A.showIndex,allowMove:A==null?void 0:A.allowMove,viewport:A==null?void 0:A.viewport},onContentChange:g,onPageChange:h,onRowClick:v,onRouteUrl:m,parentTableId:A==null?void 0:A.tableId,allMapContents:l.allMapContents,children:A==null?void 0:A.children,level:1,onClickTrigger:u,onClickMainKey:_},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):a.createCommentVNode("",!0)])}}}),X2=Ul._export_sfc(J2,[["__scopeId","data-v-ded4e0d9"]]),Z2={class:"type-select"},Q2=["onClick"],eh={class:"list-icon"},ah={__name:"modelSelect",setup(l){const r=Wn(I.pinia),{itemData:n}=I.storeToRefs(r),t=s=>{const c=I.cloneDeep(n.value);c.push({comp:s.comp,name:s.name,compData:[]}),r.setItemData(c)};return(s,c)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",Z2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(qc),(h,v)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:v},[a.createElementVNode("div",{class:"list-content",onClick:m=>t(h)},[a.createElementVNode("div",eh,[a.createVNode(g,{name:h.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(h.name),1)],8,Q2)]))),128))])}}},lh=Ul._export_sfc(ah,[["__scopeId","data-v-91799bf8"]]),rh={class:"fill-content"},nh={class:"operate-content"},th={class:"collapse-title-content"},oh={class:"collapse-title-item"},ih={key:1},sh=["onClick"],ch={class:"icon-content"},uh={key:0,class:"edit-content"},dh=["onClick"],ph={class:"comp-child"},fh={__name:"modelFill",setup(l){const r=Wn(I.pinia),{itemData:n,originalData:t}=I.storeToRefs(r),s=a.ref([]);a.ref([]);const c=a.ref([]),g=a.ref([]),h=z=>{var j;let w=(j=I.cloneDeep(g.value))==null?void 0:j.map((A,N)=>(z===N&&(A.content=!0),A));g.value=w},v=z=>{var j;let w=(j=I.cloneDeep(g.value))==null?void 0:j.map((A,N)=>(z===N&&(A.content=!1),A));g.value=w,s.value=I.cloneDeep(n.value)},m=(z,w)=>{var Y;let j=(Y=I.cloneDeep(g.value))==null?void 0:Y.map((b,L)=>(z===L&&(b.content=!1),b));g.value=j;const A=I.cloneDeep(n.value),N=A==null?void 0:A.filter((b,L)=>(L===z&&(b.name=w),b));r.setOriginalData(N),r.setItemData(N)};a.watch(()=>n.value,()=>{var z,w,j;!n.value||((z=n.value)==null?void 0:z.length)===0?s.value=[]:s.value=(w=I.cloneDeep(n.value))==null?void 0:w.filter(A=>(A==null?void 0:A.comp)!=="methodButton"),c.value=s.value,g.value=(j=I.cloneDeep(c.value))==null?void 0:j.map((A,N)=>({id:N,content:!1}))},{deep:!0,immediate:!0});const u=z=>St(z),_=(z,w,j)=>{var N,Y;if(!z)return;let A=I.cloneDeep(n.value);A=(N=A==null?void 0:A.map((b,L)=>(L===j&&(b.compData=z),b)))==null?void 0:N.filter(b=>(b==null?void 0:b.comp)!=="methodButton"),g.value=(Y=I.cloneDeep(A))==null?void 0:Y.map((b,L)=>({id:L,content:!1})),r.setOriginalData(A),r.setItemData(A)},S=z=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const w=I.cloneDeep(n.value),j=w==null?void 0:w.filter((A,N)=>N!==z);r.setOriginalData(j),r.setItemData(j),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(z,w)=>{const j=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",rh,[w[1]||(w[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",nh,[a.createVNode(Hs.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:A,index:N})=>{var Y,b,L,T,x,k,$,U,X,be;return[a.createElementVNode("div",th,[a.createElementVNode("div",oh,[(b=(Y=g.value)==null?void 0:Y.find(ze=>ze.id===N))!=null&&b.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:A.name&&A.name!==""?"8px":"0px"})},a.toDisplayString(A.name),5)),(T=(L=g.value)==null?void 0:L.find(ze=>ze.id===N))!=null&&T.content?(a.openBlock(),a.createElementBlock("div",ih,[a.createVNode(pl.ssInput,{modelValue:A.name,"onUpdate:modelValue":ze=>A.name=ze,onClick:w[0]||(w[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(k=(x=g.value)==null?void 0:x.find(ze=>ze.id===N))!=null&&k.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(ze=>h(N),["stop"]),class:"icon-content"},[a.createVNode(j,{name:"Edit",style:{width:"16px",height:"16px"}})],8,sh))]),a.createElementVNode("div",ch,[(U=($=g.value)==null?void 0:$.find(ze=>ze.id===N))!=null&&U.content?(a.openBlock(),a.createElementBlock("div",uh,[a.createVNode(j,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(ze=>v(N),["stop"])},null,8,["onClick"]),a.createVNode(j,{name:"Save",onClick:a.withModifiers(ze=>m(N,A.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(be=(X=g.value)==null?void 0:X.find(ze=>ze.id===N))!=null&&be.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(ze=>S(N),["stop"]),class:"icon-content"},[a.createVNode(j,{name:"Delete",style:{width:"16px",height:"16px"}})],8,dh))])])]}),content:a.withCtx(({item:A,index:N})=>{var Y,b;return[a.createElementVNode("div",ph,[a.createTextVNode(a.toDisplayString(u(A.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u(A.comp+"Operate")),{itemContents:A==null?void 0:A.compData,originalItemContents:(b=(Y=c.value)==null?void 0:Y.find((L,T)=>T===N))==null?void 0:b.compData,onChange:L=>_(L,A,N)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},hh=Ul._export_sfc(fh,[["__scopeId","data-v-a46a44b9"]]),vh={key:0,class:"show-content"},mh={style:{display:"flex"}},yh={__name:"modelShow",setup(l){const r=Wn(I.pinia),{itemData:n}=I.storeToRefs(r),t=a.ref([]);a.watch(()=>n.value,()=>{var c;!n.value||((c=n.value)==null?void 0:c.length)===0?t.value=[]:t.value=I.cloneDeep(n.value)},{deep:!0,immediate:!0});const s=c=>St(c);return(c,g)=>{var h;return((h=t.value)==null?void 0:h.length)>0?(a.openBlock(),a.createElementBlock("div",vh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(v,m)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:m},[a.createElementVNode("div",mh,a.toDisplayString(v.name),1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s(v.comp)),{itemData:v==null?void 0:v.compData,childItemData:v==null?void 0:v.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):a.createCommentVNode("",!0)}}},gh=Ul._export_sfc(yh,[["__scopeId","data-v-3f3e863e"]]),bh={class:"tabs-header"},kh={class:"tabs-list"},xh={class:"tab-name"},_h={class:"tab-actions"},wh=["onClick"],Ch=["onClick"],Sh=["onClick"],Eh={class:"model-operate"},Dh={class:"model-select",style:{display:"unset"}},Bh={class:"existing-components"},Nh={class:"component-list"},Th=["onClick"],Ah={class:"component-info"},zh={class:"component-type"},Mh={class:"component-name"},Oh={class:"model-fill"},Ih={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]),c=a.ref(!1),g=a.ref(""),h=a.ref({title:""}),v=a.ref(-1),m=a.ref(!1),u=a.ref(-1),_=a.ref(new WeakMap),S=a.ref(null),z=Wn(I.pinia),{itemData:w}=I.storeToRefs(z),j=()=>{g.value="新增标签页",h.value.title="",v.value=-1,c.value=!0},A=te=>{g.value="修改标签页",h.value.title=s.value[te].title,v.value=te,c.value=!0},N=te=>{const D=L(te);_.value.delete(D),s.value.splice(te,1),Na()},Y=()=>{if(h.value.title.trim()){if(v.value===-1){const te={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:b()};s.value.push(te)}else s.value[v.value].title=h.value.title,s.value[v.value].value=h.value.title,s.value[v.value].label=h.value.title;c.value=!1,Na()}},b=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,L=te=>{const D=s.value[te];return D.id||(D.id=b()),D.id},T=te=>{var ye;u.value=te;const D=L(te);S.value=I.cloneDeep(w.value);let le=_.value.get(D);!le&&((ye=s.value[te].children)==null?void 0:ye.length)>0&&(le=U(s.value[te].children)),le?z.setItemData(I.cloneDeep(le)):z.setItemData([]),m.value=!0},x=a.computed(()=>{const te=I.useModelComp(I.pinia),D=I.storeToRefs(te).itemData.value;return console.log("可用组件数据",D),!D||!Array.isArray(D)?[]:D.filter(le=>{var ye;if(le.comp==="Tabs"&&u.value>=0){const ue=L(u.value);if((ye=le.compData)==null?void 0:ye.some(pa=>{var wa;return pa.key==="stepList"&&((wa=pa.contents)==null?void 0:wa.some(ja=>ja.id===ue))}))return!1}return!0})}),k=te=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[te]||te,$=te=>{var D;try{const le=I.cloneDeep(te);le.id=Date.now()+Math.random(),le.comp==="Tabs"&&((D=le.compData)==null||D.forEach(ue=>{ue.key==="stepList"&&ue.contents&&ue.contents.forEach(Ne=>{Ne.id=b()})}));const ye=I.cloneDeep(w.value);ye.push(le),z.setItemData(ye)}catch(le){console.error("添加组件失败:",le)}},U=te=>te.map(D=>{var le;switch(D.type){case"form":return{comp:"Form",name:D.value||"表单",compData:X(D.content)};case"table":return{comp:"Table",name:D.value||"表格",compData:be(D.content)};default:return{comp:"Unknown",name:D.value||"",compData:((le=D.content)==null?void 0:le.originalData)||[]}}}),X=te=>{if(!te)return[];const D=[];return te.rowContents&&D.push({key:"formContent",contents:te.rowContents}),te.buttonValue&&D.push({key:"formButton",contents:te.buttonValue}),typeof te.isEnableWrap<"u"&&D.push({key:"enableWrap",contents:te.isEnableWrap}),D},be=te=>[],ze=()=>{if(u.value>=0&&u.value<s.value.length){const te=L(u.value);_.value.set(te,I.cloneDeep(w.value)),s.value[u.value].children=ke(w.value),console.log("保存后的数据",ke(w.value))}m.value=!1,u.value=-1,S.value=null,Na()},Ee=()=>{S.value&&z.setItemData(I.cloneDeep(S.value)),m.value=!1,u.value=-1,S.value=null},ne=()=>{m.value&&Ee()},ke=te=>{if(!Array.isArray(te))throw new Error("sourceData must be an array");return te.map((D,le)=>{if(!D||typeof D!="object")return D;const{comp:ye,name:ue,compData:Ne}=D;switch(ye){case"Form":return{type:"form",content:Z(Ne||[]),value:"表单"};case"Table":return{type:"table",content:de(Ne||[]),value:"表格"};default:return{type:"xxx",content:Ke(Ne||[]),value:""}}})},Z=te=>{const D={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},le={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return te.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:Ne,contents:pa}=ye,wa=le[Ne];if(!wa){console.warn(`Unknown Form config key: ${Ne}`);return}Ne==="enableWrap"?D[wa]=!!pa:D[wa]=Array.isArray(pa)?pa:[]}),D},de=te=>{const D={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},le={header:"columns",tableContents:"tableData"};return te.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:Ne,contents:pa}=ye,wa=le[Ne];if(!wa){console.warn(`Unknown Table config key: ${Ne}`);return}D[wa]=Array.isArray(pa)?pa:[]}),D},Ke=te=>(console.log("Default conversion logic - to be implemented"),{originalData:te,processed:!1,componentType:"unknown"}),Na=()=>{const te=[{key:"stepList",contents:s.value}];t("change",te)};return a.watch(()=>n.itemContents,te=>{if(te&&te.length>0){const D=te.find(le=>le.key==="stepList");D&&D.contents&&(s.value=D.contents.map(le=>({title:le.title||"",value:le.value||le.title||"",label:le.label||le.title||"",children:le.children||[],id:le.id||b()})))}},{immediate:!0,deep:!0}),(te,D)=>{const le=a.resolveComponent("svg-icon"),ye=a.resolveComponent("el-input"),ue=a.resolveComponent("el-form-item"),Ne=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",bh,[D[6]||(D[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:j},[a.createVNode(le,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),D[5]||(D[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",kh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(pa,wa)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:wa},[a.createElementVNode("span",xh,a.toDisplayString(pa.title),1),a.createElementVNode("div",_h,[a.createElementVNode("button",{onClick:ja=>A(wa)},"修改标题",8,wh),a.createElementVNode("button",{onClick:ja=>T(wa)},"布局调整",8,Ch),a.createElementVNode("button",{onClick:ja=>N(wa)},"删除",8,Sh)])]))),128))]),a.createVNode(vr.ssDialog,{modelValue:c.value,"onUpdate:modelValue":D[2]||(D[2]=pa=>c.value=pa),title:g.value,onBeforeDestroy:D[3]||(D[3]=pa=>c.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:D[1]||(D[1]=pa=>c.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:Y},"确定")]),default:a.withCtx(()=>[a.createVNode(Ne,{model:h.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(ue,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(ye,{modelValue:h.value.title,"onUpdate:modelValue":D[0]||(D[0]=pa=>h.value.title=pa),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(vr.ssDialog,{modelValue:m.value,"onUpdate:modelValue":D[4]||(D[4]=pa=>m.value=pa),title:"布局调整",fullScreen:"",onBeforeDestroy:ne},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:Ee},"取消"),a.createElementVNode("button",{onClick:ze},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",Eh,[a.createElementVNode("div",Dh,[a.createVNode(lh),a.createElementVNode("div",Bh,[D[8]||(D[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",Nh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.value,pa=>(a.openBlock(),a.createElementBlock("div",{key:pa.id,class:"component-item",onClick:wa=>$(pa)},[a.createElementVNode("div",Ah,[a.createElementVNode("span",zh,a.toDisplayString(k(pa.comp)),1),a.createElementVNode("span",Mh,a.toDisplayString(pa.name),1)]),D[7]||(D[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Th))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:te.innerWidth},[a.createVNode(gh)])),a.createElementVNode("div",Oh,[a.createVNode(hh)])])]),_:1},8,["modelValue"])])}}},Lh=Ul._export_sfc(Ih,[["__scopeId","data-v-9096ed0d"]]);function Vh(){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 Rh(l){return{type:"line",...l}}function $h(){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 Ph(l){return{type:"bar",barWidth:"60%",...l}}function Fh(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function jh(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const On={line:{initBaseoptions:Vh,initSeries:Rh},bar:{initBaseoptions:$h,initSeries:Ph},pie:{initBaseoptions:Fh,initSeries:jh}},vs=I.useMenuState(I.pinia),Cc=(l,r)=>{var u;const n=[],t=[],{group:s,nameCol:c,valueCol:g}=r||{},h=l==null?void 0:l.find(_=>{const{name:S}=_;return S===s});if(!h)return{names:n,values:t};const v=(u=h==null?void 0:h.compData)==null?void 0:u.find(_=>{const{key:S}=_;return S==="tableContents"});return((v==null?void 0:v.contents)||[]).forEach(_=>{const S=_==null?void 0:_[0];let z=!1;el.isObject(S)&&(S!=null&&S.id)&&(z=!0);let w=c,j=g;z&&(w=w+1,j=j+1);const A=_==null?void 0:_[w],N=_==null?void 0:_[j];n.push(A),t.push(N)}),{names:n,values:t}},Hh=async l=>{const{menu:r,mainKey:n,detailGroup:t,detailNameCol:s,detailValueCol:c,isSelfDetail:g}=l||{};let h=null;const v=sessionStorage.getItem("systemKey");if(g&&vs.activeMenuPath&&(h=await sa.getItemData(`${vs.activeMenuPath}`,v,"")),!g){const m=r==null?void 0:r.join("/");h=await sa.getItemData(`${m}^${n}`,v,"")}return Cc(h,{group:t,nameCol:s,valueCol:c})},Uh=async l=>{const{menu:r,group:n,nameCol:t,valueCol:s}=l||{},c=r==null?void 0:r.join("/"),g=sessionStorage.getItem("systemKey"),h=await sa.getItemData(c,g,"");return Cc(h,{group:n,nameCol:t,valueCol:s})},wi=async(l,r)=>{const n={names:[],values:[]},{menu:t,group:s,nameCol:c,valueCol:g}=l||{};if(!t.length||!s)return n;const{mainKey:h,group:v,nameCol:m,valueCol:u,isSelfDetail:_}=r||{};return h&&v&&pl.isNumber(m)&&pl.isNumber(u)?await Hh({menu:t,mainKey:h,detailGroup:v,detailNameCol:m,detailValueCol:u,isSelfDetail:_}):pl.isNumber(c)&&pl.isNumber(g)?await Uh({menu:t,group:s,nameCol:c,valueCol:g}):n},qh=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:t,title:s}=l||{},c=On==null?void 0:On[t];if(!c)return;const{initBaseoptions:g,initSeries:h}=c,v=g();v.title.text=s??"";const{names:m,values:u}=await wi(r,n);if(!m||!u)return v;v.xAxis.data=m;const _=h({data:u});return v.series.push(_),v},Wh=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:t,title:s}=l||{},c=On==null?void 0:On[t];if(!c)return;const{initBaseoptions:g,initSeries:h}=c,v=g();v.title.text=s??"";const{names:m,values:u}=await wi(r,n);if(!m||!u)return v;v.xAxis.data=m;const _=h({data:u});return v.series.push(_),v},Kh=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:t,title:s}=l||{},c=On==null?void 0:On[t];if(!c)return;const{initBaseoptions:g,initSeries:h}=c,v=g();v.title.text=s??"";const{names:m,values:u}=await wi(r,n);if(!m||!u)return v;const _=[];for(let z=0;z<m.length;z++){const w=m[z],j=u[z];_.push({name:w,value:j})}const S=h({data:_});return v.series.push(S),v},Yh=async(l=[])=>{var g,h,v;const r=((g=l==null?void 0:l.find(m=>m.key==="chartBaseConfig"))==null?void 0:g.contents)??{},n=((h=l==null?void 0:l.find(m=>m.key==="chartDataConfig"))==null?void 0:h.contents)??{},t=((v=l==null?void 0:l.find(m=>m.key==="chartDetailConfig"))==null?void 0:v.contents)??{},{type:s}=r;let c={};return s==="line"&&(c=await qh({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:t})),s==="bar"&&(c=await Wh({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:t})),s==="pie"&&(c=await Kh({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:t})),c},Gh=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(l){const r=l,n=a.ref({});a.onMounted(async()=>{const s=r==null?void 0:r.itemData;n.value=await Yh(s)});const t=a.computed(()=>(r==null?void 0:r.height)||"300px");return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:t.value})},[a.createVNode(gu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),Jh=Ul._export_sfc(Gh,[["__scopeId","data-v-d4c081e8"]]),Xh={class:"chart-module layout"},Zh={class:"chart-module content"},Qh={class:"chart-module content"},e4={class:"form-content"},a4={class:"dialog-footer"},l4={class:"form-content"},r4={class:"dialog-footer"},n4={class:"form-content"},t4={class:"dialog-footer"},o4=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.reactive({visible:!1,width:"840",title:"基础配置"}),c=a.ref([]),g=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],h=a.ref({}),v=()=>{var He;c.value=g(),(He=c.value)==null||He.forEach(Te=>{var Ye;const Re=Te==null?void 0:Te.prop;Te.value=(Ye=h==null?void 0:h.value)==null?void 0:Ye[Re]}),s.visible=!0},m=He=>{h.value=He},u=()=>{var He;s.visible=!1,t("change",(He=Pe())==null?void 0:He.compData)},_=a.reactive({visible:!1,width:"840",title:"数据配置"}),S=a.ref([]),z=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],w=a.ref({}),j=()=>{const He=S.value,Te=I.cloneDeep(He);return Te==null||Te.forEach(Re=>{var qa;const Ye=Re==null?void 0:Re.prop;Re.value=(qa=w.value)==null?void 0:qa[Ye]}),Te},A=He=>{var Re;w.value=He;const Te=j();S.value=Te,t("change",(Re=Pe())==null?void 0:Re.compData)},N=async()=>{const He=await sa.getMenusContent(),Te=j();Te==null||Te.forEach(Re=>{(Re==null?void 0:Re.prop)==="menu"&&(Re.contents=He)}),S.value=Te,_.visible=!0,await pa(w.value.menu),await ee(w.value.group)},Y=a.reactive({visible:!1,width:"840",title:"详情页配置"}),b=a.ref([]),L=()=>[{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:[]}],T=a.ref({}),x=()=>{const He=b.value,Te=I.cloneDeep(He);return Te==null||Te.forEach(Re=>{var qa;const Ye=Re==null?void 0:Re.prop;Re.value=(qa=T.value)==null?void 0:qa[Ye]}),Te},k=He=>{var Re;T.value=He;const Te=x();b.value=Te,t("change",(Re=Pe())==null?void 0:Re.compData)},$=async()=>{await ne();const He=I.cloneDeep(U.value),Te=x();Te==null||Te.forEach(Re=>{var qa;const Ye=Re==null?void 0:Re.prop;Re.value=(qa=T==null?void 0:T.value)==null?void 0:qa[Ye],Ye==="mainKey"&&(Re.contents=He)}),b.value=Te,Y.visible=!0},U=a.ref([]),X=a.ref([]),be=a.ref({}),ze=a.ref({}),Ee=()=>{const{compData:He}=ye.value||{},Te=He==null?void 0:He.find(J=>{const{key:ie}=J;return ie==="header"}),Re=(Te==null?void 0:Te.contents)||[],Ye=Re==null?void 0:Re.filter((J,ie)=>{const{label:ce}=J;return ce!=="操作"}),qa=Ye==null?void 0:Ye.findIndex((J,ie)=>{const{isMainKey:ce}=J;return ce});if(qa<0)return[];const Va=He==null?void 0:He.find(J=>{const{key:ie}=J;return ie==="tableContents"}),P=(Va==null?void 0:Va.contents)||[];return P==null?void 0:P.map(J=>{const ie=J==null?void 0:J[0];let ce=qa;el.isObject(ie)&&(ie!=null&&ie.id)&&(ce=ce+1);const ma=J==null?void 0:J[ce];return{label:ma,value:ma}})},ne=async()=>{const He=await Ee();U.value=He},ke=async He=>{const Te=sessionStorage.getItem("systemKey");return await sa.getItemData(He,Te,"")},Z=async He=>{const Te=He;X.value=Te==null?void 0:Te.map(Re=>{const{name:Ye}=Re;return be.value[Ye]=Re,{label:Ye,value:Ye}})},de=He=>{const{comp:Te,compData:Re}=ze.value||{};if(Te==="Table"){let Ye=x();Ye=Ye.filter(qa=>{const{prop:Va}=qa;return Va!=="formItems"}),wa(Ye,Re),b.value=Ye}},Ke=async()=>{var Re,Ye;const He=(Re=T==null?void 0:T.value)==null?void 0:Re.mainKey,Te=(Ye=w==null?void 0:w.value)==null?void 0:Ye.menu;if(He){const Va=`${Te==null?void 0:Te.join("/")}^${He}`,P=await ke(Va);await Z(P);const F=x();F==null||F.forEach(J=>{(J==null?void 0:J.prop)==="group"&&(J.contents=X.value)}),b.value=F}};a.watch(()=>{var He;return(He=T==null?void 0:T.value)==null?void 0:He.mainKey},async(He,Te)=>{He!=Te&&He&&await Ke()});const Na=async He=>{const Te=be.value[He];ze.value=Te,await de()};a.watch(()=>{var He;return(He=T==null?void 0:T.value)==null?void 0:He.group},async(He,Te)=>{He!=Te&&He&&Na(He)});const te=async()=>{var Te;await Ke();const He=(Te=T.value)==null?void 0:Te.group;await Na(He)},D=a.ref([]),le=a.ref({}),ye=a.ref({}),ue=async He=>{const Te=He==null?void 0:He.join("/"),Re=sessionStorage.getItem("systemKey");return await sa.getItemData(Te,Re,"")},Ne=async He=>{const Te=await ue(He);D.value=Te==null?void 0:Te.map(Re=>{const{name:Ye}=Re;return le.value[Ye]=Re,{label:Ye,value:Ye}})},pa=async(He,Te)=>{await Ne(He);const Re=j();Re==null||Re.forEach(Ye=>{(Ye==null?void 0:Ye.prop)==="group"&&(Ye.contents=D.value)}),S.value=Re};a.watch(()=>{var He;return(He=w==null?void 0:w.value)==null?void 0:He.menu},async(He,Te)=>{const Re=He==null?void 0:He.join("/"),Ye=Te==null?void 0:Te.join("/");Re!=Ye&&await pa(He)});const wa=(He,Te)=>{const Re=Te==null?void 0:Te.find(P=>{const{key:F}=P;return F==="header"}),Ye=(Re==null?void 0:Re.contents)||[],qa=Ye==null?void 0:Ye.filter((P,F)=>{const{label:J}=P;return J!=="操作"}),Va=qa==null?void 0:qa.map((P,F)=>{const{label:J}=P;return{label:J,value:F}});He==null||He.forEach(P=>{const F=P==null?void 0:P.prop;(F==="nameCol"||F==="valueCol")&&(P.contents=Va)})},ja=He=>{const{comp:Te,compData:Re}=ye.value||{};if(Te==="Table"){w.value.formItems=[];let Ye=j();Ye=Ye.filter(qa=>{const{prop:Va}=qa;return Va!=="formItems"}),wa(Ye,Re),S.value=Ye}},ee=async He=>{const Te=le.value[He];ye.value=Te,await ja()};a.watch(()=>{var He;return(He=w==null?void 0:w.value)==null?void 0:He.group},async(He,Te)=>{He!=Te&&ee(He)});const ea=async()=>{var Re,Ye;const He=(Re=w.value)==null?void 0:Re.menu;await pa(He);const Te=(Ye=w.value)==null?void 0:Ye.group;await ee(Te)},Pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:w.value},{key:"chartDetailConfig",contents:T.value}]}),xa=()=>{s.visible=!1,_.visible=!1,Y.visible=!1};return a.onMounted(async()=>{var Te,Re,Ye;S.value=z(),b.value=L();const He=n==null?void 0:n.itemContents;h.value=((Te=He==null?void 0:He.find(qa=>qa.key==="chartBaseConfig"))==null?void 0:Te.contents)??{},w.value=((Re=He==null?void 0:He.find(qa=>qa.key==="chartDataConfig"))==null?void 0:Re.contents)??{},await ea(),T.value=((Ye=He==null?void 0:He.find(qa=>qa.key==="chartDetailConfig"))==null?void 0:Ye.contents)??{},await te()}),(He,Te)=>{const Re=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Xh,[Te[4]||(Te[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(Re,{id:"themeButton",onClick:Te[0]||(Te[0]=Ye=>v())},{default:a.withCtx(()=>Te[3]||(Te[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",Zh,[Te[6]||(Te[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(Re,{id:"themeButton",onClick:Te[1]||(Te[1]=Ye=>N())},{default:a.withCtx(()=>Te[5]||(Te[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",Qh,[Te[8]||(Te[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(Re,{id:"themeButton",onClick:Te[2]||(Te[2]=Ye=>$())},{default:a.withCtx(()=>Te[7]||(Te[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(vr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:xa,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",e4,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",a4,[a.createVNode(Re,{class:"cancel-button button",onClick:xa,id:"themeBorderButton"},{default:a.withCtx(()=>Te[9]||(Te[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(Re,{class:"ok-button button",onClick:u,id:"themeButton"},{default:a.withCtx(()=>Te[10]||(Te[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(vr.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:xa,width:_.width},{default:a.withCtx(()=>[a.createElementVNode("div",l4,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:A},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",r4,[a.createVNode(Re,{class:"cancel-button button",onClick:xa,id:"themeBorderButton"},{default:a.withCtx(()=>Te[11]||(Te[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(Re,{class:"ok-button button",onClick:xa,id:"themeButton"},{default:a.withCtx(()=>Te[12]||(Te[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(vr.ssDialog,{visible:Y.visible,title:Y.title,onBeforeDestroy:xa,width:Y.width},{default:a.withCtx(()=>[a.createElementVNode("div",n4,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",t4,[a.createVNode(Re,{class:"cancel-button button",onClick:xa,id:"themeBorderButton"},{default:a.withCtx(()=>Te[13]||(Te[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(Re,{class:"ok-button button",onClick:xa,id:"themeButton"},{default:a.withCtx(()=>Te[14]||(Te[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),i4=Ul._export_sfc(o4,[["__scopeId","data-v-fe119645"]]),s4={class:"layout"},c4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(l,{emit:r}){const n=r,t=l;a.onMounted(async()=>{});const s=a.computed(()=>I.cloneDeep(t==null?void 0:t.itemData)||[]),c=a.computed(()=>{var u;const m=(u=s==null?void 0:s.value)==null?void 0:u.find(_=>{const{key:S}=_;return S==="baseConfig"});return m==null?void 0:m.contents}),g=a.computed(()=>{var u;const m=(u=s==null?void 0:s.value)==null?void 0:u.find(_=>{const{key:S}=_;return S==="children"});return m==null?void 0:m.contents}),h=a.computed(()=>{let m=I.cloneDeep(g.value)||[];const u=m.length;let _=0;const S=[];if(m=m.map(z=>{const w=z.span;return w?(z.span=Number(w),_=_+z.span):S.push(z),z}),_<24){const z=Math.floor((24-_)/u);S.forEach(w=>{w.span=z})}return m}),v=m=>{n("rowClick",m)};return(m,u)=>{var z;const _=a.resolveComponent("el-col"),S=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",s4,[a.createVNode(S,{style:a.normalizeStyle({height:(z=c.value)==null?void 0:z.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(w,j)=>(a.openBlock(),a.createBlock(_,{span:w==null?void 0:w.span},{default:a.withCtx(()=>{var A;return[a.unref(Ct)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)(w.comp)),{key:a.unref(qn),compName:w.name,index:(w==null?void 0:w.id)??j,height:(A=c.value)==null?void 0:A.height,itemData:w==null?void 0:w.compData,childItemData:w==null?void 0:w.itemChildData,onChange:a.unref(So),onContentChange:a.unref(Eo),onPageChange:a.unref(Do),onRowClick:v},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),u4=Ul._export_sfc(c4,[["__scopeId","data-v-ab9a36ed"]]),d4={class:"layout-operate"},p4={class:"layout-module"},f4={class:"collapse-title-item"},h4={class:"collapse-title"},v4={class:"icon-content"},m4=["onClick"],y4={class:"comp-child"},g4=a.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r;a.onMounted(()=>{j()});const s=a.ref({}),c=a.ref({}),g=a.ref([]),h=T=>[{label:"高度",prop:"height",type:"input",value:T==null?void 0:T.height}],v=T=>{c.value=T,t("change",L(),!0)},m=a.ref([]),u=a.ref([]),_=T=>[{label:"占比",prop:"span",type:"input",value:T==null?void 0:T.span}],S=a.computed(()=>{const T=n==null?void 0:n.itemContents;return I.cloneDeep(T)}),z=a.computed(()=>{const T=S==null?void 0:S.value,x=T==null?void 0:T.find(k=>{const{key:$}=k;return $==="baseConfig"});return x==null?void 0:x.contents}),w=a.computed(()=>{const T=S==null?void 0:S.value,x=T==null?void 0:T.find(k=>{const{key:$}=k;return $==="children"});return x==null?void 0:x.contents}),j=()=>{var T;s.value=S.value||{},m.value=(w==null?void 0:w.value)||[],g.value=h(),g.value=(T=g.value)==null?void 0:T.map(x=>{var $;const{prop:k}=x;return x.value=($=z.value)==null?void 0:$[k],x})};a.watch(()=>{var T;return(T=w==null?void 0:w.value)==null?void 0:T.length},()=>{var T;m.value=(w==null?void 0:w.value)||[],u.value=(T=w.value)==null?void 0:T.map(x=>_(x))},{immediate:!0});const A=(T,x)=>{const k=I.cloneDeep(w==null?void 0:w.value);k[x].span=T.span,m.value=k,t("change",L(),!0)},N=T=>St(T),Y=(T,x,k)=>{if(!T)return;const $=I.cloneDeep(w==null?void 0:w.value);$[k]&&($[k].compData=T,m.value=$,t("change",L(),!0))},b=T=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let x=I.cloneDeep(w==null?void 0:w.value);x=x==null?void 0:x.filter((k,$)=>T!==$),m.value=x,t("change",L(),!0),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:m==null?void 0:m.value}]});return(T,x)=>{const k=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",d4,[a.createElementVNode("div",p4,[x[1]||(x[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(pl.ssForm,{rowContents:g.value,isEnableWrap:!0,onChange:x[0]||(x[0]=$=>v($))},null,8,["rowContents"])])]),a.createVNode(Hs.default,{class:"collapse-content",collapseContents:w.value},{title:a.withCtx(({item:$,index:U})=>[a.createElementVNode("div",f4,[a.createElementVNode("div",h4,a.toDisplayString($.name),1),a.createElementVNode("div",v4,[a.createElementVNode("div",{onClick:a.withModifiers(X=>b(U),["stop"]),class:"icon-content"},[a.createVNode(k,{name:"Delete",style:{width:"16px",height:"16px"}})],8,m4)])])]),content:a.withCtx(({item:$,index:U})=>[a.createElementVNode("div",y4,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:u.value[U],key:U,isEnableWrap:!0,onChange:X=>A(X,U)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(N($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:$.compData,onChange:X=>Y(X,$,U)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),b4=Ul._export_sfc(g4,[["__scopeId","data-v-ba05456e"]]),k4=typeof window<"u";var ms;k4&&((ms=window==null?void 0:window.navigator)!=null&&ms.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function rn(l){return l==null}function Sc(){}const x4=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(x4)));function _4(){const l=new Map;return{on(r,n){const t=l.get(r);t!=null&&t.add(n)||l.set(r,new Set([n]))},off(r,n){const t=l.get(r);t&&t.delete(n)},clear(r){const n=l.get(r);n&&n.clear()},clearAll(){l.clear()},emit(r,...n){const t=l.get(r);t&&t.forEach(s=>{s(...n)})}}}function ys(l,r=16){if(typeof l!="function")return Sc;const n=(...c)=>{l(...c)};if(r<=0)return Ec(n);let t=0,s;return function(...c){const g=Date.now(),h=g-t;clearTimeout(s),h>=r?(t=g,n(...c)):s=setTimeout(()=>{t=Date.now(),n(...c)},Math.max(0,r-h))}}function w4(l,r=100){if(typeof l!="function")return Sc;const n=(...s)=>{l(...s)};if(r<=0)return Ec(n);let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{n(...s)},r)}}function Ec(l){if(typeof l!="function")return l;let r=!1,n,t;return function(...s){return n=s,r||(r=!0,t=Promise.resolve().then(()=>(r=!1,t=void 0,l(...n)))),t}}const It=new Set,Dc=new WeakMap;function C4(){It.forEach(l=>{l(...Dc.get(l))}),It.clear()}function jr(l,...r){if(typeof l!="function")return l;Dc.set(l,r),!It.has(l)&&(It.add(l),It.size===1&&Promise.resolve().then(C4))}const Bc=Symbol("LAYOUT_KEY"),Nc=Symbol("EMITTER_KEY");function S4(l){let r=0,n;for(let t=0,s=l.length;t<s;t++)n=l[t].y+l[t].h,n>r&&(r=n);return r}function yi(l){const r=Array(l.length);for(let n=0,t=l.length;n<t;n++)r[n]=E4(l[n]);return r}function E4(l){return{...l}}function Tc(l,r){return!(l===r||l.x+l.w<=r.x||l.x>=r.x+r.w||l.y+l.h<=r.y||l.y>=r.y+r.h)}function gt(l,r,n){const t=zc(l),s=Mc(l),c=Array(l.length);for(let g=0,h=s.length;g<h;g++){let v=s[g];v.static||(v=D4(t,v,r,n),t.push(v)),c[l.findIndex(m=>m.i===v.i)]=v,v.moved=!1}return c}function D4(l,r,n,t){if(n)for(;r.y>0&&!Lt(l,r);)r.y--;else if(t){const c=t[r.i].y;for(;r.y>c&&!Lt(l,r);)r.y--}let s;for(;s=Lt(l,r);)r.y=s.y+s.h;return r}function B4(l,r){const n=zc(l);for(let t=0,s=l.length;t<s;t++){const c=l[t];if(c.x+c.w>r.cols&&(c.x=r.cols-c.w),c.x<0&&(c.x=0,c.w=r.cols),!c.static)n.push(c);else for(;Lt(n,c);)c.y++}return l}function gs(l,r){for(let n=0,t=l.length;n<t;n++)if(l[n].i===r)return l[n]}function Lt(l,r){for(let n=0,t=l.length;n<t;n++)if(Tc(l[n],r))return l[n]}function Ac(l,r){return l.filter(n=>Tc(n,r))}function zc(l){return l.filter(r=>r.static)}function gi(l,r,n,t,s=!1,c=!1){if(r.static)return l;const g=r.x,h=r.y,v=t&&r.y>t;typeof n=="number"&&(r.x=n),typeof t=="number"&&(r.y=t),r.moved=!0;let m=Mc(l);v&&(m=m.reverse());const u=Ac(m,r);if(c&&u.length)return r.x=g,r.y=h,r.moved=!1,l;for(let _=0,S=u.length;_<S;_++){const z=u[_];z.moved||r.y>z.y&&r.y-z.y>z.h/4||(z.static?l=bs(l,z,r,s):l=bs(l,r,z,s))}return l}function bs(l,r,n,t){if(t){const s={x:n.x,y:n.y,w:n.w,h:n.h};if(s.y=Math.max(r.y-n.h,0),!Lt(l,s))return gi(l,n,void 0,s.y,!1)}return gi(l,n,void 0,n.y+1,!1)}function N4(l,r,n,t){const s="translate3d("+r+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:t+"px",position:"absolute"}}function T4(l,r,n,t){const s="translate3d("+r*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:t+"px",position:"absolute"}}function A4(l,r,n,t){return{top:l+"px",left:r+"px",width:n+"px",height:t+"px",position:"absolute"}}function z4(l,r,n,t){return{top:l+"px",right:r+"px",width:n+"px",height:t+"px",position:"absolute"}}function Mc(l){return Array.from(l).sort(function(r,n){return r.y===n.y&&r.x===n.x?0:r.y>n.y||r.y===n.y&&r.x>n.x?1:-1})}function M4(l,r){r=r||"Layout";const n=["x","y","w","h"],t=[];if(!Array.isArray(l))throw new Error(r+" must be an array!");for(let s=0,c=l.length;s<c;s++){const g=l[s];for(let h=0;h<n.length;h++)if(typeof g[n[h]]!="number")throw new Error("VueGridLayout: "+r+"["+s+"]."+n[h]+" must be a number!");if(g.i===void 0||g.i===null)throw new Error("VueGridLayout: "+r+"["+s+"].i cannot be null!");if(typeof g.i!="number"&&typeof g.i!="string")throw new Error("VueGridLayout: "+r+"["+s+"].i must be a string or number!");if(t.indexOf(g.i)>=0)throw new Error("VueGridLayout: "+r+"["+s+"].i must be unique!");if(t.push(g.i),g.static!==void 0&&typeof g.static!="boolean")throw new Error("VueGridLayout: "+r+"["+s+"].static must be a boolean!")}}function O4(l,r="vgl"){const n=()=>`${r}-${l}`;return{b:n,be:t=>`${n()}__${t}`,bm:t=>`${n()}--${t}`,bem:(t,s)=>`${n()}__${t}--${s}`}}function ks(l){return I4(l)}function I4(l){var r;const n=((r=l.target)==null?void 0:r.offsetParent)||document.body,t=l.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),s=l.clientX+n.scrollLeft-t.left,c=l.clientY+n.scrollTop-t.top;return{x:s,y:c}}function xs(l,r,n,t){return L4(l)?{deltaX:n-l,deltaY:t-r,lastX:l,lastY:r,x:n,y:t}:{deltaX:0,deltaY:0,lastX:n,lastY:t,x:n,y:t}}function L4(l){return typeof l=="number"&&!Number.isNaN(l)}function V4(l,r){const n=Ic(l);let t=n[0];for(let s=1,c=n.length;s<c;s++){const g=n[s];r>l[g]&&(t=g)}return t}function Oc(l,r){if(!r[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return r[l]}function R4(l,r,n,t,s,c,g){if(r[t])return yi(r[t]);let h=l;const v=Ic(n),m=v.slice(v.indexOf(t));for(let u=0,_=m.length;u<_;u++){const S=m[u];if(r[S]){h=r[S];break}}return h=yi(h||[]),gt(B4(h,{cols:c}),g)}function Ic(l){return Object.keys(l).sort((r,n)=>l[r]-l[n])}let $4="auto";function P4(){return typeof document<"u"}function _s(){return P4()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):$4}var Ot={exports:{}},F4=Ot.exports,ws;function j4(){return ws||(ws=1,function(l,r){(function(n,t){l.exports=t()})(F4,function(){function n(i,o){var p=Object.keys(i);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(i);o&&(y=y.filter(function(C){return Object.getOwnPropertyDescriptor(i,C).enumerable})),p.push.apply(p,y)}return p}function t(i){for(var o=1;o<arguments.length;o++){var p=arguments[o]!=null?arguments[o]:{};o%2?n(Object(p),!0).forEach(function(y){v(i,y,p[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(p)):n(Object(p)).forEach(function(y){Object.defineProperty(i,y,Object.getOwnPropertyDescriptor(p,y))})}return i}function s(i){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},s(i)}function c(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function g(i,o){for(var p=0;p<o.length;p++){var y=o[p];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(i,j(y.key),y)}}function h(i,o,p){return o&&g(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),i}function v(i,o,p){return(o=j(o))in i?Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0,writable:!0}):i[o]=p,i}function m(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),o&&_(i,o)}function u(i){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},u(i)}function _(i,o){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,y){return p.__proto__=y,p},_(i,o)}function S(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function z(i){var o=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 p,y=u(i);if(o){var C=u(this).constructor;p=Reflect.construct(y,arguments,C)}else p=y.apply(this,arguments);return function(V,q){if(q&&(typeof q=="object"||typeof q=="function"))return q;if(q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S(V)}(this,p)}}function w(){return w=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(i,o,p){var y=function(V,q){for(;!Object.prototype.hasOwnProperty.call(V,q)&&(V=u(V))!==null;);return V}(i,o);if(y){var C=Object.getOwnPropertyDescriptor(y,o);return C.get?C.get.call(arguments.length<3?i:p):C.value}},w.apply(this,arguments)}function j(i){var o=function(p,y){if(typeof p!="object"||p===null)return p;var C=p[Symbol.toPrimitive];if(C!==void 0){var V=C.call(p,y);if(typeof V!="object")return V;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(i,"string");return typeof o=="symbol"?o:o+""}var A=function(i){return!(!i||!i.Window)&&i instanceof i.Window},N=void 0,Y=void 0;function b(i){N=i;var o=i.document.createTextNode("");o.ownerDocument!==i.document&&typeof i.wrap=="function"&&i.wrap(o)===o&&(i=i.wrap(i)),Y=i}function L(i){return A(i)?i:(i.ownerDocument||i).defaultView||Y.window}typeof window<"u"&&window&&b(window);var T=function(i){return!!i&&s(i)==="object"},x=function(i){return typeof i=="function"},k={window:function(i){return i===Y||A(i)},docFrag:function(i){return T(i)&&i.nodeType===11},object:T,func:x,number:function(i){return typeof i=="number"},bool:function(i){return typeof i=="boolean"},string:function(i){return typeof i=="string"},element:function(i){if(!i||s(i)!=="object")return!1;var o=L(i)||Y;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?i instanceof Element||i instanceof o.Element:i.nodeType===1&&typeof i.nodeName=="string"},plainObject:function(i){return T(i)&&!!i.constructor&&/function Object\b/.test(i.constructor.toString())},array:function(i){return T(i)&&i.length!==void 0&&x(i.splice)}};function $(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.prepared.axis;p==="x"?(o.coords.cur.page.y=o.coords.start.page.y,o.coords.cur.client.y=o.coords.start.client.y,o.coords.velocity.client.y=0,o.coords.velocity.page.y=0):p==="y"&&(o.coords.cur.page.x=o.coords.start.page.x,o.coords.cur.client.x=o.coords.start.client.x,o.coords.velocity.client.x=0,o.coords.velocity.page.x=0)}}function U(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="drag"){var y=p.prepared.axis;if(y==="x"||y==="y"){var C=y==="x"?"y":"x";o.page[C]=p.coords.start.page[C],o.client[C]=p.coords.start.client[C],o.delta[C]=0}}}var X={id:"actions/drag",install:function(i){var o=i.actions,p=i.Interactable,y=i.defaults;p.prototype.draggable=X.draggable,o.map.drag=X,o.methodDict.drag="draggable",y.actions.drag=X.defaults},listeners:{"interactions:before-action-move":$,"interactions:action-resume":$,"interactions:action-move":U,"auto-start:check":function(i){var o=i.interaction,p=i.interactable,y=i.buttons,C=p.options.drag;if(C&&C.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(y&p.options.drag.mouseButtons)!=0))return i.action={name:"drag",axis:C.lockAxis==="start"?C.startAxis:C.lockAxis},!1}},draggable:function(i){return k.object(i)?(this.options.drag.enabled=i.enabled!==!1,this.setPerAction("drag",i),this.setOnEvents("drag",i),/^(xy|x|y|start)$/.test(i.lockAxis)&&(this.options.drag.lockAxis=i.lockAxis),/^(xy|x|y)$/.test(i.startAxis)&&(this.options.drag.startAxis=i.startAxis),this):k.bool(i)?(this.options.drag.enabled=i,this):this.options.drag},beforeMove:$,move:U,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(i){return i.search("drag")===0}},be=X,ze={init:function(i){var o=i;ze.document=o.document,ze.DocumentFragment=o.DocumentFragment||Ee,ze.SVGElement=o.SVGElement||Ee,ze.SVGSVGElement=o.SVGSVGElement||Ee,ze.SVGElementInstance=o.SVGElementInstance||Ee,ze.Element=o.Element||Ee,ze.HTMLElement=o.HTMLElement||ze.Element,ze.Event=o.Event,ze.Touch=o.Touch||Ee,ze.PointerEvent=o.PointerEvent||o.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ee(){}var ne=ze,ke={init:function(i){var o=ne.Element,p=i.navigator||{};ke.supportsTouch="ontouchstart"in i||k.func(i.DocumentTouch)&&ne.document instanceof i.DocumentTouch,ke.supportsPointerEvent=p.pointerEnabled!==!1&&!!ne.PointerEvent,ke.isIOS=/iP(hone|od|ad)/.test(p.platform),ke.isIOS7=/iP(hone|od|ad)/.test(p.platform)&&/OS 7[^\d]/.test(p.appVersion),ke.isIe9=/MSIE 9/.test(p.userAgent),ke.isOperaMobile=p.appName==="Opera"&&ke.supportsTouch&&/Presto/.test(p.userAgent),ke.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",ke.pEventTypes=ke.supportsPointerEvent?ne.PointerEvent===i.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,ke.wheelEvent=ne.document&&"onmousewheel"in ne.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Z=ke;function de(i,o){if(i.contains)return i.contains(o);for(;o;){if(o===i)return!0;o=o.parentNode}return!1}function Ke(i,o){for(;k.element(i);){if(te(i,o))return i;i=Na(i)}return null}function Na(i){var o=i.parentNode;if(k.docFrag(o)){for(;(o=o.host)&&k.docFrag(o););return o}return o}function te(i,o){return Y!==N&&(o=o.replace(/\/deep\//g," ")),i[Z.prefixedMatchesSelector](o)}var D=function(i){return i.parentNode||i.host};function le(i,o){for(var p,y=[],C=i;(p=D(C))&&C!==o&&p!==C.ownerDocument;)y.unshift(C),C=p;return y}function ye(i,o,p){for(;k.element(i);){if(te(i,o))return!0;if((i=Na(i))===p)return te(i,o)}return!1}function ue(i){return i.correspondingUseElement||i}function Ne(i){var o=i instanceof ne.SVGElement?i.getBoundingClientRect():i.getClientRects()[0];return o&&{left:o.left,right:o.right,top:o.top,bottom:o.bottom,width:o.width||o.right-o.left,height:o.height||o.bottom-o.top}}function pa(i){var o,p=Ne(i);if(!Z.isIOS7&&p){var y={x:(o=(o=L(i))||Y).scrollX||o.document.documentElement.scrollLeft,y:o.scrollY||o.document.documentElement.scrollTop};p.left+=y.x,p.right+=y.x,p.top+=y.y,p.bottom+=y.y}return p}function wa(i){for(var o=[];i;)o.push(i),i=Na(i);return o}function ja(i){return!!k.string(i)&&(ne.document.querySelector(i),!0)}function ee(i,o){for(var p in o)i[p]=o[p];return i}function ea(i,o,p){return i==="parent"?Na(p):i==="self"?o.getRect(p):Ke(p,i)}function Pe(i,o,p,y){var C=i;return k.string(C)?C=ea(C,o,p):k.func(C)&&(C=C.apply(void 0,y)),k.element(C)&&(C=pa(C)),C}function xa(i){return i&&{x:"x"in i?i.x:i.left,y:"y"in i?i.y:i.top}}function He(i){return!i||"x"in i&&"y"in i||((i=ee({},i)).x=i.left||0,i.y=i.top||0,i.width=i.width||(i.right||0)-i.x,i.height=i.height||(i.bottom||0)-i.y),i}function Te(i,o,p){i.left&&(o.left+=p.x),i.right&&(o.right+=p.x),i.top&&(o.top+=p.y),i.bottom&&(o.bottom+=p.y),o.width=o.right-o.left,o.height=o.bottom-o.top}function Re(i,o,p){var y=p&&i.options[p];return xa(Pe(y&&y.origin||i.options.origin,i,o,[i&&o]))||{x:0,y:0}}function Ye(i,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(pe){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},k.string(i)&&i.search(" ")!==-1&&(i=qa(i)),k.array(i))return i.forEach(function(pe){return Ye(pe,o,p,y)}),y;if(k.object(i)&&(o=i,i=""),k.func(o)&&p(i))y[i]=y[i]||[],y[i].push(o);else if(k.array(o))for(var C=0,V=o;C<V.length;C++){var q=V[C];Ye(i,q,p,y)}else if(k.object(o))for(var G in o)Ye(qa(G).map(function(pe){return"".concat(i).concat(pe)}),o[G],p,y);return y}function qa(i){return i.trim().split(/ +/)}var Va=function(i,o){return Math.sqrt(i*i+o*o)},P=["webkit","moz"];function F(i,o){i.__set||(i.__set={});var p=function(C){if(P.some(function(V){return C.indexOf(V)===0}))return 1;typeof i[C]!="function"&&C!=="__set"&&Object.defineProperty(i,C,{get:function(){return C in i.__set?i.__set[C]:i.__set[C]=o[C]},set:function(V){i.__set[C]=V},configurable:!0})};for(var y in o)p(y);return i}function J(i,o){i.page=i.page||{},i.page.x=o.page.x,i.page.y=o.page.y,i.client=i.client||{},i.client.x=o.client.x,i.client.y=o.client.y,i.timeStamp=o.timeStamp}function ie(i){i.page.x=0,i.page.y=0,i.client.x=0,i.client.y=0}function ce(i){return i instanceof ne.Event||i instanceof ne.Touch}function ma(i,o,p){return i=i||"page",(p=p||{}).x=o[i+"X"],p.y=o[i+"Y"],p}function na(i,o){return o=o||{x:0,y:0},Z.isOperaMobile&&ce(i)?(ma("screen",i,o),o.x+=window.scrollX,o.y+=window.scrollY):ma("page",i,o),o}function Ie(i){return k.number(i.pointerId)?i.pointerId:i.identifier}function _e(i,o,p){var y=o.length>1?ve(o):o[0];na(y,i.page),function(C,V){V=V||{},Z.isOperaMobile&&ce(C)?ma("screen",C,V):ma("client",C,V)}(y,i.client),i.timeStamp=p}function Ca(i){var o=[];return k.array(i)?(o[0]=i[0],o[1]=i[1]):i.type==="touchend"?i.touches.length===1?(o[0]=i.touches[0],o[1]=i.changedTouches[0]):i.touches.length===0&&(o[0]=i.changedTouches[0],o[1]=i.changedTouches[1]):(o[0]=i.touches[0],o[1]=i.touches[1]),o}function ve(i){for(var o={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},p=0;p<i.length;p++){var y=i[p];for(var C in o)o[C]+=y[C]}for(var V in o)o[V]/=i.length;return o}function Je(i){if(!i.length)return null;var o=Ca(i),p=Math.min(o[0].pageX,o[1].pageX),y=Math.min(o[0].pageY,o[1].pageY),C=Math.max(o[0].pageX,o[1].pageX),V=Math.max(o[0].pageY,o[1].pageY);return{x:p,y,left:p,top:y,right:C,bottom:V,width:C-p,height:V-y}}function Qe(i,o){var p=o+"X",y=o+"Y",C=Ca(i),V=C[0][p]-C[1][p],q=C[0][y]-C[1][y];return Va(V,q)}function Fe(i,o){var p=o+"X",y=o+"Y",C=Ca(i),V=C[1][p]-C[0][p],q=C[1][y]-C[0][y];return 180*Math.atan2(q,V)/Math.PI}function _a(i){return k.string(i.pointerType)?i.pointerType:k.number(i.pointerType)?[void 0,void 0,"touch","pen","mouse"][i.pointerType]:/touch/.test(i.type||"")||i instanceof ne.Touch?"touch":"mouse"}function Le(i){var o=k.func(i.composedPath)?i.composedPath():i.path;return[ue(o?o[0]:i.target),ue(i.currentTarget)]}var va=function(){function i(o){c(this,i),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=o}return h(i,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),i}();Object.defineProperty(va.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var re=function(i,o){for(var p=0;p<o.length;p++){var y=o[p];i.push(y)}return i},Se=function(i){return re([],i)},K=function(i,o){for(var p=0;p<i.length;p++)if(o(i[p],p,i))return p;return-1},je=function(i,o){return i[K(i,o)]},De=function(i){m(p,i);var o=z(p);function p(y,C,V){var q;c(this,p),(q=o.call(this,C._interaction)).dropzone=void 0,q.dragEvent=void 0,q.relatedTarget=void 0,q.draggable=void 0,q.propagationStopped=!1,q.immediatePropagationStopped=!1;var G=V==="dragleave"?y.prev:y.cur,pe=G.element,Oe=G.dropzone;return q.type=V,q.target=pe,q.currentTarget=pe,q.dropzone=Oe,q.dragEvent=C,q.relatedTarget=C.target,q.draggable=C.interactable,q.timeStamp=C.timeStamp,q}return h(p,[{key:"reject",value:function(){var y=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 V=C.activeDrops,q=K(V,function(pe){var Oe=pe.dropzone,ge=pe.element;return Oe===y.dropzone&&ge===y.target});C.activeDrops.splice(q,1);var G=new p(C,this.dragEvent,"dropdeactivate");G.dropzone=this.dropzone,G.target=this.target,this.dropzone.fire(G)}else this.dropzone.fire(new p(C,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),p}(va);function Ma(i,o){for(var p=0,y=i.slice();p<y.length;p++){var C=y[p],V=C.dropzone,q=C.element;o.dropzone=V,o.target=q,V.fire(o),o.propagationStopped=o.immediatePropagationStopped=!1}}function Ba(i,o){for(var p=function(V,q){for(var G=[],pe=0,Oe=V.interactables.list;pe<Oe.length;pe++){var ge=Oe[pe];if(ge.options.drop.enabled){var Ze=ge.options.drop.accept;if(!(k.element(Ze)&&Ze!==q||k.string(Ze)&&!te(q,Ze)||k.func(Ze)&&!Ze({dropzone:ge,draggableElement:q})))for(var za=0,nl=ge.getAllElements();za<nl.length;za++){var Qa=nl[za];Qa!==q&&G.push({dropzone:ge,element:Qa,rect:ge.getRect(Qa)})}}}return G}(i,o),y=0;y<p.length;y++){var C=p[y];C.rect=C.dropzone.getRect(C.element)}return p}function Ua(i,o,p){for(var y=i.dropState,C=i.interactable,V=i.element,q=[],G=0,pe=y.activeDrops;G<pe.length;G++){var Oe=pe[G],ge=Oe.dropzone,Ze=Oe.element,za=Oe.rect,nl=ge.dropCheck(o,p,C,V,Ze,za);q.push(nl?Ze:null)}var Qa=function(il){for(var _l,sl,Dl,Ml=[],Kl=0;Kl<il.length;Kl++){var El=il[Kl],Fl=il[_l];if(El&&Kl!==_l)if(Fl){var Ir=D(El),mr=D(Fl);if(Ir!==El.ownerDocument)if(mr!==El.ownerDocument)if(Ir!==mr){Ml=Ml.length?Ml:le(Fl);var Fr=void 0;if(Fl instanceof ne.HTMLElement&&El instanceof ne.SVGElement&&!(El instanceof ne.SVGSVGElement)){if(El===mr)continue;Fr=El.ownerSVGElement}else Fr=El;for(var en=le(Fr,Fl.ownerDocument),on=0;en[on]&&en[on]===Ml[on];)on++;var ct=[en[on-1],en[on],Ml[on]];if(ct[0])for(var Tn=ct[0].lastChild;Tn;){if(Tn===ct[1]){_l=Kl,Ml=en;break}if(Tn===ct[2])break;Tn=Tn.previousSibling}}else Dl=Fl,(parseInt(L(sl=El).getComputedStyle(sl).zIndex,10)||0)>=(parseInt(L(Dl).getComputedStyle(Dl).zIndex,10)||0)&&(_l=Kl);else _l=Kl}else _l=Kl}return _l}(q);return y.activeDrops[Qa]||null}function Aa(i,o,p){var y=i.dropState,C={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return p.type==="dragstart"&&(C.activate=new De(y,p,"dropactivate"),C.activate.target=null,C.activate.dropzone=null),p.type==="dragend"&&(C.deactivate=new De(y,p,"dropdeactivate"),C.deactivate.target=null,C.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(C.leave=new De(y,p,"dragleave"),p.dragLeave=C.leave.target=y.prev.element,p.prevDropzone=C.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(C.enter=new De(y,p,"dragenter"),p.dragEnter=y.cur.element,p.dropzone=y.cur.dropzone)),p.type==="dragend"&&y.cur.dropzone&&(C.drop=new De(y,p,"drop"),p.dropzone=y.cur.dropzone,p.relatedTarget=y.cur.element),p.type==="dragmove"&&y.cur.dropzone&&(C.move=new De(y,p,"dropmove"),p.dropzone=y.cur.dropzone)),C}function Ae(i,o){var p=i.dropState,y=p.activeDrops,C=p.cur,V=p.prev;o.leave&&V.dropzone.fire(o.leave),o.enter&&C.dropzone.fire(o.enter),o.move&&C.dropzone.fire(o.move),o.drop&&C.dropzone.fire(o.drop),o.deactivate&&Ma(y,o.deactivate),p.prev.dropzone=C.dropzone,p.prev.element=C.element}function we(i,o){var p=i.interaction,y=i.iEvent,C=i.event;if(y.type==="dragmove"||y.type==="dragend"){var V=p.dropState;o.dynamicDrop&&(V.activeDrops=Ba(o,p.element));var q=y,G=Ua(p,q,C);V.rejected=V.rejected&&!!G&&G.dropzone===V.cur.dropzone&&G.element===V.cur.element,V.cur.dropzone=G&&G.dropzone,V.cur.element=G&&G.element,V.events=Aa(p,0,q)}}var Ea={id:"actions/drop",install:function(i){var o=i.actions,p=i.interactStatic,y=i.Interactable,C=i.defaults;i.usePlugin(be),y.prototype.dropzone=function(V){return function(q,G){if(k.object(G)){if(q.options.drop.enabled=G.enabled!==!1,G.listeners){var pe=Ye(G.listeners),Oe=Object.keys(pe).reduce(function(Ze,za){return Ze[/^(enter|leave)/.test(za)?"drag".concat(za):/^(activate|deactivate|move)/.test(za)?"drop".concat(za):za]=pe[za],Ze},{}),ge=q.options.drop.listeners;ge&&q.off(ge),q.on(Oe),q.options.drop.listeners=Oe}return k.func(G.ondrop)&&q.on("drop",G.ondrop),k.func(G.ondropactivate)&&q.on("dropactivate",G.ondropactivate),k.func(G.ondropdeactivate)&&q.on("dropdeactivate",G.ondropdeactivate),k.func(G.ondragenter)&&q.on("dragenter",G.ondragenter),k.func(G.ondragleave)&&q.on("dragleave",G.ondragleave),k.func(G.ondropmove)&&q.on("dropmove",G.ondropmove),/^(pointer|center)$/.test(G.overlap)?q.options.drop.overlap=G.overlap:k.number(G.overlap)&&(q.options.drop.overlap=Math.max(Math.min(1,G.overlap),0)),"accept"in G&&(q.options.drop.accept=G.accept),"checker"in G&&(q.options.drop.checker=G.checker),q}return k.bool(G)?(q.options.drop.enabled=G,q):q.options.drop}(this,V)},y.prototype.dropCheck=function(V,q,G,pe,Oe,ge){return function(Ze,za,nl,Qa,il,_l,sl){var Dl=!1;if(!(sl=sl||Ze.getRect(_l)))return!!Ze.options.drop.checker&&Ze.options.drop.checker(za,nl,Dl,Ze,_l,Qa,il);var Ml=Ze.options.drop.overlap;if(Ml==="pointer"){var Kl=Re(Qa,il,"drag"),El=na(za);El.x+=Kl.x,El.y+=Kl.y;var Fl=El.x>sl.left&&El.x<sl.right,Ir=El.y>sl.top&&El.y<sl.bottom;Dl=Fl&&Ir}var mr=Qa.getRect(il);if(mr&&Ml==="center"){var Fr=mr.left+mr.width/2,en=mr.top+mr.height/2;Dl=Fr>=sl.left&&Fr<=sl.right&&en>=sl.top&&en<=sl.bottom}return mr&&k.number(Ml)&&(Dl=Math.max(0,Math.min(sl.right,mr.right)-Math.max(sl.left,mr.left))*Math.max(0,Math.min(sl.bottom,mr.bottom)-Math.max(sl.top,mr.top))/(mr.width*mr.height)>=Ml),Ze.options.drop.checker&&(Dl=Ze.options.drop.checker(za,nl,Dl,Ze,_l,Qa,il)),Dl}(this,V,q,G,pe,Oe,ge)},p.dynamicDrop=function(V){return k.bool(V)?(i.dynamicDrop=V,p):i.dynamicDrop},ee(o.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),o.methodDict.drop="dropzone",i.dynamicDrop=!1,C.actions.drop=Ea.defaults},listeners:{"interactions:before-action-start":function(i){var o=i.interaction;o.prepared.name==="drag"&&(o.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(i,o){var p=i.interaction,y=(i.event,i.iEvent);if(p.prepared.name==="drag"){var C=p.dropState;C.activeDrops=[],C.events={},C.activeDrops=Ba(o,p.element),C.events=Aa(p,0,y),C.events.activate&&(Ma(C.activeDrops,C.events.activate),o.fire("actions/drop:start",{interaction:p,dragEvent:y}))}},"interactions:action-move":we,"interactions:after-action-move":function(i,o){var p=i.interaction,y=i.iEvent;if(p.prepared.name==="drag"){var C=p.dropState;Ae(p,C.events),o.fire("actions/drop:move",{interaction:p,dragEvent:y}),C.events={}}},"interactions:action-end":function(i,o){if(i.interaction.prepared.name==="drag"){var p=i.interaction,y=i.iEvent;we(i,o),Ae(p,p.dropState.events),o.fire("actions/drop:end",{interaction:p,dragEvent:y})}},"interactions:stop":function(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.dropState;p&&(p.activeDrops=null,p.events=null,p.cur.dropzone=null,p.cur.element=null,p.prev.dropzone=null,p.prev.element=null,p.rejected=!1)}}},getActiveDrops:Ba,getDrop:Ua,getDropEvents:Aa,fireDropEvents:Ae,filterEventType:function(i){return i.search("drag")===0||i.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ge=Ea;function ol(i){var o=i.interaction,p=i.iEvent,y=i.phase;if(o.prepared.name==="gesture"){var C=o.pointers.map(function(Oe){return Oe.pointer}),V=y==="start",q=y==="end",G=o.interactable.options.deltaSource;if(p.touches=[C[0],C[1]],V)p.distance=Qe(C,G),p.box=Je(C),p.scale=1,p.ds=0,p.angle=Fe(C,G),p.da=0,o.gesture.startDistance=p.distance,o.gesture.startAngle=p.angle;else if(q||o.pointers.length<2){var pe=o.prevEvent;p.distance=pe.distance,p.box=pe.box,p.scale=pe.scale,p.ds=0,p.angle=pe.angle,p.da=0}else p.distance=Qe(C,G),p.box=Je(C),p.scale=p.distance/o.gesture.startDistance,p.angle=Fe(C,G),p.ds=p.scale-o.gesture.scale,p.da=p.angle-o.gesture.angle;o.gesture.distance=p.distance,o.gesture.angle=p.angle,k.number(p.scale)&&p.scale!==1/0&&!isNaN(p.scale)&&(o.gesture.scale=p.scale)}}var Sl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(i){var o=i.actions,p=i.Interactable,y=i.defaults;p.prototype.gesturable=function(C){return k.object(C)?(this.options.gesture.enabled=C.enabled!==!1,this.setPerAction("gesture",C),this.setOnEvents("gesture",C),this):k.bool(C)?(this.options.gesture.enabled=C,this):this.options.gesture},o.map.gesture=Sl,o.methodDict.gesture="gesturable",y.actions.gesture=Sl.defaults},listeners:{"interactions:action-start":ol,"interactions:action-move":ol,"interactions:action-end":ol,"interactions:new":function(i){i.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(i){if(!(i.interaction.pointers.length<2)){var o=i.interactable.options.gesture;if(o&&o.enabled)return i.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(i){return i.search("gesture")===0}},Nl=Sl;function Ra(i,o,p,y,C,V,q){if(!o)return!1;if(o===!0){var G=k.number(V.width)?V.width:V.right-V.left,pe=k.number(V.height)?V.height:V.bottom-V.top;if(q=Math.min(q,Math.abs((i==="left"||i==="right"?G:pe)/2)),G<0&&(i==="left"?i="right":i==="right"&&(i="left")),pe<0&&(i==="top"?i="bottom":i==="bottom"&&(i="top")),i==="left"){var Oe=G>=0?V.left:V.right;return p.x<Oe+q}if(i==="top"){var ge=pe>=0?V.top:V.bottom;return p.y<ge+q}if(i==="right")return p.x>(G>=0?V.right:V.left)-q;if(i==="bottom")return p.y>(pe>=0?V.bottom:V.top)-q}return!!k.element(y)&&(k.element(o)?o===y:ye(y,o,C))}function al(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.resizeAxes){var y=o;p.interactable.options.resize.square?(p.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=p.resizeAxes,p.resizeAxes==="x"?y.delta.y=0:p.resizeAxes==="y"&&(y.delta.x=0))}}var ga,qe,rl={id:"actions/resize",before:["actions/drag"],install:function(i){var o=i.actions,p=i.browser,y=i.Interactable,C=i.defaults;rl.cursors=function(V){return V.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"}}(p),rl.defaultMargin=p.supportsTouch||p.supportsPointerEvent?20:10,y.prototype.resizable=function(V){return function(q,G,pe){return k.object(G)?(q.options.resize.enabled=G.enabled!==!1,q.setPerAction("resize",G),q.setOnEvents("resize",G),k.string(G.axis)&&/^x$|^y$|^xy$/.test(G.axis)?q.options.resize.axis=G.axis:G.axis===null&&(q.options.resize.axis=pe.defaults.actions.resize.axis),k.bool(G.preserveAspectRatio)?q.options.resize.preserveAspectRatio=G.preserveAspectRatio:k.bool(G.square)&&(q.options.resize.square=G.square),q):k.bool(G)?(q.options.resize.enabled=G,q):q.options.resize}(this,V,i)},o.map.resize=rl,o.methodDict.resize="resizable",C.actions.resize=rl.defaults},listeners:{"interactions:new":function(i){i.interaction.resizeAxes="xy"},"interactions:action-start":function(i){(function(o){var p=o.iEvent,y=o.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var C=p,V=y.rect;y._rects={start:ee({},V),corrected:ee({},V),previous:ee({},V),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},C.edges=y.prepared.edges,C.rect=y._rects.corrected,C.deltaRect=y._rects.delta}})(i),al(i)},"interactions:action-move":function(i){(function(o){var p=o.iEvent,y=o.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var C=p,V=y.interactable.options.resize.invert,q=V==="reposition"||V==="negate",G=y.rect,pe=y._rects,Oe=pe.start,ge=pe.corrected,Ze=pe.delta,za=pe.previous;if(ee(za,ge),q){if(ee(ge,G),V==="reposition"){if(ge.top>ge.bottom){var nl=ge.top;ge.top=ge.bottom,ge.bottom=nl}if(ge.left>ge.right){var Qa=ge.left;ge.left=ge.right,ge.right=Qa}}}else ge.top=Math.min(G.top,Oe.bottom),ge.bottom=Math.max(G.bottom,Oe.top),ge.left=Math.min(G.left,Oe.right),ge.right=Math.max(G.right,Oe.left);for(var il in ge.width=ge.right-ge.left,ge.height=ge.bottom-ge.top,ge)Ze[il]=ge[il]-za[il];C.edges=y.prepared.edges,C.rect=ge,C.deltaRect=Ze}})(i),al(i)},"interactions:action-end":function(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.prepared.edges){var y=o;y.edges=p.prepared.edges,y.rect=p._rects.corrected,y.deltaRect=p._rects.delta}},"auto-start:check":function(i){var o=i.interaction,p=i.interactable,y=i.element,C=i.rect,V=i.buttons;if(C){var q=ee({},o.coords.cur.page),G=p.options.resize;if(G&&G.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(V&G.mouseButtons)!=0)){if(k.object(G.edges)){var pe={left:!1,right:!1,top:!1,bottom:!1};for(var Oe in pe)pe[Oe]=Ra(Oe,G.edges[Oe],q,o._latestPointer.eventTarget,y,C,G.margin||rl.defaultMargin);pe.left=pe.left&&!pe.right,pe.top=pe.top&&!pe.bottom,(pe.left||pe.right||pe.top||pe.bottom)&&(i.action={name:"resize",edges:pe})}else{var ge=G.axis!=="y"&&q.x>C.right-rl.defaultMargin,Ze=G.axis!=="x"&&q.y>C.bottom-rl.defaultMargin;(ge||Ze)&&(i.action={name:"resize",axes:(ge?"x":"")+(Ze?"y":"")})}return!i.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(i){var o=i.edges,p=i.axis,y=i.name,C=rl.cursors,V=null;if(p)V=C[y+p];else if(o){for(var q="",G=0,pe=["top","bottom","left","right"];G<pe.length;G++){var Oe=pe[G];o[Oe]&&(q+=Oe)}V=C[q]}return V},filterEventType:function(i){return i.search("resize")===0},defaultMargin:null},da=rl,Xe={id:"actions",install:function(i){i.usePlugin(Nl),i.usePlugin(da),i.usePlugin(be),i.usePlugin(Ge)}},oa=0,aa={request:function(i){return ga(i)},cancel:function(i){return qe(i)},init:function(i){if(ga=i.requestAnimationFrame,qe=i.cancelAnimationFrame,!ga)for(var o=["ms","moz","webkit","o"],p=0;p<o.length;p++){var y=o[p];ga=i["".concat(y,"RequestAnimationFrame")],qe=i["".concat(y,"CancelAnimationFrame")]||i["".concat(y,"CancelRequestAnimationFrame")]}ga=ga&&ga.bind(i),qe=qe&&qe.bind(i),ga||(ga=function(C){var V=Date.now(),q=Math.max(0,16-(V-oa)),G=i.setTimeout(function(){C(V+q)},q);return oa=V+q,G},qe=function(C){return clearTimeout(C)})}},ca={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(i){ca.isScrolling=!0,aa.cancel(ca.i),i.autoScroll=ca,ca.interaction=i,ca.prevTime=ca.now(),ca.i=aa.request(ca.scroll)},stop:function(){ca.isScrolling=!1,ca.interaction&&(ca.interaction.autoScroll=null),aa.cancel(ca.i)},scroll:function(){var i=ca.interaction,o=i.interactable,p=i.element,y=i.prepared.name,C=o.options[y].autoScroll,V=W(C.container,o,p),q=ca.now(),G=(q-ca.prevTime)/1e3,pe=C.speed*G;if(pe>=1){var Oe={x:ca.x*pe,y:ca.y*pe};if(Oe.x||Oe.y){var ge=la(V);k.window(V)?V.scrollBy(Oe.x,Oe.y):V&&(V.scrollLeft+=Oe.x,V.scrollTop+=Oe.y);var Ze=la(V),za={x:Ze.x-ge.x,y:Ze.y-ge.y};(za.x||za.y)&&o.fire({type:"autoscroll",target:p,interactable:o,delta:za,interaction:i,container:V})}ca.prevTime=q}ca.isScrolling&&(aa.cancel(ca.i),ca.i=aa.request(ca.scroll))},check:function(i,o){var p;return(p=i.options[o].autoScroll)==null?void 0:p.enabled},onInteractionMove:function(i){var o=i.interaction,p=i.pointer;if(o.interacting()&&ca.check(o.interactable,o.prepared.name))if(o.simulation)ca.x=ca.y=0;else{var y,C,V,q,G=o.interactable,pe=o.element,Oe=o.prepared.name,ge=G.options[Oe].autoScroll,Ze=W(ge.container,G,pe);if(k.window(Ze))q=p.clientX<ca.margin,y=p.clientY<ca.margin,C=p.clientX>Ze.innerWidth-ca.margin,V=p.clientY>Ze.innerHeight-ca.margin;else{var za=Ne(Ze);q=p.clientX<za.left+ca.margin,y=p.clientY<za.top+ca.margin,C=p.clientX>za.right-ca.margin,V=p.clientY>za.bottom-ca.margin}ca.x=C?1:q?-1:0,ca.y=V?1:y?-1:0,ca.isScrolling||(ca.margin=ge.margin,ca.speed=ge.speed,ca.start(o))}}};function W(i,o,p){return(k.string(i)?ea(i,o,p):i)||L(p)}function la(i){return k.window(i)&&(i=window.document.body),{x:i.scrollLeft,y:i.scrollTop}}var ka={id:"auto-scroll",install:function(i){var o=i.defaults,p=i.actions;i.autoScroll=ca,ca.now=function(){return i.now()},p.phaselessTypes.autoscroll=!0,o.perAction.autoScroll=ca.defaults},listeners:{"interactions:new":function(i){i.interaction.autoScroll=null},"interactions:destroy":function(i){i.interaction.autoScroll=null,ca.stop(),ca.interaction&&(ca.interaction=null)},"interactions:stop":ca.stop,"interactions:action-move":function(i){return ca.onInteractionMove(i)}}},Ce=ka;function Be(i,o){var p=!1;return function(){return p||(Y.console.warn(o),p=!0),i.apply(this,arguments)}}function Fa(i,o){return i.name=o.name,i.axis=o.axis,i.edges=o.edges,i}function me(i){return k.bool(i)?(this.options.styleCursor=i,this):i===null?(delete this.options.styleCursor,this):this.options.styleCursor}function fl(i){return k.func(i)?(this.options.actionChecker=i,this):i===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ja={id:"auto-start/interactableMethods",install:function(i){var o=i.Interactable;o.prototype.getAction=function(p,y,C,V){var q=function(G,pe,Oe,ge,Ze){var za=G.getRect(ge),nl=pe.buttons||{0:1,1:4,3:8,4:16}[pe.button],Qa={action:null,interactable:G,interaction:Oe,element:ge,rect:za,buttons:nl};return Ze.fire("auto-start:check",Qa),Qa.action}(this,y,C,V,i);return this.options.actionChecker?this.options.actionChecker(p,y,q,this,V,C):q},o.prototype.ignoreFrom=Be(function(p){return this._backCompatOption("ignoreFrom",p)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),o.prototype.allowFrom=Be(function(p){return this._backCompatOption("allowFrom",p)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),o.prototype.actionChecker=fl,o.prototype.styleCursor=me}};function kl(i,o,p,y,C){return o.testIgnoreAllow(o.options[i.name],p,y)&&o.options[i.name].enabled&&cl(o,p,i,C)?i:null}function Ha(i,o,p,y,C,V,q){for(var G=0,pe=y.length;G<pe;G++){var Oe=y[G],ge=C[G],Ze=Oe.getAction(o,p,i,ge);if(Ze){var za=kl(Ze,Oe,ge,V,q);if(za)return{action:za,interactable:Oe,element:ge}}}return{action:null,interactable:null,element:null}}function tl(i,o,p,y,C){var V=[],q=[],G=y;function pe(ge){V.push(ge),q.push(G)}for(;k.element(G);){V=[],q=[],C.interactables.forEachMatch(G,pe);var Oe=Ha(i,o,p,V,q,y,C);if(Oe.action&&!Oe.interactable.options[Oe.action.name].manualStart)return Oe;G=Na(G)}return{action:null,interactable:null,element:null}}function Za(i,o,p){var y=o.action,C=o.interactable,V=o.element;y=y||{name:null},i.interactable=C,i.element=V,Fa(i.prepared,y),i.rect=C&&y.name?C.getRect(V):null,ql(i,p),p.fire("autoStart:prepared",{interaction:i})}function cl(i,o,p,y){var C=i.options,V=C[p.name].max,q=C[p.name].maxPerElement,G=y.autoStart.maxInteractions,pe=0,Oe=0,ge=0;if(!(V&&q&&G))return!1;for(var Ze=0,za=y.interactions.list;Ze<za.length;Ze++){var nl=za[Ze],Qa=nl.prepared.name;if(nl.interacting()&&(++pe>=G||nl.interactable===i&&((Oe+=Qa===p.name?1:0)>=V||nl.element===o&&(ge++,Qa===p.name&&ge>=q))))return!1}return G>0}function ul(i,o){return k.number(i)?(o.autoStart.maxInteractions=i,this):o.autoStart.maxInteractions}function Wl(i,o,p){var y=p.autoStart.cursorElement;y&&y!==i&&(y.style.cursor=""),i.ownerDocument.documentElement.style.cursor=o,i.style.cursor=o,p.autoStart.cursorElement=o?i:null}function ql(i,o){var p=i.interactable,y=i.element,C=i.prepared;if(i.pointerType==="mouse"&&p&&p.options.styleCursor){var V="";if(C.name){var q=p.options[C.name].cursorChecker;V=k.func(q)?q(C,p,y,i._interacting):o.actions.map[C.name].getCursor(C)}Wl(i.element,V||"",o)}else o.autoStart.cursorElement&&Wl(o.autoStart.cursorElement,"",o)}var Pl={id:"auto-start/base",before:["actions"],install:function(i){var o=i.interactStatic,p=i.defaults;i.usePlugin(Ja),p.base.actionChecker=null,p.base.styleCursor=!0,ee(p.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),o.maxInteractions=function(y){return ul(y,i)},i.autoStart={maxInteractions:1/0,withinInteractionLimit:cl,cursorElement:null}},listeners:{"interactions:down":function(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget;p.interacting()||Za(p,tl(p,y,C,V,o),o)},"interactions:move":function(i,o){(function(p,y){var C=p.interaction,V=p.pointer,q=p.event,G=p.eventTarget;C.pointerType!=="mouse"||C.pointerIsDown||C.interacting()||Za(C,tl(C,V,q,G,y),y)})(i,o),function(p,y){var C=p.interaction;if(C.pointerIsDown&&!C.interacting()&&C.pointerWasMoved&&C.prepared.name){y.fire("autoStart:before-start",p);var V=C.interactable,q=C.prepared.name;q&&V&&(V.options[q].manualStart||!cl(V,C.element,C.prepared,y)?C.stop():(C.start(C.prepared,V,C.element),ql(C,y)))}}(i,o)},"interactions:stop":function(i,o){var p=i.interaction,y=p.interactable;y&&y.options.styleCursor&&Wl(p.element,"",o)}},maxInteractions:ul,withinInteractionLimit:cl,validateAction:kl},Hl=Pl,gr={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(i,o){var p=i.interaction,y=i.eventTarget,C=i.dx,V=i.dy;if(p.prepared.name==="drag"){var q=Math.abs(C),G=Math.abs(V),pe=p.interactable.options.drag,Oe=pe.startAxis,ge=q>G?"x":q<G?"y":"xy";if(p.prepared.axis=pe.lockAxis==="start"?ge[0]:pe.lockAxis,ge!=="xy"&&Oe!=="xy"&&Oe!==ge){p.prepared.name=null;for(var Ze=y,za=function(Qa){if(Qa!==p.interactable){var il=p.interactable.options.drag;if(!il.manualStart&&Qa.testIgnoreAllow(il,Ze,y)){var _l=Qa.getAction(p.downPointer,p.downEvent,p,Ze);if(_l&&_l.name==="drag"&&function(sl,Dl){if(!Dl)return!1;var Ml=Dl.options.drag.startAxis;return sl==="xy"||Ml==="xy"||Ml===sl}(ge,Qa)&&Hl.validateAction(_l,Qa,Ze,y,o))return Qa}}};k.element(Ze);){var nl=o.interactables.forEachMatch(Ze,za);if(nl){p.prepared.name="drag",p.interactable=nl,p.element=Ze;break}Ze=Na(Ze)}}}}}};function rr(i){var o=i.prepared&&i.prepared.name;if(!o)return null;var p=i.interactable.options;return p[o].hold||p[o].delay}var kr={id:"auto-start/hold",install:function(i){var o=i.defaults;i.usePlugin(Hl),o.perAction.hold=0,o.perAction.delay=0},listeners:{"interactions:new":function(i){i.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(i){var o=i.interaction,p=rr(o);p>0&&(o.autoStartHoldTimer=setTimeout(function(){o.start(o.prepared,o.interactable,o.element)},p))},"interactions:move":function(i){var o=i.interaction,p=i.duplicate;o.autoStartHoldTimer&&o.pointerWasMoved&&!p&&(clearTimeout(o.autoStartHoldTimer),o.autoStartHoldTimer=null)},"autoStart:before-start":function(i){var o=i.interaction;rr(o)>0&&(o.prepared.name=null)}},getHoldDuration:rr},wr=kr,Sr={id:"auto-start",install:function(i){i.usePlugin(Hl),i.usePlugin(wr),i.usePlugin(gr)}},un=function(i){return/^(always|never|auto)$/.test(i)?(this.options.preventDefault=i,this):k.bool(i)?(this.options.preventDefault=i?"always":"never",this):this.options.preventDefault};function Jr(i){var o=i.interaction,p=i.event;o.interactable&&o.interactable.checkAndPreventDefault(p)}var dn={id:"core/interactablePreventDefault",install:function(i){var o=i.Interactable;o.prototype.preventDefault=un,o.prototype.checkAndPreventDefault=function(p){return function(y,C,V){var q=y.options.preventDefault;if(q!=="never")if(q!=="always"){if(C.events.supportsPassive&&/^touch(start|move)$/.test(V.type)){var G=L(V.target).document,pe=C.getDocOptions(G);if(!pe||!pe.events||pe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(V.type)||k.element(V.target)&&te(V.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||V.preventDefault()}else V.preventDefault()}(this,i,p)},i.interactions.docEvents.push({type:"dragstart",listener:function(p){for(var y=0,C=i.interactions.list;y<C.length;y++){var V=C[y];if(V.element&&(V.element===p.target||de(V.element,p.target)))return void V.interactable.checkAndPreventDefault(p)}}})},listeners:["down","move","up","cancel"].reduce(function(i,o){return i["interactions:".concat(o)]=Jr,i},{})};function Xr(i,o){if(o.phaselessTypes[i])return!0;for(var p in o.map)if(i.indexOf(p)===0&&i.substr(p.length)in o.phases)return!0;return!1}function qr(i){var o={};for(var p in i){var y=i[p];k.plainObject(y)?o[p]=qr(y):k.array(y)?o[p]=Se(y):o[p]=y}return o}var pn=function(){function i(o){c(this,i),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=o,this.result=tn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(i,[{key:"start",value:function(o,p){var y,C,V=o.phase,q=this.interaction,G=function(Oe){var ge=Oe.interactable.options[Oe.prepared.name],Ze=ge.modifiers;return Ze&&Ze.length?Ze:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(za){var nl=ge[za];return nl&&nl.enabled&&{options:nl,methods:nl._methods}}).filter(function(za){return!!za})}(q);this.prepareStates(G),this.startEdges=ee({},q.edges),this.edges=ee({},this.startEdges),this.startOffset=(y=q.rect,C=p,y?{left:C.x-y.left,top:C.y-y.top,right:y.right-C.x,bottom:y.bottom-C.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var pe=this.fillArg({phase:V,pageCoords:p,preEnd:!1});return this.result=tn(),this.startAll(pe),this.result=this.setAll(pe)}},{key:"fillArg",value:function(o){var p=this.interaction;return o.interaction=p,o.interactable=p.interactable,o.element=p.element,o.rect||(o.rect=p.rect),o.edges||(o.edges=this.startEdges),o.startOffset=this.startOffset,o}},{key:"startAll",value:function(o){for(var p=0,y=this.states;p<y.length;p++){var C=y[p];C.methods.start&&(o.state=C,C.methods.start(o))}}},{key:"setAll",value:function(o){var p=o.phase,y=o.preEnd,C=o.skipModifiers,V=o.rect,q=o.edges;o.coords=ee({},o.pageCoords),o.rect=ee({},V),o.edges=ee({},q);for(var G=C?this.states.slice(C):this.states,pe=tn(o.coords,o.rect),Oe=0;Oe<G.length;Oe++){var ge,Ze=G[Oe],za=Ze.options,nl=ee({},o.coords),Qa=null;(ge=Ze.methods)!=null&&ge.set&&this.shouldDo(za,y,p)&&(o.state=Ze,Qa=Ze.methods.set(o),Te(o.edges,o.rect,{x:o.coords.x-nl.x,y:o.coords.y-nl.y})),pe.eventProps.push(Qa)}ee(this.edges,o.edges),pe.delta.x=o.coords.x-o.pageCoords.x,pe.delta.y=o.coords.y-o.pageCoords.y,pe.rectDelta.left=o.rect.left-V.left,pe.rectDelta.right=o.rect.right-V.right,pe.rectDelta.top=o.rect.top-V.top,pe.rectDelta.bottom=o.rect.bottom-V.bottom;var il=this.result.coords,_l=this.result.rect;if(il&&_l){var sl=pe.rect.left!==_l.left||pe.rect.right!==_l.right||pe.rect.top!==_l.top||pe.rect.bottom!==_l.bottom;pe.changed=sl||il.x!==pe.coords.x||il.y!==pe.coords.y}return pe}},{key:"applyToInteraction",value:function(o){var p=this.interaction,y=o.phase,C=p.coords.cur,V=p.coords.start,q=this.result,G=this.startDelta,pe=q.delta;y==="start"&&ee(this.startDelta,q.delta);for(var Oe=0,ge=[[V,G],[C,pe]];Oe<ge.length;Oe++){var Ze=ge[Oe],za=Ze[0],nl=Ze[1];za.page.x+=nl.x,za.page.y+=nl.y,za.client.x+=nl.x,za.client.y+=nl.y}var Qa=this.result.rectDelta,il=o.rect||p.rect;il.left+=Qa.left,il.right+=Qa.right,il.top+=Qa.top,il.bottom+=Qa.bottom,il.width=il.right-il.left,il.height=il.bottom-il.top}},{key:"setAndApply",value:function(o){var p=this.interaction,y=o.phase,C=o.preEnd,V=o.skipModifiers,q=this.setAll(this.fillArg({preEnd:C,phase:y,pageCoords:o.modifiedCoords||p.coords.cur.page}));if(this.result=q,!q.changed&&(!V||V<this.states.length)&&p.interacting())return!1;if(o.modifiedCoords){var G=p.coords.cur.page,pe={x:o.modifiedCoords.x-G.x,y:o.modifiedCoords.y-G.y};q.coords.x+=pe.x,q.coords.y+=pe.y,q.delta.x+=pe.x,q.delta.y+=pe.y}this.applyToInteraction(o)}},{key:"beforeEnd",value:function(o){var p=o.interaction,y=o.event,C=this.states;if(C&&C.length){for(var V=!1,q=0;q<C.length;q++){var G=C[q];o.state=G;var pe=G.options,Oe=G.methods,ge=Oe.beforeEnd&&Oe.beforeEnd(o);if(ge)return this.endResult=ge,!1;V=V||!V&&this.shouldDo(pe,!0,o.phase,!0)}V&&p.move({event:y,preEnd:!0})}}},{key:"stop",value:function(o){var p=o.interaction;if(this.states&&this.states.length){var y=ee({states:this.states,interactable:p.interactable,element:p.element,rect:null},o);this.fillArg(y);for(var C=0,V=this.states;C<V.length;C++){var q=V[C];y.state=q,q.methods.stop&&q.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(o){this.states=[];for(var p=0;p<o.length;p++){var y=o[p],C=y.options,V=y.methods,q=y.name;this.states.push({options:C,methods:V,index:p,name:q})}return this.states}},{key:"restoreInteractionCoords",value:function(o){var p=o.interaction,y=p.coords,C=p.rect,V=p.modification;if(V.result){for(var q=V.startDelta,G=V.result,pe=G.delta,Oe=G.rectDelta,ge=0,Ze=[[y.start,q],[y.cur,pe]];ge<Ze.length;ge++){var za=Ze[ge],nl=za[0],Qa=za[1];nl.page.x-=Qa.x,nl.page.y-=Qa.y,nl.client.x-=Qa.x,nl.client.y-=Qa.y}C.left-=Oe.left,C.right-=Oe.right,C.top-=Oe.top,C.bottom-=Oe.bottom}}},{key:"shouldDo",value:function(o,p,y,C){return!(!o||o.enabled===!1||C&&!o.endOnly||o.endOnly&&!p||y==="start"&&!o.setStart)}},{key:"copyFrom",value:function(o){this.startOffset=o.startOffset,this.startDelta=o.startDelta,this.startEdges=o.startEdges,this.edges=o.edges,this.states=o.states.map(function(p){return qr(p)}),this.result=tn(ee({},o.result.coords),ee({},o.result.rect))}},{key:"destroy",value:function(){for(var o in this)this[o]=null}}]),i}();function tn(i,o){return{rect:o,coords:i,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Dr(i,o){var p=i.defaults,y={start:i.start,set:i.set,beforeEnd:i.beforeEnd,stop:i.stop},C=function(V){var q=V||{};for(var G in q.enabled=q.enabled!==!1,p)G in q||(q[G]=p[G]);var pe={options:q,methods:y,name:o,enable:function(){return q.enabled=!0,pe},disable:function(){return q.enabled=!1,pe}};return pe};return o&&typeof o=="string"&&(C._defaults=p,C._methods=y),C}function Zr(i){var o=i.iEvent,p=i.interaction.modification.result;p&&(o.modifiers=p.eventProps)}var Br={id:"modifiers/base",before:["actions"],install:function(i){i.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(i){var o=i.interaction;o.modification=new pn(o)},"interactions:before-action-start":function(i){var o=i.interaction,p=i.interaction.modification;p.start(i,o.coords.start.page),o.edges=p.edges,p.applyToInteraction(i)},"interactions:before-action-move":function(i){var o=i.interaction,p=o.modification,y=p.setAndApply(i);return o.edges=p.edges,y},"interactions:before-action-end":function(i){var o=i.interaction,p=o.modification,y=p.beforeEnd(i);return o.edges=p.startEdges,y},"interactions:action-start":Zr,"interactions:action-move":Zr,"interactions:action-end":Zr,"interactions:after-action-start":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-move":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:stop":function(i){return i.interaction.modification.stop(i)}}},Il=Br,Wr={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Nr=function(i){m(p,i);var o=z(p);function p(y,C,V,q,G,pe,Oe){var ge;c(this,p),(ge=o.call(this,y)).relatedTarget=null,ge.screenX=void 0,ge.screenY=void 0,ge.button=void 0,ge.buttons=void 0,ge.ctrlKey=void 0,ge.shiftKey=void 0,ge.altKey=void 0,ge.metaKey=void 0,ge.page=void 0,ge.client=void 0,ge.delta=void 0,ge.rect=void 0,ge.x0=void 0,ge.y0=void 0,ge.t0=void 0,ge.dt=void 0,ge.duration=void 0,ge.clientX0=void 0,ge.clientY0=void 0,ge.velocity=void 0,ge.speed=void 0,ge.swipe=void 0,ge.axes=void 0,ge.preEnd=void 0,G=G||y.element;var Ze=y.interactable,za=(Ze&&Ze.options||Wr).deltaSource,nl=Re(Ze,G,V),Qa=q==="start",il=q==="end",_l=Qa?S(ge):y.prevEvent,sl=Qa?y.coords.start:il?{page:_l.page,client:_l.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return ge.page=ee({},sl.page),ge.client=ee({},sl.client),ge.rect=ee({},y.rect),ge.timeStamp=sl.timeStamp,il||(ge.page.x-=nl.x,ge.page.y-=nl.y,ge.client.x-=nl.x,ge.client.y-=nl.y),ge.ctrlKey=C.ctrlKey,ge.altKey=C.altKey,ge.shiftKey=C.shiftKey,ge.metaKey=C.metaKey,ge.button=C.button,ge.buttons=C.buttons,ge.target=G,ge.currentTarget=G,ge.preEnd=pe,ge.type=Oe||V+(q||""),ge.interactable=Ze,ge.t0=Qa?y.pointers[y.pointers.length-1].downTime:_l.t0,ge.x0=y.coords.start.page.x-nl.x,ge.y0=y.coords.start.page.y-nl.y,ge.clientX0=y.coords.start.client.x-nl.x,ge.clientY0=y.coords.start.client.y-nl.y,ge.delta=Qa||il?{x:0,y:0}:{x:ge[za].x-_l[za].x,y:ge[za].y-_l[za].y},ge.dt=y.coords.delta.timeStamp,ge.duration=ge.timeStamp-ge.t0,ge.velocity=ee({},y.coords.velocity[za]),ge.speed=Va(ge.velocity.x,ge.velocity.y),ge.swipe=il||q==="inertiastart"?ge.getSwipe():null,ge}return h(p,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var C=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;C<0&&(C+=360);var V=112.5<=C&&C<247.5,q=202.5<=C&&C<337.5;return{up:q,down:!q&&22.5<=C&&C<157.5,left:V,right:!V&&(292.5<=C||C<67.5),angle:C,speed:y.prevEvent.speed,velocity:{x:y.prevEvent.velocityX,y:y.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),p}(va);Object.defineProperties(Nr.prototype,{pageX:{get:function(){return this.page.x},set:function(i){this.page.x=i}},pageY:{get:function(){return this.page.y},set:function(i){this.page.y=i}},clientX:{get:function(){return this.client.x},set:function(i){this.client.x=i}},clientY:{get:function(){return this.client.y},set:function(i){this.client.y=i}},dx:{get:function(){return this.delta.x},set:function(i){this.delta.x=i}},dy:{get:function(){return this.delta.y},set:function(i){this.delta.y=i}},velocityX:{get:function(){return this.velocity.x},set:function(i){this.velocity.x=i}},velocityY:{get:function(){return this.velocity.y},set:function(i){this.velocity.y=i}}});var vn=h(function i(o,p,y,C,V){c(this,i),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=o,this.pointer=p,this.event=y,this.downTime=C,this.downTarget=V}),tt=function(i){return i.interactable="",i.element="",i.prepared="",i.pointerIsDown="",i.pointerWasMoved="",i._proxy="",i}({}),Kn=function(i){return i.start="",i.move="",i.end="",i.stop="",i.interacting="",i}({}),In=0,mn=function(){function i(o){var p=this,y=o.pointerType,C=o.scopeFire;c(this,i),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=Be(function(ge){this.move(ge)},"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=In++,this._scopeFire=C,this.pointerType=y;var V=this;this._proxy={};var q=function(ge){Object.defineProperty(p._proxy,ge,{get:function(){return V[ge]}})};for(var G in tt)q(G);var pe=function(ge){Object.defineProperty(p._proxy,ge,{value:function(){return V[ge].apply(V,arguments)}})};for(var Oe in Kn)pe(Oe);this._scopeFire("interactions:new",{interaction:this})}return h(i,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(o,p,y){var C=this.updatePointer(o,p,y,!0),V=this.pointers[C];this._scopeFire("interactions:down",{pointer:o,event:p,eventTarget:y,pointerIndex:C,pointerInfo:V,type:"down",interaction:this})}},{key:"start",value:function(o,p,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(o.name==="gesture"?2:1)||!p.options[o.name].enabled)&&(Fa(this.prepared,o),this.interactable=p,this.element=y,this.rect=p.getRect(y),this.edges=this.prepared.edges?ee({},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(o,p,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(o,p,y,!1);var C,V,q=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,V=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Va(C,V)>this.pointerMoveTolerance);var G,pe,Oe,ge=this.getPointerIndex(o),Ze={pointer:o,pointerIndex:ge,pointerInfo:this.pointers[ge],event:p,type:"move",eventTarget:y,dx:C,dy:V,duplicate:q,interaction:this};q||(G=this.coords.velocity,pe=this.coords.delta,Oe=Math.max(pe.timeStamp/1e3,.001),G.page.x=pe.page.x/Oe,G.page.y=pe.page.y/Oe,G.client.x=pe.client.x/Oe,G.client.y=pe.client.y/Oe,G.timeStamp=Oe),this._scopeFire("interactions:move",Ze),q||this.simulation||(this.interacting()&&(Ze.type=null,this.move(Ze)),this.pointerWasMoved&&J(this.coords.prev,this.coords.cur))}},{key:"move",value:function(o){o&&o.event||ie(this.coords.delta),(o=ee({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},o||{})).phase="move",this._doPhase(o)}},{key:"pointerUp",value:function(o,p,y,C){var V=this.getPointerIndex(o);V===-1&&(V=this.updatePointer(o,p,y,!1));var q=/cancel$/i.test(p.type)?"cancel":"up";this._scopeFire("interactions:".concat(q),{pointer:o,pointerIndex:V,pointerInfo:this.pointers[V],event:p,eventTarget:y,type:q,curEventTarget:C,interaction:this}),this.simulation||this.end(p),this.removePointer(o,p)}},{key:"documentBlur",value:function(o){this.end(o),this._scopeFire("interactions:blur",{event:o,type:"blur",interaction:this})}},{key:"end",value:function(o){var p;this._ending=!0,o=o||this._latestPointer.event,this.interacting()&&(p=this._doPhase({event:o,interaction:this,phase:"end"})),this._ending=!1,p===!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(o){var p=Ie(o);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:K(this.pointers,function(y){return y.id===p})}},{key:"getPointerInfo",value:function(o){return this.pointers[this.getPointerIndex(o)]}},{key:"updatePointer",value:function(o,p,y,C){var V,q,G,pe=Ie(o),Oe=this.getPointerIndex(o),ge=this.pointers[Oe];return C=C!==!1&&(C||/(down|start)$/i.test(p.type)),ge?ge.pointer=o:(ge=new vn(pe,o,p,null,null),Oe=this.pointers.length,this.pointers.push(ge)),_e(this.coords.cur,this.pointers.map(function(Ze){return Ze.pointer}),this._now()),V=this.coords.delta,q=this.coords.prev,G=this.coords.cur,V.page.x=G.page.x-q.page.x,V.page.y=G.page.y-q.page.y,V.client.x=G.client.x-q.client.x,V.client.y=G.client.y-q.client.y,V.timeStamp=G.timeStamp-q.timeStamp,C&&(this.pointerIsDown=!0,ge.downTime=this.coords.cur.timeStamp,ge.downTarget=y,F(this.downPointer,o),this.interacting()||(J(this.coords.start,this.coords.cur),J(this.coords.prev,this.coords.cur),this.downEvent=p,this.pointerWasMoved=!1)),this._updateLatestPointer(o,p,y),this._scopeFire("interactions:update-pointer",{pointer:o,event:p,eventTarget:y,down:C,pointerInfo:ge,pointerIndex:Oe,interaction:this}),Oe}},{key:"removePointer",value:function(o,p){var y=this.getPointerIndex(o);if(y!==-1){var C=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:o,event:p,eventTarget:null,pointerIndex:y,pointerInfo:C,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(o,p,y){this._latestPointer.pointer=o,this._latestPointer.event=p,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(o,p,y,C){return new Nr(this,o,this.prepared.name,p,this.element,y,C)}},{key:"_fireEvent",value:function(o){var p;(p=this.interactable)==null||p.fire(o),(!this.prevEvent||o.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=o)}},{key:"_doPhase",value:function(o){var p=o.event,y=o.phase,C=o.preEnd,V=o.type,q=this.rect;if(q&&y==="move"&&(Te(this.edges,q,this.coords.delta[this.interactable.options.deltaSource]),q.width=q.right-q.left,q.height=q.bottom-q.top),this._scopeFire("interactions:before-action-".concat(y),o)===!1)return!1;var G=o.iEvent=this._createPreparedEvent(p,y,C,V);return this._scopeFire("interactions:action-".concat(y),o),y==="start"&&(this.prevEvent=G),this._fireEvent(G),this._scopeFire("interactions:after-action-".concat(y),o),!0}},{key:"_now",value:function(){return Date.now()}}]),i}();function Zl(i){xr(i.interaction)}function xr(i){if(!function(p){return!(!p.offset.pending.x&&!p.offset.pending.y)}(i))return!1;var o=i.offset.pending;return jl(i.coords.cur,o),jl(i.coords.delta,o),Te(i.edges,i.rect,o),o.x=0,o.y=0,!0}function Vl(i){var o=i.x,p=i.y;this.offset.pending.x+=o,this.offset.pending.y+=p,this.offset.total.x+=o,this.offset.total.y+=p}function jl(i,o){var p=i.page,y=i.client,C=o.x,V=o.y;p.x+=C,p.y+=V,y.x+=C,y.y+=V}Kn.offsetBy="";var zl={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(i){i.Interaction.prototype.offsetBy=Vl},listeners:{"interactions:new":function(i){i.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(i){return function(o){o.pointerIsDown&&(jl(o.coords.cur,o.offset.total),o.offset.pending.x=0,o.offset.pending.y=0)}(i.interaction)},"interactions:before-action-start":Zl,"interactions:before-action-move":Zl,"interactions:before-action-end":function(i){var o=i.interaction;if(xr(o))return o.move({offset:!0}),o.end(),!1},"interactions:stop":function(i){var o=i.interaction;o.offset.total.x=0,o.offset.total.y=0,o.offset.pending.x=0,o.offset.pending.y=0}}},cr=zl,ar=function(){function i(o){c(this,i),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=o}return h(i,[{key:"start",value:function(o){var p=this.interaction,y=$l(p);if(!y||!y.enabled)return!1;var C=p.coords.velocity.client,V=Va(C.x,C.y),q=this.modification||(this.modification=new pn(p));if(q.copyFrom(p.modification),this.t0=p._now(),this.allowResume=y.allowResume,this.v0=V,this.currentOffset={x:0,y:0},this.startCoords=p.coords.cur.page,this.modifierArg=q.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-p.coords.cur.timeStamp<50&&V>y.minSpeed&&V>y.endSpeed)this.startInertia();else{if(q.result=q.setAll(this.modifierArg),!q.result.changed)return!1;this.startSmoothEnd()}return p.modification.result.rect=null,p.offsetBy(this.targetOffset),p._doPhase({interaction:p,event:o,phase:"inertiastart"}),p.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),p.modification.result.rect=null,this.active=!0,p.simulation=this,!0}},{key:"startInertia",value:function(){var o=this,p=this.interaction.coords.velocity.client,y=$l(this.interaction),C=y.resistance,V=-Math.log(y.endSpeed/this.v0)/C;this.targetOffset={x:(p.x-V)/C,y:(p.y-V)/C},this.te=V,this.lambda_v0=C/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var q=this.modification,G=this.modifierArg;G.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},q.result=q.setAll(G),q.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+q.result.delta.x,y:this.targetOffset.y+q.result.delta.y}),this.onNextFrame(function(){return o.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var o=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 o.smoothEndTick()})}},{key:"onNextFrame",value:function(o){var p=this;this.timeout=aa.request(function(){p.active&&o()})}},{key:"inertiaTick",value:function(){var o,p,y,C,V,q,G,pe=this,Oe=this.interaction,ge=$l(Oe).resistance,Ze=(Oe._now()-this.t0)/1e3;if(Ze<this.te){var za,nl=1-(Math.exp(-ge*Ze)-this.lambda_v0)/this.one_ve_v0;this.isModified?(o=0,p=0,y=this.targetOffset.x,C=this.targetOffset.y,V=this.modifiedOffset.x,q=this.modifiedOffset.y,za={x:Mr(G=nl,o,y,V),y:Mr(G,p,C,q)}):za={x:this.targetOffset.x*nl,y:this.targetOffset.y*nl};var Qa={x:za.x-this.currentOffset.x,y:za.y-this.currentOffset.y};this.currentOffset.x+=Qa.x,this.currentOffset.y+=Qa.y,Oe.offsetBy(Qa),Oe.move(),this.onNextFrame(function(){return pe.inertiaTick()})}else Oe.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var o=this,p=this.interaction,y=p._now()-this.t0,C=$l(p).smoothEndDuration;if(y<C){var V={x:yn(y,0,this.targetOffset.x,C),y:yn(y,0,this.targetOffset.y,C)},q={x:V.x-this.currentOffset.x,y:V.y-this.currentOffset.y};this.currentOffset.x+=q.x,this.currentOffset.y+=q.y,p.offsetBy(q),p.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return o.smoothEndTick()})}else p.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(o){var p=o.pointer,y=o.event,C=o.eventTarget,V=this.interaction;V.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),V.updatePointer(p,y,C,!0),V._doPhase({interaction:V,event:y,phase:"resume"}),J(V.coords.prev,V.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,aa.cancel(this.timeout)}}]),i}();function $l(i){var o=i.interactable,p=i.prepared;return o&&o.options&&p.name&&o.options[p.name].inertia}var zr={id:"inertia",before:["modifiers","actions"],install:function(i){var o=i.defaults;i.usePlugin(cr),i.usePlugin(Il),i.actions.phases.inertiastart=!0,i.actions.phases.resume=!0,o.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(i){var o=i.interaction;o.inertia=new ar(o)},"interactions:before-action-end":function(i){var o=i.interaction,p=i.event;return(!o._interacting||o.simulation||!o.inertia.start(p))&&null},"interactions:down":function(i){var o=i.interaction,p=i.eventTarget,y=o.inertia;if(y.active)for(var C=p;k.element(C);){if(C===o.element){y.resume(i);break}C=Na(C)}},"interactions:stop":function(i){var o=i.interaction.inertia;o.active&&o.stop()},"interactions:before-action-resume":function(i){var o=i.interaction.modification;o.stop(i),o.start(i,i.interaction.coords.cur.page),o.applyToInteraction(i)},"interactions:before-action-inertiastart":function(i){return i.interaction.modification.setAndApply(i)},"interactions:action-resume":Zr,"interactions:action-inertiastart":Zr,"interactions:after-action-inertiastart":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-resume":function(i){return i.interaction.modification.restoreInteractionCoords(i)}}};function Mr(i,o,p,y){var C=1-i;return C*C*o+2*C*i*p+i*i*y}function yn(i,o,p,y){return-p*(i/=y)*(i-2)+o}var Qr=zr;function Yn(i,o){for(var p=0;p<o.length;p++){var y=o[p];if(i.immediatePropagationStopped)break;y(i)}}var En=function(){function i(o){c(this,i),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},o||{})}return h(i,[{key:"fire",value:function(o){var p,y=this.global;(p=this.types[o.type])&&Yn(o,p),!o.propagationStopped&&y&&(p=y[o.type])&&Yn(o,p)}},{key:"on",value:function(o,p){var y=Ye(o,p);for(o in y)this.types[o]=re(this.types[o]||[],y[o])}},{key:"off",value:function(o,p){var y=Ye(o,p);for(o in y){var C=this.types[o];if(C&&C.length)for(var V=0,q=y[o];V<q.length;V++){var G=q[V],pe=C.indexOf(G);pe!==-1&&C.splice(pe,1)}}}},{key:"getRect",value:function(o){return null}}]),i}(),Gn=function(){function i(o){c(this,i),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=o,F(this,o)}return h(i,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),i}();function gn(i){return k.object(i)?{capture:!!i.capture,passive:!!i.passive}:{capture:!!i,passive:!1}}function Dn(i,o){return i===o||(typeof i=="boolean"?!!o.capture===i&&!o.passive:!!i.capture==!!o.capture&&!!i.passive==!!o.passive)}var Ln={id:"events",install:function(i){var o,p=[],y={},C=[],V={add:q,remove:G,addDelegate:function(ge,Ze,za,nl,Qa){var il=gn(Qa);if(!y[za]){y[za]=[];for(var _l=0;_l<C.length;_l++){var sl=C[_l];q(sl,za,pe),q(sl,za,Oe,!0)}}var Dl=y[za],Ml=je(Dl,function(Kl){return Kl.selector===ge&&Kl.context===Ze});Ml||(Ml={selector:ge,context:Ze,listeners:[]},Dl.push(Ml)),Ml.listeners.push({func:nl,options:il})},removeDelegate:function(ge,Ze,za,nl,Qa){var il,_l=gn(Qa),sl=y[za],Dl=!1;if(sl)for(il=sl.length-1;il>=0;il--){var Ml=sl[il];if(Ml.selector===ge&&Ml.context===Ze){for(var Kl=Ml.listeners,El=Kl.length-1;El>=0;El--){var Fl=Kl[El];if(Fl.func===nl&&Dn(Fl.options,_l)){Kl.splice(El,1),Kl.length||(sl.splice(il,1),G(Ze,za,pe),G(Ze,za,Oe,!0)),Dl=!0;break}}if(Dl)break}}},delegateListener:pe,delegateUseCapture:Oe,delegatedEvents:y,documents:C,targets:p,supportsOptions:!1,supportsPassive:!1};function q(ge,Ze,za,nl){if(ge.addEventListener){var Qa=gn(nl),il=je(p,function(_l){return _l.eventTarget===ge});il||(il={eventTarget:ge,events:{}},p.push(il)),il.events[Ze]||(il.events[Ze]=[]),je(il.events[Ze],function(_l){return _l.func===za&&Dn(_l.options,Qa)})||(ge.addEventListener(Ze,za,V.supportsOptions?Qa:Qa.capture),il.events[Ze].push({func:za,options:Qa}))}}function G(ge,Ze,za,nl){if(ge.addEventListener&&ge.removeEventListener){var Qa=K(p,function(Ir){return Ir.eventTarget===ge}),il=p[Qa];if(il&&il.events)if(Ze!=="all"){var _l=!1,sl=il.events[Ze];if(sl){if(za==="all"){for(var Dl=sl.length-1;Dl>=0;Dl--){var Ml=sl[Dl];G(ge,Ze,Ml.func,Ml.options)}return}for(var Kl=gn(nl),El=0;El<sl.length;El++){var Fl=sl[El];if(Fl.func===za&&Dn(Fl.options,Kl)){ge.removeEventListener(Ze,za,V.supportsOptions?Kl:Kl.capture),sl.splice(El,1),sl.length===0&&(delete il.events[Ze],_l=!0);break}}}_l&&!Object.keys(il.events).length&&p.splice(Qa,1)}else for(Ze in il.events)il.events.hasOwnProperty(Ze)&&G(ge,Ze,"all")}}function pe(ge,Ze){for(var za=gn(Ze),nl=new Gn(ge),Qa=y[ge.type],il=Le(ge)[0],_l=il;k.element(_l);){for(var sl=0;sl<Qa.length;sl++){var Dl=Qa[sl],Ml=Dl.selector,Kl=Dl.context;if(te(_l,Ml)&&de(Kl,il)&&de(Kl,_l)){var El=Dl.listeners;nl.currentTarget=_l;for(var Fl=0;Fl<El.length;Fl++){var Ir=El[Fl];Dn(Ir.options,za)&&Ir.func(nl)}}}_l=Na(_l)}}function Oe(ge){return pe(ge,!0)}return(o=i.document)==null||o.createElement("div").addEventListener("test",null,{get capture(){return V.supportsOptions=!0},get passive(){return V.supportsPassive=!0}}),i.events=V,V}},Kr={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(i){for(var o=0,p=Kr.methodOrder;o<p.length;o++){var y=p[o],C=Kr[y](i);if(C)return C}return null},simulationResume:function(i){var o=i.pointerType,p=i.eventType,y=i.eventTarget,C=i.scope;if(!/down|start/i.test(p))return null;for(var V=0,q=C.interactions.list;V<q.length;V++){var G=q[V],pe=y;if(G.simulation&&G.simulation.allowResume&&G.pointerType===o)for(;pe;){if(pe===G.element)return G;pe=Na(pe)}}return null},mouseOrPen:function(i){var o,p=i.pointerId,y=i.pointerType,C=i.eventType,V=i.scope;if(y!=="mouse"&&y!=="pen")return null;for(var q=0,G=V.interactions.list;q<G.length;q++){var pe=G[q];if(pe.pointerType===y){if(pe.simulation&&!Bn(pe,p))continue;if(pe.interacting())return pe;o||(o=pe)}}if(o)return o;for(var Oe=0,ge=V.interactions.list;Oe<ge.length;Oe++){var Ze=ge[Oe];if(!(Ze.pointerType!==y||/down/i.test(C)&&Ze.simulation))return Ze}return null},hasPointer:function(i){for(var o=i.pointerId,p=0,y=i.scope.interactions.list;p<y.length;p++){var C=y[p];if(Bn(C,o))return C}return null},idle:function(i){for(var o=i.pointerType,p=0,y=i.scope.interactions.list;p<y.length;p++){var C=y[p];if(C.pointers.length===1){var V=C.interactable;if(V&&(!V.options.gesture||!V.options.gesture.enabled))continue}else if(C.pointers.length>=2)continue;if(!C.interacting()&&o===C.pointerType)return C}return null}};function Bn(i,o){return i.pointers.some(function(p){return p.id===o})}var bn=Kr,Pr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Vn(i,o){return function(p){var y=o.interactions.list,C=_a(p),V=Le(p),q=V[0],G=V[1],pe=[];if(/^touch/.test(p.type)){o.prevTouchTime=o.now();for(var Oe=0,ge=p.changedTouches;Oe<ge.length;Oe++){var Ze=ge[Oe],za={pointer:Ze,pointerId:Ie(Ze),pointerType:C,eventType:p.type,eventTarget:q,curEventTarget:G,scope:o},nl=fn(za);pe.push([za.pointer,za.eventTarget,za.curEventTarget,nl])}}else{var Qa=!1;if(!Z.supportsPointerEvent&&/mouse/.test(p.type)){for(var il=0;il<y.length&&!Qa;il++)Qa=y[il].pointerType!=="mouse"&&y[il].pointerIsDown;Qa=Qa||o.now()-o.prevTouchTime<500||p.timeStamp===0}if(!Qa){var _l={pointer:p,pointerId:Ie(p),pointerType:C,eventType:p.type,curEventTarget:G,eventTarget:q,scope:o},sl=fn(_l);pe.push([_l.pointer,_l.eventTarget,_l.curEventTarget,sl])}}for(var Dl=0;Dl<pe.length;Dl++){var Ml=pe[Dl],Kl=Ml[0],El=Ml[1],Fl=Ml[2];Ml[3][i](Kl,p,El,Fl)}}}function fn(i){var o=i.pointerType,p=i.scope,y={interaction:bn.search(i),searchDetails:i};return p.fire("interactions:find",y),y.interaction||p.interactions.new({pointerType:o})}function Et(i,o){var p=i.doc,y=i.scope,C=i.options,V=y.interactions.docEvents,q=y.events,G=q[o];for(var pe in y.browser.isIOS&&!C.events&&(C.events={passive:!1}),q.delegatedEvents)G(p,pe,q.delegateListener),G(p,pe,q.delegateUseCapture,!0);for(var Oe=C&&C.events,ge=0;ge<V.length;ge++){var Ze=V[ge];G(p,Ze.type,Ze.listener,Oe)}}var zo={id:"core/interactions",install:function(i){for(var o={},p=0;p<Pr.length;p++){var y=Pr[p];o[y]=Vn(y,i)}var C,V=Z.pEventTypes;function q(){for(var G=0,pe=i.interactions.list;G<pe.length;G++){var Oe=pe[G];if(Oe.pointerIsDown&&Oe.pointerType==="touch"&&!Oe._interacting)for(var ge=function(){var nl=za[Ze];i.documents.some(function(Qa){return de(Qa.doc,nl.downTarget)})||Oe.removePointer(nl.pointer,nl.event)},Ze=0,za=Oe.pointers;Ze<za.length;Ze++)ge()}}(C=ne.PointerEvent?[{type:V.down,listener:q},{type:V.down,listener:o.pointerDown},{type:V.move,listener:o.pointerMove},{type:V.up,listener:o.pointerUp},{type:V.cancel,listener:o.pointerUp}]:[{type:"mousedown",listener:o.pointerDown},{type:"mousemove",listener:o.pointerMove},{type:"mouseup",listener:o.pointerUp},{type:"touchstart",listener:q},{type:"touchstart",listener:o.pointerDown},{type:"touchmove",listener:o.pointerMove},{type:"touchend",listener:o.pointerUp},{type:"touchcancel",listener:o.pointerUp}]).push({type:"blur",listener:function(G){for(var pe=0,Oe=i.interactions.list;pe<Oe.length;pe++)Oe[pe].documentBlur(G)}}),i.prevTouchTime=0,i.Interaction=function(G){m(Oe,G);var pe=z(Oe);function Oe(){return c(this,Oe),pe.apply(this,arguments)}return h(Oe,[{key:"pointerMoveTolerance",get:function(){return i.interactions.pointerMoveTolerance},set:function(ge){i.interactions.pointerMoveTolerance=ge}},{key:"_now",value:function(){return i.now()}}]),Oe}(mn),i.interactions={list:[],new:function(G){G.scopeFire=function(Oe,ge){return i.fire(Oe,ge)};var pe=new i.Interaction(G);return i.interactions.list.push(pe),pe},listeners:o,docEvents:C,pointerMoveTolerance:1},i.usePlugin(dn)},listeners:{"scope:add-document":function(i){return Et(i,"add")},"scope:remove-document":function(i){return Et(i,"remove")},"interactable:unset":function(i,o){for(var p=i.interactable,y=o.interactions.list.length-1;y>=0;y--){var C=o.interactions.list[y];C.interactable===p&&(C.stop(),o.fire("interactions:destroy",{interaction:C}),C.destroy(),o.interactions.list.length>2&&o.interactions.list.splice(y,1))}}},onDocSignal:Et,doOnInteractions:Vn,methodNames:Pr},Mo=zo,kn=function(i){return i[i.On=0]="On",i[i.Off=1]="Off",i}(kn||{}),Oo=function(){function i(o,p,y,C){c(this,i),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new En,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=p.actions,this.target=o,this._context=p.context||y,this._win=L(ja(o)?this._context:o),this._doc=this._win.document,this._scopeEvents=C,this.set(p)}return h(i,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(o,p){return k.func(p.onstart)&&this.on("".concat(o,"start"),p.onstart),k.func(p.onmove)&&this.on("".concat(o,"move"),p.onmove),k.func(p.onend)&&this.on("".concat(o,"end"),p.onend),k.func(p.oninertiastart)&&this.on("".concat(o,"inertiastart"),p.oninertiastart),this}},{key:"updatePerActionListeners",value:function(o,p,y){var C,V=this,q=(C=this._actions.map[o])==null?void 0:C.filterEventType,G=function(pe){return(q==null||q(pe))&&Xr(pe,V._actions)};(k.array(p)||k.object(p))&&this._onOff(kn.Off,o,p,void 0,G),(k.array(y)||k.object(y))&&this._onOff(kn.On,o,y,void 0,G)}},{key:"setPerAction",value:function(o,p){var y=this._defaults;for(var C in p){var V=C,q=this.options[o],G=p[V];V==="listeners"&&this.updatePerActionListeners(o,q.listeners,G),k.array(G)?q[V]=Se(G):k.plainObject(G)?(q[V]=ee(q[V]||{},qr(G)),k.object(y.perAction[V])&&"enabled"in y.perAction[V]&&(q[V].enabled=G.enabled!==!1)):k.bool(G)&&k.object(y.perAction[V])?q[V].enabled=G:q[V]=G}}},{key:"getRect",value:function(o){return o=o||(k.element(this.target)?this.target:null),k.string(this.target)&&(o=o||this._context.querySelector(this.target)),pa(o)}},{key:"rectChecker",value:function(o){var p=this;return k.func(o)?(this.getRect=function(y){var C=ee({},o.apply(p,y));return"width"in C||(C.width=C.right-C.left,C.height=C.bottom-C.top),C},this):o===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(o,p){if(ja(p)||k.object(p)){for(var y in this.options[o]=p,this._actions.map)this.options[y][o]=p;return this}return this.options[o]}},{key:"origin",value:function(o){return this._backCompatOption("origin",o)}},{key:"deltaSource",value:function(o){return o==="page"||o==="client"?(this.options.deltaSource=o,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var o=this.target;return k.string(o)?Array.from(this._context.querySelectorAll(o)):k.func(o)&&o.getAllElements?o.getAllElements():k.element(o)?[o]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(o){return this._context===o.ownerDocument||de(this._context,o)}},{key:"testIgnoreAllow",value:function(o,p,y){return!this.testIgnore(o.ignoreFrom,p,y)&&this.testAllow(o.allowFrom,p,y)}},{key:"testAllow",value:function(o,p,y){return!o||!!k.element(y)&&(k.string(o)?ye(y,o,p):!!k.element(o)&&de(o,y))}},{key:"testIgnore",value:function(o,p,y){return!(!o||!k.element(y))&&(k.string(o)?ye(y,o,p):!!k.element(o)&&de(o,y))}},{key:"fire",value:function(o){return this.events.fire(o),this}},{key:"_onOff",value:function(o,p,y,C,V){k.object(p)&&!k.array(p)&&(C=y,y=null);var q=Ye(p,y,V);for(var G in q){G==="wheel"&&(G=Z.wheelEvent);for(var pe=0,Oe=q[G];pe<Oe.length;pe++){var ge=Oe[pe];Xr(G,this._actions)?this.events[o===kn.On?"on":"off"](G,ge):k.string(this.target)?this._scopeEvents[o===kn.On?"addDelegate":"removeDelegate"](this.target,this._context,G,ge,C):this._scopeEvents[o===kn.On?"add":"remove"](this.target,G,ge,C)}}return this}},{key:"on",value:function(o,p,y){return this._onOff(kn.On,o,p,y)}},{key:"off",value:function(o,p,y){return this._onOff(kn.Off,o,p,y)}},{key:"set",value:function(o){var p=this._defaults;for(var y in k.object(o)||(o={}),this.options=qr(p.base),this._actions.methodDict){var C=y,V=this._actions.methodDict[C];this.options[C]={},this.setPerAction(C,ee(ee({},p.perAction),p.actions[C])),this[V](o[C])}for(var q in o)q!=="getRect"?k.func(this[q])&&this[q](o[q]):this.rectChecker(o.getRect);return this}},{key:"unset",value:function(){if(k.string(this.target))for(var o in this._scopeEvents.delegatedEvents)for(var p=this._scopeEvents.delegatedEvents[o],y=p.length-1;y>=0;y--){var C=p[y],V=C.selector,q=C.context,G=C.listeners;V===this.target&&q===this._context&&p.splice(y,1);for(var pe=G.length-1;pe>=0;pe--)this._scopeEvents.removeDelegate(this.target,this._context,o,G[pe][0],G[pe][1])}else this._scopeEvents.remove(this.target,"all")}}]),i}(),Io=function(){function i(o){var p=this;c(this,i),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=o,o.addListeners({"interactable:unset":function(y){var C=y.interactable,V=C.target,q=k.string(V)?p.selectorMap[V]:V[p.scope.id],G=K(q,function(pe){return pe===C});q.splice(G,1)}})}return h(i,[{key:"new",value:function(o,p){p=ee(p||{},{actions:this.scope.actions});var y=new this.scope.Interactable(o,p,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),k.string(o)?(this.selectorMap[o]||(this.selectorMap[o]=[]),this.selectorMap[o].push(y)):(y.target[this.scope.id]||Object.defineProperty(o,this.scope.id,{value:[],configurable:!0}),o[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:o,options:p,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(o,p){var y=p&&p.context||this.scope.document,C=k.string(o),V=C?this.selectorMap[o]:o[this.scope.id];if(V)return je(V,function(q){return q._context===y&&(C||q.inContext(o))})}},{key:"forEachMatch",value:function(o,p){for(var y=0,C=this.list;y<C.length;y++){var V=C[y],q=void 0;if((k.string(V.target)?k.element(o)&&te(o,V.target):o===V.target)&&V.inContext(o)&&(q=p(V)),q!==void 0)return q}}}]),i}(),Ft=function(){function i(){var o=this;c(this,i),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=Z,this.defaults=qr(Wr),this.Eventable=En,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var C=function V(q,G){var pe=y.interactables.getExisting(q,G);return pe||((pe=y.interactables.new(q,G)).events.global=V.globalEvents),pe};return C.getPointerAverage=ve,C.getTouchBBox=Je,C.getTouchDistance=Qe,C.getTouchAngle=Fe,C.getElementRect=pa,C.getElementClientRect=Ne,C.matchesSelector=te,C.closest=Ke,C.globalEvents={},C.version="1.10.27",C.scope=y,C.use=function(V,q){return this.scope.usePlugin(V,q),this},C.isSet=function(V,q){return!!this.scope.interactables.get(V,q&&q.context)},C.on=Be(function(V,q,G){if(k.string(V)&&V.search(" ")!==-1&&(V=V.trim().split(/ +/)),k.array(V)){for(var pe=0,Oe=V;pe<Oe.length;pe++){var ge=Oe[pe];this.on(ge,q,G)}return this}if(k.object(V)){for(var Ze in V)this.on(Ze,V[Ze],q);return this}return Xr(V,this.scope.actions)?this.globalEvents[V]?this.globalEvents[V].push(q):this.globalEvents[V]=[q]:this.scope.events.add(this.scope.document,V,q,{options:G}),this},"The interact.on() method is being deprecated"),C.off=Be(function(V,q,G){if(k.string(V)&&V.search(" ")!==-1&&(V=V.trim().split(/ +/)),k.array(V)){for(var pe=0,Oe=V;pe<Oe.length;pe++){var ge=Oe[pe];this.off(ge,q,G)}return this}if(k.object(V)){for(var Ze in V)this.off(Ze,V[Ze],q);return this}var za;return Xr(V,this.scope.actions)?V in this.globalEvents&&(za=this.globalEvents[V].indexOf(q))!==-1&&this.globalEvents[V].splice(za,1):this.scope.events.remove(this.scope.document,V,q,G),this},"The interact.off() method is being deprecated"),C.debug=function(){return this.scope},C.supportsTouch=function(){return Z.supportsTouch},C.supportsPointerEvent=function(){return Z.supportsPointerEvent},C.stop=function(){for(var V=0,q=this.scope.interactions.list;V<q.length;V++)q[V].stop();return this},C.pointerMoveTolerance=function(V){return k.number(V)?(this.scope.interactions.pointerMoveTolerance=V,this):this.scope.interactions.pointerMoveTolerance},C.addDocument=function(V,q){this.scope.addDocument(V,q)},C.removeDocument=function(V){this.scope.removeDocument(V)},C}(this),this.InteractEvent=Nr,this.Interactable=void 0,this.interactables=new Io(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return o.removeDocument(y.target)};var p=this;this.Interactable=function(y){m(V,y);var C=z(V);function V(){return c(this,V),C.apply(this,arguments)}return h(V,[{key:"_defaults",get:function(){return p.defaults}},{key:"set",value:function(q){return w(u(V.prototype),"set",this).call(this,q),p.fire("interactable:set",{options:q,interactable:this}),this}},{key:"unset",value:function(){w(u(V.prototype),"unset",this).call(this);var q=p.interactables.list.indexOf(this);q<0||(p.interactables.list.splice(q,1),p.fire("interactable:unset",{interactable:this}))}}]),V}(Oo)}return h(i,[{key:"addListeners",value:function(o,p){this.listenerMaps.push({id:p,map:o})}},{key:"fire",value:function(o,p){for(var y=0,C=this.listenerMaps;y<C.length;y++){var V=C[y].map[o];if(V&&V(p,this,o)===!1)return!1}}},{key:"init",value:function(o){return this.isInitialized?this:function(p,y){return p.isInitialized=!0,k.window(y)&&b(y),ne.init(y),Z.init(y),aa.init(y),p.window=y,p.document=y.document,p.usePlugin(Mo),p.usePlugin(Ln),p}(this,o)}},{key:"pluginIsInstalled",value:function(o){var p=o.id;return p?!!this._plugins.map[p]:this._plugins.list.indexOf(o)!==-1}},{key:"usePlugin",value:function(o,p){if(!this.isInitialized)return this;if(this.pluginIsInstalled(o))return this;if(o.id&&(this._plugins.map[o.id]=o),this._plugins.list.push(o),o.install&&o.install(this,p),o.listeners&&o.before){for(var y=0,C=this.listenerMaps.length,V=o.before.reduce(function(G,pe){return G[pe]=!0,G[jt(pe)]=!0,G},{});y<C;y++){var q=this.listenerMaps[y].id;if(q&&(V[q]||V[jt(q)]))break}this.listenerMaps.splice(y,0,{id:o.id,map:o.listeners})}else o.listeners&&this.listenerMaps.push({id:o.id,map:o.listeners});return this}},{key:"addDocument",value:function(o,p){if(this.getDocIndex(o)!==-1)return!1;var y=L(o);p=p?ee({},p):{},this.documents.push({doc:o,options:p}),this.events.documents.push(o),o!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:o,window:y,scope:this,options:p})}},{key:"removeDocument",value:function(o){var p=this.getDocIndex(o),y=L(o),C=this.documents[p].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(p,1),this.events.documents.splice(p,1),this.fire("scope:remove-document",{doc:o,window:y,scope:this,options:C})}},{key:"getDocIndex",value:function(o){for(var p=0;p<this.documents.length;p++)if(this.documents[p].doc===o)return p;return-1}},{key:"getDocOptions",value:function(o){var p=this.getDocIndex(o);return p===-1?null:this.documents[p].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),i}();function jt(i){return i&&i.replace(/\/.*$/,"")}var Ht=new Ft,Or=Ht.interactStatic,Lo=typeof globalThis<"u"?globalThis:window;Ht.init(Lo);var Dt=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(i){var o=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var C=y[0],V=y[1];return C in i||V in i}),p=function(y,C){for(var V=i.range,q=i.limits,G=q===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:q,pe=i.offset,Oe=pe===void 0?{x:0,y:0}:pe,ge={range:V,grid:i,x:null,y:null},Ze=0;Ze<o.length;Ze++){var za=o[Ze],nl=za[0],Qa=za[1],il=Math.round((y-Oe.x)/i[nl]),_l=Math.round((C-Oe.y)/i[Qa]);ge[nl]=Math.max(G.left,Math.min(G.right,il*i[nl]+Oe.x)),ge[Qa]=Math.max(G.top,Math.min(G.bottom,_l*i[Qa]+Oe.y))}return ge};return p.grid=i,p.coordFields=o,p}}),Vo={id:"snappers",install:function(i){var o=i.interactStatic;o.snappers=ee(o.snappers||{},Dt),o.createSnapGrid=o.snappers.grid}},Bt=Vo,Ut={start:function(i){var o=i.state,p=i.rect,y=i.edges,C=i.pageCoords,V=o.options,q=V.ratio,G=V.enabled,pe=o.options,Oe=pe.equalDelta,ge=pe.modifiers;q==="preserve"&&(q=p.width/p.height),o.startCoords=ee({},C),o.startRect=ee({},p),o.ratio=q,o.equalDelta=Oe;var Ze=o.linkedEdges={top:y.top||y.left&&!y.bottom,left:y.left||y.top&&!y.right,bottom:y.bottom||y.right&&!y.top,right:y.right||y.bottom&&!y.left};if(o.xIsPrimaryAxis=!(!y.left&&!y.right),o.equalDelta){var za=(Ze.left?1:-1)*(Ze.top?1:-1);o.edgeSign={x:za,y:za}}else o.edgeSign={x:Ze.left?-1:1,y:Ze.top?-1:1};if(G!==!1&&ee(y,Ze),ge!=null&&ge.length){var nl=new pn(i.interaction);nl.copyFrom(i.interaction.modification),nl.prepareStates(ge),o.subModification=nl,nl.startAll(t({},i))}},set:function(i){var o=i.state,p=i.rect,y=i.coords,C=o.linkedEdges,V=ee({},y),q=o.equalDelta?qt:Ro;if(ee(i.edges,C),q(o,o.xIsPrimaryAxis,y,p),!o.subModification)return null;var G=ee({},p);Te(C,G,{x:y.x-V.x,y:y.y-V.y});var pe=o.subModification.setAll(t(t({},i),{},{rect:G,edges:C,pageCoords:y,prevCoords:y,prevRect:G})),Oe=pe.delta;return pe.changed&&(q(o,Math.abs(Oe.x)>Math.abs(Oe.y),pe.coords,pe.rect),ee(y,pe.coords)),pe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function qt(i,o,p){var y=i.startCoords,C=i.edgeSign;o?p.y=y.y+(p.x-y.x)*C.y:p.x=y.x+(p.y-y.y)*C.x}function Ro(i,o,p,y){var C=i.startRect,V=i.startCoords,q=i.ratio,G=i.edgeSign;if(o){var pe=y.width/q;p.y=V.y+(pe-C.height)*G.y}else{var Oe=y.height*q;p.x=V.x+(Oe-C.width)*G.x}}var $o=Dr(Ut,"aspectRatio"),Wt=function(){};Wt._defaults={};var xn=Wt;function _n(i,o,p){return k.func(i)?Pe(i,o.interactable,o.element,[p.x,p.y,o]):Pe(i,o.interactable,o.element)}var Rn={start:function(i){var o=i.rect,p=i.startOffset,y=i.state,C=i.interaction,V=i.pageCoords,q=y.options,G=q.elementRect,pe=ee({left:0,top:0,right:0,bottom:0},q.offset||{});if(o&&G){var Oe=_n(q.restriction,C,V);if(Oe){var ge=Oe.right-Oe.left-o.width,Ze=Oe.bottom-Oe.top-o.height;ge<0&&(pe.left+=ge,pe.right+=ge),Ze<0&&(pe.top+=Ze,pe.bottom+=Ze)}pe.left+=p.left-o.width*G.left,pe.top+=p.top-o.height*G.top,pe.right+=p.right-o.width*(1-G.right),pe.bottom+=p.bottom-o.height*(1-G.bottom)}y.offset=pe},set:function(i){var o=i.coords,p=i.interaction,y=i.state,C=y.options,V=y.offset,q=_n(C.restriction,p,o);if(q){var G=function(pe){return!pe||"left"in pe&&"top"in pe||((pe=ee({},pe)).left=pe.x||0,pe.top=pe.y||0,pe.right=pe.right||pe.left+pe.width,pe.bottom=pe.bottom||pe.top+pe.height),pe}(q);o.x=Math.max(Math.min(G.right-V.right,o.x),G.left+V.left),o.y=Math.max(Math.min(G.bottom-V.bottom,o.y),G.top+V.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Po=Dr(Rn,"restrict"),Kt={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Yt={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Gt(i,o){for(var p=0,y=["top","left","bottom","right"];p<y.length;p++){var C=y[p];C in i||(i[C]=o[C])}return i}var $n={noInner:Kt,noOuter:Yt,start:function(i){var o,p=i.interaction,y=i.startOffset,C=i.state,V=C.options;V&&(o=xa(_n(V.offset,p,p.coords.start.page))),o=o||{x:0,y:0},C.offset={top:o.y+y.top,left:o.x+y.left,bottom:o.y-y.bottom,right:o.x-y.right}},set:function(i){var o=i.coords,p=i.edges,y=i.interaction,C=i.state,V=C.offset,q=C.options;if(p){var G=ee({},o),pe=_n(q.inner,y,G)||{},Oe=_n(q.outer,y,G)||{};Gt(pe,Kt),Gt(Oe,Yt),p.top?o.y=Math.min(Math.max(Oe.top+V.top,G.y),pe.top+V.top):p.bottom&&(o.y=Math.max(Math.min(Oe.bottom+V.bottom,G.y),pe.bottom+V.bottom)),p.left?o.x=Math.min(Math.max(Oe.left+V.left,G.x),pe.left+V.left):p.right&&(o.x=Math.max(Math.min(Oe.right+V.right,G.x),pe.right+V.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Jn=Dr($n,"restrictEdges"),Jt=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(i){}},Rn.defaults),Xt=Dr({start:Rn.start,set:Rn.set,defaults:Jt},"restrictRect"),Xn={width:-1/0,height:-1/0},Fo={width:1/0,height:1/0},Zt=Dr({start:function(i){return $n.start(i)},set:function(i){var o=i.interaction,p=i.state,y=i.rect,C=i.edges,V=p.options;if(C){var q=He(_n(V.min,o,i.coords))||Xn,G=He(_n(V.max,o,i.coords))||Fo;p.options={endOnly:V.endOnly,inner:ee({},$n.noInner),outer:ee({},$n.noOuter)},C.top?(p.options.inner.top=y.bottom-q.height,p.options.outer.top=y.bottom-G.height):C.bottom&&(p.options.inner.bottom=y.top+q.height,p.options.outer.bottom=y.top+G.height),C.left?(p.options.inner.left=y.right-q.width,p.options.outer.left=y.right-G.width):C.right&&(p.options.inner.right=y.left+q.width,p.options.outer.right=y.left+G.width),$n.set(i),p.options=V}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Nn={start:function(i){var o,p=i.interaction,y=i.interactable,C=i.element,V=i.rect,q=i.state,G=i.startOffset,pe=q.options,Oe=pe.offsetWithOrigin?function(za){var nl=za.interaction.element,Qa=xa(Pe(za.state.options.origin,null,null,[nl])),il=Qa||Re(za.interactable,nl,za.interaction.prepared.name);return il}(i):{x:0,y:0};if(pe.offset==="startCoords")o={x:p.coords.start.page.x,y:p.coords.start.page.y};else{var ge=Pe(pe.offset,y,C,[p]);(o=xa(ge)||{x:0,y:0}).x+=Oe.x,o.y+=Oe.y}var Ze=pe.relativePoints;q.offsets=V&&Ze&&Ze.length?Ze.map(function(za,nl){return{index:nl,relativePoint:za,x:G.left-V.width*za.x+o.x,y:G.top-V.height*za.y+o.y}}):[{index:0,relativePoint:null,x:o.x,y:o.y}]},set:function(i){var o=i.interaction,p=i.coords,y=i.state,C=y.options,V=y.offsets,q=Re(o.interactable,o.element,o.prepared.name),G=ee({},p),pe=[];C.offsetWithOrigin||(G.x-=q.x,G.y-=q.y);for(var Oe=0,ge=V;Oe<ge.length;Oe++)for(var Ze=ge[Oe],za=G.x-Ze.x,nl=G.y-Ze.y,Qa=0,il=C.targets.length;Qa<il;Qa++){var _l=C.targets[Qa],sl=void 0;(sl=k.func(_l)?_l(za,nl,o._proxy,Ze,Qa):_l)&&pe.push({x:(k.number(sl.x)?sl.x:za)+Ze.x,y:(k.number(sl.y)?sl.y:nl)+Ze.y,range:k.number(sl.range)?sl.range:C.range,source:_l,index:Qa,offset:Ze})}for(var Dl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ml=0;Ml<pe.length;Ml++){var Kl=pe[Ml],El=Kl.range,Fl=Kl.x-G.x,Ir=Kl.y-G.y,mr=Va(Fl,Ir),Fr=mr<=El;El===1/0&&Dl.inRange&&Dl.range!==1/0&&(Fr=!1),Dl.target&&!(Fr?Dl.inRange&&El!==1/0?mr/El<Dl.distance/Dl.range:El===1/0&&Dl.range!==1/0||mr<Dl.distance:!Dl.inRange&&mr<Dl.distance)||(Dl.target=Kl,Dl.distance=mr,Dl.range=El,Dl.inRange=Fr,Dl.delta.x=Fl,Dl.delta.y=Ir)}return Dl.inRange&&(p.x=Dl.target.x,p.y=Dl.target.y),y.closest=Dl,Dl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},jo=Dr(Nn,"snap"),ot={start:function(i){var o=i.state,p=i.edges,y=o.options;if(!p)return null;i.state={options:{targets:null,relativePoints:[{x:p.left?0:1,y:p.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},o.targetFields=o.targetFields||[["width","height"],["x","y"]],Nn.start(i),o.offsets=i.state.offsets,i.state=o},set:function(i){var o=i.interaction,p=i.state,y=i.coords,C=p.options,V=p.offsets,q={x:y.x-V[0].x,y:y.y-V[0].y};p.options=ee({},C),p.options.targets=[];for(var G=0,pe=C.targets||[];G<pe.length;G++){var Oe=pe[G],ge=void 0;if(ge=k.func(Oe)?Oe(q.x,q.y,o):Oe){for(var Ze=0,za=p.targetFields;Ze<za.length;Ze++){var nl=za[Ze],Qa=nl[0],il=nl[1];if(Qa in ge||il in ge){ge.x=ge[Qa],ge.y=ge[il];break}}p.options.targets.push(ge)}}var _l=Nn.set(i);return p.options=C,_l},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ho=Dr(ot,"snapSize"),Nt={aspectRatio:$o,restrictEdges:Jn,restrict:Po,restrictRect:Xt,restrictSize:Zt,snapEdges:Dr({start:function(i){var o=i.edges;return o?(i.state.targetFields=i.state.targetFields||[[o.left?"left":"right",o.top?"top":"bottom"]],ot.start(i)):null},set:ot.set,defaults:ee(qr(ot.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:jo,snapSize:Ho,spring:xn,avoid:xn,transform:xn,rubberband:xn},Uo={id:"modifiers",install:function(i){var o=i.interactStatic;for(var p in i.usePlugin(Il),i.usePlugin(Bt),o.modifiers=Nt,Nt){var y=Nt[p],C=y._defaults,V=y._methods;C._methods=V,i.defaults.perAction[p]=C}}},qo=Uo,Qt=function(i){m(p,i);var o=z(p);function p(y,C,V,q,G,pe){var Oe;if(c(this,p),F(S(Oe=o.call(this,G)),V),V!==C&&F(S(Oe),C),Oe.timeStamp=pe,Oe.originalEvent=V,Oe.type=y,Oe.pointerId=Ie(C),Oe.pointerType=_a(C),Oe.target=q,Oe.currentTarget=null,y==="tap"){var ge=G.getPointerIndex(C);Oe.dt=Oe.timeStamp-G.pointers[ge].downTime;var Ze=Oe.timeStamp-G.tapTime;Oe.double=!!G.prevTap&&G.prevTap.type!=="doubletap"&&G.prevTap.target===Oe.target&&Ze<500}else y==="doubletap"&&(Oe.dt=C.timeStamp-G.tapTime,Oe.double=!0);return Oe}return h(p,[{key:"_subtractOrigin",value:function(y){var C=y.x,V=y.y;return this.pageX-=C,this.pageY-=V,this.clientX-=C,this.clientY-=V,this}},{key:"_addOrigin",value:function(y){var C=y.x,V=y.y;return this.pageX+=C,this.pageY+=V,this.clientX+=C,this.clientY+=V,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),p}(va),Pn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(i){i.pointerEvents=Pn,i.defaults.actions.pointerEvents=Pn.defaults,ee(i.actions.phaselessTypes,Pn.types)},listeners:{"interactions:new":function(i){var o=i.interaction;o.prevTap=null,o.tapTime=0},"interactions:update-pointer":function(i){var o=i.down,p=i.pointerInfo;!o&&p.hold||(p.hold={duration:1/0,timeout:null})},"interactions:move":function(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget;i.duplicate||p.pointerIsDown&&!p.pointerWasMoved||(p.pointerIsDown&&Tt(i),wn({interaction:p,pointer:y,event:C,eventTarget:V,type:"move"},o))},"interactions:down":function(i,o){(function(p,y){for(var C=p.interaction,V=p.pointer,q=p.event,G=p.eventTarget,pe=p.pointerIndex,Oe=C.pointers[pe].hold,ge=wa(G),Ze={interaction:C,pointer:V,event:q,eventTarget:G,type:"hold",targets:[],path:ge,node:null},za=0;za<ge.length;za++){var nl=ge[za];Ze.node=nl,y.fire("pointerEvents:collect-targets",Ze)}if(Ze.targets.length){for(var Qa=1/0,il=0,_l=Ze.targets;il<_l.length;il++){var sl=_l[il].eventable.options.holdDuration;sl<Qa&&(Qa=sl)}Oe.duration=Qa,Oe.timeout=setTimeout(function(){wn({interaction:C,eventTarget:G,pointer:V,event:q,type:"hold"},y)},Qa)}})(i,o),wn(i,o)},"interactions:up":function(i,o){Tt(i),wn(i,o),function(p,y){var C=p.interaction,V=p.pointer,q=p.event,G=p.eventTarget;C.pointerWasMoved||wn({interaction:C,eventTarget:G,pointer:V,event:q,type:"tap"},y)}(i,o)},"interactions:cancel":function(i,o){Tt(i),wn(i,o)}},PointerEvent:Qt,fire:wn,collectEventTargets:eo,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 wn(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget,q=i.type,G=i.targets,pe=G===void 0?eo(i,o):G,Oe=new Qt(q,y,C,V,p,o.now());o.fire("pointerEvents:new",{pointerEvent:Oe});for(var ge={interaction:p,pointer:y,event:C,eventTarget:V,targets:pe,type:q,pointerEvent:Oe},Ze=0;Ze<pe.length;Ze++){var za=pe[Ze];for(var nl in za.props||{})Oe[nl]=za.props[nl];var Qa=Re(za.eventable,za.node);if(Oe._subtractOrigin(Qa),Oe.eventable=za.eventable,Oe.currentTarget=za.node,za.eventable.fire(Oe),Oe._addOrigin(Qa),Oe.immediatePropagationStopped||Oe.propagationStopped&&Ze+1<pe.length&&pe[Ze+1].node!==Oe.currentTarget)break}if(o.fire("pointerEvents:fired",ge),q==="tap"){var il=Oe.double?wn({interaction:p,pointer:y,event:C,eventTarget:V,type:"doubletap"},o):Oe;p.prevTap=il,p.tapTime=il.timeStamp}return Oe}function eo(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget,q=i.type,G=p.getPointerIndex(y),pe=p.pointers[G];if(q==="tap"&&(p.pointerWasMoved||!pe||pe.downTarget!==V))return[];for(var Oe=wa(V),ge={interaction:p,pointer:y,event:C,eventTarget:V,type:q,path:Oe,targets:[],node:null},Ze=0;Ze<Oe.length;Ze++){var za=Oe[Ze];ge.node=za,o.fire("pointerEvents:collect-targets",ge)}return q==="hold"&&(ge.targets=ge.targets.filter(function(nl){var Qa,il;return nl.eventable.options.holdDuration===((Qa=p.pointers[G])==null||(il=Qa.hold)==null?void 0:il.duration)})),ge.targets}function Tt(i){var o=i.interaction,p=i.pointerIndex,y=o.pointers[p].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var Wo=Object.freeze({__proto__:null,default:Pn});function it(i){var o=i.interaction;o.holdIntervalHandle&&(clearInterval(o.holdIntervalHandle),o.holdIntervalHandle=null)}var Ko={id:"pointer-events/holdRepeat",install:function(i){i.usePlugin(Pn);var o=i.pointerEvents;o.defaults.holdRepeatInterval=0,o.types.holdrepeat=i.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(i,o){return i["pointerEvents:".concat(o)]=it,i},{"pointerEvents:new":function(i){var o=i.pointerEvent;o.type==="hold"&&(o.count=(o.count||0)+1)},"pointerEvents:fired":function(i,o){var p=i.interaction,y=i.pointerEvent,C=i.eventTarget,V=i.targets;if(y.type==="hold"&&V.length){var q=V[0].eventable.options.holdRepeatInterval;q<=0||(p.holdIntervalHandle=setTimeout(function(){o.pointerEvents.fire({interaction:p,eventTarget:C,type:"hold",pointer:y,event:y},o)},q))}}})},Yo=Ko,Go={id:"pointer-events/interactableTargets",install:function(i){var o=i.Interactable;o.prototype.pointerEvents=function(y){return ee(this.events.options,y),this};var p=o.prototype._backCompatOption;o.prototype._backCompatOption=function(y,C){var V=p.call(this,y,C);return V===this&&(this.events.options[y]=C),V}},listeners:{"pointerEvents:collect-targets":function(i,o){var p=i.targets,y=i.node,C=i.type,V=i.eventTarget;o.interactables.forEachMatch(y,function(q){var G=q.events,pe=G.options;G.types[C]&&G.types[C].length&&q.testIgnoreAllow(pe,y,V)&&p.push({node:y,eventable:G,props:{interactable:q}})})},"interactable:new":function(i){var o=i.interactable;o.events.getRect=function(p){return o.getRect(p)}},"interactable:set":function(i,o){var p=i.interactable,y=i.options;ee(p.events.options,o.pointerEvents.defaults),ee(p.events.options,y.pointerEvents||{})}}},Jo=Go,ao={id:"pointer-events",install:function(i){i.usePlugin(Wo),i.usePlugin(Yo),i.usePlugin(Jo)}},st=ao,Xo={id:"reflow",install:function(i){var o=i.Interactable;i.actions.phases.reflow=!0,o.prototype.reflow=function(p){return function(y,C,V){for(var q=y.getAllElements(),G=V.window.Promise,pe=G?[]:null,Oe=function(){var Ze=q[ge],za=y.getRect(Ze);if(!za)return 1;var nl,Qa=je(V.interactions.list,function(sl){return sl.interacting()&&sl.interactable===y&&sl.element===Ze&&sl.prepared.name===C.name});if(Qa)Qa.move(),pe&&(nl=Qa._reflowPromise||new G(function(sl){Qa._reflowResolve=sl}));else{var il=He(za),_l=function(sl){return{coords:sl,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:il.x,y:il.y},client:{x:il.x,y:il.y},timeStamp:V.now()});nl=function(sl,Dl,Ml,Kl,El){var Fl=sl.interactions.new({pointerType:"reflow"}),Ir={interaction:Fl,event:El,pointer:El,eventTarget:Ml,phase:"reflow"};Fl.interactable=Dl,Fl.element=Ml,Fl.prevEvent=El,Fl.updatePointer(El,El,Ml,!0),ie(Fl.coords.delta),Fa(Fl.prepared,Kl),Fl._doPhase(Ir);var mr=sl.window,Fr=mr.Promise,en=Fr?new Fr(function(on){Fl._reflowResolve=on}):void 0;return Fl._reflowPromise=en,Fl.start(Kl,Dl,Ml),Fl._interacting?(Fl.move(Ir),Fl.end(El)):(Fl.stop(),Fl._reflowResolve()),Fl.removePointer(El,El),en}(V,y,Ze,C,_l)}pe&&pe.push(nl)},ge=0;ge<q.length&&!Oe();ge++);return pe&&G.all(pe).then(function(){return y})}(this,p,i)}},listeners:{"interactions:stop":function(i,o){var p=i.interaction;p.pointerType==="reflow"&&(p._reflowResolve&&p._reflowResolve(),function(y,C){y.splice(y.indexOf(C),1)}(o.interactions.list,p))}}},Zo=Xo;if(Or.use(dn),Or.use(cr),Or.use(st),Or.use(Qr),Or.use(qo),Or.use(Sr),Or.use(Xe),Or.use(Ce),Or.use(Zo),Or.default=Or,s(l)==="object"&&l)try{l.exports=Or}catch{}return Or.default=Or,Or})}(Ot,Ot.exports)),Ot.exports}var H4=j4();const Cs=I.getDefaultExportFromCjs(H4),No=a.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(l,{expose:r,emit:n}){const t=l,s=n,c=a.inject(Bc),g=a.inject(Nc);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=a.shallowRef(null),v=a.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 m=!1,u=!1,_=NaN,S=NaN,z=NaN,w=NaN,j=-1,A=-1,N=-1,Y=-1,b=t.x,L=t.y,T=t.w,x=t.h;const k=a.ref(),$=a.reactive({i:a.toRef(t,"i"),state:v,wrapper:k,calcXY:Pe});function U(ce){Ye(ce)}function X(){qa()}function be(ce){rn(t.isDraggable)&&(v.draggable=ce)}function ze(ce){rn(t.isResizable)&&(v.resizable=ce)}function Ee(ce){rn(t.isBounded)&&(v.bounded=ce)}function ne(ce){v.transformScale=ce}function ke(ce){v.rowHeight=ce}function Z(ce){v.maxRows=ce}function de(){v.rtl=_s()==="rtl",qa()}function Ke(ce){v.cols=Math.floor(ce)}c.increaseItem($),a.onBeforeMount(()=>{v.rtl=_s()==="rtl"}),a.onMounted(()=>{c.responsive&&c.lastBreakpoint?v.cols=Oc(c.lastBreakpoint,c.cols):v.cols=c.colNum,v.rowHeight=c.rowHeight,v.containerWidth=c.width!==null?c.width:100,v.margin=c.margin!==void 0?c.margin.map(Number):[10,10],v.maxRows=c.maxRows,rn(t.isDraggable)?v.draggable=c.isDraggable:v.draggable=t.isDraggable,rn(t.isResizable)?v.resizable=c.isResizable:v.resizable=t.isResizable,rn(t.isBounded)?v.bounded=c.isBounded:v.bounded=t.isBounded,v.transformScale=c.transformScale,v.useCssTransforms=c.useCssTransforms,v.useStyleCursor=c.useStyleCursor,a.watchEffect(()=>{b=t.x,L=t.y,x=t.h,T=t.w,jr(pa)}),g.on("updateWidth",U),g.on("compact",X),g.on("setDraggable",be),g.on("setResizable",ze),g.on("setBounded",Ee),g.on("setTransformScale",ne),g.on("setRowHeight",ke),g.on("setMaxRows",Z),g.on("directionchange",de),g.on("setColNum",Ke)}),a.onBeforeUnmount(()=>{g.off("updateWidth",U),g.off("compact",X),g.off("setDraggable",be),g.off("setResizable",ze),g.off("setBounded",Ee),g.off("setTransformScale",ne),g.off("setRowHeight",ke),g.off("setMaxRows",Z),g.off("directionchange",de),g.off("setColNum",Ke),h.value&&(h.value.unset(),h.value=null),c.decreaseItem($)}),r({state:v,wrapper:k});const Na=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,te=a.computed(()=>v.resizable&&!t.static),D=a.computed(()=>c.isMirrored?!v.rtl:v.rtl),le=a.computed(()=>(v.draggable||v.resizable)&&!t.static),ye=O4("item"),ue=a.computed(()=>({[ye.b()]:!0,[ye.bm("resizable")]:te.value,[ye.bm("static")]:t.static,[ye.bm("resizing")]:v.isResizing,[ye.bm("dragging")]:v.isDragging,[ye.bm("transform")]:v.useCssTransforms,[ye.bm("rtl")]:D.value,[ye.bm("no-touch")]:Na&&le.value})),Ne=a.computed(()=>[ye.be("resizer"),D.value&&ye.bem("resizer","rtl")].filter(Boolean));a.watch(()=>t.isDraggable,ce=>{v.draggable=ce}),a.watch(()=>t.static,()=>{jr(F),jr(ie)}),a.watch(()=>v.draggable,()=>{jr(F)}),a.watch(()=>t.isResizable,ce=>{v.resizable=ce}),a.watch(()=>t.isBounded,ce=>{v.bounded=ce}),a.watch(()=>v.resizable,()=>{jr(ie)}),a.watch(()=>v.rowHeight,()=>{jr(pa),jr(wa)}),a.watch([()=>v.cols,()=>v.containerWidth],()=>{jr(ie),jr(pa),jr(wa)}),a.watch([()=>t.minH,()=>t.maxH,()=>t.minW,()=>t.maxW],()=>{jr(ie)}),a.watch(D,()=>{jr(ie),jr(pa)}),a.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const ce=c.margin;!ce||ce[0]===v.margin[0]&&ce[1]===v.margin[1]||(v.margin=ce.map(Number),jr(pa),jr(wa))});function pa(){t.x+t.w>v.cols?(b=0,T=t.w>v.cols?v.cols:t.w):(b=t.x,T=t.w);const ce=ea(b,L,T,x);v.isDragging&&(ce.top=v.dragging.top,D.value?ce.right=v.dragging.left:ce.left=v.dragging.left),v.isResizing&&(ce.width=v.resizing.width,ce.height=v.resizing.height);let ma;v.useCssTransforms?D.value?ma=T4(ce.top,ce.right,ce.width,ce.height):ma=N4(ce.top,ce.left,ce.width,ce.height):D.value?ma=z4(ce.top,ce.right,ce.width,ce.height):ma=A4(ce.top,ce.left,ce.width,ce.height),v.style=ma}function wa(){const ce={};for(const ma of["width","height"]){const na=v.style[ma].match(/^(\d+)px$/);if(!na)return;ce[ma]=na[1]}s("container-resized",t.i,t.h,t.w,ce.height,ce.width)}function ja(ce){if(t.static)return;const ma=ce.type;if(ma==="resizestart"&&v.isResizing||ma!=="resizestart"&&!v.isResizing)return;const na=ks(ce);if(rn(na))return;const{x:Ie,y:_e}=na,Ca={width:0,height:0};let ve;switch(ma){case"resizestart":{ie(),j=T,A=x,ve=ea(b,L,T,x),Ca.width=ve.width,Ca.height=ve.height,v.resizing=Ca,v.isResizing=!0;break}case"resizemove":{!ce.edges.right&&!ce.edges.left&&(z=Ie),!ce.edges.top&&!ce.edges.bottom&&(w=_e);const Je=xs(z,w,Ie,_e);D.value?Ca.width=v.resizing.width-Je.deltaX/v.transformScale:Ca.width=v.resizing.width+Je.deltaX/v.transformScale,Ca.height=v.resizing.height+Je.deltaY/v.transformScale,v.resizing=Ca;break}case"resizeend":{ve=ea(b,L,T,x),Ca.width=ve.width,Ca.height=ve.height,v.resizing={width:-1,height:-1},v.isResizing=!1;break}}ve=Re(Ca.height,Ca.width),ve.w<t.minW&&(ve.w=t.minW),ve.w>t.maxW&&(ve.w=t.maxW),ve.h<t.minH&&(ve.h=t.minH),ve.h>t.maxH&&(ve.h=t.maxH),ve.h<1&&(ve.h=1),ve.w<1&&(ve.w=1),z=Ie,w=_e,(T!==ve.w||x!==ve.h)&&s("resize",t.i,ve.h,ve.w,Ca.height,Ca.width),ce.type==="resizeend"&&(j!==T||A!==x)&&s("resized",t.i,ve.h,ve.w,Ca.height,Ca.width),g.emit("resizeEvent",ce.type,t.i,b,L,ve.h,ve.w)}function ee(ce){if(t.static||v.isResizing)return;const ma=ce.type;if(ma==="dragstart"&&v.isDragging||ma!=="dragstart"&&!v.isDragging)return;const na=ks(ce);if(rn(na))return;const{x:Ie,y:_e}=na,Ca=ce.target;if(!Ca.offsetParent)return;const ve={top:0,left:0};switch(ma){case"dragstart":{N=b,Y=L;const Qe=Ca.offsetParent.getBoundingClientRect(),Fe=Ca.getBoundingClientRect(),_a=Fe.left/v.transformScale,Le=Qe.left/v.transformScale,va=Fe.right/v.transformScale,re=Qe.right/v.transformScale,Se=Fe.top/v.transformScale,K=Qe.top/v.transformScale;D.value?ve.left=(va-re)*-1:ve.left=_a-Le,ve.top=Se-K,v.dragging=ve,v.isDragging=!0;break}case"dragmove":{const Qe=xs(_,S,Ie,_e);if(D.value?ve.left=v.dragging.left-Qe.deltaX/v.transformScale:ve.left=v.dragging.left+Qe.deltaX/v.transformScale,ve.top=v.dragging.top+Qe.deltaY/v.transformScale,v.bounded){const Fe=Ca.offsetParent.clientHeight-He(t.h,v.rowHeight,v.margin[1]);ve.top=Te(ve.top,0,Fe);const _a=xa(),Le=v.containerWidth-He(t.w,_a,v.margin[0]);ve.left=Te(ve.left,0,Le)}v.dragging=ve;break}case"dragend":{const Qe=Ca.offsetParent.getBoundingClientRect(),Fe=Ca.getBoundingClientRect(),_a=Fe.left/v.transformScale,Le=Qe.left/v.transformScale,va=Fe.right/v.transformScale,re=Qe.right/v.transformScale,Se=Fe.top/v.transformScale,K=Qe.top/v.transformScale;D.value?ve.left=(va-re)*-1:ve.left=_a-Le,ve.top=Se-K,v.dragging={top:-1,left:-1},v.isDragging=!1;break}}let Je;D.value,Je=Pe(ve.top,ve.left),_=Ie,S=_e,(b!==Je.x||L!==Je.y)&&s("move",t.i,Je.x,Je.y),ce.type==="dragend"&&(N!==b||Y!==L)&&s("moved",t.i,Je.x,Je.y),g.emit("dragEvent",ce.type,t.i,Je.x,Je.y,x,T)}function ea(ce,ma,na,Ie){const _e=xa();let Ca;return D.value?Ca={right:Math.round(_e*ce+(ce+1)*v.margin[0]),top:Math.round(v.rowHeight*ma+(ma+1)*v.margin[1]),width:na===1/0?na:Math.round(_e*na+Math.max(0,na-1)*v.margin[0]),height:Ie===1/0?Ie:Math.round(v.rowHeight*Ie+Math.max(0,Ie-1)*v.margin[1])}:Ca={left:Math.round(_e*ce+(ce+1)*v.margin[0]),top:Math.round(v.rowHeight*ma+(ma+1)*v.margin[1]),width:na===1/0?na:Math.round(_e*na+Math.max(0,na-1)*v.margin[0]),height:Ie===1/0?Ie:Math.round(v.rowHeight*Ie+Math.max(0,Ie-1)*v.margin[1])},Ca}function Pe(ce,ma){const na=xa();let Ie=Math.round((ma-v.margin[0])/(na+v.margin[0])),_e=Math.round((ce-v.margin[1])/(v.rowHeight+v.margin[1]));return Ie=Math.max(Math.min(Ie,v.cols-T),0),_e=Math.max(Math.min(_e,v.maxRows-x),0),{x:Ie,y:_e}}function xa(){return(v.containerWidth-v.margin[0]*(v.cols+1))/v.cols}function He(ce,ma,na){return Number.isFinite(ce)?Math.round(ma*ce+Math.max(0,ce-1)*na):ce}function Te(ce,ma,na){return Math.max(Math.min(ce,na),ma)}function Re(ce,ma,na=!1){const Ie=xa();let _e=Math.round((ma+v.margin[0])/(Ie+v.margin[0])),Ca=0;return na?Ca=Math.ceil((ce+v.margin[1])/(v.rowHeight+v.margin[1])):Ca=Math.round((ce+v.margin[1])/(v.rowHeight+v.margin[1])),_e=Math.max(Math.min(_e,v.cols-b),0),Ca=Math.max(Math.min(Ca,v.maxRows-L),0),{w:_e,h:Ca}}function Ye(ce,ma){v.containerWidth=ce}function qa(){pa()}function Va(){!h.value&&k.value&&(h.value=Cs(k.value),v.useStyleCursor||h.value.styleCursor(!1))}const P=ys(ee);function F(){if(Va(),!!h.value)if(v.draggable&&!t.static){const ce={ignoreFrom:t.dragIgnoreFrom,allowFrom:t.dragAllowFrom,...t.dragOption};h.value.draggable(ce),m||(m=!0,h.value.on("dragstart dragmove dragend",ma=>{ma.type==="dragmove"?P(ma):ee(ma)}))}else h.value.draggable({enabled:!1})}const J=ys(ja);function ie(){if(Va(),!!h.value)if(v.resizable&&!t.static){const ce=ea(0,0,t.maxW,t.maxH),ma=ea(0,0,t.minW,t.minH),na={edges:{left:D.value?`.${Ne.value[0]}`:!1,right:D.value?!1:`.${Ne.value[0]}`,bottom:`.${Ne.value[0]}`,top:!1},ignoreFrom:t.resizeIgnoreFrom,restrictSize:{min:{height:ma.height*v.transformScale,width:ma.width*v.transformScale},max:{height:ce.height*v.transformScale,width:ce.width*v.transformScale}},...t.resizeOption};t.preserveAspectRatio&&(na.modifiers=[Cs.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(na),u||(u=!0,h.value.on("resizestart resizemove resizeend",Ie=>{Ie.type==="resizemove"?J(Ie):ja(Ie)}))}else h.value.resizable({enabled:!1})}return(ce,ma)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:k,class:a.normalizeClass(ue.value),style:a.normalizeStyle(v.style)},[a.renderSlot(ce.$slots,"default"),te.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(Ne.value)},null,2)):a.createCommentVNode("",!0)],6))}}),nt=typeof window<"u";var Ss;nt&&(Ss=window==null?void 0:window.navigator)!=null&&Ss.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Es(l){return l!=null}function Ds(){}const U4=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(U4)));const q4=nt&&("ontouchstart"in window||K4()>0),W4=q4?"pointerdown":"click";function K4(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Y4(l,r,n=window.Event){const{type:t,bubbles:s=!1,cancelable:c=!1,...g}=r;if(!Es(t)||t==="")return!1;let h;return Es(n)?h=new n(t,{bubbles:s,cancelable:c}):(h=document.createEvent("HTMLEvents"),h.initEvent(t,s,c)),Object.assign(h,g),l.dispatchEvent(h)}const G4="clickoutside",J4=new Set;nt&&document.addEventListener(W4,l=>{const r=l.target,n=l.composedPath&&l.composedPath();J4.forEach(t=>{t!==r&&(n?!n.includes(t):!t.contains(r))&&(!t.__transferElement||t.__transferElement!==r&&!t.__transferElement.contains(r))&&Y4(t,{type:G4})})},!0);const X4=[["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 mo;if(nt){for(const l of X4)if(l[1]in document){mo=l;break}}a.computed(()=>!1);const Z4=new Set,Q4=new WeakMap;if(nt&&mo){const l=mo[2],r=mo[4];document.addEventListener(r,()=>{if(Z4.forEach(n=>{n.value=!1}),document[l]){const n=Q4.get(document[l]);n&&(n.value=!0)}},!1)}const Lc=new Map;Lc.set("x",0);Lc.set("y",0);var lt=[],e6=function(){return lt.some(function(l){return l.activeTargets.length>0})},a6=function(){return lt.some(function(l){return l.skippedTargets.length>0})},Bs="ResizeObserver loop completed with undelivered notifications.",l6=function(){var l;typeof ErrorEvent=="function"?l=new ErrorEvent("error",{message:Bs}):(l=document.createEvent("Event"),l.initEvent("error",!1,!1),l.message=Bs),window.dispatchEvent(l)},Pt;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Pt||(Pt={}));var rt=function(l){return Object.freeze(l)},r6=function(){function l(r,n){this.inlineSize=r,this.blockSize=n,rt(this)}return l}(),Vc=function(){function l(r,n,t,s){return this.x=r,this.y=n,this.width=t,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,rt(this)}return l.prototype.toJSON=function(){var r=this,n=r.x,t=r.y,s=r.top,c=r.right,g=r.bottom,h=r.left,v=r.width,m=r.height;return{x:n,y:t,top:s,right:c,bottom:g,left:h,width:v,height:m}},l.fromRect=function(r){return new l(r.x,r.y,r.width,r.height)},l}(),Ci=function(l){return l instanceof SVGElement&&"getBBox"in l},Rc=function(l){if(Ci(l)){var r=l.getBBox(),n=r.width,t=r.height;return!n&&!t}var s=l,c=s.offsetWidth,g=s.offsetHeight;return!(c||g||l.getClientRects().length)},Ns=function(l){var r;if(l instanceof Element)return!0;var n=(r=l==null?void 0:l.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(n&&l instanceof n.Element)},n6=function(l){switch(l.tagName){case"INPUT":if(l.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Vt=typeof window<"u"?window:{},po=new WeakMap,Ts=/auto|scroll/,t6=/^tb|vertical/,o6=/msie|trident/i.test(Vt.navigator&&Vt.navigator.userAgent),Sn=function(l){return parseFloat(l||"0")},_t=function(l,r,n){return l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=!1),new r6((n?r:l)||0,(n?l:r)||0)},As=rt({devicePixelContentBoxSize:_t(),borderBoxSize:_t(),contentBoxSize:_t(),contentRect:new Vc(0,0,0,0)}),$c=function(l,r){if(r===void 0&&(r=!1),po.has(l)&&!r)return po.get(l);if(Rc(l))return po.set(l,As),As;var n=getComputedStyle(l),t=Ci(l)&&l.ownerSVGElement&&l.getBBox(),s=!o6&&n.boxSizing==="border-box",c=t6.test(n.writingMode||""),g=!t&&Ts.test(n.overflowY||""),h=!t&&Ts.test(n.overflowX||""),v=t?0:Sn(n.paddingTop),m=t?0:Sn(n.paddingRight),u=t?0:Sn(n.paddingBottom),_=t?0:Sn(n.paddingLeft),S=t?0:Sn(n.borderTopWidth),z=t?0:Sn(n.borderRightWidth),w=t?0:Sn(n.borderBottomWidth),j=t?0:Sn(n.borderLeftWidth),A=_+m,N=v+u,Y=j+z,b=S+w,L=h?l.offsetHeight-b-l.clientHeight:0,T=g?l.offsetWidth-Y-l.clientWidth:0,x=s?A+Y:0,k=s?N+b:0,$=t?t.width:Sn(n.width)-x-T,U=t?t.height:Sn(n.height)-k-L,X=$+A+T+Y,be=U+N+L+b,ze=rt({devicePixelContentBoxSize:_t(Math.round($*devicePixelRatio),Math.round(U*devicePixelRatio),c),borderBoxSize:_t(X,be,c),contentBoxSize:_t($,U,c),contentRect:new Vc(_,v,$,U)});return po.set(l,ze),ze},Pc=function(l,r,n){var t=$c(l,n),s=t.borderBoxSize,c=t.contentBoxSize,g=t.devicePixelContentBoxSize;switch(r){case Pt.DEVICE_PIXEL_CONTENT_BOX:return g;case Pt.BORDER_BOX:return s;default:return c}},i6=function(){function l(r){var n=$c(r);this.target=r,this.contentRect=n.contentRect,this.borderBoxSize=rt([n.borderBoxSize]),this.contentBoxSize=rt([n.contentBoxSize]),this.devicePixelContentBoxSize=rt([n.devicePixelContentBoxSize])}return l}(),Fc=function(l){if(Rc(l))return 1/0;for(var r=0,n=l.parentNode;n;)r+=1,n=n.parentNode;return r},s6=function(){var l=1/0,r=[];lt.forEach(function(c){if(c.activeTargets.length!==0){var g=[];c.activeTargets.forEach(function(h){var v=new i6(h.target),m=Fc(h.target);g.push(v),h.lastReportedSize=Pc(h.target,h.observedBox),m<l&&(l=m)}),r.push(function(){c.callback.call(c.observer,g,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var n=0,t=r;n<t.length;n++){var s=t[n];s()}return l},zs=function(l){lt.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(n){n.isActive()&&(Fc(n.target)>l?r.activeTargets.push(n):r.skippedTargets.push(n))})})},c6=function(){var l=0;for(zs(l);e6();)l=s6(),zs(l);return a6()&&l6(),l>0},ti,jc=[],u6=function(){return jc.splice(0).forEach(function(l){return l()})},d6=function(l){if(!ti){var r=0,n=document.createTextNode(""),t={characterData:!0};new MutationObserver(function(){return u6()}).observe(n,t),ti=function(){n.textContent="".concat(r?r--:r++)}}jc.push(l),ti()},p6=function(l){d6(function(){requestAnimationFrame(l)})},yo=0,f6=function(){return!!yo},h6=250,v6={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ms=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Os=function(l){return l===void 0&&(l=0),Date.now()+l},oi=!1,m6=function(){function l(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return l.prototype.run=function(r){var n=this;if(r===void 0&&(r=h6),!oi){oi=!0;var t=Os(r);p6(function(){var s=!1;try{s=c6()}finally{if(oi=!1,r=t-Os(),!f6())return;s?n.run(1e3):r>0?n.run(r):n.start()}})}},l.prototype.schedule=function(){this.stop(),this.run()},l.prototype.observe=function(){var r=this,n=function(){return r.observer&&r.observer.observe(document.body,v6)};document.body?n():Vt.addEventListener("DOMContentLoaded",n)},l.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ms.forEach(function(n){return Vt.addEventListener(n,r.listener,!0)}))},l.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),Ms.forEach(function(n){return Vt.removeEventListener(n,r.listener,!0)}),this.stopped=!0)},l}(),bi=new m6,Is=function(l){!yo&&l>0&&bi.start(),yo+=l,!yo&&bi.stop()},y6=function(l){return!Ci(l)&&!n6(l)&&getComputedStyle(l).display==="inline"},g6=function(){function l(r,n){this.target=r,this.observedBox=n||Pt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var r=Pc(this.target,this.observedBox,!0);return y6(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},l}(),b6=function(){function l(r,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=n}return l}(),fo=new WeakMap,Ls=function(l,r){for(var n=0;n<l.length;n+=1)if(l[n].target===r)return n;return-1},ho=function(){function l(){}return l.connect=function(r,n){var t=new b6(r,n);fo.set(r,t)},l.observe=function(r,n,t){var s=fo.get(r),c=s.observationTargets.length===0;Ls(s.observationTargets,n)<0&&(c&&lt.push(s),s.observationTargets.push(new g6(n,t&&t.box)),Is(1),bi.schedule())},l.unobserve=function(r,n){var t=fo.get(r),s=Ls(t.observationTargets,n),c=t.observationTargets.length===1;s>=0&&(c&&lt.splice(lt.indexOf(t),1),t.observationTargets.splice(s,1),Is(-1))},l.disconnect=function(r){var n=this,t=fo.get(r);t.observationTargets.slice().forEach(function(s){return n.unobserve(r,s.target)}),t.activeTargets.splice(0,t.activeTargets.length)},l}(),k6=function(){function l(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ho.connect(this,r)}return l.prototype.observe=function(r,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ns(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ho.observe(this,r,n)},l.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ns(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ho.unobserve(this,r)},l.prototype.disconnect=function(){ho.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const To=new WeakMap;function x6(l){var r;for(let n=0,t=l.length;n<t;++n){const s=l[n],c=To.get(s.target);if(typeof c=="function"){const{inlineSize:g,blockSize:h}=((r=s.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:v,offsetHeight:m}=s.target;c(Object.assign(s,{offsetWidth:v,offsetHeight:m,width:g??v,height:h??m}))}}}const Hc=new(nt&&window.ResizeObserver||k6)(x6);function Vs(l,r){To.set(l,r),Hc.observe(l)}function Rs(l){To.has(l)&&(Hc.unobserve(l),To.delete(l))}function _6(l={}){let r=Ds;const n=a.watch(()=>a.unref(l.target),s=>{r(),!(!s||typeof l.onResize!="function")&&(Vs(s,l.onResize),r=()=>{Rs(s),r=Ds})},{immediate:!0}),t=()=>{n(),r()};return a.getCurrentScope()&&a.onScopeDispose(t),{observeResize:Vs,unobserveResize:Rs,unobserve:t}}const w6=a.ref(!1);a.computed(()=>w6.value);const $s="__theme_style__",ii="__theme_observer__",Ps=a.reactive(new Map),Fs=new Map;a.watch(Ps,()=>{if(!nt)return;Fs.clear();const l=document.head.querySelector(`#${$s}`);l&&document.head.removeChild(l);const r=document.createElement("style");let n=`.${ii} { width: 1px }`,t=1;for(const[s,[c,g]]of Ps.entries())n+=` html.${c} .${ii}, .${g} .${ii} { width: ${++t}px }`,Fs.set(t,s);r.textContent=n,r.id=$s,document.head.appendChild(r)});const Uc=a.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(l,{expose:r,emit:n}){const t=l,s=n,c=a.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),g=new Map,h=a.ref(t.layout),v=a.ref(),{observeResize:m,unobserveResize:u}=_6(),_=_4();_.on("resizeEvent",S),_.on("dragEvent",z),a.onBeforeMount(()=>{s("layout-before-mount",h.value)}),a.onMounted(()=>{s("layout-mounted",h.value),a.nextTick(()=>{M4(h.value),c.originalLayout=h.value,a.nextTick(()=>{U(),v.value&&m(v.value,w4(b,16)),gt(h.value,t.verticalCompact),s("layout-updated",h.value),Y(),b()})})}),a.onBeforeUnmount(()=>{_.clearAll(),v.value&&u(v.value)});function S(be,ze,Ee,ne,ke,Z){k(be,ze,Ee,ne,ke,Z)}function z(be,ze,Ee,ne,ke,Z){x(be,ze,Ee,ne,ke,Z)}a.watch(()=>c.width,(be,ze)=>{a.nextTick(()=>{_.emit("updateWidth",be),ze===-1&&a.nextTick(()=>{s("layout-ready",h.value)}),Y()})}),a.watch(()=>[t.layout,t.layout.length],()=>{h.value=t.layout,N()}),a.watch(()=>t.colNum,be=>{_.emit("setColNum",be)}),a.watch(()=>t.rowHeight,be=>{_.emit("setRowHeight",be)}),a.watch(()=>t.isDraggable,be=>{_.emit("setDraggable",be)}),a.watch(()=>t.isResizable,be=>{_.emit("setResizable",be)}),a.watch(()=>t.isBounded,be=>{_.emit("setBounded",be)}),a.watch(()=>t.transformScale,be=>{_.emit("setTransformScale",be)}),a.watch(()=>t.responsive,be=>{be||(s("update:layout",c.originalLayout),_.emit("setColNum",t.colNum)),b()}),a.watch(()=>t.maxRows,be=>{_.emit("setMaxRows",be)}),a.watch([()=>t.margin,()=>t.margin[1]],Y),a.provide(Bc,a.reactive({...a.toRefs(t),...a.toRefs(c),increaseItem:w,decreaseItem:j})),a.provide(Nc,_),r({state:c,getItem:A,resizeEvent:k,dragEvent:x,layoutUpdate:N});function w(be){g.set(be.i,be)}function j(be){g.delete(be.i)}function A(be){return g.get(be)}function N(){if(!rn(h.value)&&!rn(c.originalLayout)){if(h.value.length!==c.originalLayout.length){const be=X(h.value,c.originalLayout);if(be.length>0)if(h.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(be);else{const ze=new Set(be.map(Ee=>Ee.i));c.originalLayout=c.originalLayout.filter(Ee=>!ze.has(Ee.i))}c.lastLayoutLength=h.value.length,U()}gt(h.value,t.verticalCompact),_.emit("updateWidth",c.width),Y(),s("layout-updated",h.value)}}function Y(){c.mergedStyle={height:L()}}function b(){v.value&&(c.width=v.value.offsetWidth),_.emit("resizeEvent")}function L(){if(!t.autoSize)return;const be=parseFloat(t.margin[1]);return S4(h.value)*(t.rowHeight+be)+be+"px"}let T;function x(be,ze,Ee,ne,ke,Z){let de=gs(h.value,ze);rn(de)&&(de={h:0,w:0,x:0,y:0,i:""}),be==="dragstart"&&!t.verticalCompact&&(T=h.value.reduce((Ke,{i:Na,x:te,y:D})=>({...Ke,[Na]:{x:te,y:D}}),{})),be==="dragmove"||be==="dragstart"?(c.placeholder.i=ze,c.placeholder.x=de.x,c.placeholder.y=de.y,c.placeholder.w=Z,c.placeholder.h=ke,a.nextTick(()=>{c.isDragging=!0}),_.emit("updateWidth",c.width)):a.nextTick(()=>{c.isDragging=!1}),h.value=gi(h.value,de,Ee,ne,!0,t.preventCollision),t.restoreOnDrag?(de.static=!0,gt(h.value,t.verticalCompact,T),de.static=!1):gt(h.value,t.verticalCompact),_.emit("compact"),Y(),be==="dragend"&&(T=void 0,s("layout-updated",h.value))}function k(be,ze,Ee,ne,ke,Z){let de=gs(h.value,ze);rn(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Ke;if(t.preventCollision){const Na=Ac(h.value,{...de,w:Z,h:ke}).filter(te=>te.i!==de.i);if(Ke=Na.length>0,Ke){let te=1/0,D=1/0;Na.forEach(le=>{le.x>de.x&&(te=Math.min(te,le.x)),le.y>de.y&&(D=Math.min(D,le.y))}),Number.isFinite(te)&&(de.w=te-de.x),Number.isFinite(D)&&(de.h=D-de.y)}}Ke||(de.w=Z,de.h=ke),be==="resizestart"||be==="resizemove"?(c.placeholder.i=ze,c.placeholder.x=Ee,c.placeholder.y=ne,c.placeholder.w=de.w,c.placeholder.h=de.h,a.nextTick(()=>{c.isDragging=!0}),_.emit("updateWidth",c.width)):be&&a.nextTick(()=>{c.isDragging=!1}),t.responsive&&$(),gt(h.value,t.verticalCompact),_.emit("compact"),Y(),be==="resizeend"&&s("layout-updated",h.value)}function $(){const be=V4(t.breakpoints,c.width);if(be===c.lastBreakpoint)return;const ze=Oc(be,t.cols);!rn(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=yi(h.value));const Ee=R4(c.originalLayout,c.layouts,t.breakpoints,be,c.lastBreakpoint,ze,t.verticalCompact);c.layouts[be]=Ee,c.lastBreakpoint!==be&&s("breakpoint-changed",be,Ee),h.value=Ee,s("update:layout",Ee),c.lastBreakpoint=be,_.emit("setColNum",ze)}function U(){c.layouts=Object.assign({},t.responsiveLayouts)}function X(be,ze){const Ee=new Set(ze.map(de=>de.i)),ne=new Set(be.map(de=>de.i)),ke=be.filter(de=>!Ee.has(de.i)),Z=ze.filter(de=>!ne.has(de.i));return ke.concat(Z)}return(be,ze)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:v,class:"vgl-layout",style:a.normalizeStyle(c.mergedStyle)},[be.$slots.default?a.renderSlot(be.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(h.value,Ee=>(a.openBlock(),a.createBlock(No,a.mergeProps({key:Ee.i,ref_for:!0},Ee),{default:a.withCtx(()=>[a.renderSlot(be.$slots,"item",{item:Ee})]),_:2},1040))),128)),a.withDirectives(a.createVNode(No,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[a.vShow,c.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var l=document.createElement("style");l.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(l)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const C6={key:0,class:"item-view-group"},S6={key:0,class:"item-view-group"},E6=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:r}){const n=I.useModelComp(I.pinia),{isEdit:t}=I.storeToRefs(n),s=Wn(I.pinia),c=r,g=l,h=a.ref(""),v=a.computed(()=>g==null?void 0:g.children),m=a.computed(()=>{var N,Y,b,L;return((N=g==null?void 0:g.children)==null?void 0:N.length)>0&&((Y=g==null?void 0:g.children)!=null&&Y.every(T=>T==null?void 0:T.layout))?(L=(b=g==null?void 0:g.children)==null?void 0:b[0])==null?void 0:L.layout:"vertical"}),u=N=>{h.value=N,c("radioChange",N)},_=a.computed(()=>{var N,Y;return((Y=(N=g==null?void 0:g.children)==null?void 0:N[0])==null?void 0:Y.isGridLayout)||!1}),S=a.ref((g==null?void 0:g.level)+1),z=a.computed(()=>{if(!(g!=null&&g.children)||!Array.isArray(g.children)||g.children.length<2)return!1;const N=g.children.some(b=>(b==null?void 0:b.name)==="测量系统配置表"&&(b==null?void 0:b.comp)==="ParentItem"),Y=g.children.some(b=>(b==null?void 0:b.name)==="测量系统传递表"&&(b==null?void 0:b.comp)==="ParentItem");return N&&Y}),w=a.computed(()=>{var Y,b,L,T,x,k;let N=(Y=g==null?void 0:g.children)==null?void 0:Y.filter($=>$==null?void 0:$.choice);if(s.setSelectTab((b=N==null?void 0:N[0])==null?void 0:b.choiceName),(h==null?void 0:h.value)!=="")return(L=g==null?void 0:g.children)==null?void 0:L.filter($=>!($!=null&&$.choiceName)||($==null?void 0:$.choiceName)===(h==null?void 0:h.value));{let $=(x=(T=g==null?void 0:g.children)==null?void 0:T.find(U=>U==null?void 0:U.choice))==null?void 0:x.choiceName;return(k=g==null?void 0:g.children)==null?void 0:k.filter(U=>!(U!=null&&U.choiceName)||(U==null?void 0:U.choiceName)===$)}});a.watch(()=>g==null?void 0:g.children,()=>{z.value},{deep:!0});const j=N=>{c("rowClick",N)},A=(N,Y)=>{c("routeUrl",N,Y)};return(N,Y)=>_.value?(a.openBlock(),a.createBlock(a.unref(Uc),{key:0,layout:v.value,"onUpdate:layout":Y[0]||(Y[0]=b=>v.value=b),"is-draggable":a.unref(t)==="edit","is-resizable":a.unref(t)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(b,L)=>(a.openBlock(),a.createBlock(a.unref(No),{key:b.i,x:b.x,y:b.y,"min-h":b.minH,"max-h":b.maxH,"min-w":b.minW,w:b.w,h:b.h,i:b.i},{default:a.withCtx(()=>{var T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:L===((T=g==null?void 0:g.children)==null?void 0:T.length)-1?"0px":"24px"})},[((k=(x=b==null?void 0:b.component)==null?void 0:x.comp)==null?void 0:k.toUpperCase())!=="TABLE"&&(($=b==null?void 0:b.component)!=null&&$.name)?(a.openBlock(),a.createElementBlock("div",C6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:(parseInt(S.value.toString())-1)*12+"px",fontWeight:600-(S.value-1)*100>=400?600-(S.value-1)*100:400,fontSize:17-S.value>=14?17-S.value+"px":"14px"})},a.toDisplayString((U=b==null?void 0:b.component)==null?void 0:U.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)((X=b==null?void 0:b.component)==null?void 0:X.comp)),{pageLayout:m.value,config:{showIndex:(be=a.unref(Yl)[L])==null?void 0:be.showIndex,allowMove:(ze=a.unref(Yl)[L])==null?void 0:ze.allowMove,viewport:(Ee=a.unref(Yl)[L])==null?void 0:Ee.viewport,status:(ne=a.unref(Yl)[L])==null?void 0:ne.status},related:b==null?void 0:b.relatedTables,compName:b==null?void 0:b.component.name,compNames:a.unref(cc),itemData:(ke=b==null?void 0:b.component)==null?void 0:ke.compData,childItemData:(Z=b==null?void 0:b.component)==null?void 0:Z.itemChildData,key:a.unref(qn),cacheNewData:a.unref(sc),onChange:a.unref(So),index:(b==null?void 0:b.id)??L,onContentChange:a.unref(Eo),onPageChange:a.unref(Do),parentTableId:(de=b==null?void 0:b.component)==null?void 0:de.tableId,allMapContents:a.unref(vi),children:(Ke=b==null?void 0:b.component)==null?void 0:Ke.children,level:S.value,onRowClick:j,onRouteUrl:A,onClickTrigger:a.unref(uc),onClickMainKey:a.unref(dc),onRadioChange:u},null,40,["pageLayout","config","related","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(w.value,(b,L)=>{var T,x;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({gap:"16px",display:(b==null?void 0:b.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(L)===((T=g==null?void 0:g.children)==null?void 0:T.length)-1?"0px":"24px"})},[((x=b==null?void 0:b.comp)==null?void 0:x.toUpperCase())!=="TABLE"&&b.name?(a.openBlock(),a.createElementBlock("div",S6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:parseInt(S.value.toString())>1?"12px":"0px",fontWeight:600-(S.value-1)*100>=400?600-(S.value-1)*100:400,fontSize:17-S.value>=14?17-S.value+"px":"14px"})},a.toDisplayString(b.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)(b.comp)),{compName:b.name,config:{showIndex:b==null?void 0:b.showIndex,allowMove:b==null?void 0:b.allowMove,viewport:b==null?void 0:b.viewport,status:b==null?void 0:b.status},itemData:b==null?void 0:b.compData,related:b==null?void 0:b.relatedTables,childItemData:b==null?void 0:b.itemChildData,key:a.unref(qn),onChange:a.unref(So),index:(b==null?void 0:b.id)??L,onContentChange:a.unref(Eo),onPageChange:a.unref(Do),parentTableId:b==null?void 0:b.tableId,allMapContents:a.unref(vi),children:b==null?void 0:b.children,level:S.value,onRowClick:j,onRouteUrl:A,onRadioChange:u},null,40,["compName","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),D6=Ul._export_sfc(E6,[["__scopeId","data-v-822d7221"]]),B6={class:"radio-group-container"},N6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(),c=Wn(I.pinia),{selectTab:g}=I.storeToRefs(c);a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=g.value},{immediate:!0,deep:!0});const h=v=>{s.value=v,t("radioChange",s.value)};return(v,m)=>(a.openBlock(),a.createElementBlock("div",B6,[a.createVNode(pl.ssRadio,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=u=>s.value=u),content:n==null?void 0:n.itemData,onChange:h},null,8,["modelValue","content"])]))}}),T6=Ul._export_sfc(N6,[["__scopeId","data-v-177d64c3"]]),qc=a.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"}]),A6={TABLE:vc,FORM:fs,STATICFORM:mc,TABLEOPERATE:C1,TABLESTYLE:P1,TABLEEXTEND:j1,TABLEINTERACTION:q1,FORMOPERATE:hs,FOLD:x2,CALCULATOR:D2,METHODBUTTON:T2,AVATARUPLOAD:Gi.ssAvatar,SIGNATURE:Gi.ssSignature,FORMTOP:fs,STEP:j2,STEPOPERATE:p2,TIMELINE:Y2,TIMELINEOPERATE:g2,FORMTOPOPERATE:hs,SIGNATUREOPERATE:$2,AVATARUPLOADOPERATE:M2,TABS:X2,TABSOPERATE:Lh,CHART:Jh,CHARTOPERATE:i4,LAYOUT:u4,LAYOUTOPERATE:b4,PARENTITEM:D6,RADIO:T6};function St(l){return A6[l==null?void 0:l.toUpperCase()]||null}exports.De=Uc;exports.activeStepInfo=bt;exports.addContents=Rt;exports.addVisibleDialog=_i;exports.affixItems=Zf;exports.allMapContents=vi;exports.analyzeFilter=kt;exports.analyzeForm=Bd;exports.analyzeQuoteForm=Dd;exports.analyzeTable=Td;exports.cacheNewData=sc;exports.clickMainKey=dc;exports.clickSavePage=Xf;exports.clickStep=fc;exports.clickTrigger=uc;exports.compId=qn;exports.compNames=cc;exports.compShow=Ct;exports.createRobotContent=ac;exports.existLayouts=o0;exports.fixChangeValue=_o;exports.generateLayouts=L1;exports.getComponent=St;exports.getComponents=$t;exports.getPageData=$r;exports.getSliceContLength=p0;exports.gridRowHeight=A1;exports.isStepLayout=hc;exports.onBack=Gf;exports.onButtonChange=l0;exports.onChange=So;exports.onClick=Jf;exports.onClickStep=i0;exports.onContentChange=Eo;exports.onExtendTaskEnd=t0;exports.onOk=r0;exports.onPageBack=c0;exports.onPageChange=Do;exports.onSelectFixContent=Yf;exports.renderShowItems=oc;exports.robotFile=Cf;exports.showItems=Yl;exports.sliceTableLength=ic;exports.slotContent=qc;exports.ssTable=vc;exports.st=No;exports.stepItems=f0;exports.tabChange=s0;exports.toolBar=n0;exports.useFormComp=ki;exports.useModelLoader=Gp;exports.verifyButton=u0;
25
+ ${ir}`,duration:5e3,showClose:!0})}else el.ElMessage.success("导出成功")}else el.ElMessage.error(((Ya=Ll==null?void 0:Ll.data)==null?void 0:Ya.message)||"导出失败")}catch(oe){console.error("导出paraform失败:",oe),el.ElMessage.error("导出失败:"+((oe==null?void 0:oe.message)||"未知错误"))}finally{Sa.close()}}else if(d!=null&&d.includes("导出")&&d!=="导出paraform"){if(d==="导出选中"&&((ia=ar.value)==null?void 0:ia.length)===0)return el.ElMessage.warning(`请先勾选${d}的数据`);if(d==="导出全部"&&((Pa=_e.value)==null?void 0:Pa.length)===0)return el.ElMessage.warning("暂无数据导出");let Sa=["序号",...(Da=(se=Ee.value)==null?void 0:se.map(fe=>fe==null?void 0:fe.prop))==null?void 0:Da.filter(fe=>fe!=="操作")],oe=d==="导出全部"?_e.value:ar.value;const E=["id","sort","tableEditType","create_time","update_time","source_table","create_user_id","update_user_id","department_id","relatedId"];oe=oe==null?void 0:oe.map(fe=>Object.fromEntries(Object.entries(fe).filter(([ba])=>!E.includes(ba)))),Sa=["序号",...Sa],oe=oe==null?void 0:oe.map((fe,ba)=>({序号:ba+1,...fe}));let $e=(u==null?void 0:u.compName)||"表格信息";Io(oe,$e,Sa,$e)}else if(d==="OCR识别")rl.value=!0,Xe.value=[],W.value=1,la.value.clear(),ka.value.clear(),Ce.value=0;else if(d==="迁移")i.selectRow=f,i.show=!0;else if(d==="生成方法"){let Sa=await Sf(f),oe;f!==""?oe=[f]:oe=I.cloneDeep(_e.value),oe=oe==null?void 0:oe.map($e=>($e.输出值=Sa,$e));const E={fixContent:oe,buttonName:"编辑",relatedContents:u==null?void 0:u.related,columns:Ee.value,name:u==null?void 0:u.compName};ze("change",E)}else if(((ua=M==null?void 0:M.extra)==null?void 0:ua.type)==="methodButton"){let Sa;f!==""?Sa=[f]:Sa=I.cloneDeep(_e.value);const E={fixContent:await di(Sa,Ee==null?void 0:Ee.value,"Manual",_e.value),buttonName:"methodButton",relatedContents:u==null?void 0:u.related,columns:Ee.value,name:u==null?void 0:u.compName};ze("change",E)}}},Wc=async(d,f)=>{var M,O,R,B,Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia,Pa,se;try{let Da,ua;const Sa=(M=ie.value[xa.value+x])==null?void 0:M.filter(Ia=>{var dl;return((dl=Ia==null?void 0:Ia.key)==null?void 0:dl.type)==="structureMethod"}),oe=(O=ie.value[xa.value+x])==null?void 0:O.filter(Ia=>{var dl;return((dl=Ia==null?void 0:Ia.key)==null?void 0:dl.type)==="structure"}),E=Sa==null?void 0:Sa.find(Ia=>{var dl,Xa;return((Xa=(dl=Ia==null?void 0:Ia.value)==null?void 0:dl.pageData)==null?void 0:Xa.method)==="保存"});if(!E)return;const $e=(ae=(Q=ie.value[(B=(R=E==null?void 0:E.value)==null?void 0:R.pageData)==null?void 0:B.path])==null?void 0:Q.filter(Ia=>{var dl;return((dl=Ia==null?void 0:Ia.key)==null?void 0:dl.type)==="data"}))==null?void 0:ae.find(Ia=>{var dl,Xa,ml,yl;return((Xa=(dl=Ia==null?void 0:Ia.value)==null?void 0:dl.tableData)==null?void 0:Xa.算法名称)===((yl=(ml=E==null?void 0:E.value)==null?void 0:ml.pageData)==null?void 0:yl.method)});if(!$e)return;const fe={buttonName:(he=(H=E==null?void 0:E.value)==null?void 0:H.pageData)==null?void 0:he.method,api:(Ve=(xe=$e==null?void 0:$e.value)==null?void 0:xe.tableData)==null?void 0:Ve.算法体,content:oe==null?void 0:oe.map(Ia=>{var dl;return(dl=Ia==null?void 0:Ia.value)==null?void 0:dl.pageData}),extraContent:[],extraValues:(Ue=(Me=E==null?void 0:E.value)==null?void 0:Me.pageData)==null?void 0:Ue.data,methodName:($a=(ta=E==null?void 0:E.value)==null?void 0:ta.pageData)==null?void 0:$a.path};if(!d)return;const ba={...d,compData:(Ta=d==null?void 0:d.compData)==null?void 0:Ta.map(Ia=>{var dl;return(Ia==null?void 0:Ia.key)==="formContent"?{...Ia,contents:(dl=Ia==null?void 0:Ia.contents)==null?void 0:dl.map(Xa=>(Xa==null?void 0:Xa.prop)===f?{...Xa,value:""}:Xa)}:Ia})},fa={key:{pageKey:xa.value+x,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:ba}},ya=await el.axios.post(fe.api,fa,{headers:{"Content-Type":"application/json"}});return((ra=ya==null?void 0:ya.data)==null?void 0:ra.code)===200&&(Da=(ia=(Ya=ya==null?void 0:ya.data)==null?void 0:Ya.result)==null?void 0:ia.latestReportCode,ua=(se=(Pa=ya==null?void 0:ya.data)==null?void 0:Pa.result)==null?void 0:se.status),{newMainKeyValue:Da,newStatus:ua}}catch(Da){throw el.ElMessage.error(Da),new Error(Da)}},Si=a.reactive({prop:"状态",value:""});a.ref(["系统自动生成信息","审批意见"]);const Kc=async(d,f,M)=>{var H,he;let O=d==null?void 0:d[f==null?void 0:f.prop],R=1,B,Q;const ae=I.cloneDeep(xa).value+x+O;if(ae){Si.value="",B=(H=ie.value[ae])==null?void 0:H.filter(Me=>{var Ue;return((Ue=Me==null?void 0:Me.key)==null?void 0:Ue.type)==="structure"});const xe=B==null?void 0:B.find(Me=>{var Ue,ta,$a;return(($a=(ta=(Ue=Me==null?void 0:Me.value)==null?void 0:Ue.pageData)==null?void 0:ta.comp)==null?void 0:$a.toUpperCase())==="FORM"});Q={...(he=xe==null?void 0:xe.value)==null?void 0:he.pageData,id:xe==null?void 0:xe.id};const Ve=await Wc(Q,f==null?void 0:f.prop);if(Si.value=Ve==null?void 0:Ve.newStatus,Ve!=null&&Ve.newMainKeyValue)return Ve==null?void 0:Ve.newMainKeyValue}if(_e.value.some(xe=>(xe==null?void 0:xe[f==null?void 0:f.prop])===O)){const xe=O;for(;_e.value.some(Ve=>(Ve==null?void 0:Ve[f==null?void 0:f.prop])===`${xe}(${R})`);)R++;O=`${xe}(${R})`}return O},Yc=async(d,f,M)=>{var B,Q,ae,H;let O,R;if(await Kc(M==null?void 0:M.data,M==null?void 0:M.firstCol),O=I.cloneDeep(xa).value+x,R=I.cloneDeep(O)+`loading${((B=Vl.value)==null?void 0:B.account)||((Q=Vl.value)==null?void 0:Q.账号)}`,f){const he=(H=(ae=ie.value[R])==null?void 0:ae.filter(xe=>{var Ve;return((Ve=xe==null?void 0:xe.key)==null?void 0:Ve.parentTable)===""}))==null?void 0:H.map(xe=>{var Ve;return{id:xe==null?void 0:xe.id,...(Ve=xe==null?void 0:xe.value)==null?void 0:Ve.pageData}});(he==null?void 0:he.length)>0||await sa.loadingConstruct(O,R,null,null,null),Ye.setRouteToChildPath(I.cloneDeep(xa).value),ea.setActiveMenuPath(R)}else Ye.setRouteToChildPath(I.cloneDeep(xa).value),ea.setActiveMenuPath(R)},Gc=()=>{Ke.value=!1,Ua.value=[],Na.value=!1},At=d=>{var B,Q,ae,H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe;const f=[];de.value=I.cloneDeep(Ee.value),(Q=sa.getColumnChild((B=I.cloneDeep(Ee.value))==null?void 0:B.filter(E=>(E==null?void 0:E.label)!=="操作")))==null||Q.forEach((E,$e)=>{var fe,ba,fa;E!=null&&E.formType&&((fe=E==null?void 0:E.formType)==null?void 0:fe.toUpperCase())==="SELECT"||E!=null&&E.menuId?f.push({label:(ba=E==null?void 0:E.prop)!=null&&ba.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",name:(E==null?void 0:E.prop)??"t"+$e,prop:E==null?void 0:E.prop,type:"Select",value:(d==null?void 0:d[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??$e,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,relatedValueId:E==null?void 0:E.relatedValueId,disabled:E==null?void 0:E.disabled,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,allSelectionContents:(E==null?void 0:E.allSelectionContents)??[],filterContent:E==null?void 0:E.filterContent,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter}):f.push({label:(fa=E==null?void 0:E.prop)!=null&&fa.includes(".")?E==null?void 0:E.prop:(E==null?void 0:E.label)??(E==null?void 0:E.prop)??"",prop:E==null?void 0:E.prop,name:(E==null?void 0:E.prop)??"t"+$e,type:!(E!=null&&E.formType)||(E==null?void 0:E.formType)===""?"Input":E==null?void 0:E.formType,value:(E==null?void 0:E.formType)==="Upload"?(d==null?void 0:d[E==null?void 0:E.prop])??"{}":(d==null?void 0:d[E==null?void 0:E.prop])??(E==null?void 0:E.value)??"",id:(E==null?void 0:E.id)??$e,contents:(E==null?void 0:E.options)??[],width:1,isFormColHidden:E==null?void 0:E.isFormColHidden,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled,relatedValueId:E==null?void 0:E.relatedValueId,menus:E==null?void 0:E.menus,groups:E==null?void 0:E.groups,words:E==null?void 0:E.words,filter:E==null?void 0:E.filter,bindMenus:E==null?void 0:E.bindMenus,isMainPath:E==null?void 0:E.isMainPath,required:(E==null?void 0:E.required)??!1,relatedContents:E==null?void 0:E.relatedContents,mainKey:E==null?void 0:E.mainKey,relatedContents:E==null?void 0:E.relatedContents,functionName:E==null?void 0:E.functionName,functionRelatedWords:E==null?void 0:E.functionRelatedWords,calculatorFilter:E==null?void 0:E.calculatorFilter})}),d===""||!d||(Je.value=(d==null?void 0:d.id)??"");let M=sa.getColumnChild((ae=I.cloneDeep(Ee.value))==null?void 0:ae.filter(E=>(E==null?void 0:E.label)!=="操作"));De.value&&((H=De.value)==null?void 0:H.length)>0&&(De.value=(he=I.cloneDeep(De).value)==null?void 0:he.map(E=>{var fe;let $e=(E==null?void 0:E.prop)||((fe=M==null?void 0:M.find(ba=>(ba==null?void 0:ba.label)===(E==null?void 0:E.label)))==null?void 0:fe.prop);return $e&&(E.value=d[$e]),E})),we.value=De.value&&((xe=De.value)==null?void 0:xe.length)>0?sa.getTableFormToForm(De.value):f,we.value=((Ve=we.value)==null?void 0:Ve.map(E=>({...E,disabled:(E==null?void 0:E.prop)==="disabled"?!0:E==null?void 0:E.disabled})))??we.value;let O=[],R=((ta=(Ue=(Me=u.itemData)==null?void 0:Me.filter(E=>(E==null?void 0:E.key)==="filter"))==null?void 0:Ue[0])==null?void 0:ta.contents)??"";if(R=La.analyzeSplitToContent(R,","),(R==null?void 0:R.length)>0&&(O=R.flat()),(O==null?void 0:O.length)>0){let E=O==null?void 0:O.filter(ya=>ya==null?void 0:ya.includes("@Type"));if(E=E==null?void 0:E[(E==null?void 0:E.length)-1],(E==null?void 0:E[(E==null?void 0:E.length)-1])===","&&(E=E==null?void 0:E.slice(0,(E==null?void 0:E.length)-1)),E){let ya=(Ta=($a=E==null?void 0:E.replace("=",L))==null?void 0:$a.split(L))==null?void 0:Ta[1];((ra=ya==null?void 0:ya.trim())==null?void 0:ra.toUpperCase())==="MANUAL"&&(u==null||u.index,we.value=(Ya=we.value)==null?void 0:Ya.map((Ia,dl)=>Ia))}let $e=(ia=we.value)==null?void 0:ia.filter(ya=>ya==null?void 0:ya.mainKey),fe;$e==null||$e.forEach(ya=>{var dl;if(fe!==void 0)return;let Ia=ya==null?void 0:ya.menus;((dl=$e==null?void 0:$e.filter(Xa=>Xa==null?void 0:Xa.mainKey))==null?void 0:dl.length)>1&&(fe=Ia,ya==null||ya.groups)});let ba=[],fa=new Map;if($e==null||$e.forEach(ya=>{var Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl;if((Ia=ya==null?void 0:ya.prop)!=null&&Ia.includes(".")){let Bl=[];fa.get(((Xa=(dl=ya==null?void 0:ya.prop)==null?void 0:dl.split("."))==null?void 0:Xa[0])+(ya!=null&&ya.isMainPath?0:1)+((ml=ya==null?void 0:ya.groups)==null?void 0:ml[0]))&&(Bl=fa.get(((Rl=(yl=ya==null?void 0:ya.prop)==null?void 0:yl.split("."))==null?void 0:Rl[0])+(ya!=null&&ya.isMainPath?0:1)+((Ka=ya==null?void 0:ya.groups)==null?void 0:Ka[0]))),Bl.push(ya),fa.set(((Wa=(wl=ya==null?void 0:ya.prop)==null?void 0:wl.split("."))==null?void 0:Wa[0])+(ya!=null&&ya.isMainPath?0:1)+((hl=ya==null?void 0:ya.groups)==null?void 0:hl[0]),Bl)}else{let Bl=[];fa.get("normal"+(ya!=null&&ya.isMainPath?0:1)+((Ga=ya==null?void 0:ya.groups)==null?void 0:Ga[0]))&&(Bl=fa.get("normal"+(ya!=null&&ya.isMainPath?0:1)+((vl=ya==null?void 0:ya.groups)==null?void 0:vl[0]))),Bl.push(ya),fa.set("normal"+(ya!=null&&ya.isMainPath?0:1)+((Tl=ya==null?void 0:ya.groups)==null?void 0:Tl[0]),Bl)}}),ba=Array.from(fa.values()),(ba==null?void 0:ba.length)>0)for(let ya in ba){let Ia=ba==null?void 0:ba[ya];if((Ia==null?void 0:Ia.length)!==1){if((Ia==null?void 0:Ia.length)>1){let dl=Ia==null?void 0:Ia.map(hl=>hl==null?void 0:hl.prop),Xa=Ia==null?void 0:Ia.map(hl=>hl==null?void 0:hl.label),ml=Ia==null?void 0:Ia.map(hl=>hl==null?void 0:hl.value),yl=(Pa=I.cloneDeep(Ia))==null?void 0:Pa[0],Rl=(se=we.value)==null?void 0:se.findIndex(hl=>(hl==null?void 0:hl.prop)===(yl==null?void 0:yl.prop)),Ka=(Da=we.value)==null?void 0:Da.slice(0,Rl),wl=(Sa=we.value)==null?void 0:Sa.slice(Rl,(ua=we.value)==null?void 0:ua.length);yl.label=Xa==null?void 0:Xa.join("·"),yl.value=ml==null?void 0:ml.join(" "),yl.value.trim()===""&&(yl.value=""),yl.prop=dl==null?void 0:dl.join("·");let Wa=Ia==null?void 0:Ia.map(hl=>{var Ga;return(Ga=hl==null?void 0:hl.words)==null?void 0:Ga.join(".")});yl.relatedWords=Wa,yl.usingType="parent",wl.unshift(yl),we.value=[...Ka,...wl],we.value=(oe=we.value)==null?void 0:oe.map(hl=>(dl!=null&&dl.find(Ga=>Ga===(hl==null?void 0:hl.prop))&&(hl.isFormColHidden=!0,hl.relatedWords=Wa),hl))}}}}},Jc=()=>{var f;const d=(f=s.value)==null?void 0:f.$el;d&&La.Sortable.create(d,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:M=>{var Q;const{oldIndex:O,newIndex:R}=M;if(O===R)return;const B=xn.value.splice(O,1)[0];xn.value.splice(R,0,B),Ee.value=(Q=Ee.value)==null?void 0:Q.slice().sort((ae,H)=>{if(ae.label==="操作")return 1;if(H.label==="操作")return-1;const he=xn.value.findIndex(Ve=>Ve.label===ae.label),xe=xn.value.findIndex(Ve=>Ve.label===H.label);return he-xe})}})};a.onMounted(()=>{je.value=window.innerWidth-240*2,window.addEventListener("keydown",Ut)});const Xc=()=>{a.nextTick(()=>{Jc()})},Qo=(d,f)=>{var O;if(!d&&!(d!=null&&d.children))return{contents:d,currentSelectContents:void 0};let M;return d.children=(O=d.children)==null?void 0:O.map(R=>{var B,Q;if((R==null?void 0:R.id)===Je.value){let ae={};for(let H in R){let he=(B=f==null?void 0:f.find(xe=>(xe==null?void 0:xe.prop)===H))==null?void 0:B.label;he?ae[H]=(Q=Il.value)==null?void 0:Q[he]:ae[H]=R[H]??""}R=Object.assign(ae,Il.value),M=R}else{let ae=Qo(R,f);R=ae==null?void 0:ae.contents,M=ae==null?void 0:ae.currentSelectContents}return R}),{contents:d,currentSelectContents:M}},Ei=(d,f)=>{let M,O;return d!=null&&d.find(R=>(R==null?void 0:R.id)===Je.value)?M=d==null?void 0:d.map(R=>{var B,Q,ae;if((R==null?void 0:R.id)===Je.value){let H={};for(let xe in R){let Ve=(B=f==null?void 0:f.find(Me=>(Me==null?void 0:Me.prop)===xe))==null?void 0:B.label;Ve?H[xe]=((Q=Il.value)==null?void 0:Q[Ve])??"":H[xe]=R[xe]??""}let he=Il.value;for(let xe in H)(ae=Il.value)!=null&&ae[xe]||(he[xe]=(H==null?void 0:H[xe])??"");R=he,O=R}return R}):M=d==null?void 0:d.map(R=>{var B,Q,ae,H;if((R==null?void 0:R.id)===Je.value){let he={};for(let xe in R){let Ve=(B=f==null?void 0:f.find(Me=>(Me==null?void 0:Me.prop)===xe))==null?void 0:B.label;Ve?he[xe]=(Q=Il.value)==null?void 0:Q[Ve]:he[xe]=R[xe]??""}R=Object.assign(he,Il.value),O=R}else R=(ae=Qo(R,f))==null?void 0:ae.contents,O=(H=Qo(R,f))==null?void 0:H.currentSelectContents;return R}),{newContents:M,currentSelectContents:O}},Di=(d,f,M)=>{var O,R;return d[f==null?void 0:f.prop]=M,typeof d.id=="number"&&(d.id=(O=d.id)==null?void 0:O.toString()),d.children&&((R=d.children)==null?void 0:R.length)>0&&(d.children=d.children.map(Di)),d},Bi=d=>{var M;const f=[];return f.push({...d}),d!=null&&d.children&&Array.isArray(d.children)&&((M=d.children)==null||M.forEach(O=>{f.push(...Bi(O))})),(f==null?void 0:f.length)>0?f==null?void 0:f.map(O=>{const R={...O};return delete R.children,R}):[]},lo=["Pacific6000数据采集装置.通道号","通道号"],zt=d=>{if(!d)return"";const f=lo.map(M=>d==null?void 0:d[M]).find(M=>M!=null&&String(M).trim()!=="");return f==null?"":String(f).trim()},ei=async(d,f=void 0)=>{if(!d)return!1;try{const M=Ue=>{var ta,$a,Ta;return Ue?typeof(Ue==null?void 0:Ue.value)=="string"?Ue.value:((Ta=($a=(ta=Ue==null?void 0:Ue._custom)==null?void 0:ta.value)==null?void 0:$a.value)==null?void 0:Ta.value)||"":""},O=Array.isArray(mn.value)?mn.value:[],R=M(O.find(Ue=>(Ue==null?void 0:Ue.condition)==="child")),B=(xa.value||"").replace(/\/+$/,""),Q=R?`${B}/${R}`:B,ae=await $r(Q||xa.value,!1),H=String(ma.value||"").trim(),he=Ue=>String(Ue||"").trim(),xe=(Ue,ta=[],$a="")=>{if(!Array.isArray(Ue))return ta;for(const Ta of Ue){const ra=he((Ta==null?void 0:Ta.choiceName)||(Ta==null?void 0:Ta.name0)||$a);(Ta==null?void 0:Ta.comp)==="Table"&&(!H||ra===H)&&ta.push(Ta),Array.isArray(Ta==null?void 0:Ta.children)&&xe(Ta.children,ta,ra),Array.isArray(Ta==null?void 0:Ta.tab)&&xe(Ta.tab,ta,ra),Array.isArray(Ta==null?void 0:Ta.choice)&&xe(Ta.choice,ta,ra)}return ta},Ve=xe(ae||[]),Me=String((u==null?void 0:u.compName)||"");return Ve.some(Ue=>{var $a,Ta;const ta=((Ta=($a=Ue==null?void 0:Ue.compData)==null?void 0:$a.find(ra=>(ra==null?void 0:ra.key)==="tableContents"))==null?void 0:Ta.contents)||[];return!Array.isArray(ta)||ta.length===0?!1:ta.some(ra=>{if(String((Ue==null?void 0:Ue.name)||"")===Me&&(ra==null?void 0:ra.id)===f)return!1;const ia=zt(ra);return!!ia&&ia===d})})}catch{return(_e.value||[]).some(O=>{if((O==null?void 0:O.id)===f)return!1;const R=zt(O);return!!R&&R===d})}},Mt=async(d=!0,f,M)=>{var he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe,E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl;if(Il.value){const Wa=(xe=sa.getColumnChild((he=I.cloneDeep(Ee.value))==null?void 0:he.filter(Ga=>(Ga==null?void 0:Ga.label)!=="操作")))==null?void 0:xe.filter(Ga=>(Ga==null?void 0:Ga.required)===!0);for(let Ga=0;Ga<((Wa==null?void 0:Wa.length)??0);Ga++){const vl=Wa[Ga],Tl=vl==null?void 0:vl.prop,Bl=(vl==null?void 0:vl.label)??Tl,hr=(Ve=Il.value)==null?void 0:Ve[Tl];if(hr===""||hr===null||hr===void 0||Array.isArray(hr)&&hr.length===0){el.ElMessage.error(`${Bl}不能为空`);return}}const hl=zt(Il.value);if(hl&&await ei(hl,Je.value||void 0)){el.ElMessage.warning("当前任务下通道号不能重复,请重新选择");return}}let O=sa.getColumnChild((Me=I.cloneDeep(Ee.value))==null?void 0:Me.filter(Wa=>(Wa==null?void 0:Wa.label)!=="操作")),R,B=I.cloneDeep(_e.value);if(!Il.value){va.value=!1;return}if(Je.value===""){Fe.value++;let Wa;Wa={id:Fe.value.toString()};try{Wa.sort=Nn(0,_e.value||[])}catch{}Wa!=null&&Wa.children&&(Wa={...Wa,children:(Ue=Wa.children)==null?void 0:Ue.map(Ga=>Di(Ga,f,M))});const hl=Object.assign(Il.value,Wa);B.unshift(hl),R=hl}else B=(ta=Ei(B,O))==null?void 0:ta.newContents,R=($a=Ei(B,O))==null?void 0:$a.currentSelectContents;const Q=(Ta=u.itemData)==null?void 0:Ta.filter(Wa=>(Wa==null?void 0:Wa.key)==="childTree")[0];if(((ra=Q==null?void 0:Q.contents)==null?void 0:ra.length)>0){Le.value="编辑";const Wa=[];B==null||B.forEach((vl,Tl)=>{var hr;let Bl={};if(Array.isArray(vl)){let Ll=[];vl==null||vl.filter(xl=>!(xl!=null&&xl.id)).forEach((xl,Al)=>{var Gl,Ol,ur,dr,Jl,or,Vr;if((Ol=(Gl=Br.value)==null?void 0:Gl[Al])!=null&&Ol.prop&&!Array.isArray(xl)){let ir={};ir[Br.value[Al].column]=xl,Va!=null&&Va.value&&((ur=Va==null?void 0:Va.value)==null?void 0:ur.length)>0&&((dr=Va==null?void 0:Va.value)!=null&&dr.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(ir)))&&(Ll=(Jl=Va==null?void 0:Va.value)==null?void 0:Jl.find(lr=>JSON.stringify(lr==null?void 0:lr[0])===JSON.stringify(ir))),Ll&&Ll.length>0?Bl[Br.value[Al].prop]=Ll!=null&&Ll.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===Br.value[Al].column})?(or=Ll==null?void 0:Ll.find(lr=>{var nr;return((nr=Object.keys(lr))==null?void 0:nr[0])===Br.value[Al].column}))==null?void 0:or[Br.value[Al].column]:xl:Bl[Br.value[Al].prop]=xl}else Array.isArray(xl)&&((Vr=Br.value[Al])!=null&&Vr.prop?Bl[Br.value[Al].prop]=xl:Bl.children=pi(xl,Br.value))})}else Bl=vl;if(Array.isArray(vl)&&vl.some(Ll=>Ll==null?void 0:Ll.id)){const Ll=(hr=vl==null?void 0:vl.find(xl=>xl.id))==null?void 0:hr.id;Wa.push(Object.assign(Bl,{id:Xt(Ll)}))}else Bl.id?Wa.push(Bl):Wa.push(Object.assign(Bl,{id:Tl.toString()}))});const hl=(_e.value||[]).map(vl=>String(vl==null?void 0:vl.id)),Ga=Zt(Wa,hl);_e.value=zi(Ga,Q,Ee.value)}Ti(_e.value),Nr.value=_e.value;const ae=sf(Nr.value,In.value,B);let H=[];if(P.value?(H=(Ya=I.cloneDeep(P).value.singleContent)==null?void 0:Ya.filter(Wa=>(Wa==null?void 0:Wa.id)!==(R==null?void 0:R.id)),H.push(R)):H=[R],zl.value){const Wa={content:ae,singleContent:((ia=Q==null?void 0:Q.contents)==null?void 0:ia.length)>0?H==null?void 0:H.flatMap(Bi):H,index:u==null?void 0:u.index,buttonName:"编辑",column:Ee.value,parentTableId:u==null?void 0:u.parentTableId};Ye.setCacheUpdatingData(Wa)}if((Pa=Ee.value)==null||Pa.forEach(Wa=>{(Wa==null?void 0:Wa.formType)==="Upload"&&(R[Wa.prop]=R[Wa.prop]===""?"{}":typeof R[Wa.prop]!="string"?JSON.stringify(R[Wa.prop]):R[Wa.prop])}),d){(Sa=(ua=(Da=(se=u.itemData)==null?void 0:se.find(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType"))==null?void 0:Da.value)==null?void 0:ua.find(Ga=>(Ga==null?void 0:Ga.value)==="onConditionContents"))==null||Sa.content;let Wa=(oe=u.itemData)==null?void 0:oe.filter(Ga=>(Ga==null?void 0:Ga.key)==="filterAllType");Wa=Array.from(new Map(Wa.filter(Boolean).map((Ga,vl)=>[Ga.value,{...Ga,_idx:vl}])).values()).sort((Ga,vl)=>Ga._idx-vl._idx).map(({_idx:Ga,...vl})=>vl),Wa=(E=Wa==null?void 0:Wa[(Wa==null?void 0:Wa.length)-1])==null?void 0:E.value;const hl={fixContent:[R],buttonName:Le.value,relatedContents:u==null?void 0:u.related,columns:Ee.value,name:u==null?void 0:u.compName};Ye.setTableLoading(u==null?void 0:u.index),va.value=!1,Il.value=void 0,ze("change",hl)}if((ba=(fe=($e=we.value)==null?void 0:$e[0])==null?void 0:fe.optionUrl)!=null&&ba.menuId){va.value=!1;let Wa=(fa=u.itemData)==null?void 0:fa.filter(hl=>(hl==null?void 0:hl.key)==="filterAllType");if((Wa==null?void 0:Wa.length)>0){let hl=Wa==null?void 0:Wa.map(Tl=>Tl==null?void 0:Tl.value),Ga=(dl=(Ia=(ya=hl.flat().find(Tl=>{var Bl;return(Bl=Tl==null?void 0:Tl.content)==null?void 0:Bl.includes("@Num")}))==null?void 0:ya.content)==null?void 0:Ia.split(":"))==null?void 0:dl[1];((yl=(ml=(Xa=hl.flat().find(Tl=>{var Bl;return(Bl=Tl==null?void 0:Tl.content)==null?void 0:Bl.includes("@Type:")}))==null?void 0:Xa.content)==null?void 0:ml.split(":"))==null?void 0:yl[1])!=="Manual"&&(Ga=parseInt(Ga),_e.value=(wl=_e.value)==null?void 0:wl.slice(((Rl=_e.value)==null?void 0:Rl.length)-Ga,(Ka=_e.value)==null?void 0:Ka.length))}}};a.onUnmounted(()=>{window.removeEventListener("keydown",Ut),Ee.value=[],_e.value=[],de.value=[],wa.value=[],De.value=[],Ma.value=[],Ua.value=[],Aa.value=[],we.value=[],ar.value=[],s.value=null,En.value=""});const ro=async(d,f,M)=>{var Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe;$l.value=(M==null?void 0:M.prop)??(M==null?void 0:M.property);const O=I.cloneDeep(u.itemData),R=((Ue=O==null?void 0:O.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:Ue.contents)??[];let B=R==null?void 0:R.find((E,$e)=>{var fe,ba,fa;return(E==null?void 0:E.prop)===$l.value||(E==null?void 0:E.label)===$l.value||($e==null?void 0:$e.toString())===((fa=(ba=(fe=$l.value)==null?void 0:fe.split("a"))==null?void 0:ba[1])==null?void 0:fa.toString())});const Q=sa.getColumnChild((ta=I.cloneDeep(Ee.value))==null?void 0:ta.filter(E=>(E==null?void 0:E.label)!=="操作"));if(B||(B=Q==null?void 0:Q.find(E=>(E==null?void 0:E.prop)===$l.value||(E==null?void 0:E.label)===$l.value)),B&&!(($a=B==null?void 0:B.menus)!=null&&$a.length)&&!((Ta=B==null?void 0:B.groups)!=null&&Ta.length)&&!((ra=B==null?void 0:B.words)!=null&&ra.length)){const E=(Ya=we.value)==null?void 0:Ya.find($e=>($e==null?void 0:$e.prop)===$l.value);E&&(B={...B,menus:(E==null?void 0:E.menus)??(B==null?void 0:B.menus),groups:(E==null?void 0:E.groups)??(B==null?void 0:B.groups),words:(E==null?void 0:E.words)??(B==null?void 0:B.words),bindMenus:(E==null?void 0:E.bindMenus)??(B==null?void 0:B.bindMenus),isMainPath:(E==null?void 0:E.isMainPath)??(B==null?void 0:B.isMainPath),relatedContents:(E==null?void 0:E.relatedContents)??(B==null?void 0:B.relatedContents),endChildMenu:(E==null?void 0:E.endChildMenu)??(B==null?void 0:B.endChildMenu)})}if(B&&((ia=we==null?void 0:we.value)==null||ia.forEach(E=>{var $e,fe,ba,fa,ya;(E==null?void 0:E.prop)===(B==null?void 0:B.prop)&&(E!=null&&E.endChildMenu)&&(($e=B==null?void 0:B.prop)!=null&&$e.includes(".")&&((ba=(fe=B==null?void 0:B.prop)==null?void 0:fe.split("."))==null?void 0:ba[0])!==((ya=(fa=E==null?void 0:E.prop)==null?void 0:fa.split("."))==null?void 0:ya[0])?B.endChildMenu=E==null?void 0:E.value:B.endChildMenu=E==null?void 0:E.endChildMenu)})),!B)return;const ae=$l.value,H=(Pa=_e.value)==null?void 0:Pa.findIndex(E=>(E==null?void 0:E.id)===(f==null?void 0:f.id));H!==-1&&ae&&(_e.value[H]={..._e.value[H],[ae]:d});const he=E=>{Array.isArray(E)&&E.forEach($e=>{Array.isArray($e==null?void 0:$e.allSelectionContents)&&$e.allSelectionContents.length>0&&($e.contactValue=_e.value[H]??f),Array.isArray($e==null?void 0:$e.children)&&$e.children.length>0&&he($e.children)})};he(Ee.value),B.value=d,B.endChildMenu=B.endChildMenu||"";let xe=B!=null&&B.isMainPath&&(B!=null&&B.mainKey)?B==null?void 0:B.value:"";const Ve=E=>{Array.isArray(E)&&E.forEach($e=>{var ba,fa;if((($e==null?void 0:$e.type)==="Select"||($e==null?void 0:$e.formType)&&$e.formType.toUpperCase()==="SELECT"||($e==null?void 0:$e.columnType)&&$e.columnType.toUpperCase()==="SELECT")&&Array.isArray($e==null?void 0:$e.menus)&&$e.menus.length>0&&$e.menus[$e.menus.length-1]===""&&(B!=null&&B.isMainPath)&&(B!=null&&B.mainKey)){const ya=(ba=$e==null?void 0:$e.prop)!=null&&ba.includes(".")?$e.prop.split(".")[0]:null,Ia=(fa=B==null?void 0:B.prop)!=null&&fa.includes(".")?B.prop.split(".")[0]:null;(!ya||!Ia||ya===Ia)&&($e.endChildMenu=xe)}Array.isArray($e==null?void 0:$e.children)&&$e.children.length>0&&Ve($e.children)})};if(Ve(Ee.value),!!(B!=null&&B.mainKey)&&Array.isArray(B==null?void 0:B.menus)&&(B==null?void 0:B.menus.length)>0&&(B!=null&&B.value)&&(B==null?void 0:B.value)!==""){let E=B!=null&&B.relatedContents&&((se=B==null?void 0:B.relatedContents)==null?void 0:se.length)>0?(Da=B==null?void 0:B.relatedContents)==null?void 0:Da.find($e=>{var fe,ba,fa,ya;return($e==null?void 0:$e[(ya=(fe=B==null?void 0:B.prop)==null?void 0:fe.split("."))==null?void 0:ya[((fa=(ba=B==null?void 0:B.prop)==null?void 0:ba.split("."))==null?void 0:fa.length)-1]])===(B==null?void 0:B.value)}):await ls(B);if(E){const $e={...f};Q==null||Q.forEach(fe=>{var ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl;(fe==null?void 0:fe.prop)!==(B==null?void 0:B.prop)&&(B!=null&&B.relatedContents&&((ba=B==null?void 0:B.relatedContents)==null?void 0:ba.length)>0?(fa=fe==null?void 0:fe.prop)!=null&&fa.includes(".")&&((Ia=(ya=fe==null?void 0:fe.prop)==null?void 0:ya.split("."))==null?void 0:Ia[0])===((Xa=(dl=B==null?void 0:B.prop)==null?void 0:dl.split("."))==null?void 0:Xa[0])?$e[fe.prop]=E[(Ka=(ml=fe==null?void 0:fe.prop)==null?void 0:ml.split("."))==null?void 0:Ka[((Rl=(yl=fe==null?void 0:fe.prop)==null?void 0:yl.split("."))==null?void 0:Rl.length)-1]]??$e[fe.prop]:$e[fe.prop]=(E==null?void 0:E[fe.prop])??$e[fe.prop]:La.same((B==null?void 0:B.menus)??[],(fe==null?void 0:fe.menus)??[])&&La.same((B==null?void 0:B.groups)??[],(fe==null?void 0:fe.groups)??[])&&!La.same((B==null?void 0:B.words)??[],(fe==null?void 0:fe.words)??[])?(wl=fe==null?void 0:fe.prop)!=null&&wl.includes(".")&&((hl=(Wa=fe==null?void 0:fe.prop)==null?void 0:Wa.split("."))==null?void 0:hl[0])!==((vl=(Ga=B==null?void 0:B.prop)==null?void 0:Ga.split("."))==null?void 0:vl[0])||($e[fe.prop]=(E==null?void 0:E[(Tl=fe==null?void 0:fe.words)==null?void 0:Tl.join(".")])??(E==null?void 0:E[fe.prop])??$e[fe.prop]):(!(fe!=null&&fe.isMainPath)&&La.same((B==null?void 0:B.bindMenus)??[],(fe==null?void 0:fe.bindMenus)??[]),$e[fe.prop]=(E==null?void 0:E[fe.prop])??$e[fe.prop]))}),_e.value=(ua=I.cloneDeep(_e.value))==null?void 0:ua.map(fe=>(fe==null?void 0:fe.id)===(f==null?void 0:f.id)?{...$e,id:fe==null?void 0:fe.id}:fe)}}if((Sa=B==null?void 0:B.optionUrl)!=null&&Sa.menuSelect){let E="";Q==null||Q.forEach(ba=>{var fa,ya,Ia,dl,Xa;E===""&&((Ia=(ya=(fa=ba==null?void 0:ba.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:ya[1])!=null&&Ia.includes("["))&&(E=(Xa=(dl=ba==null?void 0:ba.optionUrl)==null?void 0:dl.groupSelect)==null?void 0:Xa[1])});let $e=await fi(B),fe;if($e==null||$e.forEach(ba=>{var fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl;E===((ya=(fa=B==null?void 0:B.optionUrl)==null?void 0:fa.groupSelect)==null?void 0:ya[1])&&((Xa=(dl=(Ia=B==null?void 0:B.optionUrl)==null?void 0:Ia.groupSelect)==null?void 0:dl[1])!=null&&Xa.includes("["))&&((wl=I.cloneDeep(ba))==null?void 0:wl[(Ka=(Rl=(yl=(ml=B==null?void 0:B.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])==null?void 0:Rl.replaceAll("[",""))==null?void 0:Ka.replaceAll("]","")])===(B==null?void 0:B.value)&&(fe=ba)}),fe){const ba={...f};Q==null||Q.forEach(fa=>{var ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl;(fe!=null&&fe[fa==null?void 0:fa.label]||fe!=null&&fe[(Xa=(dl=(Ia=(ya=fa==null?void 0:fa.optionUrl)==null?void 0:ya.groupSelect)==null?void 0:Ia[1])==null?void 0:dl.replaceAll("[",""))==null?void 0:Xa.replaceAll("]","")])&&((Rl=(yl=(ml=fa==null?void 0:fa.optionUrl)==null?void 0:ml.groupSelect)==null?void 0:yl[1])!=null&&Rl.includes("["))&&(ba[fa.prop]=(fe==null?void 0:fe[fa==null?void 0:fa.label])||(fe==null?void 0:fe[(hl=(Wa=(wl=(Ka=fa==null?void 0:fa.optionUrl)==null?void 0:Ka.groupSelect)==null?void 0:wl[1])==null?void 0:Wa.replaceAll("[",""))==null?void 0:hl.replaceAll("]","")]))}),_e.value=(oe=I.cloneDeep(_e.value))==null?void 0:oe.map(fa=>(fa==null?void 0:fa.id)===(f==null?void 0:f.id)?{...ba,id:fa==null?void 0:fa.id}:fa)}}},Zc=async d=>{var Ue,ta,$a,Ta,ra,Ya,ia,Pa,se,Da,ua,Sa;if(!d)return;const f=I.cloneDeep(Il.value||{});Il.value=d;const M=zt(f),O=zt(Il.value);if(O&&O!==M&&await ei(O,Je.value||void 0)){el.ElMessage.warning("当前任务下通道号不能重复,请重新选择"),lo.forEach(E=>{if(Object.prototype.hasOwnProperty.call(Il.value||{},E)||Object.prototype.hasOwnProperty.call(f||{},E)){const $e=(f==null?void 0:f[E])??"";Il.value[E]=$e,d[E]=$e}}),we.value=(we.value||[]).map(E=>{if(!(E!=null&&E.prop)||!lo.includes(E.prop))return E;const $e=(f==null?void 0:f[E.prop])??"";return{...E,value:$e,selectValue:$e===""?[]:[$e]}});return}let R=I.cloneDeep(u.itemData);R==null||R.map(oe=>{var E,$e,fe,ba;return(oe==null?void 0:oe.key)==="header"&&(Array.isArray((E=oe.contents)==null?void 0:E[0])?oe.contents=(fe=sa.getColumnChild(($e=oe.contents)==null?void 0:$e[0]))==null?void 0:fe.map((fa,ya)=>{var Ia,dl,Xa,ml,yl,Rl;return((Xa=(dl=(Ia=we.value)==null?void 0:Ia.find(Ka=>(Ka==null?void 0:Ka.prop)===(fa==null?void 0:fa.prop)))==null?void 0:dl.optionUrl)==null?void 0:Xa.multiple)===!0&&!Array.isArray((ml=Object.values(d))==null?void 0:ml[ya])?fa.value=[(yl=Object.values(d))==null?void 0:yl[ya]]:fa.value=(Rl=Object.values(d))==null?void 0:Rl[ya],fa}):oe.contents=(ba=oe.contents)==null?void 0:ba.map((fa,ya)=>{var Ia,dl,Xa,ml,yl,Rl;return((Xa=(dl=(Ia=we.value)==null?void 0:Ia.find(Ka=>(Ka==null?void 0:Ka.prop)===(fa==null?void 0:fa.prop)))==null?void 0:dl.optionUrl)==null?void 0:Xa.multiple)===!0&&!Array.isArray((ml=Object.values(d))==null?void 0:ml[ya])?fa.value=[(yl=Object.values(d))==null?void 0:yl[ya]]:fa.value=(Rl=Object.values(d))==null?void 0:Rl[ya],fa})),oe});let B=we.value,Q=(Ue=R==null?void 0:R.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:Ue.contents;if($l.value||(B=B==null?void 0:B.map(oe=>{var E;return oe.value=oe.value??((E=Q==null?void 0:Q.find(($e,fe)=>($e==null?void 0:$e.prop)===(oe==null?void 0:oe.name)))==null?void 0:E.value),oe})),!zr.value)return;let ae=I.cloneDeep($l.value);(ta=$l.value)!=null&&ta.includes("·")&&($l.value=(Ta=($a=$l.value)==null?void 0:$a.split("·"))==null?void 0:Ta[0]);let H=(Ya=(ra=R==null?void 0:R.find(oe=>(oe==null?void 0:oe.key)==="header"))==null?void 0:ra.contents)==null?void 0:Ya.find((oe,E)=>(oe==null?void 0:oe.prop)===$l.value);(ia=we==null?void 0:we.value)==null||ia.forEach(oe=>{var E,$e,fe,ba,fa,ya,Ia,dl,Xa;(oe==null?void 0:oe.prop)===(H==null?void 0:H.prop)&&(oe!=null&&oe.endChildMenu)&&((E=H==null?void 0:H.prop)!=null&&E.includes(".")&&((fe=($e=H==null?void 0:H.prop)==null?void 0:$e.split("."))==null?void 0:fe[0])!==((fa=(ba=oe==null?void 0:oe.prop)==null?void 0:ba.split("."))==null?void 0:fa[0])?H.endChildMenu=(Ia=(ya=oe==null?void 0:oe.value)==null?void 0:ya.split(" "))==null?void 0:Ia[0]:H.endChildMenu=(Xa=(dl=oe==null?void 0:oe.endChildMenu)==null?void 0:dl.split(" "))==null?void 0:Xa[0])});let he=H!=null&&H.isMainPath&&(H!=null&&H.mainKey)?H==null?void 0:H.value:"",xe=B,Ve=ke.value;if(Ve!=null&&Ve.find(oe=>(H==null?void 0:H.prop)===(oe==null?void 0:oe.key))&&(Ve=Ve==null?void 0:Ve.filter(oe=>(H==null?void 0:H.prop)!==(oe==null?void 0:oe.key))),Ve!=null&&Ve.find(oe=>ae===(oe==null?void 0:oe.key))&&(Ve=Ve==null?void 0:Ve.filter(oe=>ae!==(oe==null?void 0:oe.key))),(H==null?void 0:H.formType)==="Select"&&(xe=xe==null?void 0:xe.map(oe=>{var E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl;return(oe==null?void 0:oe.type)==="Select"&&(((E=oe==null?void 0:oe.allSelectionContents)==null?void 0:E.length)>0&&(oe.contactValue=d),((H==null?void 0:H.prop)===(oe==null?void 0:oe.prop)||ae===(oe==null?void 0:oe.prop))&&H&&(Array.isArray(H.value)&&(($e=H.value)==null?void 0:$e.length)>0&&((fe=H.value)!=null&&fe.every(Ga=>typeof Ga=="string"))?(Ve.push({key:oe==null?void 0:oe.prop,value:[(fa=H.value)==null?void 0:fa[((ba=H.value)==null?void 0:ba.length)-1]]}),oe.selectValue=(ya=Ve==null?void 0:Ve.find(Ga=>(Ga==null?void 0:Ga.key)===(oe==null?void 0:oe.prop)))==null?void 0:ya.value):Array.isArray(H.value)&&((Ia=H.value)==null?void 0:Ia.length)===0?(Ve=[],oe.selectValue=[],d[oe==null?void 0:oe.prop]=""):Array.isArray(oe.value)&&Ve.push({key:oe==null?void 0:oe.prop,value:[(dl=oe.value)==null?void 0:dl[(oe==null?void 0:oe.length)-1]]})),((ml=oe==null?void 0:oe.menus)==null?void 0:ml[((Xa=oe==null?void 0:oe.menus)==null?void 0:Xa.length)-1])===""&&(H!=null&&H.isMainPath)&&(H!=null&&H.mainKey)&&((yl=oe==null?void 0:oe.prop)!=null&&yl.includes(".")&&((Ka=(Rl=oe==null?void 0:oe.prop)==null?void 0:Rl.split("."))==null?void 0:Ka[0])!==((Wa=(wl=H==null?void 0:H.prop)==null?void 0:wl.split("."))==null?void 0:Wa[0])||(oe.endChildMenu=(hl=he==null?void 0:he.split(" "))==null?void 0:hl[0]))),oe.value=(d==null?void 0:d[oe==null?void 0:oe.prop])??(oe==null?void 0:oe.value),oe})),ke.value=Ve,xe!=null&&xe.some(oe=>(oe==null?void 0:oe.functionName)&&(oe==null?void 0:oe.functionName)!=="")){let oe=await di([d],Ee==null?void 0:Ee.value,"Auto",_e.value);xe=xe==null?void 0:xe.map(E=>{var $e;return E.value=(($e=oe==null?void 0:oe[0])==null?void 0:$e[E==null?void 0:E.prop])??E.value,E}),Il.value=oe==null?void 0:oe[0]}if(we.value=xe,H=Object.assign({},H??{},{relatedWords:(se=(Pa=we==null?void 0:we.value)==null?void 0:Pa.find(oe=>(oe==null?void 0:oe.prop)===(H==null?void 0:H.prop)))==null?void 0:se.relatedWords}),(H==null?void 0:H.mainKey)&&(H!=null&&H.value)&&(H==null?void 0:H.value)!==""){let oe=H!=null&&H.relatedContents&&((Da=H==null?void 0:H.relatedContents)==null?void 0:Da.length)>0?(ua=H==null?void 0:H.relatedContents)==null?void 0:ua.find(E=>{var $e,fe,ba,fa;return(E==null?void 0:E[(fa=($e=H==null?void 0:H.prop)==null?void 0:$e.split("."))==null?void 0:fa[((ba=(fe=H==null?void 0:H.prop)==null?void 0:fe.split("."))==null?void 0:ba.length)-1]])===(H==null?void 0:H.value)}):await ls(H);if(oe&&JSON.stringify(oe)!=="{}"){let E=xe;E=E==null?void 0:E.map(fe=>{var ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl,Bl,hr,Ll,xl,Al;return(H==null?void 0:H.prop)===(fe==null?void 0:fe.prop)?fe.value=(oe==null?void 0:oe[(ba=fe==null?void 0:fe.words)==null?void 0:ba.join(".")])??(oe==null?void 0:oe[fe==null?void 0:fe.prop])??oe[(dl=(fa=fe==null?void 0:fe.prop)==null?void 0:fa.split("."))==null?void 0:dl[((Ia=(ya=fe==null?void 0:fe.prop)==null?void 0:ya.split("."))==null?void 0:Ia.length)-1]]:H!=null&&H.relatedContents&&((Xa=H==null?void 0:H.relatedContents)==null?void 0:Xa.length)>0?fe.value=(ml=fe==null?void 0:fe.prop)!=null&&ml.includes(".")&&((Rl=(yl=fe==null?void 0:fe.prop)==null?void 0:yl.split("."))==null?void 0:Rl[0])===((wl=(Ka=H==null?void 0:H.prop)==null?void 0:Ka.split("."))==null?void 0:wl[0])?oe[(vl=(Wa=fe==null?void 0:fe.prop)==null?void 0:Wa.split("."))==null?void 0:vl[((Ga=(hl=fe==null?void 0:fe.prop)==null?void 0:hl.split("."))==null?void 0:Ga.length)-1]]:(oe==null?void 0:oe[fe==null?void 0:fe.prop])??(fe==null?void 0:fe.value):La.same((H==null?void 0:H.menus)??[],(fe==null?void 0:fe.menus)??[])&&La.same((H==null?void 0:H.groups)??[],(fe==null?void 0:fe.groups)??[])&&!La.same((H==null?void 0:H.words)??[],(fe==null?void 0:fe.words)??[])?(Tl=fe==null?void 0:fe.prop)!=null&&Tl.includes(".")&&((hr=(Bl=fe==null?void 0:fe.prop)==null?void 0:Bl.split("."))==null?void 0:hr[0])!==((xl=(Ll=H==null?void 0:H.prop)==null?void 0:Ll.split("."))==null?void 0:xl[0])||(fe.value=(oe==null?void 0:oe[(Al=fe==null?void 0:fe.words)==null?void 0:Al.join(".")])??(oe==null?void 0:oe[fe==null?void 0:fe.prop])??fe.value):(!(fe!=null&&fe.isMainPath)&&La.same((H==null?void 0:H.bindMenus)??[],(fe==null?void 0:fe.bindMenus)??[]),fe.value=(oe==null?void 0:oe[fe==null?void 0:fe.prop])??fe.value),fe}),we.value=E;let $e={};(Sa=we.value)==null||Sa.forEach(fe=>{$e[fe.prop]=fe==null?void 0:fe.value}),Il.value=$e}}zr.value=!0,j.value=!1},Qc=d=>d?(d==null?void 0:d.toUpperCase())==="INPUT"?"TEXTAREA":d:"TEXTAREA",eu=d=>{var B,Q;const f=(Q=(B=De.value)==null?void 0:B.find(ae=>(ae==null?void 0:ae.label)===(d==null?void 0:d.label)))==null?void 0:Q.multiple,M=d==null?void 0:d.prop;if((d==null?void 0:d.formType)!="Select")return;_e.value.forEach(ae=>{const H=ae==null?void 0:ae[M];f&&bo.isString(H)&&(ae[M]=[H]),!f&&!bo.isString(H)&&(ae[M]="")})},Ni=(d,f)=>{var M;return f==null||f.forEach(O=>{d[O==null?void 0:O.prop]=O==null?void 0:O.value}),d.children&&((M=d.children)==null?void 0:M.length)>0&&(d.children=d.children.map(O=>Ni(O,f))),d},ai=d=>{var M,O,R,B,Q,ae;At("");const f=(M=we.value)==null?void 0:M.reduce((H,he)=>(H[he.name]=he.value,H),{});if(((O=Object.keys(f))==null?void 0:O.length)>0){Il.value=f,Je.value="",Fe.value=(R=_e.value)==null?void 0:R.length,Aa.value=(B=Ae.value)==null?void 0:B.filter(he=>(he==null?void 0:he.label)!=="新增");const H=(ae=(Q=de.value)==null?void 0:Q.filter(he=>(he==null?void 0:he.label)!=="操作"))==null?void 0:ae.map(he=>{var Ve,Me,Ue;const xe=(Me=(Ve=De.value)==null?void 0:Ve.find(ta=>(ta==null?void 0:ta.label)===(he==null?void 0:he.label)))==null?void 0:Me.multiple;return eu(he),{...he,contents:(he==null?void 0:he.options)??[],optionUrl:he!=null&&he.formMenuSelect&&((Ue=he==null?void 0:he.formMenuSelect)==null?void 0:Ue.length)>0?{groupSelect:he==null?void 0:he.groupSelect,menuSelect:he==null?void 0:he.formMenuSelect,selectRelateType:"",type:he==null?void 0:he.formType,multiple:xe}:null}});Ee.value=H==null?void 0:H.map(he=>Ni(he,[{prop:"type",value:"edit"},{prop:"columnType",value:Qc(he==null?void 0:he.formType)||(he==null?void 0:he.columnType)}])),d==="createClick"&&(Le.value="新增",Mt(!0))}},ut={START:"开始时间",END:"结束时间",HOURS:"工时"},au=(d,f)=>Number(I.dayjs(f).diff(I.dayjs(d),"day",!0).toFixed(1)),Ti=d=>{var B;const f=u.itemData,M=(B=f==null?void 0:f.find(Q=>(Q==null?void 0:Q.key)==="header"))==null?void 0:B.contents,O=new Map;return M==null||M.forEach((Q,ae)=>{const{label:H}=Q;O.set(H,ae)}),!O.has(ut.START)||!O.has(ut.END)||!O.has(ut.HOURS)?d:d==null?void 0:d.map(Q=>{const ae=Q==null?void 0:Q[ut.START],H=Q==null?void 0:Q[ut.END],he=au(ae,H);return ae&&H&&(Q[ut.HOURS]=`${he}天`),Q})},Ai=(d,f,M=0)=>{if(M>((f==null?void 0:f.length)??""))return d;const O=f==null?void 0:f[M],R=new Map;for(const Q of d){const ae=Q[O];R.has(ae)||R.set(ae,[]),R.get(ae)&&R.get(ae).push(Q)}const B=[];for(const[Q,ae]of R){const[H,...he]=ae,xe={...H};M+1===((f==null?void 0:f.length)??"")?xe.children=ae==null?void 0:ae.map(Ve=>(Ve.level=I.cloneDeep(M)+1,Ve)).filter((Ve,Me)=>Me!==0):he.length>0&&(xe.children=Ai(he,f,M+1)),xe.level=M,B.push(xe)}return B},zi=(d,f,M)=>{var R;if(!(f!=null&&f.contents)||((R=f==null?void 0:f.contents)==null?void 0:R.length)===0)return d;let O=[];return O=Ai(d,f==null?void 0:f.contents,0),O},Mi=async(d,f)=>{var Ta,ra,Ya,ia,Pa,se,Da,ua,Sa,oe,E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl,Ga,vl,Tl,Bl,hr,Ll,xl,Al,Gl,Ol,ur,dr,Jl,or,Vr,ir,lr,nr,Ii,Li,Vi;const M=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="header");d==null||d.filter(ha=>(ha==null?void 0:ha.key)==="tableIndexColumn")[0];const O=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="childTree")[0];let R=!0;if((Ya=(ra=(Ta=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:Ta.value)==null?void 0:ra.find(ha=>(ha==null?void 0:ha.value)==="onPamButtonContents"))!=null&&Ya.content){let ha=(se=(Pa=(ia=d==null?void 0:d.find(Cl=>(Cl==null?void 0:Cl.key)==="filterAllType"))==null?void 0:ia.value)==null?void 0:Pa.find(Cl=>(Cl==null?void 0:Cl.value)==="onPamButtonContents"))==null?void 0:se.content;ha=(Da=ha==null?void 0:ha.split(":"))==null?void 0:Da[1],ha=(ua=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:ua.split(","),R=!!(ha!=null&&ha.find(Cl=>Cl==="操作"))}const B=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="page"),Q=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="rowButton"),ae=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="extraButton"),H=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="tableContents"),he=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="bottomButton"),xe=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="tableIndex");De.value=(oe=(Sa=d==null?void 0:d.filter(ha=>(ha==null?void 0:ha.key)==="tableToForm"))==null?void 0:Sa[0])==null?void 0:oe.contents,_a.value=(B==null?void 0:B.contents)??!0;let Ve=[];Zl.value===""?Ve=M==null?void 0:M[0]:Ve=(M==null?void 0:M.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+Zl.value+")"))??(M==null?void 0:M.find(ha=>!(ha!=null&&ha.selectLabel)));let Me=[];Zl.value===""?Me=xe==null?void 0:xe[0]:Me=(xe==null?void 0:xe.find(ha=>(ha==null?void 0:ha.selectLabel)==="("+Zl.value+")"))??(xe==null?void 0:xe.find(ha=>!(ha!=null&&ha.selectLabel)));let Ue=[],ta=[];if(((E=Ve==null?void 0:Ve.contents)==null?void 0:E.length)>0){let ha=[],Cl=Ve==null?void 0:Ve.contents;if(Array.isArray(Cl==null?void 0:Cl[0])&&(($e=Cl==null?void 0:Cl[0])!=null&&$e.every(ll=>!(ll!=null&&ll.children)))&&(Cl=Cl==null?void 0:Cl[0]),Cl.some(ll=>Array.isArray(ll)&&(ll==null?void 0:ll.find(We=>We.children))))ha=(fe=sa.getGradeColumns(Cl,R))==null?void 0:fe[0],ha!=null&&ha.find(ll=>(ll==null?void 0:ll.label)==="操作")||ha.push({label:"操作",prop:"operate",type:"operate"});else{let ll=Cl.some(We=>Array.isArray(We))?Cl==null?void 0:Cl[0]:Cl;ll!=null&&ll.find(We=>(We==null?void 0:We.label)==="操作")||ll.push({label:"操作",prop:"operate",type:"operate"}),ll==null||ll.forEach((We,Xl)=>{var Tr,Cr,Ar,br,Qn,ft,ht,pr,hn,Fn,vt,Gr,jn,Fi,ji,Hi,Ui,qi,Wi,Ki;if((Cr=(Tr=xa.value)==null?void 0:Tr.split("/"))==null||Cr.forEach(Ql=>{var sr,Cn,Yi;Ql!==""&&((Yi=(Cn=(sr=Ql==null?void 0:Ql.split(x+"updateLoading"))==null?void 0:sr[0])==null?void 0:Cn.split(x+"loading"))==null||Yi[0])}),We!=null&&We.methodContent){let Ql=(Qn=(br=(Ar=We==null?void 0:We.methodContent)==null?void 0:Ar.replace("@","%%#"))==null?void 0:br.split("%%#"))==null?void 0:Qn[1];if(Ql=Ql==null?void 0:Ql.slice(0,(Ql==null?void 0:Ql.length)-1),Ql=sa.contentTransArrayToAllNoExtra(Ql??"",","),(ft=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("@Button")))!=null&&ft.includes("Prop")&&((ht=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("Type")))!=null&&ht.includes("Manual"))){let sr=(hn=(pr=Ql==null?void 0:Ql.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:pr.split(":"))==null?void 0:hn[1];sr=((Gr=(vt=(Fn=sr==null?void 0:sr.replaceAll("[",""))==null?void 0:Fn.replaceAll("]",""))==null?void 0:vt.split(","))==null?void 0:Gr[1])??"算法执行",Ue.push(sr)}else if((jn=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("@Button")))!=null&&jn.includes("Row")&&((Fi=Ql==null?void 0:Ql.find(sr=>sr==null?void 0:sr.includes("Type")))!=null&&Fi.includes("Manual"))){let sr=(Hi=(ji=Ql==null?void 0:Ql.find(Cn=>Cn==null?void 0:Cn.includes("@Button")))==null?void 0:ji.split(":"))==null?void 0:Hi[1];sr=((Wi=(qi=(Ui=sr==null?void 0:sr.replaceAll("[",""))==null?void 0:Ui.replaceAll("]",""))==null?void 0:qi.split(","))==null?void 0:Wi[1])??"算法执行",ta.push(sr)}}(Ki=De.value)==null||Ki.find(Ql=>(Ql==null?void 0:Ql.prop)===(We==null?void 0:We.prop)),ha.push({label:(We==null?void 0:We.label)==="操作"?R?"操作":"":(We==null?void 0:We.label)??"",prop:(We==null?void 0:We.label)==="操作"?"operate":(We==null?void 0:We.prop)??"a"+Xl,width:We!=null&&We.width?parseInt(We.width):"",fixed:(We==null?void 0:We.fixed)??void 0,sortable:(We==null?void 0:We.sortable)??!1,filterable:(We==null?void 0:We.filterable)??!1,operable:(We==null?void 0:We.operable)??!1,showSummary:(We==null?void 0:We.showSummary)??!1,align:(We==null?void 0:We.align)??"left",showOverflowTooltip:(We==null?void 0:We.showOverflowTooltip)??!0,isNotDrag:(We==null?void 0:We.isNotDrag)??!1,isEditCol:(We==null?void 0:We.isEditCol)??!1,isOperate:(We==null?void 0:We.isOperate)??!1,id:(We==null?void 0:We.id)??Xl,type:(We==null?void 0:We.label)==="操作"?"operate":void 0,formType:(We==null?void 0:We.formType)??(We!=null&&We.groupSelect?"Select":""),disabled:We==null?void 0:We.disabled,options:(We==null?void 0:We.options)??[],value:(We==null?void 0:We.value)??"",isExistChild:(We==null?void 0:We.isExistChild)??!1,mainKey:(We==null?void 0:We.mainKey)??Xl===0,allSelectionContents:(We==null?void 0:We.allContents)??[],filterContent:We==null?void 0:We.filterContents,menus:We==null?void 0:We.menus,groups:We==null?void 0:We.groups,words:We==null?void 0:We.words,filter:We==null?void 0:We.filter,bindMenus:We==null?void 0:We.bindMenus,fatherPath:We==null?void 0:We.fatherPath,isMainPath:We==null?void 0:We.isMainPath,required:(We==null?void 0:We.required)??!1,relatedContents:We==null?void 0:We.relatedContents,functionName:We==null?void 0:We.functionName,functionRelatedWords:We==null?void 0:We.functionRelatedWords,calculatorFilter:We==null?void 0:We.calculatorFilter,relatedPages:We==null?void 0:We.relatedPages})})}A.value=(ba=he==null?void 0:he[0])==null?void 0:ba.contents;const an=sa.getNewColumnChild(ha),Ri=ll=>Array.isArray(ll)?ll.map(We=>(Array.isArray(We==null?void 0:We.children)&&We.children.length>0?(We.sortable=!1,Ri(We.children)):(We==null?void 0:We.prop)==="operate"||(We==null?void 0:We.label)==="操作"||(We==null?void 0:We.type)==="operate"||(We.sortable=!1),We)):ll;Ri(an),await Po(an),Tf(ne.value,an),Ee.value=an,wa.value=an,n.value=(fa=Ee.value)==null?void 0:fa.map(ll=>ll==null?void 0:ll.label);let ln=(Ia=(ya=sa.getAllLeafNodes(Ee.value))==null?void 0:ya.filter(ll=>(ll==null?void 0:ll.type)!=="operate"))==null?void 0:Ia.map((ll,We)=>({prop:(ll==null?void 0:ll.prop)??"a"+We,column:ll.label}));Br.value=ln;let Yr=[];Zl.value===""?Yr=H==null?void 0:H[0]:Yr=(H==null?void 0:H.find(ll=>(ll==null?void 0:ll.selectLabel)==="("+Zl.value+")"))??(H==null?void 0:H.find(ll=>!(ll!=null&&ll.selectLabel)));let Zn=Array.isArray((dl=Yr==null?void 0:Yr.contents)==null?void 0:dl[0])&&((Xa=Yr==null?void 0:Yr.contents)!=null&&Xa[0].every(ll=>Array.isArray(ll)))?(ml=Yr==null?void 0:Yr.contents)==null?void 0:ml[0]:Yr==null?void 0:Yr.contents;Me!=null&&Me.contents&&((yl=Me==null?void 0:Me.contents)==null?void 0:yl.length)!==0&&(Zn=(Rl=I.cloneDeep(Zn))==null?void 0:Rl.map((ll,We)=>{if(!Array.isArray(ll)){let Xl={};for(let Tr in ll)Tr!=="id"&&Tr!=="index"&&(Xl[Tr]=ll[Tr]);ll=Object.values(Xl)}return ll}));const hu=!!((Ka=Ee.value)!=null&&Ka.find(ll=>ll.prop==="index"));Zn=Zs(Zn,Me==null?void 0:Me.contents,hu);const dt=[];Zn==null||Zn.forEach((ll,We)=>{var Tr;let Xl={};if(Array.isArray(ll)){let Cr=[];ll==null||ll.filter(Ar=>!(Ar!=null&&Ar.id)).forEach((Ar,br)=>{var Qn,ft,ht,pr,hn,Fn;if((Qn=ln==null?void 0:ln[br])!=null&&Qn.prop&&!Array.isArray(Ar)){let vt={};vt[ln[br].column]=Ar,Va!=null&&Va.value&&((ft=Va==null?void 0:Va.value)==null?void 0:ft.length)>0&&((ht=Va==null?void 0:Va.value)!=null&&ht.find(Gr=>JSON.stringify(Gr==null?void 0:Gr[0])===JSON.stringify(vt)))&&(Cr=(pr=Va==null?void 0:Va.value)==null?void 0:pr.find(Gr=>JSON.stringify(Gr==null?void 0:Gr[0])===JSON.stringify(vt))),Cr&&Cr.length>0?Xl[ln[br].prop]=Cr!=null&&Cr.find(Gr=>{var jn;return((jn=Object.keys(Gr))==null?void 0:jn[0])===ln[br].column})?(hn=Cr==null?void 0:Cr.find(Gr=>{var jn;return((jn=Object.keys(Gr))==null?void 0:jn[0])===ln[br].column}))==null?void 0:hn[ln[br].column]:Ar:Xl[ln[br].prop]=Ar}else Array.isArray(Ar)&&((Fn=ln[br])!=null&&Fn.prop?Xl[ln[br].prop]=Ar:Xl.children=pi(Ar,ln))})}else Xl=ll;if(Array.isArray(ll)&&ll.some(Cr=>Cr==null?void 0:Cr.id)){const Cr=(Tr=ll==null?void 0:ll.find(Ar=>Ar.id))==null?void 0:Tr.id;dt.push(Object.assign(Xl,{id:Xt(Cr)}))}else Xl.id?dt.push(Xl):dt.push(Object.assign(Xl,{id:We.toString()}))});try{const ll=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),We=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null"),Xl=ll==null?void 0:ll.tableId,Tr=ll==null?void 0:ll.compIndex;if(Xl&&Array.isArray(We)&&We.length>0&&String(Xl)===String(u==null?void 0:u.parentTableId)&&String(Tr)===String(u==null?void 0:u.index)){const Cr=new Set(dt.map(br=>String(br==null?void 0:br.id))),Ar=We.filter(br=>!Cr.has(String(br)));if(Ar.length>0){const br=ll==null?void 0:ll.pageKey,Qn=br!=null&&br.startsWith("/")?br.substring(1):br;((f==null?void 0:f[br])||(f==null?void 0:f[Qn])||[]).filter(pr=>{var hn,Fn;return((hn=pr==null?void 0:pr.key)==null?void 0:hn.type)==="data"&&String((Fn=pr==null?void 0:pr.key)==null?void 0:Fn.tableId)===String(Xl)&&Ar.includes(pr==null?void 0:pr.id)}).forEach(pr=>{var hn;Cr.has(String(pr==null?void 0:pr.id))||(dt.push({id:pr==null?void 0:pr.id,...((hn=pr==null?void 0:pr.value)==null?void 0:hn.tableData)||{}}),Cr.add(String(pr==null?void 0:pr.id)))})}}}catch{}let pt=null;try{const ll=`ocr_committed_temp_ids_v1:${String((u==null?void 0:u.parentTableId)??"")}:${String((u==null?void 0:u.index)??"")}`,We=JSON.parse(sessionStorage.getItem(ll)||"null");Array.isArray(We)&&We.length>0&&(pt=new Set(We.map(Xl=>String(Xl))))}catch{}const $i=Array.from(((wl=ve.value)==null?void 0:wl.values())||[]).filter(ll=>!(!(ll!=null&&ll._isOCRRow&&(ll==null?void 0:ll._ocrTableId)===(u==null?void 0:u.index))||pt&&pt.has(String(ll==null?void 0:ll.id)))),vu=(_e.value||[]).map(ll=>String(ll==null?void 0:ll.id)),Pi=Zt(dt,vu);if(_e.value=zi(Pi,O,Ee.value),Ca.value=Pi,(Wa=Ca.value)==null||Wa.forEach(ll=>{var We;(We=ve.value)==null||We.set(ll.id,ll)}),pt&&pt.size>0)try{const ll=new Set(Array.from(pt.values()));_e.value=(_e.value||[]).filter(We=>!ll.has(String(We==null?void 0:We.id))),Ca.value=(Ca.value||[]).filter(We=>!ll.has(String(We==null?void 0:We.id))),ll.forEach(We=>{var Xl,Tr;try{(Tr=(Xl=ve.value)==null?void 0:Xl.delete)==null||Tr.call(Xl,We)}catch{}})}catch{}const no=JSON.parse(sessionStorage.getItem("ocr_last_saved_table")||"null"),li=JSON.parse(sessionStorage.getItem("ocr_last_saved_ids")||"null");if(no&&Array.isArray(li)&&li.length>0&&String(no==null?void 0:no.compIndex)===String(u==null?void 0:u.index)){const ll=new Set((Ca.value||[]).map(We=>String(We==null?void 0:We.id)));li.filter(We=>!ll.has(String(We)))}if($i.length>0){const ll=new Set((_e.value||[]).map(Xl=>Xl==null?void 0:Xl.id)),We=$i.filter(Xl=>!ll.has(Xl.id));We.length>0&&(_e.value=[..._e.value||[],...We],Ca.value=[...Ca.value||[],...We],We.forEach(Xl=>{var Tr;return(Tr=ve.value)==null?void 0:Tr.set(Xl.id,Xl)}))}}else Ee.value=[],de.value=[],_e.value=[],Ca.value=[],ve.value=new Map;if(ta=[...new Set(ta)],ta=ta==null?void 0:ta.map(ha=>({label:ha,type:"methodButton"})),((hl=Q==null?void 0:Q.contents)==null?void 0:hl.length)>0?Ma.value=Q==null?void 0:Q.contents:Ma.value=[],Ma.value=[...Ma.value,...ta],Ue=[...new Set(Ue)],Ue=Ue==null?void 0:Ue.map(ha=>({label:ha,type:"methodButton"})),((Ga=ae==null?void 0:ae.contents)==null?void 0:Ga.length)>0)if((Bl=(Tl=(vl=d==null?void 0:d.find(ha=>(ha==null?void 0:ha.key)==="filterAllType"))==null?void 0:vl.value)==null?void 0:Tl.find(ha=>(ha==null?void 0:ha.value)==="onButtonContents"))!=null&&Bl.content){let ha=(xl=(Ll=(hr=d==null?void 0:d.find(Cl=>(Cl==null?void 0:Cl.key)==="filterAllType"))==null?void 0:hr.value)==null?void 0:Ll.find(Cl=>(Cl==null?void 0:Cl.value)==="onButtonContents"))==null?void 0:xl.content;if(ha=(Al=ha==null?void 0:ha.split(":"))==null?void 0:Al[1],ha=(Gl=ha.slice(1,(ha==null?void 0:ha.length)-1))==null?void 0:Gl.split(","),Aa.value=(Ol=ae==null?void 0:ae.contents)==null?void 0:Ol.filter(Cl=>ha==null?void 0:ha.find(an=>an===(Cl==null?void 0:Cl.label))),Ae.value=(ur=ae==null?void 0:ae.contents)==null?void 0:ur.filter(Cl=>ha==null?void 0:ha.find(an=>an===(Cl==null?void 0:Cl.label))),(dr=ae==null?void 0:ae.contents)!=null&&dr.some(Cl=>(Cl==null?void 0:Cl.label)==="OCR识别")&&!((Jl=Aa.value)!=null&&Jl.some(Cl=>(Cl==null?void 0:Cl.label)==="OCR识别"))){const Cl=(or=ae==null?void 0:ae.contents)==null?void 0:or.find(an=>(an==null?void 0:an.label)==="OCR识别");Aa.value=[...Aa.value,Cl],Ae.value=[...Ae.value,Cl]}w.value=!!(ha!=null&&ha.find(Cl=>Cl==="搜索")),$.value=!!(ha!=null&&ha.find(Cl=>Cl==="块状显示"))}else Aa.value=ae==null?void 0:ae.contents,Ae.value=ae==null?void 0:ae.contents;else Aa.value=[],Ae.value=[];Aa.value=[...Aa.value,...Ue],Ae.value=[...Ae.value,...Ue],typeof xa.value=="string"&&xa.value==="设备管理/试验设备"&&(u==null?void 0:u.compName)==="设备列表"?((Vr=Aa.value)!=null&&Vr.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(Aa.value=[...Aa.value||[],{label:"OCR识别"}]),(ir=Ae.value)!=null&&ir.some(ha=>(ha==null?void 0:ha.label)==="OCR识别")||(Ae.value=[...Ae.value||[],{label:"OCR识别"}])):(Aa.value=(Aa.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别"),Ae.value=(Ae.value||[]).filter(ha=>(ha==null?void 0:ha.label)!=="OCR识别")),(lr=Aa.value)!=null&&lr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(Aa.value=[...Aa.value||[],{label:"切换视图"}]),(nr=Ae.value)!=null&&nr.some(ha=>(ha==null?void 0:ha.label)==="切换视图")||(Ae.value=[...Ae.value||[],{label:"切换视图"}]),Fe.value=((Ii=_e==null?void 0:_e.value)==null?void 0:Ii.length)??0,Ti(_e.value),Nr.value=_e.value,zl.value&&(Ee.value=(Vi=(Li=de.value)==null?void 0:Li.filter(ha=>(ha==null?void 0:ha.label)!=="操作"))==null?void 0:Vi.map(ha=>{var Cl;return{...ha,type:"edit",optionUrl:ha!=null&&ha.formMenuSelect&&((Cl=ha==null?void 0:ha.formMenuSelect)==null?void 0:Cl.length)>0?{groupSelect:ha==null?void 0:ha.groupSelect,menuSelect:ha==null?void 0:ha.formMenuSelect,selectRelateType:"",type:ha==null?void 0:ha.formType}:null}}),ai())};a.watch(()=>[u.itemData,Zl.value,Kn.value,In.value,Va==null?void 0:Va.value],async()=>{var d,f,M,O,R,B;if((d=u==null?void 0:u.itemData)!=null&&d.find(Q=>(Q==null?void 0:Q.key)==="columnPath")&&!((f=F.value)!=null&&f.find(Q=>{var ae,H;return(Q==null?void 0:Q.key)===((H=(ae=u==null?void 0:u.itemData)==null?void 0:ae.find(he=>(he==null?void 0:he.key)==="columnPath"))==null?void 0:H.contents)}))){let Q=F.value,ae={key:(O=(M=u==null?void 0:u.itemData)==null?void 0:M.find(H=>(H==null?void 0:H.key)==="columnPath"))==null?void 0:O.contents,value:(B=(R=u==null?void 0:u.itemData)==null?void 0:R.find(H=>(H==null?void 0:H.key)==="columnUsingPath"))==null?void 0:B.contents};Q!=null&&Q.find(H=>(H==null?void 0:H.key)===(ae==null?void 0:ae.key))?Q=Q==null?void 0:Q.map(H=>((H==null?void 0:H.key)===(ae==null?void 0:ae.key)&&(H.value=ae.value),H)):Q.push(ae),Ye.setTableViewContents(Q)}await Mi(u.itemData,u.allMapContents)},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.operatingForm,d=>{d!=null&&d.form&&(At(d==null?void 0:d.form),Le.value=d==null?void 0:d.dialogTitle,Ba.value=!0,va.value=!0)},{immediate:!0,deep:!0});const lu=()=>{var d;(d=z.value)!=null&&d.includes("read")&&(zl.value=!zl.value)},ru=()=>{cr.value=!cr.value};a.watch(()=>{var d;return(d=u==null?void 0:u.config)==null?void 0:d.viewport},d=>{var f;z.value=d,(d==null?void 0:d.length)===0?zl.value=!1:(d!=null&&d.includes("read")||(zl.value=!0),d!=null&&d.includes("edit")||(zl.value=!1)),S.value=((f=u==null?void 0:u.config)==null?void 0:f.showIndex)||zl.value},{immediate:!0}),a.watch(()=>zl.value,d=>{var f;d?(ai("viewChange"),Ye.setCacheUpdatingData(null)):(Aa.value=Ae.value,Ee.value=wa.value,P.value&&(Ye.setTableLoading(u==null?void 0:u.index),ze("change",P.value))),S.value=d||((f=u==null?void 0:u.config)==null?void 0:f.showIndex),ar.value=[]},{immediate:!0}),a.watch(()=>{var d;return(d=Vn.value)==null?void 0:d.length},d=>{d===0&&(be.currentPage=1)}),a.watch(()=>u==null?void 0:u.compNames,d=>{i.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:d||[],width:1}]},{immediate:!0}),a.ref(!1);const nu=(d,f)=>{var M;ai("createClick"),f===be.pageSize&&(be.currentPage=Math.ceil(((M=_e.value)==null?void 0:M.length)/be.pageSize))},tu=async(d,f,M)=>{var R,B,Q,ae,H;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop);if(O&&lo.includes(O)&&M!==void 0&&M!==null&&String(M).trim()!==""){const he=String(M).trim();if(await ei(he,d==null?void 0:d.id)){el.ElMessage.warning("当前任务下通道号不能重复,请重新选择");const Ve=(R=_e.value)==null?void 0:R.findIndex(Ue=>(Ue==null?void 0:Ue.id)===(d==null?void 0:d.id)),Me=Ve!==-1?(Q=(B=_e.value)==null?void 0:B[Ve])==null?void 0:Q[O]:void 0;O&&(d[O]=Me??"");return}}if(zl.value){const he=d==null?void 0:d.id;he!=null&&(g.value.has(he)||g.value.set(he,I.cloneDeep(d)),c.value.add(he));const xe=(ae=_e.value)==null?void 0:ae.findIndex(Ve=>(Ve==null?void 0:Ve.id)===(d==null?void 0:d.id));xe!==-1&&O&&(_e.value[xe]={..._e.value[xe],[O]:M}),ro(M,d,f);return}ro(M,d,f),Il.value=I.cloneDeep(d),Je.value=d==null?void 0:d.id,Fe.value=(H=_e.value)==null?void 0:H.length,Le.value=d!=null&&d._isTemp?"新增":"编辑",Mt(!1)},ou=async()=>{var d,f;try{const M=[];if(u!=null&&u.related&&Array.isArray(u.related)&&(console.log("props.related",u.related),u.related.forEach(O=>{if(typeof O=="string"&&O.includes("content_")){const R=O.split("_")[1];R&&(M.push(`content_${R}`),M.push(`struct_${R}`))}})),M.length===0&&(u!=null&&u.itemData)){const O=(f=(d=u.itemData)==null?void 0:d.find(R=>(R==null?void 0:R.key)==="contentTableId"))==null?void 0:f.contents;O&&(M.push(`content_${O}`),M.push(`struct_${O}`))}return M}catch(M){return console.error("获取 tableNames 失败:",M),[]}},iu=async(d,f,M)=>{var B,Q;if(!M||typeof M!="string"||M.trim()===""){const ae=(f==null?void 0:f.property)??(f==null?void 0:f.prop),H=`${d==null?void 0:d.id}:${ae}`;h.value.delete(H),m.value.set(H,!1);return}const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),R=`${d==null?void 0:d.id}:${O}`;m.value.set(R,!0);try{const ae=await ou();if(ae.length===0){console.warn("未找到同名表,跳过全局搜索"),h.value.delete(R),m.value.set(R,!1);return}const H=parseInt((B=Vl.value)==null?void 0:B.plat_id);if(!H){console.warn("platId 无效,跳过全局搜索"),h.value.delete(R),m.value.set(R,!1);return}const he=await I.getAllTables({platId:H,tableNames:ae}),xe=((Q=he==null?void 0:he.data)==null?void 0:Q.result)||[],Ve=[],Me=[];for(let Ue=0;Ue<xe.length;Ue+=2)Ue+1<xe.length&&Me.push([xe[Ue],xe[Ue+1]]);Me.forEach(([Ue,ta])=>{var Pa;if(!Array.isArray(Ue)||Ue.length===0||!Array.isArray(ta)||ta.length===0)return;const $a=ta[0];let Ta=((Pa=$a==null?void 0:$a.结构)==null?void 0:Pa.contents)??[];if(!Array.isArray(Ta)||Ta.length===0)return;let ra=I.cloneDeep(Ta);if(Array.isArray(ra==null?void 0:ra[0])&&(ra=sa.getColumnChild(ra[0])),!Array.isArray(ra)||ra.length===0||!ra.some(se=>(se==null?void 0:se.prop)===O))return;[...Ue].sort((se,Da)=>{const ua=Number((se==null?void 0:se.update_time)??0);return Number((Da==null?void 0:Da.update_time)??0)-ua}).slice(0,20).forEach(se=>{const Da=se[O];if(Da!=null){const ua=String(Da);ua.toLowerCase().includes(M.toLowerCase())&&Ve.findIndex(oe=>{var E;return se.id&&((E=oe.rowData)==null?void 0:E.id)===se.id?!0:oe.label===ua})===-1&&Ve.push({label:ua,rowData:I.cloneDeep(se),sourceTable:($a==null?void 0:$a.source_table)||""})}})}),h.value.set(R,Ve)}catch(ae){console.error("全局搜索建议失败:",ae),h.value.delete(R)}finally{m.value.set(R,!1)}},su=(d,f,M)=>{if(!zl.value)return;const O=(f==null?void 0:f.property)??(f==null?void 0:f.prop),R=(f==null?void 0:f.formType)||(f==null?void 0:f.columnType)||"";if(R&&R.toUpperCase()!=="INPUT"&&R!=="")return;const B=`${d==null?void 0:d.id}:${O}`;if(v.has(B)&&clearTimeout(v.get(B)),!M||M.trim()===""){h.value.delete(B),m.value.set(B,!1);return}const Q=setTimeout(()=>{iu(d,{prop:O,property:O},M),v.delete(B)},300);v.set(B,Q)};function cu(d,f){const M=`${d==null?void 0:d.id}:${(f==null?void 0:f.property)??(f==null?void 0:f.prop)}`;return h.value.get(M)||[]}const uu=(d,f,M)=>{var xe;if(!M||!M.rowData)return;const O=M.rowData,R=d==null?void 0:d.id,B=(f==null?void 0:f.property)??(f==null?void 0:f.prop),ae=(sa.getAllLeafNodes(Ee.value)||[]).filter(Ve=>(Ve==null?void 0:Ve.type)!=="operate"&&(Ve==null?void 0:Ve.label)!=="操作"&&(Ve==null?void 0:Ve.prop)!=="operate");ae.forEach(Ve=>{const Me=Ve==null?void 0:Ve.prop;Me&&O[Me]!==void 0&&(d[Me]=O[Me])});const H=(xe=_e.value)==null?void 0:xe.findIndex(Ve=>(Ve==null?void 0:Ve.id)===R);H!==-1&&ae.forEach(Ve=>{const Me=Ve==null?void 0:Ve.prop;Me&&O[Me]!==void 0&&(_e.value[H][Me]=O[Me])}),R!=null&&(g.value.has(R)||g.value.set(R,I.cloneDeep(d)),c.value.add(R));const he=`${R}:${B}`;h.value.delete(he),m.value.set(he,!1),ro(d[B],d,f)},Lr=d=>{var H,he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya;const{row:f,column:M,item:O,slotData:R}=d;let B=f!=null&&f[M==null?void 0:M.prop]||(f==null?void 0:f[M==null?void 0:M.prop])===0?((he=(H=f==null?void 0:f[M==null?void 0:M.prop])==null?void 0:H[0])==null?void 0:he.contents)??((f==null?void 0:f[M==null?void 0:M.prop])===0?"0":f==null?void 0:f[M==null?void 0:M.prop]):((Ve=(xe=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:xe[0])==null?void 0:Ve.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((Ue=(Me=R==null?void 0:R[O==null?void 0:O.prop])==null?void 0:Me[0])==null?void 0:Ue.contents)??(R==null?void 0:R[O==null?void 0:O.prop])??((Ta=($a=f==null?void 0:f[(ta=O==null?void 0:O.child)==null?void 0:ta.prop])==null?void 0:$a[0])==null?void 0:Ta.contents)??(f==null?void 0:f[(ra=O==null?void 0:O.child)==null?void 0:ra.prop]),ae=Array.isArray(B)&&!(B!=null&&B.every(ia=>typeof ia=="string"||typeof ia=="number"))?"查看":B;if(ae=Array.isArray(ae)?ae.join(","):ae,(M==null?void 0:M.formType)==="Date")if(!ae||ae===""||ae===null||ae===void 0)ae="";else{const ia=I.dayjs(ae,["YYYY-MM-DD","YYYY/MM/DD","YYYY年MM月DD日","YYYYMMDD"],!0);ae=ia.isValid()?ia.format("YYYYMMDD"):ae??""}return Array.isArray(M==null?void 0:M.relatedPages)&&((Ya=M==null?void 0:M.relatedPages)==null?void 0:Ya.length)>0&&(ae="详情页"),ae},du=d=>{var he,xe,Ve,Me,Ue,ta,$a,Ta,ra,Ya;const{row:f,column:M,item:O,slotData:R}=d;let B=f!=null&&f[M==null?void 0:M.prop]?((xe=(he=f==null?void 0:f[M==null?void 0:M.prop])==null?void 0:he[0])==null?void 0:xe.contents)??(f==null?void 0:f[M==null?void 0:M.prop]):((Me=(Ve=f==null?void 0:f[O==null?void 0:O.prop])==null?void 0:Ve[0])==null?void 0:Me.contents)??(f==null?void 0:f[O==null?void 0:O.prop])??((ta=(Ue=R==null?void 0:R[O==null?void 0:O.prop])==null?void 0:Ue[0])==null?void 0:ta.contents)??(R==null?void 0:R[O==null?void 0:O.prop])??((ra=(Ta=f==null?void 0:f[($a=O==null?void 0:O.child)==null?void 0:$a.prop])==null?void 0:Ta[0])==null?void 0:ra.contents)??(f==null?void 0:f[(Ya=O==null?void 0:O.child)==null?void 0:Ya.prop]);const ae=Array.isArray(B)&&!(B!=null&&B.every(ia=>typeof ia=="string"||typeof ia=="number")),H=Array.isArray(B)&&(B==null?void 0:B.find(ia=>ia==null?void 0:ia.url));return ae&&H},pu=d=>{var R,B;if(!(d!=null&&d.column))return!1;const f=xa.value==="试验任务/任务管理",M=(u==null?void 0:u.compName)==="任务列表",O=((R=d==null?void 0:d.column)==null?void 0:R.label)==="任务状态"||((B=d==null?void 0:d.column)==null?void 0:B.prop)==="任务状态";return f&&M&&O},fu=(d,f)=>d.find(M=>Object.values(M).some(O=>O===f));return a.watch(()=>Te.value,async d=>{if(d){ea.setContentLoading(!0),await a.nextTick();const f=fu(_e.value,d==null?void 0:d.data);if(!f)return ea.setContentLoading(!1);await Pn(d==null?void 0:d.data,null,f,{data:d==null?void 0:d.data}),ea.setContentLoading(!1)}},{deep:!0,immediate:!0}),a.watch(()=>u==null?void 0:u.cacheNewData,d=>{var f;d&&(Array.isArray(d)?d.forEach(M=>{var O,R,B,Q,ae;if(换,String(M==null?void 0:M.compId)===String(u==null?void 0:u.index)&&(M!=null&&M.resId)&&((O=M==null?void 0:M.data)!=null&&O.id)){const H=(R=M==null?void 0:M.data)==null?void 0:R.id,he=M==null?void 0:M.resId;if(_e.value=(B=_e.value)==null?void 0:B.map(xe=>{if((xe==null?void 0:xe.id)===H){const Ve={...xe,id:he};return delete Ve._isOCRRow,delete Ve._ocrTableId,Ve}return xe}),(ae=(Q=ve.value)==null?void 0:Q.has)!=null&&ae.call(Q,H)){const Ve={...ve.value.get(H)||{},id:he};delete Ve._isOCRRow,delete Ve._ocrTableId,ve.value.delete(H),ve.value.set(he,Ve)}qe(u==null?void 0:u.index,H,he)}}):String(d==null?void 0:d.compId)===String(u==null?void 0:u.index)&&(_e.value=(f=_e.value)==null?void 0:f.map(M=>{var O;if((M==null?void 0:M.id)===((O=d==null?void 0:d.data)==null?void 0:O.id)){const R={...M,id:d==null?void 0:d.resId};return delete R._isOCRRow,delete R._ocrTableId,R}return M})))},{immediate:!0,deep:!0}),(d,f)=>{var ra,Ya,ia,Pa;const M=a.resolveComponent("svg-icon"),O=a.resolveComponent("el-popover"),R=a.resolveComponent("el-switch"),B=a.resolveComponent("el-checkbox"),Q=a.resolveComponent("el-radio"),ae=a.resolveComponent("el-radio-group"),H=a.resolveComponent("el-checkbox-group"),he=a.resolveComponent("el-button"),xe=a.resolveComponent("el-icon"),Ve=a.resolveComponent("el-progress"),Me=a.resolveComponent("el-alert"),Ue=a.resolveComponent("el-table-column"),ta=a.resolveComponent("el-table"),$a=a.resolveComponent("el-upload"),Ta=a.resolveComponent("el-text");return a.openBlock(),a.createElementBlock("div",v0,[Mr.value?(a.openBlock(),a.createBlock(pl.ssTable,{id:"excel-table",pageObj:be,showIndex:S.value,isTree:(ra=l.compItem)==null?void 0:ra.isTree,summaryInfo:X,columns:Ee.value,defaultSort:Z,isCardViewport:cr.value,checkedColumns:n.value,key:vn.value+Ee.value,tableData:Vn.value,isEditViewport:zl.value,isShowPagination:_a.value,isShowEdit:!1,isShowDelete:!1,allowSelect:_.value,onDbClickRow:Qt,extraButton:Aa.value,rowButton:Ma.value,cacheExtraButtons:Ae.value,isClearSelection:((Ya=ar.value)==null?void 0:Ya.length)===0,onDoCurrentChange:fn,onDoSizeChange:Et,onSortChange:zo,onContentClick:Pn,onRowClick:eo,onSelectChange:Ro,onCellChange:tu,onCellInput:su,onSelectSuggest:uu,onChange:ro,onPreview:$n,onSubmitEditingTable:qt,onHandleColEditChange:jt,onHandleColTypeChange:Ht,onClickButton:Tn,onAddNewRow:Or,bottomButton:A.value},a.createSlots({headerButton:a.withCtx(se=>{var Da,ua;return[l.showHeader?(a.openBlock(),a.createBlock(qp,{key:0,id:"tableHeaderButton",pageLayout:l.pageLayout,lockingPage:a.unref(ce)===a.unref(xa),filterValues:Uo.value,selectNums:(Da=ar.value)==null?void 0:Da.length,dataNums:(ua=_e.value)==null?void 0:ua.length,compName:l.compName,isDevMode:l.isDevMode,buttons:se.buttons,onButtonClick:f[1]||(f[1]=(Sa,oe,E)=>Tn(Sa,oe,{extra:E})),columns:Ee.value,onFilter:qo,onGetImportData:Oo,level:l.level,filterShow:w.value},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level","filterShow"])):a.createCommentVNode("",!0)]}),viewport:a.withCtx(()=>{var se,Da,ua,Sa;return[((se=_e.value)==null?void 0:se.length)>0&&l.allowOperate&&$.value?(a.openBlock(),a.createElementBlock("div",g0,[(Da=z.value)!=null&&Da.includes("read")&&((ua=z.value)!=null&&ua.includes("edit"))&&((Sa=Ma.value)!=null&&Sa.some(oe=>(oe==null?void 0:oe.label)==="编辑"))&&!cr.value&&a.unref(ce)!==a.unref(xa)?(a.openBlock(),a.createElementBlock("span",{key:0,title:"编辑表格",onClick:lu},[a.createVNode(M,{name:"editTable",class:"view-icon"})])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]}),rowCreate:a.withCtx(({row:se,index:Da})=>[a.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:ua=>nu(se,Da)},[a.createVNode(M,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,b0)]),operateCol:a.withCtx(()=>[a.createVNode(O,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:Xc},{reference:a.withCtx(()=>[a.createElementVNode("span",k0,[a.createVNode(M,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",x0,[f[20]||(f[20]=a.createElementVNode("div",{class:"group-title"},"表格操作",-1)),a.createVNode(R,{"model-value":k.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:f[2]||(f[2]=se=>Kt(se))},null,8,["model-value"]),f[21]||(f[21]=a.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),a.createVNode(H,{modelValue:n.value,"onUpdate:modelValue":f[3]||(f[3]=se=>n.value=se),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:s},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(xn.value,se=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:se.label},[a.createVNode(B,{value:se.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",{title:se.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},a.toDisplayString(se.label),9,_0)]),_:2},1032,["value"]),a.createVNode(O,{"popper-class":"col-operate-popover",title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(M,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Da;return[a.createElementVNode("div",w0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Da=Object.keys(se))==null?void 0:Da.filter(ua=>{var Sa;return(Sa=Y.value)==null?void 0:Sa.find(oe=>(oe==null?void 0:oe.value)===ua)}),ua=>{var Sa,oe;return a.openBlock(),a.createElementBlock("div",{key:ua},[N[ua]=="radio"?(a.openBlock(),a.createElementBlock("div",C0,[f[19]||(f[19]=a.createElementVNode("div",null,"固定:",-1)),a.createVNode(ae,{"model-value":se==null?void 0:se[ua],onChange:E=>_n(E,ua,se)},{default:a.withCtx(()=>{var E,$e;return[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(($e=(E=Y.value)==null?void 0:E.find(fe=>(fe==null?void 0:fe.value)===ua))==null?void 0:$e.options,fe=>(a.openBlock(),a.createBlock(Q,{key:fe==null?void 0:fe.value,label:fe==null?void 0:fe.value,value:fe==null?void 0:fe.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(fe==null?void 0:fe.label),1)]),_:2},1032,["label","value"]))),128))]}),_:2},1032,["model-value","onChange"])])):a.createCommentVNode("",!0),N[ua]=="switch"?(a.openBlock(),a.createBlock(R,{key:1,"model-value":se==null?void 0:se[ua],"active-text":(oe=(Sa=Y.value)==null?void 0:Sa.find(E=>(E==null?void 0:E.value)===ua))==null?void 0:oe.label,onChange:E=>_n(E,ua,se)},null,8,["model-value","active-text","onChange"])):a.createCommentVNode("",!0)])}),128))])]}),_:2},1024),a.createElementVNode("span",S0,[a.createVNode(M,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:a.withCtx(se=>{var Da,ua,Sa,oe,E,$e,fe,ba,fa,ya,Ia,dl,Xa,ml,yl,Rl,Ka,wl,Wa,hl;return[((Da=se==null?void 0:se.column)==null?void 0:Da.label)==="证书附件"||((ua=se==null?void 0:se.column)==null?void 0:ua.prop)==="证书附件"?(a.openBlock(),a.createElementBlock("div",E0,[a.createVNode(M,{name:"query",style:{width:"20px",height:"20px",color:"var(--ssComponent-theme-color)",cursor:"pointer"},onClick:a.withModifiers(Ga=>Fr(se),["stop"]),title:"查看OCR图片"},null,8,["onClick"])])):du(se)?(a.openBlock(),a.createBlock(O,{key:1,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:a.withCtx(()=>[a.createElementVNode("span",D0,a.toDisplayString(Lr(se)),1)]),default:a.withCtx(()=>{var Ga,vl;return[a.createElementVNode("div",B0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((vl=se==null?void 0:se.row)==null?void 0:vl[(Ga=se==null?void 0:se.column)==null?void 0:Ga.prop],Tl=>(a.openBlock(),a.createElementBlock("div",N0,[a.createElementVNode("div",{class:"prop-url",title:Jn(Tl),onClick:Bl=>jo(Tl)},a.toDisplayString(Jn(Tl)),9,T0),a.createElementVNode("div",{class:"prop-download",onClick:Bl=>ot(Tl)}," 下载 ",8,A0)]))),256))])]}),_:2},1024)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:2},[pu(se)?(a.openBlock(),a.createBlock(Su,{key:0,value:Lr(se)},null,8,["value"])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"table-cell-content",style:a.normalizeStyle({color:!Array.isArray(Lr(se))&&((oe=(Sa=Lr(se))==null?void 0:Sa.toString())!=null&&oe.includes(".txt")||($e=(E=Lr(se))==null?void 0:E.toString())!=null&&$e.includes(".cpt")||(ba=(fe=Lr(se))==null?void 0:fe.toString())!=null&&ba.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Lr(se))&&((ya=(fa=Lr(se))==null?void 0:fa.toString())!=null&&ya.includes(".txt")||(dl=(Ia=Lr(se))==null?void 0:Ia.toString())!=null&&dl.includes(".cpt")||(ml=(Xa=Lr(se))==null?void 0:Xa.toString())!=null&&ml.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Lr(se))&&((Rl=(yl=Lr(se))==null?void 0:yl.toString())!=null&&Rl.includes(".txt")||(wl=(Ka=Lr(se))==null?void 0:Ka.toString())!=null&&wl.includes(".cpt")||(hl=(Wa=Lr(se))==null?void 0:Wa.toString())!=null&&hl.includes(".cyd"))?"pointer":"",marginLeft:(se==null?void 0:se.colIndex)===0?`${((se==null?void 0:se.level)??0)*20}px`:0}),onClick:Ga=>{var vl;return Bn(Lr(se),((vl=se==null?void 0:se.column)==null?void 0:vl.relatedPages)??[])}},a.toDisplayString(Lr(se)===0?"0":Lr(se)),13,z0))],64))]}),_:2},[((ia=Ma.value)==null?void 0:ia.length)>0?{name:"actions",fn:a.withCtx(({item:se,fIndex:Da})=>[a.createVNode(O,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:a.withCtx(()=>[a.createVNode(M,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"},onClick:f[0]||(f[0]=a.withModifiers(()=>{},["stop"]))})]),default:a.withCtx(()=>[a.createElementVNode("div",m0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Ho(Ma.value,se),(ua,Sa)=>(a.openBlock(),a.createElementBlock("div",{class:"menu-config-item",key:Sa,onClick:a.withModifiers(oe=>Tn(ua==null?void 0:ua.label,se,{extra:ua}),["stop"])},[a.createElementVNode("div",{style:a.normalizeStyle({color:ua==null?void 0:ua.textColor}),class:"extra-button-label"},a.toDisplayString(ua==null?void 0:ua.label),5)],8,y0))),128))])]),_:2},1024)]),key:"0"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection","bottomButton"])):a.createCommentVNode("",!0),zl.value?(a.openBlock(),a.createElementBlock("div",M0,[a.createVNode(he,{id:"themeBorderButton",onClick:Vo},{default:a.withCtx(()=>f[22]||(f[22]=[a.createTextVNode("取消")])),_:1,__:[22]}),a.createVNode(he,{class:"ok-button",id:"themeButton",onClick:Dt},{default:a.withCtx(()=>f[23]||(f[23]=[a.createTextVNode("保存")])),_:1,__:[23]})])):a.createCommentVNode("",!0),a.createVNode(vr.ssDialog,{title:Le.value,visible:va.value,width:jl.value,onBeforeDestroy:Yt,style:{height:"74%"}},{default:a.withCtx(()=>[a.createElementVNode("div",O0,[a.createVNode(pl.ssForm,{ref_key:"formRef",ref:re,rowContents:we.value,showOperator:!1,onChange:Zc,isEnableWrap:!1,onFixChangeValue:Nt,onClickTrigger:Gt,isEdit:Qe.value,onBlurChange:$o,onCreate:Wt,onTagChange:Kr},null,8,["rowContents","isEdit"])])]),footer:a.withCtx(()=>[Ba.value?(a.openBlock(),a.createElementBlock("div",I0,[a.createVNode(he,{onClick:f[4]||(f[4]=se=>va.value=!1),id:"themeBorderButton"},{default:a.withCtx(()=>f[24]||(f[24]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[24]}),a.createVNode(he,{class:"ok-button",onClick:f[5]||(f[5]=se=>Mt(!0)),id:"themeButton"},{default:a.withCtx(()=>f[25]||(f[25]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[25]})])):a.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),a.createVNode(vr.ssDialog,{title:Le.value,visible:K.value,width:je.value,onBeforeDestroy:f[7]||(f[7]=se=>K.value=!1)},{default:a.withCtx(()=>[a.createVNode(nf)]),footer:a.withCtx(()=>[a.createElementVNode("div",L0,[a.createVNode(he,{onClick:f[6]||(f[6]=se=>K.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:a.withCtx(()=>f[26]||(f[26]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[26]}),a.createVNode(he,{class:"ok-button",onClick:Tt,id:"themeButton"},{default:a.withCtx(()=>f[27]||(f[27]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[27]})])]),_:1},8,["title","visible","width"]),ja.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:2,fileDataList:ee.value,onDestroy:wn},null,8,["fileDataList"])):a.createCommentVNode("",!0),Ke.value?(a.openBlock(),a.createBlock(vr.ssDialog,{key:3,visible:Ke.value,onBeforeDestroy:Gc,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:a.withCtx(()=>[a.createVNode(go.ThreeViewerHost,{files:Ua.value,threeData:te.value},null,8,["files","threeData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(vr.ssDialog,{title:"OCR扫描录入",visible:rl.value,"close-on-click-modal":!1,onBeforeDestroy:il,width:"1000px",dialogHeight:700,minWidth:900,minHeight:600,class:"ocr-upload-dialog",resizable:!0},{default:a.withCtx(()=>[f[38]||(f[38]=a.createElementVNode("div",{class:"ocr-header-bg"},null,-1)),a.createElementVNode("div",V0,[a.createElementVNode("div",R0,[a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:W.value===1}])},f[28]||(f[28]=[a.createElementVNode("div",{class:"step-circle"},"1",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件识别",-1)]),2),f[31]||(f[31]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:W.value===2}])},f[29]||(f[29]=[a.createElementVNode("div",{class:"step-circle"},"2",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件确认",-1)]),2),f[32]||(f[32]=a.createElementVNode("div",{class:"ocr-step-connector"},null,-1)),a.createElementVNode("div",{class:a.normalizeClass(["ocr-step-item",{active:W.value===3}])},f[30]||(f[30]=[a.createElementVNode("div",{class:"step-circle"},"3",-1),a.createElementVNode("div",{class:"step-label",style:{"font-weight":"800"}},"文件提交",-1)]),2)]),W.value===1?(a.openBlock(),a.createElementBlock("div",$0,[a.createVNode(he,{onClick:Xo,class:"ocr-action-btn",disabled:da.value,size:"default"},{default:a.withCtx(()=>f[33]||(f[33]=[a.createTextVNode("扫描文件 ")])),_:1,__:[33]},8,["disabled"]),a.createVNode(he,{onClick:Fl,class:"ocr-action-btn",disabled:da.value,size:"default"},{default:a.withCtx(()=>f[34]||(f[34]=[a.createTextVNode("上传文件 ")])),_:1,__:[34]},8,["disabled"])])):a.createCommentVNode("",!0),W.value===1?(a.openBlock(),a.createElementBlock("div",P0,[a.createElementVNode("div",F0,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Xe.value,(se,Da)=>{var ua;return a.openBlock(),a.createElementBlock("div",{key:Da,class:"ocr-file-item"},[a.createElementVNode("div",j0,[se.raw&&((ua=se.raw.type)!=null&&ua.startsWith("image/"))?(a.openBlock(),a.createElementBlock("img",{key:0,src:_l(se),alt:"预览",class:"thumbnail-image"},null,8,H0)):(a.openBlock(),a.createElementBlock("div",U0,[a.createVNode(xe,{size:40},{default:a.withCtx(()=>[a.createVNode(a.unref(el.document_default))]),_:1})])),a.createElementVNode("div",{class:a.normalizeClass(["file-progress-ring",{uploading:sl(se)==="uploading",processing:sl(se)==="processing",completed:sl(se)==="completed"||sl(se)==="uploaded",failed:sl(se)==="failed"}])},[(a.openBlock(),a.createElementBlock("svg",q0,[f[35]||(f[35]=a.createElementVNode("circle",{class:"progress-ring-bg",cx:"18",cy:"18",r:"16",fill:"none",stroke:"#e4e7ed","stroke-width":"2"},null,-1)),a.createElementVNode("circle",{class:a.normalizeClass(["progress-ring-fill",{completed:sl(se)==="completed"||sl(se)==="uploaded",uploading:sl(se)==="uploading",processing:sl(se)==="processing",failed:sl(se)==="failed"}]),cx:"18",cy:"18",r:"16",fill:"none",stroke:sl(se)==="failed"?"#f56c6c":sl(se)==="completed"||sl(se)==="uploaded"?"#67c23a":"#409eff","stroke-width":sl(se)==="completed"||sl(se)==="uploaded"||sl(se)==="failed"?3:2,"stroke-dasharray":Kl(se),"stroke-dashoffset":"0","stroke-linecap":"round",transform:"rotate(-90 18 18)"},null,10,W0)])),sl(se)==="completed"||sl(se)==="uploaded"?(a.openBlock(),a.createElementBlock("div",K0,[a.createVNode(xe,{class:"check-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(el.check_default))]),_:1})])):a.createCommentVNode("",!0),sl(se)==="failed"?(a.openBlock(),a.createElementBlock("div",Y0,[a.createVNode(xe,{class:"error-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(el.close_default))]),_:1})])):a.createCommentVNode("",!0)],2),a.createElementVNode("div",{class:"file-delete-btn",onClick:Sa=>ct(Da)},[a.createVNode(xe,null,{default:a.withCtx(()=>[a.createVNode(a.unref(el.close_default))]),_:1})],8,G0)]),a.createElementVNode("div",J0,a.toDisplayString(se.name||"文件名123"),1)])}),128))]),Xe.value.length>0?(a.openBlock(),a.createElementBlock("div",X0,[a.createVNode(he,{onClick:pe,class:"ocr-start-recognize-btn",disabled:da.value||Xe.value.length===0,size:"default"},{default:a.withCtx(()=>f[36]||(f[36]=[a.createTextVNode("开始识别 ")])),_:1,__:[36]},8,["disabled"])])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),W.value===1?(a.openBlock(),a.createElementBlock("div",Z0,[a.createVNode(Ve,{percentage:Ce.value,"stroke-width":8},null,8,["percentage"])])):a.createCommentVNode("",!0),W.value===2?(a.openBlock(),a.createElementBlock("div",Q0,[a.createElementVNode("div",e3,[a.createVNode(Me,{title:"请核对识别结果。",type:"info",closable:!1,"show-icon":""})]),a.createElementVNode("div",a3,[a.createVNode(ta,{data:Fa.value,border:"",stripe:"","max-height":"400",style:{width:"100%"}},{default:a.withCtx(()=>[a.createVNode(Ue,{type:"index",label:"序号",width:"60",fixed:""}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(me.value,se=>(a.openBlock(),a.createBlock(Ue,{key:se.prop,prop:se.prop,"min-width":se.minWidth||230,"class-name":se.isAccuracy?"accuracy-column":""},{header:a.withCtx(()=>[a.createElementVNode("div",l3,[a.createElementVNode("span",null,a.toDisplayString(se.label),1)])]),default:a.withCtx(({row:Da,$index:ua})=>{var Sa,oe,E;return[se.isAccuracy?(a.openBlock(),a.createElementBlock("span",{key:0,class:"accuracy-value",style:a.normalizeStyle({color:nl(Da[se.prop]),fontWeight:500})},a.toDisplayString(za(Da[se.prop])),5)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[Za.value!==ua?(a.openBlock(),a.createElementBlock("span",r3,a.toDisplayString(Da[se.prop]),1)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Ja(se.prop)),{key:1,modelValue:Da[se.prop],"onUpdate:modelValue":$e=>Da[se.prop]=$e,size:"small",placeholder:"请输入"+se.label,content:((Sa=fl(se.prop))==null?void 0:Sa.contents)??((oe=fl(se.prop))==null?void 0:oe.options)??[],optionUrl:(E=fl(se.prop))==null?void 0:E.optionUrl,onChange:$e=>Ze(ua,se.prop,$e),onFocus:$e=>cl.value=se.prop,onBlur:f[8]||(f[8]=$e=>cl.value="")},null,40,["modelValue","onUpdate:modelValue","placeholder","content","optionUrl","onChange","onFocus"]))],64))]}),_:2},1032,["prop","min-width","class-name"]))),128)),a.createVNode(Ue,{label:"编辑",width:"80",fixed:"right"},{default:a.withCtx(({$index:se})=>[Za.value===se?(a.openBlock(),a.createBlock(xe,{key:0,class:"ocr-edit-icon editing",style:{"margin-left":"12px"},onClick:a.withModifiers(Da=>Qa(se),["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(el.check_default))]),_:2},1032,["onClick"])):(a.openBlock(),a.createBlock(M,{key:1,name:"edit_101",class:"ocr-edit-icon",onClick:a.withModifiers(Da=>Qa(se),["stop"])},null,8,["onClick"]))]),_:1})]),_:1},8,["data"])])])):a.createCommentVNode("",!0),W.value===3?(a.openBlock(),a.createElementBlock("div",n3,[a.createVNode(xe,{size:"32",class:"ocr-success-icon"},{default:a.withCtx(()=>[a.createVNode(a.unref(el.check_default))]),_:1}),f[37]||(f[37]=a.createElementVNode("div",{class:"ocr-success-text"},"文件提交成功",-1))])):a.createCommentVNode("",!0)]),a.createVNode($a,{ref:"ocrUploadRef","file-list":Xe.value,"onUpdate:fileList":f[9]||(f[9]=se=>Xe.value=se),multiple:"",action:"","auto-upload":!1,limit:20,accept:"image/*,application/pdf","on-change":q,"show-file-list":!1,class:"ocr-upload-input",style:{display:"none"}},null,8,["file-list"])]),footer:a.withCtx(()=>[W.value!==3?(a.openBlock(),a.createElementBlock("div",t3,[a.createVNode(he,{onClick:Ir,class:"ocr-start-recognize-btn",disabled:W.value===1||da.value},{default:a.withCtx(()=>f[39]||(f[39]=[a.createTextVNode(" 上一步 ")])),_:1,__:[39]},8,["disabled"]),a.createVNode(he,{onClick:mr,class:"ocr-start-recognize-btn",disabled:da.value},{default:a.withCtx(()=>f[40]||(f[40]=[a.createTextVNode(" 下一步 ")])),_:1,__:[40]},8,["disabled"])])):a.createCommentVNode("",!0)]),_:1},8,["visible"]),a.createVNode(wf,{visible:st.value,onConfirm:Zo,onCancel:f[10]||(f[10]=se=>st.value=!1)},null,8,["visible"]),a.createVNode(od,{visible:aa.value,"onUpdate:visible":f[11]||(f[11]=se=>aa.value=se),versions:ca.value},null,8,["visible","versions"]),a.createVNode(Wu,{visible:ul.value,"onUpdate:visible":f[12]||(f[12]=se=>ul.value=se),images:Wl.value,"default-image-name":ql.value,"field-meta":Za.value!==null?((Pa=Fa.value[Za.value])==null?void 0:Pa.__ocrFieldMeta)||{}:{},"focused-field-name":cl.value,onClose:f[13]||(f[13]=se=>ul.value=!1),class:"ocr-img-preview-dialog"},null,8,["visible","images","default-image-name","field-meta","focused-field-name"]),a.createVNode(bd,{visible:Pl.value,"onUpdate:visible":f[14]||(f[14]=se=>Pl.value=se),candidates:Hl.value,"name-prop":un.value,"mfr-prop":Jr.value,columns:Ee.value,onSubmit:tn,onPreviewFile:en},null,8,["visible","candidates","name-prop","mfr-prop","columns"]),a.createVNode(Ed,{visible:Be.value,"onUpdate:visible":f[15]||(f[15]=se=>Be.value=se),ocrPreviewData:Fa.value,"onUpdate:ocrPreviewData":f[16]||(f[16]=se=>Fa.value=se),ocrSelectedFields:tl.value,"onUpdate:ocrSelectedFields":f[17]||(f[17]=se=>tl.value=se),ocrPreviewColumns:me.value,onConfirm:ge,onFieldChange:f[18]||(f[18]=({rowIndex:se,prop:Da,value:ua})=>Ze(se,Da,ua))},null,8,["visible","ocrPreviewData","ocrSelectedFields","ocrPreviewColumns"]),a.createVNode(vr.ssDialog,{title:i.title,visible:i.show,width:i.width,onBeforeDestroy:C},{default:a.withCtx(()=>[a.createElementVNode("div",o3,[a.createVNode(pl.ssForm,{rowContents:i==null?void 0:i.contents,formRules:i==null?void 0:i.formRules,showOperator:!1,buttonValue:i.buttonValue,isEdit:Qe.value,isStartJustify:!1,onOnButtonClick:V},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"]),a.createVNode(vr.ssDialog,{title:o.title,visible:o.show,width:o.width,alignCenter:!0,onBeforeDestroy:p},{header:a.withCtx(()=>[a.createVNode(Ta,{size:"small",type:"danger",style:{width:"100%"}},{default:a.withCtx(()=>f[41]||(f[41]=[a.createTextVNode("(选择【覆盖】,可能会影响到原数据的引用关系;选择【取消】将会放弃重复数据的导入。请谨慎操作!)")])),_:1,__:[41]})]),footer:a.withCtx(()=>[a.createElementVNode("div",i3,[a.createVNode(Ta,{size:"small",style:{width:"100%","text-align":"left"},type:"info"},{default:a.withCtx(()=>[a.createTextVNode("引用模块:"+a.toDisplayString(En.value||"暂无"),1)]),_:1}),a.createElementVNode("div",s3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o==null?void 0:o.buttonValue,se=>(a.openBlock(),a.createBlock(he,{key:se==null?void 0:se.label,style:a.normalizeStyle({background:se==null?void 0:se.background,color:se==null?void 0:se.color}),onClick:Da=>y(se==null?void 0:se.value)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(se==null?void 0:se.label),1)]),_:2},1032,["style","onClick"]))),128))])])]),default:a.withCtx(()=>[a.createVNode(Wp,{columns:o==null?void 0:o.columns,tableData:o==null?void 0:o.tableData},{content:a.withCtx(({row:se,item:Da,slotData:ua,scope:Sa,column:oe,columnProp:E,$index:$e})=>[a.createTextVNode(a.toDisplayString((se==null?void 0:se[(oe==null?void 0:oe.prop)||(oe==null?void 0:oe.label)])||(ua==null?void 0:ua[oe==null?void 0:oe.property])),1)]),_:1},8,["columns","tableData"])]),_:1},8,["title","visible","width"])])}}},vc=Ul._export_sfc(u3,[["__scopeId","data-v-c5039ec7"]]),d3={class:"static-form-card"},p3={key:0,class:"static-form-body"},f3=["onClick"],h3={key:1},v3=a.defineComponent({__name:"index",props:{itemData:{default:()=>[]},fields:{default:()=>[]},compName:{default:""},title:{default:""},disabled:{type:Boolean,default:!1},textSize:{default:void 0},textColor:{default:void 0}},setup(l){const r=l,n=S=>{switch(S){case"占用":return"warning";case"注销":return"info";case"损坏":return"danger";case"可用":return"success";default:return""}},t=a.computed(()=>{var j;const S=(j=r.itemData)==null?void 0:j.find(A=>(A==null?void 0:A.key)==="formContent"),z=(S==null?void 0:S.contents)||[];return(r.fields&&r.fields.length>0?r.fields:z).filter(A=>!(A!=null&&A.isFormColHidden)&&(A==null?void 0:A.label)).map(A=>{let N=A==null?void 0:A.value;Array.isArray(N)&&(N=N.map(T=>T==null?"":typeof T=="object"?T.label??T.value??T.name??JSON.stringify(T):String(T)).filter(Boolean).join(",")),N!=null&&typeof N=="object"&&(N=N.label??N.value??N.name??JSON.stringify(N));const Y=A.label??"",b=N==null||N===""?"-":String(N),L=Y==="使用状态";return{label:Y,value:b,isStatus:L,tagType:L?n(b):"",width:A.width??1,field:A}})}),s=a.ref(null),c=S=>{if(Array.isArray(S)&&S.length>=3){const[z,w,j,A]=S;return A!==void 0?`rgba(${z}, ${w}, ${j}, ${A})`:`rgb(${z}, ${w}, ${j})`}if(typeof S=="string"){const z=S.trim();if(z.startsWith("[")&&z.endsWith("]")){const w=z.slice(1,-1).split(",").map(j=>Number(j.trim()));if(w.length>=3&&w.every(j=>!Number.isNaN(j))){const[j,A,N,Y]=w;return Y!==void 0?`rgba(${j}, ${A}, ${N}, ${Y})`:`rgb(${j}, ${A}, ${N})`}}return z}},g=a.computed(()=>{const S=Number(r==null?void 0:r.textSize),z=c(r==null?void 0:r.textColor),w={},j={},A={},N={};return!Number.isNaN(S)&&S&&(w.fontSize=`${S}px`,j.fontSize=`${S+1}px`,A.fontSize=`${S}px`,N.fontSize=`${S}px`),z&&(j.color=z,A.color=z,N.color=z),{item:w,label:j,value:A,empty:N}}),h=S=>pl.getComponent(S),v=S=>{if(!S)return;const z=S.querySelector("input, textarea, .el-input__inner");z&&typeof z.focus=="function"&&z.focus()},m=(S,z,w)=>{r.disabled||(s.value=z,a.nextTick(()=>{v(w.currentTarget)}))},u=()=>{s.value=null},_=S=>{const z=S!=null&&S.width&&S.width>0?S.width:1,j=`calc((100% - ${(z-1)*48}px) / ${z})`;return{flex:`0 0 ${j}`,maxWidth:j,minWidth:"0",boxSizing:"border-box"}};return(S,z)=>{const w=a.resolveComponent("el-tag");return a.openBlock(),a.createElementBlock("div",d3,[t.value.length?(a.openBlock(),a.createElementBlock("div",p3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(j,A)=>{var N,Y,b,L,T,x,k,$;return a.openBlock(),a.createElementBlock("div",{key:A,class:"static-form-item",style:a.normalizeStyle({..._(j),...g.value.item})},[a.createElementVNode("div",{class:"static-form-label",style:a.normalizeStyle(g.value.label)},a.toDisplayString(j.label)+": ",5),a.createElementVNode("div",{class:"static-form-value",style:a.normalizeStyle(g.value.value),onClick:U=>m(j,A,U)},[s.value===A&&j.field?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(h(((N=j.field)==null?void 0:N.type)??"Input")),{key:0,modelValue:j.field.value,"onUpdate:modelValue":U=>j.field.value=U,isEdit:!0,disabled:(Y=j.field)==null?void 0:Y.disabled,content:((b=j.field)==null?void 0:b.contents)??[],optionUrl:j.field,originalValue:(L=j.field)==null?void 0:L.value,config:(T=j.field)==null?void 0:T.config,configModel:((x=j.field)==null?void 0:x.prop)??((k=j.field)==null?void 0:k.name),selectedTagList:(($=j.field)==null?void 0:$.selectValue)??[],onBlur:u,onBlurChange:u},null,40,["modelValue","onUpdate:modelValue","disabled","content","optionUrl","originalValue","config","configModel","selectedTagList"])):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[j.isStatus?(a.openBlock(),a.createBlock(w,{key:0,type:j.tagType,size:"Default",effect:"plain"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(j.value??"-"),1)]),_:2},1032,["type"])):(a.openBlock(),a.createElementBlock("span",h3,a.toDisplayString(j.value??"-"),1))],64))],12,f3)],4)}),128))])):(a.openBlock(),a.createElementBlock("div",{key:1,class:"static-form-empty",style:a.normalizeStyle(g.value.empty)}," 暂无数据 ",4))])}}}),mc=Ul._export_sfc(v3,[["__scopeId","data-v-351e0bf9"]]),m3={class:"form-content"},y3={title:"选择标签"},g3={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},b3={class:"col-operate-wrap"},k3={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},x3={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compName:{type:String,default:""},allMapContents:{type:Object},config:{type:Object,default:()=>{}}},emits:["change","contentChange","routeUrl","clickTrigger"],setup(l,{emit:r}){const n=()=>{g.value=!1,h.value=!1,v.value=[]},t=l;a.computed(()=>{var Qe;const ve=(Qe=ye.value)==null?void 0:Qe.split("/");return(ve==null?void 0:ve.some(Fe=>(Fe==null?void 0:Fe.includes("updateLoading"))||(Fe==null?void 0:Fe.includes("loading"))))?!1:Z.value==="view"});const s=r,c=a.ref([]),g=a.ref(!1),h=a.ref(!1),v=a.ref([]),{getFileExtension:m}=go.useThreeSystem(),u=a.ref(),_=a.ref(!1),S=a.ref(!1),z=I.useUnit(I.pinia),{chooseTitle:w}=I.storeToRefs(z),j=a.ref([]),A=a.ref(),N=a.ref(!1),Y=a.ref([]),b=Xs(I.pinia),L=ki(I.pinia),T=a.ref(!1),x=a.ref(),k=a.ref(),$=a.ref(),U=I.useLoginState(I.pinia),{loginUserInfo:X}=I.storeToRefs(U),be=a.ref(),ze=a.ref(!0),Ee=I.useModelComp(I.pinia),{tableViewContents:ne,itemData:ke,isEdit:Z,routeToChildPath:de,lockingPage:Ke}=I.storeToRefs(Ee),Na=a.ref(null),te=a.ref(!1),D=a.ref(!1),le=I.useMenuState(),{activeMenuPath:ye}=I.storeToRefs(le),ue=sa.useOriginalState(I.pinia),{originalPath:Ne}=I.storeToRefs(ue),{compType:pa,hasEditable:wa}=js.useRole(),ja=()=>!wa(t.config,{type:pa.FORM});a.computed(()=>ye.value==="设备管理/试验设备"&&t.compName==="设备概要");const ee=a.ref([]),ea=a.ref([{label:"编辑",value:"operable",checked:!1},{label:"禁用",value:"disabled",checked:!1}]),Pe=async ve=>{D.value=ve,await Va("disabled",null,ve,!0)},xa=async ve=>{await Va("operable",null,ve,!0)};a.watch(()=>ye.value,async()=>{c.value=[],v.value=[]},{deep:!0,immediate:!0});const He=()=>{a.nextTick(()=>{qa()})},Te=ve=>{var Je;c.value=(Je=c.value)==null?void 0:Je.map(Qe=>({...Qe,isFormColHidden:!(ve!=null&&ve.includes(Qe.label))}))};a.onUnmounted(()=>{Na.value=null});const Re=ve=>{s("clickTrigger",ve)},Ye=async ve=>{var Je,Qe,Fe,_a,Le,va;if(ve===""){let re="";(Je=c.value)==null||Je.forEach(De=>{De!=null&&De.isMain&&(re=De==null?void 0:De.value)});let Se=await sa.getItemData(de.value,sessionStorage.getItem("systemKey"),"");re=((va=(Le=(_a=(Fe=(Qe=Se==null?void 0:Se[0])==null?void 0:Qe.compData)==null?void 0:Fe.find(De=>(De==null?void 0:De.key)==="mainRouters"))==null?void 0:_a.contents)==null?void 0:Le[0])==null?void 0:va.routerContent)+Ne.value+re;let je=await sa.getItemData(re,sessionStorage.getItem("systemKey"),"");N.value=!0,Y.value=je==null?void 0:je.filter(De=>(De==null?void 0:De.comp)!=="methodButton"),s("routeUrl",Y.value)}},qa=()=>{var Je;const ve=(Je=Na.value)==null?void 0:Je.$el;ve&&La.Sortable.create(ve,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:Qe=>{const{oldIndex:Fe,newIndex:_a}=Qe;if(Fe===_a)return;const Le=c.value.splice(Fe,1)[0];c.value.splice(_a,0,Le)}})},Va=async(ve,Je,Qe,Fe=!1)=>{try{Ee.setRefreshCurStructure(!1)}catch{el.ElMessage.error("编辑处理失败")}},P=async(ve,Je)=>{await Va()},F=async(ve,Je)=>{ve&&await Va()},J=async(ve,Je,Qe)=>{await Va(Je,Qe,ve,!1)},ie=(ve,Je)=>{be.value===Je?ze.value=!1:ze.value=!0,be.value=Je==null?void 0:Je.changeProp},ce=async ve=>{var Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa,Ae;let Je=[];if((Qe=ve==null?void 0:ve.toString())!=null&&Qe.includes(".urdf")){if(ve.includes(",")){el.ElMessage.error("当前版本仅允许单个urdf预览!");return}v.value=[{url:ve,extension:m(ve)}],h.value=!0,g.value=!0;return}if((Fe=ve==null?void 0:ve.toString())!=null&&Fe.includes(".stl")||(_a=ve==null?void 0:ve.toString())!=null&&_a.includes(".STL")||(Le=ve==null?void 0:ve.toString())!=null&&Le.includes(".obj")||(va=ve==null?void 0:ve.toString())!=null&&va.includes(".mtl")){const Ea=((re=ve==null?void 0:ve.toString())==null?void 0:re.split(",")).map(Ge=>({url:Ge,extension:m(Ge)}));v.value=Ea,h.value=!1,g.value=!0;return}if((Se=ve==null?void 0:ve.toString())!=null&&Se.includes(".stl")||(K=ve==null?void 0:ve.toString())!=null&&K.includes(".STL")||(je=ve==null?void 0:ve.toString())!=null&&je.includes(".obj")||(De=ve==null?void 0:ve.toString())!=null&&De.includes(".mtl")){let we,Ea=[],Ge={};if(Array.isArray(ve)?we=ve:we=ve==null?void 0:ve.split(","),we==null||we.forEach(ol=>{ol.includes(".mtl")?Ea.push(ol):Ge.blob=Ge.blob?Ge.blob+","+ol:ol}),(Ea==null?void 0:Ea.length)>0&&(Ge.mtlBlobs=Ea),(Ba=(Ma=Object.values(Ge))==null?void 0:Ma[0])!=null&&Ba.includes("http:"))Je.push(Ge);else{const ol=new Blob([Ge.blob],{type:"application/octet-stream;charset=UTF-8"});let Sl=URL.createObjectURL(ol),Nl="";(Ua=ve==null?void 0:ve.split("/"))==null||Ua.forEach((Ra,al)=>{var ga;al===((ga=ve==null?void 0:ve.split("/"))==null?void 0:ga.length)-1&&(Nl=Ra)}),(Aa=Ge.blob)!=null&&Aa.includes(".stl")&&(Nl=(Nl==null?void 0:Nl.replaceAll(">",""))+".urdf"),A.value=[{name:Nl,blobUrl:Sl}],S.value=!0}}else{const we=I.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),Ea=await el.axios.get(ve,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{we.close()}),Ge=new Blob([Ea.data],{type:"application/octet-stream;charset=UTF-8"});let ol=URL.createObjectURL(Ge),Sl="";(Ae=ve==null?void 0:ve.split("/"))==null||Ae.forEach((Nl,Ra)=>{var al;Ra===((al=ve==null?void 0:ve.split("/"))==null?void 0:al.length)-1&&(Sl=Nl)}),A.value=[{name:Sl,blobUrl:ol}],S.value=!0}(Je==null?void 0:Je.length)>0&&L.setBlobUrls(Je)},ma=()=>{S.value=!1},na=ve=>{var Le,va,re,Se;const Je=(va=(Le=pl.safeClone(t.itemData))==null?void 0:Le.find(K=>(K==null?void 0:K.key)==="formContent"))==null?void 0:va.contents,Qe=pl.safeClone(ve.content);let Fe={};Qe&&((re=Object.values(Qe))==null?void 0:re.length)>0&&((Se=Object.values(Qe))==null||Se.forEach((K,je)=>{Fe[Je[je].key]=K}));const _a={content:Fe,index:t==null?void 0:t.index,buttonName:ve==null?void 0:ve.buttonName};s("change",_a)};a.computed(()=>"http://222.92.178.198:62001");const Ie=async ve=>{var Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl,Ra,al,ga,qe,rl;if(!ve)return;(Ba=(Ma=t==null?void 0:t.itemData)==null?void 0:Ma.find(da=>(da==null?void 0:da.key)==="parentFormPath"))==null||Ba.contents;let Je=ne.value;(Je==null?void 0:Je.length)>0&&(Je=Je==null?void 0:Je.map(da=>{var oa,aa,ca,W;let Xe=(oa=da==null?void 0:da.key)==null?void 0:oa.split("/");return(t==null?void 0:t.compName)===(Xe==null?void 0:Xe[0])&&(aa=c.value)!=null&&aa.find(la=>(la==null?void 0:la.prop)===(Xe==null?void 0:Xe[1]))&&(da.value=(W=(ca=c.value)==null?void 0:ca.find(la=>(la==null?void 0:la.prop)===(Xe==null?void 0:Xe[1])))==null?void 0:W.value),da}),Ee.setTableViewContents(Je));const Qe=pl.safeClone(t.itemData);let Fe=Qe==null?void 0:Qe.map(da=>{var Xe;return(da==null?void 0:da.key)==="formContent"&&((Xe=da.contents)==null||Xe.map((oa,aa)=>{var ca,W,la,ka,Ce,Be,Fa,me,fl,Ja,kl,Ha,tl,Za,cl,ul,Wl,ql,Pl;return oa.type=(W=(ca=c.value)==null?void 0:ca.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:W.type,oa.options=oa!=null&&oa.options?oa.options:((Ce=(ka=(la=oa==null?void 0:oa.key)==null?void 0:la.split("$"))==null?void 0:ka[1])==null?void 0:Ce.length)>0?(fl=(me=_u((Fa=(Be=oa==null?void 0:oa.key)==null?void 0:Be.split("$"))==null?void 0:Fa[1]))==null?void 0:me.split(","))==null?void 0:fl.map(Hl=>({label:Hl,value:Hl})):[],(Ja=oa==null?void 0:oa.key)!=null&&Ja.includes("$")&&(oa.key=(Ha=(kl=oa==null?void 0:oa.key)==null?void 0:kl.split("$"))==null?void 0:Ha[0]),oa.signature=(Za=(tl=c.value)==null?void 0:tl.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:Za.signature,oa.isLoginUser=(ul=(cl=c.value)==null?void 0:cl.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:ul.isLoginUser,oa.value=(Wl=Object.values(ve))==null?void 0:Wl[aa],oa.isFormColHidden=(Pl=(ql=c.value)==null?void 0:ql.find(Hl=>(Hl==null?void 0:Hl.prop)===(oa==null?void 0:oa.prop)))==null?void 0:Pl.isFormColHidden,oa})),da}),_a=c.value,Le=(Aa=(Ua=pl.safeClone(Fe))==null?void 0:Ua.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:Aa.contents;if(_a=_a==null?void 0:_a.map(da=>{var Xe,oa;return(da==null?void 0:da.type)==="Select"&&((Xe=da==null?void 0:da.allSelectionContents)==null?void 0:Xe.length)>0&&(da.contactValue=ve),da.value=(oa=Le==null?void 0:Le.find((aa,ca)=>((aa==null?void 0:aa.id)??ca)===(da==null?void 0:da.id)))==null?void 0:oa.value,da}),!ze.value){s("contentChange",{contents:Fe,index:t.index});return}let va="",re=(Ea=(we=(Ae=pl.safeClone(Fe))==null?void 0:Ae.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:we.contents)==null?void 0:Ea.find((da,Xe)=>{var oa,aa,ca;return(da==null?void 0:da.label)===be.value||Xe.toString()===((ca=(aa=(oa=be.value)==null?void 0:oa.split("t"))==null?void 0:aa[1])==null?void 0:ca.toString())}),Se=(Ge=re==null?void 0:re.optionUrl)==null?void 0:Ge.menuSelect,K=!0;if((Nl=(Sl=(ol=pl.safeClone(Fe))==null?void 0:ol.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:Sl.contents)==null||Nl.forEach(da=>{var Xe,oa,aa,ca,W,la;K&&((aa=(oa=(Xe=da==null?void 0:da.optionUrl)==null?void 0:Xe.groupSelect)==null?void 0:oa[1])!=null&&aa.includes("["))&&(va=(W=(ca=da==null?void 0:da.optionUrl)==null?void 0:ca.groupSelect)==null?void 0:W[1],JSON.stringify(Se)===JSON.stringify((la=da==null?void 0:da.optionUrl)==null?void 0:la.menuSelect)&&(K=!1))}),(Ra=re==null?void 0:re.optionUrl)!=null&&Ra.menuSelect&&ze.value){let da=await fi(re),Xe,oa=(al=re==null?void 0:re.optionUrl)==null?void 0:al.menuSelect;if(da==null||da.forEach(aa=>{var ca,W,la,ka,Ce,Be,Fa,me,fl,Ja;va===((W=(ca=re==null?void 0:re.optionUrl)==null?void 0:ca.groupSelect)==null?void 0:W[1])&&((Ce=(ka=(la=re==null?void 0:re.optionUrl)==null?void 0:la.groupSelect)==null?void 0:ka[1])!=null&&Ce.includes("["))&&((Ja=pl.safeClone(aa))==null?void 0:Ja[(fl=(me=(Fa=(Be=re==null?void 0:re.optionUrl)==null?void 0:Be.groupSelect)==null?void 0:Fa[1])==null?void 0:me.replaceAll("[",""))==null?void 0:fl.replaceAll("]","")])===(re==null?void 0:re.value)&&(Xe=aa)}),Xe){let aa=pl.safeClone(_a);aa=aa==null?void 0:aa.map(W=>{var la,ka,Ce,Be,Fa,me,fl,Ja,kl,Ha,tl;return(Xe!=null&&Xe[W==null?void 0:W.label]||Xe!=null&&Xe[(Be=(Ce=(ka=(la=W==null?void 0:W.optionUrl)==null?void 0:la.groupSelect)==null?void 0:ka[1])==null?void 0:Ce.replaceAll("[",""))==null?void 0:Be.replaceAll("]","")])&&((fl=(me=(Fa=W==null?void 0:W.optionUrl)==null?void 0:Fa.groupSelect)==null?void 0:me[1])!=null&&fl.includes("["))&&oa!=null&&oa.every(Za=>{var cl,ul;return(ul=(cl=W==null?void 0:W.optionUrl)==null?void 0:cl.menuSelect)==null?void 0:ul.includes(Za)})&&(W.value=(Xe==null?void 0:Xe[W==null?void 0:W.label])||(Xe==null?void 0:Xe[(tl=(Ha=(kl=(Ja=W==null?void 0:W.optionUrl)==null?void 0:Ja.groupSelect)==null?void 0:kl[1])==null?void 0:Ha.replaceAll("[",""))==null?void 0:tl.replaceAll("]","")]),Array.isArray(W.value)&&W.value.every(Za=>(Za==null?void 0:Za.url)&&(Za==null?void 0:Za.name))&&(W.type="Upload")),W}),aa=aa==null?void 0:aa.map(W=>{var la,ka,Ce;return(la=W==null?void 0:W.optionUrl)!=null&&la.oldMenuSelect&&(W.optionUrl.menuSelect=(Ce=(ka=pl.safeClone(W))==null?void 0:ka.optionUrl)==null?void 0:Ce.oldMenuSelect),W}),c.value=pl.safeClone(aa);let ca=pl.safeClone(aa);ca=ca==null?void 0:ca.map(W=>{var la,ka,Ce,Be,Fa,me;return(ka=(la=W==null?void 0:W.optionUrl)==null?void 0:la.menuSelect)!=null&&ka.some(fl=>fl==null?void 0:fl.includes("["))&&(W.optionUrl.oldMenuSelect=(Be=(Ce=pl.safeClone(W))==null?void 0:Ce.optionUrl)==null?void 0:Be.menuSelect,W.optionUrl.menuSelect=(me=(Fa=W==null?void 0:W.optionUrl)==null?void 0:Fa.menuSelect)==null?void 0:me.map(fl=>{var Ja,kl,Ha,tl;if(fl!=null&&fl.includes("[")){let Za=(kl=(Ja=fl==null?void 0:fl.replaceAll("[","").replaceAll("]",""))==null?void 0:Ja.split(":"))==null?void 0:kl[1];fl=(tl=(Ha=pl.safeClone(aa))==null?void 0:Ha.find(cl=>(cl==null?void 0:cl.label)===Za))==null?void 0:tl.value}return fl})),W}),c.value=ca}else c.value=_a;Fe=Fe==null?void 0:Fe.map(aa=>{var ca;return(aa==null?void 0:aa.key)==="formContent"&&(aa.contents=(ca=aa.contents)==null?void 0:ca.map(W=>{var la,ka,Ce,Be;return W.value=((ka=(la=c.value)==null?void 0:la.find(Fa=>(Fa==null?void 0:Fa.label)===(W==null?void 0:W.key)))==null?void 0:ka.value)??(W==null?void 0:W.value),W.type=((Be=(Ce=c.value)==null?void 0:Ce.find(Fa=>(Fa==null?void 0:Fa.prop)===(W==null?void 0:W.key)))==null?void 0:Be.type)??(W==null?void 0:W.type),W})),aa})}ze.value=!1,s("contentChange",{contents:Fe,index:t.index});let je=[],De=[];if((qe=pl.safeClone((ga=Fe==null?void 0:Fe.find(da=>(da==null?void 0:da.key)==="formContent"))==null?void 0:ga.contents))==null||qe.forEach(da=>{var Xe;Array.isArray(da==null?void 0:da.value)&&((Xe=da==null?void 0:da.value)!=null&&Xe.find(oa=>{var aa;return(aa=oa==null?void 0:oa.url)==null?void 0:aa.includes(".obj")}))&&(De=da==null?void 0:da.value)}),(De==null?void 0:De.length)>0){const da=(rl=pl.safeClone(De))==null?void 0:rl.filter(Xe=>{var oa;return(oa=Xe==null?void 0:Xe.url)==null?void 0:oa.includes(".obj")});da==null||da.forEach(Xe=>{var aa,ca,W,la;const oa=(aa=De==null?void 0:De.filter(ka=>{var Ce;return(ka==null?void 0:ka.name)===(Xe==null?void 0:Xe.name)&&((Ce=ka==null?void 0:ka.url)==null?void 0:Ce.includes(".mtl"))}))==null?void 0:aa.map(ka=>ka==null?void 0:ka.url);je.push({objUrl:Xe==null?void 0:Xe.url,mtlUrls:((ca=De==null?void 0:De.filter(ka=>{var Ce;return(ka==null?void 0:ka.name)===(Xe==null?void 0:Xe.name)&&((Ce=ka==null?void 0:ka.url)==null?void 0:Ce.includes(".mtl"))}))==null?void 0:ca.length)===1?(la=(W=De==null?void 0:De.filter(ka=>{var Ce;return(ka==null?void 0:ka.name)===(Xe==null?void 0:Xe.name)&&((Ce=ka==null?void 0:ka.url)==null?void 0:Ce.includes(".mtl"))}))==null?void 0:W[0])==null?void 0:la.url:oa})}),L.setObjUrl(je)}},_e=(ve,Je,Qe)=>{let Fe="";const _a=Je==null?void 0:Je.map(Le=>{var va;return(va=Le==null?void 0:Le.value)==null?void 0:va.pageData});return _a==null||_a.forEach(Le=>{var va;(Le==null?void 0:Le.name)===(ve==null?void 0:ve[0])&&((va=Le==null?void 0:Le.compData)==null||va.forEach(re=>{var Se;(re==null?void 0:re.key)==="formContent"&&((Se=re==null?void 0:re.contents)==null||Se.forEach(K=>{var je;(K==null?void 0:K.prop)===(ve==null?void 0:ve[1])&&(Fe=(K==null?void 0:K.value)===""?sa.judgeContents((je=pl.safeClone(K))==null?void 0:je.optionUrl,Qe):K==null?void 0:K.value)}))}))}),Fe},Ca=(ve,Je,Qe,Fe)=>{var re,Se;let _a="",Le="";(re=pl.safeClone(Je))==null||re.forEach((K,je)=>{K!=null&&K.includes("[")?Le=Le+Ne.value+ve[je]:Le=Le===""?Le+K:Le+"/"+K});let va=(Se=Fe[Le])==null?void 0:Se.map(K=>{var je;return(je=K==null?void 0:K.value)==null?void 0:je.pageData});return va==null||va.forEach(K=>{var je;(K==null?void 0:K.name)===(Qe==null?void 0:Qe[0])&&((je=K==null?void 0:K.compData)==null||je.forEach(De=>{var Ma;(De==null?void 0:De.key)==="formContent"&&((Ma=De==null?void 0:De.contents)==null||Ma.forEach(Ba=>{(Ba==null?void 0:Ba.prop)===(Qe==null?void 0:Qe[1])&&(_a=Ba==null?void 0:Ba.value)}))}))}),_a};return a.watch(()=>t.itemData,async()=>{var je,De,Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl,Ra,al,ga,qe,rl,da,Xe,oa;const ve=(je=t.itemData)==null?void 0:je.find(aa=>(aa==null?void 0:aa.key)==="formContent"),Je=(De=pl.safeClone(t.itemData))==null?void 0:De.find(aa=>(aa==null?void 0:aa.key)==="formButton"),Qe=(Ma=pl.safeClone(t.itemData))==null?void 0:Ma.find(aa=>(aa==null?void 0:aa.key)==="formFlex"),Fe=(Ba=pl.safeClone(t.itemData))==null?void 0:Ba.find(aa=>(aa==null?void 0:aa.key)==="formWrap"),_a=(Ua=pl.safeClone(t.itemData))==null?void 0:Ua.find(aa=>(aa==null?void 0:aa.key)==="enableWrap"),Le=(Aa=pl.safeClone(t.itemData))==null?void 0:Aa.find(aa=>(aa==null?void 0:aa.key)==="textSize"),va=(Ae=pl.safeClone(t.itemData))==null?void 0:Ae.find(aa=>(aa==null?void 0:aa.key)==="textRGBA");(Fe==null?void 0:Fe.contents)==="纵向"?_.value=!1:_.value=!0;const re=Number(Le==null?void 0:Le.contents);x.value=Number.isNaN(re)?void 0:re,k.value=va==null?void 0:va.contents;const Se=_a==null?void 0:_a.contents;if(Se===void 0?T.value=at.BLOCK:typeof Se=="boolean"?T.value=Se?at.ORDINARY:at.BLOCK:T.value=Se,$.value=typeof(Qe==null?void 0:Qe.contents)!="boolean"?!(!(Qe!=null&&Qe.contents)===""||((we=Qe==null?void 0:Qe.contents)==null?void 0:we.toUpperCase())==="VERTICAL"):Qe==null?void 0:Qe.contents,((Ea=ve==null?void 0:ve.contents)==null?void 0:Ea.length)>0&&Array.isArray(ve==null?void 0:ve.contents)){let aa=t.allMapContents;const ca=(ol=(Ge=pl.safeClone(ve))==null?void 0:Ge.contents)==null?void 0:ol.map((me,fl)=>{var kr,wr,Sr,un,Jr,dn,Xr,qr,pn,tn,Dr,Zr,Br;let Ja=(me==null?void 0:me.label)??(me==null?void 0:me.key)??"";me==null||me.type;let kl=(me==null?void 0:me.options)??[];if((kr=me==null?void 0:me.key)!=null&&kr.includes("$")&&(Ja=(wr=pl.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:wr[0],((un=(Sr=pl.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:Sr[1])==null?void 0:un.length)>0)){const[Il,Wr]=(dn=(Jr=pl.safeClone(me==null?void 0:me.key).split("$"))==null?void 0:Jr[1])==null?void 0:dn.split(/[()]/);(Xr=sa.FormType.find(Nr=>(Nr==null?void 0:Nr.key)===Il))==null||Xr.value,((qr=Wr==null?void 0:Wr.split(","))==null?void 0:qr.length)>0&&(kl=(pn=Wr==null?void 0:Wr.split(","))==null?void 0:pn.map(Nr=>({label:Nr,value:Nr})))}let Ha=me==null?void 0:me.options;((tn=me==null?void 0:me.optionUrl)==null?void 0:tn.selectRelateType)==="自定义绑定"&&(Ha=(Zr=(Dr=me==null?void 0:me.optionUrl)==null?void 0:Dr.defaultSelect)==null?void 0:Zr.map(Il=>({label:Il,value:Il})));let tl=(me==null?void 0:me.menuPath)??[],Za=(me==null?void 0:me.groups)??[],cl=(me==null?void 0:me.columns)??[],ul=!1,Wl=(me==null?void 0:me.isFormColHidden)??!1,ql="",Pl=me!=null&&me.value?me.value:(Ha==null?void 0:Ha.length)>0?(Br=Ha==null?void 0:Ha[0])==null?void 0:Br.value:(me==null?void 0:me.value)??"",Hl=!1,gr="Input";return((Ha==null?void 0:Ha.length)>0||(tl==null?void 0:tl.length)>0)&&(gr="Select"),(Array.isArray(ql)&&(ql!=null&&ql.every(Il=>(Il==null?void 0:Il.name)&&(Il==null?void 0:Il.url)))||Array.isArray(Pl)&&(Pl!=null&&Pl.every(Il=>(Il==null?void 0:Il.name)&&(Il==null?void 0:Il.url))))&&(gr="upload"),me!=null&&me.isMainUrl&&(gr="Url"),{label:Ja??"",name:Ja??"t"+fl,prop:Ja??pl.safeClone(me==null?void 0:me.key),type:(me==null?void 0:me.type)??gr,value:(me==null?void 0:me.type)==="Date"&&Pl===""?new Date:Pl,id:(me==null?void 0:me.id)??fl,contents:(Ha==null?void 0:Ha.length)>0?Ha:kl??[],width:(me==null?void 0:me.width)??1,isLoginUser:ul,config:me==null?void 0:me.config,optionUrl:(me==null?void 0:me.optionUrl)??me,isFormColHidden:Wl,signature:Hl,isMain:me==null?void 0:me.isMain,required:(me==null?void 0:me.required)??!1,isMainUrl:me==null?void 0:me.isMainUrl,operable:(me==null?void 0:me.operable)??!1,disabled:(me==null?void 0:me.disabled)??!1,isSync:me==null?void 0:me.isSync,menus:tl,groups:Za,words:cl,allSelectionContents:me==null?void 0:me.allContents,filterContent:me==null?void 0:me.filterContents}}),W=ca==null?void 0:ca.map(me=>me==null?void 0:me.value);let la="";W==null||W.forEach(me=>{me!==""&&me!==void 0&&(la=la===""?me:la+"/"+me)}),b.setSelectArray(W),b.setSelectString(la);let ka=(Sl=pl.safeClone(ca))==null?void 0:Sl.map(me=>(me!=null&&me.value&&sa.IsJson(me==null?void 0:me.value)&&Array.isArray(JSON.parse(me==null?void 0:me.value))&&(me.value=JSON.parse(me.value)),me)),Ce={};ka==null||ka.forEach(me=>{Ce[me.label]=me==null?void 0:me.value}),ka=ka==null?void 0:ka.map(me=>{var fl,Ja,kl,Ha,tl,Za,cl,ul,Wl;if((me==null?void 0:me.type)==="Select"&&((fl=me==null?void 0:me.allSelectionContents)==null?void 0:fl.length)>0&&(me.contactValue=Ce),(kl=(Ja=me==null?void 0:me.optionUrl)==null?void 0:Ja.menuSelect)!=null&&kl.some(ql=>ql==null?void 0:ql.includes("["))){let ql="";me.optionUrl.oldMenuSelect=(tl=(Ha=pl.safeClone(me))==null?void 0:Ha.optionUrl)==null?void 0:tl.menuSelect,me.optionUrl.menuSelect=(cl=(Za=me==null?void 0:me.optionUrl)==null?void 0:Za.menuSelect)==null?void 0:cl.map(Pl=>{var Hl,gr,rr,kr,wr,Sr;if(Pl!=null&&Pl.includes("[")){let un=(gr=(Hl=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Hl.split(":"))==null?void 0:gr[1];ql=_e((rr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:rr.split(":"),aa==null?void 0:aa[ye.value],aa),Pl=((wr=(kr=pl.safeClone(ka))==null?void 0:kr.find(Jr=>(Jr==null?void 0:Jr.label)===un))==null?void 0:wr.value)||_e((Sr=Pl==null?void 0:Pl.replaceAll("[","").replaceAll("]",""))==null?void 0:Sr.split(":"),aa==null?void 0:aa[ye.value],aa)}return Pl}),ql!==""&&me.value===""&&(me.value=Ca(me.optionUrl.menuSelect,me.optionUrl.oldMenuSelect,(ul=me==null?void 0:me.optionUrl)==null?void 0:ul.groupSelect,aa),Array.isArray(me.value)&&((Wl=me.value)!=null&&Wl.every(Pl=>Pl==null?void 0:Pl.url))&&(me.type="UPLOAD"))}return me}),c.value=ka,D.value=((Nl=c.value)==null?void 0:Nl.every(me=>me==null?void 0:me.disabled))||Ke.value===ye.value,te.value=(Ra=c.value)==null?void 0:Ra.every(me=>me==null?void 0:me.operable),ee.value=(al=c.value)==null?void 0:al.map(me=>me==null?void 0:me.label);let Be=[],Fa=[];if((ga=pl.safeClone(c.value))==null||ga.forEach(me=>{var fl;Array.isArray(me==null?void 0:me.value)&&((fl=me==null?void 0:me.value)!=null&&fl.find(Ja=>{var kl;return(kl=Ja==null?void 0:Ja.url)==null?void 0:kl.includes(".obj")}))&&(Fa=me==null?void 0:me.value)}),(Fa==null?void 0:Fa.length)>0){const me=(qe=pl.safeClone(Fa))==null?void 0:qe.filter(fl=>{var Ja;return(Ja=fl==null?void 0:fl.url)==null?void 0:Ja.includes(".obj")});me==null||me.forEach(fl=>{var kl,Ha,tl,Za;const Ja=(kl=Fa==null?void 0:Fa.filter(cl=>{var ul;return(cl==null?void 0:cl.name)===(fl==null?void 0:fl.name)&&((ul=cl==null?void 0:cl.url)==null?void 0:ul.includes(".mtl"))}))==null?void 0:kl.map(cl=>cl==null?void 0:cl.url);Be.push({objUrl:fl==null?void 0:fl.url,mtlUrls:((Ha=Fa==null?void 0:Fa.filter(cl=>{var ul;return(cl==null?void 0:cl.name)===(fl==null?void 0:fl.name)&&((ul=cl==null?void 0:cl.url)==null?void 0:ul.includes(".mtl"))}))==null?void 0:Ha.length)===1?(Za=(tl=Fa==null?void 0:Fa.filter(cl=>{var ul;return(cl==null?void 0:cl.name)===(fl==null?void 0:fl.name)&&((ul=cl==null?void 0:cl.url)==null?void 0:ul.includes(".mtl"))}))==null?void 0:tl[0])==null?void 0:Za.url:Ja})}),L.setObjUrl(Be)}(rl=pl.safeClone(c.value))==null||rl.forEach(me=>{var fl,Ja,kl,Ha,tl,Za,cl,ul,Wl,ql,Pl,Hl,gr;if((Ja=(fl=me==null?void 0:me.value)==null?void 0:fl.toString())!=null&&Ja.includes(".stl")||(Ha=(kl=me==null?void 0:me.value)==null?void 0:kl.toString())!=null&&Ha.includes(".STL")||(Za=(tl=me==null?void 0:me.value)==null?void 0:tl.toString())!=null&&Za.includes(".obj")||(ul=(cl=me==null?void 0:me.value)==null?void 0:cl.toString())!=null&&ul.includes(".mtl")||(ql=(Wl=me==null?void 0:me.value)==null?void 0:Wl.toString())!=null&&ql.includes(".urdf")){let rr={},kr=[],wr;Array.isArray(me==null?void 0:me.value)?wr=me==null?void 0:me.value:wr=(Pl=me==null?void 0:me.value)==null?void 0:Pl.split(","),wr==null||wr.forEach(Sr=>{Sr.includes(".mtl")?kr.push(Sr):rr.blob=rr.blob==="undefined"?Sr:rr.blob+","+Sr}),(kr==null?void 0:kr.length)>0&&(rr.mtlBlobs=kr),(gr=(Hl=Object.values(rr))==null?void 0:Hl[0])!=null&&gr.includes("http:")}})}else c.value=[];let K=ne.value;if((K==null?void 0:K.length)>0&&(K=K==null?void 0:K.map(aa=>{var W,la,ka,Ce;let ca=(W=aa==null?void 0:aa.key)==null?void 0:W.split("/");return(t==null?void 0:t.compName)===(ca==null?void 0:ca[0])&&(la=c.value)!=null&&la.find(Be=>(Be==null?void 0:Be.prop)===(ca==null?void 0:ca[1]))&&(aa.value=(Ce=(ka=c.value)==null?void 0:ka.find(Be=>(Be==null?void 0:Be.prop)===(ca==null?void 0:ca[1])))==null?void 0:Ce.value),aa}),Ee.setTableViewContents(K)),t!=null&&t.formRules)u.value=t==null?void 0:t.formRules;else{let aa={};(da=pl.safeClone(c).value)==null||da.forEach(ca=>{((ca==null?void 0:ca.isMain)===!0||(ca==null?void 0:ca.required)===!0)&&(aa[(ca==null?void 0:ca.prop)??(ca==null?void 0:ca.name)]=[{required:!0,message:`${(ca==null?void 0:ca.label)||(ca==null?void 0:ca.prop)||(ca==null?void 0:ca.name)}不能为空`}])}),u.value=aa}if(((Xe=Je==null?void 0:Je.contents)==null?void 0:Xe.length)>0){const aa=[];(oa=Je==null?void 0:Je.contents)==null||oa.forEach((ca,W)=>{(ca==null?void 0:ca.label)!==""&&aa.push({label:(ca==null?void 0:ca.label)??"",id:(ca==null?void 0:ca.id)??W,type:(ca==null?void 0:ca.type)??"",background:ca==null?void 0:ca.background})}),j.value=aa}else j.value=[]},{deep:!0,immediate:!0}),a.watch(()=>Ke.value,ve=>{D.value=ve===ye.value},{immediate:!0}),(ve,Je)=>{var re,Se;const Qe=a.resolveComponent("svg-icon"),Fe=a.resolveComponent("el-switch"),_a=a.resolveComponent("el-checkbox"),Le=a.resolveComponent("el-popover"),va=a.resolveComponent("el-checkbox-group");return a.openBlock(),a.createElementBlock("div",m3,[T.value===a.unref(at).TEXT?(a.openBlock(),a.createBlock(mc,{key:0,itemData:l.itemData,compName:l.compName,fields:c.value,textSize:x.value,textColor:k.value,disabled:D.value||ja()},null,8,["itemData","compName","fields","textSize","textColor","disabled"])):T.value===a.unref(at).BLOCK?(a.openBlock(),a.createBlock(Qp,{key:1,items:(Se=(re=c.value)==null?void 0:re.filter(K=>!(K!=null&&K.isFormColHidden)))==null?void 0:Se.map(K=>({label:K==null?void 0:K.label,value:K==null?void 0:K.value,width:(K==null?void 0:K.width)??1,field:K})),textSize:x.value,textColor:k.value,disabled:D.value||ja()},null,8,["items","textSize","textColor","disabled"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass({"form-shadow-box":T.value===a.unref(at).ORDINARY})},[a.createVNode(pl.ssForm,{rowContents:c.value,formRules:u.value,buttonValue:j.value,isRowFlex:!1,isEnableWrap:!0,textSize:x.value,textColor:k.value,onOnButtonClick:na,onChange:Ie,formDisabled:D.value||ja(),formLabelsOperable:te.value,isButtonRow:_.value,onPreview:ce,onBlurChange:ie,onHandleColEditChange:P,onHandleColTypeChange:F,onRouteUrl:Ye,onClickTrigger:Re},{operateCol:a.withCtx(({renderColumns:K,formDisabled:je,formLabelsOperable:De})=>[a.createVNode(Le,{title:"选择操作的标签",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:He},{reference:a.withCtx(()=>[a.createElementVNode("span",y3,[a.createVNode(Qe,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})])]),default:a.withCtx(()=>[a.createElementVNode("div",g3,[Je[1]||(Je[1]=a.createElementVNode("div",{class:"group-title"},"表单操作",-1)),a.createVNode(Fe,{"model-value":je,"active-text":"禁用","inactive-text":"",onChange:Pe,style:{"margin-right":"8px"}},null,8,["model-value"]),a.createVNode(Fe,{"model-value":De,"active-text":"编辑所有标签","inactive-text":"",onChange:xa},null,8,["model-value"]),Je[2]||(Je[2]=a.createElementVNode("div",{class:"group-title"},"表单列操作",-1)),a.createVNode(va,{modelValue:ee.value,"onUpdate:modelValue":Je[0]||(Je[0]=Ma=>ee.value=Ma),style:{height:"100%"},ref_key:"checkboxGroupRef",ref:Na,onChange:Te},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(K,Ma=>(a.openBlock(),a.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:Ma.label},[a.createVNode(_a,{value:Ma.label,style:{width:"100%",marginRight:0}},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(Ma.label),1)]),_:2},1032,["value"]),a.createVNode(Le,{title:"标签操作",placement:"left",teleported:!1,trigger:"hover"},{reference:a.withCtx(()=>[a.createVNode(Qe,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:a.withCtx(()=>{var Ba;return[a.createElementVNode("div",b3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((Ba=Object.keys(Ma))==null?void 0:Ba.filter(Ua=>{var Aa;return(Aa=ea.value)==null?void 0:Aa.find(Ae=>(Ae==null?void 0:Ae.value)===Ua)}),Ua=>{var Aa,Ae;return a.openBlock(),a.createElementBlock("div",{key:Ua},[a.createVNode(pl._sfc_main$1,{value:Ma==null?void 0:Ma[Ua],"active-text":(Ae=(Aa=ea.value)==null?void 0:Aa.find(we=>(we==null?void 0:we.value)===Ua))==null?void 0:Ae.label,inactiveText:"",onChange:we=>J(we,Ua,Ma)},null,8,["value","active-text","onChange"])])}),128))])]}),_:2},1024),a.createElementVNode("span",k3,[a.createVNode(Qe,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:2},1032,["modelValue"])])]),_:2},1024)]),_:1},8,["rowContents","formRules","buttonValue","textSize","textColor","formDisabled","formLabelsOperable","isButtonRow"])],2)),S.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:3,fileDataList:A.value,onDestroy:ma},null,8,["fileDataList"])):a.createCommentVNode("",!0),g.value?(a.openBlock(),a.createBlock(vr.ssDialog,{key:4,visible:g.value,onBeforeDestroy:n,style:{height:"700px",width:"1000px"}},{default:a.withCtx(()=>[a.createVNode(go.ThreeViewerHost,{files:v.value,onGetAnimationData:ve.onAnimationData},null,8,["files","onGetAnimationData"])]),_:1},8,["visible"])):a.createCommentVNode("",!0)])}}},fs=Ul._export_sfc(x3,[["__scopeId","data-v-c4708f41"]]),Bo=a.ref(0),yc=l=>{var r;return!l||(l==null?void 0:l.length)===0?[]:(r=I.cloneDeep(l))==null?void 0:r.map(t=>(Bo.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??Bo.value,children:yc(t==null?void 0:t.children)},t))},_3=l=>{var n;return(n=I.cloneDeep(l))==null?void 0:n.map(t=>(Bo.value++,t={label:(t==null?void 0:t.label)??"",prop:(t==null?void 0:t.label)==="操作"?"operate":t==null?void 0:t.prop,width:t!=null&&t.width?parseInt(t.width):"",fixed:(t==null?void 0:t.fixed)??void 0,sortable:(t==null?void 0:t.sortable)??!1,align:(t==null?void 0:t.align)??"left",showOverflowTooltip:(t==null?void 0:t.showOverflowTooltip)??!0,isNotDrag:(t==null?void 0:t.isNotDrag)??!1,isEditCol:(t==null?void 0:t.isEditCol)??!1,isOperate:(t==null?void 0:t.isOperate)??!1,id:(t==null?void 0:t.id)??Bo.value,children:yc(t==null?void 0:t.children)},t))},gc=(l,r)=>{var n;return l!=null&&l.find(t=>(t==null?void 0:t.id)===r)?(n=I.cloneDeep(l))==null?void 0:n.filter(s=>(s==null?void 0:s.id)!==r):(l=l==null?void 0:l.map(t=>(t.children=gc(t==null?void 0:t.children,r),t)),l)},bc=(l,r)=>{var n;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(r==null?void 0:r.id))?(n=I.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s=r),s)):(l=l==null?void 0:l.map(t=>(t.children=bc(t==null?void 0:t.children,r),t)),l)},kc=(l,r)=>{var n;return l!=null&&l.find(t=>{var s;return(t==null?void 0:t.id)===((s=r==null?void 0:r.contents)==null?void 0:s.id)})?(n=I.cloneDeep(l))==null?void 0:n.map(s=>{var c;return(s==null?void 0:s.id)===((c=r==null?void 0:r.contents)==null?void 0:c.id)&&(s=r==null?void 0:r.contents),s}):(l=l==null?void 0:l.map(t=>(t.children=kc(t==null?void 0:t.children,r),t)),l)},xc=(l,r)=>{var n;return l!=null&&l.find(t=>(t==null?void 0:t.id)===(r==null?void 0:r.id))?(n=I.cloneDeep(l))==null?void 0:n.map(s=>((s==null?void 0:s.id)===(r==null?void 0:r.id)&&(s!=null&&s.children||(s.children=[]),s.children.push(r.contents)),s)):(l=l==null?void 0:l.map(t=>(t.children=xc(t==null?void 0:t.children,r),t)),l)},er=[{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"}],w3=[{label:"查看",value:"view"},{label:"修改",value:"fix"},{label:"删除",value:"delete"},{label:"三维算例",value:"modelExample"}],C3=[{label:"新增",value:"add"}],zn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:C3},{key:"background",label:"按钮背景色",type:"Color"}],Mn=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:w3},{key:"textColor",label:"按钮颜色",type:"Color"}],S3={class:"table-header-child"},E3={class:"table-header-child-main"},D3={class:"table-header-child-content"},B3={class:"table-header-child-content-item"},N3={class:"fix-button"},T3={key:0},A3={class:"form-content"},z3={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(!1),c=a.ref(""),g=sa.useTableComp(I.pinia),{tableIndex:h}=I.storeToRefs(g);a.ref(0);const v=a.ref(""),m=a.ref([]),u=a.ref([]),_=b=>{var T;s.value=!0;let L=[];er==null||er.forEach(x=>{let k=I.cloneDeep(h.value)+1;g.setTableIndex(k),L.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:b[x.key],id:h.value,contents:x==null?void 0:x.options})}),b!=null&&b.children&&((T=b==null?void 0:b.children)==null?void 0:T.length)>0&&L.push({children:b==null?void 0:b.children,isFormColHidden:!0}),v.value=b==null?void 0:b.id,m.value=L,u.value=L},S=b=>{t("fixChange",I.cloneDeep(b))},z=b=>{t("deleteChange",I.cloneDeep(b))},w=b=>{s.value=!0;let L=[];er==null||er.forEach(T=>{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),L.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),c.value=b==null?void 0:b.id,m.value=L,u.value=L},j=b=>{let L=I.cloneDeep(u.value);L=L==null?void 0:L.map(T=>(T.children||(T.value=b==null?void 0:b[T.name]),T)),u.value=L},A=()=>{var L,T;m.value=u.value;let b={};if(v.value!=="")b.id=v.value,(L=m.value)==null||L.forEach(x=>{const k=er==null?void 0:er.find($=>($==null?void 0:$.label)===(x==null?void 0:x.label));k?b[k.key]=x.value:x!=null&&x.children&&x.children.length>0&&(b.children=x.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"fix"});else{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),b.id="id"+h.value,(T=m.value)==null||T.forEach(k=>{const $=er==null?void 0:er.find(U=>(U==null?void 0:U.label)===(k==null?void 0:k.label));$?b[$.key]=k.value:k!=null&&k.children&&k.children.length>0&&(b.children=k.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"add"})}v.value="",m.value=[],u.value=[]},N=()=>{s.value=!1,v.value="",c.value="",m.value=[],u.value=[]},Y=b=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",b),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(b,L)=>{const T=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",S3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(x,k)=>(a.openBlock(),a.createElementBlock("div",E3,[a.createElementVNode("div",D3,[a.createElementVNode("div",B3,a.toDisplayString(x.label),1),a.createElementVNode("div",N3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>w(x)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>_(x)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:$=>Y(x)},null,8,["onClick"])])]),x!=null&&x.children&&x.children.length>0?(a.openBlock(),a.createElementBlock("div",T3,[a.createVNode(_c,{tableChildContents:x==null?void 0:x.children,onDeleteChange:z,onFixChange:S},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(vr.ssDialog,{visible:s.value,onBeforeDestroy:N,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",A3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:j},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:N,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:A},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},M3=Ul._export_sfc(z3,[["__scopeId","data-v-e0fef72d"]]),O3={class:"table-header-child"},I3={class:"table-header-child-main"},L3={class:"table-header-child-content"},V3={class:"table-header-child-content-item"},R3={class:"fix-button"},$3={key:0},P3={class:"form-content"},F3={class:"dialog-footer"},j3={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(!1),c=a.ref(""),g=sa.useTableComp(I.pinia),{tableIndex:h}=I.storeToRefs(g),v=a.ref(""),m=a.ref([]),u=a.ref([]),_=b=>{t("fixChange",I.cloneDeep(b))},S=b=>{var T;s.value=!0;let L=[];er==null||er.forEach(x=>{let k=I.cloneDeep(h.value)+1;g.setTableIndex(k),L.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:b[x.key],id:h.value,contents:x==null?void 0:x.options})}),b!=null&&b.children&&((T=b==null?void 0:b.children)==null?void 0:T.length)>0&&L.push({children:b==null?void 0:b.children,isFormColHidden:!0}),v.value=b==null?void 0:b.id,m.value=L,u.value=L},z=b=>{s.value=!0;let L=[];er==null||er.forEach(T=>{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),L.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:"",id:h.value,contents:T==null?void 0:T.options})}),c.value=b==null?void 0:b.id,m.value=L,u.value=L},w=b=>{let L=I.cloneDeep(u.value);L=L==null?void 0:L.map(T=>(T.children||(T.value=b==null?void 0:b[T.name]),T)),u.value=L},j=()=>{var L,T;m.value=u.value;let b={};if(v.value!=="")b.id=v.value,(L=m.value)==null||L.forEach(x=>{const k=er==null?void 0:er.find($=>($==null?void 0:$.label)===(x==null?void 0:x.label));k?b[k.key]=x.value:x!=null&&x.children&&x.children.length>0&&(b.children=x.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"fix"});else{let x=I.cloneDeep(h.value)+1;g.setTableIndex(x),b.id="idChild"+h.value,(T=m.value)==null||T.forEach(k=>{const $=er==null?void 0:er.find(U=>(U==null?void 0:U.label)===(k==null?void 0:k.label));$?b[$.key]=k.value:k!=null&&k.children&&k.children.length>0&&(b.children=k.children)}),s.value=!1,t("fixChange",{contents:I.cloneDeep(b),id:c.value,type:"add"})}v.value="",m.value=[],u.value=[]},A=()=>{s.value=!1,v.value="",c.value="",m.value=[],u.value=[]},N=b=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{t("deleteChange",b),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},Y=b=>{t("deleteChange",b)};return(b,L)=>{const T=a.resolveComponent("svg-icon"),x=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",O3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(n==null?void 0:n.tableChildContents,(k,$)=>(a.openBlock(),a.createElementBlock("div",I3,[a.createElementVNode("div",L3,[a.createElementVNode("div",V3,a.toDisplayString(k.label),1),a.createElementVNode("div",R3,[a.createVNode(T,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>z(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>S(k)},null,8,["onClick"]),a.createVNode(T,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>N(k)},null,8,["onClick"])])]),k!=null&&k.children&&k.children.length>0?(a.openBlock(),a.createElementBlock("div",$3,[a.createVNode(M3,{tableChildContents:k==null?void 0:k.children,onDeleteChange:Y,onFixChange:_},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),256)),a.createVNode(vr.ssDialog,{visible:s.value,onBeforeDestroy:A,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",P3,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:w},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",F3,[a.createVNode(x,{onClick:A,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>L[0]||(L[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(x,{class:"ok-button button",onClick:j,id:"themeButton"},{default:a.withCtx(()=>L[1]||(L[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},_c=Ul._export_sfc(j3,[["__scopeId","data-v-ebd68fa1"]]),H3={class:"table-operate-content"},U3={class:"table-operate-item"},q3={class:"operate-title"},W3={class:"operate-content"},K3={class:"fix-content"},Y3={class:"fix-content-label"},G3={class:"fix-button"},J3={key:0},X3={class:"operate-title"},Z3={class:"operate-content"},Q3={class:"fix-content"},e1={class:"fix-content-label"},a1={class:"fix-button"},l1={class:"operate-title"},r1={class:"operate-content"},n1={class:"fix-content"},o1={class:"fix-content-label"},i1={class:"fix-button"},s1={class:"operate-title"},c1={class:"operate-content"},u1={class:"fix-content"},d1={class:"fix-content-label"},p1={class:"fix-button"},f1={class:"operate-content"},h1={style:{display:"flex","justify-content":"space-between"}},v1={class:"form-content"},m1={class:"dialog-footer"},y1={class:"form-content"},g1={class:"dialog-footer"},b1={class:"form-content"},k1={class:"dialog-footer"},x1={class:"form-content"},_1={class:"dialog-footer"},w1={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]),c=a.ref(!1),g=a.ref(!1),h=a.ref([]),v=a.ref(!1),m=a.ref([]),u=a.ref(!1),_=a.ref([]),S=a.ref(""),z=a.ref(""),w=a.ref([]),j=a.ref([]),A=a.ref([]),N=a.ref([]),Y=a.ref(!1),b=a.ref([]),L=a.ref([]),T=a.ref(0),x=a.ref([]),k=a.ref([]),$=a.ref([]),U=()=>{Y.value=!0;let P=[];zn==null||zn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:(F==null?void 0:F.key)==="background"?"var(--ssComponent-primary-color)":"",id:T.value,contents:F==null?void 0:F.options})}),b.value=P,L.value=P},X=()=>{var F,J,ie;g.value=!0;let P=[];(ie=(J=(F=sa.FormContent)==null?void 0:F.find(ce=>(ce==null?void 0:ce.key)==="Input"))==null?void 0:J.value)==null||ie.forEach(ce=>{T.value++,P.push({label:ce==null?void 0:ce.label,name:(ce==null?void 0:ce.name)||(ce==null?void 0:ce.label),type:ce.type,value:(ce==null?void 0:ce.label)==="类型"?"Input":"",id:T.value,contents:ce==null?void 0:ce.options})}),x.value=P,k.value=P},be=P=>{P||(x.value=k.value)},ze=async P=>{var F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe;if((P==null?void 0:P.类型)!==((J=(F=k.value)==null?void 0:F.find(Fe=>(Fe==null?void 0:Fe.label)==="类型"))==null?void 0:J.value)){let Fe=[],_a=await((ma=(ce=(ie=sa.FormContent)==null?void 0:ie.find(Le=>(Le==null?void 0:Le.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:ce.value)==null?void 0:ma.value)?await((ve=(Ca=(_e=sa.FormContent)==null?void 0:_e.find(Le=>(Le==null?void 0:Le.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ca.value)==null?void 0:ve.value):(Ie=(na=sa.FormContent)==null?void 0:na.find(Le=>(Le==null?void 0:Le.key)===((P==null?void 0:P.类型)===""?"Input":P==null?void 0:P.类型)))==null?void 0:Ie.value;if(_a==null||_a.forEach(Le=>{T.value++,Fe.push({label:Le==null?void 0:Le.label,name:(Le==null?void 0:Le.name)||(Le==null?void 0:Le.label),type:Le.type,value:Le!=null&&Le.属性名?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):(P==null?void 0:P[Le.label])??"",id:T.value,contents:Le==null?void 0:Le.options,prop:(Le==null?void 0:Le.prop)||(Le==null?void 0:Le.name)||(Le==null?void 0:Le.label)})}),P!=null&&P.菜单选项&&((Je=P==null?void 0:P.菜单选项)==null?void 0:Je.length)>0){const Le=await sa.menuToContentType(P==null?void 0:P.菜单选项);Fe=Fe==null?void 0:Fe.map(va=>((va==null?void 0:va.name)==="组信息选项"&&(va.contents=Le),va))}k.value=await sa.selectToBase(I.cloneDeep(Fe)),x.value=await sa.selectToBase(I.cloneDeep(Fe))}else{let Fe=I.cloneDeep(x.value);if(Fe=Fe==null?void 0:Fe.map(_a=>(_a.value=P==null?void 0:P[_a.name],_a)),P!=null&&P.菜单选项&&((Qe=P==null?void 0:P.菜单选项)==null?void 0:Qe.length)>0){const _a=await sa.menuToContentType(P==null?void 0:P.菜单选项);Fe=Fe==null?void 0:Fe.map(Le=>((Le==null?void 0:Le.name)==="组信息选项"&&(Le.contents=_a),Le))}Fe=sa.formToOptionsContents(Fe),k.value=await sa.selectToBase(I.cloneDeep(Fe))}},Ee=async P=>{await ze(P),x.value=k.value},ne=(P,F)=>{if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="selectRelateType"){const J=F==null?void 0:F.optionUrl;return(J==null?void 0:J.selectRelateType)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="menuSelect"){const J=F==null?void 0:F.optionUrl;return(J==null?void 0:J.menuSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="groupSelect"){const J=F==null?void 0:F.optionUrl;return(J==null?void 0:J.groupSelect)||F[P.key]}if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="originalContent")return(F==null?void 0:F.value)||F[P.key];if((F==null?void 0:F.type)=="Select"&&(P==null?void 0:P.key)==="multiple"){const J=F[P.key];return Us(J)?J:P.default}return(P==null?void 0:P.label)==="类型"&&F[P.key]===""?"Input":(P==null?void 0:P.key)==="isFormColHidden"&&!F[P.key]?!1:F[P.key]},ke=async P=>{var ie,ce,ma,na,Ie,_e,Ca,ve,Je;g.value=!0;let F=[];const J=await((ma=(ce=(ie=sa.FormContent)==null?void 0:ie.find(Qe=>(Qe==null?void 0:Qe.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:ce.value)==null?void 0:ma.value)?await((ve=(Ca=(_e=sa.FormContent)==null?void 0:_e.find(Qe=>(Qe==null?void 0:Qe.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ca.value)==null?void 0:ve.value):(Ie=(na=sa.FormContent)==null?void 0:na.find(Qe=>(Qe==null?void 0:Qe.key)===((P==null?void 0:P.type)===""?"Input":P==null?void 0:P.type)))==null?void 0:Ie.value;if(J==null||J.forEach(Qe=>{T.value++,F.push({label:Qe==null?void 0:Qe.label,name:(Qe==null?void 0:Qe.name)||(Qe==null?void 0:Qe.label),type:Qe.type,value:(Qe==null?void 0:Qe.label)==="属性名"?(P==null?void 0:P.prop)||(P==null?void 0:P.name)||(P==null?void 0:P.label):ne(Qe,P),id:T.value,contents:Qe==null?void 0:Qe.options})}),P!=null&&P.menuSelect&&((Je=P==null?void 0:P.menuSelect)==null?void 0:Je.length)>0){const Qe=await sa.menuToContentType(P==null?void 0:P.menuSelect);F=F==null?void 0:F.map(Fe=>((Fe==null?void 0:Fe.name)==="组信息选项"&&(Fe.contents=Qe),Fe))}S.value=P==null?void 0:P.id,x.value=await sa.selectToBase(sa.formToOptionsContents(F)),k.value=await sa.selectToBase(sa.formToOptionsContents(F))},Z=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;$.value=(F=I.cloneDeep($.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="tableToForm"&&(ie.contents=$.value),ie))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},de=()=>{g.value=!1,x.value=[],S.value=""},Ke=async()=>{var ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe;x.value=k.value;let P={};S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value);let F=await((ma=(ce=(ie=sa.FormContent)==null?void 0:ie.find(Fe=>{var _a,Le;return(Fe==null?void 0:Fe.key)===(((Le=(_a=x.value)==null?void 0:_a.find(va=>(va==null?void 0:va.label)==="类型"))==null?void 0:Le.value)??"label")}))==null?void 0:ce.value)==null?void 0:ma.value)??((Ie=(na=sa.FormContent)==null?void 0:na.find(Fe=>{var _a,Le;return(Fe==null?void 0:Fe.key)===(((Le=(_a=x.value)==null?void 0:_a.find(va=>(va==null?void 0:va.label)==="类型"))==null?void 0:Le.value)??"label")}))==null?void 0:Ie.value);if((_e=x.value)==null||_e.forEach(Fe=>{const _a=F==null?void 0:F.find(Le=>(Le==null?void 0:Le.label)===(Fe==null?void 0:Fe.label));_a&&(P[_a.key]=Fe.value)}),P.name=P.label,(Ca=$.value)!=null&&Ca.find(Fe=>Fe.id===P.id))$.value=(ve=$.value)==null?void 0:ve.map(Fe=>(Fe.id===P.id&&(Fe=P),Fe));else{let Fe=I.cloneDeep($.value);$.value||($.value=[]),Fe.push(P),$.value=Fe}$.value=$.value.map(({id:Fe,..._a})=>_a),g.value=!1,S.value="";let J=I.cloneDeep(n.originalItemContents);(Je=I.cloneDeep(n.originalItemContents))!=null&&Je.find(Fe=>(Fe==null?void 0:Fe.key)==="tableToForm")?J=(Qe=I.cloneDeep(n.originalItemContents))==null?void 0:Qe.map(Fe=>((Fe==null?void 0:Fe.key)==="tableToForm"&&(Fe.contents=$.value),Fe)):J.push({key:"tableToForm",contents:$.value}),t("change",J)},Na=P=>{Y.value=!0;let F=[];zn==null||zn.forEach(J=>{T.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:P[J.key],id:T.value,contents:J==null?void 0:J.options})}),S.value=P==null?void 0:P.id,b.value=F,L.value=F};a.watch(()=>u.value,()=>{var F,J;let P=I.cloneDeep(n.originalItemContents);(F=I.cloneDeep(n.originalItemContents))!=null&&F.find(ie=>(ie==null?void 0:ie.key)==="page")?P=(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="page"&&(ie.contents=u.value),ie)):P.push({key:"page",contents:u.value}),t("change",P)},{deep:!0});const te=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;j.value=(F=I.cloneDeep(j.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="extraButton"&&(ie.contents=j.value),ie))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},D=()=>{var J,ie,ce,ma,na;b.value=L.value;let P={};if(S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value),(J=b.value)==null||J.forEach(Ie=>{const _e=zn==null?void 0:zn.find(Ca=>(Ca==null?void 0:Ca.label)===(Ie==null?void 0:Ie.label));_e?P[_e.key]=Ie.value:Ie!=null&&Ie.children&&Ie.children.length>0&&(P.children=Ie.children)}),(ie=j.value)!=null&&ie.find(Ie=>Ie.id===P.id))j.value=(ce=j.value)==null?void 0:ce.map(Ie=>(Ie.id===P.id&&(Ie=P),Ie));else{let Ie=I.cloneDeep(j.value)??[];Ie.push(P),j.value=Ie}Y.value=!1,S.value="";let F=I.cloneDeep(n.originalItemContents);(ma=I.cloneDeep(n.originalItemContents))!=null&&ma.find(Ie=>(Ie==null?void 0:Ie.key)==="extraButton")?F=(na=I.cloneDeep(n.originalItemContents))==null?void 0:na.map(Ie=>((Ie==null?void 0:Ie.key)==="extraButton"&&(Ie.contents=j.value),Ie)):F.push({key:"extraButton",contents:j.value}),t("change",F)},le=P=>{let F=I.cloneDeep(L.value);F=F==null?void 0:F.map(J=>(J.children||(J.value=P==null?void 0:P[J.name]),J)),L.value=F},ye=()=>{Y.value=!1,b.value=[],S.value=""},ue=P=>{v.value=!0;let F=[];Mn==null||Mn.forEach(J=>{T.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:P[J.key],id:T.value,contents:J==null?void 0:J.options})}),S.value=P==null?void 0:P.id,A.value=F,N.value=F},Ne=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;w.value=(F=I.cloneDeep(w.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>((ie==null?void 0:ie.key)==="rowButton"&&(ie.contents=w.value),ie))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},pa=()=>{c.value=!0;let P=[];er==null||er.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),m.value=P,_.value=P},wa=()=>{v.value=!0;let P=[];Mn==null||Mn.forEach(F=>{T.value++,P.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:"",id:T.value,contents:F==null?void 0:F.options})}),A.value=P,N.value=P},ja=P=>{let F=I.cloneDeep(N.value);F=F==null?void 0:F.map(J=>(J.children||(J.value=P==null?void 0:P[J.name]),J)),N.value=F},ee=()=>{var J,ie,ce,ma,na;A.value=N.value;let P={};if(S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value),(J=A.value)==null||J.forEach(Ie=>{const _e=Mn==null?void 0:Mn.find(Ca=>(Ca==null?void 0:Ca.label)===(Ie==null?void 0:Ie.label));_e?P[_e.key]=Ie.value:Ie!=null&&Ie.children&&Ie.children.length>0&&(P.children=Ie.children)}),(ie=w.value)!=null&&ie.find(Ie=>Ie.id===P.id))w.value=(ce=w.value)==null?void 0:ce.map(Ie=>(Ie.id===P.id&&(Ie=P),Ie));else{let Ie=I.cloneDeep(w.value);Ie.push(P),w.value=Ie}v.value=!1,S.value="";let F=I.cloneDeep(n.originalItemContents);(ma=I.cloneDeep(n.originalItemContents))!=null&&ma.find(Ie=>(Ie==null?void 0:Ie.key)==="rowButton")?F=(na=I.cloneDeep(n.originalItemContents))==null?void 0:na.map(Ie=>((Ie==null?void 0:Ie.key)==="rowButton"&&(Ie.contents=w.value),Ie)):F.push({key:"rowButton",contents:w.value}),t("change",F)},ea=()=>{v.value=!1,S.value="",N.value=[],A.value=[]},Pe=P=>{c.value=!0;let F=[];er==null||er.forEach(J=>{T.value++,F.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:"",id:T.value,contents:J==null?void 0:J.options})}),m.value=F,z.value=P==null?void 0:P.id,_.value=F},xa=P=>{var F;h.value=gc(I.cloneDeep(h.value),P==null?void 0:P.id),t("change",(F=I.cloneDeep(n.originalItemContents))==null?void 0:F.map(J=>{var ie;return(J==null?void 0:J.key)==="header"&&(J.contents=(ie=h.value)!=null&&ie.some(ce=>ce==null?void 0:ce.children)?[h.value]:h.value),J}))},He=P=>{var J,ie,ce;P.type==="fix"?P.id!==""?h.value=kc(h.value,P):h.value=bc(h.value,P==null?void 0:P.contents):h.value=xc(h.value,P),h.value=(J=h.value)!=null&&J.some(ma=>ma==null?void 0:ma.children)?[h.value]:h.value,S.value="";let F=I.cloneDeep(n.originalItemContents);(ie=I.cloneDeep(n.originalItemContents))!=null&&ie.find(ma=>(ma==null?void 0:ma.key)==="header")?F=(ce=I.cloneDeep(n.originalItemContents))==null?void 0:ce.map(ma=>((ma==null?void 0:ma.key)==="header"&&(ma.contents=h.value),ma)):F.push({key:"header",contents:h.value}),t("change",F)},Te=P=>{var J;c.value=!0;let F=[];er==null||er.forEach(ie=>{T.value++,F.push({label:ie==null?void 0:ie.label,name:ie==null?void 0:ie.label,type:ie.type,value:P[ie.key],id:T.value,contents:ie==null?void 0:ie.options})}),P!=null&&P.children&&((J=P==null?void 0:P.children)==null?void 0:J.length)>0&&F.push({children:P==null?void 0:P.children,isFormColHidden:!0}),S.value=P==null?void 0:P.id,z.value="",m.value=F,_.value=F},Re=P=>{let F=I.cloneDeep(_.value);F=F==null?void 0:F.map(J=>(J.children||(J.value=P==null?void 0:P[J.name]),J)),_.value=F},Ye=()=>{c.value=!1,S.value="",z.value="",_.value=[]},qa=()=>{var J,ie,ce,ma,na,Ie;m.value=_.value;let P={};if(S.value!==""?P.id=S.value:(T.value++,P.id="id"+T.value),(J=m.value)==null||J.forEach(_e=>{const Ca=er==null?void 0:er.find(ve=>(ve==null?void 0:ve.label)===(_e==null?void 0:_e.label));Ca?P[Ca.key]=_e.value:_e!=null&&_e.children&&_e.children.length>0&&(P.children=_e.children)}),(ie=h.value)!=null&&ie.find(_e=>_e.id===P.id))h.value=(ce=h.value)==null?void 0:ce.map(_e=>(_e.id===P.id&&(_e=P),_e));else{let _e=I.cloneDeep(h.value)??[];z.value===""?_e.push(P):_e=_e==null?void 0:_e.map(Ca=>(Ca.id===z.value&&(Ca.children||(Ca.children=[]),Ca.children.push(P)),Ca)),h.value=_e}h.value=(ma=h.value)!=null&&ma.some(_e=>_e==null?void 0:_e.children)?[h.value]:h.value,c.value=!1,S.value="",z.value="";let F=I.cloneDeep(n.originalItemContents);(na=I.cloneDeep(n.originalItemContents))!=null&&na.find(_e=>(_e==null?void 0:_e.key)==="header")?F=(Ie=I.cloneDeep(n.originalItemContents))==null?void 0:Ie.map(_e=>((_e==null?void 0:_e.key)==="header"&&(_e.contents=h.value),_e)):F.push({key:"header",contents:h.value}),t("change",F)},Va=P=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,J;h.value=(F=I.cloneDeep(h.value))==null?void 0:F.filter(ie=>(ie==null?void 0:ie.id)!==(P==null?void 0:P.id)),t("change",(J=I.cloneDeep(n.originalItemContents))==null?void 0:J.map(ie=>{var ce;return(ie==null?void 0:ie.key)==="header"&&(ie.contents=(ce=h.value)!=null&&ce.some(ma=>ma==null?void 0:ma.children)?[h.value]:h.value),ie})),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return a.watch(()=>n.originalItemContents,()=>{var P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se;if(!(!n.originalItemContents||n.originalItemContents.length===0))if(s.value=I.cloneDeep(n.originalItemContents),h.value=(F=(P=s.value)==null?void 0:P.find(K=>(K==null?void 0:K.key)==="header"))==null?void 0:F.contents,w.value=(ie=(J=s.value)==null?void 0:J.find(K=>(K==null?void 0:K.key)==="rowButton"))==null?void 0:ie.contents,j.value=(ma=(ce=s.value)==null?void 0:ce.find(K=>(K==null?void 0:K.key)==="extraButton"))==null?void 0:ma.contents,u.value=(Ie=(na=s.value)==null?void 0:na.find(K=>(K==null?void 0:K.key)==="page"))!=null&&Ie.contents?!!((Ca=(_e=s.value)==null?void 0:_e.find(K=>(K==null?void 0:K.key)==="page"))!=null&&Ca.contents):!1,$.value=(Je=(ve=s.value)==null?void 0:ve.find(K=>(K==null?void 0:K.key)==="tableToForm"))==null?void 0:Je.contents,h.value=(Qe=h.value)==null?void 0:Qe.map((K,je)=>(Array.isArray(K)?K=_3(K):K={label:(K==null?void 0:K.label)??"",prop:(K==null?void 0:K.label)==="操作"?"operate":K==null?void 0:K.prop,width:K!=null&&K.width?parseInt(K.width):"",fixed:(K==null?void 0:K.fixed)??void 0,sortable:(K==null?void 0:K.sortable)??!1,align:(K==null?void 0:K.align)??"left",showOverflowTooltip:(K==null?void 0:K.showOverflowTooltip)??!0,isNotDrag:(K==null?void 0:K.isNotDrag)??!1,isEditCol:(K==null?void 0:K.isEditCol)??!1,isOperate:(K==null?void 0:K.isOperate)??!1,id:(K==null?void 0:K.id)??je,formMenuSelect:(K==null?void 0:K.formMenuSelect)??void 0,groupSelect:(K==null?void 0:K.groupSelect)??void 0},K)),h.value=(Fe=h.value)!=null&&Fe.every(K=>Array.isArray(K))?(_a=h.value)==null?void 0:_a[0]:h.value,w.value=(Le=w.value)==null?void 0:Le.map((K,je)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",textColor:(K==null?void 0:K.textColor)??"#000000",id:(K==null?void 0:K.id)??je}),j.value=(va=j.value)==null?void 0:va.map((K,je)=>K={label:(K==null?void 0:K.label)??"",type:(K==null?void 0:K.type)??"",background:(K==null?void 0:K.background)??"var(--ssComponent-primary-color)",id:(K==null?void 0:K.id)??je}),$.value)$.value=(Se=$.value)==null?void 0:Se.map(K=>{T.value++;let je=K;return je.id=T.value,je});else{let K=[];const je=(re=sa.getColumnChild(I.cloneDeep(h.value)))==null?void 0:re.filter(De=>(De==null?void 0:De.prop)!=="operate");je==null||je.forEach(De=>{var Ma;T.value++,K.push({label:De==null?void 0:De.label,name:(De==null?void 0:De.prop)||(De==null?void 0:De.label),type:De!=null&&De.groupSelect?"Select":"Input",value:"",id:T.value,contents:De==null?void 0:De.options,menuSelect:De==null?void 0:De.formMenuSelect,groupSelect:(Ma=De==null?void 0:De.groupSelect)==null?void 0:Ma.split(":"),selectRelateType:"关联绑定列"})}),$.value=K}},{deep:!0,immediate:!0}),(P,F)=>{const J=a.resolveComponent("svg-icon"),ie=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",H3,[a.createElementVNode("div",U3,[a.createElementVNode("div",q3,[F[2]||(F[2]=a.createElementVNode("div",null,a.toDisplayString("表头"),-1)),a.createVNode(ie,{class:"icon-content",onClick:pa,id:"themeButton"},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[1]||(F[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",W3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",K3,[a.createElementVNode("div",Y3,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",G3,[a.createVNode(J,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Pe(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Te(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Va(ce)},null,8,["onClick"])])]),ce!=null&&ce.children&&ce.children.length>0?(a.openBlock(),a.createElementBlock("div",J3,[a.createVNode(_c,{tableChildContents:ce==null?void 0:ce.children,onDeleteChange:xa,onFixChange:He},null,8,["tableChildContents"])])):a.createCommentVNode("",!0)]))),128))]),a.createElementVNode("div",X3,[F[4]||(F[4]=a.createElementVNode("div",null,a.toDisplayString("行内按钮"),-1)),a.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:wa},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[3]||(F[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",Z3,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(w.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",Q3,[a.createElementVNode("div",e1,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",a1,[a.createVNode(J,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>ue(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Ne(ce)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",l1,[F[6]||(F[6]=a.createElementVNode("div",null,a.toDisplayString("表外按钮"),-1)),a.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:U},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[5]||(F[5]=a.createTextVNode(" 新增 "))]),_:1,__:[5]})]),a.createElementVNode("div",r1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(j.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",n1,[a.createElementVNode("div",o1,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",i1,[a.createVNode(J,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>Na(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>te(ce)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",s1,[F[8]||(F[8]=a.createElementVNode("div",null,a.toDisplayString("表格弹框字段设置"),-1)),a.createVNode(ie,{class:"icon-content",id:"themeButton",onClick:X},{icon:a.withCtx(()=>[a.createVNode(J,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[F[7]||(F[7]=a.createTextVNode(" 新增 "))]),_:1,__:[7]})]),a.createElementVNode("div",c1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList($.value,(ce,ma)=>(a.openBlock(),a.createElementBlock("div",{key:ma},[a.createElementVNode("div",u1,[a.createElementVNode("div",d1,a.toDisplayString(ce==null?void 0:ce.label),1),a.createElementVNode("div",p1,[a.createVNode(J,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:na=>ke(ce)},null,8,["onClick"]),a.createVNode(J,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:na=>Z(ce)},null,8,["onClick"])])])]))),128))]),F[10]||(F[10]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("分页"))],-1)),a.createElementVNode("div",f1,[a.createElementVNode("div",h1,[F[9]||(F[9]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否分页"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:u.value,"onUpdate:modelValue":F[0]||(F[0]=ce=>u.value=ce)},null,8,["modelValue"])])])]),a.createVNode(vr.ssDialog,{visible:c.value,onBeforeDestroy:Ye,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",v1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:Re},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",m1,[a.createVNode(ie,{onClick:Ye,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[11]||(F[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(ie,{class:"ok-button button",onClick:qa,id:"themeButton"},{default:a.withCtx(()=>F[12]||(F[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:v.value,onBeforeDestroy:ea,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",y1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:A.value,key:A.value,isEnableWrap:!0,onChange:ja},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",g1,[a.createVNode(ie,{onClick:ea,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[13]||(F[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(ie,{class:"ok-button button",onClick:ee,id:"themeButton"},{default:a.withCtx(()=>F[14]||(F[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:Y.value,onBeforeDestroy:ye,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",b1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:le},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",k1,[a.createVNode(ie,{onClick:ye,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[15]||(F[15]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[15]}),a.createVNode(ie,{class:"ok-button button",onClick:D,id:"themeButton"},{default:a.withCtx(()=>F[16]||(F[16]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:g.value,onBeforeDestroy:de,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",x1,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:x.value,key:x.value,isEnableWrap:!0,onChange:ze,onChangeVisible:be,onBlurChange:Ee},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",_1,[a.createVNode(ie,{onClick:de,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>F[17]||(F[17]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[17]}),a.createVNode(ie,{class:"ok-button button",onClick:Ke,id:"themeButton"},{default:a.withCtx(()=>F[18]||(F[18]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[18]})])]),_:1},8,["visible"])])}}},C1=Ul._export_sfc(w1,[["__scopeId","data-v-7a6b87b5"]]),S1=I.useModelComp(I.pinia),{pageMapState:E1}=I.storeToRefs(S1),D1=I.useMenuState(I.pinia),{activeMenuPath:B1}=I.storeToRefs(D1),N1=a.ref(24),T1=a.ref(6),A1=a.ref(70),z1=a.ref(.18),M1=a.ref(45),O1=(l,r,n,t)=>{var s,c,g,h,v,m,u,_,S,z,w,j,A,N,Y,b;return{x:((c=(s=l==null?void 0:l.value)==null?void 0:s.tableData)==null?void 0:c.x)||r%2*12,y:((h=(g=l==null?void 0:l.value)==null?void 0:g.tableData)==null?void 0:h.y)||r,w:((m=(v=l==null?void 0:l.value)==null?void 0:v.tableData)==null?void 0:m.w)||N1.value,h:((_=(u=l==null?void 0:l.value)==null?void 0:u.tableData)==null?void 0:_.h)||n,minW:((z=(S=l==null?void 0:l.value)==null?void 0:S.tableData)==null?void 0:z.minW)||T1.value,minH:((j=(w=l==null?void 0:l.value)==null?void 0:w.tableData)==null?void 0:j.minH)||z1.value,maxH:((N=(A=l==null?void 0:l.value)==null?void 0:A.tableData)==null?void 0:N.maxH)||M1.value,i:((b=(Y=l==null?void 0:l.value)==null?void 0:Y.tableData)==null?void 0:b.i)||r,id:(l==null?void 0:l.id)||r+"",component:t}},I1=(l,r)=>{var t,s,c,g,h,v,m,u;let n=1;if(l!=null&&l.compData&&Array.isArray(l==null?void 0:l.compData))if(((t=l==null?void 0:l.comp)==null?void 0:t.toUpperCase())==="TABLE"){if(((g=(c=(s=l==null?void 0:l.compData)==null?void 0:s.find(S=>(S==null?void 0:S.key)==="tableContents"))==null?void 0:c.contents)==null?void 0:g.length)===0)return 2}else((h=l==null?void 0:l.comp)==null?void 0:h.toUpperCase())==="FORM"&&(n=((u=(m=(v=l==null?void 0:l.compData)==null?void 0:v.find(S=>(S==null?void 0:S.key)==="formContent"))==null?void 0:m.contents)==null?void 0:u.length)/5);return n*2},wc=(l,r,n)=>{var g,h;const t=(h=(g=E1.value)==null?void 0:g[B1.value])==null?void 0:h.filter(v=>{var m;return((m=v==null?void 0:v.key)==null?void 0:m.type)==="gridLayout"}),s=t==null?void 0:t.find(v=>{var m,u,_;return((_=(u=(m=v==null?void 0:v.value)==null?void 0:m.tableData)==null?void 0:u.component)==null?void 0:_.id)===l.id}),c=I1(l);return l!=null&&l.children&&(l==null?void 0:l.children.length)>0&&(l.children=l.children.map((v,m)=>wc(v,m))),{...O1(s,r,c,l)}},L1=(l,r)=>{if((l==null?void 0:l.length)===0)return[];const n=I.cloneDeep(l);return Array.isArray(l)?n==null?void 0:n.map((t,s)=>wc(t,s)):[]},V1=l=>({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}]}]}}),R1=(l,r)=>l==null?void 0:l.map(n=>{for(const t in r)if(t===(n==null?void 0:n.prop))return{...n,value:r[t]};return n}),$1=a.defineComponent({__name:"index",props:{compType:String,comp:Object,target:{type:String,default:"alone"},optionItems:Array},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]);a.watch(()=>n.compType,h=>{var u;const v=V1(n==null?void 0:n.optionItems),m=h?(u=v[h==null?void 0:h.toUpperCase()])==null?void 0:u[n==null?void 0:n.target]:[];s.value=m==null?void 0:m.map(_=>{for(const[S,z]of Object.entries((n==null?void 0:n.comp)||{}))if((_==null?void 0:_.prop)===S)return{..._,value:z};return _})},{immediate:!0});const c=h=>pl.getComponent(h),g=h=>{var v,m;(h==null?void 0:h.prop)==="layout"&&(h==null?void 0:h.value)==="horizontal"?s.value=(v=s.value)==null?void 0:v.map(u=>{var _;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(_=u==null?void 0:u.options)==null?void 0:_.map(S=>({...S,disabled:!0}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!0}:u}):s.value=(m=s.value)==null?void 0:m.map(u=>{var _;return(u==null?void 0:u.prop)==="isStepLayout"?{...u,options:(_=u==null?void 0:u.options)==null?void 0:_.map(S=>({...S,disabled:!1}))}:(u==null?void 0:u.prop)==="isGridLayout"?{...u,disabled:!1}:u}),t("change",{target:n==null?void 0:n.target,styleConfigs:s.value,prop:h==null?void 0:h.prop})};return(h,v)=>{const m=a.resolveComponent("el-col"),u=a.resolveComponent("el-row");return a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,_=>(a.openBlock(),a.createBlock(u,{class:"style-row",key:_==null?void 0:_.prop},{default:a.withCtx(()=>[a.createVNode(m,{span:6,class:"style-row-title"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(_==null?void 0:_.label)+":",1)]),_:2},1024),a.createVNode(m,{span:18,style:{display:"flex"}},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(c(_.type)),{modelValue:_.value,"onUpdate:modelValue":S=>_.value=S,content:_==null?void 0:_.options,optionUrl:_==null?void 0:_.optionUrl,disabled:_==null?void 0:_.disabled,activeText:_==null?void 0:_.activeText,inactiveText:_==null?void 0:_.inactiveText,onChange:S=>g(_)},null,40,["modelValue","onUpdate:modelValue","content","optionUrl","disabled","activeText","inactiveText","onChange"]))]),_:2},1024)]),_:2},1024))),128)}}}),P1=Ul._export_sfc($1,[["__scopeId","data-v-6c233914"]]),F1=a.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(l,{emit:r}){const n=l,t=r,s=[{required:!0,message:"输入不能为空",trigger:"blur"}],c=a.ref([]),g=N=>N==null?void 0:N.reduce((Y,b)=>(Y[b==null?void 0:b.prop]=b==null?void 0:b.rule,Y),{}),h=a.computed(()=>({formRules:g(c.value),buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"保存",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]})),v=a.ref([]),m=a.ref(""),u=(N,Y,b)=>{var x;let L=[];(n==null?void 0:n.activeTabName)==="任务配置"?(L=[{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:N},{label:"按钮名称",value:"按钮名称",children:Y}]},{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:"暂停"}]}],c.value=[{prop:"任务名称",rule:s},{prop:"任务关键词",rule:s},{prop:"执行任务",rule:s},{prop:"执行动作",rule:s},{prop:"执行交互",rule:s}]):(n==null?void 0:n.activeTabName)==="任务关联"&&(L=[{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:(x=n==null?void 0:n.relatedData)==null?void 0:x.map(k=>({label:k==null?void 0:k.任务名称,value:k==null?void 0:k.任务名称}))},{prop:"关联状态",label:"关联状态",key:"关联状态",type:"radio",value:"启动",isTableColHidden:!1,isFormColHidden:!1,contents:[{label:"启动",value:"启动"},{label:"暂停",value:"暂停"}]}],c.value=[{prop:"关联名称",rule:s},{prop:"关联状态",rule:s},{prop:"关联形式",rule:s},{prop:"关联任务集合",rule:s}]);let T;return b&&(b==null?void 0:b.length)>0?T=[...L,..._(N,Y,b)]:T=L,T},_=(N,Y,b)=>{const L=[{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 b?L==null?void 0:L.filter(T=>b==null?void 0:b.includes(T==null?void 0:T.prop)):L},S=(N,Y)=>{var k,$,U,X,be,ze,Ee,ne,ke;const b=((be=(X=(U=($=(k=n==null?void 0:n.comp)==null?void 0:k.compData)==null?void 0:$.find(Z=>(Z==null?void 0:Z.key)==="header"))==null?void 0:U.contents)==null?void 0:X.filter(Z=>(Z==null?void 0:Z.label)!=="操作"))==null?void 0:be.map(Z=>({value:Z==null?void 0:Z.prop,label:Z.label})))||[],L=/button/i,T=((ke=(ne=(Ee=(ze=n==null?void 0:n.comp)==null?void 0:ze.compData)==null?void 0:Ee.filter(Z=>L.test(Z==null?void 0:Z.key)))==null?void 0:ne.flatMap(Z=>Z==null?void 0:Z.contents))==null?void 0:ke.map(Z=>({value:Z==null?void 0:Z.label,label:Z.label})))||[],x=u(b,T,N);v.value=Y?R1(x,Y):x,N&&(N==null?void 0:N.length)>0&&c.value.push(...N==null?void 0:N.map(Z=>({prop:Z,rule:s})))};a.onMounted(()=>{S(null,n==null?void 0:n.extendItem)});const z=N=>{const Y=N==null?void 0:N[m.value];if(m.value==="执行任务"){if(!(Y!=null&&Y.join("/")))return;const b=Y==null?void 0:Y.join("/");S(b==="统计/统计规则/自定义"?["统计算法源","统计是否获取错误集"]:b==="进度设置/进度条"?["进度关键词"]:null,N)}},w=N=>{t("change",{target:n==null?void 0:n.target,extendConfigs:N})},j=(N,Y)=>{m.value=Y==null?void 0:Y.changeProp,z(N)},A=N=>{t("onButtonClick",N)};return(N,Y)=>(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isStartJustify:!1,isEnableWrap:!1,formRules:h.value.formRules,buttonValue:h.value.buttonValue,onChange:w,onBlurChange:j,onOnButtonClick:A},null,8,["rowContents","formRules","buttonValue"]))}}),j1=Ul._export_sfc(F1,[["__scopeId","data-v-7c660c1f"]]),H1={};function U1(l,r){return null}const q1=Ul._export_sfc(H1,[["render",U1]]),W1={class:"form-operate-content"},K1={class:"form-operate-item"},Y1={class:"operate-title"},G1={class:"operate-content"},J1={class:"fix-content"},X1={class:"fix-button"},Z1={class:"operate-title"},Q1={class:"operate-content"},e2={class:"fix-content"},a2={class:"fix-button"},l2={style:{display:"flex","justify-content":"space-between"}},r2={class:"form-content"},n2={class:"dialog-footer"},t2={class:"form-content"},o2={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(!1),c=a.ref([]),g=a.ref([]),h=a.ref(!1),v=a.ref([]),m=a.ref([]),u=a.ref(""),_=a.ref(!1),S=a.ref(0),z=a.ref([]),w=a.ref([]),j=(ne,ke)=>{if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="selectRelateType"){const Z=ke==null?void 0:ke.optionUrl;return(Z==null?void 0:Z.selectRelateType)||ke[ne.key]}if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="menuSelect"){const Z=ke==null?void 0:ke.optionUrl;return(Z==null?void 0:Z.menuSelect)||ke[ne.key]}if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="groupSelect"){const Z=ke==null?void 0:ke.optionUrl;return(Z==null?void 0:Z.groupSelect)||ke[ne.key]}if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="originalContent")return(ke==null?void 0:ke.value)||ke[ne.key];if((ke==null?void 0:ke.type)=="Select"&&(ne==null?void 0:ne.key)==="multiple"){const Z=ke[ne.key];return Us(Z)?Z:ne.default}return(ne==null?void 0:ne.label)==="类型"&&ke[ne.key]===""?"Input":(ne==null?void 0:ne.key)==="isFormColHidden"&&!ke[ne.key]?!1:ke[ne.key]},A=async ne=>{var de,Ke,Na,te,D,le;s.value=!0;let ke=[];const Z=await((Na=(Ke=(de=sa.FormContent)==null?void 0:de.find(ye=>(ye==null?void 0:ye.key)===((ne==null?void 0:ne.type)===""?"Input":ne==null?void 0:ne.type)))==null?void 0:Ke.value)==null?void 0:Na.value)??((D=(te=sa.FormContent)==null?void 0:te.find(ye=>(ye==null?void 0:ye.key)===((ne==null?void 0:ne.type)===""?"Input":ne==null?void 0:ne.type)))==null?void 0:D.value);if(Z==null||Z.forEach(ye=>{S.value++,ke.push({label:ye==null?void 0:ye.label,name:ye==null?void 0:ye.label,type:ye.type,prop:ye==null?void 0:ye.prop,value:j(ye,ne),id:S.value,contents:ye==null?void 0:ye.options,width:(ne==null?void 0:ne.width)??1})}),ne!=null&&ne.menuSelect&&((le=ne==null?void 0:ne.menuSelect)==null?void 0:le.length)>0){const ye=await sa.menuToContentType(ne==null?void 0:ne.menuSelect);ke=ke==null?void 0:ke.map(ue=>((ue==null?void 0:ue.name)==="组信息选项"&&(ue.contents=ye),ue))}u.value=ne==null?void 0:ne.id,c.value=await sa.selectToBase(sa.formToOptionsContents(ke)),g.value=await sa.selectToBase(sa.formToOptionsContents(ke))},N=ne=>{var Z;h.value=!0;let ke=[];(Z=sa.FormButton)==null||Z.forEach(de=>{S.value++,ke.push({label:de==null?void 0:de.label,name:de==null?void 0:de.label,type:de.type,value:(de==null?void 0:de.label)==="类型"&&ne[de.key]===""?"normal":ne[de.key],id:S.value,contents:de==null?void 0:de.options})}),z.value=ke,w.value=ke,u.value=ne==null?void 0:ne.id};a.watch(()=>_.value,()=>{var ke,Z;let ne=I.cloneDeep(n.originalItemContents);(ke=I.cloneDeep(n.originalItemContents))!=null&&ke.find(de=>(de==null?void 0:de.key)==="enableWrap")?ne=(Z=I.cloneDeep(n.originalItemContents))==null?void 0:Z.map(de=>((de==null?void 0:de.key)==="enableWrap"&&(de.contents=!_.value),de)):ne.push({key:"enableWrap",contents:!_.value}),t("change",ne)},{deep:!0});const Y=()=>{var Z,de,Ke,Na,te;z.value=w.value;let ne={};if(u.value!==""?ne.id=u.value:(S.value++,ne.id="id"+S.value),(Z=z.value)==null||Z.forEach(D=>{var ye;const le=(ye=sa.FormButton)==null?void 0:ye.find(ue=>(ue==null?void 0:ue.label)===(D==null?void 0:D.label));le&&(ne[le.key]=D.value)}),(de=v.value)!=null&&de.find(D=>D.id===ne.id))v.value=(Ke=v.value)==null?void 0:Ke.map(D=>(D.id===ne.id&&(D=ne),D));else{let D=I.cloneDeep(v.value);v.value||(v.value=[]),D.push(ne),v.value=D}h.value=!1,u.value="";let ke=I.cloneDeep(n.originalItemContents);(Na=I.cloneDeep(n.originalItemContents))!=null&&Na.find(D=>(D==null?void 0:D.key)==="formButton")?ke=(te=I.cloneDeep(n.originalItemContents))==null?void 0:te.map(D=>((D==null?void 0:D.key)==="formButton"&&(D.contents=v.value),D)):ke.push({key:"formButton",contents:v.value}),t("change",ke)},b=ne=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ke,Z;m.value=(ke=I.cloneDeep(m.value))==null?void 0:ke.filter(de=>(de==null?void 0:de.id)!==(ne==null?void 0:ne.id)),t("change",(Z=I.cloneDeep(n.originalItemContents))==null?void 0:Z.map(de=>((de==null?void 0:de.key)==="formContent"&&(de.contents=m.value),de))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=ne=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var ke,Z;v.value=(ke=I.cloneDeep(v.value))==null?void 0:ke.filter(de=>(de==null?void 0:de.id)!==(ne==null?void 0:ne.id)),t("change",(Z=I.cloneDeep(n.originalItemContents))==null?void 0:Z.map(de=>((de==null?void 0:de.key)==="formButton"&&(de.contents=v.value),de))),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},T=()=>{var ke;h.value=!0;let ne=[];(ke=sa.FormButton)==null||ke.forEach(Z=>{S.value++,ne.push({label:Z==null?void 0:Z.label,name:Z==null?void 0:Z.label,type:Z.type,value:(Z==null?void 0:Z.label)==="类型"?"normal":"",id:S.value,contents:Z==null?void 0:Z.options})}),z.value=ne,w.value=ne},x=()=>{var ke,Z,de;s.value=!0;let ne=[];(de=(Z=(ke=sa.FormContent)==null?void 0:ke.find(Ke=>(Ke==null?void 0:Ke.key)==="Input"))==null?void 0:Z.value)==null||de.forEach(Ke=>{S.value++,ne.push({label:Ke==null?void 0:Ke.label,name:Ke==null?void 0:Ke.label,type:Ke.type,value:(Ke==null?void 0:Ke.label)==="类型"?"Input":"",id:S.value,contents:Ke==null?void 0:Ke.options})}),c.value=ne,g.value=ne},k=ne=>{let ke=I.cloneDeep(w.value);ke=ke==null?void 0:ke.map(Z=>(Z.value=ne==null?void 0:ne[Z.name],Z)),w.value=ke},$=ne=>{const ke=ne.find(Ke=>(Ke==null?void 0:Ke.name)==="类型");if((ke==null?void 0:ke.value)!="Select")return;const Z=ne.find(Ke=>(Ke==null?void 0:Ke.name)==="多选"),de=ne.find(Ke=>(Ke==null?void 0:Ke.name)==="初始值");Z!=null&&Z.value&&bo.isString(de.value)&&(de.value=[de.value]),!(Z!=null&&Z.value)&&!bo.isString(de.value)&&(de.value="")},U=async ne=>{var ke,Z,de,Ke,Na,te,D,le,ye,ue,Ne,pa;if((ne==null?void 0:ne.类型)!==((Z=(ke=g.value)==null?void 0:ke.find(wa=>(wa==null?void 0:wa.label)==="类型"))==null?void 0:Z.value)){let wa=[];const ja=await((Na=(Ke=(de=sa.FormContent)==null?void 0:de.find(ee=>(ee==null?void 0:ee.key)===((ne==null?void 0:ne.类型)===""?"Input":ne==null?void 0:ne.类型)))==null?void 0:Ke.value)==null?void 0:Na.value)?await((ue=(ye=(le=sa.FormContent)==null?void 0:le.find(ee=>(ee==null?void 0:ee.key)===((ne==null?void 0:ne.类型)===""?"Input":ne==null?void 0:ne.类型)))==null?void 0:ye.value)==null?void 0:ue.value):(D=(te=sa.FormContent)==null?void 0:te.find(ee=>(ee==null?void 0:ee.key)===((ne==null?void 0:ne.类型)===""?"Input":ne==null?void 0:ne.类型)))==null?void 0:D.value;if(ja==null||ja.forEach(ee=>{var Pe,xa;S.value++;const ea=xu(ee==null?void 0:ee.default)?(ne==null?void 0:ne[ee.label])??ee.value??"":ee==null?void 0:ee.default;wa.push({label:ee==null?void 0:ee.label,name:ee==null?void 0:ee.label,type:ee.type,value:ea,prop:ee==null?void 0:ee.prop,id:S.value,contents:ee==null?void 0:ee.options,width:((xa=(Pe=g.value)==null?void 0:Pe[0])==null?void 0:xa.width)??1})}),ne!=null&&ne.菜单选项&&((Ne=ne==null?void 0:ne.菜单选项)==null?void 0:Ne.length)>0){const ee=await sa.menuToContentType(ne==null?void 0:ne.菜单选项);wa=wa==null?void 0:wa.map(ea=>((ea==null?void 0:ea.name)==="组信息选项"&&(ea.contents=ee),ea))}$(wa),g.value=await sa.selectToBase(I.cloneDeep(wa)),c.value=await sa.selectToBase(I.cloneDeep(wa))}else{let wa=I.cloneDeep(g.value);if(wa=wa==null?void 0:wa.map(ja=>(ja.value=ne==null?void 0:ne[ja.name],ja)),ne!=null&&ne.菜单选项&&((pa=ne==null?void 0:ne.菜单选项)==null?void 0:pa.length)>0){const ja=await sa.menuToContentType(ne==null?void 0:ne.菜单选项);wa=wa==null?void 0:wa.map(ee=>((ee==null?void 0:ee.name)==="组信息选项"&&(ee.contents=ja),ee))}wa=sa.formToOptionsContents(wa),$(wa),g.value=await sa.selectToBase(I.cloneDeep(wa))}},X=ne=>{ne||(c.value=g.value)},be=async ne=>{await U(ne),c.value=g.value},ze=La.debounce(async()=>{var de,Ke,Na,te,D,le,ye,ue,Ne,pa,wa,ja;c.value=g.value;let ne={};ne.width=((Ke=(de=c.value)==null?void 0:de[0])==null?void 0:Ke.width)??1,u.value!==""?ne.id=u.value:(S.value++,ne.id="id"+S.value);let ke=await((D=(te=(Na=sa.FormContent)==null?void 0:Na.find(ee=>{var ea,Pe;return(ee==null?void 0:ee.key)===(((Pe=(ea=c.value)==null?void 0:ea.find(xa=>(xa==null?void 0:xa.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:te.value)==null?void 0:D.value)??((ye=(le=sa.FormContent)==null?void 0:le.find(ee=>{var ea,Pe;return(ee==null?void 0:ee.key)===(((Pe=(ea=c.value)==null?void 0:ea.find(xa=>(xa==null?void 0:xa.label)==="类型"))==null?void 0:Pe.value)??"label")}))==null?void 0:ye.value);if((ue=c.value)==null||ue.forEach(ee=>{const ea=ke==null?void 0:ke.find(Pe=>(Pe==null?void 0:Pe.label)===(ee==null?void 0:ee.label));ea&&(ne[ea.key]=ee.value)}),ne.width=ne.width?ne.width:1,ne.key=ne==null?void 0:ne.label,ne.isFormColHidden=ne==null?void 0:ne.isFormColHidden,(Ne=m.value)!=null&&Ne.find(ee=>ee.id===ne.id))m.value=(pa=m.value)==null?void 0:pa.map(ee=>(ee.id===ne.id&&(ee=ne),ee));else{let ee=I.cloneDeep(m.value);ee.push(ne),m.value=ee}m.value=m.value.map(({id:ee,...ea})=>ea),s.value=!1,u.value="";let Z=I.cloneDeep(n.originalItemContents);(wa=I.cloneDeep(n.originalItemContents))!=null&&wa.find(ee=>(ee==null?void 0:ee.key)==="formContent")?Z=(ja=I.cloneDeep(n.originalItemContents))==null?void 0:ja.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=m.value),ee)):Z.push({key:"formContent",contents:m.value}),t("change",Z)},300),Ee=()=>{s.value=!1,h.value=!1,u.value="",g.value=[],w.value=[]};return a.watch(()=>n.originalItemContents,()=>{var ke,Z,de,Ke,Na,te;if(!n.originalItemContents||n.originalItemContents.length===0)return;const ne=I.cloneDeep(n.originalItemContents);m.value=((ke=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="formContent"))==null?void 0:ke.contents)??[],v.value=((Z=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="formButton"))==null?void 0:Z.contents)??[],_.value=(de=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&de.contents?!((Ke=ne==null?void 0:ne.find(D=>(D==null?void 0:D.key)==="enableWrap"))!=null&&Ke.contents):!0,m.value=(Na=I.cloneDeep(m.value))==null?void 0:Na.map((D,le)=>{var ue;let ye=D;return ye.id=(D==null?void 0:D.id)??le,D!=null&&D.label||(D.label=(D==null?void 0:D.key)??(D==null?void 0:D.label)??""),D!=null&&D.type||(D.type=(D==null?void 0:D.type)??""),D.contents=((ue=D==null?void 0:D.options)==null?void 0:ue.length)===0?(D==null?void 0:D.contents)??"":D==null?void 0:D.options,ye}),m.value=sa.formToOptionsContents(m.value),v.value=(te=v.value)==null?void 0:te.map((D,le)=>D={label:(D==null?void 0:D.label)??"",type:(D==null?void 0:D.type)??"",background:(D==null?void 0:D.background)??"var(--ssComponent-primary-color)",id:le})},{deep:!0,immediate:!0}),(ne,ke)=>{const Z=a.resolveComponent("svg-icon"),de=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",W1,[a.createElementVNode("div",K1,[a.createElementVNode("div",Y1,[ke[2]||(ke[2]=a.createElementVNode("div",null,a.toDisplayString("表单内容"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:x},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[ke[1]||(ke[1]=a.createElementVNode("div",null,a.toDisplayString("新增"),-1))]),_:1,__:[1]})]),a.createElementVNode("div",G1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(m.value,(Ke,Na)=>(a.openBlock(),a.createElementBlock("div",{key:Na},[a.createElementVNode("div",J1,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",X1,[a.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>A(Ke)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>b(Ke)},null,8,["onClick"])])])]))),128))]),a.createElementVNode("div",Z1,[ke[4]||(ke[4]=a.createElementVNode("div",null,a.toDisplayString("表单按钮"),-1)),a.createVNode(de,{class:"icon-content",id:"themeButton",onClick:T},{icon:a.withCtx(()=>[a.createVNode(Z,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[ke[3]||(ke[3]=a.createTextVNode(" 新增 "))]),_:1,__:[3]})]),a.createElementVNode("div",Q1,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(Ke,Na)=>(a.openBlock(),a.createElementBlock("div",{key:Na},[a.createElementVNode("div",e2,[a.createElementVNode("div",null,a.toDisplayString(Ke.label),1),a.createElementVNode("div",a2,[a.createVNode(Z,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>N(Ke)},null,8,["onClick"]),a.createVNode(Z,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:te=>L(Ke)},null,8,["onClick"])])])]))),128))]),ke[6]||(ke[6]=a.createElementVNode("div",{class:"operate-title"},[a.createElementVNode("div",null,a.toDisplayString("表单布局"))],-1)),a.createElementVNode("div",l2,[ke[5]||(ke[5]=a.createElementVNode("div",{class:"operate-center-content"},a.toDisplayString("是否自动撑宽"),-1)),a.createVNode(pl._sfc_main$1,{modelValue:_.value,"onUpdate:modelValue":ke[0]||(ke[0]=Ke=>_.value=Ke)},null,8,["modelValue"])])]),a.createVNode(vr.ssDialog,{visible:s.value,onBeforeDestroy:Ee,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",r2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:U,onChangeVisible:X,onBlurChange:be},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",n2,[a.createVNode(de,{onClick:Ee,class:"cancel-button button",id:"themeBorderButton"},{default:a.withCtx(()=>ke[7]||(ke[7]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[7]}),a.createVNode(de,{class:"ok-button button",onClick:a.unref(ze),id:"themeButton"},{default:a.withCtx(()=>ke[8]||(ke[8]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[8]},8,["onClick"])])]),_:1},8,["visible"]),a.createVNode(vr.ssDialog,{visible:h.value,onBeforeDestroy:Ee,width:840},{default:a.withCtx(()=>[a.createElementVNode("div",t2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:z.value,key:z.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",{class:"dialog-footer"},[a.createElementVNode("div",{onClick:Ee,class:"cancel-button button"},a.toDisplayString("取消")),a.createElementVNode("div",{class:"ok-button button",onClick:Y},a.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},hs=Ul._export_sfc(o2,[["__scopeId","data-v-20850524"]]),i2={class:"step-module content"},s2={class:"module-data"},c2={class:"step-module layout"},u2={class:"form-content"},d2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.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}]),c=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),g=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.reactive({visible:!1,width:"40%",title:"步骤条"}),v=a.ref("create"),m=a.ref({}),u=a.ref([]),_=A=>{var N;m.value=A,t("change",(N=w())==null?void 0:N.compData)},S=(A,N)=>{var Y,b;switch(A){case"create":(Y=c.value)==null||Y.forEach(L=>{L.value=""}),v.value="create",h.visible=!0;break;case"update":(b=c.value)==null||b.forEach(L=>{L.value=N[L==null?void 0:L.prop]}),v.value="update",h.visible=!0;break;case"delete":u.value.splice(N,1),v.value="delete";break}},z=A=>{var N,Y,b;if((A==null?void 0:A.buttonName)==="确认"){const L=I.cloneDeep(A==null?void 0:A.content);switch(Object.keys(L).forEach(T=>{L[T]===""&&delete L[T]}),v.value){case"create":u.value.push({...L,index:((N=u.value)==null?void 0:N.length)+1});break;case"update":u.value=(Y=u.value)==null?void 0:Y.map(T=>T.index===(L==null?void 0:L.index)?{...T,title:L==null?void 0:L.title,description:L==null?void 0:L.description}:T);break}t("change",(b=w())==null?void 0:b.compData),h.visible=!1}else h.visible=!1},w=()=>({comp:"Step",compData:[{key:"stepList",contents:u.value},{key:"stepConfig",contents:m.value}]}),j=()=>{h.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,A=>{var N,Y;A&&(m.value=((N=A==null?void 0:A.find(b=>b.key==="stepConfig"))==null?void 0:N.contents)??{},u.value=((Y=A==null?void 0:A.find(b=>b.key==="stepList"))==null?void 0:Y.contents)??[])},{immediate:!0}),(A,N)=>{const Y=a.resolveComponent("svg-icon"),b=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",i2,[N[2]||(N[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(b,{class:"module-icon",id:"themeButton",onClick:N[0]||(N[0]=L=>S("create"))},{icon:a.withCtx(()=>[a.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[N[1]||(N[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",s2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(L,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString(L==null?void 0:L.title),1),a.createElementVNode("div",null,[a.createVNode(b,{type:"primary",size:"small",onClick:x=>S("update",{...L,index:T+1})},{default:a.withCtx(()=>N[3]||(N[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(b,{type:"danger",size:"small",onClick:x=>S("delete",T)},{default:a.withCtx(()=>N[4]||(N[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",c2,[N[5]||(N[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:s.value,onChange:_},null,8,["rowContents"])])]),a.createVNode(vr.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:j,width:h.width},{default:a.withCtx(()=>[a.createElementVNode("div",u2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),p2=Ul._export_sfc(d2,[["__scopeId","data-v-7dbd17f2"]]),f2={class:"step-module content"},h2={class:"module-data"},v2={class:"step-module layout"},m2={class:"form-content"},y2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref("create"),c=a.ref({}),g=a.ref([]),h=a.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}]),v=a.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),u=a.reactive({visible:!1,width:"40%",title:"时间线"}),_=A=>{var N;c.value=A,t("change",(N=w())==null?void 0:N.compData)},S=(A,N)=>{var Y,b;switch(A){case"create":(Y=v.value)==null||Y.forEach(L=>{L.value=""}),s.value="create",u.visible=!0;break;case"update":(b=v.value)==null||b.forEach(L=>{L.value=N[L==null?void 0:L.prop]}),s.value="update",u.visible=!0;break;case"delete":g.value.splice(N,1),s.value="delete";break}},z=A=>{var N,Y,b,L;if((A==null?void 0:A.buttonName)==="确认"){const T=I.cloneDeep(A==null?void 0:A.content);switch(Object.keys(T).forEach(x=>{T[x]===""&&delete T[x]}),s.value){case"create":(Y=g.value)==null||Y.push({...T,index:((N=g.value)==null?void 0:N.length)+1});break;case"update":g.value=(b=g.value)==null?void 0:b.map(x=>x.index===(T==null?void 0:T.index)?{...x,content:T==null?void 0:T.content,timestamp:T==null?void 0:T.timestamp}:x);break}t("change",(L=w())==null?void 0:L.compData),u.visible=!1}else u.visible=!1},w=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:g.value},{key:"timeLineConfig",contents:c.value}]}),j=()=>{u.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,A=>{var N,Y;A&&(c.value=((N=A==null?void 0:A.find(b=>b.key==="timeLineConfig"))==null?void 0:N.contents)??{},g.value=((Y=A==null?void 0:A.find(b=>b.key==="timeLineList"))==null?void 0:Y.contents)??[])},{immediate:!0}),(A,N)=>{const Y=a.resolveComponent("svg-icon"),b=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",f2,[N[2]||(N[2]=a.createElementVNode("h4",{class:"module-title"},"内容",-1)),a.createVNode(b,{class:"module-icon",id:"themeButton",onClick:N[0]||(N[0]=L=>S("create"))},{icon:a.withCtx(()=>[a.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[N[1]||(N[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",h2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(g.value,(L,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString(L==null?void 0:L.content),1),a.createElementVNode("div",null,[a.createVNode(b,{type:"primary",size:"small",onClick:x=>S("update",{...L,index:T+1})},{default:a.withCtx(()=>N[3]||(N[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(b,{type:"danger",size:"small",onClick:x=>S("delete",T)},{default:a.withCtx(()=>N[4]||(N[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",v2,[N[5]||(N[5]=a.createElementVNode("div",{class:"module-title"},"布局",-1)),a.createVNode(pl.ssForm,{rowContents:h.value,onChange:_},null,8,["rowContents"])])]),a.createVNode(vr.ssDialog,{visible:u.visible,title:u.title,onBeforeDestroy:j,width:u.width},{default:a.withCtx(()=>[a.createElementVNode("div",m2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),g2=Ul._export_sfc(y2,[["__scopeId","data-v-39ffc861"]]),b2={};function k2(l,r){return a.openBlock(),a.createElementBlock("div")}const x2=Ul._export_sfc(b2,[["render",k2]]),_2={class:"extra-content"},w2={key:0},C2={key:1},S2={class:"dialog-footer"},E2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(l,{emit:r}){const n=l,t=a.ref(0),s=a.ref(),c=a.ref(),g=r,h=a.ref(!1),v=a.ref({}),m=a.ref({}),u=a.ref();a.watch(()=>[n.itemData],()=>{var L;const b=I.cloneDeep(n.itemData);s.value=(L=I.cloneDeep(b))==null?void 0:L.map(T=>{var x;if(T.key==="extra"){let k=[];(x=T.value)==null||x.forEach($=>{var U;k.push((U=Object.values($))==null?void 0:U[0])}),T.value=k}return T})},{deep:!0,immediate:!0});const _=(b,L,T,x)=>{var $;let k={};(($=b==null?void 0:b[0])==null?void 0:$.contents)==="详情"&&(h.value=!0,k[L]=b,c.value=b==null?void 0:b.filter(U=>(U==null?void 0:U.key)!=="tableContentName"),v.value=k,m.value=T,u.value=x.id)},S=b=>{var U,X,be,ze;const L=(X=(U=Object.values(I.cloneDeep(v.value)))==null?void 0:U[0])==null?void 0:X.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),T=(ze=(be=Object.values(I.cloneDeep(v.value)))==null?void 0:be[0])==null?void 0:ze.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),x=T==null?void 0:T.map((Ee,ne)=>{var ke;return ne===b.index&&(Ee==null?void 0:Ee.comp)==="Table"&&(Ee.compData=(ke=Ee.compData)==null?void 0:ke.map(Z=>{var de,Ke;return(Z==null?void 0:Z.key)==="tableContents"&&(Z.contents=(Ke=(de=b.content)==null?void 0:de.map(Na=>{let te={};for(let D in Na)D!=="id"&&(te[D]=Na[D]);return te}))==null?void 0:Ke.map(Na=>Object.values(Na))),Z})),Ee});x.unshift(L==null?void 0:L[0]);let k=I.cloneDeep(v.value),$={};for(let Ee in k)$[Ee]=x;v.value=$},z=()=>{h.value=!1,v.value={},m.value={},u.value=void 0,t.value++},w=b=>{var U,X,be,ze;const L=(X=(U=Object.values(I.cloneDeep(v.value)))==null?void 0:U[0])==null?void 0:X.filter(Ee=>(Ee==null?void 0:Ee.key)==="tableContentName"),T=(ze=(be=Object.values(I.cloneDeep(v.value)))==null?void 0:be[0])==null?void 0:ze.filter(Ee=>(Ee==null?void 0:Ee.key)!=="tableContentName"),x=T==null?void 0:T.map((Ee,ne)=>(ne===b.index&&(Ee.compData=b.contents),Ee));x.unshift(L==null?void 0:L[0]);let k=I.cloneDeep(v.value),$={};for(let Ee in k)$[Ee]=x;v.value=$},j=()=>{var L,T;let b={};for(let x in m.value)x===((L=Object.keys(v.value))==null?void 0:L[0])?b[x]=(T=Object.values(v.value))==null?void 0:T[0]:b[x]=m.value[x];g("change",{buttonName:"编辑",index:u.value,singleContent:b},"methodData"),h.value=!1,v.value={},m.value={},u.value=void 0},A=()=>{h.value=!1,v.value={},m.value={},u.value=void 0},N=b=>{g("change",b,"methodData")},Y=b=>St(b);return(b,L)=>{const T=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock("div",_2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(x,k)=>(a.openBlock(),a.createElementBlock("div",{key:t.value},[(x==null?void 0:x.key)==="extra"?(a.openBlock(),a.createElementBlock("div",w2)):(a.openBlock(),a.createElementBlock("div",C2,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Y(x.comp)),{itemData:x==null?void 0:x.compData,childItemData:x==null?void 0:x.itemChildData,key:k,index:(x==null?void 0:x.id)??k,onContentClick:_,onChange:N},null,40,["itemData","childItemData","index"]))]))]))),128)),a.createVNode(vr.ssDialog,{visible:h.value,onBeforeDestroy:A},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value,(x,k)=>(a.openBlock(),a.createElementBlock("div",{key:k,class:"extra-dialog"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(Y(x.comp)),{itemData:x==null?void 0:x.compData,onChange:S,childItemData:x==null?void 0:x.itemChildData,key:k,onContentChange:w,index:(x==null?void 0:x.id)??k,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:a.withCtx(()=>[a.createElementVNode("div",S2,[a.createVNode(T,{class:"cancel-button footer-button",onClick:z,id:"themeBorderButton"},{default:a.withCtx(()=>L[0]||(L[0]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[0]}),a.createVNode(T,{class:"confirm-button footer-button",onClick:j,id:"themeButton"},{default:a.withCtx(()=>L[1]||(L[1]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[1]})])]),_:1},8,["visible"])])}}},D2=Ul._export_sfc(E2,[["__scopeId","data-v-2d9c5ab2"]]),B2={key:0,class:"method-content"},N2={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(l){const r=a.ref([]),n=sa.useOriginalState(I.pinia),{originalPath:t}=I.storeToRefs(n),s=l,c=a.ref(!1),g=a.ref(),h=sa.useTableComp(I.pinia),{multipleTableConst:v}=I.storeToRefs(h),m=I.useModelComp(I.pinia),u=a.ref(!1),_=I.useMenuState(I.pinia),S=I.useLoginState(I.pinia),{itemData:z,isEdit:w,routeToChildPath:j,tableViewContents:A,lockingPage:N,payloadTypes:Y}=I.storeToRefs(m),{activeMenuPath:b,platform:L,childMenu:T}=I.storeToRefs(_),{loginUserInfo:x}=I.storeToRefs(S),k=a.ref(!1),$=async()=>{var te,D;(te=r.value)!=null&&te.find(le=>(le==null?void 0:le.buttonName)==="保存")&&await Z((D=r.value)==null?void 0:D.find(le=>(le==null?void 0:le.buttonName)==="保存")),await sa.onSaveBack()};a.watch(()=>z.value,async()=>{w.value==="view"&&!k.value&&await Na(I.cloneDeep(s.itemData)),k.value=!1},{deep:!0});const U=()=>{c.value=!1,g.value=void 0},X=te=>te.map(D=>{const le={};for(const ye in D){const ue=D[ye];if(ye.includes(v.value)){const Ne=ye.split(v.value);let pa=le;Ne.forEach((wa,ja)=>{ja===Ne.length-1?pa[wa]=ue:(pa[wa]||(pa[wa]={}),pa=pa[wa])})}else le[ye]=ue}return le}),be=async(te,D,le=[])=>{var ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va;let ye=(ue=I.cloneDeep(D))==null?void 0:ue.filter(P=>(P==null?void 0:P.comp)!=="methodButton");if(te!=null&&te.includes("[")){let P=(ee=(ja=(wa=(pa=(Ne=I.cloneDeep(te))==null?void 0:Ne.split("["))==null?void 0:pa[1])==null?void 0:wa.split("]"))==null?void 0:ja[0])==null?void 0:ee.split(":"),F="";if(P!=null&&P[0]){let J=(ea=ye==null?void 0:ye.find(ie=>(ie==null?void 0:ie.name)===(P==null?void 0:P[0])))==null?void 0:ea.compData;if(!J){let ie=(Pe=te==null?void 0:te.split("["))==null?void 0:Pe[0],ce=await sa.getItemData(ie,sessionStorage.getItem("systemKey"),"",!1,"","",le);J=(xa=ce==null?void 0:ce.find(ma=>(ma==null?void 0:ma.name)===(P==null?void 0:P[0])))==null?void 0:xa.compData}J==null||J.forEach(ie=>{var ce,ma,na,Ie,_e,Ca;if((ie==null?void 0:ie.key)==="formContent")(ce=ie==null?void 0:ie.contents)==null||ce.forEach(ve=>{var Je;(ve==null?void 0:ve.key)===(P==null?void 0:P[1])&&(Array.isArray(ve==null?void 0:ve.value)?F=ve==null?void 0:ve.value:F=(Je=ve==null?void 0:ve.value)==null?void 0:Je.toString())});else if((ie==null?void 0:ie.key)==="tableContents"){let ve=[],Je=(ma=J==null?void 0:J.find(Fe=>(Fe==null?void 0:Fe.key)==="header"))==null?void 0:ma.contents,Qe=(P==null?void 0:P[1])??"";if(Je!=null&&Je.every(Fe=>Array.isArray(Fe))){let Fe=sa.getColumnChild((_e=Je==null?void 0:Je[0])==null?void 0:_e.filter(_a=>(_a==null?void 0:_a.label)!=="操作"));(Ca=ie.contents)==null||Ca.forEach(_a=>{let Le={};_a=_a==null?void 0:_a.filter(va=>!(va!=null&&va.id)),Fe==null||Fe.forEach((va,re)=>{let Se=_a[re];typeof _a[re]=="number"&&(Se=_a[re].toString()),(Qe===""||Qe===va.prop)&&(Le[va.prop]=Se)}),ve.push(Le)}),ve=X(ve)}else{let Fe=(na=Je==null?void 0:Je.map(_a=>_a==null?void 0:_a.label))==null?void 0:na.filter(_a=>_a!=="操作");(Ie=ie.contents)==null||Ie.forEach(_a=>{let Le={};_a=_a==null?void 0:_a.filter(va=>!(va!=null&&va.id)),Fe==null||Fe.forEach((va,re)=>{let Se=_a[re];typeof _a[re]=="number"&&(Se=_a[re].toString()),(Qe===""||Qe===va)&&(Le[va]=Se)}),ve.push(Le)})}F=ve}})}return F}else if(te!=null&&te.includes("/")){let P={};return(He=I.cloneDeep(ye))==null||He.forEach((F,J)=>{var ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De;if((F==null?void 0:F.comp)==="Table"){let Ma=Array.isArray((ma=(ce=(ie=F==null?void 0:F.compData)==null?void 0:ie.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:ce.contents)==null?void 0:ma[0])?(Ca=(_e=(Ie=(na=F==null?void 0:F.compData)==null?void 0:na.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:Ie.contents)==null?void 0:_e[0])==null?void 0:Ca.some(Ae=>Ae==null?void 0:Ae.children):[],Ba=(Qe=(Je=(ve=F==null?void 0:F.compData)==null?void 0:ve.find(Ae=>(Ae==null?void 0:Ae.key)==="tableContents"))==null?void 0:Je.contents)==null?void 0:Qe.map(Ae=>(Ae!=null&&Ae.find(we=>we==null?void 0:we.id)&&(Ae=Ae.slice(1)),Ae)),Ua=(re=(va=(Le=(_a=(Fe=F==null?void 0:F.compData)==null?void 0:Fe.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:_a.contents)==null?void 0:Le[0])==null?void 0:va[0])==null?void 0:re.label,Aa=(K=(Se=F==null?void 0:F.compData)==null?void 0:Se.find(Ae=>(Ae==null?void 0:Ae.key)==="header"))==null?void 0:K.contents;if(Ma)(Ma==null?void 0:Ma.length)===0?P[F.name]=P!=null&&P[F.name]?P[F.name]:sa.tableToForm(Ba,Aa):P[Ua]=sa.tableToForm(Ba,Aa);else{const Ae=[];Aa=Aa.slice(1,Aa.length-1),Aa==null||Aa.forEach((we,Ea)=>{Ba==null||Ba.forEach(Ge=>{Ae.push({key:we.label+Ge[0],value:Ge[Ea+1]})})}),P["form"+J]=Ae}}else{const Ma=(De=(je=F.compData)==null?void 0:je.find(Ua=>(Ua==null?void 0:Ua.key)==="formContent"))==null?void 0:De.contents;P!=null&&P.form||(P.form=[]);const Ba=[];Ma==null||Ma.forEach(Ua=>{Ua.key!==""&&(Ua={key:(Ua==null?void 0:Ua.key)??(Ua==null?void 0:Ua.label),value:Ua==null?void 0:Ua.value},Ba.push(Ua))}),P.form=[...Ba,...I.cloneDeep(P==null?void 0:P.form)]}}),P}else{if(te==="createInsofDataApi"){let P=(Te=I.cloneDeep(D))==null?void 0:Te[0];return P={comp:(Re=I.cloneDeep(P))==null?void 0:Re.comp,compData:(Ye=I.cloneDeep(P))==null?void 0:Ye.compData,name:(qa=I.cloneDeep(P))==null?void 0:qa.name,isShow:(Va=I.cloneDeep(P))==null?void 0:Va.isShow},{key:{type:"structure",systemKey:sessionStorage.getItem("systemKey"),parentTable:"",pageKey:b.value},value:{pageData:P}}}return te}},ze=async(te,D,le)=>{var Ne,pa,wa;let ye=await sa.getItemData(D,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(ja=>(ja==null?void 0:ja.name)===(le==null?void 0:le[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let ja={};for(let Re in I.cloneDeep(te))I.cloneDeep(te)[Re]!=="loginUser"?ja[Re]=I.cloneDeep(te)[Re]:ja[Re]=((Ne=x.value)==null?void 0:Ne.account)||((pa=x.value)==null?void 0:pa.账号);let ee=[],ea=ja;Array.isArray(te)||(ea=[ja]),ea==null||ea.forEach(Re=>{ee.push({[Re[le[1]]]:Re})});let Pe=[],xa=ee==null?void 0:ee.map(Re=>{var Ye;return(Ye=Object.keys(Re))==null?void 0:Ye[0]});ye==null||ye.forEach(Re=>{var Ye;(Re==null?void 0:Re.name)===(le==null?void 0:le[0])&&((Ye=Re==null?void 0:Re.compData)==null||Ye.forEach(qa=>{var Va;(qa==null?void 0:qa.key)==="tableContents"&&((Va=qa==null?void 0:qa.contents)==null||Va.forEach(P=>{P!=null&&P.some(F=>xa.includes(F))&&Pe.push({[P.find(F=>F.id).id]:P.find(F=>xa.includes(F))})}))}))});let He=Pe==null?void 0:Pe.map(Re=>{var Ye;return(Ye=Object.keys(Re))==null?void 0:Ye[0]}),Te=[];if(He==null||He.forEach(Re=>{var Va;let Ye=(Va=Pe==null?void 0:Pe.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0].toString())===Re.toString()}))==null?void 0:Va[Re],qa=ee==null?void 0:ee.find(P=>{var F;return((F=Object.keys(P))==null?void 0:F[0])===Ye});Te.push({id:parseInt(Re),value:{tableData:qa[Ye]}})}),(Te==null?void 0:Te.length)>0)return Te}else if((ue==null?void 0:ue.comp)==="Form"){let ja=I.cloneDeep(ue);ja.compData=(wa=ja.compData)==null?void 0:wa.map(Pe=>{var xa;return(Pe==null?void 0:Pe.key)==="formContent"&&(Pe.contents=(xa=Pe.contents)==null?void 0:xa.map(He=>((He==null?void 0:He.key)===(le==null?void 0:le[1])&&(He.value=(te==null?void 0:te[He==null?void 0:He.prop])||te),He))),Pe});let ee={};for(let Pe in ja)Pe!=="id"&&(ee[Pe]=ja[Pe]);let ea=[];if(ea.push({id:ue==null?void 0:ue.id,keyType:le==null?void 0:le[1],value:{pageData:ee}}),(ea==null?void 0:ea.length)>0)return ea}}},Ee=async(te,D,le)=>{var Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te;let ye=await sa.getItemData(D,sessionStorage.getItem("systemKey"),""),ue=ye==null?void 0:ye.find(Re=>(Re==null?void 0:Re.name)===(le==null?void 0:le[0]));if(ue){if((ue==null?void 0:ue.comp)==="Table"){let Re={};for(let Ye in I.cloneDeep(te))I.cloneDeep(te)[Ye]!=="loginUser"?Re[Ye]=I.cloneDeep(te)[Ye]:Re[Ye]=((Ne=x.value)==null?void 0:Ne.account)||((pa=x.value)==null?void 0:pa.账号);await yr.createInsofDataApi({key:{type:"data",pageKey:D,tableId:ue==null?void 0:ue.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:Re}})}else if((ue==null?void 0:ue.comp)==="Form"){let Re=I.cloneDeep(ue),Ye=Object.keys(te),qa="";(ja=(wa=I.cloneDeep(Re))==null?void 0:wa.compData)==null||ja.forEach(ce=>{var ma,na;(ce==null?void 0:ce.key)==="formContent"&&((na=(ma=I.cloneDeep(ce))==null?void 0:ma.contents)==null||na.forEach(Ie=>{var _e;Ye.includes(Ie==null?void 0:Ie.key)&&(Ie==null?void 0:Ie.value)===((_e=x.value)==null?void 0:_e.姓名)&&(qa=Ie==null?void 0:Ie.key)}))});let Va=[];(ee=Object.values(te[qa]))==null||ee.forEach(ce=>{ce!=null&&ce.includes("(")&&Va.push(ce)}),Va=[...new Set(Va)];const P=Va==null?void 0:Va.map(async ce=>{var Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je;let ma="";(_a=(Fe=(Qe=(Je=(ve=(Ca=I.cloneDeep(ce))==null?void 0:Ca.split("("))==null?void 0:ve[1])==null?void 0:Je.split(")"))==null?void 0:Qe[0])==null?void 0:Fe.split(":"))==null||_a.forEach(De=>{ma=ma===""?ma+De.replaceAll("'",""):ma+"/"+De.replaceAll("'","")});let na=[];(je=(K=(Se=(re=(va=(Le=I.cloneDeep(ce))==null?void 0:Le.split("<"))==null?void 0:va[1])==null?void 0:re.split(">"))==null?void 0:Se[0])==null?void 0:K.split(":"))==null||je.forEach(De=>{na.push(De.replaceAll("'",""))});const Ie=await sa.getItemData(ma,sessionStorage.getItem("systemKey"),"");let _e="";return Ie==null||Ie.forEach(De=>{var Ma;De.name===(na==null?void 0:na[0])&&((Ma=De==null?void 0:De.compData)==null||Ma.forEach(Ba=>{var Ua;(Ba==null?void 0:Ba.key)==="formContent"&&((Ua=Ba.contents)==null||Ua.forEach(Aa=>{(Aa==null?void 0:Aa.key)===(na==null?void 0:na[1])&&(_e=Aa==null?void 0:Aa.value)}))}))}),{[ce]:_e}}),F=await Promise.all(P);Re.compData=(Pe=(ea=I.cloneDeep(Re))==null?void 0:ea.compData)==null?void 0:Pe.map(ce=>{var ma,na;return(ce==null?void 0:ce.key)==="formContent"&&(ce.contents=(na=(ma=I.cloneDeep(ce))==null?void 0:ma.contents)==null?void 0:na.map(Ie=>{var _e,Ca,ve,Je;return(_e=te[qa])!=null&&_e[Ie==null?void 0:Ie.key]&&(te[qa][Ie==null?void 0:Ie.key].includes("(")?Ie.value=(Ca=F==null?void 0:F.find(Qe=>{var Fe;return((Fe=Object.keys(Qe))==null?void 0:Fe[0])===te[qa][Ie==null?void 0:Ie.key]}))==null?void 0:Ca[te[qa][Ie==null?void 0:Ie.key]]:Ie.value=(Je=(ve=I.cloneDeep(te))==null?void 0:ve[qa])==null?void 0:Je[Ie==null?void 0:Ie.key]),Ie})),ce});const J=await yr.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let ie="";((xa=J==null?void 0:J.data)==null?void 0:xa.type)==="success"&&((Te=(He=J==null?void 0:J.data)==null?void 0:He.result)==null||Te.forEach(ce=>{var ma,na;((na=(ma=ce==null?void 0:ce.value)==null?void 0:ma.pageData)==null?void 0:na.name)===(le==null?void 0:le[0])&&(ie=ce.id)}),await yr.updateInsofDataApi({id:ie,value:{pageData:Re}}))}}},ne=(te,D="",le={})=>{for(const[ye,ue]of Object.entries(te)){const Ne=D?`${D}.${ye}`:ye;ue!==null&&typeof ue=="object"&&!Array.isArray(ue)&&Object.prototype.toString.call(ue)!=="[object Date]"?ne(ue,Ne,le):le[Ne]=ue}return le},ke=async(te,D,le,ye)=>{var pa,wa,ja,ee,ea,Pe,xa,He,Te,Re,Ye,qa,Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je;let ue=await sa.getItemData(D,sessionStorage.getItem("systemKey"),""),Ne=ue==null?void 0:ue.find(Qe=>(Qe==null?void 0:Qe.name)===(le==null?void 0:le[0]));if(Ne){if(!(le!=null&&le[1])&&(Ne==null?void 0:Ne.comp)==="Table"){let Qe={},Fe=[],_a=(wa=(pa=Ne==null?void 0:Ne.compData)==null?void 0:pa.find(re=>(re==null?void 0:re.key)==="header"))==null?void 0:wa.contents;_a!=null&&_a.every(re=>Array.isArray(re))?Fe=(ee=sa.getColumnChild((ja=_a==null?void 0:_a[0])==null?void 0:ja.filter(re=>(re==null?void 0:re.label)!=="操作")))==null?void 0:ee.map(re=>re==null?void 0:re.prop):Fe=_a==null?void 0:_a.map(re=>re==null?void 0:re.label);for(let re in I.cloneDeep(te))if(I.cloneDeep(te)[re]!=="loginUser"){let Se=ne(I.cloneDeep(te)[re]),K={};for(let je in Se)if(Fe!=null&&Fe.find(De=>De===je))K[je]=Se[je];else if(Fe!=null&&Fe.find(De=>(De==null?void 0:De.toUpperCase())===(je==null?void 0:je.toUpperCase()))){let De=Fe==null?void 0:Fe.find(Ma=>(Ma==null?void 0:Ma.toUpperCase())===(je==null?void 0:je.toUpperCase()));K[De]=Se[je]}Qe[re]=K}else Qe[re]=((ea=x.value)==null?void 0:ea.account)||((Pe=x.value)==null?void 0:Pe.账号);let Le=await yr.getInsofDataApi({keyLikes:{tableId:Ne==null?void 0:Ne.id}});if(((He=(xa=Le==null?void 0:Le.data)==null?void 0:xa.result)==null?void 0:He.length)>0){let re=(Re=(Te=Le==null?void 0:Le.data)==null?void 0:Te.result)==null?void 0:Re.map(Se=>Se==null?void 0:Se.id);(re==null?void 0:re.length)>0&&await yr.batchDeleteInsofDataApi({ids:re})}let va=[];if((Ye=Ne==null?void 0:Ne.compData)!=null&&Ye.find(re=>(re==null?void 0:re.key)==="pageColumn")&&((P=(Va=(qa=Ne==null?void 0:Ne.compData)==null?void 0:qa.find(re=>(re==null?void 0:re.key)==="pageColumn"))==null?void 0:Va.contents)!=null&&P.includes("["))){const re=await yr.getInsofDataApi({id:Ne==null?void 0:Ne.tableId});let Se=((ce=(ie=(J=(F=re==null?void 0:re.data)==null?void 0:F.result)==null?void 0:J[0])==null?void 0:ie.key)==null?void 0:ce.pageKey)??"";(ma=Object.values(Qe))==null||ma.forEach(K=>{va.push({key:{type:"data",pageKey:Se,tableId:Ne==null?void 0:Ne.tableId,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:K}})})}else(na=Object.values(Qe))==null||na.forEach(re=>{va.push({key:{type:"data",pageKey:D,tableId:Ne==null?void 0:Ne.id,systemKey:sessionStorage.getItem("systemKey")},value:{tableData:re}})});(va==null?void 0:va.length)>0&&await yr.batchAddInsofDataApi({dataList:va})}else if(!(le!=null&&le[1])&&(Ne==null?void 0:Ne.comp)==="Form"){let Qe=I.cloneDeep(Ne);Qe.compData=(_e=(Ie=I.cloneDeep(Qe))==null?void 0:Ie.compData)==null?void 0:_e.map(Le=>{var va,re;return(Le==null?void 0:Le.key)==="formContent"&&(Le.contents=(re=(va=I.cloneDeep(Le))==null?void 0:va.contents)==null?void 0:re.map(Se=>{var K,je;return(K=I.cloneDeep(te))!=null&&K[Se==null?void 0:Se.key]&&(Se.value=(je=I.cloneDeep(te))==null?void 0:je[Se==null?void 0:Se.key]),Se})),Le});const Fe=await yr.getInsofDataApi({key:{type:"structure",pageKey:D,systemKey:sessionStorage.getItem("systemKey")}});let _a="";((Ca=Fe==null?void 0:Fe.data)==null?void 0:Ca.type)==="success"&&((Je=(ve=Fe==null?void 0:Fe.data)==null?void 0:ve.result)==null||Je.forEach(Le=>{var va,re;((re=(va=Le==null?void 0:Le.value)==null?void 0:va.pageData)==null?void 0:re.name)===(le==null?void 0:le[0])&&(_a=Le.id)}),await yr.updateInsofDataApi({id:_a,value:{pageData:Qe}}))}}},Z=async te=>{var D,le,ye,ue,Ne,pa,wa,ja,ee,ea,Pe,xa,He,Te;_.setImportLoading(!0);try{if(te.api){let Re=new WeakMap,Ye=await sa.getItemData((T==null?void 0:T.value)===""?b.value:T==null?void 0:T.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re),qa="";if(Ye=Ye==null?void 0:Ye.map(na=>{var Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se;if((na==null?void 0:na.comp)==="Form")na.compData=(Ie=na.compData)==null?void 0:Ie.map(K=>{var je;return(K==null?void 0:K.key)==="formContent"&&(K.contents=(je=K.contents)==null?void 0:je.map(De=>{var Ma;if((De==null?void 0:De.value)===""&&(De==null?void 0:De.type)==="Select"){let Ba=sa.judgeContents((Ma=I.cloneDeep(De))==null?void 0:Ma.optionUrl,Re);De.value=De.value||Ba}return De})),K});else if((na==null?void 0:na.comp)==="Table"&&(_e=na.compData)!=null&&_e.find(K=>(K==null?void 0:K.key)==="pageColumn")){let K=(ve=(Ca=na.compData)==null?void 0:Ca.find(Ba=>(Ba==null?void 0:Ba.key)==="pageColumn"))==null?void 0:ve.contents,je=((Qe=(Je=na.compData)==null?void 0:Je.find(Ba=>(Ba==null?void 0:Ba.key)==="pageGroup"))==null?void 0:Qe.contents)??"",De=(Le=(_a=(Fe=K==null?void 0:K.split("["))==null?void 0:Fe[1])==null?void 0:_a.split("]"))==null?void 0:Le[0];qa=((va=K==null?void 0:K.split("["))==null?void 0:va[0])+((Se=(re=A.value)==null?void 0:re.find(Ba=>(Ba==null?void 0:Ba.key)===De))==null?void 0:Se.value)}return na}),!(qa===""||qa==="")){const na=await sa.getItemData(qa,sessionStorage.getItem("systemKey"),"",!1,"","",Re);Ye=Ye==null?void 0:Ye.map(Ie=>{var _e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je;if((Ie==null?void 0:Ie.comp)==="Table"&&(_e=Ie.compData)!=null&&_e.find(De=>(De==null?void 0:De.key)==="pageColumn")){let De=(ve=(Ca=Ie.compData)==null?void 0:Ca.find(Ae=>(Ae==null?void 0:Ae.key)==="pageColumn"))==null?void 0:ve.contents,Ma=((Qe=(Je=Ie.compData)==null?void 0:Je.find(Ae=>(Ae==null?void 0:Ae.key)==="pageGroup"))==null?void 0:Qe.contents)??"",Ba=(Le=(_a=(Fe=De==null?void 0:De.split("["))==null?void 0:Fe[1])==null?void 0:_a.split("]"))==null?void 0:Le[0],Ua=((va=De==null?void 0:De.split("["))==null?void 0:va[0])+((Se=(re=A.value)==null?void 0:re.find(Ae=>(Ae==null?void 0:Ae.key)===Ba))==null?void 0:Se.value),Aa=(K=na==null?void 0:na.find(Ae=>(Ae==null?void 0:Ae.name)===(Ma===""?s==null?void 0:s.compName:Ma)))==null?void 0:K.compData;Ie.compData=(je=Ie.compData)==null?void 0:je.map(Ae=>{var we;return(Ae==null?void 0:Ae.key)==="tableContents"&&(Ae.contents=(we=Aa==null?void 0:Aa.find(Ea=>(Ea==null?void 0:Ea.key)==="tableContents"))==null?void 0:we.contents),Ae})}return Ie})}let Va={};if(((le=(D=te==null?void 0:te.extraValues)==null?void 0:D.input)==null?void 0:le.length)>0){const na=(ue=(ye=te==null?void 0:te.extraValues)==null?void 0:ye.input)==null?void 0:ue.map(async Ie=>{var _e;de!=null&&de.find(Ca=>Ca===Ie)?Va=await be(Ie,Ye):Va[Object.keys(Ie)[0]]=await be((_e=Object.values(Ie))==null?void 0:_e[0],Ye,Re)});await Promise.all(na)}else Va=await be("/",Ye);let P=!1;(pa=(Ne=te==null?void 0:te.extraValues)==null?void 0:Ne.output)==null||pa.forEach(na=>{var Ie,_e;(_e=(Ie=Object.values(na))==null?void 0:Ie[0])!=null&&_e.includes(".doc")&&(P=!0)});let F;if(P){const na=I.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"});F=await el.axios.post(te.api,Va,{responseType:"blob",headers:{"Content-Type":"application/json"}}).finally(()=>{na.close()})}else F=await el.axios.post(te.api,Va,{headers:{"Content-Type":"application/json"}});let J=(ea=(ee=(ja=(wa=I.cloneDeep(te))==null?void 0:wa.extraValues)==null?void 0:ja.output)==null?void 0:ee.map(na=>{var Ie,_e,Ca,ve,Je,Qe,Fe,_a,Le,va,re,Se,K,je,De,Ma;if(!((_e=(Ie=Object.values(na))==null?void 0:Ie[0])!=null&&_e.includes(".doc"))){let Ba=(va=(Le=(_a=(ve=I.cloneDeep((Ca=Object.values(na))==null?void 0:Ca[0]))==null?void 0:ve.split("["))==null?void 0:_a[((Fe=(Qe=I.cloneDeep((Je=Object.values(na))==null?void 0:Je[0]))==null?void 0:Qe.split("["))==null?void 0:Fe.length)-1])==null?void 0:Le.split("]"))==null?void 0:va[0],Ua=Ba==null?void 0:Ba.split(":"),Aa=(K=I.cloneDeep((re=Object.values(na))==null?void 0:re[0]))==null?void 0:K.substring(0,I.cloneDeep((Se=Object.values(na))==null?void 0:Se[0]).lastIndexOf("["));if(Aa=(De=I.cloneDeep(Aa))==null?void 0:De.slice(0,((je=I.cloneDeep(Aa))==null?void 0:je.length)-1),Aa!=null&&Aa.includes("[")){let Ae="";if((Ma=sa.contentTransArrayToAll(Aa,"/"))==null||Ma.forEach(we=>{var Ea,Ge,ol,Sl,Nl,Ra,al;if(!(we!=null&&we.includes("[")))Ae=Ae===""?Ae+we.replaceAll("/",""):Ae+"/"+we.replaceAll("/","");else{let ga=I.cloneDeep(we).slice(1,((Ea=I.cloneDeep(we))==null?void 0:Ea.length)-1),qe=(Ra=(Nl=(Sl=(ol=(Ge=I.cloneDeep(ga))==null?void 0:Ge.split("["))==null?void 0:ol[1])==null?void 0:Sl.split("]"))==null?void 0:Nl[0])==null?void 0:Ra.split(":"),rl="",da=(al=Ye==null?void 0:Ye.find(Xe=>(Xe==null?void 0:Xe.name)===(qe==null?void 0:qe[0])))==null?void 0:al.compData;da==null||da.forEach(Xe=>{var oa;(Xe==null?void 0:Xe.key)==="formContent"&&((oa=Xe==null?void 0:Xe.contents)==null||oa.forEach(aa=>{(aa==null?void 0:aa.key)===(qe==null?void 0:qe[1])&&(rl=aa==null?void 0:aa.value)}))}),Ae=Ae===""?Ae+rl.replaceAll("/",""):Ae+"/"+rl.replaceAll("/","")}}),Aa=Ae,Aa[(Aa==null?void 0:Aa.length)-1]!=="/")return Aa}}}))==null?void 0:ea.filter(na=>na);J=[...new Set(I.cloneDeep(J))];let ie=J==null?void 0:J.map(async na=>{let Ie=await sa.getItemData(na,sessionStorage.getItem("systemKey"),"",!1,"","",Re);if((Ie==null?void 0:Ie.length)===0)return await sa.getParentContents(na)});await Promise.all(ie);let ce=[],ma=(He=(xa=(Pe=I.cloneDeep(te))==null?void 0:Pe.extraValues)==null?void 0:xa.output)==null?void 0:He.map(async na=>{var _a,Le,va,re,Se,K,je,De,Ma,Ba,Ua,Aa,Ae,we,Ea,Ge,ol,Sl,Nl,Ra,al,ga,qe,rl,da,Xe,oa,aa,ca,W,la,ka,Ce,Be,Fa,me,fl,Ja,kl,Ha,tl,Za,cl,ul,Wl,ql,Pl,Hl,gr,rr,kr,wr,Sr,un,Jr,dn,Xr,qr,pn,tn,Dr,Zr,Br,Il,Wr,Nr,vn,tt,Kn,In;if((Le=(_a=Object.values(na))==null?void 0:_a[0])!=null&&Le.includes(".doc")){var Ie=new Blob([F.data],{type:"application/octet-stream;charset=UTF-8"}),_e=F.headers["content-disposition"],Ca=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),ve=Ca.exec(_e),Je=ve==null?void 0:ve[1],Qe=document.createElement("a"),Fe=window.URL.createObjectURL(Ie);g.value=[{name:Je,blobUrl:Fe}],c.value=!0}else{let mn=(Ba=(Ma=(De=(re=I.cloneDeep((va=Object.values(na))==null?void 0:va[0]))==null?void 0:re.split("["))==null?void 0:De[((je=(K=I.cloneDeep((Se=Object.values(na))==null?void 0:Se[0]))==null?void 0:K.split("["))==null?void 0:je.length)-1])==null?void 0:Ma.split("]"))==null?void 0:Ba[0],Zl=mn==null?void 0:mn.split(":"),xr=(Ae=I.cloneDeep((Ua=Object.values(na))==null?void 0:Ua[0]))==null?void 0:Ae.substring(0,I.cloneDeep((Aa=Object.values(na))==null?void 0:Aa[0]).lastIndexOf("["));if(xr!=null&&xr.includes("[")?xr=(Ea=I.cloneDeep(xr))==null?void 0:Ea.slice(0,((we=I.cloneDeep(xr))==null?void 0:we.length)-1):xr===""&&(xr=b.value),xr=xr.replaceAll("<","[").replaceAll(">","]"),xr!=null&&xr.includes("[")){let jl="";(Ge=sa.contentTransArrayToAll(xr,"/"))==null||Ge.forEach((zl,cr)=>{var ar,$l,zr,Mr,yn,Qr,Yn,En,Gn,gn,Dn;if(!(zl!=null&&zl.includes("[")))jl=jl===""?jl+zl.replaceAll("/",""):jl+"/"+zl.replaceAll("/","");else{let Ln="",Kr="";(ar=I.cloneDeep(zl))!=null&&ar.includes("]")?(Ln=I.cloneDeep(zl).slice(1,(($l=I.cloneDeep(zl))==null?void 0:$l.length)-1),Kr=(Yn=(Qr=(yn=(Mr=(zr=I.cloneDeep(Ln))==null?void 0:zr.split("["))==null?void 0:Mr[1])==null?void 0:yn.split("]"))==null?void 0:Qr[0])==null?void 0:Yn.split(":")):(Ln=I.cloneDeep(zl).slice(1,(En=I.cloneDeep(zl))==null?void 0:En.length),Kr=(Gn=I.cloneDeep(Ln))==null?void 0:Gn.split("/"));let Bn="",bn=(gn=Ye==null?void 0:Ye.find(Pr=>(Pr==null?void 0:Pr.name)===(Kr==null?void 0:Kr[0])))==null?void 0:gn.compData;bn==null||bn.forEach(Pr=>{var Vn;(Pr==null?void 0:Pr.key)==="formContent"&&((Vn=Pr==null?void 0:Pr.contents)==null||Vn.forEach(fn=>{(fn==null?void 0:fn.key)===(Kr==null?void 0:Kr[1])&&(Bn=fn==null?void 0:fn.value)}))}),((Dn=sa.contentTransArrayToAll(xr,"/"))==null?void 0:Dn.length)-1!==cr?jl=jl===""?jl+Bn.replaceAll("/",""):jl+"/"+Bn.replaceAll("/",""):jl=jl+t.value+Bn.replaceAll("/","")}}),(ol=b.value)!=null&&ol.includes(jl)?xr=b.value:xr=jl}let Vl=I.cloneDeep((Sl=Object.keys(na))==null?void 0:Sl[0]);if(((Nl=F==null?void 0:F.data)==null?void 0:Nl.statusCode)===200||((Ra=F==null?void 0:F.data)==null?void 0:Ra.code)===200){if(((ga=(al=F==null?void 0:F.data)==null?void 0:al.data)!=null&&ga[Vl]||(rl=(qe=F==null?void 0:F.data)==null?void 0:qe.result)!=null&&rl[Vl])&&(Zl==null?void 0:Zl.length)===1)return await ke(((Xe=(da=F==null?void 0:F.data)==null?void 0:da.data)==null?void 0:Xe[Vl])||((aa=(oa=F==null?void 0:F.data)==null?void 0:oa.result)==null?void 0:aa[Vl]),I.cloneDeep(xr),Zl,qa);if((W=(ca=F==null?void 0:F.data)==null?void 0:ca.data)!=null&&W[Vl]||(ka=(la=F==null?void 0:F.data)==null?void 0:la.result)!=null&&ka[Vl]){let jl=await ze(((Be=(Ce=F==null?void 0:F.data)==null?void 0:Ce.data)==null?void 0:Be[Vl])||((me=(Fa=F==null?void 0:F.data)==null?void 0:Fa.result)==null?void 0:me[Vl]),I.cloneDeep(xr),Zl);return jl&&(ce=[...ce,...jl]),jl}else{if(!((fl=F==null?void 0:F.data)!=null&&fl.data)){let jl=await sa.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,"","",Re);jl=jl==null?void 0:jl.map(cr=>{var ar;return(cr==null?void 0:cr.name)===(Zl==null?void 0:Zl[0])&&(cr.compData=(ar=cr.compData)==null?void 0:ar.map($l=>{var zr;return($l==null?void 0:$l.key)==="formContent"&&($l.contents=(zr=$l.contents)==null?void 0:zr.map(Mr=>{var yn,Qr;return(Mr==null?void 0:Mr.key)===(Zl==null?void 0:Zl[1])&&(Mr.value=(Qr=(yn=F==null?void 0:F.data)==null?void 0:yn.result)==null?void 0:Qr[Vl==null?void 0:Vl.replaceAll(":","")]),Mr})),$l})),cr});let zl=[];(Ja=jl==null?void 0:jl.filter(cr=>(cr==null?void 0:cr.comp)==="Form"))==null||Ja.forEach(async cr=>{let ar={};for(let $l in cr)$l!=="id"&&(ar[$l]=cr[$l]);zl.push({id:cr==null?void 0:cr.id,value:{pageData:ar}})}),(zl==null?void 0:zl.length)>0&&await yr.batchUpdateInsofDataApi({dataList:zl});return}if((Zl==null?void 0:Zl.length)===1){const jl=(tl=(Ha=(kl=F==null?void 0:F.data)==null?void 0:kl.data)==null?void 0:Ha.path)==null?void 0:tl.path;let zl="";(ql=(Wl=(ul=(cl=(Za=jl==null?void 0:jl.split("("))==null?void 0:Za[1])==null?void 0:cl.split(")"))==null?void 0:ul[0])==null?void 0:Wl.split(":"))==null||ql.forEach($l=>{var zr,Mr;zl=zl===""?zl+((zr=$l==null?void 0:$l.replaceAll("'",""))==null?void 0:zr.trim()):zl+"/"+((Mr=$l==null?void 0:$l.replaceAll("'",""))==null?void 0:Mr.trim())});let cr=[(kr=(rr=(gr=(Hl=(Pl=jl==null?void 0:jl.split("<"))==null?void 0:Pl[1])==null?void 0:Hl.split(">"))==null?void 0:gr[0])==null?void 0:rr.replaceAll("'",""))==null?void 0:kr.trim()],ar;return(un=(Sr=(wr=F==null?void 0:F.data)==null?void 0:wr.data)==null?void 0:Sr.data)!=null&&un[Zl==null?void 0:Zl[0]]?ar=await ke((Xr=(dn=(Jr=F==null?void 0:F.data)==null?void 0:Jr.data)==null?void 0:dn.data)==null?void 0:Xr[Zl==null?void 0:Zl[0]],zl,Zl,qa):ar=await Ee((pn=(qr=F==null?void 0:F.data)==null?void 0:qr.data)==null?void 0:pn.data,zl,cr,Re),ar}else{const jl=(Zr=(Dr=(tn=F==null?void 0:F.data)==null?void 0:tn.data)==null?void 0:Dr.path)==null?void 0:Zr.path;let zl="";return(vn=(Nr=(Wr=(Il=(Br=jl==null?void 0:jl.split("("))==null?void 0:Br[1])==null?void 0:Il.split(")"))==null?void 0:Wr[0])==null?void 0:Nr.split(":"))==null||vn.forEach(ar=>{var $l,zr;zl=zl===""?zl+(($l=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:$l.trim()):zl+"/"+((zr=ar==null?void 0:ar.replaceAll("'",""))==null?void 0:zr.trim())}),await ze((In=(Kn=(tt=F==null?void 0:F.data)==null?void 0:tt.data)==null?void 0:Kn.data)==null?void 0:In[Zl==null?void 0:Zl[0]],zl,Zl)}}}}});if(await Promise.all(ma),(ce==null?void 0:ce.length)>0){let na=[];ce==null||ce.forEach(Ca=>{na!=null&&na.find(ve=>{var Je,Qe,Fe,_a;return((Qe=(Je=ve==null?void 0:ve.value)==null?void 0:Je.pageData)==null?void 0:Qe.name)===((_a=(Fe=Ca==null?void 0:Ca.value)==null?void 0:Fe.pageData)==null?void 0:_a.name)})||na.push(Ca)});let Ie=[];na==null||na.forEach(Ca=>{var Qe,Fe,_a,Le;let ve=I.cloneDeep(Ca);ve.value.pageData.compData=(Qe=ve.value.pageData.compData)==null?void 0:Qe.map(va=>{var re;return(va==null?void 0:va.key)==="formContent"&&(va.contents=(re=va.contents)==null?void 0:re.map(Se=>{var je,De,Ma,Ba;let K=(je=I.cloneDeep(ce))==null?void 0:je.find(Ua=>(Ua==null?void 0:Ua.keyType)===(Se==null?void 0:Se.key));if(K){let Ua=(Ba=(Ma=(De=K.value.pageData.compData)==null?void 0:De.find(Aa=>(Aa==null?void 0:Aa.key)==="formContent"))==null?void 0:Ma.contents)==null?void 0:Ba.find(Aa=>(Aa==null?void 0:Aa.key)===(Se==null?void 0:Se.key));Se.value=Ua==null?void 0:Ua.value}return Se})),va}),Ie.push({id:ve==null?void 0:ve.id,value:ve==null?void 0:ve.value});let Je=[];(Le=(_a=(Fe=ve==null?void 0:ve.value)==null?void 0:Fe.pageData)==null?void 0:_a.compData)==null||Le.forEach(va=>{var re;(va==null?void 0:va.key)==="formContent"&&((re=va==null?void 0:va.contents)==null||re.forEach(Se=>{var K,je,De,Ma,Ba,Ua;if((je=(K=Se==null?void 0:Se.optionUrl)==null?void 0:K.menuSelect)!=null&&je.find(Aa=>Aa==null?void 0:Aa.includes("[")))if(Je!=null&&Je.find(Aa=>{var Ae,we,Ea;return((Ae=Aa==null?void 0:Aa.key)==null?void 0:Ae.join(","))===((Ea=(we=Se==null?void 0:Se.optionUrl)==null?void 0:we.menuSelect)==null?void 0:Ea.join(","))})){let Aa=(De=Je==null?void 0:Je.find(Ae=>{var we,Ea,Ge;return((we=Ae==null?void 0:Ae.key)==null?void 0:we.join(","))===((Ge=(Ea=Se==null?void 0:Se.optionUrl)==null?void 0:Ea.menuSelect)==null?void 0:Ge.join(","))}))==null?void 0:De.value;Aa.push({key:Se==null?void 0:Se.prop,groups:(Ma=Se==null?void 0:Se.optionUrl)==null?void 0:Ma.groupSelect,value:Se==null?void 0:Se.value}),Je=Je==null?void 0:Je.map(Ae=>{var we,Ea,Ge;return((we=Ae==null?void 0:Ae.key)==null?void 0:we.join(","))===((Ge=(Ea=Se==null?void 0:Se.optionUrl)==null?void 0:Ea.menuSelect)==null?void 0:Ge.join(","))&&(Ae.value=Aa),Ae})}else Je.push({key:(Ba=Se==null?void 0:Se.optionUrl)==null?void 0:Ba.menuSelect,value:[{key:Se==null?void 0:Se.prop,groups:(Ua=Se==null?void 0:Se.optionUrl)==null?void 0:Ua.groupSelect,value:Se==null?void 0:Se.value}]})}))}),(Je==null?void 0:Je.length)>0&&(Je=Je==null?void 0:Je.map(va=>{var Se;let re="";return(Se=va==null?void 0:va.key)==null||Se.forEach(K=>{var je;if(!(K!=null&&K.includes("[")))re=re===""?re+K:re+"/"+K;else{let De="",Ma=(je=K==null?void 0:K.replaceAll("[","").replaceAll("]",""))==null?void 0:je.split(":");Ye==null||Ye.forEach(Ba=>{var Ua;(Ba==null?void 0:Ba.name)===(Ma==null?void 0:Ma[0])&&((Ua=Ba==null?void 0:Ba.compData)==null||Ua.forEach(Aa=>{var Ae;(Aa==null?void 0:Aa.key)==="formContent"&&((Ae=Aa==null?void 0:Aa.contents)==null||Ae.forEach(we=>{(we==null?void 0:we.prop)===(Ma==null?void 0:Ma[1])&&(De=we==null?void 0:we.value)}))}))}),re=re+t.value+De}}),va.key=re,va})),Je==null||Je.forEach(va=>{var je,De,Ma;let re=(je=Re[va.key])==null?void 0:je.find(Ba=>{var Ua,Aa,Ae,we,Ea,Ge,ol;return((Aa=(Ua=Ba==null?void 0:Ba.value)==null?void 0:Ua.pageData)==null?void 0:Aa.name)===((Ea=(we=(Ae=va==null?void 0:va.value)==null?void 0:Ae[0])==null?void 0:we.groups)==null?void 0:Ea[0])&&((ol=(Ge=Ba==null?void 0:Ba.value)==null?void 0:Ge.pageData)==null?void 0:ol.name)!==void 0}),Se=re==null?void 0:re.id,K=(De=re==null?void 0:re.value)==null?void 0:De.pageData;K.compData=(Ma=K.compData)==null?void 0:Ma.map(Ba=>{var Ua;return(Ba==null?void 0:Ba.key)==="formContent"&&(Ba.contents=(Ua=Ba.contents)==null?void 0:Ua.map(Aa=>{var we;let Ae=(we=va.value)==null?void 0:we.find(Ea=>(Ea==null?void 0:Ea.key)===(Aa==null?void 0:Aa.prop));return Ae&&(Aa.value=Ae.value),Aa})),Ba}),Ie.push({id:Se,value:{pageData:K}})})});let _e=(Te=I.cloneDeep(ce))==null?void 0:Te[0];(Ie==null?void 0:Ie.length)>0&&await yr.batchUpdateInsofDataApi({dataList:Ie})}m.setFreshContent(!0)}_.setImportLoading(!1)}catch{el.ElMessage.error("方法执行错误,请查看方法!"),_.setImportLoading(!1)}k.value=!0},de=["createInsofDataApi"],Ke=La.debounce(async te=>{Z(te)},100),Na=async te=>{var pa,wa,ja;const D=I.cloneDeep(te);let le,ye=new WeakMap;te!=null&&te[0].path&&(le=await(D==null?void 0:D.map(async(ee,ea)=>{var Va,P,F,J,ie,ce,ma,na,Ie,_e,Ca,ve,Je,Qe,Fe,_a;const xa=(Va=ye[ee==null?void 0:ee.path])==null?void 0:Va.filter(Le=>{var va;return((va=Le==null?void 0:Le.key)==null?void 0:va.type)==="data"});let He="";const Te=await sa.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);xa==null||xa.forEach(Le=>{var va,re,Se,K,je;((re=(va=Le==null?void 0:Le.value)==null?void 0:va.tableData)==null?void 0:re.算法名称)===((Se=D==null?void 0:D[ea])==null?void 0:Se.method)&&(He=(je=(K=Le==null?void 0:Le.value)==null?void 0:K.tableData)==null?void 0:je.算法体)});const Re=await sa.getItemData(ee==null?void 0:ee.path,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye);let Ye="",qa=(ie=(J=(F=(P=Re==null?void 0:Re[0])==null?void 0:P.compData)==null?void 0:F.find(Le=>(Le==null?void 0:Le.key)==="header"))==null?void 0:J.contents)==null?void 0:ie.findIndex(Le=>(Le==null?void 0:Le.prop)==="算法体");return(ma=(ce=Re==null?void 0:Re[0])==null?void 0:ce.compData)==null||ma.forEach(Le=>{var va;(Le==null?void 0:Le.key)==="tableContents"&&((va=Le==null?void 0:Le.contents)==null||va.forEach(re=>{re!=null&&re.find(Se=>Se===(ee==null?void 0:ee.method))&&(Ye=re[qa])}))}),{buttonName:((na=D==null?void 0:D[ea])==null?void 0:na.method)||((Ca=(_e=(Ie=xa==null?void 0:xa[0])==null?void 0:Ie.value)==null?void 0:_e.tableData)==null?void 0:Ca.算法名称),api:(He===""?(Qe=(Je=(ve=xa==null?void 0:xa[0])==null?void 0:ve.value)==null?void 0:Je.tableData)==null?void 0:Qe.算法体:He)||Ye,content:Te==null?void 0:Te.filter(Le=>Le.comp!=="methodButton"),extraContent:(Fe=I.cloneDeep(ee.value))==null?void 0:Fe.slice(1),methodName:(ee==null?void 0:ee.path)??"",extraValues:(_a=D==null?void 0:D[ea])==null?void 0:_a.data}})));const ue=D==null?void 0:D.map(async ee=>{var Re,Ye,qa,Va,P,F;const ea=(Re=resAll.data.result)==null?void 0:Re.filter(J=>{var ie,ce,ma;return((ie=J==null?void 0:J.key)==null?void 0:ie.parentTable)===""&&((ce=J==null?void 0:J.key)==null?void 0:ce.type)==="method"&&((ma=J==null?void 0:J.key)==null?void 0:ma.methodName)===J.method}),Pe=ea==null?void 0:ea[0],xa=(Ye=resAll.data.result)==null?void 0:Ye.filter(J=>{var ie,ce;return((ie=J==null?void 0:J.key)==null?void 0:ie.type)==="methodData"&&((ce=J==null?void 0:J.key)==null?void 0:ce.tableId)===(Pe==null?void 0:Pe.id)}),He=await sa.getItemData(b.value,sessionStorage.getItem("systemKey"),"",!1,[],!1,ye),Te=xa==null?void 0:xa[0];return{buttonName:(qa=Pe==null?void 0:Pe.key)==null?void 0:qa.methodKey,api:(P=(Va=Te==null?void 0:Te.value)==null?void 0:Va.tableData)==null?void 0:P[0],content:He==null?void 0:He.filter(J=>J.comp!=="methodButton"),extraContent:(F=I.cloneDeep(ee.value))==null?void 0:F.slice(1),methodName:(ee==null?void 0:ee.method)??""}}),Ne=(pa=te==null?void 0:te[0])!=null&&pa.path&&((wa=te==null?void 0:te[0])==null?void 0:wa.path)!==""?await Promise.all(le):await Promise.all(ue);r.value=Ne==null?void 0:Ne.filter(ee=>ee==null?void 0:ee.extraContent),(ja=r.value)==null||ja.forEach(ee=>{var ea;ee.api===""&&((ea=ee.content)==null||ea.forEach(Pe=>{var xa;Pe.comp=="Table"&&m.setExtraContents(sa.methodTableToContent(Pe.compData,(xa=ee.extraContent)==null?void 0:xa[0]))}))})};return a.watch(()=>s.itemData,async()=>{w.value=="view"&&!k.value&&await Na(I.cloneDeep(s.itemData)),k.value=!1},{immediate:!0,deep:!0}),(te,D)=>{var le,ye,ue;return a.unref(w)!=="edit"?(a.openBlock(),a.createElementBlock("div",B2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((le=r.value)==null?void 0:le.filter(Ne=>(Ne==null?void 0:Ne.buttonName)!=="保存"),Ne=>{var pa;return a.openBlock(),a.createElementBlock("div",null,[Ne.api!==""?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,disabled:a.unref(N)===a.unref(b)&&!((pa=Ne==null?void 0:Ne.buttonName)!=null&&pa.includes("预览")),class:"calculator-content",modelValue:Ne.buttonName,onClickTrigger:wa=>a.unref(Ke)(Ne),loading:u.value},null,8,["disabled","modelValue","onClickTrigger","loading"])):a.createCommentVNode("",!0)])}),256)),a.createElementVNode("div",null,[a.unref(j)!==""&&((ue=a.unref(b))==null?void 0:ue[((ye=a.unref(b))==null?void 0:ye.length)-1])!==a.unref(t)?(a.openBlock(),a.createBlock(a.unref(Ji._sfc_main),{key:0,class:"calculator-content",onClickTrigger:$,modelValue:"保存"})):a.createCommentVNode("",!0)]),c.value?(a.openBlock(),a.createBlock(pl.ssFilePreview,{key:0,fileDataList:g.value,onDestroy:U},null,8,["fileDataList"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)}}},T2=Ul._export_sfc(N2,[["__scopeId","data-v-063aa9af"]]),A2={};function z2(l,r){return" 567 "}const M2=Ul._export_sfc(A2,[["render",z2]]),O2={class:"module content"},I2={class:"module data"},L2={class:"module layout"},V2={class:"form-content"},R2=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.reactive({visible:!1,width:"40%",title:"签名配置"}),c=a.ref("create"),g=a.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=a.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}]),v=a.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:""}]),m=a.ref({}),u=a.ref([]),_=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:u.value},{key:"signConfig",contents:m.value}]}),S=A=>{var N;m.value=I.cloneDeep(A),t("change",(N=_())==null?void 0:N.compData)},z=A=>{var N,Y;if((A==null?void 0:A.buttonName)==="确认"){const b=I.cloneDeep(A==null?void 0:A.content);switch(c.value){case"create":u.value.push({...b,index:((N=u.value)==null?void 0:N.length)+1});break}t("change",(Y=_())==null?void 0:Y.compData),s.visible=!1}else s.visible=!1},w=(A,N)=>{var Y,b;switch(A){case"create":(Y=v.value)==null||Y.forEach(L=>{L.value=""}),c.value="create",s.visible=!0;break;case"update":(b=v.value)==null||b.forEach(L=>{L.value=N[L==null?void 0:L.prop]}),c.value="update",s.visible=!0;break;case"delete":u.value.splice(N,1),c.value="delete";break}},j=()=>{s.visible=!1};return a.watch(()=>n==null?void 0:n.itemContents,A=>{var N,Y;A&&(m.value=((N=A==null?void 0:A.find(b=>b.key==="signConfig"))==null?void 0:N.contents)??{},u.value=((Y=A==null?void 0:A.find(b=>b.key==="signTypeList"))==null?void 0:Y.contents)??[])},{immediate:!0}),(A,N)=>{const Y=a.resolveComponent("svg-icon"),b=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",O2,[N[2]||(N[2]=a.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),a.createVNode(b,{class:"module-icon",id:"themeButton",onClick:N[0]||(N[0]=L=>w("create"))},{icon:a.withCtx(()=>[a.createVNode(Y,{name:"Plus",class:"icon-size"})]),default:a.withCtx(()=>[N[1]||(N[1]=a.createTextVNode(" 新增 "))]),_:1,__:[1]})]),a.createElementVNode("div",I2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value,(L,T)=>(a.openBlock(),a.createElementBlock("div",{class:"module-data-item",key:T},[a.createElementVNode("span",null,a.toDisplayString(L==null?void 0:L.label),1),a.createElementVNode("div",null,[a.createVNode(b,{type:"primary",size:"small",onClick:x=>w("update",{...L,index:T+1})},{default:a.withCtx(()=>N[3]||(N[3]=[a.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),a.createVNode(b,{type:"danger",size:"small",onClick:x=>w("delete",T)},{default:a.withCtx(()=>N[4]||(N[4]=[a.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),a.createElementVNode("div",L2,[a.createVNode(pl.ssForm,{rowContents:h.value,onChange:S},null,8,["rowContents"])])]),a.createVNode(vr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:j,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",V2,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:v.value,key:v.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:z},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),$2=Ul._export_sfc(R2,[["__scopeId","data-v-487e0536"]]),P2=a.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(0),c=a.computed(()=>{var _,S;return(_=n==null?void 0:n.stepConfig)!=null&&_.allowTrigger?s.value:(S=n==null?void 0:n.stepConfig)==null?void 0:S.active}),g=(_,S)=>{s.value=S-1,t("clickStep",_,S)};a.onMounted(()=>{var _;t("clickStep",(_=n==null?void 0:n.stepList)==null?void 0:_[0],0)});const h=_=>pl.getComponent(_),v=()=>{var S;const _=(S=n==null?void 0:n.stepList)==null?void 0:S.find((z,w)=>w+1===c.value);return console.log("findStep",_),_?_==null?void 0:_.children:[]},m=_=>{t("clickTrigger",_)},u=_=>{t("changeTrigger",_)};return(_,S)=>{var j,A,N,Y,b;const z=a.resolveComponent("el-step"),w=a.resolveComponent("el-steps");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(w,{direction:(j=l.stepConfig)==null?void 0:j.direction,active:c.value,"finish-status":"success",simple:(A=l.stepConfig)==null?void 0:A.simple,"align-center":((N=l.stepConfig)==null?void 0:N.alignCenter)??!0},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.stepList,(L,T)=>(a.openBlock(),a.createBlock(z,{key:T,class:"step-item",onClick:x=>g(L,T+1)},{title:a.withCtx(()=>[a.renderSlot(_.$slots,"title",{title:L==null?void 0:L.title},void 0,!0)]),description:a.withCtx(()=>[a.renderSlot(_.$slots,"description",{descriptions:L==null?void 0:L.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(Y=l.stepConfig)!=null&&Y.allowTrigger&&((b=l.stepConfig)!=null&&b.active)?(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:0},a.renderList(v(),(L,T)=>(a.openBlock(),a.createElementBlock("div",{key:T,class:"step-cont-wrap"},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(h(L==null?void 0:L.type)),{modelValue:L.value,"onUpdate:modelValue":x=>L.value=x,onClickTrigger:m,onChangeTrigger:u,content:L==null?void 0:L.content},a.createSlots({_:2},[a.renderList(_.$slots,(x,k)=>({name:k,fn:a.withCtx($=>[a.renderSlot(_.$slots,k,a.mergeProps({ref_for:!0},$||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):a.createCommentVNode("",!0)],64)}}}),F2=Ul._export_sfc(P2,[["__scopeId","data-v-fdbd6832"]]),j2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(l,{emit:r}){const n=l,t=r,s=a.ref({}),c=a.ref([]),g=(h,v)=>{t("clickStep",h,v)};return a.watch(()=>n==null?void 0:n.itemData,h=>{var _,S,z,w;s.value={direction:"horizontal",simple:!1,alignCenter:!0,allowTrigger:!0};let v=((_=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="stepName"))==null?void 0:_.contents)??[],m=[];(z=(S=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="header"))==null?void 0:S.contents)==null||z.forEach(j=>{m.push({label:j==null?void 0:j.label,prop:j==null?void 0:j.prop,name:j==null?void 0:j.prop,type:"text",disabled:!0})});let u=((w=h==null?void 0:h.find(j=>(j==null?void 0:j.key)==="tableContents"))==null?void 0:w.contents)??[];v=v==null?void 0:v.map((j,A)=>{let N=m==null?void 0:m.map(Y=>{var b;return{...Y,value:(b=u==null?void 0:u[A])==null?void 0:b[Y==null?void 0:Y.prop]}});return{title:j,description:N}}),c.value=v},{immediate:!0,deep:!0}),(h,v)=>{const m=a.resolveComponent("svg-icon");return a.openBlock(),a.createBlock(F2,{stepConfig:s.value,stepList:c.value,onClickStep:g},{icon:a.withCtx(()=>[a.createVNode(m,{name:"import"})]),title:a.withCtx(({title:u})=>[a.createTextVNode(a.toDisplayString(u),1)]),description:a.withCtx(({descriptions:u})=>[a.createVNode(pl.ssForm,{ref:"formRef",rowContents:u,showOperator:!0,isEnableWrap:!1,isEdit:!1},null,8,["rowContents"])]),_:1},8,["stepConfig","stepList"])}}}),H2=a.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(l){return(r,n)=>{const t=a.resolveComponent("el-timeline-item"),s=a.resolveComponent("el-timeline");return a.openBlock(),a.createBlock(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(l.activities,(c,g)=>(a.openBlock(),a.createBlock(t,{key:g,timestamp:c.timestamp,placement:l.timeLineConfig.placement,center:l.timeLineConfig.isCenter,"hide-timestamp":!0,type:l.timeLineConfig.type,color:l.timeLineConfig.color,size:l.timeLineConfig.size,icon:l.timeLineConfig.icon,hollow:l.timeLineConfig.isHollow},{default:a.withCtx(()=>[a.renderSlot(r.$slots,"content",{content:c==null?void 0:c.content,timestamp:c==null?void 0:c.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),U2=Ul._export_sfc(H2,[["__scopeId","data-v-4172a886"]]),q2={class:"line-content"},W2={class:"line-time"},K2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(l){const r=l,n=a.ref({}),t=a.ref([]);return a.watch(()=>r==null?void 0:r.itemData,s=>{var c,g;t.value=(c=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineList"))==null?void 0:c.contents,n.value=(g=s==null?void 0:s.find(h=>(h==null?void 0:h.key)==="timeLineConfig"))==null?void 0:g.contents},{immediate:!0}),(s,c)=>(a.openBlock(),a.createBlock(U2,{activities:t.value,timeLineConfig:n.value},{content:a.withCtx(({content:g,timestamp:h})=>[a.createElementVNode("span",q2,a.toDisplayString(g),1),a.createElementVNode("span",W2,a.toDisplayString(h),1)]),_:1},8,["activities","timeLineConfig"]))}}),Y2=Ul._export_sfc(K2,[["__scopeId","data-v-b4d9deed"]]),G2={class:"tabs-content"},J2=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},tabsData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,compNames:{type:String,default:""},cacheNewData:{type:Object},isDevMode:{type:Boolean},allMapContents:{type:Array,default:()=>[]}},emits:["change","contentChange","pageChange","rowClick","routeUrl","clickTrigger","clickMainKey"],setup(l,{emit:r}){const n=l,t=r,s=a.ref();a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=n==null?void 0:n.itemData},{immediate:!0,deep:!0});const c=S=>{t("change",S)},g=(S,z)=>{t("contentChange",S,z)},h=S=>{t("pageChange",S)},v=S=>{t("rowClick",S)},m=(S,z)=>{t("routeUrl",S,z)},u=S=>{t("clickTrigger",S)},_=(S,z)=>{t("clickMainKey",S,z)};return(S,z)=>{var w,j;return a.openBlock(),a.createElementBlock("div",G2,[(w=s.value)!=null&&w.length?(a.openBlock(),a.createBlock(pl.ssTab,{tabsContents:s.value,key:(j=s.value)==null?void 0:j.length},{pane:a.withCtx(({tab:A,index:N})=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)(A==null?void 0:A.comp)),{related:A==null?void 0:A.relatedTables,compNames:n==null?void 0:n.compNames,compName:A==null?void 0:A.name,cacheNewData:n==null?void 0:n.cacheNewData,isDevMode:l.isDevMode,itemData:A==null?void 0:A.compData,childItemData:A==null?void 0:A.itemChildData,onChange:c,index:(A==null?void 0:A.id)??N,config:{showIndex:A==null?void 0:A.showIndex,allowMove:A==null?void 0:A.allowMove,viewport:A==null?void 0:A.viewport},onContentChange:g,onPageChange:h,onRowClick:v,onRouteUrl:m,parentTableId:A==null?void 0:A.tableId,allMapContents:l.allMapContents,children:A==null?void 0:A.children,level:1,onClickTrigger:u,onClickMainKey:_},null,40,["related","compNames","compName","cacheNewData","isDevMode","itemData","childItemData","index","config","parentTableId","allMapContents","children"]))]),_:1},8,["tabsContents"])):a.createCommentVNode("",!0)])}}}),X2=Ul._export_sfc(J2,[["__scopeId","data-v-ded4e0d9"]]),Z2={class:"type-select"},Q2=["onClick"],eh={class:"list-icon"},ah={__name:"modelSelect",setup(l){const r=Wn(I.pinia),{itemData:n}=I.storeToRefs(r),t=s=>{const c=I.cloneDeep(n.value);c.push({comp:s.comp,name:s.name,compData:[]}),r.setItemData(c)};return(s,c)=>{const g=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",Z2,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(qc),(h,v)=>(a.openBlock(),a.createElementBlock("div",{class:"type-list",key:v},[a.createElementVNode("div",{class:"list-content",onClick:m=>t(h)},[a.createElementVNode("div",eh,[a.createVNode(g,{name:h.icon},null,8,["name"])]),a.createElementVNode("div",null,a.toDisplayString(h.name),1)],8,Q2)]))),128))])}}},lh=Ul._export_sfc(ah,[["__scopeId","data-v-91799bf8"]]),rh={class:"fill-content"},nh={class:"operate-content"},th={class:"collapse-title-content"},oh={class:"collapse-title-item"},ih={key:1},sh=["onClick"],ch={class:"icon-content"},uh={key:0,class:"edit-content"},dh=["onClick"],ph={class:"comp-child"},fh={__name:"modelFill",setup(l){const r=Wn(I.pinia),{itemData:n,originalData:t}=I.storeToRefs(r),s=a.ref([]);a.ref([]);const c=a.ref([]),g=a.ref([]),h=z=>{var j;let w=(j=I.cloneDeep(g.value))==null?void 0:j.map((A,N)=>(z===N&&(A.content=!0),A));g.value=w},v=z=>{var j;let w=(j=I.cloneDeep(g.value))==null?void 0:j.map((A,N)=>(z===N&&(A.content=!1),A));g.value=w,s.value=I.cloneDeep(n.value)},m=(z,w)=>{var Y;let j=(Y=I.cloneDeep(g.value))==null?void 0:Y.map((b,L)=>(z===L&&(b.content=!1),b));g.value=j;const A=I.cloneDeep(n.value),N=A==null?void 0:A.filter((b,L)=>(L===z&&(b.name=w),b));r.setOriginalData(N),r.setItemData(N)};a.watch(()=>n.value,()=>{var z,w,j;!n.value||((z=n.value)==null?void 0:z.length)===0?s.value=[]:s.value=(w=I.cloneDeep(n.value))==null?void 0:w.filter(A=>(A==null?void 0:A.comp)!=="methodButton"),c.value=s.value,g.value=(j=I.cloneDeep(c.value))==null?void 0:j.map((A,N)=>({id:N,content:!1}))},{deep:!0,immediate:!0});const u=z=>St(z),_=(z,w,j)=>{var N,Y;if(!z)return;let A=I.cloneDeep(n.value);A=(N=A==null?void 0:A.map((b,L)=>(L===j&&(b.compData=z),b)))==null?void 0:N.filter(b=>(b==null?void 0:b.comp)!=="methodButton"),g.value=(Y=I.cloneDeep(A))==null?void 0:Y.map((b,L)=>({id:L,content:!1})),r.setOriginalData(A),r.setItemData(A)},S=z=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{const w=I.cloneDeep(n.value),j=w==null?void 0:w.filter((A,N)=>N!==z);r.setOriginalData(j),r.setItemData(j),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(z,w)=>{const j=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",rh,[w[1]||(w[1]=a.createElementVNode("div",{class:"fill-operate"},a.toDisplayString("操作栏"),-1)),a.createElementVNode("div",nh,[a.createVNode(Hs.default,{class:"collapse-content",collapseContents:s.value},{title:a.withCtx(({item:A,index:N})=>{var Y,b,L,T,x,k,$,U,X,be;return[a.createElementVNode("div",th,[a.createElementVNode("div",oh,[(b=(Y=g.value)==null?void 0:Y.find(ze=>ze.id===N))!=null&&b.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,class:"collapse-title",style:a.normalizeStyle({marginRight:A.name&&A.name!==""?"8px":"0px"})},a.toDisplayString(A.name),5)),(T=(L=g.value)==null?void 0:L.find(ze=>ze.id===N))!=null&&T.content?(a.openBlock(),a.createElementBlock("div",ih,[a.createVNode(pl.ssInput,{modelValue:A.name,"onUpdate:modelValue":ze=>A.name=ze,onClick:w[0]||(w[0]=a.withModifiers(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue"])])):a.createCommentVNode("",!0),(k=(x=g.value)==null?void 0:x.find(ze=>ze.id===N))!=null&&k.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:2,onClick:a.withModifiers(ze=>h(N),["stop"]),class:"icon-content"},[a.createVNode(j,{name:"Edit",style:{width:"16px",height:"16px"}})],8,sh))]),a.createElementVNode("div",ch,[(U=($=g.value)==null?void 0:$.find(ze=>ze.id===N))!=null&&U.content?(a.openBlock(),a.createElementBlock("div",uh,[a.createVNode(j,{name:"Cancel",style:{width:"16px",height:"16px"},class:"icon-content",onClick:a.withModifiers(ze=>v(N),["stop"])},null,8,["onClick"]),a.createVNode(j,{name:"Save",onClick:a.withModifiers(ze=>m(N,A.name),["stop"]),style:{width:"16px",height:"16px",fill:"var(--ssComponent-primary-color)"},class:"icon-content"},null,8,["onClick"])])):a.createCommentVNode("",!0),(be=(X=g.value)==null?void 0:X.find(ze=>ze.id===N))!=null&&be.content?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:1,onClick:a.withModifiers(ze=>S(N),["stop"]),class:"icon-content"},[a.createVNode(j,{name:"Delete",style:{width:"16px",height:"16px"}})],8,dh))])])]}),content:a.withCtx(({item:A,index:N})=>{var Y,b;return[a.createElementVNode("div",ph,[a.createTextVNode(a.toDisplayString(u(A.comp+"Operate"))+" ",1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(u(A.comp+"Operate")),{itemContents:A==null?void 0:A.compData,originalItemContents:(b=(Y=c.value)==null?void 0:Y.find((L,T)=>T===N))==null?void 0:b.compData,onChange:L=>_(L,A,N)},null,40,["itemContents","originalItemContents","onChange"]))])]}),_:1},8,["collapseContents"])])])}}},hh=Ul._export_sfc(fh,[["__scopeId","data-v-a46a44b9"]]),vh={key:0,class:"show-content"},mh={style:{display:"flex"}},yh={__name:"modelShow",setup(l){const r=Wn(I.pinia),{itemData:n}=I.storeToRefs(r),t=a.ref([]);a.watch(()=>n.value,()=>{var c;!n.value||((c=n.value)==null?void 0:c.length)===0?t.value=[]:t.value=I.cloneDeep(n.value)},{deep:!0,immediate:!0});const s=c=>St(c);return(c,g)=>{var h;return((h=t.value)==null?void 0:h.length)>0?(a.openBlock(),a.createElementBlock("div",vh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.value,(v,m)=>(a.openBlock(),a.createElementBlock("div",{class:"item-content",key:m},[a.createElementVNode("div",mh,a.toDisplayString(v.name),1),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s(v.comp)),{itemData:v==null?void 0:v.compData,childItemData:v==null?void 0:v.itemChildData,key:m},null,8,["itemData","childItemData"]))]))),128))])):a.createCommentVNode("",!0)}}},gh=Ul._export_sfc(yh,[["__scopeId","data-v-3f3e863e"]]),bh={class:"tabs-header"},kh={class:"tabs-list"},xh={class:"tab-name"},_h={class:"tab-actions"},wh=["onClick"],Ch=["onClick"],Sh=["onClick"],Eh={class:"model-operate"},Dh={class:"model-select",style:{display:"unset"}},Bh={class:"existing-components"},Nh={class:"component-list"},Th=["onClick"],Ah={class:"component-info"},zh={class:"component-type"},Mh={class:"component-name"},Oh={class:"model-fill"},Ih={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.ref([]),c=a.ref(!1),g=a.ref(""),h=a.ref({title:""}),v=a.ref(-1),m=a.ref(!1),u=a.ref(-1),_=a.ref(new WeakMap),S=a.ref(null),z=Wn(I.pinia),{itemData:w}=I.storeToRefs(z),j=()=>{g.value="新增标签页",h.value.title="",v.value=-1,c.value=!0},A=te=>{g.value="修改标签页",h.value.title=s.value[te].title,v.value=te,c.value=!0},N=te=>{const D=L(te);_.value.delete(D),s.value.splice(te,1),Na()},Y=()=>{if(h.value.title.trim()){if(v.value===-1){const te={title:h.value.title,value:h.value.title,label:h.value.title,children:[],id:b()};s.value.push(te)}else s.value[v.value].title=h.value.title,s.value[v.value].value=h.value.title,s.value[v.value].label=h.value.title;c.value=!1,Na()}},b=()=>`tab_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,L=te=>{const D=s.value[te];return D.id||(D.id=b()),D.id},T=te=>{var ye;u.value=te;const D=L(te);S.value=I.cloneDeep(w.value);let le=_.value.get(D);!le&&((ye=s.value[te].children)==null?void 0:ye.length)>0&&(le=U(s.value[te].children)),le?z.setItemData(I.cloneDeep(le)):z.setItemData([]),m.value=!0},x=a.computed(()=>{const te=I.useModelComp(I.pinia),D=I.storeToRefs(te).itemData.value;return console.log("可用组件数据",D),!D||!Array.isArray(D)?[]:D.filter(le=>{var ye;if(le.comp==="Tabs"&&u.value>=0){const ue=L(u.value);if((ye=le.compData)==null?void 0:ye.some(pa=>{var wa;return pa.key==="stepList"&&((wa=pa.contents)==null?void 0:wa.some(ja=>ja.id===ue))}))return!1}return!0})}),k=te=>({Table:"表格",Form:"表单",Tabs:"标签页",Chart:"图表",Card:"卡片"})[te]||te,$=te=>{var D;try{const le=I.cloneDeep(te);le.id=Date.now()+Math.random(),le.comp==="Tabs"&&((D=le.compData)==null||D.forEach(ue=>{ue.key==="stepList"&&ue.contents&&ue.contents.forEach(Ne=>{Ne.id=b()})}));const ye=I.cloneDeep(w.value);ye.push(le),z.setItemData(ye)}catch(le){console.error("添加组件失败:",le)}},U=te=>te.map(D=>{var le;switch(D.type){case"form":return{comp:"Form",name:D.value||"表单",compData:X(D.content)};case"table":return{comp:"Table",name:D.value||"表格",compData:be(D.content)};default:return{comp:"Unknown",name:D.value||"",compData:((le=D.content)==null?void 0:le.originalData)||[]}}}),X=te=>{if(!te)return[];const D=[];return te.rowContents&&D.push({key:"formContent",contents:te.rowContents}),te.buttonValue&&D.push({key:"formButton",contents:te.buttonValue}),typeof te.isEnableWrap<"u"&&D.push({key:"enableWrap",contents:te.isEnableWrap}),D},be=te=>[],ze=()=>{if(u.value>=0&&u.value<s.value.length){const te=L(u.value);_.value.set(te,I.cloneDeep(w.value)),s.value[u.value].children=ke(w.value),console.log("保存后的数据",ke(w.value))}m.value=!1,u.value=-1,S.value=null,Na()},Ee=()=>{S.value&&z.setItemData(I.cloneDeep(S.value)),m.value=!1,u.value=-1,S.value=null},ne=()=>{m.value&&Ee()},ke=te=>{if(!Array.isArray(te))throw new Error("sourceData must be an array");return te.map((D,le)=>{if(!D||typeof D!="object")return D;const{comp:ye,name:ue,compData:Ne}=D;switch(ye){case"Form":return{type:"form",content:Z(Ne||[]),value:"表单"};case"Table":return{type:"table",content:de(Ne||[]),value:"表格"};default:return{type:"xxx",content:Ke(Ne||[]),value:""}}})},Z=te=>{const D={formRules:{},rowContents:[],buttonValue:[],rowValues:[],isEnableWrap:!0,isRowFlex:!0,isButtonRow:!0,isEdit:!0,isStartJustify:!0},le={formContent:"rowContents",enableWrap:"isEnableWrap",formButton:"buttonValue"};return te.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:Ne,contents:pa}=ye,wa=le[Ne];if(!wa){console.warn(`Unknown Form config key: ${Ne}`);return}Ne==="enableWrap"?D[wa]=!!pa:D[wa]=Array.isArray(pa)?pa:[]}),D},de=te=>{const D={columns:[],tableData:[],extraButton:[],rowButton:[],currentPage:0,total:0,pageSize:0,isShowPagination:!0,isShowEdit:!0,isMoveColumn:!0,isShowDelete:!0},le={header:"columns",tableContents:"tableData"};return te.forEach((ye,ue)=>{if(!ye||typeof ye!="object"){console.warn(`Invalid config at index ${ue}:`,ye);return}const{key:Ne,contents:pa}=ye,wa=le[Ne];if(!wa){console.warn(`Unknown Table config key: ${Ne}`);return}D[wa]=Array.isArray(pa)?pa:[]}),D},Ke=te=>(console.log("Default conversion logic - to be implemented"),{originalData:te,processed:!1,componentType:"unknown"}),Na=()=>{const te=[{key:"stepList",contents:s.value}];t("change",te)};return a.watch(()=>n.itemContents,te=>{if(te&&te.length>0){const D=te.find(le=>le.key==="stepList");D&&D.contents&&(s.value=D.contents.map(le=>({title:le.title||"",value:le.value||le.title||"",label:le.label||le.title||"",children:le.children||[],id:le.id||b()})))}},{immediate:!0,deep:!0}),(te,D)=>{const le=a.resolveComponent("svg-icon"),ye=a.resolveComponent("el-input"),ue=a.resolveComponent("el-form-item"),Ne=a.resolveComponent("el-form");return a.openBlock(),a.createElementBlock("div",null,[a.createElementVNode("div",bh,[D[6]||(D[6]=a.createElementVNode("h4",null,"标签页管理",-1)),a.createElementVNode("button",{onClick:j},[a.createVNode(le,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),D[5]||(D[5]=a.createTextVNode(" 新增标签页 "))])]),a.createElementVNode("div",kh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.value,(pa,wa)=>(a.openBlock(),a.createElementBlock("div",{class:"tab-item",key:wa},[a.createElementVNode("span",xh,a.toDisplayString(pa.title),1),a.createElementVNode("div",_h,[a.createElementVNode("button",{onClick:ja=>A(wa)},"修改标题",8,wh),a.createElementVNode("button",{onClick:ja=>T(wa)},"布局调整",8,Ch),a.createElementVNode("button",{onClick:ja=>N(wa)},"删除",8,Sh)])]))),128))]),a.createVNode(vr.ssDialog,{modelValue:c.value,"onUpdate:modelValue":D[2]||(D[2]=pa=>c.value=pa),title:g.value,onBeforeDestroy:D[3]||(D[3]=pa=>c.value=!1)},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:D[1]||(D[1]=pa=>c.value=!1)},"取消"),a.createElementVNode("button",{type:"primary",onClick:Y},"确定")]),default:a.withCtx(()=>[a.createVNode(Ne,{model:h.value,"label-width":"80px"},{default:a.withCtx(()=>[a.createVNode(ue,{label:"标签名称",required:""},{default:a.withCtx(()=>[a.createVNode(ye,{modelValue:h.value.title,"onUpdate:modelValue":D[0]||(D[0]=pa=>h.value.title=pa),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),a.createVNode(vr.ssDialog,{modelValue:m.value,"onUpdate:modelValue":D[4]||(D[4]=pa=>m.value=pa),title:"布局调整",fullScreen:"",onBeforeDestroy:ne},{footer:a.withCtx(()=>[a.createElementVNode("button",{onClick:Ee},"取消"),a.createElementVNode("button",{onClick:ze},"确定")]),default:a.withCtx(()=>[a.createElementVNode("div",Eh,[a.createElementVNode("div",Dh,[a.createVNode(lh),a.createElementVNode("div",Bh,[D[8]||(D[8]=a.createElementVNode("h5",null,"添加已有组件",-1)),a.createElementVNode("div",Nh,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(x.value,pa=>(a.openBlock(),a.createElementBlock("div",{key:pa.id,class:"component-item",onClick:wa=>$(pa)},[a.createElementVNode("div",Ah,[a.createElementVNode("span",zh,a.toDisplayString(k(pa.comp)),1),a.createElementVNode("span",Mh,a.toDisplayString(pa.name),1)]),D[7]||(D[7]=a.createElementVNode("button",{class:"add-btn"},"添加",-1))],8,Th))),128))])])]),(a.openBlock(),a.createElementBlock("div",{class:"model-show",key:te.innerWidth},[a.createVNode(gh)])),a.createElementVNode("div",Oh,[a.createVNode(hh)])])]),_:1},8,["modelValue"])])}}},Lh=Ul._export_sfc(Ih,[["__scopeId","data-v-9096ed0d"]]);function Vh(){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 Rh(l){return{type:"line",...l}}function $h(){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 Ph(l){return{type:"bar",barWidth:"60%",...l}}function Fh(){return{title:{text:"",left:"center"},tooltip:{trigger:"item"},series:[]}}function jh(l){return{type:"pie",radius:"50%",emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}},...l}}const On={line:{initBaseoptions:Vh,initSeries:Rh},bar:{initBaseoptions:$h,initSeries:Ph},pie:{initBaseoptions:Fh,initSeries:jh}},vs=I.useMenuState(I.pinia),Cc=(l,r)=>{var u;const n=[],t=[],{group:s,nameCol:c,valueCol:g}=r||{},h=l==null?void 0:l.find(_=>{const{name:S}=_;return S===s});if(!h)return{names:n,values:t};const v=(u=h==null?void 0:h.compData)==null?void 0:u.find(_=>{const{key:S}=_;return S==="tableContents"});return((v==null?void 0:v.contents)||[]).forEach(_=>{const S=_==null?void 0:_[0];let z=!1;el.isObject(S)&&(S!=null&&S.id)&&(z=!0);let w=c,j=g;z&&(w=w+1,j=j+1);const A=_==null?void 0:_[w],N=_==null?void 0:_[j];n.push(A),t.push(N)}),{names:n,values:t}},Hh=async l=>{const{menu:r,mainKey:n,detailGroup:t,detailNameCol:s,detailValueCol:c,isSelfDetail:g}=l||{};let h=null;const v=sessionStorage.getItem("systemKey");if(g&&vs.activeMenuPath&&(h=await sa.getItemData(`${vs.activeMenuPath}`,v,"")),!g){const m=r==null?void 0:r.join("/");h=await sa.getItemData(`${m}^${n}`,v,"")}return Cc(h,{group:t,nameCol:s,valueCol:c})},Uh=async l=>{const{menu:r,group:n,nameCol:t,valueCol:s}=l||{},c=r==null?void 0:r.join("/"),g=sessionStorage.getItem("systemKey"),h=await sa.getItemData(c,g,"");return Cc(h,{group:n,nameCol:t,valueCol:s})},wi=async(l,r)=>{const n={names:[],values:[]},{menu:t,group:s,nameCol:c,valueCol:g}=l||{};if(!t.length||!s)return n;const{mainKey:h,group:v,nameCol:m,valueCol:u,isSelfDetail:_}=r||{};return h&&v&&pl.isNumber(m)&&pl.isNumber(u)?await Hh({menu:t,mainKey:h,detailGroup:v,detailNameCol:m,detailValueCol:u,isSelfDetail:_}):pl.isNumber(c)&&pl.isNumber(g)?await Uh({menu:t,group:s,nameCol:c,valueCol:g}):n},qh=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:t,title:s}=l||{},c=On==null?void 0:On[t];if(!c)return;const{initBaseoptions:g,initSeries:h}=c,v=g();v.title.text=s??"";const{names:m,values:u}=await wi(r,n);if(!m||!u)return v;v.xAxis.data=m;const _=h({data:u});return v.series.push(_),v},Wh=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:t,title:s}=l||{},c=On==null?void 0:On[t];if(!c)return;const{initBaseoptions:g,initSeries:h}=c,v=g();v.title.text=s??"";const{names:m,values:u}=await wi(r,n);if(!m||!u)return v;v.xAxis.data=m;const _=h({data:u});return v.series.push(_),v},Kh=async({chartBaseConfig:l,chartDataConfig:r,chartDetailConfig:n})=>{const{type:t,title:s}=l||{},c=On==null?void 0:On[t];if(!c)return;const{initBaseoptions:g,initSeries:h}=c,v=g();v.title.text=s??"";const{names:m,values:u}=await wi(r,n);if(!m||!u)return v;const _=[];for(let z=0;z<m.length;z++){const w=m[z],j=u[z];_.push({name:w,value:j})}const S=h({data:_});return v.series.push(S),v},Yh=async(l=[])=>{var g,h,v;const r=((g=l==null?void 0:l.find(m=>m.key==="chartBaseConfig"))==null?void 0:g.contents)??{},n=((h=l==null?void 0:l.find(m=>m.key==="chartDataConfig"))==null?void 0:h.contents)??{},t=((v=l==null?void 0:l.find(m=>m.key==="chartDetailConfig"))==null?void 0:v.contents)??{},{type:s}=r;let c={};return s==="line"&&(c=await qh({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:t})),s==="bar"&&(c=await Wh({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:t})),s==="pie"&&(c=await Kh({chartBaseConfig:r,chartDataConfig:n,chartDetailConfig:t})),c},Gh=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}},height:{type:String,default:"300px"}},setup(l){const r=l,n=a.ref({});a.onMounted(async()=>{const s=r==null?void 0:r.itemData;n.value=await Yh(s)});const t=a.computed(()=>(r==null?void 0:r.height)||"300px");return(s,c)=>(a.openBlock(),a.createElementBlock("div",{class:"eCharts",style:a.normalizeStyle({height:t.value})},[a.createVNode(gu.ssChart,{optionContents:n.value},null,8,["optionContents"])],4))}}),Jh=Ul._export_sfc(Gh,[["__scopeId","data-v-d4c081e8"]]),Xh={class:"chart-module layout"},Zh={class:"chart-module content"},Qh={class:"chart-module content"},e4={class:"form-content"},a4={class:"dialog-footer"},l4={class:"form-content"},r4={class:"dialog-footer"},n4={class:"form-content"},t4={class:"dialog-footer"},o4=a.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r,s=a.reactive({visible:!1,width:"840",title:"基础配置"}),c=a.ref([]),g=()=>[{label:"类型",prop:"type",type:"select",contents:[{label:"柱状图",value:"bar"},{label:"饼图",value:"pie"},{label:"折线图",value:"line"}],value:""},{label:"标题",prop:"title",type:"input",value:""}],h=a.ref({}),v=()=>{var He;c.value=g(),(He=c.value)==null||He.forEach(Te=>{var Ye;const Re=Te==null?void 0:Te.prop;Te.value=(Ye=h==null?void 0:h.value)==null?void 0:Ye[Re]}),s.visible=!0},m=He=>{h.value=He},u=()=>{var He;s.visible=!1,t("change",(He=Pe())==null?void 0:He.compData)},_=a.reactive({visible:!1,width:"840",title:"数据配置"}),S=a.ref([]),z=()=>[{label:"菜单选项",prop:"menu",type:"cascader",contents:[]},{label:"组信息选项",prop:"group",type:"select",contents:[]},{label:"名称列",prop:"nameCol",type:"select",contents:[]},{label:"取值列",prop:"valueCol",type:"select",contents:[]}],w=a.ref({}),j=()=>{const He=S.value,Te=I.cloneDeep(He);return Te==null||Te.forEach(Re=>{var qa;const Ye=Re==null?void 0:Re.prop;Re.value=(qa=w.value)==null?void 0:qa[Ye]}),Te},A=He=>{var Re;w.value=He;const Te=j();S.value=Te,t("change",(Re=Pe())==null?void 0:Re.compData)},N=async()=>{const He=await sa.getMenusContent(),Te=j();Te==null||Te.forEach(Re=>{(Re==null?void 0:Re.prop)==="menu"&&(Re.contents=He)}),S.value=Te,_.visible=!0,await pa(w.value.menu),await ee(w.value.group)},Y=a.reactive({visible:!1,width:"840",title:"详情页配置"}),b=a.ref([]),L=()=>[{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:[]}],T=a.ref({}),x=()=>{const He=b.value,Te=I.cloneDeep(He);return Te==null||Te.forEach(Re=>{var qa;const Ye=Re==null?void 0:Re.prop;Re.value=(qa=T.value)==null?void 0:qa[Ye]}),Te},k=He=>{var Re;T.value=He;const Te=x();b.value=Te,t("change",(Re=Pe())==null?void 0:Re.compData)},$=async()=>{await ne();const He=I.cloneDeep(U.value),Te=x();Te==null||Te.forEach(Re=>{var qa;const Ye=Re==null?void 0:Re.prop;Re.value=(qa=T==null?void 0:T.value)==null?void 0:qa[Ye],Ye==="mainKey"&&(Re.contents=He)}),b.value=Te,Y.visible=!0},U=a.ref([]),X=a.ref([]),be=a.ref({}),ze=a.ref({}),Ee=()=>{const{compData:He}=ye.value||{},Te=He==null?void 0:He.find(J=>{const{key:ie}=J;return ie==="header"}),Re=(Te==null?void 0:Te.contents)||[],Ye=Re==null?void 0:Re.filter((J,ie)=>{const{label:ce}=J;return ce!=="操作"}),qa=Ye==null?void 0:Ye.findIndex((J,ie)=>{const{isMainKey:ce}=J;return ce});if(qa<0)return[];const Va=He==null?void 0:He.find(J=>{const{key:ie}=J;return ie==="tableContents"}),P=(Va==null?void 0:Va.contents)||[];return P==null?void 0:P.map(J=>{const ie=J==null?void 0:J[0];let ce=qa;el.isObject(ie)&&(ie!=null&&ie.id)&&(ce=ce+1);const ma=J==null?void 0:J[ce];return{label:ma,value:ma}})},ne=async()=>{const He=await Ee();U.value=He},ke=async He=>{const Te=sessionStorage.getItem("systemKey");return await sa.getItemData(He,Te,"")},Z=async He=>{const Te=He;X.value=Te==null?void 0:Te.map(Re=>{const{name:Ye}=Re;return be.value[Ye]=Re,{label:Ye,value:Ye}})},de=He=>{const{comp:Te,compData:Re}=ze.value||{};if(Te==="Table"){let Ye=x();Ye=Ye.filter(qa=>{const{prop:Va}=qa;return Va!=="formItems"}),wa(Ye,Re),b.value=Ye}},Ke=async()=>{var Re,Ye;const He=(Re=T==null?void 0:T.value)==null?void 0:Re.mainKey,Te=(Ye=w==null?void 0:w.value)==null?void 0:Ye.menu;if(He){const Va=`${Te==null?void 0:Te.join("/")}^${He}`,P=await ke(Va);await Z(P);const F=x();F==null||F.forEach(J=>{(J==null?void 0:J.prop)==="group"&&(J.contents=X.value)}),b.value=F}};a.watch(()=>{var He;return(He=T==null?void 0:T.value)==null?void 0:He.mainKey},async(He,Te)=>{He!=Te&&He&&await Ke()});const Na=async He=>{const Te=be.value[He];ze.value=Te,await de()};a.watch(()=>{var He;return(He=T==null?void 0:T.value)==null?void 0:He.group},async(He,Te)=>{He!=Te&&He&&Na(He)});const te=async()=>{var Te;await Ke();const He=(Te=T.value)==null?void 0:Te.group;await Na(He)},D=a.ref([]),le=a.ref({}),ye=a.ref({}),ue=async He=>{const Te=He==null?void 0:He.join("/"),Re=sessionStorage.getItem("systemKey");return await sa.getItemData(Te,Re,"")},Ne=async He=>{const Te=await ue(He);D.value=Te==null?void 0:Te.map(Re=>{const{name:Ye}=Re;return le.value[Ye]=Re,{label:Ye,value:Ye}})},pa=async(He,Te)=>{await Ne(He);const Re=j();Re==null||Re.forEach(Ye=>{(Ye==null?void 0:Ye.prop)==="group"&&(Ye.contents=D.value)}),S.value=Re};a.watch(()=>{var He;return(He=w==null?void 0:w.value)==null?void 0:He.menu},async(He,Te)=>{const Re=He==null?void 0:He.join("/"),Ye=Te==null?void 0:Te.join("/");Re!=Ye&&await pa(He)});const wa=(He,Te)=>{const Re=Te==null?void 0:Te.find(P=>{const{key:F}=P;return F==="header"}),Ye=(Re==null?void 0:Re.contents)||[],qa=Ye==null?void 0:Ye.filter((P,F)=>{const{label:J}=P;return J!=="操作"}),Va=qa==null?void 0:qa.map((P,F)=>{const{label:J}=P;return{label:J,value:F}});He==null||He.forEach(P=>{const F=P==null?void 0:P.prop;(F==="nameCol"||F==="valueCol")&&(P.contents=Va)})},ja=He=>{const{comp:Te,compData:Re}=ye.value||{};if(Te==="Table"){w.value.formItems=[];let Ye=j();Ye=Ye.filter(qa=>{const{prop:Va}=qa;return Va!=="formItems"}),wa(Ye,Re),S.value=Ye}},ee=async He=>{const Te=le.value[He];ye.value=Te,await ja()};a.watch(()=>{var He;return(He=w==null?void 0:w.value)==null?void 0:He.group},async(He,Te)=>{He!=Te&&ee(He)});const ea=async()=>{var Re,Ye;const He=(Re=w.value)==null?void 0:Re.menu;await pa(He);const Te=(Ye=w.value)==null?void 0:Ye.group;await ee(Te)},Pe=()=>({comp:"chart",compData:[{key:"chartBaseConfig",contents:h.value},{key:"chartDataConfig",contents:w.value},{key:"chartDetailConfig",contents:T.value}]}),xa=()=>{s.visible=!1,_.visible=!1,Y.visible=!1};return a.onMounted(async()=>{var Te,Re,Ye;S.value=z(),b.value=L();const He=n==null?void 0:n.itemContents;h.value=((Te=He==null?void 0:He.find(qa=>qa.key==="chartBaseConfig"))==null?void 0:Te.contents)??{},w.value=((Re=He==null?void 0:He.find(qa=>qa.key==="chartDataConfig"))==null?void 0:Re.contents)??{},await ea(),T.value=((Ye=He==null?void 0:He.find(qa=>qa.key==="chartDetailConfig"))==null?void 0:Ye.contents)??{},await te()}),(He,Te)=>{const Re=a.resolveComponent("el-button");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",null,[a.createElementVNode("div",Xh,[Te[4]||(Te[4]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createVNode(Re,{id:"themeButton",onClick:Te[0]||(Te[0]=Ye=>v())},{default:a.withCtx(()=>Te[3]||(Te[3]=[a.createTextVNode(" 修改 ")])),_:1,__:[3]})]),a.createElementVNode("div",Zh,[Te[6]||(Te[6]=a.createElementVNode("h4",{class:"module-title"},"数据配置",-1)),a.createVNode(Re,{id:"themeButton",onClick:Te[1]||(Te[1]=Ye=>N())},{default:a.withCtx(()=>Te[5]||(Te[5]=[a.createTextVNode(" 修改 ")])),_:1,__:[5]})]),a.createElementVNode("div",Qh,[Te[8]||(Te[8]=a.createElementVNode("h4",{class:"module-title"},"详情数据配置",-1)),a.createVNode(Re,{id:"themeButton",onClick:Te[2]||(Te[2]=Ye=>$())},{default:a.withCtx(()=>Te[7]||(Te[7]=[a.createTextVNode(" 修改 ")])),_:1,__:[7]})])]),a.createVNode(vr.ssDialog,{visible:s.visible,title:s.title,onBeforeDestroy:xa,width:s.width},{default:a.withCtx(()=>[a.createElementVNode("div",e4,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:c.value,key:c.value,isEnableWrap:!0,onChange:m},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",a4,[a.createVNode(Re,{class:"cancel-button button",onClick:xa,id:"themeBorderButton"},{default:a.withCtx(()=>Te[9]||(Te[9]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[9]}),a.createVNode(Re,{class:"ok-button button",onClick:u,id:"themeButton"},{default:a.withCtx(()=>Te[10]||(Te[10]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[10]})])]),_:1},8,["visible","title","width"]),a.createVNode(vr.ssDialog,{visible:_.visible,title:_.title,onBeforeDestroy:xa,width:_.width},{default:a.withCtx(()=>[a.createElementVNode("div",l4,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:S.value,key:S.value,isEnableWrap:!0,onChange:A},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",r4,[a.createVNode(Re,{class:"cancel-button button",onClick:xa,id:"themeBorderButton"},{default:a.withCtx(()=>Te[11]||(Te[11]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[11]}),a.createVNode(Re,{class:"ok-button button",onClick:xa,id:"themeButton"},{default:a.withCtx(()=>Te[12]||(Te[12]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[12]})])]),_:1},8,["visible","title","width"]),a.createVNode(vr.ssDialog,{visible:Y.visible,title:Y.title,onBeforeDestroy:xa,width:Y.width},{default:a.withCtx(()=>[a.createElementVNode("div",n4,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:k},null,8,["rowContents"]))])]),footer:a.withCtx(()=>[a.createElementVNode("div",t4,[a.createVNode(Re,{class:"cancel-button button",onClick:xa,id:"themeBorderButton"},{default:a.withCtx(()=>Te[13]||(Te[13]=[a.createTextVNode(a.toDisplayString("取消"))])),_:1,__:[13]}),a.createVNode(Re,{class:"ok-button button",onClick:xa,id:"themeButton"},{default:a.withCtx(()=>Te[14]||(Te[14]=[a.createTextVNode(a.toDisplayString("确认"))])),_:1,__:[14]})])]),_:1},8,["visible","title","width"])],64)}}}),i4=Ul._export_sfc(o4,[["__scopeId","data-v-fe119645"]]),s4={class:"layout"},c4=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},userInfo:{type:Object,default:{}}},emits:["rowClick"],setup(l,{emit:r}){const n=r,t=l;a.onMounted(async()=>{});const s=a.computed(()=>I.cloneDeep(t==null?void 0:t.itemData)||[]),c=a.computed(()=>{var u;const m=(u=s==null?void 0:s.value)==null?void 0:u.find(_=>{const{key:S}=_;return S==="baseConfig"});return m==null?void 0:m.contents}),g=a.computed(()=>{var u;const m=(u=s==null?void 0:s.value)==null?void 0:u.find(_=>{const{key:S}=_;return S==="children"});return m==null?void 0:m.contents}),h=a.computed(()=>{let m=I.cloneDeep(g.value)||[];const u=m.length;let _=0;const S=[];if(m=m.map(z=>{const w=z.span;return w?(z.span=Number(w),_=_+z.span):S.push(z),z}),_<24){const z=Math.floor((24-_)/u);S.forEach(w=>{w.span=z})}return m}),v=m=>{n("rowClick",m)};return(m,u)=>{var z;const _=a.resolveComponent("el-col"),S=a.resolveComponent("el-row");return a.openBlock(),a.createElementBlock("div",s4,[a.createVNode(S,{style:a.normalizeStyle({height:(z=c.value)==null?void 0:z.height})},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(h.value,(w,j)=>(a.openBlock(),a.createBlock(_,{span:w==null?void 0:w.span},{default:a.withCtx(()=>{var A;return[a.unref(Ct)?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)(w.comp)),{key:a.unref(qn),compName:w.name,index:(w==null?void 0:w.id)??j,height:(A=c.value)==null?void 0:A.height,itemData:w==null?void 0:w.compData,childItemData:w==null?void 0:w.itemChildData,onChange:a.unref(So),onContentChange:a.unref(Eo),onPageChange:a.unref(Do),onRowClick:v},null,40,["compName","index","height","itemData","childItemData","onChange","onContentChange","onPageChange"])):a.createCommentVNode("",!0)]}),_:2},1032,["span"]))),256))]),_:1},8,["style"])])}}}),u4=Ul._export_sfc(c4,[["__scopeId","data-v-ab9a36ed"]]),d4={class:"layout-operate"},p4={class:"layout-module"},f4={class:"collapse-title-item"},h4={class:"collapse-title"},v4={class:"icon-content"},m4=["onClick"],y4={class:"comp-child"},g4=a.defineComponent({__name:"operate",props:{itemContents:{type:Object,default:()=>{}},originalItemContents:{type:Array,default:()=>[]},itemChildData:{type:Array,default:()=>[]}},emits:["change"],setup(l,{emit:r}){const n=l,t=r;a.onMounted(()=>{j()});const s=a.ref({}),c=a.ref({}),g=a.ref([]),h=T=>[{label:"高度",prop:"height",type:"input",value:T==null?void 0:T.height}],v=T=>{c.value=T,t("change",L(),!0)},m=a.ref([]),u=a.ref([]),_=T=>[{label:"占比",prop:"span",type:"input",value:T==null?void 0:T.span}],S=a.computed(()=>{const T=n==null?void 0:n.itemContents;return I.cloneDeep(T)}),z=a.computed(()=>{const T=S==null?void 0:S.value,x=T==null?void 0:T.find(k=>{const{key:$}=k;return $==="baseConfig"});return x==null?void 0:x.contents}),w=a.computed(()=>{const T=S==null?void 0:S.value,x=T==null?void 0:T.find(k=>{const{key:$}=k;return $==="children"});return x==null?void 0:x.contents}),j=()=>{var T;s.value=S.value||{},m.value=(w==null?void 0:w.value)||[],g.value=h(),g.value=(T=g.value)==null?void 0:T.map(x=>{var $;const{prop:k}=x;return x.value=($=z.value)==null?void 0:$[k],x})};a.watch(()=>{var T;return(T=w==null?void 0:w.value)==null?void 0:T.length},()=>{var T;m.value=(w==null?void 0:w.value)||[],u.value=(T=w.value)==null?void 0:T.map(x=>_(x))},{immediate:!0});const A=(T,x)=>{const k=I.cloneDeep(w==null?void 0:w.value);k[x].span=T.span,m.value=k,t("change",L(),!0)},N=T=>St(T),Y=(T,x,k)=>{if(!T)return;const $=I.cloneDeep(w==null?void 0:w.value);$[k]&&($[k].compData=T,m.value=$,t("change",L(),!0))},b=T=>{I.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let x=I.cloneDeep(w==null?void 0:w.value);x=x==null?void 0:x.filter((k,$)=>T!==$),m.value=x,t("change",L(),!0),el.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},L=()=>({compData:[{key:"baseConfig",contents:c.value},{key:"children",contents:m==null?void 0:m.value}]});return(T,x)=>{const k=a.resolveComponent("svg-icon");return a.openBlock(),a.createElementBlock("div",d4,[a.createElementVNode("div",p4,[x[1]||(x[1]=a.createElementVNode("div",{class:"module-title"},"基础配置",-1)),a.createElementVNode("div",null,[a.createVNode(pl.ssForm,{rowContents:g.value,isEnableWrap:!0,onChange:x[0]||(x[0]=$=>v($))},null,8,["rowContents"])])]),a.createVNode(Hs.default,{class:"collapse-content",collapseContents:w.value},{title:a.withCtx(({item:$,index:U})=>[a.createElementVNode("div",f4,[a.createElementVNode("div",h4,a.toDisplayString($.name),1),a.createElementVNode("div",v4,[a.createElementVNode("div",{onClick:a.withModifiers(X=>b(U),["stop"]),class:"icon-content"},[a.createVNode(k,{name:"Delete",style:{width:"16px",height:"16px"}})],8,m4)])])]),content:a.withCtx(({item:$,index:U})=>[a.createElementVNode("div",y4,[a.createElementVNode("div",null,[(a.openBlock(),a.createBlock(pl.ssForm,{rowContents:u.value[U],key:U,isEnableWrap:!0,onChange:X=>A(X,U)},null,8,["rowContents","onChange"]))]),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(N($.comp+"Operate")),{itemContents:$==null?void 0:$.compData,originalItemContents:$.compData,onChange:X=>Y(X,$,U)},null,40,["itemContents","originalItemContents","onChange"]))])]),_:1},8,["collapseContents"])])}}}),b4=Ul._export_sfc(g4,[["__scopeId","data-v-ba05456e"]]),k4=typeof window<"u";var ms;k4&&((ms=window==null?void 0:window.navigator)!=null&&ms.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function rn(l){return l==null}function Sc(){}const x4=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(x4)));function _4(){const l=new Map;return{on(r,n){const t=l.get(r);t!=null&&t.add(n)||l.set(r,new Set([n]))},off(r,n){const t=l.get(r);t&&t.delete(n)},clear(r){const n=l.get(r);n&&n.clear()},clearAll(){l.clear()},emit(r,...n){const t=l.get(r);t&&t.forEach(s=>{s(...n)})}}}function ys(l,r=16){if(typeof l!="function")return Sc;const n=(...c)=>{l(...c)};if(r<=0)return Ec(n);let t=0,s;return function(...c){const g=Date.now(),h=g-t;clearTimeout(s),h>=r?(t=g,n(...c)):s=setTimeout(()=>{t=Date.now(),n(...c)},Math.max(0,r-h))}}function w4(l,r=100){if(typeof l!="function")return Sc;const n=(...s)=>{l(...s)};if(r<=0)return Ec(n);let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{n(...s)},r)}}function Ec(l){if(typeof l!="function")return l;let r=!1,n,t;return function(...s){return n=s,r||(r=!0,t=Promise.resolve().then(()=>(r=!1,t=void 0,l(...n)))),t}}const It=new Set,Dc=new WeakMap;function C4(){It.forEach(l=>{l(...Dc.get(l))}),It.clear()}function jr(l,...r){if(typeof l!="function")return l;Dc.set(l,r),!It.has(l)&&(It.add(l),It.size===1&&Promise.resolve().then(C4))}const Bc=Symbol("LAYOUT_KEY"),Nc=Symbol("EMITTER_KEY");function S4(l){let r=0,n;for(let t=0,s=l.length;t<s;t++)n=l[t].y+l[t].h,n>r&&(r=n);return r}function yi(l){const r=Array(l.length);for(let n=0,t=l.length;n<t;n++)r[n]=E4(l[n]);return r}function E4(l){return{...l}}function Tc(l,r){return!(l===r||l.x+l.w<=r.x||l.x>=r.x+r.w||l.y+l.h<=r.y||l.y>=r.y+r.h)}function gt(l,r,n){const t=zc(l),s=Mc(l),c=Array(l.length);for(let g=0,h=s.length;g<h;g++){let v=s[g];v.static||(v=D4(t,v,r,n),t.push(v)),c[l.findIndex(m=>m.i===v.i)]=v,v.moved=!1}return c}function D4(l,r,n,t){if(n)for(;r.y>0&&!Lt(l,r);)r.y--;else if(t){const c=t[r.i].y;for(;r.y>c&&!Lt(l,r);)r.y--}let s;for(;s=Lt(l,r);)r.y=s.y+s.h;return r}function B4(l,r){const n=zc(l);for(let t=0,s=l.length;t<s;t++){const c=l[t];if(c.x+c.w>r.cols&&(c.x=r.cols-c.w),c.x<0&&(c.x=0,c.w=r.cols),!c.static)n.push(c);else for(;Lt(n,c);)c.y++}return l}function gs(l,r){for(let n=0,t=l.length;n<t;n++)if(l[n].i===r)return l[n]}function Lt(l,r){for(let n=0,t=l.length;n<t;n++)if(Tc(l[n],r))return l[n]}function Ac(l,r){return l.filter(n=>Tc(n,r))}function zc(l){return l.filter(r=>r.static)}function gi(l,r,n,t,s=!1,c=!1){if(r.static)return l;const g=r.x,h=r.y,v=t&&r.y>t;typeof n=="number"&&(r.x=n),typeof t=="number"&&(r.y=t),r.moved=!0;let m=Mc(l);v&&(m=m.reverse());const u=Ac(m,r);if(c&&u.length)return r.x=g,r.y=h,r.moved=!1,l;for(let _=0,S=u.length;_<S;_++){const z=u[_];z.moved||r.y>z.y&&r.y-z.y>z.h/4||(z.static?l=bs(l,z,r,s):l=bs(l,r,z,s))}return l}function bs(l,r,n,t){if(t){const s={x:n.x,y:n.y,w:n.w,h:n.h};if(s.y=Math.max(r.y-n.h,0),!Lt(l,s))return gi(l,n,void 0,s.y,!1)}return gi(l,n,void 0,n.y+1,!1)}function N4(l,r,n,t){const s="translate3d("+r+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:t+"px",position:"absolute"}}function T4(l,r,n,t){const s="translate3d("+r*-1+"px,"+l+"px, 0)";return{transform:s,WebkitTransform:s,MozTransform:s,msTransform:s,OTransform:s,width:n+"px",height:t+"px",position:"absolute"}}function A4(l,r,n,t){return{top:l+"px",left:r+"px",width:n+"px",height:t+"px",position:"absolute"}}function z4(l,r,n,t){return{top:l+"px",right:r+"px",width:n+"px",height:t+"px",position:"absolute"}}function Mc(l){return Array.from(l).sort(function(r,n){return r.y===n.y&&r.x===n.x?0:r.y>n.y||r.y===n.y&&r.x>n.x?1:-1})}function M4(l,r){r=r||"Layout";const n=["x","y","w","h"],t=[];if(!Array.isArray(l))throw new Error(r+" must be an array!");for(let s=0,c=l.length;s<c;s++){const g=l[s];for(let h=0;h<n.length;h++)if(typeof g[n[h]]!="number")throw new Error("VueGridLayout: "+r+"["+s+"]."+n[h]+" must be a number!");if(g.i===void 0||g.i===null)throw new Error("VueGridLayout: "+r+"["+s+"].i cannot be null!");if(typeof g.i!="number"&&typeof g.i!="string")throw new Error("VueGridLayout: "+r+"["+s+"].i must be a string or number!");if(t.indexOf(g.i)>=0)throw new Error("VueGridLayout: "+r+"["+s+"].i must be unique!");if(t.push(g.i),g.static!==void 0&&typeof g.static!="boolean")throw new Error("VueGridLayout: "+r+"["+s+"].static must be a boolean!")}}function O4(l,r="vgl"){const n=()=>`${r}-${l}`;return{b:n,be:t=>`${n()}__${t}`,bm:t=>`${n()}--${t}`,bem:(t,s)=>`${n()}__${t}--${s}`}}function ks(l){return I4(l)}function I4(l){var r;const n=((r=l.target)==null?void 0:r.offsetParent)||document.body,t=l.offsetParent===document.body?{left:0,top:0}:n.getBoundingClientRect(),s=l.clientX+n.scrollLeft-t.left,c=l.clientY+n.scrollTop-t.top;return{x:s,y:c}}function xs(l,r,n,t){return L4(l)?{deltaX:n-l,deltaY:t-r,lastX:l,lastY:r,x:n,y:t}:{deltaX:0,deltaY:0,lastX:n,lastY:t,x:n,y:t}}function L4(l){return typeof l=="number"&&!Number.isNaN(l)}function V4(l,r){const n=Ic(l);let t=n[0];for(let s=1,c=n.length;s<c;s++){const g=n[s];r>l[g]&&(t=g)}return t}function Oc(l,r){if(!r[l])throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint "+l+" is missing!");return r[l]}function R4(l,r,n,t,s,c,g){if(r[t])return yi(r[t]);let h=l;const v=Ic(n),m=v.slice(v.indexOf(t));for(let u=0,_=m.length;u<_;u++){const S=m[u];if(r[S]){h=r[S];break}}return h=yi(h||[]),gt(B4(h,{cols:c}),g)}function Ic(l){return Object.keys(l).sort((r,n)=>l[r]-l[n])}let $4="auto";function P4(){return typeof document<"u"}function _s(){return P4()?typeof document.dir<"u"?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir"):$4}var Ot={exports:{}},F4=Ot.exports,ws;function j4(){return ws||(ws=1,function(l,r){(function(n,t){l.exports=t()})(F4,function(){function n(i,o){var p=Object.keys(i);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(i);o&&(y=y.filter(function(C){return Object.getOwnPropertyDescriptor(i,C).enumerable})),p.push.apply(p,y)}return p}function t(i){for(var o=1;o<arguments.length;o++){var p=arguments[o]!=null?arguments[o]:{};o%2?n(Object(p),!0).forEach(function(y){v(i,y,p[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(p)):n(Object(p)).forEach(function(y){Object.defineProperty(i,y,Object.getOwnPropertyDescriptor(p,y))})}return i}function s(i){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},s(i)}function c(i,o){if(!(i instanceof o))throw new TypeError("Cannot call a class as a function")}function g(i,o){for(var p=0;p<o.length;p++){var y=o[p];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(i,j(y.key),y)}}function h(i,o,p){return o&&g(i.prototype,o),Object.defineProperty(i,"prototype",{writable:!1}),i}function v(i,o,p){return(o=j(o))in i?Object.defineProperty(i,o,{value:p,enumerable:!0,configurable:!0,writable:!0}):i[o]=p,i}function m(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),o&&_(i,o)}function u(i){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},u(i)}function _(i,o){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,y){return p.__proto__=y,p},_(i,o)}function S(i){if(i===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}function z(i){var o=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 p,y=u(i);if(o){var C=u(this).constructor;p=Reflect.construct(y,arguments,C)}else p=y.apply(this,arguments);return function(V,q){if(q&&(typeof q=="object"||typeof q=="function"))return q;if(q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S(V)}(this,p)}}function w(){return w=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(i,o,p){var y=function(V,q){for(;!Object.prototype.hasOwnProperty.call(V,q)&&(V=u(V))!==null;);return V}(i,o);if(y){var C=Object.getOwnPropertyDescriptor(y,o);return C.get?C.get.call(arguments.length<3?i:p):C.value}},w.apply(this,arguments)}function j(i){var o=function(p,y){if(typeof p!="object"||p===null)return p;var C=p[Symbol.toPrimitive];if(C!==void 0){var V=C.call(p,y);if(typeof V!="object")return V;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(i,"string");return typeof o=="symbol"?o:o+""}var A=function(i){return!(!i||!i.Window)&&i instanceof i.Window},N=void 0,Y=void 0;function b(i){N=i;var o=i.document.createTextNode("");o.ownerDocument!==i.document&&typeof i.wrap=="function"&&i.wrap(o)===o&&(i=i.wrap(i)),Y=i}function L(i){return A(i)?i:(i.ownerDocument||i).defaultView||Y.window}typeof window<"u"&&window&&b(window);var T=function(i){return!!i&&s(i)==="object"},x=function(i){return typeof i=="function"},k={window:function(i){return i===Y||A(i)},docFrag:function(i){return T(i)&&i.nodeType===11},object:T,func:x,number:function(i){return typeof i=="number"},bool:function(i){return typeof i=="boolean"},string:function(i){return typeof i=="string"},element:function(i){if(!i||s(i)!=="object")return!1;var o=L(i)||Y;return/object|function/.test(typeof Element>"u"?"undefined":s(Element))?i instanceof Element||i instanceof o.Element:i.nodeType===1&&typeof i.nodeName=="string"},plainObject:function(i){return T(i)&&!!i.constructor&&/function Object\b/.test(i.constructor.toString())},array:function(i){return T(i)&&i.length!==void 0&&x(i.splice)}};function $(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.prepared.axis;p==="x"?(o.coords.cur.page.y=o.coords.start.page.y,o.coords.cur.client.y=o.coords.start.client.y,o.coords.velocity.client.y=0,o.coords.velocity.page.y=0):p==="y"&&(o.coords.cur.page.x=o.coords.start.page.x,o.coords.cur.client.x=o.coords.start.client.x,o.coords.velocity.client.x=0,o.coords.velocity.page.x=0)}}function U(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="drag"){var y=p.prepared.axis;if(y==="x"||y==="y"){var C=y==="x"?"y":"x";o.page[C]=p.coords.start.page[C],o.client[C]=p.coords.start.client[C],o.delta[C]=0}}}var X={id:"actions/drag",install:function(i){var o=i.actions,p=i.Interactable,y=i.defaults;p.prototype.draggable=X.draggable,o.map.drag=X,o.methodDict.drag="draggable",y.actions.drag=X.defaults},listeners:{"interactions:before-action-move":$,"interactions:action-resume":$,"interactions:action-move":U,"auto-start:check":function(i){var o=i.interaction,p=i.interactable,y=i.buttons,C=p.options.drag;if(C&&C.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(y&p.options.drag.mouseButtons)!=0))return i.action={name:"drag",axis:C.lockAxis==="start"?C.startAxis:C.lockAxis},!1}},draggable:function(i){return k.object(i)?(this.options.drag.enabled=i.enabled!==!1,this.setPerAction("drag",i),this.setOnEvents("drag",i),/^(xy|x|y|start)$/.test(i.lockAxis)&&(this.options.drag.lockAxis=i.lockAxis),/^(xy|x|y)$/.test(i.startAxis)&&(this.options.drag.startAxis=i.startAxis),this):k.bool(i)?(this.options.drag.enabled=i,this):this.options.drag},beforeMove:$,move:U,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(i){return i.search("drag")===0}},be=X,ze={init:function(i){var o=i;ze.document=o.document,ze.DocumentFragment=o.DocumentFragment||Ee,ze.SVGElement=o.SVGElement||Ee,ze.SVGSVGElement=o.SVGSVGElement||Ee,ze.SVGElementInstance=o.SVGElementInstance||Ee,ze.Element=o.Element||Ee,ze.HTMLElement=o.HTMLElement||ze.Element,ze.Event=o.Event,ze.Touch=o.Touch||Ee,ze.PointerEvent=o.PointerEvent||o.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function Ee(){}var ne=ze,ke={init:function(i){var o=ne.Element,p=i.navigator||{};ke.supportsTouch="ontouchstart"in i||k.func(i.DocumentTouch)&&ne.document instanceof i.DocumentTouch,ke.supportsPointerEvent=p.pointerEnabled!==!1&&!!ne.PointerEvent,ke.isIOS=/iP(hone|od|ad)/.test(p.platform),ke.isIOS7=/iP(hone|od|ad)/.test(p.platform)&&/OS 7[^\d]/.test(p.appVersion),ke.isIe9=/MSIE 9/.test(p.userAgent),ke.isOperaMobile=p.appName==="Opera"&&ke.supportsTouch&&/Presto/.test(p.userAgent),ke.prefixedMatchesSelector="matches"in o.prototype?"matches":"webkitMatchesSelector"in o.prototype?"webkitMatchesSelector":"mozMatchesSelector"in o.prototype?"mozMatchesSelector":"oMatchesSelector"in o.prototype?"oMatchesSelector":"msMatchesSelector",ke.pEventTypes=ke.supportsPointerEvent?ne.PointerEvent===i.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,ke.wheelEvent=ne.document&&"onmousewheel"in ne.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},Z=ke;function de(i,o){if(i.contains)return i.contains(o);for(;o;){if(o===i)return!0;o=o.parentNode}return!1}function Ke(i,o){for(;k.element(i);){if(te(i,o))return i;i=Na(i)}return null}function Na(i){var o=i.parentNode;if(k.docFrag(o)){for(;(o=o.host)&&k.docFrag(o););return o}return o}function te(i,o){return Y!==N&&(o=o.replace(/\/deep\//g," ")),i[Z.prefixedMatchesSelector](o)}var D=function(i){return i.parentNode||i.host};function le(i,o){for(var p,y=[],C=i;(p=D(C))&&C!==o&&p!==C.ownerDocument;)y.unshift(C),C=p;return y}function ye(i,o,p){for(;k.element(i);){if(te(i,o))return!0;if((i=Na(i))===p)return te(i,o)}return!1}function ue(i){return i.correspondingUseElement||i}function Ne(i){var o=i instanceof ne.SVGElement?i.getBoundingClientRect():i.getClientRects()[0];return o&&{left:o.left,right:o.right,top:o.top,bottom:o.bottom,width:o.width||o.right-o.left,height:o.height||o.bottom-o.top}}function pa(i){var o,p=Ne(i);if(!Z.isIOS7&&p){var y={x:(o=(o=L(i))||Y).scrollX||o.document.documentElement.scrollLeft,y:o.scrollY||o.document.documentElement.scrollTop};p.left+=y.x,p.right+=y.x,p.top+=y.y,p.bottom+=y.y}return p}function wa(i){for(var o=[];i;)o.push(i),i=Na(i);return o}function ja(i){return!!k.string(i)&&(ne.document.querySelector(i),!0)}function ee(i,o){for(var p in o)i[p]=o[p];return i}function ea(i,o,p){return i==="parent"?Na(p):i==="self"?o.getRect(p):Ke(p,i)}function Pe(i,o,p,y){var C=i;return k.string(C)?C=ea(C,o,p):k.func(C)&&(C=C.apply(void 0,y)),k.element(C)&&(C=pa(C)),C}function xa(i){return i&&{x:"x"in i?i.x:i.left,y:"y"in i?i.y:i.top}}function He(i){return!i||"x"in i&&"y"in i||((i=ee({},i)).x=i.left||0,i.y=i.top||0,i.width=i.width||(i.right||0)-i.x,i.height=i.height||(i.bottom||0)-i.y),i}function Te(i,o,p){i.left&&(o.left+=p.x),i.right&&(o.right+=p.x),i.top&&(o.top+=p.y),i.bottom&&(o.bottom+=p.y),o.width=o.right-o.left,o.height=o.bottom-o.top}function Re(i,o,p){var y=p&&i.options[p];return xa(Pe(y&&y.origin||i.options.origin,i,o,[i&&o]))||{x:0,y:0}}function Ye(i,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(pe){return!0},y=arguments.length>3?arguments[3]:void 0;if(y=y||{},k.string(i)&&i.search(" ")!==-1&&(i=qa(i)),k.array(i))return i.forEach(function(pe){return Ye(pe,o,p,y)}),y;if(k.object(i)&&(o=i,i=""),k.func(o)&&p(i))y[i]=y[i]||[],y[i].push(o);else if(k.array(o))for(var C=0,V=o;C<V.length;C++){var q=V[C];Ye(i,q,p,y)}else if(k.object(o))for(var G in o)Ye(qa(G).map(function(pe){return"".concat(i).concat(pe)}),o[G],p,y);return y}function qa(i){return i.trim().split(/ +/)}var Va=function(i,o){return Math.sqrt(i*i+o*o)},P=["webkit","moz"];function F(i,o){i.__set||(i.__set={});var p=function(C){if(P.some(function(V){return C.indexOf(V)===0}))return 1;typeof i[C]!="function"&&C!=="__set"&&Object.defineProperty(i,C,{get:function(){return C in i.__set?i.__set[C]:i.__set[C]=o[C]},set:function(V){i.__set[C]=V},configurable:!0})};for(var y in o)p(y);return i}function J(i,o){i.page=i.page||{},i.page.x=o.page.x,i.page.y=o.page.y,i.client=i.client||{},i.client.x=o.client.x,i.client.y=o.client.y,i.timeStamp=o.timeStamp}function ie(i){i.page.x=0,i.page.y=0,i.client.x=0,i.client.y=0}function ce(i){return i instanceof ne.Event||i instanceof ne.Touch}function ma(i,o,p){return i=i||"page",(p=p||{}).x=o[i+"X"],p.y=o[i+"Y"],p}function na(i,o){return o=o||{x:0,y:0},Z.isOperaMobile&&ce(i)?(ma("screen",i,o),o.x+=window.scrollX,o.y+=window.scrollY):ma("page",i,o),o}function Ie(i){return k.number(i.pointerId)?i.pointerId:i.identifier}function _e(i,o,p){var y=o.length>1?ve(o):o[0];na(y,i.page),function(C,V){V=V||{},Z.isOperaMobile&&ce(C)?ma("screen",C,V):ma("client",C,V)}(y,i.client),i.timeStamp=p}function Ca(i){var o=[];return k.array(i)?(o[0]=i[0],o[1]=i[1]):i.type==="touchend"?i.touches.length===1?(o[0]=i.touches[0],o[1]=i.changedTouches[0]):i.touches.length===0&&(o[0]=i.changedTouches[0],o[1]=i.changedTouches[1]):(o[0]=i.touches[0],o[1]=i.touches[1]),o}function ve(i){for(var o={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},p=0;p<i.length;p++){var y=i[p];for(var C in o)o[C]+=y[C]}for(var V in o)o[V]/=i.length;return o}function Je(i){if(!i.length)return null;var o=Ca(i),p=Math.min(o[0].pageX,o[1].pageX),y=Math.min(o[0].pageY,o[1].pageY),C=Math.max(o[0].pageX,o[1].pageX),V=Math.max(o[0].pageY,o[1].pageY);return{x:p,y,left:p,top:y,right:C,bottom:V,width:C-p,height:V-y}}function Qe(i,o){var p=o+"X",y=o+"Y",C=Ca(i),V=C[0][p]-C[1][p],q=C[0][y]-C[1][y];return Va(V,q)}function Fe(i,o){var p=o+"X",y=o+"Y",C=Ca(i),V=C[1][p]-C[0][p],q=C[1][y]-C[0][y];return 180*Math.atan2(q,V)/Math.PI}function _a(i){return k.string(i.pointerType)?i.pointerType:k.number(i.pointerType)?[void 0,void 0,"touch","pen","mouse"][i.pointerType]:/touch/.test(i.type||"")||i instanceof ne.Touch?"touch":"mouse"}function Le(i){var o=k.func(i.composedPath)?i.composedPath():i.path;return[ue(o?o[0]:i.target),ue(i.currentTarget)]}var va=function(){function i(o){c(this,i),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=o}return h(i,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),i}();Object.defineProperty(va.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var re=function(i,o){for(var p=0;p<o.length;p++){var y=o[p];i.push(y)}return i},Se=function(i){return re([],i)},K=function(i,o){for(var p=0;p<i.length;p++)if(o(i[p],p,i))return p;return-1},je=function(i,o){return i[K(i,o)]},De=function(i){m(p,i);var o=z(p);function p(y,C,V){var q;c(this,p),(q=o.call(this,C._interaction)).dropzone=void 0,q.dragEvent=void 0,q.relatedTarget=void 0,q.draggable=void 0,q.propagationStopped=!1,q.immediatePropagationStopped=!1;var G=V==="dragleave"?y.prev:y.cur,pe=G.element,Oe=G.dropzone;return q.type=V,q.target=pe,q.currentTarget=pe,q.dropzone=Oe,q.dragEvent=C,q.relatedTarget=C.target,q.draggable=C.interactable,q.timeStamp=C.timeStamp,q}return h(p,[{key:"reject",value:function(){var y=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 V=C.activeDrops,q=K(V,function(pe){var Oe=pe.dropzone,ge=pe.element;return Oe===y.dropzone&&ge===y.target});C.activeDrops.splice(q,1);var G=new p(C,this.dragEvent,"dropdeactivate");G.dropzone=this.dropzone,G.target=this.target,this.dropzone.fire(G)}else this.dropzone.fire(new p(C,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),p}(va);function Ma(i,o){for(var p=0,y=i.slice();p<y.length;p++){var C=y[p],V=C.dropzone,q=C.element;o.dropzone=V,o.target=q,V.fire(o),o.propagationStopped=o.immediatePropagationStopped=!1}}function Ba(i,o){for(var p=function(V,q){for(var G=[],pe=0,Oe=V.interactables.list;pe<Oe.length;pe++){var ge=Oe[pe];if(ge.options.drop.enabled){var Ze=ge.options.drop.accept;if(!(k.element(Ze)&&Ze!==q||k.string(Ze)&&!te(q,Ze)||k.func(Ze)&&!Ze({dropzone:ge,draggableElement:q})))for(var za=0,nl=ge.getAllElements();za<nl.length;za++){var Qa=nl[za];Qa!==q&&G.push({dropzone:ge,element:Qa,rect:ge.getRect(Qa)})}}}return G}(i,o),y=0;y<p.length;y++){var C=p[y];C.rect=C.dropzone.getRect(C.element)}return p}function Ua(i,o,p){for(var y=i.dropState,C=i.interactable,V=i.element,q=[],G=0,pe=y.activeDrops;G<pe.length;G++){var Oe=pe[G],ge=Oe.dropzone,Ze=Oe.element,za=Oe.rect,nl=ge.dropCheck(o,p,C,V,Ze,za);q.push(nl?Ze:null)}var Qa=function(il){for(var _l,sl,Dl,Ml=[],Kl=0;Kl<il.length;Kl++){var El=il[Kl],Fl=il[_l];if(El&&Kl!==_l)if(Fl){var Ir=D(El),mr=D(Fl);if(Ir!==El.ownerDocument)if(mr!==El.ownerDocument)if(Ir!==mr){Ml=Ml.length?Ml:le(Fl);var Fr=void 0;if(Fl instanceof ne.HTMLElement&&El instanceof ne.SVGElement&&!(El instanceof ne.SVGSVGElement)){if(El===mr)continue;Fr=El.ownerSVGElement}else Fr=El;for(var en=le(Fr,Fl.ownerDocument),on=0;en[on]&&en[on]===Ml[on];)on++;var ct=[en[on-1],en[on],Ml[on]];if(ct[0])for(var Tn=ct[0].lastChild;Tn;){if(Tn===ct[1]){_l=Kl,Ml=en;break}if(Tn===ct[2])break;Tn=Tn.previousSibling}}else Dl=Fl,(parseInt(L(sl=El).getComputedStyle(sl).zIndex,10)||0)>=(parseInt(L(Dl).getComputedStyle(Dl).zIndex,10)||0)&&(_l=Kl);else _l=Kl}else _l=Kl}return _l}(q);return y.activeDrops[Qa]||null}function Aa(i,o,p){var y=i.dropState,C={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return p.type==="dragstart"&&(C.activate=new De(y,p,"dropactivate"),C.activate.target=null,C.activate.dropzone=null),p.type==="dragend"&&(C.deactivate=new De(y,p,"dropdeactivate"),C.deactivate.target=null,C.deactivate.dropzone=null),y.rejected||(y.cur.element!==y.prev.element&&(y.prev.dropzone&&(C.leave=new De(y,p,"dragleave"),p.dragLeave=C.leave.target=y.prev.element,p.prevDropzone=C.leave.dropzone=y.prev.dropzone),y.cur.dropzone&&(C.enter=new De(y,p,"dragenter"),p.dragEnter=y.cur.element,p.dropzone=y.cur.dropzone)),p.type==="dragend"&&y.cur.dropzone&&(C.drop=new De(y,p,"drop"),p.dropzone=y.cur.dropzone,p.relatedTarget=y.cur.element),p.type==="dragmove"&&y.cur.dropzone&&(C.move=new De(y,p,"dropmove"),p.dropzone=y.cur.dropzone)),C}function Ae(i,o){var p=i.dropState,y=p.activeDrops,C=p.cur,V=p.prev;o.leave&&V.dropzone.fire(o.leave),o.enter&&C.dropzone.fire(o.enter),o.move&&C.dropzone.fire(o.move),o.drop&&C.dropzone.fire(o.drop),o.deactivate&&Ma(y,o.deactivate),p.prev.dropzone=C.dropzone,p.prev.element=C.element}function we(i,o){var p=i.interaction,y=i.iEvent,C=i.event;if(y.type==="dragmove"||y.type==="dragend"){var V=p.dropState;o.dynamicDrop&&(V.activeDrops=Ba(o,p.element));var q=y,G=Ua(p,q,C);V.rejected=V.rejected&&!!G&&G.dropzone===V.cur.dropzone&&G.element===V.cur.element,V.cur.dropzone=G&&G.dropzone,V.cur.element=G&&G.element,V.events=Aa(p,0,q)}}var Ea={id:"actions/drop",install:function(i){var o=i.actions,p=i.interactStatic,y=i.Interactable,C=i.defaults;i.usePlugin(be),y.prototype.dropzone=function(V){return function(q,G){if(k.object(G)){if(q.options.drop.enabled=G.enabled!==!1,G.listeners){var pe=Ye(G.listeners),Oe=Object.keys(pe).reduce(function(Ze,za){return Ze[/^(enter|leave)/.test(za)?"drag".concat(za):/^(activate|deactivate|move)/.test(za)?"drop".concat(za):za]=pe[za],Ze},{}),ge=q.options.drop.listeners;ge&&q.off(ge),q.on(Oe),q.options.drop.listeners=Oe}return k.func(G.ondrop)&&q.on("drop",G.ondrop),k.func(G.ondropactivate)&&q.on("dropactivate",G.ondropactivate),k.func(G.ondropdeactivate)&&q.on("dropdeactivate",G.ondropdeactivate),k.func(G.ondragenter)&&q.on("dragenter",G.ondragenter),k.func(G.ondragleave)&&q.on("dragleave",G.ondragleave),k.func(G.ondropmove)&&q.on("dropmove",G.ondropmove),/^(pointer|center)$/.test(G.overlap)?q.options.drop.overlap=G.overlap:k.number(G.overlap)&&(q.options.drop.overlap=Math.max(Math.min(1,G.overlap),0)),"accept"in G&&(q.options.drop.accept=G.accept),"checker"in G&&(q.options.drop.checker=G.checker),q}return k.bool(G)?(q.options.drop.enabled=G,q):q.options.drop}(this,V)},y.prototype.dropCheck=function(V,q,G,pe,Oe,ge){return function(Ze,za,nl,Qa,il,_l,sl){var Dl=!1;if(!(sl=sl||Ze.getRect(_l)))return!!Ze.options.drop.checker&&Ze.options.drop.checker(za,nl,Dl,Ze,_l,Qa,il);var Ml=Ze.options.drop.overlap;if(Ml==="pointer"){var Kl=Re(Qa,il,"drag"),El=na(za);El.x+=Kl.x,El.y+=Kl.y;var Fl=El.x>sl.left&&El.x<sl.right,Ir=El.y>sl.top&&El.y<sl.bottom;Dl=Fl&&Ir}var mr=Qa.getRect(il);if(mr&&Ml==="center"){var Fr=mr.left+mr.width/2,en=mr.top+mr.height/2;Dl=Fr>=sl.left&&Fr<=sl.right&&en>=sl.top&&en<=sl.bottom}return mr&&k.number(Ml)&&(Dl=Math.max(0,Math.min(sl.right,mr.right)-Math.max(sl.left,mr.left))*Math.max(0,Math.min(sl.bottom,mr.bottom)-Math.max(sl.top,mr.top))/(mr.width*mr.height)>=Ml),Ze.options.drop.checker&&(Dl=Ze.options.drop.checker(za,nl,Dl,Ze,_l,Qa,il)),Dl}(this,V,q,G,pe,Oe,ge)},p.dynamicDrop=function(V){return k.bool(V)?(i.dynamicDrop=V,p):i.dynamicDrop},ee(o.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),o.methodDict.drop="dropzone",i.dynamicDrop=!1,C.actions.drop=Ea.defaults},listeners:{"interactions:before-action-start":function(i){var o=i.interaction;o.prepared.name==="drag"&&(o.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(i,o){var p=i.interaction,y=(i.event,i.iEvent);if(p.prepared.name==="drag"){var C=p.dropState;C.activeDrops=[],C.events={},C.activeDrops=Ba(o,p.element),C.events=Aa(p,0,y),C.events.activate&&(Ma(C.activeDrops,C.events.activate),o.fire("actions/drop:start",{interaction:p,dragEvent:y}))}},"interactions:action-move":we,"interactions:after-action-move":function(i,o){var p=i.interaction,y=i.iEvent;if(p.prepared.name==="drag"){var C=p.dropState;Ae(p,C.events),o.fire("actions/drop:move",{interaction:p,dragEvent:y}),C.events={}}},"interactions:action-end":function(i,o){if(i.interaction.prepared.name==="drag"){var p=i.interaction,y=i.iEvent;we(i,o),Ae(p,p.dropState.events),o.fire("actions/drop:end",{interaction:p,dragEvent:y})}},"interactions:stop":function(i){var o=i.interaction;if(o.prepared.name==="drag"){var p=o.dropState;p&&(p.activeDrops=null,p.events=null,p.cur.dropzone=null,p.cur.element=null,p.prev.dropzone=null,p.prev.element=null,p.rejected=!1)}}},getActiveDrops:Ba,getDrop:Ua,getDropEvents:Aa,fireDropEvents:Ae,filterEventType:function(i){return i.search("drag")===0||i.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},Ge=Ea;function ol(i){var o=i.interaction,p=i.iEvent,y=i.phase;if(o.prepared.name==="gesture"){var C=o.pointers.map(function(Oe){return Oe.pointer}),V=y==="start",q=y==="end",G=o.interactable.options.deltaSource;if(p.touches=[C[0],C[1]],V)p.distance=Qe(C,G),p.box=Je(C),p.scale=1,p.ds=0,p.angle=Fe(C,G),p.da=0,o.gesture.startDistance=p.distance,o.gesture.startAngle=p.angle;else if(q||o.pointers.length<2){var pe=o.prevEvent;p.distance=pe.distance,p.box=pe.box,p.scale=pe.scale,p.ds=0,p.angle=pe.angle,p.da=0}else p.distance=Qe(C,G),p.box=Je(C),p.scale=p.distance/o.gesture.startDistance,p.angle=Fe(C,G),p.ds=p.scale-o.gesture.scale,p.da=p.angle-o.gesture.angle;o.gesture.distance=p.distance,o.gesture.angle=p.angle,k.number(p.scale)&&p.scale!==1/0&&!isNaN(p.scale)&&(o.gesture.scale=p.scale)}}var Sl={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(i){var o=i.actions,p=i.Interactable,y=i.defaults;p.prototype.gesturable=function(C){return k.object(C)?(this.options.gesture.enabled=C.enabled!==!1,this.setPerAction("gesture",C),this.setOnEvents("gesture",C),this):k.bool(C)?(this.options.gesture.enabled=C,this):this.options.gesture},o.map.gesture=Sl,o.methodDict.gesture="gesturable",y.actions.gesture=Sl.defaults},listeners:{"interactions:action-start":ol,"interactions:action-move":ol,"interactions:action-end":ol,"interactions:new":function(i){i.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(i){if(!(i.interaction.pointers.length<2)){var o=i.interactable.options.gesture;if(o&&o.enabled)return i.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(i){return i.search("gesture")===0}},Nl=Sl;function Ra(i,o,p,y,C,V,q){if(!o)return!1;if(o===!0){var G=k.number(V.width)?V.width:V.right-V.left,pe=k.number(V.height)?V.height:V.bottom-V.top;if(q=Math.min(q,Math.abs((i==="left"||i==="right"?G:pe)/2)),G<0&&(i==="left"?i="right":i==="right"&&(i="left")),pe<0&&(i==="top"?i="bottom":i==="bottom"&&(i="top")),i==="left"){var Oe=G>=0?V.left:V.right;return p.x<Oe+q}if(i==="top"){var ge=pe>=0?V.top:V.bottom;return p.y<ge+q}if(i==="right")return p.x>(G>=0?V.right:V.left)-q;if(i==="bottom")return p.y>(pe>=0?V.bottom:V.top)-q}return!!k.element(y)&&(k.element(o)?o===y:ye(y,o,C))}function al(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.resizeAxes){var y=o;p.interactable.options.resize.square?(p.resizeAxes==="y"?y.delta.x=y.delta.y:y.delta.y=y.delta.x,y.axes="xy"):(y.axes=p.resizeAxes,p.resizeAxes==="x"?y.delta.y=0:p.resizeAxes==="y"&&(y.delta.x=0))}}var ga,qe,rl={id:"actions/resize",before:["actions/drag"],install:function(i){var o=i.actions,p=i.browser,y=i.Interactable,C=i.defaults;rl.cursors=function(V){return V.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"}}(p),rl.defaultMargin=p.supportsTouch||p.supportsPointerEvent?20:10,y.prototype.resizable=function(V){return function(q,G,pe){return k.object(G)?(q.options.resize.enabled=G.enabled!==!1,q.setPerAction("resize",G),q.setOnEvents("resize",G),k.string(G.axis)&&/^x$|^y$|^xy$/.test(G.axis)?q.options.resize.axis=G.axis:G.axis===null&&(q.options.resize.axis=pe.defaults.actions.resize.axis),k.bool(G.preserveAspectRatio)?q.options.resize.preserveAspectRatio=G.preserveAspectRatio:k.bool(G.square)&&(q.options.resize.square=G.square),q):k.bool(G)?(q.options.resize.enabled=G,q):q.options.resize}(this,V,i)},o.map.resize=rl,o.methodDict.resize="resizable",C.actions.resize=rl.defaults},listeners:{"interactions:new":function(i){i.interaction.resizeAxes="xy"},"interactions:action-start":function(i){(function(o){var p=o.iEvent,y=o.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var C=p,V=y.rect;y._rects={start:ee({},V),corrected:ee({},V),previous:ee({},V),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},C.edges=y.prepared.edges,C.rect=y._rects.corrected,C.deltaRect=y._rects.delta}})(i),al(i)},"interactions:action-move":function(i){(function(o){var p=o.iEvent,y=o.interaction;if(y.prepared.name==="resize"&&y.prepared.edges){var C=p,V=y.interactable.options.resize.invert,q=V==="reposition"||V==="negate",G=y.rect,pe=y._rects,Oe=pe.start,ge=pe.corrected,Ze=pe.delta,za=pe.previous;if(ee(za,ge),q){if(ee(ge,G),V==="reposition"){if(ge.top>ge.bottom){var nl=ge.top;ge.top=ge.bottom,ge.bottom=nl}if(ge.left>ge.right){var Qa=ge.left;ge.left=ge.right,ge.right=Qa}}}else ge.top=Math.min(G.top,Oe.bottom),ge.bottom=Math.max(G.bottom,Oe.top),ge.left=Math.min(G.left,Oe.right),ge.right=Math.max(G.right,Oe.left);for(var il in ge.width=ge.right-ge.left,ge.height=ge.bottom-ge.top,ge)Ze[il]=ge[il]-za[il];C.edges=y.prepared.edges,C.rect=ge,C.deltaRect=Ze}})(i),al(i)},"interactions:action-end":function(i){var o=i.iEvent,p=i.interaction;if(p.prepared.name==="resize"&&p.prepared.edges){var y=o;y.edges=p.prepared.edges,y.rect=p._rects.corrected,y.deltaRect=p._rects.delta}},"auto-start:check":function(i){var o=i.interaction,p=i.interactable,y=i.element,C=i.rect,V=i.buttons;if(C){var q=ee({},o.coords.cur.page),G=p.options.resize;if(G&&G.enabled&&(!o.pointerIsDown||!/mouse|pointer/.test(o.pointerType)||(V&G.mouseButtons)!=0)){if(k.object(G.edges)){var pe={left:!1,right:!1,top:!1,bottom:!1};for(var Oe in pe)pe[Oe]=Ra(Oe,G.edges[Oe],q,o._latestPointer.eventTarget,y,C,G.margin||rl.defaultMargin);pe.left=pe.left&&!pe.right,pe.top=pe.top&&!pe.bottom,(pe.left||pe.right||pe.top||pe.bottom)&&(i.action={name:"resize",edges:pe})}else{var ge=G.axis!=="y"&&q.x>C.right-rl.defaultMargin,Ze=G.axis!=="x"&&q.y>C.bottom-rl.defaultMargin;(ge||Ze)&&(i.action={name:"resize",axes:(ge?"x":"")+(Ze?"y":"")})}return!i.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(i){var o=i.edges,p=i.axis,y=i.name,C=rl.cursors,V=null;if(p)V=C[y+p];else if(o){for(var q="",G=0,pe=["top","bottom","left","right"];G<pe.length;G++){var Oe=pe[G];o[Oe]&&(q+=Oe)}V=C[q]}return V},filterEventType:function(i){return i.search("resize")===0},defaultMargin:null},da=rl,Xe={id:"actions",install:function(i){i.usePlugin(Nl),i.usePlugin(da),i.usePlugin(be),i.usePlugin(Ge)}},oa=0,aa={request:function(i){return ga(i)},cancel:function(i){return qe(i)},init:function(i){if(ga=i.requestAnimationFrame,qe=i.cancelAnimationFrame,!ga)for(var o=["ms","moz","webkit","o"],p=0;p<o.length;p++){var y=o[p];ga=i["".concat(y,"RequestAnimationFrame")],qe=i["".concat(y,"CancelAnimationFrame")]||i["".concat(y,"CancelRequestAnimationFrame")]}ga=ga&&ga.bind(i),qe=qe&&qe.bind(i),ga||(ga=function(C){var V=Date.now(),q=Math.max(0,16-(V-oa)),G=i.setTimeout(function(){C(V+q)},q);return oa=V+q,G},qe=function(C){return clearTimeout(C)})}},ca={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(i){ca.isScrolling=!0,aa.cancel(ca.i),i.autoScroll=ca,ca.interaction=i,ca.prevTime=ca.now(),ca.i=aa.request(ca.scroll)},stop:function(){ca.isScrolling=!1,ca.interaction&&(ca.interaction.autoScroll=null),aa.cancel(ca.i)},scroll:function(){var i=ca.interaction,o=i.interactable,p=i.element,y=i.prepared.name,C=o.options[y].autoScroll,V=W(C.container,o,p),q=ca.now(),G=(q-ca.prevTime)/1e3,pe=C.speed*G;if(pe>=1){var Oe={x:ca.x*pe,y:ca.y*pe};if(Oe.x||Oe.y){var ge=la(V);k.window(V)?V.scrollBy(Oe.x,Oe.y):V&&(V.scrollLeft+=Oe.x,V.scrollTop+=Oe.y);var Ze=la(V),za={x:Ze.x-ge.x,y:Ze.y-ge.y};(za.x||za.y)&&o.fire({type:"autoscroll",target:p,interactable:o,delta:za,interaction:i,container:V})}ca.prevTime=q}ca.isScrolling&&(aa.cancel(ca.i),ca.i=aa.request(ca.scroll))},check:function(i,o){var p;return(p=i.options[o].autoScroll)==null?void 0:p.enabled},onInteractionMove:function(i){var o=i.interaction,p=i.pointer;if(o.interacting()&&ca.check(o.interactable,o.prepared.name))if(o.simulation)ca.x=ca.y=0;else{var y,C,V,q,G=o.interactable,pe=o.element,Oe=o.prepared.name,ge=G.options[Oe].autoScroll,Ze=W(ge.container,G,pe);if(k.window(Ze))q=p.clientX<ca.margin,y=p.clientY<ca.margin,C=p.clientX>Ze.innerWidth-ca.margin,V=p.clientY>Ze.innerHeight-ca.margin;else{var za=Ne(Ze);q=p.clientX<za.left+ca.margin,y=p.clientY<za.top+ca.margin,C=p.clientX>za.right-ca.margin,V=p.clientY>za.bottom-ca.margin}ca.x=C?1:q?-1:0,ca.y=V?1:y?-1:0,ca.isScrolling||(ca.margin=ge.margin,ca.speed=ge.speed,ca.start(o))}}};function W(i,o,p){return(k.string(i)?ea(i,o,p):i)||L(p)}function la(i){return k.window(i)&&(i=window.document.body),{x:i.scrollLeft,y:i.scrollTop}}var ka={id:"auto-scroll",install:function(i){var o=i.defaults,p=i.actions;i.autoScroll=ca,ca.now=function(){return i.now()},p.phaselessTypes.autoscroll=!0,o.perAction.autoScroll=ca.defaults},listeners:{"interactions:new":function(i){i.interaction.autoScroll=null},"interactions:destroy":function(i){i.interaction.autoScroll=null,ca.stop(),ca.interaction&&(ca.interaction=null)},"interactions:stop":ca.stop,"interactions:action-move":function(i){return ca.onInteractionMove(i)}}},Ce=ka;function Be(i,o){var p=!1;return function(){return p||(Y.console.warn(o),p=!0),i.apply(this,arguments)}}function Fa(i,o){return i.name=o.name,i.axis=o.axis,i.edges=o.edges,i}function me(i){return k.bool(i)?(this.options.styleCursor=i,this):i===null?(delete this.options.styleCursor,this):this.options.styleCursor}function fl(i){return k.func(i)?(this.options.actionChecker=i,this):i===null?(delete this.options.actionChecker,this):this.options.actionChecker}var Ja={id:"auto-start/interactableMethods",install:function(i){var o=i.Interactable;o.prototype.getAction=function(p,y,C,V){var q=function(G,pe,Oe,ge,Ze){var za=G.getRect(ge),nl=pe.buttons||{0:1,1:4,3:8,4:16}[pe.button],Qa={action:null,interactable:G,interaction:Oe,element:ge,rect:za,buttons:nl};return Ze.fire("auto-start:check",Qa),Qa.action}(this,y,C,V,i);return this.options.actionChecker?this.options.actionChecker(p,y,q,this,V,C):q},o.prototype.ignoreFrom=Be(function(p){return this._backCompatOption("ignoreFrom",p)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),o.prototype.allowFrom=Be(function(p){return this._backCompatOption("allowFrom",p)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),o.prototype.actionChecker=fl,o.prototype.styleCursor=me}};function kl(i,o,p,y,C){return o.testIgnoreAllow(o.options[i.name],p,y)&&o.options[i.name].enabled&&cl(o,p,i,C)?i:null}function Ha(i,o,p,y,C,V,q){for(var G=0,pe=y.length;G<pe;G++){var Oe=y[G],ge=C[G],Ze=Oe.getAction(o,p,i,ge);if(Ze){var za=kl(Ze,Oe,ge,V,q);if(za)return{action:za,interactable:Oe,element:ge}}}return{action:null,interactable:null,element:null}}function tl(i,o,p,y,C){var V=[],q=[],G=y;function pe(ge){V.push(ge),q.push(G)}for(;k.element(G);){V=[],q=[],C.interactables.forEachMatch(G,pe);var Oe=Ha(i,o,p,V,q,y,C);if(Oe.action&&!Oe.interactable.options[Oe.action.name].manualStart)return Oe;G=Na(G)}return{action:null,interactable:null,element:null}}function Za(i,o,p){var y=o.action,C=o.interactable,V=o.element;y=y||{name:null},i.interactable=C,i.element=V,Fa(i.prepared,y),i.rect=C&&y.name?C.getRect(V):null,ql(i,p),p.fire("autoStart:prepared",{interaction:i})}function cl(i,o,p,y){var C=i.options,V=C[p.name].max,q=C[p.name].maxPerElement,G=y.autoStart.maxInteractions,pe=0,Oe=0,ge=0;if(!(V&&q&&G))return!1;for(var Ze=0,za=y.interactions.list;Ze<za.length;Ze++){var nl=za[Ze],Qa=nl.prepared.name;if(nl.interacting()&&(++pe>=G||nl.interactable===i&&((Oe+=Qa===p.name?1:0)>=V||nl.element===o&&(ge++,Qa===p.name&&ge>=q))))return!1}return G>0}function ul(i,o){return k.number(i)?(o.autoStart.maxInteractions=i,this):o.autoStart.maxInteractions}function Wl(i,o,p){var y=p.autoStart.cursorElement;y&&y!==i&&(y.style.cursor=""),i.ownerDocument.documentElement.style.cursor=o,i.style.cursor=o,p.autoStart.cursorElement=o?i:null}function ql(i,o){var p=i.interactable,y=i.element,C=i.prepared;if(i.pointerType==="mouse"&&p&&p.options.styleCursor){var V="";if(C.name){var q=p.options[C.name].cursorChecker;V=k.func(q)?q(C,p,y,i._interacting):o.actions.map[C.name].getCursor(C)}Wl(i.element,V||"",o)}else o.autoStart.cursorElement&&Wl(o.autoStart.cursorElement,"",o)}var Pl={id:"auto-start/base",before:["actions"],install:function(i){var o=i.interactStatic,p=i.defaults;i.usePlugin(Ja),p.base.actionChecker=null,p.base.styleCursor=!0,ee(p.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),o.maxInteractions=function(y){return ul(y,i)},i.autoStart={maxInteractions:1/0,withinInteractionLimit:cl,cursorElement:null}},listeners:{"interactions:down":function(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget;p.interacting()||Za(p,tl(p,y,C,V,o),o)},"interactions:move":function(i,o){(function(p,y){var C=p.interaction,V=p.pointer,q=p.event,G=p.eventTarget;C.pointerType!=="mouse"||C.pointerIsDown||C.interacting()||Za(C,tl(C,V,q,G,y),y)})(i,o),function(p,y){var C=p.interaction;if(C.pointerIsDown&&!C.interacting()&&C.pointerWasMoved&&C.prepared.name){y.fire("autoStart:before-start",p);var V=C.interactable,q=C.prepared.name;q&&V&&(V.options[q].manualStart||!cl(V,C.element,C.prepared,y)?C.stop():(C.start(C.prepared,V,C.element),ql(C,y)))}}(i,o)},"interactions:stop":function(i,o){var p=i.interaction,y=p.interactable;y&&y.options.styleCursor&&Wl(p.element,"",o)}},maxInteractions:ul,withinInteractionLimit:cl,validateAction:kl},Hl=Pl,gr={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(i,o){var p=i.interaction,y=i.eventTarget,C=i.dx,V=i.dy;if(p.prepared.name==="drag"){var q=Math.abs(C),G=Math.abs(V),pe=p.interactable.options.drag,Oe=pe.startAxis,ge=q>G?"x":q<G?"y":"xy";if(p.prepared.axis=pe.lockAxis==="start"?ge[0]:pe.lockAxis,ge!=="xy"&&Oe!=="xy"&&Oe!==ge){p.prepared.name=null;for(var Ze=y,za=function(Qa){if(Qa!==p.interactable){var il=p.interactable.options.drag;if(!il.manualStart&&Qa.testIgnoreAllow(il,Ze,y)){var _l=Qa.getAction(p.downPointer,p.downEvent,p,Ze);if(_l&&_l.name==="drag"&&function(sl,Dl){if(!Dl)return!1;var Ml=Dl.options.drag.startAxis;return sl==="xy"||Ml==="xy"||Ml===sl}(ge,Qa)&&Hl.validateAction(_l,Qa,Ze,y,o))return Qa}}};k.element(Ze);){var nl=o.interactables.forEachMatch(Ze,za);if(nl){p.prepared.name="drag",p.interactable=nl,p.element=Ze;break}Ze=Na(Ze)}}}}}};function rr(i){var o=i.prepared&&i.prepared.name;if(!o)return null;var p=i.interactable.options;return p[o].hold||p[o].delay}var kr={id:"auto-start/hold",install:function(i){var o=i.defaults;i.usePlugin(Hl),o.perAction.hold=0,o.perAction.delay=0},listeners:{"interactions:new":function(i){i.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(i){var o=i.interaction,p=rr(o);p>0&&(o.autoStartHoldTimer=setTimeout(function(){o.start(o.prepared,o.interactable,o.element)},p))},"interactions:move":function(i){var o=i.interaction,p=i.duplicate;o.autoStartHoldTimer&&o.pointerWasMoved&&!p&&(clearTimeout(o.autoStartHoldTimer),o.autoStartHoldTimer=null)},"autoStart:before-start":function(i){var o=i.interaction;rr(o)>0&&(o.prepared.name=null)}},getHoldDuration:rr},wr=kr,Sr={id:"auto-start",install:function(i){i.usePlugin(Hl),i.usePlugin(wr),i.usePlugin(gr)}},un=function(i){return/^(always|never|auto)$/.test(i)?(this.options.preventDefault=i,this):k.bool(i)?(this.options.preventDefault=i?"always":"never",this):this.options.preventDefault};function Jr(i){var o=i.interaction,p=i.event;o.interactable&&o.interactable.checkAndPreventDefault(p)}var dn={id:"core/interactablePreventDefault",install:function(i){var o=i.Interactable;o.prototype.preventDefault=un,o.prototype.checkAndPreventDefault=function(p){return function(y,C,V){var q=y.options.preventDefault;if(q!=="never")if(q!=="always"){if(C.events.supportsPassive&&/^touch(start|move)$/.test(V.type)){var G=L(V.target).document,pe=C.getDocOptions(G);if(!pe||!pe.events||pe.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(V.type)||k.element(V.target)&&te(V.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||V.preventDefault()}else V.preventDefault()}(this,i,p)},i.interactions.docEvents.push({type:"dragstart",listener:function(p){for(var y=0,C=i.interactions.list;y<C.length;y++){var V=C[y];if(V.element&&(V.element===p.target||de(V.element,p.target)))return void V.interactable.checkAndPreventDefault(p)}}})},listeners:["down","move","up","cancel"].reduce(function(i,o){return i["interactions:".concat(o)]=Jr,i},{})};function Xr(i,o){if(o.phaselessTypes[i])return!0;for(var p in o.map)if(i.indexOf(p)===0&&i.substr(p.length)in o.phases)return!0;return!1}function qr(i){var o={};for(var p in i){var y=i[p];k.plainObject(y)?o[p]=qr(y):k.array(y)?o[p]=Se(y):o[p]=y}return o}var pn=function(){function i(o){c(this,i),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=o,this.result=tn(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return h(i,[{key:"start",value:function(o,p){var y,C,V=o.phase,q=this.interaction,G=function(Oe){var ge=Oe.interactable.options[Oe.prepared.name],Ze=ge.modifiers;return Ze&&Ze.length?Ze:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map(function(za){var nl=ge[za];return nl&&nl.enabled&&{options:nl,methods:nl._methods}}).filter(function(za){return!!za})}(q);this.prepareStates(G),this.startEdges=ee({},q.edges),this.edges=ee({},this.startEdges),this.startOffset=(y=q.rect,C=p,y?{left:C.x-y.left,top:C.y-y.top,right:y.right-C.x,bottom:y.bottom-C.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var pe=this.fillArg({phase:V,pageCoords:p,preEnd:!1});return this.result=tn(),this.startAll(pe),this.result=this.setAll(pe)}},{key:"fillArg",value:function(o){var p=this.interaction;return o.interaction=p,o.interactable=p.interactable,o.element=p.element,o.rect||(o.rect=p.rect),o.edges||(o.edges=this.startEdges),o.startOffset=this.startOffset,o}},{key:"startAll",value:function(o){for(var p=0,y=this.states;p<y.length;p++){var C=y[p];C.methods.start&&(o.state=C,C.methods.start(o))}}},{key:"setAll",value:function(o){var p=o.phase,y=o.preEnd,C=o.skipModifiers,V=o.rect,q=o.edges;o.coords=ee({},o.pageCoords),o.rect=ee({},V),o.edges=ee({},q);for(var G=C?this.states.slice(C):this.states,pe=tn(o.coords,o.rect),Oe=0;Oe<G.length;Oe++){var ge,Ze=G[Oe],za=Ze.options,nl=ee({},o.coords),Qa=null;(ge=Ze.methods)!=null&&ge.set&&this.shouldDo(za,y,p)&&(o.state=Ze,Qa=Ze.methods.set(o),Te(o.edges,o.rect,{x:o.coords.x-nl.x,y:o.coords.y-nl.y})),pe.eventProps.push(Qa)}ee(this.edges,o.edges),pe.delta.x=o.coords.x-o.pageCoords.x,pe.delta.y=o.coords.y-o.pageCoords.y,pe.rectDelta.left=o.rect.left-V.left,pe.rectDelta.right=o.rect.right-V.right,pe.rectDelta.top=o.rect.top-V.top,pe.rectDelta.bottom=o.rect.bottom-V.bottom;var il=this.result.coords,_l=this.result.rect;if(il&&_l){var sl=pe.rect.left!==_l.left||pe.rect.right!==_l.right||pe.rect.top!==_l.top||pe.rect.bottom!==_l.bottom;pe.changed=sl||il.x!==pe.coords.x||il.y!==pe.coords.y}return pe}},{key:"applyToInteraction",value:function(o){var p=this.interaction,y=o.phase,C=p.coords.cur,V=p.coords.start,q=this.result,G=this.startDelta,pe=q.delta;y==="start"&&ee(this.startDelta,q.delta);for(var Oe=0,ge=[[V,G],[C,pe]];Oe<ge.length;Oe++){var Ze=ge[Oe],za=Ze[0],nl=Ze[1];za.page.x+=nl.x,za.page.y+=nl.y,za.client.x+=nl.x,za.client.y+=nl.y}var Qa=this.result.rectDelta,il=o.rect||p.rect;il.left+=Qa.left,il.right+=Qa.right,il.top+=Qa.top,il.bottom+=Qa.bottom,il.width=il.right-il.left,il.height=il.bottom-il.top}},{key:"setAndApply",value:function(o){var p=this.interaction,y=o.phase,C=o.preEnd,V=o.skipModifiers,q=this.setAll(this.fillArg({preEnd:C,phase:y,pageCoords:o.modifiedCoords||p.coords.cur.page}));if(this.result=q,!q.changed&&(!V||V<this.states.length)&&p.interacting())return!1;if(o.modifiedCoords){var G=p.coords.cur.page,pe={x:o.modifiedCoords.x-G.x,y:o.modifiedCoords.y-G.y};q.coords.x+=pe.x,q.coords.y+=pe.y,q.delta.x+=pe.x,q.delta.y+=pe.y}this.applyToInteraction(o)}},{key:"beforeEnd",value:function(o){var p=o.interaction,y=o.event,C=this.states;if(C&&C.length){for(var V=!1,q=0;q<C.length;q++){var G=C[q];o.state=G;var pe=G.options,Oe=G.methods,ge=Oe.beforeEnd&&Oe.beforeEnd(o);if(ge)return this.endResult=ge,!1;V=V||!V&&this.shouldDo(pe,!0,o.phase,!0)}V&&p.move({event:y,preEnd:!0})}}},{key:"stop",value:function(o){var p=o.interaction;if(this.states&&this.states.length){var y=ee({states:this.states,interactable:p.interactable,element:p.element,rect:null},o);this.fillArg(y);for(var C=0,V=this.states;C<V.length;C++){var q=V[C];y.state=q,q.methods.stop&&q.methods.stop(y)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(o){this.states=[];for(var p=0;p<o.length;p++){var y=o[p],C=y.options,V=y.methods,q=y.name;this.states.push({options:C,methods:V,index:p,name:q})}return this.states}},{key:"restoreInteractionCoords",value:function(o){var p=o.interaction,y=p.coords,C=p.rect,V=p.modification;if(V.result){for(var q=V.startDelta,G=V.result,pe=G.delta,Oe=G.rectDelta,ge=0,Ze=[[y.start,q],[y.cur,pe]];ge<Ze.length;ge++){var za=Ze[ge],nl=za[0],Qa=za[1];nl.page.x-=Qa.x,nl.page.y-=Qa.y,nl.client.x-=Qa.x,nl.client.y-=Qa.y}C.left-=Oe.left,C.right-=Oe.right,C.top-=Oe.top,C.bottom-=Oe.bottom}}},{key:"shouldDo",value:function(o,p,y,C){return!(!o||o.enabled===!1||C&&!o.endOnly||o.endOnly&&!p||y==="start"&&!o.setStart)}},{key:"copyFrom",value:function(o){this.startOffset=o.startOffset,this.startDelta=o.startDelta,this.startEdges=o.startEdges,this.edges=o.edges,this.states=o.states.map(function(p){return qr(p)}),this.result=tn(ee({},o.result.coords),ee({},o.result.rect))}},{key:"destroy",value:function(){for(var o in this)this[o]=null}}]),i}();function tn(i,o){return{rect:o,coords:i,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function Dr(i,o){var p=i.defaults,y={start:i.start,set:i.set,beforeEnd:i.beforeEnd,stop:i.stop},C=function(V){var q=V||{};for(var G in q.enabled=q.enabled!==!1,p)G in q||(q[G]=p[G]);var pe={options:q,methods:y,name:o,enable:function(){return q.enabled=!0,pe},disable:function(){return q.enabled=!1,pe}};return pe};return o&&typeof o=="string"&&(C._defaults=p,C._methods=y),C}function Zr(i){var o=i.iEvent,p=i.interaction.modification.result;p&&(o.modifiers=p.eventProps)}var Br={id:"modifiers/base",before:["actions"],install:function(i){i.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(i){var o=i.interaction;o.modification=new pn(o)},"interactions:before-action-start":function(i){var o=i.interaction,p=i.interaction.modification;p.start(i,o.coords.start.page),o.edges=p.edges,p.applyToInteraction(i)},"interactions:before-action-move":function(i){var o=i.interaction,p=o.modification,y=p.setAndApply(i);return o.edges=p.edges,y},"interactions:before-action-end":function(i){var o=i.interaction,p=o.modification,y=p.beforeEnd(i);return o.edges=p.startEdges,y},"interactions:action-start":Zr,"interactions:action-move":Zr,"interactions:action-end":Zr,"interactions:after-action-start":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-move":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:stop":function(i){return i.interaction.modification.stop(i)}}},Il=Br,Wr={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},Nr=function(i){m(p,i);var o=z(p);function p(y,C,V,q,G,pe,Oe){var ge;c(this,p),(ge=o.call(this,y)).relatedTarget=null,ge.screenX=void 0,ge.screenY=void 0,ge.button=void 0,ge.buttons=void 0,ge.ctrlKey=void 0,ge.shiftKey=void 0,ge.altKey=void 0,ge.metaKey=void 0,ge.page=void 0,ge.client=void 0,ge.delta=void 0,ge.rect=void 0,ge.x0=void 0,ge.y0=void 0,ge.t0=void 0,ge.dt=void 0,ge.duration=void 0,ge.clientX0=void 0,ge.clientY0=void 0,ge.velocity=void 0,ge.speed=void 0,ge.swipe=void 0,ge.axes=void 0,ge.preEnd=void 0,G=G||y.element;var Ze=y.interactable,za=(Ze&&Ze.options||Wr).deltaSource,nl=Re(Ze,G,V),Qa=q==="start",il=q==="end",_l=Qa?S(ge):y.prevEvent,sl=Qa?y.coords.start:il?{page:_l.page,client:_l.client,timeStamp:y.coords.cur.timeStamp}:y.coords.cur;return ge.page=ee({},sl.page),ge.client=ee({},sl.client),ge.rect=ee({},y.rect),ge.timeStamp=sl.timeStamp,il||(ge.page.x-=nl.x,ge.page.y-=nl.y,ge.client.x-=nl.x,ge.client.y-=nl.y),ge.ctrlKey=C.ctrlKey,ge.altKey=C.altKey,ge.shiftKey=C.shiftKey,ge.metaKey=C.metaKey,ge.button=C.button,ge.buttons=C.buttons,ge.target=G,ge.currentTarget=G,ge.preEnd=pe,ge.type=Oe||V+(q||""),ge.interactable=Ze,ge.t0=Qa?y.pointers[y.pointers.length-1].downTime:_l.t0,ge.x0=y.coords.start.page.x-nl.x,ge.y0=y.coords.start.page.y-nl.y,ge.clientX0=y.coords.start.client.x-nl.x,ge.clientY0=y.coords.start.client.y-nl.y,ge.delta=Qa||il?{x:0,y:0}:{x:ge[za].x-_l[za].x,y:ge[za].y-_l[za].y},ge.dt=y.coords.delta.timeStamp,ge.duration=ge.timeStamp-ge.t0,ge.velocity=ee({},y.coords.velocity[za]),ge.speed=Va(ge.velocity.x,ge.velocity.y),ge.swipe=il||q==="inertiastart"?ge.getSwipe():null,ge}return h(p,[{key:"getSwipe",value:function(){var y=this._interaction;if(y.prevEvent.speed<600||this.timeStamp-y.prevEvent.timeStamp>150)return null;var C=180*Math.atan2(y.prevEvent.velocityY,y.prevEvent.velocityX)/Math.PI;C<0&&(C+=360);var V=112.5<=C&&C<247.5,q=202.5<=C&&C<337.5;return{up:q,down:!q&&22.5<=C&&C<157.5,left:V,right:!V&&(292.5<=C||C<67.5),angle:C,speed:y.prevEvent.speed,velocity:{x:y.prevEvent.velocityX,y:y.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),p}(va);Object.defineProperties(Nr.prototype,{pageX:{get:function(){return this.page.x},set:function(i){this.page.x=i}},pageY:{get:function(){return this.page.y},set:function(i){this.page.y=i}},clientX:{get:function(){return this.client.x},set:function(i){this.client.x=i}},clientY:{get:function(){return this.client.y},set:function(i){this.client.y=i}},dx:{get:function(){return this.delta.x},set:function(i){this.delta.x=i}},dy:{get:function(){return this.delta.y},set:function(i){this.delta.y=i}},velocityX:{get:function(){return this.velocity.x},set:function(i){this.velocity.x=i}},velocityY:{get:function(){return this.velocity.y},set:function(i){this.velocity.y=i}}});var vn=h(function i(o,p,y,C,V){c(this,i),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=o,this.pointer=p,this.event=y,this.downTime=C,this.downTarget=V}),tt=function(i){return i.interactable="",i.element="",i.prepared="",i.pointerIsDown="",i.pointerWasMoved="",i._proxy="",i}({}),Kn=function(i){return i.start="",i.move="",i.end="",i.stop="",i.interacting="",i}({}),In=0,mn=function(){function i(o){var p=this,y=o.pointerType,C=o.scopeFire;c(this,i),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=Be(function(ge){this.move(ge)},"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=In++,this._scopeFire=C,this.pointerType=y;var V=this;this._proxy={};var q=function(ge){Object.defineProperty(p._proxy,ge,{get:function(){return V[ge]}})};for(var G in tt)q(G);var pe=function(ge){Object.defineProperty(p._proxy,ge,{value:function(){return V[ge].apply(V,arguments)}})};for(var Oe in Kn)pe(Oe);this._scopeFire("interactions:new",{interaction:this})}return h(i,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(o,p,y){var C=this.updatePointer(o,p,y,!0),V=this.pointers[C];this._scopeFire("interactions:down",{pointer:o,event:p,eventTarget:y,pointerIndex:C,pointerInfo:V,type:"down",interaction:this})}},{key:"start",value:function(o,p,y){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(o.name==="gesture"?2:1)||!p.options[o.name].enabled)&&(Fa(this.prepared,o),this.interactable=p,this.element=y,this.rect=p.getRect(y),this.edges=this.prepared.edges?ee({},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(o,p,y){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(o,p,y,!1);var C,V,q=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,V=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=Va(C,V)>this.pointerMoveTolerance);var G,pe,Oe,ge=this.getPointerIndex(o),Ze={pointer:o,pointerIndex:ge,pointerInfo:this.pointers[ge],event:p,type:"move",eventTarget:y,dx:C,dy:V,duplicate:q,interaction:this};q||(G=this.coords.velocity,pe=this.coords.delta,Oe=Math.max(pe.timeStamp/1e3,.001),G.page.x=pe.page.x/Oe,G.page.y=pe.page.y/Oe,G.client.x=pe.client.x/Oe,G.client.y=pe.client.y/Oe,G.timeStamp=Oe),this._scopeFire("interactions:move",Ze),q||this.simulation||(this.interacting()&&(Ze.type=null,this.move(Ze)),this.pointerWasMoved&&J(this.coords.prev,this.coords.cur))}},{key:"move",value:function(o){o&&o.event||ie(this.coords.delta),(o=ee({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},o||{})).phase="move",this._doPhase(o)}},{key:"pointerUp",value:function(o,p,y,C){var V=this.getPointerIndex(o);V===-1&&(V=this.updatePointer(o,p,y,!1));var q=/cancel$/i.test(p.type)?"cancel":"up";this._scopeFire("interactions:".concat(q),{pointer:o,pointerIndex:V,pointerInfo:this.pointers[V],event:p,eventTarget:y,type:q,curEventTarget:C,interaction:this}),this.simulation||this.end(p),this.removePointer(o,p)}},{key:"documentBlur",value:function(o){this.end(o),this._scopeFire("interactions:blur",{event:o,type:"blur",interaction:this})}},{key:"end",value:function(o){var p;this._ending=!0,o=o||this._latestPointer.event,this.interacting()&&(p=this._doPhase({event:o,interaction:this,phase:"end"})),this._ending=!1,p===!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(o){var p=Ie(o);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:K(this.pointers,function(y){return y.id===p})}},{key:"getPointerInfo",value:function(o){return this.pointers[this.getPointerIndex(o)]}},{key:"updatePointer",value:function(o,p,y,C){var V,q,G,pe=Ie(o),Oe=this.getPointerIndex(o),ge=this.pointers[Oe];return C=C!==!1&&(C||/(down|start)$/i.test(p.type)),ge?ge.pointer=o:(ge=new vn(pe,o,p,null,null),Oe=this.pointers.length,this.pointers.push(ge)),_e(this.coords.cur,this.pointers.map(function(Ze){return Ze.pointer}),this._now()),V=this.coords.delta,q=this.coords.prev,G=this.coords.cur,V.page.x=G.page.x-q.page.x,V.page.y=G.page.y-q.page.y,V.client.x=G.client.x-q.client.x,V.client.y=G.client.y-q.client.y,V.timeStamp=G.timeStamp-q.timeStamp,C&&(this.pointerIsDown=!0,ge.downTime=this.coords.cur.timeStamp,ge.downTarget=y,F(this.downPointer,o),this.interacting()||(J(this.coords.start,this.coords.cur),J(this.coords.prev,this.coords.cur),this.downEvent=p,this.pointerWasMoved=!1)),this._updateLatestPointer(o,p,y),this._scopeFire("interactions:update-pointer",{pointer:o,event:p,eventTarget:y,down:C,pointerInfo:ge,pointerIndex:Oe,interaction:this}),Oe}},{key:"removePointer",value:function(o,p){var y=this.getPointerIndex(o);if(y!==-1){var C=this.pointers[y];this._scopeFire("interactions:remove-pointer",{pointer:o,event:p,eventTarget:null,pointerIndex:y,pointerInfo:C,interaction:this}),this.pointers.splice(y,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(o,p,y){this._latestPointer.pointer=o,this._latestPointer.event=p,this._latestPointer.eventTarget=y}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(o,p,y,C){return new Nr(this,o,this.prepared.name,p,this.element,y,C)}},{key:"_fireEvent",value:function(o){var p;(p=this.interactable)==null||p.fire(o),(!this.prevEvent||o.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=o)}},{key:"_doPhase",value:function(o){var p=o.event,y=o.phase,C=o.preEnd,V=o.type,q=this.rect;if(q&&y==="move"&&(Te(this.edges,q,this.coords.delta[this.interactable.options.deltaSource]),q.width=q.right-q.left,q.height=q.bottom-q.top),this._scopeFire("interactions:before-action-".concat(y),o)===!1)return!1;var G=o.iEvent=this._createPreparedEvent(p,y,C,V);return this._scopeFire("interactions:action-".concat(y),o),y==="start"&&(this.prevEvent=G),this._fireEvent(G),this._scopeFire("interactions:after-action-".concat(y),o),!0}},{key:"_now",value:function(){return Date.now()}}]),i}();function Zl(i){xr(i.interaction)}function xr(i){if(!function(p){return!(!p.offset.pending.x&&!p.offset.pending.y)}(i))return!1;var o=i.offset.pending;return jl(i.coords.cur,o),jl(i.coords.delta,o),Te(i.edges,i.rect,o),o.x=0,o.y=0,!0}function Vl(i){var o=i.x,p=i.y;this.offset.pending.x+=o,this.offset.pending.y+=p,this.offset.total.x+=o,this.offset.total.y+=p}function jl(i,o){var p=i.page,y=i.client,C=o.x,V=o.y;p.x+=C,p.y+=V,y.x+=C,y.y+=V}Kn.offsetBy="";var zl={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(i){i.Interaction.prototype.offsetBy=Vl},listeners:{"interactions:new":function(i){i.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(i){return function(o){o.pointerIsDown&&(jl(o.coords.cur,o.offset.total),o.offset.pending.x=0,o.offset.pending.y=0)}(i.interaction)},"interactions:before-action-start":Zl,"interactions:before-action-move":Zl,"interactions:before-action-end":function(i){var o=i.interaction;if(xr(o))return o.move({offset:!0}),o.end(),!1},"interactions:stop":function(i){var o=i.interaction;o.offset.total.x=0,o.offset.total.y=0,o.offset.pending.x=0,o.offset.pending.y=0}}},cr=zl,ar=function(){function i(o){c(this,i),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=o}return h(i,[{key:"start",value:function(o){var p=this.interaction,y=$l(p);if(!y||!y.enabled)return!1;var C=p.coords.velocity.client,V=Va(C.x,C.y),q=this.modification||(this.modification=new pn(p));if(q.copyFrom(p.modification),this.t0=p._now(),this.allowResume=y.allowResume,this.v0=V,this.currentOffset={x:0,y:0},this.startCoords=p.coords.cur.page,this.modifierArg=q.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-p.coords.cur.timeStamp<50&&V>y.minSpeed&&V>y.endSpeed)this.startInertia();else{if(q.result=q.setAll(this.modifierArg),!q.result.changed)return!1;this.startSmoothEnd()}return p.modification.result.rect=null,p.offsetBy(this.targetOffset),p._doPhase({interaction:p,event:o,phase:"inertiastart"}),p.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),p.modification.result.rect=null,this.active=!0,p.simulation=this,!0}},{key:"startInertia",value:function(){var o=this,p=this.interaction.coords.velocity.client,y=$l(this.interaction),C=y.resistance,V=-Math.log(y.endSpeed/this.v0)/C;this.targetOffset={x:(p.x-V)/C,y:(p.y-V)/C},this.te=V,this.lambda_v0=C/this.v0,this.one_ve_v0=1-y.endSpeed/this.v0;var q=this.modification,G=this.modifierArg;G.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},q.result=q.setAll(G),q.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+q.result.delta.x,y:this.targetOffset.y+q.result.delta.y}),this.onNextFrame(function(){return o.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var o=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 o.smoothEndTick()})}},{key:"onNextFrame",value:function(o){var p=this;this.timeout=aa.request(function(){p.active&&o()})}},{key:"inertiaTick",value:function(){var o,p,y,C,V,q,G,pe=this,Oe=this.interaction,ge=$l(Oe).resistance,Ze=(Oe._now()-this.t0)/1e3;if(Ze<this.te){var za,nl=1-(Math.exp(-ge*Ze)-this.lambda_v0)/this.one_ve_v0;this.isModified?(o=0,p=0,y=this.targetOffset.x,C=this.targetOffset.y,V=this.modifiedOffset.x,q=this.modifiedOffset.y,za={x:Mr(G=nl,o,y,V),y:Mr(G,p,C,q)}):za={x:this.targetOffset.x*nl,y:this.targetOffset.y*nl};var Qa={x:za.x-this.currentOffset.x,y:za.y-this.currentOffset.y};this.currentOffset.x+=Qa.x,this.currentOffset.y+=Qa.y,Oe.offsetBy(Qa),Oe.move(),this.onNextFrame(function(){return pe.inertiaTick()})}else Oe.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var o=this,p=this.interaction,y=p._now()-this.t0,C=$l(p).smoothEndDuration;if(y<C){var V={x:yn(y,0,this.targetOffset.x,C),y:yn(y,0,this.targetOffset.y,C)},q={x:V.x-this.currentOffset.x,y:V.y-this.currentOffset.y};this.currentOffset.x+=q.x,this.currentOffset.y+=q.y,p.offsetBy(q),p.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return o.smoothEndTick()})}else p.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(o){var p=o.pointer,y=o.event,C=o.eventTarget,V=this.interaction;V.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),V.updatePointer(p,y,C,!0),V._doPhase({interaction:V,event:y,phase:"resume"}),J(V.coords.prev,V.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,aa.cancel(this.timeout)}}]),i}();function $l(i){var o=i.interactable,p=i.prepared;return o&&o.options&&p.name&&o.options[p.name].inertia}var zr={id:"inertia",before:["modifiers","actions"],install:function(i){var o=i.defaults;i.usePlugin(cr),i.usePlugin(Il),i.actions.phases.inertiastart=!0,i.actions.phases.resume=!0,o.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(i){var o=i.interaction;o.inertia=new ar(o)},"interactions:before-action-end":function(i){var o=i.interaction,p=i.event;return(!o._interacting||o.simulation||!o.inertia.start(p))&&null},"interactions:down":function(i){var o=i.interaction,p=i.eventTarget,y=o.inertia;if(y.active)for(var C=p;k.element(C);){if(C===o.element){y.resume(i);break}C=Na(C)}},"interactions:stop":function(i){var o=i.interaction.inertia;o.active&&o.stop()},"interactions:before-action-resume":function(i){var o=i.interaction.modification;o.stop(i),o.start(i,i.interaction.coords.cur.page),o.applyToInteraction(i)},"interactions:before-action-inertiastart":function(i){return i.interaction.modification.setAndApply(i)},"interactions:action-resume":Zr,"interactions:action-inertiastart":Zr,"interactions:after-action-inertiastart":function(i){return i.interaction.modification.restoreInteractionCoords(i)},"interactions:after-action-resume":function(i){return i.interaction.modification.restoreInteractionCoords(i)}}};function Mr(i,o,p,y){var C=1-i;return C*C*o+2*C*i*p+i*i*y}function yn(i,o,p,y){return-p*(i/=y)*(i-2)+o}var Qr=zr;function Yn(i,o){for(var p=0;p<o.length;p++){var y=o[p];if(i.immediatePropagationStopped)break;y(i)}}var En=function(){function i(o){c(this,i),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=ee({},o||{})}return h(i,[{key:"fire",value:function(o){var p,y=this.global;(p=this.types[o.type])&&Yn(o,p),!o.propagationStopped&&y&&(p=y[o.type])&&Yn(o,p)}},{key:"on",value:function(o,p){var y=Ye(o,p);for(o in y)this.types[o]=re(this.types[o]||[],y[o])}},{key:"off",value:function(o,p){var y=Ye(o,p);for(o in y){var C=this.types[o];if(C&&C.length)for(var V=0,q=y[o];V<q.length;V++){var G=q[V],pe=C.indexOf(G);pe!==-1&&C.splice(pe,1)}}}},{key:"getRect",value:function(o){return null}}]),i}(),Gn=function(){function i(o){c(this,i),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=o,F(this,o)}return h(i,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),i}();function gn(i){return k.object(i)?{capture:!!i.capture,passive:!!i.passive}:{capture:!!i,passive:!1}}function Dn(i,o){return i===o||(typeof i=="boolean"?!!o.capture===i&&!o.passive:!!i.capture==!!o.capture&&!!i.passive==!!o.passive)}var Ln={id:"events",install:function(i){var o,p=[],y={},C=[],V={add:q,remove:G,addDelegate:function(ge,Ze,za,nl,Qa){var il=gn(Qa);if(!y[za]){y[za]=[];for(var _l=0;_l<C.length;_l++){var sl=C[_l];q(sl,za,pe),q(sl,za,Oe,!0)}}var Dl=y[za],Ml=je(Dl,function(Kl){return Kl.selector===ge&&Kl.context===Ze});Ml||(Ml={selector:ge,context:Ze,listeners:[]},Dl.push(Ml)),Ml.listeners.push({func:nl,options:il})},removeDelegate:function(ge,Ze,za,nl,Qa){var il,_l=gn(Qa),sl=y[za],Dl=!1;if(sl)for(il=sl.length-1;il>=0;il--){var Ml=sl[il];if(Ml.selector===ge&&Ml.context===Ze){for(var Kl=Ml.listeners,El=Kl.length-1;El>=0;El--){var Fl=Kl[El];if(Fl.func===nl&&Dn(Fl.options,_l)){Kl.splice(El,1),Kl.length||(sl.splice(il,1),G(Ze,za,pe),G(Ze,za,Oe,!0)),Dl=!0;break}}if(Dl)break}}},delegateListener:pe,delegateUseCapture:Oe,delegatedEvents:y,documents:C,targets:p,supportsOptions:!1,supportsPassive:!1};function q(ge,Ze,za,nl){if(ge.addEventListener){var Qa=gn(nl),il=je(p,function(_l){return _l.eventTarget===ge});il||(il={eventTarget:ge,events:{}},p.push(il)),il.events[Ze]||(il.events[Ze]=[]),je(il.events[Ze],function(_l){return _l.func===za&&Dn(_l.options,Qa)})||(ge.addEventListener(Ze,za,V.supportsOptions?Qa:Qa.capture),il.events[Ze].push({func:za,options:Qa}))}}function G(ge,Ze,za,nl){if(ge.addEventListener&&ge.removeEventListener){var Qa=K(p,function(Ir){return Ir.eventTarget===ge}),il=p[Qa];if(il&&il.events)if(Ze!=="all"){var _l=!1,sl=il.events[Ze];if(sl){if(za==="all"){for(var Dl=sl.length-1;Dl>=0;Dl--){var Ml=sl[Dl];G(ge,Ze,Ml.func,Ml.options)}return}for(var Kl=gn(nl),El=0;El<sl.length;El++){var Fl=sl[El];if(Fl.func===za&&Dn(Fl.options,Kl)){ge.removeEventListener(Ze,za,V.supportsOptions?Kl:Kl.capture),sl.splice(El,1),sl.length===0&&(delete il.events[Ze],_l=!0);break}}}_l&&!Object.keys(il.events).length&&p.splice(Qa,1)}else for(Ze in il.events)il.events.hasOwnProperty(Ze)&&G(ge,Ze,"all")}}function pe(ge,Ze){for(var za=gn(Ze),nl=new Gn(ge),Qa=y[ge.type],il=Le(ge)[0],_l=il;k.element(_l);){for(var sl=0;sl<Qa.length;sl++){var Dl=Qa[sl],Ml=Dl.selector,Kl=Dl.context;if(te(_l,Ml)&&de(Kl,il)&&de(Kl,_l)){var El=Dl.listeners;nl.currentTarget=_l;for(var Fl=0;Fl<El.length;Fl++){var Ir=El[Fl];Dn(Ir.options,za)&&Ir.func(nl)}}}_l=Na(_l)}}function Oe(ge){return pe(ge,!0)}return(o=i.document)==null||o.createElement("div").addEventListener("test",null,{get capture(){return V.supportsOptions=!0},get passive(){return V.supportsPassive=!0}}),i.events=V,V}},Kr={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(i){for(var o=0,p=Kr.methodOrder;o<p.length;o++){var y=p[o],C=Kr[y](i);if(C)return C}return null},simulationResume:function(i){var o=i.pointerType,p=i.eventType,y=i.eventTarget,C=i.scope;if(!/down|start/i.test(p))return null;for(var V=0,q=C.interactions.list;V<q.length;V++){var G=q[V],pe=y;if(G.simulation&&G.simulation.allowResume&&G.pointerType===o)for(;pe;){if(pe===G.element)return G;pe=Na(pe)}}return null},mouseOrPen:function(i){var o,p=i.pointerId,y=i.pointerType,C=i.eventType,V=i.scope;if(y!=="mouse"&&y!=="pen")return null;for(var q=0,G=V.interactions.list;q<G.length;q++){var pe=G[q];if(pe.pointerType===y){if(pe.simulation&&!Bn(pe,p))continue;if(pe.interacting())return pe;o||(o=pe)}}if(o)return o;for(var Oe=0,ge=V.interactions.list;Oe<ge.length;Oe++){var Ze=ge[Oe];if(!(Ze.pointerType!==y||/down/i.test(C)&&Ze.simulation))return Ze}return null},hasPointer:function(i){for(var o=i.pointerId,p=0,y=i.scope.interactions.list;p<y.length;p++){var C=y[p];if(Bn(C,o))return C}return null},idle:function(i){for(var o=i.pointerType,p=0,y=i.scope.interactions.list;p<y.length;p++){var C=y[p];if(C.pointers.length===1){var V=C.interactable;if(V&&(!V.options.gesture||!V.options.gesture.enabled))continue}else if(C.pointers.length>=2)continue;if(!C.interacting()&&o===C.pointerType)return C}return null}};function Bn(i,o){return i.pointers.some(function(p){return p.id===o})}var bn=Kr,Pr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Vn(i,o){return function(p){var y=o.interactions.list,C=_a(p),V=Le(p),q=V[0],G=V[1],pe=[];if(/^touch/.test(p.type)){o.prevTouchTime=o.now();for(var Oe=0,ge=p.changedTouches;Oe<ge.length;Oe++){var Ze=ge[Oe],za={pointer:Ze,pointerId:Ie(Ze),pointerType:C,eventType:p.type,eventTarget:q,curEventTarget:G,scope:o},nl=fn(za);pe.push([za.pointer,za.eventTarget,za.curEventTarget,nl])}}else{var Qa=!1;if(!Z.supportsPointerEvent&&/mouse/.test(p.type)){for(var il=0;il<y.length&&!Qa;il++)Qa=y[il].pointerType!=="mouse"&&y[il].pointerIsDown;Qa=Qa||o.now()-o.prevTouchTime<500||p.timeStamp===0}if(!Qa){var _l={pointer:p,pointerId:Ie(p),pointerType:C,eventType:p.type,curEventTarget:G,eventTarget:q,scope:o},sl=fn(_l);pe.push([_l.pointer,_l.eventTarget,_l.curEventTarget,sl])}}for(var Dl=0;Dl<pe.length;Dl++){var Ml=pe[Dl],Kl=Ml[0],El=Ml[1],Fl=Ml[2];Ml[3][i](Kl,p,El,Fl)}}}function fn(i){var o=i.pointerType,p=i.scope,y={interaction:bn.search(i),searchDetails:i};return p.fire("interactions:find",y),y.interaction||p.interactions.new({pointerType:o})}function Et(i,o){var p=i.doc,y=i.scope,C=i.options,V=y.interactions.docEvents,q=y.events,G=q[o];for(var pe in y.browser.isIOS&&!C.events&&(C.events={passive:!1}),q.delegatedEvents)G(p,pe,q.delegateListener),G(p,pe,q.delegateUseCapture,!0);for(var Oe=C&&C.events,ge=0;ge<V.length;ge++){var Ze=V[ge];G(p,Ze.type,Ze.listener,Oe)}}var zo={id:"core/interactions",install:function(i){for(var o={},p=0;p<Pr.length;p++){var y=Pr[p];o[y]=Vn(y,i)}var C,V=Z.pEventTypes;function q(){for(var G=0,pe=i.interactions.list;G<pe.length;G++){var Oe=pe[G];if(Oe.pointerIsDown&&Oe.pointerType==="touch"&&!Oe._interacting)for(var ge=function(){var nl=za[Ze];i.documents.some(function(Qa){return de(Qa.doc,nl.downTarget)})||Oe.removePointer(nl.pointer,nl.event)},Ze=0,za=Oe.pointers;Ze<za.length;Ze++)ge()}}(C=ne.PointerEvent?[{type:V.down,listener:q},{type:V.down,listener:o.pointerDown},{type:V.move,listener:o.pointerMove},{type:V.up,listener:o.pointerUp},{type:V.cancel,listener:o.pointerUp}]:[{type:"mousedown",listener:o.pointerDown},{type:"mousemove",listener:o.pointerMove},{type:"mouseup",listener:o.pointerUp},{type:"touchstart",listener:q},{type:"touchstart",listener:o.pointerDown},{type:"touchmove",listener:o.pointerMove},{type:"touchend",listener:o.pointerUp},{type:"touchcancel",listener:o.pointerUp}]).push({type:"blur",listener:function(G){for(var pe=0,Oe=i.interactions.list;pe<Oe.length;pe++)Oe[pe].documentBlur(G)}}),i.prevTouchTime=0,i.Interaction=function(G){m(Oe,G);var pe=z(Oe);function Oe(){return c(this,Oe),pe.apply(this,arguments)}return h(Oe,[{key:"pointerMoveTolerance",get:function(){return i.interactions.pointerMoveTolerance},set:function(ge){i.interactions.pointerMoveTolerance=ge}},{key:"_now",value:function(){return i.now()}}]),Oe}(mn),i.interactions={list:[],new:function(G){G.scopeFire=function(Oe,ge){return i.fire(Oe,ge)};var pe=new i.Interaction(G);return i.interactions.list.push(pe),pe},listeners:o,docEvents:C,pointerMoveTolerance:1},i.usePlugin(dn)},listeners:{"scope:add-document":function(i){return Et(i,"add")},"scope:remove-document":function(i){return Et(i,"remove")},"interactable:unset":function(i,o){for(var p=i.interactable,y=o.interactions.list.length-1;y>=0;y--){var C=o.interactions.list[y];C.interactable===p&&(C.stop(),o.fire("interactions:destroy",{interaction:C}),C.destroy(),o.interactions.list.length>2&&o.interactions.list.splice(y,1))}}},onDocSignal:Et,doOnInteractions:Vn,methodNames:Pr},Mo=zo,kn=function(i){return i[i.On=0]="On",i[i.Off=1]="Off",i}(kn||{}),Oo=function(){function i(o,p,y,C){c(this,i),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new En,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=p.actions,this.target=o,this._context=p.context||y,this._win=L(ja(o)?this._context:o),this._doc=this._win.document,this._scopeEvents=C,this.set(p)}return h(i,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(o,p){return k.func(p.onstart)&&this.on("".concat(o,"start"),p.onstart),k.func(p.onmove)&&this.on("".concat(o,"move"),p.onmove),k.func(p.onend)&&this.on("".concat(o,"end"),p.onend),k.func(p.oninertiastart)&&this.on("".concat(o,"inertiastart"),p.oninertiastart),this}},{key:"updatePerActionListeners",value:function(o,p,y){var C,V=this,q=(C=this._actions.map[o])==null?void 0:C.filterEventType,G=function(pe){return(q==null||q(pe))&&Xr(pe,V._actions)};(k.array(p)||k.object(p))&&this._onOff(kn.Off,o,p,void 0,G),(k.array(y)||k.object(y))&&this._onOff(kn.On,o,y,void 0,G)}},{key:"setPerAction",value:function(o,p){var y=this._defaults;for(var C in p){var V=C,q=this.options[o],G=p[V];V==="listeners"&&this.updatePerActionListeners(o,q.listeners,G),k.array(G)?q[V]=Se(G):k.plainObject(G)?(q[V]=ee(q[V]||{},qr(G)),k.object(y.perAction[V])&&"enabled"in y.perAction[V]&&(q[V].enabled=G.enabled!==!1)):k.bool(G)&&k.object(y.perAction[V])?q[V].enabled=G:q[V]=G}}},{key:"getRect",value:function(o){return o=o||(k.element(this.target)?this.target:null),k.string(this.target)&&(o=o||this._context.querySelector(this.target)),pa(o)}},{key:"rectChecker",value:function(o){var p=this;return k.func(o)?(this.getRect=function(y){var C=ee({},o.apply(p,y));return"width"in C||(C.width=C.right-C.left,C.height=C.bottom-C.top),C},this):o===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(o,p){if(ja(p)||k.object(p)){for(var y in this.options[o]=p,this._actions.map)this.options[y][o]=p;return this}return this.options[o]}},{key:"origin",value:function(o){return this._backCompatOption("origin",o)}},{key:"deltaSource",value:function(o){return o==="page"||o==="client"?(this.options.deltaSource=o,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var o=this.target;return k.string(o)?Array.from(this._context.querySelectorAll(o)):k.func(o)&&o.getAllElements?o.getAllElements():k.element(o)?[o]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(o){return this._context===o.ownerDocument||de(this._context,o)}},{key:"testIgnoreAllow",value:function(o,p,y){return!this.testIgnore(o.ignoreFrom,p,y)&&this.testAllow(o.allowFrom,p,y)}},{key:"testAllow",value:function(o,p,y){return!o||!!k.element(y)&&(k.string(o)?ye(y,o,p):!!k.element(o)&&de(o,y))}},{key:"testIgnore",value:function(o,p,y){return!(!o||!k.element(y))&&(k.string(o)?ye(y,o,p):!!k.element(o)&&de(o,y))}},{key:"fire",value:function(o){return this.events.fire(o),this}},{key:"_onOff",value:function(o,p,y,C,V){k.object(p)&&!k.array(p)&&(C=y,y=null);var q=Ye(p,y,V);for(var G in q){G==="wheel"&&(G=Z.wheelEvent);for(var pe=0,Oe=q[G];pe<Oe.length;pe++){var ge=Oe[pe];Xr(G,this._actions)?this.events[o===kn.On?"on":"off"](G,ge):k.string(this.target)?this._scopeEvents[o===kn.On?"addDelegate":"removeDelegate"](this.target,this._context,G,ge,C):this._scopeEvents[o===kn.On?"add":"remove"](this.target,G,ge,C)}}return this}},{key:"on",value:function(o,p,y){return this._onOff(kn.On,o,p,y)}},{key:"off",value:function(o,p,y){return this._onOff(kn.Off,o,p,y)}},{key:"set",value:function(o){var p=this._defaults;for(var y in k.object(o)||(o={}),this.options=qr(p.base),this._actions.methodDict){var C=y,V=this._actions.methodDict[C];this.options[C]={},this.setPerAction(C,ee(ee({},p.perAction),p.actions[C])),this[V](o[C])}for(var q in o)q!=="getRect"?k.func(this[q])&&this[q](o[q]):this.rectChecker(o.getRect);return this}},{key:"unset",value:function(){if(k.string(this.target))for(var o in this._scopeEvents.delegatedEvents)for(var p=this._scopeEvents.delegatedEvents[o],y=p.length-1;y>=0;y--){var C=p[y],V=C.selector,q=C.context,G=C.listeners;V===this.target&&q===this._context&&p.splice(y,1);for(var pe=G.length-1;pe>=0;pe--)this._scopeEvents.removeDelegate(this.target,this._context,o,G[pe][0],G[pe][1])}else this._scopeEvents.remove(this.target,"all")}}]),i}(),Io=function(){function i(o){var p=this;c(this,i),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=o,o.addListeners({"interactable:unset":function(y){var C=y.interactable,V=C.target,q=k.string(V)?p.selectorMap[V]:V[p.scope.id],G=K(q,function(pe){return pe===C});q.splice(G,1)}})}return h(i,[{key:"new",value:function(o,p){p=ee(p||{},{actions:this.scope.actions});var y=new this.scope.Interactable(o,p,this.scope.document,this.scope.events);return this.scope.addDocument(y._doc),this.list.push(y),k.string(o)?(this.selectorMap[o]||(this.selectorMap[o]=[]),this.selectorMap[o].push(y)):(y.target[this.scope.id]||Object.defineProperty(o,this.scope.id,{value:[],configurable:!0}),o[this.scope.id].push(y)),this.scope.fire("interactable:new",{target:o,options:p,interactable:y,win:this.scope._win}),y}},{key:"getExisting",value:function(o,p){var y=p&&p.context||this.scope.document,C=k.string(o),V=C?this.selectorMap[o]:o[this.scope.id];if(V)return je(V,function(q){return q._context===y&&(C||q.inContext(o))})}},{key:"forEachMatch",value:function(o,p){for(var y=0,C=this.list;y<C.length;y++){var V=C[y],q=void 0;if((k.string(V.target)?k.element(o)&&te(o,V.target):o===V.target)&&V.inContext(o)&&(q=p(V)),q!==void 0)return q}}}]),i}(),Ft=function(){function i(){var o=this;c(this,i),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=Z,this.defaults=qr(Wr),this.Eventable=En,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(y){var C=function V(q,G){var pe=y.interactables.getExisting(q,G);return pe||((pe=y.interactables.new(q,G)).events.global=V.globalEvents),pe};return C.getPointerAverage=ve,C.getTouchBBox=Je,C.getTouchDistance=Qe,C.getTouchAngle=Fe,C.getElementRect=pa,C.getElementClientRect=Ne,C.matchesSelector=te,C.closest=Ke,C.globalEvents={},C.version="1.10.27",C.scope=y,C.use=function(V,q){return this.scope.usePlugin(V,q),this},C.isSet=function(V,q){return!!this.scope.interactables.get(V,q&&q.context)},C.on=Be(function(V,q,G){if(k.string(V)&&V.search(" ")!==-1&&(V=V.trim().split(/ +/)),k.array(V)){for(var pe=0,Oe=V;pe<Oe.length;pe++){var ge=Oe[pe];this.on(ge,q,G)}return this}if(k.object(V)){for(var Ze in V)this.on(Ze,V[Ze],q);return this}return Xr(V,this.scope.actions)?this.globalEvents[V]?this.globalEvents[V].push(q):this.globalEvents[V]=[q]:this.scope.events.add(this.scope.document,V,q,{options:G}),this},"The interact.on() method is being deprecated"),C.off=Be(function(V,q,G){if(k.string(V)&&V.search(" ")!==-1&&(V=V.trim().split(/ +/)),k.array(V)){for(var pe=0,Oe=V;pe<Oe.length;pe++){var ge=Oe[pe];this.off(ge,q,G)}return this}if(k.object(V)){for(var Ze in V)this.off(Ze,V[Ze],q);return this}var za;return Xr(V,this.scope.actions)?V in this.globalEvents&&(za=this.globalEvents[V].indexOf(q))!==-1&&this.globalEvents[V].splice(za,1):this.scope.events.remove(this.scope.document,V,q,G),this},"The interact.off() method is being deprecated"),C.debug=function(){return this.scope},C.supportsTouch=function(){return Z.supportsTouch},C.supportsPointerEvent=function(){return Z.supportsPointerEvent},C.stop=function(){for(var V=0,q=this.scope.interactions.list;V<q.length;V++)q[V].stop();return this},C.pointerMoveTolerance=function(V){return k.number(V)?(this.scope.interactions.pointerMoveTolerance=V,this):this.scope.interactions.pointerMoveTolerance},C.addDocument=function(V,q){this.scope.addDocument(V,q)},C.removeDocument=function(V){this.scope.removeDocument(V)},C}(this),this.InteractEvent=Nr,this.Interactable=void 0,this.interactables=new Io(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(y){return o.removeDocument(y.target)};var p=this;this.Interactable=function(y){m(V,y);var C=z(V);function V(){return c(this,V),C.apply(this,arguments)}return h(V,[{key:"_defaults",get:function(){return p.defaults}},{key:"set",value:function(q){return w(u(V.prototype),"set",this).call(this,q),p.fire("interactable:set",{options:q,interactable:this}),this}},{key:"unset",value:function(){w(u(V.prototype),"unset",this).call(this);var q=p.interactables.list.indexOf(this);q<0||(p.interactables.list.splice(q,1),p.fire("interactable:unset",{interactable:this}))}}]),V}(Oo)}return h(i,[{key:"addListeners",value:function(o,p){this.listenerMaps.push({id:p,map:o})}},{key:"fire",value:function(o,p){for(var y=0,C=this.listenerMaps;y<C.length;y++){var V=C[y].map[o];if(V&&V(p,this,o)===!1)return!1}}},{key:"init",value:function(o){return this.isInitialized?this:function(p,y){return p.isInitialized=!0,k.window(y)&&b(y),ne.init(y),Z.init(y),aa.init(y),p.window=y,p.document=y.document,p.usePlugin(Mo),p.usePlugin(Ln),p}(this,o)}},{key:"pluginIsInstalled",value:function(o){var p=o.id;return p?!!this._plugins.map[p]:this._plugins.list.indexOf(o)!==-1}},{key:"usePlugin",value:function(o,p){if(!this.isInitialized)return this;if(this.pluginIsInstalled(o))return this;if(o.id&&(this._plugins.map[o.id]=o),this._plugins.list.push(o),o.install&&o.install(this,p),o.listeners&&o.before){for(var y=0,C=this.listenerMaps.length,V=o.before.reduce(function(G,pe){return G[pe]=!0,G[jt(pe)]=!0,G},{});y<C;y++){var q=this.listenerMaps[y].id;if(q&&(V[q]||V[jt(q)]))break}this.listenerMaps.splice(y,0,{id:o.id,map:o.listeners})}else o.listeners&&this.listenerMaps.push({id:o.id,map:o.listeners});return this}},{key:"addDocument",value:function(o,p){if(this.getDocIndex(o)!==-1)return!1;var y=L(o);p=p?ee({},p):{},this.documents.push({doc:o,options:p}),this.events.documents.push(o),o!==this.document&&this.events.add(y,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:o,window:y,scope:this,options:p})}},{key:"removeDocument",value:function(o){var p=this.getDocIndex(o),y=L(o),C=this.documents[p].options;this.events.remove(y,"unload",this.onWindowUnload),this.documents.splice(p,1),this.events.documents.splice(p,1),this.fire("scope:remove-document",{doc:o,window:y,scope:this,options:C})}},{key:"getDocIndex",value:function(o){for(var p=0;p<this.documents.length;p++)if(this.documents[p].doc===o)return p;return-1}},{key:"getDocOptions",value:function(o){var p=this.getDocIndex(o);return p===-1?null:this.documents[p].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),i}();function jt(i){return i&&i.replace(/\/.*$/,"")}var Ht=new Ft,Or=Ht.interactStatic,Lo=typeof globalThis<"u"?globalThis:window;Ht.init(Lo);var Dt=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(i){var o=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(y){var C=y[0],V=y[1];return C in i||V in i}),p=function(y,C){for(var V=i.range,q=i.limits,G=q===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:q,pe=i.offset,Oe=pe===void 0?{x:0,y:0}:pe,ge={range:V,grid:i,x:null,y:null},Ze=0;Ze<o.length;Ze++){var za=o[Ze],nl=za[0],Qa=za[1],il=Math.round((y-Oe.x)/i[nl]),_l=Math.round((C-Oe.y)/i[Qa]);ge[nl]=Math.max(G.left,Math.min(G.right,il*i[nl]+Oe.x)),ge[Qa]=Math.max(G.top,Math.min(G.bottom,_l*i[Qa]+Oe.y))}return ge};return p.grid=i,p.coordFields=o,p}}),Vo={id:"snappers",install:function(i){var o=i.interactStatic;o.snappers=ee(o.snappers||{},Dt),o.createSnapGrid=o.snappers.grid}},Bt=Vo,Ut={start:function(i){var o=i.state,p=i.rect,y=i.edges,C=i.pageCoords,V=o.options,q=V.ratio,G=V.enabled,pe=o.options,Oe=pe.equalDelta,ge=pe.modifiers;q==="preserve"&&(q=p.width/p.height),o.startCoords=ee({},C),o.startRect=ee({},p),o.ratio=q,o.equalDelta=Oe;var Ze=o.linkedEdges={top:y.top||y.left&&!y.bottom,left:y.left||y.top&&!y.right,bottom:y.bottom||y.right&&!y.top,right:y.right||y.bottom&&!y.left};if(o.xIsPrimaryAxis=!(!y.left&&!y.right),o.equalDelta){var za=(Ze.left?1:-1)*(Ze.top?1:-1);o.edgeSign={x:za,y:za}}else o.edgeSign={x:Ze.left?-1:1,y:Ze.top?-1:1};if(G!==!1&&ee(y,Ze),ge!=null&&ge.length){var nl=new pn(i.interaction);nl.copyFrom(i.interaction.modification),nl.prepareStates(ge),o.subModification=nl,nl.startAll(t({},i))}},set:function(i){var o=i.state,p=i.rect,y=i.coords,C=o.linkedEdges,V=ee({},y),q=o.equalDelta?qt:Ro;if(ee(i.edges,C),q(o,o.xIsPrimaryAxis,y,p),!o.subModification)return null;var G=ee({},p);Te(C,G,{x:y.x-V.x,y:y.y-V.y});var pe=o.subModification.setAll(t(t({},i),{},{rect:G,edges:C,pageCoords:y,prevCoords:y,prevRect:G})),Oe=pe.delta;return pe.changed&&(q(o,Math.abs(Oe.x)>Math.abs(Oe.y),pe.coords,pe.rect),ee(y,pe.coords)),pe.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function qt(i,o,p){var y=i.startCoords,C=i.edgeSign;o?p.y=y.y+(p.x-y.x)*C.y:p.x=y.x+(p.y-y.y)*C.x}function Ro(i,o,p,y){var C=i.startRect,V=i.startCoords,q=i.ratio,G=i.edgeSign;if(o){var pe=y.width/q;p.y=V.y+(pe-C.height)*G.y}else{var Oe=y.height*q;p.x=V.x+(Oe-C.width)*G.x}}var $o=Dr(Ut,"aspectRatio"),Wt=function(){};Wt._defaults={};var xn=Wt;function _n(i,o,p){return k.func(i)?Pe(i,o.interactable,o.element,[p.x,p.y,o]):Pe(i,o.interactable,o.element)}var Rn={start:function(i){var o=i.rect,p=i.startOffset,y=i.state,C=i.interaction,V=i.pageCoords,q=y.options,G=q.elementRect,pe=ee({left:0,top:0,right:0,bottom:0},q.offset||{});if(o&&G){var Oe=_n(q.restriction,C,V);if(Oe){var ge=Oe.right-Oe.left-o.width,Ze=Oe.bottom-Oe.top-o.height;ge<0&&(pe.left+=ge,pe.right+=ge),Ze<0&&(pe.top+=Ze,pe.bottom+=Ze)}pe.left+=p.left-o.width*G.left,pe.top+=p.top-o.height*G.top,pe.right+=p.right-o.width*(1-G.right),pe.bottom+=p.bottom-o.height*(1-G.bottom)}y.offset=pe},set:function(i){var o=i.coords,p=i.interaction,y=i.state,C=y.options,V=y.offset,q=_n(C.restriction,p,o);if(q){var G=function(pe){return!pe||"left"in pe&&"top"in pe||((pe=ee({},pe)).left=pe.x||0,pe.top=pe.y||0,pe.right=pe.right||pe.left+pe.width,pe.bottom=pe.bottom||pe.top+pe.height),pe}(q);o.x=Math.max(Math.min(G.right-V.right,o.x),G.left+V.left),o.y=Math.max(Math.min(G.bottom-V.bottom,o.y),G.top+V.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},Po=Dr(Rn,"restrict"),Kt={top:1/0,left:1/0,bottom:-1/0,right:-1/0},Yt={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Gt(i,o){for(var p=0,y=["top","left","bottom","right"];p<y.length;p++){var C=y[p];C in i||(i[C]=o[C])}return i}var $n={noInner:Kt,noOuter:Yt,start:function(i){var o,p=i.interaction,y=i.startOffset,C=i.state,V=C.options;V&&(o=xa(_n(V.offset,p,p.coords.start.page))),o=o||{x:0,y:0},C.offset={top:o.y+y.top,left:o.x+y.left,bottom:o.y-y.bottom,right:o.x-y.right}},set:function(i){var o=i.coords,p=i.edges,y=i.interaction,C=i.state,V=C.offset,q=C.options;if(p){var G=ee({},o),pe=_n(q.inner,y,G)||{},Oe=_n(q.outer,y,G)||{};Gt(pe,Kt),Gt(Oe,Yt),p.top?o.y=Math.min(Math.max(Oe.top+V.top,G.y),pe.top+V.top):p.bottom&&(o.y=Math.max(Math.min(Oe.bottom+V.bottom,G.y),pe.bottom+V.bottom)),p.left?o.x=Math.min(Math.max(Oe.left+V.left,G.x),pe.left+V.left):p.right&&(o.x=Math.max(Math.min(Oe.right+V.right,G.x),pe.right+V.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},Jn=Dr($n,"restrictEdges"),Jt=ee({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(i){}},Rn.defaults),Xt=Dr({start:Rn.start,set:Rn.set,defaults:Jt},"restrictRect"),Xn={width:-1/0,height:-1/0},Fo={width:1/0,height:1/0},Zt=Dr({start:function(i){return $n.start(i)},set:function(i){var o=i.interaction,p=i.state,y=i.rect,C=i.edges,V=p.options;if(C){var q=He(_n(V.min,o,i.coords))||Xn,G=He(_n(V.max,o,i.coords))||Fo;p.options={endOnly:V.endOnly,inner:ee({},$n.noInner),outer:ee({},$n.noOuter)},C.top?(p.options.inner.top=y.bottom-q.height,p.options.outer.top=y.bottom-G.height):C.bottom&&(p.options.inner.bottom=y.top+q.height,p.options.outer.bottom=y.top+G.height),C.left?(p.options.inner.left=y.right-q.width,p.options.outer.left=y.right-G.width):C.right&&(p.options.inner.right=y.left+q.width,p.options.outer.right=y.left+G.width),$n.set(i),p.options=V}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),Nn={start:function(i){var o,p=i.interaction,y=i.interactable,C=i.element,V=i.rect,q=i.state,G=i.startOffset,pe=q.options,Oe=pe.offsetWithOrigin?function(za){var nl=za.interaction.element,Qa=xa(Pe(za.state.options.origin,null,null,[nl])),il=Qa||Re(za.interactable,nl,za.interaction.prepared.name);return il}(i):{x:0,y:0};if(pe.offset==="startCoords")o={x:p.coords.start.page.x,y:p.coords.start.page.y};else{var ge=Pe(pe.offset,y,C,[p]);(o=xa(ge)||{x:0,y:0}).x+=Oe.x,o.y+=Oe.y}var Ze=pe.relativePoints;q.offsets=V&&Ze&&Ze.length?Ze.map(function(za,nl){return{index:nl,relativePoint:za,x:G.left-V.width*za.x+o.x,y:G.top-V.height*za.y+o.y}}):[{index:0,relativePoint:null,x:o.x,y:o.y}]},set:function(i){var o=i.interaction,p=i.coords,y=i.state,C=y.options,V=y.offsets,q=Re(o.interactable,o.element,o.prepared.name),G=ee({},p),pe=[];C.offsetWithOrigin||(G.x-=q.x,G.y-=q.y);for(var Oe=0,ge=V;Oe<ge.length;Oe++)for(var Ze=ge[Oe],za=G.x-Ze.x,nl=G.y-Ze.y,Qa=0,il=C.targets.length;Qa<il;Qa++){var _l=C.targets[Qa],sl=void 0;(sl=k.func(_l)?_l(za,nl,o._proxy,Ze,Qa):_l)&&pe.push({x:(k.number(sl.x)?sl.x:za)+Ze.x,y:(k.number(sl.y)?sl.y:nl)+Ze.y,range:k.number(sl.range)?sl.range:C.range,source:_l,index:Qa,offset:Ze})}for(var Dl={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Ml=0;Ml<pe.length;Ml++){var Kl=pe[Ml],El=Kl.range,Fl=Kl.x-G.x,Ir=Kl.y-G.y,mr=Va(Fl,Ir),Fr=mr<=El;El===1/0&&Dl.inRange&&Dl.range!==1/0&&(Fr=!1),Dl.target&&!(Fr?Dl.inRange&&El!==1/0?mr/El<Dl.distance/Dl.range:El===1/0&&Dl.range!==1/0||mr<Dl.distance:!Dl.inRange&&mr<Dl.distance)||(Dl.target=Kl,Dl.distance=mr,Dl.range=El,Dl.inRange=Fr,Dl.delta.x=Fl,Dl.delta.y=Ir)}return Dl.inRange&&(p.x=Dl.target.x,p.y=Dl.target.y),y.closest=Dl,Dl},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},jo=Dr(Nn,"snap"),ot={start:function(i){var o=i.state,p=i.edges,y=o.options;if(!p)return null;i.state={options:{targets:null,relativePoints:[{x:p.left?0:1,y:p.top?0:1}],offset:y.offset||"self",origin:{x:0,y:0},range:y.range}},o.targetFields=o.targetFields||[["width","height"],["x","y"]],Nn.start(i),o.offsets=i.state.offsets,i.state=o},set:function(i){var o=i.interaction,p=i.state,y=i.coords,C=p.options,V=p.offsets,q={x:y.x-V[0].x,y:y.y-V[0].y};p.options=ee({},C),p.options.targets=[];for(var G=0,pe=C.targets||[];G<pe.length;G++){var Oe=pe[G],ge=void 0;if(ge=k.func(Oe)?Oe(q.x,q.y,o):Oe){for(var Ze=0,za=p.targetFields;Ze<za.length;Ze++){var nl=za[Ze],Qa=nl[0],il=nl[1];if(Qa in ge||il in ge){ge.x=ge[Qa],ge.y=ge[il];break}}p.options.targets.push(ge)}}var _l=Nn.set(i);return p.options=C,_l},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ho=Dr(ot,"snapSize"),Nt={aspectRatio:$o,restrictEdges:Jn,restrict:Po,restrictRect:Xt,restrictSize:Zt,snapEdges:Dr({start:function(i){var o=i.edges;return o?(i.state.targetFields=i.state.targetFields||[[o.left?"left":"right",o.top?"top":"bottom"]],ot.start(i)):null},set:ot.set,defaults:ee(qr(ot.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:jo,snapSize:Ho,spring:xn,avoid:xn,transform:xn,rubberband:xn},Uo={id:"modifiers",install:function(i){var o=i.interactStatic;for(var p in i.usePlugin(Il),i.usePlugin(Bt),o.modifiers=Nt,Nt){var y=Nt[p],C=y._defaults,V=y._methods;C._methods=V,i.defaults.perAction[p]=C}}},qo=Uo,Qt=function(i){m(p,i);var o=z(p);function p(y,C,V,q,G,pe){var Oe;if(c(this,p),F(S(Oe=o.call(this,G)),V),V!==C&&F(S(Oe),C),Oe.timeStamp=pe,Oe.originalEvent=V,Oe.type=y,Oe.pointerId=Ie(C),Oe.pointerType=_a(C),Oe.target=q,Oe.currentTarget=null,y==="tap"){var ge=G.getPointerIndex(C);Oe.dt=Oe.timeStamp-G.pointers[ge].downTime;var Ze=Oe.timeStamp-G.tapTime;Oe.double=!!G.prevTap&&G.prevTap.type!=="doubletap"&&G.prevTap.target===Oe.target&&Ze<500}else y==="doubletap"&&(Oe.dt=C.timeStamp-G.tapTime,Oe.double=!0);return Oe}return h(p,[{key:"_subtractOrigin",value:function(y){var C=y.x,V=y.y;return this.pageX-=C,this.pageY-=V,this.clientX-=C,this.clientY-=V,this}},{key:"_addOrigin",value:function(y){var C=y.x,V=y.y;return this.pageX+=C,this.pageY+=V,this.clientX+=C,this.clientY+=V,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),p}(va),Pn={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(i){i.pointerEvents=Pn,i.defaults.actions.pointerEvents=Pn.defaults,ee(i.actions.phaselessTypes,Pn.types)},listeners:{"interactions:new":function(i){var o=i.interaction;o.prevTap=null,o.tapTime=0},"interactions:update-pointer":function(i){var o=i.down,p=i.pointerInfo;!o&&p.hold||(p.hold={duration:1/0,timeout:null})},"interactions:move":function(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget;i.duplicate||p.pointerIsDown&&!p.pointerWasMoved||(p.pointerIsDown&&Tt(i),wn({interaction:p,pointer:y,event:C,eventTarget:V,type:"move"},o))},"interactions:down":function(i,o){(function(p,y){for(var C=p.interaction,V=p.pointer,q=p.event,G=p.eventTarget,pe=p.pointerIndex,Oe=C.pointers[pe].hold,ge=wa(G),Ze={interaction:C,pointer:V,event:q,eventTarget:G,type:"hold",targets:[],path:ge,node:null},za=0;za<ge.length;za++){var nl=ge[za];Ze.node=nl,y.fire("pointerEvents:collect-targets",Ze)}if(Ze.targets.length){for(var Qa=1/0,il=0,_l=Ze.targets;il<_l.length;il++){var sl=_l[il].eventable.options.holdDuration;sl<Qa&&(Qa=sl)}Oe.duration=Qa,Oe.timeout=setTimeout(function(){wn({interaction:C,eventTarget:G,pointer:V,event:q,type:"hold"},y)},Qa)}})(i,o),wn(i,o)},"interactions:up":function(i,o){Tt(i),wn(i,o),function(p,y){var C=p.interaction,V=p.pointer,q=p.event,G=p.eventTarget;C.pointerWasMoved||wn({interaction:C,eventTarget:G,pointer:V,event:q,type:"tap"},y)}(i,o)},"interactions:cancel":function(i,o){Tt(i),wn(i,o)}},PointerEvent:Qt,fire:wn,collectEventTargets:eo,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 wn(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget,q=i.type,G=i.targets,pe=G===void 0?eo(i,o):G,Oe=new Qt(q,y,C,V,p,o.now());o.fire("pointerEvents:new",{pointerEvent:Oe});for(var ge={interaction:p,pointer:y,event:C,eventTarget:V,targets:pe,type:q,pointerEvent:Oe},Ze=0;Ze<pe.length;Ze++){var za=pe[Ze];for(var nl in za.props||{})Oe[nl]=za.props[nl];var Qa=Re(za.eventable,za.node);if(Oe._subtractOrigin(Qa),Oe.eventable=za.eventable,Oe.currentTarget=za.node,za.eventable.fire(Oe),Oe._addOrigin(Qa),Oe.immediatePropagationStopped||Oe.propagationStopped&&Ze+1<pe.length&&pe[Ze+1].node!==Oe.currentTarget)break}if(o.fire("pointerEvents:fired",ge),q==="tap"){var il=Oe.double?wn({interaction:p,pointer:y,event:C,eventTarget:V,type:"doubletap"},o):Oe;p.prevTap=il,p.tapTime=il.timeStamp}return Oe}function eo(i,o){var p=i.interaction,y=i.pointer,C=i.event,V=i.eventTarget,q=i.type,G=p.getPointerIndex(y),pe=p.pointers[G];if(q==="tap"&&(p.pointerWasMoved||!pe||pe.downTarget!==V))return[];for(var Oe=wa(V),ge={interaction:p,pointer:y,event:C,eventTarget:V,type:q,path:Oe,targets:[],node:null},Ze=0;Ze<Oe.length;Ze++){var za=Oe[Ze];ge.node=za,o.fire("pointerEvents:collect-targets",ge)}return q==="hold"&&(ge.targets=ge.targets.filter(function(nl){var Qa,il;return nl.eventable.options.holdDuration===((Qa=p.pointers[G])==null||(il=Qa.hold)==null?void 0:il.duration)})),ge.targets}function Tt(i){var o=i.interaction,p=i.pointerIndex,y=o.pointers[p].hold;y&&y.timeout&&(clearTimeout(y.timeout),y.timeout=null)}var Wo=Object.freeze({__proto__:null,default:Pn});function it(i){var o=i.interaction;o.holdIntervalHandle&&(clearInterval(o.holdIntervalHandle),o.holdIntervalHandle=null)}var Ko={id:"pointer-events/holdRepeat",install:function(i){i.usePlugin(Pn);var o=i.pointerEvents;o.defaults.holdRepeatInterval=0,o.types.holdrepeat=i.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(i,o){return i["pointerEvents:".concat(o)]=it,i},{"pointerEvents:new":function(i){var o=i.pointerEvent;o.type==="hold"&&(o.count=(o.count||0)+1)},"pointerEvents:fired":function(i,o){var p=i.interaction,y=i.pointerEvent,C=i.eventTarget,V=i.targets;if(y.type==="hold"&&V.length){var q=V[0].eventable.options.holdRepeatInterval;q<=0||(p.holdIntervalHandle=setTimeout(function(){o.pointerEvents.fire({interaction:p,eventTarget:C,type:"hold",pointer:y,event:y},o)},q))}}})},Yo=Ko,Go={id:"pointer-events/interactableTargets",install:function(i){var o=i.Interactable;o.prototype.pointerEvents=function(y){return ee(this.events.options,y),this};var p=o.prototype._backCompatOption;o.prototype._backCompatOption=function(y,C){var V=p.call(this,y,C);return V===this&&(this.events.options[y]=C),V}},listeners:{"pointerEvents:collect-targets":function(i,o){var p=i.targets,y=i.node,C=i.type,V=i.eventTarget;o.interactables.forEachMatch(y,function(q){var G=q.events,pe=G.options;G.types[C]&&G.types[C].length&&q.testIgnoreAllow(pe,y,V)&&p.push({node:y,eventable:G,props:{interactable:q}})})},"interactable:new":function(i){var o=i.interactable;o.events.getRect=function(p){return o.getRect(p)}},"interactable:set":function(i,o){var p=i.interactable,y=i.options;ee(p.events.options,o.pointerEvents.defaults),ee(p.events.options,y.pointerEvents||{})}}},Jo=Go,ao={id:"pointer-events",install:function(i){i.usePlugin(Wo),i.usePlugin(Yo),i.usePlugin(Jo)}},st=ao,Xo={id:"reflow",install:function(i){var o=i.Interactable;i.actions.phases.reflow=!0,o.prototype.reflow=function(p){return function(y,C,V){for(var q=y.getAllElements(),G=V.window.Promise,pe=G?[]:null,Oe=function(){var Ze=q[ge],za=y.getRect(Ze);if(!za)return 1;var nl,Qa=je(V.interactions.list,function(sl){return sl.interacting()&&sl.interactable===y&&sl.element===Ze&&sl.prepared.name===C.name});if(Qa)Qa.move(),pe&&(nl=Qa._reflowPromise||new G(function(sl){Qa._reflowResolve=sl}));else{var il=He(za),_l=function(sl){return{coords:sl,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:il.x,y:il.y},client:{x:il.x,y:il.y},timeStamp:V.now()});nl=function(sl,Dl,Ml,Kl,El){var Fl=sl.interactions.new({pointerType:"reflow"}),Ir={interaction:Fl,event:El,pointer:El,eventTarget:Ml,phase:"reflow"};Fl.interactable=Dl,Fl.element=Ml,Fl.prevEvent=El,Fl.updatePointer(El,El,Ml,!0),ie(Fl.coords.delta),Fa(Fl.prepared,Kl),Fl._doPhase(Ir);var mr=sl.window,Fr=mr.Promise,en=Fr?new Fr(function(on){Fl._reflowResolve=on}):void 0;return Fl._reflowPromise=en,Fl.start(Kl,Dl,Ml),Fl._interacting?(Fl.move(Ir),Fl.end(El)):(Fl.stop(),Fl._reflowResolve()),Fl.removePointer(El,El),en}(V,y,Ze,C,_l)}pe&&pe.push(nl)},ge=0;ge<q.length&&!Oe();ge++);return pe&&G.all(pe).then(function(){return y})}(this,p,i)}},listeners:{"interactions:stop":function(i,o){var p=i.interaction;p.pointerType==="reflow"&&(p._reflowResolve&&p._reflowResolve(),function(y,C){y.splice(y.indexOf(C),1)}(o.interactions.list,p))}}},Zo=Xo;if(Or.use(dn),Or.use(cr),Or.use(st),Or.use(Qr),Or.use(qo),Or.use(Sr),Or.use(Xe),Or.use(Ce),Or.use(Zo),Or.default=Or,s(l)==="object"&&l)try{l.exports=Or}catch{}return Or.default=Or,Or})}(Ot,Ot.exports)),Ot.exports}var H4=j4();const Cs=I.getDefaultExportFromCjs(H4),No=a.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(l,{expose:r,emit:n}){const t=l,s=n,c=a.inject(Bc),g=a.inject(Nc);if(!c)throw new Error("[grid-layout-plus]: missing layout store, GridItem must under a GridLayout.");const h=a.shallowRef(null),v=a.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 m=!1,u=!1,_=NaN,S=NaN,z=NaN,w=NaN,j=-1,A=-1,N=-1,Y=-1,b=t.x,L=t.y,T=t.w,x=t.h;const k=a.ref(),$=a.reactive({i:a.toRef(t,"i"),state:v,wrapper:k,calcXY:Pe});function U(ce){Ye(ce)}function X(){qa()}function be(ce){rn(t.isDraggable)&&(v.draggable=ce)}function ze(ce){rn(t.isResizable)&&(v.resizable=ce)}function Ee(ce){rn(t.isBounded)&&(v.bounded=ce)}function ne(ce){v.transformScale=ce}function ke(ce){v.rowHeight=ce}function Z(ce){v.maxRows=ce}function de(){v.rtl=_s()==="rtl",qa()}function Ke(ce){v.cols=Math.floor(ce)}c.increaseItem($),a.onBeforeMount(()=>{v.rtl=_s()==="rtl"}),a.onMounted(()=>{c.responsive&&c.lastBreakpoint?v.cols=Oc(c.lastBreakpoint,c.cols):v.cols=c.colNum,v.rowHeight=c.rowHeight,v.containerWidth=c.width!==null?c.width:100,v.margin=c.margin!==void 0?c.margin.map(Number):[10,10],v.maxRows=c.maxRows,rn(t.isDraggable)?v.draggable=c.isDraggable:v.draggable=t.isDraggable,rn(t.isResizable)?v.resizable=c.isResizable:v.resizable=t.isResizable,rn(t.isBounded)?v.bounded=c.isBounded:v.bounded=t.isBounded,v.transformScale=c.transformScale,v.useCssTransforms=c.useCssTransforms,v.useStyleCursor=c.useStyleCursor,a.watchEffect(()=>{b=t.x,L=t.y,x=t.h,T=t.w,jr(pa)}),g.on("updateWidth",U),g.on("compact",X),g.on("setDraggable",be),g.on("setResizable",ze),g.on("setBounded",Ee),g.on("setTransformScale",ne),g.on("setRowHeight",ke),g.on("setMaxRows",Z),g.on("directionchange",de),g.on("setColNum",Ke)}),a.onBeforeUnmount(()=>{g.off("updateWidth",U),g.off("compact",X),g.off("setDraggable",be),g.off("setResizable",ze),g.off("setBounded",Ee),g.off("setTransformScale",ne),g.off("setRowHeight",ke),g.off("setMaxRows",Z),g.off("directionchange",de),g.off("setColNum",Ke),h.value&&(h.value.unset(),h.value=null),c.decreaseItem($)}),r({state:v,wrapper:k});const Na=typeof navigator<"u"?navigator.userAgent.toLowerCase().includes("android"):!1,te=a.computed(()=>v.resizable&&!t.static),D=a.computed(()=>c.isMirrored?!v.rtl:v.rtl),le=a.computed(()=>(v.draggable||v.resizable)&&!t.static),ye=O4("item"),ue=a.computed(()=>({[ye.b()]:!0,[ye.bm("resizable")]:te.value,[ye.bm("static")]:t.static,[ye.bm("resizing")]:v.isResizing,[ye.bm("dragging")]:v.isDragging,[ye.bm("transform")]:v.useCssTransforms,[ye.bm("rtl")]:D.value,[ye.bm("no-touch")]:Na&&le.value})),Ne=a.computed(()=>[ye.be("resizer"),D.value&&ye.bem("resizer","rtl")].filter(Boolean));a.watch(()=>t.isDraggable,ce=>{v.draggable=ce}),a.watch(()=>t.static,()=>{jr(F),jr(ie)}),a.watch(()=>v.draggable,()=>{jr(F)}),a.watch(()=>t.isResizable,ce=>{v.resizable=ce}),a.watch(()=>t.isBounded,ce=>{v.bounded=ce}),a.watch(()=>v.resizable,()=>{jr(ie)}),a.watch(()=>v.rowHeight,()=>{jr(pa),jr(wa)}),a.watch([()=>v.cols,()=>v.containerWidth],()=>{jr(ie),jr(pa),jr(wa)}),a.watch([()=>t.minH,()=>t.maxH,()=>t.minW,()=>t.maxW],()=>{jr(ie)}),a.watch(D,()=>{jr(ie),jr(pa)}),a.watch([()=>c.margin,()=>c.margin[0],()=>c.margin[1]],()=>{const ce=c.margin;!ce||ce[0]===v.margin[0]&&ce[1]===v.margin[1]||(v.margin=ce.map(Number),jr(pa),jr(wa))});function pa(){t.x+t.w>v.cols?(b=0,T=t.w>v.cols?v.cols:t.w):(b=t.x,T=t.w);const ce=ea(b,L,T,x);v.isDragging&&(ce.top=v.dragging.top,D.value?ce.right=v.dragging.left:ce.left=v.dragging.left),v.isResizing&&(ce.width=v.resizing.width,ce.height=v.resizing.height);let ma;v.useCssTransforms?D.value?ma=T4(ce.top,ce.right,ce.width,ce.height):ma=N4(ce.top,ce.left,ce.width,ce.height):D.value?ma=z4(ce.top,ce.right,ce.width,ce.height):ma=A4(ce.top,ce.left,ce.width,ce.height),v.style=ma}function wa(){const ce={};for(const ma of["width","height"]){const na=v.style[ma].match(/^(\d+)px$/);if(!na)return;ce[ma]=na[1]}s("container-resized",t.i,t.h,t.w,ce.height,ce.width)}function ja(ce){if(t.static)return;const ma=ce.type;if(ma==="resizestart"&&v.isResizing||ma!=="resizestart"&&!v.isResizing)return;const na=ks(ce);if(rn(na))return;const{x:Ie,y:_e}=na,Ca={width:0,height:0};let ve;switch(ma){case"resizestart":{ie(),j=T,A=x,ve=ea(b,L,T,x),Ca.width=ve.width,Ca.height=ve.height,v.resizing=Ca,v.isResizing=!0;break}case"resizemove":{!ce.edges.right&&!ce.edges.left&&(z=Ie),!ce.edges.top&&!ce.edges.bottom&&(w=_e);const Je=xs(z,w,Ie,_e);D.value?Ca.width=v.resizing.width-Je.deltaX/v.transformScale:Ca.width=v.resizing.width+Je.deltaX/v.transformScale,Ca.height=v.resizing.height+Je.deltaY/v.transformScale,v.resizing=Ca;break}case"resizeend":{ve=ea(b,L,T,x),Ca.width=ve.width,Ca.height=ve.height,v.resizing={width:-1,height:-1},v.isResizing=!1;break}}ve=Re(Ca.height,Ca.width),ve.w<t.minW&&(ve.w=t.minW),ve.w>t.maxW&&(ve.w=t.maxW),ve.h<t.minH&&(ve.h=t.minH),ve.h>t.maxH&&(ve.h=t.maxH),ve.h<1&&(ve.h=1),ve.w<1&&(ve.w=1),z=Ie,w=_e,(T!==ve.w||x!==ve.h)&&s("resize",t.i,ve.h,ve.w,Ca.height,Ca.width),ce.type==="resizeend"&&(j!==T||A!==x)&&s("resized",t.i,ve.h,ve.w,Ca.height,Ca.width),g.emit("resizeEvent",ce.type,t.i,b,L,ve.h,ve.w)}function ee(ce){if(t.static||v.isResizing)return;const ma=ce.type;if(ma==="dragstart"&&v.isDragging||ma!=="dragstart"&&!v.isDragging)return;const na=ks(ce);if(rn(na))return;const{x:Ie,y:_e}=na,Ca=ce.target;if(!Ca.offsetParent)return;const ve={top:0,left:0};switch(ma){case"dragstart":{N=b,Y=L;const Qe=Ca.offsetParent.getBoundingClientRect(),Fe=Ca.getBoundingClientRect(),_a=Fe.left/v.transformScale,Le=Qe.left/v.transformScale,va=Fe.right/v.transformScale,re=Qe.right/v.transformScale,Se=Fe.top/v.transformScale,K=Qe.top/v.transformScale;D.value?ve.left=(va-re)*-1:ve.left=_a-Le,ve.top=Se-K,v.dragging=ve,v.isDragging=!0;break}case"dragmove":{const Qe=xs(_,S,Ie,_e);if(D.value?ve.left=v.dragging.left-Qe.deltaX/v.transformScale:ve.left=v.dragging.left+Qe.deltaX/v.transformScale,ve.top=v.dragging.top+Qe.deltaY/v.transformScale,v.bounded){const Fe=Ca.offsetParent.clientHeight-He(t.h,v.rowHeight,v.margin[1]);ve.top=Te(ve.top,0,Fe);const _a=xa(),Le=v.containerWidth-He(t.w,_a,v.margin[0]);ve.left=Te(ve.left,0,Le)}v.dragging=ve;break}case"dragend":{const Qe=Ca.offsetParent.getBoundingClientRect(),Fe=Ca.getBoundingClientRect(),_a=Fe.left/v.transformScale,Le=Qe.left/v.transformScale,va=Fe.right/v.transformScale,re=Qe.right/v.transformScale,Se=Fe.top/v.transformScale,K=Qe.top/v.transformScale;D.value?ve.left=(va-re)*-1:ve.left=_a-Le,ve.top=Se-K,v.dragging={top:-1,left:-1},v.isDragging=!1;break}}let Je;D.value,Je=Pe(ve.top,ve.left),_=Ie,S=_e,(b!==Je.x||L!==Je.y)&&s("move",t.i,Je.x,Je.y),ce.type==="dragend"&&(N!==b||Y!==L)&&s("moved",t.i,Je.x,Je.y),g.emit("dragEvent",ce.type,t.i,Je.x,Je.y,x,T)}function ea(ce,ma,na,Ie){const _e=xa();let Ca;return D.value?Ca={right:Math.round(_e*ce+(ce+1)*v.margin[0]),top:Math.round(v.rowHeight*ma+(ma+1)*v.margin[1]),width:na===1/0?na:Math.round(_e*na+Math.max(0,na-1)*v.margin[0]),height:Ie===1/0?Ie:Math.round(v.rowHeight*Ie+Math.max(0,Ie-1)*v.margin[1])}:Ca={left:Math.round(_e*ce+(ce+1)*v.margin[0]),top:Math.round(v.rowHeight*ma+(ma+1)*v.margin[1]),width:na===1/0?na:Math.round(_e*na+Math.max(0,na-1)*v.margin[0]),height:Ie===1/0?Ie:Math.round(v.rowHeight*Ie+Math.max(0,Ie-1)*v.margin[1])},Ca}function Pe(ce,ma){const na=xa();let Ie=Math.round((ma-v.margin[0])/(na+v.margin[0])),_e=Math.round((ce-v.margin[1])/(v.rowHeight+v.margin[1]));return Ie=Math.max(Math.min(Ie,v.cols-T),0),_e=Math.max(Math.min(_e,v.maxRows-x),0),{x:Ie,y:_e}}function xa(){return(v.containerWidth-v.margin[0]*(v.cols+1))/v.cols}function He(ce,ma,na){return Number.isFinite(ce)?Math.round(ma*ce+Math.max(0,ce-1)*na):ce}function Te(ce,ma,na){return Math.max(Math.min(ce,na),ma)}function Re(ce,ma,na=!1){const Ie=xa();let _e=Math.round((ma+v.margin[0])/(Ie+v.margin[0])),Ca=0;return na?Ca=Math.ceil((ce+v.margin[1])/(v.rowHeight+v.margin[1])):Ca=Math.round((ce+v.margin[1])/(v.rowHeight+v.margin[1])),_e=Math.max(Math.min(_e,v.cols-b),0),Ca=Math.max(Math.min(Ca,v.maxRows-L),0),{w:_e,h:Ca}}function Ye(ce,ma){v.containerWidth=ce}function qa(){pa()}function Va(){!h.value&&k.value&&(h.value=Cs(k.value),v.useStyleCursor||h.value.styleCursor(!1))}const P=ys(ee);function F(){if(Va(),!!h.value)if(v.draggable&&!t.static){const ce={ignoreFrom:t.dragIgnoreFrom,allowFrom:t.dragAllowFrom,...t.dragOption};h.value.draggable(ce),m||(m=!0,h.value.on("dragstart dragmove dragend",ma=>{ma.type==="dragmove"?P(ma):ee(ma)}))}else h.value.draggable({enabled:!1})}const J=ys(ja);function ie(){if(Va(),!!h.value)if(v.resizable&&!t.static){const ce=ea(0,0,t.maxW,t.maxH),ma=ea(0,0,t.minW,t.minH),na={edges:{left:D.value?`.${Ne.value[0]}`:!1,right:D.value?!1:`.${Ne.value[0]}`,bottom:`.${Ne.value[0]}`,top:!1},ignoreFrom:t.resizeIgnoreFrom,restrictSize:{min:{height:ma.height*v.transformScale,width:ma.width*v.transformScale},max:{height:ce.height*v.transformScale,width:ce.width*v.transformScale}},...t.resizeOption};t.preserveAspectRatio&&(na.modifiers=[Cs.modifiers.aspectRatio({ratio:"preserve"})]),h.value.resizable(na),u||(u=!0,h.value.on("resizestart resizemove resizeend",Ie=>{Ie.type==="resizemove"?J(Ie):ja(Ie)}))}else h.value.resizable({enabled:!1})}return(ce,ma)=>(a.openBlock(),a.createElementBlock("section",{ref_key:"wrapper",ref:k,class:a.normalizeClass(ue.value),style:a.normalizeStyle(v.style)},[a.renderSlot(ce.$slots,"default"),te.value?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(Ne.value)},null,2)):a.createCommentVNode("",!0)],6))}}),nt=typeof window<"u";var Ss;nt&&(Ss=window==null?void 0:window.navigator)!=null&&Ss.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Es(l){return l!=null}function Ds(){}const U4=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(U4)));const q4=nt&&("ontouchstart"in window||K4()>0),W4=q4?"pointerdown":"click";function K4(){return typeof navigator<"u"&&(navigator.maxTouchPoints||navigator.msMaxTouchPoints)||0}function Y4(l,r,n=window.Event){const{type:t,bubbles:s=!1,cancelable:c=!1,...g}=r;if(!Es(t)||t==="")return!1;let h;return Es(n)?h=new n(t,{bubbles:s,cancelable:c}):(h=document.createEvent("HTMLEvents"),h.initEvent(t,s,c)),Object.assign(h,g),l.dispatchEvent(h)}const G4="clickoutside",J4=new Set;nt&&document.addEventListener(W4,l=>{const r=l.target,n=l.composedPath&&l.composedPath();J4.forEach(t=>{t!==r&&(n?!n.includes(t):!t.contains(r))&&(!t.__transferElement||t.__transferElement!==r&&!t.__transferElement.contains(r))&&Y4(t,{type:G4})})},!0);const X4=[["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 mo;if(nt){for(const l of X4)if(l[1]in document){mo=l;break}}a.computed(()=>!1);const Z4=new Set,Q4=new WeakMap;if(nt&&mo){const l=mo[2],r=mo[4];document.addEventListener(r,()=>{if(Z4.forEach(n=>{n.value=!1}),document[l]){const n=Q4.get(document[l]);n&&(n.value=!0)}},!1)}const Lc=new Map;Lc.set("x",0);Lc.set("y",0);var lt=[],e6=function(){return lt.some(function(l){return l.activeTargets.length>0})},a6=function(){return lt.some(function(l){return l.skippedTargets.length>0})},Bs="ResizeObserver loop completed with undelivered notifications.",l6=function(){var l;typeof ErrorEvent=="function"?l=new ErrorEvent("error",{message:Bs}):(l=document.createEvent("Event"),l.initEvent("error",!1,!1),l.message=Bs),window.dispatchEvent(l)},Pt;(function(l){l.BORDER_BOX="border-box",l.CONTENT_BOX="content-box",l.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Pt||(Pt={}));var rt=function(l){return Object.freeze(l)},r6=function(){function l(r,n){this.inlineSize=r,this.blockSize=n,rt(this)}return l}(),Vc=function(){function l(r,n,t,s){return this.x=r,this.y=n,this.width=t,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,rt(this)}return l.prototype.toJSON=function(){var r=this,n=r.x,t=r.y,s=r.top,c=r.right,g=r.bottom,h=r.left,v=r.width,m=r.height;return{x:n,y:t,top:s,right:c,bottom:g,left:h,width:v,height:m}},l.fromRect=function(r){return new l(r.x,r.y,r.width,r.height)},l}(),Ci=function(l){return l instanceof SVGElement&&"getBBox"in l},Rc=function(l){if(Ci(l)){var r=l.getBBox(),n=r.width,t=r.height;return!n&&!t}var s=l,c=s.offsetWidth,g=s.offsetHeight;return!(c||g||l.getClientRects().length)},Ns=function(l){var r;if(l instanceof Element)return!0;var n=(r=l==null?void 0:l.ownerDocument)===null||r===void 0?void 0:r.defaultView;return!!(n&&l instanceof n.Element)},n6=function(l){switch(l.tagName){case"INPUT":if(l.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Vt=typeof window<"u"?window:{},po=new WeakMap,Ts=/auto|scroll/,t6=/^tb|vertical/,o6=/msie|trident/i.test(Vt.navigator&&Vt.navigator.userAgent),Sn=function(l){return parseFloat(l||"0")},_t=function(l,r,n){return l===void 0&&(l=0),r===void 0&&(r=0),n===void 0&&(n=!1),new r6((n?r:l)||0,(n?l:r)||0)},As=rt({devicePixelContentBoxSize:_t(),borderBoxSize:_t(),contentBoxSize:_t(),contentRect:new Vc(0,0,0,0)}),$c=function(l,r){if(r===void 0&&(r=!1),po.has(l)&&!r)return po.get(l);if(Rc(l))return po.set(l,As),As;var n=getComputedStyle(l),t=Ci(l)&&l.ownerSVGElement&&l.getBBox(),s=!o6&&n.boxSizing==="border-box",c=t6.test(n.writingMode||""),g=!t&&Ts.test(n.overflowY||""),h=!t&&Ts.test(n.overflowX||""),v=t?0:Sn(n.paddingTop),m=t?0:Sn(n.paddingRight),u=t?0:Sn(n.paddingBottom),_=t?0:Sn(n.paddingLeft),S=t?0:Sn(n.borderTopWidth),z=t?0:Sn(n.borderRightWidth),w=t?0:Sn(n.borderBottomWidth),j=t?0:Sn(n.borderLeftWidth),A=_+m,N=v+u,Y=j+z,b=S+w,L=h?l.offsetHeight-b-l.clientHeight:0,T=g?l.offsetWidth-Y-l.clientWidth:0,x=s?A+Y:0,k=s?N+b:0,$=t?t.width:Sn(n.width)-x-T,U=t?t.height:Sn(n.height)-k-L,X=$+A+T+Y,be=U+N+L+b,ze=rt({devicePixelContentBoxSize:_t(Math.round($*devicePixelRatio),Math.round(U*devicePixelRatio),c),borderBoxSize:_t(X,be,c),contentBoxSize:_t($,U,c),contentRect:new Vc(_,v,$,U)});return po.set(l,ze),ze},Pc=function(l,r,n){var t=$c(l,n),s=t.borderBoxSize,c=t.contentBoxSize,g=t.devicePixelContentBoxSize;switch(r){case Pt.DEVICE_PIXEL_CONTENT_BOX:return g;case Pt.BORDER_BOX:return s;default:return c}},i6=function(){function l(r){var n=$c(r);this.target=r,this.contentRect=n.contentRect,this.borderBoxSize=rt([n.borderBoxSize]),this.contentBoxSize=rt([n.contentBoxSize]),this.devicePixelContentBoxSize=rt([n.devicePixelContentBoxSize])}return l}(),Fc=function(l){if(Rc(l))return 1/0;for(var r=0,n=l.parentNode;n;)r+=1,n=n.parentNode;return r},s6=function(){var l=1/0,r=[];lt.forEach(function(c){if(c.activeTargets.length!==0){var g=[];c.activeTargets.forEach(function(h){var v=new i6(h.target),m=Fc(h.target);g.push(v),h.lastReportedSize=Pc(h.target,h.observedBox),m<l&&(l=m)}),r.push(function(){c.callback.call(c.observer,g,c.observer)}),c.activeTargets.splice(0,c.activeTargets.length)}});for(var n=0,t=r;n<t.length;n++){var s=t[n];s()}return l},zs=function(l){lt.forEach(function(r){r.activeTargets.splice(0,r.activeTargets.length),r.skippedTargets.splice(0,r.skippedTargets.length),r.observationTargets.forEach(function(n){n.isActive()&&(Fc(n.target)>l?r.activeTargets.push(n):r.skippedTargets.push(n))})})},c6=function(){var l=0;for(zs(l);e6();)l=s6(),zs(l);return a6()&&l6(),l>0},ti,jc=[],u6=function(){return jc.splice(0).forEach(function(l){return l()})},d6=function(l){if(!ti){var r=0,n=document.createTextNode(""),t={characterData:!0};new MutationObserver(function(){return u6()}).observe(n,t),ti=function(){n.textContent="".concat(r?r--:r++)}}jc.push(l),ti()},p6=function(l){d6(function(){requestAnimationFrame(l)})},yo=0,f6=function(){return!!yo},h6=250,v6={attributes:!0,characterData:!0,childList:!0,subtree:!0},Ms=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Os=function(l){return l===void 0&&(l=0),Date.now()+l},oi=!1,m6=function(){function l(){var r=this;this.stopped=!0,this.listener=function(){return r.schedule()}}return l.prototype.run=function(r){var n=this;if(r===void 0&&(r=h6),!oi){oi=!0;var t=Os(r);p6(function(){var s=!1;try{s=c6()}finally{if(oi=!1,r=t-Os(),!f6())return;s?n.run(1e3):r>0?n.run(r):n.start()}})}},l.prototype.schedule=function(){this.stop(),this.run()},l.prototype.observe=function(){var r=this,n=function(){return r.observer&&r.observer.observe(document.body,v6)};document.body?n():Vt.addEventListener("DOMContentLoaded",n)},l.prototype.start=function(){var r=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Ms.forEach(function(n){return Vt.addEventListener(n,r.listener,!0)}))},l.prototype.stop=function(){var r=this;this.stopped||(this.observer&&this.observer.disconnect(),Ms.forEach(function(n){return Vt.removeEventListener(n,r.listener,!0)}),this.stopped=!0)},l}(),bi=new m6,Is=function(l){!yo&&l>0&&bi.start(),yo+=l,!yo&&bi.stop()},y6=function(l){return!Ci(l)&&!n6(l)&&getComputedStyle(l).display==="inline"},g6=function(){function l(r,n){this.target=r,this.observedBox=n||Pt.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return l.prototype.isActive=function(){var r=Pc(this.target,this.observedBox,!0);return y6(this.target)&&(this.lastReportedSize=r),this.lastReportedSize.inlineSize!==r.inlineSize||this.lastReportedSize.blockSize!==r.blockSize},l}(),b6=function(){function l(r,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=r,this.callback=n}return l}(),fo=new WeakMap,Ls=function(l,r){for(var n=0;n<l.length;n+=1)if(l[n].target===r)return n;return-1},ho=function(){function l(){}return l.connect=function(r,n){var t=new b6(r,n);fo.set(r,t)},l.observe=function(r,n,t){var s=fo.get(r),c=s.observationTargets.length===0;Ls(s.observationTargets,n)<0&&(c&&lt.push(s),s.observationTargets.push(new g6(n,t&&t.box)),Is(1),bi.schedule())},l.unobserve=function(r,n){var t=fo.get(r),s=Ls(t.observationTargets,n),c=t.observationTargets.length===1;s>=0&&(c&&lt.splice(lt.indexOf(t),1),t.observationTargets.splice(s,1),Is(-1))},l.disconnect=function(r){var n=this,t=fo.get(r);t.observationTargets.slice().forEach(function(s){return n.unobserve(r,s.target)}),t.activeTargets.splice(0,t.activeTargets.length)},l}(),k6=function(){function l(r){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof r!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");ho.connect(this,r)}return l.prototype.observe=function(r,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ns(r))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");ho.observe(this,r,n)},l.prototype.unobserve=function(r){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Ns(r))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");ho.unobserve(this,r)},l.prototype.disconnect=function(){ho.disconnect(this)},l.toString=function(){return"function ResizeObserver () { [polyfill code] }"},l}();const To=new WeakMap;function x6(l){var r;for(let n=0,t=l.length;n<t;++n){const s=l[n],c=To.get(s.target);if(typeof c=="function"){const{inlineSize:g,blockSize:h}=((r=s.borderBoxSize)==null?void 0:r[0])??{},{offsetWidth:v,offsetHeight:m}=s.target;c(Object.assign(s,{offsetWidth:v,offsetHeight:m,width:g??v,height:h??m}))}}}const Hc=new(nt&&window.ResizeObserver||k6)(x6);function Vs(l,r){To.set(l,r),Hc.observe(l)}function Rs(l){To.has(l)&&(Hc.unobserve(l),To.delete(l))}function _6(l={}){let r=Ds;const n=a.watch(()=>a.unref(l.target),s=>{r(),!(!s||typeof l.onResize!="function")&&(Vs(s,l.onResize),r=()=>{Rs(s),r=Ds})},{immediate:!0}),t=()=>{n(),r()};return a.getCurrentScope()&&a.onScopeDispose(t),{observeResize:Vs,unobserveResize:Rs,unobserve:t}}const w6=a.ref(!1);a.computed(()=>w6.value);const $s="__theme_style__",ii="__theme_observer__",Ps=a.reactive(new Map),Fs=new Map;a.watch(Ps,()=>{if(!nt)return;Fs.clear();const l=document.head.querySelector(`#${$s}`);l&&document.head.removeChild(l);const r=document.createElement("style");let n=`.${ii} { width: 1px }`,t=1;for(const[s,[c,g]]of Ps.entries())n+=` html.${c} .${ii}, .${g} .${ii} { width: ${++t}px }`,Fs.set(t,s);r.textContent=n,r.id=$s,document.head.appendChild(r)});const Uc=a.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(l,{expose:r,emit:n}){const t=l,s=n,c=a.reactive({width:-1,mergedStyle:{},lastLayoutLength:0,isDragging:!1,placeholder:{x:0,y:0,w:0,h:0,i:""},layouts:{},lastBreakpoint:null,originalLayout:null}),g=new Map,h=a.ref(t.layout),v=a.ref(),{observeResize:m,unobserveResize:u}=_6(),_=_4();_.on("resizeEvent",S),_.on("dragEvent",z),a.onBeforeMount(()=>{s("layout-before-mount",h.value)}),a.onMounted(()=>{s("layout-mounted",h.value),a.nextTick(()=>{M4(h.value),c.originalLayout=h.value,a.nextTick(()=>{U(),v.value&&m(v.value,w4(b,16)),gt(h.value,t.verticalCompact),s("layout-updated",h.value),Y(),b()})})}),a.onBeforeUnmount(()=>{_.clearAll(),v.value&&u(v.value)});function S(be,ze,Ee,ne,ke,Z){k(be,ze,Ee,ne,ke,Z)}function z(be,ze,Ee,ne,ke,Z){x(be,ze,Ee,ne,ke,Z)}a.watch(()=>c.width,(be,ze)=>{a.nextTick(()=>{_.emit("updateWidth",be),ze===-1&&a.nextTick(()=>{s("layout-ready",h.value)}),Y()})}),a.watch(()=>[t.layout,t.layout.length],()=>{h.value=t.layout,N()}),a.watch(()=>t.colNum,be=>{_.emit("setColNum",be)}),a.watch(()=>t.rowHeight,be=>{_.emit("setRowHeight",be)}),a.watch(()=>t.isDraggable,be=>{_.emit("setDraggable",be)}),a.watch(()=>t.isResizable,be=>{_.emit("setResizable",be)}),a.watch(()=>t.isBounded,be=>{_.emit("setBounded",be)}),a.watch(()=>t.transformScale,be=>{_.emit("setTransformScale",be)}),a.watch(()=>t.responsive,be=>{be||(s("update:layout",c.originalLayout),_.emit("setColNum",t.colNum)),b()}),a.watch(()=>t.maxRows,be=>{_.emit("setMaxRows",be)}),a.watch([()=>t.margin,()=>t.margin[1]],Y),a.provide(Bc,a.reactive({...a.toRefs(t),...a.toRefs(c),increaseItem:w,decreaseItem:j})),a.provide(Nc,_),r({state:c,getItem:A,resizeEvent:k,dragEvent:x,layoutUpdate:N});function w(be){g.set(be.i,be)}function j(be){g.delete(be.i)}function A(be){return g.get(be)}function N(){if(!rn(h.value)&&!rn(c.originalLayout)){if(h.value.length!==c.originalLayout.length){const be=X(h.value,c.originalLayout);if(be.length>0)if(h.value.length>c.originalLayout.length)c.originalLayout=c.originalLayout.concat(be);else{const ze=new Set(be.map(Ee=>Ee.i));c.originalLayout=c.originalLayout.filter(Ee=>!ze.has(Ee.i))}c.lastLayoutLength=h.value.length,U()}gt(h.value,t.verticalCompact),_.emit("updateWidth",c.width),Y(),s("layout-updated",h.value)}}function Y(){c.mergedStyle={height:L()}}function b(){v.value&&(c.width=v.value.offsetWidth),_.emit("resizeEvent")}function L(){if(!t.autoSize)return;const be=parseFloat(t.margin[1]);return S4(h.value)*(t.rowHeight+be)+be+"px"}let T;function x(be,ze,Ee,ne,ke,Z){let de=gs(h.value,ze);rn(de)&&(de={h:0,w:0,x:0,y:0,i:""}),be==="dragstart"&&!t.verticalCompact&&(T=h.value.reduce((Ke,{i:Na,x:te,y:D})=>({...Ke,[Na]:{x:te,y:D}}),{})),be==="dragmove"||be==="dragstart"?(c.placeholder.i=ze,c.placeholder.x=de.x,c.placeholder.y=de.y,c.placeholder.w=Z,c.placeholder.h=ke,a.nextTick(()=>{c.isDragging=!0}),_.emit("updateWidth",c.width)):a.nextTick(()=>{c.isDragging=!1}),h.value=gi(h.value,de,Ee,ne,!0,t.preventCollision),t.restoreOnDrag?(de.static=!0,gt(h.value,t.verticalCompact,T),de.static=!1):gt(h.value,t.verticalCompact),_.emit("compact"),Y(),be==="dragend"&&(T=void 0,s("layout-updated",h.value))}function k(be,ze,Ee,ne,ke,Z){let de=gs(h.value,ze);rn(de)&&(de={h:0,w:0,x:0,y:0,i:""});let Ke;if(t.preventCollision){const Na=Ac(h.value,{...de,w:Z,h:ke}).filter(te=>te.i!==de.i);if(Ke=Na.length>0,Ke){let te=1/0,D=1/0;Na.forEach(le=>{le.x>de.x&&(te=Math.min(te,le.x)),le.y>de.y&&(D=Math.min(D,le.y))}),Number.isFinite(te)&&(de.w=te-de.x),Number.isFinite(D)&&(de.h=D-de.y)}}Ke||(de.w=Z,de.h=ke),be==="resizestart"||be==="resizemove"?(c.placeholder.i=ze,c.placeholder.x=Ee,c.placeholder.y=ne,c.placeholder.w=de.w,c.placeholder.h=de.h,a.nextTick(()=>{c.isDragging=!0}),_.emit("updateWidth",c.width)):be&&a.nextTick(()=>{c.isDragging=!1}),t.responsive&&$(),gt(h.value,t.verticalCompact),_.emit("compact"),Y(),be==="resizeend"&&s("layout-updated",h.value)}function $(){const be=V4(t.breakpoints,c.width);if(be===c.lastBreakpoint)return;const ze=Oc(be,t.cols);!rn(c.lastBreakpoint)&&!c.layouts[c.lastBreakpoint]&&(c.layouts[c.lastBreakpoint]=yi(h.value));const Ee=R4(c.originalLayout,c.layouts,t.breakpoints,be,c.lastBreakpoint,ze,t.verticalCompact);c.layouts[be]=Ee,c.lastBreakpoint!==be&&s("breakpoint-changed",be,Ee),h.value=Ee,s("update:layout",Ee),c.lastBreakpoint=be,_.emit("setColNum",ze)}function U(){c.layouts=Object.assign({},t.responsiveLayouts)}function X(be,ze){const Ee=new Set(ze.map(de=>de.i)),ne=new Set(be.map(de=>de.i)),ke=be.filter(de=>!Ee.has(de.i)),Z=ze.filter(de=>!ne.has(de.i));return ke.concat(Z)}return(be,ze)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"wrapper",ref:v,class:"vgl-layout",style:a.normalizeStyle(c.mergedStyle)},[be.$slots.default?a.renderSlot(be.$slots,"default",{key:0}):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(h.value,Ee=>(a.openBlock(),a.createBlock(No,a.mergeProps({key:Ee.i,ref_for:!0},Ee),{default:a.withCtx(()=>[a.renderSlot(be.$slots,"item",{item:Ee})]),_:2},1040))),128)),a.withDirectives(a.createVNode(No,{class:"vgl-item--placeholder",x:c.placeholder.x,y:c.placeholder.y,w:c.placeholder.w,h:c.placeholder.h,i:c.placeholder.i},null,8,["x","y","w","h","i"]),[[a.vShow,c.isDragging]])],4))}});(function(){try{if(typeof document<"u"){var l=document.createElement("style");l.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(l)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();const C6={key:0,class:"item-view-group"},S6={key:0,class:"item-view-group"},E6=a.defineComponent({__name:"index",props:{children:{type:Object,default:()=>{}},level:{type:Number,default:1}},emits:["rowClick","routeUrl","radioChange"],setup(l,{emit:r}){const n=I.useModelComp(I.pinia),{isEdit:t}=I.storeToRefs(n),s=Wn(I.pinia),c=r,g=l,h=a.ref(""),v=a.computed(()=>g==null?void 0:g.children),m=a.computed(()=>{var N,Y,b,L;return((N=g==null?void 0:g.children)==null?void 0:N.length)>0&&((Y=g==null?void 0:g.children)!=null&&Y.every(T=>T==null?void 0:T.layout))?(L=(b=g==null?void 0:g.children)==null?void 0:b[0])==null?void 0:L.layout:"vertical"}),u=N=>{h.value=N,c("radioChange",N)},_=a.computed(()=>{var N,Y;return((Y=(N=g==null?void 0:g.children)==null?void 0:N[0])==null?void 0:Y.isGridLayout)||!1}),S=a.ref((g==null?void 0:g.level)+1),z=a.computed(()=>{if(!(g!=null&&g.children)||!Array.isArray(g.children)||g.children.length<2)return!1;const N=g.children.some(b=>(b==null?void 0:b.name)==="测量系统配置表"&&(b==null?void 0:b.comp)==="ParentItem"),Y=g.children.some(b=>(b==null?void 0:b.name)==="测量系统传递表"&&(b==null?void 0:b.comp)==="ParentItem");return N&&Y}),w=a.computed(()=>{var Y,b,L,T,x,k;let N=(Y=g==null?void 0:g.children)==null?void 0:Y.filter($=>$==null?void 0:$.choice);if(s.setSelectTab((b=N==null?void 0:N[0])==null?void 0:b.choiceName),(h==null?void 0:h.value)!=="")return(L=g==null?void 0:g.children)==null?void 0:L.filter($=>!($!=null&&$.choiceName)||($==null?void 0:$.choiceName)===(h==null?void 0:h.value));{let $=(x=(T=g==null?void 0:g.children)==null?void 0:T.find(U=>U==null?void 0:U.choice))==null?void 0:x.choiceName;return(k=g==null?void 0:g.children)==null?void 0:k.filter(U=>!(U!=null&&U.choiceName)||(U==null?void 0:U.choiceName)===$)}});a.watch(()=>g==null?void 0:g.children,()=>{z.value},{deep:!0});const j=N=>{c("rowClick",N)},A=(N,Y)=>{c("routeUrl",N,Y)};return(N,Y)=>_.value?(a.openBlock(),a.createBlock(a.unref(Uc),{key:0,layout:v.value,"onUpdate:layout":Y[0]||(Y[0]=b=>v.value=b),"is-draggable":a.unref(t)==="edit","is-resizable":a.unref(t)==="edit","col-num":24,margin:[8,16]},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(v.value,(b,L)=>(a.openBlock(),a.createBlock(a.unref(No),{key:b.i,x:b.x,y:b.y,"min-h":b.minH,"max-h":b.maxH,"min-w":b.minW,w:b.w,h:b.h,i:b.i},{default:a.withCtx(()=>{var T,x,k,$,U,X,be,ze,Ee,ne,ke,Z,de,Ke;return[a.createElementVNode("div",{style:a.normalizeStyle({gap:"16px",display:"flex",flexDirection:"column",paddingBottom:L===((T=g==null?void 0:g.children)==null?void 0:T.length)-1?"0px":"24px"})},[((k=(x=b==null?void 0:b.component)==null?void 0:x.comp)==null?void 0:k.toUpperCase())!=="TABLE"&&(($=b==null?void 0:b.component)!=null&&$.name)?(a.openBlock(),a.createElementBlock("div",C6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:(parseInt(S.value.toString())-1)*12+"px",fontWeight:600-(S.value-1)*100>=400?600-(S.value-1)*100:400,fontSize:17-S.value>=14?17-S.value+"px":"14px"})},a.toDisplayString((U=b==null?void 0:b.component)==null?void 0:U.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)((X=b==null?void 0:b.component)==null?void 0:X.comp)),{pageLayout:m.value,config:{showIndex:(be=a.unref(Yl)[L])==null?void 0:be.showIndex,allowMove:(ze=a.unref(Yl)[L])==null?void 0:ze.allowMove,viewport:(Ee=a.unref(Yl)[L])==null?void 0:Ee.viewport,status:(ne=a.unref(Yl)[L])==null?void 0:ne.status},related:b==null?void 0:b.relatedTables,compName:b==null?void 0:b.component.name,compNames:a.unref(cc),itemData:(ke=b==null?void 0:b.component)==null?void 0:ke.compData,childItemData:(Z=b==null?void 0:b.component)==null?void 0:Z.itemChildData,key:a.unref(qn),cacheNewData:a.unref(sc),onChange:a.unref(So),index:(b==null?void 0:b.id)??L,onContentChange:a.unref(Eo),onPageChange:a.unref(Do),parentTableId:(de=b==null?void 0:b.component)==null?void 0:de.tableId,allMapContents:a.unref(vi),children:(Ke=b==null?void 0:b.component)==null?void 0:Ke.children,level:S.value,onRowClick:j,onRouteUrl:A,onClickTrigger:a.unref(uc),onClickMainKey:a.unref(dc),onRadioChange:u},null,40,["pageLayout","config","related","compName","compNames","itemData","childItemData","cacheNewData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level","onClickTrigger","onClickMainKey"]))],4)]}),_:2},1032,["x","y","min-h","max-h","min-w","w","h","i"]))),128))]),_:1},8,["layout","is-draggable","is-resizable"])):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(w.value,(b,L)=>{var T,x;return a.openBlock(),a.createElementBlock("div",{style:a.normalizeStyle({gap:"16px",display:(b==null?void 0:b.isShow)===!1?"none":"flex",flexDirection:"column",paddingBottom:parseInt(L)===((T=g==null?void 0:g.children)==null?void 0:T.length)-1?"0px":"24px"})},[((x=b==null?void 0:b.comp)==null?void 0:x.toUpperCase())!=="TABLE"&&b.name?(a.openBlock(),a.createElementBlock("div",S6,[a.createElementVNode("div",{class:"group-name-wrap",style:a.normalizeStyle({paddingLeft:parseInt(S.value.toString())>1?"12px":"0px",fontWeight:600-(S.value-1)*100>=400?600-(S.value-1)*100:400,fontSize:17-S.value>=14?17-S.value+"px":"14px"})},a.toDisplayString(b.name),5)])):a.createCommentVNode("",!0),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref($t)(b.comp)),{compName:b.name,config:{showIndex:b==null?void 0:b.showIndex,allowMove:b==null?void 0:b.allowMove,viewport:b==null?void 0:b.viewport,status:b==null?void 0:b.status},itemData:b==null?void 0:b.compData,related:b==null?void 0:b.relatedTables,childItemData:b==null?void 0:b.itemChildData,key:a.unref(qn),onChange:a.unref(So),index:(b==null?void 0:b.id)??L,onContentChange:a.unref(Eo),onPageChange:a.unref(Do),parentTableId:b==null?void 0:b.tableId,allMapContents:a.unref(vi),children:b==null?void 0:b.children,level:S.value,onRowClick:j,onRouteUrl:A,onRadioChange:u},null,40,["compName","config","itemData","related","childItemData","onChange","index","onContentChange","onPageChange","parentTableId","allMapContents","children","level"]))],4)}),256))}}),D6=Ul._export_sfc(E6,[["__scopeId","data-v-822d7221"]]),B6={class:"radio-group-container"},N6=a.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},emits:["radioChange"],setup(l,{emit:r}){const n=l,t=r,s=a.ref(),c=Wn(I.pinia),{selectTab:g}=I.storeToRefs(c);a.watch(()=>n==null?void 0:n.itemData,()=>{s.value=g.value},{immediate:!0,deep:!0});const h=v=>{s.value=v,t("radioChange",s.value)};return(v,m)=>(a.openBlock(),a.createElementBlock("div",B6,[a.createVNode(pl.ssRadio,{modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=u=>s.value=u),content:n==null?void 0:n.itemData,onChange:h},null,8,["modelValue","content"])]))}}),T6=Ul._export_sfc(N6,[["__scopeId","data-v-ed48c2f8"]]),qc=a.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"}]),A6={TABLE:vc,FORM:fs,STATICFORM:mc,TABLEOPERATE:C1,TABLESTYLE:P1,TABLEEXTEND:j1,TABLEINTERACTION:q1,FORMOPERATE:hs,FOLD:x2,CALCULATOR:D2,METHODBUTTON:T2,AVATARUPLOAD:Gi.ssAvatar,SIGNATURE:Gi.ssSignature,FORMTOP:fs,STEP:j2,STEPOPERATE:p2,TIMELINE:Y2,TIMELINEOPERATE:g2,FORMTOPOPERATE:hs,SIGNATUREOPERATE:$2,AVATARUPLOADOPERATE:M2,TABS:X2,TABSOPERATE:Lh,CHART:Jh,CHARTOPERATE:i4,LAYOUT:u4,LAYOUTOPERATE:b4,PARENTITEM:D6,RADIO:T6};function St(l){return A6[l==null?void 0:l.toUpperCase()]||null}exports.De=Uc;exports.activeStepInfo=bt;exports.addContents=Rt;exports.addVisibleDialog=_i;exports.affixItems=Zf;exports.allMapContents=vi;exports.analyzeFilter=kt;exports.analyzeForm=Bd;exports.analyzeQuoteForm=Dd;exports.analyzeTable=Td;exports.cacheNewData=sc;exports.clickMainKey=dc;exports.clickSavePage=Xf;exports.clickStep=fc;exports.clickTrigger=uc;exports.compId=qn;exports.compNames=cc;exports.compShow=Ct;exports.createRobotContent=ac;exports.existLayouts=o0;exports.fixChangeValue=_o;exports.generateLayouts=L1;exports.getComponent=St;exports.getComponents=$t;exports.getPageData=$r;exports.getSliceContLength=p0;exports.gridRowHeight=A1;exports.isStepLayout=hc;exports.onBack=Gf;exports.onButtonChange=l0;exports.onChange=So;exports.onClick=Jf;exports.onClickStep=i0;exports.onContentChange=Eo;exports.onExtendTaskEnd=t0;exports.onOk=r0;exports.onPageBack=c0;exports.onPageChange=Do;exports.onSelectFixContent=Yf;exports.renderShowItems=oc;exports.robotFile=Cf;exports.showItems=Yl;exports.sliceTableLength=ic;exports.slotContent=qc;exports.ssTable=vc;exports.st=No;exports.stepItems=f0;exports.tabChange=s0;exports.toolBar=n0;exports.useFormComp=ki;exports.useModelLoader=Gp;exports.verifyButton=u0;